From 96fe05e19f2d59c29c81fa5691f3313de5e3e447 Mon Sep 17 00:00:00 2001 From: Spaaaacccee Date: Mon, 16 Oct 2023 17:56:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20path-vis?= =?UTF-8?q?ualiser/app@1a03701be40c1c143509c123bfd4f525888517c1=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-c5c5efa0.js => index-fedcdb91.js} | 140 +++++++++--------- index.html | 2 +- 2 files changed, 71 insertions(+), 71 deletions(-) rename assets/{index-c5c5efa0.js => index-fedcdb91.js} (86%) diff --git a/assets/index-c5c5efa0.js b/assets/index-fedcdb91.js similarity index 86% rename from assets/index-c5c5efa0.js rename to assets/index-fedcdb91.js index c3e2f8c7..e54ea7c3 100644 --- a/assets/index-c5c5efa0.js +++ b/assets/index-fedcdb91.js @@ -1,4 +1,4 @@ -var Dne=Object.defineProperty;var Lne=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pp=(e,t,n)=>(Lne(e,typeof t!="symbol"?t+"":t,n),n),Bk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var rt=(e,t,n)=>(Bk(e,t,"read from private field"),n?n.call(e):t.get(e)),lr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zu=(e,t,n,r)=>(Bk(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var a6=(e,t,n,r)=>({set _(i){zu(e,t,i,n)},get _(){return rt(e,t,r)}}),Wi=(e,t,n)=>(Bk(e,t,"access private method"),n);function Bne(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function J9(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Q9={exports:{}},gC={},Z9={exports:{}},cn={};/** +var Lne=Object.defineProperty;var Bne=(e,t,n)=>t in e?Lne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pp=(e,t,n)=>(Bne(e,typeof t!="symbol"?t+"":t,n),n),Bk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var rt=(e,t,n)=>(Bk(e,t,"read from private field"),n?n.call(e):t.get(e)),lr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zu=(e,t,n,r)=>(Bk(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var a6=(e,t,n,r)=>({set _(i){zu(e,t,i,n)},get _(){return rt(e,t,r)}}),Wi=(e,t,n)=>(Bk(e,t,"access private method"),n);function Nne(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function J9(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Q9={exports:{}},gC={},Z9={exports:{}},cn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Dne=Object.defineProperty;var Lne=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var mb=Symbol.for("react.element"),Nne=Symbol.for("react.portal"),$ne=Symbol.for("react.fragment"),Fne=Symbol.for("react.strict_mode"),zne=Symbol.for("react.profiler"),Une=Symbol.for("react.provider"),jne=Symbol.for("react.context"),Hne=Symbol.for("react.forward_ref"),Wne=Symbol.for("react.suspense"),Gne=Symbol.for("react.memo"),Vne=Symbol.for("react.lazy"),l6=Symbol.iterator;function Xne(e){return e===null||typeof e!="object"?null:(e=l6&&e[l6]||e["@@iterator"],typeof e=="function"?e:null)}var eV={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tV=Object.assign,nV={};function Eg(e,t,n){this.props=e,this.context=t,this.refs=nV,this.updater=n||eV}Eg.prototype.isReactComponent={};Eg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Eg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rV(){}rV.prototype=Eg.prototype;function T3(e,t,n){this.props=e,this.context=t,this.refs=nV,this.updater=n||eV}var I3=T3.prototype=new rV;I3.constructor=T3;tV(I3,Eg.prototype);I3.isPureReactComponent=!0;var u6=Array.isArray,iV=Object.prototype.hasOwnProperty,R3={current:null},oV={key:!0,ref:!0,__self:!0,__source:!0};function sV(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)iV.call(t,r)&&!oV.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1t in e?Dne(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qne=O,Zne=Symbol.for("react.element"),ere=Symbol.for("react.fragment"),tre=Object.prototype.hasOwnProperty,nre=Qne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rre={key:!0,ref:!0,__self:!0,__source:!0};function aV(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)tre.call(t,r)&&!rre.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Zne,type:e,key:o,ref:s,props:i,_owner:nre.current}}gC.Fragment=ere;gC.jsx=aV;gC.jsxs=aV;Q9.exports=gC;var C=Q9.exports;const ire={black:"#000",white:"#fff"},Gm=ire,ore={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Dc=ore,sre={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},lV=sre,are={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},mh=are,lre={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},uV=lre,ure={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},cre=ure,dre={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Lc=dre,fre={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},gh=fre,hre={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},pre=hre,mre={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},gre=mre,vre={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Bc=vre,yre={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},xre=yre,bre={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},wre=bre,_re={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},cV=_re,Sre={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},Ere=Sre,Cre={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Rh=Cre,Tre={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},Ire=Tre,Rre={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},Are=Rre,Pre={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},P3=Pre,Ore={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},Mre=Ore,dV=Object.freeze(Object.defineProperty({__proto__:null,amber:Ere,blue:Lc,blueGrey:Mre,brown:Are,common:Gm,cyan:pre,deepOrange:Ire,deepPurple:uV,green:Bc,grey:P3,indigo:cre,lightBlue:gh,lightGreen:xre,lime:wre,orange:Rh,pink:lV,purple:mh,red:Dc,teal:gre,yellow:cV},Symbol.toStringTag,{value:"Module"}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=fV(e[n])}),t}function Bo(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return Ah(e)&&Ah(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Ah(t[i])&&i in e&&Ah(e[i])?r[i]=Bo(e[i],t[i],n):n.clone?r[i]=Ah(t[i])?fV(t[i]):t[i]:r[i]=t[i])}),r}var hV={exports:{}},kre="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Dre=kre,Lre=Dre;function pV(){}function mV(){}mV.resetWarningCache=pV;var Bre=function(){function e(r,i,o,s,l,c){if(c!==Lre){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:mV,resetWarningCache:pV};return n.PropTypes=n,n};hV.exports=Bre();var gb=hV.exports;const Ty=al(gb);function wd(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function vC(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function z_(e,t){var n,r;return O.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Rr(e){return e&&e.ownerDocument||document}function lc(e){return Rr(e).defaultView||window}function bN(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Nre=typeof window<"u"?O.useLayoutEffect:O.useEffect,Eo=Nre;let f6=0;function $re(e){const[t,n]=O.useState(e),r=e||t;return O.useEffect(()=>{t==null&&(f6+=1,n(`mui-${f6}`))},[t]),r}const h6=CS["useId".toString()];function O3(e){if(h6!==void 0){const t=h6();return e??t}return $re(e)}function u1({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=O.useRef(e!==void 0),[o,s]=O.useState(t),l=i?e:o,c=O.useCallback(d=>{i||s(d)},[]);return[l,c]}function Zi(e){const t=O.useRef(e);return Eo(()=>{t.current=e}),O.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{bN(n,t)})},e)}let yC=!0,wN=!1,p6;const Fre={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function zre(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Fre[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Ure(e){e.metaKey||e.altKey||e.ctrlKey||(yC=!0)}function $k(){yC=!1}function jre(){this.visibilityState==="hidden"&&wN&&(yC=!0)}function Hre(e){e.addEventListener("keydown",Ure,!0),e.addEventListener("mousedown",$k,!0),e.addEventListener("pointerdown",$k,!0),e.addEventListener("touchstart",$k,!0),e.addEventListener("visibilitychange",jre,!0)}function Wre(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return yC||zre(t)}function M3(){const e=O.useCallback(i=>{i!=null&&Hre(i.ownerDocument)},[]),t=O.useRef(!1);function n(){return t.current?(wN=!0,window.clearTimeout(p6),p6=window.setTimeout(()=>{wN=!1},100),t.current=!1,!0):!1}function r(i){return Wre(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function gV(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Op;function vV(){if(Op)return Op;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Op="reverse",e.scrollLeft>0?Op="default":(e.scrollLeft=1,e.scrollLeft===0&&(Op="negative")),document.body.removeChild(e),Op}function Gre(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(vV()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Vre={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Xre=Vre;function k3(e,t){const n=$({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=k3(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Ct(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const m6=e=>e,qre=()=>{let e=m6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=m6}}},Yre=qre(),yV=Yre,Kre={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=Kre[t];return r?`${n}-${r}`:`${yV.generate(e)}-${t}`}function Tt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const Kh="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xV(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Jre=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qre=xV(function(e){return Jre.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Zre(e){if(e.sheet)return e.sheet;for(var t=0;t0?Bi(Cg,--jo):0,Vm--,Vr===10&&(Vm=1,bC--),Vr}function ws(){return Vr=jo2||d1(Vr)>3?"":" "}function fie(e,t){for(;--t&&ws()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return vb(e,U_()+(t<6&&Al()==32&&ws()==32))}function SN(e){for(;ws();)switch(Vr){case e:return jo;case 34:case 39:e!==34&&e!==39&&SN(Vr);break;case 40:e===41&&SN(e);break;case 92:ws();break}return jo}function hie(e,t){for(;ws()&&e+Vr!==47+10;)if(e+Vr===42+42&&Al()===47)break;return"/*"+vb(t,jo-1)+"*"+xC(e===47?e:ws())}function pie(e){for(;!d1(Al());)ws();return vb(e,jo)}function mie(e){return CV(H_("",null,null,null,[""],e=EV(e),0,[0],e))}function H_(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,I=o,A=r,R=x;S;)switch(v=b,b=ws()){case 40:if(v!=108&&Bi(R,h-1)==58){_N(R+=In(j_(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:R+=j_(b);break;case 9:case 10:case 13:case 32:R+=die(v);break;case 92:R+=fie(U_()-1,7);continue;case 47:switch(Al()){case 42:case 47:nw(gie(hie(ws(),U_()),t,n),c);break;default:R+="/"}break;case 123*y:l[d++]=bl(R)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(R=In(R,/\f/g,"")),g>0&&bl(R)-h&&nw(g>32?v6(R+";",r,n,h-1):v6(In(R," ","")+";",r,n,h-2),c);break;case 59:R+=";";default:if(nw(A=g6(R,t,n,d,f,i,l,x,E=[],I=[],h),o),b===123)if(f===0)H_(R,t,A,A,E,o,h,l,I);else switch(p===99&&Bi(R,3)===110?100:p){case 100:case 108:case 109:case 115:H_(e,A,A,r&&nw(g6(e,A,A,0,0,i,l,x,i,E=[],h),I),i,I,h,l,r?E:I);break;default:H_(R,A,A,A,[""],I,0,l,I)}}d=f=g=0,y=_=1,x=R="",h=s;break;case 58:h=1+bl(R),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&cie()==125)continue}switch(R+=xC(b),b*y){case 38:_=f>0?1:(R+="\f",-1);break;case 44:l[d++]=(bl(R)-1)*_,_=1;break;case 64:Al()===45&&(R+=j_(ws())),p=Al(),f=h=bl(x=R+=pie(U_())),b++;break;case 45:v===45&&bl(R)==2&&(y=0)}}return o}function g6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=B3(p),v=0,y=0,S=0;v0?p[_]+" "+b:In(b,/&\f/g,p[_])))&&(c[S++]=x);return wC(e,t,n,i===0?D3:l,c,d,f)}function gie(e,t,n){return wC(e,t,n,bV,xC(uie()),c1(e,2,-2),0)}function v6(e,t,n,r){return wC(e,t,n,L3,c1(e,0,r),c1(e,r+1,-1),r)}function Cm(e,t){for(var n="",r=B3(e),i=0;i6)switch(Bi(e,t+1)){case 109:if(Bi(e,t+4)!==45)break;case 102:return In(e,/(.+:)(.+)-([^]+)/,"$1"+Tn+"$2-$3$1"+TS+(Bi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_N(e,"stretch")?TV(In(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Bi(e,t+1)!==115)break;case 6444:switch(Bi(e,bl(e)-3-(~_N(e,"!important")&&10))){case 107:return In(e,":",":"+Tn)+e;case 101:return In(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Tn+(Bi(e,14)===45?"inline-":"")+"box$3$1"+Tn+"$2$3$1"+Xi+"$2box$3")+e}break;case 5936:switch(Bi(e,t+11)){case 114:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Tn+e+Xi+e+e}return e}var Cie=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L3:t.return=TV(t.value,t.length);break;case wV:return Cm([Iy(t,{value:In(t.value,"@","@"+Tn)})],i);case D3:if(t.length)return lie(t.props,function(o){switch(aie(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cm([Iy(t,{props:[In(o,/:(read-\w+)/,":"+TS+"$1")]})],i);case"::placeholder":return Cm([Iy(t,{props:[In(o,/:(plac\w+)/,":"+Tn+"input-$1")]}),Iy(t,{props:[In(o,/:(plac\w+)/,":"+TS+"$1")]}),Iy(t,{props:[In(o,/:(plac\w+)/,Xi+"input-$1")]})],i)}return""})}},Tie=[Cie],Iie=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Tie,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_{t[n]=fV(e[n])}),t}function Bo(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return Ah(e)&&Ah(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Ah(t[i])&&i in e&&Ah(e[i])?r[i]=Bo(e[i],t[i],n):n.clone?r[i]=Ah(t[i])?fV(t[i]):t[i]:r[i]=t[i])}),r}var hV={exports:{}},Dre="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lre=Dre,Bre=Lre;function pV(){}function mV(){}mV.resetWarningCache=pV;var Nre=function(){function e(r,i,o,s,l,c){if(c!==Bre){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:mV,resetWarningCache:pV};return n.PropTypes=n,n};hV.exports=Nre();var gb=hV.exports;const Ty=al(gb);function wd(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function vC(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function z_(e,t){var n,r;return O.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Rr(e){return e&&e.ownerDocument||document}function lc(e){return Rr(e).defaultView||window}function bN(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const $re=typeof window<"u"?O.useLayoutEffect:O.useEffect,Eo=$re;let f6=0;function Fre(e){const[t,n]=O.useState(e),r=e||t;return O.useEffect(()=>{t==null&&(f6+=1,n(`mui-${f6}`))},[t]),r}const h6=CS["useId".toString()];function O3(e){if(h6!==void 0){const t=h6();return e??t}return Fre(e)}function u1({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=O.useRef(e!==void 0),[o,s]=O.useState(t),l=i?e:o,c=O.useCallback(d=>{i||s(d)},[]);return[l,c]}function Zi(e){const t=O.useRef(e);return Eo(()=>{t.current=e}),O.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{bN(n,t)})},e)}let yC=!0,wN=!1,p6;const zre={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ure(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&zre[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function jre(e){e.metaKey||e.altKey||e.ctrlKey||(yC=!0)}function $k(){yC=!1}function Hre(){this.visibilityState==="hidden"&&wN&&(yC=!0)}function Wre(e){e.addEventListener("keydown",jre,!0),e.addEventListener("mousedown",$k,!0),e.addEventListener("pointerdown",$k,!0),e.addEventListener("touchstart",$k,!0),e.addEventListener("visibilitychange",Hre,!0)}function Gre(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return yC||Ure(t)}function M3(){const e=O.useCallback(i=>{i!=null&&Wre(i.ownerDocument)},[]),t=O.useRef(!1);function n(){return t.current?(wN=!0,window.clearTimeout(p6),p6=window.setTimeout(()=>{wN=!1},100),t.current=!1,!0):!1}function r(i){return Gre(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function gV(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Op;function vV(){if(Op)return Op;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Op="reverse",e.scrollLeft>0?Op="default":(e.scrollLeft=1,e.scrollLeft===0&&(Op="negative")),document.body.removeChild(e),Op}function Vre(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(vV()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Xre={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},qre=Xre;function k3(e,t){const n=$({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=k3(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Ct(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const m6=e=>e,Yre=()=>{let e=m6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=m6}}},Kre=Yre(),yV=Kre,Jre={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=Jre[t];return r?`${n}-${r}`:`${yV.generate(e)}-${t}`}function Tt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const Kh="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xV(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Qre=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Zre=xV(function(e){return Qre.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function eie(e){if(e.sheet)return e.sheet;for(var t=0;t0?Bi(Cg,--jo):0,Vm--,Vr===10&&(Vm=1,bC--),Vr}function ws(){return Vr=jo2||d1(Vr)>3?"":" "}function hie(e,t){for(;--t&&ws()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return vb(e,U_()+(t<6&&Al()==32&&ws()==32))}function SN(e){for(;ws();)switch(Vr){case e:return jo;case 34:case 39:e!==34&&e!==39&&SN(Vr);break;case 40:e===41&&SN(e);break;case 92:ws();break}return jo}function pie(e,t){for(;ws()&&e+Vr!==47+10;)if(e+Vr===42+42&&Al()===47)break;return"/*"+vb(t,jo-1)+"*"+xC(e===47?e:ws())}function mie(e){for(;!d1(Al());)ws();return vb(e,jo)}function gie(e){return CV(H_("",null,null,null,[""],e=EV(e),0,[0],e))}function H_(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,I=o,A=r,R=x;S;)switch(v=b,b=ws()){case 40:if(v!=108&&Bi(R,h-1)==58){_N(R+=In(j_(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:R+=j_(b);break;case 9:case 10:case 13:case 32:R+=fie(v);break;case 92:R+=hie(U_()-1,7);continue;case 47:switch(Al()){case 42:case 47:nw(vie(pie(ws(),U_()),t,n),c);break;default:R+="/"}break;case 123*y:l[d++]=bl(R)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(R=In(R,/\f/g,"")),g>0&&bl(R)-h&&nw(g>32?v6(R+";",r,n,h-1):v6(In(R," ","")+";",r,n,h-2),c);break;case 59:R+=";";default:if(nw(A=g6(R,t,n,d,f,i,l,x,E=[],I=[],h),o),b===123)if(f===0)H_(R,t,A,A,E,o,h,l,I);else switch(p===99&&Bi(R,3)===110?100:p){case 100:case 108:case 109:case 115:H_(e,A,A,r&&nw(g6(e,A,A,0,0,i,l,x,i,E=[],h),I),i,I,h,l,r?E:I);break;default:H_(R,A,A,A,[""],I,0,l,I)}}d=f=g=0,y=_=1,x=R="",h=s;break;case 58:h=1+bl(R),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&die()==125)continue}switch(R+=xC(b),b*y){case 38:_=f>0?1:(R+="\f",-1);break;case 44:l[d++]=(bl(R)-1)*_,_=1;break;case 64:Al()===45&&(R+=j_(ws())),p=Al(),f=h=bl(x=R+=mie(U_())),b++;break;case 45:v===45&&bl(R)==2&&(y=0)}}return o}function g6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=B3(p),v=0,y=0,S=0;v0?p[_]+" "+b:In(b,/&\f/g,p[_])))&&(c[S++]=x);return wC(e,t,n,i===0?D3:l,c,d,f)}function vie(e,t,n){return wC(e,t,n,bV,xC(cie()),c1(e,2,-2),0)}function v6(e,t,n,r){return wC(e,t,n,L3,c1(e,0,r),c1(e,r+1,-1),r)}function Cm(e,t){for(var n="",r=B3(e),i=0;i6)switch(Bi(e,t+1)){case 109:if(Bi(e,t+4)!==45)break;case 102:return In(e,/(.+:)(.+)-([^]+)/,"$1"+Tn+"$2-$3$1"+TS+(Bi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_N(e,"stretch")?TV(In(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Bi(e,t+1)!==115)break;case 6444:switch(Bi(e,bl(e)-3-(~_N(e,"!important")&&10))){case 107:return In(e,":",":"+Tn)+e;case 101:return In(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Tn+(Bi(e,14)===45?"inline-":"")+"box$3$1"+Tn+"$2$3$1"+Xi+"$2box$3")+e}break;case 5936:switch(Bi(e,t+11)){case 114:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Tn+e+Xi+In(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Tn+e+Xi+e+e}return e}var Tie=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L3:t.return=TV(t.value,t.length);break;case wV:return Cm([Iy(t,{value:In(t.value,"@","@"+Tn)})],i);case D3:if(t.length)return uie(t.props,function(o){switch(lie(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cm([Iy(t,{props:[In(o,/:(read-\w+)/,":"+TS+"$1")]})],i);case"::placeholder":return Cm([Iy(t,{props:[In(o,/:(plac\w+)/,":"+Tn+"input-$1")]}),Iy(t,{props:[In(o,/:(plac\w+)/,":"+TS+"$1")]}),Iy(t,{props:[In(o,/:(plac\w+)/,Xi+"input-$1")]})],i)}return""})}},Iie=[Tie],Rie=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Iie,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Gie={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vie=/[A-Z]|^ms/g,Xie=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kV=function(t){return t.charCodeAt(1)===45},S6=function(t){return t!=null&&typeof t!="boolean"},Fk=xV(function(e){return kV(e)?e:e.replace(Vie,"-$&").toLowerCase()}),E6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Xie,function(r,i,o){return wl={name:i,styles:o,next:wl},i})}return Gie[t]!==1&&!kV(t)&&typeof n=="number"&&n!==0?n+"px":n};function f1(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return wl={name:n.name,styles:n.styles,next:wl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)wl={name:r.name,styles:r.styles,next:wl},r=r.next;var i=n.styles+";";return i}return qie(e,t,n)}case"function":{if(e!==void 0){var o=wl,s=n(e);return wl=o,f1(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function qie(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Qie:Zie},R6=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},eoe=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return OV(n,r,i),Kie(function(){return MV(n,r,i)}),null},toe=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=R6(t,n,r),c=l||I6(i),d=!c("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var p=f.length,g=1;gt(roe(i)?n:i):t;return C.jsx(Jie,{styles:r})}/** + */var wi=typeof Symbol=="function"&&Symbol.for,N3=wi?Symbol.for("react.element"):60103,$3=wi?Symbol.for("react.portal"):60106,_C=wi?Symbol.for("react.fragment"):60107,SC=wi?Symbol.for("react.strict_mode"):60108,EC=wi?Symbol.for("react.profiler"):60114,CC=wi?Symbol.for("react.provider"):60109,TC=wi?Symbol.for("react.context"):60110,F3=wi?Symbol.for("react.async_mode"):60111,IC=wi?Symbol.for("react.concurrent_mode"):60111,RC=wi?Symbol.for("react.forward_ref"):60112,AC=wi?Symbol.for("react.suspense"):60113,Aie=wi?Symbol.for("react.suspense_list"):60120,PC=wi?Symbol.for("react.memo"):60115,OC=wi?Symbol.for("react.lazy"):60116,Pie=wi?Symbol.for("react.block"):60121,Oie=wi?Symbol.for("react.fundamental"):60117,Mie=wi?Symbol.for("react.responder"):60118,kie=wi?Symbol.for("react.scope"):60119;function Ds(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case N3:switch(e=e.type,e){case F3:case IC:case _C:case EC:case SC:case AC:return e;default:switch(e=e&&e.$$typeof,e){case TC:case RC:case OC:case PC:case CC:return e;default:return t}}case $3:return t}}}function RV(e){return Ds(e)===IC}Nn.AsyncMode=F3;Nn.ConcurrentMode=IC;Nn.ContextConsumer=TC;Nn.ContextProvider=CC;Nn.Element=N3;Nn.ForwardRef=RC;Nn.Fragment=_C;Nn.Lazy=OC;Nn.Memo=PC;Nn.Portal=$3;Nn.Profiler=EC;Nn.StrictMode=SC;Nn.Suspense=AC;Nn.isAsyncMode=function(e){return RV(e)||Ds(e)===F3};Nn.isConcurrentMode=RV;Nn.isContextConsumer=function(e){return Ds(e)===TC};Nn.isContextProvider=function(e){return Ds(e)===CC};Nn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===N3};Nn.isForwardRef=function(e){return Ds(e)===RC};Nn.isFragment=function(e){return Ds(e)===_C};Nn.isLazy=function(e){return Ds(e)===OC};Nn.isMemo=function(e){return Ds(e)===PC};Nn.isPortal=function(e){return Ds(e)===$3};Nn.isProfiler=function(e){return Ds(e)===EC};Nn.isStrictMode=function(e){return Ds(e)===SC};Nn.isSuspense=function(e){return Ds(e)===AC};Nn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_C||e===IC||e===EC||e===SC||e===AC||e===Aie||typeof e=="object"&&e!==null&&(e.$$typeof===OC||e.$$typeof===PC||e.$$typeof===CC||e.$$typeof===TC||e.$$typeof===RC||e.$$typeof===Oie||e.$$typeof===Mie||e.$$typeof===kie||e.$$typeof===Pie)};Nn.typeOf=Ds;IV.exports=Nn;var Die=IV.exports,z3=Die,Lie={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Bie={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Nie={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},AV={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},U3={};U3[z3.ForwardRef]=Nie;U3[z3.Memo]=AV;function x6(e){return z3.isMemo(e)?AV:U3[e.$$typeof]||Lie}var $ie=Object.defineProperty,Fie=Object.getOwnPropertyNames,b6=Object.getOwnPropertySymbols,zie=Object.getOwnPropertyDescriptor,Uie=Object.getPrototypeOf,w6=Object.prototype;function PV(e,t,n){if(typeof t!="string"){if(w6){var r=Uie(t);r&&r!==w6&&PV(e,r,n)}var i=Fie(t);b6&&(i=i.concat(b6(t)));for(var o=x6(e),s=x6(t),l=0;l=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Vie={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xie=/[A-Z]|^ms/g,qie=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kV=function(t){return t.charCodeAt(1)===45},S6=function(t){return t!=null&&typeof t!="boolean"},Fk=xV(function(e){return kV(e)?e:e.replace(Xie,"-$&").toLowerCase()}),E6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qie,function(r,i,o){return wl={name:i,styles:o,next:wl},i})}return Vie[t]!==1&&!kV(t)&&typeof n=="number"&&n!==0?n+"px":n};function f1(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return wl={name:n.name,styles:n.styles,next:wl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)wl={name:r.name,styles:r.styles,next:wl},r=r.next;var i=n.styles+";";return i}return Yie(e,t,n)}case"function":{if(e!==void 0){var o=wl,s=n(e);return wl=o,f1(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function Yie(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Zie:eoe},R6=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},toe=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return OV(n,r,i),Jie(function(){return MV(n,r,i)}),null},noe=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=R6(t,n,r),c=l||I6(i),d=!c("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var p=f.length,g=1;gt(ioe(i)?n:i):t;return C.jsx(Qie,{styles:r})}/** * @mui/styled-engine v5.14.11 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function NV(e,t){return EN(e,t)}const ooe=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},soe=["values","unit","step"],aoe=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>$({},n,{[r.key]:r.val}),{})};function loe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,soe),o=aoe(t),s=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function d(p,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function f(p){return s.indexOf(p)+1`@media (min-width:${H3[e]}px)`};function rl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||A6;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||A6;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||H3).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function $V(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function FV(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function doe(e,...t){const n=$V(e),r=[n,...t].reduce((i,o)=>Bo(i,o),{});return FV(Object.keys(n),r)}function foe(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function zk({values:e,breakpoints:t,base:n}){const r=n||foe(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[o],o=l):s[l]=e,s),{})}function kC(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function IS(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=kC(e,n)||r,t&&(i=t(i,r,e)),i}function An(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,d=kC(c,r)||{};return rl(s,l,h=>{let p=IS(d,i,h);return h===p&&typeof h=="string"&&(p=IS(d,i,`${t}${h==="default"?"":ke(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function hoe(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const poe={m:"margin",p:"padding"},moe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},P6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},goe=hoe(e=>{if(e.length>2)if(P6[e])e=P6[e];else return[e];const[t,n]=e.split(""),r=poe[t],i=moe[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),W3=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],G3=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...W3,...G3];function yb(e,t,n,r){var i;const o=(i=kC(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function V3(e){return yb(e,"spacing",8)}function Jh(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function voe(e,t){return n=>e.reduce((r,i)=>(r[i]=Jh(t,n),r),{})}function yoe(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=goe(n),o=voe(i,r),s=e[n];return rl(e,s,o)}function zV(e,t){const n=V3(e.theme);return Object.keys(e).map(r=>yoe(e,t,r,n)).reduce(Ox,{})}function Dr(e){return zV(e,W3)}Dr.propTypes={};Dr.filterProps=W3;function Lr(e){return zV(e,G3)}Lr.propTypes={};Lr.filterProps=G3;function xoe(e=8){if(e.mui)return e;const t=V3({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function DC(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ox(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function El(e){return typeof e!="number"?e:`${e}px solid`}const boe=An({prop:"border",themeKey:"borders",transform:El}),woe=An({prop:"borderTop",themeKey:"borders",transform:El}),_oe=An({prop:"borderRight",themeKey:"borders",transform:El}),Soe=An({prop:"borderBottom",themeKey:"borders",transform:El}),Eoe=An({prop:"borderLeft",themeKey:"borders",transform:El}),Coe=An({prop:"borderColor",themeKey:"palette"}),Toe=An({prop:"borderTopColor",themeKey:"palette"}),Ioe=An({prop:"borderRightColor",themeKey:"palette"}),Roe=An({prop:"borderBottomColor",themeKey:"palette"}),Aoe=An({prop:"borderLeftColor",themeKey:"palette"}),LC=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yb(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Jh(t,r)});return rl(e,e.borderRadius,n)}return null};LC.propTypes={};LC.filterProps=["borderRadius"];DC(boe,woe,_oe,Soe,Eoe,Coe,Toe,Ioe,Roe,Aoe,LC);const BC=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yb(e.theme,"spacing",8),n=r=>({gap:Jh(t,r)});return rl(e,e.gap,n)}return null};BC.propTypes={};BC.filterProps=["gap"];const NC=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yb(e.theme,"spacing",8),n=r=>({columnGap:Jh(t,r)});return rl(e,e.columnGap,n)}return null};NC.propTypes={};NC.filterProps=["columnGap"];const $C=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yb(e.theme,"spacing",8),n=r=>({rowGap:Jh(t,r)});return rl(e,e.rowGap,n)}return null};$C.propTypes={};$C.filterProps=["rowGap"];const Poe=An({prop:"gridColumn"}),Ooe=An({prop:"gridRow"}),Moe=An({prop:"gridAutoFlow"}),koe=An({prop:"gridAutoColumns"}),Doe=An({prop:"gridAutoRows"}),Loe=An({prop:"gridTemplateColumns"}),Boe=An({prop:"gridTemplateRows"}),Noe=An({prop:"gridTemplateAreas"}),$oe=An({prop:"gridArea"});DC(BC,NC,$C,Poe,Ooe,Moe,koe,Doe,Loe,Boe,Noe,$oe);function Tm(e,t){return t==="grey"?t:e}const Foe=An({prop:"color",themeKey:"palette",transform:Tm}),zoe=An({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tm}),Uoe=An({prop:"backgroundColor",themeKey:"palette",transform:Tm});DC(Foe,zoe,Uoe);function ms(e){return e<=1&&e!==0?`${e*100}%`:e}const joe=An({prop:"width",transform:ms}),X3=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||H3[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:ms(n)}};return rl(e,e.maxWidth,t)}return null};X3.filterProps=["maxWidth"];const Hoe=An({prop:"minWidth",transform:ms}),Woe=An({prop:"height",transform:ms}),Goe=An({prop:"maxHeight",transform:ms}),Voe=An({prop:"minHeight",transform:ms});An({prop:"size",cssProperty:"width",transform:ms});An({prop:"size",cssProperty:"height",transform:ms});const Xoe=An({prop:"boxSizing"});DC(joe,X3,Hoe,Woe,Goe,Voe,Xoe);const qoe={border:{themeKey:"borders",transform:El},borderTop:{themeKey:"borders",transform:El},borderRight:{themeKey:"borders",transform:El},borderBottom:{themeKey:"borders",transform:El},borderLeft:{themeKey:"borders",transform:El},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:LC},color:{themeKey:"palette",transform:Tm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tm},backgroundColor:{themeKey:"palette",transform:Tm},p:{style:Lr},pt:{style:Lr},pr:{style:Lr},pb:{style:Lr},pl:{style:Lr},px:{style:Lr},py:{style:Lr},padding:{style:Lr},paddingTop:{style:Lr},paddingRight:{style:Lr},paddingBottom:{style:Lr},paddingLeft:{style:Lr},paddingX:{style:Lr},paddingY:{style:Lr},paddingInline:{style:Lr},paddingInlineStart:{style:Lr},paddingInlineEnd:{style:Lr},paddingBlock:{style:Lr},paddingBlockStart:{style:Lr},paddingBlockEnd:{style:Lr},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:BC},rowGap:{style:$C},columnGap:{style:NC},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ms},maxWidth:{style:X3},minWidth:{transform:ms},height:{transform:ms},maxHeight:{transform:ms},minHeight:{transform:ms},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},FC=qoe;function Yoe(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Koe(e,t){return typeof e=="function"?e(t):e}function Joe(){function e(n,r,i,o){const s={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:f,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const p=kC(i,d)||{};return h?h(s):rl(s,r,v=>{let y=IS(p,f,v);return v===y&&typeof v=="string"&&(y=IS(p,f,`${n}${v==="default"?"":ke(v)}`,v)),c===!1?y:{[c]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:FC;function l(c){let d=c;if(typeof c=="function")d=c(o);else if(typeof c!="object")return c;if(!d)return null;const f=$V(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(d).forEach(g=>{const v=Koe(d[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=Ox(p,e(g,v,o,s));else{const y=rl({theme:o},v,S=>({[g]:S}));Yoe(y,v)?p[g]=t({sx:v,theme:o}):p=Ox(p,y)}else p=Ox(p,e(g,v,o,s))}),FV(h,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const UV=Joe();UV.filterProps=["sx"];const zC=UV,Qoe=["breakpoints","palette","spacing","shape"];function UC(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,Qoe),l=loe(n),c=xoe(i);let d=Bo({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$({},coe,o)},s);return d=t.reduce((f,h)=>Bo(f,h),d),d.unstable_sxConfig=$({},FC,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return zC({sx:h,theme:this})},d}function Zoe(e){return Object.keys(e).length===0}function jC(e=null){const t=O.useContext(MC);return!t||Zoe(t)?e:t}const ese=UC();function HC(e=ese){return jC(e)}function tse({styles:e,themeId:t,defaultTheme:n={}}){const r=HC(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(ioe,{styles:i})}const nse=["sx"],rse=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:FC;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function q3(e){const{sx:t}=e,n=Le(e,nse),{systemProps:r,otherProps:i}=rse(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Ah(l)?$({},r,l):r}:o=$({},r,t),$({},i,{sx:o})}function jV(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(zC);return O.forwardRef(function(c,d){const f=HC(n),h=q3(c),{className:p,component:g="div"}=h,v=Le(h,ise);return C.jsx(o,$({as:g,ref:d,className:Ue(p,i?i(r):r),theme:t&&f[t]||f},v))})}const sse=["variant"];function O6(e){return e.length===0}function HV(e){const{variant:t}=e,n=Le(e,sse);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=O6(r)?e[i]:ke(e[i]):r+=`${O6(r)?i:ke(i)}${ke(e[i].toString())}`}),r}const ase=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function lse(e){return Object.keys(e).length===0}function use(e){return typeof e=="string"&&e.charCodeAt(0)>96}const cse=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,dse=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(i=>{const o=HV(i.props);r[o]=i.style}),r},fse=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],l=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return l&&l.forEach(c=>{let d=!0;Object.keys(c.props).forEach(f=>{o[f]!==c.props[f]&&e[f]!==c.props[f]&&(d=!1)}),d&&s.push(t[HV(c.props)])}),s};function Mx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const hse=UC(),pse=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ry({defaultTheme:e,theme:t,themeId:n}){return lse(t)?e:t[n]||t}function mse(e){return e?(t,n)=>n[e]:null}function WV(e={}){const{themeId:t,defaultTheme:n=hse,rootShouldForwardProp:r=Mx,slotShouldForwardProp:i=Mx}=e,o=s=>zC($({},s,{theme:Ry($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{ooe(s,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=mse(pse(d))}=l,g=Le(l,ase),v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let S,_=Mx;d==="Root"||d==="root"?_=r:d?_=i:use(s)&&(_=void 0);const b=NV(s,$({shouldForwardProp:_,label:S},g)),x=(E,...I)=>{const A=I?I.map(B=>typeof B=="function"&&B.__emotion_real!==B?H=>B($({},H,{theme:Ry($({},H,{defaultTheme:n,themeId:t}))})):B):[];let R=E;c&&p&&A.push(B=>{const H=Ry($({},B,{defaultTheme:n,themeId:t})),G=cse(c,H);if(G){const U={};return Object.entries(G).forEach(([D,F])=>{U[D]=typeof F=="function"?F($({},B,{theme:H})):F}),p(B,U)}return null}),c&&!v&&A.push(B=>{const H=Ry($({},B,{defaultTheme:n,themeId:t}));return fse(B,dse(c,H),H,c)}),y||A.push(o);const M=A.length-I.length;if(Array.isArray(E)&&M>0){const B=new Array(M).fill("");R=[...E,...B],R.raw=[...E.raw,...B]}else typeof E=="function"&&E.__emotion_real!==E&&(R=B=>E($({},B,{theme:Ry($({},B,{defaultTheme:n,themeId:t}))})));const L=b(R,...A);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const gse=WV(),vse=gse;function GV(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:k3(t.components[n].defaultProps,r)}function VV({props:e,name:t,defaultTheme:n,themeId:r}){let i=HC(n);return r&&(i=i[r]||i),GV({theme:i,name:t,props:e})}function Y3(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function yse(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Qh(e){if(e.type)return e;if(e.charAt(0)==="#")return Qh(yse(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(wd(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(wd(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function WC(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function xse(e){e=Qh(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(d,f=(d+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),WC({type:l,values:c})}function CN(e){e=Qh(e);let t=e.type==="hsl"||e.type==="hsla"?Qh(xse(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bse(e,t){const n=CN(e),r=CN(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Rn(e,t){return e=Qh(e),t=Y3(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,WC(e)}function Ig(e,t){if(e=Qh(e),t=Y3(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return WC(e)}function Rg(e,t){if(e=Qh(e),t=Y3(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return WC(e)}function wse(e,t=.15){return CN(e)>.5?Ig(e,t):Rg(e,t)}const _se=O.createContext(null),XV=_se;function qV(){return O.useContext(XV)}const Sse=typeof Symbol=="function"&&Symbol.for,Ese=Sse?Symbol.for("mui.nested"):"__THEME_NESTED__";function Cse(e,t){return typeof t=="function"?t(e):$({},e,t)}function Tse(e){const{children:t,theme:n}=e,r=qV(),i=O.useMemo(()=>{const o=r===null?n:Cse(r,n);return o!=null&&(o[Ese]=r!==null),o},[n,r]);return C.jsx(XV.Provider,{value:i,children:t})}const M6={};function k6(e,t,n,r=!1){return O.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?$({},t,{[e]:o}):o;return r?()=>s:s}return e?$({},t,{[e]:n}):$({},t,n)},[e,t,n,r])}function Ise(e){const{children:t,theme:n,themeId:r}=e,i=jC(M6),o=qV()||M6,s=k6(r,i,n),l=k6(r,o,n,!0);return C.jsx(Tse,{theme:l,children:C.jsx(MC.Provider,{value:s,children:t})})}const Rse=["component","direction","spacing","divider","children","className","useFlexGap"],Ase=UC(),Pse=vse("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Ose(e){return VV({props:e,name:"MuiStack",defaultTheme:Ase})}function Mse(e,t){const n=O.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Dse=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},rl({theme:t},zk({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=V3(t),i=Object.keys(t.breakpoints.values).reduce((c,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(c[d]=!0),c),{}),o=zk({values:e.direction,base:i}),s=zk({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,d,f)=>{if(!o[c]){const p=d>0?o[f[d-1]]:"column";o[c]=p}}),n=Bo(n,rl({theme:t},s,(c,d)=>e.useFlexGap?{gap:Jh(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${kse(d?o[d]:e.direction)}`]:Jh(r,c)}}))}return n=doe(t.breakpoints,n),n};function Lse(e={}){const{createStyledComponent:t=Pse,useThemeProps:n=Ose,componentName:r="MuiStack"}=e,i=()=>Ct({root:["root"]},c=>_t(r,c),{}),o=t(Dse);return O.forwardRef(function(c,d){const f=n(c),h=q3(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:_,useFlexGap:b=!1}=h,x=Le(h,Rse),E={direction:g,spacing:v,useFlexGap:b},I=i();return C.jsx(o,$({as:p,ownerState:E,ref:d,className:Ue(I.root,_)},x,{children:y?Mse(S,y):S}))})}function Bse(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Nse=["mode","contrastThreshold","tonalOffset"],D6={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Gm.white,default:Gm.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Uk={text:{primary:Gm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Gm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function L6(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Rg(e.main,i):t==="dark"&&(e.dark=Ig(e.main,o)))}function $se(e="light"){return e==="dark"?{main:Lc[200],light:Lc[50],dark:Lc[400]}:{main:Lc[700],light:Lc[400],dark:Lc[800]}}function Fse(e="light"){return e==="dark"?{main:mh[200],light:mh[50],dark:mh[400]}:{main:mh[500],light:mh[300],dark:mh[700]}}function zse(e="light"){return e==="dark"?{main:Dc[500],light:Dc[300],dark:Dc[700]}:{main:Dc[700],light:Dc[400],dark:Dc[800]}}function Use(e="light"){return e==="dark"?{main:gh[400],light:gh[300],dark:gh[700]}:{main:gh[700],light:gh[500],dark:gh[900]}}function jse(e="light"){return e==="dark"?{main:Bc[400],light:Bc[300],dark:Bc[700]}:{main:Bc[800],light:Bc[500],dark:Bc[900]}}function Hse(e="light"){return e==="dark"?{main:Rh[400],light:Rh[300],dark:Rh[700]}:{main:"#ed6c02",light:Rh[500],dark:Rh[900]}}function Wse(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,Nse),o=e.primary||$se(t),s=e.secondary||Fse(t),l=e.error||zse(t),c=e.info||Use(t),d=e.success||jse(t),f=e.warning||Hse(t);function h(y){return bse(y,Uk.text.primary)>=n?Uk.text.primary:D6.text.primary}const p=({color:y,name:S,mainShade:_=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[_]&&(y.main=y[_]),!y.hasOwnProperty("main"))throw new Error(wd(11,S?` (${S})`:"",_));if(typeof y.main!="string")throw new Error(wd(12,S?` (${S})`:"",JSON.stringify(y.main)));return L6(y,"light",b,r),L6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:Uk,light:D6};return Bo($({common:$({},Gm),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:P3,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const Gse=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Vse(e){return Math.round(e*1e5)/1e5}const B6={textTransform:"uppercase"},N6='"Roboto", "Helvetica", "Arial", sans-serif';function Xse(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=N6,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,p=Le(n,Gse),g=i/14,v=h||(_=>`${_/d*g}rem`),y=(_,b,x,E,I)=>$({fontFamily:r,fontWeight:_,fontSize:v(b),lineHeight:x},r===N6?{letterSpacing:`${Vse(E/b)}em`}:{},I,f),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,B6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,B6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Bo($({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},S),p,{clone:!1})}const qse=.2,Yse=.14,Kse=.12;function dr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${qse})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Yse})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Kse})`].join(",")}const Jse=["none",dr(0,2,1,-1,0,1,1,0,0,1,3,0),dr(0,3,1,-2,0,2,2,0,0,1,5,0),dr(0,3,3,-2,0,3,4,0,0,1,8,0),dr(0,2,4,-1,0,4,5,0,0,1,10,0),dr(0,3,5,-1,0,5,8,0,0,1,14,0),dr(0,3,5,-1,0,6,10,0,0,1,18,0),dr(0,4,5,-2,0,7,10,1,0,2,16,1),dr(0,5,5,-3,0,8,10,1,0,3,14,2),dr(0,5,6,-3,0,9,12,1,0,3,16,2),dr(0,6,6,-3,0,10,14,1,0,4,18,3),dr(0,6,7,-4,0,11,15,1,0,4,20,3),dr(0,7,8,-4,0,12,17,2,0,5,22,4),dr(0,7,8,-4,0,13,19,2,0,5,24,4),dr(0,7,9,-4,0,14,21,2,0,5,26,4),dr(0,8,9,-5,0,15,22,2,0,6,28,5),dr(0,8,10,-5,0,16,24,2,0,6,30,5),dr(0,8,11,-5,0,17,26,2,0,6,32,5),dr(0,9,11,-5,0,18,28,2,0,7,34,6),dr(0,9,12,-6,0,19,29,2,0,7,36,6),dr(0,10,13,-6,0,20,31,3,0,8,38,7),dr(0,10,13,-6,0,21,33,3,0,8,40,7),dr(0,10,14,-6,0,22,35,3,0,8,42,7),dr(0,11,14,-7,0,23,36,3,0,9,44,8),dr(0,11,15,-7,0,24,38,3,0,9,46,8)],Qse=Jse,Zse=["duration","easing","delay"],eae={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},YV={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $6(e){return`${Math.round(e)}ms`}function tae(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function nae(e){const t=$({},eae,e.easing),n=$({},YV,e.duration);return $({getAutoHeightDuration:tae,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o;return Le(o,Zse),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:$6(s)} ${l} ${typeof c=="string"?c:$6(c)}`).join(",")}},e,{easing:t,duration:n})}const rae={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},iae=rae,oae=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function K3(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,oae);if(e.vars)throw new Error(wd(18));const l=Wse(r),c=UC(e);let d=Bo(c,{mixins:Bse(c.breakpoints,n),palette:l,shadows:Qse.slice(),typography:Xse(l,o),transitions:nae(i),zIndex:$({},iae)});return d=Bo(d,s),d=t.reduce((f,h)=>Bo(f,h),d),d.unstable_sxConfig=$({},FC,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return zC({sx:h,theme:this})},d}const sae=K3(),GC=sae;function Pn(){const e=HC(GC);return e[Kh]||e}function It({props:e,name:t}){return VV({props:e,name:t,defaultTheme:GC,themeId:Kh})}const ca=e=>Mx(e)&&e!=="classes",J3=Mx,aae=WV({themeId:Kh,defaultTheme:GC,rootShouldForwardProp:ca}),Ee=aae,lae=["theme"];function uae(e){let{theme:t}=e,n=Le(e,lae);const r=t[Kh];return C.jsx(Ise,$({},n,{themeId:r?Kh:void 0,theme:r||t}))}const cae=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},F6=cae;function dae(e){return _t("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fae=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],hae=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${ke(t)}`,`fontSize${ke(n)}`]};return Ct(i,dae,r)},pae=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ke(n.color)}`],t[`fontSize${ke(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,l,c,d,f,h,p,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?h:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),KV=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Le(r,fae),v=O.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const _=hae(y);return C.jsxs(pae,$({as:l,className:Ue(_.root,o),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,g,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});KV.muiName="SvgIcon";const z6=KV;function $t(e,t){function n(r,i){return C.jsx(z6,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=z6.muiName,O.memo(O.forwardRef(n))}var jn={};/** + */function NV(e,t){return EN(e,t)}const soe=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},aoe=["values","unit","step"],loe=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>$({},n,{[r.key]:r.val}),{})};function uoe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,aoe),o=loe(t),s=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function d(p,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function f(p){return s.indexOf(p)+1`@media (min-width:${H3[e]}px)`};function rl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||A6;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||A6;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||H3).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function $V(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function FV(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function foe(e,...t){const n=$V(e),r=[n,...t].reduce((i,o)=>Bo(i,o),{});return FV(Object.keys(n),r)}function hoe(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function zk({values:e,breakpoints:t,base:n}){const r=n||hoe(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[o],o=l):s[l]=e,s),{})}function kC(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function IS(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=kC(e,n)||r,t&&(i=t(i,r,e)),i}function An(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,d=kC(c,r)||{};return rl(s,l,h=>{let p=IS(d,i,h);return h===p&&typeof h=="string"&&(p=IS(d,i,`${t}${h==="default"?"":ke(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function poe(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const moe={m:"margin",p:"padding"},goe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},P6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},voe=poe(e=>{if(e.length>2)if(P6[e])e=P6[e];else return[e];const[t,n]=e.split(""),r=moe[t],i=goe[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),W3=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],G3=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...W3,...G3];function yb(e,t,n,r){var i;const o=(i=kC(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function V3(e){return yb(e,"spacing",8)}function Jh(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function yoe(e,t){return n=>e.reduce((r,i)=>(r[i]=Jh(t,n),r),{})}function xoe(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=voe(n),o=yoe(i,r),s=e[n];return rl(e,s,o)}function zV(e,t){const n=V3(e.theme);return Object.keys(e).map(r=>xoe(e,t,r,n)).reduce(Ox,{})}function Dr(e){return zV(e,W3)}Dr.propTypes={};Dr.filterProps=W3;function Lr(e){return zV(e,G3)}Lr.propTypes={};Lr.filterProps=G3;function boe(e=8){if(e.mui)return e;const t=V3({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function DC(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ox(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function El(e){return typeof e!="number"?e:`${e}px solid`}const woe=An({prop:"border",themeKey:"borders",transform:El}),_oe=An({prop:"borderTop",themeKey:"borders",transform:El}),Soe=An({prop:"borderRight",themeKey:"borders",transform:El}),Eoe=An({prop:"borderBottom",themeKey:"borders",transform:El}),Coe=An({prop:"borderLeft",themeKey:"borders",transform:El}),Toe=An({prop:"borderColor",themeKey:"palette"}),Ioe=An({prop:"borderTopColor",themeKey:"palette"}),Roe=An({prop:"borderRightColor",themeKey:"palette"}),Aoe=An({prop:"borderBottomColor",themeKey:"palette"}),Poe=An({prop:"borderLeftColor",themeKey:"palette"}),LC=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yb(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Jh(t,r)});return rl(e,e.borderRadius,n)}return null};LC.propTypes={};LC.filterProps=["borderRadius"];DC(woe,_oe,Soe,Eoe,Coe,Toe,Ioe,Roe,Aoe,Poe,LC);const BC=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yb(e.theme,"spacing",8),n=r=>({gap:Jh(t,r)});return rl(e,e.gap,n)}return null};BC.propTypes={};BC.filterProps=["gap"];const NC=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yb(e.theme,"spacing",8),n=r=>({columnGap:Jh(t,r)});return rl(e,e.columnGap,n)}return null};NC.propTypes={};NC.filterProps=["columnGap"];const $C=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yb(e.theme,"spacing",8),n=r=>({rowGap:Jh(t,r)});return rl(e,e.rowGap,n)}return null};$C.propTypes={};$C.filterProps=["rowGap"];const Ooe=An({prop:"gridColumn"}),Moe=An({prop:"gridRow"}),koe=An({prop:"gridAutoFlow"}),Doe=An({prop:"gridAutoColumns"}),Loe=An({prop:"gridAutoRows"}),Boe=An({prop:"gridTemplateColumns"}),Noe=An({prop:"gridTemplateRows"}),$oe=An({prop:"gridTemplateAreas"}),Foe=An({prop:"gridArea"});DC(BC,NC,$C,Ooe,Moe,koe,Doe,Loe,Boe,Noe,$oe,Foe);function Tm(e,t){return t==="grey"?t:e}const zoe=An({prop:"color",themeKey:"palette",transform:Tm}),Uoe=An({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tm}),joe=An({prop:"backgroundColor",themeKey:"palette",transform:Tm});DC(zoe,Uoe,joe);function ms(e){return e<=1&&e!==0?`${e*100}%`:e}const Hoe=An({prop:"width",transform:ms}),X3=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||H3[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:ms(n)}};return rl(e,e.maxWidth,t)}return null};X3.filterProps=["maxWidth"];const Woe=An({prop:"minWidth",transform:ms}),Goe=An({prop:"height",transform:ms}),Voe=An({prop:"maxHeight",transform:ms}),Xoe=An({prop:"minHeight",transform:ms});An({prop:"size",cssProperty:"width",transform:ms});An({prop:"size",cssProperty:"height",transform:ms});const qoe=An({prop:"boxSizing"});DC(Hoe,X3,Woe,Goe,Voe,Xoe,qoe);const Yoe={border:{themeKey:"borders",transform:El},borderTop:{themeKey:"borders",transform:El},borderRight:{themeKey:"borders",transform:El},borderBottom:{themeKey:"borders",transform:El},borderLeft:{themeKey:"borders",transform:El},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:LC},color:{themeKey:"palette",transform:Tm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tm},backgroundColor:{themeKey:"palette",transform:Tm},p:{style:Lr},pt:{style:Lr},pr:{style:Lr},pb:{style:Lr},pl:{style:Lr},px:{style:Lr},py:{style:Lr},padding:{style:Lr},paddingTop:{style:Lr},paddingRight:{style:Lr},paddingBottom:{style:Lr},paddingLeft:{style:Lr},paddingX:{style:Lr},paddingY:{style:Lr},paddingInline:{style:Lr},paddingInlineStart:{style:Lr},paddingInlineEnd:{style:Lr},paddingBlock:{style:Lr},paddingBlockStart:{style:Lr},paddingBlockEnd:{style:Lr},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:BC},rowGap:{style:$C},columnGap:{style:NC},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ms},maxWidth:{style:X3},minWidth:{transform:ms},height:{transform:ms},maxHeight:{transform:ms},minHeight:{transform:ms},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},FC=Yoe;function Koe(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Joe(e,t){return typeof e=="function"?e(t):e}function Qoe(){function e(n,r,i,o){const s={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:f,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const p=kC(i,d)||{};return h?h(s):rl(s,r,v=>{let y=IS(p,f,v);return v===y&&typeof v=="string"&&(y=IS(p,f,`${n}${v==="default"?"":ke(v)}`,v)),c===!1?y:{[c]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:FC;function l(c){let d=c;if(typeof c=="function")d=c(o);else if(typeof c!="object")return c;if(!d)return null;const f=$V(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(d).forEach(g=>{const v=Joe(d[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=Ox(p,e(g,v,o,s));else{const y=rl({theme:o},v,S=>({[g]:S}));Koe(y,v)?p[g]=t({sx:v,theme:o}):p=Ox(p,y)}else p=Ox(p,e(g,v,o,s))}),FV(h,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const UV=Qoe();UV.filterProps=["sx"];const zC=UV,Zoe=["breakpoints","palette","spacing","shape"];function UC(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,Zoe),l=uoe(n),c=boe(i);let d=Bo({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$({},doe,o)},s);return d=t.reduce((f,h)=>Bo(f,h),d),d.unstable_sxConfig=$({},FC,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return zC({sx:h,theme:this})},d}function ese(e){return Object.keys(e).length===0}function jC(e=null){const t=O.useContext(MC);return!t||ese(t)?e:t}const tse=UC();function HC(e=tse){return jC(e)}function nse({styles:e,themeId:t,defaultTheme:n={}}){const r=HC(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(ooe,{styles:i})}const rse=["sx"],ise=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:FC;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function q3(e){const{sx:t}=e,n=Le(e,rse),{systemProps:r,otherProps:i}=ise(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Ah(l)?$({},r,l):r}:o=$({},r,t),$({},i,{sx:o})}function jV(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(zC);return O.forwardRef(function(c,d){const f=HC(n),h=q3(c),{className:p,component:g="div"}=h,v=Le(h,ose);return C.jsx(o,$({as:g,ref:d,className:Ue(p,i?i(r):r),theme:t&&f[t]||f},v))})}const ase=["variant"];function O6(e){return e.length===0}function HV(e){const{variant:t}=e,n=Le(e,ase);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=O6(r)?e[i]:ke(e[i]):r+=`${O6(r)?i:ke(i)}${ke(e[i].toString())}`}),r}const lse=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function use(e){return Object.keys(e).length===0}function cse(e){return typeof e=="string"&&e.charCodeAt(0)>96}const dse=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,fse=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(i=>{const o=HV(i.props);r[o]=i.style}),r},hse=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],l=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return l&&l.forEach(c=>{let d=!0;Object.keys(c.props).forEach(f=>{o[f]!==c.props[f]&&e[f]!==c.props[f]&&(d=!1)}),d&&s.push(t[HV(c.props)])}),s};function Mx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const pse=UC(),mse=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ry({defaultTheme:e,theme:t,themeId:n}){return use(t)?e:t[n]||t}function gse(e){return e?(t,n)=>n[e]:null}function WV(e={}){const{themeId:t,defaultTheme:n=pse,rootShouldForwardProp:r=Mx,slotShouldForwardProp:i=Mx}=e,o=s=>zC($({},s,{theme:Ry($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{soe(s,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=gse(mse(d))}=l,g=Le(l,lse),v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let S,_=Mx;d==="Root"||d==="root"?_=r:d?_=i:cse(s)&&(_=void 0);const b=NV(s,$({shouldForwardProp:_,label:S},g)),x=(E,...I)=>{const A=I?I.map(B=>typeof B=="function"&&B.__emotion_real!==B?H=>B($({},H,{theme:Ry($({},H,{defaultTheme:n,themeId:t}))})):B):[];let R=E;c&&p&&A.push(B=>{const H=Ry($({},B,{defaultTheme:n,themeId:t})),G=dse(c,H);if(G){const U={};return Object.entries(G).forEach(([D,F])=>{U[D]=typeof F=="function"?F($({},B,{theme:H})):F}),p(B,U)}return null}),c&&!v&&A.push(B=>{const H=Ry($({},B,{defaultTheme:n,themeId:t}));return hse(B,fse(c,H),H,c)}),y||A.push(o);const M=A.length-I.length;if(Array.isArray(E)&&M>0){const B=new Array(M).fill("");R=[...E,...B],R.raw=[...E.raw,...B]}else typeof E=="function"&&E.__emotion_real!==E&&(R=B=>E($({},B,{theme:Ry($({},B,{defaultTheme:n,themeId:t}))})));const L=b(R,...A);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const vse=WV(),yse=vse;function GV(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:k3(t.components[n].defaultProps,r)}function VV({props:e,name:t,defaultTheme:n,themeId:r}){let i=HC(n);return r&&(i=i[r]||i),GV({theme:i,name:t,props:e})}function Y3(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function xse(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Qh(e){if(e.type)return e;if(e.charAt(0)==="#")return Qh(xse(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(wd(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(wd(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function WC(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function bse(e){e=Qh(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(d,f=(d+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),WC({type:l,values:c})}function CN(e){e=Qh(e);let t=e.type==="hsl"||e.type==="hsla"?Qh(bse(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function wse(e,t){const n=CN(e),r=CN(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Rn(e,t){return e=Qh(e),t=Y3(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,WC(e)}function Ig(e,t){if(e=Qh(e),t=Y3(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return WC(e)}function Rg(e,t){if(e=Qh(e),t=Y3(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return WC(e)}function _se(e,t=.15){return CN(e)>.5?Ig(e,t):Rg(e,t)}const Sse=O.createContext(null),XV=Sse;function qV(){return O.useContext(XV)}const Ese=typeof Symbol=="function"&&Symbol.for,Cse=Ese?Symbol.for("mui.nested"):"__THEME_NESTED__";function Tse(e,t){return typeof t=="function"?t(e):$({},e,t)}function Ise(e){const{children:t,theme:n}=e,r=qV(),i=O.useMemo(()=>{const o=r===null?n:Tse(r,n);return o!=null&&(o[Cse]=r!==null),o},[n,r]);return C.jsx(XV.Provider,{value:i,children:t})}const M6={};function k6(e,t,n,r=!1){return O.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?$({},t,{[e]:o}):o;return r?()=>s:s}return e?$({},t,{[e]:n}):$({},t,n)},[e,t,n,r])}function Rse(e){const{children:t,theme:n,themeId:r}=e,i=jC(M6),o=qV()||M6,s=k6(r,i,n),l=k6(r,o,n,!0);return C.jsx(Ise,{theme:l,children:C.jsx(MC.Provider,{value:s,children:t})})}const Ase=["component","direction","spacing","divider","children","className","useFlexGap"],Pse=UC(),Ose=yse("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Mse(e){return VV({props:e,name:"MuiStack",defaultTheme:Pse})}function kse(e,t){const n=O.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Lse=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},rl({theme:t},zk({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=V3(t),i=Object.keys(t.breakpoints.values).reduce((c,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(c[d]=!0),c),{}),o=zk({values:e.direction,base:i}),s=zk({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,d,f)=>{if(!o[c]){const p=d>0?o[f[d-1]]:"column";o[c]=p}}),n=Bo(n,rl({theme:t},s,(c,d)=>e.useFlexGap?{gap:Jh(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Dse(d?o[d]:e.direction)}`]:Jh(r,c)}}))}return n=foe(t.breakpoints,n),n};function Bse(e={}){const{createStyledComponent:t=Ose,useThemeProps:n=Mse,componentName:r="MuiStack"}=e,i=()=>Ct({root:["root"]},c=>_t(r,c),{}),o=t(Lse);return O.forwardRef(function(c,d){const f=n(c),h=q3(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:_,useFlexGap:b=!1}=h,x=Le(h,Ase),E={direction:g,spacing:v,useFlexGap:b},I=i();return C.jsx(o,$({as:p,ownerState:E,ref:d,className:Ue(I.root,_)},x,{children:y?kse(S,y):S}))})}function Nse(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const $se=["mode","contrastThreshold","tonalOffset"],D6={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Gm.white,default:Gm.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Uk={text:{primary:Gm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Gm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function L6(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Rg(e.main,i):t==="dark"&&(e.dark=Ig(e.main,o)))}function Fse(e="light"){return e==="dark"?{main:Lc[200],light:Lc[50],dark:Lc[400]}:{main:Lc[700],light:Lc[400],dark:Lc[800]}}function zse(e="light"){return e==="dark"?{main:mh[200],light:mh[50],dark:mh[400]}:{main:mh[500],light:mh[300],dark:mh[700]}}function Use(e="light"){return e==="dark"?{main:Dc[500],light:Dc[300],dark:Dc[700]}:{main:Dc[700],light:Dc[400],dark:Dc[800]}}function jse(e="light"){return e==="dark"?{main:gh[400],light:gh[300],dark:gh[700]}:{main:gh[700],light:gh[500],dark:gh[900]}}function Hse(e="light"){return e==="dark"?{main:Bc[400],light:Bc[300],dark:Bc[700]}:{main:Bc[800],light:Bc[500],dark:Bc[900]}}function Wse(e="light"){return e==="dark"?{main:Rh[400],light:Rh[300],dark:Rh[700]}:{main:"#ed6c02",light:Rh[500],dark:Rh[900]}}function Gse(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,$se),o=e.primary||Fse(t),s=e.secondary||zse(t),l=e.error||Use(t),c=e.info||jse(t),d=e.success||Hse(t),f=e.warning||Wse(t);function h(y){return wse(y,Uk.text.primary)>=n?Uk.text.primary:D6.text.primary}const p=({color:y,name:S,mainShade:_=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[_]&&(y.main=y[_]),!y.hasOwnProperty("main"))throw new Error(wd(11,S?` (${S})`:"",_));if(typeof y.main!="string")throw new Error(wd(12,S?` (${S})`:"",JSON.stringify(y.main)));return L6(y,"light",b,r),L6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:Uk,light:D6};return Bo($({common:$({},Gm),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:P3,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const Vse=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Xse(e){return Math.round(e*1e5)/1e5}const B6={textTransform:"uppercase"},N6='"Roboto", "Helvetica", "Arial", sans-serif';function qse(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=N6,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,p=Le(n,Vse),g=i/14,v=h||(_=>`${_/d*g}rem`),y=(_,b,x,E,I)=>$({fontFamily:r,fontWeight:_,fontSize:v(b),lineHeight:x},r===N6?{letterSpacing:`${Xse(E/b)}em`}:{},I,f),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,B6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,B6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Bo($({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},S),p,{clone:!1})}const Yse=.2,Kse=.14,Jse=.12;function dr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Yse})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Kse})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Jse})`].join(",")}const Qse=["none",dr(0,2,1,-1,0,1,1,0,0,1,3,0),dr(0,3,1,-2,0,2,2,0,0,1,5,0),dr(0,3,3,-2,0,3,4,0,0,1,8,0),dr(0,2,4,-1,0,4,5,0,0,1,10,0),dr(0,3,5,-1,0,5,8,0,0,1,14,0),dr(0,3,5,-1,0,6,10,0,0,1,18,0),dr(0,4,5,-2,0,7,10,1,0,2,16,1),dr(0,5,5,-3,0,8,10,1,0,3,14,2),dr(0,5,6,-3,0,9,12,1,0,3,16,2),dr(0,6,6,-3,0,10,14,1,0,4,18,3),dr(0,6,7,-4,0,11,15,1,0,4,20,3),dr(0,7,8,-4,0,12,17,2,0,5,22,4),dr(0,7,8,-4,0,13,19,2,0,5,24,4),dr(0,7,9,-4,0,14,21,2,0,5,26,4),dr(0,8,9,-5,0,15,22,2,0,6,28,5),dr(0,8,10,-5,0,16,24,2,0,6,30,5),dr(0,8,11,-5,0,17,26,2,0,6,32,5),dr(0,9,11,-5,0,18,28,2,0,7,34,6),dr(0,9,12,-6,0,19,29,2,0,7,36,6),dr(0,10,13,-6,0,20,31,3,0,8,38,7),dr(0,10,13,-6,0,21,33,3,0,8,40,7),dr(0,10,14,-6,0,22,35,3,0,8,42,7),dr(0,11,14,-7,0,23,36,3,0,9,44,8),dr(0,11,15,-7,0,24,38,3,0,9,46,8)],Zse=Qse,eae=["duration","easing","delay"],tae={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},YV={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $6(e){return`${Math.round(e)}ms`}function nae(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function rae(e){const t=$({},tae,e.easing),n=$({},YV,e.duration);return $({getAutoHeightDuration:nae,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o;return Le(o,eae),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:$6(s)} ${l} ${typeof c=="string"?c:$6(c)}`).join(",")}},e,{easing:t,duration:n})}const iae={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},oae=iae,sae=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function K3(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,sae);if(e.vars)throw new Error(wd(18));const l=Gse(r),c=UC(e);let d=Bo(c,{mixins:Nse(c.breakpoints,n),palette:l,shadows:Zse.slice(),typography:qse(l,o),transitions:rae(i),zIndex:$({},oae)});return d=Bo(d,s),d=t.reduce((f,h)=>Bo(f,h),d),d.unstable_sxConfig=$({},FC,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return zC({sx:h,theme:this})},d}const aae=K3(),GC=aae;function Pn(){const e=HC(GC);return e[Kh]||e}function It({props:e,name:t}){return VV({props:e,name:t,defaultTheme:GC,themeId:Kh})}const ca=e=>Mx(e)&&e!=="classes",J3=Mx,lae=WV({themeId:Kh,defaultTheme:GC,rootShouldForwardProp:ca}),Ee=lae,uae=["theme"];function cae(e){let{theme:t}=e,n=Le(e,uae);const r=t[Kh];return C.jsx(Rse,$({},n,{themeId:r?Kh:void 0,theme:r||t}))}const dae=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},F6=dae;function fae(e){return _t("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const hae=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],pae=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${ke(t)}`,`fontSize${ke(n)}`]};return Ct(i,fae,r)},mae=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ke(n.color)}`],t[`fontSize${ke(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,l,c,d,f,h,p,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?h:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),KV=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Le(r,hae),v=O.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const _=pae(y);return C.jsxs(mae,$({as:l,className:Ue(_.root,o),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,g,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});KV.muiName="SvgIcon";const z6=KV;function $t(e,t){function n(r,i){return C.jsx(z6,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=z6.muiName,O.memo(O.forwardRef(n))}var jn={};/** * @license React * react-is.production.min.js * @@ -35,7 +35,7 @@ var Dne=Object.defineProperty;var Lne=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Q3=Symbol.for("react.element"),Z3=Symbol.for("react.portal"),VC=Symbol.for("react.fragment"),XC=Symbol.for("react.strict_mode"),qC=Symbol.for("react.profiler"),YC=Symbol.for("react.provider"),KC=Symbol.for("react.context"),mae=Symbol.for("react.server_context"),JC=Symbol.for("react.forward_ref"),QC=Symbol.for("react.suspense"),ZC=Symbol.for("react.suspense_list"),eT=Symbol.for("react.memo"),tT=Symbol.for("react.lazy"),gae=Symbol.for("react.offscreen"),JV;JV=Symbol.for("react.module.reference");function da(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Q3:switch(e=e.type,e){case VC:case qC:case XC:case QC:case ZC:return e;default:switch(e=e&&e.$$typeof,e){case mae:case KC:case JC:case tT:case eT:case YC:return e;default:return t}}case Z3:return t}}}jn.ContextConsumer=KC;jn.ContextProvider=YC;jn.Element=Q3;jn.ForwardRef=JC;jn.Fragment=VC;jn.Lazy=tT;jn.Memo=eT;jn.Portal=Z3;jn.Profiler=qC;jn.StrictMode=XC;jn.Suspense=QC;jn.SuspenseList=ZC;jn.isAsyncMode=function(){return!1};jn.isConcurrentMode=function(){return!1};jn.isContextConsumer=function(e){return da(e)===KC};jn.isContextProvider=function(e){return da(e)===YC};jn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q3};jn.isForwardRef=function(e){return da(e)===JC};jn.isFragment=function(e){return da(e)===VC};jn.isLazy=function(e){return da(e)===tT};jn.isMemo=function(e){return da(e)===eT};jn.isPortal=function(e){return da(e)===Z3};jn.isProfiler=function(e){return da(e)===qC};jn.isStrictMode=function(e){return da(e)===XC};jn.isSuspense=function(e){return da(e)===QC};jn.isSuspenseList=function(e){return da(e)===ZC};jn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===VC||e===qC||e===XC||e===QC||e===ZC||e===gae||typeof e=="object"&&e!==null&&(e.$$typeof===tT||e.$$typeof===eT||e.$$typeof===YC||e.$$typeof===KC||e.$$typeof===JC||e.$$typeof===JV||e.getModuleId!==void 0)};jn.typeOf=da;function TN(e,t){return TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TN(e,t)}function nT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,TN(e,t)}var QV={exports:{}},Ls={},ZV={exports:{}},eX={};/** + */var Q3=Symbol.for("react.element"),Z3=Symbol.for("react.portal"),VC=Symbol.for("react.fragment"),XC=Symbol.for("react.strict_mode"),qC=Symbol.for("react.profiler"),YC=Symbol.for("react.provider"),KC=Symbol.for("react.context"),gae=Symbol.for("react.server_context"),JC=Symbol.for("react.forward_ref"),QC=Symbol.for("react.suspense"),ZC=Symbol.for("react.suspense_list"),eT=Symbol.for("react.memo"),tT=Symbol.for("react.lazy"),vae=Symbol.for("react.offscreen"),JV;JV=Symbol.for("react.module.reference");function da(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Q3:switch(e=e.type,e){case VC:case qC:case XC:case QC:case ZC:return e;default:switch(e=e&&e.$$typeof,e){case gae:case KC:case JC:case tT:case eT:case YC:return e;default:return t}}case Z3:return t}}}jn.ContextConsumer=KC;jn.ContextProvider=YC;jn.Element=Q3;jn.ForwardRef=JC;jn.Fragment=VC;jn.Lazy=tT;jn.Memo=eT;jn.Portal=Z3;jn.Profiler=qC;jn.StrictMode=XC;jn.Suspense=QC;jn.SuspenseList=ZC;jn.isAsyncMode=function(){return!1};jn.isConcurrentMode=function(){return!1};jn.isContextConsumer=function(e){return da(e)===KC};jn.isContextProvider=function(e){return da(e)===YC};jn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q3};jn.isForwardRef=function(e){return da(e)===JC};jn.isFragment=function(e){return da(e)===VC};jn.isLazy=function(e){return da(e)===tT};jn.isMemo=function(e){return da(e)===eT};jn.isPortal=function(e){return da(e)===Z3};jn.isProfiler=function(e){return da(e)===qC};jn.isStrictMode=function(e){return da(e)===XC};jn.isSuspense=function(e){return da(e)===QC};jn.isSuspenseList=function(e){return da(e)===ZC};jn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===VC||e===qC||e===XC||e===QC||e===ZC||e===vae||typeof e=="object"&&e!==null&&(e.$$typeof===tT||e.$$typeof===eT||e.$$typeof===YC||e.$$typeof===KC||e.$$typeof===JC||e.$$typeof===JV||e.getModuleId!==void 0)};jn.typeOf=da;function TN(e,t){return TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TN(e,t)}function nT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,TN(e,t)}var QV={exports:{}},Ls={},ZV={exports:{}},eX={};/** * @license React * scheduler.production.min.js * @@ -43,7 +43,7 @@ var Dne=Object.defineProperty;var Lne=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(W,K){var Y=W.length;W.push(K);e:for(;0>>1,re=W[Q];if(0>>1;Qi(se,Y))Ji(ae,se)?(W[Q]=ae,W[J]=Y,Q=J):(W[Q]=se,W[ce]=Y,Q=ce);else if(Ji(ae,Y))W[Q]=ae,W[J]=Y,Q=J;else break e}}return K}function i(W,K){var Y=W.sortIndex-K.sortIndex;return Y!==0?Y:W.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,h=null,p=3,g=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(W){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=W)r(d),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(d)}}function E(W){if(y=!1,x(W),!v)if(n(c)!==null)v=!0,z(I);else{var K=n(d);K!==null&&V(E,K.startTime-W)}}function I(W,K){v=!1,y&&(y=!1,_(M),M=-1),g=!0;var Y=p;try{for(x(K),h=n(c);h!==null&&(!(h.expirationTime>K)||W&&!H());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,p=h.priorityLevel;var re=Q(h.expirationTime<=K);K=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(c)&&r(c),x(K)}else r(c);h=n(c)}if(h!==null)var ue=!0;else{var ce=n(d);ce!==null&&V(E,ce.startTime-K),ue=!1}return ue}finally{h=null,p=Y,g=!1}}var A=!1,R=null,M=-1,L=5,B=-1;function H(){return!(e.unstable_now()-BW||125Q?(W.sortIndex=Y,t(d,W),n(c)===null&&W===n(d)&&(y?(_(M),M=-1):y=!0,V(E,Y-Q))):(W.sortIndex=re,t(c,W),v||g||(v=!0,z(I))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var K=p;return function(){var Y=p;p=K;try{return W.apply(this,arguments)}finally{p=Y}}}})(eX);ZV.exports=eX;var vae=ZV.exports;/** + */(function(e){function t(W,K){var Y=W.length;W.push(K);e:for(;0>>1,re=W[Q];if(0>>1;Qi(se,Y))Ji(ae,se)?(W[Q]=ae,W[J]=Y,Q=J):(W[Q]=se,W[ce]=Y,Q=ce);else if(Ji(ae,Y))W[Q]=ae,W[J]=Y,Q=J;else break e}}return K}function i(W,K){var Y=W.sortIndex-K.sortIndex;return Y!==0?Y:W.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,h=null,p=3,g=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(W){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=W)r(d),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(d)}}function E(W){if(y=!1,x(W),!v)if(n(c)!==null)v=!0,z(I);else{var K=n(d);K!==null&&V(E,K.startTime-W)}}function I(W,K){v=!1,y&&(y=!1,_(M),M=-1),g=!0;var Y=p;try{for(x(K),h=n(c);h!==null&&(!(h.expirationTime>K)||W&&!H());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,p=h.priorityLevel;var re=Q(h.expirationTime<=K);K=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(c)&&r(c),x(K)}else r(c);h=n(c)}if(h!==null)var ue=!0;else{var ce=n(d);ce!==null&&V(E,ce.startTime-K),ue=!1}return ue}finally{h=null,p=Y,g=!1}}var A=!1,R=null,M=-1,L=5,B=-1;function H(){return!(e.unstable_now()-BW||125Q?(W.sortIndex=Y,t(d,W),n(c)===null&&W===n(d)&&(y?(_(M),M=-1):y=!0,V(E,Y-Q))):(W.sortIndex=re,t(c,W),v||g||(v=!0,z(I))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var K=p;return function(){var Y=p;p=K;try{return W.apply(this,arguments)}finally{p=Y}}}})(eX);ZV.exports=eX;var yae=ZV.exports;/** * @license React * react-dom.production.min.js * @@ -51,14 +51,14 @@ var Dne=Object.defineProperty;var Lne=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var tX=O,As=vae;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),IN=Object.prototype.hasOwnProperty,yae=/^[: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]*$/,U6={},j6={};function xae(e){return IN.call(j6,e)?!0:IN.call(U6,e)?!1:yae.test(e)?j6[e]=!0:(U6[e]=!0,!1)}function bae(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wae(e,t,n,r){if(t===null||typeof t>"u"||bae(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function To(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Hi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hi[e]=new To(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hi[t]=new To(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hi[e]=new To(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hi[e]=new To(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hi[e]=new To(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hi[e]=new To(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hi[e]=new To(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hi[e]=new To(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hi[e]=new To(e,5,!1,e.toLowerCase(),null,!1,!1)});var e5=/[\-:]([a-z])/g;function t5(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hi[e]=new To(e,1,!1,e.toLowerCase(),null,!1,!1)});Hi.xlinkHref=new To("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hi[e]=new To(e,1,!1,e.toLowerCase(),null,!0,!0)});function n5(e,t,n,r){var i=Hi.hasOwnProperty(t)?Hi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),IN=Object.prototype.hasOwnProperty,xae=/^[: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]*$/,U6={},j6={};function bae(e){return IN.call(j6,e)?!0:IN.call(U6,e)?!1:xae.test(e)?j6[e]=!0:(U6[e]=!0,!1)}function wae(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _ae(e,t,n,r){if(t===null||typeof t>"u"||wae(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function To(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Hi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hi[e]=new To(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hi[t]=new To(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hi[e]=new To(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hi[e]=new To(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hi[e]=new To(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hi[e]=new To(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hi[e]=new To(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hi[e]=new To(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hi[e]=new To(e,5,!1,e.toLowerCase(),null,!1,!1)});var e5=/[\-:]([a-z])/g;function t5(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(e5,t5);Hi[t]=new To(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hi[e]=new To(e,1,!1,e.toLowerCase(),null,!1,!1)});Hi.xlinkHref=new To("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hi[e]=new To(e,1,!1,e.toLowerCase(),null,!0,!0)});function n5(e,t,n,r){var i=Hi.hasOwnProperty(t)?Hi[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` -`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{Hk=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dx(e):""}function _ae(e){switch(e.tag){case 5:return dx(e.type);case 16:return dx("Lazy");case 13:return dx("Suspense");case 19:return dx("SuspenseList");case 0:case 2:case 15:return e=Wk(e.type,!1),e;case 11:return e=Wk(e.type.render,!1),e;case 1:return e=Wk(e.type,!0),e;default:return""}}function ON(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rm:return"Fragment";case nm:return"Portal";case RN:return"Profiler";case r5:return"StrictMode";case AN:return"Suspense";case PN:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iX:return(e.displayName||"Context")+".Consumer";case rX:return(e._context.displayName||"Context")+".Provider";case i5:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case o5:return t=e.displayName||null,t!==null?t:ON(e.type)||"Memo";case Nc:t=e._payload,e=e._init;try{return ON(e(t))}catch{}}return null}function Sae(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ON(t);case 8:return t===r5?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _d(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Eae(e){var t=sX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function iw(e){e._valueTracker||(e._valueTracker=Eae(e))}function aX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function RS(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}}function MN(e,t){var n=t.checked;return Pr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function W6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_d(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lX(e,t){t=t.checked,t!=null&&n5(e,"checked",t,!1)}function kN(e,t){lX(e,t);var n=_d(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?DN(e,t.type,n):t.hasOwnProperty("defaultValue")&&DN(e,t.type,_d(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function G6(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function DN(e,t,n){(t!=="number"||RS(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fx=Array.isArray;function Im(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ow.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function p1(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var kx={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cae=["Webkit","ms","Moz","O"];Object.keys(kx).forEach(function(e){Cae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kx[t]=kx[e]})});function fX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||kx.hasOwnProperty(e)&&kx[e]?(""+t).trim():t+"px"}function hX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Tae=Pr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function NN(e,t){if(t){if(Tae[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function $N(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 FN=null;function s5(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zN=null,Rm=null,Am=null;function q6(e){if(e=wb(e)){if(typeof zN!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=aT(t),zN(e.stateNode,e.type,t))}}function pX(e){Rm?Am?Am.push(e):Am=[e]:Rm=e}function mX(){if(Rm){var e=Rm,t=Am;if(Am=Rm=null,q6(e),t)for(e=0;e>>=0,e===0?32:31-(Nae(e)/$ae|0)|0}var sw=64,aw=4194304;function hx(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function MS(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=hx(l):(o&=s,o!==0&&(r=hx(o)))}else s=n&~i,s!==0?r=hx(s):o!==0&&(r=hx(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xb(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ka(t),e[t]=n}function jae(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Lx),rU=String.fromCharCode(32),iU=!1;function LX(e,t){switch(e){case"keyup":return gle.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var im=!1;function yle(e,t){switch(e){case"compositionend":return BX(t);case"keypress":return t.which!==32?null:(iU=!0,rU);case"textInput":return e=t.data,e===rU&&iU?null:e;default:return null}}function xle(e,t){if(im)return e==="compositionend"||!p5&&LX(e,t)?(e=kX(),G_=d5=Kc=null,im=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lU(n)}}function zX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UX(){for(var e=window,t=RS();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=RS(e.document)}return t}function m5(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Rle(e){var t=UX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zX(n.ownerDocument.documentElement,n)){if(r!==null&&m5(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=uU(n,o);var s=uU(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,om=null,VN=null,Nx=null,XN=!1;function cU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;XN||om==null||om!==RS(r)||(r=om,"selectionStart"in r&&m5(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nx&&b1(Nx,r)||(Nx=r,r=LS(VN,"onSelect"),0lm||(e.current=ZN[lm],ZN[lm]=null,lm--)}function Zn(e,t){lm++,ZN[lm]=e.current,e.current=t}var Sd={},to=kd(Sd),No=kd(!1),Zh=Sd;function qm(e,t){var n=e.type.contextTypes;if(!n)return Sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $o(e){return e=e.childContextTypes,e!=null}function NS(){cr(No),cr(to)}function vU(e,t,n){if(to.current!==Sd)throw Error(Me(168));Zn(to,t),Zn(No,n)}function KX(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Me(108,Sae(e)||"Unknown",i));return Pr({},n,r)}function $S(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sd,Zh=to.current,Zn(to,e),Zn(No,No.current),!0}function yU(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=KX(e,t,Zh),r.__reactInternalMemoizedMergedChildContext=e,cr(No),cr(to),Zn(to,e)):cr(No),Zn(No,n)}var Yu=null,lT=!1,iD=!1;function JX(e){Yu===null?Yu=[e]:Yu.push(e)}function zle(e){lT=!0,JX(e)}function Dd(){if(!iD&&Yu!==null){iD=!0;var e=0,t=Bn;try{var n=Yu;for(Bn=1;e>=s,i-=s,Zu=1<<32-Ka(t)+i|n<M?(L=R,R=null):L=R.sibling;var B=p(_,R,x[M],E);if(B===null){R===null&&(R=L);break}e&&R&&B.alternate===null&&t(_,R),b=o(B,b,M),A===null?I=B:A.sibling=B,A=B,R=L}if(M===x.length)return n(_,R),fr&&vh(_,M),I;if(R===null){for(;MM?(L=R,R=null):L=R.sibling;var H=p(_,R,B.value,E);if(H===null){R===null&&(R=L);break}e&&R&&H.alternate===null&&t(_,R),b=o(H,b,M),A===null?I=H:A.sibling=H,A=H,R=L}if(B.done)return n(_,R),fr&&vh(_,M),I;if(R===null){for(;!B.done;M++,B=x.next())B=h(_,B.value,E),B!==null&&(b=o(B,b,M),A===null?I=B:A.sibling=B,A=B);return fr&&vh(_,M),I}for(R=r(_,R);!B.done;M++,B=x.next())B=g(R,_,M,B.value,E),B!==null&&(e&&B.alternate!==null&&R.delete(B.key===null?M:B.key),b=o(B,b,M),A===null?I=B:A.sibling=B,A=B);return e&&R.forEach(function(G){return t(_,G)}),fr&&vh(_,M),I}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===rm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case rw:e:{for(var I=x.key,A=b;A!==null;){if(A.key===I){if(I=x.type,I===rm){if(A.tag===7){n(_,A.sibling),b=i(A,x.props.children),b.return=_,_=b;break e}}else if(A.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Nc&&CU(I)===A.type){n(_,A.sibling),b=i(A,x.props),b.ref=Dy(_,A,x),b.return=_,_=b;break e}n(_,A);break}else t(_,A);A=A.sibling}x.type===rm?(b=Uh(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=Z_(x.type,x.key,x.props,null,_.mode,E),E.ref=Dy(_,b,x),E.return=_,_=E)}return s(_);case nm:e:{for(A=x.key;b!==null;){if(b.key===A)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=fD(x,_.mode,E),b.return=_,_=b}return s(_);case Nc:return A=x._init,S(_,b,A(x._payload),E)}if(fx(x))return v(_,b,x,E);if(Ay(x))return y(_,b,x,E);pw(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=dD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var Km=oq(!0),sq=oq(!1),_b={},Ol=kd(_b),E1=kd(_b),C1=kd(_b);function kh(e){if(e===_b)throw Error(Me(174));return e}function E5(e,t){switch(Zn(C1,t),Zn(E1,e),Zn(Ol,_b),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:BN(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=BN(t,e)}cr(Ol),Zn(Ol,t)}function Jm(){cr(Ol),cr(E1),cr(C1)}function aq(e){kh(C1.current);var t=kh(Ol.current),n=BN(t,e.type);t!==n&&(Zn(E1,e),Zn(Ol,n))}function C5(e){E1.current===e&&(cr(Ol),cr(E1))}var Cr=kd(0);function WS(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oD=[];function T5(){for(var e=0;en?n:4,e(!0);var r=sD.transition;sD.transition={};try{e(!1),t()}finally{Bn=n,sD.transition=r}}function Sq(){return sa().memoizedState}function Wle(e,t,n){var r=dd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eq(e))Cq(t,n);else if(n=tq(e,t,n,r),n!==null){var i=So();Ja(n,e,r,i),Tq(n,t,r)}}function Gle(e,t,n){var r=dd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eq(e))Cq(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,il(l,s)){var c=t.interleaved;c===null?(i.next=i,_5(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=tq(e,t,i,r),n!==null&&(i=So(),Ja(n,e,r,i),Tq(n,t,r))}}function Eq(e){var t=e.alternate;return e===Ar||t!==null&&t===Ar}function Cq(e,t){$x=GS=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tq(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,l5(e,n)}}var VS={readContext:oa,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useInsertionEffect:Gi,useLayoutEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useDeferredValue:Gi,useTransition:Gi,useMutableSource:Gi,useSyncExternalStore:Gi,useId:Gi,unstable_isNewReconciler:!1},Vle={readContext:oa,useCallback:function(e,t){return yl().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:IU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Y_(4194308,4,yq.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Y_(4194308,4,e,t)},useInsertionEffect:function(e,t){return Y_(4,2,e,t)},useMemo:function(e,t){var n=yl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Wle.bind(null,Ar,e),[r.memoizedState,e]},useRef:function(e){var t=yl();return e={current:e},t.memoizedState=e},useState:TU,useDebugValue:O5,useDeferredValue:function(e){return yl().memoizedState=e},useTransition:function(){var e=TU(!1),t=e[0];return e=Hle.bind(null,e[1]),yl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ar,i=yl();if(fr){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),yi===null)throw Error(Me(349));tp&30||cq(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,IU(fq.bind(null,r,o,e),[e]),r.flags|=2048,R1(9,dq.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=yl(),t=yi.identifierPrefix;if(fr){var n=ec,r=Zu;n=(r&~(1<<32-Ka(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=T1++,0")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{Hk=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dx(e):""}function Sae(e){switch(e.tag){case 5:return dx(e.type);case 16:return dx("Lazy");case 13:return dx("Suspense");case 19:return dx("SuspenseList");case 0:case 2:case 15:return e=Wk(e.type,!1),e;case 11:return e=Wk(e.type.render,!1),e;case 1:return e=Wk(e.type,!0),e;default:return""}}function ON(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rm:return"Fragment";case nm:return"Portal";case RN:return"Profiler";case r5:return"StrictMode";case AN:return"Suspense";case PN:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iX:return(e.displayName||"Context")+".Consumer";case rX:return(e._context.displayName||"Context")+".Provider";case i5:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case o5:return t=e.displayName||null,t!==null?t:ON(e.type)||"Memo";case Nc:t=e._payload,e=e._init;try{return ON(e(t))}catch{}}return null}function Eae(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ON(t);case 8:return t===r5?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _d(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cae(e){var t=sX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function iw(e){e._valueTracker||(e._valueTracker=Cae(e))}function aX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function RS(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}}function MN(e,t){var n=t.checked;return Pr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function W6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_d(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lX(e,t){t=t.checked,t!=null&&n5(e,"checked",t,!1)}function kN(e,t){lX(e,t);var n=_d(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?DN(e,t.type,n):t.hasOwnProperty("defaultValue")&&DN(e,t.type,_d(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function G6(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function DN(e,t,n){(t!=="number"||RS(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fx=Array.isArray;function Im(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ow.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function p1(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var kx={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tae=["Webkit","ms","Moz","O"];Object.keys(kx).forEach(function(e){Tae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kx[t]=kx[e]})});function fX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||kx.hasOwnProperty(e)&&kx[e]?(""+t).trim():t+"px"}function hX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Iae=Pr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function NN(e,t){if(t){if(Iae[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function $N(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 FN=null;function s5(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zN=null,Rm=null,Am=null;function q6(e){if(e=wb(e)){if(typeof zN!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=aT(t),zN(e.stateNode,e.type,t))}}function pX(e){Rm?Am?Am.push(e):Am=[e]:Rm=e}function mX(){if(Rm){var e=Rm,t=Am;if(Am=Rm=null,q6(e),t)for(e=0;e>>=0,e===0?32:31-($ae(e)/Fae|0)|0}var sw=64,aw=4194304;function hx(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function MS(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=hx(l):(o&=s,o!==0&&(r=hx(o)))}else s=n&~i,s!==0?r=hx(s):o!==0&&(r=hx(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xb(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ka(t),e[t]=n}function Hae(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Lx),rU=String.fromCharCode(32),iU=!1;function LX(e,t){switch(e){case"keyup":return vle.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var im=!1;function xle(e,t){switch(e){case"compositionend":return BX(t);case"keypress":return t.which!==32?null:(iU=!0,rU);case"textInput":return e=t.data,e===rU&&iU?null:e;default:return null}}function ble(e,t){if(im)return e==="compositionend"||!p5&&LX(e,t)?(e=kX(),G_=d5=Kc=null,im=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lU(n)}}function zX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UX(){for(var e=window,t=RS();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=RS(e.document)}return t}function m5(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ale(e){var t=UX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zX(n.ownerDocument.documentElement,n)){if(r!==null&&m5(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=uU(n,o);var s=uU(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,om=null,VN=null,Nx=null,XN=!1;function cU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;XN||om==null||om!==RS(r)||(r=om,"selectionStart"in r&&m5(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nx&&b1(Nx,r)||(Nx=r,r=LS(VN,"onSelect"),0lm||(e.current=ZN[lm],ZN[lm]=null,lm--)}function Zn(e,t){lm++,ZN[lm]=e.current,e.current=t}var Sd={},to=kd(Sd),No=kd(!1),Zh=Sd;function qm(e,t){var n=e.type.contextTypes;if(!n)return Sd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $o(e){return e=e.childContextTypes,e!=null}function NS(){cr(No),cr(to)}function vU(e,t,n){if(to.current!==Sd)throw Error(Me(168));Zn(to,t),Zn(No,n)}function KX(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Me(108,Eae(e)||"Unknown",i));return Pr({},n,r)}function $S(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sd,Zh=to.current,Zn(to,e),Zn(No,No.current),!0}function yU(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=KX(e,t,Zh),r.__reactInternalMemoizedMergedChildContext=e,cr(No),cr(to),Zn(to,e)):cr(No),Zn(No,n)}var Yu=null,lT=!1,iD=!1;function JX(e){Yu===null?Yu=[e]:Yu.push(e)}function Ule(e){lT=!0,JX(e)}function Dd(){if(!iD&&Yu!==null){iD=!0;var e=0,t=Bn;try{var n=Yu;for(Bn=1;e>=s,i-=s,Zu=1<<32-Ka(t)+i|n<M?(L=R,R=null):L=R.sibling;var B=p(_,R,x[M],E);if(B===null){R===null&&(R=L);break}e&&R&&B.alternate===null&&t(_,R),b=o(B,b,M),A===null?I=B:A.sibling=B,A=B,R=L}if(M===x.length)return n(_,R),fr&&vh(_,M),I;if(R===null){for(;MM?(L=R,R=null):L=R.sibling;var H=p(_,R,B.value,E);if(H===null){R===null&&(R=L);break}e&&R&&H.alternate===null&&t(_,R),b=o(H,b,M),A===null?I=H:A.sibling=H,A=H,R=L}if(B.done)return n(_,R),fr&&vh(_,M),I;if(R===null){for(;!B.done;M++,B=x.next())B=h(_,B.value,E),B!==null&&(b=o(B,b,M),A===null?I=B:A.sibling=B,A=B);return fr&&vh(_,M),I}for(R=r(_,R);!B.done;M++,B=x.next())B=g(R,_,M,B.value,E),B!==null&&(e&&B.alternate!==null&&R.delete(B.key===null?M:B.key),b=o(B,b,M),A===null?I=B:A.sibling=B,A=B);return e&&R.forEach(function(G){return t(_,G)}),fr&&vh(_,M),I}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===rm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case rw:e:{for(var I=x.key,A=b;A!==null;){if(A.key===I){if(I=x.type,I===rm){if(A.tag===7){n(_,A.sibling),b=i(A,x.props.children),b.return=_,_=b;break e}}else if(A.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Nc&&CU(I)===A.type){n(_,A.sibling),b=i(A,x.props),b.ref=Dy(_,A,x),b.return=_,_=b;break e}n(_,A);break}else t(_,A);A=A.sibling}x.type===rm?(b=Uh(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=Z_(x.type,x.key,x.props,null,_.mode,E),E.ref=Dy(_,b,x),E.return=_,_=E)}return s(_);case nm:e:{for(A=x.key;b!==null;){if(b.key===A)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=fD(x,_.mode,E),b.return=_,_=b}return s(_);case Nc:return A=x._init,S(_,b,A(x._payload),E)}if(fx(x))return v(_,b,x,E);if(Ay(x))return y(_,b,x,E);pw(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=dD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var Km=oq(!0),sq=oq(!1),_b={},Ol=kd(_b),E1=kd(_b),C1=kd(_b);function kh(e){if(e===_b)throw Error(Me(174));return e}function E5(e,t){switch(Zn(C1,t),Zn(E1,e),Zn(Ol,_b),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:BN(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=BN(t,e)}cr(Ol),Zn(Ol,t)}function Jm(){cr(Ol),cr(E1),cr(C1)}function aq(e){kh(C1.current);var t=kh(Ol.current),n=BN(t,e.type);t!==n&&(Zn(E1,e),Zn(Ol,n))}function C5(e){E1.current===e&&(cr(Ol),cr(E1))}var Cr=kd(0);function WS(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oD=[];function T5(){for(var e=0;en?n:4,e(!0);var r=sD.transition;sD.transition={};try{e(!1),t()}finally{Bn=n,sD.transition=r}}function Sq(){return sa().memoizedState}function Gle(e,t,n){var r=dd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eq(e))Cq(t,n);else if(n=tq(e,t,n,r),n!==null){var i=So();Ja(n,e,r,i),Tq(n,t,r)}}function Vle(e,t,n){var r=dd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eq(e))Cq(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,il(l,s)){var c=t.interleaved;c===null?(i.next=i,_5(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=tq(e,t,i,r),n!==null&&(i=So(),Ja(n,e,r,i),Tq(n,t,r))}}function Eq(e){var t=e.alternate;return e===Ar||t!==null&&t===Ar}function Cq(e,t){$x=GS=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tq(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,l5(e,n)}}var VS={readContext:oa,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useInsertionEffect:Gi,useLayoutEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useDeferredValue:Gi,useTransition:Gi,useMutableSource:Gi,useSyncExternalStore:Gi,useId:Gi,unstable_isNewReconciler:!1},Xle={readContext:oa,useCallback:function(e,t){return yl().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:IU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Y_(4194308,4,yq.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Y_(4194308,4,e,t)},useInsertionEffect:function(e,t){return Y_(4,2,e,t)},useMemo:function(e,t){var n=yl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Gle.bind(null,Ar,e),[r.memoizedState,e]},useRef:function(e){var t=yl();return e={current:e},t.memoizedState=e},useState:TU,useDebugValue:O5,useDeferredValue:function(e){return yl().memoizedState=e},useTransition:function(){var e=TU(!1),t=e[0];return e=Wle.bind(null,e[1]),yl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ar,i=yl();if(fr){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),yi===null)throw Error(Me(349));tp&30||cq(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,IU(fq.bind(null,r,o,e),[e]),r.flags|=2048,R1(9,dq.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=yl(),t=yi.identifierPrefix;if(fr){var n=ec,r=Zu;n=(r&~(1<<32-Ka(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=T1++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Cl]=t,e[S1]=r,Lq(e,t,!1,!1),t.stateNode=e;e:{switch(s=$N(n,r),n){case"dialog":ur("cancel",e),ur("close",e),i=r;break;case"iframe":case"object":case"embed":ur("load",e),i=r;break;case"video":case"audio":for(i=0;iZm&&(t.flags|=128,r=!0,Ly(o,!1),t.lanes=4194304)}else{if(!r)if(e=WS(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ly(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Vi(t),null}else 2*Hr()-o.renderingStartTime>Zm&&n!==1073741824&&(t.flags|=128,r=!0,Ly(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,Zn(Cr,r?n&1|2:n&1),t):(Vi(t),null);case 22:case 23:return N5(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hs&1073741824&&(Vi(t),t.subtreeFlags&6&&(t.flags|=8192)):Vi(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function eue(e,t){switch(v5(t),t.tag){case 1:return $o(t.type)&&NS(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jm(),cr(No),cr(to),T5(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return C5(t),null;case 13:if(cr(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));Ym()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cr(Cr),null;case 4:return Jm(),null;case 10:return w5(t.type._context),null;case 22:case 23:return N5(),null;case 24:return null;default:return null}}var gw=!1,Ki=!1,tue=typeof WeakSet=="function"?WeakSet:Set,st=null;function fm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Nr(e,t,r)}else n.current=null}function d$(e,t,n){try{n()}catch(r){Nr(e,t,r)}}var BU=!1;function nue(e,t){if(qN=kS,e=UX(),m5(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(YN={focusedElem:e,selectionRange:n},kS=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Na(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(E){Nr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=BU,BU=!1,v}function Fx(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&d$(t,n,o)}i=i.next}while(i!==r)}}function dT(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function f$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $q(e){var t=e.alternate;t!==null&&(e.alternate=null,$q(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cl],delete t[S1],delete t[QN],delete t[$le],delete t[Fle])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fq(e){return e.tag===5||e.tag===3||e.tag===4}function NU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fq(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function h$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=BS));else if(r!==4&&(e=e.child,e!==null))for(h$(e,t,n),e=e.sibling;e!==null;)h$(e,t,n),e=e.sibling}function p$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(p$(e,t,n),e=e.sibling;e!==null;)p$(e,t,n),e=e.sibling}var Di=null,Fa=!1;function Rc(e,t,n){for(n=n.child;n!==null;)zq(e,t,n),n=n.sibling}function zq(e,t,n){if(Pl&&typeof Pl.onCommitFiberUnmount=="function")try{Pl.onCommitFiberUnmount(rT,n)}catch{}switch(n.tag){case 5:Ki||fm(n,t);case 6:var r=Di,i=Fa;Di=null,Rc(e,t,n),Di=r,Fa=i,Di!==null&&(Fa?(e=Di,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Di.removeChild(n.stateNode));break;case 18:Di!==null&&(Fa?(e=Di,n=n.stateNode,e.nodeType===8?rD(e.parentNode,n):e.nodeType===1&&rD(e,n),y1(e)):rD(Di,n.stateNode));break;case 4:r=Di,i=Fa,Di=n.stateNode.containerInfo,Fa=!0,Rc(e,t,n),Di=r,Fa=i;break;case 0:case 11:case 14:case 15:if(!Ki&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&d$(n,t,s),i=i.next}while(i!==r)}Rc(e,t,n);break;case 1:if(!Ki&&(fm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Nr(n,t,l)}Rc(e,t,n);break;case 21:Rc(e,t,n);break;case 22:n.mode&1?(Ki=(r=Ki)||n.memoizedState!==null,Rc(e,t,n),Ki=r):Rc(e,t,n);break;default:Rc(e,t,n)}}function $U(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tue),t.forEach(function(r){var i=due.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Aa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iue(r/1960))-r,10e?16:e,Jc===null)var r=!1;else{if(e=Jc,Jc=null,YS=0,bn&6)throw Error(Me(331));var i=bn;for(bn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-L5?zh(e,0):D5|=n),Fo(e,t)}function qq(e,t){t===0&&(e.mode&1?(t=aw,aw<<=1,!(aw&130023424)&&(aw=4194304)):t=1);var n=So();e=dc(e,t),e!==null&&(xb(e,t,n),Fo(e,n))}function cue(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qq(e,n)}function due(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),qq(e,n)}var Yq;Yq=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||No.current)Do=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Do=!1,Qle(e,t,n);Do=!!(e.flags&131072)}else Do=!1,fr&&t.flags&1048576&&QX(t,zS,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;K_(e,t),e=t.pendingProps;var i=qm(t,to.current);Om(t,n),i=R5(null,t,r,e,i,n);var o=A5();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$o(r)?(o=!0,$S(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,S5(t),i.updater=uT,t.stateNode=i,i._reactInternals=t,i$(t,r,e,n),t=a$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&g5(t),yo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(K_(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hue(r),e=Na(r,e),i){case 0:t=s$(null,t,r,e,n);break e;case 1:t=kU(null,t,r,e,n);break e;case 11:t=OU(null,t,r,e,n);break e;case 14:t=MU(null,t,r,Na(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),s$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),kU(e,t,r,i,n);case 3:e:{if(Mq(t),e===null)throw Error(Me(387));r=t.pendingProps,o=t.memoizedState,i=o.element,nq(e,t),HS(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Qm(Error(Me(423)),t),t=DU(e,t,r,n,i);break e}else if(r!==i){i=Qm(Error(Me(424)),t),t=DU(e,t,r,n,i);break e}else for(ys=ld(t.stateNode.containerInfo.firstChild),_s=t,fr=!0,Ua=null,n=sq(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ym(),r===i){t=fc(e,t,n);break e}yo(e,t,r,n)}t=t.child}return t;case 5:return aq(t),e===null&&t$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,KN(r,i)?s=null:o!==null&&KN(r,o)&&(t.flags|=32),Oq(e,t),yo(e,t,s,n),t.child;case 6:return e===null&&t$(t),null;case 13:return kq(e,t,n);case 4:return E5(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Km(t,null,r,n):yo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),OU(e,t,r,i,n);case 7:return yo(e,t,t.pendingProps,n),t.child;case 8:return yo(e,t,t.pendingProps.children,n),t.child;case 12:return yo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Zn(US,r._currentValue),r._currentValue=s,o!==null)if(il(o.value,s)){if(o.children===i.children&&!No.current){t=fc(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=ic(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),n$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Me(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),n$(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}yo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Om(t,n),i=oa(i),r=r(i),t.flags|=1,yo(e,t,r,n),t.child;case 14:return r=t.type,i=Na(r,t.pendingProps),i=Na(r.type,i),MU(e,t,r,i,n);case 15:return Aq(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),K_(e,t),t.tag=1,$o(r)?(e=!0,$S(t)):e=!1,Om(t,n),iq(t,r,i),i$(t,r,i,n),a$(null,t,r,!0,e,n);case 19:return Dq(e,t,n);case 22:return Pq(e,t,n)}throw Error(Me(156,t.tag))};function Kq(e,t){return _X(e,t)}function fue(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xs(e,t,n,r){return new fue(e,t,n,r)}function F5(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hue(e){if(typeof e=="function")return F5(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i5)return 11;if(e===o5)return 14}return 2}function fd(e,t){var n=e.alternate;return n===null?(n=Xs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Z_(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")F5(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case rm:return Uh(n.children,i,o,t);case r5:s=8,i|=8;break;case RN:return e=Xs(12,n,t,i|2),e.elementType=RN,e.lanes=o,e;case AN:return e=Xs(13,n,t,i),e.elementType=AN,e.lanes=o,e;case PN:return e=Xs(19,n,t,i),e.elementType=PN,e.lanes=o,e;case oX:return hT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rX:s=10;break e;case iX:s=9;break e;case i5:s=11;break e;case o5:s=14;break e;case Nc:s=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=Xs(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Uh(e,t,n,r){return e=Xs(7,e,r,t),e.lanes=n,e}function hT(e,t,n,r){return e=Xs(22,e,r,t),e.elementType=oX,e.lanes=n,e.stateNode={isHidden:!1},e}function dD(e,t,n){return e=Xs(6,e,null,t),e.lanes=n,e}function fD(e,t,n){return t=Xs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pue(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vk(0),this.expirationTimes=Vk(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vk(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function z5(e,t,n,r,i,o,s,l,c){return e=new pue(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Xs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},S5(o),e}function mue(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eY)}catch(e){console.error(e)}}eY(),QV.exports=Ls;var Og=QV.exports;const pm=al(Og),VU={disabled:!1},QS=de.createContext(null);var bue=function(t){return t.scrollTop},mx="unmounted",xh="exited",bh="entering",Wp="entered",x$="exiting",bc=function(e){nT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=xh,o.appearStatus=bh):c=Wp:r.unmountOnExit||r.mountOnEnter?c=mx:c=xh,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===mx?{status:xh}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==bh&&s!==Wp&&(o=bh):(s===bh||s===Wp)&&(o=x$)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===bh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:pm.findDOMNode(this);s&&bue(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xh&&this.setState({status:mx})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[pm.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||VU.disabled){this.safeSetState({status:Wp},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:bh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Wp},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:pm.findDOMNode(this);if(!o||VU.disabled){this.safeSetState({status:xh},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:x$},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:xh},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:pm.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mx)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(QS.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);bc.contextType=QS;bc.propTypes={};function kp(){}bc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};bc.UNMOUNTED=mx;bc.EXITED=xh;bc.ENTERING=bh;bc.ENTERED=Wp;bc.EXITING=x$;const W5=bc;function wue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G5(e,t){var n=function(o){return t&&O.isValidElement(o)?t(o):o},r=Object.create(null);return e&&O.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function _ue(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function eg(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function Rue(e){return _t("MuiCollapse",e)}Tt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Aue=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Pue=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ct(r,Rue,n)},Oue=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),Mue=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),kue=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),nY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=YV.standard,TransitionComponent:E=W5}=r,I=Le(r,Aue),A=$({},r,{orientation:_,collapsedSize:l}),R=Pue(A),M=Pn(),L=O.useRef(),B=O.useRef(null),H=O.useRef(),G=typeof l=="number"?`${l}px`:l,U=_==="horizontal",D=U?"width":"height";O.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=O.useRef(null),z=mr(n,F),V=J=>ae=>{if(J){const le=F.current;ae===void 0?J(le):J(le,ae)}},W=()=>B.current?B.current[U?"clientWidth":"clientHeight"]:0,K=V((J,ae)=>{B.current&&U&&(B.current.style.position="absolute"),J.style[D]=G,h&&h(J,ae)}),Y=V((J,ae)=>{const le=W();B.current&&U&&(B.current.style.position="");const{duration:he,easing:pe}=eg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=M.transitions.getAutoHeightDuration(le);J.style.transitionDuration=`${ve}ms`,H.current=ve}else J.style.transitionDuration=typeof he=="string"?he:`${he}ms`;J.style[D]=`${le}px`,J.style.transitionTimingFunction=pe,g&&g(J,ae)}),Q=V((J,ae)=>{J.style[D]="auto",p&&p(J,ae)}),re=V(J=>{J.style[D]=`${W()}px`,v&&v(J)}),ue=V(y),ce=V(J=>{const ae=W(),{duration:le,easing:he}=eg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=M.transitions.getAutoHeightDuration(ae);J.style.transitionDuration=`${pe}ms`,H.current=pe}else J.style.transitionDuration=typeof le=="string"?le:`${le}ms`;J.style[D]=G,J.style.transitionTimingFunction=he,S&&S(J)}),se=J=>{x==="auto"&&(L.current=setTimeout(J,H.current||0)),i&&i(F.current,J)};return C.jsx(E,$({in:f,onEnter:K,onEntered:Q,onEntering:Y,onExit:re,onExited:ue,onExiting:ce,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},I,{children:(J,ae)=>C.jsx(Oue,$({as:c,className:Ue(R.root,s,{entered:R.entered,exited:!f&&G==="0px"&&R.hidden}[J]),style:$({[U?"minWidth":"minHeight"]:G},b),ownerState:$({},A,{state:J}),ref:z},ae,{children:C.jsx(Mue,{ownerState:$({},A,{state:J}),className:R.wrapper,ref:B,children:C.jsx(kue,{ownerState:$({},A,{state:J}),className:R.wrapperInner,children:o})})}))}))});nY.muiSupportAuto=!0;const hD=nY;function Due(e){return _t("MuiPaper",e)}Tt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Lue=["className","component","elevation","square","variant"],Bue=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ct(o,Due,i)},Nue=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Rn("#fff",F6(t.elevation))}, ${Rn("#fff",F6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),$ue=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,Lue),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=Bue(f);return C.jsx(Nue,$({as:o,ownerState:f,className:Ue(h.root,i),ref:n},d))}),Mg=$ue;function Fue(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=O.useState(!1),p=Ue(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Ue(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),O.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const zue=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Us=zue,Uue=["center","classes","className"];let yT=e=>e,XU,qU,YU,KU;const b$=550,jue=80,Hue=Od(XU||(XU=yT` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function uD(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function o$(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Kle=typeof WeakMap=="function"?WeakMap:Map;function Iq(e,t,n){n=ic(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qS||(qS=!0,m$=r),o$(e,t)},n}function Rq(e,t,n){n=ic(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){o$(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){o$(e,t),typeof r!="function"&&(cd===null?cd=new Set([this]):cd.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function RU(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kle;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=cue.bind(null,e,t,n),t.then(e,e))}function AU(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function PU(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ic(-1,1),t.tag=2,ud(n,t,1))),n.lanes|=1),e)}var Jle=xc.ReactCurrentOwner,Do=!1;function yo(e,t,n,r){t.child=e===null?sq(t,null,n,r):Km(t,e.child,n,r)}function OU(e,t,n,r,i){n=n.render;var o=t.ref;return Om(t,i),r=R5(e,t,n,r,o,i),n=A5(),e!==null&&!Do?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fc(e,t,i)):(fr&&n&&g5(t),t.flags|=1,yo(e,t,r,i),t.child)}function MU(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!F5(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Aq(e,t,o,r,i)):(e=Z_(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:b1,n(s,r)&&e.ref===t.ref)return fc(e,t,i)}return t.flags|=1,e=fd(o,r),e.ref=t.ref,e.return=t,t.child=e}function Aq(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(b1(o,r)&&e.ref===t.ref)if(Do=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Do=!0);else return t.lanes=e.lanes,fc(e,t,i)}return s$(e,t,n,r,i)}function Pq(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zn(hm,hs),hs|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Zn(hm,hs),hs|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Zn(hm,hs),hs|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Zn(hm,hs),hs|=r;return yo(e,t,i,n),t.child}function Oq(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function s$(e,t,n,r,i){var o=$o(n)?Zh:to.current;return o=qm(t,o),Om(t,i),n=R5(e,t,n,r,o,i),r=A5(),e!==null&&!Do?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fc(e,t,i)):(fr&&r&&g5(t),t.flags|=1,yo(e,t,n,i),t.child)}function kU(e,t,n,r,i){if($o(n)){var o=!0;$S(t)}else o=!1;if(Om(t,i),t.stateNode===null)K_(e,t),iq(t,n,r),i$(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=oa(d):(d=$o(n)?Zh:to.current,d=qm(t,d));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==d)&&EU(t,s,r,d),$c=!1;var p=t.memoizedState;s.state=p,HS(t,r,s,i),c=t.memoizedState,l!==r||p!==c||No.current||$c?(typeof f=="function"&&(r$(t,n,f,r),c=t.memoizedState),(l=$c||SU(t,n,l,r,p,c,d))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=d,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,nq(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:Na(t.type,l),s.props=d,h=t.pendingProps,p=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=oa(c):(c=$o(n)?Zh:to.current,c=qm(t,c));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||p!==c)&&EU(t,s,r,c),$c=!1,p=t.memoizedState,s.state=p,HS(t,r,s,i);var v=t.memoizedState;l!==h||p!==v||No.current||$c?(typeof g=="function"&&(r$(t,n,g,r),v=t.memoizedState),(d=$c||SU(t,n,d,r,p,v,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=c,r=d):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return a$(e,t,n,r,o,i)}function a$(e,t,n,r,i,o){Oq(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&yU(t,n,!1),fc(e,t,o);r=t.stateNode,Jle.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Km(t,e.child,null,o),t.child=Km(t,null,l,o)):yo(e,t,l,o),t.memoizedState=r.state,i&&yU(t,n,!0),t.child}function Mq(e){var t=e.stateNode;t.pendingContext?vU(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vU(e,t.context,!1),E5(e,t.containerInfo)}function DU(e,t,n,r,i){return Ym(),y5(i),t.flags|=256,yo(e,t,n,r),t.child}var l$={dehydrated:null,treeContext:null,retryLane:0};function u$(e){return{baseLanes:e,cachePool:null,transitions:null}}function kq(e,t,n){var r=t.pendingProps,i=Cr.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Zn(Cr,i&1),e===null)return t$(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=hT(s,r,0,null),e=Uh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=u$(n),t.memoizedState=l$,e):M5(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Qle(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=fd(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=fd(l,o):(o=Uh(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?u$(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=l$,r}return o=e.child,e=o.sibling,r=fd(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function M5(e,t){return t=hT({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function mw(e,t,n,r){return r!==null&&y5(r),Km(t,e.child,null,n),e=M5(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qle(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=uD(Error(Me(422))),mw(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=hT({mode:"visible",children:r.children},i,0,null),o=Uh(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Km(t,e.child,null,s),t.child.memoizedState=u$(s),t.memoizedState=l$,o);if(!(t.mode&1))return mw(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(Me(419)),r=uD(o,r,void 0),mw(e,t,s,r)}if(l=(s&e.childLanes)!==0,Do||l){if(r=yi,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,dc(e,i),Ja(r,e,i,-1))}return $5(),r=uD(Error(Me(421))),mw(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=due.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ys=ld(i.nextSibling),_s=t,fr=!0,Ua=null,e!==null&&(Hs[Ws++]=Zu,Hs[Ws++]=ec,Hs[Ws++]=ep,Zu=e.id,ec=e.overflow,ep=t),t=M5(t,r.children),t.flags|=4096,t)}function LU(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),n$(e.return,t,n)}function cD(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Dq(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(yo(e,t,r.children,n),r=Cr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&LU(e,n,t);else if(e.tag===19)LU(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Zn(Cr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&WS(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cD(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&WS(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cD(t,!0,n,null,o);break;case"together":cD(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function K_(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),np|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Me(153));if(t.child!==null){for(e=t.child,n=fd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zle(e,t,n){switch(t.tag){case 3:Mq(t),Ym();break;case 5:aq(t);break;case 1:$o(t.type)&&$S(t);break;case 4:E5(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Zn(US,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Zn(Cr,Cr.current&1),t.flags|=128,null):n&t.child.childLanes?kq(e,t,n):(Zn(Cr,Cr.current&1),e=fc(e,t,n),e!==null?e.sibling:null);Zn(Cr,Cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dq(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zn(Cr,Cr.current),r)break;return null;case 22:case 23:return t.lanes=0,Pq(e,t,n)}return fc(e,t,n)}var Lq,c$,Bq,Nq;Lq=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};c$=function(){};Bq=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,kh(Ol.current);var o=null;switch(n){case"input":i=MN(e,i),r=MN(e,r),o=[];break;case"select":i=Pr({},i,{value:void 0}),r=Pr({},r,{value:void 0}),o=[];break;case"textarea":i=LN(e,i),r=LN(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=BS)}NN(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var l=i[d];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(h1.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(l=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(h1.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ur("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Nq=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ly(e,t){if(!fr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function eue(e,t,n){var r=t.pendingProps;switch(v5(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vi(t),null;case 1:return $o(t.type)&&NS(),Vi(t),null;case 3:return r=t.stateNode,Jm(),cr(No),cr(to),T5(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(hw(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ua!==null&&(y$(Ua),Ua=null))),c$(e,t),Vi(t),null;case 5:C5(t);var i=kh(C1.current);if(n=t.type,e!==null&&t.stateNode!=null)Bq(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Me(166));return Vi(t),null}if(e=kh(Ol.current),hw(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Cl]=t,r[S1]=o,e=(t.mode&1)!==0,n){case"dialog":ur("cancel",r),ur("close",r);break;case"iframe":case"object":case"embed":ur("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Cl]=t,e[S1]=r,Lq(e,t,!1,!1),t.stateNode=e;e:{switch(s=$N(n,r),n){case"dialog":ur("cancel",e),ur("close",e),i=r;break;case"iframe":case"object":case"embed":ur("load",e),i=r;break;case"video":case"audio":for(i=0;iZm&&(t.flags|=128,r=!0,Ly(o,!1),t.lanes=4194304)}else{if(!r)if(e=WS(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ly(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Vi(t),null}else 2*Hr()-o.renderingStartTime>Zm&&n!==1073741824&&(t.flags|=128,r=!0,Ly(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,Zn(Cr,r?n&1|2:n&1),t):(Vi(t),null);case 22:case 23:return N5(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hs&1073741824&&(Vi(t),t.subtreeFlags&6&&(t.flags|=8192)):Vi(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function tue(e,t){switch(v5(t),t.tag){case 1:return $o(t.type)&&NS(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jm(),cr(No),cr(to),T5(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return C5(t),null;case 13:if(cr(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));Ym()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cr(Cr),null;case 4:return Jm(),null;case 10:return w5(t.type._context),null;case 22:case 23:return N5(),null;case 24:return null;default:return null}}var gw=!1,Ki=!1,nue=typeof WeakSet=="function"?WeakSet:Set,st=null;function fm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Nr(e,t,r)}else n.current=null}function d$(e,t,n){try{n()}catch(r){Nr(e,t,r)}}var BU=!1;function rue(e,t){if(qN=kS,e=UX(),m5(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(YN={focusedElem:e,selectionRange:n},kS=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Na(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(E){Nr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=BU,BU=!1,v}function Fx(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&d$(t,n,o)}i=i.next}while(i!==r)}}function dT(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function f$(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $q(e){var t=e.alternate;t!==null&&(e.alternate=null,$q(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cl],delete t[S1],delete t[QN],delete t[Fle],delete t[zle])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fq(e){return e.tag===5||e.tag===3||e.tag===4}function NU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fq(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function h$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=BS));else if(r!==4&&(e=e.child,e!==null))for(h$(e,t,n),e=e.sibling;e!==null;)h$(e,t,n),e=e.sibling}function p$(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(p$(e,t,n),e=e.sibling;e!==null;)p$(e,t,n),e=e.sibling}var Di=null,Fa=!1;function Rc(e,t,n){for(n=n.child;n!==null;)zq(e,t,n),n=n.sibling}function zq(e,t,n){if(Pl&&typeof Pl.onCommitFiberUnmount=="function")try{Pl.onCommitFiberUnmount(rT,n)}catch{}switch(n.tag){case 5:Ki||fm(n,t);case 6:var r=Di,i=Fa;Di=null,Rc(e,t,n),Di=r,Fa=i,Di!==null&&(Fa?(e=Di,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Di.removeChild(n.stateNode));break;case 18:Di!==null&&(Fa?(e=Di,n=n.stateNode,e.nodeType===8?rD(e.parentNode,n):e.nodeType===1&&rD(e,n),y1(e)):rD(Di,n.stateNode));break;case 4:r=Di,i=Fa,Di=n.stateNode.containerInfo,Fa=!0,Rc(e,t,n),Di=r,Fa=i;break;case 0:case 11:case 14:case 15:if(!Ki&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&d$(n,t,s),i=i.next}while(i!==r)}Rc(e,t,n);break;case 1:if(!Ki&&(fm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Nr(n,t,l)}Rc(e,t,n);break;case 21:Rc(e,t,n);break;case 22:n.mode&1?(Ki=(r=Ki)||n.memoizedState!==null,Rc(e,t,n),Ki=r):Rc(e,t,n);break;default:Rc(e,t,n)}}function $U(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nue),t.forEach(function(r){var i=fue.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Aa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oue(r/1960))-r,10e?16:e,Jc===null)var r=!1;else{if(e=Jc,Jc=null,YS=0,bn&6)throw Error(Me(331));var i=bn;for(bn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-L5?zh(e,0):D5|=n),Fo(e,t)}function qq(e,t){t===0&&(e.mode&1?(t=aw,aw<<=1,!(aw&130023424)&&(aw=4194304)):t=1);var n=So();e=dc(e,t),e!==null&&(xb(e,t,n),Fo(e,n))}function due(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qq(e,n)}function fue(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),qq(e,n)}var Yq;Yq=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||No.current)Do=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Do=!1,Zle(e,t,n);Do=!!(e.flags&131072)}else Do=!1,fr&&t.flags&1048576&&QX(t,zS,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;K_(e,t),e=t.pendingProps;var i=qm(t,to.current);Om(t,n),i=R5(null,t,r,e,i,n);var o=A5();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$o(r)?(o=!0,$S(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,S5(t),i.updater=uT,t.stateNode=i,i._reactInternals=t,i$(t,r,e,n),t=a$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&g5(t),yo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(K_(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=pue(r),e=Na(r,e),i){case 0:t=s$(null,t,r,e,n);break e;case 1:t=kU(null,t,r,e,n);break e;case 11:t=OU(null,t,r,e,n);break e;case 14:t=MU(null,t,r,Na(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),s$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),kU(e,t,r,i,n);case 3:e:{if(Mq(t),e===null)throw Error(Me(387));r=t.pendingProps,o=t.memoizedState,i=o.element,nq(e,t),HS(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Qm(Error(Me(423)),t),t=DU(e,t,r,n,i);break e}else if(r!==i){i=Qm(Error(Me(424)),t),t=DU(e,t,r,n,i);break e}else for(ys=ld(t.stateNode.containerInfo.firstChild),_s=t,fr=!0,Ua=null,n=sq(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ym(),r===i){t=fc(e,t,n);break e}yo(e,t,r,n)}t=t.child}return t;case 5:return aq(t),e===null&&t$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,KN(r,i)?s=null:o!==null&&KN(r,o)&&(t.flags|=32),Oq(e,t),yo(e,t,s,n),t.child;case 6:return e===null&&t$(t),null;case 13:return kq(e,t,n);case 4:return E5(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Km(t,null,r,n):yo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),OU(e,t,r,i,n);case 7:return yo(e,t,t.pendingProps,n),t.child;case 8:return yo(e,t,t.pendingProps.children,n),t.child;case 12:return yo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Zn(US,r._currentValue),r._currentValue=s,o!==null)if(il(o.value,s)){if(o.children===i.children&&!No.current){t=fc(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=ic(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),n$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Me(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),n$(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}yo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Om(t,n),i=oa(i),r=r(i),t.flags|=1,yo(e,t,r,n),t.child;case 14:return r=t.type,i=Na(r,t.pendingProps),i=Na(r.type,i),MU(e,t,r,i,n);case 15:return Aq(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Na(r,i),K_(e,t),t.tag=1,$o(r)?(e=!0,$S(t)):e=!1,Om(t,n),iq(t,r,i),i$(t,r,i,n),a$(null,t,r,!0,e,n);case 19:return Dq(e,t,n);case 22:return Pq(e,t,n)}throw Error(Me(156,t.tag))};function Kq(e,t){return _X(e,t)}function hue(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xs(e,t,n,r){return new hue(e,t,n,r)}function F5(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pue(e){if(typeof e=="function")return F5(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i5)return 11;if(e===o5)return 14}return 2}function fd(e,t){var n=e.alternate;return n===null?(n=Xs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Z_(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")F5(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case rm:return Uh(n.children,i,o,t);case r5:s=8,i|=8;break;case RN:return e=Xs(12,n,t,i|2),e.elementType=RN,e.lanes=o,e;case AN:return e=Xs(13,n,t,i),e.elementType=AN,e.lanes=o,e;case PN:return e=Xs(19,n,t,i),e.elementType=PN,e.lanes=o,e;case oX:return hT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rX:s=10;break e;case iX:s=9;break e;case i5:s=11;break e;case o5:s=14;break e;case Nc:s=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=Xs(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Uh(e,t,n,r){return e=Xs(7,e,r,t),e.lanes=n,e}function hT(e,t,n,r){return e=Xs(22,e,r,t),e.elementType=oX,e.lanes=n,e.stateNode={isHidden:!1},e}function dD(e,t,n){return e=Xs(6,e,null,t),e.lanes=n,e}function fD(e,t,n){return t=Xs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mue(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vk(0),this.expirationTimes=Vk(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vk(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function z5(e,t,n,r,i,o,s,l,c){return e=new mue(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Xs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},S5(o),e}function gue(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eY)}catch(e){console.error(e)}}eY(),QV.exports=Ls;var Og=QV.exports;const pm=al(Og),VU={disabled:!1},QS=de.createContext(null);var wue=function(t){return t.scrollTop},mx="unmounted",xh="exited",bh="entering",Wp="entered",x$="exiting",bc=function(e){nT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=xh,o.appearStatus=bh):c=Wp:r.unmountOnExit||r.mountOnEnter?c=mx:c=xh,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===mx?{status:xh}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==bh&&s!==Wp&&(o=bh):(s===bh||s===Wp)&&(o=x$)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===bh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:pm.findDOMNode(this);s&&wue(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xh&&this.setState({status:mx})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[pm.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||VU.disabled){this.safeSetState({status:Wp},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:bh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Wp},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:pm.findDOMNode(this);if(!o||VU.disabled){this.safeSetState({status:xh},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:x$},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:xh},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:pm.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mx)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(QS.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);bc.contextType=QS;bc.propTypes={};function kp(){}bc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};bc.UNMOUNTED=mx;bc.EXITED=xh;bc.ENTERING=bh;bc.ENTERED=Wp;bc.EXITING=x$;const W5=bc;function _ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G5(e,t){var n=function(o){return t&&O.isValidElement(o)?t(o):o},r=Object.create(null);return e&&O.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Sue(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function eg(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function Aue(e){return _t("MuiCollapse",e)}Tt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Pue=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Oue=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ct(r,Aue,n)},Mue=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),kue=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),Due=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),nY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=YV.standard,TransitionComponent:E=W5}=r,I=Le(r,Pue),A=$({},r,{orientation:_,collapsedSize:l}),R=Oue(A),M=Pn(),L=O.useRef(),B=O.useRef(null),H=O.useRef(),G=typeof l=="number"?`${l}px`:l,U=_==="horizontal",D=U?"width":"height";O.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=O.useRef(null),z=mr(n,F),V=J=>ae=>{if(J){const le=F.current;ae===void 0?J(le):J(le,ae)}},W=()=>B.current?B.current[U?"clientWidth":"clientHeight"]:0,K=V((J,ae)=>{B.current&&U&&(B.current.style.position="absolute"),J.style[D]=G,h&&h(J,ae)}),Y=V((J,ae)=>{const le=W();B.current&&U&&(B.current.style.position="");const{duration:he,easing:pe}=eg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=M.transitions.getAutoHeightDuration(le);J.style.transitionDuration=`${ve}ms`,H.current=ve}else J.style.transitionDuration=typeof he=="string"?he:`${he}ms`;J.style[D]=`${le}px`,J.style.transitionTimingFunction=pe,g&&g(J,ae)}),Q=V((J,ae)=>{J.style[D]="auto",p&&p(J,ae)}),re=V(J=>{J.style[D]=`${W()}px`,v&&v(J)}),ue=V(y),ce=V(J=>{const ae=W(),{duration:le,easing:he}=eg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=M.transitions.getAutoHeightDuration(ae);J.style.transitionDuration=`${pe}ms`,H.current=pe}else J.style.transitionDuration=typeof le=="string"?le:`${le}ms`;J.style[D]=G,J.style.transitionTimingFunction=he,S&&S(J)}),se=J=>{x==="auto"&&(L.current=setTimeout(J,H.current||0)),i&&i(F.current,J)};return C.jsx(E,$({in:f,onEnter:K,onEntered:Q,onEntering:Y,onExit:re,onExited:ue,onExiting:ce,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},I,{children:(J,ae)=>C.jsx(Mue,$({as:c,className:Ue(R.root,s,{entered:R.entered,exited:!f&&G==="0px"&&R.hidden}[J]),style:$({[U?"minWidth":"minHeight"]:G},b),ownerState:$({},A,{state:J}),ref:z},ae,{children:C.jsx(kue,{ownerState:$({},A,{state:J}),className:R.wrapper,ref:B,children:C.jsx(Due,{ownerState:$({},A,{state:J}),className:R.wrapperInner,children:o})})}))}))});nY.muiSupportAuto=!0;const hD=nY;function Lue(e){return _t("MuiPaper",e)}Tt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Bue=["className","component","elevation","square","variant"],Nue=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ct(o,Lue,i)},$ue=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Rn("#fff",F6(t.elevation))}, ${Rn("#fff",F6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),Fue=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,Bue),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=Nue(f);return C.jsx($ue,$({as:o,ownerState:f,className:Ue(h.root,i),ref:n},d))}),Mg=Fue;function zue(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=O.useState(!1),p=Ue(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Ue(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),O.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Uue=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Us=Uue,jue=["center","classes","className"];let yT=e=>e,XU,qU,YU,KU;const b$=550,Hue=80,Wue=Od(XU||(XU=yT` 0% { transform: scale(0); opacity: 0.1; @@ -68,7 +68,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),Wue=Od(qU||(qU=yT` +`)),Gue=Od(qU||(qU=yT` 0% { opacity: 1; } @@ -76,7 +76,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),Gue=Od(YU||(YU=yT` +`)),Vue=Od(YU||(YU=yT` 0% { transform: scale(1); } @@ -88,7 +88,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),Vue=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Xue=Ee(Fue,{name:"MuiTouchRipple",slot:"Ripple"})(KU||(KU=yT` +`)),Xue=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),que=Ee(zue,{name:"MuiTouchRipple",slot:"Ripple"})(KU||(KU=yT` opacity: 0; position: absolute; @@ -131,8 +131,8 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Us.rippleVisible,Hue,b$,({theme:e})=>e.transitions.easing.easeInOut,Us.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Us.child,Us.childLeaving,Wue,b$,({theme:e})=>e.transitions.easing.easeInOut,Us.childPulsate,Gue,({theme:e})=>e.transitions.easing.easeInOut),que=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,Uue),[c,d]=O.useState([]),f=O.useRef(0),h=O.useRef(null);O.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=O.useRef(!1),g=O.useRef(0),v=O.useRef(null),y=O.useRef(null);O.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=O.useCallback(E=>{const{pulsate:I,rippleX:A,rippleY:R,rippleSize:M,cb:L}=E;d(B=>[...B,C.jsx(Xue,{classes:{ripple:Ue(o.ripple,Us.ripple),rippleVisible:Ue(o.rippleVisible,Us.rippleVisible),ripplePulsate:Ue(o.ripplePulsate,Us.ripplePulsate),child:Ue(o.child,Us.child),childLeaving:Ue(o.childLeaving,Us.childLeaving),childPulsate:Ue(o.childPulsate,Us.childPulsate)},timeout:b$,pulsate:I,rippleX:A,rippleY:R,rippleSize:M},f.current)]),f.current+=1,h.current=L},[o]),_=O.useCallback((E={},I={},A=()=>{})=>{const{pulsate:R=!1,center:M=i||I.pulsate,fakeElement:L=!1}=I;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const B=L?null:y.current,H=B?B.getBoundingClientRect():{width:0,height:0,left:0,top:0};let G,U,D;if(M||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)G=Math.round(H.width/2),U=Math.round(H.height/2);else{const{clientX:F,clientY:z}=E.touches&&E.touches.length>0?E.touches[0]:E;G=Math.round(F-H.left),U=Math.round(z-H.top)}if(M)D=Math.sqrt((2*H.width**2+H.height**2)/3),D%2===0&&(D+=1);else{const F=Math.max(Math.abs((B?B.clientWidth:0)-G),G)*2+2,z=Math.max(Math.abs((B?B.clientHeight:0)-U),U)*2+2;D=Math.sqrt(F**2+z**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:R,rippleX:G,rippleY:U,rippleSize:D,cb:A})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},jue)):S({pulsate:R,rippleX:G,rippleY:U,rippleSize:D,cb:A})},[i,S]),b=O.useCallback(()=>{_({},{pulsate:!0})},[_]),x=O.useCallback((E,I)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,I)});return}v.current=null,d(A=>A.length>0?A.slice(1):A),h.current=I},[]);return O.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Vue,$({className:Ue(Us.root,o.root,s),ref:y},l,{children:C.jsx(Iue,{component:null,exit:!0,children:c})}))}),Yue=que;function Kue(e){return _t("MuiButtonBase",e)}const Jue=Tt("MuiButtonBase",["root","disabled","focusVisible"]),Que=Jue,Zue=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ece=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Ct({root:["root",t&&"disabled",n&&"focusVisible"]},Kue,i);return n&&r&&(s.root+=` ${r}`),s},tce=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Que.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),nce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:I,onMouseDown:A,onMouseLeave:R,onMouseUp:M,onTouchEnd:L,onTouchMove:B,onTouchStart:H,tabIndex:G=0,TouchRippleProps:U,touchRippleRef:D,type:F}=r,z=Le(r,Zue),V=O.useRef(null),W=O.useRef(null),K=mr(W,D),{isFocusVisibleRef:Y,onFocus:Q,onBlur:re,ref:ue}=M3(),[ce,se]=O.useState(!1);d&&ce&&se(!1),O.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[J,ae]=O.useState(!1);O.useEffect(()=>{ae(!0)},[]);const le=J&&!f&&!d;O.useEffect(()=>{ce&&p&&!f&&J&&W.current.pulsate()},[f,p,ce,J]);function he(Be,Rt,ut=h){return Zi(Re=>(Rt&&Rt(Re),!ut&&W.current&&W.current[Be](Re),!0))}const pe=he("start",A),ve=he("stop",S),ye=he("stop",_),be=he("stop",M),me=he("stop",Be=>{ce&&Be.preventDefault(),R&&R(Be)}),xe=he("start",H),Je=he("stop",L),Xe=he("stop",B),at=he("stop",Be=>{re(Be),Y.current===!1&&se(!1),v&&v(Be)},!1),Lt=Zi(Be=>{V.current||(V.current=Be.currentTarget),Q(Be),Y.current===!0&&(se(!0),x&&x(Be)),b&&b(Be)}),Pe=()=>{const Be=V.current;return c&&c!=="button"&&!(Be.tagName==="A"&&Be.href)},Fe=O.useRef(!1),it=Zi(Be=>{p&&!Fe.current&&ce&&W.current&&Be.key===" "&&(Fe.current=!0,W.current.stop(Be,()=>{W.current.start(Be)})),Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&Be.preventDefault(),E&&E(Be),Be.target===Be.currentTarget&&Pe()&&Be.key==="Enter"&&!d&&(Be.preventDefault(),y&&y(Be))}),ht=Zi(Be=>{p&&Be.key===" "&&W.current&&ce&&!Be.defaultPrevented&&(Fe.current=!1,W.current.stop(Be,()=>{W.current.pulsate(Be)})),I&&I(Be),y&&Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&!Be.defaultPrevented&&y(Be)});let pt=c;pt==="button"&&(z.href||z.to)&&(pt=g);const _e={};pt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!z.href&&!z.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const ze=mr(n,ue,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:G,focusVisible:ce}),$e=ece(Ye);return C.jsxs(tce,$({as:pt,className:Ue($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Lt,onKeyDown:it,onKeyUp:ht,onMouseDown:pe,onMouseLeave:me,onMouseUp:be,onDragLeave:ye,onTouchEnd:Je,onTouchMove:Xe,onTouchStart:xe,ref:ze,tabIndex:d?-1:G,type:F},_e,z,{children:[s,le?C.jsx(Yue,$({ref:K,center:o},U)):null]}))}),Ld=nce;function rce(e){return _t("MuiIconButton",e)}const ice=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),oce=ice,sce=["edge","children","className","color","disabled","disableFocusRipple","size"],ace=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ke(r)}`,i&&`edge${ke(i)}`,`size${ke(o)}`]};return Ct(s,rce,t)},lce=Ee(Ld,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return $({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&$({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":$({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${oce.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),uce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,sce),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=ace(p);return C.jsx(lce,$({className:Ue(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),ip=uce;function cce(e){return _t("MuiTypography",e)}Tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const dce=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],fce=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${ke(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Ct(l,cce,s)},hce=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ke(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),JU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},pce={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},mce=e=>pce[e]||e,gce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTypography"}),i=mce(r.color),o=q3($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=JU}=o,v=Le(o,dce),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||JU[p])||"span",_=fce(y);return C.jsx(hce,$({as:S,ref:n,ownerState:y,className:Ue(_.root,l)},v))}),qt=gce;function vce(e){return _t("MuiAppBar",e)}Tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const yce=["className","color","enableColorOnDark","position"],xce=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ke(t)}`,`position${ke(n)}`]};return Ct(i,vce,r)},xw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,bce=Ee(Mg,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ke(n.position)}`],t[`color${ke(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:xw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:xw(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:xw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:xw(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),wce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,yce),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=xce(d);return C.jsx(bce,$({square:!0,component:"header",ownerState:d,elevation:4,className:Ue(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),_ce=wce;function Ml(e){return typeof e=="string"}function gx(e,t,n){return e===void 0||Ml(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function Sce(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const Ece={disableDefaultClasses:!1},Cce=O.createContext(Ece);function Tce(e){const{disableDefaultClasses:t}=O.useContext(Cce);return n=>t?"":e(n)}function ZS(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Ice(e,t,n){return typeof e=="function"?e(t,n):e}function QU(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Rce(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Ue(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=ZS($({},i,r)),l=QU(r),c=QU(i),d=t(s),f=Ue(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const Ace=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,Ace),l=o?{}:Ice(r,i),{props:c,internalRef:d}=Rce($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return gx(n,$({},c,{ref:f}),i)}function ZU(e){return e.substring(2).toLowerCase()}function Pce(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=Zi(v=>{const y=d.current;d.current=!1;const S=Rr(l.current);if(!c.current||!l.current||"clientX"in v&&Pce(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),O.useEffect(()=>{if(o!==!1){const v=ZU(o),y=Rr(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),O.useEffect(()=>{if(r!==!1){const v=ZU(r),y=Rr(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(O.Fragment,{children:O.cloneElement(t,g)})}const Mce=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function kce(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Dce(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Lce(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Dce(e))}function Bce(e){const t=[],n=[];return Array.from(e.querySelectorAll(Mce)).forEach((r,i)=>{const o=kce(r);o===-1||!Lce(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function Nce(){return!0}function $ce(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Bce,isEnabled:s=Nce,open:l}=e,c=O.useRef(!1),d=O.useRef(null),f=O.useRef(null),h=O.useRef(null),p=O.useRef(null),g=O.useRef(!1),v=O.useRef(null),y=mr(t.ref,v),S=O.useRef(null);O.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),O.useEffect(()=>{if(!l||!v.current)return;const x=Rr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),O.useEffect(()=>{if(!l||!v.current)return;const x=Rr(v.current),E=R=>{S.current=R,!(r||!s()||R.key!=="Tab")&&x.activeElement===v.current&&R.shiftKey&&(c.current=!0,f.current&&f.current.focus())},I=()=>{const R=v.current;if(R===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(R.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let M=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(M=o(v.current)),M.length>0){var L,B;const H=!!((L=S.current)!=null&&L.shiftKey&&((B=S.current)==null?void 0:B.key)==="Tab"),G=M[0],U=M[M.length-1];typeof G!="string"&&typeof U!="string"&&(H?U.focus():G.focus())}else R.focus()};x.addEventListener("focusin",I),x.addEventListener("keydown",E,!0);const A=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&I()},50);return()=>{clearInterval(A),x.removeEventListener("focusin",I),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(O.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var zo="top",aa="bottom",la="right",Uo="left",X5="auto",Sb=[zo,aa,la,Uo],tg="start",P1="end",Fce="clippingParents",rY="viewport",Ny="popper",zce="reference",e8=Sb.reduce(function(e,t){return e.concat([t+"-"+tg,t+"-"+P1])},[]),iY=[].concat(Sb,[X5]).reduce(function(e,t){return e.concat([t,t+"-"+tg,t+"-"+P1])},[]),Uce="beforeRead",jce="read",Hce="afterRead",Wce="beforeMain",Gce="main",Vce="afterMain",Xce="beforeWrite",qce="write",Yce="afterWrite",Kce=[Uce,jce,Hce,Wce,Gce,Vce,Xce,qce,Yce];function zl(e){return e?(e.nodeName||"").toLowerCase():null}function Ps(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function op(e){var t=Ps(e).Element;return e instanceof t||e instanceof Element}function ea(e){var t=Ps(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function q5(e){if(typeof ShadowRoot>"u")return!1;var t=Ps(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Jce(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ea(o)||!zl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Qce(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ea(i)||!zl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Zce={name:"applyStyles",enabled:!0,phase:"write",fn:Jce,effect:Qce,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var jh=Math.max,eE=Math.min,ng=Math.round;function w$(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function oY(){return!/^((?!chrome|android).)*safari/i.test(w$())}function rg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ea(e)&&(i=e.offsetWidth>0&&ng(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ng(r.height)/e.offsetHeight||1);var s=op(e)?Ps(e):window,l=s.visualViewport,c=!oY()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function Y5(e){var t=rg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function sY(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&q5(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function hc(e){return Ps(e).getComputedStyle(e)}function ede(e){return["table","td","th"].indexOf(zl(e))>=0}function Bd(e){return((op(e)?e.ownerDocument:e.document)||window.document).documentElement}function xT(e){return zl(e)==="html"?e:e.assignedSlot||e.parentNode||(q5(e)?e.host:null)||Bd(e)}function t8(e){return!ea(e)||hc(e).position==="fixed"?null:e.offsetParent}function tde(e){var t=/firefox/i.test(w$()),n=/Trident/i.test(w$());if(n&&ea(e)){var r=hc(e);if(r.position==="fixed")return null}var i=xT(e);for(q5(i)&&(i=i.host);ea(i)&&["html","body"].indexOf(zl(i))<0;){var o=hc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Eb(e){for(var t=Ps(e),n=t8(e);n&&ede(n)&&hc(n).position==="static";)n=t8(n);return n&&(zl(n)==="html"||zl(n)==="body"&&hc(n).position==="static")?t:n||tde(e)||t}function K5(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jx(e,t,n){return jh(e,eE(t,n))}function nde(e,t,n){var r=jx(e,t,n);return r>n?n:r}function aY(){return{top:0,right:0,bottom:0,left:0}}function lY(e){return Object.assign({},aY(),e)}function uY(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var rde=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,lY(typeof t!="number"?t:uY(t,Sb))};function ide(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=kl(n.placement),c=K5(l),d=[Uo,la].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=rde(i.padding,n),p=Y5(o),g=c==="y"?zo:Uo,v=c==="y"?aa:la,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=Eb(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],I=b-p[f]-h[v],A=b/2-p[f]/2+x,R=jx(E,A,I),M=c;n.modifiersData[r]=(t={},t[M]=R,t.centerOffset=R-A,t)}}function ode(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||sY(t.elements.popper,i)&&(t.elements.arrow=i))}const sde={name:"arrow",enabled:!0,phase:"main",fn:ide,effect:ode,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ig(e){return e.split("-")[1]}var ade={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lde(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ng(n*i)/i||0,y:ng(r*i)/i||0}}function n8(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Uo,E=zo,I=window;if(d){var A=Eb(n),R="clientHeight",M="clientWidth";if(A===Ps(n)&&(A=Bd(n),hc(A).position!=="static"&&l==="absolute"&&(R="scrollHeight",M="scrollWidth")),A=A,i===zo||(i===Uo||i===la)&&o===P1){E=aa;var L=h&&A===I&&I.visualViewport?I.visualViewport.height:A[R];y-=L-r.height,y*=c?1:-1}if(i===Uo||(i===zo||i===aa)&&o===P1){x=la;var B=h&&A===I&&I.visualViewport?I.visualViewport.width:A[M];g-=B-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&ade),G=f===!0?lde({x:g,y},Ps(n)):{x:g,y};if(g=G.x,y=G.y,c){var U;return Object.assign({},H,(U={},U[E]=b?"0":"",U[x]=_?"0":"",U.transform=(I.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",U))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function ude(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:kl(t.placement),variation:ig(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,n8(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,n8(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const cde={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ude,data:{}};var bw={passive:!0};function dde(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Ps(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,bw)}),l&&c.addEventListener("resize",n.update,bw),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,bw)}),l&&c.removeEventListener("resize",n.update,bw)}}const fde={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dde,data:{}};var hde={left:"right",right:"left",bottom:"top",top:"bottom"};function eS(e){return e.replace(/left|right|bottom|top/g,function(t){return hde[t]})}var pde={start:"end",end:"start"};function r8(e){return e.replace(/start|end/g,function(t){return pde[t]})}function J5(e){var t=Ps(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Q5(e){return rg(Bd(e)).left+J5(e).scrollLeft}function mde(e,t){var n=Ps(e),r=Bd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=oY();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Q5(e),y:c}}function gde(e){var t,n=Bd(e),r=J5(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=jh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Q5(e),c=-r.scrollTop;return hc(i||n).direction==="rtl"&&(l+=jh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Z5(e){var t=hc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function cY(e){return["html","body","#document"].indexOf(zl(e))>=0?e.ownerDocument.body:ea(e)&&Z5(e)?e:cY(xT(e))}function Hx(e,t){var n;t===void 0&&(t=[]);var r=cY(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ps(r),s=i?[o].concat(o.visualViewport||[],Z5(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(Hx(xT(s)))}function _$(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vde(e,t){var n=rg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function i8(e,t,n){return t===rY?_$(mde(e,n)):op(t)?vde(t,n):_$(gde(Bd(e)))}function yde(e){var t=Hx(xT(e)),n=["absolute","fixed"].indexOf(hc(e).position)>=0,r=n&&ea(e)?Eb(e):e;return op(r)?t.filter(function(i){return op(i)&&sY(i,r)&&zl(i)!=="body"}):[]}function xde(e,t,n,r){var i=t==="clippingParents"?yde(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=i8(e,d,r);return c.top=jh(f.top,c.top),c.right=eE(f.right,c.right),c.bottom=eE(f.bottom,c.bottom),c.left=jh(f.left,c.left),c},i8(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function dY(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?ig(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case zo:c={x:s,y:t.y-n.height};break;case aa:c={x:s,y:t.y+t.height};break;case la:c={x:t.x+t.width,y:l};break;case Uo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?K5(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case tg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case P1:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function O1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?Fce:l,d=n.rootBoundary,f=d===void 0?rY:d,h=n.elementContext,p=h===void 0?Ny:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=lY(typeof S!="number"?S:uY(S,Sb)),b=p===Ny?zce:Ny,x=e.rects.popper,E=e.elements[v?b:p],I=xde(op(E)?E:E.contextElement||Bd(e.elements.popper),c,f,s),A=rg(e.elements.reference),R=dY({reference:A,element:x,strategy:"absolute",placement:i}),M=_$(Object.assign({},x,R)),L=p===Ny?M:A,B={top:I.top-L.top+_.top,bottom:L.bottom-I.bottom+_.bottom,left:I.left-L.left+_.left,right:L.right-I.right+_.right},H=e.modifiersData.offset;if(p===Ny&&H){var G=H[i];Object.keys(B).forEach(function(U){var D=[la,aa].indexOf(U)>=0?1:-1,F=[zo,aa].indexOf(U)>=0?"y":"x";B[U]+=G[F]*D})}return B}function bde(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?iY:c,f=ig(r),h=f?l?e8:e8.filter(function(v){return ig(v)===f}):Sb,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=O1(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[kl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function wde(e){if(kl(e)===X5)return[];var t=eS(e);return[r8(e),t,r8(t)]}function _de(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=kl(S),b=_===S,x=c||(b||!v?[eS(S)]:wde(S)),E=[S].concat(x).reduce(function(ce,se){return ce.concat(kl(se)===X5?bde(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),I=t.rects.reference,A=t.rects.popper,R=new Map,M=!0,L=E[0],B=0;B=0,F=D?"width":"height",z=O1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?U?la:Uo:U?aa:zo;I[F]>A[F]&&(V=eS(V));var W=eS(V),K=[];if(o&&K.push(z[G]<=0),l&&K.push(z[V]<=0,z[W]<=0),K.every(function(ce){return ce})){L=H,M=!1;break}R.set(H,K)}if(M)for(var Y=v?3:1,Q=function(se){var J=E.find(function(ae){var le=R.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(J)return L=J,"break"},re=Y;re>0;re--){var ue=Q(re);if(ue==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const Sde={name:"flip",enabled:!0,phase:"main",fn:_de,requiresIfExists:["offset"],data:{_skip:!1}};function o8(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function s8(e){return[zo,la,aa,Uo].some(function(t){return e[t]>=0})}function Ede(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=O1(t,{elementContext:"reference"}),l=O1(t,{altBoundary:!0}),c=o8(s,r),d=o8(l,i,o),f=s8(c),h=s8(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Cde={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ede};function Tde(e,t,n){var r=kl(e),i=[Uo,zo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Uo,la].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Ide(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=iY.reduce(function(f,h){return f[h]=Tde(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const Rde={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ide};function Ade(e){var t=e.state,n=e.name;t.modifiersData[n]=dY({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Pde={name:"popperOffsets",enabled:!0,phase:"read",fn:Ade,data:{}};function Ode(e){return e==="x"?"y":"x"}function Mde(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=O1(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=kl(t.placement),b=ig(t.placement),x=!b,E=K5(_),I=Ode(E),A=t.modifiersData.popperOffsets,R=t.rects.reference,M=t.rects.popper,L=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,B=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(A){if(o){var U,D=E==="y"?zo:Uo,F=E==="y"?aa:la,z=E==="y"?"height":"width",V=A[E],W=V+S[D],K=V-S[F],Y=g?-M[z]/2:0,Q=b===tg?R[z]:M[z],re=b===tg?-M[z]:-R[z],ue=t.elements.arrow,ce=g&&ue?Y5(ue):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aY(),J=se[D],ae=se[F],le=jx(0,R[z],ce[z]),he=x?R[z]/2-Y-le-J-B.mainAxis:Q-le-J-B.mainAxis,pe=x?-R[z]/2+Y+le+ae+B.mainAxis:re+le+ae+B.mainAxis,ve=t.elements.arrow&&Eb(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,be=(U=H==null?void 0:H[E])!=null?U:0,me=V+he-be-ye,xe=V+pe-be,Je=jx(g?eE(W,me):W,V,g?jh(K,xe):K);A[E]=Je,G[E]=Je-V}if(l){var Xe,at=E==="x"?zo:Uo,Lt=E==="x"?aa:la,Pe=A[I],Fe=I==="y"?"height":"width",it=Pe+S[at],ht=Pe-S[Lt],pt=[zo,Uo].indexOf(_)!==-1,_e=(Xe=H==null?void 0:H[I])!=null?Xe:0,ze=pt?it:Pe-R[Fe]-M[Fe]-_e+B.altAxis,Ye=pt?Pe+R[Fe]+M[Fe]-_e-B.altAxis:ht,$e=g&&pt?nde(ze,Pe,Ye):jx(g?ze:it,Pe,g?Ye:ht);A[I]=$e,G[I]=$e-Pe}t.modifiersData[r]=G}}const kde={name:"preventOverflow",enabled:!0,phase:"main",fn:Mde,requiresIfExists:["offset"]};function Dde(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Lde(e){return e===Ps(e)||!ea(e)?J5(e):Dde(e)}function Bde(e){var t=e.getBoundingClientRect(),n=ng(t.width)/e.offsetWidth||1,r=ng(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Nde(e,t,n){n===void 0&&(n=!1);var r=ea(t),i=ea(t)&&Bde(t),o=Bd(t),s=rg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((zl(t)!=="body"||Z5(o))&&(l=Lde(t)),ea(t)?(c=rg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Q5(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function $de(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Fde(e){var t=$de(e);return Kce.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function zde(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ude(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var a8={placement:"bottom",modifiers:[],strategy:"absolute"};function l8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Gde(i)||document.body)},[i,o]),Eo(()=>{if(s&&!o)return bN(n,s),()=>{bN(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const d={ref:c};return O.cloneElement(r,d)}return C.jsx(O.Fragment,{children:r})}return C.jsx(O.Fragment,{children:s&&Og.createPortal(r,s)})});function Vde(e){return _t("MuiPopper",e)}Tt("MuiPopper",["root"]);const Xde=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],qde=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Yde(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function S$(e){return typeof e=="function"?e():e}function Kde(e){return e.nodeType!==void 0}const Jde=()=>Ct({root:["root"]},Tce(Vde)),Qde={},Zde=O.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,Xde),_=O.useRef(null),b=mr(_,n),x=O.useRef(null),E=mr(x,p),I=O.useRef(E);Eo(()=>{I.current=E},[E]),O.useImperativeHandle(p,()=>x.current,[]);const A=Yde(f,s),[R,M]=O.useState(A),[L,B]=O.useState(S$(i));O.useEffect(()=>{x.current&&x.current.forceUpdate()}),O.useEffect(()=>{i&&B(S$(i))},[i]),Eo(()=>{if(!L||!d)return;const F=W=>{M(W.placement)};let z=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{F(W)}}];c!=null&&(z=z.concat(c)),h&&h.modifiers!=null&&(z=z.concat(h.modifiers));const V=Wde(L,_.current,$({placement:A},h,{modifiers:z}));return I.current(V),()=>{V.destroy(),I.current(null)}},[L,l,c,d,h,A]);const H={placement:R};y!==null&&(H.TransitionProps=y);const G=Jde(),U=(r=v.root)!=null?r:"div",D=Wr({elementType:U,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:G.root});return C.jsx(U,$({},D,{children:typeof o=="function"?o(H):o}))}),efe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=Qde,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,qde),[x,E]=O.useState(!0),I=()=>{E(!1)},A=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let R;if(o)R=o;else if(r){const B=S$(r);R=B&&Kde(B)?Rr(B).body:Rr(null).body}const M=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:I,onExited:A}:void 0;return C.jsx(fY,{disablePortal:l,container:R,children:C.jsx(Zde,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:M},v),TransitionProps:L,children:i}))})});function tfe(e){const t=Rr(e);return t.body===e?lc(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Wx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u8(e){return parseInt(lc(e).getComputedStyle(e).paddingRight,10)||0}function nfe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function c8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!nfe(s);l&&c&&Wx(s,i)})}function pD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function rfe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(tfe(r)){const s=gV(Rr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${u8(r)+s}px`;const l=Rr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${u8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Rr(r).body;else{const s=r.parentElement,l=lc(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function ife(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class ofe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Wx(t.modalRef,!1);const i=ife(n);c8(n,t.mount,t.modalRef,i,!0);const o=pD(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=pD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=rfe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=pD(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Wx(t.modalRef,n),c8(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Wx(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function sfe(e){return typeof e=="function"?e():e}function afe(e){return e?e.props.hasOwnProperty("in"):!1}const lfe=new ofe;function ufe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=lfe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=O.useRef({}),g=O.useRef(null),v=O.useRef(null),y=mr(v,h),[S,_]=O.useState(!f),b=afe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Rr(g.current),I=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),A=()=>{i.mount(I(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=Zi(()=>{const z=sfe(t)||E().body;i.add(I(),z),v.current&&A()}),M=O.useCallback(()=>i.isTopModal(I()),[i]),L=Zi(z=>{g.current=z,z&&(f&&M()?A():v.current&&Wx(v.current,x))}),B=O.useCallback(()=>{i.remove(I(),x)},[x,i]);O.useEffect(()=>()=>{B()},[B]),O.useEffect(()=>{f?R():(!b||!o)&&B()},[f,B,b,o,R]);const H=z=>V=>{var W;(W=z.onKeyDown)==null||W.call(z,V),!(V.key!=="Escape"||!M())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},G=z=>V=>{var W;(W=z.onClick)==null||W.call(z,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(z={})=>{const V=ZS(e);delete V.onTransitionEnter,delete V.onTransitionExited;const W=$({},V,z);return $({role:"presentation"},W,{onKeyDown:H(W),ref:y})},getBackdropProps:(z={})=>{const V=z;return $({"aria-hidden":!0},V,{onClick:G(V),open:f})},getTransitionProps:()=>{const z=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&B()};return{onEnter:d6(z,c==null?void 0:c.props.onEnter),onExited:d6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:M,exited:S,hasTransition:b}}const cfe=2;function hY(e,t){return e-t}function $y(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function d8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},mfe=e=>e;let Ew;function mD(){return Ew===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ew=CSS.supports("touch-action","none"):Ew=!0),Ew}function gfe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=mfe,step:y=1,tabIndex:S,value:_}=e,b=O.useRef(),[x,E]=O.useState(-1),[I,A]=O.useState(-1),[R,M]=O.useState(!1),L=O.useRef(0),[B,H]=u1({controlled:_,default:n??c,name:"Slider"}),G=f&&((_e,ze,Ye)=>{const $e=_e.nativeEvent||_e,Be=new $e.constructor($e.type,$e);Object.defineProperty(Be,"target",{writable:!0,value:{value:ze,name:d}}),f(Be,ze,Ye)}),U=Array.isArray(B);let D=U?B.slice().sort(hY):[B];D=D.map(_e=>$y(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,ze)=>({value:c+y*ze})):s||[],z=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:W,onFocus:K,ref:Y}=M3(),[Q,re]=O.useState(-1),ue=O.useRef(),ce=mr(Y,ue),se=mr(g,ce),J=_e=>ze=>{var Ye;const $e=Number(ze.currentTarget.getAttribute("data-index"));K(ze),V.current===!0&&re($e),A($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,ze)},ae=_e=>ze=>{var Ye;W(ze),V.current===!1&&re(-1),A(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,ze)};Eo(()=>{if(r&&ue.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&Q!==-1&&re(-1);const le=_e=>ze=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,ze);const $e=Number(ze.currentTarget.getAttribute("data-index")),Be=D[$e],Rt=z.indexOf(Be);let ut=ze.target.valueAsNumber;if(F&&y==null){const Re=z[z.length-1];ut>Re?ut=Re:ut{const{current:Ye}=ue,{width:$e,height:Be,bottom:Rt,left:ut}=Ye.getBoundingClientRect();let Re;pe.indexOf("vertical")===0?Re=(Rt-_e.y)/Be:Re=(_e.x-ut)/$e,pe.indexOf("-reverse")!==-1&&(Re=1-Re);let ot;if(ot=dfe(Re,c,l),y)ot=hfe(ot,y,c);else{const Ae=d8(z,ot);ot=z[Ae]}ot=$y(ot,c,l);let Bt=0;if(U){ze?Bt=he.current:Bt=d8(D,ot),i&&(ot=$y(ot,D[Bt-1]||-1/0,D[Bt+1]||1/0));const Ae=ot;ot=f8({values:D,newValue:ot,index:Bt}),i&&ze||(Bt=ot.indexOf(Ae),he.current=Bt)}return{newValue:ot,activeIndex:Bt}},ye=Zi(_e=>{const ze=ww(_e,b);if(!ze)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){be(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:ze,move:!0});_w({sliderRef:ue,activeIndex:$e,setActive:E}),H(Ye),!R&&L.current>cfe&&M(!0),G&&!Sw(Ye,B)&&G(_e,Ye,$e)}),be=Zi(_e=>{const ze=ww(_e,b);if(M(!1),!ze)return;const{newValue:Ye}=ve({finger:ze,move:!0});E(-1),_e.type==="touchend"&&A(-1),h&&h(_e,Ye),b.current=void 0,xe()}),me=Zi(_e=>{if(r)return;mD()||_e.preventDefault();const ze=_e.changedTouches[0];ze!=null&&(b.current=ze.identifier);const Ye=ww(_e,b);if(Ye!==!1){const{newValue:Be,activeIndex:Rt}=ve({finger:Ye});_w({sliderRef:ue,activeIndex:Rt,setActive:E}),H(Be),G&&!Sw(Be,B)&&G(_e,Be,Rt)}L.current=0;const $e=Rr(ue.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",be)}),xe=O.useCallback(()=>{const _e=Rr(ue.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",be),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",be)},[be,ye]);O.useEffect(()=>{const{current:_e}=ue;return _e.addEventListener("touchstart",me,{passive:mD()}),()=>{_e.removeEventListener("touchstart",me,{passive:mD()}),xe()}},[xe,me]),O.useEffect(()=>{r&&xe()},[r,xe]);const Je=_e=>ze=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,ze),r||ze.defaultPrevented||ze.button!==0)return;ze.preventDefault();const $e=ww(ze,b);if($e!==!1){const{newValue:Rt,activeIndex:ut}=ve({finger:$e});_w({sliderRef:ue,activeIndex:ut,setActive:E}),H(Rt),G&&!Sw(Rt,B)&&G(ze,Rt,ut)}L.current=0;const Be=Rr(ue.current);Be.addEventListener("mousemove",ye),Be.addEventListener("mouseup",be)},Xe=tE(U?D[0]:c,c,l),at=tE(D[D.length-1],c,l)-Xe,Lt=(_e={})=>{const ze={onMouseDown:Je(_e||{})},Ye=$({},_e,ze);return $({ref:se},Ye)},Pe=_e=>ze=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,ze);const $e=Number(ze.currentTarget.getAttribute("data-index"));A($e)},Fe=_e=>ze=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,ze),A(-1)};return{active:x,axis:pe,axisProps:pfe,dragging:R,focusedThumbIndex:Q,getHiddenInputProps:(_e={})=>{var ze;const Ye={onChange:le(_e||{}),onFocus:J(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(ze=e.step)!=null?ze:void 0,disabled:r},$e,{style:$({},Xre,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Lt,getThumbProps:(_e={})=>{const ze={onMouseOver:Pe(_e||{}),onMouseLeave:Fe(_e||{})};return $({},_e,ze)},marks:F,open:I,range:U,rootRef:se,trackLeap:at,trackOffset:Xe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function vfe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=O.useRef();O.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=Zi((_,b)=>{r==null||r(_,b)}),c=Zi(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});O.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=O.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},ZS(e),ZS(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const yfe=["onChange","maxRows","minRows","style","value"];function Cw(e){return parseInt(e,10)||0}const xfe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function h8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const bfe=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,yfe),{current:d}=O.useRef(l!=null),f=O.useRef(null),h=mr(n,f),p=O.useRef(null),g=O.useRef(0),[v,y]=O.useState({outerHeightStyle:0}),S=O.useCallback(()=>{const E=f.current,A=lc(E).getComputedStyle(E);if(A.width==="0px")return{outerHeightStyle:0};const R=p.current;R.style.width=A.width,R.value=E.value||t.placeholder||"x",R.value.slice(-1)===` -`&&(R.value+=" ");const M=A.boxSizing,L=Cw(A.paddingBottom)+Cw(A.paddingTop),B=Cw(A.borderBottomWidth)+Cw(A.borderTopWidth),H=R.scrollHeight;R.value="x";const G=R.scrollHeight;let U=H;o&&(U=Math.max(Number(o)*G,U)),i&&(U=Math.min(Number(i)*G,U)),U=Math.max(U,G);const D=U+(M==="border-box"?L+B:0),F=Math.abs(U-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),_=(E,I)=>{const{outerHeightStyle:A,overflow:R}=I;return g.current<20&&(A>0&&Math.abs((E.outerHeightStyle||0)-A)>1||E.overflow!==R)?(g.current+=1,{overflow:R,outerHeightStyle:A}):E},b=O.useCallback(()=>{const E=S();h8(E)||y(I=>_(I,E))},[S]);Eo(()=>{const E=()=>{const H=S();h8(H)||Og.flushSync(()=>{y(G=>_(G,H))})},I=()=>{g.current=0,E()};let A;const R=vC(I),M=f.current,L=lc(M);L.addEventListener("resize",R);let B;return typeof ResizeObserver<"u"&&(B=new ResizeObserver(I),B.observe(M)),()=>{R.clear(),cancelAnimationFrame(A),L.removeEventListener("resize",R),B&&B.disconnect()}},[S]),Eo(()=>{b()}),O.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(O.Fragment,{children:[C.jsx("textarea",$({value:l,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},c)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},xfe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),wfe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],_fe=Ee(efe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Sfe=O.forwardRef(function(t,n){var r;const i=jC(),o=It({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,I=Le(o,wfe),A=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,R=$({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},I);return C.jsx(_fe,$({as:l,direction:i==null?void 0:i.direction,slots:{root:A},slotProps:E??d},R,{ref:n}))}),pY=Sfe;function Efe(e){return _t("MuiListSubheader",e)}Tt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Cfe=["className","color","component","disableGutters","disableSticky","inset"],Tfe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${ke(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Ct(s,Efe,t)},Ife=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>$({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),mY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,Cfe),h=$({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=Tfe(h);return C.jsx(Ife,$({as:s,className:Ue(p.root,i),ref:n,ownerState:h},f))});mY.muiSkipListHighlight=!0;const Rfe=mY;function yp({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const Afe=O.createContext(void 0),e4=Afe;function Nd(){return O.useContext(e4)}function gY(e){return C.jsx(tse,$({},e,{defaultTheme:GC,themeId:Kh}))}function p8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function nE(e,t=!1){return e&&(p8(e.value)&&e.value!==""||t&&p8(e.defaultValue)&&e.defaultValue!=="")}function Pfe(e){return e.startAdornment}function Ofe(e){return _t("MuiInputBase",e)}const Mfe=Tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),og=Mfe,kfe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],bT=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ke(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},wT=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Dfe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${ke(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${ke(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return Ct(y,Ofe,t)},_T=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:bT})(({theme:e,ownerState:t})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${og.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&$({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),ST=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=$({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${og.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${og.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),Lfe=C.jsx(gY,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Bfe=O.forwardRef(function(t,n){var r;const i=It({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:I,multiline:A=!1,name:R,onBlur:M,onChange:L,onClick:B,onFocus:H,onKeyDown:G,onKeyUp:U,placeholder:D,readOnly:F,renderSuffix:z,rows:V,slotProps:W={},slots:K={},startAdornment:Y,type:Q="text",value:re}=i,ue=Le(i,kfe),ce=b.value!=null?b.value:re,{current:se}=O.useRef(ce!=null),J=O.useRef(),ae=O.useCallback($e=>{},[]),le=mr(J,x,b.ref,ae),[he,pe]=O.useState(!1),ve=Nd(),ye=yp({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,O.useEffect(()=>{!ve&&p&&he&&(pe(!1),M&&M())},[ve,p,he,M]);const be=ve&&ve.onFilled,me=ve&&ve.onEmpty,xe=O.useCallback($e=>{nE($e)?be&&be():me&&me()},[be,me]);Eo(()=>{se&&xe({value:ce})},[ce,xe,se]);const Je=$e=>{if(ye.disabled){$e.stopPropagation();return}H&&H($e),b.onFocus&&b.onFocus($e),ve&&ve.onFocus?ve.onFocus($e):pe(!0)},Xe=$e=>{M&&M($e),b.onBlur&&b.onBlur($e),ve&&ve.onBlur?ve.onBlur($e):pe(!1)},at=($e,...Be)=>{if(!se){const Rt=$e.target||J.current;if(Rt==null)throw new Error(wd(1));xe({value:Rt.value})}b.onChange&&b.onChange($e,...Be),L&&L($e,...Be)};O.useEffect(()=>{xe(J.current)},[]);const Lt=$e=>{J.current&&$e.currentTarget===$e.target&&J.current.focus(),B&&B($e)};let Pe=_,Fe=b;A&&Pe==="input"&&(V?Fe=$({type:void 0,minRows:V,maxRows:V},Fe):Fe=$({type:void 0,maxRows:E,minRows:I},Fe),Pe=bfe);const it=$e=>{xe($e.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};O.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const ht=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:A,size:ye.size,startAdornment:Y,type:Q}),pt=Dfe(ht),_e=K.root||d.Root||_T,ze=W.root||f.root||{},Ye=K.input||d.Input||ST;return Fe=$({},Fe,(r=W.input)!=null?r:f.input),C.jsxs(O.Fragment,{children:[!g&&Lfe,C.jsxs(_e,$({},ze,!Ml(_e)&&{ownerState:$({},ht,ze.ownerState)},{ref:n,onClick:Lt},ue,{className:Ue(pt.root,ze.className,c,F&&"MuiInputBase-readOnly"),children:[Y,C.jsx(e4.Provider,{value:null,children:C.jsx(Ye,$({ownerState:ht,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:R,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ce,onKeyDown:G,onKeyUp:U,type:Q},Fe,!Ml(Ye)&&{as:Pe,ownerState:$({},ht,Fe.ownerState)},{ref:le,className:Ue(pt.input,Fe.className,F&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:at,onFocus:Je}))}),v,z?z($({},ye,{startAdornment:Y})):null]}))]})}),ET=Bfe;function Nfe(e){return _t("MuiInput",e)}const $fe=$({},og,Tt("MuiInput",["root","underline","input"])),Fy=$fe;function Ffe(e){return _t("MuiOutlinedInput",e)}const zfe=$({},og,Tt("MuiOutlinedInput",["root","notchedOutline","input"])),Ac=zfe;function Ufe(e){return _t("MuiFilledInput",e)}const jfe=$({},og,Tt("MuiFilledInput",["root","underline","input"])),ah=jfe,Hfe=$t(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Wfe=$t(C.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Gfe(e){return _t("MuiAvatar",e)}Tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Vfe=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Xfe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ct({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Gfe,t)},qfe=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Yfe=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Kfe=Ee(Wfe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Jfe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=O.useState(!1);return O.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const l=new Image;return l.onload=()=>{s&&o("loaded")},l.onerror=()=>{s&&o("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const Qfe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,Vfe);let v=null;const y=Jfe($({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=$({},r,{colorDefault:!_,component:l,variant:p}),x=Xfe(b);return _?v=C.jsx(Yfe,$({alt:i,srcSet:h,src:f,sizes:d,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Kfe,{ownerState:b,className:x.fallback}),C.jsx(qfe,$({as:l,ownerState:b,className:Ue(x.root,s),ref:n},g,{children:v}))}),vY=Qfe,Zfe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ehe={entering:{opacity:1},entered:{opacity:1}},the=O.forwardRef(function(t,n){const r=Pn(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=W5}=t,x=Le(t,Zfe),E=O.useRef(null),I=mr(E,l.ref,n),A=D=>F=>{if(D){const z=E.current;F===void 0?D(z):D(z,F)}},R=A(p),M=A((D,F)=>{tY(D);const z=eg({style:S,timeout:_,easing:c},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",z),D.style.transition=r.transitions.create("opacity",z),f&&f(D,F)}),L=A(h),B=A(y),H=A(D=>{const F=eg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),G=A(v),U=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:d,nodeRef:E,onEnter:M,onEntered:L,onEntering:R,onExit:H,onExited:G,onExiting:B,addEndListener:U,timeout:_},x,{children:(D,F)=>O.cloneElement(l,$({style:$({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},ehe[D],S,l.props.style),ref:I},F))}))}),sp=the;function nhe(e){return _t("MuiBackdrop",e)}Tt("MuiBackdrop",["root","invisible"]);const rhe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ihe=e=>{const{classes:t,invisible:n}=e;return Ct({root:["root",n&&"invisible"]},nhe,t)},ohe=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),she=O.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=sp,transitionDuration:_}=s,b=Le(s,rhe),x=$({},s,{component:d,invisible:p}),E=ihe(x),I=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:_},b,{children:C.jsx(ohe,$({"aria-hidden":!0},I,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:Ue(E.root,c,I==null?void 0:I.className),ownerState:$({},x,I==null?void 0:I.ownerState),classes:E,ref:n,children:l}))}))}),yY=she,ahe=K3(),lhe=ose({themeId:Kh,defaultTheme:ahe,defaultClassName:"MuiBox-root",generateClassName:yV.generate}),Pt=lhe;function uhe(e){return _t("MuiButton",e)}const che=Tt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Tw=che,dhe=O.createContext({}),fhe=dhe,hhe=O.createContext(void 0),phe=hhe,mhe=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ghe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,l={root:["root",o,`${o}${ke(t)}`,`size${ke(i)}`,`${o}Size${ke(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${ke(i)}`],endIcon:["endIcon",`iconSize${ke(i)}`]},c=Ct(l,uhe,s);return $({},s,c)},xY=e=>$({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),vhe=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Tw.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Tw.disabled}`]:$({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Rn(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Tw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Tw.disabled}`]:{boxShadow:"none"}}),yhe=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},xY(e))),xhe=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},xY(e))),bhe=O.forwardRef(function(t,n){const r=O.useContext(fhe),i=O.useContext(phe),o=k3(r,t),s=It({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,I=Le(s,mhe),A=$({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),R=ghe(A),M=b&&C.jsx(yhe,{className:R.startIcon,ownerState:A,children:b}),L=v&&C.jsx(xhe,{className:R.endIcon,ownerState:A,children:v}),B=i||"";return C.jsxs(vhe,$({ownerState:A,className:Ue(r.className,R.root,f,B),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Ue(R.focusVisible,y),ref:n,type:x},I,{classes:R,children:[M,l,L]}))}),pc=bhe;function whe(e){return _t("MuiCard",e)}Tt("MuiCard",["root"]);const _he=["className","raised"],She=e=>{const{classes:t}=e;return Ct({root:["root"]},whe,t)},Ehe=Ee(Mg,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Che=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,_he),l=$({},r,{raised:o}),c=She(l);return C.jsx(Ehe,$({className:Ue(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),The=Che;function Ihe(e){return _t("PrivateSwitchBase",e)}Tt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Rhe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ahe=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${ke(i)}`],input:["input"]};return Ct(o,Ihe,t)},Phe=Ee(Ld)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Ohe=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Mhe=O.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:d=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:_,onFocus:b,readOnly:x,required:E=!1,tabIndex:I,type:A,value:R}=t,M=Le(t,Rhe),[L,B]=u1({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),H=Nd(),G=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},U=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},D=K=>{if(K.nativeEvent.defaultPrevented)return;const Y=K.target.checked;B(Y),_&&_(K,Y)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const z=A==="checkbox"||A==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:d,edge:f}),W=Ahe(V);return C.jsxs(Phe,$({component:"span",className:Ue(W.root,s),centerRipple:!0,focusRipple:!d,disabled:F,tabIndex:null,role:void 0,onFocus:G,onBlur:U,ownerState:V,ref:n},M,{children:[C.jsx(Ohe,$({autoFocus:r,checked:i,defaultChecked:l,className:W.input,disabled:F,id:z?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:I,type:A},A==="checkbox"&&R===void 0?{}:{value:R},g)),L?o:h]}))}),bY=Mhe,khe=$t(C.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Dhe=$t(C.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Lhe=$t(C.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Bhe(e){return _t("MuiCheckbox",e)}const Nhe=Tt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),gD=Nhe,$he=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Fhe=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${ke(r)}`,`size${ke(i)}`]},s=Ct(o,Bhe,t);return $({},t,s)},zhe=Ee(bY,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,n.color!=="default"&&t[`color${ke(n.color)}`]]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${gD.checked}, &.${gD.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${gD.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Uhe=C.jsx(Dhe,{}),jhe=C.jsx(khe,{}),Hhe=C.jsx(Lhe,{}),Whe=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiCheckbox"}),{checkedIcon:s=Uhe,color:l="primary",icon:c=jhe,indeterminate:d=!1,indeterminateIcon:f=Hhe,inputProps:h,size:p="medium",className:g}=o,v=Le(o,$he),y=d?f:c,S=d?f:s,_=$({},o,{color:l,indeterminate:d,size:p}),b=Fhe(_);return C.jsx(zhe,$({type:"checkbox",inputProps:$({"data-indeterminate":d},h),icon:O.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:O.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:Ue(b.root,g)},v,{classes:b}))}),Ghe=Whe;function Vhe(e){return _t("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Xhe=["className","color","disableShrink","size","style","thickness","value","variant"];let CT=e=>e,m8,g8,v8,y8;const Pc=44,qhe=Od(m8||(m8=CT` +`),Us.rippleVisible,Wue,b$,({theme:e})=>e.transitions.easing.easeInOut,Us.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Us.child,Us.childLeaving,Gue,b$,({theme:e})=>e.transitions.easing.easeInOut,Us.childPulsate,Vue,({theme:e})=>e.transitions.easing.easeInOut),Yue=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,jue),[c,d]=O.useState([]),f=O.useRef(0),h=O.useRef(null);O.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=O.useRef(!1),g=O.useRef(0),v=O.useRef(null),y=O.useRef(null);O.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=O.useCallback(E=>{const{pulsate:I,rippleX:A,rippleY:R,rippleSize:M,cb:L}=E;d(B=>[...B,C.jsx(que,{classes:{ripple:Ue(o.ripple,Us.ripple),rippleVisible:Ue(o.rippleVisible,Us.rippleVisible),ripplePulsate:Ue(o.ripplePulsate,Us.ripplePulsate),child:Ue(o.child,Us.child),childLeaving:Ue(o.childLeaving,Us.childLeaving),childPulsate:Ue(o.childPulsate,Us.childPulsate)},timeout:b$,pulsate:I,rippleX:A,rippleY:R,rippleSize:M},f.current)]),f.current+=1,h.current=L},[o]),_=O.useCallback((E={},I={},A=()=>{})=>{const{pulsate:R=!1,center:M=i||I.pulsate,fakeElement:L=!1}=I;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const B=L?null:y.current,H=B?B.getBoundingClientRect():{width:0,height:0,left:0,top:0};let G,U,D;if(M||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)G=Math.round(H.width/2),U=Math.round(H.height/2);else{const{clientX:F,clientY:z}=E.touches&&E.touches.length>0?E.touches[0]:E;G=Math.round(F-H.left),U=Math.round(z-H.top)}if(M)D=Math.sqrt((2*H.width**2+H.height**2)/3),D%2===0&&(D+=1);else{const F=Math.max(Math.abs((B?B.clientWidth:0)-G),G)*2+2,z=Math.max(Math.abs((B?B.clientHeight:0)-U),U)*2+2;D=Math.sqrt(F**2+z**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:R,rippleX:G,rippleY:U,rippleSize:D,cb:A})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},Hue)):S({pulsate:R,rippleX:G,rippleY:U,rippleSize:D,cb:A})},[i,S]),b=O.useCallback(()=>{_({},{pulsate:!0})},[_]),x=O.useCallback((E,I)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,I)});return}v.current=null,d(A=>A.length>0?A.slice(1):A),h.current=I},[]);return O.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Xue,$({className:Ue(Us.root,o.root,s),ref:y},l,{children:C.jsx(Rue,{component:null,exit:!0,children:c})}))}),Kue=Yue;function Jue(e){return _t("MuiButtonBase",e)}const Que=Tt("MuiButtonBase",["root","disabled","focusVisible"]),Zue=Que,ece=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],tce=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Ct({root:["root",t&&"disabled",n&&"focusVisible"]},Jue,i);return n&&r&&(s.root+=` ${r}`),s},nce=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Zue.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),rce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:I,onMouseDown:A,onMouseLeave:R,onMouseUp:M,onTouchEnd:L,onTouchMove:B,onTouchStart:H,tabIndex:G=0,TouchRippleProps:U,touchRippleRef:D,type:F}=r,z=Le(r,ece),V=O.useRef(null),W=O.useRef(null),K=mr(W,D),{isFocusVisibleRef:Y,onFocus:Q,onBlur:re,ref:ue}=M3(),[ce,se]=O.useState(!1);d&&ce&&se(!1),O.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[J,ae]=O.useState(!1);O.useEffect(()=>{ae(!0)},[]);const le=J&&!f&&!d;O.useEffect(()=>{ce&&p&&!f&&J&&W.current.pulsate()},[f,p,ce,J]);function he(Be,Rt,ut=h){return Zi(Re=>(Rt&&Rt(Re),!ut&&W.current&&W.current[Be](Re),!0))}const pe=he("start",A),ve=he("stop",S),ye=he("stop",_),be=he("stop",M),me=he("stop",Be=>{ce&&Be.preventDefault(),R&&R(Be)}),xe=he("start",H),Je=he("stop",L),Xe=he("stop",B),at=he("stop",Be=>{re(Be),Y.current===!1&&se(!1),v&&v(Be)},!1),Lt=Zi(Be=>{V.current||(V.current=Be.currentTarget),Q(Be),Y.current===!0&&(se(!0),x&&x(Be)),b&&b(Be)}),Pe=()=>{const Be=V.current;return c&&c!=="button"&&!(Be.tagName==="A"&&Be.href)},Fe=O.useRef(!1),it=Zi(Be=>{p&&!Fe.current&&ce&&W.current&&Be.key===" "&&(Fe.current=!0,W.current.stop(Be,()=>{W.current.start(Be)})),Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&Be.preventDefault(),E&&E(Be),Be.target===Be.currentTarget&&Pe()&&Be.key==="Enter"&&!d&&(Be.preventDefault(),y&&y(Be))}),ht=Zi(Be=>{p&&Be.key===" "&&W.current&&ce&&!Be.defaultPrevented&&(Fe.current=!1,W.current.stop(Be,()=>{W.current.pulsate(Be)})),I&&I(Be),y&&Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&!Be.defaultPrevented&&y(Be)});let pt=c;pt==="button"&&(z.href||z.to)&&(pt=g);const _e={};pt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!z.href&&!z.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const ze=mr(n,ue,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:G,focusVisible:ce}),$e=tce(Ye);return C.jsxs(nce,$({as:pt,className:Ue($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Lt,onKeyDown:it,onKeyUp:ht,onMouseDown:pe,onMouseLeave:me,onMouseUp:be,onDragLeave:ye,onTouchEnd:Je,onTouchMove:Xe,onTouchStart:xe,ref:ze,tabIndex:d?-1:G,type:F},_e,z,{children:[s,le?C.jsx(Kue,$({ref:K,center:o},U)):null]}))}),Ld=rce;function ice(e){return _t("MuiIconButton",e)}const oce=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),sce=oce,ace=["edge","children","className","color","disabled","disableFocusRipple","size"],lce=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ke(r)}`,i&&`edge${ke(i)}`,`size${ke(o)}`]};return Ct(s,ice,t)},uce=Ee(Ld,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return $({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&$({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":$({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${sce.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),cce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,ace),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=lce(p);return C.jsx(uce,$({className:Ue(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),ip=cce;function dce(e){return _t("MuiTypography",e)}Tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const fce=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],hce=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${ke(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Ct(l,dce,s)},pce=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ke(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),JU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mce={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},gce=e=>mce[e]||e,vce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTypography"}),i=gce(r.color),o=q3($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=JU}=o,v=Le(o,fce),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||JU[p])||"span",_=hce(y);return C.jsx(pce,$({as:S,ref:n,ownerState:y,className:Ue(_.root,l)},v))}),qt=vce;function yce(e){return _t("MuiAppBar",e)}Tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const xce=["className","color","enableColorOnDark","position"],bce=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ke(t)}`,`position${ke(n)}`]};return Ct(i,yce,r)},xw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,wce=Ee(Mg,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ke(n.position)}`],t[`color${ke(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:xw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:xw(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:xw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:xw(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),_ce=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,xce),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=bce(d);return C.jsx(wce,$({square:!0,component:"header",ownerState:d,elevation:4,className:Ue(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),Sce=_ce;function Ml(e){return typeof e=="string"}function gx(e,t,n){return e===void 0||Ml(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function Ece(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const Cce={disableDefaultClasses:!1},Tce=O.createContext(Cce);function Ice(e){const{disableDefaultClasses:t}=O.useContext(Tce);return n=>t?"":e(n)}function ZS(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Rce(e,t,n){return typeof e=="function"?e(t,n):e}function QU(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Ace(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Ue(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=ZS($({},i,r)),l=QU(r),c=QU(i),d=t(s),f=Ue(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const Pce=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,Pce),l=o?{}:Rce(r,i),{props:c,internalRef:d}=Ace($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return gx(n,$({},c,{ref:f}),i)}function ZU(e){return e.substring(2).toLowerCase()}function Oce(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=Zi(v=>{const y=d.current;d.current=!1;const S=Rr(l.current);if(!c.current||!l.current||"clientX"in v&&Oce(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),O.useEffect(()=>{if(o!==!1){const v=ZU(o),y=Rr(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),O.useEffect(()=>{if(r!==!1){const v=ZU(r),y=Rr(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(O.Fragment,{children:O.cloneElement(t,g)})}const kce=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Dce(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Lce(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Bce(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Lce(e))}function Nce(e){const t=[],n=[];return Array.from(e.querySelectorAll(kce)).forEach((r,i)=>{const o=Dce(r);o===-1||!Bce(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function $ce(){return!0}function Fce(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Nce,isEnabled:s=$ce,open:l}=e,c=O.useRef(!1),d=O.useRef(null),f=O.useRef(null),h=O.useRef(null),p=O.useRef(null),g=O.useRef(!1),v=O.useRef(null),y=mr(t.ref,v),S=O.useRef(null);O.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),O.useEffect(()=>{if(!l||!v.current)return;const x=Rr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),O.useEffect(()=>{if(!l||!v.current)return;const x=Rr(v.current),E=R=>{S.current=R,!(r||!s()||R.key!=="Tab")&&x.activeElement===v.current&&R.shiftKey&&(c.current=!0,f.current&&f.current.focus())},I=()=>{const R=v.current;if(R===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(R.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let M=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(M=o(v.current)),M.length>0){var L,B;const H=!!((L=S.current)!=null&&L.shiftKey&&((B=S.current)==null?void 0:B.key)==="Tab"),G=M[0],U=M[M.length-1];typeof G!="string"&&typeof U!="string"&&(H?U.focus():G.focus())}else R.focus()};x.addEventListener("focusin",I),x.addEventListener("keydown",E,!0);const A=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&I()},50);return()=>{clearInterval(A),x.removeEventListener("focusin",I),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(O.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var zo="top",aa="bottom",la="right",Uo="left",X5="auto",Sb=[zo,aa,la,Uo],tg="start",P1="end",zce="clippingParents",rY="viewport",Ny="popper",Uce="reference",e8=Sb.reduce(function(e,t){return e.concat([t+"-"+tg,t+"-"+P1])},[]),iY=[].concat(Sb,[X5]).reduce(function(e,t){return e.concat([t,t+"-"+tg,t+"-"+P1])},[]),jce="beforeRead",Hce="read",Wce="afterRead",Gce="beforeMain",Vce="main",Xce="afterMain",qce="beforeWrite",Yce="write",Kce="afterWrite",Jce=[jce,Hce,Wce,Gce,Vce,Xce,qce,Yce,Kce];function zl(e){return e?(e.nodeName||"").toLowerCase():null}function Ps(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function op(e){var t=Ps(e).Element;return e instanceof t||e instanceof Element}function ea(e){var t=Ps(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function q5(e){if(typeof ShadowRoot>"u")return!1;var t=Ps(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qce(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ea(o)||!zl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Zce(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ea(i)||!zl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const ede={name:"applyStyles",enabled:!0,phase:"write",fn:Qce,effect:Zce,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var jh=Math.max,eE=Math.min,ng=Math.round;function w$(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function oY(){return!/^((?!chrome|android).)*safari/i.test(w$())}function rg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ea(e)&&(i=e.offsetWidth>0&&ng(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ng(r.height)/e.offsetHeight||1);var s=op(e)?Ps(e):window,l=s.visualViewport,c=!oY()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function Y5(e){var t=rg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function sY(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&q5(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function hc(e){return Ps(e).getComputedStyle(e)}function tde(e){return["table","td","th"].indexOf(zl(e))>=0}function Bd(e){return((op(e)?e.ownerDocument:e.document)||window.document).documentElement}function xT(e){return zl(e)==="html"?e:e.assignedSlot||e.parentNode||(q5(e)?e.host:null)||Bd(e)}function t8(e){return!ea(e)||hc(e).position==="fixed"?null:e.offsetParent}function nde(e){var t=/firefox/i.test(w$()),n=/Trident/i.test(w$());if(n&&ea(e)){var r=hc(e);if(r.position==="fixed")return null}var i=xT(e);for(q5(i)&&(i=i.host);ea(i)&&["html","body"].indexOf(zl(i))<0;){var o=hc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Eb(e){for(var t=Ps(e),n=t8(e);n&&tde(n)&&hc(n).position==="static";)n=t8(n);return n&&(zl(n)==="html"||zl(n)==="body"&&hc(n).position==="static")?t:n||nde(e)||t}function K5(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jx(e,t,n){return jh(e,eE(t,n))}function rde(e,t,n){var r=jx(e,t,n);return r>n?n:r}function aY(){return{top:0,right:0,bottom:0,left:0}}function lY(e){return Object.assign({},aY(),e)}function uY(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ide=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,lY(typeof t!="number"?t:uY(t,Sb))};function ode(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=kl(n.placement),c=K5(l),d=[Uo,la].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=ide(i.padding,n),p=Y5(o),g=c==="y"?zo:Uo,v=c==="y"?aa:la,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=Eb(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],I=b-p[f]-h[v],A=b/2-p[f]/2+x,R=jx(E,A,I),M=c;n.modifiersData[r]=(t={},t[M]=R,t.centerOffset=R-A,t)}}function sde(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||sY(t.elements.popper,i)&&(t.elements.arrow=i))}const ade={name:"arrow",enabled:!0,phase:"main",fn:ode,effect:sde,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ig(e){return e.split("-")[1]}var lde={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ude(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ng(n*i)/i||0,y:ng(r*i)/i||0}}function n8(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Uo,E=zo,I=window;if(d){var A=Eb(n),R="clientHeight",M="clientWidth";if(A===Ps(n)&&(A=Bd(n),hc(A).position!=="static"&&l==="absolute"&&(R="scrollHeight",M="scrollWidth")),A=A,i===zo||(i===Uo||i===la)&&o===P1){E=aa;var L=h&&A===I&&I.visualViewport?I.visualViewport.height:A[R];y-=L-r.height,y*=c?1:-1}if(i===Uo||(i===zo||i===aa)&&o===P1){x=la;var B=h&&A===I&&I.visualViewport?I.visualViewport.width:A[M];g-=B-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&lde),G=f===!0?ude({x:g,y},Ps(n)):{x:g,y};if(g=G.x,y=G.y,c){var U;return Object.assign({},H,(U={},U[E]=b?"0":"",U[x]=_?"0":"",U.transform=(I.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",U))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function cde(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:kl(t.placement),variation:ig(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,n8(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,n8(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const dde={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cde,data:{}};var bw={passive:!0};function fde(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Ps(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,bw)}),l&&c.addEventListener("resize",n.update,bw),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,bw)}),l&&c.removeEventListener("resize",n.update,bw)}}const hde={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:fde,data:{}};var pde={left:"right",right:"left",bottom:"top",top:"bottom"};function eS(e){return e.replace(/left|right|bottom|top/g,function(t){return pde[t]})}var mde={start:"end",end:"start"};function r8(e){return e.replace(/start|end/g,function(t){return mde[t]})}function J5(e){var t=Ps(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Q5(e){return rg(Bd(e)).left+J5(e).scrollLeft}function gde(e,t){var n=Ps(e),r=Bd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=oY();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Q5(e),y:c}}function vde(e){var t,n=Bd(e),r=J5(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=jh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Q5(e),c=-r.scrollTop;return hc(i||n).direction==="rtl"&&(l+=jh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Z5(e){var t=hc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function cY(e){return["html","body","#document"].indexOf(zl(e))>=0?e.ownerDocument.body:ea(e)&&Z5(e)?e:cY(xT(e))}function Hx(e,t){var n;t===void 0&&(t=[]);var r=cY(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ps(r),s=i?[o].concat(o.visualViewport||[],Z5(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(Hx(xT(s)))}function _$(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yde(e,t){var n=rg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function i8(e,t,n){return t===rY?_$(gde(e,n)):op(t)?yde(t,n):_$(vde(Bd(e)))}function xde(e){var t=Hx(xT(e)),n=["absolute","fixed"].indexOf(hc(e).position)>=0,r=n&&ea(e)?Eb(e):e;return op(r)?t.filter(function(i){return op(i)&&sY(i,r)&&zl(i)!=="body"}):[]}function bde(e,t,n,r){var i=t==="clippingParents"?xde(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=i8(e,d,r);return c.top=jh(f.top,c.top),c.right=eE(f.right,c.right),c.bottom=eE(f.bottom,c.bottom),c.left=jh(f.left,c.left),c},i8(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function dY(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?ig(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case zo:c={x:s,y:t.y-n.height};break;case aa:c={x:s,y:t.y+t.height};break;case la:c={x:t.x+t.width,y:l};break;case Uo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?K5(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case tg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case P1:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function O1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?zce:l,d=n.rootBoundary,f=d===void 0?rY:d,h=n.elementContext,p=h===void 0?Ny:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=lY(typeof S!="number"?S:uY(S,Sb)),b=p===Ny?Uce:Ny,x=e.rects.popper,E=e.elements[v?b:p],I=bde(op(E)?E:E.contextElement||Bd(e.elements.popper),c,f,s),A=rg(e.elements.reference),R=dY({reference:A,element:x,strategy:"absolute",placement:i}),M=_$(Object.assign({},x,R)),L=p===Ny?M:A,B={top:I.top-L.top+_.top,bottom:L.bottom-I.bottom+_.bottom,left:I.left-L.left+_.left,right:L.right-I.right+_.right},H=e.modifiersData.offset;if(p===Ny&&H){var G=H[i];Object.keys(B).forEach(function(U){var D=[la,aa].indexOf(U)>=0?1:-1,F=[zo,aa].indexOf(U)>=0?"y":"x";B[U]+=G[F]*D})}return B}function wde(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?iY:c,f=ig(r),h=f?l?e8:e8.filter(function(v){return ig(v)===f}):Sb,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=O1(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[kl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function _de(e){if(kl(e)===X5)return[];var t=eS(e);return[r8(e),t,r8(t)]}function Sde(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=kl(S),b=_===S,x=c||(b||!v?[eS(S)]:_de(S)),E=[S].concat(x).reduce(function(ce,se){return ce.concat(kl(se)===X5?wde(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),I=t.rects.reference,A=t.rects.popper,R=new Map,M=!0,L=E[0],B=0;B=0,F=D?"width":"height",z=O1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?U?la:Uo:U?aa:zo;I[F]>A[F]&&(V=eS(V));var W=eS(V),K=[];if(o&&K.push(z[G]<=0),l&&K.push(z[V]<=0,z[W]<=0),K.every(function(ce){return ce})){L=H,M=!1;break}R.set(H,K)}if(M)for(var Y=v?3:1,Q=function(se){var J=E.find(function(ae){var le=R.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(J)return L=J,"break"},re=Y;re>0;re--){var ue=Q(re);if(ue==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const Ede={name:"flip",enabled:!0,phase:"main",fn:Sde,requiresIfExists:["offset"],data:{_skip:!1}};function o8(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function s8(e){return[zo,la,aa,Uo].some(function(t){return e[t]>=0})}function Cde(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=O1(t,{elementContext:"reference"}),l=O1(t,{altBoundary:!0}),c=o8(s,r),d=o8(l,i,o),f=s8(c),h=s8(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Tde={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Cde};function Ide(e,t,n){var r=kl(e),i=[Uo,zo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Uo,la].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Rde(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=iY.reduce(function(f,h){return f[h]=Ide(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const Ade={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Rde};function Pde(e){var t=e.state,n=e.name;t.modifiersData[n]=dY({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ode={name:"popperOffsets",enabled:!0,phase:"read",fn:Pde,data:{}};function Mde(e){return e==="x"?"y":"x"}function kde(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=O1(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=kl(t.placement),b=ig(t.placement),x=!b,E=K5(_),I=Mde(E),A=t.modifiersData.popperOffsets,R=t.rects.reference,M=t.rects.popper,L=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,B=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(A){if(o){var U,D=E==="y"?zo:Uo,F=E==="y"?aa:la,z=E==="y"?"height":"width",V=A[E],W=V+S[D],K=V-S[F],Y=g?-M[z]/2:0,Q=b===tg?R[z]:M[z],re=b===tg?-M[z]:-R[z],ue=t.elements.arrow,ce=g&&ue?Y5(ue):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aY(),J=se[D],ae=se[F],le=jx(0,R[z],ce[z]),he=x?R[z]/2-Y-le-J-B.mainAxis:Q-le-J-B.mainAxis,pe=x?-R[z]/2+Y+le+ae+B.mainAxis:re+le+ae+B.mainAxis,ve=t.elements.arrow&&Eb(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,be=(U=H==null?void 0:H[E])!=null?U:0,me=V+he-be-ye,xe=V+pe-be,Je=jx(g?eE(W,me):W,V,g?jh(K,xe):K);A[E]=Je,G[E]=Je-V}if(l){var Xe,at=E==="x"?zo:Uo,Lt=E==="x"?aa:la,Pe=A[I],Fe=I==="y"?"height":"width",it=Pe+S[at],ht=Pe-S[Lt],pt=[zo,Uo].indexOf(_)!==-1,_e=(Xe=H==null?void 0:H[I])!=null?Xe:0,ze=pt?it:Pe-R[Fe]-M[Fe]-_e+B.altAxis,Ye=pt?Pe+R[Fe]+M[Fe]-_e-B.altAxis:ht,$e=g&&pt?rde(ze,Pe,Ye):jx(g?ze:it,Pe,g?Ye:ht);A[I]=$e,G[I]=$e-Pe}t.modifiersData[r]=G}}const Dde={name:"preventOverflow",enabled:!0,phase:"main",fn:kde,requiresIfExists:["offset"]};function Lde(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bde(e){return e===Ps(e)||!ea(e)?J5(e):Lde(e)}function Nde(e){var t=e.getBoundingClientRect(),n=ng(t.width)/e.offsetWidth||1,r=ng(t.height)/e.offsetHeight||1;return n!==1||r!==1}function $de(e,t,n){n===void 0&&(n=!1);var r=ea(t),i=ea(t)&&Nde(t),o=Bd(t),s=rg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((zl(t)!=="body"||Z5(o))&&(l=Bde(t)),ea(t)?(c=rg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Q5(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Fde(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function zde(e){var t=Fde(e);return Jce.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ude(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function jde(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var a8={placement:"bottom",modifiers:[],strategy:"absolute"};function l8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Vde(i)||document.body)},[i,o]),Eo(()=>{if(s&&!o)return bN(n,s),()=>{bN(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const d={ref:c};return O.cloneElement(r,d)}return C.jsx(O.Fragment,{children:r})}return C.jsx(O.Fragment,{children:s&&Og.createPortal(r,s)})});function Xde(e){return _t("MuiPopper",e)}Tt("MuiPopper",["root"]);const qde=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Yde=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Kde(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function S$(e){return typeof e=="function"?e():e}function Jde(e){return e.nodeType!==void 0}const Qde=()=>Ct({root:["root"]},Ice(Xde)),Zde={},efe=O.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,qde),_=O.useRef(null),b=mr(_,n),x=O.useRef(null),E=mr(x,p),I=O.useRef(E);Eo(()=>{I.current=E},[E]),O.useImperativeHandle(p,()=>x.current,[]);const A=Kde(f,s),[R,M]=O.useState(A),[L,B]=O.useState(S$(i));O.useEffect(()=>{x.current&&x.current.forceUpdate()}),O.useEffect(()=>{i&&B(S$(i))},[i]),Eo(()=>{if(!L||!d)return;const F=W=>{M(W.placement)};let z=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{F(W)}}];c!=null&&(z=z.concat(c)),h&&h.modifiers!=null&&(z=z.concat(h.modifiers));const V=Gde(L,_.current,$({placement:A},h,{modifiers:z}));return I.current(V),()=>{V.destroy(),I.current(null)}},[L,l,c,d,h,A]);const H={placement:R};y!==null&&(H.TransitionProps=y);const G=Qde(),U=(r=v.root)!=null?r:"div",D=Wr({elementType:U,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:G.root});return C.jsx(U,$({},D,{children:typeof o=="function"?o(H):o}))}),tfe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=Zde,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,Yde),[x,E]=O.useState(!0),I=()=>{E(!1)},A=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let R;if(o)R=o;else if(r){const B=S$(r);R=B&&Jde(B)?Rr(B).body:Rr(null).body}const M=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:I,onExited:A}:void 0;return C.jsx(fY,{disablePortal:l,container:R,children:C.jsx(efe,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:M},v),TransitionProps:L,children:i}))})});function nfe(e){const t=Rr(e);return t.body===e?lc(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Wx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u8(e){return parseInt(lc(e).getComputedStyle(e).paddingRight,10)||0}function rfe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function c8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!rfe(s);l&&c&&Wx(s,i)})}function pD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function ife(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(nfe(r)){const s=gV(Rr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${u8(r)+s}px`;const l=Rr(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${u8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Rr(r).body;else{const s=r.parentElement,l=lc(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function ofe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class sfe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Wx(t.modalRef,!1);const i=ofe(n);c8(n,t.mount,t.modalRef,i,!0);const o=pD(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=pD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=ife(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=pD(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Wx(t.modalRef,n),c8(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Wx(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function afe(e){return typeof e=="function"?e():e}function lfe(e){return e?e.props.hasOwnProperty("in"):!1}const ufe=new sfe;function cfe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=ufe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=O.useRef({}),g=O.useRef(null),v=O.useRef(null),y=mr(v,h),[S,_]=O.useState(!f),b=lfe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Rr(g.current),I=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),A=()=>{i.mount(I(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=Zi(()=>{const z=afe(t)||E().body;i.add(I(),z),v.current&&A()}),M=O.useCallback(()=>i.isTopModal(I()),[i]),L=Zi(z=>{g.current=z,z&&(f&&M()?A():v.current&&Wx(v.current,x))}),B=O.useCallback(()=>{i.remove(I(),x)},[x,i]);O.useEffect(()=>()=>{B()},[B]),O.useEffect(()=>{f?R():(!b||!o)&&B()},[f,B,b,o,R]);const H=z=>V=>{var W;(W=z.onKeyDown)==null||W.call(z,V),!(V.key!=="Escape"||!M())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},G=z=>V=>{var W;(W=z.onClick)==null||W.call(z,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(z={})=>{const V=ZS(e);delete V.onTransitionEnter,delete V.onTransitionExited;const W=$({},V,z);return $({role:"presentation"},W,{onKeyDown:H(W),ref:y})},getBackdropProps:(z={})=>{const V=z;return $({"aria-hidden":!0},V,{onClick:G(V),open:f})},getTransitionProps:()=>{const z=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&B()};return{onEnter:d6(z,c==null?void 0:c.props.onEnter),onExited:d6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:M,exited:S,hasTransition:b}}const dfe=2;function hY(e,t){return e-t}function $y(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function d8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},gfe=e=>e;let Ew;function mD(){return Ew===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ew=CSS.supports("touch-action","none"):Ew=!0),Ew}function vfe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=gfe,step:y=1,tabIndex:S,value:_}=e,b=O.useRef(),[x,E]=O.useState(-1),[I,A]=O.useState(-1),[R,M]=O.useState(!1),L=O.useRef(0),[B,H]=u1({controlled:_,default:n??c,name:"Slider"}),G=f&&((_e,ze,Ye)=>{const $e=_e.nativeEvent||_e,Be=new $e.constructor($e.type,$e);Object.defineProperty(Be,"target",{writable:!0,value:{value:ze,name:d}}),f(Be,ze,Ye)}),U=Array.isArray(B);let D=U?B.slice().sort(hY):[B];D=D.map(_e=>$y(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,ze)=>({value:c+y*ze})):s||[],z=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:W,onFocus:K,ref:Y}=M3(),[Q,re]=O.useState(-1),ue=O.useRef(),ce=mr(Y,ue),se=mr(g,ce),J=_e=>ze=>{var Ye;const $e=Number(ze.currentTarget.getAttribute("data-index"));K(ze),V.current===!0&&re($e),A($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,ze)},ae=_e=>ze=>{var Ye;W(ze),V.current===!1&&re(-1),A(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,ze)};Eo(()=>{if(r&&ue.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&Q!==-1&&re(-1);const le=_e=>ze=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,ze);const $e=Number(ze.currentTarget.getAttribute("data-index")),Be=D[$e],Rt=z.indexOf(Be);let ut=ze.target.valueAsNumber;if(F&&y==null){const Re=z[z.length-1];ut>Re?ut=Re:ut{const{current:Ye}=ue,{width:$e,height:Be,bottom:Rt,left:ut}=Ye.getBoundingClientRect();let Re;pe.indexOf("vertical")===0?Re=(Rt-_e.y)/Be:Re=(_e.x-ut)/$e,pe.indexOf("-reverse")!==-1&&(Re=1-Re);let ot;if(ot=ffe(Re,c,l),y)ot=pfe(ot,y,c);else{const Ae=d8(z,ot);ot=z[Ae]}ot=$y(ot,c,l);let Bt=0;if(U){ze?Bt=he.current:Bt=d8(D,ot),i&&(ot=$y(ot,D[Bt-1]||-1/0,D[Bt+1]||1/0));const Ae=ot;ot=f8({values:D,newValue:ot,index:Bt}),i&&ze||(Bt=ot.indexOf(Ae),he.current=Bt)}return{newValue:ot,activeIndex:Bt}},ye=Zi(_e=>{const ze=ww(_e,b);if(!ze)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){be(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:ze,move:!0});_w({sliderRef:ue,activeIndex:$e,setActive:E}),H(Ye),!R&&L.current>dfe&&M(!0),G&&!Sw(Ye,B)&&G(_e,Ye,$e)}),be=Zi(_e=>{const ze=ww(_e,b);if(M(!1),!ze)return;const{newValue:Ye}=ve({finger:ze,move:!0});E(-1),_e.type==="touchend"&&A(-1),h&&h(_e,Ye),b.current=void 0,xe()}),me=Zi(_e=>{if(r)return;mD()||_e.preventDefault();const ze=_e.changedTouches[0];ze!=null&&(b.current=ze.identifier);const Ye=ww(_e,b);if(Ye!==!1){const{newValue:Be,activeIndex:Rt}=ve({finger:Ye});_w({sliderRef:ue,activeIndex:Rt,setActive:E}),H(Be),G&&!Sw(Be,B)&&G(_e,Be,Rt)}L.current=0;const $e=Rr(ue.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",be)}),xe=O.useCallback(()=>{const _e=Rr(ue.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",be),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",be)},[be,ye]);O.useEffect(()=>{const{current:_e}=ue;return _e.addEventListener("touchstart",me,{passive:mD()}),()=>{_e.removeEventListener("touchstart",me,{passive:mD()}),xe()}},[xe,me]),O.useEffect(()=>{r&&xe()},[r,xe]);const Je=_e=>ze=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,ze),r||ze.defaultPrevented||ze.button!==0)return;ze.preventDefault();const $e=ww(ze,b);if($e!==!1){const{newValue:Rt,activeIndex:ut}=ve({finger:$e});_w({sliderRef:ue,activeIndex:ut,setActive:E}),H(Rt),G&&!Sw(Rt,B)&&G(ze,Rt,ut)}L.current=0;const Be=Rr(ue.current);Be.addEventListener("mousemove",ye),Be.addEventListener("mouseup",be)},Xe=tE(U?D[0]:c,c,l),at=tE(D[D.length-1],c,l)-Xe,Lt=(_e={})=>{const ze={onMouseDown:Je(_e||{})},Ye=$({},_e,ze);return $({ref:se},Ye)},Pe=_e=>ze=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,ze);const $e=Number(ze.currentTarget.getAttribute("data-index"));A($e)},Fe=_e=>ze=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,ze),A(-1)};return{active:x,axis:pe,axisProps:mfe,dragging:R,focusedThumbIndex:Q,getHiddenInputProps:(_e={})=>{var ze;const Ye={onChange:le(_e||{}),onFocus:J(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(ze=e.step)!=null?ze:void 0,disabled:r},$e,{style:$({},qre,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Lt,getThumbProps:(_e={})=>{const ze={onMouseOver:Pe(_e||{}),onMouseLeave:Fe(_e||{})};return $({},_e,ze)},marks:F,open:I,range:U,rootRef:se,trackLeap:at,trackOffset:Xe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function yfe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=O.useRef();O.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=Zi((_,b)=>{r==null||r(_,b)}),c=Zi(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});O.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=O.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},ZS(e),ZS(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const xfe=["onChange","maxRows","minRows","style","value"];function Cw(e){return parseInt(e,10)||0}const bfe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function h8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const wfe=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,xfe),{current:d}=O.useRef(l!=null),f=O.useRef(null),h=mr(n,f),p=O.useRef(null),g=O.useRef(0),[v,y]=O.useState({outerHeightStyle:0}),S=O.useCallback(()=>{const E=f.current,A=lc(E).getComputedStyle(E);if(A.width==="0px")return{outerHeightStyle:0};const R=p.current;R.style.width=A.width,R.value=E.value||t.placeholder||"x",R.value.slice(-1)===` +`&&(R.value+=" ");const M=A.boxSizing,L=Cw(A.paddingBottom)+Cw(A.paddingTop),B=Cw(A.borderBottomWidth)+Cw(A.borderTopWidth),H=R.scrollHeight;R.value="x";const G=R.scrollHeight;let U=H;o&&(U=Math.max(Number(o)*G,U)),i&&(U=Math.min(Number(i)*G,U)),U=Math.max(U,G);const D=U+(M==="border-box"?L+B:0),F=Math.abs(U-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),_=(E,I)=>{const{outerHeightStyle:A,overflow:R}=I;return g.current<20&&(A>0&&Math.abs((E.outerHeightStyle||0)-A)>1||E.overflow!==R)?(g.current+=1,{overflow:R,outerHeightStyle:A}):E},b=O.useCallback(()=>{const E=S();h8(E)||y(I=>_(I,E))},[S]);Eo(()=>{const E=()=>{const H=S();h8(H)||Og.flushSync(()=>{y(G=>_(G,H))})},I=()=>{g.current=0,E()};let A;const R=vC(I),M=f.current,L=lc(M);L.addEventListener("resize",R);let B;return typeof ResizeObserver<"u"&&(B=new ResizeObserver(I),B.observe(M)),()=>{R.clear(),cancelAnimationFrame(A),L.removeEventListener("resize",R),B&&B.disconnect()}},[S]),Eo(()=>{b()}),O.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(O.Fragment,{children:[C.jsx("textarea",$({value:l,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},c)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},bfe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),_fe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Sfe=Ee(tfe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Efe=O.forwardRef(function(t,n){var r;const i=jC(),o=It({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,I=Le(o,_fe),A=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,R=$({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},I);return C.jsx(Sfe,$({as:l,direction:i==null?void 0:i.direction,slots:{root:A},slotProps:E??d},R,{ref:n}))}),pY=Efe;function Cfe(e){return _t("MuiListSubheader",e)}Tt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Tfe=["className","color","component","disableGutters","disableSticky","inset"],Ife=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${ke(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Ct(s,Cfe,t)},Rfe=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>$({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),mY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,Tfe),h=$({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=Ife(h);return C.jsx(Rfe,$({as:s,className:Ue(p.root,i),ref:n,ownerState:h},f))});mY.muiSkipListHighlight=!0;const Afe=mY;function yp({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const Pfe=O.createContext(void 0),e4=Pfe;function Nd(){return O.useContext(e4)}function gY(e){return C.jsx(nse,$({},e,{defaultTheme:GC,themeId:Kh}))}function p8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function nE(e,t=!1){return e&&(p8(e.value)&&e.value!==""||t&&p8(e.defaultValue)&&e.defaultValue!=="")}function Ofe(e){return e.startAdornment}function Mfe(e){return _t("MuiInputBase",e)}const kfe=Tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),og=kfe,Dfe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],bT=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ke(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},wT=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Lfe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${ke(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${ke(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return Ct(y,Mfe,t)},_T=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:bT})(({theme:e,ownerState:t})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${og.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&$({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),ST=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=$({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${og.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${og.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),Bfe=C.jsx(gY,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Nfe=O.forwardRef(function(t,n){var r;const i=It({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:I,multiline:A=!1,name:R,onBlur:M,onChange:L,onClick:B,onFocus:H,onKeyDown:G,onKeyUp:U,placeholder:D,readOnly:F,renderSuffix:z,rows:V,slotProps:W={},slots:K={},startAdornment:Y,type:Q="text",value:re}=i,ue=Le(i,Dfe),ce=b.value!=null?b.value:re,{current:se}=O.useRef(ce!=null),J=O.useRef(),ae=O.useCallback($e=>{},[]),le=mr(J,x,b.ref,ae),[he,pe]=O.useState(!1),ve=Nd(),ye=yp({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,O.useEffect(()=>{!ve&&p&&he&&(pe(!1),M&&M())},[ve,p,he,M]);const be=ve&&ve.onFilled,me=ve&&ve.onEmpty,xe=O.useCallback($e=>{nE($e)?be&&be():me&&me()},[be,me]);Eo(()=>{se&&xe({value:ce})},[ce,xe,se]);const Je=$e=>{if(ye.disabled){$e.stopPropagation();return}H&&H($e),b.onFocus&&b.onFocus($e),ve&&ve.onFocus?ve.onFocus($e):pe(!0)},Xe=$e=>{M&&M($e),b.onBlur&&b.onBlur($e),ve&&ve.onBlur?ve.onBlur($e):pe(!1)},at=($e,...Be)=>{if(!se){const Rt=$e.target||J.current;if(Rt==null)throw new Error(wd(1));xe({value:Rt.value})}b.onChange&&b.onChange($e,...Be),L&&L($e,...Be)};O.useEffect(()=>{xe(J.current)},[]);const Lt=$e=>{J.current&&$e.currentTarget===$e.target&&J.current.focus(),B&&B($e)};let Pe=_,Fe=b;A&&Pe==="input"&&(V?Fe=$({type:void 0,minRows:V,maxRows:V},Fe):Fe=$({type:void 0,maxRows:E,minRows:I},Fe),Pe=wfe);const it=$e=>{xe($e.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};O.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const ht=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:A,size:ye.size,startAdornment:Y,type:Q}),pt=Lfe(ht),_e=K.root||d.Root||_T,ze=W.root||f.root||{},Ye=K.input||d.Input||ST;return Fe=$({},Fe,(r=W.input)!=null?r:f.input),C.jsxs(O.Fragment,{children:[!g&&Bfe,C.jsxs(_e,$({},ze,!Ml(_e)&&{ownerState:$({},ht,ze.ownerState)},{ref:n,onClick:Lt},ue,{className:Ue(pt.root,ze.className,c,F&&"MuiInputBase-readOnly"),children:[Y,C.jsx(e4.Provider,{value:null,children:C.jsx(Ye,$({ownerState:ht,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:R,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ce,onKeyDown:G,onKeyUp:U,type:Q},Fe,!Ml(Ye)&&{as:Pe,ownerState:$({},ht,Fe.ownerState)},{ref:le,className:Ue(pt.input,Fe.className,F&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:at,onFocus:Je}))}),v,z?z($({},ye,{startAdornment:Y})):null]}))]})}),ET=Nfe;function $fe(e){return _t("MuiInput",e)}const Ffe=$({},og,Tt("MuiInput",["root","underline","input"])),Fy=Ffe;function zfe(e){return _t("MuiOutlinedInput",e)}const Ufe=$({},og,Tt("MuiOutlinedInput",["root","notchedOutline","input"])),Ac=Ufe;function jfe(e){return _t("MuiFilledInput",e)}const Hfe=$({},og,Tt("MuiFilledInput",["root","underline","input"])),ah=Hfe,Wfe=$t(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Gfe=$t(C.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Vfe(e){return _t("MuiAvatar",e)}Tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Xfe=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],qfe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ct({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Vfe,t)},Yfe=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Kfe=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Jfe=Ee(Gfe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Qfe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=O.useState(!1);return O.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const l=new Image;return l.onload=()=>{s&&o("loaded")},l.onerror=()=>{s&&o("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const Zfe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,Xfe);let v=null;const y=Qfe($({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=$({},r,{colorDefault:!_,component:l,variant:p}),x=qfe(b);return _?v=C.jsx(Kfe,$({alt:i,srcSet:h,src:f,sizes:d,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Jfe,{ownerState:b,className:x.fallback}),C.jsx(Yfe,$({as:l,ownerState:b,className:Ue(x.root,s),ref:n},g,{children:v}))}),vY=Zfe,ehe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],the={entering:{opacity:1},entered:{opacity:1}},nhe=O.forwardRef(function(t,n){const r=Pn(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=W5}=t,x=Le(t,ehe),E=O.useRef(null),I=mr(E,l.ref,n),A=D=>F=>{if(D){const z=E.current;F===void 0?D(z):D(z,F)}},R=A(p),M=A((D,F)=>{tY(D);const z=eg({style:S,timeout:_,easing:c},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",z),D.style.transition=r.transitions.create("opacity",z),f&&f(D,F)}),L=A(h),B=A(y),H=A(D=>{const F=eg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),G=A(v),U=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:d,nodeRef:E,onEnter:M,onEntered:L,onEntering:R,onExit:H,onExited:G,onExiting:B,addEndListener:U,timeout:_},x,{children:(D,F)=>O.cloneElement(l,$({style:$({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},the[D],S,l.props.style),ref:I},F))}))}),sp=nhe;function rhe(e){return _t("MuiBackdrop",e)}Tt("MuiBackdrop",["root","invisible"]);const ihe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ohe=e=>{const{classes:t,invisible:n}=e;return Ct({root:["root",n&&"invisible"]},rhe,t)},she=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),ahe=O.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=sp,transitionDuration:_}=s,b=Le(s,ihe),x=$({},s,{component:d,invisible:p}),E=ohe(x),I=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:_},b,{children:C.jsx(she,$({"aria-hidden":!0},I,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:Ue(E.root,c,I==null?void 0:I.className),ownerState:$({},x,I==null?void 0:I.ownerState),classes:E,ref:n,children:l}))}))}),yY=ahe,lhe=K3(),uhe=sse({themeId:Kh,defaultTheme:lhe,defaultClassName:"MuiBox-root",generateClassName:yV.generate}),Pt=uhe;function che(e){return _t("MuiButton",e)}const dhe=Tt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Tw=dhe,fhe=O.createContext({}),hhe=fhe,phe=O.createContext(void 0),mhe=phe,ghe=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],vhe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,l={root:["root",o,`${o}${ke(t)}`,`size${ke(i)}`,`${o}Size${ke(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${ke(i)}`],endIcon:["endIcon",`iconSize${ke(i)}`]},c=Ct(l,che,s);return $({},s,c)},xY=e=>$({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),yhe=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Tw.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Tw.disabled}`]:$({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Rn(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Tw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Tw.disabled}`]:{boxShadow:"none"}}),xhe=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},xY(e))),bhe=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},xY(e))),whe=O.forwardRef(function(t,n){const r=O.useContext(hhe),i=O.useContext(mhe),o=k3(r,t),s=It({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,I=Le(s,ghe),A=$({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),R=vhe(A),M=b&&C.jsx(xhe,{className:R.startIcon,ownerState:A,children:b}),L=v&&C.jsx(bhe,{className:R.endIcon,ownerState:A,children:v}),B=i||"";return C.jsxs(yhe,$({ownerState:A,className:Ue(r.className,R.root,f,B),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Ue(R.focusVisible,y),ref:n,type:x},I,{classes:R,children:[M,l,L]}))}),pc=whe;function _he(e){return _t("MuiCard",e)}Tt("MuiCard",["root"]);const She=["className","raised"],Ehe=e=>{const{classes:t}=e;return Ct({root:["root"]},_he,t)},Che=Ee(Mg,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),The=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,She),l=$({},r,{raised:o}),c=Ehe(l);return C.jsx(Che,$({className:Ue(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),Ihe=The;function Rhe(e){return _t("PrivateSwitchBase",e)}Tt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Ahe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Phe=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${ke(i)}`],input:["input"]};return Ct(o,Rhe,t)},Ohe=Ee(Ld)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Mhe=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),khe=O.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:d=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:_,onFocus:b,readOnly:x,required:E=!1,tabIndex:I,type:A,value:R}=t,M=Le(t,Ahe),[L,B]=u1({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),H=Nd(),G=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},U=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},D=K=>{if(K.nativeEvent.defaultPrevented)return;const Y=K.target.checked;B(Y),_&&_(K,Y)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const z=A==="checkbox"||A==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:d,edge:f}),W=Phe(V);return C.jsxs(Ohe,$({component:"span",className:Ue(W.root,s),centerRipple:!0,focusRipple:!d,disabled:F,tabIndex:null,role:void 0,onFocus:G,onBlur:U,ownerState:V,ref:n},M,{children:[C.jsx(Mhe,$({autoFocus:r,checked:i,defaultChecked:l,className:W.input,disabled:F,id:z?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:I,type:A},A==="checkbox"&&R===void 0?{}:{value:R},g)),L?o:h]}))}),bY=khe,Dhe=$t(C.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Lhe=$t(C.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Bhe=$t(C.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Nhe(e){return _t("MuiCheckbox",e)}const $he=Tt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),gD=$he,Fhe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zhe=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${ke(r)}`,`size${ke(i)}`]},s=Ct(o,Nhe,t);return $({},t,s)},Uhe=Ee(bY,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,n.color!=="default"&&t[`color${ke(n.color)}`]]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${gD.checked}, &.${gD.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${gD.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),jhe=C.jsx(Lhe,{}),Hhe=C.jsx(Dhe,{}),Whe=C.jsx(Bhe,{}),Ghe=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiCheckbox"}),{checkedIcon:s=jhe,color:l="primary",icon:c=Hhe,indeterminate:d=!1,indeterminateIcon:f=Whe,inputProps:h,size:p="medium",className:g}=o,v=Le(o,Fhe),y=d?f:c,S=d?f:s,_=$({},o,{color:l,indeterminate:d,size:p}),b=zhe(_);return C.jsx(Uhe,$({type:"checkbox",inputProps:$({"data-indeterminate":d},h),icon:O.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:O.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:Ue(b.root,g)},v,{classes:b}))}),Vhe=Ghe;function Xhe(e){return _t("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qhe=["className","color","disableShrink","size","style","thickness","value","variant"];let CT=e=>e,m8,g8,v8,y8;const Pc=44,Yhe=Od(m8||(m8=CT` 0% { transform: rotate(0deg); } @@ -140,7 +140,7 @@ Error generating stack: `+o.message+` 100% { transform: rotate(360deg); } -`)),Yhe=Od(g8||(g8=CT` +`)),Khe=Od(g8||(g8=CT` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -155,11 +155,11 @@ Error generating stack: `+o.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),Khe=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ke(r)}`],svg:["svg"],circle:["circle",`circle${ke(n)}`,i&&"circleDisableShrink"]};return Ct(o,Vhe,t)},Jhe=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ke(n.color)}`]]}})(({ownerState:e,theme:t})=>$({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Tg(v8||(v8=CT` +`)),Jhe=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ke(r)}`],svg:["svg"],circle:["circle",`circle${ke(n)}`,i&&"circleDisableShrink"]};return Ct(o,Xhe,t)},Qhe=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ke(n.color)}`]]}})(({ownerState:e,theme:t})=>$({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Tg(v8||(v8=CT` animation: ${0} 1.4s linear infinite; - `),qhe)),Qhe=Ee("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Zhe=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ke(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>$({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Tg(y8||(y8=CT` + `),Yhe)),Zhe=Ee("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),epe=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ke(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>$({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Tg(y8||(y8=CT` animation: ${0} 1.4s ease-in-out infinite; - `),Yhe)),epe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:h="indeterminate"}=r,p=Le(r,Xhe),g=$({},r,{color:o,disableShrink:s,size:l,thickness:d,value:f,variant:h}),v=Khe(g),y={},S={},_={};if(h==="determinate"){const b=2*Math.PI*((Pc-d)/2);y.strokeDasharray=b.toFixed(3),_["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(Jhe,$({className:Ue(v.root,i),style:$({width:l,height:l},S,c),ownerState:g,ref:n,role:"progressbar"},_,p,{children:C.jsx(Qhe,{className:v.svg,ownerState:g,viewBox:`${Pc/2} ${Pc/2} ${Pc} ${Pc}`,children:C.jsx(Zhe,{className:v.circle,style:y,ownerState:g,cx:Pc,cy:Pc,r:(Pc-d)/2,fill:"none",strokeWidth:d})})}))}),t4=epe,tpe=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),npe=e=>$({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),rpe=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,l])=>{var c;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(c=l.palette)==null?void 0:c.mode}});let i=$({html:tpe(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},npe(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function ipe(e){const t=It({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(O.Fragment,{children:[C.jsx(gY,{styles:i=>rpe(i,r)}),n]})}function ope(e){return _t("MuiModal",e)}Tt("MuiModal",["root","hidden","backdrop"]);const spe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],ape=e=>{const{open:t,exited:n,classes:r}=e;return Ct({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},ope,r)},lpe=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),upe=Ee(yY,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),cpe=O.forwardRef(function(t,n){var r,i,o,s,l,c;const d=It({name:"MuiModal",props:t}),{BackdropComponent:f=upe,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:_={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:I=!1,disablePortal:A=!1,disableRestoreFocus:R=!1,disableScrollLock:M=!1,hideBackdrop:L=!1,keepMounted:B=!1,onBackdropClick:H,open:G,slotProps:U,slots:D}=d,F=Le(d,spe),z=$({},d,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:I,disablePortal:A,disableRestoreFocus:R,disableScrollLock:M,hideBackdrop:L,keepMounted:B}),{getRootProps:V,getBackdropProps:W,getTransitionProps:K,portalRef:Y,isTopModal:Q,exited:re,hasTransition:ue}=ufe($({},z,{rootRef:n})),ce=$({},z,{exited:re}),se=ape(ce),J={};if(v.props.tabIndex===void 0&&(J.tabIndex="-1"),ue){const{onEnter:be,onExited:me}=K();J.onEnter=be,J.onExited=me}const ae=(r=(i=D==null?void 0:D.root)!=null?i:_.Root)!=null?r:lpe,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:_.Backdrop)!=null?o:f,he=(l=U==null?void 0:U.root)!=null?l:b.root,pe=(c=U==null?void 0:U.backdrop)!=null?c:b.backdrop,ve=Wr({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ce,className:Ue(p,he==null?void 0:he.className,se==null?void 0:se.root,!ce.open&&ce.exited&&(se==null?void 0:se.hidden))}),ye=Wr({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:be=>W($({},be,{onClick:me=>{H&&H(me),be!=null&&be.onClick&&be.onClick(me)}})),className:Ue(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ce});return!B&&!G&&(!ue||re)?null:C.jsx(fY,{ref:Y,container:y,disablePortal:A,children:C.jsxs(ae,$({},ve,{children:[!L&&f?C.jsx(le,$({},ye)):null,C.jsx($ce,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:R,isEnabled:Q,open:G,children:O.cloneElement(v,J)})]}))})}),wY=cpe;function dpe(e){return _t("MuiDialog",e)}const fpe=Tt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),vD=fpe,hpe=O.createContext({}),ppe=hpe,mpe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],gpe=Ee(yY,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),vpe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Ct(s,dpe,t)},ype=Ee(wY,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),xpe=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(n.scroll)}`]]}})(({ownerState:e})=>$({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),bpe=Ee(Mg,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>$({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${vD.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${vD.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${vD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),wpe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiDialog"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:_,open:b,PaperComponent:x=Mg,PaperProps:E={},scroll:I="paper",TransitionComponent:A=sp,transitionDuration:R=o,TransitionProps:M}=r,L=Le(r,mpe),B=$({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:I}),H=vpe(B),G=O.useRef(),U=V=>{G.current=V.target===V.currentTarget},D=V=>{G.current&&(G.current=null,S&&S(V),_&&_(V,"backdropClick"))},F=O3(l),z=O.useMemo(()=>({titleId:F}),[F]);return C.jsx(ype,$({className:Ue(H.root,h),closeAfterTransition:!0,components:{Backdrop:gpe},componentsProps:{backdrop:$({transitionDuration:R,as:c},d)},disableEscapeKeyDown:p,onClose:_,open:b,ref:n,onClick:D,ownerState:B},L,{children:C.jsx(A,$({appear:!0,in:b,timeout:R,role:"presentation"},M,{children:C.jsx(xpe,{className:Ue(H.container),onMouseDown:U,ownerState:B,children:C.jsx(bpe,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:Ue(H.paper,E.className),ownerState:B,children:C.jsx(ppe.Provider,{value:z,children:f})}))})}))}))}),_pe=wpe;function Spe(e){return _t("MuiDivider",e)}const Epe=Tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),x8=Epe,Cpe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Tpe=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:l,variant:c}=e;return Ct({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Spe,r)},Ipe=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Rn(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>$({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Rpe=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),_Y=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:l=o?"div":"hr",flexItem:c=!1,light:d=!1,orientation:f="horizontal",role:h=l!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Le(r,Cpe),y=$({},r,{absolute:i,component:l,flexItem:c,light:d,orientation:f,role:h,textAlign:p,variant:g}),S=Tpe(y);return C.jsx(Ipe,$({as:l,className:Ue(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(Rpe,{className:S.wrapper,ownerState:y,children:o}):null}))});_Y.muiSkipListHighlight=!0;const wc=_Y,Ape=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Ppe=e=>{const{classes:t,disableUnderline:n}=e,i=Ct({root:["root",!n&&"underline"],input:["input"]},Ufe,t);return $({},t,i)},Ope=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${ah.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${ah.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ah.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ah.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ah.disabled}, .${ah.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ah.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&$({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),Mpe=Ee(ST,{name:"MuiFilledInput",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>$({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9})),SY=O.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=l,S=Le(l,Ape),_=$({},l,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=Ppe(l),x={root:{ownerState:_},input:{ownerState:_}},E=g??d?Bo(g??d,x):x,I=(r=(i=v.root)!=null?i:c.Root)!=null?r:Ope,A=(o=(s=v.input)!=null?s:c.Input)!=null?o:Mpe;return C.jsx(ET,$({slots:{root:I,input:A},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});SY.muiName="Input";const EY=SY;function kpe(e){return _t("MuiFormControl",e)}Tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Dpe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Lpe=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${ke(n)}`,r&&"fullWidth"]};return Ct(i,kpe,t)},Bpe=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${ke(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Npe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,_=Le(r,Dpe),b=$({},r,{color:s,component:l,disabled:c,error:d,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=Lpe(b),[E,I]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{if(!z_(D,["Input","Select"]))return;const F=z_(D,["Select"])?D.props.input:D;F&&Pfe(F.props)&&(U=!0)}),U}),[A,R]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{z_(D,["Input","Select"])&&(nE(D.props,!0)||nE(D.props.inputProps,!0))&&(U=!0)}),U}),[M,L]=O.useState(!1);c&&M&&L(!1);const B=f!==void 0&&!c?f:M;let H;const G=O.useMemo(()=>({adornedStart:E,setAdornedStart:I,color:s,disabled:c,error:d,filled:A,focused:B,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{L(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{L(!0)},registerEffect:H,required:v,variant:S}),[E,s,c,d,A,B,h,p,H,v,y,S]);return C.jsx(e4.Provider,{value:G,children:C.jsx(Bpe,$({as:l,ownerState:b,className:Ue(x.root,o),ref:n},_,{children:i}))})}),$pe=Npe,Fpe=Lse({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>It({props:e,name:"MuiStack"})}),M1=Fpe;function zpe(e){return _t("MuiFormControlLabel",e)}const Upe=Tt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),vx=Upe,jpe=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Hpe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${ke(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Ct(s,zpe,t)},Wpe=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vx.label}`]:t.label},t.root,t[`labelPlacement${ke(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${vx.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${vx.label}`]:{[`&.${vx.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Gpe=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${vx.error}`]:{color:(e.vars||e).palette.error.main}})),Vpe=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:d,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Le(o,jpe),S=Nd(),_=(r=d??c.props.disabled)!=null?r:S==null?void 0:S.disabled,b=g??c.props.required,x={disabled:_,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof c.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=yp({props:o,muiFormControl:S,states:["error"]}),I=$({},o,{disabled:_,labelPlacement:p,required:b,error:E.error}),A=Hpe(I),R=(i=v.typography)!=null?i:l.typography;let M=h;return M!=null&&M.type!==qt&&!f&&(M=C.jsx(qt,$({component:"span"},R,{className:Ue(A.label,R==null?void 0:R.className),children:M}))),C.jsxs(Wpe,$({className:Ue(A.root,s),ownerState:I,ref:n},y,{children:[O.cloneElement(c,x),b?C.jsxs(M1,{direction:"row",alignItems:"center",children:[M,C.jsxs(Gpe,{ownerState:I,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}):M]}))}),Xpe=Vpe;function qpe(e){return _t("MuiFormHelperText",e)}const Ype=Tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),b8=Ype;var w8;const Kpe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Jpe=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:l,required:c}=e,d={root:["root",i&&"disabled",o&&"error",r&&`size${ke(r)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Ct(d,qpe,t)},Qpe=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ke(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${b8.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${b8.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Zpe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,l=Le(r,Kpe),c=Nd(),d=yp({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=$({},r,{component:s,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=Jpe(f);return C.jsx(Qpe,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},l,{children:i===" "?w8||(w8=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),eme=Zpe;function tme(e){return _t("MuiFormLabel",e)}const nme=Tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Gx=nme,rme=["children","className","color","component","disabled","error","filled","focused","required"],ime=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:l}=e,c={root:["root",`color${ke(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return Ct(c,tme,t)},ome=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Gx.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Gx.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Gx.error}`]:{color:(e.vars||e).palette.error.main}})),sme=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Gx.error}`]:{color:(e.vars||e).palette.error.main}})),ame=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,l=Le(r,rme),c=Nd(),d=yp({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=$({},r,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=ime(f);return C.jsxs(ome,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},l,{children:[i,d.required&&C.jsxs(sme,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),lme=ame,ume=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function E$(e){return`scale(${e}, ${e**2})`}const cme={entering:{opacity:1,transform:E$(1)},entered:{opacity:1,transform:"none"}},yD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),CY=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:l,onEnter:c,onEntered:d,onEntering:f,onExit:h,onExited:p,onExiting:g,style:v,timeout:y="auto",TransitionComponent:S=W5}=t,_=Le(t,ume),b=O.useRef(),x=O.useRef(),E=Pn(),I=O.useRef(null),A=mr(I,o.ref,n),R=F=>z=>{if(F){const V=I.current;z===void 0?F(V):F(V,z)}},M=R(f),L=R((F,z)=>{tY(F);const{duration:V,delay:W,easing:K}=eg({style:v,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=Y):Y=V,F.style.transition=[E.transitions.create("opacity",{duration:Y,delay:W}),E.transitions.create("transform",{duration:yD?Y:Y*.666,delay:W,easing:K})].join(","),c&&c(F,z)}),B=R(d),H=R(g),G=R(F=>{const{duration:z,delay:V,easing:W}=eg({style:v,timeout:y,easing:s},{mode:"exit"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=K):K=z,F.style.transition=[E.transitions.create("opacity",{duration:K,delay:V}),E.transitions.create("transform",{duration:yD?K:K*.666,delay:yD?V:V||K*.333,easing:W})].join(","),F.style.opacity=0,F.style.transform=E$(.75),h&&h(F)}),U=R(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(I.current,F)};return O.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:l,nodeRef:I,onEnter:L,onEntered:B,onEntering:M,onExit:G,onExited:U,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},_,{children:(F,z)=>O.cloneElement(o,$({style:$({opacity:0,transform:E$(.75),visibility:F==="exited"&&!l?"hidden":void 0},cme[F],v,o.props.style),ref:A},z))}))});CY.muiSupportAuto=!0;const rE=CY;function dme(e,t,n,r,i){const[o,s]=O.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Eo(()=>{let l=!0;if(!n)return;const c=n(e),d=()=>{l&&s(c.matches)};return d(),c.addListener(d),()=>{l=!1,c.removeListener(d)}},[e,n]),o}const TY=CS["useSyncExternalStore"];function fme(e,t,n,r,i){const o=O.useCallback(()=>t,[t]),s=O.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:f}=r(e);return()=>f}return o},[o,e,r,i,n]),[l,c]=O.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return TY(c,l,s)}function hme(e,t={}){const n=jC(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=GV({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(TY!==void 0?fme:dme)(c,i,o,s,l)}const pme=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],mme=e=>{const{classes:t,disableUnderline:n}=e,i=Ct({root:["root",!n&&"underline"],input:["input"]},Nfe,t);return $({},t,i)},gme=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),$({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Fy.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fy.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Fy.disabled}, .${Fy.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Fy.disabled}:before`]:{borderBottomStyle:"dotted"}})}),vme=Ee(ST,{name:"MuiInput",slot:"Input",overridesResolver:wT})({}),IY=O.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=l,_=Le(l,pme),b=mme(l),E={root:{ownerState:{disableUnderline:c}}},I=v??f?Bo(v??f,E):E,A=(r=(i=y.root)!=null?i:d.Root)!=null?r:gme,R=(o=(s=y.input)!=null?s:d.Input)!=null?o:vme;return C.jsx(ET,$({slots:{root:A,input:R},slotProps:I,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},_,{classes:b}))});IY.muiName="Input";const RY=IY;function yme(e){return _t("MuiInputLabel",e)}Tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const xme=["disableAnimation","margin","shrink","variant","className"],bme=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:l}=e,c={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${ke(r)}`,s],asterisk:[l&&"asterisk"]},d=Ct(c,yme,t);return $({},t,d)},wme=Ee(lme,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gx.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})(({theme:e,ownerState:t})=>$({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&$({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&$({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&$({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),_me=O.forwardRef(function(t,n){const r=It({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,l=Le(r,xme),c=Nd();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=yp({props:r,muiFormControl:c,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),p=bme(h);return C.jsx(wme,$({"data-shrink":d,ownerState:h,ref:n,className:Ue(p.root,s)},l,{classes:p}))}),Sme=_me;function Eme(e){return _t("MuiLinearProgress",e)}Tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Cme=["className","color","value","valueBuffer","variant"];let kg=e=>e,_8,S8,E8,C8,T8,I8;const C$=4,Tme=Od(_8||(_8=kg` + `),Khe)),tpe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:h="indeterminate"}=r,p=Le(r,qhe),g=$({},r,{color:o,disableShrink:s,size:l,thickness:d,value:f,variant:h}),v=Jhe(g),y={},S={},_={};if(h==="determinate"){const b=2*Math.PI*((Pc-d)/2);y.strokeDasharray=b.toFixed(3),_["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(Qhe,$({className:Ue(v.root,i),style:$({width:l,height:l},S,c),ownerState:g,ref:n,role:"progressbar"},_,p,{children:C.jsx(Zhe,{className:v.svg,ownerState:g,viewBox:`${Pc/2} ${Pc/2} ${Pc} ${Pc}`,children:C.jsx(epe,{className:v.circle,style:y,ownerState:g,cx:Pc,cy:Pc,r:(Pc-d)/2,fill:"none",strokeWidth:d})})}))}),t4=tpe,npe=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),rpe=e=>$({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),ipe=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,l])=>{var c;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(c=l.palette)==null?void 0:c.mode}});let i=$({html:npe(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},rpe(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function ope(e){const t=It({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(O.Fragment,{children:[C.jsx(gY,{styles:i=>ipe(i,r)}),n]})}function spe(e){return _t("MuiModal",e)}Tt("MuiModal",["root","hidden","backdrop"]);const ape=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],lpe=e=>{const{open:t,exited:n,classes:r}=e;return Ct({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},spe,r)},upe=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),cpe=Ee(yY,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),dpe=O.forwardRef(function(t,n){var r,i,o,s,l,c;const d=It({name:"MuiModal",props:t}),{BackdropComponent:f=cpe,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:_={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:I=!1,disablePortal:A=!1,disableRestoreFocus:R=!1,disableScrollLock:M=!1,hideBackdrop:L=!1,keepMounted:B=!1,onBackdropClick:H,open:G,slotProps:U,slots:D}=d,F=Le(d,ape),z=$({},d,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:I,disablePortal:A,disableRestoreFocus:R,disableScrollLock:M,hideBackdrop:L,keepMounted:B}),{getRootProps:V,getBackdropProps:W,getTransitionProps:K,portalRef:Y,isTopModal:Q,exited:re,hasTransition:ue}=cfe($({},z,{rootRef:n})),ce=$({},z,{exited:re}),se=lpe(ce),J={};if(v.props.tabIndex===void 0&&(J.tabIndex="-1"),ue){const{onEnter:be,onExited:me}=K();J.onEnter=be,J.onExited=me}const ae=(r=(i=D==null?void 0:D.root)!=null?i:_.Root)!=null?r:upe,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:_.Backdrop)!=null?o:f,he=(l=U==null?void 0:U.root)!=null?l:b.root,pe=(c=U==null?void 0:U.backdrop)!=null?c:b.backdrop,ve=Wr({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ce,className:Ue(p,he==null?void 0:he.className,se==null?void 0:se.root,!ce.open&&ce.exited&&(se==null?void 0:se.hidden))}),ye=Wr({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:be=>W($({},be,{onClick:me=>{H&&H(me),be!=null&&be.onClick&&be.onClick(me)}})),className:Ue(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ce});return!B&&!G&&(!ue||re)?null:C.jsx(fY,{ref:Y,container:y,disablePortal:A,children:C.jsxs(ae,$({},ve,{children:[!L&&f?C.jsx(le,$({},ye)):null,C.jsx(Fce,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:R,isEnabled:Q,open:G,children:O.cloneElement(v,J)})]}))})}),wY=dpe;function fpe(e){return _t("MuiDialog",e)}const hpe=Tt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),vD=hpe,ppe=O.createContext({}),mpe=ppe,gpe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],vpe=Ee(yY,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ype=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Ct(s,fpe,t)},xpe=Ee(wY,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),bpe=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(n.scroll)}`]]}})(({ownerState:e})=>$({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),wpe=Ee(Mg,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>$({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${vD.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${vD.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${vD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),_pe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiDialog"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:_,open:b,PaperComponent:x=Mg,PaperProps:E={},scroll:I="paper",TransitionComponent:A=sp,transitionDuration:R=o,TransitionProps:M}=r,L=Le(r,gpe),B=$({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:I}),H=ype(B),G=O.useRef(),U=V=>{G.current=V.target===V.currentTarget},D=V=>{G.current&&(G.current=null,S&&S(V),_&&_(V,"backdropClick"))},F=O3(l),z=O.useMemo(()=>({titleId:F}),[F]);return C.jsx(xpe,$({className:Ue(H.root,h),closeAfterTransition:!0,components:{Backdrop:vpe},componentsProps:{backdrop:$({transitionDuration:R,as:c},d)},disableEscapeKeyDown:p,onClose:_,open:b,ref:n,onClick:D,ownerState:B},L,{children:C.jsx(A,$({appear:!0,in:b,timeout:R,role:"presentation"},M,{children:C.jsx(bpe,{className:Ue(H.container),onMouseDown:U,ownerState:B,children:C.jsx(wpe,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:Ue(H.paper,E.className),ownerState:B,children:C.jsx(mpe.Provider,{value:z,children:f})}))})}))}))}),Spe=_pe;function Epe(e){return _t("MuiDivider",e)}const Cpe=Tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),x8=Cpe,Tpe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Ipe=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:l,variant:c}=e;return Ct({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Epe,r)},Rpe=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Rn(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>$({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>$({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Ape=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),_Y=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:l=o?"div":"hr",flexItem:c=!1,light:d=!1,orientation:f="horizontal",role:h=l!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Le(r,Tpe),y=$({},r,{absolute:i,component:l,flexItem:c,light:d,orientation:f,role:h,textAlign:p,variant:g}),S=Ipe(y);return C.jsx(Rpe,$({as:l,className:Ue(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(Ape,{className:S.wrapper,ownerState:y,children:o}):null}))});_Y.muiSkipListHighlight=!0;const wc=_Y,Ppe=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Ope=e=>{const{classes:t,disableUnderline:n}=e,i=Ct({root:["root",!n&&"underline"],input:["input"]},jfe,t);return $({},t,i)},Mpe=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${ah.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${ah.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ah.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ah.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ah.disabled}, .${ah.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ah.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&$({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),kpe=Ee(ST,{name:"MuiFilledInput",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>$({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9})),SY=O.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=l,S=Le(l,Ppe),_=$({},l,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=Ope(l),x={root:{ownerState:_},input:{ownerState:_}},E=g??d?Bo(g??d,x):x,I=(r=(i=v.root)!=null?i:c.Root)!=null?r:Mpe,A=(o=(s=v.input)!=null?s:c.Input)!=null?o:kpe;return C.jsx(ET,$({slots:{root:I,input:A},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});SY.muiName="Input";const EY=SY;function Dpe(e){return _t("MuiFormControl",e)}Tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Lpe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Bpe=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${ke(n)}`,r&&"fullWidth"]};return Ct(i,Dpe,t)},Npe=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${ke(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),$pe=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,_=Le(r,Lpe),b=$({},r,{color:s,component:l,disabled:c,error:d,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=Bpe(b),[E,I]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{if(!z_(D,["Input","Select"]))return;const F=z_(D,["Select"])?D.props.input:D;F&&Ofe(F.props)&&(U=!0)}),U}),[A,R]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{z_(D,["Input","Select"])&&(nE(D.props,!0)||nE(D.props.inputProps,!0))&&(U=!0)}),U}),[M,L]=O.useState(!1);c&&M&&L(!1);const B=f!==void 0&&!c?f:M;let H;const G=O.useMemo(()=>({adornedStart:E,setAdornedStart:I,color:s,disabled:c,error:d,filled:A,focused:B,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{L(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{L(!0)},registerEffect:H,required:v,variant:S}),[E,s,c,d,A,B,h,p,H,v,y,S]);return C.jsx(e4.Provider,{value:G,children:C.jsx(Npe,$({as:l,ownerState:b,className:Ue(x.root,o),ref:n},_,{children:i}))})}),Fpe=$pe,zpe=Bse({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>It({props:e,name:"MuiStack"})}),M1=zpe;function Upe(e){return _t("MuiFormControlLabel",e)}const jpe=Tt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),vx=jpe,Hpe=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Wpe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${ke(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Ct(s,Upe,t)},Gpe=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vx.label}`]:t.label},t.root,t[`labelPlacement${ke(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${vx.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${vx.label}`]:{[`&.${vx.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Vpe=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${vx.error}`]:{color:(e.vars||e).palette.error.main}})),Xpe=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:d,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Le(o,Hpe),S=Nd(),_=(r=d??c.props.disabled)!=null?r:S==null?void 0:S.disabled,b=g??c.props.required,x={disabled:_,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof c.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=yp({props:o,muiFormControl:S,states:["error"]}),I=$({},o,{disabled:_,labelPlacement:p,required:b,error:E.error}),A=Wpe(I),R=(i=v.typography)!=null?i:l.typography;let M=h;return M!=null&&M.type!==qt&&!f&&(M=C.jsx(qt,$({component:"span"},R,{className:Ue(A.label,R==null?void 0:R.className),children:M}))),C.jsxs(Gpe,$({className:Ue(A.root,s),ownerState:I,ref:n},y,{children:[O.cloneElement(c,x),b?C.jsxs(M1,{direction:"row",alignItems:"center",children:[M,C.jsxs(Vpe,{ownerState:I,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}):M]}))}),qpe=Xpe;function Ype(e){return _t("MuiFormHelperText",e)}const Kpe=Tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),b8=Kpe;var w8;const Jpe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Qpe=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:l,required:c}=e,d={root:["root",i&&"disabled",o&&"error",r&&`size${ke(r)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Ct(d,Ype,t)},Zpe=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ke(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${b8.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${b8.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),eme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,l=Le(r,Jpe),c=Nd(),d=yp({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=$({},r,{component:s,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=Qpe(f);return C.jsx(Zpe,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},l,{children:i===" "?w8||(w8=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),tme=eme;function nme(e){return _t("MuiFormLabel",e)}const rme=Tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Gx=rme,ime=["children","className","color","component","disabled","error","filled","focused","required"],ome=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:l}=e,c={root:["root",`color${ke(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return Ct(c,nme,t)},sme=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Gx.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Gx.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Gx.error}`]:{color:(e.vars||e).palette.error.main}})),ame=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Gx.error}`]:{color:(e.vars||e).palette.error.main}})),lme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,l=Le(r,ime),c=Nd(),d=yp({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=$({},r,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=ome(f);return C.jsxs(sme,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},l,{children:[i,d.required&&C.jsxs(ame,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),ume=lme,cme=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function E$(e){return`scale(${e}, ${e**2})`}const dme={entering:{opacity:1,transform:E$(1)},entered:{opacity:1,transform:"none"}},yD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),CY=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:l,onEnter:c,onEntered:d,onEntering:f,onExit:h,onExited:p,onExiting:g,style:v,timeout:y="auto",TransitionComponent:S=W5}=t,_=Le(t,cme),b=O.useRef(),x=O.useRef(),E=Pn(),I=O.useRef(null),A=mr(I,o.ref,n),R=F=>z=>{if(F){const V=I.current;z===void 0?F(V):F(V,z)}},M=R(f),L=R((F,z)=>{tY(F);const{duration:V,delay:W,easing:K}=eg({style:v,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=Y):Y=V,F.style.transition=[E.transitions.create("opacity",{duration:Y,delay:W}),E.transitions.create("transform",{duration:yD?Y:Y*.666,delay:W,easing:K})].join(","),c&&c(F,z)}),B=R(d),H=R(g),G=R(F=>{const{duration:z,delay:V,easing:W}=eg({style:v,timeout:y,easing:s},{mode:"exit"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=K):K=z,F.style.transition=[E.transitions.create("opacity",{duration:K,delay:V}),E.transitions.create("transform",{duration:yD?K:K*.666,delay:yD?V:V||K*.333,easing:W})].join(","),F.style.opacity=0,F.style.transform=E$(.75),h&&h(F)}),U=R(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(I.current,F)};return O.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:l,nodeRef:I,onEnter:L,onEntered:B,onEntering:M,onExit:G,onExited:U,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},_,{children:(F,z)=>O.cloneElement(o,$({style:$({opacity:0,transform:E$(.75),visibility:F==="exited"&&!l?"hidden":void 0},dme[F],v,o.props.style),ref:A},z))}))});CY.muiSupportAuto=!0;const rE=CY;function fme(e,t,n,r,i){const[o,s]=O.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Eo(()=>{let l=!0;if(!n)return;const c=n(e),d=()=>{l&&s(c.matches)};return d(),c.addListener(d),()=>{l=!1,c.removeListener(d)}},[e,n]),o}const TY=CS["useSyncExternalStore"];function hme(e,t,n,r,i){const o=O.useCallback(()=>t,[t]),s=O.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:f}=r(e);return()=>f}return o},[o,e,r,i,n]),[l,c]=O.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return TY(c,l,s)}function pme(e,t={}){const n=jC(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=GV({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(TY!==void 0?hme:fme)(c,i,o,s,l)}const mme=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],gme=e=>{const{classes:t,disableUnderline:n}=e,i=Ct({root:["root",!n&&"underline"],input:["input"]},$fe,t);return $({},t,i)},vme=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),$({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Fy.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fy.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Fy.disabled}, .${Fy.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Fy.disabled}:before`]:{borderBottomStyle:"dotted"}})}),yme=Ee(ST,{name:"MuiInput",slot:"Input",overridesResolver:wT})({}),IY=O.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=l,_=Le(l,mme),b=gme(l),E={root:{ownerState:{disableUnderline:c}}},I=v??f?Bo(v??f,E):E,A=(r=(i=y.root)!=null?i:d.Root)!=null?r:vme,R=(o=(s=y.input)!=null?s:d.Input)!=null?o:yme;return C.jsx(ET,$({slots:{root:A,input:R},slotProps:I,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},_,{classes:b}))});IY.muiName="Input";const RY=IY;function xme(e){return _t("MuiInputLabel",e)}Tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const bme=["disableAnimation","margin","shrink","variant","className"],wme=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:l}=e,c={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${ke(r)}`,s],asterisk:[l&&"asterisk"]},d=Ct(c,xme,t);return $({},t,d)},_me=Ee(ume,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gx.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})(({theme:e,ownerState:t})=>$({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&$({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&$({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&$({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Sme=O.forwardRef(function(t,n){const r=It({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,l=Le(r,bme),c=Nd();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=yp({props:r,muiFormControl:c,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),p=wme(h);return C.jsx(_me,$({"data-shrink":d,ownerState:h,ref:n,className:Ue(p.root,s)},l,{classes:p}))}),Eme=Sme;function Cme(e){return _t("MuiLinearProgress",e)}Tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Tme=["className","color","value","valueBuffer","variant"];let kg=e=>e,_8,S8,E8,C8,T8,I8;const C$=4,Ime=Od(_8||(_8=kg` 0% { left: -35%; right: 100%; @@ -174,7 +174,7 @@ Error generating stack: `+o.message+` left: 100%; right: -90%; } -`)),Ime=Od(S8||(S8=kg` +`)),Rme=Od(S8||(S8=kg` 0% { left: -200%; right: 100%; @@ -189,7 +189,7 @@ Error generating stack: `+o.message+` left: 107%; right: -8%; } -`)),Rme=Od(E8||(E8=kg` +`)),Ame=Od(E8||(E8=kg` 0% { opacity: 1; background-position: 0 -23px; @@ -204,15 +204,15 @@ Error generating stack: `+o.message+` opacity: 1; background-position: -200px -23px; } -`)),Ame=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${ke(r)}`,n],dashed:["dashed",`dashedColor${ke(r)}`],bar1:["bar",`barColor${ke(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${ke(r)}`,n==="buffer"&&`color${ke(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Ct(i,Eme,t)},n4=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Rg(e.palette[t].main,.62):Ig(e.palette[t].main,.5),Pme=Ee("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ke(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:n4(t,e.color)},e.color==="inherit"&&e.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},e.variant==="buffer"&&{backgroundColor:"transparent"},e.variant==="query"&&{transform:"rotate(180deg)"})),Ome=Ee("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${ke(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=n4(t,e.color);return $({position:"absolute",marginTop:0,height:"100%",width:"100%"},e.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},Tg(C8||(C8=kg` +`)),Pme=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${ke(r)}`,n],dashed:["dashed",`dashedColor${ke(r)}`],bar1:["bar",`barColor${ke(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${ke(r)}`,n==="buffer"&&`color${ke(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Ct(i,Cme,t)},n4=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Rg(e.palette[t].main,.62):Ig(e.palette[t].main,.5),Ome=Ee("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ke(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:n4(t,e.color)},e.color==="inherit"&&e.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},e.variant==="buffer"&&{backgroundColor:"transparent"},e.variant==="query"&&{transform:"rotate(180deg)"})),Mme=Ee("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${ke(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=n4(t,e.color);return $({position:"absolute",marginTop:0,height:"100%",width:"100%"},e.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},Tg(C8||(C8=kg` animation: ${0} 3s infinite linear; - `),Rme)),Mme=Ee("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${ke(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.variant==="determinate"&&{transition:`transform .${C$}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${C$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Tg(T8||(T8=kg` + `),Ame)),kme=Ee("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${ke(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.variant==="determinate"&&{transition:`transform .${C$}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${C$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Tg(T8||(T8=kg` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `),Tme)),kme=Ee("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${ke(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:n4(t,e.color),transition:`transform .${C$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Tg(I8||(I8=kg` + `),Ime)),Dme=Ee("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${ke(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:n4(t,e.color),transition:`transform .${C$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Tg(I8||(I8=kg` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `),Ime)),Dme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,d=Le(r,Cme),f=$({},r,{color:o,variant:c}),h=Ame(f),p=Pn(),g={},v={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(Pme,$({className:Ue(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},d,{children:[c==="buffer"?C.jsx(Ome,{className:h.dashed,ownerState:f}):null,C.jsx(Mme,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(kme,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),Lme=Dme,Bme=O.createContext({}),ta=Bme;function Nme(e){return _t("MuiList",e)}Tt("MuiList",["root","padding","dense","subheader"]);const $me=["children","className","component","dense","disablePadding","subheader"],Fme=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ct({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Nme,t)},zme=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Ume=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,f=Le(r,$me),h=O.useMemo(()=>({dense:l}),[l]),p=$({},r,{component:s,dense:l,disablePadding:c}),g=Fme(p);return C.jsx(ta.Provider,{value:h,children:C.jsxs(zme,$({as:s,className:Ue(g.root,o),ref:n,ownerState:p},f,{children:[d,i]}))})}),sg=Ume;function jme(e){return _t("MuiListItem",e)}const Hme=Tt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Gp=Hme;function Wme(e){return _t("MuiListItemButton",e)}const Gme=Tt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Vp=Gme,Vme=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Xme=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},qme=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:l}=e,d=Ct({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},Wme,n);return $({},n,d)},Yme=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Xme})(({theme:e,ownerState:t})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Vp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Vp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Vp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Vp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Vp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:l,dense:c=!1,disableGutters:d=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Le(r,Vme),y=O.useContext(ta),S=O.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:d}),[i,y.dense,c,d]),_=O.useRef(null);Eo(()=>{o&&_.current&&_.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:d,divider:f,selected:p}),x=qme(b),E=mr(_,n);return C.jsx(ta.Provider,{value:S,children:C.jsx(Yme,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:Ue(x.focusVisible,h),ownerState:b,className:Ue(x.root,g)},v,{classes:x,children:l}))})}),T$=Kme;function Jme(e){return _t("MuiListItemSecondaryAction",e)}Tt("MuiListItemSecondaryAction",["root","disableGutters"]);const Qme=["className"],Zme=e=>{const{disableGutters:t,classes:n}=e;return Ct({root:["root",t&&"disableGutters"]},Jme,n)},ege=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),AY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,Qme),s=O.useContext(ta),l=$({},r,{disableGutters:s.disableGutters}),c=Zme(l);return C.jsx(ege,$({className:Ue(c.root,i),ownerState:l,ref:n},o))});AY.muiName="ListItemSecondaryAction";const tge=AY,nge=["className"],rge=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],ige=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},oge=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:d,selected:f}=e;return Ct({root:["root",i&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",d&&"secondaryAction",f&&"selected"],container:["container"]},jme,r)},sge=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:ige})(({theme:e,ownerState:t})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&$({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Vp.root}`]:{paddingRight:48}},{[`&.${Gp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Gp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Gp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Gp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),age=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),lge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:l,className:c,component:d,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:_=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:I=!1,slotProps:A={},slots:R={}}=r,M=Le(r.ContainerProps,nge),L=Le(r,rge),B=O.useContext(ta),H=O.useMemo(()=>({dense:v||B.dense||!1,alignItems:i,disableGutters:S}),[i,B.dense,v,S]),G=O.useRef(null);Eo(()=>{o&&G.current&&G.current.focus()},[o]);const U=O.Children.toArray(l),D=U.length&&z_(U[U.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:_,divider:b,hasSecondaryAction:D,selected:I}),z=oge(F),V=mr(G,n),W=R.root||f.Root||sge,K=A.root||h.root||{},Y=$({className:Ue(z.root,K.className,c),disabled:y},L);let Q=d||"li";return s&&(Y.component=d||"div",Y.focusVisibleClassName=Ue(Gp.focusVisible,x),Q=Ld),D?(Q=!Y.component&&!d?"div":Q,p==="li"&&(Q==="li"?Q="div":Y.component==="li"&&(Y.component="div")),C.jsx(ta.Provider,{value:H,children:C.jsxs(age,$({as:p,className:Ue(z.container,g),ref:V,ownerState:F},M,{children:[C.jsx(W,$({},K,!Ml(W)&&{as:Q,ownerState:$({},F,K.ownerState)},Y,{children:U})),U.pop()]}))})):C.jsx(ta.Provider,{value:H,children:C.jsxs(W,$({},K,{as:Q,ref:V},!Ml(W)&&{ownerState:$({},F,K.ownerState)},Y,{children:[U,E&&C.jsx(tge,{children:E})]}))})}),Vx=lge;function uge(e){return _t("MuiListItemAvatar",e)}Tt("MuiListItemAvatar",["root","alignItemsFlexStart"]);const cge=["className"],dge=e=>{const{alignItems:t,classes:n}=e;return Ct({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},uge,n)},fge=Ee("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>$({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),hge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Le(r,cge),s=O.useContext(ta),l=$({},r,{alignItems:s.alignItems}),c=dge(l);return C.jsx(fge,$({className:Ue(c.root,i),ownerState:l,ref:n},o))}),pge=hge;function mge(e){return _t("MuiListItemIcon",e)}const gge=Tt("MuiListItemIcon",["root","alignItemsFlexStart"]),R8=gge,vge=["className"],yge=e=>{const{alignItems:t,classes:n}=e;return Ct({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},mge,n)},xge=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),bge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,vge),s=O.useContext(ta),l=$({},r,{alignItems:s.alignItems}),c=yge(l);return C.jsx(xge,$({className:Ue(c.root,i),ownerState:l,ref:n},o))}),hd=bge;function wge(e){return _t("MuiListItemText",e)}const _ge=Tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),iE=_ge,Sge=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Ege=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Ct({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},wge,t)},Cge=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${iE.primary}`]:t.primary},{[`& .${iE.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>$({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Tge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:d,secondary:f,secondaryTypographyProps:h}=r,p=Le(r,Sge),{dense:g}=O.useContext(ta);let v=c??i,y=f;const S=$({},r,{disableTypography:s,inset:l,primary:!!v,secondary:!!y,dense:g}),_=Ege(S);return v!=null&&v.type!==qt&&!s&&(v=C.jsx(qt,$({variant:g?"body2":"body1",className:_.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:v}))),y!=null&&y.type!==qt&&!s&&(y=C.jsx(qt,$({variant:"body2",className:_.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(Cge,$({className:Ue(_.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),Dl=Tge,Ige=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function xD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function A8(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function PY(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function zy(e,t,n,r,i,o){let s=!1,l=i(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!PY(l,o)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const Rge=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,p=Le(t,Ige),g=O.useRef(null),v=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Eo(()=>{i&&g.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const I=!g.current.style.width;if(x.clientHeight{const E=g.current,I=x.key,A=Rr(E).activeElement;if(I==="ArrowDown")x.preventDefault(),zy(E,A,d,c,xD);else if(I==="ArrowUp")x.preventDefault(),zy(E,A,d,c,A8);else if(I==="Home")x.preventDefault(),zy(E,null,d,c,xD);else if(I==="End")x.preventDefault(),zy(E,null,d,c,A8);else if(I.length===1){const R=v.current,M=I.toLowerCase(),L=performance.now();R.keys.length>0&&(L-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&M!==R.keys[0]&&(R.repeating=!1)),R.lastTime=L,R.keys.push(M);const B=A&&!R.repeating&&PY(A,R);R.previousKeyMatched&&(B||zy(E,A,!1,c,xD,R))?x.preventDefault():R.previousKeyMatched=!1}f&&f(x)},S=mr(g,n);let _=-1;O.Children.forEach(s,(x,E)=>{if(!O.isValidElement(x)){_===E&&(_+=1,_>=s.length&&(_=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||_===-1)&&(_=E),_===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(_+=1,_>=s.length&&(_=-1))});const b=O.Children.map(s,(x,E)=>{if(E===_){const I={};return o&&(I.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(I.tabIndex=0),O.cloneElement(x,I)}return x});return C.jsx(sg,$({role:"menu",ref:S,className:l,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),r4=Rge;function Age(e){return _t("MuiPopover",e)}Tt("MuiPopover",["root","paper"]);const Pge=["onEntering"],Oge=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Mge=["slotProps"];function P8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function O8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function M8(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function bD(e){return typeof e=="function"?e():e}const kge=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"]},Age,t)},Dge=Ee(wY,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),OY=Ee(Mg,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Lge=O.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:_,PaperProps:b={},slots:x,slotProps:E,transformOrigin:I={vertical:"top",horizontal:"left"},TransitionComponent:A=rE,transitionDuration:R="auto",TransitionProps:{onEntering:M}={},disableScrollLock:L=!1}=s,B=Le(s.TransitionProps,Pge),H=Le(s,Oge),G=(r=E==null?void 0:E.paper)!=null?r:b,U=O.useRef(),D=mr(U,G.ref),F=$({},s,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:G,transformOrigin:I,TransitionComponent:A,transitionDuration:R,TransitionProps:B}),z=kge(F),V=O.useCallback(()=>{if(h==="anchorPosition")return f;const be=bD(c),xe=(be&&be.nodeType===1?be:Rr(U.current).body).getBoundingClientRect();return{top:xe.top+P8(xe,d.vertical),left:xe.left+O8(xe,d.horizontal)}},[c,d.horizontal,d.vertical,f,h]),W=O.useCallback(be=>({vertical:P8(be,I.vertical),horizontal:O8(be,I.horizontal)}),[I.horizontal,I.vertical]),K=O.useCallback(be=>{const me={width:be.offsetWidth,height:be.offsetHeight},xe=W(me);if(h==="none")return{top:null,left:null,transformOrigin:M8(xe)};const Je=V();let Xe=Je.top-xe.vertical,at=Je.left-xe.horizontal;const Lt=Xe+me.height,Pe=at+me.width,Fe=lc(bD(c)),it=Fe.innerHeight-S,ht=Fe.innerWidth-S;if(S!==null&&Xeit){const pt=Lt-it;Xe-=pt,xe.vertical+=pt}if(S!==null&&atht){const pt=Pe-ht;at-=pt,xe.horizontal+=pt}return{top:`${Math.round(Xe)}px`,left:`${Math.round(at)}px`,transformOrigin:M8(xe)}},[c,h,V,W,S]),[Y,Q]=O.useState(_),re=O.useCallback(()=>{const be=U.current;if(!be)return;const me=K(be);me.top!==null&&(be.style.top=me.top),me.left!==null&&(be.style.left=me.left),be.style.transformOrigin=me.transformOrigin,Q(!0)},[K]);O.useEffect(()=>(L&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[c,L,re]);const ue=(be,me)=>{M&&M(be,me),re()},ce=()=>{Q(!1)};O.useEffect(()=>{_&&re()}),O.useImperativeHandle(l,()=>_?{updatePosition:()=>{re()}}:null,[_,re]),O.useEffect(()=>{if(!_)return;const be=vC(()=>{re()}),me=lc(c);return me.addEventListener("resize",be),()=>{be.clear(),me.removeEventListener("resize",be)}},[c,_,re]);let se=R;R==="auto"&&!A.muiSupportAuto&&(se=void 0);const J=v||(c?Rr(bD(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:Dge,le=(o=x==null?void 0:x.paper)!=null?o:OY,he=Wr({elementType:le,externalSlotProps:$({},G,{style:Y?G.style:$({},G.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:Ue(z.paper,G==null?void 0:G.className)}),pe=Wr({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:J,open:_},ownerState:F,className:Ue(z.root,g)}),{slotProps:ve}=pe,ye=Le(pe,Mge);return C.jsx(ae,$({},ye,!Ml(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(A,$({appear:!0,in:_,onEntering:ue,onExited:ce,timeout:se},B,{children:C.jsx(le,$({},he,{children:p}))}))}))}),Bge=Lge;function Nge(e){return _t("MuiMenu",e)}Tt("MuiMenu",["root","paper","list"]);const $ge=["onEntering"],Fge=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],zge={vertical:"top",horizontal:"right"},Uge={vertical:"top",horizontal:"left"},jge=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"],list:["list"]},Nge,t)},Hge=Ee(Bge,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wge=Ee(OY,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Gge=Ee(r4,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Vge=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:_="selectedMenu",slots:b={},slotProps:x={}}=o,E=Le(o.TransitionProps,$ge),I=Le(o,Fge),A=Pn(),R=A.direction==="rtl",M=$({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:_}),L=jge(M),B=s&&!d&&p,H=O.useRef(null),G=(K,Y)=>{H.current&&H.current.adjustStyleForScrollbar(K,A),S&&S(K,Y)},U=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;O.Children.map(l,(K,Y)=>{O.isValidElement(K)&&(K.props.disabled||(_==="selectedMenu"&&K.props.selected||D===-1)&&(D=Y))});const F=(r=b.paper)!=null?r:Wge,z=(i=x.paper)!=null?i:g,V=Wr({elementType:b.root,externalSlotProps:x.root,ownerState:M,className:[L.root,c]}),W=Wr({elementType:F,externalSlotProps:z,ownerState:M,className:L.paper});return C.jsx(Hge,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?zge:Uge,slots:{paper:F,root:b.root},slotProps:{root:V,paper:W},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:G},E),ownerState:M},I,{classes:v,children:C.jsx(Gge,$({onKeyDown:U,actions:H,autoFocus:s&&(D===-1||d),autoFocusItem:B,variant:_},f,{className:Ue(L.list,f.className),children:l}))}))}),Dg=Vge;function Xge(e){return _t("MuiMenuItem",e)}const qge=Tt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Uy=qge,Yge=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Kge=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Jge=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=Ct({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Xge,s);return $({},s,c)},Qge=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Kge})(({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Uy.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Uy.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Uy.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Uy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Uy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${x8.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${x8.inset}`]:{marginLeft:52},[`& .${iE.root}`]:{marginTop:0,marginBottom:0},[`& .${iE.inset}`]:{paddingLeft:36},[`& .${R8.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${R8.root} svg`]:{fontSize:"1.25rem"}}))),Zge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:p}=r,g=Le(r,Yge),v=O.useContext(ta),y=O.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=O.useRef(null);Eo(()=>{i&&S.current&&S.current.focus()},[i]);const _=$({},r,{dense:y.dense,divider:l,disableGutters:c}),b=Jge(r),x=mr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(ta.Provider,{value:y,children:C.jsx(Qge,$({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:Ue(b.focusVisible,d),className:Ue(b.root,p)},g,{ownerState:_,classes:b}))})}),pd=Zge;function eve(e){return _t("MuiNativeSelect",e)}const tve=Tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),i4=tve,nve=["className","disabled","error","IconComponent","inputRef","variant"],rve=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ke(n)}`,o&&"iconOpen",r&&"disabled"]};return Ct(l,eve,t)},MY=({ownerState:e,theme:t})=>$({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":$({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${i4.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),ive=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ca,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${i4.multiple}`]:t.multiple}]}})(MY),kY=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${i4.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),ove=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})(kY),sve=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:l,variant:c="standard"}=t,d=Le(t,nve),f=$({},t,{disabled:i,variant:c,error:o}),h=rve(f);return C.jsxs(O.Fragment,{children:[C.jsx(ive,$({ownerState:f,className:Ue(h.select,r),disabled:i,ref:l||n},d)),t.multiple?null:C.jsx(ove,{as:s,ownerState:f,className:h.icon})]})}),ave=sve;var k8;const lve=["children","classes","className","label","notched"],uve=Ee("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),cve=Ee("legend")(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function dve(e){const{className:t,label:n,notched:r}=e,i=Le(e,lve),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(uve,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(cve,{ownerState:s,children:o?C.jsx("span",{children:n}):k8||(k8=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const fve=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],hve=e=>{const{classes:t}=e,r=Ct({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ffe,t);return $({},t,r)},pve=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:bT})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return $({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ac.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Ac.focused} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Ac.error} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ac.disabled} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&$({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),mve=Ee(dve,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),gve=Ee(ST,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>$({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),DY=O.forwardRef(function(t,n){var r,i,o,s,l;const c=It({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,_=Le(c,fve),b=hve(c),x=Nd(),E=yp({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),I=$({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:g,size:E.size,type:S}),A=(r=(i=y.root)!=null?i:d.Root)!=null?r:pve,R=(o=(s=y.input)!=null?s:d.Input)!=null?o:gve;return C.jsx(ET,$({slots:{root:A,input:R},renderSuffix:M=>C.jsx(mve,{ownerState:I,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?l||(l=C.jsxs(O.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:f,inputComponent:h,multiline:g,ref:n,type:S},_,{classes:$({},b,{notchedOutline:null})}))});DY.muiName="Input";const LY=DY;function vve(e){return _t("MuiSelect",e)}const yve=Tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jy=yve;var D8;const xve=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],bve=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${jy.select}`]:t.select},{[`&.${jy.select}`]:t[n.variant]},{[`&.${jy.error}`]:t.error},{[`&.${jy.multiple}`]:t.multiple}]}})(MY,{[`&.${jy.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),wve=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})(kY),_ve=Ee("input",{shouldForwardProp:e=>J3(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function L8(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Sve(e){return e==null||typeof e=="string"&&!e.trim()}const Eve=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ke(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ct(l,vve,t)},Cve=O.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:l,children:c,className:d,defaultOpen:f,defaultValue:h,disabled:p,displayEmpty:g,error:v=!1,IconComponent:y,inputRef:S,labelId:_,MenuProps:b={},multiple:x,name:E,onBlur:I,onChange:A,onClose:R,onFocus:M,onOpen:L,open:B,readOnly:H,renderValue:G,SelectDisplayProps:U={},tabIndex:D,value:F,variant:z="standard"}=t,V=Le(t,xve),[W,K]=u1({controlled:F,default:h,name:"Select"}),[Y,Q]=u1({controlled:B,default:f,name:"Select"}),re=O.useRef(null),ue=O.useRef(null),[ce,se]=O.useState(null),{current:J}=O.useRef(B!=null),[ae,le]=O.useState(),he=mr(n,S),pe=O.useCallback(Re=>{ue.current=Re,Re&&se(Re)},[]),ve=ce==null?void 0:ce.parentNode;O.useImperativeHandle(he,()=>({focus:()=>{ue.current.focus()},node:re.current,value:W}),[W]),O.useEffect(()=>{f&&Y&&ce&&!J&&(le(l?null:ve.clientWidth),ue.current.focus())},[ce,l]),O.useEffect(()=>{s&&ue.current.focus()},[s]),O.useEffect(()=>{if(!_)return;const Re=Rr(ue.current).getElementById(_);if(Re){const ot=()=>{getSelection().isCollapsed&&ue.current.focus()};return Re.addEventListener("click",ot),()=>{Re.removeEventListener("click",ot)}}},[_]);const ye=(Re,ot)=>{Re?L&&L(ot):R&&R(ot),J||(le(l?null:ve.clientWidth),Q(Re))},be=Re=>{Re.button===0&&(Re.preventDefault(),ue.current.focus(),ye(!0,Re))},me=Re=>{ye(!1,Re)},xe=O.Children.toArray(c),Je=Re=>{const ot=xe.find(Bt=>Bt.props.value===Re.target.value);ot!==void 0&&(K(ot.props.value),A&&A(Re,ot))},Xe=Re=>ot=>{let Bt;if(ot.currentTarget.hasAttribute("tabindex")){if(x){Bt=Array.isArray(W)?W.slice():[];const Ae=W.indexOf(Re.props.value);Ae===-1?Bt.push(Re.props.value):Bt.splice(Ae,1)}else Bt=Re.props.value;if(Re.props.onClick&&Re.props.onClick(ot),W!==Bt&&(K(Bt),A)){const Ae=ot.nativeEvent||ot,je=new Ae.constructor(Ae.type,Ae);Object.defineProperty(je,"target",{writable:!0,value:{value:Bt,name:E}}),A(je,Re)}x||ye(!1,ot)}},at=Re=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Re.key)!==-1&&(Re.preventDefault(),ye(!0,Re))},Lt=ce!==null&&Y,Pe=Re=>{!Lt&&I&&(Object.defineProperty(Re,"target",{writable:!0,value:{value:W,name:E}}),I(Re))};delete V["aria-invalid"];let Fe,it;const ht=[];let pt=!1;(nE({value:W})||g)&&(G?Fe=G(W):pt=!0);const _e=xe.map(Re=>{if(!O.isValidElement(Re))return null;let ot;if(x){if(!Array.isArray(W))throw new Error(wd(2));ot=W.some(Bt=>L8(Bt,Re.props.value)),ot&&pt&&ht.push(Re.props.children)}else ot=L8(W,Re.props.value),ot&&pt&&(it=Re.props.children);return O.cloneElement(Re,{"aria-selected":ot?"true":"false",onClick:Xe(Re),onKeyUp:Bt=>{Bt.key===" "&&Bt.preventDefault(),Re.props.onKeyUp&&Re.props.onKeyUp(Bt)},role:"option",selected:ot,value:void 0,"data-value":Re.props.value})});pt&&(x?ht.length===0?Fe=null:Fe=ht.reduce((Re,ot,Bt)=>(Re.push(ot),Bt{const{classes:t}=e;return t},o4={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ca(e)&&e!=="variant",slot:"Root"},Pve=Ee(RY,o4)(""),Ove=Ee(LY,o4)(""),Mve=Ee(EY,o4)(""),BY=O.forwardRef(function(t,n){const r=It({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=Hfe,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:_=!1,native:b=!1,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:R,variant:M="outlined"}=r,L=Le(r,Ive),B=b?ave:Tve,H=Nd(),G=yp({props:r,muiFormControl:H,states:["variant","error"]}),U=G.variant||M,D=$({},r,{variant:U,classes:s}),F=Ave(D),z=Le(F,Rve),V=p||{standard:C.jsx(Pve,{ownerState:D}),outlined:C.jsx(Ove,{label:v,ownerState:D}),filled:C.jsx(Mve,{ownerState:D})}[U],W=mr(n,V.ref);return C.jsx(O.Fragment,{children:O.cloneElement(V,$({inputComponent:B,inputProps:$({children:o,error:G.error,IconComponent:f,variant:U,type:void 0,multiple:_},b?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:d,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:$({id:h},R)},g,{classes:g?Bo(z,g.classes):z},p?p.props.inputProps:{})},_&&b&&U==="outlined"?{notched:!0}:{},{ref:W,className:Ue(V.props.className,l,F.root)},!p&&{variant:U},L))})});BY.muiName="Select";const kve=BY,Dve=e=>!e||!Ml(e),Lve=Dve;function Bve(e){return _t("MuiSlider",e)}const Nve=Tt("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Xa=Nve,$ve=e=>{const{open:t}=e;return{offset:Ue(t&&Xa.valueLabelOpen),circle:Xa.valueLabelCircle,label:Xa.valueLabelLabel}};function Fve(e){const{children:t,className:n,value:r}=e,i=$ve(e);return t?O.cloneElement(t,{className:Ue(t.props.className)},C.jsxs(O.Fragment,{children:[t.props.children,C.jsx("span",{className:Ue(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const zve=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function B8(e){return e}const Uve=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ke(n.color)}`],n.size!=="medium"&&t[`size${ke(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>$({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&$({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&$({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Xa.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Xa.dragging}`]:{[`& .${Xa.thumb}, & .${Xa.track}`]:{transition:"none"}}})),jve=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),Hve=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Rg(e.palette[t.color].main,.62):Ig(e.palette[t.color].main,.5);return $({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),Wve=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${ke(n.color)}`],n.size!=="medium"&&t[`thumbSize${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>$({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":$({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Xa.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Rn(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Xa.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Rn(e.palette[t.color].main,.16)}`},[`&.${Xa.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Gve=Ee(Fve,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${Xa.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),Vve=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>J3(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>$({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),Xve=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>J3(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>$({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),qve=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${ke(l)}`,c&&`size${ke(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${ke(c)}`,l&&`thumbColor${ke(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Ct(d,Bve,s)},Yve=({children:e})=>e,Kve=O.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,I,A,R,M,L,B;const H=It({props:t,name:"MuiSlider"}),U=Pn().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":z,component:V="span",components:W={},componentsProps:K={},color:Y="primary",classes:Q,className:re,disableSwap:ue=!1,disabled:ce=!1,getAriaLabel:se,getAriaValueText:J,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:be=B8,slotProps:me,slots:xe,track:Je="normal",valueLabelDisplay:Xe="off",valueLabelFormat:at=B8}=H,Lt=Le(H,zve),Pe=$({},H,{isRtl:U,max:le,min:he,classes:Q,disabled:ce,disableSwap:ue,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:be,track:Je,valueLabelDisplay:Xe,valueLabelFormat:at}),{axisProps:Fe,getRootProps:it,getHiddenInputProps:ht,getThumbProps:pt,open:_e,active:ze,axis:Ye,focusedThumbIndex:$e,range:Be,dragging:Rt,marks:ut,values:Re,trackOffset:ot,trackLeap:Bt,getThumbStyle:Ae}=gfe($({},Pe,{rootRef:n}));Pe.marked=ut.length>0&&ut.some(Hn=>Hn.label),Pe.dragging=Rt,Pe.focusedThumbIndex=$e;const je=qve(Pe),vt=(r=(i=xe==null?void 0:xe.root)!=null?i:W.Root)!=null?r:Uve,jt=(o=(s=xe==null?void 0:xe.rail)!=null?s:W.Rail)!=null?o:jve,pn=(l=(c=xe==null?void 0:xe.track)!=null?c:W.Track)!=null?l:Hve,$r=(d=(f=xe==null?void 0:xe.thumb)!=null?f:W.Thumb)!=null?d:Wve,Mr=(h=(p=xe==null?void 0:xe.valueLabel)!=null?p:W.ValueLabel)!=null?h:Gve,kr=(g=(v=xe==null?void 0:xe.mark)!=null?v:W.Mark)!=null?g:Vve,Fr=(y=(S=xe==null?void 0:xe.markLabel)!=null?S:W.MarkLabel)!=null?y:Xve,Jr=(_=(b=xe==null?void 0:xe.input)!=null?b:W.Input)!=null?_:"input",Vo=(x=me==null?void 0:me.root)!=null?x:K.root,Tc=(E=me==null?void 0:me.rail)!=null?E:K.rail,Ns=(I=me==null?void 0:me.track)!=null?I:K.track,Kl=(A=me==null?void 0:me.thumb)!=null?A:K.thumb,Jl=(R=me==null?void 0:me.valueLabel)!=null?R:K.valueLabel,Xd=(M=me==null?void 0:me.mark)!=null?M:K.mark,Xo=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,qd=(B=me==null?void 0:me.input)!=null?B:K.input,ro=Wr({elementType:vt,getSlotProps:it,externalSlotProps:Vo,externalForwardedProps:Lt,additionalProps:$({},Lve(vt)&&{as:V}),ownerState:$({},Pe,Vo==null?void 0:Vo.ownerState),className:[je.root,re]}),Ql=Wr({elementType:jt,externalSlotProps:Tc,ownerState:Pe,className:je.rail}),_i=Wr({elementType:pn,externalSlotProps:Ns,additionalProps:{style:$({},Fe[Ye].offset(ot),Fe[Ye].leap(Bt))},ownerState:$({},Pe,Ns==null?void 0:Ns.ownerState),className:je.track}),qo=Wr({elementType:$r,getSlotProps:pt,externalSlotProps:Kl,ownerState:$({},Pe,Kl==null?void 0:Kl.ownerState),className:je.thumb}),Yd=Wr({elementType:Mr,externalSlotProps:Jl,ownerState:$({},Pe,Jl==null?void 0:Jl.ownerState),className:je.valueLabel}),Yo=Wr({elementType:kr,externalSlotProps:Xd,ownerState:Pe,className:je.mark}),ha=Wr({elementType:Fr,externalSlotProps:Xo,ownerState:Pe,className:je.markLabel}),Ic=Wr({elementType:Jr,getSlotProps:ht,externalSlotProps:qd,ownerState:Pe});return C.jsxs(vt,$({},ro,{children:[C.jsx(jt,$({},Ql)),C.jsx(pn,$({},_i)),ut.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Qn)=>{const dl=tE(Hn.value,he,le),fl=Fe[Ye].offset(dl);let io;return Je===!1?io=Re.indexOf(Hn.value)!==-1:io=Je==="normal"&&(Be?Hn.value>=Re[0]&&Hn.value<=Re[Re.length-1]:Hn.value<=Re[0])||Je==="inverted"&&(Be?Hn.value<=Re[0]||Hn.value>=Re[Re.length-1]:Hn.value>=Re[0]),C.jsxs(O.Fragment,{children:[C.jsx(kr,$({"data-index":Qn},Yo,!Ml(kr)&&{markActive:io},{style:$({},fl,Yo.style),className:Ue(Yo.className,io&&je.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Qn},ha,!Ml(Fr)&&{markLabelActive:io},{style:$({},fl,ha.style),className:Ue(je.markLabel,ha.className,io&&je.markLabelActive),children:Hn.label})):null]},Qn)}),Re.map((Hn,Qn)=>{const dl=tE(Hn,he,le),fl=Fe[Ye].offset(dl),io=Xe==="off"?Yve:Mr;return C.jsx(io,$({},!Ml(io)&&{valueLabelFormat:at,valueLabelDisplay:Xe,value:typeof at=="function"?at(be(Hn),Qn):at,index:Qn,open:_e===Qn||ze===Qn||Xe==="on",disabled:ce},Yd,{children:C.jsx($r,$({"data-index":Qn},qo,{className:Ue(je.thumb,qo.className,ze===Qn&&je.active,$e===Qn&&je.focusVisible),style:$({},fl,Ae(Qn),qo.style),children:C.jsx(Jr,$({"data-index":Qn,"aria-label":se?se(Qn):D,"aria-valuenow":be(Hn),"aria-labelledby":z,"aria-valuetext":J?J(be(Hn),Qn):F,value:Re[Qn]},Ic))}))}),Qn)})]}))}),Jve=Kve;function Qve(e){return _t("MuiSnackbarContent",e)}Tt("MuiSnackbarContent",["root","message","action"]);const Zve=["action","className","message","role"],e0e=e=>{const{classes:t}=e;return Ct({root:["root"],action:["action"],message:["message"]},Qve,t)},t0e=Ee(Mg,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=wse(e.palette.background.default,t);return $({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),n0e=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),r0e=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),i0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,Zve),d=r,f=e0e(d);return C.jsxs(t0e,$({role:l,square:!0,elevation:6,className:Ue(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(n0e,{className:f.message,ownerState:d,children:s}),i?C.jsx(r0e,{className:f.action,ownerState:d,children:i}):null]}))}),o0e=i0e;function s0e(e){return _t("MuiSnackbar",e)}Tt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const a0e=["onEnter","onExited"],l0e=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],u0e=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ke(n.vertical)}${ke(n.horizontal)}`]};return Ct(r,s0e,t)},N8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ke(n.anchorOrigin.vertical)}${ke(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),c0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbar"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=rE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,I=Le(r.TransitionProps,a0e),A=Le(r,l0e),R=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),M=u0e(R),{getRootProps:L,onClickAway:B}=vfe($({},R)),[H,G]=O.useState(!0),U=Wr({elementType:N8,getSlotProps:L,externalForwardedProps:A,ownerState:R,additionalProps:{ref:n},className:[M.root,h]}),D=z=>{G(!0),E&&E(z)},F=(z,V)=>{G(!1),x&&x(z,V)};return!S&&H?null:C.jsx(Oce,$({onClickAway:B},p,{children:C.jsx(N8,$({},U,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},I,{children:f||C.jsx(o0e,$({message:y,action:s},g))}))}))}))}),d0e=c0e;function f0e(e){return _t("MuiTooltip",e)}const h0e=Tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Qc=h0e,p0e=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function m0e(e){return Math.round(e*1e5)/1e5}const g0e=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${ke(o.split("-")[0])}`],arrow:["arrow"]};return Ct(s,f0e,t)},v0e=Ee(pY,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>$({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Qc.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Qc.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Qc.arrow}`]:$({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Qc.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),y0e=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ke(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Rn(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${m0e(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Qc.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Qc.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Qc.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Qc.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),x0e=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Rn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Iw=!1,wD=null,Hy={x:0,y:0};function Rw(e,t){return n=>{t&&t(n),e(n)}}const b0e=O.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,I;const A=It({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:M,components:L={},componentsProps:B={},describeChild:H=!1,disableFocusListener:G=!1,disableHoverListener:U=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:z=100,enterNextDelay:V=0,enterTouchDelay:W=700,followCursor:K=!1,id:Y,leaveDelay:Q=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:ce,open:se,placement:J="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=rE,TransitionProps:be}=A,me=Le(A,p0e),xe=O.isValidElement(M)?M:C.jsx("span",{children:M}),Je=Pn(),Xe=Je.direction==="rtl",[at,Lt]=O.useState(),[Pe,Fe]=O.useState(null),it=O.useRef(!1),ht=D||K,pt=O.useRef(),_e=O.useRef(),ze=O.useRef(),Ye=O.useRef(),[$e,Be]=u1({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ut=O3(Y),Re=O.useRef(),ot=O.useCallback(()=>{Re.current!==void 0&&(document.body.style.WebkitUserSelect=Re.current,Re.current=void 0),clearTimeout(Ye.current)},[]);O.useEffect(()=>()=>{clearTimeout(pt.current),clearTimeout(_e.current),clearTimeout(ze.current),ot()},[ot]);const Bt=Kt=>{clearTimeout(wD),Iw=!0,Be(!0),ce&&!Rt&&ce(Kt)},Ae=Zi(Kt=>{clearTimeout(wD),wD=setTimeout(()=>{Iw=!1},800+Q),Be(!1),ue&&Rt&&ue(Kt),clearTimeout(pt.current),pt.current=setTimeout(()=>{it.current=!1},Je.transitions.duration.shortest)}),je=Kt=>{it.current&&Kt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(ze.current),z||Iw&&V?_e.current=setTimeout(()=>{Bt(Kt)},Iw?V:z):Bt(Kt))},vt=Kt=>{clearTimeout(_e.current),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ae(Kt)},Q)},{isFocusVisibleRef:jt,onBlur:pn,onFocus:$r,ref:Mr}=M3(),[,kr]=O.useState(!1),Fr=Kt=>{pn(Kt),jt.current===!1&&(kr(!1),vt(Kt))},Jr=Kt=>{at||Lt(Kt.currentTarget),$r(Kt),jt.current===!0&&(kr(!0),je(Kt))},Vo=Kt=>{it.current=!0;const vr=xe.props;vr.onTouchStart&&vr.onTouchStart(Kt)},Tc=je,Ns=vt,Kl=Kt=>{Vo(Kt),clearTimeout(ze.current),clearTimeout(pt.current),ot(),Re.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Re.current,je(Kt)},W)},Jl=Kt=>{xe.props.onTouchEnd&&xe.props.onTouchEnd(Kt),ot(),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ae(Kt)},re)};O.useEffect(()=>{if(!Rt)return;function Kt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Ae(vr)}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Ae,Rt]);const Xd=mr(xe.ref,Mr,Lt,n);!ve&&ve!==0&&(Rt=!1);const Xo=O.useRef(),qd=Kt=>{const vr=xe.props;vr.onMouseMove&&vr.onMouseMove(Kt),Hy={x:Kt.clientX,y:Kt.clientY},Xo.current&&Xo.current.update()},ro={},Ql=typeof ve=="string";H?(ro.title=!Rt&&Ql&&!U?ve:null,ro["aria-describedby"]=Rt?ut:null):(ro["aria-label"]=Ql?ve:null,ro["aria-labelledby"]=Rt&&!Ql?ut:null);const _i=$({},ro,me,xe.props,{className:Ue(me.className,xe.props.className),onTouchStart:Vo,ref:Xd},K?{onMouseMove:qd}:{}),qo={};F||(_i.onTouchStart=Kl,_i.onTouchEnd=Jl),U||(_i.onMouseOver=Rw(Tc,_i.onMouseOver),_i.onMouseLeave=Rw(Ns,_i.onMouseLeave),ht||(qo.onMouseOver=Tc,qo.onMouseLeave=Ns)),G||(_i.onFocus=Rw(Jr,_i.onFocus),_i.onBlur=Rw(Fr,_i.onBlur),ht||(qo.onFocus=Jr,qo.onBlur=Fr));const Yd=O.useMemo(()=>{var Kt;let vr=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(Kt=le.popperOptions)!=null&&Kt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Pe,le]),Yo=$({},A,{isRtl:Xe,arrow:R,disableInteractive:ht,placement:J,PopperComponentProp:ae,touch:it.current}),ha=g0e(Yo),Ic=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:v0e,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:rE,Qn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:y0e,dl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:x0e,fl=gx(Ic,$({},le,(p=he.popper)!=null?p:B.popper,{className:Ue(ha.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:B.popper)==null?void 0:g.className)}),Yo),io=gx(Hn,$({},be,(y=he.transition)!=null?y:B.transition),Yo),Zg=gx(Qn,$({},(S=he.tooltip)!=null?S:B.tooltip,{className:Ue(ha.tooltip,(_=(b=he.tooltip)!=null?b:B.tooltip)==null?void 0:_.className)}),Yo),ev=gx(dl,$({},(x=he.arrow)!=null?x:B.arrow,{className:Ue(ha.arrow,(E=(I=he.arrow)!=null?I:B.arrow)==null?void 0:E.className)}),Yo);return C.jsxs(O.Fragment,{children:[O.cloneElement(xe,_i),C.jsx(Ic,$({as:ae??pY,placement:J,anchorEl:K?{getBoundingClientRect:()=>({top:Hy.y,left:Hy.x,right:Hy.x,bottom:Hy.y,width:0,height:0})}:at,popperRef:Xo,open:at?Rt:!1,id:ut,transition:!0},qo,fl,{popperOptions:Yd,children:({TransitionProps:Kt})=>C.jsx(Hn,$({timeout:Je.transitions.duration.shorter},Kt,io,{children:C.jsxs(Qn,$({},Zg,{children:[ve,R?C.jsx(dl,$({},ev,{ref:Fe})):null]}))}))}))]})}),$d=b0e;function w0e(e){return _t("MuiSwitch",e)}const _0e=Tt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),vo=_0e,S0e=["className","color","edge","size","sx"],E0e=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${ke(n)}`,`size${ke(r)}`],switchBase:["switchBase",`color${ke(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Ct(l,w0e,t);return $({},t,c)},C0e=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${vo.thumb}`]:{width:16,height:16},[`& .${vo.switchBase}`]:{padding:4,[`&.${vo.checked}`]:{transform:"translateX(16px)"}}})),T0e=Ee(bY,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${vo.input}`]:t.input},n.color!=="default"&&t[`color${ke(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${vo.checked}`]:{transform:"translateX(20px)"},[`&.${vo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${vo.checked} + .${vo.track}`]:{opacity:.5},[`&.${vo.disabled} + .${vo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${vo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${vo.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${vo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Rg(e.palette[t.color].main,.62):Ig(e.palette[t.color].main,.55)}`}},[`&.${vo.checked} + .${vo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),I0e=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),R0e=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),A0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,S0e),f=$({},r,{color:o,edge:s,size:l}),h=E0e(f),p=C.jsx(R0e,{className:h.thumb,ownerState:f});return C.jsxs(C0e,{className:Ue(h.root,i),sx:c,ownerState:f,children:[C.jsx(T0e,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(I0e,{className:h.track,ownerState:f})]})}),ag=A0e;function P0e(e){return _t("MuiTab",e)}const O0e=Tt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),lh=O0e,M0e=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],k0e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${ke(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Ct(d,P0e,t)},D0e=Ee(Ld,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ke(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${lh.iconWrapper}`]:$({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${lh.selected}`]:{opacity:1},[`&.${lh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${lh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${lh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${lh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${lh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),L0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,M0e),I=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),A=k0e(I),R=c&&h&&O.isValidElement(c)?O.cloneElement(c,{className:Ue(A.iconWrapper,c.props.className)}):c,M=B=>{!y&&p&&p(B,b),g&&g(B)},L=B=>{S&&!y&&p&&p(B,b),v&&v(B)};return C.jsxs(D0e,$({focusRipple:!s,className:Ue(A.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:M,onFocus:L,ownerState:I,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(O.Fragment,{children:[R,h]}):C.jsxs(O.Fragment,{children:[h,R]}),f]}))}),mm=L0e;function B0e(e){return _t("MuiToolbar",e)}Tt("MuiToolbar",["root","gutters","regular","dense"]);const N0e=["className","component","disableGutters","variant"],$0e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Ct({root:["root",!n&&"gutters",r]},B0e,t)},F0e=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),z0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,N0e),d=$({},r,{component:o,disableGutters:s,variant:l}),f=$0e(d);return C.jsx(F0e,$({as:o,className:Ue(f.root,i),ref:n,ownerState:d},c))}),U0e=z0e,j0e=$t(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),H0e=$t(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function W0e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function G0e(e,t,n,r={},i=()=>{}){const{ease:o=W0e,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const V0e=["onChange"],X0e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function q0e(e){const{onChange:t}=e,n=Le(e,V0e),r=O.useRef(),i=O.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Eo(()=>{const s=vC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=lc(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),O.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:X0e,ref:i},n))}function Y0e(e){return _t("MuiTabScrollButton",e)}const K0e=Tt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),J0e=K0e,Q0e=["className","slots","slotProps","direction","orientation","disabled"],Z0e=e=>{const{classes:t,orientation:n,disabled:r}=e;return Ct({root:["root",n,r&&"disabled"]},Y0e,t)},eye=Ee(Ld,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>$({width:40,flexShrink:0,opacity:.8,[`&.${J0e.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),tye=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Q0e),p=Pn().direction==="rtl",g=$({isRtl:p},o),v=Z0e(g),y=(r=l.StartScrollButtonIcon)!=null?r:j0e,S=(i=l.EndScrollButtonIcon)!=null?i:H0e,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(eye,$({component:"div",className:Ue(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),nye=tye;function rye(e){return _t("MuiTabs",e)}const iye=Tt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),_D=iye,oye=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],$8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,F8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Aw=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(e,i);else{i.focus();return}}},sye=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Ct({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},rye,c)},aye=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${_D.scrollButtons}`]:t.scrollButtons},{[`& .${_D.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${_D.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),lye=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),uye=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),cye=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),dye=Ee(q0e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),z8={},fye=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabs"}),i=Pn(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=nye,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:I={},TabIndicatorProps:A={},TabScrollButtonProps:R={},textColor:M="primary",value:L,variant:B="standard",visibleScrollbar:H=!1}=r,G=Le(r,oye),U=B==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",z=D?"top":"left",V=D?"bottom":"right",W=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:M,variant:B,visibleScrollbar:H,fixed:!U,hideScrollbar:U&&!H,scrollableX:U&&!D,scrollableY:U&&D,centered:d&&!U,scrollButtonsHideMobile:!g}),Q=sye(Y),re=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:I.startScrollButtonIcon,ownerState:Y}),ue=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:I.endScrollButtonIcon,ownerState:Y}),[ce,se]=O.useState(!1),[J,ae]=O.useState(z8),[le,he]=O.useState(!1),[pe,ve]=O.useState(!1),[ye,be]=O.useState(!1),[me,xe]=O.useState({overflow:"hidden",scrollbarWidth:0}),Je=new Map,Xe=O.useRef(null),at=O.useRef(null),Lt=()=>{const Ae=Xe.current;let je;if(Ae){const jt=Ae.getBoundingClientRect();je={clientWidth:Ae.clientWidth,scrollLeft:Ae.scrollLeft,scrollTop:Ae.scrollTop,scrollLeftNormalized:Gre(Ae,i.direction),scrollWidth:Ae.scrollWidth,top:jt.top,bottom:jt.bottom,left:jt.left,right:jt.right}}let vt;if(Ae&&L!==!1){const jt=at.current.children;if(jt.length>0){const pn=jt[Je.get(L)];vt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:je,tabMeta:vt}},Pe=Zi(()=>{const{tabsMeta:Ae,tabMeta:je}=Lt();let vt=0,jt;if(D)jt="top",je&&Ae&&(vt=je.top-Ae.top+Ae.scrollTop);else if(jt=o?"right":"left",je&&Ae){const $r=o?Ae.scrollLeftNormalized+Ae.clientWidth-Ae.scrollWidth:Ae.scrollLeft;vt=(o?-1:1)*(je[jt]-Ae[jt]+$r)}const pn={[jt]:vt,[K]:je?je[K]:0};if(isNaN(J[jt])||isNaN(J[K]))ae(pn);else{const $r=Math.abs(J[jt]-pn[jt]),Mr=Math.abs(J[K]-pn[K]);($r>=1||Mr>=1)&&ae(pn)}}),Fe=(Ae,{animation:je=!0}={})=>{je?G0e(F,Xe.current,Ae,{duration:i.transitions.duration.standard}):Xe.current[F]=Ae},it=Ae=>{let je=Xe.current[F];D?je+=Ae:(je+=Ae*(o?-1:1),je*=o&&vV()==="reverse"?-1:1),Fe(je)},ht=()=>{const Ae=Xe.current[W];let je=0;const vt=Array.from(at.current.children);for(let jt=0;jtAe){jt===0&&(je=Ae);break}je+=pn[W]}return je},pt=()=>{it(-1*ht())},_e=()=>{it(ht())},ze=O.useCallback(Ae=>{xe({overflow:null,scrollbarWidth:Ae})},[]),Ye=()=>{const Ae={};Ae.scrollbarSizeListener=U?C.jsx(dye,{onChange:ze,className:Ue(Q.scrollableX,Q.hideScrollbar)}):null;const vt=U&&(b==="auto"&&(le||pe)||b===!0);return Ae.scrollButtonStart=vt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:S,direction:o?"right":"left",onClick:pt,disabled:!le},R,{className:Ue(Q.scrollButtons,R.className)})):null,Ae.scrollButtonEnd=vt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ue},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},R,{className:Ue(Q.scrollButtons,R.className)})):null,Ae},$e=Zi(Ae=>{const{tabsMeta:je,tabMeta:vt}=Lt();if(!(!vt||!je)){if(vt[z]je[V]){const jt=je[F]+(vt[V]-je[V]);Fe(jt,{animation:Ae})}}}),Be=Zi(()=>{U&&b!==!1&&be(!ye)});O.useEffect(()=>{const Ae=vC(()=>{Xe.current&&Pe()}),je=lc(Xe.current);je.addEventListener("resize",Ae);let vt;return typeof ResizeObserver<"u"&&(vt=new ResizeObserver(Ae),Array.from(at.current.children).forEach(jt=>{vt.observe(jt)})),()=>{Ae.clear(),je.removeEventListener("resize",Ae),vt&&vt.disconnect()}},[Pe]),O.useEffect(()=>{const Ae=Array.from(at.current.children),je=Ae.length;if(typeof IntersectionObserver<"u"&&je>0&&U&&b!==!1){const vt=Ae[0],jt=Ae[je-1],pn={root:Xe.current,threshold:.99},$r=Jr=>{he(!Jr[0].isIntersecting)},Mr=new IntersectionObserver($r,pn);Mr.observe(vt);const kr=Jr=>{ve(!Jr[0].isIntersecting)},Fr=new IntersectionObserver(kr,pn);return Fr.observe(jt),()=>{Mr.disconnect(),Fr.disconnect()}}},[U,b,ye,f==null?void 0:f.length]),O.useEffect(()=>{se(!0)},[]),O.useEffect(()=>{Pe()}),O.useEffect(()=>{$e(z8!==J)},[$e,J]),O.useImperativeHandle(c,()=>({updateIndicator:Pe,updateScrollButtons:Be}),[Pe,Be]);const Rt=C.jsx(cye,$({},A,{className:Ue(Q.indicator,A.className),ownerState:Y,style:$({},J,A.style)}));let ut=0;const Re=O.Children.map(f,Ae=>{if(!O.isValidElement(Ae))return null;const je=Ae.props.value===void 0?ut:Ae.props.value;Je.set(je,ut);const vt=je===L;return ut+=1,O.cloneElement(Ae,$({fullWidth:B==="fullWidth",indicator:vt&&!ce&&Rt,selected:vt,selectionFollowsFocus:x,onChange:y,textColor:M,value:je},ut===1&&L===!1&&!Ae.props.tabIndex?{tabIndex:0}:{}))}),ot=Ae=>{const je=at.current,vt=Rr(je).activeElement;if(vt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Ae.key){case pn:Ae.preventDefault(),Aw(je,vt,F8);break;case $r:Ae.preventDefault(),Aw(je,vt,$8);break;case"Home":Ae.preventDefault(),Aw(je,null,$8);break;case"End":Ae.preventDefault(),Aw(je,null,F8);break}},Bt=Ye();return C.jsxs(aye,$({className:Ue(Q.root,h),ownerState:Y,ref:n,as:p},G,{children:[Bt.scrollButtonStart,Bt.scrollbarSizeListener,C.jsxs(lye,{className:Q.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:Xe,children:[C.jsx(uye,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Re}),ce&&Rt]}),Bt.scrollButtonEnd]}))}),hye=fye;function pye(e){return _t("MuiTextField",e)}Tt("MuiTextField",["root"]);const mye=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],gye={standard:RY,filled:EY,outlined:LY},vye=e=>{const{classes:t}=e;return Ct({root:["root"]},pye,t)},yye=Ee($pe,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xye=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:I,minRows:A,multiline:R=!1,name:M,onBlur:L,onChange:B,onFocus:H,placeholder:G,required:U=!1,rows:D,select:F=!1,SelectProps:z,type:V,value:W,variant:K="outlined"}=r,Y=Le(r,mye),Q=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:R,required:U,select:F,variant:K}),re=vye(Q),ue={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ue.notched=S.shrink),ue.label=E),F&&((!z||!z.native)&&(ue.id=void 0),ue["aria-describedby"]=void 0);const ce=O3(y),se=v&&ce?`${ce}-helper-text`:void 0,J=E&&ce?`${ce}-label`:void 0,ae=gye[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:R,name:M,rows:D,maxRows:I,minRows:A,type:V,value:W,id:ce,inputRef:x,onBlur:L,onChange:B,onFocus:H,placeholder:G,inputProps:_},ue,b));return C.jsxs(yye,$({className:Ue(re.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:U,color:c,variant:K,ownerState:Q},Y,{children:[E!=null&&E!==""&&C.jsx(Sme,$({htmlFor:ce,id:J},S,{children:E})),F?C.jsx(kve,$({"aria-describedby":se,id:ce,labelId:J,value:W,input:le},z,{children:s})):le,v&&C.jsx(eme,$({id:se},p,{children:v}))]}))}),Cb=xye;var NY,U8=Og;NY=U8.createRoot,U8.hydrateRoot;function wn({vertical:e,...t}){return C.jsx(Pt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const $Y=$t([C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"},"0"),C.jsx("path",{d:"M7 5v4H4V5h3m13 0v4h-3V5h3m0 10v4h-3v-4h3",opacity:".3"},"1")],"AccountTreeTwoTone"),bye=$t(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),wye=$t(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),FY=$t(C.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),_ye=$t(C.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1z"}),"ArrowOutwardRounded"),Sye=$t([C.jsx("path",{d:"M14 7.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"0"),C.jsx("circle",{cx:"14",cy:"10",r:"1"},"1"),C.jsx("circle",{cx:"14",cy:"14",r:"1"},"2"),C.jsx("path",{d:"M10 16.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"3"),C.jsx("circle",{cx:"10",cy:"10",r:"1"},"4"),C.jsx("path",{d:"M7 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"5"),C.jsx("circle",{cx:"10",cy:"14",r:"1"},"6"),C.jsx("path",{d:"M10 7.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm4 9c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0 4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"7")],"BlurCircularTwoTone"),Eye=$t([C.jsx("circle",{cx:"14",cy:"10",r:"1.5"},"0"),C.jsx("circle",{cx:"14",cy:"18",r:"1"},"1"),C.jsx("circle",{cx:"14",cy:"14",r:"1.5"},"2"),C.jsx("circle",{cx:"14",cy:"6",r:"1"},"3"),C.jsx("path",{d:"M3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14.5 3c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5zM21 14.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"4"),C.jsx("circle",{cx:"18",cy:"18",r:"1"},"5"),C.jsx("path",{d:"M13.5 21c0 .28.22.5.5.5s.5-.22.5-.5-.22-.5-.5-.5-.5.22-.5.5zM21 10.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"6"),C.jsx("circle",{cx:"18",cy:"14",r:"1"},"7"),C.jsx("circle",{cx:"18",cy:"6",r:"1"},"8"),C.jsx("circle",{cx:"6",cy:"18",r:"1"},"9"),C.jsx("circle",{cx:"6",cy:"14",r:"1"},"10"),C.jsx("path",{d:"M3.5 14c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5z"},"11"),C.jsx("circle",{cx:"10",cy:"6",r:"1"},"12"),C.jsx("circle",{cx:"6",cy:"10",r:"1"},"13"),C.jsx("circle",{cx:"6",cy:"6",r:"1"},"14"),C.jsx("path",{d:"M9.5 21c0 .28.22.5.5.5s.5-.22.5-.5-.22-.5-.5-.5-.5.22-.5.5z"},"15"),C.jsx("circle",{cx:"10",cy:"18",r:"1"},"16"),C.jsx("path",{d:"M10.5 3c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5z"},"17"),C.jsx("circle",{cx:"10",cy:"14",r:"1.5"},"18"),C.jsx("circle",{cx:"10",cy:"10",r:"1.5"},"19"),C.jsx("circle",{cx:"18",cy:"10",r:"1"},"20")],"BlurOnTwoTone"),Cye=$t([C.jsx("path",{d:"M15.83 9.65 15.46 9c-.3-.53-.71-.96-1.21-1.31l-.61-.42-.68-.16C12.63 7.04 12.32 7 12 7c-.31 0-.63.04-.94.11l-.74.18-.57.4c-.49.34-.91.79-1.21 1.31l-.37.65-.1.65c-.04.23-.07.48-.07.7v4c0 .22.03.47.07.7l.1.65.37.65c.72 1.24 2.04 2 3.46 2s2.74-.77 3.46-2l.37-.64.1-.65c.04-.24.07-.49.07-.71v-4c0-.22-.03-.47-.07-.7l-.1-.65zM14 16h-4v-2h4v2zm0-4h-4v-2h4v2z",opacity:".3"},"0"),C.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.47 8 15.22 8 15v-4c0-.22.03-.47.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"},"1")],"BugReportTwoTone"),Tye=$t([C.jsx("circle",{cx:"12",cy:"12",r:"3",opacity:".3"},"0"),C.jsx("path",{d:"M7 12c0 2.76 2.24 5 5 5s5-2.24 5-5-2.24-5-5-5-5 2.24-5 5zm8 0c0 1.65-1.35 3-3 3s-3-1.35-3-3 1.35-3 3-3 3 1.35 3 3zM3 19c0 1.1.9 2 2 2h4v-2H5v-4H3v4zM3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm18 0c0-1.1-.9-2-2-2h-4v2h4v4h2V5zm-2 14h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"},"1")],"CenterFocusStrongTwoTone"),Iye=$t(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),zY=$t(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined"),Rye=$t(C.jsx("path",{d:"M3 19c0 1.1.9 2 2 2h4v-2H5v-4H3v4zM21 5c0-1.1-.9-2-2-2h-4v2h4v4h2V5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm16 14v-4h-2v4h-4v2h4c1.1 0 2-.9 2-2z"}),"CropFreeTwoTone"),Aye=$t(C.jsx("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}),"DeleteOutlined"),Pye=$t(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),Oye=$t(C.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"}),"EditOutlined"),s4=$t([C.jsx("path",{d:"M5 18.08V19h.92l9.06-9.06-.92-.92z",opacity:".3"},"0"),C.jsx("path",{d:"M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29s-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83zM3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM5.92 19H5v-.92l9.06-9.06.92.92L5.92 19z"},"1")],"EditTwoTone"),Mye=$t(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),kye=$t([C.jsx("path",{d:"M15 14h3V9h-5V4H6v16h9z",opacity:".3"},"0"),C.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9v2zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66h2z"},"1")],"FileOpenTwoTone"),Dye=$t(C.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Lye=$t(C.jsx("path",{d:"M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.41L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.94 10.94C14.86 19.59 13.48 20 12 20zM7.94 5.12 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.86 20 13.48 20 12c0-4.41-3.59-8-8-8-1.48 0-2.86.41-4.06 1.12z"}),"HideSourceOutlined"),Bye=$t([C.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm1 13h-2v-6h2v6zm0-8h-2V7h2v2z",opacity:".3"},"0"),C.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},"1")],"InfoTwoTone"),Nye=$t(C.jsx("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"}),"LabelOutlined"),TT=$t([C.jsx("path",{d:"M6.26 9 12 13.47 17.74 9 12 4.53z",opacity:".3"},"0"),C.jsx("path",{d:"m19.37 12.8-7.38 5.74-7.37-5.73L3 14.07l9 7 9-7zM12 2 3 9l1.63 1.27L12 16l7.36-5.73L21 9l-9-7zm0 11.47L6.26 9 12 4.53 17.74 9 12 13.47z"},"1")],"LayersTwoTone"),UY=$t(C.jsx("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}),"ListTwoTone"),$ye=$t(C.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertOutlined"),Fye=$t(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),zye=$t(C.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}),"PlaceOutlined"),Uye=$t(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),jY=$t(C.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"ReplayOutlined"),jye=$t([C.jsx("path",{d:"M11 16c0 .55.45 1 1 1s1-.45 1-1v-2h-2v2zm-8 0c0 .55.45 1 1 1s1-.45 1-1v-2H3v2zm16 0c0 .55.45 1 1 1s1-.45 1-1v-2h-2v2z",opacity:".3"},"0"),C.jsx("path",{d:"M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v10c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16V6H5V2zm0 14c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4H3V8h2v4zm8-10c0-.55-.45-1-1-1s-1 .45-1 1v4H9v10c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.42 2-1.52 2-2.82V6h-2V2zm0 14c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4h-2V8h2v4zm8-6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v10c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.42 2-1.52 2-2.82V6h-2zm0 10c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4h-2V8h2v4z"},"1")],"SettingsInputComponentTwoTone"),Hye=$t([C.jsx("path",{d:"m19.28 8.6-.7-1.21-1.27.51-1.06.43-.91-.7c-.39-.3-.8-.54-1.23-.71l-1.06-.43-.16-1.13L12.7 4h-1.4l-.19 1.35-.16 1.13-1.06.44c-.41.17-.82.41-1.25.73l-.9.68-1.05-.42-1.27-.52-.7 1.21 1.08.84.89.7-.14 1.13c-.03.3-.05.53-.05.73s.02.43.05.73l.14 1.13-.89.7-1.08.84.7 1.21 1.27-.51 1.06-.43.91.7c.39.3.8.54 1.23.71l1.06.43.16 1.13.19 1.36h1.39l.19-1.35.16-1.13 1.06-.43c.41-.17.82-.41 1.25-.73l.9-.68 1.04.42 1.27.51.7-1.21-1.08-.84-.89-.7.14-1.13c.04-.31.05-.52.05-.73 0-.21-.02-.43-.05-.73l-.14-1.13.89-.7 1.1-.84zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z",opacity:".3"},"0"),C.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},"1")],"SettingsTwoTone"),Wye=$t(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Gye=$t(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),tS=$t(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortTwoTone"),Vye=$t(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Xye=$t(C.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"}),"TripOriginOutlined"),j8=$t(C.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm0 6H5v-4h14v4zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 6H5V5h14v4z"}),"ViewAgendaOutlined"),HY=$t([C.jsx("path",{d:"m13 17.17 4-2.3v-4.63l-4 2.33zM12 6.25 8.04 8.53 12 10.84l3.96-2.31zm-5 8.62 4 2.3v-4.6l-4-2.33z",opacity:".3"},"0"),C.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2V4zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1zM20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3zm1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2v2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73zm-8 2.3-4-2.3v-4.63l4 2.33v4.6zm1-6.33L8.04 8.53 12 6.25l3.96 2.28L12 10.84zm5 4.03-4 2.3v-4.6l4-2.33v4.63z"},"1")],"ViewInArTwoTone"),qye=$t([C.jsx("path",{d:"M12 6c-3.79 0-7.17 2.13-8.82 5.5C4.83 14.87 8.21 17 12 17s7.17-2.13 8.82-5.5C19.17 8.13 15.79 6 12 6zm0 10c-2.48 0-4.5-2.02-4.5-4.5S9.52 7 12 7s4.5 2.02 4.5 4.5S14.48 16 12 16z",opacity:".3"},"0"),C.jsx("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 13c-3.79 0-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6s7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17zm0-10c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7zm0 7c-1.38 0-2.5-1.12-2.5-2.5S10.62 9 12 9s2.5 1.12 2.5 2.5S13.38 14 12 14z"},"1")],"VisibilityTwoTone"),Yye=$t(C.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"}),"WidgetsOutlined");var oE={exports:{}};/** + `),Rme)),Lme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,d=Le(r,Tme),f=$({},r,{color:o,variant:c}),h=Pme(f),p=Pn(),g={},v={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(Ome,$({className:Ue(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},d,{children:[c==="buffer"?C.jsx(Mme,{className:h.dashed,ownerState:f}):null,C.jsx(kme,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(Dme,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),Bme=Lme,Nme=O.createContext({}),ta=Nme;function $me(e){return _t("MuiList",e)}Tt("MuiList",["root","padding","dense","subheader"]);const Fme=["children","className","component","dense","disablePadding","subheader"],zme=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ct({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},$me,t)},Ume=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),jme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,f=Le(r,Fme),h=O.useMemo(()=>({dense:l}),[l]),p=$({},r,{component:s,dense:l,disablePadding:c}),g=zme(p);return C.jsx(ta.Provider,{value:h,children:C.jsxs(Ume,$({as:s,className:Ue(g.root,o),ref:n,ownerState:p},f,{children:[d,i]}))})}),sg=jme;function Hme(e){return _t("MuiListItem",e)}const Wme=Tt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Gp=Wme;function Gme(e){return _t("MuiListItemButton",e)}const Vme=Tt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Vp=Vme,Xme=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],qme=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Yme=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:l}=e,d=Ct({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},Gme,n);return $({},n,d)},Kme=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:qme})(({theme:e,ownerState:t})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Vp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Vp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Vp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Vp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Vp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Jme=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:l,dense:c=!1,disableGutters:d=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Le(r,Xme),y=O.useContext(ta),S=O.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:d}),[i,y.dense,c,d]),_=O.useRef(null);Eo(()=>{o&&_.current&&_.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:d,divider:f,selected:p}),x=Yme(b),E=mr(_,n);return C.jsx(ta.Provider,{value:S,children:C.jsx(Kme,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:Ue(x.focusVisible,h),ownerState:b,className:Ue(x.root,g)},v,{classes:x,children:l}))})}),T$=Jme;function Qme(e){return _t("MuiListItemSecondaryAction",e)}Tt("MuiListItemSecondaryAction",["root","disableGutters"]);const Zme=["className"],ege=e=>{const{disableGutters:t,classes:n}=e;return Ct({root:["root",t&&"disableGutters"]},Qme,n)},tge=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),AY=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,Zme),s=O.useContext(ta),l=$({},r,{disableGutters:s.disableGutters}),c=ege(l);return C.jsx(tge,$({className:Ue(c.root,i),ownerState:l,ref:n},o))});AY.muiName="ListItemSecondaryAction";const nge=AY,rge=["className"],ige=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],oge=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},sge=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:d,selected:f}=e;return Ct({root:["root",i&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",d&&"secondaryAction",f&&"selected"],container:["container"]},Hme,r)},age=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:oge})(({theme:e,ownerState:t})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&$({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Vp.root}`]:{paddingRight:48}},{[`&.${Gp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Gp.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Gp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Gp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gp.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),lge=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),uge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:l,className:c,component:d,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:_=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:I=!1,slotProps:A={},slots:R={}}=r,M=Le(r.ContainerProps,rge),L=Le(r,ige),B=O.useContext(ta),H=O.useMemo(()=>({dense:v||B.dense||!1,alignItems:i,disableGutters:S}),[i,B.dense,v,S]),G=O.useRef(null);Eo(()=>{o&&G.current&&G.current.focus()},[o]);const U=O.Children.toArray(l),D=U.length&&z_(U[U.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:_,divider:b,hasSecondaryAction:D,selected:I}),z=sge(F),V=mr(G,n),W=R.root||f.Root||age,K=A.root||h.root||{},Y=$({className:Ue(z.root,K.className,c),disabled:y},L);let Q=d||"li";return s&&(Y.component=d||"div",Y.focusVisibleClassName=Ue(Gp.focusVisible,x),Q=Ld),D?(Q=!Y.component&&!d?"div":Q,p==="li"&&(Q==="li"?Q="div":Y.component==="li"&&(Y.component="div")),C.jsx(ta.Provider,{value:H,children:C.jsxs(lge,$({as:p,className:Ue(z.container,g),ref:V,ownerState:F},M,{children:[C.jsx(W,$({},K,!Ml(W)&&{as:Q,ownerState:$({},F,K.ownerState)},Y,{children:U})),U.pop()]}))})):C.jsx(ta.Provider,{value:H,children:C.jsxs(W,$({},K,{as:Q,ref:V},!Ml(W)&&{ownerState:$({},F,K.ownerState)},Y,{children:[U,E&&C.jsx(nge,{children:E})]}))})}),Vx=uge;function cge(e){return _t("MuiListItemAvatar",e)}Tt("MuiListItemAvatar",["root","alignItemsFlexStart"]);const dge=["className"],fge=e=>{const{alignItems:t,classes:n}=e;return Ct({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},cge,n)},hge=Ee("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>$({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),pge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Le(r,dge),s=O.useContext(ta),l=$({},r,{alignItems:s.alignItems}),c=fge(l);return C.jsx(hge,$({className:Ue(c.root,i),ownerState:l,ref:n},o))}),mge=pge;function gge(e){return _t("MuiListItemIcon",e)}const vge=Tt("MuiListItemIcon",["root","alignItemsFlexStart"]),R8=vge,yge=["className"],xge=e=>{const{alignItems:t,classes:n}=e;return Ct({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},gge,n)},bge=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),wge=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,yge),s=O.useContext(ta),l=$({},r,{alignItems:s.alignItems}),c=xge(l);return C.jsx(bge,$({className:Ue(c.root,i),ownerState:l,ref:n},o))}),hd=wge;function _ge(e){return _t("MuiListItemText",e)}const Sge=Tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),iE=Sge,Ege=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Cge=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Ct({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},_ge,t)},Tge=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${iE.primary}`]:t.primary},{[`& .${iE.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>$({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Ige=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:d,secondary:f,secondaryTypographyProps:h}=r,p=Le(r,Ege),{dense:g}=O.useContext(ta);let v=c??i,y=f;const S=$({},r,{disableTypography:s,inset:l,primary:!!v,secondary:!!y,dense:g}),_=Cge(S);return v!=null&&v.type!==qt&&!s&&(v=C.jsx(qt,$({variant:g?"body2":"body1",className:_.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:v}))),y!=null&&y.type!==qt&&!s&&(y=C.jsx(qt,$({variant:"body2",className:_.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(Tge,$({className:Ue(_.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),Dl=Ige,Rge=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function xD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function A8(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function PY(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function zy(e,t,n,r,i,o){let s=!1,l=i(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!PY(l,o)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const Age=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,p=Le(t,Rge),g=O.useRef(null),v=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Eo(()=>{i&&g.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const I=!g.current.style.width;if(x.clientHeight{const E=g.current,I=x.key,A=Rr(E).activeElement;if(I==="ArrowDown")x.preventDefault(),zy(E,A,d,c,xD);else if(I==="ArrowUp")x.preventDefault(),zy(E,A,d,c,A8);else if(I==="Home")x.preventDefault(),zy(E,null,d,c,xD);else if(I==="End")x.preventDefault(),zy(E,null,d,c,A8);else if(I.length===1){const R=v.current,M=I.toLowerCase(),L=performance.now();R.keys.length>0&&(L-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&M!==R.keys[0]&&(R.repeating=!1)),R.lastTime=L,R.keys.push(M);const B=A&&!R.repeating&&PY(A,R);R.previousKeyMatched&&(B||zy(E,A,!1,c,xD,R))?x.preventDefault():R.previousKeyMatched=!1}f&&f(x)},S=mr(g,n);let _=-1;O.Children.forEach(s,(x,E)=>{if(!O.isValidElement(x)){_===E&&(_+=1,_>=s.length&&(_=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||_===-1)&&(_=E),_===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(_+=1,_>=s.length&&(_=-1))});const b=O.Children.map(s,(x,E)=>{if(E===_){const I={};return o&&(I.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(I.tabIndex=0),O.cloneElement(x,I)}return x});return C.jsx(sg,$({role:"menu",ref:S,className:l,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),r4=Age;function Pge(e){return _t("MuiPopover",e)}Tt("MuiPopover",["root","paper"]);const Oge=["onEntering"],Mge=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],kge=["slotProps"];function P8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function O8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function M8(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function bD(e){return typeof e=="function"?e():e}const Dge=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"]},Pge,t)},Lge=Ee(wY,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),OY=Ee(Mg,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Bge=O.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:_,PaperProps:b={},slots:x,slotProps:E,transformOrigin:I={vertical:"top",horizontal:"left"},TransitionComponent:A=rE,transitionDuration:R="auto",TransitionProps:{onEntering:M}={},disableScrollLock:L=!1}=s,B=Le(s.TransitionProps,Oge),H=Le(s,Mge),G=(r=E==null?void 0:E.paper)!=null?r:b,U=O.useRef(),D=mr(U,G.ref),F=$({},s,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:G,transformOrigin:I,TransitionComponent:A,transitionDuration:R,TransitionProps:B}),z=Dge(F),V=O.useCallback(()=>{if(h==="anchorPosition")return f;const be=bD(c),xe=(be&&be.nodeType===1?be:Rr(U.current).body).getBoundingClientRect();return{top:xe.top+P8(xe,d.vertical),left:xe.left+O8(xe,d.horizontal)}},[c,d.horizontal,d.vertical,f,h]),W=O.useCallback(be=>({vertical:P8(be,I.vertical),horizontal:O8(be,I.horizontal)}),[I.horizontal,I.vertical]),K=O.useCallback(be=>{const me={width:be.offsetWidth,height:be.offsetHeight},xe=W(me);if(h==="none")return{top:null,left:null,transformOrigin:M8(xe)};const Je=V();let Xe=Je.top-xe.vertical,at=Je.left-xe.horizontal;const Lt=Xe+me.height,Pe=at+me.width,Fe=lc(bD(c)),it=Fe.innerHeight-S,ht=Fe.innerWidth-S;if(S!==null&&Xeit){const pt=Lt-it;Xe-=pt,xe.vertical+=pt}if(S!==null&&atht){const pt=Pe-ht;at-=pt,xe.horizontal+=pt}return{top:`${Math.round(Xe)}px`,left:`${Math.round(at)}px`,transformOrigin:M8(xe)}},[c,h,V,W,S]),[Y,Q]=O.useState(_),re=O.useCallback(()=>{const be=U.current;if(!be)return;const me=K(be);me.top!==null&&(be.style.top=me.top),me.left!==null&&(be.style.left=me.left),be.style.transformOrigin=me.transformOrigin,Q(!0)},[K]);O.useEffect(()=>(L&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[c,L,re]);const ue=(be,me)=>{M&&M(be,me),re()},ce=()=>{Q(!1)};O.useEffect(()=>{_&&re()}),O.useImperativeHandle(l,()=>_?{updatePosition:()=>{re()}}:null,[_,re]),O.useEffect(()=>{if(!_)return;const be=vC(()=>{re()}),me=lc(c);return me.addEventListener("resize",be),()=>{be.clear(),me.removeEventListener("resize",be)}},[c,_,re]);let se=R;R==="auto"&&!A.muiSupportAuto&&(se=void 0);const J=v||(c?Rr(bD(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:Lge,le=(o=x==null?void 0:x.paper)!=null?o:OY,he=Wr({elementType:le,externalSlotProps:$({},G,{style:Y?G.style:$({},G.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:Ue(z.paper,G==null?void 0:G.className)}),pe=Wr({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:J,open:_},ownerState:F,className:Ue(z.root,g)}),{slotProps:ve}=pe,ye=Le(pe,kge);return C.jsx(ae,$({},ye,!Ml(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(A,$({appear:!0,in:_,onEntering:ue,onExited:ce,timeout:se},B,{children:C.jsx(le,$({},he,{children:p}))}))}))}),Nge=Bge;function $ge(e){return _t("MuiMenu",e)}Tt("MuiMenu",["root","paper","list"]);const Fge=["onEntering"],zge=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Uge={vertical:"top",horizontal:"right"},jge={vertical:"top",horizontal:"left"},Hge=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"],list:["list"]},$ge,t)},Wge=Ee(Nge,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gge=Ee(OY,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Vge=Ee(r4,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Xge=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:_="selectedMenu",slots:b={},slotProps:x={}}=o,E=Le(o.TransitionProps,Fge),I=Le(o,zge),A=Pn(),R=A.direction==="rtl",M=$({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:_}),L=Hge(M),B=s&&!d&&p,H=O.useRef(null),G=(K,Y)=>{H.current&&H.current.adjustStyleForScrollbar(K,A),S&&S(K,Y)},U=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;O.Children.map(l,(K,Y)=>{O.isValidElement(K)&&(K.props.disabled||(_==="selectedMenu"&&K.props.selected||D===-1)&&(D=Y))});const F=(r=b.paper)!=null?r:Gge,z=(i=x.paper)!=null?i:g,V=Wr({elementType:b.root,externalSlotProps:x.root,ownerState:M,className:[L.root,c]}),W=Wr({elementType:F,externalSlotProps:z,ownerState:M,className:L.paper});return C.jsx(Wge,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?Uge:jge,slots:{paper:F,root:b.root},slotProps:{root:V,paper:W},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:G},E),ownerState:M},I,{classes:v,children:C.jsx(Vge,$({onKeyDown:U,actions:H,autoFocus:s&&(D===-1||d),autoFocusItem:B,variant:_},f,{className:Ue(L.list,f.className),children:l}))}))}),Dg=Xge;function qge(e){return _t("MuiMenuItem",e)}const Yge=Tt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Uy=Yge,Kge=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Jge=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Qge=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=Ct({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},qge,s);return $({},s,c)},Zge=Ee(Ld,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Jge})(({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Uy.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Uy.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Uy.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Rn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Uy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Uy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${x8.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${x8.inset}`]:{marginLeft:52},[`& .${iE.root}`]:{marginTop:0,marginBottom:0},[`& .${iE.inset}`]:{paddingLeft:36},[`& .${R8.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${R8.root} svg`]:{fontSize:"1.25rem"}}))),eve=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:p}=r,g=Le(r,Kge),v=O.useContext(ta),y=O.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=O.useRef(null);Eo(()=>{i&&S.current&&S.current.focus()},[i]);const _=$({},r,{dense:y.dense,divider:l,disableGutters:c}),b=Qge(r),x=mr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(ta.Provider,{value:y,children:C.jsx(Zge,$({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:Ue(b.focusVisible,d),className:Ue(b.root,p)},g,{ownerState:_,classes:b}))})}),pd=eve;function tve(e){return _t("MuiNativeSelect",e)}const nve=Tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),i4=nve,rve=["className","disabled","error","IconComponent","inputRef","variant"],ive=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ke(n)}`,o&&"iconOpen",r&&"disabled"]};return Ct(l,tve,t)},MY=({ownerState:e,theme:t})=>$({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":$({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${i4.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),ove=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ca,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${i4.multiple}`]:t.multiple}]}})(MY),kY=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${i4.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),sve=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})(kY),ave=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:l,variant:c="standard"}=t,d=Le(t,rve),f=$({},t,{disabled:i,variant:c,error:o}),h=ive(f);return C.jsxs(O.Fragment,{children:[C.jsx(ove,$({ownerState:f,className:Ue(h.select,r),disabled:i,ref:l||n},d)),t.multiple?null:C.jsx(sve,{as:s,ownerState:f,className:h.icon})]})}),lve=ave;var k8;const uve=["children","classes","className","label","notched"],cve=Ee("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),dve=Ee("legend")(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function fve(e){const{className:t,label:n,notched:r}=e,i=Le(e,uve),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(cve,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(dve,{ownerState:s,children:o?C.jsx("span",{children:n}):k8||(k8=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const hve=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],pve=e=>{const{classes:t}=e,r=Ct({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},zfe,t);return $({},t,r)},mve=Ee(_T,{shouldForwardProp:e=>ca(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:bT})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return $({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ac.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Ac.focused} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Ac.error} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ac.disabled} .${Ac.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&$({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),gve=Ee(fve,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),vve=Ee(ST,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:wT})(({theme:e,ownerState:t})=>$({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),DY=O.forwardRef(function(t,n){var r,i,o,s,l;const c=It({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,_=Le(c,hve),b=pve(c),x=Nd(),E=yp({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),I=$({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:g,size:E.size,type:S}),A=(r=(i=y.root)!=null?i:d.Root)!=null?r:mve,R=(o=(s=y.input)!=null?s:d.Input)!=null?o:vve;return C.jsx(ET,$({slots:{root:A,input:R},renderSuffix:M=>C.jsx(gve,{ownerState:I,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?l||(l=C.jsxs(O.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:f,inputComponent:h,multiline:g,ref:n,type:S},_,{classes:$({},b,{notchedOutline:null})}))});DY.muiName="Input";const LY=DY;function yve(e){return _t("MuiSelect",e)}const xve=Tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jy=xve;var D8;const bve=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],wve=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${jy.select}`]:t.select},{[`&.${jy.select}`]:t[n.variant]},{[`&.${jy.error}`]:t.error},{[`&.${jy.multiple}`]:t.multiple}]}})(MY,{[`&.${jy.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),_ve=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})(kY),Sve=Ee("input",{shouldForwardProp:e=>J3(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function L8(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Eve(e){return e==null||typeof e=="string"&&!e.trim()}const Cve=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ke(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ct(l,yve,t)},Tve=O.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:l,children:c,className:d,defaultOpen:f,defaultValue:h,disabled:p,displayEmpty:g,error:v=!1,IconComponent:y,inputRef:S,labelId:_,MenuProps:b={},multiple:x,name:E,onBlur:I,onChange:A,onClose:R,onFocus:M,onOpen:L,open:B,readOnly:H,renderValue:G,SelectDisplayProps:U={},tabIndex:D,value:F,variant:z="standard"}=t,V=Le(t,bve),[W,K]=u1({controlled:F,default:h,name:"Select"}),[Y,Q]=u1({controlled:B,default:f,name:"Select"}),re=O.useRef(null),ue=O.useRef(null),[ce,se]=O.useState(null),{current:J}=O.useRef(B!=null),[ae,le]=O.useState(),he=mr(n,S),pe=O.useCallback(Re=>{ue.current=Re,Re&&se(Re)},[]),ve=ce==null?void 0:ce.parentNode;O.useImperativeHandle(he,()=>({focus:()=>{ue.current.focus()},node:re.current,value:W}),[W]),O.useEffect(()=>{f&&Y&&ce&&!J&&(le(l?null:ve.clientWidth),ue.current.focus())},[ce,l]),O.useEffect(()=>{s&&ue.current.focus()},[s]),O.useEffect(()=>{if(!_)return;const Re=Rr(ue.current).getElementById(_);if(Re){const ot=()=>{getSelection().isCollapsed&&ue.current.focus()};return Re.addEventListener("click",ot),()=>{Re.removeEventListener("click",ot)}}},[_]);const ye=(Re,ot)=>{Re?L&&L(ot):R&&R(ot),J||(le(l?null:ve.clientWidth),Q(Re))},be=Re=>{Re.button===0&&(Re.preventDefault(),ue.current.focus(),ye(!0,Re))},me=Re=>{ye(!1,Re)},xe=O.Children.toArray(c),Je=Re=>{const ot=xe.find(Bt=>Bt.props.value===Re.target.value);ot!==void 0&&(K(ot.props.value),A&&A(Re,ot))},Xe=Re=>ot=>{let Bt;if(ot.currentTarget.hasAttribute("tabindex")){if(x){Bt=Array.isArray(W)?W.slice():[];const Ae=W.indexOf(Re.props.value);Ae===-1?Bt.push(Re.props.value):Bt.splice(Ae,1)}else Bt=Re.props.value;if(Re.props.onClick&&Re.props.onClick(ot),W!==Bt&&(K(Bt),A)){const Ae=ot.nativeEvent||ot,je=new Ae.constructor(Ae.type,Ae);Object.defineProperty(je,"target",{writable:!0,value:{value:Bt,name:E}}),A(je,Re)}x||ye(!1,ot)}},at=Re=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Re.key)!==-1&&(Re.preventDefault(),ye(!0,Re))},Lt=ce!==null&&Y,Pe=Re=>{!Lt&&I&&(Object.defineProperty(Re,"target",{writable:!0,value:{value:W,name:E}}),I(Re))};delete V["aria-invalid"];let Fe,it;const ht=[];let pt=!1;(nE({value:W})||g)&&(G?Fe=G(W):pt=!0);const _e=xe.map(Re=>{if(!O.isValidElement(Re))return null;let ot;if(x){if(!Array.isArray(W))throw new Error(wd(2));ot=W.some(Bt=>L8(Bt,Re.props.value)),ot&&pt&&ht.push(Re.props.children)}else ot=L8(W,Re.props.value),ot&&pt&&(it=Re.props.children);return O.cloneElement(Re,{"aria-selected":ot?"true":"false",onClick:Xe(Re),onKeyUp:Bt=>{Bt.key===" "&&Bt.preventDefault(),Re.props.onKeyUp&&Re.props.onKeyUp(Bt)},role:"option",selected:ot,value:void 0,"data-value":Re.props.value})});pt&&(x?ht.length===0?Fe=null:Fe=ht.reduce((Re,ot,Bt)=>(Re.push(ot),Bt{const{classes:t}=e;return t},o4={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ca(e)&&e!=="variant",slot:"Root"},Ove=Ee(RY,o4)(""),Mve=Ee(LY,o4)(""),kve=Ee(EY,o4)(""),BY=O.forwardRef(function(t,n){const r=It({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=Wfe,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:_=!1,native:b=!1,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:R,variant:M="outlined"}=r,L=Le(r,Rve),B=b?lve:Ive,H=Nd(),G=yp({props:r,muiFormControl:H,states:["variant","error"]}),U=G.variant||M,D=$({},r,{variant:U,classes:s}),F=Pve(D),z=Le(F,Ave),V=p||{standard:C.jsx(Ove,{ownerState:D}),outlined:C.jsx(Mve,{label:v,ownerState:D}),filled:C.jsx(kve,{ownerState:D})}[U],W=mr(n,V.ref);return C.jsx(O.Fragment,{children:O.cloneElement(V,$({inputComponent:B,inputProps:$({children:o,error:G.error,IconComponent:f,variant:U,type:void 0,multiple:_},b?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:d,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:$({id:h},R)},g,{classes:g?Bo(z,g.classes):z},p?p.props.inputProps:{})},_&&b&&U==="outlined"?{notched:!0}:{},{ref:W,className:Ue(V.props.className,l,F.root)},!p&&{variant:U},L))})});BY.muiName="Select";const Dve=BY,Lve=e=>!e||!Ml(e),Bve=Lve;function Nve(e){return _t("MuiSlider",e)}const $ve=Tt("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Xa=$ve,Fve=e=>{const{open:t}=e;return{offset:Ue(t&&Xa.valueLabelOpen),circle:Xa.valueLabelCircle,label:Xa.valueLabelLabel}};function zve(e){const{children:t,className:n,value:r}=e,i=Fve(e);return t?O.cloneElement(t,{className:Ue(t.props.className)},C.jsxs(O.Fragment,{children:[t.props.children,C.jsx("span",{className:Ue(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const Uve=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function B8(e){return e}const jve=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ke(n.color)}`],n.size!=="medium"&&t[`size${ke(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>$({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&$({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&$({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Xa.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Xa.dragging}`]:{[`& .${Xa.thumb}, & .${Xa.track}`]:{transition:"none"}}})),Hve=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),Wve=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Rg(e.palette[t.color].main,.62):Ig(e.palette[t.color].main,.5);return $({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),Gve=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${ke(n.color)}`],n.size!=="medium"&&t[`thumbSize${ke(n.size)}`]]}})(({theme:e,ownerState:t})=>$({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":$({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Xa.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Rn(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Xa.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Rn(e.palette[t.color].main,.16)}`},[`&.${Xa.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Vve=Ee(zve,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${Xa.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),Xve=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>J3(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>$({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),qve=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>J3(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>$({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),Yve=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${ke(l)}`,c&&`size${ke(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${ke(c)}`,l&&`thumbColor${ke(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Ct(d,Nve,s)},Kve=({children:e})=>e,Jve=O.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,I,A,R,M,L,B;const H=It({props:t,name:"MuiSlider"}),U=Pn().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":z,component:V="span",components:W={},componentsProps:K={},color:Y="primary",classes:Q,className:re,disableSwap:ue=!1,disabled:ce=!1,getAriaLabel:se,getAriaValueText:J,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:be=B8,slotProps:me,slots:xe,track:Je="normal",valueLabelDisplay:Xe="off",valueLabelFormat:at=B8}=H,Lt=Le(H,Uve),Pe=$({},H,{isRtl:U,max:le,min:he,classes:Q,disabled:ce,disableSwap:ue,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:be,track:Je,valueLabelDisplay:Xe,valueLabelFormat:at}),{axisProps:Fe,getRootProps:it,getHiddenInputProps:ht,getThumbProps:pt,open:_e,active:ze,axis:Ye,focusedThumbIndex:$e,range:Be,dragging:Rt,marks:ut,values:Re,trackOffset:ot,trackLeap:Bt,getThumbStyle:Ae}=vfe($({},Pe,{rootRef:n}));Pe.marked=ut.length>0&&ut.some(Hn=>Hn.label),Pe.dragging=Rt,Pe.focusedThumbIndex=$e;const je=Yve(Pe),vt=(r=(i=xe==null?void 0:xe.root)!=null?i:W.Root)!=null?r:jve,jt=(o=(s=xe==null?void 0:xe.rail)!=null?s:W.Rail)!=null?o:Hve,pn=(l=(c=xe==null?void 0:xe.track)!=null?c:W.Track)!=null?l:Wve,$r=(d=(f=xe==null?void 0:xe.thumb)!=null?f:W.Thumb)!=null?d:Gve,Mr=(h=(p=xe==null?void 0:xe.valueLabel)!=null?p:W.ValueLabel)!=null?h:Vve,kr=(g=(v=xe==null?void 0:xe.mark)!=null?v:W.Mark)!=null?g:Xve,Fr=(y=(S=xe==null?void 0:xe.markLabel)!=null?S:W.MarkLabel)!=null?y:qve,Jr=(_=(b=xe==null?void 0:xe.input)!=null?b:W.Input)!=null?_:"input",Vo=(x=me==null?void 0:me.root)!=null?x:K.root,Tc=(E=me==null?void 0:me.rail)!=null?E:K.rail,Ns=(I=me==null?void 0:me.track)!=null?I:K.track,Kl=(A=me==null?void 0:me.thumb)!=null?A:K.thumb,Jl=(R=me==null?void 0:me.valueLabel)!=null?R:K.valueLabel,Xd=(M=me==null?void 0:me.mark)!=null?M:K.mark,Xo=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,qd=(B=me==null?void 0:me.input)!=null?B:K.input,ro=Wr({elementType:vt,getSlotProps:it,externalSlotProps:Vo,externalForwardedProps:Lt,additionalProps:$({},Bve(vt)&&{as:V}),ownerState:$({},Pe,Vo==null?void 0:Vo.ownerState),className:[je.root,re]}),Ql=Wr({elementType:jt,externalSlotProps:Tc,ownerState:Pe,className:je.rail}),_i=Wr({elementType:pn,externalSlotProps:Ns,additionalProps:{style:$({},Fe[Ye].offset(ot),Fe[Ye].leap(Bt))},ownerState:$({},Pe,Ns==null?void 0:Ns.ownerState),className:je.track}),qo=Wr({elementType:$r,getSlotProps:pt,externalSlotProps:Kl,ownerState:$({},Pe,Kl==null?void 0:Kl.ownerState),className:je.thumb}),Yd=Wr({elementType:Mr,externalSlotProps:Jl,ownerState:$({},Pe,Jl==null?void 0:Jl.ownerState),className:je.valueLabel}),Yo=Wr({elementType:kr,externalSlotProps:Xd,ownerState:Pe,className:je.mark}),ha=Wr({elementType:Fr,externalSlotProps:Xo,ownerState:Pe,className:je.markLabel}),Ic=Wr({elementType:Jr,getSlotProps:ht,externalSlotProps:qd,ownerState:Pe});return C.jsxs(vt,$({},ro,{children:[C.jsx(jt,$({},Ql)),C.jsx(pn,$({},_i)),ut.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Qn)=>{const dl=tE(Hn.value,he,le),fl=Fe[Ye].offset(dl);let io;return Je===!1?io=Re.indexOf(Hn.value)!==-1:io=Je==="normal"&&(Be?Hn.value>=Re[0]&&Hn.value<=Re[Re.length-1]:Hn.value<=Re[0])||Je==="inverted"&&(Be?Hn.value<=Re[0]||Hn.value>=Re[Re.length-1]:Hn.value>=Re[0]),C.jsxs(O.Fragment,{children:[C.jsx(kr,$({"data-index":Qn},Yo,!Ml(kr)&&{markActive:io},{style:$({},fl,Yo.style),className:Ue(Yo.className,io&&je.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Qn},ha,!Ml(Fr)&&{markLabelActive:io},{style:$({},fl,ha.style),className:Ue(je.markLabel,ha.className,io&&je.markLabelActive),children:Hn.label})):null]},Qn)}),Re.map((Hn,Qn)=>{const dl=tE(Hn,he,le),fl=Fe[Ye].offset(dl),io=Xe==="off"?Kve:Mr;return C.jsx(io,$({},!Ml(io)&&{valueLabelFormat:at,valueLabelDisplay:Xe,value:typeof at=="function"?at(be(Hn),Qn):at,index:Qn,open:_e===Qn||ze===Qn||Xe==="on",disabled:ce},Yd,{children:C.jsx($r,$({"data-index":Qn},qo,{className:Ue(je.thumb,qo.className,ze===Qn&&je.active,$e===Qn&&je.focusVisible),style:$({},fl,Ae(Qn),qo.style),children:C.jsx(Jr,$({"data-index":Qn,"aria-label":se?se(Qn):D,"aria-valuenow":be(Hn),"aria-labelledby":z,"aria-valuetext":J?J(be(Hn),Qn):F,value:Re[Qn]},Ic))}))}),Qn)})]}))}),Qve=Jve;function Zve(e){return _t("MuiSnackbarContent",e)}Tt("MuiSnackbarContent",["root","message","action"]);const e0e=["action","className","message","role"],t0e=e=>{const{classes:t}=e;return Ct({root:["root"],action:["action"],message:["message"]},Zve,t)},n0e=Ee(Mg,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=_se(e.palette.background.default,t);return $({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),r0e=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),i0e=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),o0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,e0e),d=r,f=t0e(d);return C.jsxs(n0e,$({role:l,square:!0,elevation:6,className:Ue(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(r0e,{className:f.message,ownerState:d,children:s}),i?C.jsx(i0e,{className:f.action,ownerState:d,children:i}):null]}))}),s0e=o0e;function a0e(e){return _t("MuiSnackbar",e)}Tt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const l0e=["onEnter","onExited"],u0e=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],c0e=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ke(n.vertical)}${ke(n.horizontal)}`]};return Ct(r,a0e,t)},N8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ke(n.anchorOrigin.vertical)}${ke(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),d0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbar"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=rE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,I=Le(r.TransitionProps,l0e),A=Le(r,u0e),R=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),M=c0e(R),{getRootProps:L,onClickAway:B}=yfe($({},R)),[H,G]=O.useState(!0),U=Wr({elementType:N8,getSlotProps:L,externalForwardedProps:A,ownerState:R,additionalProps:{ref:n},className:[M.root,h]}),D=z=>{G(!0),E&&E(z)},F=(z,V)=>{G(!1),x&&x(z,V)};return!S&&H?null:C.jsx(Mce,$({onClickAway:B},p,{children:C.jsx(N8,$({},U,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},I,{children:f||C.jsx(s0e,$({message:y,action:s},g))}))}))}))}),f0e=d0e;function h0e(e){return _t("MuiTooltip",e)}const p0e=Tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Qc=p0e,m0e=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function g0e(e){return Math.round(e*1e5)/1e5}const v0e=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${ke(o.split("-")[0])}`],arrow:["arrow"]};return Ct(s,h0e,t)},y0e=Ee(pY,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>$({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Qc.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Qc.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Qc.arrow}`]:$({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Qc.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),x0e=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ke(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Rn(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${g0e(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Qc.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Qc.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Qc.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Qc.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),b0e=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Rn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Iw=!1,wD=null,Hy={x:0,y:0};function Rw(e,t){return n=>{t&&t(n),e(n)}}const w0e=O.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,I;const A=It({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:M,components:L={},componentsProps:B={},describeChild:H=!1,disableFocusListener:G=!1,disableHoverListener:U=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:z=100,enterNextDelay:V=0,enterTouchDelay:W=700,followCursor:K=!1,id:Y,leaveDelay:Q=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:ce,open:se,placement:J="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=rE,TransitionProps:be}=A,me=Le(A,m0e),xe=O.isValidElement(M)?M:C.jsx("span",{children:M}),Je=Pn(),Xe=Je.direction==="rtl",[at,Lt]=O.useState(),[Pe,Fe]=O.useState(null),it=O.useRef(!1),ht=D||K,pt=O.useRef(),_e=O.useRef(),ze=O.useRef(),Ye=O.useRef(),[$e,Be]=u1({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ut=O3(Y),Re=O.useRef(),ot=O.useCallback(()=>{Re.current!==void 0&&(document.body.style.WebkitUserSelect=Re.current,Re.current=void 0),clearTimeout(Ye.current)},[]);O.useEffect(()=>()=>{clearTimeout(pt.current),clearTimeout(_e.current),clearTimeout(ze.current),ot()},[ot]);const Bt=Kt=>{clearTimeout(wD),Iw=!0,Be(!0),ce&&!Rt&&ce(Kt)},Ae=Zi(Kt=>{clearTimeout(wD),wD=setTimeout(()=>{Iw=!1},800+Q),Be(!1),ue&&Rt&&ue(Kt),clearTimeout(pt.current),pt.current=setTimeout(()=>{it.current=!1},Je.transitions.duration.shortest)}),je=Kt=>{it.current&&Kt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(ze.current),z||Iw&&V?_e.current=setTimeout(()=>{Bt(Kt)},Iw?V:z):Bt(Kt))},vt=Kt=>{clearTimeout(_e.current),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ae(Kt)},Q)},{isFocusVisibleRef:jt,onBlur:pn,onFocus:$r,ref:Mr}=M3(),[,kr]=O.useState(!1),Fr=Kt=>{pn(Kt),jt.current===!1&&(kr(!1),vt(Kt))},Jr=Kt=>{at||Lt(Kt.currentTarget),$r(Kt),jt.current===!0&&(kr(!0),je(Kt))},Vo=Kt=>{it.current=!0;const vr=xe.props;vr.onTouchStart&&vr.onTouchStart(Kt)},Tc=je,Ns=vt,Kl=Kt=>{Vo(Kt),clearTimeout(ze.current),clearTimeout(pt.current),ot(),Re.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Re.current,je(Kt)},W)},Jl=Kt=>{xe.props.onTouchEnd&&xe.props.onTouchEnd(Kt),ot(),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ae(Kt)},re)};O.useEffect(()=>{if(!Rt)return;function Kt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Ae(vr)}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Ae,Rt]);const Xd=mr(xe.ref,Mr,Lt,n);!ve&&ve!==0&&(Rt=!1);const Xo=O.useRef(),qd=Kt=>{const vr=xe.props;vr.onMouseMove&&vr.onMouseMove(Kt),Hy={x:Kt.clientX,y:Kt.clientY},Xo.current&&Xo.current.update()},ro={},Ql=typeof ve=="string";H?(ro.title=!Rt&&Ql&&!U?ve:null,ro["aria-describedby"]=Rt?ut:null):(ro["aria-label"]=Ql?ve:null,ro["aria-labelledby"]=Rt&&!Ql?ut:null);const _i=$({},ro,me,xe.props,{className:Ue(me.className,xe.props.className),onTouchStart:Vo,ref:Xd},K?{onMouseMove:qd}:{}),qo={};F||(_i.onTouchStart=Kl,_i.onTouchEnd=Jl),U||(_i.onMouseOver=Rw(Tc,_i.onMouseOver),_i.onMouseLeave=Rw(Ns,_i.onMouseLeave),ht||(qo.onMouseOver=Tc,qo.onMouseLeave=Ns)),G||(_i.onFocus=Rw(Jr,_i.onFocus),_i.onBlur=Rw(Fr,_i.onBlur),ht||(qo.onFocus=Jr,qo.onBlur=Fr));const Yd=O.useMemo(()=>{var Kt;let vr=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(Kt=le.popperOptions)!=null&&Kt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Pe,le]),Yo=$({},A,{isRtl:Xe,arrow:R,disableInteractive:ht,placement:J,PopperComponentProp:ae,touch:it.current}),ha=v0e(Yo),Ic=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:y0e,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:rE,Qn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:x0e,dl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:b0e,fl=gx(Ic,$({},le,(p=he.popper)!=null?p:B.popper,{className:Ue(ha.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:B.popper)==null?void 0:g.className)}),Yo),io=gx(Hn,$({},be,(y=he.transition)!=null?y:B.transition),Yo),Zg=gx(Qn,$({},(S=he.tooltip)!=null?S:B.tooltip,{className:Ue(ha.tooltip,(_=(b=he.tooltip)!=null?b:B.tooltip)==null?void 0:_.className)}),Yo),ev=gx(dl,$({},(x=he.arrow)!=null?x:B.arrow,{className:Ue(ha.arrow,(E=(I=he.arrow)!=null?I:B.arrow)==null?void 0:E.className)}),Yo);return C.jsxs(O.Fragment,{children:[O.cloneElement(xe,_i),C.jsx(Ic,$({as:ae??pY,placement:J,anchorEl:K?{getBoundingClientRect:()=>({top:Hy.y,left:Hy.x,right:Hy.x,bottom:Hy.y,width:0,height:0})}:at,popperRef:Xo,open:at?Rt:!1,id:ut,transition:!0},qo,fl,{popperOptions:Yd,children:({TransitionProps:Kt})=>C.jsx(Hn,$({timeout:Je.transitions.duration.shorter},Kt,io,{children:C.jsxs(Qn,$({},Zg,{children:[ve,R?C.jsx(dl,$({},ev,{ref:Fe})):null]}))}))}))]})}),$d=w0e;function _0e(e){return _t("MuiSwitch",e)}const S0e=Tt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),vo=S0e,E0e=["className","color","edge","size","sx"],C0e=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${ke(n)}`,`size${ke(r)}`],switchBase:["switchBase",`color${ke(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Ct(l,_0e,t);return $({},t,c)},T0e=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(({ownerState:e})=>$({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${vo.thumb}`]:{width:16,height:16},[`& .${vo.switchBase}`]:{padding:4,[`&.${vo.checked}`]:{transform:"translateX(16px)"}}})),I0e=Ee(bY,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${vo.input}`]:t.input},n.color!=="default"&&t[`color${ke(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${vo.checked}`]:{transform:"translateX(20px)"},[`&.${vo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${vo.checked} + .${vo.track}`]:{opacity:.5},[`&.${vo.disabled} + .${vo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${vo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${vo.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Rn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${vo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Rg(e.palette[t.color].main,.62):Ig(e.palette[t.color].main,.55)}`}},[`&.${vo.checked} + .${vo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),R0e=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),A0e=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),P0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,E0e),f=$({},r,{color:o,edge:s,size:l}),h=C0e(f),p=C.jsx(A0e,{className:h.thumb,ownerState:f});return C.jsxs(T0e,{className:Ue(h.root,i),sx:c,ownerState:f,children:[C.jsx(I0e,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(R0e,{className:h.track,ownerState:f})]})}),ag=P0e;function O0e(e){return _t("MuiTab",e)}const M0e=Tt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),lh=M0e,k0e=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],D0e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${ke(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Ct(d,O0e,t)},L0e=Ee(Ld,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ke(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${lh.iconWrapper}`]:$({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${lh.selected}`]:{opacity:1},[`&.${lh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${lh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${lh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${lh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${lh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),B0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,k0e),I=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),A=D0e(I),R=c&&h&&O.isValidElement(c)?O.cloneElement(c,{className:Ue(A.iconWrapper,c.props.className)}):c,M=B=>{!y&&p&&p(B,b),g&&g(B)},L=B=>{S&&!y&&p&&p(B,b),v&&v(B)};return C.jsxs(L0e,$({focusRipple:!s,className:Ue(A.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:M,onFocus:L,ownerState:I,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(O.Fragment,{children:[R,h]}):C.jsxs(O.Fragment,{children:[h,R]}),f]}))}),mm=B0e;function N0e(e){return _t("MuiToolbar",e)}Tt("MuiToolbar",["root","gutters","regular","dense"]);const $0e=["className","component","disableGutters","variant"],F0e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Ct({root:["root",!n&&"gutters",r]},N0e,t)},z0e=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),U0e=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,$0e),d=$({},r,{component:o,disableGutters:s,variant:l}),f=F0e(d);return C.jsx(z0e,$({as:o,className:Ue(f.root,i),ref:n,ownerState:d},c))}),j0e=U0e,H0e=$t(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),W0e=$t(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function G0e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function V0e(e,t,n,r={},i=()=>{}){const{ease:o=G0e,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const X0e=["onChange"],q0e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Y0e(e){const{onChange:t}=e,n=Le(e,X0e),r=O.useRef(),i=O.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Eo(()=>{const s=vC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=lc(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),O.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:q0e,ref:i},n))}function K0e(e){return _t("MuiTabScrollButton",e)}const J0e=Tt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Q0e=J0e,Z0e=["className","slots","slotProps","direction","orientation","disabled"],eye=e=>{const{classes:t,orientation:n,disabled:r}=e;return Ct({root:["root",n,r&&"disabled"]},K0e,t)},tye=Ee(Ld,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Q0e.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),nye=O.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Z0e),p=Pn().direction==="rtl",g=$({isRtl:p},o),v=eye(g),y=(r=l.StartScrollButtonIcon)!=null?r:H0e,S=(i=l.EndScrollButtonIcon)!=null?i:W0e,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(tye,$({component:"div",className:Ue(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),rye=nye;function iye(e){return _t("MuiTabs",e)}const oye=Tt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),_D=oye,sye=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],$8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,F8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Aw=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(e,i);else{i.focus();return}}},aye=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Ct({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},iye,c)},lye=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${_D.scrollButtons}`]:t.scrollButtons},{[`& .${_D.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${_D.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),uye=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),cye=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),dye=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),fye=Ee(Y0e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),z8={},hye=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabs"}),i=Pn(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=rye,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:I={},TabIndicatorProps:A={},TabScrollButtonProps:R={},textColor:M="primary",value:L,variant:B="standard",visibleScrollbar:H=!1}=r,G=Le(r,sye),U=B==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",z=D?"top":"left",V=D?"bottom":"right",W=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:M,variant:B,visibleScrollbar:H,fixed:!U,hideScrollbar:U&&!H,scrollableX:U&&!D,scrollableY:U&&D,centered:d&&!U,scrollButtonsHideMobile:!g}),Q=aye(Y),re=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:I.startScrollButtonIcon,ownerState:Y}),ue=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:I.endScrollButtonIcon,ownerState:Y}),[ce,se]=O.useState(!1),[J,ae]=O.useState(z8),[le,he]=O.useState(!1),[pe,ve]=O.useState(!1),[ye,be]=O.useState(!1),[me,xe]=O.useState({overflow:"hidden",scrollbarWidth:0}),Je=new Map,Xe=O.useRef(null),at=O.useRef(null),Lt=()=>{const Ae=Xe.current;let je;if(Ae){const jt=Ae.getBoundingClientRect();je={clientWidth:Ae.clientWidth,scrollLeft:Ae.scrollLeft,scrollTop:Ae.scrollTop,scrollLeftNormalized:Vre(Ae,i.direction),scrollWidth:Ae.scrollWidth,top:jt.top,bottom:jt.bottom,left:jt.left,right:jt.right}}let vt;if(Ae&&L!==!1){const jt=at.current.children;if(jt.length>0){const pn=jt[Je.get(L)];vt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:je,tabMeta:vt}},Pe=Zi(()=>{const{tabsMeta:Ae,tabMeta:je}=Lt();let vt=0,jt;if(D)jt="top",je&&Ae&&(vt=je.top-Ae.top+Ae.scrollTop);else if(jt=o?"right":"left",je&&Ae){const $r=o?Ae.scrollLeftNormalized+Ae.clientWidth-Ae.scrollWidth:Ae.scrollLeft;vt=(o?-1:1)*(je[jt]-Ae[jt]+$r)}const pn={[jt]:vt,[K]:je?je[K]:0};if(isNaN(J[jt])||isNaN(J[K]))ae(pn);else{const $r=Math.abs(J[jt]-pn[jt]),Mr=Math.abs(J[K]-pn[K]);($r>=1||Mr>=1)&&ae(pn)}}),Fe=(Ae,{animation:je=!0}={})=>{je?V0e(F,Xe.current,Ae,{duration:i.transitions.duration.standard}):Xe.current[F]=Ae},it=Ae=>{let je=Xe.current[F];D?je+=Ae:(je+=Ae*(o?-1:1),je*=o&&vV()==="reverse"?-1:1),Fe(je)},ht=()=>{const Ae=Xe.current[W];let je=0;const vt=Array.from(at.current.children);for(let jt=0;jtAe){jt===0&&(je=Ae);break}je+=pn[W]}return je},pt=()=>{it(-1*ht())},_e=()=>{it(ht())},ze=O.useCallback(Ae=>{xe({overflow:null,scrollbarWidth:Ae})},[]),Ye=()=>{const Ae={};Ae.scrollbarSizeListener=U?C.jsx(fye,{onChange:ze,className:Ue(Q.scrollableX,Q.hideScrollbar)}):null;const vt=U&&(b==="auto"&&(le||pe)||b===!0);return Ae.scrollButtonStart=vt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:S,direction:o?"right":"left",onClick:pt,disabled:!le},R,{className:Ue(Q.scrollButtons,R.className)})):null,Ae.scrollButtonEnd=vt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ue},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},R,{className:Ue(Q.scrollButtons,R.className)})):null,Ae},$e=Zi(Ae=>{const{tabsMeta:je,tabMeta:vt}=Lt();if(!(!vt||!je)){if(vt[z]je[V]){const jt=je[F]+(vt[V]-je[V]);Fe(jt,{animation:Ae})}}}),Be=Zi(()=>{U&&b!==!1&&be(!ye)});O.useEffect(()=>{const Ae=vC(()=>{Xe.current&&Pe()}),je=lc(Xe.current);je.addEventListener("resize",Ae);let vt;return typeof ResizeObserver<"u"&&(vt=new ResizeObserver(Ae),Array.from(at.current.children).forEach(jt=>{vt.observe(jt)})),()=>{Ae.clear(),je.removeEventListener("resize",Ae),vt&&vt.disconnect()}},[Pe]),O.useEffect(()=>{const Ae=Array.from(at.current.children),je=Ae.length;if(typeof IntersectionObserver<"u"&&je>0&&U&&b!==!1){const vt=Ae[0],jt=Ae[je-1],pn={root:Xe.current,threshold:.99},$r=Jr=>{he(!Jr[0].isIntersecting)},Mr=new IntersectionObserver($r,pn);Mr.observe(vt);const kr=Jr=>{ve(!Jr[0].isIntersecting)},Fr=new IntersectionObserver(kr,pn);return Fr.observe(jt),()=>{Mr.disconnect(),Fr.disconnect()}}},[U,b,ye,f==null?void 0:f.length]),O.useEffect(()=>{se(!0)},[]),O.useEffect(()=>{Pe()}),O.useEffect(()=>{$e(z8!==J)},[$e,J]),O.useImperativeHandle(c,()=>({updateIndicator:Pe,updateScrollButtons:Be}),[Pe,Be]);const Rt=C.jsx(dye,$({},A,{className:Ue(Q.indicator,A.className),ownerState:Y,style:$({},J,A.style)}));let ut=0;const Re=O.Children.map(f,Ae=>{if(!O.isValidElement(Ae))return null;const je=Ae.props.value===void 0?ut:Ae.props.value;Je.set(je,ut);const vt=je===L;return ut+=1,O.cloneElement(Ae,$({fullWidth:B==="fullWidth",indicator:vt&&!ce&&Rt,selected:vt,selectionFollowsFocus:x,onChange:y,textColor:M,value:je},ut===1&&L===!1&&!Ae.props.tabIndex?{tabIndex:0}:{}))}),ot=Ae=>{const je=at.current,vt=Rr(je).activeElement;if(vt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Ae.key){case pn:Ae.preventDefault(),Aw(je,vt,F8);break;case $r:Ae.preventDefault(),Aw(je,vt,$8);break;case"Home":Ae.preventDefault(),Aw(je,null,$8);break;case"End":Ae.preventDefault(),Aw(je,null,F8);break}},Bt=Ye();return C.jsxs(lye,$({className:Ue(Q.root,h),ownerState:Y,ref:n,as:p},G,{children:[Bt.scrollButtonStart,Bt.scrollbarSizeListener,C.jsxs(uye,{className:Q.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:Xe,children:[C.jsx(cye,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Re}),ce&&Rt]}),Bt.scrollButtonEnd]}))}),pye=hye;function mye(e){return _t("MuiTextField",e)}Tt("MuiTextField",["root"]);const gye=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],vye={standard:RY,filled:EY,outlined:LY},yye=e=>{const{classes:t}=e;return Ct({root:["root"]},mye,t)},xye=Ee(Fpe,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bye=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:I,minRows:A,multiline:R=!1,name:M,onBlur:L,onChange:B,onFocus:H,placeholder:G,required:U=!1,rows:D,select:F=!1,SelectProps:z,type:V,value:W,variant:K="outlined"}=r,Y=Le(r,gye),Q=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:R,required:U,select:F,variant:K}),re=yye(Q),ue={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ue.notched=S.shrink),ue.label=E),F&&((!z||!z.native)&&(ue.id=void 0),ue["aria-describedby"]=void 0);const ce=O3(y),se=v&&ce?`${ce}-helper-text`:void 0,J=E&&ce?`${ce}-label`:void 0,ae=vye[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:R,name:M,rows:D,maxRows:I,minRows:A,type:V,value:W,id:ce,inputRef:x,onBlur:L,onChange:B,onFocus:H,placeholder:G,inputProps:_},ue,b));return C.jsxs(xye,$({className:Ue(re.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:U,color:c,variant:K,ownerState:Q},Y,{children:[E!=null&&E!==""&&C.jsx(Eme,$({htmlFor:ce,id:J},S,{children:E})),F?C.jsx(Dve,$({"aria-describedby":se,id:ce,labelId:J,value:W,input:le},z,{children:s})):le,v&&C.jsx(tme,$({id:se},p,{children:v}))]}))}),Cb=bye;var NY,U8=Og;NY=U8.createRoot,U8.hydrateRoot;function wn({vertical:e,...t}){return C.jsx(Pt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const $Y=$t([C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"},"0"),C.jsx("path",{d:"M7 5v4H4V5h3m13 0v4h-3V5h3m0 10v4h-3v-4h3",opacity:".3"},"1")],"AccountTreeTwoTone"),wye=$t(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),_ye=$t(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),FY=$t(C.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),Sye=$t(C.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1z"}),"ArrowOutwardRounded"),Eye=$t([C.jsx("path",{d:"M14 7.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"0"),C.jsx("circle",{cx:"14",cy:"10",r:"1"},"1"),C.jsx("circle",{cx:"14",cy:"14",r:"1"},"2"),C.jsx("path",{d:"M10 16.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"3"),C.jsx("circle",{cx:"10",cy:"10",r:"1"},"4"),C.jsx("path",{d:"M7 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"5"),C.jsx("circle",{cx:"10",cy:"14",r:"1"},"6"),C.jsx("path",{d:"M10 7.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm4 9c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0 4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"},"7")],"BlurCircularTwoTone"),Cye=$t([C.jsx("circle",{cx:"14",cy:"10",r:"1.5"},"0"),C.jsx("circle",{cx:"14",cy:"18",r:"1"},"1"),C.jsx("circle",{cx:"14",cy:"14",r:"1.5"},"2"),C.jsx("circle",{cx:"14",cy:"6",r:"1"},"3"),C.jsx("path",{d:"M3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14.5 3c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5zM21 14.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"4"),C.jsx("circle",{cx:"18",cy:"18",r:"1"},"5"),C.jsx("path",{d:"M13.5 21c0 .28.22.5.5.5s.5-.22.5-.5-.22-.5-.5-.5-.5.22-.5.5zM21 10.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5z"},"6"),C.jsx("circle",{cx:"18",cy:"14",r:"1"},"7"),C.jsx("circle",{cx:"18",cy:"6",r:"1"},"8"),C.jsx("circle",{cx:"6",cy:"18",r:"1"},"9"),C.jsx("circle",{cx:"6",cy:"14",r:"1"},"10"),C.jsx("path",{d:"M3.5 14c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5z"},"11"),C.jsx("circle",{cx:"10",cy:"6",r:"1"},"12"),C.jsx("circle",{cx:"6",cy:"10",r:"1"},"13"),C.jsx("circle",{cx:"6",cy:"6",r:"1"},"14"),C.jsx("path",{d:"M9.5 21c0 .28.22.5.5.5s.5-.22.5-.5-.22-.5-.5-.5-.5.22-.5.5z"},"15"),C.jsx("circle",{cx:"10",cy:"18",r:"1"},"16"),C.jsx("path",{d:"M10.5 3c0-.28-.22-.5-.5-.5s-.5.22-.5.5.22.5.5.5.5-.22.5-.5z"},"17"),C.jsx("circle",{cx:"10",cy:"14",r:"1.5"},"18"),C.jsx("circle",{cx:"10",cy:"10",r:"1.5"},"19"),C.jsx("circle",{cx:"18",cy:"10",r:"1"},"20")],"BlurOnTwoTone"),Tye=$t([C.jsx("path",{d:"M15.83 9.65 15.46 9c-.3-.53-.71-.96-1.21-1.31l-.61-.42-.68-.16C12.63 7.04 12.32 7 12 7c-.31 0-.63.04-.94.11l-.74.18-.57.4c-.49.34-.91.79-1.21 1.31l-.37.65-.1.65c-.04.23-.07.48-.07.7v4c0 .22.03.47.07.7l.1.65.37.65c.72 1.24 2.04 2 3.46 2s2.74-.77 3.46-2l.37-.64.1-.65c.04-.24.07-.49.07-.71v-4c0-.22-.03-.47-.07-.7l-.1-.65zM14 16h-4v-2h4v2zm0-4h-4v-2h4v2z",opacity:".3"},"0"),C.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.47 8 15.22 8 15v-4c0-.22.03-.47.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"},"1")],"BugReportTwoTone"),Iye=$t([C.jsx("circle",{cx:"12",cy:"12",r:"3",opacity:".3"},"0"),C.jsx("path",{d:"M7 12c0 2.76 2.24 5 5 5s5-2.24 5-5-2.24-5-5-5-5 2.24-5 5zm8 0c0 1.65-1.35 3-3 3s-3-1.35-3-3 1.35-3 3-3 3 1.35 3 3zM3 19c0 1.1.9 2 2 2h4v-2H5v-4H3v4zM3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm18 0c0-1.1-.9-2-2-2h-4v2h4v4h2V5zm-2 14h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"},"1")],"CenterFocusStrongTwoTone"),Rye=$t(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),zY=$t(C.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined"),Aye=$t(C.jsx("path",{d:"M3 19c0 1.1.9 2 2 2h4v-2H5v-4H3v4zM21 5c0-1.1-.9-2-2-2h-4v2h4v4h2V5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm16 14v-4h-2v4h-4v2h4c1.1 0 2-.9 2-2z"}),"CropFreeTwoTone"),Pye=$t(C.jsx("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}),"DeleteOutlined"),Oye=$t(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),Mye=$t(C.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"}),"EditOutlined"),s4=$t([C.jsx("path",{d:"M5 18.08V19h.92l9.06-9.06-.92-.92z",opacity:".3"},"0"),C.jsx("path",{d:"M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29s-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83zM3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM5.92 19H5v-.92l9.06-9.06.92.92L5.92 19z"},"1")],"EditTwoTone"),kye=$t(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),UY=$t([C.jsx("path",{d:"M15 14h3V9h-5V4H6v16h9z",opacity:".3"},"0"),C.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9v2zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66h2z"},"1")],"FileOpenTwoTone"),Dye=$t(C.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Lye=$t(C.jsx("path",{d:"M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.41L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.94 10.94C14.86 19.59 13.48 20 12 20zM7.94 5.12 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.86 20 13.48 20 12c0-4.41-3.59-8-8-8-1.48 0-2.86.41-4.06 1.12z"}),"HideSourceOutlined"),Bye=$t([C.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm1 13h-2v-6h2v6zm0-8h-2V7h2v2z",opacity:".3"},"0"),C.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},"1")],"InfoTwoTone"),Nye=$t(C.jsx("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"}),"LabelOutlined"),TT=$t([C.jsx("path",{d:"M6.26 9 12 13.47 17.74 9 12 4.53z",opacity:".3"},"0"),C.jsx("path",{d:"m19.37 12.8-7.38 5.74-7.37-5.73L3 14.07l9 7 9-7zM12 2 3 9l1.63 1.27L12 16l7.36-5.73L21 9l-9-7zm0 11.47L6.26 9 12 4.53 17.74 9 12 13.47z"},"1")],"LayersTwoTone"),jY=$t(C.jsx("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}),"ListTwoTone"),$ye=$t(C.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertOutlined"),Fye=$t(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),zye=$t(C.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}),"PlaceOutlined"),Uye=$t(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),HY=$t(C.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"ReplayOutlined"),jye=$t([C.jsx("path",{d:"M11 16c0 .55.45 1 1 1s1-.45 1-1v-2h-2v2zm-8 0c0 .55.45 1 1 1s1-.45 1-1v-2H3v2zm16 0c0 .55.45 1 1 1s1-.45 1-1v-2h-2v2z",opacity:".3"},"0"),C.jsx("path",{d:"M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v10c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16V6H5V2zm0 14c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4H3V8h2v4zm8-10c0-.55-.45-1-1-1s-1 .45-1 1v4H9v10c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.42 2-1.52 2-2.82V6h-2V2zm0 14c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4h-2V8h2v4zm8-6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v10c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.42 2-1.52 2-2.82V6h-2zm0 10c0 .55-.45 1-1 1s-1-.45-1-1v-2h2v2zm0-4h-2V8h2v4z"},"1")],"SettingsInputComponentTwoTone"),Hye=$t([C.jsx("path",{d:"m19.28 8.6-.7-1.21-1.27.51-1.06.43-.91-.7c-.39-.3-.8-.54-1.23-.71l-1.06-.43-.16-1.13L12.7 4h-1.4l-.19 1.35-.16 1.13-1.06.44c-.41.17-.82.41-1.25.73l-.9.68-1.05-.42-1.27-.52-.7 1.21 1.08.84.89.7-.14 1.13c-.03.3-.05.53-.05.73s.02.43.05.73l.14 1.13-.89.7-1.08.84.7 1.21 1.27-.51 1.06-.43.91.7c.39.3.8.54 1.23.71l1.06.43.16 1.13.19 1.36h1.39l.19-1.35.16-1.13 1.06-.43c.41-.17.82-.41 1.25-.73l.9-.68 1.04.42 1.27.51.7-1.21-1.08-.84-.89-.7.14-1.13c.04-.31.05-.52.05-.73 0-.21-.02-.43-.05-.73l-.14-1.13.89-.7 1.1-.84zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z",opacity:".3"},"0"),C.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},"1")],"SettingsTwoTone"),Wye=$t(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Gye=$t(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),tS=$t(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortTwoTone"),Vye=$t(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Xye=$t(C.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"}),"TripOriginOutlined"),j8=$t(C.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm0 6H5v-4h14v4zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 6H5V5h14v4z"}),"ViewAgendaOutlined"),WY=$t([C.jsx("path",{d:"m13 17.17 4-2.3v-4.63l-4 2.33zM12 6.25 8.04 8.53 12 10.84l3.96-2.31zm-5 8.62 4 2.3v-4.6l-4-2.33z",opacity:".3"},"0"),C.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2V4zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1zM20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3zm1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2v2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73zm-8 2.3-4-2.3v-4.63l4 2.33v4.6zm1-6.33L8.04 8.53 12 6.25l3.96 2.28L12 10.84zm5 4.03-4 2.3v-4.6l4-2.33v4.63z"},"1")],"ViewInArTwoTone"),qye=$t([C.jsx("path",{d:"M12 6c-3.79 0-7.17 2.13-8.82 5.5C4.83 14.87 8.21 17 12 17s7.17-2.13 8.82-5.5C19.17 8.13 15.79 6 12 6zm0 10c-2.48 0-4.5-2.02-4.5-4.5S9.52 7 12 7s4.5 2.02 4.5 4.5S14.48 16 12 16z",opacity:".3"},"0"),C.jsx("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 13c-3.79 0-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6s7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17zm0-10c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7zm0 7c-1.38 0-2.5-1.12-2.5-2.5S10.62 9 12 9s2.5 1.12 2.5 2.5S13.38 14 12 14z"},"1")],"VisibilityTwoTone"),Yye=$t(C.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"}),"WidgetsOutlined");var oE={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -251,7 +251,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var sE=function(){return sE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},nxe=function(e){e=e||{};var t=e.assign||Object.assign,n=typeof window=="object",r=t({raw:"",pfx:"_",client:n,assign:t,stringify:JSON.stringify,kebab:function(i){return i.replace(exe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return txe(r.stringify(i))},selector:function(i,o){return i+(o[0]===":"?"":" ")+o},putRaw:function(i){r.raw+=i}},e);return r.client&&(r.sh||document.head.appendChild(r.sh=document.createElement("style")),r.putRaw=function(i){{var o=r.sh.sheet;try{o.insertRule(i,o.cssRules.length)}catch{}}}),r.put=function(i,o,s){var l="",c,d,f=[];for(c in o)d=o[c],d instanceof Object&&!(d instanceof Array)?f.push(c):l+=r.decl(c,d,i,s);l&&(l=i+"{"+l+"}",r.putRaw(s?s+"{"+l+"}":l));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}WY.removeRule=ixe;var oxe=WY.removeRule,sxe=function(e){if(!e.client)return;var t=e.kebab;function n(i,o){this.rule=e.createRule(i,o),this.decl={}}n.prototype.diff=function(i){var o=this.decl,s=this.rule.style,l;for(l in o)i[l]===void 0&&s.removeProperty(l);for(l in i)i[l]!==o[l]&&s.setProperty(t(l),i[l]);this.decl=i},n.prototype.del=function(){oxe(this.rule)};function r(){this.tree={}}r.prototype.diff=function(i){var o=this.tree;for(var s in o)if(i[s]===void 0){var l=o[s];for(var c in l)l[c].del()}for(var s in i)if(o[s]===void 0)for(var c in i[s]){var d=new n(c,s);d.diff(i[s][c]),i[s][c]=d}else{var f=o[s],h=i[s];for(var c in f)h[c]||f[c].del();for(var c in h){var d=f[c];d?(d.diff(h[c]),h[c]=d):(d=new n(c,s),d.diff(h[c]),h[c]=d)}}this.tree=i},e.VRule=n,e.VSheet=r};function I$(e,t,n,r){var i={},o=!1,s,l;for(s in t)l=t[s],typeof l!="object"&&(o=!0,i[s]=l);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(l=t[s],typeof l=="object")if(s[0]==="@")I$(e,l,n,s);else{var c=s.indexOf("&")>-1,d=n.split(",");if(c)for(var f=0;ft,c4=(e,t)=>({...e,...t});function Gl(e,{init:t,effect:n,reduce:r=c4}={}){const i=O.createContext([e,ie.noop]);return[()=>O.useContext(i),({children:o})=>{const[s,l]=O.useReducer((d,f)=>{const h=r(d,f);return n==null||n({prev:d,next:h}),h},e),c=O.useMemo(()=>[s,l],[s,l]);return Qye(async()=>{const d=await(t==null?void 0:t());d&&l(d)}),C.jsx(i.Provider,{value:c,children:o})}]}function bxe(e,t){return{init:()=>{const n=localStorage.getItem(e);return n?JSON.parse(n):t},effect:({next:n})=>localStorage.setItem(e,JSON.stringify(n))}}const[XY,wxe]=Gl([],{reduce:(e,t)=>[t,...e]}),qY=O.createContext(()=>ie.noop);function _c(){return O.useContext(qY)}function _xe({children:e}){const[t,n]=O.useState([]),[r,i]=O.useState(!1),[o,s]=O.useState(void 0),[,l]=XY();O.useEffect(()=>{t.length&&!o?(s({...t[0]}),n(h=>h.slice(1)),i(!0)):t.length&&o&&r&&i(!1)},[t,o,r]);const c=O.useCallback((h,p)=>(n(g=>[...g,{message:C.jsx(a4,{primary:h,secondary:p}),key:new Date().getTime()}]),l({content:ie.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}),()=>d()),[n]),d=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(qY.Provider,{value:c,children:e}),C.jsx(d0e,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:d,TransitionProps:{onExited:f},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx(ip,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:d,children:C.jsx(zY,{})})})},o==null?void 0:o.key)]})}/*! +***************************************************************************** */var sE=function(){return sE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},nxe=function(e){e=e||{};var t=e.assign||Object.assign,n=typeof window=="object",r=t({raw:"",pfx:"_",client:n,assign:t,stringify:JSON.stringify,kebab:function(i){return i.replace(exe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return txe(r.stringify(i))},selector:function(i,o){return i+(o[0]===":"?"":" ")+o},putRaw:function(i){r.raw+=i}},e);return r.client&&(r.sh||document.head.appendChild(r.sh=document.createElement("style")),r.putRaw=function(i){{var o=r.sh.sheet;try{o.insertRule(i,o.cssRules.length)}catch{}}}),r.put=function(i,o,s){var l="",c,d,f=[];for(c in o)d=o[c],d instanceof Object&&!(d instanceof Array)?f.push(c):l+=r.decl(c,d,i,s);l&&(l=i+"{"+l+"}",r.putRaw(s?s+"{"+l+"}":l));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}GY.removeRule=ixe;var oxe=GY.removeRule,sxe=function(e){if(!e.client)return;var t=e.kebab;function n(i,o){this.rule=e.createRule(i,o),this.decl={}}n.prototype.diff=function(i){var o=this.decl,s=this.rule.style,l;for(l in o)i[l]===void 0&&s.removeProperty(l);for(l in i)i[l]!==o[l]&&s.setProperty(t(l),i[l]);this.decl=i},n.prototype.del=function(){oxe(this.rule)};function r(){this.tree={}}r.prototype.diff=function(i){var o=this.tree;for(var s in o)if(i[s]===void 0){var l=o[s];for(var c in l)l[c].del()}for(var s in i)if(o[s]===void 0)for(var c in i[s]){var d=new n(c,s);d.diff(i[s][c]),i[s][c]=d}else{var f=o[s],h=i[s];for(var c in f)h[c]||f[c].del();for(var c in h){var d=f[c];d?(d.diff(h[c]),h[c]=d):(d=new n(c,s),d.diff(h[c]),h[c]=d)}}this.tree=i},e.VRule=n,e.VSheet=r};function I$(e,t,n,r){var i={},o=!1,s,l;for(s in t)l=t[s],typeof l!="object"&&(o=!0,i[s]=l);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(l=t[s],typeof l=="object")if(s[0]==="@")I$(e,l,n,s);else{var c=s.indexOf("&")>-1,d=n.split(",");if(c)for(var f=0;ft,c4=(e,t)=>({...e,...t});function Gl(e,{init:t,effect:n,reduce:r=c4}={}){const i=O.createContext([e,ie.noop]);return[()=>O.useContext(i),({children:o})=>{const[s,l]=O.useReducer((d,f)=>{const h=r(d,f);return n==null||n({prev:d,next:h}),h},e),c=O.useMemo(()=>[s,l],[s,l]);return Qye(async()=>{const d=await(t==null?void 0:t());d&&l(d)}),C.jsx(i.Provider,{value:c,children:o})}]}function bxe(e,t){return{init:()=>{const n=localStorage.getItem(e);return n?JSON.parse(n):t},effect:({next:n})=>localStorage.setItem(e,JSON.stringify(n))}}const[qY,wxe]=Gl([],{reduce:(e,t)=>[t,...e]}),YY=O.createContext(()=>ie.noop);function _c(){return O.useContext(YY)}function _xe({children:e}){const[t,n]=O.useState([]),[r,i]=O.useState(!1),[o,s]=O.useState(void 0),[,l]=qY();O.useEffect(()=>{t.length&&!o?(s({...t[0]}),n(h=>h.slice(1)),i(!0)):t.length&&o&&r&&i(!1)},[t,o,r]);const c=O.useCallback((h,p)=>(n(g=>[...g,{message:C.jsx(a4,{primary:h,secondary:p}),key:new Date().getTime()}]),l({content:ie.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}),()=>d()),[n]),d=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(YY.Provider,{value:c,children:e}),C.jsx(f0e,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:d,TransitionProps:{onExited:f},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx(ip,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:d,children:C.jsx(zY,{})})})},o==null?void 0:o.key)]})}/*! * OverlayScrollbars * Version: 2.3.2 * @@ -259,14 +259,14 @@ PERFORMANCE OF THIS SOFTWARE. * https://github.com/KingSora * * Released under the MIT license. - */function _n(e,t){if(RT(e))for(let n=0;nt(e[n],n,e));return e}function Ji(e,t){const n=Fd(t);if(Os(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?V8(e,o,t):t.reduce((s,l)=>(s[l]=V8(e,o,l),s),i)}return i}e&&_n(Ms(t),i=>$xe(e,i,t[i]))}const Wa=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Tb=()=>typeof window<"u",YY=Tb()&&Node.ELEMENT_NODE,{toString:Sxe,hasOwnProperty:SD}=Object.prototype,Sc=e=>e===void 0,IT=e=>e===null,Exe=e=>Sc(e)||IT(e)?`${e}`:Sxe.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),md=e=>typeof e=="number",Fd=e=>typeof e=="string",d4=e=>typeof e=="boolean",ol=e=>typeof e=="function",Os=e=>Array.isArray(e),D1=e=>typeof e=="object"&&!Os(e)&&!IT(e),RT=e=>{const t=!!e&&e.length,n=md(t)&&t>-1&&t%1==0;return Os(e)||!ol(e)&&n?t>0&&D1(e)?t-1 in e:!0:!1},R$=e=>{if(!e||!D1(e)||Exe(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=SD.call(e,n),s=i&&SD.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Sc(t)||SD.call(e,t)},Xx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===YY:!1},AT=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===YY:!1},PT=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Fd(t)&&RT(t)?Array.prototype.push.apply(e,t):e.push(t),e),ap=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):_n(e,r=>{Fn(n,r)}),n)},f4=e=>!!e&&e.length===0,Vl=(e,t,n)=>{_n(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},OT=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ms=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||IT(e))&&!ol(e)&&(e={}),_n(l,c=>{_n(Ms(c),d=>{const f=c[d];if(e===f)return!0;const h=Os(f);if(f&&R$(f)){const p=e[d];let g=p;h&&!Os(p)?g=[]:!h&&!R$(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},h4=e=>{for(const t in e)return!1;return!0},KY=(e,t,n,r)=>{if(Sc(r))return n?n[e]:t;n&&(Fd(r)||md(r))&&(n[e]=r)},xo=(e,t,n)=>{if(Sc(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},JY=(e,t)=>new Set((xo(e,t)||"").split(" ")),Ro=(e,t)=>{e&&e.removeAttribute(t)},Hh=(e,t,n,r)=>{if(n){const i=JY(e,t);i[r?"add":"delete"](n);const o=ap(i).join(" ").trim();xo(e,t,o)}},Cxe=(e,t,n)=>JY(e,t).has(n),Qa=(e,t)=>KY("scrollLeft",0,e,t),oc=(e,t)=>KY("scrollTop",0,e,t),A$=Tb()&&Element.prototype,QY=(e,t)=>{const n=[],r=t?AT(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},Txe=(e,t)=>{const n=t?AT(t)&&t:document;return n?n.querySelector(e):null},aE=(e,t)=>AT(e)?(A$.matches||A$.msMatchesSelector).call(e,t):!1,p4=e=>e?ap(e.childNodes):[],mc=e=>e&&e.parentElement,gm=(e,t)=>{if(AT(e)){const n=A$.closest;if(n)return n.call(e,t);do{if(aE(e,t))return e;e=mc(e)}while(e)}},Ixe=(e,t,n)=>{const r=gm(e,t),i=e&&Txe(n,r),o=gm(i,t)===r;return r&&i?r===e||i===e||o&&gm(gm(e,n),t)!==r:!1},m4=(e,t,n)=>{if(n&&e){let r=t,i;RT(n)?(i=document.createDocumentFragment(),_n(n,o=>{o===r&&(r=o.previousSibling),i.appendChild(o)})):i=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(i,r||null)}},qs=(e,t)=>{m4(e,null,t)},Rxe=(e,t)=>{m4(mc(e),e,t)},H8=(e,t)=>{m4(mc(e),e&&e.nextSibling,t)},Ul=e=>{if(RT(e))_n(ap(e),t=>Ul(t));else if(e){const t=mc(e);t&&t.removeChild(e)}},Wh=e=>{const t=document.createElement("div");return e&&xo(t,"class",e),t},ZY=e=>{const t=Wh();return t.innerHTML=e.trim(),_n(p4(t),n=>Ul(n))},P$=e=>e.charAt(0).toUpperCase()+e.slice(1),Axe=()=>Wh().style,Pxe=["-webkit-","-moz-","-o-","-ms-"],Oxe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],ED={},CD={},Mxe=e=>{let t=CD[e];if(OT(CD,e))return t;const n=P$(e),r=Axe();return _n(Pxe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,P$(o)+n].find(l=>r[l]!==void 0))}),CD[e]=t||""},Lg=e=>{if(Tb()){let t=ED[e]||window[e];return OT(ED,e)||(_n(Oxe,n=>(t=t||window[n+P$(e)],!t)),ED[e]=t),t}},kxe=Lg("MutationObserver"),W8=Lg("IntersectionObserver"),vm=Lg("ResizeObserver"),eK=Lg("cancelAnimationFrame"),tK=Lg("requestAnimationFrame"),O$=Lg("ScrollTimeline"),lE=Tb()&&window.setTimeout,M$=Tb()&&window.clearTimeout,Dxe=/[^\x20\t\r\n\f]+/g,nK=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Fd(t)){const l=t.match(Dxe)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},g4=(e,t)=>{nK(e,t,(n,r)=>n.remove(r))},Ed=(e,t)=>(nK(e,t,(n,r)=>n.add(r)),g4.bind(0,e,t)),MT=(e,t,n,r)=>{if(e&&t){let i=!0;return _n(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},rK=(e,t)=>MT(e,t,["w","h"]),iK=(e,t)=>MT(e,t,["x","y"]),Lxe=(e,t)=>MT(e,t,["t","r","b","l"]),G8=(e,t,n)=>MT(e,t,["width","height"],n&&(r=>Math.round(r))),gs=()=>{},wh=e=>{let t;const n=e?lE:tK,r=e?M$:eK;return[i=>{r(t),t=n(i,ol(e)?e():e)},()=>r(t)]},v4=(e,t)=>{let n,r,i,o=gs;const{g:s,v:l,p:c}=t||{},d=function(v){o(),M$(n),n=r=void 0,o=gs,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==gs&&d(f(i)||i)},p=function(){const v=ap(arguments),y=ol(s)?s():s;if(md(y)&&y>=0){const _=ol(l)?l():l,b=md(_)&&_>=0,x=y>0?lE:tK,E=y>0?M$:eK,A=f(v)||v,R=d.bind(0,A);o();const M=x(R,y);o=()=>E(M),b&&!n&&(n=lE(h,_)),r=i=A}else d(v)};return p.m=h,p},Bxe={opacity:1,zIndex:1},Pw=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},Nxe=(e,t)=>!Bxe[e]&&md(t)?`${t}px`:t,V8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),$xe=(e,t,n)=>{try{const{style:r}=e;Sc(r[t])?r.setProperty(t,n):r[t]=Nxe(t,n)}catch{}},lg=e=>Ji(e,"direction")==="rtl",X8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Ji(e,[o,s,l,c]);return{t:Pw(d[o],!0),r:Pw(d[s],!0),b:Pw(d[l],!0),l:Pw(d[c],!0)}},ug=(e,t)=>`translate${Os(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:q8}=Math,y4={w:0,h:0},L1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:y4,nS=e=>e?{w:e.clientWidth,h:e.clientHeight}:y4,uE=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:y4,cE=e=>{const t=parseFloat(Ji(e,"height"))||0,n=parseFloat(Ji(e,"width"))||0;return{w:n-q8(n),h:t-q8(t)}},Tl=e=>e.getBoundingClientRect(),ym=e=>!!(e&&(e.height||e.width));let Ow;const Fxe=()=>{if(Sc(Ow)){Ow=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){Ow=!0}}))}catch{}}return Ow},oK=e=>e.split(" "),zxe=(e,t,n,r)=>{_n(oK(t),i=>{e.removeEventListener(i,n,r)})},Xr=(e,t,n,r)=>{var i;const o=Fxe(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return _n(oK(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,zxe.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),Vl.bind(0,d)},sK=e=>e.stopPropagation(),aK=e=>e.preventDefault(),Uxe={x:0,y:0},TD=e=>{const t=e?Tl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:Uxe},Y8=(e,t)=>{_n(Os(t)?t:[t],e)},x4=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);Y8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Fd(o)){const d=t.get(o)||new Set;return t.set(o,d),Y8(f=>{ol(f)&&d.add(f)},s),n.bind(0,o,s)}d4(s)&&s&&n();const l=Ms(o),c=[];return _n(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),Vl.bind(0,c)},i=(o,s)=>{const l=t.get(o);_n(ap(l),c=>{s&&!f4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},K8=e=>JSON.stringify(e,(t,n)=>{if(ol(n))throw new Error;return n}),jxe={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},lK=(e,t)=>{const n={},r=Ms(t).concat(Ms(e));return _n(r,i=>{const o=e[i],s=t[i];if(D1(o)&&D1(s))Tr(n[i]={},lK(o,s)),h4(n[i])&&delete n[i];else if(OT(t,i)&&s!==o){let l=!0;if(Os(o)||Os(s))try{K8(o)===K8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},Ib="data-overlayscrollbars",uK="os-environment",cK=`${uK}-flexbox-glue`,Hxe=`${cK}-max`,dK="os-scrollbar-hidden",ID=`${Ib}-initialize`,Ga=Ib,fK=`${Ga}-overflow-x`,hK=`${Ga}-overflow-y`,km="overflowVisible",Wxe="scrollbarHidden",J8="scrollbarPressed",dE="updating",Fc=`${Ib}-viewport`,RD="arrange",pK="scrollbarHidden",Dm=km,k$=`${Ib}-padding`,Gxe=Dm,Q8=`${Ib}-content`,b4="os-size-observer",Vxe=`${b4}-appear`,Xxe=`${b4}-listener`,qxe="os-trinsic-observer",Yxe="os-no-css-vars",Kxe="os-theme-none",Wo="os-scrollbar",Jxe=`${Wo}-rtl`,Qxe=`${Wo}-horizontal`,Zxe=`${Wo}-vertical`,mK=`${Wo}-track`,w4=`${Wo}-handle`,e1e=`${Wo}-visible`,t1e=`${Wo}-cornerless`,Z8=`${Wo}-transitionless`,ej=`${Wo}-interaction`,tj=`${Wo}-unusable`,D$=`${Wo}-auto-hide`,nj=`${D$}-hidden`,rj=`${Wo}-wheel`,n1e=`${mK}-interactive`,r1e=`${w4}-interactive`,gK={},lp=()=>gK,i1e=e=>{const t=[];return _n(Os(e)?e:[e],n=>{const r=Ms(n);_n(r,i=>{Fn(t,gK[i]=n[i])})}),t},o1e="__osOptionsValidationPlugin",s1e="__osSizeObserverPlugin",_4="__osScrollbarsHidingPlugin",a1e="__osClickScrollPlugin";let AD;const ij=(e,t,n,r)=>{qs(e,t);const i=nS(t),o=L1(t),s=cE(n);return r&&Ul(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},l1e=e=>{let t=!1;const n=Ed(e,dK);try{t=Ji(e,Mxe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},u1e=(e,t)=>{const n="hidden";Ji(e,{overflowX:n,overflowY:n,direction:"rtl"}),Qa(e,0);const r=TD(e),i=TD(t);Qa(e,-999);const o=TD(t);return{i:r.x===i.x,n:i.x!==o.x}},c1e=(e,t)=>{const n=Ed(e,cK),r=Tl(e),i=Tl(t),o=G8(i,r,!0),s=Ed(e,Hxe),l=Tl(e),c=Tl(t),d=G8(c,l,!0);return n(),s(),o&&d},d1e=()=>{const{body:e}=document,n=ZY(`
`)[0],r=n.firstChild,[i,,o]=x4(),[s,l]=Wa({o:ij(e,n,r),u:iK},ij.bind(0,e,n,r,!0)),[c]=l(),d=l1e(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},jxe),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Ji(n,"zIndex")==="-1",B:!!O$,V:u1e(n,r),Y:c1e(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=v4(b=>o(b?"z":"r"),{g:33,v:99});if(Ro(n,"style"),Ul(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=lp()[_4];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Go=()=>(AD||(AD=d1e()),AD),S4=(e,t)=>ol(t)?t.apply(0,e):t,f1e=(e,t,n,r)=>{const i=Sc(r)?n:r;return S4(e,i)||t.apply(0,e)},vK=(e,t,n,r)=>{const i=Sc(r)?n:r,o=S4(e,i);return!!o&&(Xx(o)?o:t.apply(0,e))},h1e=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Go(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Sc(i)?c:i,h=(o.x||o.y)&&d,p=e&&(IT(f)?!s:f);return!!h||!!p},E4=new WeakMap,p1e=(e,t)=>{E4.set(e,t)},m1e=e=>{E4.delete(e)},yK=e=>E4.get(e),oj=(e,t)=>e?t.split(".").reduce((n,r)=>n&&OT(n,r)?n[r]:void 0,e):void 0,L$=(e,t,n)=>r=>[oj(e,r),n||oj(t,r)!==void 0],xK=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},Mw="tabindex",kw=Wh.bind(0,""),PD=e=>{qs(mc(e),p4(e)),Ul(e)},g1e=e=>{const t=Go(),{q:n,A:r}=t,i=lp()[_4],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=Xx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=aE(b,"textarea"),E=b.ownerDocument,I=E.documentElement,A=b===E.body,R=E.defaultView,M=f1e.bind(0,[b]),L=vK.bind(0,[b]),B=S4.bind(0,[b]),H=M.bind(0,kw,d),G=L.bind(0,kw,f),U=H(S),D=U===b,F=D&&A,z=!D&&G(_),V=!D&&Xx(U)&&U===z,W=V&&!!B(f),K=W?H():U,Y=W?z:G(),re=F?I:V?K:U,ue=x?M(kw,l,v):b,ce=F?re:ue,se=V?Y:z,J=E.activeElement,ae=!D&&R.top===R&&J===b,le={Z:b,J:ce,K:re,tt:!D&&L(kw,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?I:re,et:F?E:re,ct:R,rt:E,lt:x,it:A,ut:h,ft:D,dt:V,_t:(it,ht)=>Cxe(re,D?Ga:Fc,D?ht:it),ht:(it,ht,pt)=>Hh(re,D?Ga:Fc,D?ht:it,pt)},he=Ms(le).reduce((it,ht)=>{const pt=le[ht];return Fn(it,pt&&Xx(pt)&&!mc(pt)?pt:!1)},[]),pe=it=>it?PT(he,it)>-1:null,{Z:ve,J:ye,tt:be,K:me,nt:xe,ot:Je}=le,Xe=[()=>{Ro(ye,Ga),Ro(ye,ID),Ro(ve,ID),A&&(Ro(I,Ga),Ro(I,ID))}],at=x&&pe(ye);let Lt=x?ve:p4([xe,me,be,ye,ve].find(it=>pe(it)===!1));const Pe=F?ve:xe||me;return[le,()=>{xo(ye,Ga,D?"viewport":"host"),xo(be,k$,""),xo(xe,Q8,""),D||xo(me,Fc,"");const it=A&&!D?Ed(mc(b),dK):gs;if(at&&(H8(ve,ye),Fn(Xe,()=>{H8(ye,ve),Ul(ye)})),qs(Pe,Lt),qs(ye,be),qs(be||ye,!D&&me),qs(me,xe),Fn(Xe,()=>{it(),Ro(be,k$),Ro(xe,Q8),Ro(me,fK),Ro(me,hK),Ro(me,Fc),pe(xe)&&PD(xe),pe(me)&&PD(me),pe(be)&&PD(be)}),r&&!D&&(Hh(me,Fc,pK,!0),Fn(Xe,Ro.bind(0,me,Fc))),Je&&(Rxe(me,Je),Fn(Xe,Ul.bind(0,Je))),ae){const ht=xo(me,Mw);xo(me,Mw,"-1"),me.focus();const pt=()=>ht?xo(me,Mw,ht):Ro(me,Mw),_e=Xr(E,"pointerdown keydown",()=>{pt(),_e()});Fn(Xe,[pt,_e])}else J&&J.focus&&J.focus();Lt=0},Vl.bind(0,Xe)]},v1e=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Go(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Ji(n,{height:s?"":"100%"}),{wt:c,bt:c}}},y1e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Wa({u:Lxe,o:X8()},X8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Go(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[I,A]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const M=!l&&(A||E||v);if(M){const L=!I||!o&&!y,B=g.r+g.l,H=g.t+g.b,G={marginRight:L&&!_?-B:0,marginBottom:L?-H:0,marginLeft:L&&_?-B:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${B}px)`:""},U={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Ji(o||s,G),Ji(s,U),r({tt:g,$t:!L,P:o?U:Tr({},G,U)})}return{xt:M}}},{max:B$}=Math,zc=B$.bind(0,0),bK="visible",sj="hidden",x1e=42,Dw={u:rK,o:{w:0,h:0}},b1e={u:iK,o:{x:sj,y:sj}},w1e=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:zc(e.w-t.w),h:zc(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},Lw=e=>e.indexOf(bK)===0,_1e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Go(),S=lp()[_4],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Wa(Dw,cE.bind(0,s)),[I,A]=Wa(Dw,uE.bind(0,s)),[R,M]=Wa(Dw),[L,B]=Wa(Dw),[H]=Wa(b1e),G=(W,K)=>{if(Ji(s,{height:""}),K){const{$t:Y,tt:Q}=n(),{Ct:re,M:ue}=W,ce=cE(i),se=nS(i),J=Ji(s,"boxSizing")==="content-box",ae=Y||J?Q.b+Q.t:0,le=!(y.x&&J);Ji(s,{height:se.h+ce.h+(re.x&&le?ue.x:0)-ae})}},U=(W,K)=>{const Y=!v&&!W?x1e:0,Q=(pe,ve,ye)=>{const be=Ji(s,pe),xe=(K?K[pe]:be)==="scroll";return[be,xe,xe&&!v?ve?Y:ye:0,ve&&!!Y]},[re,ue,ce,se]=Q("overflowX",y.x,p.x),[J,ae,le,he]=Q("overflowY",y.y,p.y);return{Ot:{x:re,y:J},Ct:{x:ue,y:ae},M:{x:ce,y:le},D:{x:se,y:he}}},D=(W,K,Y,Q)=>{const re=(ae,le)=>{const he=Lw(ae),pe=le&&he&&ae.replace(`${bK}-`,"")||"";return[le&&!he?ae:"",Lw(pe)?"hidden":pe]},[ue,ce]=re(Y.x,K.x),[se,J]=re(Y.y,K.y);return Q.overflowX=ce&&se?ce:ue,Q.overflowY=J&&ue?J:se,U(W,Q)},F=(W,K,Y,Q)=>{const{M:re,D:ue}=W,{x:ce,y:se}=ue,{x:J,y:ae}=re,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,be=le[pe],me=le.paddingBottom;Q.width=`calc(100% + ${ae+ve*-1}px)`,Q[he]=-ae+ve,Q.marginBottom=-J+ye,Y&&(Q[pe]=be+(se?ae:0),Q.paddingBottom=me+(ce?J:0))},[z,V]=S?S.L(_,g,s,l,n,U,F):[()=>_,()=>[gs]];return(W,K,Y)=>{const{wt:Q,Tt:re,bt:ue,xt:ce,vt:se,St:J}=W,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),be=he&&y.x&&y.y,me=!c&&!g&&(Q||ue||re||pe||se),xe=Lw(ve.x),Je=Lw(ve.y),Xe=xe||Je;let at=E(Y),Lt=A(Y),Pe=M(Y),Fe=B(Y),it;if(pe&&v&&d(pK,Wxe,!be),me&&(it=U(be),G(it,ae)),Q||ce||ue||J||pe){Xe&&d(Dm,km,!1);const[Ae,je]=V(be,le,it),[vt,jt]=at=x(Y),[pn,$r]=Lt=I(Y),Mr=nS(s);let kr=pn,Fr=Mr;Ae(),($r||jt||pe)&&je&&!be&&z(je,pn,vt,le)&&(Fr=nS(s),kr=uE(s));const Jr={w:zc(B$(pn.w,kr.w)+vt.w),h:zc(B$(pn.h,kr.h)+vt.h)},Vo={w:zc((b?h.innerWidth:Fr.w+zc(Mr.w-pn.w))+vt.w),h:zc((b?h.innerHeight+vt.h:Fr.h+zc(Mr.h-pn.h))+vt.h)};Fe=L(Vo),Pe=R(w1e(Jr,Vo),Y)}const[ht,pt]=Fe,[_e,ze]=Pe,[Ye,$e]=Lt,[Be,Rt]=at,ut={x:_e.w>0,y:_e.h>0},Re=xe&&Je&&(ut.x||ut.y)||xe&&ut.x&&!ut.y||Je&&ut.y&&!ut.x;if(ce||J||Rt||$e||pt||ze||ye||pe||me){const Ae={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},je=D(be,ut,ve,Ae),vt=z(je,Ye,Be,le);c||F(je,le,vt,Ae),me&&G(je,ae),c?(xo(i,fK,Ae.overflowX),xo(i,hK,Ae.overflowY)):Ji(s,Ae)}Hh(i,Ga,km,Re),Hh(o,k$,Gxe,Re),c||Hh(s,Fc,Dm,Xe);const[ot,Bt]=H(U(be).Ot);return r({Ot:ot,zt:{x:ht.w,y:ht.h},Et:{x:_e.w,y:_e.h},At:ut}),{It:Bt,Ht:pt,Lt:ze}}},aj=(e,t,n)=>{const r={},i=t||{},o=Ms(e).concat(Ms(i));return _n(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},S1e=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Go(),d=!s&&(l.x||l.y),f=[v1e(e,t),y1e(e,t),_1e(e,t)];return(h,p,g)=>{const v=aj(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&Qa(r),_=y&&oc(r);i("",dE,!0);let b=v;return _n(f,x=>{b=aj(b,x(b,h,!!g)||{},g)}),Qa(r,S),oc(r,_),i("",dE),o||(Qa(n,0),oc(n,0)),b}},E1e=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):QY(h,e));g&&g.length&&p&&Fd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);_n(c,d=>_n(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=Xr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else Vl(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},lj=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=v4(()=>i&&n(!0),{g:33,v:99}),[p,g]=E1e(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const I=d||gs,A=f||gs,R=new Set,M=new Set;let L=!1,B=!1;if(_n(x,H=>{const{attributeName:G,target:U,type:D,oldValue:F,addedNodes:z,removedNodes:V}=H,W=D==="attributes",K=D==="childList",Y=e===U,Q=W&&Fd(G)?xo(U,G):0,re=Q!==0&&F!==Q,ue=PT(y,G)>-1&&re;if(t&&(K||!Y)){const ce=!W,se=W&&re,J=se&&c&&aE(U,c),le=(J?!I(U,G,F,Q):ce||se)&&!A(H,!!J,e,r);_n(z,he=>R.add(he)),_n(V,he=>R.add(he)),B=B||le}!t&&Y&&re&&!I(U,G,F,Q)&&(M.add(G),L=L||ue)}),R.size>0&&g(H=>ap(R).reduce((G,U)=>(Fn(G,QY(H,U)),aE(U,H)?Fn(G,U):G),[])),t)return!E&&B&&n(!1),[!1];if(M.size>0||L){const H=[ap(M),L];return!E&&n.apply(0,H),H}},b=new kxe(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!f4(x)&&_(x,!0)}}]},Bw=3333333,wK=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=lp()[s1e],{V:s}=Go(),c=ZY(`
`)[0],d=c.firstChild,f=lg.bind(0,e),[h]=Wa({o:!1,_:!0,u:(v,y)=>!(!v||!ym(v)&&ym(y))}),p=v=>{const y=Os(v)&&v.length>0&&D1(v[0]),S=!y&&d4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,I]=h(v.pop().contentRect),A=ym(E),R=ym(I);_=!I&&!!R||!A,b=!R&&A,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:lg(c);Qa(c,E?s.n?-Bw:s.i?0:Bw:Bw),oc(c,Bw)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{Vl(g),Ul(c)},()=>{let v=i&&p;if(vm){const y=new vm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Wa({o:void 0},f);Fn(g,Xr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(g4(d,"ltr rtl"),Ed(d,b?"rtl":"ltr"),p([!!b,x,E])),sK(S)}))}v&&(Ed(c,Vxe),Fn(g,Xr(c,"animationstart",v,{C:!!vm}))),(vm||o)&&qs(e,c)}]},C1e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,T1e=(e,t)=>{let n;const r=Wh(qxe),i=[],[o]=Wa({o:!1}),s=(c,d)=>{if(c){const f=o(C1e(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{Vl(i),Ul(r)},()=>{if(W8)n=new W8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=L1(r);s(h)},[d,f]=wK(r,c);Fn(i,d),f(),c()}qs(e,r)},()=>n&&l(n.takeRecords(),!0)]},uj=`[${Ga}]`,I1e=`[${Fc}]`,OD=["tabindex"],cj=["wrap","cols","rows"],MD=["id","class","style","open"],R1e=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Go(),[v]=Wa({u:rK,o:{w:0,h:0}},()=>{const F=h(Dm,km),z=h(RD,""),V=z&&Qa(l),W=z&&oc(l);p(Dm,km),p(RD,""),p("",dE,!0);const K=uE(c),Y=uE(l),Q=cE(l);return p(Dm,km,F),p(RD,"",z),p("",dE),Qa(l,V),oc(l,W),{w:Y.w+K.w+Q.w,h:Y.h+K.h+Q.h}}),y=d?cj:MD.concat(cj),S=v4(n,{g:()=>r,v:()=>i,p(F,z){const[V]=F,[W]=z;return[Ms(V).concat(Ms(W)).reduce((K,Y)=>(K[Y]=V[Y]||W[Y],K),{})]}}),_=F=>{_n(F||OD,z=>{if(PT(OD,z)>-1){const V=xo(s,z);Fd(V)?xo(l,z,V):Ro(l,z)}})},b=(F,z)=>{const[V,W]=F,K={vt:W};return t({gt:V}),!z&&n(K),K},x=({wt:F,jt:z,Pt:V})=>{const W=!F||V?n:S;let K=!1;if(z){const[Y,Q]=z;K=Q,t({yt:Y})}W({wt:F,Pt:V,St:K})},E=(F,z)=>{const[,V]=v(),W={bt:V};return V&&!z&&(F?n:S)(W),W},I=(F,z,V)=>{const W={Tt:z};return z?!V&&S(W):f||_(F),W},[A,R,M]=c||!g?T1e(s,b):[gs,gs,gs],[L,B]=f?[gs,gs]:wK(s,x,{Pt:!0,Yt:!0}),[H,G]=lj(s,!1,I,{Dt:MD,Mt:MD.concat(OD)});let U;const D=f&&vm&&new vm(F=>{const z=F[F.length-1].contentRect,V=ym(z),K=!ym(U)&&V;x({wt:!0,Pt:K}),U=z});return[()=>{A(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),B(),R()},()=>{const F={},z=G(),V=M(),W=o&&o[1]();return z&&Tr(F,I.apply(0,Fn(z,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),W&&Tr(F,E.apply(0,Fn(W,!0))),F},F=>{const[z]=F("update.ignoreMutation"),[V,W]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[Q,re]=F("update.debounce"),ue=Y||W,ce=se=>ol(z)&&z(se);if(ue&&(o&&(o[1](),o[0]()),o=lj(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:uj,Vt:(se,J)=>{const{target:ae,attributeName:le}=se;return(!J&&le&&!f?Ixe(ae,uj,I1e):!1)||!!gm(ae,`.${Wo}`)||!!ce(se)}})),re)if(S.m(),Os(Q)){const se=Q[0],J=Q[1];r=md(se)&&se,i=md(J)&&J}else md(Q)?(r=Q,i=!1):(r=!1,i=!1)}]},dj={x:0,y:0},A1e=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:dj,Et:dj,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:lg(e.J)}),P1e=(e,t)=>{const n=L$(t,{}),[r,i,o]=x4(),[s,l,c]=g1e(e),d=xK(A1e(s)),[f,h]=d,p=S1e(s,d),g=(x,E,I)=>{const R=Ms(x).some(M=>!!x[M])||!h4(E)||I;return R&&o("u",[x,E,I]),R},[v,y,S,_]=R1e(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:I,it:A}=s,R=A?I.documentElement:x,M=Qa(R),L=oc(R);y(),l(),Qa(E,M),oc(E,L)},b.Ft=s,[(x,E)=>{const I=L$(t,x,E);return _(I),g(p(I,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:fj}=Math,O1e=e=>{const{width:t,height:n}=Tl(e),{w:r,h:i}=L1(e);return{x:fj(t)/r||1,y:fj(n)/i||1}},M1e=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},hj="pointerup pointerleave pointercancel lostpointercapture",k1e=(e,t)=>Xr(e,"mousedown",Xr.bind(0,t,"click",sK,{C:!0,$:!0}),{$:!0}),D1e=(e,t,n,r,i,o,s)=>{const{V:l}=Go(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:I}=o(),A=L1(d)[y]-L1(c)[y],M=x*E/A*I[S],B=lg(f)&&s?l.n||l.i?1:-1:1;i[h]=b+M*B};return Xr(d,"pointerdown",b=>{const x=gm(b.target,`.${w4}`)===c,E=x?c:d;if(Hh(t,Ga,J8,!0),M1e(b,e,x)){const I=!x&&b.shiftKey,A=()=>Tl(c),R=()=>Tl(d),M=(K,Y)=>(K||A())[v]-(Y||R())[v],L=_(i[h]||0,1/O1e(i)[S]),B=b[p],H=A(),G=R(),U=H[g],D=M(H,G)+U/2,F=B-G[v],z=x?0:F-D,V=K=>{Vl(W),E.releasePointerCapture(K.pointerId)},W=[Hh.bind(0,t,Ga,J8),Xr(n,hj,V),Xr(n,"selectstart",K=>aK(K),{S:!1}),Xr(d,hj,V),Xr(d,"pointermove",K=>{const Y=K[p]-B;(x||I)&&L(z+Y)})];if(I)L(z);else if(!x){const K=lp()[a1e];K&&Fn(W,K.O(L,M,z,U,F))}E.setPointerCapture(b.pointerId)}})},L1e=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=wh(333),p=!!s.scrollBy;let g=!0;return Vl.bind(0,[Xr(d,"pointerenter",()=>{r(ej,!0)}),Xr(d,"pointerleave pointercancel",()=>{r(ej)}),Xr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&mc(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(rj,!0),f(()=>{g=!0,r(rj)}),aK(v)},{S:!1,$:!0}),k1e(d,i),D1e(e,o,i,n,s,t,c),h])},{min:fE,max:N$,round:B1e}=Math,_K=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return N$(0,fE(1,f/(f+h)))}const i=n?"width":"height",o=Tl(e)[i],s=Tl(t)[i];return N$(0,fE(1,o/s))},N1e=(e,t,n,r,i,o)=>{const{V:s}=Go(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=B1e(d[l]),h=fE(f,N$(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=fE(1,(p?g:h)/f),S=_K(e,t,o);return 1/S*(1-S)*y},SK=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),$1e=(e,t)=>({transform:[ug("0%",t),ug(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),F1e=e=>`${Math.max(0,e-.5)}px`,pj=(e,t,n,r)=>SK(e,t,{transform:[ug("0px",r),ug(F1e(n),r)]},"add"),mj=(e,t)=>O$?new O$({source:e,axis:t}):null,z1e=(e,t,n)=>{const{q:r,H:i}=Go(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=mj(p,"x"),x=mj(p,"y"),E=vK([c,d,f],()=>v&&g?c:d,s,S),I=se=>v&&!g&&mc(se)===f,A=se=>{_.forEach((J,ae)=>{(se?PT(Os(se)?se:[se],ae)>-1:!0)&&((J||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},R=(se,J,ae)=>{const le=ae?Ed:g4;_n(se,he=>{le(he.Ut,J)})},M=(se,J)=>{_n(se,ae=>{const[le,he]=J(ae);Ji(le,he)})},L=(se,J,ae)=>{M(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(_K(he,pe,ae,J)*100).toFixed(3)}%`}]})},B=(se,J,ae)=>{!x&&!x&&M(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=N1e(he,pe,p,J,lg(ve),ae);return[he,{transform:ye===ye?ug(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:J}=se,ae=I(J)&&J;return[ae,{transform:ae?ug([`${Qa(p)}px`,`${oc(p)}px`]):""}]},G=[],U=[],D=[],F=(se,J,ae)=>{const le=d4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&R(U,se,J),pe&&R(D,se,J)},z=se=>{L(U,se,!0),L(D,se)},V=se=>{B(U,se,!0),B(D,se)},W=()=>{const se=(J,{Ut:ae,Gt:le})=>{A(le),_.set(le,[SK(le,J?b:x,$1e(J&&lg(ae),J))])};U.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&M(U,H),v&&M(D,H))},Y=({Et:se})=>{D.concat(U).forEach(({Ut:J})=>{A(J),I(J)&&_.set(J,[pj(J,b,se.x,!0),pj(J,x,se.y)])})},Q=se=>{const J=se?Qxe:Zxe,ae=se?U:D,le=f4(ae)?Z8:"",he=Wh(`${Wo} ${J} ${le}`),pe=Wh(mK),ve=Wh(w4),ye={Ut:he,Xt:pe,Gt:ve};return i||Ed(he,Yxe),qs(he,pe),qs(pe,ve),Fn(ae,ye),Fn(G,[Ul.bind(0,he),A,n(ye,F,l,d,p,se?b:x,se)]),ye},re=Q.bind(0,!0),ue=Q.bind(0,!1),ce=()=>{qs(E,U[0].Ut),qs(E,D[0].Ut),lE(()=>{F(Z8)},300)};return re(),ue(),[{Wt:z,Zt:V,Jt:W,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:U,en:re,cn:M.bind(0,U)},rn:{B:x,sn:D,en:ue,cn:M.bind(0,D)}},ce,Vl.bind(0,G)]},kD=e=>e.pointerType==="mouse",U1e=(e,t,n,r)=>{let i,o,s,l,c,d=gs,f=0;const h=xK({}),[p]=h,[g,v]=wh(),[y,S]=wh(),[_,b]=wh(100),[x,E]=wh(100),[I,A]=wh(100),[R,M]=wh(()=>f),[L,B,H]=z1e(e,n.Ft,L1e(t,n)),{J:G,et:U,it:D}=n.Ft,{tn:F,Wt:z,Zt:V,Jt:W,Kt:K,Qt:Y}=L,Q=J=>{F(D$,J,!0),F(D$,J,!1)},re=(J,ae)=>{if(M(),J)F(nj);else{const le=()=>F(nj,!0);f>0&&!ae?R(le):le()}},ue=J=>{kD(J)&&(l=o,l&&re(!0))},ce=[b,M,E,A,S,v,H,Xr(G,"pointerover",ue,{C:!0}),Xr(G,"pointerenter",ue),Xr(G,"pointerleave",J=>{kD(J)&&(l=!1,o&&re(!1))}),Xr(G,"pointermove",J=>{kD(J)&&i&&g(()=>{b(),re(!0),x(()=>{i&&re(!1)})})}),Xr(U,"scroll",J=>{y(()=>{V(n()),s&&re(!0),_(()=>{s&&!l&&re(!1)})}),r(J),Y()})],se=p.bind(0);return se.Ft=L,se.qt=B,[(J,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:be}=le,{I:me}=Go(),xe=L$(t,J,ae),Je=n(),{Et:Xe,Ot:at,yt:Lt,At:Pe}=Je,[Fe,it]=xe("showNativeOverlaidScrollbars"),[ht,pt]=xe("scrollbars.theme"),[_e,ze]=xe("scrollbars.visibility"),[Ye,$e]=xe("scrollbars.autoHide"),[Be,Rt]=xe("scrollbars.autoHideSuspend"),[ut]=xe("scrollbars.autoHideDelay"),[Re,ot]=xe("scrollbars.dragScroll"),[Bt,Ae]=xe("scrollbars.clickScroll"),je=be&&!ae,vt=Pe.x||Pe.y,jt=he||pe||ye,pn=ve||ze,$r=Fe&&me.x&&me.y,Mr=(kr,Fr)=>{const Jr=_e==="visible"||_e==="auto"&&kr==="scroll";return F(e1e,Jr,Fr),Jr};if(f=ut,je&&(Be&&vt?(Q(!1),d(),I(()=>{d=Xr(U,"scroll",Q.bind(0,!0),{C:!0})})):Q(!0)),it&&F(Kxe,$r),pt&&(F(c),F(ht,!0),c=ht),Rt&&!Be&&Q(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",re(!s,!0)),ot&&F(r1e,Re),Ae&&F(n1e,Bt),pn){const kr=Mr(at.x,!0),Fr=Mr(at.y,!1);F(t1e,!(kr&&Fr))}jt&&(z(Je),V(Je),W(Je),K(Je),Y(),F(tj,!Xe.x,!0),F(tj,!Xe.y,!1),F(Jxe,Lt&&!D))},se,()=>{Vl(ce),d()}]},EK=(e,t,n)=>{ol(e)&&e(t||void 0,n||void 0)},Zc=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Go(),l=lp(),c=Xx(e),d=c?e:e.target,f=yK(d);if(t&&!f){let h=!1;const p=U=>{const D=lp()[o1e],F=D&&D.O;return F?F(U,!0):U},g=Tr({},r(),p(t)),[v,y,S]=x4(n),[_,b,x]=P1e(e,g),[E,I,A]=U1e(e,g,b,U=>S("scroll",[G,U])),R=(U,D)=>_(U,!!D),M=R.bind(0,{},!0),L=o(M),B=s(M),H=U=>{m1e(d),L(),B(),A(),x(),h=!0,S("destroyed",[G,!!U]),y()},G={options(U,D){if(U){const F=D?r():{},z=lK(g,Tr(F,p(U)));h4(z)||(Tr(g,z),R(z))}return Tr({},g)},on:v,off:(U,D)=>{U&&D&&y(U,D)},state(){const{zt:U,Et:D,Ot:F,At:z,tt:V,$t:W,yt:K}=b();return Tr({},{overflowEdge:U,overflowAmount:D,overflowStyle:F,hasOverflow:z,padding:V,paddingAbsolute:W,directionRTL:K,destroyed:h})},elements(){const{Z:U,J:D,tt:F,K:z,nt:V,st:W,et:K}=b.Ft,{nn:Y,rn:Q}=I.Ft,re=ce=>{const{Gt:se,Xt:J,Ut:ae}=ce;return{scrollbar:ae,track:J,handle:se}},ue=ce=>{const{sn:se,en:J}=ce,ae=re(se[0]);return Tr({},ae,{clone:()=>{const le=re(J());return E({},!0,{}),le}})};return Tr({},{target:U,host:D,padding:F||z,viewport:z,content:V||z,scrollOffsetElement:W,scrollEventElement:K,scrollbarHorizontal:ue(Y),scrollbarVertical:ue(Q)})},update:U=>R({},U),destroy:H.bind(0)};return b.Nt((U,D,F)=>{E(D,F,U)}),p1e(d,G),_n(Ms(l),U=>EK(l[U],0,G)),h1e(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),G):(b.qt(),I.qt(),S("initialized",[G]),b.Nt((U,D,F)=>{const{wt:z,St:V,vt:W,Ht:K,Lt:Y,It:Q,bt:re,Tt:ue}=U;S("updated",[G,{updateHints:{sizeChanged:z,directionChanged:V,heightIntrinsicChanged:W,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:Q,contentMutation:re,hostMutation:ue},changedOptions:D,force:F}])}),G.update(!0),G)}return f};Zc.plugin=e=>{_n(i1e(e),t=>EK(t,Zc))};Zc.valid=e=>{const t=e&&e.elements,n=ol(t)&&t();return R$(n)&&!!yK(n.target)};Zc.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Go();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const j1e=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},CK=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=O.useMemo(j1e,[]),s=O.useRef(null),l=O.useRef(r),c=O.useRef(t),d=O.useRef(n);return O.useEffect(()=>{l.current=r},[r]),O.useEffect(()=>{const{current:f}=s;c.current=t,Zc.valid(f)&&f.options(t||{},!0)},[t]),O.useEffect(()=>{const{current:f}=s;d.current=n,Zc.valid(f)&&f.on(n||{},!0)},[n]),O.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),O.useMemo(()=>[f=>{const h=s.current;if(Zc.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=Zc(f,g,v);p?i(y,p):y()},()=>s.current],[])},H1e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=O.useRef(null),f=O.useRef(null),[h,p]=O.useState(!1),[g,v]=CK({options:r,events:i,defer:o});return O.useEffect(()=>{p(!0)},[]),O.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),O.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},W1e=O.forwardRef(H1e),kT=O.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=Pn(),c=k1({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=O.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(W1e,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var TK={exports:{}},Jn={};/** @license React v17.0.2 + */function _n(e,t){if(RT(e))for(let n=0;nt(e[n],n,e));return e}function Ji(e,t){const n=Fd(t);if(Os(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?V8(e,o,t):t.reduce((s,l)=>(s[l]=V8(e,o,l),s),i)}return i}e&&_n(Ms(t),i=>$xe(e,i,t[i]))}const Wa=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Tb=()=>typeof window<"u",KY=Tb()&&Node.ELEMENT_NODE,{toString:Sxe,hasOwnProperty:SD}=Object.prototype,Sc=e=>e===void 0,IT=e=>e===null,Exe=e=>Sc(e)||IT(e)?`${e}`:Sxe.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),md=e=>typeof e=="number",Fd=e=>typeof e=="string",d4=e=>typeof e=="boolean",ol=e=>typeof e=="function",Os=e=>Array.isArray(e),D1=e=>typeof e=="object"&&!Os(e)&&!IT(e),RT=e=>{const t=!!e&&e.length,n=md(t)&&t>-1&&t%1==0;return Os(e)||!ol(e)&&n?t>0&&D1(e)?t-1 in e:!0:!1},R$=e=>{if(!e||!D1(e)||Exe(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=SD.call(e,n),s=i&&SD.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Sc(t)||SD.call(e,t)},Xx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===KY:!1},AT=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===KY:!1},PT=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Fd(t)&&RT(t)?Array.prototype.push.apply(e,t):e.push(t),e),ap=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):_n(e,r=>{Fn(n,r)}),n)},f4=e=>!!e&&e.length===0,Vl=(e,t,n)=>{_n(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},OT=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ms=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||IT(e))&&!ol(e)&&(e={}),_n(l,c=>{_n(Ms(c),d=>{const f=c[d];if(e===f)return!0;const h=Os(f);if(f&&R$(f)){const p=e[d];let g=p;h&&!Os(p)?g=[]:!h&&!R$(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},h4=e=>{for(const t in e)return!1;return!0},JY=(e,t,n,r)=>{if(Sc(r))return n?n[e]:t;n&&(Fd(r)||md(r))&&(n[e]=r)},xo=(e,t,n)=>{if(Sc(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},QY=(e,t)=>new Set((xo(e,t)||"").split(" ")),Ro=(e,t)=>{e&&e.removeAttribute(t)},Hh=(e,t,n,r)=>{if(n){const i=QY(e,t);i[r?"add":"delete"](n);const o=ap(i).join(" ").trim();xo(e,t,o)}},Cxe=(e,t,n)=>QY(e,t).has(n),Qa=(e,t)=>JY("scrollLeft",0,e,t),oc=(e,t)=>JY("scrollTop",0,e,t),A$=Tb()&&Element.prototype,ZY=(e,t)=>{const n=[],r=t?AT(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},Txe=(e,t)=>{const n=t?AT(t)&&t:document;return n?n.querySelector(e):null},aE=(e,t)=>AT(e)?(A$.matches||A$.msMatchesSelector).call(e,t):!1,p4=e=>e?ap(e.childNodes):[],mc=e=>e&&e.parentElement,gm=(e,t)=>{if(AT(e)){const n=A$.closest;if(n)return n.call(e,t);do{if(aE(e,t))return e;e=mc(e)}while(e)}},Ixe=(e,t,n)=>{const r=gm(e,t),i=e&&Txe(n,r),o=gm(i,t)===r;return r&&i?r===e||i===e||o&&gm(gm(e,n),t)!==r:!1},m4=(e,t,n)=>{if(n&&e){let r=t,i;RT(n)?(i=document.createDocumentFragment(),_n(n,o=>{o===r&&(r=o.previousSibling),i.appendChild(o)})):i=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(i,r||null)}},qs=(e,t)=>{m4(e,null,t)},Rxe=(e,t)=>{m4(mc(e),e,t)},H8=(e,t)=>{m4(mc(e),e&&e.nextSibling,t)},Ul=e=>{if(RT(e))_n(ap(e),t=>Ul(t));else if(e){const t=mc(e);t&&t.removeChild(e)}},Wh=e=>{const t=document.createElement("div");return e&&xo(t,"class",e),t},eK=e=>{const t=Wh();return t.innerHTML=e.trim(),_n(p4(t),n=>Ul(n))},P$=e=>e.charAt(0).toUpperCase()+e.slice(1),Axe=()=>Wh().style,Pxe=["-webkit-","-moz-","-o-","-ms-"],Oxe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],ED={},CD={},Mxe=e=>{let t=CD[e];if(OT(CD,e))return t;const n=P$(e),r=Axe();return _n(Pxe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,P$(o)+n].find(l=>r[l]!==void 0))}),CD[e]=t||""},Lg=e=>{if(Tb()){let t=ED[e]||window[e];return OT(ED,e)||(_n(Oxe,n=>(t=t||window[n+P$(e)],!t)),ED[e]=t),t}},kxe=Lg("MutationObserver"),W8=Lg("IntersectionObserver"),vm=Lg("ResizeObserver"),tK=Lg("cancelAnimationFrame"),nK=Lg("requestAnimationFrame"),O$=Lg("ScrollTimeline"),lE=Tb()&&window.setTimeout,M$=Tb()&&window.clearTimeout,Dxe=/[^\x20\t\r\n\f]+/g,rK=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Fd(t)){const l=t.match(Dxe)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},g4=(e,t)=>{rK(e,t,(n,r)=>n.remove(r))},Ed=(e,t)=>(rK(e,t,(n,r)=>n.add(r)),g4.bind(0,e,t)),MT=(e,t,n,r)=>{if(e&&t){let i=!0;return _n(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},iK=(e,t)=>MT(e,t,["w","h"]),oK=(e,t)=>MT(e,t,["x","y"]),Lxe=(e,t)=>MT(e,t,["t","r","b","l"]),G8=(e,t,n)=>MT(e,t,["width","height"],n&&(r=>Math.round(r))),gs=()=>{},wh=e=>{let t;const n=e?lE:nK,r=e?M$:tK;return[i=>{r(t),t=n(i,ol(e)?e():e)},()=>r(t)]},v4=(e,t)=>{let n,r,i,o=gs;const{g:s,v:l,p:c}=t||{},d=function(v){o(),M$(n),n=r=void 0,o=gs,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==gs&&d(f(i)||i)},p=function(){const v=ap(arguments),y=ol(s)?s():s;if(md(y)&&y>=0){const _=ol(l)?l():l,b=md(_)&&_>=0,x=y>0?lE:nK,E=y>0?M$:tK,A=f(v)||v,R=d.bind(0,A);o();const M=x(R,y);o=()=>E(M),b&&!n&&(n=lE(h,_)),r=i=A}else d(v)};return p.m=h,p},Bxe={opacity:1,zIndex:1},Pw=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},Nxe=(e,t)=>!Bxe[e]&&md(t)?`${t}px`:t,V8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),$xe=(e,t,n)=>{try{const{style:r}=e;Sc(r[t])?r.setProperty(t,n):r[t]=Nxe(t,n)}catch{}},lg=e=>Ji(e,"direction")==="rtl",X8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Ji(e,[o,s,l,c]);return{t:Pw(d[o],!0),r:Pw(d[s],!0),b:Pw(d[l],!0),l:Pw(d[c],!0)}},ug=(e,t)=>`translate${Os(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:q8}=Math,y4={w:0,h:0},L1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:y4,nS=e=>e?{w:e.clientWidth,h:e.clientHeight}:y4,uE=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:y4,cE=e=>{const t=parseFloat(Ji(e,"height"))||0,n=parseFloat(Ji(e,"width"))||0;return{w:n-q8(n),h:t-q8(t)}},Tl=e=>e.getBoundingClientRect(),ym=e=>!!(e&&(e.height||e.width));let Ow;const Fxe=()=>{if(Sc(Ow)){Ow=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){Ow=!0}}))}catch{}}return Ow},sK=e=>e.split(" "),zxe=(e,t,n,r)=>{_n(sK(t),i=>{e.removeEventListener(i,n,r)})},Xr=(e,t,n,r)=>{var i;const o=Fxe(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return _n(sK(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,zxe.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),Vl.bind(0,d)},aK=e=>e.stopPropagation(),lK=e=>e.preventDefault(),Uxe={x:0,y:0},TD=e=>{const t=e?Tl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:Uxe},Y8=(e,t)=>{_n(Os(t)?t:[t],e)},x4=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);Y8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Fd(o)){const d=t.get(o)||new Set;return t.set(o,d),Y8(f=>{ol(f)&&d.add(f)},s),n.bind(0,o,s)}d4(s)&&s&&n();const l=Ms(o),c=[];return _n(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),Vl.bind(0,c)},i=(o,s)=>{const l=t.get(o);_n(ap(l),c=>{s&&!f4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},K8=e=>JSON.stringify(e,(t,n)=>{if(ol(n))throw new Error;return n}),jxe={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},uK=(e,t)=>{const n={},r=Ms(t).concat(Ms(e));return _n(r,i=>{const o=e[i],s=t[i];if(D1(o)&&D1(s))Tr(n[i]={},uK(o,s)),h4(n[i])&&delete n[i];else if(OT(t,i)&&s!==o){let l=!0;if(Os(o)||Os(s))try{K8(o)===K8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},Ib="data-overlayscrollbars",cK="os-environment",dK=`${cK}-flexbox-glue`,Hxe=`${dK}-max`,fK="os-scrollbar-hidden",ID=`${Ib}-initialize`,Ga=Ib,hK=`${Ga}-overflow-x`,pK=`${Ga}-overflow-y`,km="overflowVisible",Wxe="scrollbarHidden",J8="scrollbarPressed",dE="updating",Fc=`${Ib}-viewport`,RD="arrange",mK="scrollbarHidden",Dm=km,k$=`${Ib}-padding`,Gxe=Dm,Q8=`${Ib}-content`,b4="os-size-observer",Vxe=`${b4}-appear`,Xxe=`${b4}-listener`,qxe="os-trinsic-observer",Yxe="os-no-css-vars",Kxe="os-theme-none",Wo="os-scrollbar",Jxe=`${Wo}-rtl`,Qxe=`${Wo}-horizontal`,Zxe=`${Wo}-vertical`,gK=`${Wo}-track`,w4=`${Wo}-handle`,e1e=`${Wo}-visible`,t1e=`${Wo}-cornerless`,Z8=`${Wo}-transitionless`,ej=`${Wo}-interaction`,tj=`${Wo}-unusable`,D$=`${Wo}-auto-hide`,nj=`${D$}-hidden`,rj=`${Wo}-wheel`,n1e=`${gK}-interactive`,r1e=`${w4}-interactive`,vK={},lp=()=>vK,i1e=e=>{const t=[];return _n(Os(e)?e:[e],n=>{const r=Ms(n);_n(r,i=>{Fn(t,vK[i]=n[i])})}),t},o1e="__osOptionsValidationPlugin",s1e="__osSizeObserverPlugin",_4="__osScrollbarsHidingPlugin",a1e="__osClickScrollPlugin";let AD;const ij=(e,t,n,r)=>{qs(e,t);const i=nS(t),o=L1(t),s=cE(n);return r&&Ul(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},l1e=e=>{let t=!1;const n=Ed(e,fK);try{t=Ji(e,Mxe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},u1e=(e,t)=>{const n="hidden";Ji(e,{overflowX:n,overflowY:n,direction:"rtl"}),Qa(e,0);const r=TD(e),i=TD(t);Qa(e,-999);const o=TD(t);return{i:r.x===i.x,n:i.x!==o.x}},c1e=(e,t)=>{const n=Ed(e,dK),r=Tl(e),i=Tl(t),o=G8(i,r,!0),s=Ed(e,Hxe),l=Tl(e),c=Tl(t),d=G8(c,l,!0);return n(),s(),o&&d},d1e=()=>{const{body:e}=document,n=eK(`
`)[0],r=n.firstChild,[i,,o]=x4(),[s,l]=Wa({o:ij(e,n,r),u:oK},ij.bind(0,e,n,r,!0)),[c]=l(),d=l1e(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},jxe),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Ji(n,"zIndex")==="-1",B:!!O$,V:u1e(n,r),Y:c1e(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=v4(b=>o(b?"z":"r"),{g:33,v:99});if(Ro(n,"style"),Ul(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=lp()[_4];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Go=()=>(AD||(AD=d1e()),AD),S4=(e,t)=>ol(t)?t.apply(0,e):t,f1e=(e,t,n,r)=>{const i=Sc(r)?n:r;return S4(e,i)||t.apply(0,e)},yK=(e,t,n,r)=>{const i=Sc(r)?n:r,o=S4(e,i);return!!o&&(Xx(o)?o:t.apply(0,e))},h1e=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Go(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Sc(i)?c:i,h=(o.x||o.y)&&d,p=e&&(IT(f)?!s:f);return!!h||!!p},E4=new WeakMap,p1e=(e,t)=>{E4.set(e,t)},m1e=e=>{E4.delete(e)},xK=e=>E4.get(e),oj=(e,t)=>e?t.split(".").reduce((n,r)=>n&&OT(n,r)?n[r]:void 0,e):void 0,L$=(e,t,n)=>r=>[oj(e,r),n||oj(t,r)!==void 0],bK=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},Mw="tabindex",kw=Wh.bind(0,""),PD=e=>{qs(mc(e),p4(e)),Ul(e)},g1e=e=>{const t=Go(),{q:n,A:r}=t,i=lp()[_4],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=Xx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=aE(b,"textarea"),E=b.ownerDocument,I=E.documentElement,A=b===E.body,R=E.defaultView,M=f1e.bind(0,[b]),L=yK.bind(0,[b]),B=S4.bind(0,[b]),H=M.bind(0,kw,d),G=L.bind(0,kw,f),U=H(S),D=U===b,F=D&&A,z=!D&&G(_),V=!D&&Xx(U)&&U===z,W=V&&!!B(f),K=W?H():U,Y=W?z:G(),re=F?I:V?K:U,ue=x?M(kw,l,v):b,ce=F?re:ue,se=V?Y:z,J=E.activeElement,ae=!D&&R.top===R&&J===b,le={Z:b,J:ce,K:re,tt:!D&&L(kw,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?I:re,et:F?E:re,ct:R,rt:E,lt:x,it:A,ut:h,ft:D,dt:V,_t:(it,ht)=>Cxe(re,D?Ga:Fc,D?ht:it),ht:(it,ht,pt)=>Hh(re,D?Ga:Fc,D?ht:it,pt)},he=Ms(le).reduce((it,ht)=>{const pt=le[ht];return Fn(it,pt&&Xx(pt)&&!mc(pt)?pt:!1)},[]),pe=it=>it?PT(he,it)>-1:null,{Z:ve,J:ye,tt:be,K:me,nt:xe,ot:Je}=le,Xe=[()=>{Ro(ye,Ga),Ro(ye,ID),Ro(ve,ID),A&&(Ro(I,Ga),Ro(I,ID))}],at=x&&pe(ye);let Lt=x?ve:p4([xe,me,be,ye,ve].find(it=>pe(it)===!1));const Pe=F?ve:xe||me;return[le,()=>{xo(ye,Ga,D?"viewport":"host"),xo(be,k$,""),xo(xe,Q8,""),D||xo(me,Fc,"");const it=A&&!D?Ed(mc(b),fK):gs;if(at&&(H8(ve,ye),Fn(Xe,()=>{H8(ye,ve),Ul(ye)})),qs(Pe,Lt),qs(ye,be),qs(be||ye,!D&&me),qs(me,xe),Fn(Xe,()=>{it(),Ro(be,k$),Ro(xe,Q8),Ro(me,hK),Ro(me,pK),Ro(me,Fc),pe(xe)&&PD(xe),pe(me)&&PD(me),pe(be)&&PD(be)}),r&&!D&&(Hh(me,Fc,mK,!0),Fn(Xe,Ro.bind(0,me,Fc))),Je&&(Rxe(me,Je),Fn(Xe,Ul.bind(0,Je))),ae){const ht=xo(me,Mw);xo(me,Mw,"-1"),me.focus();const pt=()=>ht?xo(me,Mw,ht):Ro(me,Mw),_e=Xr(E,"pointerdown keydown",()=>{pt(),_e()});Fn(Xe,[pt,_e])}else J&&J.focus&&J.focus();Lt=0},Vl.bind(0,Xe)]},v1e=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Go(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Ji(n,{height:s?"":"100%"}),{wt:c,bt:c}}},y1e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Wa({u:Lxe,o:X8()},X8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Go(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[I,A]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const M=!l&&(A||E||v);if(M){const L=!I||!o&&!y,B=g.r+g.l,H=g.t+g.b,G={marginRight:L&&!_?-B:0,marginBottom:L?-H:0,marginLeft:L&&_?-B:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${B}px)`:""},U={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Ji(o||s,G),Ji(s,U),r({tt:g,$t:!L,P:o?U:Tr({},G,U)})}return{xt:M}}},{max:B$}=Math,zc=B$.bind(0,0),wK="visible",sj="hidden",x1e=42,Dw={u:iK,o:{w:0,h:0}},b1e={u:oK,o:{x:sj,y:sj}},w1e=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:zc(e.w-t.w),h:zc(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},Lw=e=>e.indexOf(wK)===0,_1e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Go(),S=lp()[_4],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Wa(Dw,cE.bind(0,s)),[I,A]=Wa(Dw,uE.bind(0,s)),[R,M]=Wa(Dw),[L,B]=Wa(Dw),[H]=Wa(b1e),G=(W,K)=>{if(Ji(s,{height:""}),K){const{$t:Y,tt:Q}=n(),{Ct:re,M:ue}=W,ce=cE(i),se=nS(i),J=Ji(s,"boxSizing")==="content-box",ae=Y||J?Q.b+Q.t:0,le=!(y.x&&J);Ji(s,{height:se.h+ce.h+(re.x&&le?ue.x:0)-ae})}},U=(W,K)=>{const Y=!v&&!W?x1e:0,Q=(pe,ve,ye)=>{const be=Ji(s,pe),xe=(K?K[pe]:be)==="scroll";return[be,xe,xe&&!v?ve?Y:ye:0,ve&&!!Y]},[re,ue,ce,se]=Q("overflowX",y.x,p.x),[J,ae,le,he]=Q("overflowY",y.y,p.y);return{Ot:{x:re,y:J},Ct:{x:ue,y:ae},M:{x:ce,y:le},D:{x:se,y:he}}},D=(W,K,Y,Q)=>{const re=(ae,le)=>{const he=Lw(ae),pe=le&&he&&ae.replace(`${wK}-`,"")||"";return[le&&!he?ae:"",Lw(pe)?"hidden":pe]},[ue,ce]=re(Y.x,K.x),[se,J]=re(Y.y,K.y);return Q.overflowX=ce&&se?ce:ue,Q.overflowY=J&&ue?J:se,U(W,Q)},F=(W,K,Y,Q)=>{const{M:re,D:ue}=W,{x:ce,y:se}=ue,{x:J,y:ae}=re,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,be=le[pe],me=le.paddingBottom;Q.width=`calc(100% + ${ae+ve*-1}px)`,Q[he]=-ae+ve,Q.marginBottom=-J+ye,Y&&(Q[pe]=be+(se?ae:0),Q.paddingBottom=me+(ce?J:0))},[z,V]=S?S.L(_,g,s,l,n,U,F):[()=>_,()=>[gs]];return(W,K,Y)=>{const{wt:Q,Tt:re,bt:ue,xt:ce,vt:se,St:J}=W,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),be=he&&y.x&&y.y,me=!c&&!g&&(Q||ue||re||pe||se),xe=Lw(ve.x),Je=Lw(ve.y),Xe=xe||Je;let at=E(Y),Lt=A(Y),Pe=M(Y),Fe=B(Y),it;if(pe&&v&&d(mK,Wxe,!be),me&&(it=U(be),G(it,ae)),Q||ce||ue||J||pe){Xe&&d(Dm,km,!1);const[Ae,je]=V(be,le,it),[vt,jt]=at=x(Y),[pn,$r]=Lt=I(Y),Mr=nS(s);let kr=pn,Fr=Mr;Ae(),($r||jt||pe)&&je&&!be&&z(je,pn,vt,le)&&(Fr=nS(s),kr=uE(s));const Jr={w:zc(B$(pn.w,kr.w)+vt.w),h:zc(B$(pn.h,kr.h)+vt.h)},Vo={w:zc((b?h.innerWidth:Fr.w+zc(Mr.w-pn.w))+vt.w),h:zc((b?h.innerHeight+vt.h:Fr.h+zc(Mr.h-pn.h))+vt.h)};Fe=L(Vo),Pe=R(w1e(Jr,Vo),Y)}const[ht,pt]=Fe,[_e,ze]=Pe,[Ye,$e]=Lt,[Be,Rt]=at,ut={x:_e.w>0,y:_e.h>0},Re=xe&&Je&&(ut.x||ut.y)||xe&&ut.x&&!ut.y||Je&&ut.y&&!ut.x;if(ce||J||Rt||$e||pt||ze||ye||pe||me){const Ae={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},je=D(be,ut,ve,Ae),vt=z(je,Ye,Be,le);c||F(je,le,vt,Ae),me&&G(je,ae),c?(xo(i,hK,Ae.overflowX),xo(i,pK,Ae.overflowY)):Ji(s,Ae)}Hh(i,Ga,km,Re),Hh(o,k$,Gxe,Re),c||Hh(s,Fc,Dm,Xe);const[ot,Bt]=H(U(be).Ot);return r({Ot:ot,zt:{x:ht.w,y:ht.h},Et:{x:_e.w,y:_e.h},At:ut}),{It:Bt,Ht:pt,Lt:ze}}},aj=(e,t,n)=>{const r={},i=t||{},o=Ms(e).concat(Ms(i));return _n(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},S1e=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Go(),d=!s&&(l.x||l.y),f=[v1e(e,t),y1e(e,t),_1e(e,t)];return(h,p,g)=>{const v=aj(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&Qa(r),_=y&&oc(r);i("",dE,!0);let b=v;return _n(f,x=>{b=aj(b,x(b,h,!!g)||{},g)}),Qa(r,S),oc(r,_),i("",dE),o||(Qa(n,0),oc(n,0)),b}},E1e=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):ZY(h,e));g&&g.length&&p&&Fd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);_n(c,d=>_n(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=Xr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else Vl(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},lj=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=v4(()=>i&&n(!0),{g:33,v:99}),[p,g]=E1e(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const I=d||gs,A=f||gs,R=new Set,M=new Set;let L=!1,B=!1;if(_n(x,H=>{const{attributeName:G,target:U,type:D,oldValue:F,addedNodes:z,removedNodes:V}=H,W=D==="attributes",K=D==="childList",Y=e===U,Q=W&&Fd(G)?xo(U,G):0,re=Q!==0&&F!==Q,ue=PT(y,G)>-1&&re;if(t&&(K||!Y)){const ce=!W,se=W&&re,J=se&&c&&aE(U,c),le=(J?!I(U,G,F,Q):ce||se)&&!A(H,!!J,e,r);_n(z,he=>R.add(he)),_n(V,he=>R.add(he)),B=B||le}!t&&Y&&re&&!I(U,G,F,Q)&&(M.add(G),L=L||ue)}),R.size>0&&g(H=>ap(R).reduce((G,U)=>(Fn(G,ZY(H,U)),aE(U,H)?Fn(G,U):G),[])),t)return!E&&B&&n(!1),[!1];if(M.size>0||L){const H=[ap(M),L];return!E&&n.apply(0,H),H}},b=new kxe(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!f4(x)&&_(x,!0)}}]},Bw=3333333,_K=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=lp()[s1e],{V:s}=Go(),c=eK(`
`)[0],d=c.firstChild,f=lg.bind(0,e),[h]=Wa({o:!1,_:!0,u:(v,y)=>!(!v||!ym(v)&&ym(y))}),p=v=>{const y=Os(v)&&v.length>0&&D1(v[0]),S=!y&&d4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,I]=h(v.pop().contentRect),A=ym(E),R=ym(I);_=!I&&!!R||!A,b=!R&&A,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:lg(c);Qa(c,E?s.n?-Bw:s.i?0:Bw:Bw),oc(c,Bw)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{Vl(g),Ul(c)},()=>{let v=i&&p;if(vm){const y=new vm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Wa({o:void 0},f);Fn(g,Xr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(g4(d,"ltr rtl"),Ed(d,b?"rtl":"ltr"),p([!!b,x,E])),aK(S)}))}v&&(Ed(c,Vxe),Fn(g,Xr(c,"animationstart",v,{C:!!vm}))),(vm||o)&&qs(e,c)}]},C1e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,T1e=(e,t)=>{let n;const r=Wh(qxe),i=[],[o]=Wa({o:!1}),s=(c,d)=>{if(c){const f=o(C1e(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{Vl(i),Ul(r)},()=>{if(W8)n=new W8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=L1(r);s(h)},[d,f]=_K(r,c);Fn(i,d),f(),c()}qs(e,r)},()=>n&&l(n.takeRecords(),!0)]},uj=`[${Ga}]`,I1e=`[${Fc}]`,OD=["tabindex"],cj=["wrap","cols","rows"],MD=["id","class","style","open"],R1e=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Go(),[v]=Wa({u:iK,o:{w:0,h:0}},()=>{const F=h(Dm,km),z=h(RD,""),V=z&&Qa(l),W=z&&oc(l);p(Dm,km),p(RD,""),p("",dE,!0);const K=uE(c),Y=uE(l),Q=cE(l);return p(Dm,km,F),p(RD,"",z),p("",dE),Qa(l,V),oc(l,W),{w:Y.w+K.w+Q.w,h:Y.h+K.h+Q.h}}),y=d?cj:MD.concat(cj),S=v4(n,{g:()=>r,v:()=>i,p(F,z){const[V]=F,[W]=z;return[Ms(V).concat(Ms(W)).reduce((K,Y)=>(K[Y]=V[Y]||W[Y],K),{})]}}),_=F=>{_n(F||OD,z=>{if(PT(OD,z)>-1){const V=xo(s,z);Fd(V)?xo(l,z,V):Ro(l,z)}})},b=(F,z)=>{const[V,W]=F,K={vt:W};return t({gt:V}),!z&&n(K),K},x=({wt:F,jt:z,Pt:V})=>{const W=!F||V?n:S;let K=!1;if(z){const[Y,Q]=z;K=Q,t({yt:Y})}W({wt:F,Pt:V,St:K})},E=(F,z)=>{const[,V]=v(),W={bt:V};return V&&!z&&(F?n:S)(W),W},I=(F,z,V)=>{const W={Tt:z};return z?!V&&S(W):f||_(F),W},[A,R,M]=c||!g?T1e(s,b):[gs,gs,gs],[L,B]=f?[gs,gs]:_K(s,x,{Pt:!0,Yt:!0}),[H,G]=lj(s,!1,I,{Dt:MD,Mt:MD.concat(OD)});let U;const D=f&&vm&&new vm(F=>{const z=F[F.length-1].contentRect,V=ym(z),K=!ym(U)&&V;x({wt:!0,Pt:K}),U=z});return[()=>{A(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),B(),R()},()=>{const F={},z=G(),V=M(),W=o&&o[1]();return z&&Tr(F,I.apply(0,Fn(z,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),W&&Tr(F,E.apply(0,Fn(W,!0))),F},F=>{const[z]=F("update.ignoreMutation"),[V,W]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[Q,re]=F("update.debounce"),ue=Y||W,ce=se=>ol(z)&&z(se);if(ue&&(o&&(o[1](),o[0]()),o=lj(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:uj,Vt:(se,J)=>{const{target:ae,attributeName:le}=se;return(!J&&le&&!f?Ixe(ae,uj,I1e):!1)||!!gm(ae,`.${Wo}`)||!!ce(se)}})),re)if(S.m(),Os(Q)){const se=Q[0],J=Q[1];r=md(se)&&se,i=md(J)&&J}else md(Q)?(r=Q,i=!1):(r=!1,i=!1)}]},dj={x:0,y:0},A1e=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:dj,Et:dj,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:lg(e.J)}),P1e=(e,t)=>{const n=L$(t,{}),[r,i,o]=x4(),[s,l,c]=g1e(e),d=bK(A1e(s)),[f,h]=d,p=S1e(s,d),g=(x,E,I)=>{const R=Ms(x).some(M=>!!x[M])||!h4(E)||I;return R&&o("u",[x,E,I]),R},[v,y,S,_]=R1e(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:I,it:A}=s,R=A?I.documentElement:x,M=Qa(R),L=oc(R);y(),l(),Qa(E,M),oc(E,L)},b.Ft=s,[(x,E)=>{const I=L$(t,x,E);return _(I),g(p(I,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:fj}=Math,O1e=e=>{const{width:t,height:n}=Tl(e),{w:r,h:i}=L1(e);return{x:fj(t)/r||1,y:fj(n)/i||1}},M1e=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},hj="pointerup pointerleave pointercancel lostpointercapture",k1e=(e,t)=>Xr(e,"mousedown",Xr.bind(0,t,"click",aK,{C:!0,$:!0}),{$:!0}),D1e=(e,t,n,r,i,o,s)=>{const{V:l}=Go(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:I}=o(),A=L1(d)[y]-L1(c)[y],M=x*E/A*I[S],B=lg(f)&&s?l.n||l.i?1:-1:1;i[h]=b+M*B};return Xr(d,"pointerdown",b=>{const x=gm(b.target,`.${w4}`)===c,E=x?c:d;if(Hh(t,Ga,J8,!0),M1e(b,e,x)){const I=!x&&b.shiftKey,A=()=>Tl(c),R=()=>Tl(d),M=(K,Y)=>(K||A())[v]-(Y||R())[v],L=_(i[h]||0,1/O1e(i)[S]),B=b[p],H=A(),G=R(),U=H[g],D=M(H,G)+U/2,F=B-G[v],z=x?0:F-D,V=K=>{Vl(W),E.releasePointerCapture(K.pointerId)},W=[Hh.bind(0,t,Ga,J8),Xr(n,hj,V),Xr(n,"selectstart",K=>lK(K),{S:!1}),Xr(d,hj,V),Xr(d,"pointermove",K=>{const Y=K[p]-B;(x||I)&&L(z+Y)})];if(I)L(z);else if(!x){const K=lp()[a1e];K&&Fn(W,K.O(L,M,z,U,F))}E.setPointerCapture(b.pointerId)}})},L1e=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=wh(333),p=!!s.scrollBy;let g=!0;return Vl.bind(0,[Xr(d,"pointerenter",()=>{r(ej,!0)}),Xr(d,"pointerleave pointercancel",()=>{r(ej)}),Xr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&mc(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(rj,!0),f(()=>{g=!0,r(rj)}),lK(v)},{S:!1,$:!0}),k1e(d,i),D1e(e,o,i,n,s,t,c),h])},{min:fE,max:N$,round:B1e}=Math,SK=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return N$(0,fE(1,f/(f+h)))}const i=n?"width":"height",o=Tl(e)[i],s=Tl(t)[i];return N$(0,fE(1,o/s))},N1e=(e,t,n,r,i,o)=>{const{V:s}=Go(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=B1e(d[l]),h=fE(f,N$(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=fE(1,(p?g:h)/f),S=SK(e,t,o);return 1/S*(1-S)*y},EK=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),$1e=(e,t)=>({transform:[ug("0%",t),ug(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),F1e=e=>`${Math.max(0,e-.5)}px`,pj=(e,t,n,r)=>EK(e,t,{transform:[ug("0px",r),ug(F1e(n),r)]},"add"),mj=(e,t)=>O$?new O$({source:e,axis:t}):null,z1e=(e,t,n)=>{const{q:r,H:i}=Go(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=mj(p,"x"),x=mj(p,"y"),E=yK([c,d,f],()=>v&&g?c:d,s,S),I=se=>v&&!g&&mc(se)===f,A=se=>{_.forEach((J,ae)=>{(se?PT(Os(se)?se:[se],ae)>-1:!0)&&((J||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},R=(se,J,ae)=>{const le=ae?Ed:g4;_n(se,he=>{le(he.Ut,J)})},M=(se,J)=>{_n(se,ae=>{const[le,he]=J(ae);Ji(le,he)})},L=(se,J,ae)=>{M(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(SK(he,pe,ae,J)*100).toFixed(3)}%`}]})},B=(se,J,ae)=>{!x&&!x&&M(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=N1e(he,pe,p,J,lg(ve),ae);return[he,{transform:ye===ye?ug(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:J}=se,ae=I(J)&&J;return[ae,{transform:ae?ug([`${Qa(p)}px`,`${oc(p)}px`]):""}]},G=[],U=[],D=[],F=(se,J,ae)=>{const le=d4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&R(U,se,J),pe&&R(D,se,J)},z=se=>{L(U,se,!0),L(D,se)},V=se=>{B(U,se,!0),B(D,se)},W=()=>{const se=(J,{Ut:ae,Gt:le})=>{A(le),_.set(le,[EK(le,J?b:x,$1e(J&&lg(ae),J))])};U.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&M(U,H),v&&M(D,H))},Y=({Et:se})=>{D.concat(U).forEach(({Ut:J})=>{A(J),I(J)&&_.set(J,[pj(J,b,se.x,!0),pj(J,x,se.y)])})},Q=se=>{const J=se?Qxe:Zxe,ae=se?U:D,le=f4(ae)?Z8:"",he=Wh(`${Wo} ${J} ${le}`),pe=Wh(gK),ve=Wh(w4),ye={Ut:he,Xt:pe,Gt:ve};return i||Ed(he,Yxe),qs(he,pe),qs(pe,ve),Fn(ae,ye),Fn(G,[Ul.bind(0,he),A,n(ye,F,l,d,p,se?b:x,se)]),ye},re=Q.bind(0,!0),ue=Q.bind(0,!1),ce=()=>{qs(E,U[0].Ut),qs(E,D[0].Ut),lE(()=>{F(Z8)},300)};return re(),ue(),[{Wt:z,Zt:V,Jt:W,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:U,en:re,cn:M.bind(0,U)},rn:{B:x,sn:D,en:ue,cn:M.bind(0,D)}},ce,Vl.bind(0,G)]},kD=e=>e.pointerType==="mouse",U1e=(e,t,n,r)=>{let i,o,s,l,c,d=gs,f=0;const h=bK({}),[p]=h,[g,v]=wh(),[y,S]=wh(),[_,b]=wh(100),[x,E]=wh(100),[I,A]=wh(100),[R,M]=wh(()=>f),[L,B,H]=z1e(e,n.Ft,L1e(t,n)),{J:G,et:U,it:D}=n.Ft,{tn:F,Wt:z,Zt:V,Jt:W,Kt:K,Qt:Y}=L,Q=J=>{F(D$,J,!0),F(D$,J,!1)},re=(J,ae)=>{if(M(),J)F(nj);else{const le=()=>F(nj,!0);f>0&&!ae?R(le):le()}},ue=J=>{kD(J)&&(l=o,l&&re(!0))},ce=[b,M,E,A,S,v,H,Xr(G,"pointerover",ue,{C:!0}),Xr(G,"pointerenter",ue),Xr(G,"pointerleave",J=>{kD(J)&&(l=!1,o&&re(!1))}),Xr(G,"pointermove",J=>{kD(J)&&i&&g(()=>{b(),re(!0),x(()=>{i&&re(!1)})})}),Xr(U,"scroll",J=>{y(()=>{V(n()),s&&re(!0),_(()=>{s&&!l&&re(!1)})}),r(J),Y()})],se=p.bind(0);return se.Ft=L,se.qt=B,[(J,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:be}=le,{I:me}=Go(),xe=L$(t,J,ae),Je=n(),{Et:Xe,Ot:at,yt:Lt,At:Pe}=Je,[Fe,it]=xe("showNativeOverlaidScrollbars"),[ht,pt]=xe("scrollbars.theme"),[_e,ze]=xe("scrollbars.visibility"),[Ye,$e]=xe("scrollbars.autoHide"),[Be,Rt]=xe("scrollbars.autoHideSuspend"),[ut]=xe("scrollbars.autoHideDelay"),[Re,ot]=xe("scrollbars.dragScroll"),[Bt,Ae]=xe("scrollbars.clickScroll"),je=be&&!ae,vt=Pe.x||Pe.y,jt=he||pe||ye,pn=ve||ze,$r=Fe&&me.x&&me.y,Mr=(kr,Fr)=>{const Jr=_e==="visible"||_e==="auto"&&kr==="scroll";return F(e1e,Jr,Fr),Jr};if(f=ut,je&&(Be&&vt?(Q(!1),d(),I(()=>{d=Xr(U,"scroll",Q.bind(0,!0),{C:!0})})):Q(!0)),it&&F(Kxe,$r),pt&&(F(c),F(ht,!0),c=ht),Rt&&!Be&&Q(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",re(!s,!0)),ot&&F(r1e,Re),Ae&&F(n1e,Bt),pn){const kr=Mr(at.x,!0),Fr=Mr(at.y,!1);F(t1e,!(kr&&Fr))}jt&&(z(Je),V(Je),W(Je),K(Je),Y(),F(tj,!Xe.x,!0),F(tj,!Xe.y,!1),F(Jxe,Lt&&!D))},se,()=>{Vl(ce),d()}]},CK=(e,t,n)=>{ol(e)&&e(t||void 0,n||void 0)},Zc=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Go(),l=lp(),c=Xx(e),d=c?e:e.target,f=xK(d);if(t&&!f){let h=!1;const p=U=>{const D=lp()[o1e],F=D&&D.O;return F?F(U,!0):U},g=Tr({},r(),p(t)),[v,y,S]=x4(n),[_,b,x]=P1e(e,g),[E,I,A]=U1e(e,g,b,U=>S("scroll",[G,U])),R=(U,D)=>_(U,!!D),M=R.bind(0,{},!0),L=o(M),B=s(M),H=U=>{m1e(d),L(),B(),A(),x(),h=!0,S("destroyed",[G,!!U]),y()},G={options(U,D){if(U){const F=D?r():{},z=uK(g,Tr(F,p(U)));h4(z)||(Tr(g,z),R(z))}return Tr({},g)},on:v,off:(U,D)=>{U&&D&&y(U,D)},state(){const{zt:U,Et:D,Ot:F,At:z,tt:V,$t:W,yt:K}=b();return Tr({},{overflowEdge:U,overflowAmount:D,overflowStyle:F,hasOverflow:z,padding:V,paddingAbsolute:W,directionRTL:K,destroyed:h})},elements(){const{Z:U,J:D,tt:F,K:z,nt:V,st:W,et:K}=b.Ft,{nn:Y,rn:Q}=I.Ft,re=ce=>{const{Gt:se,Xt:J,Ut:ae}=ce;return{scrollbar:ae,track:J,handle:se}},ue=ce=>{const{sn:se,en:J}=ce,ae=re(se[0]);return Tr({},ae,{clone:()=>{const le=re(J());return E({},!0,{}),le}})};return Tr({},{target:U,host:D,padding:F||z,viewport:z,content:V||z,scrollOffsetElement:W,scrollEventElement:K,scrollbarHorizontal:ue(Y),scrollbarVertical:ue(Q)})},update:U=>R({},U),destroy:H.bind(0)};return b.Nt((U,D,F)=>{E(D,F,U)}),p1e(d,G),_n(Ms(l),U=>CK(l[U],0,G)),h1e(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),G):(b.qt(),I.qt(),S("initialized",[G]),b.Nt((U,D,F)=>{const{wt:z,St:V,vt:W,Ht:K,Lt:Y,It:Q,bt:re,Tt:ue}=U;S("updated",[G,{updateHints:{sizeChanged:z,directionChanged:V,heightIntrinsicChanged:W,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:Q,contentMutation:re,hostMutation:ue},changedOptions:D,force:F}])}),G.update(!0),G)}return f};Zc.plugin=e=>{_n(i1e(e),t=>CK(t,Zc))};Zc.valid=e=>{const t=e&&e.elements,n=ol(t)&&t();return R$(n)&&!!xK(n.target)};Zc.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Go();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const j1e=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},TK=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=O.useMemo(j1e,[]),s=O.useRef(null),l=O.useRef(r),c=O.useRef(t),d=O.useRef(n);return O.useEffect(()=>{l.current=r},[r]),O.useEffect(()=>{const{current:f}=s;c.current=t,Zc.valid(f)&&f.options(t||{},!0)},[t]),O.useEffect(()=>{const{current:f}=s;d.current=n,Zc.valid(f)&&f.on(n||{},!0)},[n]),O.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),O.useMemo(()=>[f=>{const h=s.current;if(Zc.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=Zc(f,g,v);p?i(y,p):y()},()=>s.current],[])},H1e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=O.useRef(null),f=O.useRef(null),[h,p]=O.useState(!1),[g,v]=TK({options:r,events:i,defer:o});return O.useEffect(()=>{p(!0)},[]),O.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),O.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},W1e=O.forwardRef(H1e),kT=O.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=Pn(),c=k1({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=O.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(W1e,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var IK={exports:{}},Jn={};/** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var DT=60103,LT=60106,Rb=60107,Ab=60108,Pb=60114,Ob=60109,Mb=60110,kb=60112,Db=60113,C4=60120,Lb=60115,Bb=60116,IK=60121,RK=60122,AK=60117,PK=60129,OK=60131;if(typeof Symbol=="function"&&Symbol.for){var Mi=Symbol.for;DT=Mi("react.element"),LT=Mi("react.portal"),Rb=Mi("react.fragment"),Ab=Mi("react.strict_mode"),Pb=Mi("react.profiler"),Ob=Mi("react.provider"),Mb=Mi("react.context"),kb=Mi("react.forward_ref"),Db=Mi("react.suspense"),C4=Mi("react.suspense_list"),Lb=Mi("react.memo"),Bb=Mi("react.lazy"),IK=Mi("react.block"),RK=Mi("react.server.block"),AK=Mi("react.fundamental"),PK=Mi("react.debug_trace_mode"),OK=Mi("react.legacy_hidden")}function ll(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case DT:switch(e=e.type,e){case Rb:case Pb:case Ab:case Db:case C4:return e;default:switch(e=e&&e.$$typeof,e){case Mb:case kb:case Bb:case Lb:case Ob:return e;default:return t}}case LT:return t}}}var G1e=Ob,V1e=DT,X1e=kb,q1e=Rb,Y1e=Bb,K1e=Lb,J1e=LT,Q1e=Pb,Z1e=Ab,ebe=Db;Jn.ContextConsumer=Mb;Jn.ContextProvider=G1e;Jn.Element=V1e;Jn.ForwardRef=X1e;Jn.Fragment=q1e;Jn.Lazy=Y1e;Jn.Memo=K1e;Jn.Portal=J1e;Jn.Profiler=Q1e;Jn.StrictMode=Z1e;Jn.Suspense=ebe;Jn.isAsyncMode=function(){return!1};Jn.isConcurrentMode=function(){return!1};Jn.isContextConsumer=function(e){return ll(e)===Mb};Jn.isContextProvider=function(e){return ll(e)===Ob};Jn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===DT};Jn.isForwardRef=function(e){return ll(e)===kb};Jn.isFragment=function(e){return ll(e)===Rb};Jn.isLazy=function(e){return ll(e)===Bb};Jn.isMemo=function(e){return ll(e)===Lb};Jn.isPortal=function(e){return ll(e)===LT};Jn.isProfiler=function(e){return ll(e)===Pb};Jn.isStrictMode=function(e){return ll(e)===Ab};Jn.isSuspense=function(e){return ll(e)===Db};Jn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rb||e===Pb||e===PK||e===Ab||e===Db||e===C4||e===OK||typeof e=="object"&&e!==null&&(e.$$typeof===Bb||e.$$typeof===Lb||e.$$typeof===Ob||e.$$typeof===Mb||e.$$typeof===kb||e.$$typeof===AK||e.$$typeof===IK||e[0]===RK)};Jn.typeOf=ll;TK.exports=Jn;var MK=TK.exports;function hE(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Er.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Er.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** + */var DT=60103,LT=60106,Rb=60107,Ab=60108,Pb=60114,Ob=60109,Mb=60110,kb=60112,Db=60113,C4=60120,Lb=60115,Bb=60116,RK=60121,AK=60122,PK=60117,OK=60129,MK=60131;if(typeof Symbol=="function"&&Symbol.for){var Mi=Symbol.for;DT=Mi("react.element"),LT=Mi("react.portal"),Rb=Mi("react.fragment"),Ab=Mi("react.strict_mode"),Pb=Mi("react.profiler"),Ob=Mi("react.provider"),Mb=Mi("react.context"),kb=Mi("react.forward_ref"),Db=Mi("react.suspense"),C4=Mi("react.suspense_list"),Lb=Mi("react.memo"),Bb=Mi("react.lazy"),RK=Mi("react.block"),AK=Mi("react.server.block"),PK=Mi("react.fundamental"),OK=Mi("react.debug_trace_mode"),MK=Mi("react.legacy_hidden")}function ll(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case DT:switch(e=e.type,e){case Rb:case Pb:case Ab:case Db:case C4:return e;default:switch(e=e&&e.$$typeof,e){case Mb:case kb:case Bb:case Lb:case Ob:return e;default:return t}}case LT:return t}}}var G1e=Ob,V1e=DT,X1e=kb,q1e=Rb,Y1e=Bb,K1e=Lb,J1e=LT,Q1e=Pb,Z1e=Ab,ebe=Db;Jn.ContextConsumer=Mb;Jn.ContextProvider=G1e;Jn.Element=V1e;Jn.ForwardRef=X1e;Jn.Fragment=q1e;Jn.Lazy=Y1e;Jn.Memo=K1e;Jn.Portal=J1e;Jn.Profiler=Q1e;Jn.StrictMode=Z1e;Jn.Suspense=ebe;Jn.isAsyncMode=function(){return!1};Jn.isConcurrentMode=function(){return!1};Jn.isContextConsumer=function(e){return ll(e)===Mb};Jn.isContextProvider=function(e){return ll(e)===Ob};Jn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===DT};Jn.isForwardRef=function(e){return ll(e)===kb};Jn.isFragment=function(e){return ll(e)===Rb};Jn.isLazy=function(e){return ll(e)===Bb};Jn.isMemo=function(e){return ll(e)===Lb};Jn.isPortal=function(e){return ll(e)===LT};Jn.isProfiler=function(e){return ll(e)===Pb};Jn.isStrictMode=function(e){return ll(e)===Ab};Jn.isSuspense=function(e){return ll(e)===Db};Jn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rb||e===Pb||e===OK||e===Ab||e===Db||e===C4||e===MK||typeof e=="object"&&e!==null&&(e.$$typeof===Bb||e.$$typeof===Lb||e.$$typeof===Ob||e.$$typeof===Mb||e.$$typeof===kb||e.$$typeof===PK||e.$$typeof===RK||e[0]===AK)};Jn.typeOf=ll;IK.exports=Jn;var kK=IK.exports;function hE(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Er.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Er.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -368,12 +368,12 @@ PERFORMANCE OF THIS SOFTWARE. .__dbk__dragger.Dark { background: #434252; } -/* ====== */`);const tbe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:rS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var Vs;function F$(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function nbe(e,t){switch(t.type){case Vs.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case Vs.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,o=r[0].parentNode;if(!o)throw new Error("Cannot create pairs - parent is undefined.");const s=hE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case Vs.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case Vs.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case Vs.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=hE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=F$(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function kK(e,t=0,n=[]){return O.Children.toArray(e).reduce((r,i,o)=>(MK.isFragment(i)?r.push.apply(r,kK(i.props.children,t+1,n.concat(i.key||o))):O.isValidElement(i)?r.push(O.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):typeof i!="string"&&typeof i!="number"||r.push(i),r),[])}(function(e){e[e.SetIsReadyToCompute=0]="SetIsReadyToCompute",e[e.CreatePairs=1]="CreatePairs",e[e.CalculateSizes=2]="CalculateSizes",e[e.StartDragging=3]="StartDragging",e[e.StopDragging=4]="StopDragging"})(Vs||(Vs={}));const gj=e=>"changedTouches"in e;var Er,z$;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(z$||(z$={}));const rS=typeof window<"u"&&"ontouchstart"in window;function DD(e){return e===Er.Horizontal?"col-resize":"row-resize"}const rbe={isReady:!1,isDragging:!1,pairs:[]};function ibe({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=z$.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=kK(l),[p,g]=O.useReducer(nbe,rbe),v=O.useRef(null),y=O.useRef([]),S=O.useRef([]);y.current=[],S.current=[];const _=de.useCallback(G=>{g({type:Vs.SetIsReadyToCompute,payload:{isReady:G}})},[]),b=de.useCallback((G,U)=>{g({type:Vs.StartDragging,payload:{gutterIdx:U}});const D=p.pairs[U];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=DD(G),D.parent.style.cursor=DD(G),document.body.style.cursor=DD(G)},[p.pairs]),x=de.useCallback(()=>{g({type:Vs.StopDragging});const G=[];for(let D=0;D{g({type:Vs.CalculateSizes,payload:{direction:G,gutterIdx:U}})},[]),I=de.useCallback((G,U,D)=>{g({type:Vs.CreatePairs,payload:{direction:G,children:U,gutters:D}})},[]),A=de.useCallback((G,U,D,F)=>{const z=U[0].parentNode;if(!z)throw new Error("Cannot set initial sizes - parent is undefined");if(hE(G,z)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");U.forEach((V,W)=>{const K=W===0,Y=W===U.length-1;let Q,re=0;U.length>1&&(re=D[Y?W-1:W].getBoundingClientRect()[G===Er.Horizontal?"width":"height"],re=K||Y?re/2:re),Q=F&&W{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const D=p.pairs[p.draggingIdx];if(D.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(D.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=D.aSizePct+D.bSizePct,z=U/D.size*F,V=F-U/D.size*F,W=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:Q}=F$(D.gutterSize,W,K),re=`calc(${z}% - ${Y}px)`,ue=`calc(${V}% - ${Q}px)`;G===Er.Horizontal?(D.a.style.width=re,D.b.style.width=ue):(D.a.style.height=re,D.b.style.height=ue)},[p.draggingIdx,p.pairs,e]),M=de.useCallback((G,U,D)=>{if(!p.isDragging)return;if(p.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const F=p.pairs[p.draggingIdx];if(F.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(F.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(F.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let z=function(K,Y){const Q=gj(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?Q.clientX:Q.clientY}(U,G)-F.start,V=16,W=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(W=D[p.draggingIdx+1]),z=F.size-(F.gutterSize+W)&&(z=F.size-(F.gutterSize+W)),R(U,z)},[p.isDragging,p.draggingIdx,p.pairs,R]),L=()=>{if(p.isDragging){if(p.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");E(e,p.draggingIdx),x()}},B=G=>{p.isDragging&&(gj(G)&&G.preventDefault(),M(G,e,e===Er.Horizontal?t:n))};function H(G,U){if(!G.current)throw new Error("Can't add element to ref object - ref isn't initialized");U&&!G.current.includes(U)&&G.current.push(U)}return Nw("mouseup",L,[p.isDragging,x]),Nw("mousemove",B,[e,p.isDragging,M,t,n]),Nw("touchend",L,[p.isDragging,x],{condition:rS}),Nw("touchmove",B,[e,p.isDragging,M,t,n],{condition:rS,passive:!rS}),O.useEffect(function(){if(!v.current)return;const G=v.current.parentElement;if(!G)return;const U=new ResizeObserver(()=>{const D=getComputedStyle(G),F=e===Er.Horizontal?G.clientWidth:G.clientHeight;_(!!D&&!!F)});return U.observe(G),()=>{U.disconnect()}},[v.current,e]),O.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?A(e,y.current,S.current,r):(A(e,y.current,S.current,r),I(e,y.current,S.current))}},[l,p.isReady,e,A,I,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((G,U)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(UH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=U),void b(e,D);var D}},void 0)]},U))}),void 0)}let js=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Wy(e){if(typeof window>"u")return e;const t=O.useRef(null);return O.useLayoutEffect(()=>{t.current=e}),O.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const vj={};function obe(e,t){vj[e]||(vj[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const sbe={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function abe({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=O.useRef(!0);O.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=O.useState(sbe),l=O.useCallback(b=>{i.current&&s(b)},[]),c=O.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=Wy(b=>(o.isOpen?p(b):f(b),o)),f=Wy(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const I=x==null?void 0:x.clientX,A=x==null?void 0:x.clientY,R=typeof I=="number"&&typeof A=="number"?{left:I,top:A}:void 0,M=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&obe("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const B={...L,isOpen:!0,anchorPosition:R,hovered:(x==null?void 0:x.type)==="mouseover"||L.hovered,focused:(x==null?void 0:x.type)==="focus"||L.focused,_openEventType:x==null?void 0:x.type};return x!=null&&x.currentTarget?L.setAnchorElUsed||(B.anchorEl=x==null?void 0:x.currentTarget):E&&(B.anchorEl=E),B};l(L=>L._deferNextOpen?(setTimeout(()=>l(M),0),{...L,_deferNextOpen:!1}):M(L))}),h=b=>{const{_childPopupState:x}=b;return setTimeout(()=>{x==null||x.close(),e==null||e._setChildPopupState(null)}),{...b,isOpen:!1,hovered:!1,focused:!1}},p=Wy(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=O.useCallback((b,x)=>{b?f(x):p(x)},[]),v=Wy(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&U$(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=Wy(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&U$(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=O.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function lbe({isOpen:e,popupId:t,variant:n}){return{...n==="popover"?{"aria-haspopup":!0,"aria-controls":e&&t!=null?t:void 0}:n==="popper"?{"aria-describedby":e&&t!=null?t:void 0}:void 0}}function T4(e){return{...lbe(e),onClick:e.open,onTouchStart:e.open}}function BT({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function ube(e,{popupId:t}){if(!t)return null;const n=typeof e.getRootNode=="function"?e.getRootNode():document;return typeof n.getElementById=="function"?n.getElementById(t):null}function U$(e,t){const{anchorEl:n,_childPopupState:r}=t;return yj(n,e)||yj(ube(e,t),e)||r!=null&&U$(e,r)}function yj(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function Bg({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=abe({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}Bg.propTypes={children:Ty.func.isRequired,popupId:Ty.string,variant:Ty.oneOf(["popover","popper"]).isRequired,parentPopupState:Ty.object,disableAutoFocus:Ty.bool};function cbe({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(Bg,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(M1,{sx:{m:1},children:C.jsx($d,{title:"Panel Options",children:C.jsx(ip,{size:"small",...T4(s),children:C.jsx($ye,{fontSize:"small"})})})}),C.jsxs(Dg,{...BT(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(pd,{onClick:n,disabled:o,children:[C.jsx(hd,{children:C.jsx(j8,{fontSize:"small"})}),C.jsx(Dl,{children:"Split Vertical"})]}),C.jsxs(pd,{onClick:e,disabled:i,children:[C.jsx(hd,{children:C.jsx(j8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(Dl,{children:"Split Horizontal"})]}),C.jsx(wc,{}),C.jsxs(pd,{onClick:t,disabled:r,children:[C.jsx(hd,{children:C.jsx(zY,{fontSize:"small"})}),C.jsx(Dl,{children:"Close Panel"})]})]})]})})}function sc(e,t){const n=structuredClone(e);return t(n),n}function xj(e,t){return t(structuredClone(e))}function B1(e){return t=>O.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,sc(t.value,n))}})}const DK=O.createContext({});function zd(){return O.useContext(DK)}function LK({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=Pn(),c=k1({background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity")}),d=k1({background:o.background.default,[`&:hover .${c}`]:{opacity:1}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ie.sumBy(g,"size"),y=ie.filter(g,S=>!S.size).length;return y?v/y:0}const p=O.useMemo(()=>{const g=v=>n==null?void 0:n(xj(e,y=>({key:js(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:js()},{...structuredClone(y),size:50,key:js()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(cbe,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(sc(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(wn,{children:C.jsx(wn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(DK.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(ibe,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(sc(e,y=>{ie.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ie.map(e.children,()=>f(6)-11),minWidths:ie.map(e.children,()=>f(32)),initialSizes:ie.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ie.map(e.children,(g,v)=>C.jsx(LK,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(sc(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(xj(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:js(),content:y.children[0].content}:y.children[0]:(ie.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function N1(){return N1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var fbe=["PropTypes"],hbe=function(t,n){return O.Children.toArray(t).reduce(function(r,i){if(O.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},pbe=function(t,n){var r=O.Children.toArray(t).filter(function(i){if(O.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},mbe=function(t){return typeof t=="string"&&!fbe.includes(t)&&t.match(/^[A-Z0-9]/)},gbe=function(t){var n=O.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=dbe(r,["children","propagateSlotProps","slotKeys"]),d=O.useMemo(function(){return hbe(i,l)},[l,i]),f=O.useMemo(function(){return pbe(i,l)},[l,i]),h=O.useMemo(function(){return N1({},c,{slotProps:N1({},o,d)})},[c,d,o]);return O.createElement(t,h,f)});return n},vbe=function(t){var n=O.memo(gbe(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!mbe(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",N1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function I4(){const e=Pn();return hme(e.breakpoints.down("sm"))}const ybe=e=>e?48:36,xbe=8;function bbe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=I4(),s=ie.max([ie.findIndex(t,{value:n}),0])??0;return C.jsx(Bg,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx($d,{title:i,children:C.jsx("span",{children:e==null?void 0:e(T4(l))})}),C.jsx(Dg,{...BT(l),anchorOrigin:{horizontal:"center",vertical:-ybe(o)*s-xbe},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:c,label:d,disabled:f})=>C.jsx(pd,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function qx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(Cb,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ie.map(r,o=>C.jsx(pd,{value:o.value,children:o.label},o.value))})}function Ss({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s}){const l=ie.find(r,{id:t});return C.jsx(bbe,{placeholder:ie.startCase(e),trigger:c=>C.jsx(pc,{...c,disabled:!(r!=null&&r.length)||s,startIcon:i,endIcon:o&&C.jsx(FY,{sx:{ml:-.5}}),children:(l==null?void 0:l.name)??e}),items:ie.map(r,({id:c,name:d,description:f,hidden:h})=>({value:c,label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:d}),C.jsx(Yr,{}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:f})]}),disabled:h})),value:l==null?void 0:l.id,onChange:n})}const BK=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],NK=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],Xp=4,wbe={renderer:NK,remote:BK,playbackRate:Xp,theme:"dark",acrylic:!0,accentColor:"blue"},[Ec,_be]=Gl({},bxe("settings",wbe)),{common:IHe,...Sbe}=dV,Ebe=` +/* ====== */`);const tbe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:rS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var Vs;function F$(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function nbe(e,t){switch(t.type){case Vs.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case Vs.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,o=r[0].parentNode;if(!o)throw new Error("Cannot create pairs - parent is undefined.");const s=hE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case Vs.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case Vs.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case Vs.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=hE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=F$(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function DK(e,t=0,n=[]){return O.Children.toArray(e).reduce((r,i,o)=>(kK.isFragment(i)?r.push.apply(r,DK(i.props.children,t+1,n.concat(i.key||o))):O.isValidElement(i)?r.push(O.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):typeof i!="string"&&typeof i!="number"||r.push(i),r),[])}(function(e){e[e.SetIsReadyToCompute=0]="SetIsReadyToCompute",e[e.CreatePairs=1]="CreatePairs",e[e.CalculateSizes=2]="CalculateSizes",e[e.StartDragging=3]="StartDragging",e[e.StopDragging=4]="StopDragging"})(Vs||(Vs={}));const gj=e=>"changedTouches"in e;var Er,z$;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(z$||(z$={}));const rS=typeof window<"u"&&"ontouchstart"in window;function DD(e){return e===Er.Horizontal?"col-resize":"row-resize"}const rbe={isReady:!1,isDragging:!1,pairs:[]};function ibe({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=z$.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=DK(l),[p,g]=O.useReducer(nbe,rbe),v=O.useRef(null),y=O.useRef([]),S=O.useRef([]);y.current=[],S.current=[];const _=de.useCallback(G=>{g({type:Vs.SetIsReadyToCompute,payload:{isReady:G}})},[]),b=de.useCallback((G,U)=>{g({type:Vs.StartDragging,payload:{gutterIdx:U}});const D=p.pairs[U];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=DD(G),D.parent.style.cursor=DD(G),document.body.style.cursor=DD(G)},[p.pairs]),x=de.useCallback(()=>{g({type:Vs.StopDragging});const G=[];for(let D=0;D{g({type:Vs.CalculateSizes,payload:{direction:G,gutterIdx:U}})},[]),I=de.useCallback((G,U,D)=>{g({type:Vs.CreatePairs,payload:{direction:G,children:U,gutters:D}})},[]),A=de.useCallback((G,U,D,F)=>{const z=U[0].parentNode;if(!z)throw new Error("Cannot set initial sizes - parent is undefined");if(hE(G,z)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");U.forEach((V,W)=>{const K=W===0,Y=W===U.length-1;let Q,re=0;U.length>1&&(re=D[Y?W-1:W].getBoundingClientRect()[G===Er.Horizontal?"width":"height"],re=K||Y?re/2:re),Q=F&&W{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const D=p.pairs[p.draggingIdx];if(D.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(D.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=D.aSizePct+D.bSizePct,z=U/D.size*F,V=F-U/D.size*F,W=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:Q}=F$(D.gutterSize,W,K),re=`calc(${z}% - ${Y}px)`,ue=`calc(${V}% - ${Q}px)`;G===Er.Horizontal?(D.a.style.width=re,D.b.style.width=ue):(D.a.style.height=re,D.b.style.height=ue)},[p.draggingIdx,p.pairs,e]),M=de.useCallback((G,U,D)=>{if(!p.isDragging)return;if(p.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const F=p.pairs[p.draggingIdx];if(F.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(F.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(F.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let z=function(K,Y){const Q=gj(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?Q.clientX:Q.clientY}(U,G)-F.start,V=16,W=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(W=D[p.draggingIdx+1]),z=F.size-(F.gutterSize+W)&&(z=F.size-(F.gutterSize+W)),R(U,z)},[p.isDragging,p.draggingIdx,p.pairs,R]),L=()=>{if(p.isDragging){if(p.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");E(e,p.draggingIdx),x()}},B=G=>{p.isDragging&&(gj(G)&&G.preventDefault(),M(G,e,e===Er.Horizontal?t:n))};function H(G,U){if(!G.current)throw new Error("Can't add element to ref object - ref isn't initialized");U&&!G.current.includes(U)&&G.current.push(U)}return Nw("mouseup",L,[p.isDragging,x]),Nw("mousemove",B,[e,p.isDragging,M,t,n]),Nw("touchend",L,[p.isDragging,x],{condition:rS}),Nw("touchmove",B,[e,p.isDragging,M,t,n],{condition:rS,passive:!rS}),O.useEffect(function(){if(!v.current)return;const G=v.current.parentElement;if(!G)return;const U=new ResizeObserver(()=>{const D=getComputedStyle(G),F=e===Er.Horizontal?G.clientWidth:G.clientHeight;_(!!D&&!!F)});return U.observe(G),()=>{U.disconnect()}},[v.current,e]),O.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?A(e,y.current,S.current,r):(A(e,y.current,S.current,r),I(e,y.current,S.current))}},[l,p.isReady,e,A,I,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((G,U)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(UH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=U),void b(e,D);var D}},void 0)]},U))}),void 0)}let js=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Wy(e){if(typeof window>"u")return e;const t=O.useRef(null);return O.useLayoutEffect(()=>{t.current=e}),O.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const vj={};function obe(e,t){vj[e]||(vj[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const sbe={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function abe({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=O.useRef(!0);O.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=O.useState(sbe),l=O.useCallback(b=>{i.current&&s(b)},[]),c=O.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=Wy(b=>(o.isOpen?p(b):f(b),o)),f=Wy(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const I=x==null?void 0:x.clientX,A=x==null?void 0:x.clientY,R=typeof I=="number"&&typeof A=="number"?{left:I,top:A}:void 0,M=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&obe("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const B={...L,isOpen:!0,anchorPosition:R,hovered:(x==null?void 0:x.type)==="mouseover"||L.hovered,focused:(x==null?void 0:x.type)==="focus"||L.focused,_openEventType:x==null?void 0:x.type};return x!=null&&x.currentTarget?L.setAnchorElUsed||(B.anchorEl=x==null?void 0:x.currentTarget):E&&(B.anchorEl=E),B};l(L=>L._deferNextOpen?(setTimeout(()=>l(M),0),{...L,_deferNextOpen:!1}):M(L))}),h=b=>{const{_childPopupState:x}=b;return setTimeout(()=>{x==null||x.close(),e==null||e._setChildPopupState(null)}),{...b,isOpen:!1,hovered:!1,focused:!1}},p=Wy(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=O.useCallback((b,x)=>{b?f(x):p(x)},[]),v=Wy(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&U$(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=Wy(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&U$(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=O.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function lbe({isOpen:e,popupId:t,variant:n}){return{...n==="popover"?{"aria-haspopup":!0,"aria-controls":e&&t!=null?t:void 0}:n==="popper"?{"aria-describedby":e&&t!=null?t:void 0}:void 0}}function T4(e){return{...lbe(e),onClick:e.open,onTouchStart:e.open}}function BT({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function ube(e,{popupId:t}){if(!t)return null;const n=typeof e.getRootNode=="function"?e.getRootNode():document;return typeof n.getElementById=="function"?n.getElementById(t):null}function U$(e,t){const{anchorEl:n,_childPopupState:r}=t;return yj(n,e)||yj(ube(e,t),e)||r!=null&&U$(e,r)}function yj(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function Bg({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=abe({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}Bg.propTypes={children:Ty.func.isRequired,popupId:Ty.string,variant:Ty.oneOf(["popover","popper"]).isRequired,parentPopupState:Ty.object,disableAutoFocus:Ty.bool};function cbe({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(Bg,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(M1,{sx:{m:1},children:C.jsx($d,{title:"Panel Options",children:C.jsx(ip,{size:"small",...T4(s),children:C.jsx($ye,{fontSize:"small"})})})}),C.jsxs(Dg,{...BT(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(pd,{onClick:n,disabled:o,children:[C.jsx(hd,{children:C.jsx(j8,{fontSize:"small"})}),C.jsx(Dl,{children:"Split Vertical"})]}),C.jsxs(pd,{onClick:e,disabled:i,children:[C.jsx(hd,{children:C.jsx(j8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(Dl,{children:"Split Horizontal"})]}),C.jsx(wc,{}),C.jsxs(pd,{onClick:t,disabled:r,children:[C.jsx(hd,{children:C.jsx(zY,{fontSize:"small"})}),C.jsx(Dl,{children:"Close Panel"})]})]})]})})}function sc(e,t){const n=structuredClone(e);return t(n),n}function xj(e,t){return t(structuredClone(e))}function B1(e){return t=>O.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,sc(t.value,n))}})}const LK=O.createContext({});function zd(){return O.useContext(LK)}function BK({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=Pn(),c=k1({background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity")}),d=k1({background:o.background.default,[`&:hover .${c}`]:{opacity:1}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ie.sumBy(g,"size"),y=ie.filter(g,S=>!S.size).length;return y?v/y:0}const p=O.useMemo(()=>{const g=v=>n==null?void 0:n(xj(e,y=>({key:js(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:js()},{...structuredClone(y),size:50,key:js()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(cbe,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(sc(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(wn,{children:C.jsx(wn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(LK.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(ibe,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(sc(e,y=>{ie.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ie.map(e.children,()=>f(6)-11),minWidths:ie.map(e.children,()=>f(32)),initialSizes:ie.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ie.map(e.children,(g,v)=>C.jsx(BK,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(sc(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(xj(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:js(),content:y.children[0].content}:y.children[0]:(ie.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function N1(){return N1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var fbe=["PropTypes"],hbe=function(t,n){return O.Children.toArray(t).reduce(function(r,i){if(O.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},pbe=function(t,n){var r=O.Children.toArray(t).filter(function(i){if(O.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},mbe=function(t){return typeof t=="string"&&!fbe.includes(t)&&t.match(/^[A-Z0-9]/)},gbe=function(t){var n=O.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=dbe(r,["children","propagateSlotProps","slotKeys"]),d=O.useMemo(function(){return hbe(i,l)},[l,i]),f=O.useMemo(function(){return pbe(i,l)},[l,i]),h=O.useMemo(function(){return N1({},c,{slotProps:N1({},o,d)})},[c,d,o]);return O.createElement(t,h,f)});return n},vbe=function(t){var n=O.memo(gbe(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!mbe(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",N1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function I4(){const e=Pn();return pme(e.breakpoints.down("sm"))}const ybe=e=>e?48:36,xbe=8;function bbe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=I4(),s=ie.max([ie.findIndex(t,{value:n}),0])??0;return C.jsx(Bg,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx($d,{title:i,children:C.jsx("span",{children:e==null?void 0:e(T4(l))})}),C.jsx(Dg,{...BT(l),anchorOrigin:{horizontal:"center",vertical:-ybe(o)*s-xbe},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:c,label:d,disabled:f})=>C.jsx(pd,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function qx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(Cb,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ie.map(r,o=>C.jsx(pd,{value:o.value,children:o.label},o.value))})}function Ss({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l}){const c=ie.find(r,{id:t});return C.jsx(bbe,{placeholder:ie.startCase(e),trigger:d=>C.jsx(pc,{...d,...l,disabled:!(r!=null&&r.length)||s,startIcon:i,endIcon:o&&C.jsx(FY,{sx:{ml:-.5}}),children:(c==null?void 0:c.name)??e}),items:ie.map(r,({id:d,name:f,description:h,hidden:p})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:f}),C.jsx(Yr,{}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const NK=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],$K=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],Xp=4,wbe={renderer:$K,remote:NK,playbackRate:Xp,theme:"dark",acrylic:!0,accentColor:"blue"},[Ec,_be]=Gl({},bxe("settings",wbe)),{common:IHe,...Sbe}=dV,Ebe=` 0px 8px 18px -1px rgb(0 0 0 / 8%), 0px 10px 48px 0px rgb(0 0 0 / 1%), 0px 20px 96px 0px rgb(0 0 0 / 0.5%) -`,Cbe=(e,t)=>K3({palette:{primary:{main:dV[t][e==="dark"?"200":"500"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:"Inter"},button:{textTransform:"none",letterSpacing:0}},components:{MuiTypography:{styleOverrides:{body1:{fontWeight:500,fontSize:"0.875rem"},overline:{fontWeight:500,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:600,letterSpacing:-.4}}}},shadows:["",...ie.times(24,ie.constant(Ebe))]});function Tbe(){const[{acrylic:e}]=Ec();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>Rn(t.background.paper,.84)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const Ibe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Ln=vbe(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=Tbe();return C.jsxs(wn,{vertical:!0,children:[C.jsx(wn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(sp,{in:!0,children:C.jsx(Pt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(wn,{sx:{height:c=>c.spacing(6)},children:[C.jsx(wn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(kT,{x:!0,children:C.jsxs(wn,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Ss,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=C3[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ie.values(C3)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[Ibe,e.Options.children]})]})})}),C.jsx(Yr,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),Rbe=""+new URL("logo512-af59fa5c.png",import.meta.url).href,bj="1.0.4",Abe=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Kevin Zheng",email:"kzhe0012@student.monash.edu"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function Pbe(){const{controls:e,onChange:t,state:n}=zd();function r(i,o){return C.jsxs(Pt,{sx:{pt:2},children:[C.jsx(qt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(qt,{variant:"body2",children:o})]})}return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsxs(wn,{children:[" ",C.jsx(kT,{y:!0,children:C.jsxs(Pt,{sx:{p:2},children:[C.jsx(Pt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:Rbe,height:"64"})}),C.jsxs(qt,{variant:"h6",children:["Waypoint ",bj]}),r("Build Info",C.jsxs(C.Fragment,{children:[bj,"; late September 2023"]})),r("About this App",C.jsx(C.Fragment,{children:"Waypoint is a visualising debugging tool for pathfinding search. It can be used to visualise progression of search and debug pathfinding algorithms. It can handle range of different types of algorithms (demos are provided in the home page). This tool is highly customizable and provide flexibility to visualise any algorithm trace that you can augment using our docs."})),r("Team",C.jsxs(C.Fragment,{children:["Our team is made up of present/past Monash students and Professors Dr Daniel Harabor:",C.jsx(sg,{sx:{mx:-2},children:Abe.map(({name:i,email:o},s)=>C.jsxs(T$,{href:`mailto:${o}`,children:[C.jsx(pge,{children:C.jsx(vY,{children:ie.head(i)})}),C.jsx(Dl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(sg,{sx:{mx:-2},children:C.jsxs(T$,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(hd,{children:C.jsx(Dye,{})}),C.jsx(Dl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Ln.Extras,{children:e})]})}const $K=O.createContext(null);function Obe(){const[e,t]=O.useState(null);return O.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function FK(e){const{children:t,value:n}=e,r=Obe(),i=O.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx($K.Provider,{value:i,children:t})}function zK(){return O.useContext($K)}function UK(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function jK(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const Mbe=["children"],kbe=O.forwardRef(function(t,n){const{children:r}=t,i=Le(t,Mbe),o=zK();if(o===null)throw new TypeError("No TabContext provided");const s=O.Children.map(r,l=>O.isValidElement(l)?O.cloneElement(l,{"aria-controls":UK(o,l.props.value),id:jK(o,l.props.value)}):null);return C.jsx(hye,$({},i,{ref:n,value:o.value,children:s}))}),HK=kbe;function Dbe(e){return _t("MuiTabPanel",e)}Tt("MuiTabPanel",["root"]);const Lbe=["children","className","value"],Bbe=e=>{const{classes:t}=e;return Ct({root:["root"]},Dbe,t)},Nbe=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),$be=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,Lbe),c=$({},r),d=Bbe(c),f=zK();if(f===null)throw new TypeError("No TabContext provided");const h=UK(f,s),p=jK(f,s);return C.jsx(Nbe,$({"aria-labelledby":p,className:Ue(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),xm=$be;var WK={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(WK);var R4=WK.exports;function j$({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Xpe,{control:C.jsx(ag,{defaultChecked:!0,...t}),label:e})}function Fbe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _j(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Ube(e,t){if(e==null)return{};var n=zbe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jbe(e,t){return Hbe(e)||Wbe(e,t)||Gbe(e,t)||Vbe()}function Hbe(e){if(Array.isArray(e))return e}function Wbe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function Gbe(e,t){if(e){if(typeof e=="string")return Sj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sj(e,t)}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};$w.initial(e),$w.handler(t);var n={current:e},r=yx(swe)(n,t),i=yx(owe)(n),o=yx($w.changes)(e),s=yx(iwe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return $w.selector(d),d(n.current)}function c(d){qbe(r,i,o,s)(d)}return[l,c]}function iwe(e,t){return $1(t)?t(e.current):t}function owe(e,t){return e.current=Cj(Cj({},e.current),t),t}function swe(e,t,n){return $1(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var awe={create:rwe},lwe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function uwe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;cK3({palette:{primary:{main:dV[t][e==="dark"?"200":"500"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:"Inter"},button:{textTransform:"none",letterSpacing:0}},components:{MuiTypography:{styleOverrides:{body1:{fontWeight:500,fontSize:"0.875rem"},overline:{fontWeight:500,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:600,letterSpacing:-.4}}}},shadows:["",...ie.times(24,ie.constant(Ebe))]});function Tbe(){const[{acrylic:e}]=Ec();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>Rn(t.background.paper,.84)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const Ibe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Ln=vbe(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=Tbe();return C.jsxs(wn,{vertical:!0,children:[C.jsx(wn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(sp,{in:!0,children:C.jsx(Pt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(wn,{sx:{height:c=>c.spacing(6)},children:[C.jsx(wn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(kT,{x:!0,children:C.jsxs(wn,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Ss,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=C3[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ie.values(C3)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[Ibe,e.Options.children]})]})})}),C.jsx(Yr,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),Rbe=""+new URL("logo512-af59fa5c.png",import.meta.url).href,bj="1.0.4",Abe=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Kevin Zheng",email:"kzhe0012@student.monash.edu"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function Pbe(){const{controls:e,onChange:t,state:n}=zd();function r(i,o){return C.jsxs(Pt,{sx:{pt:2},children:[C.jsx(qt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(qt,{variant:"body2",children:o})]})}return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsxs(wn,{children:[" ",C.jsx(kT,{y:!0,children:C.jsxs(Pt,{sx:{p:2},children:[C.jsx(Pt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:Rbe,height:"64"})}),C.jsxs(qt,{variant:"h6",children:["Waypoint ",bj]}),r("Build Info",C.jsxs(C.Fragment,{children:[bj,"; late September 2023"]})),r("About this App",C.jsx(C.Fragment,{children:"Waypoint is a visualising debugging tool for pathfinding search. It can be used to visualise progression of search and debug pathfinding algorithms. It can handle range of different types of algorithms (demos are provided in the home page). This tool is highly customizable and provide flexibility to visualise any algorithm trace that you can augment using our docs."})),r("Team",C.jsxs(C.Fragment,{children:["Our team is made up of present/past Monash students and Professors Dr Daniel Harabor:",C.jsx(sg,{sx:{mx:-2},children:Abe.map(({name:i,email:o},s)=>C.jsxs(T$,{href:`mailto:${o}`,children:[C.jsx(mge,{children:C.jsx(vY,{children:ie.head(i)})}),C.jsx(Dl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(sg,{sx:{mx:-2},children:C.jsxs(T$,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(hd,{children:C.jsx(Dye,{})}),C.jsx(Dl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Ln.Extras,{children:e})]})}const FK=O.createContext(null);function Obe(){const[e,t]=O.useState(null);return O.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function zK(e){const{children:t,value:n}=e,r=Obe(),i=O.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(FK.Provider,{value:i,children:t})}function UK(){return O.useContext(FK)}function jK(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function HK(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const Mbe=["children"],kbe=O.forwardRef(function(t,n){const{children:r}=t,i=Le(t,Mbe),o=UK();if(o===null)throw new TypeError("No TabContext provided");const s=O.Children.map(r,l=>O.isValidElement(l)?O.cloneElement(l,{"aria-controls":jK(o,l.props.value),id:HK(o,l.props.value)}):null);return C.jsx(pye,$({},i,{ref:n,value:o.value,children:s}))}),WK=kbe;function Dbe(e){return _t("MuiTabPanel",e)}Tt("MuiTabPanel",["root"]);const Lbe=["children","className","value"],Bbe=e=>{const{classes:t}=e;return Ct({root:["root"]},Dbe,t)},Nbe=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),$be=O.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,Lbe),c=$({},r),d=Bbe(c),f=UK();if(f===null)throw new TypeError("No TabContext provided");const h=jK(f,s),p=HK(f,s);return C.jsx(Nbe,$({"aria-labelledby":p,className:Ue(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),xm=$be;var GK={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(GK);var R4=GK.exports;function j$({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(qpe,{control:C.jsx(ag,{defaultChecked:!0,...t}),label:e})}function Fbe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _j(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Ube(e,t){if(e==null)return{};var n=zbe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jbe(e,t){return Hbe(e)||Wbe(e,t)||Gbe(e,t)||Vbe()}function Hbe(e){if(Array.isArray(e))return e}function Wbe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function Gbe(e,t){if(e){if(typeof e=="string")return Sj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sj(e,t)}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};$w.initial(e),$w.handler(t);var n={current:e},r=yx(swe)(n,t),i=yx(owe)(n),o=yx($w.changes)(e),s=yx(iwe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return $w.selector(d),d(n.current)}function c(d){qbe(r,i,o,s)(d)}return[l,c]}function iwe(e,t){return $1(t)?t(e.current):t}function owe(e,t){return e.current=Cj(Cj({},e.current),t),t}function swe(e,t,n){return $1(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var awe={create:rwe},lwe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function uwe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c{r.current=!1}:e,t)}var ps=Dwe;function Yx(){}function bm(e,t,n,r){return Lwe(e,r)||Bwe(e,t,n,r)}function Lwe(e,t){return e.editor.getModel(QK(e,t))}function Bwe(e,t,n,r){return e.editor.createModel(t,n,r?QK(e,r):void 0)}function QK(e,t){return e.Uri.parse(t)}function Nwe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:d="light",loading:f="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:y={},beforeMount:S=Yx,onMount:_=Yx}){let[b,x]=O.useState(!1),[E,I]=O.useState(!0),A=O.useRef(null),R=O.useRef(null),M=O.useRef(null),L=O.useRef(_),B=O.useRef(S),H=O.useRef(!1);JK(()=>{let F=YK.init();return F.then(z=>(R.current=z)&&I(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>A.current?D():F.cancel()}),ps(()=>{if(A.current&&R.current){let F=A.current.getOriginalEditor(),z=bm(R.current,e||"",r||n||"text",o||"");z!==F.getModel()&&F.setModel(z)}},[o],b),ps(()=>{if(A.current&&R.current){let F=A.current.getModifiedEditor(),z=bm(R.current,t||"",i||n||"text",s||"");z!==F.getModel()&&F.setModel(z)}},[s],b),ps(()=>{let F=A.current.getModifiedEditor();F.getOption(R.current.editor.EditorOption.readOnly)?F.setValue(t||""):t!==F.getValue()&&(F.executeEdits("",[{range:F.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),F.pushUndoStop())},[t],b),ps(()=>{var F,z;(z=(F=A.current)==null?void 0:F.getModel())==null||z.original.setValue(e||"")},[e],b),ps(()=>{let{original:F,modified:z}=A.current.getModel();R.current.editor.setModelLanguage(F,r||n||"text"),R.current.editor.setModelLanguage(z,i||n||"text")},[n,r,i],b),ps(()=>{var F;(F=R.current)==null||F.editor.setTheme(d)},[d],b),ps(()=>{var F;(F=A.current)==null||F.updateOptions(h)},[h],b);let G=O.useCallback(()=>{var V;if(!R.current)return;B.current(R.current);let F=bm(R.current,e||"",r||n||"text",o||""),z=bm(R.current,t||"",i||n||"text",s||"");(V=A.current)==null||V.setModel({original:F,modified:z})},[n,t,i,e,r,o,s]),U=O.useCallback(()=>{var F;!H.current&&M.current&&(A.current=R.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...h}),G(),(F=R.current)==null||F.editor.setTheme(d),x(!0),H.current=!0)},[h,d,G]);O.useEffect(()=>{b&&L.current(A.current,R.current)},[b]),O.useEffect(()=>{!E&&!b&&U()},[E,b,U]);function D(){var z,V,W,K;let F=(z=A.current)==null?void 0:z.getModel();l||((V=F==null?void 0:F.original)==null||V.dispose()),c||((W=F==null?void 0:F.modified)==null||W.dispose()),(K=A.current)==null||K.dispose()}return de.createElement(KK,{width:g,height:p,isEditorReady:b,loading:f,_ref:M,className:v,wrapperProps:y})}var $we=Nwe;O.memo($we);function Fwe(e){let t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}var zwe=Fwe,Fw=new Map;function Uwe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:l,loading:c="Loading...",options:d={},overrideServices:f={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:_=Yx,onMount:b=Yx,onChange:x,onValidate:E=Yx}){let[I,A]=O.useState(!1),[R,M]=O.useState(!0),L=O.useRef(null),B=O.useRef(null),H=O.useRef(null),G=O.useRef(b),U=O.useRef(_),D=O.useRef(),F=O.useRef(r),z=zwe(o),V=O.useRef(!1),W=O.useRef(!1);JK(()=>{let Q=YK.init();return Q.then(re=>(L.current=re)&&M(!1)).catch(re=>(re==null?void 0:re.type)!=="cancelation"&&console.error("Monaco initialization: error:",re)),()=>B.current?Y():Q.cancel()}),ps(()=>{var re,ue,ce,se;let Q=bm(L.current,e||r||"",t||i||"",o||n||"");Q!==((re=B.current)==null?void 0:re.getModel())&&(h&&Fw.set(z,(ue=B.current)==null?void 0:ue.saveViewState()),(ce=B.current)==null||ce.setModel(Q),h&&((se=B.current)==null||se.restoreViewState(Fw.get(o))))},[o],I),ps(()=>{var Q;(Q=B.current)==null||Q.updateOptions(d)},[d],I),ps(()=>{!B.current||r===void 0||(B.current.getOption(L.current.editor.EditorOption.readOnly)?B.current.setValue(r):r!==B.current.getValue()&&(W.current=!0,B.current.executeEdits("",[{range:B.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),B.current.pushUndoStop(),W.current=!1))},[r],I),ps(()=>{var re,ue;let Q=(re=B.current)==null?void 0:re.getModel();Q&&i&&((ue=L.current)==null||ue.editor.setModelLanguage(Q,i))},[i],I),ps(()=>{var Q;l!==void 0&&((Q=B.current)==null||Q.revealLine(l))},[l],I),ps(()=>{var Q;(Q=L.current)==null||Q.editor.setTheme(s)},[s],I);let K=O.useCallback(()=>{var Q;if(!(!H.current||!L.current)&&!V.current){U.current(L.current);let re=o||n,ue=bm(L.current,r||e||"",t||i||"",re||"");B.current=(Q=L.current)==null?void 0:Q.editor.create(H.current,{model:ue,automaticLayout:!0,...d},f),h&&B.current.restoreViewState(Fw.get(re)),L.current.editor.setTheme(s),A(!0),V.current=!0}},[e,t,n,r,i,o,d,f,h,s]);O.useEffect(()=>{I&&G.current(B.current,L.current)},[I]),O.useEffect(()=>{!R&&!I&&K()},[R,I,K]),F.current=r,O.useEffect(()=>{var Q,re;I&&x&&((Q=D.current)==null||Q.dispose(),D.current=(re=B.current)==null?void 0:re.onDidChangeModelContent(ue=>{W.current||x(B.current.getValue(),ue)}))},[I,x]),O.useEffect(()=>{if(I){let Q=L.current.editor.onDidChangeMarkers(re=>{var ce;let ue=(ce=B.current.getModel())==null?void 0:ce.uri;if(ue&&re.find(se=>se.path===ue.path)){let se=L.current.editor.getModelMarkers({resource:ue});E==null||E(se)}});return()=>{Q==null||Q.dispose()}}return()=>{}},[I,E]);function Y(){var Q,re;(Q=D.current)==null||Q.dispose(),p?h&&Fw.set(o,B.current.saveViewState()):(re=B.current.getModel())==null||re.dispose(),B.current.dispose()}return de.createElement(KK,{width:g,height:v,isEditorReady:I,loading:c,_ref:H,className:y,wrapperProps:S})}var jwe=Uwe,Hwe=O.memo(jwe),Wwe=Hwe;let na;typeof window<"u"?na=window:typeof self<"u"?na=self:na=global;let H$=null,W$=null;const Ij=20,$D=na.clearTimeout,Rj=na.setTimeout,FD=na.cancelAnimationFrame||na.mozCancelAnimationFrame||na.webkitCancelAnimationFrame,Aj=na.requestAnimationFrame||na.mozRequestAnimationFrame||na.webkitRequestAnimationFrame;FD==null||Aj==null?(H$=$D,W$=function(t){return Rj(t,Ij)}):(H$=function([t,n]){FD(t),$D(n)},W$=function(t){const n=Aj(function(){$D(r),t()}),r=Rj(function(){FD(n),t()},Ij);return[n,r]});function Gwe(e){let t,n,r,i,o,s,l;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(_){const b=_.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,I=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,I.style.width=x.offsetWidth+1+"px",I.style.height=x.offsetHeight+1+"px",x.scrollLeft=x.scrollWidth,x.scrollTop=x.scrollHeight},o=function(_){return _.offsetWidth!==_.__resizeLast__.width||_.offsetHeight!==_.__resizeLast__.height},l=function(_){if(_.target.className&&typeof _.target.className.indexOf=="function"&&_.target.className.indexOf("contract-trigger")<0&&_.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&H$(this.__resizeRAF__),this.__resizeRAF__=W$(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(I){I.call(b,_)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const _=document.createElement("fakeelement");if(_.style.animationName!==void 0&&(p=!0),p===!1){for(let b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=g:y.appendChild(p.createTextNode(g)),v.appendChild(y)}};return{addResizeListener:function(p,g){if(c)p.attachEvent("onresize",g);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=na.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),d(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const S=v.createElement("div");S.className="expand-trigger",S.appendChild(v.createElement("div"));const _=v.createElement("div");_.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(_),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",l,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(g)}},removeResizeListener:function(p,g){if(c)p.detachEvent("onresize",g);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",l,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class A4 extends O.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,s,l,c;const d=window.getComputedStyle(this._parentNode)||{},f=parseFloat((o=d.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=d.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((l=d.paddingTop)!==null&&l!==void 0?l:"0"),g=parseFloat((c=d.paddingBottom)!==null&&c!==void 0?c:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-g,S=v.width-f-h,_=this._parentNode.offsetHeight-p-g,b=this._parentNode.offsetWidth-f-h;(!n&&(this.state.height!==_||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:_,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:_,scaledHeight:y,scaledWidth:S,width:b}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=Gwe(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:s,onResize:l,style:c={},tagName:d="div",...f}=this.props,{height:h,scaledHeight:p,scaledWidth:g,width:v}=this.state,y={overflow:"visible"},S={};let _=!1;return i||(h===0&&(_=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(_=!0),y.width=0,S.width=v,S.scaledWidth=g),O.createElement(d,{ref:this._setRef,style:{...y,...c},...f},!_&&t(S))}}function Vwe({returnType:e,params:t}){return`@type {(${ie.join(ie.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function Xwe(e){const[t,n,r]=["/**"," * "," */"],i=ie.map(ie.chunk(ie.split(e.description," "),9),o=>ie.join(o," "));return ie.join([t,...ie.map(i,o=>`${n}${o}`),`${n}${Vwe(e)}`,r],` + `},Tj=uwe(hwe)(VK),pwe={config:dwe},mwe=function(){for(var t=arguments.length,n=new Array(t),r=0;r{r.current=!1}:e,t)}var ps=Dwe;function Yx(){}function bm(e,t,n,r){return Lwe(e,r)||Bwe(e,t,n,r)}function Lwe(e,t){return e.editor.getModel(ZK(e,t))}function Bwe(e,t,n,r){return e.editor.createModel(t,n,r?ZK(e,r):void 0)}function ZK(e,t){return e.Uri.parse(t)}function Nwe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:d="light",loading:f="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:y={},beforeMount:S=Yx,onMount:_=Yx}){let[b,x]=O.useState(!1),[E,I]=O.useState(!0),A=O.useRef(null),R=O.useRef(null),M=O.useRef(null),L=O.useRef(_),B=O.useRef(S),H=O.useRef(!1);QK(()=>{let F=KK.init();return F.then(z=>(R.current=z)&&I(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>A.current?D():F.cancel()}),ps(()=>{if(A.current&&R.current){let F=A.current.getOriginalEditor(),z=bm(R.current,e||"",r||n||"text",o||"");z!==F.getModel()&&F.setModel(z)}},[o],b),ps(()=>{if(A.current&&R.current){let F=A.current.getModifiedEditor(),z=bm(R.current,t||"",i||n||"text",s||"");z!==F.getModel()&&F.setModel(z)}},[s],b),ps(()=>{let F=A.current.getModifiedEditor();F.getOption(R.current.editor.EditorOption.readOnly)?F.setValue(t||""):t!==F.getValue()&&(F.executeEdits("",[{range:F.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),F.pushUndoStop())},[t],b),ps(()=>{var F,z;(z=(F=A.current)==null?void 0:F.getModel())==null||z.original.setValue(e||"")},[e],b),ps(()=>{let{original:F,modified:z}=A.current.getModel();R.current.editor.setModelLanguage(F,r||n||"text"),R.current.editor.setModelLanguage(z,i||n||"text")},[n,r,i],b),ps(()=>{var F;(F=R.current)==null||F.editor.setTheme(d)},[d],b),ps(()=>{var F;(F=A.current)==null||F.updateOptions(h)},[h],b);let G=O.useCallback(()=>{var V;if(!R.current)return;B.current(R.current);let F=bm(R.current,e||"",r||n||"text",o||""),z=bm(R.current,t||"",i||n||"text",s||"");(V=A.current)==null||V.setModel({original:F,modified:z})},[n,t,i,e,r,o,s]),U=O.useCallback(()=>{var F;!H.current&&M.current&&(A.current=R.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...h}),G(),(F=R.current)==null||F.editor.setTheme(d),x(!0),H.current=!0)},[h,d,G]);O.useEffect(()=>{b&&L.current(A.current,R.current)},[b]),O.useEffect(()=>{!E&&!b&&U()},[E,b,U]);function D(){var z,V,W,K;let F=(z=A.current)==null?void 0:z.getModel();l||((V=F==null?void 0:F.original)==null||V.dispose()),c||((W=F==null?void 0:F.modified)==null||W.dispose()),(K=A.current)==null||K.dispose()}return de.createElement(JK,{width:g,height:p,isEditorReady:b,loading:f,_ref:M,className:v,wrapperProps:y})}var $we=Nwe;O.memo($we);function Fwe(e){let t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}var zwe=Fwe,Fw=new Map;function Uwe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:l,loading:c="Loading...",options:d={},overrideServices:f={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:_=Yx,onMount:b=Yx,onChange:x,onValidate:E=Yx}){let[I,A]=O.useState(!1),[R,M]=O.useState(!0),L=O.useRef(null),B=O.useRef(null),H=O.useRef(null),G=O.useRef(b),U=O.useRef(_),D=O.useRef(),F=O.useRef(r),z=zwe(o),V=O.useRef(!1),W=O.useRef(!1);QK(()=>{let Q=KK.init();return Q.then(re=>(L.current=re)&&M(!1)).catch(re=>(re==null?void 0:re.type)!=="cancelation"&&console.error("Monaco initialization: error:",re)),()=>B.current?Y():Q.cancel()}),ps(()=>{var re,ue,ce,se;let Q=bm(L.current,e||r||"",t||i||"",o||n||"");Q!==((re=B.current)==null?void 0:re.getModel())&&(h&&Fw.set(z,(ue=B.current)==null?void 0:ue.saveViewState()),(ce=B.current)==null||ce.setModel(Q),h&&((se=B.current)==null||se.restoreViewState(Fw.get(o))))},[o],I),ps(()=>{var Q;(Q=B.current)==null||Q.updateOptions(d)},[d],I),ps(()=>{!B.current||r===void 0||(B.current.getOption(L.current.editor.EditorOption.readOnly)?B.current.setValue(r):r!==B.current.getValue()&&(W.current=!0,B.current.executeEdits("",[{range:B.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),B.current.pushUndoStop(),W.current=!1))},[r],I),ps(()=>{var re,ue;let Q=(re=B.current)==null?void 0:re.getModel();Q&&i&&((ue=L.current)==null||ue.editor.setModelLanguage(Q,i))},[i],I),ps(()=>{var Q;l!==void 0&&((Q=B.current)==null||Q.revealLine(l))},[l],I),ps(()=>{var Q;(Q=L.current)==null||Q.editor.setTheme(s)},[s],I);let K=O.useCallback(()=>{var Q;if(!(!H.current||!L.current)&&!V.current){U.current(L.current);let re=o||n,ue=bm(L.current,r||e||"",t||i||"",re||"");B.current=(Q=L.current)==null?void 0:Q.editor.create(H.current,{model:ue,automaticLayout:!0,...d},f),h&&B.current.restoreViewState(Fw.get(re)),L.current.editor.setTheme(s),A(!0),V.current=!0}},[e,t,n,r,i,o,d,f,h,s]);O.useEffect(()=>{I&&G.current(B.current,L.current)},[I]),O.useEffect(()=>{!R&&!I&&K()},[R,I,K]),F.current=r,O.useEffect(()=>{var Q,re;I&&x&&((Q=D.current)==null||Q.dispose(),D.current=(re=B.current)==null?void 0:re.onDidChangeModelContent(ue=>{W.current||x(B.current.getValue(),ue)}))},[I,x]),O.useEffect(()=>{if(I){let Q=L.current.editor.onDidChangeMarkers(re=>{var ce;let ue=(ce=B.current.getModel())==null?void 0:ce.uri;if(ue&&re.find(se=>se.path===ue.path)){let se=L.current.editor.getModelMarkers({resource:ue});E==null||E(se)}});return()=>{Q==null||Q.dispose()}}return()=>{}},[I,E]);function Y(){var Q,re;(Q=D.current)==null||Q.dispose(),p?h&&Fw.set(o,B.current.saveViewState()):(re=B.current.getModel())==null||re.dispose(),B.current.dispose()}return de.createElement(JK,{width:g,height:v,isEditorReady:I,loading:c,_ref:H,className:y,wrapperProps:S})}var jwe=Uwe,Hwe=O.memo(jwe),Wwe=Hwe;let na;typeof window<"u"?na=window:typeof self<"u"?na=self:na=global;let H$=null,W$=null;const Ij=20,$D=na.clearTimeout,Rj=na.setTimeout,FD=na.cancelAnimationFrame||na.mozCancelAnimationFrame||na.webkitCancelAnimationFrame,Aj=na.requestAnimationFrame||na.mozRequestAnimationFrame||na.webkitRequestAnimationFrame;FD==null||Aj==null?(H$=$D,W$=function(t){return Rj(t,Ij)}):(H$=function([t,n]){FD(t),$D(n)},W$=function(t){const n=Aj(function(){$D(r),t()}),r=Rj(function(){FD(n),t()},Ij);return[n,r]});function Gwe(e){let t,n,r,i,o,s,l;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(_){const b=_.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,I=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,I.style.width=x.offsetWidth+1+"px",I.style.height=x.offsetHeight+1+"px",x.scrollLeft=x.scrollWidth,x.scrollTop=x.scrollHeight},o=function(_){return _.offsetWidth!==_.__resizeLast__.width||_.offsetHeight!==_.__resizeLast__.height},l=function(_){if(_.target.className&&typeof _.target.className.indexOf=="function"&&_.target.className.indexOf("contract-trigger")<0&&_.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&H$(this.__resizeRAF__),this.__resizeRAF__=W$(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(I){I.call(b,_)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const _=document.createElement("fakeelement");if(_.style.animationName!==void 0&&(p=!0),p===!1){for(let b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=g:y.appendChild(p.createTextNode(g)),v.appendChild(y)}};return{addResizeListener:function(p,g){if(c)p.attachEvent("onresize",g);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=na.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),d(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const S=v.createElement("div");S.className="expand-trigger",S.appendChild(v.createElement("div"));const _=v.createElement("div");_.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(_),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",l,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(g)}},removeResizeListener:function(p,g){if(c)p.detachEvent("onresize",g);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",l,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class A4 extends O.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,s,l,c;const d=window.getComputedStyle(this._parentNode)||{},f=parseFloat((o=d.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=d.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((l=d.paddingTop)!==null&&l!==void 0?l:"0"),g=parseFloat((c=d.paddingBottom)!==null&&c!==void 0?c:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-g,S=v.width-f-h,_=this._parentNode.offsetHeight-p-g,b=this._parentNode.offsetWidth-f-h;(!n&&(this.state.height!==_||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:_,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:_,scaledHeight:y,scaledWidth:S,width:b}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=Gwe(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:s,onResize:l,style:c={},tagName:d="div",...f}=this.props,{height:h,scaledHeight:p,scaledWidth:g,width:v}=this.state,y={overflow:"visible"},S={};let _=!1;return i||(h===0&&(_=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(_=!0),y.width=0,S.width=v,S.scaledWidth=g),O.createElement(d,{ref:this._setRef,style:{...y,...c},...f},!_&&t(S))}}function Vwe({returnType:e,params:t}){return`@type {(${ie.join(ie.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function Xwe(e){const[t,n,r]=["/**"," * "," */"],i=ie.map(ie.chunk(ie.split(e.description," "),9),o=>ie.join(o," "));return ie.join([t,...ie.map(i,o=>`${n}${o}`),`${n}${Vwe(e)}`,r],` `)}function qwe({name:e,params:t,defaultReturnValue:n}){return ie.join([`function ${e}(${ie.join(ie.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` `)}function Ywe(e){return ie.join(ie.map(e,t=>ie.join([Xwe(t),qwe(t)],` `)),` -`)}const Kwe={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},Jwe={name:"shouldRender",description:"Define which objects the renderer should display.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!0,returnType:"boolean"},Qwe={shouldRender:Jwe,shouldBreak:Kwe},[ua,Zwe]=Gl({code:Ywe(ie.values(Qwe)),layers:[]}),e_e=2500;function t_e(){const[{code:e},t]=ua(),n=Pn();return C.jsx(wn,{height:"100%",overflow:"hidden",children:C.jsx(A4,{children:({width:r,height:i})=>C.jsx(Wwe,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(t4,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ie.debounce(o=>t({code:o}),e_e),options:{minimap:{enabled:!1}}})})})}function F1(e){"@babel/helpers - typeof";return F1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F1(e)}function n_e(e,t){if(F1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(F1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r_e(e){var t=n_e(e,"string");return F1(t)==="symbol"?t:String(t)}function i_e(e,t,n){return t=r_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oj(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ao(1));return n(ZK)(e,t)}if(typeof e!="function")throw new Error(Ao(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Ao(3));return o}function h(y){if(typeof y!="function")throw new Error(Ao(4));if(c)throw new Error(Ao(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Ao(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!o_e(y))throw new Error(Ao(7));if(typeof y.type>"u")throw new Error(Ao(8));if(c)throw new Error(Ao(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function F_e(e,t){return e===t}function z_e(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?b_e:n,i=t.mapStateToPropsFactories,o=i===void 0?R_e:i,s=t.mapDispatchToPropsFactories,l=s===void 0?C_e:s,c=t.mergePropsFactories,d=c===void 0?k_e:c,f=t.selectorFactory,h=f===void 0?N_e:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,I=E===void 0?F_e:E,A=_.areOwnPropsEqual,R=A===void 0?UD:A,M=_.areStatePropsEqual,L=M===void 0?UD:M,B=_.areMergedPropsEqual,H=B===void 0?UD:B,G=Le(_,$_e),U=jD(g,o,"mapStateToProps"),D=jD(v,l,"mapDispatchToProps"),F=jD(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:U,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:I,areOwnPropsEqual:R,areStatePropsEqual:L,areMergedPropsEqual:H},G))}}const sJ=z_e();l_e(Og.unstable_batchedUpdates);function U_e(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Ys(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof vE){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),Z_e=` +`)}const Kwe={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},Jwe={name:"shouldRender",description:"Define which objects the renderer should display.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!0,returnType:"boolean"},Qwe={shouldRender:Jwe,shouldBreak:Kwe},[ua,Zwe]=Gl({code:Ywe(ie.values(Qwe)),layers:[]}),e_e=2500;function t_e(){const[{code:e},t]=ua(),n=Pn();return C.jsx(wn,{height:"100%",overflow:"hidden",children:C.jsx(A4,{children:({width:r,height:i})=>C.jsx(Wwe,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(t4,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ie.debounce(o=>t({code:o}),e_e),options:{minimap:{enabled:!1}}})})})}function F1(e){"@babel/helpers - typeof";return F1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F1(e)}function n_e(e,t){if(F1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(F1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r_e(e){var t=n_e(e,"string");return F1(t)==="symbol"?t:String(t)}function i_e(e,t,n){return t=r_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oj(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ao(1));return n(eJ)(e,t)}if(typeof e!="function")throw new Error(Ao(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Ao(3));return o}function h(y){if(typeof y!="function")throw new Error(Ao(4));if(c)throw new Error(Ao(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Ao(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!o_e(y))throw new Error(Ao(7));if(typeof y.type>"u")throw new Error(Ao(8));if(c)throw new Error(Ao(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function F_e(e,t){return e===t}function z_e(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?b_e:n,i=t.mapStateToPropsFactories,o=i===void 0?R_e:i,s=t.mapDispatchToPropsFactories,l=s===void 0?C_e:s,c=t.mergePropsFactories,d=c===void 0?k_e:c,f=t.selectorFactory,h=f===void 0?N_e:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,I=E===void 0?F_e:E,A=_.areOwnPropsEqual,R=A===void 0?UD:A,M=_.areStatePropsEqual,L=M===void 0?UD:M,B=_.areMergedPropsEqual,H=B===void 0?UD:B,G=Le(_,$_e),U=jD(g,o,"mapStateToProps"),D=jD(v,l,"mapDispatchToProps"),F=jD(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:U,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:I,areOwnPropsEqual:R,areStatePropsEqual:L,areMergedPropsEqual:H},G))}}const aJ=z_e();l_e(Og.unstable_batchedUpdates);function U_e(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Ys(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof vE){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),Z_e=` Press space bar to start a drag. When dragging you can use the arrow keys to move the item around and escape to cancel. Some screen readers may require you to be in focus mode or to use your pass through key `,yE=function(t){return t+1},eSe=function(t){return` You have lifted an item in position `+yE(t.source.index)+` -`},dJ=function(t,n){var r=t.droppableId===n.droppableId,i=yE(t.index),o=yE(n.index);return r?` +`},fJ=function(t,n){var r=t.droppableId===n.droppableId,i=yE(t.index),o=yE(n.index);return r?` You have moved the item from position `+i+` to position `+o+` `:` @@ -401,14 +401,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho in list `+t.droppableId+` to list `+n.droppableId+` in position `+o+` - `},fJ=function(t,n,r){var i=n.droppableId===r.droppableId;return i?` + `},hJ=function(t,n,r){var i=n.droppableId===r.droppableId;return i?` The item `+t+` has been combined with `+r.draggableId:` The item `+t+` in list `+n.droppableId+` has been combined with `+r.draggableId+` in list `+r.droppableId+` - `},tSe=function(t){var n=t.destination;if(n)return dJ(t.source,n);var r=t.combine;return r?fJ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},jj=function(t){return` + `},tSe=function(t){var n=t.destination;if(n)return fJ(t.source,n);var r=t.combine;return r?hJ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},jj=function(t){return` The item has returned to its starting position of `+yE(t.index)+` `},nSe=function(t){if(t.reason==="CANCEL")return` @@ -416,14 +416,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+jj(t.source)+` `;var n=t.destination,r=t.combine;return n?` You have dropped the item. - `+dJ(t.source,n)+` + `+fJ(t.source,n)+` `:r?` You have dropped the item. - `+fJ(t.draggableId,t.source,r)+` + `+hJ(t.draggableId,t.source,r)+` `:` The item has been dropped while not over a drop area. `+jj(t.source)+` - `},iS={dragHandleUsageInstructions:Z_e,onDragStart:eSe,onDragUpdate:tSe,onDragEnd:nSe},bi={x:0,y:0},zi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},xs=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yd=function(t,n){return t.x===n.x&&t.y===n.y},Ng=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},up=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},U1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Hj=function(t,n){return Math.min.apply(Math,n.map(function(r){return U1(t,r)}))},hJ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},rSe=function(e,t){var n=qa({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},$b=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Wj=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},iSe={top:0,right:0,bottom:0,left:0},oSe=function(t,n){return n?$b(t,n.scroll.diff.displacement):t},sSe=function(t,n,r){if(r&&r.increasedBy){var i;return $({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},aSe=function(t,n){return n&&n.shouldClipSubject?rSe(n.pageMarginBox,t):qa(t)},cg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=oSe(t.marginBox,i),s=sSe(o,r,n),l=aSe(s,i);return{page:t,withPlaceholder:n,active:l}},k4=function(e,t){e.frame||He(!1);var n=e.frame,r=xs(t,n.scroll.initial),i=Ng(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=cg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function xE(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function D4(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},dSe=function(e){var t=ra(e.top,e.bottom),n=ra(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},B4={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},xJ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},fSe=function(e){return function(t){var n=ra(t.top,t.bottom),r=ra(t.left,t.right);return function(i){return e===B4?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},hSe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:bi;return $b(t,r)},pSe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mSe=function(t,n,r){return r(n)(t)},N4=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?hSe(n,r):n;return pSe(l,r,s)&&mSe(l,i,s)},gSe=function(t){return N4($({},t,{isVisibleThroughFrameFn:yJ}))},bJ=function(t){return N4($({},t,{isVisibleThroughFrameFn:dSe}))},vSe=function(t){return N4($({},t,{isVisibleThroughFrameFn:fSe(t.destination.axis)}))},ySe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function xSe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return qa(O4(n,r))}function H1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=xSe(d,r),h=d.descriptor.id;c.all.push(h);var p=gSe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=ySe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function bSe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Gj(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=bSe(t,{inHomeList:n});return{displaced:j1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function bE(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=Fg(t,r);if(l==null)return Gj({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=Ud(n,function(y){return y.descriptor.index===l});if(!f)return Gj({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=zT(t,n),p=n.indexOf(f),g=h.slice(p),v=H1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Cd(e,t){return!!t.effected[e]}var wSe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=Cd(s,o);return d?t?c:c-1:t?c+1:c},_Se=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},SSe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=_Se({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:bE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=wSe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:bE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},ESe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Cd(r,n)?o?bi:Ng(i.point):o?i.point:bi},CSe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=FT(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=ESe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return zi(s,l)},wJ=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},TSe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},$4=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Vj=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return up(n.line,r.marginBox[n.end]+wJ(n,i),$4(n,r.marginBox,i))},Xj=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return up(n.line,r.marginBox[n.start]-TSe(n,i),$4(n,r.marginBox,i))},ISe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return up(n.line,r.contentBox[n.start]+wJ(n,i),$4(n,r.contentBox,i))},RSe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=$g(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return ISe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(Cd(h,o))return Xj({axis:c,moveRelativeTo:p.page,isMoving:l});var g=mE(p.page,f.point);return Xj({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Cd(v.descriptor.id,o)){var y=mE(v.page,Ng(o.displacedBy.point));return Vj({axis:c,moveRelativeTo:y,isMoving:l})}return Vj({axis:c,moveRelativeTo:v.page,isMoving:l})},G$=function(e,t){var n=e.frame;return n?zi(t,n.scroll.diff.displacement):t},ASe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?RSe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):CSe({impact:n,draggables:o,afterCritical:s})},UT=function(e){var t=ASe(e),n=e.droppable,r=n?G$(n,t):t;return r},_J=function(e,t){var n=xs(t,e.scroll.initial),r=Ng(n),i=qa({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function qj(e,t){return e.map(function(n){return t[n]})}function PSe(e,t){for(var n=0;n1?f.sort(function(h,p){return mo(h)[l.start]-mo(p)[l.start]})[0]:d.sort(function(h,p){var g=Hj(n,Wj(mo(h))),v=Hj(n,Wj(mo(p)));return g!==v?g-v:mo(h)[l.start]-mo(p)[l.start]})[0]},Yj=function(t,n){var r=t.page.borderBox.center;return Cd(t.descriptor.id,n)?xs(r,n.displacedBy.point):r},LSe=function(t,n){var r=t.page.borderBox;return Cd(t.descriptor.id,n)?$b(r,Ng(n.displacedBy.point)):r},BSe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return bJ({target:LSe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=U1(t,G$(r,Yj(l,o))),f=U1(t,G$(r,Yj(c,o)));return dt.left&&e.topt.top}function WSe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=up(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:U1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function GSe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=$T(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!HSe(t,s))return!1;if(TJ(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=ra(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:WSe({pageBorderBox:t,draggable:n,candidates:i}):null}var IJ=function(t,n){return qa($b(t,n))},VSe=function(e,t){var n=e.frame;return n?IJ(t,n.scroll.diff.value):t};function RJ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function XSe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var qSe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=Fb(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=zT(n,i),v=Ud(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=Cd(_,l),E=RJ({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:I?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},AJ=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=IJ(n.page.borderBox,t),d=GSe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return cSe;var f=i[d],h=$g(f.descriptor.id,r),p=VSe(f,c);return KSe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||qSe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},z4=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},JSe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Es(n),s=Es(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=$Se(l);return z4(i,c)},QSe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=JSe({previousImpact:i,impact:o,droppables:r}),l=Es(o);if(!l)return s;var c=r[l];if(Fg(t,c)||c.subject.withPlaceholder)return s;var d=CJ(c,t,n);return z4(s,d)},Kx=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=xs(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:zi(t.initial.client.borderBoxCenter,f)},p={selection:zi(h.selection,l.scroll.current),borderBoxCenter:zi(h.borderBoxCenter,l.scroll.current),offset:zi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||AJ({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=QSe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function ZSe(e,t){return e.map(function(n){return t[n]})}var PJ=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=ZSe(s.all,r),c=H1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},OJ=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=UT({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return F4({pageBorderBoxCenter:l,draggable:n,viewport:o})},MJ=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Es(i);f||He(!1);var h=c[f],p=PJ({impact:i,viewport:o,destination:h,draggables:l}),g=OJ({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return Kx({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},eEe=function(e){return{index:e.index,droppableId:e.droppableId}},kJ=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Fb(n.axis,t.displaceBy),s=$g(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=H1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:eEe(t.descriptor)}};return{impact:p,afterCritical:f}},tEe=function(e,t){return{draggables:e.draggables,droppables:z4(e.droppables,t)}},nEe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=mE(t.client,n),o=gE(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},rEe=function(e){var t=e.frame;return t||He(!1),t},iEe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=rEe(l),d=c.scroll.diff.value,f=zi(i,d),h=nEe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},oEe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],I=k4(E,x.scroll);return I}),i=$({},t.dimensions.droppables,{},mJ(r)),o=gJ(iEe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Es(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=kJ({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=AJ({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},V$=function(t){return t.movementMode==="SNAP"},GD=function(t,n,r){var i=tEe(t.dimensions,n);return!V$(t)||r?Kx({state:t,dimensions:i}):MJ({state:t,dimensions:i})};function VD(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Kj={phase:"IDLE",completed:null,shouldFlush:!1},sEe=function(e,t){if(e===void 0&&(e=Kj),t.type==="FLUSH")return $({},Kj,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:bi},h={client:f,page:{selection:zi(f.selection,o.scroll.initial),borderBoxCenter:zi(f.selection,o.scroll.initial),offset:zi(f.selection,o.scroll.diff.value)}},p=$T(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=kJ({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),oEe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var b=t.payload.client;return yd(b,e.current.client.selection)?e:Kx({state:e,clientSelection:b,impact:V$(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return VD(e);_h(e)||He(!1);var x=t.payload,E=x.id,I=x.newScroll,A=e.dimensions.droppables[E];if(!A)return e;var R=k4(A,I);return GD(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var M=t.payload,L=M.id,B=M.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===B&&He(!1);var G=$({},H,{isEnabled:B});return GD(e,G,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var U=t.payload,D=U.id,F=U.isCombineEnabled,z=e.dimensions.droppables[D];z||He(!1),z.isCombineEnabled===F&&He(!1);var V=$({},z,{isCombineEnabled:F});return GD(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;_h(e)||He(!1),e.isWindowScrollAllowed||He(!1);var W=t.payload.newScroll;if(yd(e.viewport.scroll.current,W))return VD(e);var K=_J(e.viewport,W);return V$(e)?MJ({state:e,viewport:K}):Kx({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!_h(e))return e;var Y=t.payload.maxScroll;if(yd(Y,e.viewport.scroll.max))return e;var Q=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:Q})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var re=jSe({state:e,type:t.type});return re?Kx({state:e,impact:re.impact,clientSelection:re.clientSelection,scrollJumpRequest:re.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ue=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ce=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ue});return ce}if(t.type==="DROP_ANIMATE"){var se=t.payload,J=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:J,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},aEe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},lEe=function(t){return{type:"LIFT",payload:t}},uEe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},cEe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},dEe=function(){return{type:"COLLECTION_STARTING",payload:null}},fEe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},hEe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},pEe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},DJ=function(t){return{type:"MOVE",payload:t}},mEe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},gEe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},vEe=function(){return{type:"MOVE_UP",payload:null}},yEe=function(){return{type:"MOVE_DOWN",payload:null}},xEe=function(){return{type:"MOVE_RIGHT",payload:null}},bEe=function(){return{type:"MOVE_LEFT",payload:null}},U4=function(){return{type:"FLUSH",payload:null}},wEe=function(t){return{type:"DROP_ANIMATE",payload:t}},j4=function(t){return{type:"DROP_COMPLETE",payload:t}},LJ=function(t){return{type:"DROP",payload:t}},_Ee=function(t){return{type:"DROP_PENDING",payload:t}},BJ=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},SEe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(j4({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(U4()),r(aEe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(uEe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},EEe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},H4={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},W1={opacity:{drop:0,combining:.7},scale:{drop:.75}},W4={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},uh=W4.outOfTheWay+"s "+H4.outOfTheWay,Jx={fluid:"opacity "+uh,snap:"transform "+uh+", opacity "+uh,drop:function(t){var n=t+"s "+H4.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+uh,placeholder:"height "+uh+", width "+uh+", margin "+uh},Jj=function(t){return yd(t,bi)?null:"translate("+t.x+"px, "+t.y+"px)"},X$={moveTo:Jj,drop:function(t,n){var r=Jj(t);return r?n?r+" scale("+W1.scale.drop+")":r:null}},q$=W4.minDropTime,NJ=W4.maxDropTime,CEe=NJ-q$,Qj=1500,TEe=.6,IEe=function(e){var t=e.current,n=e.destination,r=e.reason,i=U1(t,n);if(i<=0)return q$;if(i>=Qj)return NJ;var o=i/Qj,s=q$+CEe*o,l=r==="CANCEL"?s*TEe:s;return Number(l.toFixed(2))},REe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Es(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=OJ({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=xs(h,n.client.borderBox.center);return p},AEe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=PJ({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:j1});return{impact:c,didDropInsideDroppable:!0}},PEe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(_Ee({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=AEe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?L4(p):null,y=g?FT(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=REe({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!yd(o.current.client.offset,b)||!!_.combine;if(!E){n(j4({completed:x}));return}var I=IEe({current:o.current.client.offset,destination:b,reason:s}),A={newHomeClientOffset:b,dropDuration:I,completed:x};n(wEe(A))}}}},$J=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function OEe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function MEe(e){var t=e.onWindowScroll;function n(){t($J())}var r=z1(n),i=OEe(r),o=vd;function s(){return o!==vd}function l(){s()&&He(!1),o=Ys(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=vd}return{start:l,stop:c,isActive:s}}var kEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},DEe=function(e){var t=MEe({onWindowScroll:function(r){e.dispatch(mEe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&kEe(r)&&t.stop(),n(r)}}},LEe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},BEe=function(){var e=[],t=function(o){var s=D4(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},NEe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},$Ee=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},FEe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},Gy=function(t,n){n()},zw=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},XD=function(t,n,r,i){if(!t){r(i(n));return}var o=LEe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},zEe=function(e,t){var n=BEe(),r=null,i=function(p,g){r&&He(!1),Gy("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),Gy("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(zw(p,g))})},s=function(p,g){r&&He(!1);var v=zw(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){Gy("onDragStart",function(){return XD(e().onDragStart,v,t,iS.onDragStart)})})},l=function(p,g){var v=L4(g),y=FT(g);r||He(!1);var S=!FEe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!NEe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!$Ee(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},zw(p,r.mode),{combine:y,destination:v});n.add(function(){Gy("onDragUpdate",function(){return XD(e().onDragUpdate,x,t,iS.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,Gy("onDragEnd",function(){return XD(e().onDragEnd,p,t,iS.onDragEnd)})},f=function(){if(r){var p=$({},zw(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},UEe=function(e,t){var n=zEe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},jEe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(j4({completed:r.completed}))}}},HEe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(BJ())}};n=requestAnimationFrame(function(){n=null,t=Ys(window,[s])})}}}},WEe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},GEe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},VEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},XEe=function(e){return function(t){return function(n){return function(r){if(VEe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},qEe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(LJ({reason:r.reason})))}}}},YEe=eJ,KEe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return ZK(sEe,YEe(s_e(EEe(r),WEe(t),SEe(t),PEe,jEe,HEe,qEe,XEe(s),DEe,GEe(n),UEe(i,o))))},qD=function(){return{additions:{},removals:{},modified:{}}};function JEe(e){var t=e.registry,n=e.callbacks,r=qD(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(bi)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=qD(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=qD())};return{add:s,remove:l,stop:c}}var FJ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=xs({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},zJ=function(){var e=document.documentElement;return e||He(!1),e},UJ=function(){var e=zJ(),t=FJ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},QEe=function(){var e=$J(),t=UJ(),n=e.y,r=e.x,i=zJ(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=qa({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:bi,displacement:bi}}};return f},ZEe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=QEe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:gJ(c),droppables:mJ(l)},f={dimensions:d,critical:t,viewport:i};return f};function Zj(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var eCe=function(e,t){var n=null,r=JEe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&Zj(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&Zj(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},ZEe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},jJ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},tCe=function(e){window.scrollBy(e.x,e.y)},nCe=xi(function(e){return $T(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),rCe=function(t,n){var r=Ud(nCe(n),function(i){return i.frame||He(!1),TJ(i.frame.pageMarginBox)(t)});return r},iCe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=rCe(t,r);return o},xd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},oCe=function(e,t){var n=e[t.size]*xd.startFromPercentage,r=e[t.size]*xd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},HJ=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},G4=1,sCe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return xd.maxPixelScroll;if(e===t.startScrollingFrom)return G4;var n=HJ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=xd.maxPixelScroll*xd.ease(r);return Math.ceil(i)},eH=xd.durationDampening.accelerateAt,tH=xd.durationDampening.stopDampeningAt,aCe=function(e,t){var n=t,r=tH,i=Date.now(),o=i-n;if(o>=tH)return e;if(ot.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},uCe=hJ(function(e){return e===0?0:e}),WJ=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=rH({container:n,distanceToEdges:s,dragStartTime:t,axis:B4,shouldUseTimeDampening:o}),c=rH({container:n,distanceToEdges:s,dragStartTime:t,axis:xJ,shouldUseTimeDampening:o}),d=uCe({x:c,y:l});if(yd(d,bi))return null;var f=lCe({container:n,subject:r,proposedScroll:d});return f?yd(f,bi)?null:f:null},cCe=hJ(function(e){return e===0?0:e>0?1:-1}),V4=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=zi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return yd(s,bi)?null:s}}(),GJ=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=cCe(i),l=V4({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},X4=function(t,n){return GJ({current:t.scroll.current,max:t.scroll.max,change:n})},dCe=function(t,n){if(!X4(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return V4({current:i,max:r,change:n})},q4=function(t,n){var r=t.frame;return r?GJ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},fCe=function(t,n){var r=t.frame;return!r||!q4(t,n)?null:V4({current:r.scroll.current,max:r.scroll.max,change:n})},hCe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=WJ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&X4(t,s)?s:null},pCe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=WJ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&q4(t,l)?l:null},iH=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=hCe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=iCe({center:s,destination:Es(t.impact),droppables:t.dimensions.droppables});if(h){var p=pCe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},mCe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=z1(t),i=z1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;iH({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};iH({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},gCe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=zi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!q4(d,f))return f;var h=fCe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=xs(f,h);n(d.descriptor.id,p);var g=xs(f,p);return g},s=function(d,f,h){if(!d||!X4(f,h))return h;var p=dCe(f,h);if(!p)return r(h),null;var g=xs(h,p);r(g);var v=xs(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Es(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},vCe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=mCe({scrollWindow:n,scrollDroppable:t}),o=gCe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},dg="data-rbd",fg=function(){var e=dg+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Y$=function(){var e=dg+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),yCe=function(){var e=dg+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),oH={contextId:dg+"-scroll-container-context-id"},xCe=function(t){return function(n){return"["+n+'="'+t+'"]'}},Vy=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},bCe="pointer-events: none;",wCe=function(e){var t=xCe(e),n=function(){var l=` + `},iS={dragHandleUsageInstructions:Z_e,onDragStart:eSe,onDragUpdate:tSe,onDragEnd:nSe},bi={x:0,y:0},zi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},xs=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yd=function(t,n){return t.x===n.x&&t.y===n.y},Ng=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},up=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},U1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Hj=function(t,n){return Math.min.apply(Math,n.map(function(r){return U1(t,r)}))},pJ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},rSe=function(e,t){var n=qa({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},$b=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Wj=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},iSe={top:0,right:0,bottom:0,left:0},oSe=function(t,n){return n?$b(t,n.scroll.diff.displacement):t},sSe=function(t,n,r){if(r&&r.increasedBy){var i;return $({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},aSe=function(t,n){return n&&n.shouldClipSubject?rSe(n.pageMarginBox,t):qa(t)},cg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=oSe(t.marginBox,i),s=sSe(o,r,n),l=aSe(s,i);return{page:t,withPlaceholder:n,active:l}},k4=function(e,t){e.frame||He(!1);var n=e.frame,r=xs(t,n.scroll.initial),i=Ng(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=cg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function xE(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function D4(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},dSe=function(e){var t=ra(e.top,e.bottom),n=ra(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},B4={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},bJ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},fSe=function(e){return function(t){var n=ra(t.top,t.bottom),r=ra(t.left,t.right);return function(i){return e===B4?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},hSe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:bi;return $b(t,r)},pSe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mSe=function(t,n,r){return r(n)(t)},N4=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?hSe(n,r):n;return pSe(l,r,s)&&mSe(l,i,s)},gSe=function(t){return N4($({},t,{isVisibleThroughFrameFn:xJ}))},wJ=function(t){return N4($({},t,{isVisibleThroughFrameFn:dSe}))},vSe=function(t){return N4($({},t,{isVisibleThroughFrameFn:fSe(t.destination.axis)}))},ySe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function xSe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return qa(O4(n,r))}function H1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=xSe(d,r),h=d.descriptor.id;c.all.push(h);var p=gSe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=ySe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function bSe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Gj(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=bSe(t,{inHomeList:n});return{displaced:j1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function bE(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=Fg(t,r);if(l==null)return Gj({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=Ud(n,function(y){return y.descriptor.index===l});if(!f)return Gj({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=zT(t,n),p=n.indexOf(f),g=h.slice(p),v=H1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Cd(e,t){return!!t.effected[e]}var wSe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=Cd(s,o);return d?t?c:c-1:t?c+1:c},_Se=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},SSe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=_Se({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:bE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=wSe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:bE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},ESe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Cd(r,n)?o?bi:Ng(i.point):o?i.point:bi},CSe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=FT(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=ESe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return zi(s,l)},_J=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},TSe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},$4=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Vj=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return up(n.line,r.marginBox[n.end]+_J(n,i),$4(n,r.marginBox,i))},Xj=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return up(n.line,r.marginBox[n.start]-TSe(n,i),$4(n,r.marginBox,i))},ISe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return up(n.line,r.contentBox[n.start]+_J(n,i),$4(n,r.contentBox,i))},RSe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=$g(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return ISe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(Cd(h,o))return Xj({axis:c,moveRelativeTo:p.page,isMoving:l});var g=mE(p.page,f.point);return Xj({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Cd(v.descriptor.id,o)){var y=mE(v.page,Ng(o.displacedBy.point));return Vj({axis:c,moveRelativeTo:y,isMoving:l})}return Vj({axis:c,moveRelativeTo:v.page,isMoving:l})},G$=function(e,t){var n=e.frame;return n?zi(t,n.scroll.diff.displacement):t},ASe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?RSe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):CSe({impact:n,draggables:o,afterCritical:s})},UT=function(e){var t=ASe(e),n=e.droppable,r=n?G$(n,t):t;return r},SJ=function(e,t){var n=xs(t,e.scroll.initial),r=Ng(n),i=qa({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function qj(e,t){return e.map(function(n){return t[n]})}function PSe(e,t){for(var n=0;n1?f.sort(function(h,p){return mo(h)[l.start]-mo(p)[l.start]})[0]:d.sort(function(h,p){var g=Hj(n,Wj(mo(h))),v=Hj(n,Wj(mo(p)));return g!==v?g-v:mo(h)[l.start]-mo(p)[l.start]})[0]},Yj=function(t,n){var r=t.page.borderBox.center;return Cd(t.descriptor.id,n)?xs(r,n.displacedBy.point):r},LSe=function(t,n){var r=t.page.borderBox;return Cd(t.descriptor.id,n)?$b(r,Ng(n.displacedBy.point)):r},BSe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return wJ({target:LSe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=U1(t,G$(r,Yj(l,o))),f=U1(t,G$(r,Yj(c,o)));return dt.left&&e.topt.top}function WSe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=up(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:U1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function GSe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=$T(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!HSe(t,s))return!1;if(IJ(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=ra(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:WSe({pageBorderBox:t,draggable:n,candidates:i}):null}var RJ=function(t,n){return qa($b(t,n))},VSe=function(e,t){var n=e.frame;return n?RJ(t,n.scroll.diff.value):t};function AJ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function XSe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var qSe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=Fb(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=zT(n,i),v=Ud(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=Cd(_,l),E=AJ({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:I?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},PJ=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=RJ(n.page.borderBox,t),d=GSe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return cSe;var f=i[d],h=$g(f.descriptor.id,r),p=VSe(f,c);return KSe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||qSe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},z4=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},JSe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Es(n),s=Es(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=$Se(l);return z4(i,c)},QSe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=JSe({previousImpact:i,impact:o,droppables:r}),l=Es(o);if(!l)return s;var c=r[l];if(Fg(t,c)||c.subject.withPlaceholder)return s;var d=TJ(c,t,n);return z4(s,d)},Kx=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=xs(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:zi(t.initial.client.borderBoxCenter,f)},p={selection:zi(h.selection,l.scroll.current),borderBoxCenter:zi(h.borderBoxCenter,l.scroll.current),offset:zi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||PJ({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=QSe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function ZSe(e,t){return e.map(function(n){return t[n]})}var OJ=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=ZSe(s.all,r),c=H1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},MJ=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=UT({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return F4({pageBorderBoxCenter:l,draggable:n,viewport:o})},kJ=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Es(i);f||He(!1);var h=c[f],p=OJ({impact:i,viewport:o,destination:h,draggables:l}),g=MJ({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return Kx({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},eEe=function(e){return{index:e.index,droppableId:e.droppableId}},DJ=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Fb(n.axis,t.displaceBy),s=$g(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=H1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:eEe(t.descriptor)}};return{impact:p,afterCritical:f}},tEe=function(e,t){return{draggables:e.draggables,droppables:z4(e.droppables,t)}},nEe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=mE(t.client,n),o=gE(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},rEe=function(e){var t=e.frame;return t||He(!1),t},iEe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=rEe(l),d=c.scroll.diff.value,f=zi(i,d),h=nEe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},oEe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],I=k4(E,x.scroll);return I}),i=$({},t.dimensions.droppables,{},gJ(r)),o=vJ(iEe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Es(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=DJ({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=PJ({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},V$=function(t){return t.movementMode==="SNAP"},GD=function(t,n,r){var i=tEe(t.dimensions,n);return!V$(t)||r?Kx({state:t,dimensions:i}):kJ({state:t,dimensions:i})};function VD(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Kj={phase:"IDLE",completed:null,shouldFlush:!1},sEe=function(e,t){if(e===void 0&&(e=Kj),t.type==="FLUSH")return $({},Kj,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:bi},h={client:f,page:{selection:zi(f.selection,o.scroll.initial),borderBoxCenter:zi(f.selection,o.scroll.initial),offset:zi(f.selection,o.scroll.diff.value)}},p=$T(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=DJ({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),oEe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var b=t.payload.client;return yd(b,e.current.client.selection)?e:Kx({state:e,clientSelection:b,impact:V$(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return VD(e);_h(e)||He(!1);var x=t.payload,E=x.id,I=x.newScroll,A=e.dimensions.droppables[E];if(!A)return e;var R=k4(A,I);return GD(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var M=t.payload,L=M.id,B=M.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===B&&He(!1);var G=$({},H,{isEnabled:B});return GD(e,G,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;_h(e)||He(!1);var U=t.payload,D=U.id,F=U.isCombineEnabled,z=e.dimensions.droppables[D];z||He(!1),z.isCombineEnabled===F&&He(!1);var V=$({},z,{isCombineEnabled:F});return GD(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;_h(e)||He(!1),e.isWindowScrollAllowed||He(!1);var W=t.payload.newScroll;if(yd(e.viewport.scroll.current,W))return VD(e);var K=SJ(e.viewport,W);return V$(e)?kJ({state:e,viewport:K}):Kx({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!_h(e))return e;var Y=t.payload.maxScroll;if(yd(Y,e.viewport.scroll.max))return e;var Q=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:Q})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var re=jSe({state:e,type:t.type});return re?Kx({state:e,impact:re.impact,clientSelection:re.clientSelection,scrollJumpRequest:re.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ue=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ce=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ue});return ce}if(t.type==="DROP_ANIMATE"){var se=t.payload,J=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:J,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},aEe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},lEe=function(t){return{type:"LIFT",payload:t}},uEe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},cEe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},dEe=function(){return{type:"COLLECTION_STARTING",payload:null}},fEe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},hEe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},pEe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},LJ=function(t){return{type:"MOVE",payload:t}},mEe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},gEe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},vEe=function(){return{type:"MOVE_UP",payload:null}},yEe=function(){return{type:"MOVE_DOWN",payload:null}},xEe=function(){return{type:"MOVE_RIGHT",payload:null}},bEe=function(){return{type:"MOVE_LEFT",payload:null}},U4=function(){return{type:"FLUSH",payload:null}},wEe=function(t){return{type:"DROP_ANIMATE",payload:t}},j4=function(t){return{type:"DROP_COMPLETE",payload:t}},BJ=function(t){return{type:"DROP",payload:t}},_Ee=function(t){return{type:"DROP_PENDING",payload:t}},NJ=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},SEe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(j4({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(U4()),r(aEe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(uEe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},EEe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},H4={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},W1={opacity:{drop:0,combining:.7},scale:{drop:.75}},W4={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},uh=W4.outOfTheWay+"s "+H4.outOfTheWay,Jx={fluid:"opacity "+uh,snap:"transform "+uh+", opacity "+uh,drop:function(t){var n=t+"s "+H4.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+uh,placeholder:"height "+uh+", width "+uh+", margin "+uh},Jj=function(t){return yd(t,bi)?null:"translate("+t.x+"px, "+t.y+"px)"},X$={moveTo:Jj,drop:function(t,n){var r=Jj(t);return r?n?r+" scale("+W1.scale.drop+")":r:null}},q$=W4.minDropTime,$J=W4.maxDropTime,CEe=$J-q$,Qj=1500,TEe=.6,IEe=function(e){var t=e.current,n=e.destination,r=e.reason,i=U1(t,n);if(i<=0)return q$;if(i>=Qj)return $J;var o=i/Qj,s=q$+CEe*o,l=r==="CANCEL"?s*TEe:s;return Number(l.toFixed(2))},REe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Es(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=MJ({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=xs(h,n.client.borderBox.center);return p},AEe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=OJ({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:j1});return{impact:c,didDropInsideDroppable:!0}},PEe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(_Ee({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=AEe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?L4(p):null,y=g?FT(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=REe({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!yd(o.current.client.offset,b)||!!_.combine;if(!E){n(j4({completed:x}));return}var I=IEe({current:o.current.client.offset,destination:b,reason:s}),A={newHomeClientOffset:b,dropDuration:I,completed:x};n(wEe(A))}}}},FJ=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function OEe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function MEe(e){var t=e.onWindowScroll;function n(){t(FJ())}var r=z1(n),i=OEe(r),o=vd;function s(){return o!==vd}function l(){s()&&He(!1),o=Ys(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=vd}return{start:l,stop:c,isActive:s}}var kEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},DEe=function(e){var t=MEe({onWindowScroll:function(r){e.dispatch(mEe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&kEe(r)&&t.stop(),n(r)}}},LEe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},BEe=function(){var e=[],t=function(o){var s=D4(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},NEe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},$Ee=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},FEe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},Gy=function(t,n){n()},zw=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},XD=function(t,n,r,i){if(!t){r(i(n));return}var o=LEe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},zEe=function(e,t){var n=BEe(),r=null,i=function(p,g){r&&He(!1),Gy("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),Gy("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(zw(p,g))})},s=function(p,g){r&&He(!1);var v=zw(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){Gy("onDragStart",function(){return XD(e().onDragStart,v,t,iS.onDragStart)})})},l=function(p,g){var v=L4(g),y=FT(g);r||He(!1);var S=!FEe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!NEe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!$Ee(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},zw(p,r.mode),{combine:y,destination:v});n.add(function(){Gy("onDragUpdate",function(){return XD(e().onDragUpdate,x,t,iS.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,Gy("onDragEnd",function(){return XD(e().onDragEnd,p,t,iS.onDragEnd)})},f=function(){if(r){var p=$({},zw(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},UEe=function(e,t){var n=zEe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},jEe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(j4({completed:r.completed}))}}},HEe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(NJ())}};n=requestAnimationFrame(function(){n=null,t=Ys(window,[s])})}}}},WEe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},GEe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},VEe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},XEe=function(e){return function(t){return function(n){return function(r){if(VEe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},qEe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(BJ({reason:r.reason})))}}}},YEe=tJ,KEe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return eJ(sEe,YEe(s_e(EEe(r),WEe(t),SEe(t),PEe,jEe,HEe,qEe,XEe(s),DEe,GEe(n),UEe(i,o))))},qD=function(){return{additions:{},removals:{},modified:{}}};function JEe(e){var t=e.registry,n=e.callbacks,r=qD(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(bi)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=qD(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=qD())};return{add:s,remove:l,stop:c}}var zJ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=xs({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},UJ=function(){var e=document.documentElement;return e||He(!1),e},jJ=function(){var e=UJ(),t=zJ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},QEe=function(){var e=FJ(),t=jJ(),n=e.y,r=e.x,i=UJ(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=qa({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:bi,displacement:bi}}};return f},ZEe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=QEe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:vJ(c),droppables:gJ(l)},f={dimensions:d,critical:t,viewport:i};return f};function Zj(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var eCe=function(e,t){var n=null,r=JEe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&Zj(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&Zj(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},ZEe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},HJ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},tCe=function(e){window.scrollBy(e.x,e.y)},nCe=xi(function(e){return $T(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),rCe=function(t,n){var r=Ud(nCe(n),function(i){return i.frame||He(!1),IJ(i.frame.pageMarginBox)(t)});return r},iCe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=rCe(t,r);return o},xd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},oCe=function(e,t){var n=e[t.size]*xd.startFromPercentage,r=e[t.size]*xd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},WJ=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},G4=1,sCe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return xd.maxPixelScroll;if(e===t.startScrollingFrom)return G4;var n=WJ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=xd.maxPixelScroll*xd.ease(r);return Math.ceil(i)},eH=xd.durationDampening.accelerateAt,tH=xd.durationDampening.stopDampeningAt,aCe=function(e,t){var n=t,r=tH,i=Date.now(),o=i-n;if(o>=tH)return e;if(ot.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},uCe=pJ(function(e){return e===0?0:e}),GJ=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=rH({container:n,distanceToEdges:s,dragStartTime:t,axis:B4,shouldUseTimeDampening:o}),c=rH({container:n,distanceToEdges:s,dragStartTime:t,axis:bJ,shouldUseTimeDampening:o}),d=uCe({x:c,y:l});if(yd(d,bi))return null;var f=lCe({container:n,subject:r,proposedScroll:d});return f?yd(f,bi)?null:f:null},cCe=pJ(function(e){return e===0?0:e>0?1:-1}),V4=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=zi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return yd(s,bi)?null:s}}(),VJ=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=cCe(i),l=V4({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},X4=function(t,n){return VJ({current:t.scroll.current,max:t.scroll.max,change:n})},dCe=function(t,n){if(!X4(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return V4({current:i,max:r,change:n})},q4=function(t,n){var r=t.frame;return r?VJ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},fCe=function(t,n){var r=t.frame;return!r||!q4(t,n)?null:V4({current:r.scroll.current,max:r.scroll.max,change:n})},hCe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=GJ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&X4(t,s)?s:null},pCe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=GJ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&q4(t,l)?l:null},iH=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=hCe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=iCe({center:s,destination:Es(t.impact),droppables:t.dimensions.droppables});if(h){var p=pCe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},mCe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=z1(t),i=z1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;iH({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};iH({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},gCe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=zi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!q4(d,f))return f;var h=fCe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=xs(f,h);n(d.descriptor.id,p);var g=xs(f,p);return g},s=function(d,f,h){if(!d||!X4(f,h))return h;var p=dCe(f,h);if(!p)return r(h),null;var g=xs(h,p);r(g);var v=xs(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Es(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},vCe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=mCe({scrollWindow:n,scrollDroppable:t}),o=gCe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},dg="data-rbd",fg=function(){var e=dg+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Y$=function(){var e=dg+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),yCe=function(){var e=dg+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),oH={contextId:dg+"-scroll-container-context-id"},xCe=function(t){return function(n){return"["+n+'="'+t+'"]'}},Vy=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},bCe="pointer-events: none;",wCe=function(e){var t=xCe(e),n=function(){var l=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(fg.contextId),styles:{always:` @@ -440,10 +440,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}},s=[r,n,i,o];return{always:Vy(s,"always"),resting:Vy(s,"resting"),dragging:Vy(s,"dragging"),dropAnimating:Vy(s,"dropAnimating"),userCancel:Vy(s,"userCancel")}},Cs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,YD=function(){var t=document.querySelector("head");return t||He(!1),t},sH=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function _Ce(e,t){var n=xn(function(){return wCe(e)},[e]),r=O.useRef(null),i=O.useRef(null),o=xt(xi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Cs(function(){!r.current&&!i.current||He(!1);var h=sH(t),p=sH(t);return r.current=h,i.current=p,h.setAttribute(dg+"-always",e),p.setAttribute(dg+"-dynamic",e),YD().appendChild(h),YD().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),YD().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=xn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var VJ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function jT(e){return e instanceof VJ(e).HTMLElement}function SCe(e,t){var n="["+fg.contextId+'="'+e+'"]',r=pJ(document.querySelectorAll(n));if(!r.length)return null;var i=Ud(r,function(o){return o.getAttribute(fg.draggableId)===t});return!i||!jT(i)?null:i}function ECe(e){var t=O.useRef({}),n=O.useRef(null),r=O.useRef(null),i=O.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=SCe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(fg.draggableId)===p&&(n.current=p)},[]);Cs(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=xn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function CCe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return xE(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return xE(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function TCe(){var e=xn(CCe,[]);return O.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Y4=de.createContext(null),wE=function(){var e=document.body;return e||He(!1),e},ICe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},RCe=function(t){return"rbd-announcement-"+t};function ACe(e){var t=xn(function(){return RCe(e)},[e]),n=O.useRef(null);O.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),$(o.style,ICe),wE().appendChild(o),function(){setTimeout(function(){var c=wE();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var PCe=0,OCe={separator:"::"};function K4(e,t){return t===void 0&&(t=OCe),xn(function(){return""+e+t.separator+PCe++},[t.separator,e])}function MCe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function kCe(e){var t=e.contextId,n=e.text,r=K4("hidden-text",{separator:"-"}),i=xn(function(){return MCe({contextId:t,uniqueId:r})},[r,t]);return O.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",wE().appendChild(s),function(){var c=wE();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var HT=de.createContext(null);function XJ(e){var t=O.useRef(e);return O.useEffect(function(){t.current=e}),t}function DCe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var LCe=9,BCe=13,J4=27,qJ=32,NCe=33,$Ce=34,FCe=35,zCe=36,UCe=37,jCe=38,HCe=39,WCe=40,Uw,GCe=(Uw={},Uw[BCe]=!0,Uw[LCe]=!0,Uw),YJ=function(e){GCe[e.keyCode]&&e.preventDefault()},WT=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Ud(t,function(r){return"on"+r in document});return n||e}(),KJ=0,aH=5;function VCe(e,t){return Math.abs(t.x-e.x)>=aH||Math.abs(t.y-e.y)>=aH}var lH={type:"IDLE"};function XCe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===KJ){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(VCe(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===J4){s.preventDefault(),t();return}YJ(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:WT,fn:t}]}function qCe(e){var t=O.useRef(lH),n=O.useRef(vd),r=xn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===KJ&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=xn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=Ys(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=lH,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=XCe({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=Ys(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Cs(function(){return o(),function(){n.current()}},[o])}var Dp;function YCe(){}var KCe=(Dp={},Dp[$Ce]=!0,Dp[NCe]=!0,Dp[zCe]=!0,Dp[FCe]=!0,Dp);function JCe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===J4){o.preventDefault(),n();return}if(o.keyCode===qJ){o.preventDefault(),r();return}if(o.keyCode===WCe){o.preventDefault(),e.moveDown();return}if(o.keyCode===jCe){o.preventDefault(),e.moveUp();return}if(o.keyCode===HCe){o.preventDefault(),e.moveRight();return}if(o.keyCode===UCe){o.preventDefault(),e.moveLeft();return}if(KCe[o.keyCode]){o.preventDefault();return}YJ(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:WT,fn:n}]}function QCe(e){var t=O.useRef(YCe),n=xn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==qJ)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=Ys(window,JCe(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=Ys(window,[n],o)},[n]);Cs(function(){return r(),function(){t.current()}},[r])}var KD={type:"IDLE"},ZCe=120,eTe=.15;function tTe(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===J4&&i.preventDefault(),t()}},{eventName:WT,fn:t}]}function nTe(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=eTe;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:WT,fn:t}]}function rTe(e){var t=O.useRef(KD),n=O.useRef(vd),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=xn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=Ys(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(KD),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=Ys(window,nTe(v),g),S=Ys(window,tTe(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,ZCe);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Cs(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(KD))}},[r,s,i]),Cs(function(){var g=Ys(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var iTe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function JJ(e,t){if(t==null)return!1;var n=!!iTe[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:JJ(e,t.parentElement)}function oTe(e,t){var n=t.target;return jT(n)?JJ(e,n):!1}var sTe=function(e){return qa(e.getBoundingClientRect()).center};function aTe(e){return e instanceof VJ(e).Element}var lTe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Ud(t,function(r){return r in Element.prototype});return n||e}();function QJ(e,t){return e==null?null:e[lTe](t)?e:QJ(e.parentElement,t)}function uTe(e,t){return e.closest?e.closest(t):QJ(e,t)}function cTe(e){return"["+fg.contextId+'="'+e+'"]'}function dTe(e,t){var n=t.target;if(!aTe(n))return null;var r=cTe(e),i=uTe(n,r);return!i||!jT(i)?null:i}function fTe(e,t){var n=dTe(e,t);return n?n.getAttribute(fg.draggableId):null}function hTe(e,t){var n="["+Y$.contextId+'="'+e+'"]',r=pJ(document.querySelectorAll(n)),i=Ud(r,function(o){return o.getAttribute(Y$.id)===t});return!i||!jT(i)?null:i}function pTe(e){e.preventDefault()}function jw(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function ZJ(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!jJ(n.getState(),i))}function mTe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=ZJ({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=hTe(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&oTe(f,l))return null;var h=t.claim(s||vd),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(A,R){jw({expected:A,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(R())}var S=y.bind(null,"DRAGGING");function _(A){function R(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(R(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(lEe(A.liftActionArgs)),p="DRAGGING";function M(L,B){if(B===void 0&&(B={shouldBlockNextClick:!1}),A.cleanup(),B.shouldBlockNextClick){var H=Ys(window,[{eventName:"click",fn:pTe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}R(),r.dispatch(LJ({reason:L}))}return $({isActive:function(){return jw({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(B){return M("DROP",B)},cancel:function(B){return M("CANCEL",B)}},A.actions)}function b(A){var R=z1(function(L){S(function(){return DJ({client:L})})}),M=_({liftActionArgs:{id:o,clientSelection:A,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return $({},M,{move:R})}function x(){var A={moveUp:function(){return S(vEe)},moveRight:function(){return S(xEe)},moveDown:function(){return S(yEe)},moveLeft:function(){return S(bEe)}};return _({liftActionArgs:{id:o,clientSelection:sTe(f),movementMode:"SNAP"},cleanup:vd,actions:A})}function E(){var A=jw({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});A&&t.release()}var I={isActive:function(){return jw({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return I}var gTe=[qCe,QCe,rTe];function vTe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?gTe:[],i||[]),l=O.useState(function(){return DCe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Cs(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Cs(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return ZJ({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return mTe({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return fTe(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(U4()))},[l,n]),v=xt(l.isClaimed,[l]),y=xn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:l=C.jsx(dIe,{}),value:c,id:d,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,_]=O.useState(null),b=Pn(),x=E=>C.jsxs(Pt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(Pt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Pye,{})})}),e!==null&&O.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(Pt,{flexGrow:1,sx:{ml:e===null?2:0},children:O.cloneElement(l,{onDelete:()=>o(d??f),autoFocus:g,value:c,key:d??f,onValueChange:I=>i(d??f,I,s),onChange:I=>i(d??f,I.target.value,s),ref:I=>_(I)})}),C.jsxs(Pt,{display:"flex",alignItems:"center",children:[t&&C.jsx(ag,{color:"primary",edge:"end",onChange:(I,A)=>i(d??f,c,A),checked:s}),r&&C.jsx(ip,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(Oye,{})}),n&&C.jsx(ip,{onClick:()=>o(d??f),children:C.jsx(Aye,{})})]})]});return C.jsx(oIe,{index:f,draggableId:`${d}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(Pt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(The,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function pIe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function mIe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:l,autoFocus:c,getCategory:d,getOrder:f,onChange:h,extras:p}=e,g=fIe(),v=Pn(),[y,S]=O.useState(s),[_,b]=O.useState(-1);O.useEffect(()=>{const A=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(A)}},[s,S,v.transitions.duration.standard]);const x=ie.uniqBy([...y,...s],A=>A.id).map(A=>s.find(R=>A.id===R.id)??A).map((A,R)=>{const{enabled:M,element:L,value:B,id:H}=A??{};return{value:B,render:G=>C.jsx(hD,{in:!!s.find(U=>U.id===A.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(hIe,{...e,onDeleteItem:U=>{o(U),b(-1)},enabled:M,element:L,value:B,id:H,i:R,autoFocus:c||R===_,...G})}),key:H,in:!!s.find(G=>G.id===A.id)}}),E=ie.sortBy(x,A=>d==null?void 0:d(A.value),A=>f==null?void 0:f(A.value)).map(A=>({...A,render:R=>C.jsx(Pt,{children:A.render(R)},A.key)}));return C.jsx(_Te,{onDragEnd:A=>{if(!A.destination)return;const R=pIe(s,A.source.index,A.destination.index);h==null||h(R),S(R)},children:C.jsxs(sg,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(Rfe,{disableSticky:!0,children:[n&&C.jsx(qt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(qt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(Pt,{mt:d?-1:0,children:C.jsx(oQ,{droppableId:"list",children:A=>C.jsxs("div",{...A.droppableProps,ref:A.innerRef,children:[(()=>{const R=[];return E.forEach((M,L)=>{d&&I(E,L,M)&&R.push(C.jsx(hD,{in:s.some(B=>d(B.value)===d(M.value)),appear:!0,children:C.jsx(Pt,{pl:2,pb:2,pt:1,children:C.jsx(qt,{variant:"overline",color:"text.secondary",children:d(M.value)})})},d(M.value))),R.push(M.render())}),R})(),A.placeholder]})})}),C.jsx(hD,{in:!(s!=null&&s.length),children:C.jsx(Pt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(qt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(Pt,{p:2,mb:-3,children:[C.jsx(pc,{disableElevation:!0,variant:"contained",startIcon:C.jsx(bye,{}),color:"primary",onClick:()=>{i(),b(s.length)},children:t}),p]})]})});function I(A,R,M){return!!(d&&(A[R-1]===void 0||d(A[R-1].value)!==d(M.value)))}}function GT({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=O.useState(t??[]);function l(c){s(c),e==null||e(c)}return O.useEffect(()=>{s(t)},[t]),C.jsx(Pt,{sx:{ml:-2},children:C.jsx(mIe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>l==null?void 0:l([...o,{key:js(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ie.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ie.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ie.map(c,d=>d.value))})})}const Gc=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],gIe=["any","source","destination","expanding","generating","closing"];function vIe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(wn,{children:[C.jsx(qx,{placeholder:"Event",sx:{minWidth:160},items:ie.map(gIe,s=>({value:s,label:ie.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(wc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(qx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ie.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[ie.last(s.split(".")),C.jsx(Yr,{}),C.jsx(qt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(Yr,{}),C.jsx(qx,{placeholder:"Condition",items:Gc.map(s=>({value:s.key,label:ie.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=Gc==null?void 0:Gc[0])==null?void 0:o.key),onChange:s=>r({condition:ie.find(Gc,{key:s})})}),C.jsx(Yr,{}),C.jsx(Cb,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(Yr,{sx:{px:2}}),C.jsx(j$,{checked:!!e.active,onChange:(s,l)=>r({active:l})})]})}const yIe=["f","g"],xIe=["variables"];function bIe(){const[{breakpoints:e=[]},t]=ua(),n=ie.uniq([...yIe,...ie.flatMap(xIe,r=>ie.flatMap([],i=>ie.map(ie.keys(ie.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(Pt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(Pt,{sx:{minWidth:720,mb:2},children:C.jsx(GT,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(vIe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:Gc==null?void 0:Gc[0],type:void 0,reference:0}),onChange:ie.debounce(r=>t({breakpoints:r}),1e3),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function wIe(){const{controls:e,onChange:t,state:n}=zd(),[{monotonicF:r,monotonicG:i},o]=ua(),[s,l]=O.useState("standard");function c(d){return C.jsx(qt,{variant:"overline",color:"text.secondary",children:d})}return C.jsx(FK,{value:s,children:C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Options,{children:C.jsxs(HK,{onChange:(d,f)=>l(f),children:[C.jsx(mm,{label:"Standard",value:"standard"}),C.jsx(mm,{label:"Advanced",value:"advanced"})]})}),C.jsxs(Ln.Content,{children:[C.jsx(Pt,{overflow:"auto",height:"100%",children:C.jsxs(Pt,{pt:6,height:"100%",children:[C.jsxs(xm,{value:"standard",children:[C.jsxs(Pt,{children:[c("General"),C.jsxs(wn,{children:[C.jsx(j$,{label:"Monotonic f value",checked:!!r,onChange:(d,f)=>o({monotonicF:f})}),C.jsx(Yr,{}),C.jsx(j$,{label:"Monotonic g value",checked:!!i,onChange:(d,f)=>o({monotonicG:f})})]})]}),C.jsx(Yr,{}),C.jsxs(Pt,{children:[c("Breakpoints"),C.jsx(bIe,{})]}),C.jsxs(Pt,{children:[c("Export"),C.jsx(wn,{mt:1})]})]}),C.jsx(xm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(t_e,{})})]})})," "]}),C.jsx(Ln.Extras,{children:e})]})})}function Lh({label:e,icon:t=C.jsx(Yye,{}),...n}){return C.jsxs(wn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",vertical:!0,pt:6,...n,children:[O.cloneElement(t,{sx:{mb:2},fontSize:"large"}),e]})}function pH(){const{controls:e,onChange:t,state:n}=zd(),[r]=XY();return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,children:r.length?C.jsx(kT,{y:!0,children:C.jsx(sg,{sx:{pt:6},children:ie.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Vx,{children:C.jsx(Dl,{primary:i.content,secondary:i.timestamp})}),C.jsx(wc,{})]},o))})}):C.jsx(Lh,{pt:6,label:"Logs",icon:C.jsx(UY,{})})})}),C.jsx(Ln.Extras,{children:e})]})}var sQ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Xt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=G&&(F+=B.value),B.mode==="max"&&U<=G&&(F+=B.value),D[z]||(D[z]=""),F&&(" "+D[z]+" ").indexOf(" "+F+" ")===-1&&(D[z]+=" "+F));for(var W in V)V.hasOwnProperty(W)&&(D[V[W]]?this.element.setAttribute(V[W],D[V[W]].substr(1)):this.element.removeAttribute(V[W]))}}function p(R,M){R.elementQueriesSetupInformation||(R.elementQueriesSetupInformation=new h(R,M)),R.elementQueriesSensor||(R.elementQueriesSensor=new n(R,function(){R.elementQueriesSetupInformation.call()}))}function g(R,M,L,B){if(typeof s[R]>"u"){s[R]=[];var H=l.length;o.innerHTML+=` + `}},s=[r,n,i,o];return{always:Vy(s,"always"),resting:Vy(s,"resting"),dragging:Vy(s,"dragging"),dropAnimating:Vy(s,"dropAnimating"),userCancel:Vy(s,"userCancel")}},Cs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,YD=function(){var t=document.querySelector("head");return t||He(!1),t},sH=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function _Ce(e,t){var n=xn(function(){return wCe(e)},[e]),r=O.useRef(null),i=O.useRef(null),o=xt(xi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Cs(function(){!r.current&&!i.current||He(!1);var h=sH(t),p=sH(t);return r.current=h,i.current=p,h.setAttribute(dg+"-always",e),p.setAttribute(dg+"-dynamic",e),YD().appendChild(h),YD().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),YD().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=xn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var XJ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function jT(e){return e instanceof XJ(e).HTMLElement}function SCe(e,t){var n="["+fg.contextId+'="'+e+'"]',r=mJ(document.querySelectorAll(n));if(!r.length)return null;var i=Ud(r,function(o){return o.getAttribute(fg.draggableId)===t});return!i||!jT(i)?null:i}function ECe(e){var t=O.useRef({}),n=O.useRef(null),r=O.useRef(null),i=O.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=SCe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(fg.draggableId)===p&&(n.current=p)},[]);Cs(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=xn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function CCe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return xE(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return xE(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function TCe(){var e=xn(CCe,[]);return O.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Y4=de.createContext(null),wE=function(){var e=document.body;return e||He(!1),e},ICe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},RCe=function(t){return"rbd-announcement-"+t};function ACe(e){var t=xn(function(){return RCe(e)},[e]),n=O.useRef(null);O.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),$(o.style,ICe),wE().appendChild(o),function(){setTimeout(function(){var c=wE();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var PCe=0,OCe={separator:"::"};function K4(e,t){return t===void 0&&(t=OCe),xn(function(){return""+e+t.separator+PCe++},[t.separator,e])}function MCe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function kCe(e){var t=e.contextId,n=e.text,r=K4("hidden-text",{separator:"-"}),i=xn(function(){return MCe({contextId:t,uniqueId:r})},[r,t]);return O.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",wE().appendChild(s),function(){var c=wE();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var HT=de.createContext(null);function qJ(e){var t=O.useRef(e);return O.useEffect(function(){t.current=e}),t}function DCe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var LCe=9,BCe=13,J4=27,YJ=32,NCe=33,$Ce=34,FCe=35,zCe=36,UCe=37,jCe=38,HCe=39,WCe=40,Uw,GCe=(Uw={},Uw[BCe]=!0,Uw[LCe]=!0,Uw),KJ=function(e){GCe[e.keyCode]&&e.preventDefault()},WT=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Ud(t,function(r){return"on"+r in document});return n||e}(),JJ=0,aH=5;function VCe(e,t){return Math.abs(t.x-e.x)>=aH||Math.abs(t.y-e.y)>=aH}var lH={type:"IDLE"};function XCe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===JJ){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(VCe(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===J4){s.preventDefault(),t();return}KJ(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:WT,fn:t}]}function qCe(e){var t=O.useRef(lH),n=O.useRef(vd),r=xn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===JJ&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=xn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=Ys(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=lH,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=XCe({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=Ys(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Cs(function(){return o(),function(){n.current()}},[o])}var Dp;function YCe(){}var KCe=(Dp={},Dp[$Ce]=!0,Dp[NCe]=!0,Dp[zCe]=!0,Dp[FCe]=!0,Dp);function JCe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===J4){o.preventDefault(),n();return}if(o.keyCode===YJ){o.preventDefault(),r();return}if(o.keyCode===WCe){o.preventDefault(),e.moveDown();return}if(o.keyCode===jCe){o.preventDefault(),e.moveUp();return}if(o.keyCode===HCe){o.preventDefault(),e.moveRight();return}if(o.keyCode===UCe){o.preventDefault(),e.moveLeft();return}if(KCe[o.keyCode]){o.preventDefault();return}KJ(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:WT,fn:n}]}function QCe(e){var t=O.useRef(YCe),n=xn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==YJ)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=Ys(window,JCe(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=Ys(window,[n],o)},[n]);Cs(function(){return r(),function(){t.current()}},[r])}var KD={type:"IDLE"},ZCe=120,eTe=.15;function tTe(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===J4&&i.preventDefault(),t()}},{eventName:WT,fn:t}]}function nTe(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=eTe;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:WT,fn:t}]}function rTe(e){var t=O.useRef(KD),n=O.useRef(vd),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=xn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=Ys(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(KD),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=Ys(window,nTe(v),g),S=Ys(window,tTe(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,ZCe);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Cs(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(KD))}},[r,s,i]),Cs(function(){var g=Ys(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var iTe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function QJ(e,t){if(t==null)return!1;var n=!!iTe[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:QJ(e,t.parentElement)}function oTe(e,t){var n=t.target;return jT(n)?QJ(e,n):!1}var sTe=function(e){return qa(e.getBoundingClientRect()).center};function aTe(e){return e instanceof XJ(e).Element}var lTe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Ud(t,function(r){return r in Element.prototype});return n||e}();function ZJ(e,t){return e==null?null:e[lTe](t)?e:ZJ(e.parentElement,t)}function uTe(e,t){return e.closest?e.closest(t):ZJ(e,t)}function cTe(e){return"["+fg.contextId+'="'+e+'"]'}function dTe(e,t){var n=t.target;if(!aTe(n))return null;var r=cTe(e),i=uTe(n,r);return!i||!jT(i)?null:i}function fTe(e,t){var n=dTe(e,t);return n?n.getAttribute(fg.draggableId):null}function hTe(e,t){var n="["+Y$.contextId+'="'+e+'"]',r=mJ(document.querySelectorAll(n)),i=Ud(r,function(o){return o.getAttribute(Y$.id)===t});return!i||!jT(i)?null:i}function pTe(e){e.preventDefault()}function jw(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function eQ(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!HJ(n.getState(),i))}function mTe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=eQ({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=hTe(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&oTe(f,l))return null;var h=t.claim(s||vd),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(A,R){jw({expected:A,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(R())}var S=y.bind(null,"DRAGGING");function _(A){function R(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(R(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(lEe(A.liftActionArgs)),p="DRAGGING";function M(L,B){if(B===void 0&&(B={shouldBlockNextClick:!1}),A.cleanup(),B.shouldBlockNextClick){var H=Ys(window,[{eventName:"click",fn:pTe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}R(),r.dispatch(BJ({reason:L}))}return $({isActive:function(){return jw({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(B){return M("DROP",B)},cancel:function(B){return M("CANCEL",B)}},A.actions)}function b(A){var R=z1(function(L){S(function(){return LJ({client:L})})}),M=_({liftActionArgs:{id:o,clientSelection:A,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return $({},M,{move:R})}function x(){var A={moveUp:function(){return S(vEe)},moveRight:function(){return S(xEe)},moveDown:function(){return S(yEe)},moveLeft:function(){return S(bEe)}};return _({liftActionArgs:{id:o,clientSelection:sTe(f),movementMode:"SNAP"},cleanup:vd,actions:A})}function E(){var A=jw({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});A&&t.release()}var I={isActive:function(){return jw({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return I}var gTe=[qCe,QCe,rTe];function vTe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?gTe:[],i||[]),l=O.useState(function(){return DCe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Cs(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Cs(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return eQ({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return mTe({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return fTe(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(U4()))},[l,n]),v=xt(l.isClaimed,[l]),y=xn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:l=C.jsx(dIe,{}),value:c,id:d,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,_]=O.useState(null),b=Pn(),x=E=>C.jsxs(Pt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(Pt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Oye,{})})}),e!==null&&O.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(Pt,{flexGrow:1,sx:{ml:e===null?2:0},children:O.cloneElement(l,{onDelete:()=>o(d??f),autoFocus:g,value:c,key:d??f,onValueChange:I=>i(d??f,I,s),onChange:I=>i(d??f,I.target.value,s),ref:I=>_(I)})}),C.jsxs(Pt,{display:"flex",alignItems:"center",children:[t&&C.jsx(ag,{color:"primary",edge:"end",onChange:(I,A)=>i(d??f,c,A),checked:s}),r&&C.jsx(ip,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(Mye,{})}),n&&C.jsx(ip,{onClick:()=>o(d??f),children:C.jsx(Pye,{})})]})]});return C.jsx(oIe,{index:f,draggableId:`${d}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(Pt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(Ihe,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function pIe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function mIe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:l,autoFocus:c,getCategory:d,getOrder:f,onChange:h,extras:p}=e,g=fIe(),v=Pn(),[y,S]=O.useState(s),[_,b]=O.useState(-1);O.useEffect(()=>{const A=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(A)}},[s,S,v.transitions.duration.standard]);const x=ie.uniqBy([...y,...s],A=>A.id).map(A=>s.find(R=>A.id===R.id)??A).map((A,R)=>{const{enabled:M,element:L,value:B,id:H}=A??{};return{value:B,render:G=>C.jsx(hD,{in:!!s.find(U=>U.id===A.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(hIe,{...e,onDeleteItem:U=>{o(U),b(-1)},enabled:M,element:L,value:B,id:H,i:R,autoFocus:c||R===_,...G})}),key:H,in:!!s.find(G=>G.id===A.id)}}),E=ie.sortBy(x,A=>d==null?void 0:d(A.value),A=>f==null?void 0:f(A.value)).map(A=>({...A,render:R=>C.jsx(Pt,{children:A.render(R)},A.key)}));return C.jsx(_Te,{onDragEnd:A=>{if(!A.destination)return;const R=pIe(s,A.source.index,A.destination.index);h==null||h(R),S(R)},children:C.jsxs(sg,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(Afe,{disableSticky:!0,children:[n&&C.jsx(qt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(qt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(Pt,{mt:d?-1:0,children:C.jsx(sQ,{droppableId:"list",children:A=>C.jsxs("div",{...A.droppableProps,ref:A.innerRef,children:[(()=>{const R=[];return E.forEach((M,L)=>{d&&I(E,L,M)&&R.push(C.jsx(hD,{in:s.some(B=>d(B.value)===d(M.value)),appear:!0,children:C.jsx(Pt,{pl:2,pb:2,pt:1,children:C.jsx(qt,{variant:"overline",color:"text.secondary",children:d(M.value)})})},d(M.value))),R.push(M.render())}),R})(),A.placeholder]})})}),C.jsx(hD,{in:!(s!=null&&s.length),children:C.jsx(Pt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(qt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(Pt,{p:2,mb:-3,children:[C.jsx(pc,{disableElevation:!0,variant:"contained",startIcon:C.jsx(wye,{}),color:"primary",onClick:()=>{i(),b(s.length)},children:t}),p]})]})});function I(A,R,M){return!!(d&&(A[R-1]===void 0||d(A[R-1].value)!==d(M.value)))}}function GT({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=O.useState(t??[]);function l(c){s(c),e==null||e(c)}return O.useEffect(()=>{s(t)},[t]),C.jsx(Pt,{sx:{ml:-2},children:C.jsx(mIe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>l==null?void 0:l([...o,{key:js(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ie.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ie.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ie.map(c,d=>d.value))})})}const Gc=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],gIe=["any","source","destination","expanding","generating","closing"];function vIe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(wn,{children:[C.jsx(qx,{placeholder:"Event",sx:{minWidth:160},items:ie.map(gIe,s=>({value:s,label:ie.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(wc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(qx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ie.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[ie.last(s.split(".")),C.jsx(Yr,{}),C.jsx(qt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(Yr,{}),C.jsx(qx,{placeholder:"Condition",items:Gc.map(s=>({value:s.key,label:ie.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=Gc==null?void 0:Gc[0])==null?void 0:o.key),onChange:s=>r({condition:ie.find(Gc,{key:s})})}),C.jsx(Yr,{}),C.jsx(Cb,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(Yr,{sx:{px:2}}),C.jsx(j$,{checked:!!e.active,onChange:(s,l)=>r({active:l})})]})}const yIe=["f","g"],xIe=["variables"];function bIe(){const[{breakpoints:e=[]},t]=ua(),n=ie.uniq([...yIe,...ie.flatMap(xIe,r=>ie.flatMap([],i=>ie.map(ie.keys(ie.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(Pt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(Pt,{sx:{minWidth:720,mb:2},children:C.jsx(GT,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(vIe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:Gc==null?void 0:Gc[0],type:void 0,reference:0}),onChange:ie.debounce(r=>t({breakpoints:r}),1e3),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function wIe(){const{controls:e,onChange:t,state:n}=zd(),[{monotonicF:r,monotonicG:i},o]=ua(),[s,l]=O.useState("standard");function c(d){return C.jsx(qt,{variant:"overline",color:"text.secondary",children:d})}return C.jsx(zK,{value:s,children:C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Options,{children:C.jsxs(WK,{onChange:(d,f)=>l(f),children:[C.jsx(mm,{label:"Standard",value:"standard"}),C.jsx(mm,{label:"Advanced",value:"advanced"})]})}),C.jsxs(Ln.Content,{children:[C.jsx(Pt,{overflow:"auto",height:"100%",children:C.jsxs(Pt,{pt:6,height:"100%",children:[C.jsxs(xm,{value:"standard",children:[C.jsxs(Pt,{children:[c("General"),C.jsxs(wn,{children:[C.jsx(j$,{label:"Monotonic f value",checked:!!r,onChange:(d,f)=>o({monotonicF:f})}),C.jsx(Yr,{}),C.jsx(j$,{label:"Monotonic g value",checked:!!i,onChange:(d,f)=>o({monotonicG:f})})]})]}),C.jsx(Yr,{}),C.jsxs(Pt,{children:[c("Breakpoints"),C.jsx(bIe,{})]}),C.jsxs(Pt,{children:[c("Export"),C.jsx(wn,{mt:1})]})]}),C.jsx(xm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(t_e,{})})]})})," "]}),C.jsx(Ln.Extras,{children:e})]})})}function Lh({label:e,icon:t=C.jsx(Yye,{}),...n}){return C.jsxs(wn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",vertical:!0,pt:6,...n,children:[O.cloneElement(t,{sx:{mb:2},fontSize:"large"}),e]})}function pH(){const{controls:e,onChange:t,state:n}=zd(),[r]=qY();return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,children:r.length?C.jsx(kT,{y:!0,children:C.jsx(sg,{sx:{pt:6},children:ie.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Vx,{children:C.jsx(Dl,{primary:i.content,secondary:i.timestamp})}),C.jsx(wc,{})]},o))})}):C.jsx(Lh,{pt:6,label:"Logs",icon:C.jsx(jY,{})})})}),C.jsx(Ln.Extras,{children:e})]})}var aQ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Xt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=G&&(F+=B.value),B.mode==="max"&&U<=G&&(F+=B.value),D[z]||(D[z]=""),F&&(" "+D[z]+" ").indexOf(" "+F+" ")===-1&&(D[z]+=" "+F));for(var W in V)V.hasOwnProperty(W)&&(D[V[W]]?this.element.setAttribute(V[W],D[V[W]].substr(1)):this.element.removeAttribute(V[W]))}}function p(R,M){R.elementQueriesSetupInformation||(R.elementQueriesSetupInformation=new h(R,M)),R.elementQueriesSensor||(R.elementQueriesSensor=new n(R,function(){R.elementQueriesSetupInformation.call()}))}function g(R,M,L,B){if(typeof s[R]>"u"){s[R]=[];var H=l.length;o.innerHTML+=` `+R+" {animation: 0.1s element-queries;}",o.innerHTML+=` `+R+" > .resize-sensor {min-width: "+H+"px;}",l.push(R)}s[R].push({mode:M,property:L,value:B})}function v(R){var M;if(document.querySelectorAll&&(M=R?R.querySelectorAll.bind(R):document.querySelectorAll.bind(document)),!M&&typeof $$<"u"&&(M=$$),!M&&typeof jQuery<"u"&&(M=jQuery),!M)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return M}function y(R){var M=v(R);for(var L in s)if(s.hasOwnProperty(L))for(var B=M(L,R),H=0,G=B.length;HL[Y].minWidth&&(K=Y);if(K||(K=H),G!==K)if(U[K])M[G].style.display="none",M[K].style.display="block",G=K;else{var Q=new Image;Q.onload=function(){M[K].src=B[K],M[G].style.display="none",M[K].style.display="block",U[K]=!0,G=K},Q.src=B[K]}else M[K].src=B[K]}R.resizeSensorInstance=new n(R,W),W()}function _(){for(var R=v(),M=R("[data-responsive-image],[responsive-image]"),L=0,B=M.length;L img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",o.innerHTML+=` -@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(o),A=!0);for(var M=0,L=document.styleSheets.length;M{if(r&&t)return r.addEventListener("scroll",t,{passive:!0}),()=>r.removeEventListener("scroll",t)},[r,t]),C.jsx("div",{...n,style:{height:"100%",width:"100%",overflow:"hidden scroll",...n.style},ref:o=>{i(o),e==null||e(o)},children:C.jsx(uQ.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const uQ=O.createContext(null);function CIe(){return O.useContext(uQ)}function TIe(e=128){const[t,n]=O.useState(!0),[r,i]=O.useState(!0),[o,s]=O.useState(!0),[l,c]=O.useState(null),d=O.useRef(0);return O.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function Z4({children:e}){return C.jsx(qt,{variant:"h6",children:e})}function IIe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=CIe(),d=Pn(),[,,f,,h]=TIe();O.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(_ce,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(U0e,{children:[C.jsx(ip,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(wye,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(sp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(Pt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(sp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(Pt,{style:{width:"100%"},children:o})})})]})})}function RIe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var I;const[c,d]=O.useState(void 0);O.useEffect(()=>{e&&d(e)},[e]);const f=Pn(),h=I4(),[p,g]=O.useState(null),[v,y]=O.useState(null),[S,_]=O.useState(!1),[b,x]=O.useState(0);O.useEffect(()=>{if(p&&v&&!h&&!r){const A=()=>{const M=window.innerHeight-64{window.removeEventListener("resize",A),R.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(_pe,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:A=>g(A),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(I=l.PaperProps)==null?void 0:I.style},...l.PaperProps},children:[C.jsx(EIe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:A=>y(A),style:{width:"100%",height:"100%"},children:c})}),t]})}function ez({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(Bg,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[O.cloneElement(n(i)),C.jsxs(RIe,{open:s,onClose:o,...e,children:[C.jsx(IIe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const AIe=({label:e})=>C.jsx(qt,{variant:"body1",children:e}),G1=({label:e,content:t})=>C.jsxs(wn,{alignItems:"center",children:[C.jsx(AIe,{label:e}),C.jsx(Yr,{flex:1}),t]});let cQ=class extends Error{},PIe=class extends cQ{},OIe=class extends cQ{};const MIe=(e,t=",")=>e.join(t),kIe={accept:"*",multiple:!1,strict:!1},dQ=e=>{const{accept:t,multiple:n,strict:r}={...kIe,...e},i=BIe({multiple:n,accept:Array.isArray(t)?MIe(t):t});return new Promise(o=>{i.onchange=()=>{o(DIe(i.files,n,r)),i.remove()},i.click()})},DIe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new PIe);const o=LIe(e,t,n);if(!o)return i(new OIe);r(o)}),LIe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,BIe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n};function Qx(e){return e.split(".").pop()}function fQ(e){return e.split(".").shift()}const mH="internal/custom",J$="json",Q$=e=>({name:(e==null?void 0:e.id)===mH?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:mH}),NIe=e=>({name:(e==null?void 0:e.type)===J$?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:J$}),gH="json";async function $Ie(){const e=await dQ({accept:[`.${gH}`],strict:!0});if(e)return async()=>{if(Qx(e.name)===gH){const t=await e.text(),n=JSON.parse(t);return{...NIe(),format:n==null?void 0:n.format,content:n,name:ie.startCase(fQ(e.name)),type:J$}}else throw new Error(`The format (${Qx(e.name)}) is unsupported.`)}}async function FIe(e){const t=await dQ({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return async()=>{if(ie.find(e,{id:Qx(t.name)}))return{...Q$(),format:Qx(t.name),content:await t.text(),name:ie.startCase(fQ(t.name))};throw new Error(`The format (${Qx(t.name)}) is unsupported.`)}}const[hg,zIe]=Gl([],{reduce:VY}),[SE,UIe]=Gl({algorithms:[],maps:[],formats:[]}),[VT,jIe]=Gl({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>sc(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function HIe(){const[e]=VT();return ie.some(ie.values(e))}function xp(e){const[,t]=VT();return O.useCallback(async n=>{t({action:"start",key:e});const r=await n();return t({action:"end",key:e}),r},[e,t])}function WIe({onChange:e,value:t}){const n=_c(),r=xp("specimen"),[i]=hg(),[{maps:o,formats:s}]=SE();return C.jsx(Ss,{showArrow:!0,label:"Choose Map",value:t==null?void 0:t.id,items:[Q$(t),...o.map(l=>{var c;return{...l,description:(c=ie.find(i,{url:l.source}))==null?void 0:c.name}})],onChange:async l=>{switch(l){case Q$().id:try{const c=await FIe(s);c&&r(async()=>{n("Reading map..."),e==null||e(await c())})}catch(c){n(`${c}`)}break;default:e==null||e(ie.find(o,{id:l}));break}}})}function GIe({onChange:e,value:t}){const n=_c(),r=xp("specimen");return C.jsx(pc,{startIcon:C.jsx(kye,{}),onClick:async()=>{try{const i=await $Ie();i&&r(async()=>{n("Reading trace...");const o=await i();o&&(e==null||e(o))})}catch(i){n(`${i}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Upload Search Trace"})}const xx="500";function VIe(e){return parseInt(e.replace("#","0x"))}const XT={source:Bc.A400,destination:Dc.A400,updating:Rh[xx],expanding:uV[xx],generating:cV[xx],closing:lV[xx],end:Lc.A400};ie.mapValues(XT,VIe);function V1(e){return(e&&XT[e])??P3[xx]}function XIe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function qIe(){return this.eachAfter(XIe)}function YIe(e){var t=this,n,r=[t],i,o,s;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,s=i.length;o=0;--i)n.push(r[i]);return this}function JIe(e){for(var t=this,n=[t],r=[],i,o,s;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,s=i.length;o=0;)n+=r[i].value;t.value=n})}function ZIe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function eRe(e){for(var t=this,n=tRe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function tRe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function nRe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function rRe(){var e=[];return this.each(function(t){e.push(t)}),e}function iRe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function oRe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function tz(e,t){var n=new X1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=aRe);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new X1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(uRe)}function sRe(){return tz(this).eachBefore(lRe)}function aRe(e){return e.children}function lRe(e){e.data=e.data.data}function uRe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function X1(e){this.data=e,this.depth=this.height=0,this.parent=null}X1.prototype=tz.prototype={constructor:X1,count:qIe,each:YIe,eachAfter:JIe,eachBefore:KIe,sum:QIe,sort:ZIe,path:eRe,ancestors:nRe,descendants:rRe,leaves:iRe,links:oRe,copy:sRe};function cRe(e,t){return e.parent===t.parent?1:2}function ZD(e){var t=e.children;return t?t[0]:e.t}function eL(e){var t=e.children;return t?t[t.length-1]:e.t}function dRe(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function fRe(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function hRe(e,t,n){return e.a.parent===t.parent?e.a:n}function oS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}oS.prototype=Object.create(X1.prototype);function pRe(e){for(var t=new oS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new oS(o[s],s)),i.parent=n;return(t.parent=new oS(null,0)).children=[t],t}function mRe(){var e=cRe,t=1,n=1,r=null;function i(d){var f=pRe(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){fRe(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=eL(v),p=ZD(p),v&&p;)y=ZD(y),g=eL(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(dRe(hRe(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!eL(g)&&(g.t=v,g.m+=b-_),p&&!ZD(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var Z$="http://www.w3.org/1999/xhtml";const vH={svg:"http://www.w3.org/2000/svg",xhtml:Z$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qT(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vH.hasOwnProperty(t)?{space:vH[t],local:e}:e}function gRe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Z$&&t.documentElement.namespaceURI===Z$?t.createElement(e):t.createElementNS(n,e)}}function vRe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hQ(e){var t=qT(e);return(t.local?vRe:gRe)(t)}function yRe(){}function nz(e){return e==null?yRe:function(){return this.querySelector(e)}}function xRe(e){typeof e!="function"&&(e=nz(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(I=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function WRe(e){e||(e=GRe);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function VRe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function XRe(){return Array.from(this)}function qRe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?oAe:typeof t=="function"?aAe:sAe)(e,t,n??"")):pg(this.node(),e)}function pg(e,t){return e.style.getPropertyValue(t)||yQ(e).getComputedStyle(e,null).getPropertyValue(t)}function uAe(e){return function(){delete this[e]}}function cAe(e,t){return function(){this[e]=t}}function dAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function fAe(e,t){return arguments.length>1?this.each((t==null?uAe:typeof t=="function"?dAe:cAe)(e,t)):this.node()[e]}function xQ(e){return e.trim().split(/^|\s+/)}function rz(e){return e.classList||new bQ(e)}function bQ(e){this._node=e,this._names=xQ(e.getAttribute("class")||"")}bQ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function wQ(e,t){for(var n=rz(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function zAe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function iz(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}sS.prototype=iz.prototype={constructor:sS,on:function(e,t){var n=this._,r=KAe(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ww(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ww(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tPe.exec(e))?new Lo(t[1],t[2],t[3],1):(t=nPe.exec(e))?new Lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=rPe.exec(e))?Ww(t[1],t[2],t[3],t[4]):(t=iPe.exec(e))?Ww(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oPe.exec(e))?CH(t[1],t[2]/100,t[3]/100,1):(t=sPe.exec(e))?CH(t[1],t[2]/100,t[3]/100,t[4]):xH.hasOwnProperty(e)?_H(xH[e]):e==="transparent"?new Lo(NaN,NaN,NaN,0):null}function _H(e){return new Lo(e>>16&255,e>>8&255,e&255,1)}function Ww(e,t,n,r){return r<=0&&(e=t=n=NaN),new Lo(e,t,n,r)}function uPe(e){return e instanceof Ub||(e=K1(e)),e?(e=e.rgb(),new Lo(e.r,e.g,e.b,e.opacity)):new Lo}function nF(e,t,n,r){return arguments.length===1?uPe(e):new Lo(e,t,n,r??1)}function Lo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}oz(Lo,nF,CQ(Ub,{brighter(e){return e=e==null?CE:Math.pow(CE,e),new Lo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?q1:Math.pow(q1,e),new Lo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lo(Gh(this.r),Gh(this.g),Gh(this.b),TE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:SH,formatHex:SH,formatHex8:cPe,formatRgb:EH,toString:EH}));function SH(){return`#${Bh(this.r)}${Bh(this.g)}${Bh(this.b)}`}function cPe(){return`#${Bh(this.r)}${Bh(this.g)}${Bh(this.b)}${Bh((isNaN(this.opacity)?1:this.opacity)*255)}`}function EH(){const e=TE(this.opacity);return`${e===1?"rgb(":"rgba("}${Gh(this.r)}, ${Gh(this.g)}, ${Gh(this.b)}${e===1?")":`, ${e})`}`}function TE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bh(e){return e=Gh(e),(e<16?"0":"")+e.toString(16)}function CH(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Va(e,t,n,r)}function TQ(e){if(e instanceof Va)return new Va(e.h,e.s,e.l,e.opacity);if(e instanceof Ub||(e=K1(e)),!e)return new Va;if(e instanceof Va)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new Va(s,l,c,e.opacity)}function dPe(e,t,n,r){return arguments.length===1?TQ(e):new Va(e,t,n,r??1)}function Va(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}oz(Va,dPe,CQ(Ub,{brighter(e){return e=e==null?CE:Math.pow(CE,e),new Va(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?q1:Math.pow(q1,e),new Va(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Lo(tL(e>=240?e-240:e+120,i,r),tL(e,i,r),tL(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Va(TH(this.h),Gw(this.s),Gw(this.l),TE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=TE(this.opacity);return`${e===1?"hsl(":"hsla("}${TH(this.h)}, ${Gw(this.s)*100}%, ${Gw(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TH(e){return e=(e||0)%360,e<0?e+360:e}function Gw(e){return Math.max(0,Math.min(1,e||0))}function tL(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const IQ=e=>()=>e;function fPe(e,t){return function(n){return e+n*t}}function hPe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function pPe(e){return(e=+e)==1?RQ:function(t,n){return n-t?hPe(t,n,e):IQ(isNaN(t)?n:t)}}function RQ(e,t){var n=t-e;return n?fPe(e,n):IQ(isNaN(e)?t:e)}const IH=function e(t){var n=pPe(t);function r(i,o){var s=n((i=nF(i)).r,(o=nF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=RQ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function Uc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var rF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nL=new RegExp(rF.source,"g");function mPe(e){return function(){return e}}function gPe(e){return function(t){return e(t)+""}}function vPe(e,t){var n=rF.lastIndex=nL.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=rF.exec(e))&&(i=nL.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Uc(r,i)})),n=nL.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Uc(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Uc(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:Uc(d,h)},{i:y-2,x:Uc(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--mg}function PH(){cp=(RE=J1.now())+YT,mg=bx=0;try{IPe()}finally{mg=0,APe(),cp=0}}function RPe(){var e=J1.now(),t=e-RE;t>OQ&&(YT-=t,RE=e)}function APe(){for(var e,t=IE,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:IE=n);wx=e,oF(r)}function oF(e){if(!mg){bx&&(bx=clearTimeout(bx));var t=e-cp;t>24?(e<1/0&&(bx=setTimeout(PH,e-J1.now()-YT)),qy&&(qy=clearInterval(qy))):(qy||(RE=J1.now(),qy=setInterval(RPe,OQ)),mg=1,MQ(PH))}}function OH(e,t,n){var r=new AE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var PPe=iz("start","end","cancel","interrupt"),OPe=[],DQ=0,MH=1,sF=2,aS=3,kH=4,aF=5,lS=6;function KT(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;MPe(e,n,{name:t,index:r,group:i,on:PPe,tween:OPe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:DQ})}function az(e,t){var n=ul(e,t);if(n.state>DQ)throw new Error("too late; already scheduled");return n}function Xl(e,t){var n=ul(e,t);if(n.state>aS)throw new Error("too late; already running");return n}function ul(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function MPe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=kQ(o,0,n.time);function o(d){n.state=MH,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==MH)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===aS)return OH(s);g.state===kH?(g.state=lS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fsF&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function l2e(e,t,n){var r,i,o=a2e(t)?az:Xl;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function u2e(e,t){var n=this._id;return arguments.length<2?ul(this.node(),n).on.on(e):this.each(l2e(n,e,t))}function c2e(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function d2e(){return this.on("end.remove",c2e(this._id))}function f2e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function N2e(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function tc(e,t,n){this.k=e,this.x=t,this.y=n}tc.prototype={constructor:tc,scale:function(e){return e===1?this:new tc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var PE=new tc(1,0,0);tc.prototype;function rL(e){e.stopImmediatePropagation()}function Yy(e){e.preventDefault(),e.stopImmediatePropagation()}function $2e(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function F2e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DH(){return this.__zoom||PE}function z2e(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function U2e(){return navigator.maxTouchPoints||"ontouchstart"in this}function j2e(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function iL(){var e=$2e,t=F2e,n=j2e,r=z2e,i=U2e,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=CPe,d=iz("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",DH).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,z,V){var W=D.selection?D.selection():D;W.property("__zoom",DH),D!==W?I(D,F,z,V):W.interrupt().each(function(){A(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,z,V){_.scaleTo(D,function(){var W=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return W*K},z,V)},_.scaleTo=function(D,F,z,V){_.transform(D,function(){var W=t.apply(this,arguments),K=this.__zoom,Y=z==null?E(W):typeof z=="function"?z.apply(this,arguments):z,Q=K.invert(Y),re=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,re),Y,Q),W,s)},z,V)},_.translateBy=function(D,F,z,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,z,V,W){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,Q=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(PE.translate(Q[0],Q[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),K,s)},V,W)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new tc(F,D.x,D.y)}function x(D,F,z){var V=F[0]-z[0]*D.k,W=F[1]-z[1]*D.k;return V===D.x&&W===D.y?D:new tc(D.k,V,W)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function I(D,F,z,V){D.on("start.zoom",function(){A(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(V).end()}).tween("zoom",function(){var W=this,K=arguments,Y=A(W,K).event(V),Q=t.apply(W,K),re=z==null?E(Q):typeof z=="function"?z.apply(W,K):z,ue=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),ce=W.__zoom,se=typeof F=="function"?F.apply(W,K):F,J=c(ce.invert(re).concat(ue/ce.k),se.invert(re).concat(ue/se.k));return function(ae){if(ae===1)ae=se;else{var le=J(ae),he=ue/le[2];ae=new tc(he,re[0]-le[0]*he,re[1]-le[1]*he)}Y.zoom(null,ae)}})}function A(D,F,z){return!z&&D.__zooming||new R(D,F)}function R(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}R.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,F){return this.mouse&&D!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var F=wo(this.that).datum();d.call(D,this.that,new N2e(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function M(D,...F){if(!e.apply(this,arguments))return;var z=A(this,F).event(D),V=this.__zoom,W=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=ch(D);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=V.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(V.k===W)return;z.mouse=[K,V.invert(K)],uS(this),z.start()}Yy(D),z.wheel=setTimeout(Y,v),z.zoom("mouse",n(x(b(V,W),z.mouse[0],z.mouse[1]),z.extent,s));function Y(){z.wheel=null,z.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var z=D.currentTarget,V=A(this,F,!0).event(D),W=wo(D.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",ue,!0),K=ch(D,z),Y=D.clientX,Q=D.clientY;QAe(D.view),rL(D),V.mouse=[K,this.__zoom.invert(K)],uS(this),V.start();function re(ce){if(Yy(ce),!V.moved){var se=ce.clientX-Y,J=ce.clientY-Q;V.moved=se*se+J*J>y}V.event(ce).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=ch(ce,z),V.mouse[1]),V.extent,s))}function ue(ce){W.on("mousemove.zoom mouseup.zoom",null),ZAe(ce.view,V.moved),Yy(ce),V.event(ce).end()}}function B(D,...F){if(e.apply(this,arguments)){var z=this.__zoom,V=ch(D.changedTouches?D.changedTouches[0]:D,this),W=z.invert(V),K=z.k*(D.shiftKey?.5:2),Y=n(x(b(z,K),V,W),t.apply(this,F),s);Yy(D),l>0?wo(this).transition().duration(l).call(I,Y,V,D):wo(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var z=D.touches,V=z.length,W=A(this,F,D.changedTouches.length===V).event(D),K,Y,Q,re;for(rL(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(I,A){if(I===null)return null;if(A===0)return I;var R,M;if(typeof I!="object")return I;if(n(I,r))R=new r;else if(n(I,i))R=new i;else if(n(I,o))R=new o(function(V,W){I.then(function(K){V(E(K,A-1))},function(K){W(E(K,A-1))})});else if(s.__isArray(I))R=[];else if(s.__isRegExp(I))R=new RegExp(I.source,h(I)),I.lastIndex&&(R.lastIndex=I.lastIndex);else if(s.__isDate(I))R=new Date(I.getTime());else{if(x&&Buffer.isBuffer(I))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(I.length):R=new Buffer(I.length),I.copy(R),R;n(I,Error)?R=Object.create(I):typeof y>"u"?(M=Object.getPrototypeOf(I),R=Object.create(M)):(R=Object.create(y),M=y)}if(g){var L=_.indexOf(I);if(L!=-1)return b[L];_.push(I),b.push(R)}n(I,r)&&I.forEach(function(V,W){var K=E(W,A-1),Y=E(V,A-1);R.set(K,Y)}),n(I,i)&&I.forEach(function(V){var W=E(V,A-1);R.add(W)});for(var B in I){var H;M&&(H=Object.getOwnPropertyDescriptor(M,B)),!(H&&H.set==null)&&(R[B]=E(I[B],A-1))}if(Object.getOwnPropertySymbols)for(var G=Object.getOwnPropertySymbols(I),B=0;B1&&arguments[1]!==void 0?arguments[1]:0,n=(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase();if(!X2e(n))throw TypeError("Stringified UUID is invalid");return n}function sL(e,t,n){e=e||{};var r=e.random||(e.rng||G2e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return q2e(r)}var lF={exports:{}},uF={exports:{}},Y2e=function(){for(var t=arguments.length,n=[],r=0;r{if(r&&t)return r.addEventListener("scroll",t,{passive:!0}),()=>r.removeEventListener("scroll",t)},[r,t]),C.jsx("div",{...n,style:{height:"100%",width:"100%",overflow:"hidden scroll",...n.style},ref:o=>{i(o),e==null||e(o)},children:C.jsx(cQ.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const cQ=O.createContext(null);function CIe(){return O.useContext(cQ)}function TIe(e=128){const[t,n]=O.useState(!0),[r,i]=O.useState(!0),[o,s]=O.useState(!0),[l,c]=O.useState(null),d=O.useRef(0);return O.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function Z4({children:e}){return C.jsx(qt,{variant:"h6",children:e})}function IIe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=CIe(),d=Pn(),[,,f,,h]=TIe();O.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(Sce,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(j0e,{children:[C.jsx(ip,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(_ye,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(sp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(Pt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(sp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(Pt,{style:{width:"100%"},children:o})})})]})})}function RIe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var I;const[c,d]=O.useState(void 0);O.useEffect(()=>{e&&d(e)},[e]);const f=Pn(),h=I4(),[p,g]=O.useState(null),[v,y]=O.useState(null),[S,_]=O.useState(!1),[b,x]=O.useState(0);O.useEffect(()=>{if(p&&v&&!h&&!r){const A=()=>{const M=window.innerHeight-64{window.removeEventListener("resize",A),R.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(Spe,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:A=>g(A),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(I=l.PaperProps)==null?void 0:I.style},...l.PaperProps},children:[C.jsx(EIe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:A=>y(A),style:{width:"100%",height:"100%"},children:c})}),t]})}function ez({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(Bg,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[O.cloneElement(n(i)),C.jsxs(RIe,{open:s,onClose:o,...e,children:[C.jsx(IIe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const AIe=({label:e})=>C.jsx(qt,{variant:"body1",children:e}),G1=({label:e,content:t})=>C.jsxs(wn,{alignItems:"center",children:[C.jsx(AIe,{label:e}),C.jsx(Yr,{flex:1}),t]});let dQ=class extends Error{},PIe=class extends dQ{},OIe=class extends dQ{};const MIe=(e,t=",")=>e.join(t),kIe={accept:"*",multiple:!1,strict:!1},fQ=e=>{const{accept:t,multiple:n,strict:r}={...kIe,...e},i=BIe({multiple:n,accept:Array.isArray(t)?MIe(t):t});return new Promise(o=>{i.onchange=()=>{o(DIe(i.files,n,r)),i.remove()},i.click()})},DIe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new PIe);const o=LIe(e,t,n);if(!o)return i(new OIe);r(o)}),LIe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,BIe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n};function Qx(e){return e.split(".").pop()}function hQ(e){return e.split(".").shift()}const mH="internal/custom",J$="json",Q$=e=>({name:(e==null?void 0:e.id)===mH?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:mH}),NIe=e=>({name:(e==null?void 0:e.type)===J$?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:J$}),gH="json";async function $Ie(){const e=await fQ({accept:[`.${gH}`],strict:!0});if(e)return async()=>{if(Qx(e.name)===gH){const t=await e.text(),n=JSON.parse(t);return{...NIe(),format:n==null?void 0:n.format,content:n,name:ie.startCase(hQ(e.name)),type:J$}}else throw new Error(`The format (${Qx(e.name)}) is unsupported.`)}}async function FIe(e){const t=await fQ({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return async()=>{if(ie.find(e,{id:Qx(t.name)}))return{...Q$(),format:Qx(t.name),content:await t.text(),name:ie.startCase(hQ(t.name))};throw new Error(`The format (${Qx(t.name)}) is unsupported.`)}}const[hg,zIe]=Gl([],{reduce:XY}),[SE,UIe]=Gl({algorithms:[],maps:[],formats:[]}),[VT,jIe]=Gl({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>sc(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function HIe(){const[e]=VT();return ie.some(ie.values(e))}function xp(e){const[,t]=VT();return O.useCallback(async n=>{t({action:"start",key:e});const r=await n();return t({action:"end",key:e}),r},[e,t])}function WIe({onChange:e,value:t}){const n=_c(),r=xp("specimen"),[i]=hg(),[{maps:o,formats:s}]=SE();return C.jsx(Ss,{showArrow:!0,icon:C.jsx(UY,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[Q$(t),...o.map(l=>{var c;return{...l,description:(c=ie.find(i,{url:l.source}))==null?void 0:c.name}})],onChange:async l=>{switch(l){case Q$().id:try{const c=await FIe(s);c&&r(async()=>{n("Reading map..."),e==null||e(await c())})}catch(c){n(`${c}`)}break;default:e==null||e(ie.find(o,{id:l}));break}}})}function GIe({onChange:e,value:t}){const n=_c(),r=xp("specimen");return C.jsx(pc,{startIcon:C.jsx(UY,{}),onClick:async()=>{try{const i=await $Ie();i&&r(async()=>{n("Reading trace...");const o=await i();o&&(e==null||e(o))})}catch(i){n(`${i}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Choose File"})}const xx="500";function VIe(e){return parseInt(e.replace("#","0x"))}const XT={source:Bc.A400,destination:Dc.A400,updating:Rh[xx],expanding:uV[xx],generating:cV[xx],closing:lV[xx],end:Lc.A400};ie.mapValues(XT,VIe);function V1(e){return(e&&XT[e])??P3[xx]}function XIe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function qIe(){return this.eachAfter(XIe)}function YIe(e){var t=this,n,r=[t],i,o,s;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,s=i.length;o=0;--i)n.push(r[i]);return this}function JIe(e){for(var t=this,n=[t],r=[],i,o,s;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,s=i.length;o=0;)n+=r[i].value;t.value=n})}function ZIe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function eRe(e){for(var t=this,n=tRe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function tRe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function nRe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function rRe(){var e=[];return this.each(function(t){e.push(t)}),e}function iRe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function oRe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function tz(e,t){var n=new X1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=aRe);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new X1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(uRe)}function sRe(){return tz(this).eachBefore(lRe)}function aRe(e){return e.children}function lRe(e){e.data=e.data.data}function uRe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function X1(e){this.data=e,this.depth=this.height=0,this.parent=null}X1.prototype=tz.prototype={constructor:X1,count:qIe,each:YIe,eachAfter:JIe,eachBefore:KIe,sum:QIe,sort:ZIe,path:eRe,ancestors:nRe,descendants:rRe,leaves:iRe,links:oRe,copy:sRe};function cRe(e,t){return e.parent===t.parent?1:2}function ZD(e){var t=e.children;return t?t[0]:e.t}function eL(e){var t=e.children;return t?t[t.length-1]:e.t}function dRe(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function fRe(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function hRe(e,t,n){return e.a.parent===t.parent?e.a:n}function oS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}oS.prototype=Object.create(X1.prototype);function pRe(e){for(var t=new oS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new oS(o[s],s)),i.parent=n;return(t.parent=new oS(null,0)).children=[t],t}function mRe(){var e=cRe,t=1,n=1,r=null;function i(d){var f=pRe(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){fRe(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=eL(v),p=ZD(p),v&&p;)y=ZD(y),g=eL(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(dRe(hRe(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!eL(g)&&(g.t=v,g.m+=b-_),p&&!ZD(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var Z$="http://www.w3.org/1999/xhtml";const vH={svg:"http://www.w3.org/2000/svg",xhtml:Z$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qT(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vH.hasOwnProperty(t)?{space:vH[t],local:e}:e}function gRe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Z$&&t.documentElement.namespaceURI===Z$?t.createElement(e):t.createElementNS(n,e)}}function vRe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pQ(e){var t=qT(e);return(t.local?vRe:gRe)(t)}function yRe(){}function nz(e){return e==null?yRe:function(){return this.querySelector(e)}}function xRe(e){typeof e!="function"&&(e=nz(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(I=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function WRe(e){e||(e=GRe);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function VRe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function XRe(){return Array.from(this)}function qRe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?oAe:typeof t=="function"?aAe:sAe)(e,t,n??"")):pg(this.node(),e)}function pg(e,t){return e.style.getPropertyValue(t)||xQ(e).getComputedStyle(e,null).getPropertyValue(t)}function uAe(e){return function(){delete this[e]}}function cAe(e,t){return function(){this[e]=t}}function dAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function fAe(e,t){return arguments.length>1?this.each((t==null?uAe:typeof t=="function"?dAe:cAe)(e,t)):this.node()[e]}function bQ(e){return e.trim().split(/^|\s+/)}function rz(e){return e.classList||new wQ(e)}function wQ(e){this._node=e,this._names=bQ(e.getAttribute("class")||"")}wQ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function _Q(e,t){for(var n=rz(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function zAe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function iz(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}sS.prototype=iz.prototype={constructor:sS,on:function(e,t){var n=this._,r=KAe(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ww(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ww(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tPe.exec(e))?new Lo(t[1],t[2],t[3],1):(t=nPe.exec(e))?new Lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=rPe.exec(e))?Ww(t[1],t[2],t[3],t[4]):(t=iPe.exec(e))?Ww(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oPe.exec(e))?CH(t[1],t[2]/100,t[3]/100,1):(t=sPe.exec(e))?CH(t[1],t[2]/100,t[3]/100,t[4]):xH.hasOwnProperty(e)?_H(xH[e]):e==="transparent"?new Lo(NaN,NaN,NaN,0):null}function _H(e){return new Lo(e>>16&255,e>>8&255,e&255,1)}function Ww(e,t,n,r){return r<=0&&(e=t=n=NaN),new Lo(e,t,n,r)}function uPe(e){return e instanceof Ub||(e=K1(e)),e?(e=e.rgb(),new Lo(e.r,e.g,e.b,e.opacity)):new Lo}function nF(e,t,n,r){return arguments.length===1?uPe(e):new Lo(e,t,n,r??1)}function Lo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}oz(Lo,nF,TQ(Ub,{brighter(e){return e=e==null?CE:Math.pow(CE,e),new Lo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?q1:Math.pow(q1,e),new Lo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lo(Gh(this.r),Gh(this.g),Gh(this.b),TE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:SH,formatHex:SH,formatHex8:cPe,formatRgb:EH,toString:EH}));function SH(){return`#${Bh(this.r)}${Bh(this.g)}${Bh(this.b)}`}function cPe(){return`#${Bh(this.r)}${Bh(this.g)}${Bh(this.b)}${Bh((isNaN(this.opacity)?1:this.opacity)*255)}`}function EH(){const e=TE(this.opacity);return`${e===1?"rgb(":"rgba("}${Gh(this.r)}, ${Gh(this.g)}, ${Gh(this.b)}${e===1?")":`, ${e})`}`}function TE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bh(e){return e=Gh(e),(e<16?"0":"")+e.toString(16)}function CH(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Va(e,t,n,r)}function IQ(e){if(e instanceof Va)return new Va(e.h,e.s,e.l,e.opacity);if(e instanceof Ub||(e=K1(e)),!e)return new Va;if(e instanceof Va)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new Va(s,l,c,e.opacity)}function dPe(e,t,n,r){return arguments.length===1?IQ(e):new Va(e,t,n,r??1)}function Va(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}oz(Va,dPe,TQ(Ub,{brighter(e){return e=e==null?CE:Math.pow(CE,e),new Va(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?q1:Math.pow(q1,e),new Va(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Lo(tL(e>=240?e-240:e+120,i,r),tL(e,i,r),tL(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Va(TH(this.h),Gw(this.s),Gw(this.l),TE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=TE(this.opacity);return`${e===1?"hsl(":"hsla("}${TH(this.h)}, ${Gw(this.s)*100}%, ${Gw(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TH(e){return e=(e||0)%360,e<0?e+360:e}function Gw(e){return Math.max(0,Math.min(1,e||0))}function tL(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const RQ=e=>()=>e;function fPe(e,t){return function(n){return e+n*t}}function hPe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function pPe(e){return(e=+e)==1?AQ:function(t,n){return n-t?hPe(t,n,e):RQ(isNaN(t)?n:t)}}function AQ(e,t){var n=t-e;return n?fPe(e,n):RQ(isNaN(e)?t:e)}const IH=function e(t){var n=pPe(t);function r(i,o){var s=n((i=nF(i)).r,(o=nF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=AQ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function Uc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var rF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nL=new RegExp(rF.source,"g");function mPe(e){return function(){return e}}function gPe(e){return function(t){return e(t)+""}}function vPe(e,t){var n=rF.lastIndex=nL.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=rF.exec(e))&&(i=nL.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Uc(r,i)})),n=nL.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Uc(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Uc(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:Uc(d,h)},{i:y-2,x:Uc(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--mg}function PH(){cp=(RE=J1.now())+YT,mg=bx=0;try{IPe()}finally{mg=0,APe(),cp=0}}function RPe(){var e=J1.now(),t=e-RE;t>MQ&&(YT-=t,RE=e)}function APe(){for(var e,t=IE,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:IE=n);wx=e,oF(r)}function oF(e){if(!mg){bx&&(bx=clearTimeout(bx));var t=e-cp;t>24?(e<1/0&&(bx=setTimeout(PH,e-J1.now()-YT)),qy&&(qy=clearInterval(qy))):(qy||(RE=J1.now(),qy=setInterval(RPe,MQ)),mg=1,kQ(PH))}}function OH(e,t,n){var r=new AE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var PPe=iz("start","end","cancel","interrupt"),OPe=[],LQ=0,MH=1,sF=2,aS=3,kH=4,aF=5,lS=6;function KT(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;MPe(e,n,{name:t,index:r,group:i,on:PPe,tween:OPe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:LQ})}function az(e,t){var n=ul(e,t);if(n.state>LQ)throw new Error("too late; already scheduled");return n}function Xl(e,t){var n=ul(e,t);if(n.state>aS)throw new Error("too late; already running");return n}function ul(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function MPe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=DQ(o,0,n.time);function o(d){n.state=MH,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==MH)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===aS)return OH(s);g.state===kH?(g.state=lS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fsF&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function l2e(e,t,n){var r,i,o=a2e(t)?az:Xl;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function u2e(e,t){var n=this._id;return arguments.length<2?ul(this.node(),n).on.on(e):this.each(l2e(n,e,t))}function c2e(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function d2e(){return this.on("end.remove",c2e(this._id))}function f2e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function N2e(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function tc(e,t,n){this.k=e,this.x=t,this.y=n}tc.prototype={constructor:tc,scale:function(e){return e===1?this:new tc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var PE=new tc(1,0,0);tc.prototype;function rL(e){e.stopImmediatePropagation()}function Yy(e){e.preventDefault(),e.stopImmediatePropagation()}function $2e(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function F2e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DH(){return this.__zoom||PE}function z2e(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function U2e(){return navigator.maxTouchPoints||"ontouchstart"in this}function j2e(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function iL(){var e=$2e,t=F2e,n=j2e,r=z2e,i=U2e,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=CPe,d=iz("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",DH).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,z,V){var W=D.selection?D.selection():D;W.property("__zoom",DH),D!==W?I(D,F,z,V):W.interrupt().each(function(){A(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,z,V){_.scaleTo(D,function(){var W=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return W*K},z,V)},_.scaleTo=function(D,F,z,V){_.transform(D,function(){var W=t.apply(this,arguments),K=this.__zoom,Y=z==null?E(W):typeof z=="function"?z.apply(this,arguments):z,Q=K.invert(Y),re=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,re),Y,Q),W,s)},z,V)},_.translateBy=function(D,F,z,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,z,V,W){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,Q=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(PE.translate(Q[0],Q[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),K,s)},V,W)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new tc(F,D.x,D.y)}function x(D,F,z){var V=F[0]-z[0]*D.k,W=F[1]-z[1]*D.k;return V===D.x&&W===D.y?D:new tc(D.k,V,W)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function I(D,F,z,V){D.on("start.zoom",function(){A(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(V).end()}).tween("zoom",function(){var W=this,K=arguments,Y=A(W,K).event(V),Q=t.apply(W,K),re=z==null?E(Q):typeof z=="function"?z.apply(W,K):z,ue=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),ce=W.__zoom,se=typeof F=="function"?F.apply(W,K):F,J=c(ce.invert(re).concat(ue/ce.k),se.invert(re).concat(ue/se.k));return function(ae){if(ae===1)ae=se;else{var le=J(ae),he=ue/le[2];ae=new tc(he,re[0]-le[0]*he,re[1]-le[1]*he)}Y.zoom(null,ae)}})}function A(D,F,z){return!z&&D.__zooming||new R(D,F)}function R(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}R.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,F){return this.mouse&&D!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var F=wo(this.that).datum();d.call(D,this.that,new N2e(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function M(D,...F){if(!e.apply(this,arguments))return;var z=A(this,F).event(D),V=this.__zoom,W=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=ch(D);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=V.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(V.k===W)return;z.mouse=[K,V.invert(K)],uS(this),z.start()}Yy(D),z.wheel=setTimeout(Y,v),z.zoom("mouse",n(x(b(V,W),z.mouse[0],z.mouse[1]),z.extent,s));function Y(){z.wheel=null,z.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var z=D.currentTarget,V=A(this,F,!0).event(D),W=wo(D.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",ue,!0),K=ch(D,z),Y=D.clientX,Q=D.clientY;QAe(D.view),rL(D),V.mouse=[K,this.__zoom.invert(K)],uS(this),V.start();function re(ce){if(Yy(ce),!V.moved){var se=ce.clientX-Y,J=ce.clientY-Q;V.moved=se*se+J*J>y}V.event(ce).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=ch(ce,z),V.mouse[1]),V.extent,s))}function ue(ce){W.on("mousemove.zoom mouseup.zoom",null),ZAe(ce.view,V.moved),Yy(ce),V.event(ce).end()}}function B(D,...F){if(e.apply(this,arguments)){var z=this.__zoom,V=ch(D.changedTouches?D.changedTouches[0]:D,this),W=z.invert(V),K=z.k*(D.shiftKey?.5:2),Y=n(x(b(z,K),V,W),t.apply(this,F),s);Yy(D),l>0?wo(this).transition().duration(l).call(I,Y,V,D):wo(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var z=D.touches,V=z.length,W=A(this,F,D.changedTouches.length===V).event(D),K,Y,Q,re;for(rL(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(I,A){if(I===null)return null;if(A===0)return I;var R,M;if(typeof I!="object")return I;if(n(I,r))R=new r;else if(n(I,i))R=new i;else if(n(I,o))R=new o(function(V,W){I.then(function(K){V(E(K,A-1))},function(K){W(E(K,A-1))})});else if(s.__isArray(I))R=[];else if(s.__isRegExp(I))R=new RegExp(I.source,h(I)),I.lastIndex&&(R.lastIndex=I.lastIndex);else if(s.__isDate(I))R=new Date(I.getTime());else{if(x&&Buffer.isBuffer(I))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(I.length):R=new Buffer(I.length),I.copy(R),R;n(I,Error)?R=Object.create(I):typeof y>"u"?(M=Object.getPrototypeOf(I),R=Object.create(M)):(R=Object.create(y),M=y)}if(g){var L=_.indexOf(I);if(L!=-1)return b[L];_.push(I),b.push(R)}n(I,r)&&I.forEach(function(V,W){var K=E(W,A-1),Y=E(V,A-1);R.set(K,Y)}),n(I,i)&&I.forEach(function(V){var W=E(V,A-1);R.add(W)});for(var B in I){var H;M&&(H=Object.getOwnPropertyDescriptor(M,B)),!(H&&H.set==null)&&(R[B]=E(I[B],A-1))}if(Object.getOwnPropertySymbols)for(var G=Object.getOwnPropertySymbols(I),B=0;B1&&arguments[1]!==void 0?arguments[1]:0,n=(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase();if(!X2e(n))throw TypeError("Stringified UUID is invalid");return n}function sL(e,t,n){e=e||{};var r=e.random||(e.rng||G2e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return q2e(r)}var lF={exports:{}},uF={exports:{}},Y2e=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?de.createElement(wOe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),SOe=15,FH={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},EOe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:SOe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},FH.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},FH.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let COe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:EOe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?wo(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(wo(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var hF=Math.PI,pF=2*hF,Sh=1e-6,TOe=pF-Sh;function mF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function JQ(){return new mF}mF.prototype=JQ.prototype={constructor:mF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Sh)if(!(Math.abs(f*l-c*d)>Sh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((hF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Sh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Sh||Math.abs(this._y1-d)>Sh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%pF+pF),h>TOe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Sh&&(this._+="A"+n+","+n+",0,"+ +(h>=hF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function zH(e){return function(){return e}}function IOe(e){return e[0]}function ROe(e){return e[1]}var AOe=Array.prototype.slice;function POe(e){return e.source}function OOe(e){return e.target}function QQ(e){var t=POe,n=OOe,r=IOe,i=ROe,o=null;function s(){var l,c=AOe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=JQ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:zH(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:zH(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function MOe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function kOe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function DOe(){return QQ(MOe)}function LOe(){return QQ(kOe)}class BOe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?wo(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(wo(this.linkRef).style("opacity",t),r())}drawStepPath(t,n){const{source:r,target:i}=t,o=i.y-r.y;return n==="horizontal"?`M${r.y},${r.x} H${r.y+o/2} V${i.x} H${i.y}`:`M${r.x},${r.y} V${r.y+o/2} H${i.x} V${i.y}`}drawDiagonalPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?DOe()({source:[r.y,r.x],target:[i.y,i.x]}):LOe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const NOe=` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=zQ,t.componentWillReceiveProps=UQ),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=jQ;var l=t.componentDidUpdate;t.componentDidUpdate=function(d,f,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;l.call(this,d,f,p)}}return e}const Z2e=Object.freeze(Object.defineProperty({__proto__:null,polyfill:Q2e},Symbol.toStringTag,{value:"Module"})),eOe=J9(Z2e);var JT={};JT.__esModule=!0;JT.getChildMapping=nOe;JT.mergeChildMappings=rOe;var tOe=O;function nOe(e){if(!e)return e;var t={};return tOe.Children.map(e,function(n){return n}).forEach(function(n){t[n.key]=n}),t}function rOe(e,t){e=e||{},t=t||{};function n(f){return t.hasOwnProperty(f)?t[f]:e[f]}var r={},i=[];for(var o in e)t.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var s=void 0,l={};for(var c in t){if(r.hasOwnProperty(c))for(s=0;se.enableLegacyTransitions?de.createElement(wOe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),SOe=15,FH={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},EOe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:SOe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},FH.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},FH.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let COe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:EOe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?wo(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(wo(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var hF=Math.PI,pF=2*hF,Sh=1e-6,TOe=pF-Sh;function mF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function QQ(){return new mF}mF.prototype=QQ.prototype={constructor:mF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Sh)if(!(Math.abs(f*l-c*d)>Sh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((hF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Sh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Sh||Math.abs(this._y1-d)>Sh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%pF+pF),h>TOe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Sh&&(this._+="A"+n+","+n+",0,"+ +(h>=hF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function zH(e){return function(){return e}}function IOe(e){return e[0]}function ROe(e){return e[1]}var AOe=Array.prototype.slice;function POe(e){return e.source}function OOe(e){return e.target}function ZQ(e){var t=POe,n=OOe,r=IOe,i=ROe,o=null;function s(){var l,c=AOe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=QQ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:zH(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:zH(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function MOe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function kOe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function DOe(){return ZQ(MOe)}function LOe(){return ZQ(kOe)}class BOe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?wo(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(wo(this.linkRef).style("opacity",t),r())}drawStepPath(t,n){const{source:r,target:i}=t,o=i.y-r.y;return n==="horizontal"?`M${r.y},${r.x} H${r.y+o/2} V${i.x} H${i.y}`:`M${r.x},${r.y} V${r.y+o/2} H${i.x} V${i.y}`}drawDiagonalPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?DOe()({source:[r.y,r.x],target:[i.y,i.x]}):LOe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const NOe=` /* Tree */ .rd3t-tree-container { width: 100%; @@ -503,8 +503,8 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat fill: none; stroke: #000; } -`;let ZQ=class Ma extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:Ma.assignInternalProperties(go(this.props.data)),d3:Ma.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${sL()}`,this.gInstanceRef=`rd3t-g-${sL()}`,this.handleNodeToggle=t=>{const n=go(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(Ma.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):Ma.collapseNode(i),this.props.enableLegacyTransitions?(this.setState({data:n,isTransitioning:!0}),setTimeout(()=>this.setState({isTransitioning:!1}),this.props.transitionDuration+10)):this.setState({data:n}),this.internalState.targetNode=i)},this.handleAddChildrenToNode=(t,n)=>{const r=go(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=go(n).map(c=>Ma.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=wo(`.${this.gInstanceRef}`),l=wo(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(iL().transform,PE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:Ma.assignInternalProperties(go(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=Ma.calculateD3Geometry(t);return Zx(o,n.d3)||(r=r||{},r.d3=o),r}componentDidMount(){this.bindZoomListener(this.props),this.setState({isInitialRenderForDataset:!1})}componentDidUpdate(t){this.props.data!==t.data&&this.setState({isInitialRenderForDataset:!1}),(!Zx(this.props.translate,t.translate)||!Zx(this.props.scaleExtent,t.scaleExtent)||this.props.zoomable!==t.zoomable||this.props.draggable!==t.draggable||this.props.zoom!==t.zoom||this.props.enableLegacyTransitions!==t.enableLegacyTransitions)&&this.bindZoomListener(this.props),typeof this.props.onUpdate=="function"&&this.props.onUpdate({node:this.internalState.targetNode?go(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=wo(`.${this.svgInstanceRef}`),d=wo(`.${this.gInstanceRef}`);c.call(iL().transform,PE.translate(i.x,i.y).scale(o)),c.call(iL().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=sL(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=Ma.assignInternalProperties(o.children,n+1)),o})}findNodesById(t,n,r){return r.length>0||(r=r.concat(n.filter(i=>i.__rd3t.id===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesById(t,i.children,r))})),r}findNodesAtDepth(t,n,r){return r=r.concat(n.filter(i=>i.__rd3t.depth===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesAtDepth(t,i.children,r))}),r}static collapseNode(t){t.__rd3t.collapsed=!0,t.children&&t.children.length>0&&t.children.forEach(n=>{Ma.collapseNode(n)})}static expandNode(t){t.__rd3t.collapsed=!1}collapseNeighborNodes(t,n){this.findNodesAtDepth(t.__rd3t.depth,n,[]).filter(i=>i.__rd3t.id!==t.__rd3t.id).forEach(i=>Ma.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=mRe().nodeSize(o==="horizontal"?[i.y,i.x]:[i.x,i.y]).separation((h,p)=>h.parent.data.__rd3t.id===p.parent.data.__rd3t.id?r.siblings:r.nonSiblings)(tz(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(BOe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:I,parent:A}=_;return de.createElement(COe,{key:"node-"+b,data:x,position:{x:E,y:I},hierarchyPointNode:_,parent:A,nodeClassName:this.getNodeClassName(A,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};ZQ.defaultProps={onNodeClick:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onLinkClick:void 0,onLinkMouseOver:void 0,onLinkMouseOut:void 0,onUpdate:void 0,orientation:"horizontal",translate:{x:0,y:0},pathFunc:"diagonal",pathClassFunc:void 0,transitionDuration:500,depthFactor:void 0,collapsible:!0,initialDepth:void 0,zoomable:!0,draggable:!0,zoom:1,scaleExtent:{min:.1,max:1},nodeSize:{x:140,y:140},separation:{siblings:1,nonSiblings:2},shouldCollapseNeighborNodes:!1,svgClassName:"",rootNodeClassName:"",branchNodeClassName:"",leafNodeClassName:"",renderCustomNodeElement:void 0,enableLegacyTransitions:!1,hasInteractiveNodes:!1,dimensions:void 0,centeringTransitionDuration:800,dataKey:void 0};const[dp,$Oe]=Gl({playback:"paused"});function Q1(){return Q1=Object.assign||function(e){for(var t=1;t0?1:-1}),lL}var sMe=iMe()?Math.sign:oMe(),aMe=sMe,lMe=Math.abs,uMe=Math.floor,cMe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:aMe(e)*uMe(lMe(e)))},dMe=cMe,fMe=Math.max,wp=function(e){return fMe(0,dMe(e))},hMe=wp,rZ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:hMe(e)},jd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},pMe=bp,jg=function(e){if(!pMe(e))throw new TypeError("Cannot use null or undefined");return e},mMe=jd,gMe=jg,vMe=Function.prototype.bind,HH=Function.prototype.call,yMe=Object.keys,xMe=Object.prototype.propertyIsEnumerable,bMe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(gMe(n)),mMe(r),i=yMe(n),s&&i.sort(typeof s=="function"?vMe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),HH.call(e,i,function(l,c){return xMe.call(n,l)?HH.call(r,o,n[l],l,n,c):t})}},QT=bMe("forEach"),_p={},iZ={exports:{}},wMe=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},uL,WH;function _Me(){return WH||(WH=1,uL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),uL}var cL,GH;function SMe(){if(GH)return cL;GH=1;var e=bp,t=Object.keys;return cL=function(n){return t(e(n)?Object(n):n)},cL}var dL,VH;function EMe(){return VH||(VH=1,dL=_Me()()?Object.keys:SMe()),dL}var fL,XH;function CMe(){if(XH)return fL;XH=1;var e=EMe(),t=jg,n=Math.max;return fL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},gL}var WMe=jMe()?String.prototype.contains:HMe(),cS=cZ,eW=UMe,dZ=oZ,fZ=nZ,e1=WMe,GMe=uZ.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],cS(e)?(n=e1.call(e,"c"),r=e1.call(e,"e"),i=e1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?dZ(fZ(o),s):s};GMe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],cS(t)?eW(t)?cS(n)?eW(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,cS(e)?(r=e1.call(e,"c"),i=e1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?dZ(fZ(o),s):s};var Sp=uZ.exports,vF={exports:{}};(function(e,t){var n=Sp,r=jd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,R;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(R=0;A=I[R];++R)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[R?0:1]:I.splice(R,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,R;if(d.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=g?d.call(g,v,M,_):M,y?(f.value=M,h(b,_,f)):b[_]=M,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},JL}var QL,FW;function zke(){if(FW)return QL;FW=1;var e=Fke(),t=/[\n\r\u2028\u2029]/g;return QL=function(n){var r=e(n);return r.length>100&&(r=r.slice(0,99)+"…"),r=r.replace(t,function(i){return JSON.stringify(i).slice(1,-1)}),r},QL}var e_={exports:{}},zW;function yZ(){if(zW)return e_.exports;zW=1,e_.exports=e,e_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return e_.exports}var UW;function Uke(){if(UW)return kW;UW=1;var e=gZ(),t=Bke(),n=$ke(),r=zke(),i=yZ(),o=gz(),s=Object.create,l=t("then","then:finally","done","done:finally");return _p.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(I){var A=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);A&&(delete f[g],h[g]=I,d.emit("setasync",g,A))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(I){o(_.bind(this,I))},E),typeof y.finally=="function"&&y.finally(E)}else if(x==="done"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");y.done(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},kW}var jW={},HW;function jke(){if(HW)return jW;HW=1;var e=jd,t=QT,n=_p,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},jW}var WW={},ZL,GW;function Hke(){return GW||(GW=1,ZL=2147483647),ZL}var eB,VW;function Wke(){if(VW)return eB;VW=1;var e=wp,t=Hke();return eB=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},eB}var XW;function Gke(){if(XW)return WW;XW=1;var e=pz(),t=QT,n=gz(),r=yZ(),i=Wke(),o=_p,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},WW}var qW={},tB,YW;function Vke(){if(YW)return tB;YW=1;var e=wp,t=Object.create,n=Object.prototype.hasOwnProperty;return tB=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},tB}var KW;function Xke(){if(KW)return qW;KW=1;var e=wp,t=Vke(),n=_p;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},qW}var JW={},QW;function qke(){if(QW)return JW;QW=1;var e=Sp,t=_p,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},JW}var Yke=nZ,Kke=rZ,Jke=Tke,Qke=function(e){var t=Yke(arguments[1]),n;return t.normalizer||(n=t.length=Kke(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=Ike():n>1&&(t.normalizer=Rke()(n)):n===!1?t.normalizer=Mke()():n===1?t.normalizer=kke()():t.normalizer=Dke()(n))),t.async&&Lke(),t.promise&&Uke(),t.dispose&&jke(),t.maxAge&&Gke(),t.max&&Xke(),t.refCounter&&qke(),Jke(e,t)};const Hg=al(Qke),Zke=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},eDe=e=>t=>Zke(e)(n=>(n.postMessage(t),new Promise(r=>{n.onmessage=i=>{r(i.data)}}))),Wg=(e,t={async:!0,length:1})=>Hg(eDe(e),t),tDe=""+new URL("tree.worker-a5e2610c.js",import.meta.url).href;class nDe extends Worker{constructor(){super(tDe,{type:"module"})}}const rDe=Wg(nDe);function iDe(e){return Ug(async()=>await rDe(e),[e])}function oDe(e,t){const n=O.useMemo(()=>e,t);return iDe(n)}const sDe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),aDe=ZQ;function xZ(e,t=!1){const[n,r]=O.useState();return O.useEffect(()=>{t||e&&r(e)},[e,t]),n}const ZW={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function lDe(){var _,b,x,E;const[{step:e=0}]=dp(),t=u4(e,600),{palette:n}=Pn(),[{layers:r}]=ua(),[i,o]=O.useState();O.useEffect(()=>{var I;i||o((I=ie.head(r))==null?void 0:I.key)},[i,o,r]);const s=ie.find(r,{key:i}),{controls:l,onChange:c,state:d}=zd(),[f,h]=O.useState("small"),p=k1({"&.rd3t-link":{stroke:Rn(n.text.primary,n.action.disabledOpacity)}}),{result:g,loading:v}=oDe({trace:(b=(_=s==null?void 0:s.source)==null?void 0:_.trace)==null?void 0:b.content,step:t,radius:ZW[f].value},[t,s,f]),y=xZ(g,v),S=O.useCallback(()=>p,[p]);return C.jsxs(Ln,{onChange:c,stack:d,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{children:(E=(x=s==null?void 0:s.source)==null?void 0:x.trace)!=null&&E.content&&(y!=null&&y.tree)?C.jsx(A4,{children:({width:I,height:A})=>C.jsx(Pt,{width:I,height:A,children:C.jsx(aDe,{scaleExtent:{max:10,min:.01},translate:{x:I/2,y:I/2},data:y.tree,dimensions:{width:I,height:A},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:R,onNodeClick:M})=>C.jsx(uDe,{node:R,onClick:()=>M==null?void 0:M({})})})})}):C.jsx(Lh,{icon:C.jsx($Y,{}),label:"Tree"})})})," ",C.jsxs(Ln.Options,{children:[C.jsx(Ss,{icon:C.jsx(TT,{}),label:"Layer",value:i,items:ie.map(r,I=>({id:I.key,name:ia(I)})),onChange:o,showArrow:!0}),sDe,C.jsx(Ss,{icon:C.jsx(qye,{}),label:"Radius",value:f,onChange:I=>h(I),items:ie.map(ie.entries(ZW),([I,A])=>({id:I,...A})),showArrow:!0})]}),C.jsx(Ln.Extras,{children:l})]})}const Jy=16,ju=4;function uDe({onClick:e,node:t}){var h;const[{step:n=0},r]=dp(),i=u4(n,1e3/24),{palette:o,spacing:s,shape:l}=Pn(),c=ie.findLast(t==null?void 0:t.events,p=>p.step<=i),d=!!ie.find(t==null?void 0:t.events,p=>p.step===i),f=V1((h=c==null?void 0:c.data)==null?void 0:h.type);return C.jsx(Bg,{variant:"popover",children:p=>{var g,v;return C.jsxs(C.Fragment,{children:[C.jsx($d,{title:`f: ${((g=c==null?void 0:c.data)==null?void 0:g.f)??"unknown"}, g: ${((v=c==null?void 0:c.data)==null?void 0:v.g)??"unknown"}`,children:C.jsxs("g",{onClick:y=>{p.open(y)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,width:s(Jy),height:s(ju),rx:l.borderRadius})}),C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,fill:o.background.default,width:s(Jy),height:s(ju),clipPath:"url(#clipPath)"}),d&&C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,fill:Rn(o.primary.main,o.action.selectedOpacity),width:s(Jy),height:s(ju),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:s(-.25),y:s(-ju/2),height:s(ju),width:s(.5),fill:f,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:s(4),fill:o.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:s(2-.25),alignmentBaseline:"central",children:t==null?void 0:t.name}),!!(t!=null&&t.cumulativeChildCount)&&C.jsxs(C.Fragment,{children:[C.jsx("text",{strokeWidth:0,height:s(4),fill:o.text.secondary,y:0,x:s(Jy-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(Iye,{width:s(2),height:s(2),x:s(Jy-2-1),y:s(-ju/2+1),strokeWidth:0,fill:o.text.primary,opacity:o.action.disabledOpacity})]})]})}),C.jsx(Dg,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...BT(p),children:C.jsx(r4,{dense:!0,sx:{p:0},children:ie.map(t==null?void 0:t.events,y=>C.jsx(pd,{selected:y.step===i,sx:{borderLeft:`4px solid ${V1(y.data.type)}`},onClick:()=>{p.close(),e==null||e(),ie.delay(()=>r({step:y.step}),150)},children:C.jsx(a4,{primary:ie.startCase(y.data.type),secondary:`Step ${y.step}`})}))})})]})}})}function cDe({selection:e,onClose:t}){const n=dDe(),r=xZ(e),{client:i}=e??{};return C.jsx(Dg,{open:!!e,anchorReference:"anchorPosition",anchorPosition:{top:(i==null?void 0:i.y)??0,left:(i==null?void 0:i.x)??0},onClose:t,keepMounted:!0,children:C.jsx(r4,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ie.entries(o);return s.length?ie.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(wc,{sx:{my:1,mx:2}}),c&&C.jsx(Vx,{sx:{py:0},children:C.jsx(qt,{color:"text.secondary",variant:"overline",children:c})}),ie.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(pd,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(hd,{children:p}),C.jsx(Dl,{primary:g,sx:{mr:4}}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Vx,{children:[p&&C.jsx(hd,{children:p}),C.jsx(Dl,{primary:g,sx:{mr:4}}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Vx,{children:C.jsx(qt,{children:"No info to show."})})})}})})})}const eG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function dDe(){const[{layers:e}]=ua();return O.useMemo(()=>ie.chain(e).reduce((t,n)=>{var i;const r=((i=IZ(n))==null?void 0:i.getSelectionInfo)??eG;return({children:o,event:s})=>C.jsx(r,{layer:n,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ie.merge(l,c))})})},eG).value(),[e])}const[eI,fDe]=Gl([],{reduce:VY}),hDe={tileSubdivision:2,workerCount:2,tileResolution:{width:1024,height:1024}},bZ=O.createContext({});function pDe(){return O.useContext(bZ)}function mDe(e,{width:t,height:n}={}){const r=Pn(),[i]=eI(),o=O.useRef(null),[s,l]=O.useState(""),[c,d]=O.useState();return O.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ie.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...hDe,backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ie.map,e,i,r,l,d]),fxe(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function gDe(){const[{map:e,specimen:t}]=VT();return!!(e||t)&&C.jsx(t4,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function vDe({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=mDe(n,{width:e,height:t}),[c,d]=O.useState();O.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=O.useMemo(()=>({renderer:o}),[o]);return O.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(gDe,{}),C.jsx(bZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(Eye,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(Pt,{ref:l,children:i.map(h=>C.jsx(hLe,{layer:h},h.key))})}):C.jsx(Lh,{icon:C.jsx(HY,{}),label:"No layers to render",width:e,height:t})}),C.jsx(cDe,{selection:c,onClose:()=>d(void 0)})]})}function ME({nodes:e}){const{renderer:t}=pDe();return O.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function yDe({nodes:e,step:t}){const r=ie.floor((t??0)/200)*200,i=O.useMemo(()=>ie.slice(e,0,r),[e,r]),o=O.useMemo(()=>ie.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(ME,{nodes:i}),C.jsx(ME,{nodes:o})]})}const tI=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,xDe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class bDe extends Worker{constructor(){super(xDe,{type:"module"})}}const wDe=Wg(bDe),{floor:tG}=Math;function nG(e,t,n){return e>=t&&e({...await wDe({map:e,options:t})}),{normalizer:JSON.stringify}),SDe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[tG(r+o/2),tG(i+o/2)];if(nG(s,0,t)&&nG(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:tI}},EDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:SDe,parse:_De},Symbol.toStringTag,{value:"Module"})),CDe=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class TDe extends Worker{constructor(){super(CDe,{type:"module"})}}const IDe=Wg(TDe),RDe=Hg(async(e="",t)=>await IDe({map:e,options:t}),{normalizer:JSON.stringify}),ADe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),PDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:ADe,parse:RDe},Symbol.toStringTag,{value:"Module"})),ODe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class MDe extends Worker{constructor(){super(ODe,{type:"module"})}}const kDe=Wg(MDe),DDe=Hg(async(e="",t)=>await kDe({map:e,options:t}),{normalizer:JSON.stringify}),LDe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),BDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:LDe,parse:DDe},Symbol.toStringTag,{value:"Module"})),NDe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class $De extends Worker{constructor(){super(NDe,{type:"module"})}}const FDe=Wg($De),zDe=Hg(async(e="",t)=>await FDe({map:e,options:t}),{normalizer:JSON.stringify}),UDe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),jDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:UDe,parse:zDe},Symbol.toStringTag,{value:"Module"})),vz={grid:EDe,xy:BDe,mesh:PDe,poly:jDe};function wZ(e=""){return vz[e]}const HDe=(e,t,n)=>{const r=O.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return O.useEffect(o?()=>void e():()=>{},o?t:s)};function WDe(e,t){return ie.zip(e,t).every(([n,r])=>n===r)}const GDe=(e,t=[],n=[])=>{const[r,i]=O.useState(t),[o,s]=O.useState(n);return O.useEffect(()=>{WDe(o,n)||(i(t),s(n))},[t,n,o]),tZ(e,[...r,...o])};function yz(){const[e]=hg();return O.useCallback(t=>ie.find(e,t),[e])}function VDe(e){return yz()({url:e})}function XDe(e){const t=_c(),n=xp("map"),r=yz(),i=O.useMemo(()=>Hg(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return Ug(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function qDe(e){const t=_c(),n=Pn(),r=xp("map"),{format:i,content:o}=e??{};return Ug(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Rg:Ig;if(i&&o){t("Processing map...");const d=await((c=(l=wZ(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const YDe={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ie.startCase(e.source.map.format)})`:"Untitled Map"},editor:B1(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(G1,{label:"Source",content:C.jsx(WIe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ie.set(i,"source.map",r))})})})}),renderer:({layer:e})=>{var r;const{nodes:t}=((r=e==null?void 0:e.source)==null?void 0:r.parsedMap)??{},n=O.useMemo(()=>[t??[]],[t]);return C.jsx(ME,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:B1(({value:e,produce:t})=>{var i;const{result:n}=XDe((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=qDe(n);return HDe(()=>void t(o=>ie.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{parsedMap:r}=(n==null?void 0:n.source)??{},[{layers:i},o]=ua(),{point:s,node:l}=O.useMemo(()=>{var d,f,h,p;if(r&&t){const g=(p=(h=wZ((f=(d=n==null?void 0:n.source)==null?void 0:d.map)==null?void 0:f.format))==null?void 0:h.hydrate)==null?void 0:p.call(h,r);if(g){const v=(t==null?void 0:t.world)&&g.snap(t.world);if(v){const y=(t==null?void 0:t.world)&&g.nodeAt(v);return{point:v,node:y}}}}return{}},[r,t]),c=O.useMemo(()=>{const d=ie.filter(i,{source:{type:"query"}});return{...n&&s&&!ie.isUndefined(l)&&{[n.key]:{primary:ia(n),items:{point:{primary:"Point",secondary:`(${ie.round(s.x,2)}, ${ie.round(s.y,2)})`},...ie.reduce(d,(f,h)=>({...f,[`${h.key}-a`]:{primary:"Set as source",secondary:ia(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?sc(p,g=>{ie.set(g,"source.start",l),ie.set(g,"source.query",void 0),ie.set(g,"source.mapLayerKey",n.key),ie.set(g,"source.trace",void 0)}):p)}),icon:C.jsx(Xye,{sx:{transform:"scale(0.5)"}})},[`${h.key}-b`]:{primary:"Set as destination",secondary:ia(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?sc(p,g=>{ie.set(g,"source.end",l),ie.set(g,"source.query",void 0),ie.set(g,"source.mapLayerKey",n.key),ie.set(g,"source.trace",void 0)}):p)}),icon:C.jsx(zye,{})}}),{})}}}}},[s,l,n,i,o]);return C.jsx(C.Fragment,{children:e==null?void 0:e(c)})}};function KDe({label:e,value:t,type:n}){return C.jsxs(wn,{width:"auto",mr:3,mt:.5,children:[C.jsx(qt,{component:"div",sx:{opacity:.54},...n,children:e}),C.jsx(Yr,{}),C.jsx(qt,{component:"div",...n,children:t??"none"})]},`${e}::${t}`)}function yF({event:e,variant:t="body2",...n}){return C.jsx(wn,{...n,children:ie.map(ie.filter(ie.entries(e),([,r])=>r!==void 0),([r,i])=>C.jsx(KDe,{label:r,value:i,type:{variant:t}}))})}var _Z={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,l){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(l){var c=l===void 0?{}:l,d=c.ESCAPE,f=d===void 0?/^\\/:d,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,_=c.PIPE_PARAMETER_START,b=_===void 0?/^\s*:\s*/:_,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,I=c.QUOTED_STRING_TEST,A=I===void 0?null:I,R=c.QUOTED_STRING_GET_AND_ADVANCE,M=R===void 0?null:R,L=c.QUOTED_STRING_IN_PARAMETER_TEST,B=L===void 0?null:L,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,G=H===void 0?null:H,U=A||function(V){return E.test(V)},D=M||s(E),F=B||function(V){return E.test(V)},z=G||s(E);return function(V){function W(Pe){Pe===void 0&&(Pe=1),pe=pe.substr(Pe)}function K(Pe){Pe===void 0&&(Pe=/^/),W(pe.match(Pe)[0].length)}function Y(){var Pe;return K(f),Pe=pe.length>0?pe[0]:"",W(),Pe}function Q(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;me={name:"",pipes:[]},Xe=!it}function re(){ve.variables.push(me),Q({isNull:!0})}function ue(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;xe={name:"",parameters:[]},at=!it}function ce(){me.pipes.push(xe),ue({isNull:!0})}function se(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;Je="",Lt=!it}function J(){xe.parameters.push(Je),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&J(),ye>=2&&ce(),ye>=1&&re(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&J(),ye>=2&&ce(),ye>=1&&ue(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&J(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,be="",me={name:"",pipes:[]},xe={name:"",parameters:[]},Je="",Xe=!1,at=!1,Lt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){be+=Y();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(be),be="",K(p);continue}be+=pe[0],W();break;case 1:if(f.test(pe)){me.name+=Y();continue}if(ae()||le())continue;if(U(pe)){me.name+=D(pe,W);continue}me.name+=pe[0],W();break;case 2:if(f.test(pe)){xe.name+=Y();continue}if(ae()||he()||le())continue;if(U(pe)){xe.name+=D(pe,W);continue}xe.name+=pe[0],W();break;case 3:if(f.test(pe)){Je+=Y();continue}if(ae()||he()||le())continue;if(F(pe)){Je+=z(pe,W);continue}Je+=pe[0],W()}return Lt&&xe.parameters.push(Je),at&&me.pipes.push(xe),Xe&&ve.variables.push(me),ve.literals.push(be),ve}}function s(l){return function(c,d){var f=c.match(l);return d(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var l in s)r.hasOwnProperty(l)||(r[l]=s[l])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function l(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return l(d.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var d=i(0);r.evaluateParsedString=l,r.evaluateStringTemplate=c}])})})(_Z);var rG=_Z.exports;function xz(e={},t){const{$:n,...r}=e;return{...ie.mapValues(r,t),$:n}}function xF(e){switch(e==null?void 0:e.constructor){case Array:{const t=ie.map(e,xF);return n=>ie.map(t,r=>r(n))}case Object:{const t=ie.mapValues(e,xF);return n=>ie.mapValues(t,r=>r(n))}case String:return bF(e);default:return ie.constant(e)}}function kE(e={}){return xz(e,t=>ie.isFunction(t)?t:xF(t))}function iG(e){const t=Function("ctx",`return ${e};`);return n=>t(new Proxy(kE(n),{get(r,i){return r[i]({})}}))}const JDe=/^\{\{\s*/,QDe=/^\s*\}\}/,nB=/\b\B/;function bF(e){const n=rG.parseStringTemplateGenerator({VARIABLE_START:JDe,VARIABLE_END:QDe,PIPE_START:nB,PIPE_PARAMETER_START:nB,QUOTED_STRING:nB})(e);return ie.join(n.literals,"")?r=>rG.evaluateParsedString(n,{},{},i=>iG(i)(r)):iG(n.variables[0].name)}function ZDe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var SZ={exports:{}};(function(e,t){(function(n,r){typeof ZDe=="function"?e.exports=r():n.pluralize=r()})(Xt,function(){var n=[],r=[],i={},o={},s={};function l(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function d(y,S){return y.replace(/\$(\d{1,2})/g,function(_,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(_,b){var x=d(S[1],arguments);return c(_===""?y[b-1]:_,x)})}function h(y,S,_){if(!y.length||i.hasOwnProperty(y))return S;for(var b=_.length;b--;){var x=_[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,_){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,_)}}function g(y,S,_,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,_)===E}}function v(y,S,_){var b=S===1?v.singular(y):v.plural(y);return(_?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([l(y),S])},v.addSingularRule=function(y,S){r.push([l(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(SZ);var eLe=SZ.exports;const tLe=al(eLe),nLe=""+new URL("parseTrace.worker-e46e9d4a.js",import.meta.url).href;class rLe extends Worker{constructor(){super(nLe,{type:"module"})}}const iLe=Wg(rLe);function oLe(e){const t=_c(),n=xp("specimen");return Ug(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");const i=await iLe(e);return t("Trace loaded",tLe("step",((r=i==null?void 0:i.steps)==null?void 0:r.length)??0,!0)),i}}),[e])}function sLe(e,t){const n=O.useMemo(()=>e,t);return oLe(n)}function EZ(e,t){const n=xz(t,r=>i=>r(EZ(kE(i),e)));return{...e,...n}}function CZ(e,t,n={}){return e.flatMap(r=>{const{$:i}=r,o=EZ(kE(n),kE(r));return i in t?CZ(t[i],t,o):[o]})}const aLe={color:XT};function TZ(e,t="main"){const n=Pn();return O.useMemo(()=>{var i,o,s,l;const r=CZ(((s=(o=(i=e==null?void 0:e.render)==null?void 0:i.views)==null?void 0:o[t])==null?void 0:s.components)??[],((l=e==null?void 0:e.render)==null?void 0:l.components)??{});return{events:(e==null?void 0:e.events)??[],apply:(c,d)=>ie.map(r,f=>xz(f,h=>h({fill:n.palette.primary.main,alpha:1,...aLe,...d,...c})))}},[e,t,n])}const lLe=e=>e==null;function uLe(e){const t=[],n={},r={},i=ie.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ie.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!lLe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ie.last(t)}),n[l]=c),r[d]=ie.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ie.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const dS={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:B1(({value:e,produce:t})=>{var n,r;return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Trace",content:C.jsx(GIe,{onChange:i=>t(o=>ie.set(o,"source.trace",i)),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(G1,{label:"Onion Skinning",content:C.jsx(Ss,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(i=>({id:i,name:ie.startCase(i)})),onChange:i=>t(o=>ie.set(o,"source.onion",i))})})]})}),renderer:({layer:e})=>{var l,c,d;const{palette:t}=Pn(),[{step:n=0}]=dp(),r=u4(n,1e3/60),{result:i}=sLe({trace:(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content,context:{color:XT,themeAccent:t.primary.main,themeTextPrimary:t.text.primary,themeBackground:t.background.paper},view:"main"},[t,(d=e==null?void 0:e.source)==null?void 0:d.trace]),o=cLe(e,r),s=O.useMemo(()=>ie.map(i==null?void 0:i.steps,f=>ie.map(f,h=>ie.merge(h,{meta:{sourceLayer:e==null?void 0:e.key}}))),[i==null?void 0:i.steps,e]);return C.jsxs(C.Fragment,{children:[C.jsx(yDe,{step:r,nodes:s}),o]})},steps:({layer:e,children:t})=>{var r,i;const{events:n}=TZ((i=(r=e==null?void 0:e.source)==null?void 0:r.trace)==null?void 0:i.content);return C.jsx(C.Fragment,{children:t==null?void 0:t(n)})},getSelectionInfo:({layer:e,event:t,children:n})=>{const[,r]=dp(),i=O.useMemo(()=>{var l,c,d,f;const o=((d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.events)??[],s=ie.chain((f=t==null?void 0:t.info)==null?void 0:f.components).filter(h=>{var p;return((p=h.meta)==null?void 0:p.sourceLayer)===(e==null?void 0:e.key)}).map(h=>{var p;return(p=h.meta)==null?void 0:p.step}).filter(ie.negate(ie.isUndefined)).sort((h,p)=>p-h).value();if(s.length&&e){const h=ie.last(s),p=o[h];if(p)return{[e.key]:{primary:ia(e),items:{properties:{index:-1,primary:C.jsx(yF,{event:ie.pick(p,["id","f","g","pId"]),vertical:!0})},[`${p}`]:{primary:`Go to Step ${h}`,secondary:`${ie.startCase(p.type)}`,action:()=>r({step:h}),icon:C.jsx(_ye,{})}}}}}return{}},[e,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(i)})}};function cLe(e,t=0){var o,s;const{palette:n}=Pn(),{getPath:r}=O.useMemo(()=>{var l,c;return(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)!=null&&c.content?uLe(e.source.trace.content):{getParent:ie.constant(void 0),getPath:ie.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return O.useMemo(()=>{var l,c,d,f;if((f=(d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?bF(g):b=>b.x,S=v?bF(v):b=>b.y,_=ie.map(r(t),b=>{var x,E,I,A;return(A=(I=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:I.events)==null?void 0:A[b]});if(_.length){const b=[{$:"rect",x:y({x:0,y:0,...ie.head(_)})-2*p/2,y:S({x:0,y:0,...ie.head(_)})-2*p/2,fill:V1("destination"),width:2*p,height:2*p},{$:"rect",x:y({x:0,y:0,...ie.last(_)})-2*p/2,y:S({x:0,y:0,...ie.last(_)})-2*p/2,fill:V1("source"),width:2*p,height:2*p},{$:"path",points:_.map(x=>({x:y({x:0,y:0,...x}),y:S({x:0,y:0,...x})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(ME,{nodes:[ie.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}async function dLe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ie.find(i,{id:t})&&ie.find(o,{id:n}))return r}}const fLe={key:"query",editor:B1(({value:e,produce:t})=>{const{algorithm:n,mapLayerKey:r}=(e==null?void 0:e.source)??{},[{layers:i}]=ua(),[{algorithms:o}]=SE(),[s]=hg(),l=ie.filter(i,d=>{var f;return((f=d.source)==null?void 0:f.type)==="map"}),c=ie.find(l,{key:r});return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Algorithm",content:C.jsx(Ss,{showArrow:!0,label:"Choose Algorithm",value:n,items:o.map(d=>{var f;return{...d,description:(f=ie.find(s,{url:d.source}))==null?void 0:f.name}}),onChange:async d=>t(f=>ie.set(f,"source.algorithm",d))})}),!(o!=null&&o.length)&&C.jsx(qt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(G1,{label:"Map",content:C.jsx(Ss,{showArrow:!0,label:"Choose Layer",value:r,items:l.map(d=>({id:d.key,name:ia(d)})),onChange:async d=>t(f=>ie.set(f,"source.mapLayerKey",d))})}),c&&C.jsxs(qt,{variant:"body2",color:"text.secondary",sx:{mb:1},children:["Hint: Define source and destination nodes by clicking on valid regions on ",ia(c)]})]})}),service:B1(({value:e,produce:t})=>{const n=_c(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:l}]=ua(),[c]=hg(),[{algorithms:d}]=SE(),f=O.useMemo(()=>{if(i&&r)return ie.find(l,{key:i})},[i,r,l]);return GDe(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await dLe(c,r,g),S=ie.find(d,{id:r});if(y){n(`Executing ${ia(e)} using ${y.name}...`);const _=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>ie.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:_}))}}}},[f,c,r,o,s,t,n,e,d],[f,c,r,o,s]),C.jsx(C.Fragment,{})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},renderer:dS.renderer,steps:dS.steps,getSelectionInfo:dS.getSelectionInfo};function hLe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&O.createElement((n=jb[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function ia(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?jb[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function IZ(e){var t;return jb[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const jb={map:YDe,trace:dS,query:fLe};function pLe(e,t,n=600){const[r,i]=O.useState(e);O.useEffect(()=>void i(e),[i,e]);const o=O.useMemo(()=>ie.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function mLe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=pLe(e,t),o=g=>C.jsx(qt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(qt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(wn,{alignItems:"center",children:[s(g),C.jsx(Yr,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ie.startCase(v)})),d=r.name||ia(e);return C.jsx(C.Fragment,{children:C.jsxs(M1,{alignItems:"center",direction:"row",gap:2,children:[C.jsx(vY,{sx:{borderRadius:g=>g.spacing(2)},children:ie.slice(d,0,2)}),C.jsxs(Pt,{py:1,children:[C.jsx(qt,{children:d}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:ie.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(Yr,{flex:1}),C.jsx(M1,{alignItems:"center",direction:"row",children:C.jsx(ez,{appBar:{children:C.jsx(Z4,{children:"Edit Layer"})},trigger:g=>C.jsx(ip,{size:"small",onClick:g,children:C.jsx(s4,{})}),children:C.jsxs(Pt,{p:2,children:[C.jsx(Pt,{pb:2,children:C.jsx(Cb,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(sc(r,v=>ie.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Ss,{label:"Transparency",items:c(["100%"]),showArrow:!0})),l("Display Mode",C.jsx(Ss,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),l("Type",C.jsx(Ss,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ie.startCase(g)})),onChange:g=>i==null?void 0:i(sc(r,v=>ie.set(v,"source.type",g))),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&O.createElement(jb[r.source.type].editor,{onChange:i,value:r})]})})})]})})}const gLe=O.forwardRef(mLe);function vLe(){const[{layers:e=[]},t]=ua();return C.jsx(Pt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(Pt,{sx:{mb:2},children:C.jsx(GT,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(gLe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t({layers:n}),addItemLabel:"Layer",placeholderText:C.jsx(Pt,{pt:2,children:"Click the button below to add a layer."})})})})}function yLe(){const{controls:e,onChange:t,state:n}=zd();return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(Pt,{p:2,pr:1,pt:6,children:C.jsx(vLe,{})})}),C.jsx(Ln.Extras,{children:e})]})}function wm({label:e,icon:t,...n}){return C.jsx($d,{title:ie.startCase(e),children:C.jsx("span",{children:C.jsx(ip,{...n,children:t})})},e)}function RZ(e){return C.jsx(Mye,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function xLe({children:e}){return C.jsx(qt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var DE={exports:{}};/** +`;let eZ=class Ma extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:Ma.assignInternalProperties(go(this.props.data)),d3:Ma.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${sL()}`,this.gInstanceRef=`rd3t-g-${sL()}`,this.handleNodeToggle=t=>{const n=go(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(Ma.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):Ma.collapseNode(i),this.props.enableLegacyTransitions?(this.setState({data:n,isTransitioning:!0}),setTimeout(()=>this.setState({isTransitioning:!1}),this.props.transitionDuration+10)):this.setState({data:n}),this.internalState.targetNode=i)},this.handleAddChildrenToNode=(t,n)=>{const r=go(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=go(n).map(c=>Ma.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(go(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(go(t),go(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=wo(`.${this.gInstanceRef}`),l=wo(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(iL().transform,PE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:Ma.assignInternalProperties(go(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=Ma.calculateD3Geometry(t);return Zx(o,n.d3)||(r=r||{},r.d3=o),r}componentDidMount(){this.bindZoomListener(this.props),this.setState({isInitialRenderForDataset:!1})}componentDidUpdate(t){this.props.data!==t.data&&this.setState({isInitialRenderForDataset:!1}),(!Zx(this.props.translate,t.translate)||!Zx(this.props.scaleExtent,t.scaleExtent)||this.props.zoomable!==t.zoomable||this.props.draggable!==t.draggable||this.props.zoom!==t.zoom||this.props.enableLegacyTransitions!==t.enableLegacyTransitions)&&this.bindZoomListener(this.props),typeof this.props.onUpdate=="function"&&this.props.onUpdate({node:this.internalState.targetNode?go(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=wo(`.${this.svgInstanceRef}`),d=wo(`.${this.gInstanceRef}`);c.call(iL().transform,PE.translate(i.x,i.y).scale(o)),c.call(iL().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=sL(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=Ma.assignInternalProperties(o.children,n+1)),o})}findNodesById(t,n,r){return r.length>0||(r=r.concat(n.filter(i=>i.__rd3t.id===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesById(t,i.children,r))})),r}findNodesAtDepth(t,n,r){return r=r.concat(n.filter(i=>i.__rd3t.depth===t)),n.forEach(i=>{i.children&&i.children.length>0&&(r=this.findNodesAtDepth(t,i.children,r))}),r}static collapseNode(t){t.__rd3t.collapsed=!0,t.children&&t.children.length>0&&t.children.forEach(n=>{Ma.collapseNode(n)})}static expandNode(t){t.__rd3t.collapsed=!1}collapseNeighborNodes(t,n){this.findNodesAtDepth(t.__rd3t.depth,n,[]).filter(i=>i.__rd3t.id!==t.__rd3t.id).forEach(i=>Ma.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=mRe().nodeSize(o==="horizontal"?[i.y,i.x]:[i.x,i.y]).separation((h,p)=>h.parent.data.__rd3t.id===p.parent.data.__rd3t.id?r.siblings:r.nonSiblings)(tz(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(BOe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:I,parent:A}=_;return de.createElement(COe,{key:"node-"+b,data:x,position:{x:E,y:I},hierarchyPointNode:_,parent:A,nodeClassName:this.getNodeClassName(A,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};eZ.defaultProps={onNodeClick:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onLinkClick:void 0,onLinkMouseOver:void 0,onLinkMouseOut:void 0,onUpdate:void 0,orientation:"horizontal",translate:{x:0,y:0},pathFunc:"diagonal",pathClassFunc:void 0,transitionDuration:500,depthFactor:void 0,collapsible:!0,initialDepth:void 0,zoomable:!0,draggable:!0,zoom:1,scaleExtent:{min:.1,max:1},nodeSize:{x:140,y:140},separation:{siblings:1,nonSiblings:2},shouldCollapseNeighborNodes:!1,svgClassName:"",rootNodeClassName:"",branchNodeClassName:"",leafNodeClassName:"",renderCustomNodeElement:void 0,enableLegacyTransitions:!1,hasInteractiveNodes:!1,dimensions:void 0,centeringTransitionDuration:800,dataKey:void 0};const[dp,$Oe]=Gl({playback:"paused"});function Q1(){return Q1=Object.assign||function(e){for(var t=1;t0?1:-1}),lL}var sMe=iMe()?Math.sign:oMe(),aMe=sMe,lMe=Math.abs,uMe=Math.floor,cMe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:aMe(e)*uMe(lMe(e)))},dMe=cMe,fMe=Math.max,wp=function(e){return fMe(0,dMe(e))},hMe=wp,iZ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:hMe(e)},jd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},pMe=bp,jg=function(e){if(!pMe(e))throw new TypeError("Cannot use null or undefined");return e},mMe=jd,gMe=jg,vMe=Function.prototype.bind,HH=Function.prototype.call,yMe=Object.keys,xMe=Object.prototype.propertyIsEnumerable,bMe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(gMe(n)),mMe(r),i=yMe(n),s&&i.sort(typeof s=="function"?vMe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),HH.call(e,i,function(l,c){return xMe.call(n,l)?HH.call(r,o,n[l],l,n,c):t})}},QT=bMe("forEach"),_p={},oZ={exports:{}},wMe=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},uL,WH;function _Me(){return WH||(WH=1,uL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),uL}var cL,GH;function SMe(){if(GH)return cL;GH=1;var e=bp,t=Object.keys;return cL=function(n){return t(e(n)?Object(n):n)},cL}var dL,VH;function EMe(){return VH||(VH=1,dL=_Me()()?Object.keys:SMe()),dL}var fL,XH;function CMe(){if(XH)return fL;XH=1;var e=EMe(),t=jg,n=Math.max;return fL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},gL}var WMe=jMe()?String.prototype.contains:HMe(),cS=dZ,eW=UMe,fZ=sZ,hZ=rZ,e1=WMe,GMe=cZ.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],cS(e)?(n=e1.call(e,"c"),r=e1.call(e,"e"),i=e1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?fZ(hZ(o),s):s};GMe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],cS(t)?eW(t)?cS(n)?eW(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,cS(e)?(r=e1.call(e,"c"),i=e1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?fZ(hZ(o),s):s};var Sp=cZ.exports,vF={exports:{}};(function(e,t){var n=Sp,r=jd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,R;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(R=0;A=I[R];++R)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[R?0:1]:I.splice(R,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,R;if(d.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=g?d.call(g,v,M,_):M,y?(f.value=M,h(b,_,f)):b[_]=M,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},JL}var QL,FW;function zke(){if(FW)return QL;FW=1;var e=Fke(),t=/[\n\r\u2028\u2029]/g;return QL=function(n){var r=e(n);return r.length>100&&(r=r.slice(0,99)+"…"),r=r.replace(t,function(i){return JSON.stringify(i).slice(1,-1)}),r},QL}var e_={exports:{}},zW;function xZ(){if(zW)return e_.exports;zW=1,e_.exports=e,e_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return e_.exports}var UW;function Uke(){if(UW)return kW;UW=1;var e=vZ(),t=Bke(),n=$ke(),r=zke(),i=xZ(),o=gz(),s=Object.create,l=t("then","then:finally","done","done:finally");return _p.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(I){var A=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);A&&(delete f[g],h[g]=I,d.emit("setasync",g,A))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(I){o(_.bind(this,I))},E),typeof y.finally=="function"&&y.finally(E)}else if(x==="done"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");y.done(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},kW}var jW={},HW;function jke(){if(HW)return jW;HW=1;var e=jd,t=QT,n=_p,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},jW}var WW={},ZL,GW;function Hke(){return GW||(GW=1,ZL=2147483647),ZL}var eB,VW;function Wke(){if(VW)return eB;VW=1;var e=wp,t=Hke();return eB=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},eB}var XW;function Gke(){if(XW)return WW;XW=1;var e=pz(),t=QT,n=gz(),r=xZ(),i=Wke(),o=_p,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},WW}var qW={},tB,YW;function Vke(){if(YW)return tB;YW=1;var e=wp,t=Object.create,n=Object.prototype.hasOwnProperty;return tB=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},tB}var KW;function Xke(){if(KW)return qW;KW=1;var e=wp,t=Vke(),n=_p;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},qW}var JW={},QW;function qke(){if(QW)return JW;QW=1;var e=Sp,t=_p,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},JW}var Yke=rZ,Kke=iZ,Jke=Tke,Qke=function(e){var t=Yke(arguments[1]),n;return t.normalizer||(n=t.length=Kke(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=Ike():n>1&&(t.normalizer=Rke()(n)):n===!1?t.normalizer=Mke()():n===1?t.normalizer=kke()():t.normalizer=Dke()(n))),t.async&&Lke(),t.promise&&Uke(),t.dispose&&jke(),t.maxAge&&Gke(),t.max&&Xke(),t.refCounter&&qke(),Jke(e,t)};const Hg=al(Qke),Zke=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},eDe=e=>t=>Zke(e)(n=>(n.postMessage(t),new Promise(r=>{n.onmessage=i=>{r(i.data)}}))),Wg=(e,t={async:!0,length:1})=>Hg(eDe(e),t),tDe=""+new URL("tree.worker-a5e2610c.js",import.meta.url).href;class nDe extends Worker{constructor(){super(tDe,{type:"module"})}}const rDe=Wg(nDe);function iDe(e){return Ug(async()=>await rDe(e),[e])}function oDe(e,t){const n=O.useMemo(()=>e,t);return iDe(n)}const sDe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),aDe=eZ;function bZ(e,t=!1){const[n,r]=O.useState();return O.useEffect(()=>{t||e&&r(e)},[e,t]),n}const ZW={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function lDe(){var _,b,x,E;const[{step:e=0}]=dp(),t=u4(e,600),{palette:n}=Pn(),[{layers:r}]=ua(),[i,o]=O.useState();O.useEffect(()=>{var I;i||o((I=ie.head(r))==null?void 0:I.key)},[i,o,r]);const s=ie.find(r,{key:i}),{controls:l,onChange:c,state:d}=zd(),[f,h]=O.useState("small"),p=k1({"&.rd3t-link":{stroke:Rn(n.text.primary,n.action.disabledOpacity)}}),{result:g,loading:v}=oDe({trace:(b=(_=s==null?void 0:s.source)==null?void 0:_.trace)==null?void 0:b.content,step:t,radius:ZW[f].value},[t,s,f]),y=bZ(g,v),S=O.useCallback(()=>p,[p]);return C.jsxs(Ln,{onChange:c,stack:d,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{children:(E=(x=s==null?void 0:s.source)==null?void 0:x.trace)!=null&&E.content&&(y!=null&&y.tree)?C.jsx(A4,{children:({width:I,height:A})=>C.jsx(Pt,{width:I,height:A,children:C.jsx(aDe,{scaleExtent:{max:10,min:.01},translate:{x:I/2,y:I/2},data:y.tree,dimensions:{width:I,height:A},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:R,onNodeClick:M})=>C.jsx(uDe,{node:R,onClick:()=>M==null?void 0:M({})})})})}):C.jsx(Lh,{icon:C.jsx($Y,{}),label:"Tree"})})})," ",C.jsxs(Ln.Options,{children:[C.jsx(Ss,{icon:C.jsx(TT,{}),label:"Layer",value:i,items:ie.map(r,I=>({id:I.key,name:ia(I)})),onChange:o,showArrow:!0}),sDe,C.jsx(Ss,{icon:C.jsx(qye,{}),label:"Radius",value:f,onChange:I=>h(I),items:ie.map(ie.entries(ZW),([I,A])=>({id:I,...A})),showArrow:!0})]}),C.jsx(Ln.Extras,{children:l})]})}const Jy=16,ju=4;function uDe({onClick:e,node:t}){var h;const[{step:n=0},r]=dp(),i=u4(n,1e3/24),{palette:o,spacing:s,shape:l}=Pn(),c=ie.findLast(t==null?void 0:t.events,p=>p.step<=i),d=!!ie.find(t==null?void 0:t.events,p=>p.step===i),f=V1((h=c==null?void 0:c.data)==null?void 0:h.type);return C.jsx(Bg,{variant:"popover",children:p=>{var g,v;return C.jsxs(C.Fragment,{children:[C.jsx($d,{title:`f: ${((g=c==null?void 0:c.data)==null?void 0:g.f)??"unknown"}, g: ${((v=c==null?void 0:c.data)==null?void 0:v.g)??"unknown"}`,children:C.jsxs("g",{onClick:y=>{p.open(y)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,width:s(Jy),height:s(ju),rx:l.borderRadius})}),C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,fill:o.background.default,width:s(Jy),height:s(ju),clipPath:"url(#clipPath)"}),d&&C.jsx("rect",{y:s(-ju/2),x:s(-.25),strokeWidth:0,fill:Rn(o.primary.main,o.action.selectedOpacity),width:s(Jy),height:s(ju),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:s(-.25),y:s(-ju/2),height:s(ju),width:s(.5),fill:f,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:s(4),fill:o.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:s(2-.25),alignmentBaseline:"central",children:t==null?void 0:t.name}),!!(t!=null&&t.cumulativeChildCount)&&C.jsxs(C.Fragment,{children:[C.jsx("text",{strokeWidth:0,height:s(4),fill:o.text.secondary,y:0,x:s(Jy-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(Rye,{width:s(2),height:s(2),x:s(Jy-2-1),y:s(-ju/2+1),strokeWidth:0,fill:o.text.primary,opacity:o.action.disabledOpacity})]})]})}),C.jsx(Dg,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...BT(p),children:C.jsx(r4,{dense:!0,sx:{p:0},children:ie.map(t==null?void 0:t.events,y=>C.jsx(pd,{selected:y.step===i,sx:{borderLeft:`4px solid ${V1(y.data.type)}`},onClick:()=>{p.close(),e==null||e(),ie.delay(()=>r({step:y.step}),150)},children:C.jsx(a4,{primary:ie.startCase(y.data.type),secondary:`Step ${y.step}`})}))})})]})}})}function cDe({selection:e,onClose:t}){const n=dDe(),r=bZ(e),{client:i}=e??{};return C.jsx(Dg,{open:!!e,anchorReference:"anchorPosition",anchorPosition:{top:(i==null?void 0:i.y)??0,left:(i==null?void 0:i.x)??0},onClose:t,keepMounted:!0,children:C.jsx(r4,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ie.entries(o);return s.length?ie.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(wc,{sx:{my:1,mx:2}}),c&&C.jsx(Vx,{sx:{py:0},children:C.jsx(qt,{color:"text.secondary",variant:"overline",children:c})}),ie.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(pd,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(hd,{children:p}),C.jsx(Dl,{primary:g,sx:{mr:4}}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Vx,{children:[p&&C.jsx(hd,{children:p}),C.jsx(Dl,{primary:g,sx:{mr:4}}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Vx,{children:C.jsx(qt,{children:"No info to show."})})})}})})})}const eG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function dDe(){const[{layers:e}]=ua();return O.useMemo(()=>ie.chain(e).reduce((t,n)=>{var i;const r=((i=RZ(n))==null?void 0:i.getSelectionInfo)??eG;return({children:o,event:s})=>C.jsx(r,{layer:n,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ie.merge(l,c))})})},eG).value(),[e])}const[eI,fDe]=Gl([],{reduce:XY}),hDe={tileSubdivision:2,workerCount:2,tileResolution:{width:1024,height:1024}},wZ=O.createContext({});function pDe(){return O.useContext(wZ)}function mDe(e,{width:t,height:n}={}){const r=Pn(),[i]=eI(),o=O.useRef(null),[s,l]=O.useState(""),[c,d]=O.useState();return O.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ie.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...hDe,backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ie.map,e,i,r,l,d]),fxe(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function gDe(){const[{map:e,specimen:t}]=VT();return!!(e||t)&&C.jsx(t4,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function vDe({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=mDe(n,{width:e,height:t}),[c,d]=O.useState();O.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=O.useMemo(()=>({renderer:o}),[o]);return O.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(gDe,{}),C.jsx(wZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(Cye,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(Pt,{ref:l,children:i.map(h=>C.jsx(hLe,{layer:h},h.key))})}):C.jsx(Lh,{icon:C.jsx(WY,{}),label:"No layers to render",width:e,height:t})}),C.jsx(cDe,{selection:c,onClose:()=>d(void 0)})]})}function ME({nodes:e}){const{renderer:t}=pDe();return O.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function yDe({nodes:e,step:t}){const r=ie.floor((t??0)/200)*200,i=O.useMemo(()=>ie.slice(e,0,r),[e,r]),o=O.useMemo(()=>ie.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(ME,{nodes:i}),C.jsx(ME,{nodes:o})]})}const tI=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,xDe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class bDe extends Worker{constructor(){super(xDe,{type:"module"})}}const wDe=Wg(bDe),{floor:tG}=Math;function nG(e,t,n){return e>=t&&e({...await wDe({map:e,options:t})}),{normalizer:JSON.stringify}),SDe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[tG(r+o/2),tG(i+o/2)];if(nG(s,0,t)&&nG(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:tI}},EDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:SDe,parse:_De},Symbol.toStringTag,{value:"Module"})),CDe=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class TDe extends Worker{constructor(){super(CDe,{type:"module"})}}const IDe=Wg(TDe),RDe=Hg(async(e="",t)=>await IDe({map:e,options:t}),{normalizer:JSON.stringify}),ADe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),PDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:ADe,parse:RDe},Symbol.toStringTag,{value:"Module"})),ODe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class MDe extends Worker{constructor(){super(ODe,{type:"module"})}}const kDe=Wg(MDe),DDe=Hg(async(e="",t)=>await kDe({map:e,options:t}),{normalizer:JSON.stringify}),LDe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),BDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:LDe,parse:DDe},Symbol.toStringTag,{value:"Module"})),NDe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class $De extends Worker{constructor(){super(NDe,{type:"module"})}}const FDe=Wg($De),zDe=Hg(async(e="",t)=>await FDe({map:e,options:t}),{normalizer:JSON.stringify}),UDe=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:tI}),jDe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:UDe,parse:zDe},Symbol.toStringTag,{value:"Module"})),vz={grid:EDe,xy:BDe,mesh:PDe,poly:jDe};function _Z(e=""){return vz[e]}const HDe=(e,t,n)=>{const r=O.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return O.useEffect(o?()=>void e():()=>{},o?t:s)};function WDe(e,t){return ie.zip(e,t).every(([n,r])=>n===r)}const GDe=(e,t=[],n=[])=>{const[r,i]=O.useState(t),[o,s]=O.useState(n);return O.useEffect(()=>{WDe(o,n)||(i(t),s(n))},[t,n,o]),nZ(e,[...r,...o])};function yz(){const[e]=hg();return O.useCallback(t=>ie.find(e,t),[e])}function VDe(e){return yz()({url:e})}function XDe(e){const t=_c(),n=xp("map"),r=yz(),i=O.useMemo(()=>Hg(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return Ug(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function qDe(e){const t=_c(),n=Pn(),r=xp("map"),{format:i,content:o}=e??{};return Ug(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Rg:Ig;if(i&&o){t("Processing map...");const d=await((c=(l=_Z(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const YDe={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ie.startCase(e.source.map.format)})`:"Untitled Map"},editor:B1(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(G1,{label:"Source",content:C.jsx(WIe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ie.set(i,"source.map",r))})})})}),renderer:({layer:e})=>{var r;const{nodes:t}=((r=e==null?void 0:e.source)==null?void 0:r.parsedMap)??{},n=O.useMemo(()=>[t??[]],[t]);return C.jsx(ME,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:B1(({value:e,produce:t})=>{var i;const{result:n}=XDe((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=qDe(n);return HDe(()=>void t(o=>ie.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{parsedMap:r}=(n==null?void 0:n.source)??{},[{layers:i},o]=ua(),{point:s,node:l}=O.useMemo(()=>{var d,f,h,p;if(r&&t){const g=(p=(h=_Z((f=(d=n==null?void 0:n.source)==null?void 0:d.map)==null?void 0:f.format))==null?void 0:h.hydrate)==null?void 0:p.call(h,r);if(g){const v=(t==null?void 0:t.world)&&g.snap(t.world);if(v){const y=(t==null?void 0:t.world)&&g.nodeAt(v);return{point:v,node:y}}}}return{}},[r,t]),c=O.useMemo(()=>{const d=ie.filter(i,{source:{type:"query"}});return{...n&&s&&!ie.isUndefined(l)&&{[n.key]:{primary:ia(n),items:{point:{primary:"Point",secondary:`(${ie.round(s.x,2)}, ${ie.round(s.y,2)})`},...ie.reduce(d,(f,h)=>({...f,[`${h.key}-a`]:{primary:"Set as source",secondary:ia(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?sc(p,g=>{ie.set(g,"source.start",l),ie.set(g,"source.query",void 0),ie.set(g,"source.mapLayerKey",n.key),ie.set(g,"source.trace",void 0)}):p)}),icon:C.jsx(Xye,{sx:{transform:"scale(0.5)"}})},[`${h.key}-b`]:{primary:"Set as destination",secondary:ia(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?sc(p,g=>{ie.set(g,"source.end",l),ie.set(g,"source.query",void 0),ie.set(g,"source.mapLayerKey",n.key),ie.set(g,"source.trace",void 0)}):p)}),icon:C.jsx(zye,{})}}),{})}}}}},[s,l,n,i,o]);return C.jsx(C.Fragment,{children:e==null?void 0:e(c)})}};function KDe({label:e,value:t,type:n}){return C.jsxs(wn,{width:"auto",mr:3,mt:.5,children:[C.jsx(qt,{component:"div",sx:{opacity:.54},...n,children:e}),C.jsx(Yr,{}),C.jsx(qt,{component:"div",...n,children:t??"none"})]},`${e}::${t}`)}function yF({event:e,variant:t="body2",...n}){return C.jsx(wn,{...n,children:ie.map(ie.filter(ie.entries(e),([,r])=>r!==void 0),([r,i])=>C.jsx(KDe,{label:r,value:i,type:{variant:t}}))})}var SZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,l){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(l){var c=l===void 0?{}:l,d=c.ESCAPE,f=d===void 0?/^\\/:d,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,_=c.PIPE_PARAMETER_START,b=_===void 0?/^\s*:\s*/:_,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,I=c.QUOTED_STRING_TEST,A=I===void 0?null:I,R=c.QUOTED_STRING_GET_AND_ADVANCE,M=R===void 0?null:R,L=c.QUOTED_STRING_IN_PARAMETER_TEST,B=L===void 0?null:L,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,G=H===void 0?null:H,U=A||function(V){return E.test(V)},D=M||s(E),F=B||function(V){return E.test(V)},z=G||s(E);return function(V){function W(Pe){Pe===void 0&&(Pe=1),pe=pe.substr(Pe)}function K(Pe){Pe===void 0&&(Pe=/^/),W(pe.match(Pe)[0].length)}function Y(){var Pe;return K(f),Pe=pe.length>0?pe[0]:"",W(),Pe}function Q(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;me={name:"",pipes:[]},Xe=!it}function re(){ve.variables.push(me),Q({isNull:!0})}function ue(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;xe={name:"",parameters:[]},at=!it}function ce(){me.pipes.push(xe),ue({isNull:!0})}function se(Pe){var Fe=(Pe===void 0?{}:Pe).isNull,it=Fe!==void 0&&Fe;Je="",Lt=!it}function J(){xe.parameters.push(Je),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&J(),ye>=2&&ce(),ye>=1&&re(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&J(),ye>=2&&ce(),ye>=1&&ue(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&J(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,be="",me={name:"",pipes:[]},xe={name:"",parameters:[]},Je="",Xe=!1,at=!1,Lt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){be+=Y();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(be),be="",K(p);continue}be+=pe[0],W();break;case 1:if(f.test(pe)){me.name+=Y();continue}if(ae()||le())continue;if(U(pe)){me.name+=D(pe,W);continue}me.name+=pe[0],W();break;case 2:if(f.test(pe)){xe.name+=Y();continue}if(ae()||he()||le())continue;if(U(pe)){xe.name+=D(pe,W);continue}xe.name+=pe[0],W();break;case 3:if(f.test(pe)){Je+=Y();continue}if(ae()||he()||le())continue;if(F(pe)){Je+=z(pe,W);continue}Je+=pe[0],W()}return Lt&&xe.parameters.push(Je),at&&me.pipes.push(xe),Xe&&ve.variables.push(me),ve.literals.push(be),ve}}function s(l){return function(c,d){var f=c.match(l);return d(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var l in s)r.hasOwnProperty(l)||(r[l]=s[l])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function l(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return l(d.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var d=i(0);r.evaluateParsedString=l,r.evaluateStringTemplate=c}])})})(SZ);var rG=SZ.exports;function xz(e={},t){const{$:n,...r}=e;return{...ie.mapValues(r,t),$:n}}function xF(e){switch(e==null?void 0:e.constructor){case Array:{const t=ie.map(e,xF);return n=>ie.map(t,r=>r(n))}case Object:{const t=ie.mapValues(e,xF);return n=>ie.mapValues(t,r=>r(n))}case String:return bF(e);default:return ie.constant(e)}}function kE(e={}){return xz(e,t=>ie.isFunction(t)?t:xF(t))}function iG(e){const t=Function("ctx",`return ${e};`);return n=>t(new Proxy(kE(n),{get(r,i){return r[i]({})}}))}const JDe=/^\{\{\s*/,QDe=/^\s*\}\}/,nB=/\b\B/;function bF(e){const n=rG.parseStringTemplateGenerator({VARIABLE_START:JDe,VARIABLE_END:QDe,PIPE_START:nB,PIPE_PARAMETER_START:nB,QUOTED_STRING:nB})(e);return ie.join(n.literals,"")?r=>rG.evaluateParsedString(n,{},{},i=>iG(i)(r)):iG(n.variables[0].name)}function ZDe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var EZ={exports:{}};(function(e,t){(function(n,r){typeof ZDe=="function"?e.exports=r():n.pluralize=r()})(Xt,function(){var n=[],r=[],i={},o={},s={};function l(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function d(y,S){return y.replace(/\$(\d{1,2})/g,function(_,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(_,b){var x=d(S[1],arguments);return c(_===""?y[b-1]:_,x)})}function h(y,S,_){if(!y.length||i.hasOwnProperty(y))return S;for(var b=_.length;b--;){var x=_[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,_){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,_)}}function g(y,S,_,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,_)===E}}function v(y,S,_){var b=S===1?v.singular(y):v.plural(y);return(_?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([l(y),S])},v.addSingularRule=function(y,S){r.push([l(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(EZ);var eLe=EZ.exports;const tLe=al(eLe),nLe=""+new URL("parseTrace.worker-e46e9d4a.js",import.meta.url).href;class rLe extends Worker{constructor(){super(nLe,{type:"module"})}}const iLe=Wg(rLe);function oLe(e){const t=_c(),n=xp("specimen");return Ug(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");const i=await iLe(e);return t("Trace loaded",tLe("step",((r=i==null?void 0:i.steps)==null?void 0:r.length)??0,!0)),i}}),[e])}function sLe(e,t){const n=O.useMemo(()=>e,t);return oLe(n)}function CZ(e,t){const n=xz(t,r=>i=>r(CZ(kE(i),e)));return{...e,...n}}function TZ(e,t,n={}){return e.flatMap(r=>{const{$:i}=r,o=CZ(kE(n),kE(r));return i in t?TZ(t[i],t,o):[o]})}const aLe={color:XT};function IZ(e,t="main"){const n=Pn();return O.useMemo(()=>{var i,o,s,l;const r=TZ(((s=(o=(i=e==null?void 0:e.render)==null?void 0:i.views)==null?void 0:o[t])==null?void 0:s.components)??[],((l=e==null?void 0:e.render)==null?void 0:l.components)??{});return{events:(e==null?void 0:e.events)??[],apply:(c,d)=>ie.map(r,f=>xz(f,h=>h({fill:n.palette.primary.main,alpha:1,...aLe,...d,...c})))}},[e,t,n])}const lLe=e=>e==null;function uLe(e){const t=[],n={},r={},i=ie.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ie.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!lLe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ie.last(t)}),n[l]=c),r[d]=ie.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ie.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const dS={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:B1(({value:e,produce:t})=>{var n,r;return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Trace",content:C.jsx(GIe,{onChange:i=>t(o=>ie.set(o,"source.trace",i)),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(G1,{label:"Onion Skinning",content:C.jsx(Ss,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(i=>({id:i,name:ie.startCase(i)})),onChange:i=>t(o=>ie.set(o,"source.onion",i))})})]})}),renderer:({layer:e})=>{var l,c,d;const{palette:t}=Pn(),[{step:n=0}]=dp(),r=u4(n,1e3/60),{result:i}=sLe({trace:(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content,context:{color:XT,themeAccent:t.primary.main,themeTextPrimary:t.text.primary,themeBackground:t.background.paper},view:"main"},[t,(d=e==null?void 0:e.source)==null?void 0:d.trace]),o=cLe(e,r),s=O.useMemo(()=>ie.map(i==null?void 0:i.steps,f=>ie.map(f,h=>ie.merge(h,{meta:{sourceLayer:e==null?void 0:e.key}}))),[i==null?void 0:i.steps,e]);return C.jsxs(C.Fragment,{children:[C.jsx(yDe,{step:r,nodes:s}),o]})},steps:({layer:e,children:t})=>{var r,i;const{events:n}=IZ((i=(r=e==null?void 0:e.source)==null?void 0:r.trace)==null?void 0:i.content);return C.jsx(C.Fragment,{children:t==null?void 0:t(n)})},getSelectionInfo:({layer:e,event:t,children:n})=>{const[,r]=dp(),i=O.useMemo(()=>{var l,c,d,f;const o=((d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.events)??[],s=ie.chain((f=t==null?void 0:t.info)==null?void 0:f.components).filter(h=>{var p;return((p=h.meta)==null?void 0:p.sourceLayer)===(e==null?void 0:e.key)}).map(h=>{var p;return(p=h.meta)==null?void 0:p.step}).filter(ie.negate(ie.isUndefined)).sort((h,p)=>p-h).value();if(s.length&&e){const h=ie.last(s),p=o[h];if(p)return{[e.key]:{primary:ia(e),items:{properties:{index:-1,primary:C.jsx(yF,{event:ie.pick(p,["id","f","g","pId"]),vertical:!0})},[`${p}`]:{primary:`Go to Step ${h}`,secondary:`${ie.startCase(p.type)}`,action:()=>r({step:h}),icon:C.jsx(Sye,{})}}}}}return{}},[e,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(i)})}};function cLe(e,t=0){var o,s;const{palette:n}=Pn(),{getPath:r}=O.useMemo(()=>{var l,c;return(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)!=null&&c.content?uLe(e.source.trace.content):{getParent:ie.constant(void 0),getPath:ie.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return O.useMemo(()=>{var l,c,d,f;if((f=(d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?bF(g):b=>b.x,S=v?bF(v):b=>b.y,_=ie.map(r(t),b=>{var x,E,I,A;return(A=(I=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:I.events)==null?void 0:A[b]});if(_.length){const b=[{$:"rect",x:y({x:0,y:0,...ie.head(_)})-2*p/2,y:S({x:0,y:0,...ie.head(_)})-2*p/2,fill:V1("destination"),width:2*p,height:2*p},{$:"rect",x:y({x:0,y:0,...ie.last(_)})-2*p/2,y:S({x:0,y:0,...ie.last(_)})-2*p/2,fill:V1("source"),width:2*p,height:2*p},{$:"path",points:_.map(x=>({x:y({x:0,y:0,...x}),y:S({x:0,y:0,...x})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(ME,{nodes:[ie.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}async function dLe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ie.find(i,{id:t})&&ie.find(o,{id:n}))return r}}const fLe={key:"query",editor:B1(({value:e,produce:t})=>{const{algorithm:n,mapLayerKey:r}=(e==null?void 0:e.source)??{},[{layers:i}]=ua(),[{algorithms:o}]=SE(),[s]=hg(),l=ie.filter(i,d=>{var f;return((f=d.source)==null?void 0:f.type)==="map"}),c=ie.find(l,{key:r});return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Algorithm",content:C.jsx(Ss,{showArrow:!0,label:"Choose Algorithm",value:n,items:o.map(d=>{var f;return{...d,description:(f=ie.find(s,{url:d.source}))==null?void 0:f.name}}),onChange:async d=>t(f=>ie.set(f,"source.algorithm",d))})}),!(o!=null&&o.length)&&C.jsx(qt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(G1,{label:"Map",content:C.jsx(Ss,{showArrow:!0,label:"Choose Layer",value:r,items:l.map(d=>({id:d.key,name:ia(d)})),onChange:async d=>t(f=>ie.set(f,"source.mapLayerKey",d))})}),c&&C.jsxs(qt,{variant:"body2",color:"text.secondary",sx:{mb:1},children:["Hint: Define source and destination nodes by clicking on valid regions on ",ia(c)]})]})}),service:B1(({value:e,produce:t})=>{const n=_c(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:l}]=ua(),[c]=hg(),[{algorithms:d}]=SE(),f=O.useMemo(()=>{if(i&&r)return ie.find(l,{key:i})},[i,r,l]);return GDe(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await dLe(c,r,g),S=ie.find(d,{id:r});if(y){n(`Executing ${ia(e)} using ${y.name}...`);const _=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>ie.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:_}))}}}},[f,c,r,o,s,t,n,e,d],[f,c,r,o,s]),C.jsx(C.Fragment,{})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},renderer:dS.renderer,steps:dS.steps,getSelectionInfo:dS.getSelectionInfo};function hLe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&O.createElement((n=jb[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function ia(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?jb[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function RZ(e){var t;return jb[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const jb={map:YDe,trace:dS,query:fLe};function pLe(e,t,n=600){const[r,i]=O.useState(e);O.useEffect(()=>void i(e),[i,e]);const o=O.useMemo(()=>ie.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function mLe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=pLe(e,t),o=g=>C.jsx(qt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(qt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(wn,{alignItems:"center",children:[s(g),C.jsx(Yr,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ie.startCase(v)})),d=r.name||ia(e);return C.jsx(C.Fragment,{children:C.jsxs(M1,{alignItems:"center",direction:"row",gap:2,children:[C.jsx(vY,{sx:{borderRadius:g=>g.spacing(2)},children:ie.slice(d,0,2)}),C.jsxs(Pt,{py:1,children:[C.jsx(qt,{children:d}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:ie.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(Yr,{flex:1}),C.jsx(M1,{alignItems:"center",direction:"row",children:C.jsx(ez,{appBar:{children:C.jsx(Z4,{children:"Edit Layer"})},trigger:g=>C.jsx(ip,{size:"small",onClick:g,children:C.jsx(s4,{})}),children:C.jsxs(Pt,{p:2,children:[C.jsx(Pt,{pb:2,children:C.jsx(Cb,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(sc(r,v=>ie.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Ss,{label:"Transparency",items:c(["100%"]),showArrow:!0})),l("Display Mode",C.jsx(Ss,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),l("Type",C.jsx(Ss,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ie.startCase(g)})),onChange:g=>i==null?void 0:i(sc(r,v=>ie.set(v,"source.type",g))),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&O.createElement(jb[r.source.type].editor,{onChange:i,value:r})]})})})]})})}const gLe=O.forwardRef(mLe);function vLe(){const[{layers:e=[]},t]=ua();return C.jsx(Pt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(Pt,{sx:{mb:2},children:C.jsx(GT,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(gLe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t({layers:n}),addItemLabel:"Layer",placeholderText:C.jsx(Pt,{pt:2,children:"Click the button below to add a layer."})})})})}function yLe(){const{controls:e,onChange:t,state:n}=zd();return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(Pt,{p:2,pr:1,pt:6,children:C.jsx(vLe,{})})}),C.jsx(Ln.Extras,{children:e})]})}function wm({label:e,icon:t,...n}){return C.jsx($d,{title:ie.startCase(e),children:C.jsx("span",{children:C.jsx(ip,{...n,children:t})})},e)}function AZ(e){return C.jsx(kye,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function xLe({children:e}){return C.jsx(qt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var DE={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -530,18 +530,18 @@ __p += '`),tt&&(oe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Ve=Sy(function(){return ct(k,we+"return "+oe).apply(n,N)});if(Ve.source=oe,Kf(Ve))throw Ve;return Ve}function HM(a){return dt(a).toLowerCase()}function WM(a){return dt(a).toUpperCase()}function GM(a,u,m){if(a=dt(a),a&&(m||u===n))return Mv(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),k=kv(w,T),N=Dv(w,T)+1;return Pi(w,k,N).join("")}function VM(a,u,m){if(a=dt(a),a&&(m||u===n))return a.slice(0,Bv(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=Dv(w,yr(u))+1;return Pi(w,0,T).join("")}function XM(a,u,m){if(a=dt(a),a&&(m||u===n))return a.replace(ro,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=kv(w,yr(u));return Pi(w,T).join("")}function qM(a,u){var m=B,w=H;if(Nt(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=dt(a);var k=a.length;if(Qo(a)){var N=yr(a);k=N.length}if(m>=k)return a;var j=m-Zo(w);if(j<1)return w;var q=N?Pi(N,0,j).join(""):a.slice(0,j);if(T===n)return q+w;if(N&&(j+=q.length-j),Jf(T)){if(a.slice(j).search(T)){var te,ne=q;for(T.global||(T=hf(T.source,dt(Qn.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;q=q.slice(0,oe===n?j:oe)}}else if(a.indexOf(Vn(T),j)!=j){var fe=q.lastIndexOf(T);fe>-1&&(q=q.slice(0,fe))}return q+w}function YM(a){return a=dt(a),a&&Fr.test(a)?a.replace(Mr,ER):a}var KM=ss(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),eh=E0("toUpperCase");function _y(a,u,m){return a=dt(a),u=m?n:u,u===n?xR(a)?IR(a):cR(a):a.match(u)||[]}var Sy=qe(function(a,u){try{return Wn(a,n,u)}catch(m){return Kf(m)?m:new De(m)}}),JM=ni(function(a,u){return tr(u,function(m){m=jr(m),ei(a,m,qf(a[m],a))}),a});function QM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new nr(s);return[m(w[0]),w[1]]}):[],qe(function(w){for(var T=-1;++TW)return[];var m=Q,w=gn(a,Q);u=Ce(u),a-=Q;for(var T=cf(w,u);++m0||u<0)?new Qe(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Qe.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Qe.prototype.toArray=function(){return this.take(Q)},zr(Qe.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],k=w||/^find/.test(u);T&&(P.prototype[u]=function(){var N=this.__wrapped__,j=w?[1]:arguments,q=N instanceof Qe,te=j[0],ne=q||Ne(N),oe=function(Ke){var tt=T.apply(P,Ei([Ke],j));return w&&fe?tt[0]:tt};ne&&m&&typeof te=="function"&&te.length!=1&&(q=ne=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=k&&!fe,Ve=q&&!we;if(!k&&ne){N=Ve?N:new Qe(this);var Ie=a.apply(N,j);return Ie.__actions__.push({func:Mu,args:[oe],thisArg:n}),new rr(Ie,fe)}return Te&&Ve?a.apply(this,j):(Ie=this.thru(oe),Te?w?Ie.value()[0]:Ie.value():Ie)})}),tr(["pop","push","shift","sort","splice","unshift"],function(a){var u=iu[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var k=this.value();return u.apply(Ne(k)?k:[],T)}return this[m](function(N){return u.apply(Ne(N)?N:[],T)})}}),zr(Qe.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";gt.call(rs,w)||(rs[w]=[]),rs[w].push({name:u,func:m})}}),rs[Cu(n,_).name]=[{name:"wrapper",func:n}],Qe.prototype.clone=YR,Qe.prototype.reverse=KR,Qe.prototype.value=JR,P.prototype.at=T2,P.prototype.chain=I2,P.prototype.commit=R2,P.prototype.next=A2,P.prototype.plant=O2,P.prototype.reverse=M2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=k2,P.prototype.first=P.prototype.head,ma&&(P.prototype[ma]=P2),P},es=RR();oo?((oo.exports=es)._=es,tf._=es):dn._=es}).call(Xt)})(DE,DE.exports);var Jt=DE.exports;let bLe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var Ep=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Ep||{}),AZ=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(AZ||{}),wF=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(wF||{}),kt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(kt||{}),Il=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Il||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),Bm=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(Bm||{}),At=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(At||{}),_F=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(_F||{}),nc=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(nc||{}),bd=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(bd||{}),jl=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(jl||{}),cl=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(cl||{}),_l=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(_l||{}),bz=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(bz||{}),Ks=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(Ks||{}),ai=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(ai||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Bl=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Bl||{});const wLe={createCanvas:(e,t)=>{const n=document.createElement("canvas");return n.width=e,n.height=t,n},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},et={ADAPTER:wLe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rB=/iPhone/i,oG=/iPod/i,sG=/iPad/i,aG=/\biOS-universal(?:.+)Mac\b/i,iB=/\bAndroid(?:.+)Mobile\b/i,lG=/Android/i,Lp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,t_=/Silk/i,Hu=/Windows Phone/i,uG=/\bWindows(?:.+)ARM\b/i,cG=/BlackBerry/i,dG=/BB10/i,fG=/Opera Mini/i,hG=/\b(CriOS|Chrome)(?:.+)Mobile/i,pG=/Mobile(?:.+)Firefox\b/i,mG=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function _Le(e){return function(t){return t.test(e)}}function gG(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);var i=_Le(n),o={apple:{phone:i(rB)&&!i(Hu),ipod:i(oG),tablet:!i(rB)&&(i(sG)||mG(t))&&!i(Hu),universal:i(aG),device:(i(rB)||i(oG)||i(sG)||i(aG)||mG(t))&&!i(Hu)},amazon:{phone:i(Lp),tablet:!i(Lp)&&i(t_),device:i(Lp)||i(t_)},android:{phone:!i(Hu)&&i(Lp)||!i(Hu)&&i(iB),tablet:!i(Hu)&&!i(Lp)&&!i(iB)&&(i(t_)||i(lG)),device:!i(Hu)&&(i(Lp)||i(t_)||i(iB)||i(lG))||i(/\bokhttp\b/i)},windows:{phone:i(Hu),tablet:i(uG),device:i(Hu)||i(uG)},other:{blackberry:i(cG),blackberry10:i(dG),opera:i(fG),firefox:i(pG),chrome:i(hG),device:i(cG)||i(dG)||i(fG)||i(pG)||i(hG)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const SLe=gG.default??gG,rc=SLe(globalThis.navigator);et.RETINA_PREFIX=/@([0-9\.]+)x/;et.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var PZ={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return Z1(o,s,n,l,c,g,0),s}function OZ(e,t,n,r,i){var o,s;if(i===CF(e,t,n,r)>0)for(o=t;o=t;o-=r)s=vG(o,e[o],e[o+1],s);return s&&rI(s,s.next)&&(tb(s),s=s.next),s}function fp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(rI(n,n.next)||Ir(n.prev,n,n.next)===0)){if(tb(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Z1(e,t,n,r,i,o,s){if(e){!s&&o&&DLe(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?TLe(e,r,i,o):CLe(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),tb(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=ILe(fp(e),t,n),Z1(e,t,n,r,i,o,2)):s===2&&RLe(e,t,n,r,i,o):Z1(fp(e),t,n,r,i,o,1);break}}}}function CLe(e){var t=e.prev,n=e,r=e.next;if(Ir(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&_m(i,l,o,c,s,d,v.x,v.y)&&Ir(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function TLe(e,t,n,r){var i=e.prev,o=e,s=e.next;if(Ir(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=SF(g,v,t,n,r),b=SF(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&_m(l,f,c,h,d,p,x.x,x.y)&&Ir(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&_m(l,f,c,h,d,p,E.x,E.y)&&Ir(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&_m(l,f,c,h,d,p,x.x,x.y)&&Ir(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&_m(l,f,c,h,d,p,E.x,E.y)&&Ir(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function ILe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!rI(i,o)&&MZ(i,r,r.next,o)&&eb(i,o)&&eb(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),tb(r),tb(r.next),r=e=o),r=r.next}while(r!==e);return fp(r)}function RLe(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&NLe(s,l)){var c=kZ(s,l);s=fp(s,s.next),c=fp(c,c.next),Z1(s,t,n,r,i,o,0),Z1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function ALe(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&_m(is.x||n.x===s.x&&kLe(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function kLe(e,t){return Ir(e.prev,e,t.prev)<0&&Ir(t.next,e,e.next)<0}function DLe(e,t,n,r){var i=e;do i.z===0&&(i.z=SF(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,LLe(i)}function LLe(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function SF(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function BLe(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function NLe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$Le(e,t)&&(eb(e,t)&&eb(t,e)&&FLe(e,t)&&(Ir(e.prev,e,t.prev)||Ir(e,t.prev,t))||rI(e,t)&&Ir(e.prev,e,e.next)>0&&Ir(t.prev,t,t.next)>0)}function Ir(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function rI(e,t){return e.x===t.x&&e.y===t.y}function MZ(e,t,n,r){var i=r_(Ir(e,t,n)),o=r_(Ir(e,t,r)),s=r_(Ir(n,r,e)),l=r_(Ir(n,r,t));return!!(i!==o&&s!==l||i===0&&n_(e,n,t)||o===0&&n_(e,r,t)||s===0&&n_(n,e,r)||l===0&&n_(n,t,r))}function n_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function r_(e){return e>0?1:e<0?-1:0}function $Le(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&MZ(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function eb(e,t){return Ir(e.prev,e,e.next)<0?Ir(e,t,e.next)>=0&&Ir(e,e.prev,t)>=0:Ir(e,t,e.prev)<0||Ir(e,e.next,t)<0}function FLe(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function kZ(e,t){var n=new EF(e.i,e.x,e.y),r=new EF(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function vG(e,t,n,r){var i=new EF(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function tb(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function EF(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}nI.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(CF(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var zLe=wz.exports;const ULe=al(zLe);var LE={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */LE.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Xt=="object"&&Xt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,I=Math.floor,A=String.fromCharCode,R;function M(Y){throw new RangeError(x[Y])}function L(Y,Q){for(var re=Y.length,ue=[];re--;)ue[re]=Q(Y[re]);return ue}function B(Y,Q){var re=Y.split("@"),ue="";re.length>1&&(ue=re[0]+"@",Y=re[1]),Y=Y.replace(b,".");var ce=Y.split("."),se=L(ce,Q).join(".");return ue+se}function H(Y){for(var Q=[],re=0,ue=Y.length,ce,se;re=55296&&ce<=56319&&re65535&&(Q-=65536,re+=A(Q>>>10&1023|55296),Q=56320|Q&1023),re+=A(Q),re}).join("")}function U(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,Q){return Y+22+75*(Y<26)-((Q!=0)<<5)}function F(Y,Q,re){var ue=0;for(Y=re?I(Y/p):Y>>1,Y+=I(Y/Q);Y>E*f>>1;ue+=c)Y=I(Y/E);return I(ue+(E+1)*Y/(Y+h))}function z(Y){var Q=[],re=Y.length,ue,ce=0,se=v,J=g,ae,le,he,pe,ve,ye,be,me,xe;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&M("not-basic"),Q.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=re&&M("invalid-input"),be=U(Y.charCodeAt(he++)),(be>=c||be>I((l-ce)/ve))&&M("overflow"),ce+=be*ve,me=ye<=J?d:ye>=J+f?f:ye-J,!(beI(l/xe)&&M("overflow"),ve*=xe;ue=Q.length+1,J=F(ce-pe,ue,pe==0),I(ce/ue)>l-se&&M("overflow"),se+=I(ce/ue),ce%=ue,Q.splice(ce++,0,se)}return G(Q)}function V(Y){var Q,re,ue,ce,se,J,ae,le,he,pe,ve,ye=[],be,me,xe,Je;for(Y=H(Y),be=Y.length,Q=v,re=0,se=g,J=0;J=Q&&veI((l-re)/me)&&M("overflow"),re+=(ae-Q)*me,Q=ae,J=0;Jl&&M("overflow"),ve==Q){for(le=re,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!pi?ln:pi(Uint8Array),Xh={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Bp&&pi?pi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":qp,"%AsyncGenerator%":qp,"%AsyncGeneratorFunction%":qp,"%AsyncIteratorPrototype%":qp,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":DZ,"%GeneratorFunction%":qp,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bp&&pi?pi(pi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bp||!pi?ln:pi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bp||!pi?ln:pi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bp&&pi?pi(""[Symbol.iterator]()):ln,"%Symbol%":Bp?Symbol:ln,"%SyntaxError%":gg,"%ThrowTypeError%":tBe,"%TypedArray%":rBe,"%TypeError%":Nm,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(pi)try{null.error}catch(e){var iBe=pi(pi(e));Xh["%Error.prototype%"]=iBe}var oBe=function e(t){var n;if(t==="%AsyncFunction%")n=sB("async function () {}");else if(t==="%GeneratorFunction%")n=sB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=sB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&pi&&(n=pi(i.prototype))}return Xh[t]=n,n},bG={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wb=_z,BE=eBe,sBe=Wb.call(Function.call,Array.prototype.concat),aBe=Wb.call(Function.apply,Array.prototype.splice),wG=Wb.call(Function.call,String.prototype.replace),NE=Wb.call(Function.call,String.prototype.slice),lBe=Wb.call(Function.call,RegExp.prototype.exec),uBe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cBe=/\\(\\)?/g,dBe=function(t){var n=NE(t,0,1),r=NE(t,-1);if(n==="%"&&r!=="%")throw new gg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gg("invalid intrinsic syntax, expected opening `%`");var i=[];return wG(t,uBe,function(o,s,l,c){i[i.length]=l?wG(c,cBe,"$1"):s||o}),i},fBe=function(t,n){var r=t,i;if(BE(bG,r)&&(i=bG[r],r="%"+i[0]+"%"),BE(Xh,r)){var o=Xh[r];if(o===qp&&(o=oBe(r)),typeof o>"u"&&!n)throw new Nm("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gg("intrinsic "+t+" does not exist!")},Sz=function(t,n){if(typeof t!="string"||t.length===0)throw new Nm("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nm('"allowMissing" argument must be a boolean');if(lBe(/^%?[^%]*%?$/,t)===null)throw new gg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=dBe(t),i=r.length>0?r[0]:"",o=fBe("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],aBe(r,sBe([0,1],d)));for(var f=1,h=!0;f=r.length){var y=Vh(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=BE(l,p),l=l[p];h&&!c&&(Xh[s]=l)}}return l},LZ={exports:{}};(function(e){var t=_z,n=Sz,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(LZ);var hBe=LZ.exports,BZ=Sz,NZ=hBe,pBe=NZ(BZ("String.prototype.indexOf")),mBe=function(t,n){var r=BZ(t,!!n);return typeof r=="function"&&pBe(t,".prototype.")>-1?NZ(r):r};const gBe={},vBe=Object.freeze(Object.defineProperty({__proto__:null,default:gBe},Symbol.toStringTag,{value:"Module"})),yBe=J9(vBe);var Ez=typeof Map=="function"&&Map.prototype,lB=Object.getOwnPropertyDescriptor&&Ez?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$E=Ez&&lB&&typeof lB.get=="function"?lB.get:null,_G=Ez&&Map.prototype.forEach,Cz=typeof Set=="function"&&Set.prototype,uB=Object.getOwnPropertyDescriptor&&Cz?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,FE=Cz&&uB&&typeof uB.get=="function"?uB.get:null,SG=Cz&&Set.prototype.forEach,xBe=typeof WeakMap=="function"&&WeakMap.prototype,t1=xBe?WeakMap.prototype.has:null,bBe=typeof WeakSet=="function"&&WeakSet.prototype,n1=bBe?WeakSet.prototype.has:null,wBe=typeof WeakRef=="function"&&WeakRef.prototype,EG=wBe?WeakRef.prototype.deref:null,_Be=Boolean.prototype.valueOf,SBe=Object.prototype.toString,EBe=Function.prototype.toString,CBe=String.prototype.match,Tz=String.prototype.slice,ed=String.prototype.replace,TBe=String.prototype.toUpperCase,CG=String.prototype.toLowerCase,$Z=RegExp.prototype.test,TG=Array.prototype.concat,Sl=Array.prototype.join,IBe=Array.prototype.slice,IG=Math.floor,TF=typeof BigInt=="function"?BigInt.prototype.valueOf:null,cB=Object.getOwnPropertySymbols,IF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,vg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",no=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===vg||"symbol")?Symbol.toStringTag:null,FZ=Object.prototype.propertyIsEnumerable,RG=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function AG(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||$Z.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-IG(-e):IG(e);if(r!==e){var i=String(r),o=Tz.call(t,i.length+1);return ed.call(i,n,"$&_")+"."+ed.call(ed.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ed.call(t,n,"$&_")}var RF=yBe,PG=RF.custom,OG=UZ(PG)?PG:null,RBe=function e(t,n,r,i){var o=n||{};if(jc(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(jc(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=jc(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(jc(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(jc(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return HZ(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?AG(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?AG(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return AF(t)?"[Array]":"[Object]";var h=VBe(o,r);if(typeof i>"u")i=[];else if(jZ(i,t)>=0)return"[Circular]";function p(U,D,F){if(D&&(i=IBe.call(i),i.push(D)),F){var z={depth:o.depth};return jc(o,"quoteStyle")&&(z.quoteStyle=o.quoteStyle),e(U,z,r+1,i)}return e(U,o,r+1,i)}if(typeof t=="function"&&!MG(t)){var g=NBe(t),v=i_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Sl.call(v,", ")+" }":"")}if(UZ(t)){var y=vg?ed.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):IF.call(t);return typeof t=="object"&&!vg?Qy(y):y}if(HBe(t)){for(var S="<"+CG.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+zZ(ABe(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(AF(t)){if(t.length===0)return"[]";var x=i_(t,p);return h&&!GBe(x)?"["+PF(x,h)+"]":"[ "+Sl.call(x,", ")+" ]"}if(OBe(t)){var E=i_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!FZ.call(t,"cause")?"{ ["+String(t)+"] "+Sl.call(TG.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Sl.call(E,", ")+" }"}if(typeof t=="object"&&s){if(OG&&typeof t[OG]=="function"&&RF)return RF(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($Be(t)){var I=[];return _G&&_G.call(t,function(U,D){I.push(p(D,t,!0)+" => "+p(U,t))}),kG("Map",$E.call(t),I,h)}if(UBe(t)){var A=[];return SG&&SG.call(t,function(U){A.push(p(U,t))}),kG("Set",FE.call(t),A,h)}if(FBe(t))return dB("WeakMap");if(jBe(t))return dB("WeakSet");if(zBe(t))return dB("WeakRef");if(kBe(t))return Qy(p(Number(t)));if(LBe(t))return Qy(p(TF.call(t)));if(DBe(t))return Qy(_Be.call(t));if(MBe(t))return Qy(p(String(t)));if(!PBe(t)&&!MG(t)){var R=i_(t,p),M=RG?RG(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",B=!M&&no&&Object(t)===t&&no in t?Tz.call(Hd(t),8,-1):L?"Object":"",H=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",G=H+(B||L?"["+Sl.call(TG.call([],B||[],L||[]),": ")+"] ":"");return R.length===0?G+"{}":h?G+"{"+PF(R,h)+"}":G+"{ "+Sl.call(R,", ")+" }"}return String(t)};function zZ(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function ABe(e){return ed.call(String(e),/"/g,""")}function AF(e){return Hd(e)==="[object Array]"&&(!no||!(typeof e=="object"&&no in e))}function PBe(e){return Hd(e)==="[object Date]"&&(!no||!(typeof e=="object"&&no in e))}function MG(e){return Hd(e)==="[object RegExp]"&&(!no||!(typeof e=="object"&&no in e))}function OBe(e){return Hd(e)==="[object Error]"&&(!no||!(typeof e=="object"&&no in e))}function MBe(e){return Hd(e)==="[object String]"&&(!no||!(typeof e=="object"&&no in e))}function kBe(e){return Hd(e)==="[object Number]"&&(!no||!(typeof e=="object"&&no in e))}function DBe(e){return Hd(e)==="[object Boolean]"&&(!no||!(typeof e=="object"&&no in e))}function UZ(e){if(vg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!IF)return!1;try{return IF.call(e),!0}catch{}return!1}function LBe(e){if(!e||typeof e!="object"||!TF)return!1;try{return TF.call(e),!0}catch{}return!1}var BBe=Object.prototype.hasOwnProperty||function(e){return e in this};function jc(e,t){return BBe.call(e,t)}function Hd(e){return SBe.call(e)}function NBe(e){if(e.name)return e.name;var t=CBe.call(EBe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function jZ(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return HZ(Tz.call(e,0,t.maxStringLength),t)+r}var i=ed.call(ed.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WBe);return zZ(i,"single",t)}function WBe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+TBe.call(t.toString(16))}function Qy(e){return"Object("+e+")"}function dB(e){return e+" { ? }"}function kG(e,t,n,r){var i=r?PF(n,r):Sl.call(n,", ");return e+" ("+t+") {"+i+"}"}function GBe(e){for(var t=0;t=k)return a;var j=m-Zo(w);if(j<1)return w;var q=N?Pi(N,0,j).join(""):a.slice(0,j);if(T===n)return q+w;if(N&&(j+=q.length-j),Jf(T)){if(a.slice(j).search(T)){var te,ne=q;for(T.global||(T=hf(T.source,dt(Qn.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;q=q.slice(0,oe===n?j:oe)}}else if(a.indexOf(Vn(T),j)!=j){var fe=q.lastIndexOf(T);fe>-1&&(q=q.slice(0,fe))}return q+w}function YM(a){return a=dt(a),a&&Fr.test(a)?a.replace(Mr,ER):a}var KM=ss(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),eh=E0("toUpperCase");function _y(a,u,m){return a=dt(a),u=m?n:u,u===n?xR(a)?IR(a):cR(a):a.match(u)||[]}var Sy=qe(function(a,u){try{return Wn(a,n,u)}catch(m){return Kf(m)?m:new De(m)}}),JM=ni(function(a,u){return tr(u,function(m){m=jr(m),ei(a,m,qf(a[m],a))}),a});function QM(a){var u=a==null?0:a.length,m=Ce();return a=u?Dt(a,function(w){if(typeof w[1]!="function")throw new nr(s);return[m(w[0]),w[1]]}):[],qe(function(w){for(var T=-1;++TW)return[];var m=Q,w=gn(a,Q);u=Ce(u),a-=Q;for(var T=cf(w,u);++m0||u<0)?new Qe(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Qe.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Qe.prototype.toArray=function(){return this.take(Q)},zr(Qe.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],k=w||/^find/.test(u);T&&(P.prototype[u]=function(){var N=this.__wrapped__,j=w?[1]:arguments,q=N instanceof Qe,te=j[0],ne=q||Ne(N),oe=function(Ke){var tt=T.apply(P,Ei([Ke],j));return w&&fe?tt[0]:tt};ne&&m&&typeof te=="function"&&te.length!=1&&(q=ne=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=k&&!fe,Ve=q&&!we;if(!k&&ne){N=Ve?N:new Qe(this);var Ie=a.apply(N,j);return Ie.__actions__.push({func:Mu,args:[oe],thisArg:n}),new rr(Ie,fe)}return Te&&Ve?a.apply(this,j):(Ie=this.thru(oe),Te?w?Ie.value()[0]:Ie.value():Ie)})}),tr(["pop","push","shift","sort","splice","unshift"],function(a){var u=iu[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var k=this.value();return u.apply(Ne(k)?k:[],T)}return this[m](function(N){return u.apply(Ne(N)?N:[],T)})}}),zr(Qe.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";gt.call(rs,w)||(rs[w]=[]),rs[w].push({name:u,func:m})}}),rs[Cu(n,_).name]=[{name:"wrapper",func:n}],Qe.prototype.clone=YR,Qe.prototype.reverse=KR,Qe.prototype.value=JR,P.prototype.at=T2,P.prototype.chain=I2,P.prototype.commit=R2,P.prototype.next=A2,P.prototype.plant=O2,P.prototype.reverse=M2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=k2,P.prototype.first=P.prototype.head,ma&&(P.prototype[ma]=P2),P},es=RR();oo?((oo.exports=es)._=es,tf._=es):dn._=es}).call(Xt)})(DE,DE.exports);var Jt=DE.exports;let bLe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var Ep=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Ep||{}),PZ=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(PZ||{}),wF=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(wF||{}),kt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(kt||{}),Il=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Il||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),Bm=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(Bm||{}),At=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(At||{}),_F=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(_F||{}),nc=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(nc||{}),bd=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(bd||{}),jl=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(jl||{}),cl=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(cl||{}),_l=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(_l||{}),bz=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(bz||{}),Ks=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(Ks||{}),ai=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(ai||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Bl=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Bl||{});const wLe={createCanvas:(e,t)=>{const n=document.createElement("canvas");return n.width=e,n.height=t,n},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},et={ADAPTER:wLe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rB=/iPhone/i,oG=/iPod/i,sG=/iPad/i,aG=/\biOS-universal(?:.+)Mac\b/i,iB=/\bAndroid(?:.+)Mobile\b/i,lG=/Android/i,Lp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,t_=/Silk/i,Hu=/Windows Phone/i,uG=/\bWindows(?:.+)ARM\b/i,cG=/BlackBerry/i,dG=/BB10/i,fG=/Opera Mini/i,hG=/\b(CriOS|Chrome)(?:.+)Mobile/i,pG=/Mobile(?:.+)Firefox\b/i,mG=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function _Le(e){return function(t){return t.test(e)}}function gG(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);var i=_Le(n),o={apple:{phone:i(rB)&&!i(Hu),ipod:i(oG),tablet:!i(rB)&&(i(sG)||mG(t))&&!i(Hu),universal:i(aG),device:(i(rB)||i(oG)||i(sG)||i(aG)||mG(t))&&!i(Hu)},amazon:{phone:i(Lp),tablet:!i(Lp)&&i(t_),device:i(Lp)||i(t_)},android:{phone:!i(Hu)&&i(Lp)||!i(Hu)&&i(iB),tablet:!i(Hu)&&!i(Lp)&&!i(iB)&&(i(t_)||i(lG)),device:!i(Hu)&&(i(Lp)||i(t_)||i(iB)||i(lG))||i(/\bokhttp\b/i)},windows:{phone:i(Hu),tablet:i(uG),device:i(Hu)||i(uG)},other:{blackberry:i(cG),blackberry10:i(dG),opera:i(fG),firefox:i(pG),chrome:i(hG),device:i(cG)||i(dG)||i(fG)||i(pG)||i(hG)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const SLe=gG.default??gG,rc=SLe(globalThis.navigator);et.RETINA_PREFIX=/@([0-9\.]+)x/;et.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var OZ={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return Z1(o,s,n,l,c,g,0),s}function MZ(e,t,n,r,i){var o,s;if(i===CF(e,t,n,r)>0)for(o=t;o=t;o-=r)s=vG(o,e[o],e[o+1],s);return s&&rI(s,s.next)&&(tb(s),s=s.next),s}function fp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(rI(n,n.next)||Ir(n.prev,n,n.next)===0)){if(tb(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Z1(e,t,n,r,i,o,s){if(e){!s&&o&&DLe(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?TLe(e,r,i,o):CLe(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),tb(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=ILe(fp(e),t,n),Z1(e,t,n,r,i,o,2)):s===2&&RLe(e,t,n,r,i,o):Z1(fp(e),t,n,r,i,o,1);break}}}}function CLe(e){var t=e.prev,n=e,r=e.next;if(Ir(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&_m(i,l,o,c,s,d,v.x,v.y)&&Ir(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function TLe(e,t,n,r){var i=e.prev,o=e,s=e.next;if(Ir(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=SF(g,v,t,n,r),b=SF(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&_m(l,f,c,h,d,p,x.x,x.y)&&Ir(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&_m(l,f,c,h,d,p,E.x,E.y)&&Ir(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&_m(l,f,c,h,d,p,x.x,x.y)&&Ir(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&_m(l,f,c,h,d,p,E.x,E.y)&&Ir(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function ILe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!rI(i,o)&&kZ(i,r,r.next,o)&&eb(i,o)&&eb(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),tb(r),tb(r.next),r=e=o),r=r.next}while(r!==e);return fp(r)}function RLe(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&NLe(s,l)){var c=DZ(s,l);s=fp(s,s.next),c=fp(c,c.next),Z1(s,t,n,r,i,o,0),Z1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function ALe(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&_m(is.x||n.x===s.x&&kLe(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function kLe(e,t){return Ir(e.prev,e,t.prev)<0&&Ir(t.next,e,e.next)<0}function DLe(e,t,n,r){var i=e;do i.z===0&&(i.z=SF(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,LLe(i)}function LLe(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function SF(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function BLe(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function NLe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$Le(e,t)&&(eb(e,t)&&eb(t,e)&&FLe(e,t)&&(Ir(e.prev,e,t.prev)||Ir(e,t.prev,t))||rI(e,t)&&Ir(e.prev,e,e.next)>0&&Ir(t.prev,t,t.next)>0)}function Ir(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function rI(e,t){return e.x===t.x&&e.y===t.y}function kZ(e,t,n,r){var i=r_(Ir(e,t,n)),o=r_(Ir(e,t,r)),s=r_(Ir(n,r,e)),l=r_(Ir(n,r,t));return!!(i!==o&&s!==l||i===0&&n_(e,n,t)||o===0&&n_(e,r,t)||s===0&&n_(n,e,r)||l===0&&n_(n,t,r))}function n_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function r_(e){return e>0?1:e<0?-1:0}function $Le(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&kZ(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function eb(e,t){return Ir(e.prev,e,e.next)<0?Ir(e,t,e.next)>=0&&Ir(e,e.prev,t)>=0:Ir(e,t,e.prev)<0||Ir(e,e.next,t)<0}function FLe(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function DZ(e,t){var n=new EF(e.i,e.x,e.y),r=new EF(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function vG(e,t,n,r){var i=new EF(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function tb(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function EF(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}nI.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(CF(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var zLe=wz.exports;const ULe=al(zLe);var LE={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */LE.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Xt=="object"&&Xt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,I=Math.floor,A=String.fromCharCode,R;function M(Y){throw new RangeError(x[Y])}function L(Y,Q){for(var re=Y.length,ue=[];re--;)ue[re]=Q(Y[re]);return ue}function B(Y,Q){var re=Y.split("@"),ue="";re.length>1&&(ue=re[0]+"@",Y=re[1]),Y=Y.replace(b,".");var ce=Y.split("."),se=L(ce,Q).join(".");return ue+se}function H(Y){for(var Q=[],re=0,ue=Y.length,ce,se;re=55296&&ce<=56319&&re65535&&(Q-=65536,re+=A(Q>>>10&1023|55296),Q=56320|Q&1023),re+=A(Q),re}).join("")}function U(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,Q){return Y+22+75*(Y<26)-((Q!=0)<<5)}function F(Y,Q,re){var ue=0;for(Y=re?I(Y/p):Y>>1,Y+=I(Y/Q);Y>E*f>>1;ue+=c)Y=I(Y/E);return I(ue+(E+1)*Y/(Y+h))}function z(Y){var Q=[],re=Y.length,ue,ce=0,se=v,J=g,ae,le,he,pe,ve,ye,be,me,xe;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&M("not-basic"),Q.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=re&&M("invalid-input"),be=U(Y.charCodeAt(he++)),(be>=c||be>I((l-ce)/ve))&&M("overflow"),ce+=be*ve,me=ye<=J?d:ye>=J+f?f:ye-J,!(beI(l/xe)&&M("overflow"),ve*=xe;ue=Q.length+1,J=F(ce-pe,ue,pe==0),I(ce/ue)>l-se&&M("overflow"),se+=I(ce/ue),ce%=ue,Q.splice(ce++,0,se)}return G(Q)}function V(Y){var Q,re,ue,ce,se,J,ae,le,he,pe,ve,ye=[],be,me,xe,Je;for(Y=H(Y),be=Y.length,Q=v,re=0,se=g,J=0;J=Q&&veI((l-re)/me)&&M("overflow"),re+=(ae-Q)*me,Q=ae,J=0;Jl&&M("overflow"),ve==Q){for(le=re,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!pi?ln:pi(Uint8Array),Xh={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Bp&&pi?pi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":qp,"%AsyncGenerator%":qp,"%AsyncGeneratorFunction%":qp,"%AsyncIteratorPrototype%":qp,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":LZ,"%GeneratorFunction%":qp,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bp&&pi?pi(pi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bp||!pi?ln:pi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bp||!pi?ln:pi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bp&&pi?pi(""[Symbol.iterator]()):ln,"%Symbol%":Bp?Symbol:ln,"%SyntaxError%":gg,"%ThrowTypeError%":tBe,"%TypedArray%":rBe,"%TypeError%":Nm,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(pi)try{null.error}catch(e){var iBe=pi(pi(e));Xh["%Error.prototype%"]=iBe}var oBe=function e(t){var n;if(t==="%AsyncFunction%")n=sB("async function () {}");else if(t==="%GeneratorFunction%")n=sB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=sB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&pi&&(n=pi(i.prototype))}return Xh[t]=n,n},bG={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wb=_z,BE=eBe,sBe=Wb.call(Function.call,Array.prototype.concat),aBe=Wb.call(Function.apply,Array.prototype.splice),wG=Wb.call(Function.call,String.prototype.replace),NE=Wb.call(Function.call,String.prototype.slice),lBe=Wb.call(Function.call,RegExp.prototype.exec),uBe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cBe=/\\(\\)?/g,dBe=function(t){var n=NE(t,0,1),r=NE(t,-1);if(n==="%"&&r!=="%")throw new gg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gg("invalid intrinsic syntax, expected opening `%`");var i=[];return wG(t,uBe,function(o,s,l,c){i[i.length]=l?wG(c,cBe,"$1"):s||o}),i},fBe=function(t,n){var r=t,i;if(BE(bG,r)&&(i=bG[r],r="%"+i[0]+"%"),BE(Xh,r)){var o=Xh[r];if(o===qp&&(o=oBe(r)),typeof o>"u"&&!n)throw new Nm("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gg("intrinsic "+t+" does not exist!")},Sz=function(t,n){if(typeof t!="string"||t.length===0)throw new Nm("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nm('"allowMissing" argument must be a boolean');if(lBe(/^%?[^%]*%?$/,t)===null)throw new gg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=dBe(t),i=r.length>0?r[0]:"",o=fBe("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],aBe(r,sBe([0,1],d)));for(var f=1,h=!0;f=r.length){var y=Vh(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=BE(l,p),l=l[p];h&&!c&&(Xh[s]=l)}}return l},BZ={exports:{}};(function(e){var t=_z,n=Sz,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(BZ);var hBe=BZ.exports,NZ=Sz,$Z=hBe,pBe=$Z(NZ("String.prototype.indexOf")),mBe=function(t,n){var r=NZ(t,!!n);return typeof r=="function"&&pBe(t,".prototype.")>-1?$Z(r):r};const gBe={},vBe=Object.freeze(Object.defineProperty({__proto__:null,default:gBe},Symbol.toStringTag,{value:"Module"})),yBe=J9(vBe);var Ez=typeof Map=="function"&&Map.prototype,lB=Object.getOwnPropertyDescriptor&&Ez?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$E=Ez&&lB&&typeof lB.get=="function"?lB.get:null,_G=Ez&&Map.prototype.forEach,Cz=typeof Set=="function"&&Set.prototype,uB=Object.getOwnPropertyDescriptor&&Cz?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,FE=Cz&&uB&&typeof uB.get=="function"?uB.get:null,SG=Cz&&Set.prototype.forEach,xBe=typeof WeakMap=="function"&&WeakMap.prototype,t1=xBe?WeakMap.prototype.has:null,bBe=typeof WeakSet=="function"&&WeakSet.prototype,n1=bBe?WeakSet.prototype.has:null,wBe=typeof WeakRef=="function"&&WeakRef.prototype,EG=wBe?WeakRef.prototype.deref:null,_Be=Boolean.prototype.valueOf,SBe=Object.prototype.toString,EBe=Function.prototype.toString,CBe=String.prototype.match,Tz=String.prototype.slice,ed=String.prototype.replace,TBe=String.prototype.toUpperCase,CG=String.prototype.toLowerCase,FZ=RegExp.prototype.test,TG=Array.prototype.concat,Sl=Array.prototype.join,IBe=Array.prototype.slice,IG=Math.floor,TF=typeof BigInt=="function"?BigInt.prototype.valueOf:null,cB=Object.getOwnPropertySymbols,IF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,vg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",no=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===vg||"symbol")?Symbol.toStringTag:null,zZ=Object.prototype.propertyIsEnumerable,RG=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function AG(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||FZ.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-IG(-e):IG(e);if(r!==e){var i=String(r),o=Tz.call(t,i.length+1);return ed.call(i,n,"$&_")+"."+ed.call(ed.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ed.call(t,n,"$&_")}var RF=yBe,PG=RF.custom,OG=jZ(PG)?PG:null,RBe=function e(t,n,r,i){var o=n||{};if(jc(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(jc(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=jc(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(jc(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(jc(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return WZ(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?AG(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?AG(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return AF(t)?"[Array]":"[Object]";var h=VBe(o,r);if(typeof i>"u")i=[];else if(HZ(i,t)>=0)return"[Circular]";function p(U,D,F){if(D&&(i=IBe.call(i),i.push(D)),F){var z={depth:o.depth};return jc(o,"quoteStyle")&&(z.quoteStyle=o.quoteStyle),e(U,z,r+1,i)}return e(U,o,r+1,i)}if(typeof t=="function"&&!MG(t)){var g=NBe(t),v=i_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Sl.call(v,", ")+" }":"")}if(jZ(t)){var y=vg?ed.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):IF.call(t);return typeof t=="object"&&!vg?Qy(y):y}if(HBe(t)){for(var S="<"+CG.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+UZ(ABe(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(AF(t)){if(t.length===0)return"[]";var x=i_(t,p);return h&&!GBe(x)?"["+PF(x,h)+"]":"[ "+Sl.call(x,", ")+" ]"}if(OBe(t)){var E=i_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!zZ.call(t,"cause")?"{ ["+String(t)+"] "+Sl.call(TG.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Sl.call(E,", ")+" }"}if(typeof t=="object"&&s){if(OG&&typeof t[OG]=="function"&&RF)return RF(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($Be(t)){var I=[];return _G&&_G.call(t,function(U,D){I.push(p(D,t,!0)+" => "+p(U,t))}),kG("Map",$E.call(t),I,h)}if(UBe(t)){var A=[];return SG&&SG.call(t,function(U){A.push(p(U,t))}),kG("Set",FE.call(t),A,h)}if(FBe(t))return dB("WeakMap");if(jBe(t))return dB("WeakSet");if(zBe(t))return dB("WeakRef");if(kBe(t))return Qy(p(Number(t)));if(LBe(t))return Qy(p(TF.call(t)));if(DBe(t))return Qy(_Be.call(t));if(MBe(t))return Qy(p(String(t)));if(!PBe(t)&&!MG(t)){var R=i_(t,p),M=RG?RG(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",B=!M&&no&&Object(t)===t&&no in t?Tz.call(Hd(t),8,-1):L?"Object":"",H=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",G=H+(B||L?"["+Sl.call(TG.call([],B||[],L||[]),": ")+"] ":"");return R.length===0?G+"{}":h?G+"{"+PF(R,h)+"}":G+"{ "+Sl.call(R,", ")+" }"}return String(t)};function UZ(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function ABe(e){return ed.call(String(e),/"/g,""")}function AF(e){return Hd(e)==="[object Array]"&&(!no||!(typeof e=="object"&&no in e))}function PBe(e){return Hd(e)==="[object Date]"&&(!no||!(typeof e=="object"&&no in e))}function MG(e){return Hd(e)==="[object RegExp]"&&(!no||!(typeof e=="object"&&no in e))}function OBe(e){return Hd(e)==="[object Error]"&&(!no||!(typeof e=="object"&&no in e))}function MBe(e){return Hd(e)==="[object String]"&&(!no||!(typeof e=="object"&&no in e))}function kBe(e){return Hd(e)==="[object Number]"&&(!no||!(typeof e=="object"&&no in e))}function DBe(e){return Hd(e)==="[object Boolean]"&&(!no||!(typeof e=="object"&&no in e))}function jZ(e){if(vg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!IF)return!1;try{return IF.call(e),!0}catch{}return!1}function LBe(e){if(!e||typeof e!="object"||!TF)return!1;try{return TF.call(e),!0}catch{}return!1}var BBe=Object.prototype.hasOwnProperty||function(e){return e in this};function jc(e,t){return BBe.call(e,t)}function Hd(e){return SBe.call(e)}function NBe(e){if(e.name)return e.name;var t=CBe.call(EBe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function HZ(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return WZ(Tz.call(e,0,t.maxStringLength),t)+r}var i=ed.call(ed.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WBe);return UZ(i,"single",t)}function WBe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+TBe.call(t.toString(16))}function Qy(e){return"Object("+e+")"}function dB(e){return e+" { ? }"}function kG(e,t,n,r){var i=r?PF(n,r):Sl.call(n,", ");return e+" ("+t+") {"+i+"}"}function GBe(e){for(var t=0;t=0)return!1;return!0}function VBe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Sl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Sl.call(Array(t+1),n)}}function PF(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Sl.call(e,","+n)+` -`+t.prev}function i_(e,t){var n=AF(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Ph(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===aNe.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+ml[d];continue}if(d<2048){l=l+(ml[192|d>>6]+ml[128|d&63]);continue}if(d<55296||d>=57344){l=l+(ml[224|d>>12]+ml[128|d>>6&63]+ml[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=ml[240|d>>18]+ml[128|d>>12&63]+ml[128|d>>6&63]+ml[128|d&63]}return l},hNe=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&Ku(_)&&(_=fS.maybeMap(_,function(z){return z instanceof Date?h(z):z})),_===null){if(o)return l&&!v?l(n,qi.encoder,y,"key",p):n;_=""}if(wNe(_)||fS.isBuffer(_)){if(l){var A=v?n:l(n,qi.encoder,y,"key",p);return[g(A)+"="+g(l(_,qi.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var R=[];if(typeof _>"u")return R;var M;if(r==="comma"&&Ku(_))v&&l&&(_=fS.maybeMap(_,l)),M=[{value:_.length>0?_.join(",")||null:void 0}];else if(Ku(c))M=c;else{var L=Object.keys(_);M=d?L.sort(d):L}for(var B=i&&Ku(_)&&_.length===1?n+"[]":n,H=0;H"u"?qi.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:qi.charsetSentinel,delimiter:typeof t.delimiter>"u"?qi.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:qi.encode,encoder:typeof t.encoder=="function"?t.encoder:qi.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:qi.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:qi.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:qi.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:qi.strictNullHandling}},ENe=function(e,t){var n=e,r=SNe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Ku(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in DG?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=DG[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=VZ(),h=0;h0?v+g:""},yg=GZ,OF=Object.prototype.hasOwnProperty,CNe=Array.isArray,hi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:yg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},TNe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},qZ=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},INe="utf8=%26%2310003%3B",RNe="utf8=%E2%9C%93",ANe=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=CNe(v)?[v]:v),OF.call(r,g)?r[g]=yg.combine(r[g],v):r[g]=v}return r},PNe=function(e,t,n,r){for(var i=r?t:qZ(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},ONe=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&OF.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?hi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hi.comma,decoder:typeof t.decoder=="function"?t.decoder:hi.decoder,delimiter:typeof t.delimiter=="string"||yg.isRegExp(t.delimiter)?t.delimiter:hi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hi.strictNullHandling}},kNe=function(e,t){var n=MNe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ANe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` +`+t.prev}function i_(e,t){var n=AF(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Ph(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===aNe.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+ml[d];continue}if(d<2048){l=l+(ml[192|d>>6]+ml[128|d&63]);continue}if(d<55296||d>=57344){l=l+(ml[224|d>>12]+ml[128|d>>6&63]+ml[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=ml[240|d>>18]+ml[128|d>>12&63]+ml[128|d>>6&63]+ml[128|d&63]}return l},hNe=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&Ku(_)&&(_=fS.maybeMap(_,function(z){return z instanceof Date?h(z):z})),_===null){if(o)return l&&!v?l(n,qi.encoder,y,"key",p):n;_=""}if(wNe(_)||fS.isBuffer(_)){if(l){var A=v?n:l(n,qi.encoder,y,"key",p);return[g(A)+"="+g(l(_,qi.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var R=[];if(typeof _>"u")return R;var M;if(r==="comma"&&Ku(_))v&&l&&(_=fS.maybeMap(_,l)),M=[{value:_.length>0?_.join(",")||null:void 0}];else if(Ku(c))M=c;else{var L=Object.keys(_);M=d?L.sort(d):L}for(var B=i&&Ku(_)&&_.length===1?n+"[]":n,H=0;H"u"?qi.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:qi.charsetSentinel,delimiter:typeof t.delimiter>"u"?qi.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:qi.encode,encoder:typeof t.encoder=="function"?t.encoder:qi.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:qi.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:qi.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:qi.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:qi.strictNullHandling}},ENe=function(e,t){var n=e,r=SNe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Ku(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in DG?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=DG[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=XZ(),h=0;h0?v+g:""},yg=VZ,OF=Object.prototype.hasOwnProperty,CNe=Array.isArray,hi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:yg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},TNe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},YZ=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},INe="utf8=%26%2310003%3B",RNe="utf8=%E2%9C%93",ANe=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=CNe(v)?[v]:v),OF.call(r,g)?r[g]=yg.combine(r[g],v):r[g]=v}return r},PNe=function(e,t,n,r){for(var i=r?t:YZ(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},ONe=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&OF.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?hi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hi.comma,decoder:typeof t.decoder=="function"?t.decoder:hi.decoder,delimiter:typeof t.delimiter=="string"||yg.isRegExp(t.delimiter)?t.delimiter:hi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hi.strictNullHandling}},kNe=function(e,t){var n=MNe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ANe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` `," "],HNe=["{","}","|","\\","^","`"].concat(jNe),MF=["'"].concat(HNe),BG=["%","/","?",";","#"].concat(MF),NG=["/","?","#"],WNe=255,$G=/^[+a-z0-9A-Z_-]{0,63}$/,GNe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,VNe={javascript:!0,"javascript:":!0},kF={javascript:!0,"javascript:":!0},$m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},DF=NNe;function iI(e,t,n){if(e&&typeof e=="object"&&e instanceof Za)return e;var r=new Za;return r.parse(e,t,n),r}Za.prototype.parse=function(e,t,n){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?I+="x":I+=E[A];if(!I.match($G)){var M=b.slice(0,g),L=b.slice(g+1),B=E.match(GNe);B&&(M.push(B[1]),L.unshift(B[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=M.join(".");break}}}this.hostname.length>WNe?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=$Ne.toASCII(this.hostname));var H=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!VNe[f])for(var g=0,x=MF.length;g0?n.host.split("@"):!1;I&&(n.auth=I.shift(),n.hostname=I.shift(),n.host=n.hostname)}return n.search=e.search,n.query=e.query,(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=b.slice(-1)[0],R=(n.host||e.host||b.length>1)&&(A==="."||A==="..")||A==="",M=0,L=b.length;L>=0;L--)A=b[L],A==="."?b.splice(L,1):A===".."?(b.splice(L,1),M++):M&&(b.splice(L,1),M--);if(!S&&!_)for(;M--;M)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),R&&b.join("/").substr(-1)!=="/"&&b.push("");var B=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(E){n.hostname=B?"":b.length?b.shift():"",n.host=n.hostname;var I=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;I&&(n.auth=I.shift(),n.hostname=I.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!B&&b.unshift(""),b.length>0?n.pathname=b.join("/"):(n.pathname=null,n.path=null),(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n};Za.prototype.parseHost=function(){var e=this.host,t=zNe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var YNe=iI,KNe=qNe,JNe=XNe;const QNe={parse:YNe,format:JNe,resolve:KNe};function Pa(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function Zy(e){return e.split("?")[0].split("#")[0]}function ZNe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e$e(e,t,n){return e.replace(new RegExp(ZNe(t),"g"),n)}function t$e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let l=0;l<=e.length;++l){if(l2){const c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=l,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,l)}`:n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o!==-1?++o:o=-1}return n}const eo={toPosix(e){return e$e(e,"\\","/")},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol(e){Pa(e),e=this.toPosix(e);let t="";const n=/^file:\/\/\//.exec(e),r=/^[^/:]+:\/\//.exec(e),i=/^[^/:]+:\//.exec(e);if(n||r||i){const o=(n==null?void 0:n[0])||(r==null?void 0:r[0])||(i==null?void 0:i[0]);t=o,e=e.slice(o.length)}return t},toAbsolute(e,t,n){if(this.isDataUrl(e))return e;const r=Zy(this.toPosix(t??et.ADAPTER.getBaseUrl())),i=Zy(this.toPosix(n??this.rootname(r)));return Pa(e),e=this.toPosix(e),e.startsWith("/")?eo.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),Pa(e),e.length===0)return".";let t="";const n=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));const r=e.endsWith("/");return e=t$e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return Pa(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join(...e){if(e.length===0)return".";let t;for(let n=0;n0)if(t===void 0)t=r;else{const i=e[n-1]??"";this.extname(i)?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?".":this.normalize(t)},dirname(e){if(Pa(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!i){r=l;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){Pa(e),e=this.toPosix(e);let t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){const n=e.indexOf("/",t.length);n!==-1?t=e.slice(0,n):t=e,t.endsWith("/")||(t+="/")}return t},basename(e,t){Pa(e),t&&Pa(t),e=Zy(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else l===-1&&(i=!1,l=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){Pa(e),e=Zy(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const l=e.charCodeAt(s);if(l===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),l===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){Pa(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=Zy(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,l=-1,c=!0,d=e.length-1,f=0;for(;d>=i;--d){if(n=e.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(s,l)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},FG={};function un(e,t,n=3){if(FG[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} Deprecated since v${e}`):(r=r.split(` `).splice(n).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t} Deprecated since v${e}`),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t} -Deprecated since v${e}`),console.warn(r))),FG[t]=!0}let mB;function n$e(){return typeof mB>"u"&&(mB=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:et.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!et.ADAPTER.getWebGLRenderingContext())return!1;const r=et.ADAPTER.createCanvas();let i=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const o=!!((n=i==null?void 0:i.getContextAttributes())!=null&&n.stencil);if(i){const s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,o}catch{return!1}}()),mB}var r$e={grad:.9,turn:360,rad:360/(2*Math.PI)},Wu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},gi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Js=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},YZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},zG=function(e){return{r:Js(e.r,0,255),g:Js(e.g,0,255),b:Js(e.b,0,255),a:Js(e.a)}},gB=function(e){return{r:gi(e.r),g:gi(e.g),b:gi(e.b),a:gi(e.a,3)}},i$e=/^#([0-9a-f]{3,8})$/i,a_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},KZ=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},JZ=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},UG=function(e){return{h:YZ(e.h),s:Js(e.s,0,100),l:Js(e.l,0,100),a:Js(e.a)}},jG=function(e){return{h:gi(e.h),s:gi(e.s),l:gi(e.l),a:gi(e.a,3)}},HG=function(e){return JZ((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},i1=function(e){return{h:(t=KZ(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},o$e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s$e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a$e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,l$e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,LF={string:[[function(e){var t=i$e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?gi(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?gi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=a$e.exec(e)||l$e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:zG({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(e){var t=o$e.exec(e)||s$e.exec(e);if(!t)return null;var n,r,i=UG({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(r$e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return HG(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i===void 0?1:i;return Wu(t)&&Wu(n)&&Wu(r)?zG({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=i===void 0?1:i;if(!Wu(t)||!Wu(n)||!Wu(r))return null;var s=UG({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return HG(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!Wu(t)||!Wu(n)||!Wu(r))return null;var s=function(l){return{h:YZ(l.h),s:Js(l.s,0,100),v:Js(l.v,0,100),a:Js(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return JZ(s)},"hsv"]]},WG=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=gB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?a_(gi(255*o)):"","#"+a_(n)+a_(r)+a_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return gB(this.rgba)},e.prototype.toRgbString=function(){return t=gB(this.rgba),n=t.r,r=t.g,i=t.b,(o=t.a)<1?"rgba("+n+", "+r+", "+i+", "+o+")":"rgb("+n+", "+r+", "+i+")";var t,n,r,i,o},e.prototype.toHsl=function(){return jG(i1(this.rgba))},e.prototype.toHslString=function(){return t=jG(i1(this.rgba)),n=t.h,r=t.s,i=t.l,(o=t.a)<1?"hsla("+n+", "+r+"%, "+i+"%, "+o+")":"hsl("+n+", "+r+"%, "+i+"%)";var t,n,r,i,o},e.prototype.toHsv=function(){return t=KZ(this.rgba),{h:gi(t.h),s:gi(t.s),v:gi(t.v),a:gi(t.a,3)};var t},e.prototype.invert=function(){return gl({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),gl(vB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),gl(vB(this.rgba,-t))},e.prototype.grayscale=function(){return gl(vB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),gl(GG(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),gl(GG(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?gl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):gi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=i1(this.rgba);return typeof t=="number"?gl({h:t,s:n.s,l:n.l,a:n.a}):gi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===gl(t).toHex()},e}(),gl=function(e){return e instanceof BF?e:new BF(e)},VG=[],c$e=function(e){e.forEach(function(t){VG.indexOf(t)<0&&(t(BF,LF),VG.push(t))})};function d$e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=Fm.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=n,this._components[2]*=r,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let n=this._int>>16&255,r=this._int>>8&255,i=this._int&255;return t&&(n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0),(e*255<<24)+(n<<16)+(r<<8)+i}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,n,r]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(r*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,n,r,i]=this._components;return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}normalize(e){let t,n,r,i;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,n=(o>>8&255)/255,r=(o&255)/255,i=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,n,r,i=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,n,r,i=255]=e,t/=255,n/=255,r/=255,i/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const s=Fm.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=gl(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=Fm;zn.shared=new Fm;zn.temp=new Fm;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function f$e(e){return un("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function h$e(e){return un("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function p$e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[kt.NORMAL_NPM]=kt.NORMAL,e[kt.ADD_NPM]=kt.ADD,e[kt.SCREEN_NPM]=kt.SCREEN,t[kt.NORMAL]=kt.NORMAL_NPM,t[kt.ADD]=kt.ADD_NPM,t[kt.SCREEN]=kt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const QZ=p$e();function ZZ(e,t){return QZ[t?1:0][e]}function m$e(e,t=null){const n=e*6;if(t=t||new Uint16Array(n),t.length!==n)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${n}`);for(let r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function XG(e){return!(e&e-1)&&!!e}function qG(e){let t=(e>65535?1:0)<<4;e>>>=t;let n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function zm(e,t,n){const r=e.length;let i;if(t>=r||n===0)return;n=t+n>r?r-t:n;const o=r-n;for(i=t;i(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(nt||{});const $F=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},QG=(e,t)=>$F(e).priority??t,yt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map($F).forEach(t=>{t.type.forEach(n=>{var r,i;return(i=(r=this._removeHandlers)[n])==null?void 0:i.call(r,t)})}),this},add(...e){return e.map($F).forEach(t=>{t.type.forEach(n=>{const r=this._addHandlers,i=this._queue;r[n]?r[n](t):(i[n]=i[n]||[],i[n].push(t))})}),this},handle(e,t,n){const r=this._addHandlers,i=this._removeHandlers;if(r[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);r[e]=t,i[e]=n;const o=this._queue;return o[e]&&(o[e].forEach(s=>t(s)),delete o[e]),this},handleByMap(e,t){return this.handle(e,n=>{t[n.name]=n.ref},n=>{delete t[n.name]})},handleByList(e,t,n=-1){return this.handle(e,r=>{t.includes(r.ref)||(t.push(r.ref),t.sort((i,o)=>QG(o,n)-QG(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class FF{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)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(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`)}}}const w$e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +Deprecated since v${e}`),console.warn(r))),FG[t]=!0}let mB;function n$e(){return typeof mB>"u"&&(mB=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:et.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!et.ADAPTER.getWebGLRenderingContext())return!1;const r=et.ADAPTER.createCanvas();let i=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const o=!!((n=i==null?void 0:i.getContextAttributes())!=null&&n.stencil);if(i){const s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,o}catch{return!1}}()),mB}var r$e={grad:.9,turn:360,rad:360/(2*Math.PI)},Wu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},gi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Js=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},KZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},zG=function(e){return{r:Js(e.r,0,255),g:Js(e.g,0,255),b:Js(e.b,0,255),a:Js(e.a)}},gB=function(e){return{r:gi(e.r),g:gi(e.g),b:gi(e.b),a:gi(e.a,3)}},i$e=/^#([0-9a-f]{3,8})$/i,a_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},JZ=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},QZ=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},UG=function(e){return{h:KZ(e.h),s:Js(e.s,0,100),l:Js(e.l,0,100),a:Js(e.a)}},jG=function(e){return{h:gi(e.h),s:gi(e.s),l:gi(e.l),a:gi(e.a,3)}},HG=function(e){return QZ((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},i1=function(e){return{h:(t=JZ(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},o$e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s$e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a$e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,l$e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,LF={string:[[function(e){var t=i$e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?gi(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?gi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=a$e.exec(e)||l$e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:zG({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(e){var t=o$e.exec(e)||s$e.exec(e);if(!t)return null;var n,r,i=UG({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(r$e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return HG(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i===void 0?1:i;return Wu(t)&&Wu(n)&&Wu(r)?zG({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=i===void 0?1:i;if(!Wu(t)||!Wu(n)||!Wu(r))return null;var s=UG({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return HG(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!Wu(t)||!Wu(n)||!Wu(r))return null;var s=function(l){return{h:KZ(l.h),s:Js(l.s,0,100),v:Js(l.v,0,100),a:Js(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return QZ(s)},"hsv"]]},WG=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=gB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?a_(gi(255*o)):"","#"+a_(n)+a_(r)+a_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return gB(this.rgba)},e.prototype.toRgbString=function(){return t=gB(this.rgba),n=t.r,r=t.g,i=t.b,(o=t.a)<1?"rgba("+n+", "+r+", "+i+", "+o+")":"rgb("+n+", "+r+", "+i+")";var t,n,r,i,o},e.prototype.toHsl=function(){return jG(i1(this.rgba))},e.prototype.toHslString=function(){return t=jG(i1(this.rgba)),n=t.h,r=t.s,i=t.l,(o=t.a)<1?"hsla("+n+", "+r+"%, "+i+"%, "+o+")":"hsl("+n+", "+r+"%, "+i+"%)";var t,n,r,i,o},e.prototype.toHsv=function(){return t=JZ(this.rgba),{h:gi(t.h),s:gi(t.s),v:gi(t.v),a:gi(t.a,3)};var t},e.prototype.invert=function(){return gl({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),gl(vB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),gl(vB(this.rgba,-t))},e.prototype.grayscale=function(){return gl(vB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),gl(GG(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),gl(GG(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?gl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):gi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=i1(this.rgba);return typeof t=="number"?gl({h:t,s:n.s,l:n.l,a:n.a}):gi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===gl(t).toHex()},e}(),gl=function(e){return e instanceof BF?e:new BF(e)},VG=[],c$e=function(e){e.forEach(function(t){VG.indexOf(t)<0&&(t(BF,LF),VG.push(t))})};function d$e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=Fm.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=n,this._components[2]*=r,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let n=this._int>>16&255,r=this._int>>8&255,i=this._int&255;return t&&(n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0),(e*255<<24)+(n<<16)+(r<<8)+i}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,n,r]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(r*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,n,r,i]=this._components;return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}normalize(e){let t,n,r,i;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,n=(o>>8&255)/255,r=(o&255)/255,i=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,n,r,i=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,n,r,i=255]=e,t/=255,n/=255,r/=255,i/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const s=Fm.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=gl(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=Fm;zn.shared=new Fm;zn.temp=new Fm;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function f$e(e){return un("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function h$e(e){return un("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function p$e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[kt.NORMAL_NPM]=kt.NORMAL,e[kt.ADD_NPM]=kt.ADD,e[kt.SCREEN_NPM]=kt.SCREEN,t[kt.NORMAL]=kt.NORMAL_NPM,t[kt.ADD]=kt.ADD_NPM,t[kt.SCREEN]=kt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const ZZ=p$e();function eee(e,t){return ZZ[t?1:0][e]}function m$e(e,t=null){const n=e*6;if(t=t||new Uint16Array(n),t.length!==n)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${n}`);for(let r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function XG(e){return!(e&e-1)&&!!e}function qG(e){let t=(e>65535?1:0)<<4;e>>>=t;let n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function zm(e,t,n){const r=e.length;let i;if(t>=r||n===0)return;n=t+n>r?r-t:n;const o=r-n;for(i=t;i(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(nt||{});const $F=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},QG=(e,t)=>$F(e).priority??t,yt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map($F).forEach(t=>{t.type.forEach(n=>{var r,i;return(i=(r=this._removeHandlers)[n])==null?void 0:i.call(r,t)})}),this},add(...e){return e.map($F).forEach(t=>{t.type.forEach(n=>{const r=this._addHandlers,i=this._queue;r[n]?r[n](t):(i[n]=i[n]||[],i[n].push(t))})}),this},handle(e,t,n){const r=this._addHandlers,i=this._removeHandlers;if(r[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);r[e]=t,i[e]=n;const o=this._queue;return o[e]&&(o[e].forEach(s=>t(s)),delete o[e]),this},handleByMap(e,t){return this.handle(e,n=>{t[n.name]=n.ref},n=>{delete t[n.name]})},handleByList(e,t,n=-1){return this.handle(e,r=>{t.includes(r.ref)||(t.push(r.ref),t.sort((i,o)=>QG(o,n)-QG(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class FF{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)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(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`)}}}const w$e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` `);function _$e(e){let t="";for(let n=0;n0&&(t+=` -else `),n=0;--r){const i=zF[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class el{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),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}}Object.defineProperties(el.prototype,{dispatch:{value:el.prototype.emit},run:{value:el.prototype.emit}});class nb{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new el("setRealSize"),this.onUpdate=new el("update"),this.onError=new el("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,n,r){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,n){return!1}}class Gb extends nb{constructor(t,n){const{width:r,height:i}=n||{};if(!r||!i)throw new Error("BufferResource width or height invalid");super(r,i),this.data=t}upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===cl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const E$e={scaleMode:nc.NEAREST,format:Ge.RGBA,alphaMode:cl.NPM},Yp=class extends Hb{constructor(e=null,t=null){super(),t=Object.assign({},Yp.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof nb)&&(e=nee(e,g),e.internal=!0),this.resolution=p||et.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=hp(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=XG(this.realWidth)&&XG(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Oc[this.cacheId],delete vl[this.cacheId],this.cacheId=null),this.dispose(),Yp.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=et.STRICT_TEXTURE_CACHE){const r=typeof e=="string";let i=null;if(r)i=e;else{if(!e._pixiId){const s=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${s}_${hp()}`}i=e._pixiId}let o=Oc[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new Yp(e,t),o.cacheId=i,Yp.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new Gb(e,{width:t,height:n}),o=e instanceof Float32Array?At.FLOAT:At.UNSIGNED_BYTE;return new Yp(i,Object.assign({},E$e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Oc[t]&&Oc[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Oc[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Oc[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Oc[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let h=0;h(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))($i||{});class Mt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Mt(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const u_=[new Mt,new Mt,new Mt,new Mt];class Yt{constructor(t=0,n=0,r=0,i=0){this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=$i.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Yt(0,0,0,0)}clone(){return new Yt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&nt.right?t.right:this.right)<=M)return!1;const B=this.yt.bottom?t.bottom:this.bottom)>B}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const l=u_[0].set(t.left,t.top),c=u_[1].set(t.left,t.bottom),d=u_[2].set(t.right,t.top),f=u_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,I=b*i+x*o,A=b*r+x*s,R=b*i+x*s;return!(Math.max(E,I,A,R)<=b*l.x+x*l.y||Math.min(E,I,A,R)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Pz{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=$i.CIRC}clone(){return new Pz(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const r=this.radius*this.radius;let i=this.x-t,o=this.y-n;return i*=i,o*=o,i+o<=r}getBounds(){return new Yt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class Oz{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=$i.ELIP}clone(){return new Oz(this.x,this.y,this.width,this.height)}contains(t,n){if(this.width<=0||this.height<=0)return!1;let r=(t-this.x)/this.width,i=(n-this.y)/this.height;return r*=r,i*=i,r+i<=1}getBounds(){return new Yt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Um{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class Mz{constructor(t=0,n=0,r=0,i=0,o=20){this.x=t,this.y=n,this.width=r,this.height=i,this.radius=o,this.type=$i.RREC}clone(){return new Mz(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Mt;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Mt;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(jE-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}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 pr;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Eh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ch=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Th=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ih=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],jF=[],oee=[],c_=Math.sign;function M$e(){for(let e=0;e<16;e++){const t=[];jF.push(t);for(let n=0;n<16;n++){const r=c_(Eh[e]*Eh[n]+Th[e]*Ch[n]),i=c_(Ch[e]*Eh[n]+Ih[e]*Ch[n]),o=c_(Eh[e]*Th[n]+Th[e]*Ih[n]),s=c_(Ch[e]*Th[n]+Ih[e]*Ih[n]);for(let l=0;l<16;l++)if(Eh[l]===r&&Ch[l]===i&&Th[l]===o&&Ih[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Eh[e],Ch[e],Th[e],Ih[e],0,0),oee.push(t)}}M$e();const _r={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:e=>Eh[e],uY:e=>Ch[e],vX:e=>Th[e],vY:e=>Ih[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>jF[e][t],sub:(e,t)=>jF[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=oee[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class nd{constructor(t,n,r=0,i=0){this._x=r,this._y=i,this.cb=t,this.scope=n}clone(t=this.cb,n=this.scope){return new nd(t,n,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),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/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const see=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new nd(this.onChange,this,0,0),this.scale=new nd(this.onChange,this,1,1),this.pivot=new nd(this.onChange,this,0,0),this.skew=new nd(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let kz=see;kz.IDENTITY=new see;var k$e=`varying vec2 vTextureCoord; +else `),n=0;--r){const i=zF[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class el{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),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}}Object.defineProperties(el.prototype,{dispatch:{value:el.prototype.emit},run:{value:el.prototype.emit}});class nb{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new el("setRealSize"),this.onUpdate=new el("update"),this.onError=new el("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,n,r){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,n){return!1}}class Gb extends nb{constructor(t,n){const{width:r,height:i}=n||{};if(!r||!i)throw new Error("BufferResource width or height invalid");super(r,i),this.data=t}upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===cl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const E$e={scaleMode:nc.NEAREST,format:Ge.RGBA,alphaMode:cl.NPM},Yp=class extends Hb{constructor(e=null,t=null){super(),t=Object.assign({},Yp.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof nb)&&(e=ree(e,g),e.internal=!0),this.resolution=p||et.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=hp(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=XG(this.realWidth)&&XG(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Oc[this.cacheId],delete vl[this.cacheId],this.cacheId=null),this.dispose(),Yp.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=et.STRICT_TEXTURE_CACHE){const r=typeof e=="string";let i=null;if(r)i=e;else{if(!e._pixiId){const s=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${s}_${hp()}`}i=e._pixiId}let o=Oc[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new Yp(e,t),o.cacheId=i,Yp.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new Gb(e,{width:t,height:n}),o=e instanceof Float32Array?At.FLOAT:At.UNSIGNED_BYTE;return new Yp(i,Object.assign({},E$e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Oc[t]&&Oc[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Oc[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Oc[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Oc[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let h=0;h(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))($i||{});class Mt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Mt(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const u_=[new Mt,new Mt,new Mt,new Mt];class Yt{constructor(t=0,n=0,r=0,i=0){this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=$i.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Yt(0,0,0,0)}clone(){return new Yt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t=this.y&&nt.right?t.right:this.right)<=M)return!1;const B=this.yt.bottom?t.bottom:this.bottom)>B}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const l=u_[0].set(t.left,t.top),c=u_[1].set(t.left,t.bottom),d=u_[2].set(t.right,t.top),f=u_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,I=b*i+x*o,A=b*r+x*s,R=b*i+x*s;return!(Math.max(E,I,A,R)<=b*l.x+x*l.y||Math.min(E,I,A,R)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Pz{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=$i.CIRC}clone(){return new Pz(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const r=this.radius*this.radius;let i=this.x-t,o=this.y-n;return i*=i,o*=o,i+o<=r}getBounds(){return new Yt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class Oz{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=$i.ELIP}clone(){return new Oz(this.x,this.y,this.width,this.height)}contains(t,n){if(this.width<=0||this.height<=0)return!1;let r=(t-this.x)/this.width,i=(n-this.y)/this.height;return r*=r,i*=i,r+i<=1}getBounds(){return new Yt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Um{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class Mz{constructor(t=0,n=0,r=0,i=0,o=20){this.x=t,this.y=n,this.width=r,this.height=i,this.radius=o,this.type=$i.RREC}clone(){return new Mz(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Mt;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Mt;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(jE-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}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 pr;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Eh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ch=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Th=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ih=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],jF=[],see=[],c_=Math.sign;function M$e(){for(let e=0;e<16;e++){const t=[];jF.push(t);for(let n=0;n<16;n++){const r=c_(Eh[e]*Eh[n]+Th[e]*Ch[n]),i=c_(Ch[e]*Eh[n]+Ih[e]*Ch[n]),o=c_(Eh[e]*Th[n]+Th[e]*Ih[n]),s=c_(Ch[e]*Th[n]+Ih[e]*Ih[n]);for(let l=0;l<16;l++)if(Eh[l]===r&&Ch[l]===i&&Th[l]===o&&Ih[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Eh[e],Ch[e],Th[e],Ih[e],0,0),see.push(t)}}M$e();const _r={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:e=>Eh[e],uY:e=>Ch[e],vX:e=>Th[e],vY:e=>Ih[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>jF[e][t],sub:(e,t)=>jF[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=see[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class nd{constructor(t,n,r=0,i=0){this._x=r,this._y=i,this.cb=t,this.scope=n}clone(t=this.cb,n=this.scope){return new nd(t,n,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),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/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const aee=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new nd(this.onChange,this,0,0),this.scale=new nd(this.onChange,this,1,1),this.pivot=new nd(this.onChange,this,0,0),this.skew=new nd(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let kz=aee;kz.IDENTITY=new aee;var k$e=`varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -558,7 +558,7 @@ void main(void){ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; } -`;function e7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function CB(e){const t=new Array(e);for(let n=0;ne.type==="float"&&e.size===1&&!e.isArray,code:e=>` +`;function e7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function CB(e){const t=new Array(e);for(let n=0;ne.type==="float"&&e.size===1&&!e.isArray,code:e=>` if(uv["${e}"] !== ud["${e}"].value) { ud["${e}"].value = uv["${e}"] @@ -829,10 +829,10 @@ void main(void){ cv = cu.value; v = uv["${i}"]; ${d};`)}}return new Function("ud","uv","renderer","syncData",n.join(` -`))}const lee={};let Np=lee;function $$e(){if(Np===lee||Np!=null&&Np.isContextLost()){const e=et.ADAPTER.createCanvas();let t;et.PREFER_ENV>=Ep.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Np=t}return Np}let d_;function F$e(){if(!d_){d_=Ks.MEDIUM;const e=$$e();e&&e.getShaderPrecisionFormat&&(d_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?Ks.HIGH:Ks.MEDIUM)}return d_}function t7(e,t){const n=e.getShaderSource(t).split(` +`))}const uee={};let Np=uee;function $$e(){if(Np===uee||Np!=null&&Np.isContextLost()){const e=et.ADAPTER.createCanvas();let t;et.PREFER_ENV>=Ep.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Np=t}return Np}let d_;function F$e(){if(!d_){d_=Ks.MEDIUM;const e=$$e();e&&e.getShaderPrecisionFormat&&(d_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?Ks.HIGH:Ks.MEDIUM)}return d_}function t7(e,t){const n=e.getShaderSource(t).split(` `).map((d,f)=>`${f}: ${d}`),r=e.getShaderInfoLog(t),i=r.split(` `),o={},s=i.map(d=>parseFloat(d.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(d=>d&&!o[d]?(o[d]=!0,!0):!1),l=[""];s.forEach(d=>{n[d-1]=`%c${n[d-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=n.join(` -`);l[0]=c,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function z$e(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||t7(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||t7(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const U$e={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function uee(e){return U$e[e]}let f_=null;const n7={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function cee(e,t){if(!f_){const n=Object.keys(n7);f_={};for(let r=0;rthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,n=ka._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Ht._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;vthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,n=ka._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Ht._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;v=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=Ep.WEBGL2&&(r=t.getContext("webgl2",n)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",n)||t.getContext("experimental-webgl",n),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,n={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,n,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,n,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const n=t.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),n&&!n.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}aI.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};aI.extension={type:nt.RendererSystem,name:"context"};yt.add(aI);class Q$e extends Gb{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===cl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}}class WF{constructor(t,n){this.width=Math.round(t||100),this.height=Math.round(n||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new el("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Ht(null,{scaleMode:nc.NEAREST,resolution:1,mipmap:jl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Ht(new Q$e(null,{width:this.width,height:this.height}),{scaleMode:nc.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:jl.OFF,format:Ge.DEPTH_COMPONENT,type:At.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,n){if(t=Math.round(t),n=Math.round(n),!(t===this.width&&n===this.height)){this.width=t,this.height=n,this.dirtyId++,this.dirtySize++;for(let r=0;r{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?n(this.process()):n(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=s=>{r(s),this.onError.emit(s)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const n=globalThis.createImageBitmap,r=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:r?"cors":"no-cors"}).then(i=>i.blob()).then(i=>n(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===cl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class pee{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const o7=new pee;function p_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ft extends Hb{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Yt(0,0,1,1)),t instanceof ft&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=o7,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Mt(s.x,s.y):new Mt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&vl[n.url]&&ft.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ft.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ft(this.baseTexture,!this.noFrame&&t,n,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(r._frame=t),r}updateUvs(){this._uvs===o7&&(this._uvs=new pee),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=et.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Ht){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${hp()}`,Ht.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${hp()}`}o=t._pixiId}let s=vl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Ht)?(n.resolution||(n.resolution=Td(t)),s=new ft(new Ht(t,n)),s.baseTexture.cacheId=o,Ht.addToCache(s.baseTexture,o),ft.addToCache(s,o)):!s&&t instanceof Ht&&(s=new ft(t),ft.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ft.from(t,Object.assign({resourceOptions:r},n),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,n,r,i){return new ft(Ht.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Ht(t,Object.assign({scaleMode:Ht.defaultOptions.scaleMode,resolution:Td(n)},i)),{resource:s}=o;s instanceof hee&&(s.url=n);const l=new ft(o);return r||(r=n),Ht.addToCache(l.baseTexture,r),ft.addToCache(l,r),r!==n&&(Ht.addToCache(l.baseTexture,n),ft.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),vl[n]&&vl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),vl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=vl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete vl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ft._EMPTY||(ft._EMPTY=new ft(new Ht),p_(ft._EMPTY),p_(ft._EMPTY.baseTexture)),ft._EMPTY}static get WHITE(){if(!ft._WHITE){const t=et.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ft._WHITE=new ft(Ht.from(t)),p_(ft._WHITE),p_(ft._WHITE.baseTexture)}return ft._WHITE}}class Cp extends ft{constructor(t,n){super(t,n),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,n,r=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,s=Math.round(n*i)/i;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,r&&this.baseTexture.resize(o,s),this.updateUvs()}setResolution(t){const{baseTexture:n}=this;n.resolution!==t&&(n.setResolution(t),this.resize(n.width,n.height,!1))}static create(t){return new Cp(new fee(t))}}class mee{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new fee(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new Cp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=zE(t),n=zE(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,_l.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,_l.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=_l.CLEAR){const{renderTexture:r,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const s=this.tempRect;s.x=0,s.y=0,s.width=t.filterFrame.width,s.height=t.filterFrame.height,r.bind(t,t.filterFrame,s)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?r.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(n===_l.CLEAR||n===_l.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,n,r,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=n,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(n._frame,n.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(Il.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Il.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=m_[0],i=m_[1],o=m_[2],s=m_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?TB.copyFrom(o):TB.identity(),o.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(n),this.transformAABB(o.invert(),t)}}}vee.extension={type:nt.RendererSystem,name:"filter"};yt.add(vee);class tFe{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const nFe=new Yt;class yee{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new WF(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Yt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;et.PREFER_ENV===Ep.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=wF.COLOR|wF.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new tFe(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=Ep.WEBGL2&&(r=t.getContext("webgl2",n)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",n)||t.getContext("experimental-webgl",n),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,n={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,n,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,n,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const n=t.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),n&&!n.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}aI.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};aI.extension={type:nt.RendererSystem,name:"context"};yt.add(aI);class Q$e extends Gb{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===cl.UNPACK);const o=n.realWidth,s=n.realHeight;return r.width===o&&r.height===s?i.texSubImage2D(n.target,0,0,0,o,s,n.format,r.type,this.data):(r.width=o,r.height=s,i.texImage2D(n.target,0,r.internalFormat,o,s,0,n.format,r.type,this.data)),!0}}class WF{constructor(t,n){this.width=Math.round(t||100),this.height=Math.round(n||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new el("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Ht(null,{scaleMode:nc.NEAREST,resolution:1,mipmap:jl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Ht(new Q$e(null,{width:this.width,height:this.height}),{scaleMode:nc.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:jl.OFF,format:Ge.DEPTH_COMPONENT,type:At.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,n){if(t=Math.round(t),n=Math.round(n),!(t===this.width&&n===this.height)){this.width=t,this.height=n,this.dirtyId++,this.dirtySize++;for(let r=0;r{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?n(this.process()):n(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=s=>{r(s),this.onError.emit(s)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const n=globalThis.createImageBitmap,r=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:r?"cors":"no-cors"}).then(i=>i.blob()).then(i=>n(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===cl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class mee{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const o7=new mee;function p_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ft extends Hb{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Yt(0,0,1,1)),t instanceof ft&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=o7,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Mt(s.x,s.y):new Mt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&vl[n.url]&&ft.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ft.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ft(this.baseTexture,!this.noFrame&&t,n,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(r._frame=t),r}updateUvs(){this._uvs===o7&&(this._uvs=new mee),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=et.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Ht){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${hp()}`,Ht.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${hp()}`}o=t._pixiId}let s=vl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Ht)?(n.resolution||(n.resolution=Td(t)),s=new ft(new Ht(t,n)),s.baseTexture.cacheId=o,Ht.addToCache(s.baseTexture,o),ft.addToCache(s,o)):!s&&t instanceof Ht&&(s=new ft(t),ft.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ft.from(t,Object.assign({resourceOptions:r},n),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,n,r,i){return new ft(Ht.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Ht(t,Object.assign({scaleMode:Ht.defaultOptions.scaleMode,resolution:Td(n)},i)),{resource:s}=o;s instanceof pee&&(s.url=n);const l=new ft(o);return r||(r=n),Ht.addToCache(l.baseTexture,r),ft.addToCache(l,r),r!==n&&(Ht.addToCache(l.baseTexture,n),ft.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),vl[n]&&vl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),vl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=vl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete vl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ft._EMPTY||(ft._EMPTY=new ft(new Ht),p_(ft._EMPTY),p_(ft._EMPTY.baseTexture)),ft._EMPTY}static get WHITE(){if(!ft._WHITE){const t=et.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ft._WHITE=new ft(Ht.from(t)),p_(ft._WHITE),p_(ft._WHITE.baseTexture)}return ft._WHITE}}class Cp extends ft{constructor(t,n){super(t,n),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,n,r=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,s=Math.round(n*i)/i;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,r&&this.baseTexture.resize(o,s),this.updateUvs()}setResolution(t){const{baseTexture:n}=this;n.resolution!==t&&(n.setResolution(t),this.resize(n.width,n.height,!1))}static create(t){return new Cp(new hee(t))}}class gee{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new hee(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new Cp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=zE(t),n=zE(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,_l.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,_l.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=_l.CLEAR){const{renderTexture:r,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const s=this.tempRect;s.x=0,s.y=0,s.width=t.filterFrame.width,s.height=t.filterFrame.height,r.bind(t,t.filterFrame,s)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?r.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(n===_l.CLEAR||n===_l.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,n,r,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=n,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(n._frame,n.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(Il.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Il.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=m_[0],i=m_[1],o=m_[2],s=m_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?TB.copyFrom(o):TB.identity(),o.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(n),this.transformAABB(o.invert(),t)}}}yee.extension={type:nt.RendererSystem,name:"filter"};yt.add(yee);class tFe{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const nFe=new Yt;class xee{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new WF(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Yt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;et.PREFER_ENV===Ep.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=wF.COLOR|wF.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new tFe(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}wee.extension={type:nt.RendererSystem,name:"mask"};yt.add(wee);class _ee{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:n}=this.renderer,r=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==r&&(i===0?n.disable(this.glConst):(n.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const a7=new pr,l7=[],hS=class extends _ee{constructor(e){super(e),this.glConst=et.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:n}=e,{renderer:r}=this,i=r.renderTexture,o=n.getBounds(!0,l7.pop()??new Yt);this.roundFrameToPixels(o,i.current?i.current.resolution:r.resolution,i.sourceFrame,i.destinationFrame,r.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:n,c:r,d:i}=e;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||hS.isMatrixRotated(t.worldTransform)||hS.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const n=e._scissorRectLocal;return n.width>0&&n.height>0}roundFrameToPixels(e,t,n,r,i){hS.isMatrixRotated(i)||(i=i?a7.copyFrom(i):a7.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.renderer.filter.transformAABB(i,e),e.fit(r),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&l7.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let See=hS;See.extension={type:nt.RendererSystem,name:"scissor"};yt.add(See);class Eee extends _ee{constructor(t){super(t),this.glConst=et.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const n=t.maskObject,{gl:r}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),r.clearStencil(0),r.clear(r.STENCIL_BUFFER_BIT),r.enable(r.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(t._colorMask=o,r.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=r?r._colorMask:15;i!==0&&(r._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(r._colorMask=i,n.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Eee.extension={type:nt.RendererSystem,name:"stencil"};yt.add(Eee);class Cee{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const n in t)this.plugins[n]=new t[n](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Cee.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"_plugin"};yt.add(Cee);class Tee{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Tee.extension={type:nt.RendererSystem,name:"projection"};yt.add(Tee);const aFe=new kz;class Iee{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=Cp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=aFe,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}Iee.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"textureGenerator"};yt.add(Iee);const dh=new Yt,tx=new Yt;class Ree{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Yt,this.destinationFrame=new Yt,this.viewportFrame=new Yt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(dh.width=t.frame.width,dh.height=t.frame.height,n=dh),r||(tx.x=t.frame.x,tx.y=t.frame.y,tx.width=n.width,tx.height=n.height,r=tx),s=o.framebuffer):(l=i.resolution,n||(dh.width=i._view.screen.width,dh.height=i._view.screen.height,n=dh),r||(r=dh,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Ree.extension={type:nt.RendererSystem,name:"renderTexture"};yt.add(Ree);class lFe{constructor(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function uFe(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}_ee.extension={type:nt.RendererSystem,name:"mask"};yt.add(_ee);class See{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:n}=this.renderer,r=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==r&&(i===0?n.disable(this.glConst):(n.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const a7=new pr,l7=[],hS=class extends See{constructor(e){super(e),this.glConst=et.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:n}=e,{renderer:r}=this,i=r.renderTexture,o=n.getBounds(!0,l7.pop()??new Yt);this.roundFrameToPixels(o,i.current?i.current.resolution:r.resolution,i.sourceFrame,i.destinationFrame,r.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:n,c:r,d:i}=e;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||hS.isMatrixRotated(t.worldTransform)||hS.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const n=e._scissorRectLocal;return n.width>0&&n.height>0}roundFrameToPixels(e,t,n,r,i){hS.isMatrixRotated(i)||(i=i?a7.copyFrom(i):a7.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.renderer.filter.transformAABB(i,e),e.fit(r),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&l7.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Eee=hS;Eee.extension={type:nt.RendererSystem,name:"scissor"};yt.add(Eee);class Cee extends See{constructor(t){super(t),this.glConst=et.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const n=t.maskObject,{gl:r}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),r.clearStencil(0),r.clear(r.STENCIL_BUFFER_BIT),r.enable(r.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(t._colorMask=o,r.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=r?r._colorMask:15;i!==0&&(r._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(r._colorMask=i,n.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Cee.extension={type:nt.RendererSystem,name:"stencil"};yt.add(Cee);class Tee{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const n in t)this.plugins[n]=new t[n](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Tee.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"_plugin"};yt.add(Tee);class Iee{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Iee.extension={type:nt.RendererSystem,name:"projection"};yt.add(Iee);const aFe=new kz;class Ree{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=Cp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=aFe,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}Ree.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"textureGenerator"};yt.add(Ree);const dh=new Yt,tx=new Yt;class Aee{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Yt,this.destinationFrame=new Yt,this.viewportFrame=new Yt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(dh.width=t.frame.width,dh.height=t.frame.height,n=dh),r||(tx.x=t.frame.x,tx.y=t.frame.y,tx.width=n.width,tx.height=n.height,r=tx),s=o.framebuffer):(l=i.resolution,n||(dh.width=i._view.screen.width,dh.height=i._view.screen.height,n=dh),r||(r=dh,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Aee.extension={type:nt.RendererSystem,name:"renderTexture"};yt.add(Aee);class lFe{constructor(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function uFe(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function mFe(e,t){const n=[];for(const r in e)t[r]&&n.push(t[r]);return n.sort((r,i)=>r.index-i.index),n}function gFe(e,t){if(!e.autoManage)return{size:0,syncFunc:fFe};const n=mFe(e.uniforms,t),{uboElements:r,size:i}=pFe(n),o=[` + `},Pee={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function pFe(e){const t=e.map(o=>({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function mFe(e,t){const n=[];for(const r in e)t[r]&&n.push(t[r]);return n.sort((r,i)=>r.index-i.index),n}function gFe(e,t){if(!e.autoManage)return{size:0,syncFunc:fFe};const n=mFe(e.uniforms,t),{uboElements:r,size:i}=pFe(n),o=[` var v = null; var v2 = null; var cv = null; @@ -994,7 +994,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `];for(let s=0;s1){const h=uee(l.data.type),p=Math.max(Aee[l.data.type]/16,1),g=h/p,v=(4-g%4)%4;o.push(` + `];for(let s=0;s1){const h=cee(l.data.type),p=Math.max(Pee[l.data.type]/16,1),g=h/p,v=(4-g%4)%4;o.push(` cv = ud.${d}.value; v = uv.${d}; offset = ${l.offset/4}; @@ -1018,7 +1018,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}let vFe=0;const g_={textureCount:0,uboCount:0};class Pee{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=vFe++}systemCheck(){if(!j$e())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,n){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(g_.textureCount=0,g_.uboCount=0,this.syncUniformGroup(t.uniformGroup,g_)),i}setUniforms(t){const n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)}syncUniformGroup(t,n){const r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))}syncUniforms(t,n,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(n.uniformData,t.uniforms,this.renderer,r)}createSyncGroups(t){const n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=N$e(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,n){const r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;const i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,g_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=gFe(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=dFe(n,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Pee.extension={type:nt.RendererSystem,name:"shader"};yt.add(Pee);class lI{constructor(t){this.renderer=t}run(t){const{renderer:n}=this;n.runners.init.emit(n.options),t.hello&&console.log(`PixiJS 7.2.4 - ${n.rendererLogId} - https://pixijs.com`),n.resize(n.screen.width,n.screen.height)}destroy(){}}lI.defaultOptions={hello:!1};lI.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"startup"};yt.add(lI);function yFe(e,t=[]){return t[kt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.ADD]=[e.ONE,e.ONE],t[kt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.NONE]=[0,0],t[kt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[kt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[kt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[kt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[kt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[kt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[kt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[kt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[kt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[kt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const xFe=0,bFe=1,wFe=2,_Fe=3,SFe=4,EFe=5,GF=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=kt.NONE,this._blendEq=!1,this.map=[],this.map[xFe]=this.setBlend,this.map[bFe]=this.setOffset,this.map[wFe]=this.setCullFace,this.map[_Fe]=this.setDepthTest,this.map[SFe]=this.setFrontFace,this.map[EFe]=this.setDepthMask,this.checks=[],this.defaultState=new Cc,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=yFe(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,n=0;for(;t;)t&1&&this.map[n].call(this,!!(e.data&1<>1,n++;this.stateId=e.data}for(let t=0;tt.systems[i]),r=[...n,...Object.keys(t.systems).filter(i=>!n.includes(i))];for(const i of r)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(n=>{this.runners[n]=new el(n)})}addSystem(t,n){const r=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=r,this._systemsHash[n]=r;for(const i in this.runners)this.runners[i].add(r);return this}emitWithCustomOptions(t,n){const r=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=r.find(s=>this._systemsHash[s]===i);i[t.name](n[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const pS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=pS.defaultMaxIdle,this.checkCountMax=pS.defaultCheckCountMax,this.mode=pS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==bz.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let n=!1;for(let r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){let r=0;for(let i=0;i=0;r--)this.unload(e.children[r])}destroy(){this.renderer=null}};let Ha=pS;Ha.defaultMode=bz.AUTO;Ha.defaultMaxIdle=60*60;Ha.defaultCheckCountMax=60*10;Ha.extension={type:nt.RendererSystem,name:"textureGC"};yt.add(Ha);class RB{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=At.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function TFe(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[At.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[At.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[At.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[At.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[At.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[At.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[At.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[At.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[At.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[At.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[At.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[At.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[At.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[At.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[At.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[At.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[At.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[At.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[At.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[At.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class Mee{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ht,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=TFe(t);const n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=n;for(let i=0;i=0;--o){const s=n[o];s&&s._glTextures[i].samplerType!==_F.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new RB(this.gl.createTexture());return n.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=n,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),n}initTextureType(t,n){var r;n.internalFormat=((r=this.internalFormats[t.type])==null?void 0:r[t.format])??t.format,this.webGLVersion===2&&t.type===At.HALF_FLOAT?n.type=this.gl.HALF_FLOAT:n.type=t.type}updateTexture(t){var i;const n=t._glTextures[this.CONTEXT_UID];if(!n)return;const r=this.renderer;if(this.initTextureType(t,n),(i=t.resource)!=null&&i.upload(r,t,n))n.samplerType!==_F.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&zm(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===jl.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=bd.CLAMP:n.wrapMode=t.wrapMode,(r=t.resource)!=null&&r.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)}setStyle(t,n){const r=this.gl;if(n.mipmap&&t.mipmap!==jl.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===nc.LINEAR){const o=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}Mee.extension={type:nt.RendererSystem,name:"texture"};yt.add(Mee);class kee{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glTransformFeedbacks[r]||this.createGLTransformFeedback(t);n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,n){const{gl:r,renderer:i}=this;n&&i.shader.bind(n),r.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:n,renderer:r,CONTEXT_UID:i}=this,o=n.createTransformFeedback();t._glTransformFeedbacks[i]=o,n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,o);for(let s=0;s(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(pp||{});class AB{constructor(t,n=null,r=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}match(t,n=null){return this.fn===t&&this.context===n}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const ds=class{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 AB(null,null,1/0),this.deltaMS=1/ds.targetFPMS,this.elapsedMS=1/ds.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=pp.NORMAL){return this._addListener(new AB(e,t,n))}addOnce(e,t,n=pp.NORMAL){return this._addListener(new AB(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?di.shared:new di,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Dee.extension=nt.Application;yt.add(Dee);const Lee=[];yt.handleByList(nt.Renderer,Lee);function IFe(e){for(const t of Lee)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var RFe=`attribute vec2 aVertexPosition; +`))}}let vFe=0;const g_={textureCount:0,uboCount:0};class Oee{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=vFe++}systemCheck(){if(!j$e())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,n){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(g_.textureCount=0,g_.uboCount=0,this.syncUniformGroup(t.uniformGroup,g_)),i}setUniforms(t){const n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)}syncUniformGroup(t,n){const r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))}syncUniforms(t,n,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(n.uniformData,t.uniforms,this.renderer,r)}createSyncGroups(t){const n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=N$e(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,n){const r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;const i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,g_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=gFe(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=dFe(n,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Oee.extension={type:nt.RendererSystem,name:"shader"};yt.add(Oee);class lI{constructor(t){this.renderer=t}run(t){const{renderer:n}=this;n.runners.init.emit(n.options),t.hello&&console.log(`PixiJS 7.2.4 - ${n.rendererLogId} - https://pixijs.com`),n.resize(n.screen.width,n.screen.height)}destroy(){}}lI.defaultOptions={hello:!1};lI.extension={type:[nt.RendererSystem,nt.CanvasRendererSystem],name:"startup"};yt.add(lI);function yFe(e,t=[]){return t[kt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.ADD]=[e.ONE,e.ONE],t[kt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.NONE]=[0,0],t[kt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[kt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[kt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[kt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[kt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[kt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[kt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[kt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[kt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[kt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[kt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const xFe=0,bFe=1,wFe=2,_Fe=3,SFe=4,EFe=5,GF=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=kt.NONE,this._blendEq=!1,this.map=[],this.map[xFe]=this.setBlend,this.map[bFe]=this.setOffset,this.map[wFe]=this.setCullFace,this.map[_Fe]=this.setDepthTest,this.map[SFe]=this.setFrontFace,this.map[EFe]=this.setDepthMask,this.checks=[],this.defaultState=new Cc,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=yFe(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,n=0;for(;t;)t&1&&this.map[n].call(this,!!(e.data&1<>1,n++;this.stateId=e.data}for(let t=0;tt.systems[i]),r=[...n,...Object.keys(t.systems).filter(i=>!n.includes(i))];for(const i of r)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(n=>{this.runners[n]=new el(n)})}addSystem(t,n){const r=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=r,this._systemsHash[n]=r;for(const i in this.runners)this.runners[i].add(r);return this}emitWithCustomOptions(t,n){const r=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=r.find(s=>this._systemsHash[s]===i);i[t.name](n[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const pS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=pS.defaultMaxIdle,this.checkCountMax=pS.defaultCheckCountMax,this.mode=pS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==bz.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let n=!1;for(let r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){let r=0;for(let i=0;i=0;r--)this.unload(e.children[r])}destroy(){this.renderer=null}};let Ha=pS;Ha.defaultMode=bz.AUTO;Ha.defaultMaxIdle=60*60;Ha.defaultCheckCountMax=60*10;Ha.extension={type:nt.RendererSystem,name:"textureGC"};yt.add(Ha);class RB{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=At.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function TFe(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[At.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[At.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[At.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[At.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[At.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[At.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[At.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[At.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[At.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[At.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[At.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[At.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[At.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[At.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[At.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[At.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[At.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[At.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[At.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[At.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class kee{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ht,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=TFe(t);const n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=n;for(let i=0;i=0;--o){const s=n[o];s&&s._glTextures[i].samplerType!==_F.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new RB(this.gl.createTexture());return n.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=n,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),n}initTextureType(t,n){var r;n.internalFormat=((r=this.internalFormats[t.type])==null?void 0:r[t.format])??t.format,this.webGLVersion===2&&t.type===At.HALF_FLOAT?n.type=this.gl.HALF_FLOAT:n.type=t.type}updateTexture(t){var i;const n=t._glTextures[this.CONTEXT_UID];if(!n)return;const r=this.renderer;if(this.initTextureType(t,n),(i=t.resource)!=null&&i.upload(r,t,n))n.samplerType!==_F.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&zm(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===jl.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=bd.CLAMP:n.wrapMode=t.wrapMode,(r=t.resource)!=null&&r.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)}setStyle(t,n){const r=this.gl;if(n.mipmap&&t.mipmap!==jl.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===nc.LINEAR){const o=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===nc.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}kee.extension={type:nt.RendererSystem,name:"texture"};yt.add(kee);class Dee{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glTransformFeedbacks[r]||this.createGLTransformFeedback(t);n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,n){const{gl:r,renderer:i}=this;n&&i.shader.bind(n),r.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:n,renderer:r,CONTEXT_UID:i}=this,o=n.createTransformFeedback();t._glTransformFeedbacks[i]=o,n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,o);for(let s=0;s(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(pp||{});class AB{constructor(t,n=null,r=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}match(t,n=null){return this.fn===t&&this.context===n}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const ds=class{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 AB(null,null,1/0),this.deltaMS=1/ds.targetFPMS,this.elapsedMS=1/ds.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=pp.NORMAL){return this._addListener(new AB(e,t,n))}addOnce(e,t,n=pp.NORMAL){return this._addListener(new AB(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?di.shared:new di,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Lee.extension=nt.Application;yt.add(Lee);const Bee=[];yt.handleByList(nt.Renderer,Bee);function IFe(e){for(const t of Bee)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var RFe=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -1055,7 +1055,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const PFe=RFe,Bee=AFe;class Nee{constructor(t){this.renderer=t}contextChange(t){let n;if(this.renderer.context.webGLVersion===1){const r=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,r)}else{const r=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r)}n>=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}Nee.extension={type:nt.RendererSystem,name:"_multisample"};yt.add(Nee);class OFe{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class $ee{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);n.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:n}=this;n.bindBuffer(t,null)}bindBufferBase(t,n){const{gl:r,CONTEXT_UID:i}=this;if(this.boundBufferBases[n]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[n]=t,r.bindBufferBase(r.UNIFORM_BUFFER,n,o.buffer)}}bindBufferRange(t,n,r){const{gl:i,CONTEXT_UID:o}=this;r=r||0;const s=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,n||0,s.buffer,r*256,256)}update(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,n.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{const o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}}dispose(t,n){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(n||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const n=Object.keys(this.managedBuffers);for(let r=0;rr.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(n).then(()=>{const{realWidth:r,realHeight:i}=this.items[0];return this.resize(r,i),Promise.resolve(this)}),this._load}}class MFe extends zee{constructor(t,n){const{width:r,height:i}=n||{};let o,s;Array.isArray(t)?(o=t,s=t.length):s=t,super(s,{width:r,height:i}),o&&this.initFromArray(o,n)}addBaseTextureAt(t,n){if(t.resource)this.addResourceAt(t.resource,n);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=Bm.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Bm.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,n){const r=this.itemDirtyIds;for(let i=0;i{if(this.url===null){t(this);return}try{const r=await et.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await r.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===cl.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(r){if(this.destroyed)return;n(r),this.onError.emit(r)}}),this._load)}upload(t,n,r){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),super.upload(t,n,r)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Sm._EMPTY=Sm._EMPTY??et.ADAPTER.createCanvas(0,0),Sm._EMPTY}}const mS=class extends Rd{constructor(e,t){t=t||{},super(et.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},mS.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;Rd.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,n=e.height;if(!t||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let r=t*this.scale,i=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(r=this._overrideWidth||this._overrideHeight/n*t,i=this._overrideHeight||this._overrideWidth/t*n),r=Math.round(r),i=Math.round(i);const o=this.source;o.width=r,o.height=i,o._pixiId=`canvas_${hp()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=mS.SVG_SIZE.exec(e),n={};return t&&(n[t[1]]=Math.round(parseFloat(t[3])),n[t[5]]=Math.round(parseFloat(t[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&mS.SVG_XML.test(e)}};let rb=mS;rb.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const XF=class extends Rd{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");n.setAttribute("preload","auto"),n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const r=e[0].src||e[0];Rd.crossOrigin(n,r,t.crossorigin);for(let i=0;i{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(di.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(di.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(di.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(di.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(di.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||XF.TYPES.includes(t)}};let Dz=XF;Dz.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Dz.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};zF.push(Sm,hee,kFe,Dz,rb,Gb,Uee,MFe);class HE{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?Yt.EMPTY:(t=t||new Yt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Or extends Hb{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new kz,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new HE,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const n=Object.keys(t);for(let r=0;r1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);zm(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&i<=r){o=this.children.splice(n,i);for(let s=0;s1&&this.children.sort(BFe),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let n,r;this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==qF.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=LFe.copyFrom(r),r.prepend(i)):r=i),n&&t.intersects(n,r))this._render(e);else if(this.cullArea)return;for(let o=0,s=this.children.length;ot in e?NFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>($Fe(e,typeof t!="symbol"?t+"":t,n),n);let fa=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var FFe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},jee={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Mt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const jFe={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let HFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},jFe,n),this.ease=cI(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Mt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Mt(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Mt(0,0),bottomRight:new Mt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const VFe={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let XFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},VFe,n),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&tthis.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&nthis.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},n={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const o=this.options.minScale;t.x=typeof o.x>"u"?null:o.x,t.y=typeof o.y>"u"?null:o.y}if(typeof this.options.maxScale=="number")n.x=this.options.maxScale,n.y=this.options.maxScale;else if(this.options.maxScale!==null){const o=this.options.maxScale;n.x=typeof o.x>"u"?null:o.x,n.y=typeof o.y>"u"?null:o.y}let r=this.parent.scale.x,i=this.parent.scale.y;t.x!==null&&rn.x&&(r=n.x),t.y!==null&&in.y&&(i=n.y),(r!==this.parent.scale.x||i!==this.parent.scale.y)&&(this.parent.scale.set(r,i),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}};const qFe={friction:.98,bounce:.8,minSpeed:.01},Mc=16;let YFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},qFe,n),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const n=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?n.x===t.original.x&&(n.x=this.parent.x):t.type==="clamp-y"&&t.original&&n.y===t.original.y&&(n.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const n of this.saved)if(n.time>=t-100){const r=t-n.time;this.x=(this.parent.x-n.x)/r,this.y=(this.parent.y-n.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const n=this.x||this.y,r=this.timeSinceRelease,i=this.timeSinceRelease+t;if(this.x){const o=this.percentChangeX,s=Math.log(o);this.parent.x+=this.x*Mc/s*(Math.pow(o,i/Mc)-Math.pow(o,r/Mc)),this.x*=Math.pow(this.percentChangeX,t/Mc)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Mc/s*(Math.pow(o,i/Mc)-Math.pow(o,r/Mc)),this.y*=Math.pow(this.percentChangeY,t/Mc)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Mt(this.last.x,this.last.y),world:this.parent.toWorld(new Mt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Mt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const QFe={speed:0,acceleration:null,radius:null};let ZFe=class extends fa{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},QFe,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const e3e={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let t3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},e3e,n),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const n=t.global.x,r=t.global.y;if(this.radiusSquared){const i=this.parent.toScreen(this.parent.center);if(Math.pow(i.x-n,2)+Math.pow(i.y-r,2)>=this.radiusSquared){const o=Math.atan2(i.y-r,i.x-n);this.options.linear?(this.horizontal=Math.round(Math.cos(o))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(o))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(o)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(o)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&nthis.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&rthis.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}};const n3e={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let r3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},n3e,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Mt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const i3e={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let o3e=class extends fa{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},i3e,i),this.ease=cI(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const s3e={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let a3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},s3e,n),this.ease=cI(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const l3e={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let u3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},l3e,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},c3e=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Yt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Mt;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of nx)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let n=!1;for(const r of this.list)r.down(t)&&(n=!0);return n}move(t){let n=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(n=!0);return n}up(t){let n=!1;for(const r of this.list)r.up(t)&&(n=!0);return n}wheel(t){let n=!1;for(const r of this.list)r.wheel(t)&&(n=!0);return n}};const f3e={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:di.shared,allowPreserveDragOutside:!1};class h3e extends Ho{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...f3e,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new c3e(this),this.plugins=new d3e(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new Yt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,n=window.innerHeight,r,i){this.screenWidth=t,this.screenHeight=n,typeof r<"u"&&(this._worldWidth=r),typeof i<"u"&&(this._worldHeight=i),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new Yt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Mt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Mt(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Mt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Mt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Mt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Yt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new JFe(this,t)),this}clamp(t){return this.plugins.add("clamp",new GFe(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new YFe(this,t)),this}bounce(t){return this.plugins.add("bounce",new HFe(this,t)),this}pinch(t){return this.plugins.add("pinch",new r3e(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new o3e(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new ZFe(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new u3e(this,t)),this}animate(t){return this.plugins.add("animate",new UFe(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new XFe(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new t3e(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,n,r,i,o){o&&(r>this.worldScreenWidth||i>this.worldScreenHeight)&&(this.fit(!0,r,i),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;tthis.right&&(this.right=t+r,s=!0),nthis.bottom&&(this.bottom=n+i,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}const rx=new Mt,p3e=new Uint16Array([0,1,2,0,2,3]);class Tp extends Ho{constructor(t){super(),this._anchor=new nd(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=kt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ft.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=p3e,this.pluginName="batch",this.isSprite=!0,this._roundPixels=et.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=td(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=td(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=et.RESOLUTION;for(let b=0;b=i&&rx.x=o&&rx.y=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}$ee.extension={type:nt.RendererSystem,name:"_multisample"};yt.add($ee);class OFe{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Fee{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);n.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:n}=this;n.bindBuffer(t,null)}bindBufferBase(t,n){const{gl:r,CONTEXT_UID:i}=this;if(this.boundBufferBases[n]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[n]=t,r.bindBufferBase(r.UNIFORM_BUFFER,n,o.buffer)}}bindBufferRange(t,n,r){const{gl:i,CONTEXT_UID:o}=this;r=r||0;const s=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,n||0,s.buffer,r*256,256)}update(t){const{gl:n,CONTEXT_UID:r}=this,i=t._glBuffers[r]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,n.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{const o=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,o)}}dispose(t,n){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(n||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const n=Object.keys(this.managedBuffers);for(let r=0;rr.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(n).then(()=>{const{realWidth:r,realHeight:i}=this.items[0];return this.resize(r,i),Promise.resolve(this)}),this._load}}class MFe extends Uee{constructor(t,n){const{width:r,height:i}=n||{};let o,s;Array.isArray(t)?(o=t,s=t.length):s=t,super(s,{width:r,height:i}),o&&this.initFromArray(o,n)}addBaseTextureAt(t,n){if(t.resource)this.addResourceAt(t.resource,n);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=Bm.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Bm.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,n){const r=this.itemDirtyIds;for(let i=0;i{if(this.url===null){t(this);return}try{const r=await et.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await r.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===cl.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(r){if(this.destroyed)return;n(r),this.onError.emit(r)}}),this._load)}upload(t,n,r){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),super.upload(t,n,r)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Sm._EMPTY=Sm._EMPTY??et.ADAPTER.createCanvas(0,0),Sm._EMPTY}}const mS=class extends Rd{constructor(e,t){t=t||{},super(et.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},mS.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;Rd.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,n=e.height;if(!t||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let r=t*this.scale,i=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(r=this._overrideWidth||this._overrideHeight/n*t,i=this._overrideHeight||this._overrideWidth/t*n),r=Math.round(r),i=Math.round(i);const o=this.source;o.width=r,o.height=i,o._pixiId=`canvas_${hp()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=mS.SVG_SIZE.exec(e),n={};return t&&(n[t[1]]=Math.round(parseFloat(t[3])),n[t[5]]=Math.round(parseFloat(t[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&mS.SVG_XML.test(e)}};let rb=mS;rb.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const XF=class extends Rd{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");n.setAttribute("preload","auto"),n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const r=e[0].src||e[0];Rd.crossOrigin(n,r,t.crossorigin);for(let i=0;i{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(di.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(di.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(di.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(di.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(di.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||XF.TYPES.includes(t)}};let Dz=XF;Dz.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Dz.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};zF.push(Sm,pee,kFe,Dz,rb,Gb,jee,MFe);class HE{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?Yt.EMPTY:(t=t||new Yt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Or extends Hb{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new kz,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new HE,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const n=Object.keys(t);for(let r=0;r1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);zm(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&i<=r){o=this.children.splice(n,i);for(let s=0;s1&&this.children.sort(BFe),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let n,r;this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==qF.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=LFe.copyFrom(r),r.prepend(i)):r=i),n&&t.intersects(n,r))this._render(e);else if(this.cullArea)return;for(let o=0,s=this.children.length;ot in e?NFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>($Fe(e,typeof t!="symbol"?t+"":t,n),n);let fa=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var FFe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Hee={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Mt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const jFe={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let HFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},jFe,n),this.ease=cI(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Mt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Mt(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Mt(0,0),bottomRight:new Mt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const VFe={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let XFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},VFe,n),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&tthis.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&nthis.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},n={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const o=this.options.minScale;t.x=typeof o.x>"u"?null:o.x,t.y=typeof o.y>"u"?null:o.y}if(typeof this.options.maxScale=="number")n.x=this.options.maxScale,n.y=this.options.maxScale;else if(this.options.maxScale!==null){const o=this.options.maxScale;n.x=typeof o.x>"u"?null:o.x,n.y=typeof o.y>"u"?null:o.y}let r=this.parent.scale.x,i=this.parent.scale.y;t.x!==null&&rn.x&&(r=n.x),t.y!==null&&in.y&&(i=n.y),(r!==this.parent.scale.x||i!==this.parent.scale.y)&&(this.parent.scale.set(r,i),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}};const qFe={friction:.98,bounce:.8,minSpeed:.01},Mc=16;let YFe=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},qFe,n),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const n=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?n.x===t.original.x&&(n.x=this.parent.x):t.type==="clamp-y"&&t.original&&n.y===t.original.y&&(n.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const n of this.saved)if(n.time>=t-100){const r=t-n.time;this.x=(this.parent.x-n.x)/r,this.y=(this.parent.y-n.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const n=this.x||this.y,r=this.timeSinceRelease,i=this.timeSinceRelease+t;if(this.x){const o=this.percentChangeX,s=Math.log(o);this.parent.x+=this.x*Mc/s*(Math.pow(o,i/Mc)-Math.pow(o,r/Mc)),this.x*=Math.pow(this.percentChangeX,t/Mc)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Mc/s*(Math.pow(o,i/Mc)-Math.pow(o,r/Mc)),this.y*=Math.pow(this.percentChangeY,t/Mc)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Mt(this.last.x,this.last.y),world:this.parent.toWorld(new Mt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Mt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const QFe={speed:0,acceleration:null,radius:null};let ZFe=class extends fa{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},QFe,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const e3e={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let t3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},e3e,n),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const n=t.global.x,r=t.global.y;if(this.radiusSquared){const i=this.parent.toScreen(this.parent.center);if(Math.pow(i.x-n,2)+Math.pow(i.y-r,2)>=this.radiusSquared){const o=Math.atan2(i.y-r,i.x-n);this.options.linear?(this.horizontal=Math.round(Math.cos(o))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(o))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(o)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(o)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&nthis.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&rthis.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}};const n3e={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let r3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},n3e,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Mt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const i3e={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let o3e=class extends fa{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},i3e,i),this.ease=cI(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const s3e={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let a3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},s3e,n),this.ease=cI(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const l3e={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let u3e=class extends fa{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},l3e,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},c3e=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Yt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Mt;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of nx)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let n=!1;for(const r of this.list)r.down(t)&&(n=!0);return n}move(t){let n=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(n=!0);return n}up(t){let n=!1;for(const r of this.list)r.up(t)&&(n=!0);return n}wheel(t){let n=!1;for(const r of this.list)r.wheel(t)&&(n=!0);return n}};const f3e={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:di.shared,allowPreserveDragOutside:!1};class h3e extends Ho{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...f3e,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new c3e(this),this.plugins=new d3e(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new Yt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,n=window.innerHeight,r,i){this.screenWidth=t,this.screenHeight=n,typeof r<"u"&&(this._worldWidth=r),typeof i<"u"&&(this._worldHeight=i),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new Yt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Mt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Mt(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Mt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Mt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Mt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Yt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new JFe(this,t)),this}clamp(t){return this.plugins.add("clamp",new GFe(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new YFe(this,t)),this}bounce(t){return this.plugins.add("bounce",new HFe(this,t)),this}pinch(t){return this.plugins.add("pinch",new r3e(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new o3e(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new ZFe(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new u3e(this,t)),this}animate(t){return this.plugins.add("animate",new UFe(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new XFe(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new t3e(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,n,r,i,o){o&&(r>this.worldScreenWidth||i>this.worldScreenHeight)&&(this.fit(!0,r,i),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let s=!1;tthis.right&&(this.right=t+r,s=!0),nthis.bottom&&(this.bottom=n+i,s=!0),s&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}const rx=new Mt,p3e=new Uint16Array([0,1,2,0,2,3]);class Tp extends Ho{constructor(t){super(),this._anchor=new nd(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=kt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ft.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=p3e,this.pluginName="batch",this.isSprite=!0,this._roundPixels=et.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=td(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=td(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=et.RESOLUTION;for(let b=0;b=i&&rx.x=o&&rx.y{Object.defineProperty(c7,e,{get(){return un("7.1.0",`filters.${e} has moved to ${e}`),t}})});class k3e{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(di.system.add(this.tickerUpdate,this,pp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(di.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(Vc.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,PB),!t.hitArea.contains(PB.x,PB.y)))return!0;if(t._mask){const i=t._mask.isMaskData?t._mask.maskObject:t._mask;if(i&&!((r=i.containsPoint)!=null&&r.call(i,n)))return!0}return!1}hitTestFn(t,n){return t.eventMode==="passive"?!1:t.hitArea?!0:t.containsPoint?t.containsPoint(n):!1}notifyTarget(t,n){var o,s;n=n??t.type;const r=`on${n}`;(s=(o=t.currentTarget)[r])==null||s.call(o,t);const i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${n}capture`:n;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,n)}mapPointerDown(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.createPointerEvent(t),i=r.pointerType==="mouse"||r.pointerType==="pen";this.dispatchEvent(r,"pointerover"),i&&this.dispatchEvent(r,"mouseover"),r.pointerType==="mouse"&&(this.cursor=(s=r.target)==null?void 0:s.cursor);const o=this.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseenter"),o.target=o.target.parent;n.overTargets=r.composedPath(),this.freeEvent(r),this.freeEvent(o)}mapPointerOut(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId);if(n.overTargets){const r=t.pointerType==="mouse"||t.pointerType==="pen",i=this.findMountedTarget(n.overTargets),o=this.createPointerEvent(t,"pointerout",i);this.dispatchEvent(o),r&&this.dispatchEvent(o,"mouseout");const s=this.createPointerEvent(t,"pointerleave",i);for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),r&&this.notifyTarget(s,"mouseleave"),s.target=s.target.parent;n.overTargets=null,this.freeEvent(o),this.freeEvent(s)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[t.button]),i=this.createPointerEvent(t);if(r){let o=r;for(;o;)i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),o=o.parent;delete n.pressTargetsByButton[t.button]}this.freeEvent(i)}mapWheel(t){if(!(t instanceof xg)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const n=this.createWheelEvent(t);this.dispatchEvent(n),this.freeEvent(n)}findMountedTarget(t){if(!t)return null;let n=t[0];for(let r=1;r(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=r),t[n]=r,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:n}=this.renderer;this.setTargetElement(t),this.resolution=n,JF._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":t&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":t&&Object.assign(this.domElement.style,n);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,r=t.length;n0&&(t=e.composedPath()[0]);const n=t!==this.domElement?"outside":"",r=this.normalizeToPointerData(e);for(let i=0,o=r.length;i"u"&&(i.button=0),typeof i.buttons>"u"&&(i.buttons=1),typeof i.isPrimary>"u"&&(i.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof i.width>"u"&&(i.width=i.radiusX||1),typeof i.height>"u"&&(i.height=i.radiusY||1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="touch"),typeof i.pointerId>"u"&&(i.pointerId=i.identifier||0),typeof i.pressure>"u"&&(i.pressure=i.force||.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),typeof i.layerX>"u"&&(i.layerX=i.offsetX=i.clientX),typeof i.layerY>"u"&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,i.type=e.type,t.push(i)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=N3e),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=$3e[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};let ib=JF;ib.extension={name:"events",type:[nt.RendererSystem,nt.CanvasRendererSystem]};ib.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};yt.add(ib);function d7(e){return e==="dynamic"||e==="static"}const F3e={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??d7(ib.defaultEventMode)},set interactive(e){un("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??ib.defaultEventMode},set eventMode(e){this._internalInteractive=d7(e),this._internalEventMode=e},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.on(e,t,i)},removeEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof Vb))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};Or.mixin(F3e);const z3e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Or.mixin(z3e);const U3e=9,v_=100,j3e=0,H3e=0,f7=2,h7=1,W3e=-1e3,G3e=-1e3,V3e=2;class Wee{constructor(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(rc.tablet||rc.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${v_}px`,n.style.height=`${v_}px`,n.style.position="absolute",n.style.top=`${j3e}px`,n.style.left=`${H3e}px`,n.style.zIndex=f7.toString(),this.div=n,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${h7}px`,t.style.height=`${h7}px`,t.style.position="absolute",t.style.top=`${W3e}px`,t.style.left=`${G3e}px`,t.style.zIndex=V3e.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(t=this.renderer.view.parentNode)==null||t.appendChild(this.div))}deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(t=this.div.parentNode)==null||t.removeChild(this.div))}updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);const n=t.children;if(n)for(let r=0;r title : ${t.title}
tabIndex: ${t.tabIndex}`}capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:n,height:r}=this.renderer;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>r&&(t.height=r-t.y)}addChild(t){let n=this.pool.pop();n||(n=document.createElement("button"),n.style.width=`${v_}px`,n.style.height=`${v_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=f7.toString(),n.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?n.setAttribute("aria-live","off"):n.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?n.setAttribute("aria-relevant","additions"):n.setAttribute("aria-relevant","text"),n.addEventListener("click",this._onClick.bind(this)),n.addEventListener("focus",this._onFocus.bind(this)),n.addEventListener("focusout",this._onFocusOut.bind(this))),n.style.pointerEvents=t.accessiblePointerEvents,n.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?n.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(n.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&n.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(n),t._accessibleActive=!0,t._accessibleDiv=n,n.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,n){const{displayObject:r}=t.target,i=this.renderer.events.rootBoundary,o=Object.assign(new Vb(i),{target:r});i.rootTarget=this.renderer.lastObjectRendered,n.forEach(s=>i.dispatchEvent(o,s))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===U3e&&this.activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}Wee.extension={name:"accessibility",type:[nt.RendererPlugin,nt.CanvasRendererPlugin]};yt.add(Wee);const QF=class{constructor(e){this.stage=new Ho,e=Object.assign({forceCanvas:!1},e),this.renderer=IFe(e),QF._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(e,t){const n=QF._plugins.slice(0);n.reverse(),n.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};let Lz=QF;Lz._plugins=[];yt.handleByList(nt.Application,Lz._plugins);class Gee{static init(t){Object.defineProperty(this,"resizeTo",{set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let n,r;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:o}=this._resizeTo;n=i,r=o}this.renderer.resize(n,r),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}}Gee.extension=nt.Application;yt.add(Gee);const p7={loader:nt.LoadParser,resolver:nt.ResolveParser,cache:nt.CacheParser,detection:nt.DetectionParser};yt.handle(nt.Asset,e=>{const t=e.ref;Object.entries(p7).filter(([n])=>!!t[n]).forEach(([n,r])=>yt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(p7).filter(n=>!!t[n]).forEach(n=>yt.remove(t[n]))});class X3e{constructor(t,n=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=n}add(t){t.forEach(n=>{this._assetList.push(n)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],n=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r(Array.isArray(e)||(e=[e]),t?e.map(n=>typeof n=="string"?t(n):n):e),ZF=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Vee(e,t,n,r,i){const o=t[n];for(let s=0;s{const s=o.substring(1,o.length-1).split(",");i.push(s)}),Vee(e,i,0,n,r)}else r.push(e);return r}const GE=e=>!Array.isArray(e);class Y3e{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||console.warn(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const r=ac(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ft){const l=n;r.forEach(c=>{l.baseTexture!==ft.EMPTY.baseTexture&&Ht.addToCache(l.baseTexture,c),ft.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const ix=new Y3e;class K3e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=eo.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. +`;class M3e extends Ui{constructor(t=.5,n=Math.random()){super(Nee,O3e,{uNoise:0,uSeed:0}),this.noise=t,this.seed=n}get noise(){return this.uniforms.uNoise}set noise(t){this.uniforms.uNoise=t}get seed(){return this.uniforms.uSeed}set seed(t){this.uniforms.uSeed=t}}const c7={AlphaFilter:v3e,BlurFilter:S3e,BlurFilterPass:YF,ColorMatrixFilter:KF,DisplacementFilter:I3e,FXAAFilter:P3e,NoiseFilter:M3e};Object.entries(c7).forEach(([e,t])=>{Object.defineProperty(c7,e,{get(){return un("7.1.0",`filters.${e} has moved to ${e}`),t}})});class k3e{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(di.system.add(this.tickerUpdate,this,pp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(di.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(Vc.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,PB),!t.hitArea.contains(PB.x,PB.y)))return!0;if(t._mask){const i=t._mask.isMaskData?t._mask.maskObject:t._mask;if(i&&!((r=i.containsPoint)!=null&&r.call(i,n)))return!0}return!1}hitTestFn(t,n){return t.eventMode==="passive"?!1:t.hitArea?!0:t.containsPoint?t.containsPoint(n):!1}notifyTarget(t,n){var o,s;n=n??t.type;const r=`on${n}`;(s=(o=t.currentTarget)[r])==null||s.call(o,t);const i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${n}capture`:n;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,n)}mapPointerDown(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.createPointerEvent(t),i=r.pointerType==="mouse"||r.pointerType==="pen";this.dispatchEvent(r,"pointerover"),i&&this.dispatchEvent(r,"mouseover"),r.pointerType==="mouse"&&(this.cursor=(s=r.target)==null?void 0:s.cursor);const o=this.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseenter"),o.target=o.target.parent;n.overTargets=r.composedPath(),this.freeEvent(r),this.freeEvent(o)}mapPointerOut(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId);if(n.overTargets){const r=t.pointerType==="mouse"||t.pointerType==="pen",i=this.findMountedTarget(n.overTargets),o=this.createPointerEvent(t,"pointerout",i);this.dispatchEvent(o),r&&this.dispatchEvent(o,"mouseout");const s=this.createPointerEvent(t,"pointerleave",i);for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),r&&this.notifyTarget(s,"mouseleave"),s.target=s.target.parent;n.overTargets=null,this.freeEvent(o),this.freeEvent(s)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof Da)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.trackingData(t.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[t.button]),i=this.createPointerEvent(t);if(r){let o=r;for(;o;)i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),o=o.parent;delete n.pressTargetsByButton[t.button]}this.freeEvent(i)}mapWheel(t){if(!(t instanceof xg)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const n=this.createWheelEvent(t);this.dispatchEvent(n),this.freeEvent(n)}findMountedTarget(t){if(!t)return null;let n=t[0];for(let r=1;r(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=r),t[n]=r,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:n}=this.renderer;this.setTargetElement(t),this.resolution=n,JF._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":t&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":t&&Object.assign(this.domElement.style,n);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,r=t.length;n0&&(t=e.composedPath()[0]);const n=t!==this.domElement?"outside":"",r=this.normalizeToPointerData(e);for(let i=0,o=r.length;i"u"&&(i.button=0),typeof i.buttons>"u"&&(i.buttons=1),typeof i.isPrimary>"u"&&(i.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof i.width>"u"&&(i.width=i.radiusX||1),typeof i.height>"u"&&(i.height=i.radiusY||1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="touch"),typeof i.pointerId>"u"&&(i.pointerId=i.identifier||0),typeof i.pressure>"u"&&(i.pressure=i.force||.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),typeof i.layerX>"u"&&(i.layerX=i.offsetX=i.clientX),typeof i.layerY>"u"&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,i.type=e.type,t.push(i)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=N3e),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=$3e[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};let ib=JF;ib.extension={name:"events",type:[nt.RendererSystem,nt.CanvasRendererSystem]};ib.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};yt.add(ib);function d7(e){return e==="dynamic"||e==="static"}const F3e={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??d7(ib.defaultEventMode)},set interactive(e){un("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??ib.defaultEventMode},set eventMode(e){this._internalInteractive=d7(e),this._internalEventMode=e},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.on(e,t,i)},removeEventListener(e,t,n){const r=typeof n=="boolean"&&n||typeof n=="object"&&n.capture,i=typeof t=="function"?void 0:t;e=r?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof Vb))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};Or.mixin(F3e);const z3e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Or.mixin(z3e);const U3e=9,v_=100,j3e=0,H3e=0,f7=2,h7=1,W3e=-1e3,G3e=-1e3,V3e=2;class Gee{constructor(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(rc.tablet||rc.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${v_}px`,n.style.height=`${v_}px`,n.style.position="absolute",n.style.top=`${j3e}px`,n.style.left=`${H3e}px`,n.style.zIndex=f7.toString(),this.div=n,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${h7}px`,t.style.height=`${h7}px`,t.style.position="absolute",t.style.top=`${W3e}px`,t.style.left=`${G3e}px`,t.style.zIndex=V3e.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(t=this.renderer.view.parentNode)==null||t.appendChild(this.div))}deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(t=this.div.parentNode)==null||t.removeChild(this.div))}updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);const n=t.children;if(n)for(let r=0;r title : ${t.title}
tabIndex: ${t.tabIndex}`}capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:n,height:r}=this.renderer;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>r&&(t.height=r-t.y)}addChild(t){let n=this.pool.pop();n||(n=document.createElement("button"),n.style.width=`${v_}px`,n.style.height=`${v_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=f7.toString(),n.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?n.setAttribute("aria-live","off"):n.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?n.setAttribute("aria-relevant","additions"):n.setAttribute("aria-relevant","text"),n.addEventListener("click",this._onClick.bind(this)),n.addEventListener("focus",this._onFocus.bind(this)),n.addEventListener("focusout",this._onFocusOut.bind(this))),n.style.pointerEvents=t.accessiblePointerEvents,n.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?n.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(n.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&n.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(n),t._accessibleActive=!0,t._accessibleDiv=n,n.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,n){const{displayObject:r}=t.target,i=this.renderer.events.rootBoundary,o=Object.assign(new Vb(i),{target:r});i.rootTarget=this.renderer.lastObjectRendered,n.forEach(s=>i.dispatchEvent(o,s))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===U3e&&this.activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}Gee.extension={name:"accessibility",type:[nt.RendererPlugin,nt.CanvasRendererPlugin]};yt.add(Gee);const QF=class{constructor(e){this.stage=new Ho,e=Object.assign({forceCanvas:!1},e),this.renderer=IFe(e),QF._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(e,t){const n=QF._plugins.slice(0);n.reverse(),n.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};let Lz=QF;Lz._plugins=[];yt.handleByList(nt.Application,Lz._plugins);class Vee{static init(t){Object.defineProperty(this,"resizeTo",{set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let n,r;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:o}=this._resizeTo;n=i,r=o}this.renderer.resize(n,r),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}}Vee.extension=nt.Application;yt.add(Vee);const p7={loader:nt.LoadParser,resolver:nt.ResolveParser,cache:nt.CacheParser,detection:nt.DetectionParser};yt.handle(nt.Asset,e=>{const t=e.ref;Object.entries(p7).filter(([n])=>!!t[n]).forEach(([n,r])=>yt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(p7).filter(n=>!!t[n]).forEach(n=>yt.remove(t[n]))});class X3e{constructor(t,n=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=n}add(t){t.forEach(n=>{this._assetList.push(n)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],n=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r(Array.isArray(e)||(e=[e]),t?e.map(n=>typeof n=="string"?t(n):n):e),ZF=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Xee(e,t,n,r,i){const o=t[n];for(let s=0;s{const s=o.substring(1,o.length-1).split(",");i.push(s)}),Xee(e,i,0,n,r)}else r.push(e);return r}const GE=e=>!Array.isArray(e);class Y3e{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||console.warn(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const r=ac(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ft){const l=n;r.forEach(c=>{l.baseTexture!==ft.EMPTY.baseTexture&&Ht.addToCache(l.baseTexture,c),ft.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const ix=new Y3e;class K3e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=eo.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=ac(t,i=>({src:i})).map(async i=>{var l,c;const o=eo.toAbsolute(i.src),s=this.promiseCache[o];if(s){const d=await s.promise;(c=(l=s.parser)==null?void 0:l.unload)==null||c.call(l,d,i,this),delete this.promiseCache[o]}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,n)=>(t[n.name]&&console.warn(`[Assets] loadParser name conflict "${n.name}"`),{...t,[n.name]:n}),{})}}var ql=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(ql||{});const J3e=".json",Q3e="application/json",Z3e={extension:{type:nt.LoadParser,priority:ql.Low},name:"loadJson",test(e){return Xb(e,Q3e)||Ip(e,J3e)},async load(e){return await(await et.ADAPTER.fetch(e)).json()}};yt.add(Z3e);const e5e=".txt",t5e="text/plain",n5e={name:"loadTxt",extension:{type:nt.LoadParser,priority:ql.Low},test(e){return Xb(e,t5e)||Ip(e,e5e)},async load(e){return await(await et.ADAPTER.fetch(e)).text()}};yt.add(n5e);const r5e=["normal","bold","100","200","300","400","500","600","700","800","900"],i5e=[".ttf",".otf",".woff",".woff2"],o5e=["font/ttf","font/otf","font/woff","font/woff2"],s5e=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function a5e(e){const t=eo.extname(e),i=eo.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1));let o=i.length>0;for(const l of i)if(!l.match(s5e)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const l5e={extension:{type:nt.LoadParser,priority:ql.Low},name:"loadWebFont",test(e){return Xb(e,o5e)||Ip(e,i5e)},async load(e,t){var r,i,o;const n=et.ADAPTER.getFontFaceSet();if(n){const s=[],l=((r=t.data)==null?void 0:r.family)??a5e(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>r5e.includes(f)))??["normal"],d=t.data??{};for(let f=0;fet.ADAPTER.getFontFaceSet().delete(t))}};yt.add(l5e);let m7=0,OB;const u5e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",c5e={id:"checkImageBitmap",code:` async function checkImageBitmap() { @@ -1451,7 +1451,7 @@ ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=ac id: event.data.id, }); } - };`};let MB;class f5e{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const n=URL.createObjectURL(new Blob([c5e.code],{type:"application/javascript"})),r=new Worker(n);r.addEventListener("message",i=>{r.terminate(),URL.revokeObjectURL(n),t(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){OB===void 0&&(OB=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers{this.complete(n.data),this.returnWorker(n.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,n){await this._initWorkers();const r=new Promise((i,o)=>{this.queue.push({id:t,arguments:n,resolve:i,reject:o})});return this.next(),r}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const n=this.queue.pop(),r=n.id;this.resolveHash[m7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:m7++,id:r})}}const g7=new f5e;function dI(e,t,n){const r=new ft(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const h5e=[".jpeg",".jpg",".png",".webp",".avif"],p5e=["image/jpeg","image/png","image/webp","image/avif"];async function m5e(e){const t=await et.ADAPTER.fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const n=await t.blob();return await createImageBitmap(n)}const fI={name:"loadTextures",extension:{type:nt.LoadParser,priority:ql.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Xb(e,p5e)||Ip(e,h5e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await g7.isImageBitmapSupported()?r=await g7.loadImageBitmap(e):r=await m5e(e):r=await new Promise(o=>{r=new Image,r.crossOrigin=this.config.crossOrigin,r.src=e,r.complete?o(r):r.onload=()=>{o(r)}});const i=new Ht(r,{resolution:Td(e),...t.data});return i.resource.src=e,dI(i,n,e)},unload(e){e.destroy(!0)}};yt.add(fI);const g5e=".svg",v5e="image/svg+xml",y5e={extension:{type:nt.LoadParser,priority:ql.High},name:"loadSVG",test(e){return Xb(e,v5e)||Ip(e,g5e)},async testParse(e){return rb.test(e)},async parse(e,t,n){var s;const r=new rb(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Ht(r,{resolution:Td(e),...t==null?void 0:t.data});return i.resource.src=e,dI(i,n,e)},async load(e,t){return(await et.ADAPTER.fetch(e)).text()},unload:fI.unload};yt.add(y5e);class x5e{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(r=>`${encodeURIComponent(r)}=${encodeURIComponent(n[r])}`).join("&")}}addManifest(t){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const r=[];Array.isArray(n)?n.forEach(i=>{if(typeof i.name=="string"){const o=this._createBundleAssetId(t,i.name);r.push(o),this.add([i.name,o],i.srcs,i.data)}else{const o=i.name.map(s=>this._createBundleAssetId(t,s));o.forEach(s=>{r.push(s)}),this.add([...i.name,...o],i.srcs)}}):Object.keys(n).forEach(i=>{r.push(this._createBundleAssetId(t,i)),this.add([i,this._createBundleAssetId(t,i)],n[i])}),this._bundles[t]=r}add(t,n,r){const i=ac(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=q3e(n):n=[n]);const o=n.map(s=>{let l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=GE(t);t=ac(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=GE(t);t=ac(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=eo.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[i]={src:o}}r[i]=this._resolverHash[i]}),n?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;no.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}}class b5e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new x5e,this.loader=new K3e,this.cache=ix,this._backgroundLoader=new X3e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=GE(t),i=ac(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return ix.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,ix.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=ac(t).map(i=>typeof i!="string"?i.src:i),r=this.resolver.resolve(n);await this._unloadFromResolved(r)}async unloadBundle(t){this._initialized||await this.init(),t=ac(t);const n=this.resolver.resolveBundle(t),r=Object.keys(n).map(i=>this._unloadFromResolved(n[i]));await Promise.all(r)}async _unloadFromResolved(t){const n=Object.values(t);n.forEach(r=>{ix.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return fI.config.preferWorkers}set preferWorkers(t){un("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(n=>{n.config&&Object.keys(n.config).filter(r=>r in t).forEach(r=>{n.config[r]=t[r]})})}}const y_=new b5e;yt.handleByList(nt.LoadParser,y_.loader.parsers).handleByList(nt.ResolveParser,y_.resolver.parsers).handleByList(nt.CacheParser,y_.cache.parsers).handleByList(nt.DetectionParser,y_.detections);const w5e={extension:nt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ft),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};yt.add(w5e);const _5e={extension:{type:nt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await et.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};yt.add(_5e);const S5e={extension:{type:nt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await et.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};yt.add(S5e);const v7=["png","jpg","jpeg"],E5e={extension:{type:nt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...v7],remove:async e=>e.filter(t=>!v7.includes(t))};yt.add(E5e);const C5e={extension:nt.ResolveParser,test:fI.test,parse:e=>{var t;return{resolution:parseFloat(((t=et.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};yt.add(C5e);var fs=(e=>(e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",e))(fs||{});const VE={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};let Vu,Jp;function y7(){Jp={s3tc:Vu.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Vu.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:Vu.getExtension("WEBGL_compressed_texture_etc"),etc1:Vu.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:Vu.getExtension("WEBGL_compressed_texture_pvrtc")||Vu.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:Vu.getExtension("WEBGL_compressed_texture_atc"),astc:Vu.getExtension("WEBGL_compressed_texture_astc")}}const T5e={extension:{type:nt.DetectionParser,priority:2},test:async()=>{const t=et.ADAPTER.createCanvas().getContext("webgl");return t?(Vu=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{Jp||y7();const t=[];for(const n in Jp)Jp[n]&&t.push(n);return[...t,...e]},remove:async e=>(Jp||y7(),e.filter(t=>!(t in Jp)))};yt.add(T5e);class I5e extends Gb{constructor(t,n={width:1,height:1,autoLoad:!0}){let r,i;typeof t=="string"?(r=t,i=new Uint8Array):(r=null,i=t),super(i,n),this.origin=r,this.buffer=i?new FF(i):null,this._load=null,this.loaded=!1,this.origin!==null&&n.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(t){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(t=>t.blob()).then(t=>t.arrayBuffer()).then(t=>(this.data=new Uint32Array(t),this.buffer=new FF(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class qh extends I5e{constructor(t,n){super(t,n),this.format=n.format,this.levels=n.levels||1,this._width=n.width,this._height=n.height,this._extension=qh._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||qh._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*VE[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*VE[n];return c}}const kB=4,x_=124,R5e=32,x7=20,A5e=542327876,b_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},P5e={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},w_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},O5e=1,M5e=2,k5e=4,D5e=64,L5e=512,B5e=131072,N5e=827611204,$5e=861165636,F5e=894720068,z5e=808540228,U5e=4,j5e={[N5e]:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[$5e]:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[F5e]:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT},H5e={70:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function W5e(e){const t=new Uint32Array(e);if(t[0]!==A5e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,x_/Uint32Array.BYTES_PER_ELEMENT),i=r[b_.HEIGHT],o=r[b_.WIDTH],s=r[b_.MIPMAP_COUNT],l=new Uint32Array(e,b_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,R5e/Uint32Array.BYTES_PER_ELEMENT),c=l[O5e];if(c&k5e){const d=l[P5e.FOURCC];if(d!==z5e){const x=j5e[d],E=kB+x_,I=new Uint8Array(e,E);return[new qh(I,{format:x,width:o,height:i,levels:s})]}const f=kB+x_,h=new Uint32Array(t.buffer,f,x7/Uint32Array.BYTES_PER_ELEMENT),p=h[w_.DXGI_FORMAT],g=h[w_.RESOURCE_DIMENSION],v=h[w_.MISC_FLAG],y=h[w_.ARRAY_SIZE],S=H5e[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===U5e)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=kB+x_+x7;if(y===1)_.push(new Uint8Array(e,b));else{const x=VE[S];let E=0,I=o,A=i;for(let M=0;M>>1,A=A>>>1}let R=b;for(let M=0;Mnew qh(x,{format:S,width:o,height:i,levels:s}))}throw c&D5e?new Error("DDSParser does not support uncompressed texture data."):c&L5e?new Error("DDSParser does not supported YUV uncompressed texture data."):c&B5e?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&M5e?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const b7=[171,75,84,88,32,49,49,187,13,10,26,10],G5e=67305985,Oa={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},e3=64,w7={[At.UNSIGNED_BYTE]:1,[At.UNSIGNED_SHORT]:2,[At.INT]:4,[At.UNSIGNED_INT]:4,[At.FLOAT]:4,[At.HALF_FLOAT]:8},V5e={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},X5e={[At.UNSIGNED_SHORT_4_4_4_4]:2,[At.UNSIGNED_SHORT_5_5_5_1]:2,[At.UNSIGNED_SHORT_5_6_5]:2};function q5e(e,t,n=!1){const r=new DataView(t);if(!Y5e(e,r))return null;const i=r.getUint32(Oa.ENDIANNESS,!0)===G5e,o=r.getUint32(Oa.GL_TYPE,i),s=r.getUint32(Oa.GL_FORMAT,i),l=r.getUint32(Oa.GL_INTERNAL_FORMAT,i),c=r.getUint32(Oa.PIXEL_WIDTH,i),d=r.getUint32(Oa.PIXEL_HEIGHT,i)||1,f=r.getUint32(Oa.PIXEL_DEPTH,i)||1,h=r.getUint32(Oa.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(Oa.NUMBER_OF_FACES,i),g=r.getUint32(Oa.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(Oa.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let I;if(o!==0?w7[o]?I=w7[o]*V5e[s]:I=X5e[o]:I=VE[l],I===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const A=n?J5e(r,v,i):null;let M=E*I,L=c,B=d,H=_,G=b,U=e3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?B:G,levelBuffer:new Uint8Array(t,z,M)},z+=M}U+=F+4,U=U%4!==0?U+4-U%4:U,L=L>>1||1,B=B>>1||1,H=L+y-1&~(y-1),G=B+S-1&~(S-1),M=H*G*I}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,z=!1;return o===At.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===At.UNSIGNED_INT?(z=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===At.INT&&(z=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new Gb(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:z?K5e(s):s}}),kvData:A}:{compressed:x.map(D=>new qh(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:A}}function Y5e(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Ht(l,{mipmap:jl.OFF,alphaMode:cl.NO_PREMULTIPLIED_ALPHA,resolution:Td(e),...t.data});return dI(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};yt.add(Q5e);const Z5e={extension:{type:nt.LoadParser,priority:ql.High},name:"loadKTX",test(e){return Ip(e,".ktx")},async load(e,t,n){const i=await(await et.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=q5e(e,i),c=o??s,d={mipmap:jl.OFF,alphaMode:cl.NO_PREMULTIPLIED_ALPHA,resolution:Td(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Ht(h,d);return p.ktxKeyValueData=l,dI(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};yt.add(Z5e);const e4e={extension:nt.ResolveParser,test:e=>{const n=e.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(n)},parse:e=>{var r,i;if(e.split("?")[0].split(".").pop()==="ktx"){const o=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(o.some(s=>e.endsWith(s)))return{resolution:parseFloat(((r=et.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=et.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};yt.add(e4e);const t4e=new Yt,n4e=4,Ex=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Ex._flipY(n,r,i),Ex._unpremultiplyAlpha(n);const s=new v$e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Ex._flipY(n,r,i),Ex._unpremultiplyAlpha(n),n}_rawPixels(e,t){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let r,i=!1,o,s=!1;if(e&&(e instanceof Cp?o=e:(o=n.generateTexture(e,{resolution:n.resolution,multisample:n.multisample}),s=!0)),o){if(r=o.baseTexture.resolution,t=t??o.frame,i=!1,!s){n.renderTexture.bind(o);const h=o.framebuffer.glFramebuffers[n.CONTEXT_UID];h.blitFramebuffer&&n.framebuffer.bind(h.blitFramebuffer)}}else r=n.resolution,t||(t=t4e,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array(n4e*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){_7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},i4e={build(e){XE.build(e)},triangulate(e,t){XE.triangulate(e,t)}};var $a=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))($a||{}),Nh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Nh||{});const bg={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let n=Math.ceil(e/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}};class S7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,I=_*p+b*f,A=_*h+b*d,R=f*(b+x),M=d*(b+x),L=p*(_+E),B=h*(_+E),H=Math.atan2(M-A,R-I),G=Math.atan2(B-A,L-I);return{cx:I+t,cy:A+n,radius:o,startAngle:H,endAngle:G,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=bg._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/jE)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,I=Math.cos(E),A=-Math.sin(E);d.push((v*I+y*A)*o+r,(v*-A+y*I)*o+i)}}}class o4e{constructor(){this.reset()}begin(t,n,r){this.reset(),this.style=t,this.start=n,this.attribStart=r}end(t,n){this.attribSize=n-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Bz{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,I=t,A=n;for(let R=1;R<=10;++R)h=R/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=I-_,E=A-b,I=_,A=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=bg._segmentsCount(Bz.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function E7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function fh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===$a.ROUND?p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+4:p+=2,f.push(x-L*D,E-B*D,x+L*U,E+B*U));continue}const se=(-R+_)*(-M+E)-(-R+x)*(-M+b),J=(-L+I)*(-B+E)-(-L+x)*(-B+A),ae=(W*J-Y*se)/ue,le=(Q*se-K*J)/ue,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*U,ve=E+(le-E)*U,ye=x-(ae-x)*D,be=E-(le-E)*D,me=Math.min(W*W+K*K,Y*Y+Q*Q),xe=ce?U:D,Je=me+xe*xe*y,Xe=he<=Je;let at=o.join;if(at===$a.MITER&&he/y>S&&(at=$a.BEVEL),Xe)switch(at){case $a.MITER:{f.push(pe,ve,ye,be);break}case $a.BEVEL:{ce?f.push(pe,ve,x+R*D,E+M*D,pe,ve,x+L*D,E+B*D):f.push(x-R*U,E-M*U,ye,be,x-L*U,E-B*U,ye,be),p+=2;break}case $a.ROUND:{ce?(f.push(pe,ve,x+R*D,E+M*D),p+=fh(x,E,x+R*D,E+M*D,x+L*D,E+B*D,f,!0)+4,f.push(pe,ve,x+L*D,E+B*D)):(f.push(x-R*U,E-M*U,ye,be),p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+4,f.push(x-L*U,E-B*U,ye,be));break}}else{switch(f.push(x-R*U,E-M*U,x+R*D,E+M*D),at){case $a.MITER:{ce?f.push(ye,be,ye,be):f.push(pe,ve,pe,ve),p+=2;break}case $a.ROUND:{ce?p+=fh(x,E,x+R*D,E+M*D,x+L*D,E+B*D,f,!0)+2:p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+2;break}}f.push(x-L*U,E-B*U,x+L*D,E+B*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],R=-(b-E),M=_-x,H=Math.sqrt(R*R+M*M),R/=H,M/=H,R*=v,M*=v,f.push(x-R*U,E-M*U,x+R*D,E+M*D),c||(o.cap===Nh.ROUND?p+=fh(x-R*(U-D)*.5,E-M*(U-D)*.5,x-R*U,E-M*U,x+R*D,E+M*D,f,!1)+2:o.cap===Nh.SQUARE&&(p+=E7(x,E,R,M,U,D,!1,f)));const F=t.indices,z=bg.epsilon*bg.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new qE(e,t,n,r);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const n=new qE(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=__.pop(),r||(r=new UF,r.texArray=new HF),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=bd.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Ht._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),s=new Uint32Array(i);let l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Um,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Um,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,n,r){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Nz.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Bz.curveTo(e,t,n,r,i,o,this.currentPath.points),this}arcTo(e,t,n,r,i){this._initCurve(e,t);const o=this.currentPath.points,s=S7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=jE:o&&r<=i&&(r+=jE),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Yt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new Mz(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new Pz(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new Oz(e,t,n,r))}drawPolygon(...e){let t,n=!0;const r=e[0];r.points?(n=r.closeStroke,t=r.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new Um(t);return i.closeStroke=n,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===$i.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let r=0;r{const n=URL.createObjectURL(new Blob([c5e.code],{type:"application/javascript"})),r=new Worker(n);r.addEventListener("message",i=>{r.terminate(),URL.revokeObjectURL(n),t(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){OB===void 0&&(OB=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers{this.complete(n.data),this.returnWorker(n.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,n){await this._initWorkers();const r=new Promise((i,o)=>{this.queue.push({id:t,arguments:n,resolve:i,reject:o})});return this.next(),r}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const n=this.queue.pop(),r=n.id;this.resolveHash[m7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:m7++,id:r})}}const g7=new f5e;function dI(e,t,n){const r=new ft(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const h5e=[".jpeg",".jpg",".png",".webp",".avif"],p5e=["image/jpeg","image/png","image/webp","image/avif"];async function m5e(e){const t=await et.ADAPTER.fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const n=await t.blob();return await createImageBitmap(n)}const fI={name:"loadTextures",extension:{type:nt.LoadParser,priority:ql.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Xb(e,p5e)||Ip(e,h5e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await g7.isImageBitmapSupported()?r=await g7.loadImageBitmap(e):r=await m5e(e):r=await new Promise(o=>{r=new Image,r.crossOrigin=this.config.crossOrigin,r.src=e,r.complete?o(r):r.onload=()=>{o(r)}});const i=new Ht(r,{resolution:Td(e),...t.data});return i.resource.src=e,dI(i,n,e)},unload(e){e.destroy(!0)}};yt.add(fI);const g5e=".svg",v5e="image/svg+xml",y5e={extension:{type:nt.LoadParser,priority:ql.High},name:"loadSVG",test(e){return Xb(e,v5e)||Ip(e,g5e)},async testParse(e){return rb.test(e)},async parse(e,t,n){var s;const r=new rb(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Ht(r,{resolution:Td(e),...t==null?void 0:t.data});return i.resource.src=e,dI(i,n,e)},async load(e,t){return(await et.ADAPTER.fetch(e)).text()},unload:fI.unload};yt.add(y5e);class x5e{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(r=>`${encodeURIComponent(r)}=${encodeURIComponent(n[r])}`).join("&")}}addManifest(t){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const r=[];Array.isArray(n)?n.forEach(i=>{if(typeof i.name=="string"){const o=this._createBundleAssetId(t,i.name);r.push(o),this.add([i.name,o],i.srcs,i.data)}else{const o=i.name.map(s=>this._createBundleAssetId(t,s));o.forEach(s=>{r.push(s)}),this.add([...i.name,...o],i.srcs)}}):Object.keys(n).forEach(i=>{r.push(this._createBundleAssetId(t,i)),this.add([i,this._createBundleAssetId(t,i)],n[i])}),this._bundles[t]=r}add(t,n,r){const i=ac(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=q3e(n):n=[n]);const o=n.map(s=>{let l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=GE(t);t=ac(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=GE(t);t=ac(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=eo.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[i]={src:o}}r[i]=this._resolverHash[i]}),n?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;no.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}}class b5e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new x5e,this.loader=new K3e,this.cache=ix,this._backgroundLoader=new X3e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=GE(t),i=ac(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return ix.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,ix.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=ac(t).map(i=>typeof i!="string"?i.src:i),r=this.resolver.resolve(n);await this._unloadFromResolved(r)}async unloadBundle(t){this._initialized||await this.init(),t=ac(t);const n=this.resolver.resolveBundle(t),r=Object.keys(n).map(i=>this._unloadFromResolved(n[i]));await Promise.all(r)}async _unloadFromResolved(t){const n=Object.values(t);n.forEach(r=>{ix.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return fI.config.preferWorkers}set preferWorkers(t){un("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(n=>{n.config&&Object.keys(n.config).filter(r=>r in t).forEach(r=>{n.config[r]=t[r]})})}}const y_=new b5e;yt.handleByList(nt.LoadParser,y_.loader.parsers).handleByList(nt.ResolveParser,y_.resolver.parsers).handleByList(nt.CacheParser,y_.cache.parsers).handleByList(nt.DetectionParser,y_.detections);const w5e={extension:nt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ft),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};yt.add(w5e);const _5e={extension:{type:nt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await et.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};yt.add(_5e);const S5e={extension:{type:nt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await et.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};yt.add(S5e);const v7=["png","jpg","jpeg"],E5e={extension:{type:nt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...v7],remove:async e=>e.filter(t=>!v7.includes(t))};yt.add(E5e);const C5e={extension:nt.ResolveParser,test:fI.test,parse:e=>{var t;return{resolution:parseFloat(((t=et.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};yt.add(C5e);var fs=(e=>(e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",e))(fs||{});const VE={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};let Vu,Jp;function y7(){Jp={s3tc:Vu.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Vu.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:Vu.getExtension("WEBGL_compressed_texture_etc"),etc1:Vu.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:Vu.getExtension("WEBGL_compressed_texture_pvrtc")||Vu.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:Vu.getExtension("WEBGL_compressed_texture_atc"),astc:Vu.getExtension("WEBGL_compressed_texture_astc")}}const T5e={extension:{type:nt.DetectionParser,priority:2},test:async()=>{const t=et.ADAPTER.createCanvas().getContext("webgl");return t?(Vu=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{Jp||y7();const t=[];for(const n in Jp)Jp[n]&&t.push(n);return[...t,...e]},remove:async e=>(Jp||y7(),e.filter(t=>!(t in Jp)))};yt.add(T5e);class I5e extends Gb{constructor(t,n={width:1,height:1,autoLoad:!0}){let r,i;typeof t=="string"?(r=t,i=new Uint8Array):(r=null,i=t),super(i,n),this.origin=r,this.buffer=i?new FF(i):null,this._load=null,this.loaded=!1,this.origin!==null&&n.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(t){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(t=>t.blob()).then(t=>t.arrayBuffer()).then(t=>(this.data=new Uint32Array(t),this.buffer=new FF(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class qh extends I5e{constructor(t,n){super(t,n),this.format=n.format,this.levels=n.levels||1,this._width=n.width,this._height=n.height,this._extension=qh._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||qh._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*VE[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*VE[n];return c}}const kB=4,x_=124,R5e=32,x7=20,A5e=542327876,b_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},P5e={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},w_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},O5e=1,M5e=2,k5e=4,D5e=64,L5e=512,B5e=131072,N5e=827611204,$5e=861165636,F5e=894720068,z5e=808540228,U5e=4,j5e={[N5e]:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[$5e]:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[F5e]:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT},H5e={70:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:fs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:fs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:fs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:fs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function W5e(e){const t=new Uint32Array(e);if(t[0]!==A5e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,x_/Uint32Array.BYTES_PER_ELEMENT),i=r[b_.HEIGHT],o=r[b_.WIDTH],s=r[b_.MIPMAP_COUNT],l=new Uint32Array(e,b_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,R5e/Uint32Array.BYTES_PER_ELEMENT),c=l[O5e];if(c&k5e){const d=l[P5e.FOURCC];if(d!==z5e){const x=j5e[d],E=kB+x_,I=new Uint8Array(e,E);return[new qh(I,{format:x,width:o,height:i,levels:s})]}const f=kB+x_,h=new Uint32Array(t.buffer,f,x7/Uint32Array.BYTES_PER_ELEMENT),p=h[w_.DXGI_FORMAT],g=h[w_.RESOURCE_DIMENSION],v=h[w_.MISC_FLAG],y=h[w_.ARRAY_SIZE],S=H5e[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===U5e)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=kB+x_+x7;if(y===1)_.push(new Uint8Array(e,b));else{const x=VE[S];let E=0,I=o,A=i;for(let M=0;M>>1,A=A>>>1}let R=b;for(let M=0;Mnew qh(x,{format:S,width:o,height:i,levels:s}))}throw c&D5e?new Error("DDSParser does not support uncompressed texture data."):c&L5e?new Error("DDSParser does not supported YUV uncompressed texture data."):c&B5e?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&M5e?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const b7=[171,75,84,88,32,49,49,187,13,10,26,10],G5e=67305985,Oa={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},e3=64,w7={[At.UNSIGNED_BYTE]:1,[At.UNSIGNED_SHORT]:2,[At.INT]:4,[At.UNSIGNED_INT]:4,[At.FLOAT]:4,[At.HALF_FLOAT]:8},V5e={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},X5e={[At.UNSIGNED_SHORT_4_4_4_4]:2,[At.UNSIGNED_SHORT_5_5_5_1]:2,[At.UNSIGNED_SHORT_5_6_5]:2};function q5e(e,t,n=!1){const r=new DataView(t);if(!Y5e(e,r))return null;const i=r.getUint32(Oa.ENDIANNESS,!0)===G5e,o=r.getUint32(Oa.GL_TYPE,i),s=r.getUint32(Oa.GL_FORMAT,i),l=r.getUint32(Oa.GL_INTERNAL_FORMAT,i),c=r.getUint32(Oa.PIXEL_WIDTH,i),d=r.getUint32(Oa.PIXEL_HEIGHT,i)||1,f=r.getUint32(Oa.PIXEL_DEPTH,i)||1,h=r.getUint32(Oa.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(Oa.NUMBER_OF_FACES,i),g=r.getUint32(Oa.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(Oa.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let I;if(o!==0?w7[o]?I=w7[o]*V5e[s]:I=X5e[o]:I=VE[l],I===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const A=n?J5e(r,v,i):null;let M=E*I,L=c,B=d,H=_,G=b,U=e3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?B:G,levelBuffer:new Uint8Array(t,z,M)},z+=M}U+=F+4,U=U%4!==0?U+4-U%4:U,L=L>>1||1,B=B>>1||1,H=L+y-1&~(y-1),G=B+S-1&~(S-1),M=H*G*I}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,z=!1;return o===At.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===At.UNSIGNED_INT?(z=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===At.INT&&(z=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new Gb(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:z?K5e(s):s}}),kvData:A}:{compressed:x.map(D=>new qh(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:A}}function Y5e(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Ht(l,{mipmap:jl.OFF,alphaMode:cl.NO_PREMULTIPLIED_ALPHA,resolution:Td(e),...t.data});return dI(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};yt.add(Q5e);const Z5e={extension:{type:nt.LoadParser,priority:ql.High},name:"loadKTX",test(e){return Ip(e,".ktx")},async load(e,t,n){const i=await(await et.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=q5e(e,i),c=o??s,d={mipmap:jl.OFF,alphaMode:cl.NO_PREMULTIPLIED_ALPHA,resolution:Td(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Ht(h,d);return p.ktxKeyValueData=l,dI(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};yt.add(Z5e);const e4e={extension:nt.ResolveParser,test:e=>{const n=e.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(n)},parse:e=>{var r,i;if(e.split("?")[0].split(".").pop()==="ktx"){const o=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(o.some(s=>e.endsWith(s)))return{resolution:parseFloat(((r=et.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=et.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};yt.add(e4e);const t4e=new Yt,n4e=4,Ex=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Ex._flipY(n,r,i),Ex._unpremultiplyAlpha(n);const s=new v$e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Ex._flipY(n,r,i),Ex._unpremultiplyAlpha(n),n}_rawPixels(e,t){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let r,i=!1,o,s=!1;if(e&&(e instanceof Cp?o=e:(o=n.generateTexture(e,{resolution:n.resolution,multisample:n.multisample}),s=!0)),o){if(r=o.baseTexture.resolution,t=t??o.frame,i=!1,!s){n.renderTexture.bind(o);const h=o.framebuffer.glFramebuffers[n.CONTEXT_UID];h.blitFramebuffer&&n.framebuffer.bind(h.blitFramebuffer)}}else r=n.resolution,t||(t=t4e,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array(n4e*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){_7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},i4e={build(e){XE.build(e)},triangulate(e,t){XE.triangulate(e,t)}};var $a=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))($a||{}),Nh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Nh||{});const bg={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let n=Math.ceil(e/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}};class S7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,I=_*p+b*f,A=_*h+b*d,R=f*(b+x),M=d*(b+x),L=p*(_+E),B=h*(_+E),H=Math.atan2(M-A,R-I),G=Math.atan2(B-A,L-I);return{cx:I+t,cy:A+n,radius:o,startAngle:H,endAngle:G,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=bg._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/jE)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,I=Math.cos(E),A=-Math.sin(E);d.push((v*I+y*A)*o+r,(v*-A+y*I)*o+i)}}}class o4e{constructor(){this.reset()}begin(t,n,r){this.reset(),this.style=t,this.start=n,this.attribStart=r}end(t,n){this.attribSize=n-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Bz{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,I=t,A=n;for(let R=1;R<=10;++R)h=R/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=I-_,E=A-b,I=_,A=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=bg._segmentsCount(Bz.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function E7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function fh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===$a.ROUND?p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+4:p+=2,f.push(x-L*D,E-B*D,x+L*U,E+B*U));continue}const se=(-R+_)*(-M+E)-(-R+x)*(-M+b),J=(-L+I)*(-B+E)-(-L+x)*(-B+A),ae=(W*J-Y*se)/ue,le=(Q*se-K*J)/ue,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*U,ve=E+(le-E)*U,ye=x-(ae-x)*D,be=E-(le-E)*D,me=Math.min(W*W+K*K,Y*Y+Q*Q),xe=ce?U:D,Je=me+xe*xe*y,Xe=he<=Je;let at=o.join;if(at===$a.MITER&&he/y>S&&(at=$a.BEVEL),Xe)switch(at){case $a.MITER:{f.push(pe,ve,ye,be);break}case $a.BEVEL:{ce?f.push(pe,ve,x+R*D,E+M*D,pe,ve,x+L*D,E+B*D):f.push(x-R*U,E-M*U,ye,be,x-L*U,E-B*U,ye,be),p+=2;break}case $a.ROUND:{ce?(f.push(pe,ve,x+R*D,E+M*D),p+=fh(x,E,x+R*D,E+M*D,x+L*D,E+B*D,f,!0)+4,f.push(pe,ve,x+L*D,E+B*D)):(f.push(x-R*U,E-M*U,ye,be),p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+4,f.push(x-L*U,E-B*U,ye,be));break}}else{switch(f.push(x-R*U,E-M*U,x+R*D,E+M*D),at){case $a.MITER:{ce?f.push(ye,be,ye,be):f.push(pe,ve,pe,ve),p+=2;break}case $a.ROUND:{ce?p+=fh(x,E,x+R*D,E+M*D,x+L*D,E+B*D,f,!0)+2:p+=fh(x,E,x-R*U,E-M*U,x-L*U,E-B*U,f,!1)+2;break}}f.push(x-L*U,E-B*U,x+L*D,E+B*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],R=-(b-E),M=_-x,H=Math.sqrt(R*R+M*M),R/=H,M/=H,R*=v,M*=v,f.push(x-R*U,E-M*U,x+R*D,E+M*D),c||(o.cap===Nh.ROUND?p+=fh(x-R*(U-D)*.5,E-M*(U-D)*.5,x-R*U,E-M*U,x+R*D,E+M*D,f,!1)+2:o.cap===Nh.SQUARE&&(p+=E7(x,E,R,M,U,D,!1,f)));const F=t.indices,z=bg.epsilon*bg.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new qE(e,t,n,r);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const n=new qE(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=__.pop(),r||(r=new UF,r.texArray=new HF),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=bd.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Ht._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),s=new Uint32Array(i);let l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Um,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Um,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,n,r){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Nz.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Bz.curveTo(e,t,n,r,i,o,this.currentPath.points),this}arcTo(e,t,n,r,i){this._initCurve(e,t);const o=this.currentPath.points,s=S7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=jE:o&&r<=i&&(r+=jE),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Yt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new Mz(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new Pz(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new Oz(e,t,n,r))}drawPolygon(...e){let t,n=!0;const r=e[0];r.points?(n=r.closeStroke,t=r.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new Um(t);return i.closeStroke=n,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===$i.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let r=0;rr&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=ZZ(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Qee.extension={name:"particle",type:nt.RendererPlugin};yt.add(Qee);var pI=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(pI||{});const S_={willReadFrequently:!0},mt=class{static get experimentalLetterSpacingSupported(){let e=mt._experimentalLetterSpacingSupported;if(e!==void 0){const t=et.ADAPTER.getCanvasRenderingContext2D().prototype;e=mt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=mt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=mt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",S_);s.font=i;const c=(n?mt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(mt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=mt._canvas){const r=n.getContext("2d",S_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=mt.collapseSpaces(d),h=mt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=mt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=mt.addLine(o),o="",i=0),mt.canBreakWords(S,t.breakWords)){const b=mt.wordWrapSplit(S);for(let x=0;xg&&(s+=mt.addLine(o),p=!1,o="",i=0),o+=E,i+=R}}else{o.length>0&&(s+=mt.addLine(o),o="",i=0);const b=y===v.length-1;s+=mt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=mt.addLine(o),o="",i=0),(o.length>0||!mt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=mt.addLine(o,!1),s}static addLine(e,t=!0){return e=mt.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=mt._measureText(e,t,r)+t,n[e]=i),i}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!mt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:mt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:mt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let r=0;rs;--h){for(let v=0;v{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(n=>n.segment)}return e=>[...e]})();Ni.experimentalLetterSpacing=!1;Ni._fonts={};Ni._newlines=[10,13];Ni._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const p4e=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Cx=class{constructor(e){this.styleID=0,this.reset(),$B(this,e,e)}clone(){const e={};return $B(e,this,Cx.defaultStyle),new Cx(e)}reset(){$B(this,Cx.defaultStyle,Cx.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=NB(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=NB(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){m4e(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=NB(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let n=t.length-1;n>=0;n--){let r=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!p4e.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let vc=Cx;vc.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:pI.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function NB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function m4e(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function y4e(e,t){var r;let n=!1;if((r=e==null?void 0:e._textures)!=null&&r.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(S4e),this.registerFindHook(E4e),this.registerFindHook(y4e),this.registerFindHook(x4e),this.registerFindHook(b4e),this.registerUploadHook(w4e),this.registerUploadHook(_4e)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,di.system.addOnce(this.tick,this,pp.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,r=this.uploadHooks.length;n=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&di.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let YE=Zee;YE.uploadsPerFrame=4;Object.defineProperties(et,{UPLOADS_PER_FRAME:{get(){return YE.uploadsPerFrame},set(e){un("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),YE.uploadsPerFrame=e}}});function ete(e,t){return t instanceof Ht?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function C4e(e,t){if(!(t instanceof wg))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;ir&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=eee(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Zee.extension={name:"particle",type:nt.RendererPlugin};yt.add(Zee);var pI=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(pI||{});const S_={willReadFrequently:!0},mt=class{static get experimentalLetterSpacingSupported(){let e=mt._experimentalLetterSpacingSupported;if(e!==void 0){const t=et.ADAPTER.getCanvasRenderingContext2D().prototype;e=mt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=mt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=mt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",S_);s.font=i;const c=(n?mt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(mt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=mt._canvas){const r=n.getContext("2d",S_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=mt.collapseSpaces(d),h=mt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=mt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=mt.addLine(o),o="",i=0),mt.canBreakWords(S,t.breakWords)){const b=mt.wordWrapSplit(S);for(let x=0;xg&&(s+=mt.addLine(o),p=!1,o="",i=0),o+=E,i+=R}}else{o.length>0&&(s+=mt.addLine(o),o="",i=0);const b=y===v.length-1;s+=mt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=mt.addLine(o),o="",i=0),(o.length>0||!mt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=mt.addLine(o,!1),s}static addLine(e,t=!0){return e=mt.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=mt._measureText(e,t,r)+t,n[e]=i),i}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!mt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:mt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:mt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let r=0;rs;--h){for(let v=0;v{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(n=>n.segment)}return e=>[...e]})();Ni.experimentalLetterSpacing=!1;Ni._fonts={};Ni._newlines=[10,13];Ni._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const p4e=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Cx=class{constructor(e){this.styleID=0,this.reset(),$B(this,e,e)}clone(){const e={};return $B(e,this,Cx.defaultStyle),new Cx(e)}reset(){$B(this,Cx.defaultStyle,Cx.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=NB(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=NB(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){m4e(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=NB(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let n=t.length-1;n>=0;n--){let r=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!p4e.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let vc=Cx;vc.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:pI.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function NB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function m4e(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function y4e(e,t){var r;let n=!1;if((r=e==null?void 0:e._textures)!=null&&r.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(S4e),this.registerFindHook(E4e),this.registerFindHook(y4e),this.registerFindHook(x4e),this.registerFindHook(b4e),this.registerUploadHook(w4e),this.registerUploadHook(_4e)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,di.system.addOnce(this.tick,this,pp.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,r=this.uploadHooks.length;n=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&di.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let YE=ete;YE.uploadsPerFrame=4;Object.defineProperties(et,{UPLOADS_PER_FRAME:{get(){return YE.uploadsPerFrame},set(e){un("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),YE.uploadsPerFrame=e}}});function tte(e,t){return t instanceof Ht?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function C4e(e,t){if(!(t instanceof wg))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?Nl.from(R4e,I4e,n):Nl.from(P7,A4e,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==bd.CLAMP:c.wrapMode===bd.CLAMP&&(c.wrapMode=bd.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;E_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),E_.invert(),p?E_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=E_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=ZZ(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}nte.extension={name:"tilingSprite",type:nt.RendererPlugin};yt.add(nte);const Tx=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ft?e:null,this.baseTexture=e instanceof Ht?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=t;const r=this.baseTexture.resource;this.resolution=this._updateResolution(n||(r?r.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let n=Td(e,null);return n===null&&(n=parseFloat(t??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Tx.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Tx.BATCH_SIZE;for(;t-e{this._batchIndex*Tx.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=eo.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=rte([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const M4e={extension:nt.Asset,cache:{test:e=>e instanceof r3,getCacheableAssets:(e,t)=>rte(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&O4e.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=et.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:nt.LoadParser,priority:ql.Normal},async testParse(e,t){return eo.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=eo.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=ZF(i,t.src);const s=(await n.load([i]))[i],l=new r3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=ZF(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};yt.add(M4e);class KE{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class vS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new KE;return r.info.forEach(o=>i.info.push({face:o.face,size:parseInt(o.size,10)})),r.common.forEach(o=>i.common.push({lineHeight:parseInt(o.lineHeight,10)})),r.page.forEach(o=>i.page.push({id:parseInt(o.id,10),file:o.file})),r.char.forEach(o=>i.char.push({id:parseInt(o.id,10),page:parseInt(o.page,10),x:parseInt(o.x,10),y:parseInt(o.y,10),width:parseInt(o.width,10),height:parseInt(o.height,10),xoffset:parseInt(o.xoffset,10),yoffset:parseInt(o.yoffset,10),xadvance:parseInt(o.xadvance,10)})),r.kerning.forEach(o=>i.kerning.push({first:parseInt(o.first,10),second:parseInt(o.second,10),amount:parseInt(o.amount,10)})),r.distanceField.forEach(o=>i.distanceField.push({distanceRange:parseInt(o.distanceRange,10),fieldType:o.fieldType})),i}}class i3{static test(t){const n=t;return"getElementsByTagName"in n&&n.getElementsByTagName("page").length&&n.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(t){const n=new KE,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?i3.test(et.ADAPTER.parseXML(t)):!1}static parse(t){return i3.parse(et.ADAPTER.parseXML(t))}}const FB=[vS,i3,o3];function k4e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${A}')`);--I,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+R.fontProperties.descent,b),B*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${A}')`);--I,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}L4e(y,S,R,g,v,o,f);const H=yS(R.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:B,height:L,xoffset:0,yoffset:0,xadvance:M-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(B+2*i)*o,g=Math.ceil(g)}for(let I=0,A=d.length;I1?Nl.from(R4e,I4e,n):Nl.from(P7,A4e,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==bd.CLAMP:c.wrapMode===bd.CLAMP&&(c.wrapMode=bd.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;E_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),E_.invert(),p?E_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=E_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=eee(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}rte.extension={name:"tilingSprite",type:nt.RendererPlugin};yt.add(rte);const Tx=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ft?e:null,this.baseTexture=e instanceof Ht?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=t;const r=this.baseTexture.resource;this.resolution=this._updateResolution(n||(r?r.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let n=Td(e,null);return n===null&&(n=parseFloat(t??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Tx.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Tx.BATCH_SIZE;for(;t-e{this._batchIndex*Tx.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=eo.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=ite([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const M4e={extension:nt.Asset,cache:{test:e=>e instanceof r3,getCacheableAssets:(e,t)=>ite(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&O4e.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=et.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:nt.LoadParser,priority:ql.Normal},async testParse(e,t){return eo.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=eo.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=ZF(i,t.src);const s=(await n.load([i]))[i],l=new r3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=ZF(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};yt.add(M4e);class KE{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class vS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new KE;return r.info.forEach(o=>i.info.push({face:o.face,size:parseInt(o.size,10)})),r.common.forEach(o=>i.common.push({lineHeight:parseInt(o.lineHeight,10)})),r.page.forEach(o=>i.page.push({id:parseInt(o.id,10),file:o.file})),r.char.forEach(o=>i.char.push({id:parseInt(o.id,10),page:parseInt(o.page,10),x:parseInt(o.x,10),y:parseInt(o.y,10),width:parseInt(o.width,10),height:parseInt(o.height,10),xoffset:parseInt(o.xoffset,10),yoffset:parseInt(o.yoffset,10),xadvance:parseInt(o.xadvance,10)})),r.kerning.forEach(o=>i.kerning.push({first:parseInt(o.first,10),second:parseInt(o.second,10),amount:parseInt(o.amount,10)})),r.distanceField.forEach(o=>i.distanceField.push({distanceRange:parseInt(o.distanceRange,10),fieldType:o.fieldType})),i}}class i3{static test(t){const n=t;return"getElementsByTagName"in n&&n.getElementsByTagName("page").length&&n.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(t){const n=new KE,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?i3.test(et.ADAPTER.parseXML(t)):!1}static parse(t){return i3.parse(et.ADAPTER.parseXML(t))}}const FB=[vS,i3,o3];function k4e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${A}')`);--I,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+R.fontProperties.descent,b),B*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${A}')`);--I,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}L4e(y,S,R,g,v,o,f);const H=yS(R.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:B,height:L,xoffset:0,yoffset:0,xadvance:M-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(B+2*i)*o,g=Math.ceil(g)}for(let I=0,A=d.length;I{this.dirty=!0},this,0,0),this._roundPixels=et.ROUND_PIXELS,this.dirty=!0,this._resolution=et.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var B;const e=Po.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Mt,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",c=ite(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?O7:M7;let h=null,p=0,g=0,v=0,y=-1,S=0,_=0,b=0,x=0;for(let H=0;H{this.dirty=!0},this,0,0),this._roundPixels=et.ROUND_PIXELS,this.dirty=!0,this._resolution=et.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var B;const e=Po.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Mt,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",c=ote(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?O7:M7;let h=null,p=0,g=0,v=0,y=-1,S=0,_=0,b=0,x=0;for(let H=0;H0&&r.x>d&&(++_,zm(i,1+y-_,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),g=Math.max(g,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=c[c.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const I=[];for(let H=0;H<=v;H++){let G=0;this._align==="right"?G=g-o[H]:this._align==="center"?G=(g-o[H])/2:this._align==="justify"&&(G=s[H]<0?0:(g-o[H])/s[H]),I.push(G)}const A=i.length,R={},M=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*U)||G.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ft.EMPTY});for(const i in t)t[i].destroy(),delete t[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};let F4e=ote;F4e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const z4e=[".xml",".fnt"],U4e={extension:{type:nt.LoadParser,priority:ql.Normal},name:"loadBitmapFont",test(e){return z4e.includes(eo.extname(e).toLowerCase())},async testParse(e){return vS.test(e)||o3.test(e)},async parse(e,t,n){const r=vS.test(e)?vS.parse(e):o3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return Po.install(r,c,!0)},async load(e,t){return(await et.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};yt.add(U4e);const Qp=class extends vc{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Qp(Object.keys(Qp.defaultOptions).reduce((t,n)=>({...t,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Qp.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=Qp;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return et.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:eo.basename(e,eo.extname(e)),weight:"normal",style:"normal",src:r,dataSrc:i,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const s=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style});o.fontFace=s,await s.load(),document.fonts.add(s),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} +`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const I=[];for(let H=0;H<=v;H++){let G=0;this._align==="right"?G=g-o[H]:this._align==="center"?G=(g-o[H])/2:this._align==="justify"&&(G=s[H]<0?0:(g-o[H])/s[H]),I.push(G)}const A=i.length,R={},M=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*U)||G.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ft.EMPTY});for(const i in t)t[i].destroy(),delete t[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};let F4e=ste;F4e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const z4e=[".xml",".fnt"],U4e={extension:{type:nt.LoadParser,priority:ql.Normal},name:"loadBitmapFont",test(e){return z4e.includes(eo.extname(e).toLowerCase())},async testParse(e){return vS.test(e)||o3.test(e)},async parse(e,t,n){const r=vS.test(e)?vS.parse(e):o3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return Po.install(r,c,!0)},async load(e,t){return(await et.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};yt.add(U4e);const Qp=class extends vc{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Qp(Object.keys(Qp.defaultOptions).reduce((t,n)=>({...t,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Qp.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=Qp;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return et.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:eo.basename(e,eo.extname(e)),weight:"normal",style:"normal",src:r,dataSrc:i,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const s=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style});o.fontFace=s,await s.load(),document.fonts.add(s),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} @font-face { font-family: "${t.family}"; src: url('${t.dataSrc}'); font-weight: ${t.weight}; font-style: ${t.style}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=h$e(e)),typeof e=="number"?f$e(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,n=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),r=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const i=`${n}px ${r}px`;return this.dropShadowBlur>0?`text-shadow: ${i} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${i} ${e}`}reset(){Object.assign(this,Qp.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=et.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let o1=Qp;o1.availableFonts={};o1.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const Zp=class extends Tp{constructor(e="",t={}){super(ft.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const n=new Image,r=ft.from(n,{scaleMode:et.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Yt,r.trim=new Yt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=Zp.defaultMaxWidth,this.maxHeight=Zp.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=Zp.defaultAutoResolution,this._resolution=Zp.defaultResolution??et.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},Zp.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=t,(r=this._svgRoot)==null||r.remove(),this._svgRoot=t,(i=this._domElement)==null||i.remove(),this._domElement=t,(o=this._foreignObject)==null||o.remove(),this._foreignObject=t,(s=this._styleElement)==null||s.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=td(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=td(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof o1?(this.ownsStyle=!1,this._style=e):e instanceof vc?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=o1.from(e)):(this.ownsStyle=!0,this._style=new o1(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/

/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let mI=Zp;mI.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};mI.defaultMaxWidth=2024;mI.defaultMaxHeight=2024;mI.defaultAutoResolution=!0;function j4e(e,t){return{constructor:e,meta:t}}function H4e(e,t,n,r,i){ste(e,t,n||0,r||e.length-1,i||W4e)}function ste(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));ste(e,t,f,h,i)}var p=e[t],g=n,v=r;for(ox(e,n,t),i(e[r],p)>0&&ox(e,n,r);g0;)v--}i(e[n],p)===0?ox(e,n,v):(v++,ox(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function ox(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function W4e(e,t){return et?1:0}class G4e{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data;const r=[];if(!T_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=em(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,Fp(r,this.toBBox),Fp(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=em([t,n]),this.data.height=t.height+1,this.data.leaf=!1,Fp(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Ix(t,0,l,this.toBBox),d=Ix(t,l,r,this.toBBox),f=K4e(c,d),h=zB(c)+zB(d);f=n;d--){const f=t.children[d];Rx(l,t.leaf?o(f):f),c+=C_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Rx(n[i],t)}_condense(t){for(let n=t.length-1,r;n>=0;n--)t[n].children.length===0?n>0?(r=t[n-1].children,r.splice(r.indexOf(t[n]),1)):this.clear():Fp(t[n],this.toBBox)}}function V4e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function em(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function D7(e,t,n,r,i){const o=[t,n];for(;o.length;){if(n=o.pop(),t=o.pop(),n-t<=r)continue;const s=t+Math.ceil((n-t)/r/2)*r;H4e(e,s,t,n,i),o.push(t,s,s,n)}}class J4e extends G4e{toBBox(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}compareMinX(t,n){return t.left-n.left}compareMinY(t,n){return t.top-n.top}}const L7={screenSize:{width:256,height:256},workerCount:4,workerIndex:0,tileResolution:{width:128,height:128},tileSubdivision:0,refreshInterval:1e3/30,animationDuration:300,debounceInterval:150,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var ate={},JE=Xt&&Xt.__assign||function(){return JE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),jB}var uze=aze()?Math.sign:lze(),cze=uze,dze=Math.abs,fze=Math.floor,hze=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:cze(e)*fze(dze(e)))},pze=hze,mze=Math.max,gze=function(e){return mze(0,pze(e))},lte=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},vze=Xg,ute=function(e){if(!vze(e))throw new TypeError("Cannot use null or undefined");return e},yze={exports:{}},xze=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},HB,N7;function bze(){return N7||(N7=1,HB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),HB}var WB,$7;function wze(){if($7)return WB;$7=1;var e=Xg,t=Object.keys;return WB=function(n){return t(e(n)?Object(n):n)},WB}var GB,F7;function _ze(){return F7||(F7=1,GB=bze()()?Object.keys:wze()),GB}var VB,z7;function Sze(){if(z7)return VB;z7=1;var e=_ze(),t=ute,n=Math.max;return VB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},qB}var Uze=Fze()?String.prototype.contains:zze(),xS=hte,j7=$ze,pte=cte,mte=sze,s1=Uze,jze=fte.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],xS(e)?(n=s1.call(e,"c"),r=s1.call(e,"e"),i=s1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?pte(mte(o),s):s};jze.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],xS(t)?j7(t)?xS(n)?j7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,xS(e)?(r=s1.call(e,"c"),i=s1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?pte(mte(o),s):s};var qb=fte.exports,s3={exports:{}};(function(e,t){var n=qb,r=lte,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,R;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(R=0;A=I[R];++R)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[R?0:1]:I.splice(R,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,R;if(d.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=g?d.call(g,v,M,_):M,y?(f.value=M,h(b,_,f)):b[_]=M,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),Et(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Li=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:fN(i,r,(e/=60)+2),g:fN(i,r,e),b:fN(i,r,e-2)}},zz=function(e,t,n,r){return{r:Et(255*(1-e)*(r=1-r)),g:Et(255*(1-t)*r),b:Et(255*(1-n)*r)}},wte=function(e,t,n){e/=255,t/=255,n/=255;var r=1-Math.max(e,t,n),i=1-r,o=i&&(i-t)/i,s=i&&(i-n)/i;return{c:Et(100*(i&&(i-e)/i)),m:Et(100*o),y:Et(100*s),k:Et(100*r)}},_g=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=Et(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:Et(100*c),l:Et(100*d),a:r}},s9=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},bo=function(e){return typeof e=="string"&&(e=qg.test(e)?vI(e)/100:+e),isNaN(+e)||e>1?1:Et(e)},Yg=function(e,t,n){return t.reduce(function(r,i){return a3(a3([],r,!0),[sn(sn({},e),{h:n===Oo.ADDITIVE?ob(e.h+i):ob(s9(s9(e.h,!1)+i,!0))})],!1)},[sn({},e)])},h6e=function(e,t){return Yg(e,[30,-30],t)},p6e=function(e,t){return Yg(e,[180],t)},m6e=function(e,t){return Yg(e,[150,-150],t)},g6e=function(e,t){return Yg(e,[120,-120],t)},v6e=function(e,t){return Yg(e,[60,-120,180],t)},y6e=function(e,t){return Yg(e,[90,-90,180],t)},zs=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Wt).some(function(r){if(Ax[r].test(t))return n=r,!0}),!n&&~xte.indexOf(t)&&(n=Wt.HEX),!n)throw new Error(d6e);return n}(e):function(t){var n,r=!1,i=bte(Object.keys(t));if(l3[i]&&(n=l3[i]),n&&n===Wt.RGB){var o=Object.entries(t).some(function(l){return!u3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(qg.test("".concat(l[1]))||!u3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=Wt.HEX)}if(!n||r)throw new Error(f6e);return n}(e)},x6e=((lx={})[Wt.HEX]=function(e){var t=(~xte.indexOf(e)?QE[e]:e).match(Ax.HEX),n={r:I_(t[1]||t[5]),g:I_(t[2]||t[6]),b:I_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=I_(r)/255),n},lx[Wt.RGB]=function(e){var t=e.match(Ax.RGB),n=$h(t[1]||t[5]),r=$h(t[2]||t[6]),i=$h(t[3]||t[7]),o=t[4]||t[8],s={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return o!==void 0&&(s.a=bo(o)),s},lx[Wt.HSL]=function(e){var t=e.match(Ax.HSL),n=ob(t[1]||t[5]),r=ZE(t[2]||t[6]),i=ZE(t[3]||t[7]),o=t[4]||t[8],s=Li(n,r,i);return o!==void 0&&(s.a=bo(o)),s},lx[Wt.CMYK]=function(e){var t=e.match(Ax.CMYK),n=rd(t[1]||t[6]),r=rd(t[2]||t[7]),i=rd(t[3]||t[8]),o=rd(t[4]||t[9]),s=t[5]||t[10],l=zz(n,r,i,o);return s!==void 0&&(l.a=bo(s)),l},lx),b6e=((ux={})[Wt.HEX]=function(e){var t={r:$h("".concat(e.r)),g:$h("".concat(e.g)),b:$h("".concat(e.b))};return Qi(e,"a")&&(t.a=Math.min($h("".concat(e.a),!0),1)),t},ux[Wt.RGB]=function(e){return this.HEX(e)},ux[Wt.HSL]=function(e){var t=ZE("".concat(e.s)),n=ZE("".concat(e.l)),r=Li(ob(e.h),t,n);return Qi(e,"a")&&(r.a=bo(e.a)),r},ux[Wt.CMYK]=function(e){var t=rd("".concat(e.c)),n=rd("".concat(e.m)),r=rd("".concat(e.y)),i=rd("".concat(e.k)),o=zz(t,n,r,i);return Qi(e,"a")&&(o.a=bo(e.a)),o},ux),mp=function(e,t){return t===void 0&&(t=zs(e)),typeof e=="string"?x6e[t](e):b6e[t](e)},rn=((Gu={})[Wt.HEX]=function(e){return{r:R_(e.r),g:R_(e.g),b:R_(e.b)}},Gu.HEXA=function(e){var t=rn.HEX(e);return t.a=Qi(e,"a")?R_(255*e.a):"0xFF",t},Gu[Wt.RGB]=function(e,t){return Qi(e,"a")&&delete e.a,Yh(e,t)},Gu.RGBA=function(e,t){return e.a=Qi(e,"a")?Et(e.a):1,Yh(e,t)},Gu[Wt.HSL]=function(e,t){var n=_g(e.r,e.g,e.b);return delete n.a,Em(n,t)},Gu.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Qi(e,"a")?Et(e.a,t):1,n},Gu[Wt.CMYK]=function(e,t){return w6e(wte(e.r,e.g,e.b),t)},Gu.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Qi(e,"a")?Et(e.a,t):1,n},Gu),a9=function(e,t,n,r){var i=zs(e),o=typeof e=="string",s=mp(e,i),l=typeof e=="string"&&Qi(s,"a")||typeof e!="string"&&Qi(e,"a"),c=_g(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case Wt.HEX:default:return f.map(function(h){var p=Li(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(Yh(sn(sn({},p),{a:Et(255*p.a)}),r)):tn.HEX(Yh(p,r)):l?rn.HEXA(p):rn.HEX(p)});case Wt.RGB:return f.map(function(h){var p=Li(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(Yh(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case Wt.HSL:return f.map(function(h){return o?tn.HSL(Em(h,r)):l?rn.HSLA(sn(sn({},Li(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL(Li(h.h,h.s,h.l),r)})}},zp=((hh={buildHarmony:function(e,t,n,r){var i=zs(e),o=mp(e,i),s=_g(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Qi(o,"a")||typeof e!="string"&&Qi(e,"a"),c=typeof e=="string";switch(i){case Wt.HEX:default:return l?this.HEXA(Em(s,0),t,n,c):this.HEX(Em(s,0),t,n,c);case Wt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case Wt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[Wt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(Li(i.h,i.s,i.l)):rn.HEX(Li(i.h,i.s,i.l))})},hh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},Li(i.h,i.s,i.l)),{a:255*bo(i.a)})):rn.HEXA(sn(sn({},Li(i.h,i.s,i.l)),{a:bo(i.a)}))})},hh[Wt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(Yh(Li(o.h,o.s,o.l),i)):rn.RGB(Li(o.h,o.s,o.l),i)})},hh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(Yh(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)):rn.RGBA(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)})},hh[Wt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Em({h:o.h,s:o.s,l:o.l},i)):rn.HSL(Li(o.h,o.s,o.l),i)})},hh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Em(sn(sn({},o),{a:bo(o.a)}),i)):rn.HSLA(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)})},hh),Up=((ph={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(I){var A=zs(I);return mp(I,A)}),b=t===Oo.SUBTRACTIVE?_.map(function(I){var A,R,M,L,B,H,G,U,D,F,z,V,W,K,Y=(A=I.r,R=I.g,M=I.b,L=Math.min(A,R,M),B=Math.min(255-A,255-R,255-M),H=A-L,G=R-L,U=M-L,D=Math.min(H,G),F=H-D,z=(G+D)/2,V=(U+G-D)/2,W=Math.max(F,z,V)/Math.max(H,G,U),K=isNaN(W)||W===1/0||W<=0?1:W,{r:F/K+B,y:z/K+B,b:V/K+B});return Qi(I,"a")&&(Y.a=I.a),Y}):null;function x(I){var A=t===Oo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return I.reduce(function(R,M){var L=Qi(M,"a")?M.a:1,B={r:Math.min(R.r+M.r*L,255),b:Math.min(R.b+M.b*L,255),a:1-(1-L)*(1-R.a)},H="g"in R?R.g:R.y,G="g"in M?M.g:M.y;return sn(sn({},B),t===Oo.ADDITIVE?{g:Math.min(H+G*L,255)}:{y:Math.min(H+G*L,255)})},A)}if(t===Oo.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:Et(n.r),g:Et(n.g),b:Et(n.b),a:La(n.a,0,1)}}})[Wt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},ph.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*bo(r.a):bo(r.a),n?tn.HEX(r):rn.HEXA(r)},ph[Wt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},ph.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},ph[Wt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=_g(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},ph.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=_g(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},ph),Yh=function(e,t){return sn({r:Et(e.r,t),g:Et(e.g,t),b:Et(e.b,t)},Qi(e,"a")?{a:Et(e.a,t)}:{})},Em=function(e,t){return sn({h:Et(e.h,t),s:Et(e.s,t),l:Et(e.l,t)},Qi(e,"a")?{a:Et(e.a,t)}:{})},w6e=function(e,t){return{c:Et(e.c,t),m:Et(e.m,t),y:Et(e.y,t),k:Et(e.k,t)}},kc=function(e,t,n,r,i,o){var s=i(mp(e,t),r);return n?o(s):s},jp=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=bo(c.a),S=(bo(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:Et(c.r+p*b),g:Et(c.g+g*b),b:Et(c.b+v*b),a:Et(y+S*b)}})}(mp(e),mp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},_6e=function(){function e(t,n){n===void 0&&(n=6),this.rgb=mp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},Li(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},zz(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=_g(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=wte(this.rgb.r,this.rgb.g,this.rgb.b)},e.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},e.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},e.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},e.prototype.setDecimals=function(t){return this._decimals=t,this},e.prototype.setH=function(t){return this.hsl.h=ob(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=La(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=La(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=La(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=La(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(e.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"H",{get:function(){return Et(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return Et(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return Et(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return Et(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return Et(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return Et(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return Et(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return Et(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return Et(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return Et(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return Et(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=zs(t);return kc(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=zs(t);return kc(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),Up.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),Up.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),a9(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),a9(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=qu.COMPLEMENTARY),r===void 0&&(r=Oo.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[qu.ANALOGOUS]=zp.buildHarmony(s,h6e,c,l),d[qu.COMPLEMENTARY]=zp.buildHarmony(s,p6e,c,l),d[qu.SPLIT_COMPLEMENTARY]=zp.buildHarmony(s,m6e,c,l),d[qu.TRIADIC]=zp.buildHarmony(s,g6e,c,l),d[qu.TETRADIC]=zp.buildHarmony(s,v6e,c,l),d[qu.SQUARE]=zp.buildHarmony(s,y6e,c,l),d)[o]}(n,t,i,r)},e}();const S6e={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:Fi,PI:E6e}=Math,Yb=(e,t)=>new _6e(e).setA(t??S6e.alpha).RGBA,C6e=(e,t)=>Yb(e,t);function Ad(e,t){return{width:e.width*t.scale.x,height:e.height*t.scale.y,x:e.x*t.scale.x+t.x,y:e.y*t.scale.y+t.y}}const T6e={draw(e,t,n){if(e.text){const r=Ad(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Ad(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=Yb(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:e.x,right:e.x,top:e.y,bottom:e.y}}},I6e={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Ad(e,n);t.fillStyle=Yb(e.fill,e.alpha),t.fillRect(Fi(r),Fi(i),Fi(o)||1,Fi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},R6e={draw(e,t,n){t.fillStyle=Yb(e.fill,e.alpha),t.beginPath();const r=Ad({...e,width:e.radius,height:e.radius},n);t.ellipse(Fi(r.x),Fi(r.y),Fi(r.width),Fi(r.height),0,0,2*E6e),t.fill()},test(e){return{left:e.x-e.radius,right:e.x+e.radius,top:e.y-e.radius,bottom:e.y+e.radius}}},A6e={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=Yb(e.fill,e.alpha);const{x:o,y:s}=Ad({...r,width:0,height:0},n);t.moveTo(Fi(o),Fi(s));for(const l of i){const{x:c,y:d}=Ad({...l,width:0,height:0},n);t.lineTo(Fi(c),Fi(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Jt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Jt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Jt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Jt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},P6e={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=C6e(e.fill,e.alpha);const{x:o,y:s,width:l}=Ad({...r,width:e.lineWidth,height:0},n);t.lineWidth=Fi(l),t.moveTo(Fi(o),Fi(s));for(const c of i){const{x:d,y:f}=Ad({...c,width:0,height:0},n);t.lineTo(Fi(d),Fi(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Jt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Jt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Jt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Jt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},O6e={text:T6e,path:P6e,rect:I6e,polygon:A6e,circle:R6e},{log2:M6e,max:k6e}=Math,l9=e=>Jt.floor(M6e(e+1));function u9({right:e,left:t,bottom:n,top:r},i){const o=k6e(l9(e-t),l9(n-r))-i,s=2**o,l={left:Jt.floor(t/s),right:Jt.ceil((e+1)/s),top:Jt.floor(r/s),bottom:Jt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Z4e({x:Jt.range(l.left,l.right+1),y:Jt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}})}}const D6e=""+new URL("D2Renderer.worker-2ac84d00.js",import.meta.url).href;class L6e extends Worker{constructor(){super(D6e,{type:"module"})}call(t,n,r=[]){return this.postMessage({action:t,payload:n},r)}on(t,n){const r=i=>{const{action:o,payload:s}=i.data;o===t&&n(s)};return this.addEventListener("message",r),()=>this.removeEventListener("message",r)}}function B6e(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:c9,min:d9}=Math,_te=class Ste extends Tp{constructor(t,n){super(t),this.bounds=n,this.age=Ste.age++}};_te.age=0;let N6e=_te;var Fs,Br,Xc,Qu,Yi,xl,qc,Yc,oC,sC,Ete,aC,Cte,Wm,db,lC,uC,Tte,cC,Ite,dC,Rte,fC,Ate,fb,c3,hb,d3,hC,Pte,pb,f3,pC,Ote,mC,Mte;class $6e extends a6e{constructor(){super(...arguments);lr(this,sC);lr(this,aC);lr(this,uC);lr(this,cC);lr(this,dC);lr(this,fC);lr(this,fb);lr(this,hb);lr(this,hC);lr(this,pb);lr(this,pC);lr(this,mC);lr(this,Fs,void 0);lr(this,Br,void 0);lr(this,Xc,void 0);lr(this,Qu,void 0);lr(this,Yi,L7);lr(this,xl,[]);lr(this,qc,new J4e(16));lr(this,Yc,void 0);lr(this,oC,0);lr(this,Wm,Jt.once(()=>Jt.debounce(()=>Wi(this,fb,c3).call(this),rt(this,Yi).debounceInterval)));lr(this,db,Jt.once(()=>Jt.throttle(()=>Wi(this,hb,d3).call(this),rt(this,Yi).refreshInterval)));lr(this,lC,Jt.once(()=>Jt.throttle(n=>Wi(this,hC,Pte).call(this,n),rt(this,Yi).refreshInterval)))}getInstance(){return{app:rt(this,Fs),viewport:rt(this,Br)}}fitCamera(){var r,i,o,s;const n=Jt.values(rt(this,qc).all()).flat();if(n.length){const l=Jt.reduce(n,(c,d)=>({top:d9(c.top,d.top),left:d9(c.top,d.left),bottom:c9(c.bottom,d.bottom),right:c9(c.right,d.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=rt(this,Br))==null?void 0:r.animate)==null||s.call(r,{position:new Mt((l.left+l.right)/2,(l.top+l.bottom)/2),scale:((o=(i=rt(this,Br))==null?void 0:i.findFit)==null?void 0:o.call(i,l.right-l.left,l.bottom-l.top))*.8,ease:"easeOutExpo",time:rt(this,Yi).animationDuration*1.5,callbackOnComplete:()=>rt(this,Wm).call(this)()})}}initialCamera(){var n,r;(r=(n=rt(this,Br))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:rt(this,Yi).animationDuration*1.5,callbackOnComplete:()=>rt(this,Wm).call(this)()})}getView(){var n;return(n=rt(this,Fs))==null?void 0:n.view}setup(n){const r={...L7,...n};Wi(this,aC,Cte).call(this,r),this.setOptions(r),Wi(this,cC,Ite).call(this,r)}destroy(){Jt.map(rt(this,xl),n=>n.terminate()),rt(this,Fs).destroy()}add(n){const r=bLe(),i=Jt.map(n,({component:o,meta:s})=>({...O6e[o.$].test(o),component:o,meta:s,index:Wi(this,sC,Ete).call(this)}));return rt(this,qc).load(i),Jt.map(rt(this,xl),o=>o.call("add",[Jt.map(n,"component"),r])),()=>{for(const o of i)rt(this,qc).remove(o);Jt.map(rt(this,xl),o=>o.call("remove",[r]))}}setOptions(n){const r={...rt(this,Yi),...n};Wi(this,dC,Rte).call(this,r),zu(this,Yi,r),Wi(this,fb,c3).call(this),Wi(this,hb,d3).call(this)}}Fs=new WeakMap,Br=new WeakMap,Xc=new WeakMap,Qu=new WeakMap,Yi=new WeakMap,xl=new WeakMap,qc=new WeakMap,Yc=new WeakMap,oC=new WeakMap,sC=new WeakSet,Ete=function(){return a6(this,oC)._++},aC=new WeakSet,Cte=function(n){zu(this,Fs,new Lz({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height})),zu(this,Br,new h3e({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:rt(this,Fs).renderer.events,passiveWheel:!1})),rt(this,Br).on("clicked",r=>{const{x:i,y:o}=r.world,s=rt(this,qc).search({minX:i,minY:o,maxX:i+Number.MIN_VALUE,maxY:o+Number.MIN_VALUE});this.emit("click",r.event,{world:r.world,components:s})}),rt(this,Fs).stage.addChild(rt(this,Br)),rt(this,Br).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-4}),rt(this,Br).on("moved",()=>{rt(this,Wm).call(this)(),rt(this,db).call(this)()}),rt(this,Br).on("mousemove",r=>rt(this,lC).call(this)(r)),zu(this,Xc,new Ho),rt(this,Br).addChild(rt(this,Xc)),zu(this,Qu,new wg),rt(this,Br).addChild(rt(this,Qu)),zu(this,Yc,new wg),rt(this,Br).addChild(rt(this,Yc)),Wi(this,uC,Tte).call(this)},Wm=new WeakMap,db=new WeakMap,lC=new WeakMap,uC=new WeakSet,Tte=function(){const{tileResolution:n,dynamicResolution:r}=rt(this,Yi),{dtMax:i,dtMin:o,increment:s,intervalMs:l,maxScale:c,minScale:d}=r,f=Jt.floor(di.targetFPMS*l);let h=0,p=0,g=1;rt(this,Fs).ticker.add(v=>{if(!(h%f)){const y=p/f;g=Jt.clamp(y>=i?g+s:y<=o?g-s:g,d,c),Jt.map(rt(this,xl),S=>{S.call("setTileResolution",[{width:Jt.ceil(n.width/g),height:Jt.ceil(n.height/g)}])}),p=0}p+=v,h++})},cC=new WeakSet,Ite=function(n){Jt.map(rt(this,xl),r=>r.terminate()),zu(this,xl,Jt.times(n.workerCount,r=>{const i=new L6e;return i.on("update",o=>Wi(this,fC,Ate).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},dC=new WeakSet,Rte=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=rt(this,Fs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=rt(this,Br))==null||c.resize(r,i)},fC=new WeakSet,Ate=function({bounds:n,bitmap:r}){const i=ft.from(r);Wi(this,pC,Ote).call(this,i,n)},fb=new WeakSet,c3=function(){const{top:n,bottom:r,left:i,right:o}=rt(this,Br);Jt.map(rt(this,xl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},hb=new WeakSet,d3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=rt(this,Yi),{tiles:i}=u9(rt(this,Br),n),o=Wi(this,pb,f3).call(this);(s=rt(this,Qu))==null||s.clear(),(l=rt(this,Qu))==null||l.lineStyle(1*o,r,.5),(c=rt(this,Qu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Jt.find((d=rt(this,Xc))==null?void 0:d.children,g=>Jt.isEqual(g.bounds,h))||(f=rt(this,Qu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},hC=new WeakSet,Pte=function(n){var c;const{accentColor:r}=rt(this,Yi),i=Wi(this,pb,f3).call(this),{x:o,y:s}=rt(this,Br).toWorld(n.globalX,n.globalY),l=rt(this,qc).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});rt(this,Yc).clear(),rt(this,Yc).lineStyle(2*i,r,1);for(const d of l)(c=rt(this,Yc))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},pb=new WeakSet,f3=function(){const{right:n,left:r}=rt(this,Br),{width:i}=rt(this,Yi).screenSize;return(n-r)/i},pC=new WeakSet,Ote=async function(n,r){var s;const{tileSubdivision:i}=rt(this,Yi),{tiles:o}=u9(rt(this,Br),i);if(Jt.find(o,l=>Jt.isEqual(l.bounds,r))){const l={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},c=new N6e(n,r);(s=rt(this,Xc))==null||s.addChild(c).setTransform(r.left,r.top,l.x,l.y),rt(this,db).call(this)(),await Wi(this,mC,Mte).call(this,c);for(const d of rt(this,Xc).children)B6e(d.bounds,r)&&d.age{const o=s=>{n.alpha+=s/di.targetFPMS/rt(this,Yi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})};const F6e=j4e($6e,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),z6e={"d2-renderer":F6e};var U6e=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Uz={},j6e=Object.prototype.hasOwnProperty,H6e;function f9(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function h9(e){try{return encodeURIComponent(e)}catch{return null}}function W6e(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=f9(r[1]),o=f9(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function G6e(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(j6e.call(e,i)){if(r=e[i],!r&&(r===null||r===H6e||isNaN(r))&&(r=""),i=h9(i),r=h9(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Uz.stringify=G6e;Uz.parse=W6e;var kte=U6e,yI=Uz,V6e=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Dte=/[\n\r\t]/g,X6e=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Lte=/:\d+$/,q6e=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Y6e=/^[a-zA-Z]:/;function jz(e){return(e||"").toString().replace(V6e,"")}var h3=[["#","hash"],["?","query"],function(t,n){return $l(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p9={hash:1,query:1};function Bte(e){var t;typeof window<"u"?t=window:typeof Xt<"u"?t=Xt:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},i=typeof e,o;if(e.protocol==="blob:")r=new Hl(unescape(e.pathname),{});else if(i==="string"){r=new Hl(e,{});for(o in p9)delete r[o]}else if(i==="object"){for(o in e)o in p9||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=X6e.test(e.href))}return r}function $l(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function Nte(e,t){e=jz(e),e=e.replace(Dte,""),t=t||{};var n=q6e.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):$l(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&$l(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||$l(r),slashesCount:s,rest:l}}function K6e(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),s++):s&&(r===0&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function Hl(e,t,n){if(e=jz(e),e=e.replace(Dte,""),!(this instanceof Hl))return new Hl(e,t,n);var r,i,o,s,l,c,d=h3.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=yI.parse),t=Bte(t),i=Nte(e||"",t),r=!i.protocol&&!i.slashes,h.slashes=i.slashes||r&&t.slashes,h.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||Y6e.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!$l(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new Fte[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(n)},[e,t]),C.jsx(C.Fragment,{})}const nUe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function rUe({value:e,onValueChange:t}){const[n]=eI(),r=ie.find(n,{key:e.key});function i(s){t==null||t(c4(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(wn,{alignItems:"center",py:.5,children:[C.jsx(RZ,{sx:{color:nUe[o]}}),C.jsx(Yr,{}),C.jsxs(Pt,{flex:1,children:[C.jsx(qt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ie.startCase(o)}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:r?C.jsxs(C.Fragment,{children:[C.jsx("span",{children:r.renderer.meta.description}),C.jsx("br",{}),C.jsxs("span",{children:["Contributes: ",ie.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx($d,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(Pt,{children:C.jsx(ag,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(ez,{trigger:s=>C.jsx(wm,{icon:C.jsx(s4,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(Z4,{children:"Edit Renderer"})},children:C.jsxs(Pt,{p:2.5,children:[C.jsx(Cb,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(qx,{placeholder:"Renderer Type",items:ie.entries(Fte).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Hz={},xI={},Kb={};(function(e){var t=Xt&&Xt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(Kb);var Jb={};Object.defineProperty(Jb,"__esModule",{value:!0});Jb.DefaultErrorCode=void 0;Jb.DefaultErrorCode=0;var m9=Xt&&Xt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},g9=Xt&&Xt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const _Ue={trace:async(e,t)=>{switch(e){case"about":return{name:"Search Trace",description:"Provides JSON Search Trace Support",version:"1.0.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/algorithms":return[{id:"identity",name:"Unknown",hidden:!0}];case"solve/pathfinding":{const{parameters:n}=t;try{return JSON.parse((n==null?void 0:n.content)??"")}catch{return{}}}}}};class SUe{constructor(t){Pp(this,"handler");this.options=t;const{hostname:n}=$te(t.url);this.handler=_Ue[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const Wl=Object.create(null);Wl.open="0";Wl.close="1";Wl.ping="2";Wl.pong="3";Wl.message="4";Wl.upgrade="5";Wl.noop="6";const bS=Object.create(null);Object.keys(Wl).forEach(e=>{bS[Wl[e]]=e});const p3={type:"error",data:"parser error"},Ute=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jte=typeof ArrayBuffer=="function",Hte=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wz=({type:e,data:t},n,r)=>Ute&&t instanceof Blob?n?r(t):b9(t,r):jte&&(t instanceof ArrayBuffer||Hte(t))?n?r(t):b9(new Blob([t]),r):r(Wl[e]+(t||"")),b9=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w9(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pN;function EUe(e,t){if(Ute&&e.data instanceof Blob)return e.data.arrayBuffer().then(w9).then(t);if(jte&&(e.data instanceof ArrayBuffer||Hte(e.data)))return t(w9(e.data));Wz(e,!1,n=>{pN||(pN=new TextEncoder),t(pN.encode(n))})}const _9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Px=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<_9.length;e++)Px[_9.charCodeAt(e)]=e;const CUe=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},TUe=typeof ArrayBuffer=="function",Gz=(e,t)=>{if(typeof e!="string")return{type:"message",data:Wte(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:IUe(e.substring(1),t)}:bS[n]?e.length>1?{type:bS[n],data:e.substring(1)}:{type:bS[n]}:p3},IUe=(e,t)=>{if(TUe){const n=CUe(e);return Wte(n,t)}else return{base64:!0,data:e}},Wte=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Gte=String.fromCharCode(30),RUe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Wz(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Gte))})})},AUe=(e,t)=>{const n=e.split(Gte),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mN;function M_(e){return e.reduce((t,n)=>t+n.length,0)}function k_(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(p3);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(M_(n)e){l.enqueue(p3);break}}}})}const Vte=4;function Kr(e){if(e)return MUe(e)}function MUe(e){for(var t in Kr.prototype)e[t]=Kr.prototype[t];return e}Kr.prototype.on=Kr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Kr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Kr.prototype.off=Kr.prototype.removeListener=Kr.prototype.removeAllListeners=Kr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Xte(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const kUe=Gs.setTimeout,DUe=Gs.clearTimeout;function _I(e,t){t.useNativeTimers?(e.setTimeoutFn=kUe.bind(Gs),e.clearTimeoutFn=DUe.bind(Gs)):(e.setTimeoutFn=Gs.setTimeout.bind(Gs),e.clearTimeoutFn=Gs.clearTimeout.bind(Gs))}const LUe=1.33;function BUe(e){return typeof e=="string"?NUe(e):Math.ceil((e.byteLength||e.size)*LUe)}function NUe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function $Ue(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FUe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Yte(){const e=C9(+new Date);return e!==E9?(S9=0,E9=e):e+"."+C9(S9++)}for(;D_{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};AUe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,RUe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Yte()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Fl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Fl extends Kr{constructor(t,n){super(),_I(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Xte(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Jte(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Fl.requestsCount++,Fl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=HUe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Fl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Fl.requestsCount=0;Fl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",T9);else if(typeof addEventListener=="function"){const e="onpagehide"in Gs?"pagehide":"unload";addEventListener(e,T9,!1)}}function T9(){for(let e in Fl.requests)Fl.requests.hasOwnProperty(e)&&Fl.requests[e].abort()}const Xz=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),L_=Gs.WebSocket||Gs.MozWebSocket,I9=!0,VUe="arraybuffer",R9=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class XUe extends Vz{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=R9?{}:Xte(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=I9&&!R9?n?new L_(t,n):new L_(t):new L_(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{I9&&this.ws.send(o)}catch{}i&&Xz(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Yte()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!L_}}class qUe extends Vz{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=OUe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=PUe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Xz(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const YUe={websocket:XUe,webtransport:qUe,polling:GUe},KUe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,JUe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function g3(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=KUe.exec(e||""),o={},s=14;for(;s--;)o[JUe[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=QUe(o,o.path),o.queryKey=ZUe(o,o.query),o}function QUe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZUe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Qte=class tm extends Kr{constructor(t,n={}){super(),this.binaryType=VUe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=g3(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=g3(n.host).host),_I(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FUe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Vte,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new YUe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&tm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;tm.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;tm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",tm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){tm.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Zte=Object.prototype.toString,r8e=typeof Blob=="function"||typeof Blob<"u"&&Zte.call(Blob)==="[object BlobConstructor]",i8e=typeof File=="function"||typeof File<"u"&&Zte.call(File)==="[object FileConstructor]";function qz(e){return t8e&&(e instanceof ArrayBuffer||n8e(e))||r8e&&e instanceof Blob||i8e&&e instanceof File}function wS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Kg.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Kg.prototype.reset=function(){this.attempts=0};Kg.prototype.setMin=function(e){this.ms=e};Kg.prototype.setMax=function(e){this.max=e};Kg.prototype.setJitter=function(e){this.jitter=e};class x3 extends Kr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_I(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Kg({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||d8e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Qte(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=za(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=za(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(za(t,"ping",this.onping.bind(this)),za(t,"data",this.ondata.bind(this)),za(t,"error",this.onerror.bind(this)),za(t,"close",this.onclose.bind(this)),za(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Xz(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ene(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const cx={};function _S(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e8e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=cx[i]&&o in cx[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new x3(r,t):(cx[i]||(cx[i]=new x3(r,t)),c=cx[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(_S,{Manager:x3,Socket:ene,io:_S,connect:_S});class h8e{constructor(t){Pp(this,"rpc");Pp(this,"socket");this.options=t,this.socket=_S(t.url),this.rpc=new Hz.JSONRPCClient(async n=>{const r=i=>{i.id===n.id&&(this.socket.off("response",r),this.rpc.receive(i))};this.socket.emit("request",n),this.socket.on("response",r)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(t,n){return await this.rpc.request(t,n)}}const Kz={socketio:{name:"socket.io",constructor:h8e},ipc:{name:"Web Worker",constructor:wUe},native:{name:"Internal",constructor:SUe}};function p8e(e){return Kz[e].constructor}const tne=ie.first(ie.keys(Kz));function m8e(){const[{renderer:e},t]=Ec();return C.jsx(C.Fragment,{children:C.jsx(GT,{editor:n=>C.jsx(rUe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({renderer:n}),300),addItemLabel:"Add Renderer",create:()=>({transport:tne,url:"",disabled:!0}),extras:C.jsx(pc,{startIcon:C.jsx(jY,{}),sx:{ml:2},onClick:()=>t({renderer:NK}),children:"Reset to Defaults"})})})}function g8e(e){const[{connections:t}]=VT(),n=yz(),[{remote:r}]=Ec(),i=ie.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const v8e={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function y8e({value:e,onValueChange:t}){const n=VDe(e.url),r=g8e(e.url);function i(o){t==null||t(c4(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(wn,{alignItems:"center",py:.5,children:[C.jsx(RZ,{sx:{color:v8e[r]}}),C.jsx(Yr,{}),C.jsxs(Pt,{flex:1,children:[C.jsx(qt,{children:n?`${n.name} ${n.version}`:ie.startCase(r)}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx($d,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(Pt,{children:C.jsx(ag,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(ez,{trigger:o=>C.jsx(wm,{icon:C.jsx(s4,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(Z4,{children:"Edit Connection"})},children:C.jsxs(Pt,{p:2.5,children:[C.jsx(Cb,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(qx,{placeholder:"Connection Type",items:ie.entries(Kz).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function x8e(){const[{remote:e},t]=Ec();return C.jsx(C.Fragment,{children:C.jsx(GT,{editor:n=>C.jsx(y8e,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({remote:n}),300),addItemLabel:"Add Solver",create:()=>({transport:tne,url:"",disabled:!0}),extras:C.jsx(pc,{startIcon:C.jsx(jY,{}),sx:{ml:2},onClick:()=>t({remote:BK}),children:"Reset to Defaults"})})})}const P9=e=>`${e}x`;function b8e(){const{controls:e,onChange:t,state:n}=zd(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Ec(),[c,d]=O.useState("general");function f(p){return C.jsx(qt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(qt,{variant:"body1",children:p})}return C.jsx(FK,{value:c,children:C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Options,{children:C.jsxs(HK,{onChange:(p,g)=>d(g),children:[C.jsx(mm,{label:"General",value:"general"}),C.jsx(mm,{label:"Connections",value:"connections"}),C.jsx(mm,{label:"Renderers",value:"renderers"}),C.jsx(mm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,children:C.jsx(kT,{y:!0,children:C.jsxs(wn,{vertical:!0,pt:6,children:[C.jsx(xm,{value:"general",children:C.jsxs(Pt,{children:[f("Playback"),C.jsxs(wn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(Yr,{flex:1}),C.jsx(Jve,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*Xp,label:P9(p)})),step:.25*Xp,min:.25*Xp,max:5*Xp,valueLabelFormat:p=>P9(p/Xp),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l({playbackRate:g})})]}),f("UI"),C.jsxs(wn,{alignItems:"center",children:[h("Acrylic"),C.jsx(Yr,{flex:1}),C.jsx(ag,{defaultChecked:!!i,onChange:(p,g)=>l({acrylic:g})})]}),C.jsxs(wn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(Yr,{flex:1}),C.jsx(ag,{defaultChecked:o==="dark",onChange:(p,g)=>l({theme:g?"dark":"light"})})]}),C.jsxs(wn,{alignItems:"center",children:[h("Accent"),C.jsx(Yr,{flex:1}),C.jsx(Ss,{value:s,items:ie.map(ie.keys(Sbe),p=>({id:p,name:ie.startCase(p)})),showArrow:!0,onChange:p=>l({accentColor:p})})]})]})}),C.jsx(xm,{value:"connections",children:C.jsxs(Pt,{children:[f("Solvers"),C.jsx(x8e,{})]})}),C.jsx(xm,{value:"renderers",children:C.jsxs(Pt,{children:[f("Renderers"),C.jsx(m8e,{})]})}),C.jsx(xm,{value:"map-parsers",children:C.jsxs(Pt,{children:[f("Map Parsers"),C.jsx(w8e,{})]})})]})})})}),C.jsx(Ln.Extras,{children:e})]})})}function w8e(){return C.jsx(sg,{children:ie.keys(vz).map(e=>C.jsx(Vx,{children:C.jsx(Dl,{primary:e,secondary:"Internal"})},e))})}function _8e(){return O.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function S8e(e){var f,h;const t=_c(),[{playback:n,step:r=0},i]=dp(),{events:o}=TZ((h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.content),s=!!o,l=n==="playing",[c,d]=[0,((o==null?void 0:o.length)??1)-1];return O.useMemo(()=>{const p={start:c,end:d,step:r,canPlay:s&&!l&&r0},g=y=>ie.clamp(r+y,c,d);return{playing:n==="playing",...p,...{play:()=>{t("Playback started"),i({playback:"playing",step:g(1)})},pause:(y=0)=>{t("Playback paused"),i({playback:"paused",step:g(y)})},stop:()=>i({step:c,playback:"paused"}),stepForward:()=>i({step:g(1)}),stepBackward:()=>i({step:g(-1)}),tick:(y=1)=>i({playback:"playing",step:g(y)})}}},[d,n,l,s,i,c,r])}function E8e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function C8e({layer:e}){const{step:t,tick:n,end:r,playing:i,canPause:o,canPlay:s,canStepBackward:l,canStepForward:c,canStop:d,pause:f,play:h,stepBackward:p,stepForward:g,stop:v}=S8e(e);yxe();const y=_c(),[{playbackRate:S=1}]=Ec(),_=_8e(),b=O.useCallback((x,E)=>C.jsx(a4,{primary:x,secondary:`Step ${t+E}`}),[t]);return O.useEffect(()=>{if(i)return t{for(const x of ie.range(S)){const E=_(t+x);if(E.result||E.error)return{...E,offset:x}}return{result:"",offset:0,error:void 0}},({result:x,offset:E,error:I})=>{I?(y(`${ie.trimEnd(I,".")}.`,`${E}`),f()):x?(y(`Breakpoint hit: ${x}.`,`${E}`),f(E)):n(S)}):f()},[b,i,r,t,f,n,y,_,S]),C.jsxs(C.Fragment,{children:[C.jsx(wm,{label:"step-backward",icon:C.jsx(Gye,{}),onClick:p,disabled:!l}),C.jsx(wm,{...i?{label:"pause",icon:C.jsx(Fye,{}),onClick:()=>f(),disabled:!o}:{label:"play",icon:C.jsx(Uye,{}),onClick:()=>h(),disabled:!s,color:"primary"}}),C.jsx(wm,{label:"step-forward",icon:C.jsx(Wye,{}),onClick:g,disabled:!c}),C.jsx(wm,{label:"stop",icon:C.jsx(Vye,{}),onClick:v,disabled:!d})]})}const SI=0,Wd=1,Jg=2,nne=4;function rne(e,t){return n=>e(t(n))}function T8e(e,t){return t(e)}function ine(e,t){return n=>e(t,n)}function O9(e,t){return()=>e(t)}function EI(e,t){return t(e),e}function gr(...e){return e}function I8e(e){e()}function M9(e){return()=>e}function R8e(...e){return()=>{e.map(I8e)}}function Jz(e){return e!==void 0}function Qg(){}function Un(e,t){return e(Wd,t)}function en(e,t){e(SI,t)}function Qz(e){e(Jg)}function bs(e){return e(nne)}function wt(e,t){return Un(e,ine(t,SI))}function yc(e,t){const n=e(Wd,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case Jg:e.splice(0,e.length);return;case Wd:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case SI:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Ze(e){let t=e;const n=yn();return(r,i)=>{switch(r){case Wd:i(t);break;case SI:t=i;break;case nne:return t}return n(r,i)}}function A8e(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case Wd:return o?n===o?void 0:(r(),n=o,t=Un(e,o),t):(r(),Qg);case Jg:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Is(e){return EI(yn(),t=>wt(e,t))}function _o(e,t){return EI(Ze(t),n=>wt(e,n))}function P8e(...e){return t=>e.reduceRight(T8e,t)}function Oe(e,...t){const n=P8e(...t);return(r,i)=>{switch(r){case Wd:return Un(e,n(i));case Jg:Qz(e);return}}}function one(e,t){return e===t}function hr(e=one){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ut(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>rne(t,e)}function Ju(e){return t=>()=>t(e)}function Rl(e,t){return n=>r=>n(t=e(t,r))}function Sg(e){return t=>n=>{e>0?e--:t(n)}}function id(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function k9(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function D9(...e){return function(t,n){switch(t){case Wd:return R8e(...e.map(r=>Un(r,n)));case Jg:return;default:throw new Error(`unrecognized action ${t}`)}}}function zt(e,t=one){return Oe(e,hr(t))}function vi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case Wd:return r===i&&s(n),Un(t,s);case Jg:return Qz(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:O8e(),constructor:e,dependencies:t,singleton:n}}const O8e=()=>Symbol();function M8e(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function k8e(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=A8e(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>EI(M8e(e),I=>c(I,b))),[E]=de.useState(O9(f,x));return B_(()=>{for(const I of s)I in b&&Un(E[I],b[I]);return()=>{Object.values(E).map(Qz)}},[b,E,x]),B_(()=>{c(x,b)}),de.useImperativeHandle(S,M9(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,k8e([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(ine(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState(O9(bs,_));return B_(()=>Un(_,E=>{E!==b&&x(M9(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];B_(()=>Un(b,S),[S,b])}}}const D8e=typeof document<"u"?de.useLayoutEffect:de.useEffect,L8e=D8e;var Rs=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Rs||{});const B8e={0:"debug",1:"log",2:"warn",3:"error"},N8e=()=>typeof globalThis>"u"?window:globalThis,Gd=$n(()=>{const e=Ze(3);return{log:Ze((n,r,i=1)=>{var o;const s=(o=N8e().VIRTUOSO_LOG_LEVEL)!=null?o:bs(e);i>=s&&console[B8e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Zz(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Rp(e,t=!0){return Zz(e,t).callbackRef}function $8e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=F8e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(z8e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return Zz(l,n)}function F8e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():pm.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Pd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Pd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),ane(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Io=$n(()=>{const e=yn(),t=yn(),n=Ze(0),r=yn(),i=Ze(0),o=yn(),s=yn(),l=Ze(0),c=Ze(0),d=Ze(0),f=Ze(0),h=yn(),p=yn(),g=Ze(!1);return wt(Oe(e,lt(({scrollTop:v})=>v)),t),wt(Oe(e,lt(({scrollHeight:v})=>v)),s),wt(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),sb={lvl:0};function une(e,t,n,r=sb,i=sb){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===sb}function Hm(){return sb}function b3(e,t){if(Kn(e))return sb;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=cne(r);return SS(ui(e,{k:o,v:s,l:dne(r)}))}}else return tt&&(l=l.concat(w3(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(w3(s,t,n))),l}function Fh(e){return Kn(e)?[]:[...Fh(e.l),{k:e.k,v:e.v},...Fh(e.r)]}function cne(e){return Kn(e.r)?[e.k,e.v]:cne(e.r)}function dne(e){return Kn(e.r)?e.l:SS(ui(e,{r:dne(e.r)}))}function ui(e,t){return une(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function gN(e){return Kn(e)||e.lvl>e.r.lvl}function L9(e){return _3(hne(e))}function SS(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(gN(t))return hne(ui(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ui(t.r,{l:ui(t,{r:t.r.l}),r:ui(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(gN(e))return _3(ui(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=gN(i)?n.lvl-1:n.lvl;return ui(i,{l:ui(e,{r:i.l,lvl:r-1}),r:_3(ui(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function CI(e,t,n){if(Kn(e))return[];const r=sl(e,t)[0];return U8e(w3(e,r,n))}function fne(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let s=1;s({index:t,value:n}))}function _3(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ui(t,{l:ui(e,{r:t.l}),lvl:n+1}):e}function hne(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ui(t,{r:ui(e,{l:t.r})}):e}function tC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function pne(e,t,n){return e[tC(e,t,n)]}function j8e(e,t,n,r){const i=tC(e,t,r),o=tC(e,n,r,i);return e.slice(i,o+1)}const e6=$n(()=>({recalcInProgress:Ze(!1)}),[],{singleton:!0});function H8e(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function B9(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=b3(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=vs(e,s+1,p));d&&(e=vs(e,o,i))}return[e,n]}function G8e(){return{offsetTree:[],sizeTree:Hm(),groupOffsetTree:Hm(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function t6({index:e},t){return t===e?0:t0&&(t=Math.max(t,pne(e,r,t6).offset)),fne(j8e(e,t,n,V8e),X8e)}function S3(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=tC(i,t-1,t6),l=i[c].offset;const f=sl(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===sl(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of CI(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function Y8e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Rs.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>vs(vs(v,y,p),y+1,g),s)}else[s,l]=W8e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=S3(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>vs(p,g,lb(g,c,i)),Hm()),groupIndices:n}}function lb(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=pne(t,e,t6),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function K8e(e){return typeof e.groupIndex<"u"}function mne(e,t,n){if(K8e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=gne(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function gne(e,t){if(!TI(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function TI(e){return!Kn(e.groupOffsetTree)}function J8e(e){return Fh(e).map(({k:t,v:n},r,i)=>{const o=i[r+1],s=o?o.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const Q8e={offsetHeight:"height",offsetWidth:"width"},Yl=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=_o(r,0),o=yn(),s=yn(),l=Ze(0),c=Ze([]),d=Ze(void 0),f=Ze(void 0),h=Ze((I,A)=>Pd(I,Q8e[A])),p=Ze(void 0),g=Ze(0),v=G8e(),y=_o(Oe(n,an(c,e,g),Rl(Y8e,v),hr()),v),S=_o(Oe(c,hr(),Rl((I,A)=>({prev:I.current,current:A}),{prev:[],current:[]}),lt(({prev:I})=>I)),[]);wt(Oe(c,Ut(I=>I.length>0),an(y,g),lt(([I,A,R])=>{const M=I.reduce((L,B,H)=>vs(L,B,lb(B,A.offsetTree,R)||H),Hm());return{...A,groupIndices:I,groupOffsetTree:M}})),y),wt(Oe(r,an(y),Ut(([I,{lastIndex:A}])=>I[{startIndex:I,endIndex:A,size:R}])),n),wt(d,f);const _=_o(Oe(d,lt(I=>I===void 0)),!0);wt(Oe(f,Ut(I=>I!==void 0&&Kn(bs(y).sizeTree)),lt(I=>[{startIndex:0,endIndex:0,size:I}])),n);const b=Is(Oe(n,an(y),Rl(({sizes:I},[A,R])=>({changed:R!==I,sizes:R}),{changed:!1,sizes:v}),lt(I=>I.changed)));Un(Oe(l,Rl((I,A)=>({diff:I.prev-A,prev:A}),{diff:0,prev:0}),lt(I=>I.diff)),I=>{const{groupIndices:A}=bs(y);if(I>0)en(t,!0),en(o,I+B9(I,A));else if(I<0){const R=bs(S);R.length>0&&(I-=B9(-I,R)),en(s,I)}}),Un(Oe(l,an(e)),([I,A])=>{I<0&&A("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Rs.ERROR)});const x=Is(o);wt(Oe(o,an(y),lt(([I,A])=>{const R=A.groupIndices.length>0,M=[],L=A.lastSize;if(R){const B=ab(A.sizeTree,0);let H=0,G=0;for(;H{let W=F.ranges;return F.prevSize!==0&&(W=[...F.ranges,{startIndex:F.prevIndex,endIndex:z+I-1,size:F.prevSize}]),{ranges:W,prevIndex:z+I,prevSize:V}},{ranges:M,prevIndex:I,prevSize:0}).ranges}return Fh(A.sizeTree).reduce((B,{k:H,v:G})=>({ranges:[...B.ranges,{startIndex:B.prevIndex,endIndex:H+I-1,size:B.prevSize}],prevIndex:H+I,prevSize:G}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Is(Oe(s,an(y,g),lt(([I,{offsetTree:A},R])=>{const M=-I;return lb(M,A,R)})));return wt(Oe(s,an(y,g),lt(([I,A,R])=>{if(A.groupIndices.length>0){if(Kn(A.sizeTree))return A;let L=Hm();const B=bs(S);let H=0,G=0,U=0;for(;H<-I;){U=B[G];const F=B[G+1]-U-1;G++,H+=F+1}if(L=Fh(A.sizeTree).reduce((F,{k:z,v:V})=>vs(F,Math.max(0,z+I),V),L),H!==-I){const F=ab(A.sizeTree,U);L=vs(L,0,F);const z=sl(A.sizeTree,-I+1)[1];L=vs(L,1,z)}return{...A,sizeTree:L,...S3(A.offsetTree,0,L,R)}}else{const L=Fh(A.sizeTree).reduce((B,{k:H,v:G})=>vs(B,Math.max(0,H+I),G),Hm());return{...A,sizeTree:L,...S3(A.offsetTree,0,L,R)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(Gd,e6),{singleton:!0}),Z8e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vne(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Z8e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Qb=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=Ze(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return wt(Oe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,I,A,R,M,L,B],H,G,U])=>{const D=vne(x),{align:F,behavior:z,offset:V}=D,W=A-1,K=mne(D,E,W);let Y=lb(K,E.offsetTree,H)+M;F==="end"?(Y+=G+sl(E.sizeTree,K)[1]-I+U,K===W&&(Y+=L)):F==="center"?Y+=(G+sl(E.sizeTree,K)[1]-I+U)/2:Y-=R,V&&(Y+=V);const Q=re=>{b(),re?(B("retrying to scroll to",{location:x},Rs.DEBUG),en(g,x)):B("list did not change, scroll successful",{},Rs.DEBUG)};if(b(),z==="smooth"){let re=!1;_=Un(n,ue=>{re=re||ue}),y=yc(l,()=>{Q(re)})}else y=yc(Oe(n,eje(150)),Q);return S=setTimeout(()=>{b()},1200),en(i,!0),B("scrolling from index to",{index:K,top:Y,behavior:z},Rs.DEBUG),{top:Y,behavior:z}})),s),{scrollToIndex:g,topListHeight:v}},gr(Yl,Io,Gd),{singleton:!0});function eje(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ub="up",a1="down",tje="none",nje={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},rje=0,Zb=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=Ze(!1),l=Ze(!0),c=yn(),d=yn(),f=Ze(4),h=Ze(rje),p=_o(Oe(D9(Oe(zt(t),Sg(1),Ju(!0)),Oe(zt(t),Sg(1),Ju(!1),k9(100))),hr()),!1),g=_o(Oe(D9(Oe(o,Ju(!0)),Oe(o,Ju(!1),k9(200))),hr()),!1);wt(Oe(vi(zt(t),zt(h)),lt(([b,x])=>b<=x),hr()),l),wt(Oe(l,id(50)),d);const v=Is(Oe(vi(e,zt(n),zt(r),zt(i),zt(f)),Rl((b,[{scrollTop:x,scrollHeight:E},I,A,R,M])=>{const L=x+I-E>-M,B={viewportHeight:I,scrollTop:x,scrollHeight:E};if(L){let G,U;return x>b.state.scrollTop?(G="SCROLLED_DOWN",U=b.state.scrollTop-x):(G="SIZE_DECREASED",U=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:B,atBottomBecause:G,scrollTopDelta:U}}let H;return B.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ib&&b.atBottom===x.atBottom))),y=_o(Oe(e,Rl((b,{scrollTop:x,scrollHeight:E,viewportHeight:I})=>{if(ane(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const A=E-(x+I)<1;return b.scrollTop!==x&&A?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ut(b=>b.changed),lt(b=>b.jump)),0);wt(Oe(v,lt(b=>b.atBottom)),s),wt(Oe(s,id(50)),c);const S=Ze(a1);wt(Oe(e,lt(({scrollTop:b})=>b),hr(),Rl((b,x)=>bs(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),wt(Oe(e,id(50),Ju(tje)),S);const _=Ze(0);return wt(Oe(p,Ut(b=>!b),Ju(0)),_),wt(Oe(t,id(100),an(p),Ut(([b,x])=>!!x),Rl(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Io)),Vd=$n(([{log:e}])=>{const t=Ze(!1),n=Is(Oe(t,Ut(r=>r),hr()));return Un(t,r=>{r&&bs(e)("props updated",{},Rs.DEBUG)}),{propsReady:t,didMount:n}},gr(Gd),{singleton:!0});function n6(e,t){e==0?t():requestAnimationFrame(()=>n6(e-1,t))}function r6(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ew=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=Ze(!0),l=Ze(0),c=Ze(!1);return wt(Oe(o,an(l),Ut(([d,f])=>!!f),Ju(!1)),s),Un(Oe(vi(t,o),an(s,e,n,c),Ut(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||Jz(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),n6(3,()=>{yc(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(Yl,Io,Qb,Vd),{singleton:!0});function N9(e){return e?e==="smooth"?"smooth":"auto":!1}const ije=(e,t)=>typeof e=="function"?N9(e(t)):t&&N9(e),oje=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=Ze(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}Un(Oe(vi(Oe(zt(e),Sg(1)),l),an(zt(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let I=S&&x,A="auto";return I&&(A=ije(_,b||E),I=I&&!!A),{totalCount:y,shouldFollow:I,followOutputBehavior:A}}),Ut(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=yc(t,()=>{bs(c)("following output to ",{totalCount:y},Rs.DEBUG),g(S),p=null})});function v(y){const S=yc(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(bs(c)("scrolling to bottom due to increased size",{},Rs.DEBUG),g("auto"))});setTimeout(S,100)}return Un(Oe(vi(zt(f),e,s),Ut(([y,,S])=>y&&S),Rl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ut(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),Un(h,()=>{v(bs(f)!==!1)}),Un(vi(zt(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(Yl,Zb,Qb,ew,Vd,Gd,Io));function sje(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const yne=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Is(Oe(o,lt(sje)));return wt(Oe(l,lt(c=>c.totalCount)),e),wt(Oe(l,lt(c=>c.groupIndices)),t),wt(Oe(vi(r,n,i),Ut(([c,d])=>TI(d)),lt(([c,d,f])=>sl(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(Yl,Io));function cb(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function xne(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const nC="top",rC="bottom",$9="none";function F9(e,t,n){return typeof e=="number"?n===ub&&t===nC||n===a1&&t===rC?e:0:n===ub?t===nC?e.main:e.reverse:t===rC?e.main:e.reverse}function z9(e,t){return typeof e=="number"?e:e[t]||0}const i6=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=Ze(0),l=Ze(0),c=Ze(0),d=_o(Oe(vi(zt(e),zt(t),zt(r),zt(o,cb),zt(c),zt(s),zt(i),zt(n),zt(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,I=S+_,A=Math.max(p-E,0);let R=$9;const M=z9(x,nC),L=z9(x,rC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+I-M&&(R=ub),vf!=null),hr(cb)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Io),{singleton:!0});function aje(e,t,n){if(TI(t)){const r=gne(e,t);return[{index:sl(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const vN={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function U9(e,t,n){if(e.length===0)return[];if(!TI(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=CI(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:U9(e,i,o),topItems:U9(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function bne(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=r6(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return ES(d,[],l,i,n,r)}const Ap=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=Ze([]),S=Ze(0),_=yn();wt(o.topItemsIndexes,y);const b=_o(Oe(vi(g,v,zt(s,cb),zt(t),zt(e),zt(f),d,zt(y),zt(r),zt(i),n),Ut(([A,R,,M,,,,,,,L])=>{const B=L&&L.length!==M;return A&&!R&&!B}),lt(([,,[A,R],M,L,B,H,G,U,D,F])=>{const z=L,{sizeTree:V,offsetTree:W}=z,K=bs(S);if(M===0)return{...vN,totalCount:M};if(A===0&&R===0)return K===0?{...vN,totalCount:M}:bne(K,B,L,U,D,F||[]);if(Kn(V))return K>0?null:ES(aje(r6(B,M),z,F),[],M,D,z,U);const Y=[];if(G.length>0){const se=G[0],J=G[G.length-1];let ae=0;for(const le of CI(V,se,J)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,J);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return ES([],Y,M,D,z,U);const Q=G.length>0?G[G.length-1]+1:0,re=q8e(W,A,R,Q);if(re.length===0)return null;const ue=M-1,ce=EI([],se=>{for(const J of re){const ae=J.value;let le=ae.offset,he=J.start;const pe=ae.size;if(ae.offset=R);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return ES(ce,Y,M,D,z,U)}),Ut(A=>A!==null),hr()),vN);wt(Oe(n,Ut(Jz),lt(A=>A==null?void 0:A.length)),t),wt(Oe(b,lt(A=>A.topListHeight)),h),wt(h,c),wt(Oe(b,lt(A=>[A.top,A.bottom])),l),wt(Oe(b,lt(A=>A.items)),_);const x=Is(Oe(b,Ut(({items:A})=>A.length>0),an(t,n),Ut(([{items:A},R])=>A[A.length-1].originalIndex===R-1),lt(([,A,R])=>[A-1,R]),hr(cb),lt(([A])=>A))),E=Is(Oe(b,id(200),Ut(({items:A,topItems:R})=>A.length>0&&A[0].originalIndex===R.length),lt(({items:A})=>A[0].index),hr())),I=Is(Oe(b,Ut(({items:A})=>A.length>0),lt(({items:A})=>{let R=0,M=A.length-1;for(;A[R].type==="group"&&RR;)M--;return{startIndex:A[R].index,endIndex:A[M].index}}),hr(xne)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:I,itemsRendered:_,initialItemCount:S,...p}},gr(Yl,yne,i6,ew,Qb,Zb,Vd,e6),{singleton:!0}),lje=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(wt(Oe(l,an(o),Ut(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>bne(c,d,f,h,p,g))),s),{}),gr(Yl,ew,Ap,Vd),{singleton:!0}),wne=$n(([{scrollVelocity:e}])=>{const t=Ze(!1),n=yn(),r=Ze(!1);return wt(Oe(e,an(r,t,n),Ut(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),Un(Oe(vi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Zb),{singleton:!0}),uje=$n(([{topItemsIndexes:e}])=>{const t=Ze(0);return wt(Oe(t,Ut(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Ap)),_ne=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=_o(Oe(vi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return wt(zt(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Io,Ap),{singleton:!0});function Sne(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const cje=Sne(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),dje=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Is(Oe(c,an(l),Rl(([,_,b,x],[{items:E,totalCount:I,bottom:A,offsetBottom:R},M])=>{const L=A+R;let B=0;return b===I&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(B=L-x,B!==0&&(B+=M))),[B,E,I,L]},[0,[],0,0]),Ut(([_])=>_!==0),an(t,s,r,o,g,v),Ut(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===ub),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Rs.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return Un(Oe(y,an(n,i)),([_,b,x])=>{x&&cje()?en(n,b-_):S(-_)}),Un(Oe(vi(_o(i,!1),n,v),Ut(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),id(1)),S),wt(Oe(f,lt(_=>({top:-_}))),e),Un(Oe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},I])=>{function A(R){return R*(b+I)}if(x.length===0)return A(_);{let R=0;const M=ab(E,0);let L=0,B=0;for(;L<_;){L++,R+=M;let H=x.length===B+1?1/0:x[B+1]-x[B]-1;L+H>_&&(R-=M,H=_-L+1),L+=H,R+=A(H),B++}return R}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Io,Zb,Ap,Yl,Gd,e6)),fje=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Ze(0);return Un(Oe(e,an(r),Ut(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{yc(Oe(n,Sg(1),Ut(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(Vd,Io,Ap),{singleton:!0}),hje=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Ze(!1),r=_o(Oe(vi(n,e,t),Ut(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),id(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Io,_ne),{singleton:!0}),o6=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=Ze(!1),s=Ze(void 0);return wt(Oe(vi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),wt(Oe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Io)),pje=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,mje=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return wt(Oe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:I,align:A,calculateViewLocation:R=pje,...M}=h,L=mne(h,p,v-1),B=lb(L,p.offsetTree,x)+y+S,H=B+sl(p.sizeTree,L)[1],G=b+S,U=b+g-_,D=R({itemTop:B,itemBottom:H,viewportTop:G,viewportBottom:U,locationParams:{behavior:I,align:A,...M}});return D?E&&yc(Oe(c,Ut(F=>F===!1),Sg(bs(c)?1:2)),E):E&&E(),D}),Ut(h=>h!==null)),d),{scrollIntoView:f}},gr(Yl,Io,Qb,Ap,Gd),{singleton:!0}),gje=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=Ze(void 0),f=Ze(null),h=Ze(null);return wt(s,f),wt(l,h),Un(Oe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=J8e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),wt(Oe(d,Ut(Jz),lt(vje)),r),wt(Oe(i,an(d),Ut(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(Yl,Io,ew,Vd,o6));function vje(e){return{offset:e.scrollTop,index:0,align:"start"}}const yje=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(i6,lje,Vd,wne,_ne,fje,hje,o6,mje,Gd)),xje=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},I,{topItemCount:A},{groupCounts:R},M])=>(wt(x.rangeChanged,M.scrollSeekRangeChanged),wt(Oe(M.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:A,groupCounts:R,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...M,...v,sizes:h,...y}),gr(Yl,ew,Io,gje,oje,Ap,Qb,dje,uje,yne,yje)),yN="-webkit-sticky",j9="sticky",Ene=Sne(()=>{if(typeof document>"u")return j9;const e=document.createElement("div");return e.style.position=yN,e.style.position===yN?yN:j9});function Cne(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=Zz(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const Tne=de.createContext(void 0),Ine=de.createContext(void 0);function Rne(e){return e}const bje=$n(()=>{const e=Ze(c=>`Item ${c}`),t=Ze(null),n=Ze(c=>`Group ${c}`),r=Ze({}),i=Ze(Rne),o=Ze("div"),s=Ze(Qg),l=(c,d=null)=>_o(Oe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),wje=$n(([e,t])=>({...e,...t}),gr(xje,bje)),_je=({height:e})=>de.createElement("div",{style:{height:e}}),Sje={position:Ene(),zIndex:1,overflowAnchor:"none"},Eje={overflowAnchor:"none"},H9=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=Qs("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=Qs("windowScrollContainerState"),l=Qs("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=Qs("gap"),{callbackRef:S}=$8e(r,g,p,t?Qg:c,v,y,o),[_,b]=de.useState(0);s6("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||_je,I=mn("ListComponent"),A=mn("ItemComponent"),R=mn("GroupComponent"),M=mn("computeItemKey"),L=mn("isSeeking"),B=mn("groupIndices").length>0,H=mn("paddingTopAddition"),G=mn("scrolledToInitialItem"),U=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...G?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,ko(x,f)):de.createElement(I,{...ko(I,f),ref:S,style:U,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,z=M(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...ko(E,f),key:z,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(R,{...ko(R,f),key:z,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:Sje},h(D.index,f)):de.createElement(A,{...ko(A,f),key:z,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:Eje},B?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),Cje={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},II={width:"100%",height:"100%",position:"absolute",top:0},Tje={width:"100%",position:Ene(),top:0,zIndex:1};function ko(e,t){if(typeof e!="string")return{context:t}}const Ije=de.memo(function(){const t=mn("HeaderComponent"),n=Qs("headerHeight"),r=mn("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Rje=de.memo(function(){const t=mn("FooterComponent"),n=Qs("footerHeight"),r=mn("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null});function Ane({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=lne(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...Cje,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...ko(d,p)},s)})}function Pne({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=lne(c,f,d,Qg,g);return L8e(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...ko(d,v)},s)})}const Aje=({children:e})=>{const t=de.useContext(Tne),n=Qs("viewportHeight"),r=Qs("fixedItemHeight"),i=Rp(rne(n,o=>Pd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:II,ref:i,"data-viewport-type":"element"},e)},Pje=({children:e})=>{const t=de.useContext(Tne),n=Qs("windowViewportRect"),r=Qs("fixedItemHeight"),i=mn("customScrollParent"),o=Cne(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:II,"data-viewport-type":"window"},e)},Oje=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...Tje,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},Mje=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?Lje:Dje,s=i||n?Pje:Aje;return de.createElement(o,{...t},r&&de.createElement(Oje,null,de.createElement(H9,{showTopList:!0})),de.createElement(s,null,de.createElement(Ije,null),de.createElement(H9,null),de.createElement(Rje,null)))}),{Component:kje,usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}=sne(wje,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Mje),Dje=Ane({usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}),Lje=Pne({usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}),Bje=kje,W9={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Nje={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:G9,ceil:V9,floor:iC,min:xN,max:l1}=Math;function $je(e){return{...Nje,items:e}}function X9(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const o=n===null?null:n[i+e];return{index:i+e,data:o}})}function Fje(e,t){return e&&e.column===t.column&&e.row===t.row}function N_(e,t){return e&&e.width===t.width&&e.height===t.height}const zje=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const I=Ze(0),A=Ze(0),R=Ze(W9),M=Ze({height:0,width:0}),L=Ze({height:0,width:0}),B=yn(),H=yn(),G=Ze(0),U=Ze(null),D=Ze({row:0,column:0}),F=yn(),z=yn(),V=Ze(!1),W=Ze(0),K=Ze(!0),Y=Ze(!1);Un(Oe(v,an(W),Ut(([J,ae])=>!!ae)),()=>{en(K,!1),en(A,0)}),Un(Oe(vi(v,K,L,M,W,Y),Ut(([J,ae,le,he,,pe])=>J&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,J])=>{en(Y,!0),n6(1,()=>{en(B,J)}),yc(Oe(r),()=>{en(n,[0,0]),en(K,!0)})}),wt(Oe(z,Ut(J=>J!=null&&J.scrollTop>0),Ju(0)),A),Un(Oe(v,an(z),Ut(([,J])=>J!=null)),([,J])=>{J&&(en(M,J.viewport),en(L,J==null?void 0:J.item),en(D,J.gap),J.scrollTop>0&&(en(V,!0),yc(Oe(r,Sg(1)),ae=>{en(V,!1)}),en(s,{top:J.scrollTop})))}),wt(Oe(M,lt(({height:J})=>J)),i),wt(Oe(vi(zt(M,N_),zt(L,N_),zt(D,(J,ae)=>J&&J.column===ae.column&&J.row===ae.row),zt(r)),lt(([J,ae,le,he])=>({viewport:J,item:ae,gap:le,scrollTop:he}))),F),wt(Oe(vi(zt(I),t,zt(D,Fje),zt(L,N_),zt(M,N_),zt(U),zt(A),zt(V),zt(K),zt(W)),Ut(([,,,,,,,J])=>!J),lt(([J,[ae,le],he,pe,ve,ye,be,,me,xe])=>{const{row:Je,column:Xe}=he,{height:at,width:Lt}=pe,{width:Pe}=ve;if(be===0&&(J===0||Pe===0))return W9;if(Lt===0){const Rt=r6(xe,J),ut=Rt===0?Math.max(be-1,0):Rt;return $je(X9(Rt,ut,ye))}const Fe=One(Pe,Lt,Xe);let it,ht;me?ae===0&&le===0&&be>0?(it=0,ht=be-1):(it=Fe*iC((ae+Je)/(at+Je)),ht=Fe*V9((le+Je)/(at+Je))-1,ht=xN(J-1,l1(ht,Fe-1)),it=xN(ht,l1(0,it))):(it=0,ht=-1);const pt=X9(it,ht,ye),{top:_e,bottom:ze}=q9(ve,he,pe,pt),Ye=V9(J/Fe),Be=Ye*at+(Ye-1)*Je-ze;return{items:pt,offsetTop:_e,offsetBottom:Be,top:_e,bottom:ze,itemHeight:at,itemWidth:Lt}})),R),wt(Oe(U,Ut(J=>J!==null),lt(J=>J.length)),I),wt(Oe(vi(M,L,R,D),Ut(([J,ae,{items:le}])=>le.length>0&&ae.height!==0&&J.height!==0),lt(([J,ae,{items:le},he])=>{const{top:pe,bottom:ve}=q9(J,he,ae,le);return[pe,ve]}),hr(cb)),n);const Q=Ze(!1);wt(Oe(r,an(Q),lt(([J,ae])=>ae||J!==0)),Q);const re=Is(Oe(zt(R),Ut(({items:J})=>J.length>0),an(I,Q),Ut(([{items:J},ae,le])=>le&&J[J.length-1].index===ae-1),lt(([,J])=>J-1),hr())),ue=Is(Oe(zt(R),Ut(({items:J})=>J.length>0&&J[0].index===0),Ju(0),hr())),ce=Is(Oe(zt(R),an(V),Ut(([{items:J},ae])=>J.length>0&&!ae),lt(([{items:J}])=>({startIndex:J[0].index,endIndex:J[J.length-1].index})),hr(xne),id(0)));wt(ce,p.scrollSeekRangeChanged),wt(Oe(B,an(M,L,I,D),lt(([J,ae,le,he,pe])=>{const ve=vne(J),{align:ye,behavior:be,offset:me}=ve;let xe=ve.index;xe==="LAST"&&(xe=he-1),xe=l1(0,xe,xN(he-1,xe));let Je=E3(ae,pe,le,xe);return ye==="end"?Je=G9(Je-ae.height+le.height):ye==="center"&&(Je=G9(Je-ae.height/2+le.height/2)),me&&(Je+=me),{top:Je,behavior:be}})),s);const se=_o(Oe(R,lt(J=>J.offsetBottom+J.bottom)),0);return wt(Oe(y,lt(J=>({width:J.visibleWidth,height:J.visibleHeight}))),M),{data:U,totalCount:I,viewportDimensions:M,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:B,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:G,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:A,gap:D,restoreStateFrom:z,...p,initialTopMostItemIndex:W,gridState:R,totalListHeight:se,...h,startReached:ue,endReached:re,rangeChanged:ce,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(i6,Io,Zb,wne,Vd,o6,Gd));function q9(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=E3(e,t,n,r[0].index),s=E3(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function E3(e,t,n,r){const i=One(e.width,n.width,t.column),o=iC(r/i),s=o*n.height+l1(0,o-1)*t.row;return s>0?s+t.row:s}function One(e,t,n){return l1(1,iC((e+n)/(iC(t)+n)))}const Uje=$n(()=>{const e=Ze(d=>`Item ${d}`),t=Ze({}),n=Ze(null),r=Ze("virtuoso-grid-item"),i=Ze("virtuoso-grid-list"),o=Ze(Rne),s=Ze("div"),l=Ze(Qg),c=(d,f=null)=>_o(Oe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),jje=$n(([e,t])=>({...e,...t}),gr(zje,Uje)),Hje=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=nl("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=nl("itemDimensions"),g=nl("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Rp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:I}=x.getBoundingClientRect();p({width:E,height:I})}g({row:Y9("row-gap",getComputedStyle(_).rowGap,v),column:Y9("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...ko(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...ko(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...ko(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),Wje=de.memo(function(){const t=Sr("HeaderComponent"),n=nl("headerHeight"),r=Sr("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Gje=de.memo(function(){const t=Sr("FooterComponent"),n=nl("footerHeight"),r=Sr("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Vje=({children:e})=>{const t=de.useContext(Ine),n=nl("itemDimensions"),r=nl("viewportDimensions"),i=Rp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:II,ref:i},e)},Xje=({children:e})=>{const t=de.useContext(Ine),n=nl("windowViewportRect"),r=nl("itemDimensions"),i=Sr("customScrollParent"),o=Cne(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:II},e)},qje=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?Kje:Yje,o=r||n?Xje:Vje;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(Wje,null),de.createElement(Hje,null),de.createElement(Gje,null)))}),{Component:XHe,usePublisher:nl,useEmitterValue:Sr,useEmitter:Mne}=sne(jje,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},qje),Yje=Ane({usePublisher:nl,useEmitterValue:Sr,useEmitter:Mne}),Kje=Pne({usePublisher:nl,useEmitterValue:Sr,useEmitter:Mne});function Y9(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Rs.WARN),t==="normal"?0:parseInt(t??"0",10)}const Jje=O.forwardRef(({style:e,children:t,...n},r)=>{const i=O.useRef(null),{palette:o,spacing:s}=Pn(),l=k1({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=CK({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});O.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=O.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function Qje({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(Pt,{...i,children:C.jsx(Bje,{components:{Scroller:Jje},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function Zje({event:e,hidden:t}){return C.jsxs(xLe,{children:[ie.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Lye,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function eHe({event:e,index:t,selected:n,...r}){const{spacing:i}=Pn(),[,o]=dp();return C.jsxs(T$,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${V1(e==null?void 0:e.type)}`,...r.sx},onClick:()=>o({step:t}),children:[C.jsx(hd,{children:C.jsx(qt,{variant:"body2",children:t})}),C.jsx($d,{title:C.jsx(yF,{event:e,flexDirection:"column"}),children:C.jsx(Dl,{sx:{overflow:"hidden"},primary:C.jsx(Zje,{event:e,hidden:!1}),secondary:C.jsx(yF,{event:ie.pick(e,"f","g","pId")})})})]})}const tHe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),nHe=e=>Number(e.replace(/px$/,""));function rHe(){const{spacing:e}=Pn(),{controls:t,onChange:n,state:r}=zd(),[{step:i=0,playback:o},s]=dp(),[{layers:l}]=ua(),c=O.useRef(null),[d,f]=O.useState(),h=ie.find(l,{key:d});O.useEffect(()=>{var g;d||f((g=ie.head(l))==null?void 0:g.key)},[d,f,l]);const p=O.useMemo(()=>{var g;if(h)return O.createElement(jb[((g=h==null?void 0:h.source)==null?void 0:g.type)??""].steps,{layer:h})},[h]);return O.useEffect(()=>{o==="paused"&&ie.delay(()=>{var g,v;return(v=(g=c==null?void 0:c.current)==null?void 0:g.scrollToIndex)==null?void 0:v.call(g,{index:i,align:"start",behavior:"smooth",offset:-nHe(e(6+2))})},150)},[i,o,e]),C.jsxs(Ln,{onChange:n,stack:r,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,alignItems:"center",children:p?o!=="playing"?O.cloneElement(p,{children:g=>h?g.length?C.jsx(Qje,{sx:{width:"100%",height:"100%"},items:g,listOptions:{ref:c,defaultItemHeight:80,overscan:0},renderItem:(v,y)=>C.jsxs(Pt,{sx:{height:e(y?10:16),pt:y?0:e(6)},children:[C.jsx(eHe,{event:v,index:y,selected:y===i,sx:{height:"100%"}}),C.jsx(wc,{variant:"inset"})]})}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:`${ia(h)} has no steps to display`}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:"Steps"})}):C.jsx(Lh,{icon:C.jsx(t4,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:"Running"}),C.jsx(pc,{onClick:()=>s({playback:"paused"}),children:"Pause"})]})}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:"Steps"})})}),C.jsxs(Ln.Options,{children:[C.jsx(Ss,{icon:C.jsx(TT,{}),label:"Layer",value:d,items:ie.map(l,g=>({id:g.key,name:ia(g)})),onChange:f,showArrow:!0}),tHe,C.jsx(C8e,{layer:h})]}),C.jsx(Ln.Extras,{children:t})]})}const iHe=e=>e?48:36,oHe=8;function sHe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=I4(),l=ie.max([ie.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(Bg,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx($d,{title:i,children:C.jsx("span",{children:e==null?void 0:e(T4(c))})}),C.jsx(Dg,{...BT(c),anchorOrigin:{horizontal:"center",vertical:-iHe(s)*l-oHe},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:d,label:f,disabled:h})=>C.jsxs(pd,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(hd,{children:C.jsx(Ghe,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function aHe({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ie.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ie.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(sHe,{defaultChecked:!0,placeholder:ie.startCase(e),trigger:f=>C.jsx(pc,{...f,disabled:!(r!=null&&r.length),startIcon:i,endIcon:o&&C.jsx(FY,{sx:{ml:-.5}}),children:c}),items:ie.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:h}),C.jsx(Yr,{}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const K9=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function lHe(){var p,g,v,y;const{controls:e,onChange:t,state:n}=zd(),[r]=eI(),[{layers:i}]=ua(),[o,s]=O.useState({}),l=O.useMemo(()=>ie.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=O.useState(),f=O.useMemo(()=>ie.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{children:C.jsx(A4,{children:S=>C.jsx(Pt,{children:C.jsx(vDe,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Ln.Options,{children:C.jsxs(M1,{direction:"row",children:[C.jsx(Ss,{label:"Renderer",icon:C.jsx(Sye,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ie.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),K9,C.jsx(aHe,{defaultChecked:!0,label:"Layers",icon:C.jsx(TT,{}),value:o,onChange:s,items:ie.map(i,S=>({id:S.key,name:ia(S)})),showArrow:!0}),K9,C.jsx(pc,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},startIcon:C.jsx(Tye,{}),children:"Fit"}),C.jsx(pc,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},startIcon:C.jsx(Rye,{}),children:"1:1"})]})}),C.jsx(Ln.Extras,{children:e})]})}const C3={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(HY,{}),content:lHe},tree:{id:"tree",name:"Tree",icon:C.jsx($Y,{}),content:lDe},steps:{id:"steps",name:"Steps",icon:C.jsx(tS,{}),content:rHe},info:{id:"info",name:"Logs",icon:C.jsx(UY,{}),content:pH},layers:{id:"layers",name:"Layers",icon:C.jsx(TT,{}),content:yLe},parameters:{id:"parameters",name:"Parameters",icon:C.jsx(jye,{}),content:pH},debug:{id:"debug",name:"Debugger",icon:C.jsx(Cye,{}),content:wIe},settings:{id:"settings",name:"Settings",icon:C.jsx(Hye,{}),content:b8e},about:{id:"about",name:"About",icon:C.jsx(Bye,{}),content:Pbe}},[uHe,cHe]=Gl({view:{type:"branch",key:js(),orientation:"horizontal",children:[{size:75,type:"branch",key:js(),orientation:"horizontal",children:[{type:"leaf",size:25,key:js(),content:{type:"layers"}},{size:75,type:"branch",key:js(),orientation:"vertical",children:[{type:"leaf",size:75,key:js(),content:{type:"viewport"}},{type:"leaf",size:25,key:js(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:js(),content:{type:"steps"}}]}});function dHe(e){const t=HIe(),[{view:n},r]=uHe();return C.jsxs(C.Fragment,{children:[C.jsx(wn,{...e,children:C.jsx(LK,{root:n,onChange:i=>r({view:i}),renderLeaf:({content:i})=>{var o;return C.jsx(sp,{in:!0,children:C.jsx(Pt,{sx:{width:"100%",height:"100%"},children:O.createElement((o=C3[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(sp,{in:t,children:C.jsx(Lme,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})})]})}function fHe(e){O.useEffect(()=>{document.querySelector('meta[name="theme-color"]').setAttribute("content",e)},[e])}function hHe(e){return new Promise(t=>ie.delay(t,e))}async function pHe(e,t=2500){const n=ie.now();return{result:await Promise.any([e(),hHe(t)]),delta:ie.now()-n}}function mHe(){const e=_c(),[{remote:t}]=Ec(),[,n]=hg(),r=xp("connections");return O.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(p8e(s))({url:l});await d.connect();const{result:f,delta:h}=await pHe(()=>d.call("about"));f?(e(`Connected to ${f.name}.`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(o)}i||e(`Connected to ${o.length} of ${t.length} solvers.`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const gHe=e=>t=>({...t,source:e});function vHe(){const[e]=hg(),[,t]=SE(),n=xp("features");return tZ(r=>n(async()=>{const i={algorithms:[],formats:ie.keys(vz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ie.uniqBy([...i[l],...ie.map(await o(`features/${l}`),gHe(s))],"id");r.aborted||t(i)}),[e,t]),C.jsx(C.Fragment,{})}function yHe(){const[{layers:e},t]=ua();return O.useMemo(()=>ie.map(e,n=>{const r=IZ(n).service;if(r)return O.createElement(r,{key:n.key,value:n,onChange:i=>t({layers:ie.map(e,o=>o.key===n.key?i:o)})})}),[e,t])}function xHe(){const e=yHe();return C.jsx(C.Fragment,{children:e})}function kne({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ie.reduce(ie.map(e,r=>O.createElement(r)),(r,i)=>O.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ie.map(n,(r,i)=>O.createElement(r,{key:i}))]}))})}const bHe=[mHe,vHe,tUe,xHe];function wHe(){const t=Pn().palette.background.default;return fHe(t),C.jsx(wn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:C.jsx(dHe,{flex:1})})}function _He(){const[{theme:e="light",accentColor:t="teal"}]=Ec(),n=O.useMemo(()=>Cbe(e,t),[e,t]);return C.jsx(uae,{theme:n,children:C.jsx(_xe,{children:C.jsx(kne,{services:bHe,children:C.jsx(wHe,{})})})})}const[qHe,SHe]=Gl({});const EHe=NY(document.getElementById("root")),CHe=[_be,zIe,UIe,Zwe,SHe,jIe,fDe,$Oe,wxe,cHe];EHe.render(C.jsx(ipe,{children:C.jsx(kne,{slices:CHe,children:C.jsx(_He,{})})})); + }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=h$e(e)),typeof e=="number"?f$e(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,n=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),r=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const i=`${n}px ${r}px`;return this.dropShadowBlur>0?`text-shadow: ${i} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${i} ${e}`}reset(){Object.assign(this,Qp.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=et.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let o1=Qp;o1.availableFonts={};o1.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const Zp=class extends Tp{constructor(e="",t={}){super(ft.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const n=new Image,r=ft.from(n,{scaleMode:et.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Yt,r.trim=new Yt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=Zp.defaultMaxWidth,this.maxHeight=Zp.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=Zp.defaultAutoResolution,this._resolution=Zp.defaultResolution??et.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},Zp.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=t,(r=this._svgRoot)==null||r.remove(),this._svgRoot=t,(i=this._domElement)==null||i.remove(),this._domElement=t,(o=this._foreignObject)==null||o.remove(),this._foreignObject=t,(s=this._styleElement)==null||s.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=td(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=td(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof o1?(this.ownsStyle=!1,this._style=e):e instanceof vc?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=o1.from(e)):(this.ownsStyle=!0,this._style=new o1(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/
/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let mI=Zp;mI.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};mI.defaultMaxWidth=2024;mI.defaultMaxHeight=2024;mI.defaultAutoResolution=!0;function j4e(e,t){return{constructor:e,meta:t}}function H4e(e,t,n,r,i){ate(e,t,n||0,r||e.length-1,i||W4e)}function ate(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));ate(e,t,f,h,i)}var p=e[t],g=n,v=r;for(ox(e,n,t),i(e[r],p)>0&&ox(e,n,r);g0;)v--}i(e[n],p)===0?ox(e,n,v):(v++,ox(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function ox(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function W4e(e,t){return et?1:0}class G4e{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data;const r=[];if(!T_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=em(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,Fp(r,this.toBBox),Fp(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=em([t,n]),this.data.height=t.height+1,this.data.leaf=!1,Fp(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Ix(t,0,l,this.toBBox),d=Ix(t,l,r,this.toBBox),f=K4e(c,d),h=zB(c)+zB(d);f=n;d--){const f=t.children[d];Rx(l,t.leaf?o(f):f),c+=C_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Rx(n[i],t)}_condense(t){for(let n=t.length-1,r;n>=0;n--)t[n].children.length===0?n>0?(r=t[n-1].children,r.splice(r.indexOf(t[n]),1)):this.clear():Fp(t[n],this.toBBox)}}function V4e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function em(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function D7(e,t,n,r,i){const o=[t,n];for(;o.length;){if(n=o.pop(),t=o.pop(),n-t<=r)continue;const s=t+Math.ceil((n-t)/r/2)*r;H4e(e,s,t,n,i),o.push(t,s,s,n)}}class J4e extends G4e{toBBox(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}compareMinX(t,n){return t.left-n.left}compareMinY(t,n){return t.top-n.top}}const L7={screenSize:{width:256,height:256},workerCount:4,workerIndex:0,tileResolution:{width:128,height:128},tileSubdivision:0,refreshInterval:1e3/30,animationDuration:300,debounceInterval:150,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var lte={},JE=Xt&&Xt.__assign||function(){return JE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),jB}var uze=aze()?Math.sign:lze(),cze=uze,dze=Math.abs,fze=Math.floor,hze=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:cze(e)*fze(dze(e)))},pze=hze,mze=Math.max,gze=function(e){return mze(0,pze(e))},ute=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},vze=Xg,cte=function(e){if(!vze(e))throw new TypeError("Cannot use null or undefined");return e},yze={exports:{}},xze=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},HB,N7;function bze(){return N7||(N7=1,HB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),HB}var WB,$7;function wze(){if($7)return WB;$7=1;var e=Xg,t=Object.keys;return WB=function(n){return t(e(n)?Object(n):n)},WB}var GB,F7;function _ze(){return F7||(F7=1,GB=bze()()?Object.keys:wze()),GB}var VB,z7;function Sze(){if(z7)return VB;z7=1;var e=_ze(),t=cte,n=Math.max;return VB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},qB}var Uze=Fze()?String.prototype.contains:zze(),xS=pte,j7=$ze,mte=dte,gte=sze,s1=Uze,jze=hte.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],xS(e)?(n=s1.call(e,"c"),r=s1.call(e,"e"),i=s1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?mte(gte(o),s):s};jze.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],xS(t)?j7(t)?xS(n)?j7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,xS(e)?(r=s1.call(e,"c"),i=s1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?mte(gte(o),s):s};var qb=hte.exports,s3={exports:{}};(function(e,t){var n=qb,r=ute,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,R;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(R=0;A=I[R];++R)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[R?0:1]:I.splice(R,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,R;if(d.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=g?d.call(g,v,M,_):M,y?(f.value=M,h(b,_,f)):b[_]=M,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),Et(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Li=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:fN(i,r,(e/=60)+2),g:fN(i,r,e),b:fN(i,r,e-2)}},zz=function(e,t,n,r){return{r:Et(255*(1-e)*(r=1-r)),g:Et(255*(1-t)*r),b:Et(255*(1-n)*r)}},_te=function(e,t,n){e/=255,t/=255,n/=255;var r=1-Math.max(e,t,n),i=1-r,o=i&&(i-t)/i,s=i&&(i-n)/i;return{c:Et(100*(i&&(i-e)/i)),m:Et(100*o),y:Et(100*s),k:Et(100*r)}},_g=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=Et(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:Et(100*c),l:Et(100*d),a:r}},s9=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},bo=function(e){return typeof e=="string"&&(e=qg.test(e)?vI(e)/100:+e),isNaN(+e)||e>1?1:Et(e)},Yg=function(e,t,n){return t.reduce(function(r,i){return a3(a3([],r,!0),[sn(sn({},e),{h:n===Oo.ADDITIVE?ob(e.h+i):ob(s9(s9(e.h,!1)+i,!0))})],!1)},[sn({},e)])},h6e=function(e,t){return Yg(e,[30,-30],t)},p6e=function(e,t){return Yg(e,[180],t)},m6e=function(e,t){return Yg(e,[150,-150],t)},g6e=function(e,t){return Yg(e,[120,-120],t)},v6e=function(e,t){return Yg(e,[60,-120,180],t)},y6e=function(e,t){return Yg(e,[90,-90,180],t)},zs=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Wt).some(function(r){if(Ax[r].test(t))return n=r,!0}),!n&&~bte.indexOf(t)&&(n=Wt.HEX),!n)throw new Error(d6e);return n}(e):function(t){var n,r=!1,i=wte(Object.keys(t));if(l3[i]&&(n=l3[i]),n&&n===Wt.RGB){var o=Object.entries(t).some(function(l){return!u3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(qg.test("".concat(l[1]))||!u3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=Wt.HEX)}if(!n||r)throw new Error(f6e);return n}(e)},x6e=((lx={})[Wt.HEX]=function(e){var t=(~bte.indexOf(e)?QE[e]:e).match(Ax.HEX),n={r:I_(t[1]||t[5]),g:I_(t[2]||t[6]),b:I_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=I_(r)/255),n},lx[Wt.RGB]=function(e){var t=e.match(Ax.RGB),n=$h(t[1]||t[5]),r=$h(t[2]||t[6]),i=$h(t[3]||t[7]),o=t[4]||t[8],s={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return o!==void 0&&(s.a=bo(o)),s},lx[Wt.HSL]=function(e){var t=e.match(Ax.HSL),n=ob(t[1]||t[5]),r=ZE(t[2]||t[6]),i=ZE(t[3]||t[7]),o=t[4]||t[8],s=Li(n,r,i);return o!==void 0&&(s.a=bo(o)),s},lx[Wt.CMYK]=function(e){var t=e.match(Ax.CMYK),n=rd(t[1]||t[6]),r=rd(t[2]||t[7]),i=rd(t[3]||t[8]),o=rd(t[4]||t[9]),s=t[5]||t[10],l=zz(n,r,i,o);return s!==void 0&&(l.a=bo(s)),l},lx),b6e=((ux={})[Wt.HEX]=function(e){var t={r:$h("".concat(e.r)),g:$h("".concat(e.g)),b:$h("".concat(e.b))};return Qi(e,"a")&&(t.a=Math.min($h("".concat(e.a),!0),1)),t},ux[Wt.RGB]=function(e){return this.HEX(e)},ux[Wt.HSL]=function(e){var t=ZE("".concat(e.s)),n=ZE("".concat(e.l)),r=Li(ob(e.h),t,n);return Qi(e,"a")&&(r.a=bo(e.a)),r},ux[Wt.CMYK]=function(e){var t=rd("".concat(e.c)),n=rd("".concat(e.m)),r=rd("".concat(e.y)),i=rd("".concat(e.k)),o=zz(t,n,r,i);return Qi(e,"a")&&(o.a=bo(e.a)),o},ux),mp=function(e,t){return t===void 0&&(t=zs(e)),typeof e=="string"?x6e[t](e):b6e[t](e)},rn=((Gu={})[Wt.HEX]=function(e){return{r:R_(e.r),g:R_(e.g),b:R_(e.b)}},Gu.HEXA=function(e){var t=rn.HEX(e);return t.a=Qi(e,"a")?R_(255*e.a):"0xFF",t},Gu[Wt.RGB]=function(e,t){return Qi(e,"a")&&delete e.a,Yh(e,t)},Gu.RGBA=function(e,t){return e.a=Qi(e,"a")?Et(e.a):1,Yh(e,t)},Gu[Wt.HSL]=function(e,t){var n=_g(e.r,e.g,e.b);return delete n.a,Em(n,t)},Gu.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Qi(e,"a")?Et(e.a,t):1,n},Gu[Wt.CMYK]=function(e,t){return w6e(_te(e.r,e.g,e.b),t)},Gu.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Qi(e,"a")?Et(e.a,t):1,n},Gu),a9=function(e,t,n,r){var i=zs(e),o=typeof e=="string",s=mp(e,i),l=typeof e=="string"&&Qi(s,"a")||typeof e!="string"&&Qi(e,"a"),c=_g(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case Wt.HEX:default:return f.map(function(h){var p=Li(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(Yh(sn(sn({},p),{a:Et(255*p.a)}),r)):tn.HEX(Yh(p,r)):l?rn.HEXA(p):rn.HEX(p)});case Wt.RGB:return f.map(function(h){var p=Li(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(Yh(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case Wt.HSL:return f.map(function(h){return o?tn.HSL(Em(h,r)):l?rn.HSLA(sn(sn({},Li(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL(Li(h.h,h.s,h.l),r)})}},zp=((hh={buildHarmony:function(e,t,n,r){var i=zs(e),o=mp(e,i),s=_g(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Qi(o,"a")||typeof e!="string"&&Qi(e,"a"),c=typeof e=="string";switch(i){case Wt.HEX:default:return l?this.HEXA(Em(s,0),t,n,c):this.HEX(Em(s,0),t,n,c);case Wt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case Wt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[Wt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(Li(i.h,i.s,i.l)):rn.HEX(Li(i.h,i.s,i.l))})},hh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},Li(i.h,i.s,i.l)),{a:255*bo(i.a)})):rn.HEXA(sn(sn({},Li(i.h,i.s,i.l)),{a:bo(i.a)}))})},hh[Wt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(Yh(Li(o.h,o.s,o.l),i)):rn.RGB(Li(o.h,o.s,o.l),i)})},hh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(Yh(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)):rn.RGBA(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)})},hh[Wt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Em({h:o.h,s:o.s,l:o.l},i)):rn.HSL(Li(o.h,o.s,o.l),i)})},hh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Em(sn(sn({},o),{a:bo(o.a)}),i)):rn.HSLA(sn(sn({},Li(o.h,o.s,o.l)),{a:bo(o.a)}),i)})},hh),Up=((ph={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(I){var A=zs(I);return mp(I,A)}),b=t===Oo.SUBTRACTIVE?_.map(function(I){var A,R,M,L,B,H,G,U,D,F,z,V,W,K,Y=(A=I.r,R=I.g,M=I.b,L=Math.min(A,R,M),B=Math.min(255-A,255-R,255-M),H=A-L,G=R-L,U=M-L,D=Math.min(H,G),F=H-D,z=(G+D)/2,V=(U+G-D)/2,W=Math.max(F,z,V)/Math.max(H,G,U),K=isNaN(W)||W===1/0||W<=0?1:W,{r:F/K+B,y:z/K+B,b:V/K+B});return Qi(I,"a")&&(Y.a=I.a),Y}):null;function x(I){var A=t===Oo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return I.reduce(function(R,M){var L=Qi(M,"a")?M.a:1,B={r:Math.min(R.r+M.r*L,255),b:Math.min(R.b+M.b*L,255),a:1-(1-L)*(1-R.a)},H="g"in R?R.g:R.y,G="g"in M?M.g:M.y;return sn(sn({},B),t===Oo.ADDITIVE?{g:Math.min(H+G*L,255)}:{y:Math.min(H+G*L,255)})},A)}if(t===Oo.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:Et(n.r),g:Et(n.g),b:Et(n.b),a:La(n.a,0,1)}}})[Wt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},ph.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*bo(r.a):bo(r.a),n?tn.HEX(r):rn.HEXA(r)},ph[Wt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},ph.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},ph[Wt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=_g(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},ph.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=_g(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},ph),Yh=function(e,t){return sn({r:Et(e.r,t),g:Et(e.g,t),b:Et(e.b,t)},Qi(e,"a")?{a:Et(e.a,t)}:{})},Em=function(e,t){return sn({h:Et(e.h,t),s:Et(e.s,t),l:Et(e.l,t)},Qi(e,"a")?{a:Et(e.a,t)}:{})},w6e=function(e,t){return{c:Et(e.c,t),m:Et(e.m,t),y:Et(e.y,t),k:Et(e.k,t)}},kc=function(e,t,n,r,i,o){var s=i(mp(e,t),r);return n?o(s):s},jp=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=bo(c.a),S=(bo(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:Et(c.r+p*b),g:Et(c.g+g*b),b:Et(c.b+v*b),a:Et(y+S*b)}})}(mp(e),mp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},_6e=function(){function e(t,n){n===void 0&&(n=6),this.rgb=mp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},Li(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},zz(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=_g(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=_te(this.rgb.r,this.rgb.g,this.rgb.b)},e.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},e.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},e.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},e.prototype.setDecimals=function(t){return this._decimals=t,this},e.prototype.setH=function(t){return this.hsl.h=ob(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=La(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=La(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=La(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=La(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=La(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=La(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(e.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"H",{get:function(){return Et(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return Et(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return Et(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return Et(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return Et(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return Et(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return Et(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return Et(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return Et(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return Et(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return Et(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=zs(t);return kc(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=zs(t);return kc(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=zs(t);return kc(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),jp(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),Up.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),Up.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=Oo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Up.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),a9(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),a9(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=qu.COMPLEMENTARY),r===void 0&&(r=Oo.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[qu.ANALOGOUS]=zp.buildHarmony(s,h6e,c,l),d[qu.COMPLEMENTARY]=zp.buildHarmony(s,p6e,c,l),d[qu.SPLIT_COMPLEMENTARY]=zp.buildHarmony(s,m6e,c,l),d[qu.TRIADIC]=zp.buildHarmony(s,g6e,c,l),d[qu.TETRADIC]=zp.buildHarmony(s,v6e,c,l),d[qu.SQUARE]=zp.buildHarmony(s,y6e,c,l),d)[o]}(n,t,i,r)},e}();const S6e={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1},{ceil:Fi,PI:E6e}=Math,Yb=(e,t)=>new _6e(e).setA(t??S6e.alpha).RGBA,C6e=(e,t)=>Yb(e,t);function Ad(e,t){return{width:e.width*t.scale.x,height:e.height*t.scale.y,x:e.x*t.scale.x+t.x,y:e.y*t.scale.y+t.y}}const T6e={draw(e,t,n){if(e.text){const r=Ad(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Ad(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=Yb(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:e.x,right:e.x,top:e.y,bottom:e.y}}},I6e={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Ad(e,n);t.fillStyle=Yb(e.fill,e.alpha),t.fillRect(Fi(r),Fi(i),Fi(o)||1,Fi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},R6e={draw(e,t,n){t.fillStyle=Yb(e.fill,e.alpha),t.beginPath();const r=Ad({...e,width:e.radius,height:e.radius},n);t.ellipse(Fi(r.x),Fi(r.y),Fi(r.width),Fi(r.height),0,0,2*E6e),t.fill()},test(e){return{left:e.x-e.radius,right:e.x+e.radius,top:e.y-e.radius,bottom:e.y+e.radius}}},A6e={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=Yb(e.fill,e.alpha);const{x:o,y:s}=Ad({...r,width:0,height:0},n);t.moveTo(Fi(o),Fi(s));for(const l of i){const{x:c,y:d}=Ad({...l,width:0,height:0},n);t.lineTo(Fi(c),Fi(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Jt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Jt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Jt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Jt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},P6e={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=C6e(e.fill,e.alpha);const{x:o,y:s,width:l}=Ad({...r,width:e.lineWidth,height:0},n);t.lineWidth=Fi(l),t.moveTo(Fi(o),Fi(s));for(const c of i){const{x:d,y:f}=Ad({...c,width:0,height:0},n);t.lineTo(Fi(d),Fi(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Jt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Jt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Jt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Jt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},O6e={text:T6e,path:P6e,rect:I6e,polygon:A6e,circle:R6e},{log2:M6e,max:k6e}=Math,l9=e=>Jt.floor(M6e(e+1));function u9({right:e,left:t,bottom:n,top:r},i){const o=k6e(l9(e-t),l9(n-r))-i,s=2**o,l={left:Jt.floor(t/s),right:Jt.ceil((e+1)/s),top:Jt.floor(r/s),bottom:Jt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Z4e({x:Jt.range(l.left,l.right+1),y:Jt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}})}}const D6e=""+new URL("D2Renderer.worker-2ac84d00.js",import.meta.url).href;class L6e extends Worker{constructor(){super(D6e,{type:"module"})}call(t,n,r=[]){return this.postMessage({action:t,payload:n},r)}on(t,n){const r=i=>{const{action:o,payload:s}=i.data;o===t&&n(s)};return this.addEventListener("message",r),()=>this.removeEventListener("message",r)}}function B6e(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:c9,min:d9}=Math,Ste=class Ete extends Tp{constructor(t,n){super(t),this.bounds=n,this.age=Ete.age++}};Ste.age=0;let N6e=Ste;var Fs,Br,Xc,Qu,Yi,xl,qc,Yc,oC,sC,Cte,aC,Tte,Wm,db,lC,uC,Ite,cC,Rte,dC,Ate,fC,Pte,fb,c3,hb,d3,hC,Ote,pb,f3,pC,Mte,mC,kte;class $6e extends a6e{constructor(){super(...arguments);lr(this,sC);lr(this,aC);lr(this,uC);lr(this,cC);lr(this,dC);lr(this,fC);lr(this,fb);lr(this,hb);lr(this,hC);lr(this,pb);lr(this,pC);lr(this,mC);lr(this,Fs,void 0);lr(this,Br,void 0);lr(this,Xc,void 0);lr(this,Qu,void 0);lr(this,Yi,L7);lr(this,xl,[]);lr(this,qc,new J4e(16));lr(this,Yc,void 0);lr(this,oC,0);lr(this,Wm,Jt.once(()=>Jt.debounce(()=>Wi(this,fb,c3).call(this),rt(this,Yi).debounceInterval)));lr(this,db,Jt.once(()=>Jt.throttle(()=>Wi(this,hb,d3).call(this),rt(this,Yi).refreshInterval)));lr(this,lC,Jt.once(()=>Jt.throttle(n=>Wi(this,hC,Ote).call(this,n),rt(this,Yi).refreshInterval)))}getInstance(){return{app:rt(this,Fs),viewport:rt(this,Br)}}fitCamera(){var r,i,o,s;const n=Jt.values(rt(this,qc).all()).flat();if(n.length){const l=Jt.reduce(n,(c,d)=>({top:d9(c.top,d.top),left:d9(c.top,d.left),bottom:c9(c.bottom,d.bottom),right:c9(c.right,d.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=rt(this,Br))==null?void 0:r.animate)==null||s.call(r,{position:new Mt((l.left+l.right)/2,(l.top+l.bottom)/2),scale:((o=(i=rt(this,Br))==null?void 0:i.findFit)==null?void 0:o.call(i,l.right-l.left,l.bottom-l.top))*.8,ease:"easeOutExpo",time:rt(this,Yi).animationDuration*1.5,callbackOnComplete:()=>rt(this,Wm).call(this)()})}}initialCamera(){var n,r;(r=(n=rt(this,Br))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:rt(this,Yi).animationDuration*1.5,callbackOnComplete:()=>rt(this,Wm).call(this)()})}getView(){var n;return(n=rt(this,Fs))==null?void 0:n.view}setup(n){const r={...L7,...n};Wi(this,aC,Tte).call(this,r),this.setOptions(r),Wi(this,cC,Rte).call(this,r)}destroy(){Jt.map(rt(this,xl),n=>n.terminate()),rt(this,Fs).destroy()}add(n){const r=bLe(),i=Jt.map(n,({component:o,meta:s})=>({...O6e[o.$].test(o),component:o,meta:s,index:Wi(this,sC,Cte).call(this)}));return rt(this,qc).load(i),Jt.map(rt(this,xl),o=>o.call("add",[Jt.map(n,"component"),r])),()=>{for(const o of i)rt(this,qc).remove(o);Jt.map(rt(this,xl),o=>o.call("remove",[r]))}}setOptions(n){const r={...rt(this,Yi),...n};Wi(this,dC,Ate).call(this,r),zu(this,Yi,r),Wi(this,fb,c3).call(this),Wi(this,hb,d3).call(this)}}Fs=new WeakMap,Br=new WeakMap,Xc=new WeakMap,Qu=new WeakMap,Yi=new WeakMap,xl=new WeakMap,qc=new WeakMap,Yc=new WeakMap,oC=new WeakMap,sC=new WeakSet,Cte=function(){return a6(this,oC)._++},aC=new WeakSet,Tte=function(n){zu(this,Fs,new Lz({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height})),zu(this,Br,new h3e({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:rt(this,Fs).renderer.events,passiveWheel:!1})),rt(this,Br).on("clicked",r=>{const{x:i,y:o}=r.world,s=rt(this,qc).search({minX:i,minY:o,maxX:i+Number.MIN_VALUE,maxY:o+Number.MIN_VALUE});this.emit("click",r.event,{world:r.world,components:s})}),rt(this,Fs).stage.addChild(rt(this,Br)),rt(this,Br).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-4}),rt(this,Br).on("moved",()=>{rt(this,Wm).call(this)(),rt(this,db).call(this)()}),rt(this,Br).on("mousemove",r=>rt(this,lC).call(this)(r)),zu(this,Xc,new Ho),rt(this,Br).addChild(rt(this,Xc)),zu(this,Qu,new wg),rt(this,Br).addChild(rt(this,Qu)),zu(this,Yc,new wg),rt(this,Br).addChild(rt(this,Yc)),Wi(this,uC,Ite).call(this)},Wm=new WeakMap,db=new WeakMap,lC=new WeakMap,uC=new WeakSet,Ite=function(){const{tileResolution:n,dynamicResolution:r}=rt(this,Yi),{dtMax:i,dtMin:o,increment:s,intervalMs:l,maxScale:c,minScale:d}=r,f=Jt.floor(di.targetFPMS*l);let h=0,p=0,g=1;rt(this,Fs).ticker.add(v=>{if(!(h%f)){const y=p/f;g=Jt.clamp(y>=i?g+s:y<=o?g-s:g,d,c),Jt.map(rt(this,xl),S=>{S.call("setTileResolution",[{width:Jt.ceil(n.width/g),height:Jt.ceil(n.height/g)}])}),p=0}p+=v,h++})},cC=new WeakSet,Rte=function(n){Jt.map(rt(this,xl),r=>r.terminate()),zu(this,xl,Jt.times(n.workerCount,r=>{const i=new L6e;return i.on("update",o=>Wi(this,fC,Pte).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},dC=new WeakSet,Ate=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=rt(this,Fs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=rt(this,Br))==null||c.resize(r,i)},fC=new WeakSet,Pte=function({bounds:n,bitmap:r}){const i=ft.from(r);Wi(this,pC,Mte).call(this,i,n)},fb=new WeakSet,c3=function(){const{top:n,bottom:r,left:i,right:o}=rt(this,Br);Jt.map(rt(this,xl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},hb=new WeakSet,d3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=rt(this,Yi),{tiles:i}=u9(rt(this,Br),n),o=Wi(this,pb,f3).call(this);(s=rt(this,Qu))==null||s.clear(),(l=rt(this,Qu))==null||l.lineStyle(1*o,r,.5),(c=rt(this,Qu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Jt.find((d=rt(this,Xc))==null?void 0:d.children,g=>Jt.isEqual(g.bounds,h))||(f=rt(this,Qu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},hC=new WeakSet,Ote=function(n){var c;const{accentColor:r}=rt(this,Yi),i=Wi(this,pb,f3).call(this),{x:o,y:s}=rt(this,Br).toWorld(n.globalX,n.globalY),l=rt(this,qc).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});rt(this,Yc).clear(),rt(this,Yc).lineStyle(2*i,r,1);for(const d of l)(c=rt(this,Yc))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},pb=new WeakSet,f3=function(){const{right:n,left:r}=rt(this,Br),{width:i}=rt(this,Yi).screenSize;return(n-r)/i},pC=new WeakSet,Mte=async function(n,r){var s;const{tileSubdivision:i}=rt(this,Yi),{tiles:o}=u9(rt(this,Br),i);if(Jt.find(o,l=>Jt.isEqual(l.bounds,r))){const l={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},c=new N6e(n,r);(s=rt(this,Xc))==null||s.addChild(c).setTransform(r.left,r.top,l.x,l.y),rt(this,db).call(this)(),await Wi(this,mC,kte).call(this,c);for(const d of rt(this,Xc).children)B6e(d.bounds,r)&&d.age{const o=s=>{n.alpha+=s/di.targetFPMS/rt(this,Yi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})};const F6e=j4e($6e,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),z6e={"d2-renderer":F6e};var U6e=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Uz={},j6e=Object.prototype.hasOwnProperty,H6e;function f9(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function h9(e){try{return encodeURIComponent(e)}catch{return null}}function W6e(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=f9(r[1]),o=f9(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function G6e(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(j6e.call(e,i)){if(r=e[i],!r&&(r===null||r===H6e||isNaN(r))&&(r=""),i=h9(i),r=h9(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Uz.stringify=G6e;Uz.parse=W6e;var Dte=U6e,yI=Uz,V6e=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Lte=/[\n\r\t]/g,X6e=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Bte=/:\d+$/,q6e=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Y6e=/^[a-zA-Z]:/;function jz(e){return(e||"").toString().replace(V6e,"")}var h3=[["#","hash"],["?","query"],function(t,n){return $l(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p9={hash:1,query:1};function Nte(e){var t;typeof window<"u"?t=window:typeof Xt<"u"?t=Xt:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},i=typeof e,o;if(e.protocol==="blob:")r=new Hl(unescape(e.pathname),{});else if(i==="string"){r=new Hl(e,{});for(o in p9)delete r[o]}else if(i==="object"){for(o in e)o in p9||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=X6e.test(e.href))}return r}function $l(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function $te(e,t){e=jz(e),e=e.replace(Lte,""),t=t||{};var n=q6e.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):$l(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&$l(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||$l(r),slashesCount:s,rest:l}}function K6e(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),s++):s&&(r===0&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function Hl(e,t,n){if(e=jz(e),e=e.replace(Lte,""),!(this instanceof Hl))return new Hl(e,t,n);var r,i,o,s,l,c,d=h3.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=yI.parse),t=Nte(t),i=$te(e||"",t),r=!i.protocol&&!i.slashes,h.slashes=i.slashes||r&&t.slashes,h.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||Y6e.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!$l(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new zte[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(n)},[e,t]),C.jsx(C.Fragment,{})}const nUe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function rUe({value:e,onValueChange:t}){const[n]=eI(),r=ie.find(n,{key:e.key});function i(s){t==null||t(c4(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(wn,{alignItems:"center",py:.5,children:[C.jsx(AZ,{sx:{color:nUe[o]}}),C.jsx(Yr,{}),C.jsxs(Pt,{flex:1,children:[C.jsx(qt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ie.startCase(o)}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:r?C.jsxs(C.Fragment,{children:[C.jsx("span",{children:r.renderer.meta.description}),C.jsx("br",{}),C.jsxs("span",{children:["Contributes: ",ie.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx($d,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(Pt,{children:C.jsx(ag,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(ez,{trigger:s=>C.jsx(wm,{icon:C.jsx(s4,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(Z4,{children:"Edit Renderer"})},children:C.jsxs(Pt,{p:2.5,children:[C.jsx(Cb,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(qx,{placeholder:"Renderer Type",items:ie.entries(zte).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Hz={},xI={},Kb={};(function(e){var t=Xt&&Xt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(Kb);var Jb={};Object.defineProperty(Jb,"__esModule",{value:!0});Jb.DefaultErrorCode=void 0;Jb.DefaultErrorCode=0;var m9=Xt&&Xt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},g9=Xt&&Xt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const _Ue={trace:async(e,t)=>{switch(e){case"about":return{name:"Search Trace",description:"Provides JSON Search Trace Support",version:"1.0.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/algorithms":return[{id:"identity",name:"Unknown",hidden:!0}];case"solve/pathfinding":{const{parameters:n}=t;try{return JSON.parse((n==null?void 0:n.content)??"")}catch{return{}}}}}};class SUe{constructor(t){Pp(this,"handler");this.options=t;const{hostname:n}=Fte(t.url);this.handler=_Ue[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const Wl=Object.create(null);Wl.open="0";Wl.close="1";Wl.ping="2";Wl.pong="3";Wl.message="4";Wl.upgrade="5";Wl.noop="6";const bS=Object.create(null);Object.keys(Wl).forEach(e=>{bS[Wl[e]]=e});const p3={type:"error",data:"parser error"},jte=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Hte=typeof ArrayBuffer=="function",Wte=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wz=({type:e,data:t},n,r)=>jte&&t instanceof Blob?n?r(t):b9(t,r):Hte&&(t instanceof ArrayBuffer||Wte(t))?n?r(t):b9(new Blob([t]),r):r(Wl[e]+(t||"")),b9=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w9(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pN;function EUe(e,t){if(jte&&e.data instanceof Blob)return e.data.arrayBuffer().then(w9).then(t);if(Hte&&(e.data instanceof ArrayBuffer||Wte(e.data)))return t(w9(e.data));Wz(e,!1,n=>{pN||(pN=new TextEncoder),t(pN.encode(n))})}const _9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Px=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<_9.length;e++)Px[_9.charCodeAt(e)]=e;const CUe=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},TUe=typeof ArrayBuffer=="function",Gz=(e,t)=>{if(typeof e!="string")return{type:"message",data:Gte(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:IUe(e.substring(1),t)}:bS[n]?e.length>1?{type:bS[n],data:e.substring(1)}:{type:bS[n]}:p3},IUe=(e,t)=>{if(TUe){const n=CUe(e);return Gte(n,t)}else return{base64:!0,data:e}},Gte=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Vte=String.fromCharCode(30),RUe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Wz(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Vte))})})},AUe=(e,t)=>{const n=e.split(Vte),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mN;function M_(e){return e.reduce((t,n)=>t+n.length,0)}function k_(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(p3);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(M_(n)e){l.enqueue(p3);break}}}})}const Xte=4;function Kr(e){if(e)return MUe(e)}function MUe(e){for(var t in Kr.prototype)e[t]=Kr.prototype[t];return e}Kr.prototype.on=Kr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Kr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Kr.prototype.off=Kr.prototype.removeListener=Kr.prototype.removeAllListeners=Kr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function qte(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const kUe=Gs.setTimeout,DUe=Gs.clearTimeout;function _I(e,t){t.useNativeTimers?(e.setTimeoutFn=kUe.bind(Gs),e.clearTimeoutFn=DUe.bind(Gs)):(e.setTimeoutFn=Gs.setTimeout.bind(Gs),e.clearTimeoutFn=Gs.clearTimeout.bind(Gs))}const LUe=1.33;function BUe(e){return typeof e=="string"?NUe(e):Math.ceil((e.byteLength||e.size)*LUe)}function NUe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function $Ue(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FUe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Kte(){const e=C9(+new Date);return e!==E9?(S9=0,E9=e):e+"."+C9(S9++)}for(;D_{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};AUe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,RUe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Kte()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Fl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Fl extends Kr{constructor(t,n){super(),_I(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=qte(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Qte(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Fl.requestsCount++,Fl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=HUe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Fl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Fl.requestsCount=0;Fl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",T9);else if(typeof addEventListener=="function"){const e="onpagehide"in Gs?"pagehide":"unload";addEventListener(e,T9,!1)}}function T9(){for(let e in Fl.requests)Fl.requests.hasOwnProperty(e)&&Fl.requests[e].abort()}const Xz=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),L_=Gs.WebSocket||Gs.MozWebSocket,I9=!0,VUe="arraybuffer",R9=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class XUe extends Vz{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=R9?{}:qte(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=I9&&!R9?n?new L_(t,n):new L_(t):new L_(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{I9&&this.ws.send(o)}catch{}i&&Xz(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Kte()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!L_}}class qUe extends Vz{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=OUe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=PUe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Xz(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const YUe={websocket:XUe,webtransport:qUe,polling:GUe},KUe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,JUe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function g3(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=KUe.exec(e||""),o={},s=14;for(;s--;)o[JUe[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=QUe(o,o.path),o.queryKey=ZUe(o,o.query),o}function QUe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZUe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Zte=class tm extends Kr{constructor(t,n={}){super(),this.binaryType=VUe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=g3(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=g3(n.host).host),_I(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FUe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Xte,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new YUe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&tm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;tm.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;tm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",tm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){tm.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ene=Object.prototype.toString,r8e=typeof Blob=="function"||typeof Blob<"u"&&ene.call(Blob)==="[object BlobConstructor]",i8e=typeof File=="function"||typeof File<"u"&&ene.call(File)==="[object FileConstructor]";function qz(e){return t8e&&(e instanceof ArrayBuffer||n8e(e))||r8e&&e instanceof Blob||i8e&&e instanceof File}function wS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Kg.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Kg.prototype.reset=function(){this.attempts=0};Kg.prototype.setMin=function(e){this.ms=e};Kg.prototype.setMax=function(e){this.max=e};Kg.prototype.setJitter=function(e){this.jitter=e};class x3 extends Kr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_I(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Kg({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||d8e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zte(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=za(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=za(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(za(t,"ping",this.onping.bind(this)),za(t,"data",this.ondata.bind(this)),za(t,"error",this.onerror.bind(this)),za(t,"close",this.onclose.bind(this)),za(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Xz(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new tne(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const cx={};function _S(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e8e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=cx[i]&&o in cx[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new x3(r,t):(cx[i]||(cx[i]=new x3(r,t)),c=cx[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(_S,{Manager:x3,Socket:tne,io:_S,connect:_S});class h8e{constructor(t){Pp(this,"rpc");Pp(this,"socket");this.options=t,this.socket=_S(t.url),this.rpc=new Hz.JSONRPCClient(async n=>{const r=i=>{i.id===n.id&&(this.socket.off("response",r),this.rpc.receive(i))};this.socket.emit("request",n),this.socket.on("response",r)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(t,n){return await this.rpc.request(t,n)}}const Kz={socketio:{name:"socket.io",constructor:h8e},ipc:{name:"Web Worker",constructor:wUe},native:{name:"Internal",constructor:SUe}};function p8e(e){return Kz[e].constructor}const nne=ie.first(ie.keys(Kz));function m8e(){const[{renderer:e},t]=Ec();return C.jsx(C.Fragment,{children:C.jsx(GT,{editor:n=>C.jsx(rUe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({renderer:n}),300),addItemLabel:"Add Renderer",create:()=>({transport:nne,url:"",disabled:!0}),extras:C.jsx(pc,{startIcon:C.jsx(HY,{}),sx:{ml:2},onClick:()=>t({renderer:$K}),children:"Reset to Defaults"})})})}function g8e(e){const[{connections:t}]=VT(),n=yz(),[{remote:r}]=Ec(),i=ie.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const v8e={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function y8e({value:e,onValueChange:t}){const n=VDe(e.url),r=g8e(e.url);function i(o){t==null||t(c4(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(wn,{alignItems:"center",py:.5,children:[C.jsx(AZ,{sx:{color:v8e[r]}}),C.jsx(Yr,{}),C.jsxs(Pt,{flex:1,children:[C.jsx(qt,{children:n?`${n.name} ${n.version}`:ie.startCase(r)}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx($d,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(Pt,{children:C.jsx(ag,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(ez,{trigger:o=>C.jsx(wm,{icon:C.jsx(s4,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(Z4,{children:"Edit Connection"})},children:C.jsxs(Pt,{p:2.5,children:[C.jsx(Cb,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(qx,{placeholder:"Connection Type",items:ie.entries(Kz).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function x8e(){const[{remote:e},t]=Ec();return C.jsx(C.Fragment,{children:C.jsx(GT,{editor:n=>C.jsx(y8e,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({remote:n}),300),addItemLabel:"Add Solver",create:()=>({transport:nne,url:"",disabled:!0}),extras:C.jsx(pc,{startIcon:C.jsx(HY,{}),sx:{ml:2},onClick:()=>t({remote:NK}),children:"Reset to Defaults"})})})}const P9=e=>`${e}x`;function b8e(){const{controls:e,onChange:t,state:n}=zd(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Ec(),[c,d]=O.useState("general");function f(p){return C.jsx(qt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(qt,{variant:"body1",children:p})}return C.jsx(zK,{value:c,children:C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Options,{children:C.jsxs(WK,{onChange:(p,g)=>d(g),children:[C.jsx(mm,{label:"General",value:"general"}),C.jsx(mm,{label:"Connections",value:"connections"}),C.jsx(mm,{label:"Renderers",value:"renderers"}),C.jsx(mm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,children:C.jsx(kT,{y:!0,children:C.jsxs(wn,{vertical:!0,pt:6,children:[C.jsx(xm,{value:"general",children:C.jsxs(Pt,{children:[f("Playback"),C.jsxs(wn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(Yr,{flex:1}),C.jsx(Qve,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*Xp,label:P9(p)})),step:.25*Xp,min:.25*Xp,max:5*Xp,valueLabelFormat:p=>P9(p/Xp),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l({playbackRate:g})})]}),f("UI"),C.jsxs(wn,{alignItems:"center",children:[h("Acrylic"),C.jsx(Yr,{flex:1}),C.jsx(ag,{defaultChecked:!!i,onChange:(p,g)=>l({acrylic:g})})]}),C.jsxs(wn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(Yr,{flex:1}),C.jsx(ag,{defaultChecked:o==="dark",onChange:(p,g)=>l({theme:g?"dark":"light"})})]}),C.jsxs(wn,{alignItems:"center",children:[h("Accent"),C.jsx(Yr,{flex:1}),C.jsx(Ss,{value:s,items:ie.map(ie.keys(Sbe),p=>({id:p,name:ie.startCase(p)})),showArrow:!0,onChange:p=>l({accentColor:p})})]})]})}),C.jsx(xm,{value:"connections",children:C.jsxs(Pt,{children:[f("Solvers"),C.jsx(x8e,{})]})}),C.jsx(xm,{value:"renderers",children:C.jsxs(Pt,{children:[f("Renderers"),C.jsx(m8e,{})]})}),C.jsx(xm,{value:"map-parsers",children:C.jsxs(Pt,{children:[f("Map Parsers"),C.jsx(w8e,{})]})})]})})})}),C.jsx(Ln.Extras,{children:e})]})})}function w8e(){return C.jsx(sg,{children:ie.keys(vz).map(e=>C.jsx(Vx,{children:C.jsx(Dl,{primary:e,secondary:"Internal"})},e))})}function _8e(){return O.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function S8e(e){var f,h;const t=_c(),[{playback:n,step:r=0},i]=dp(),{events:o}=IZ((h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.content),s=!!o,l=n==="playing",[c,d]=[0,((o==null?void 0:o.length)??1)-1];return O.useMemo(()=>{const p={start:c,end:d,step:r,canPlay:s&&!l&&r0},g=y=>ie.clamp(r+y,c,d);return{playing:n==="playing",...p,...{play:()=>{t("Playback started"),i({playback:"playing",step:g(1)})},pause:(y=0)=>{t("Playback paused"),i({playback:"paused",step:g(y)})},stop:()=>i({step:c,playback:"paused"}),stepForward:()=>i({step:g(1)}),stepBackward:()=>i({step:g(-1)}),tick:(y=1)=>i({playback:"playing",step:g(y)})}}},[d,n,l,s,i,c,r])}function E8e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function C8e({layer:e}){const{step:t,tick:n,end:r,playing:i,canPause:o,canPlay:s,canStepBackward:l,canStepForward:c,canStop:d,pause:f,play:h,stepBackward:p,stepForward:g,stop:v}=S8e(e);yxe();const y=_c(),[{playbackRate:S=1}]=Ec(),_=_8e(),b=O.useCallback((x,E)=>C.jsx(a4,{primary:x,secondary:`Step ${t+E}`}),[t]);return O.useEffect(()=>{if(i)return t{for(const x of ie.range(S)){const E=_(t+x);if(E.result||E.error)return{...E,offset:x}}return{result:"",offset:0,error:void 0}},({result:x,offset:E,error:I})=>{I?(y(`${ie.trimEnd(I,".")}.`,`${E}`),f()):x?(y(`Breakpoint hit: ${x}.`,`${E}`),f(E)):n(S)}):f()},[b,i,r,t,f,n,y,_,S]),C.jsxs(C.Fragment,{children:[C.jsx(wm,{label:"step-backward",icon:C.jsx(Gye,{}),onClick:p,disabled:!l}),C.jsx(wm,{...i?{label:"pause",icon:C.jsx(Fye,{}),onClick:()=>f(),disabled:!o}:{label:"play",icon:C.jsx(Uye,{}),onClick:()=>h(),disabled:!s,color:"primary"}}),C.jsx(wm,{label:"step-forward",icon:C.jsx(Wye,{}),onClick:g,disabled:!c}),C.jsx(wm,{label:"stop",icon:C.jsx(Vye,{}),onClick:v,disabled:!d})]})}const SI=0,Wd=1,Jg=2,rne=4;function ine(e,t){return n=>e(t(n))}function T8e(e,t){return t(e)}function one(e,t){return n=>e(t,n)}function O9(e,t){return()=>e(t)}function EI(e,t){return t(e),e}function gr(...e){return e}function I8e(e){e()}function M9(e){return()=>e}function R8e(...e){return()=>{e.map(I8e)}}function Jz(e){return e!==void 0}function Qg(){}function Un(e,t){return e(Wd,t)}function en(e,t){e(SI,t)}function Qz(e){e(Jg)}function bs(e){return e(rne)}function wt(e,t){return Un(e,one(t,SI))}function yc(e,t){const n=e(Wd,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case Jg:e.splice(0,e.length);return;case Wd:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case SI:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Ze(e){let t=e;const n=yn();return(r,i)=>{switch(r){case Wd:i(t);break;case SI:t=i;break;case rne:return t}return n(r,i)}}function A8e(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case Wd:return o?n===o?void 0:(r(),n=o,t=Un(e,o),t):(r(),Qg);case Jg:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Is(e){return EI(yn(),t=>wt(e,t))}function _o(e,t){return EI(Ze(t),n=>wt(e,n))}function P8e(...e){return t=>e.reduceRight(T8e,t)}function Oe(e,...t){const n=P8e(...t);return(r,i)=>{switch(r){case Wd:return Un(e,n(i));case Jg:Qz(e);return}}}function sne(e,t){return e===t}function hr(e=sne){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ut(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>ine(t,e)}function Ju(e){return t=>()=>t(e)}function Rl(e,t){return n=>r=>n(t=e(t,r))}function Sg(e){return t=>n=>{e>0?e--:t(n)}}function id(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function k9(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function D9(...e){return function(t,n){switch(t){case Wd:return R8e(...e.map(r=>Un(r,n)));case Jg:return;default:throw new Error(`unrecognized action ${t}`)}}}function zt(e,t=sne){return Oe(e,hr(t))}function vi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case Wd:return r===i&&s(n),Un(t,s);case Jg:return Qz(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:O8e(),constructor:e,dependencies:t,singleton:n}}const O8e=()=>Symbol();function M8e(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function k8e(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=A8e(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>EI(M8e(e),I=>c(I,b))),[E]=de.useState(O9(f,x));return B_(()=>{for(const I of s)I in b&&Un(E[I],b[I]);return()=>{Object.values(E).map(Qz)}},[b,E,x]),B_(()=>{c(x,b)}),de.useImperativeHandle(S,M9(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,k8e([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(one(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState(O9(bs,_));return B_(()=>Un(_,E=>{E!==b&&x(M9(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];B_(()=>Un(b,S),[S,b])}}}const D8e=typeof document<"u"?de.useLayoutEffect:de.useEffect,L8e=D8e;var Rs=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Rs||{});const B8e={0:"debug",1:"log",2:"warn",3:"error"},N8e=()=>typeof globalThis>"u"?window:globalThis,Gd=$n(()=>{const e=Ze(3);return{log:Ze((n,r,i=1)=>{var o;const s=(o=N8e().VIRTUOSO_LOG_LEVEL)!=null?o:bs(e);i>=s&&console[B8e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Zz(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Rp(e,t=!0){return Zz(e,t).callbackRef}function $8e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=F8e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(z8e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return Zz(l,n)}function F8e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():pm.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Pd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Pd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),lne(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Io=$n(()=>{const e=yn(),t=yn(),n=Ze(0),r=yn(),i=Ze(0),o=yn(),s=yn(),l=Ze(0),c=Ze(0),d=Ze(0),f=Ze(0),h=yn(),p=yn(),g=Ze(!1);return wt(Oe(e,lt(({scrollTop:v})=>v)),t),wt(Oe(e,lt(({scrollHeight:v})=>v)),s),wt(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),sb={lvl:0};function cne(e,t,n,r=sb,i=sb){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===sb}function Hm(){return sb}function b3(e,t){if(Kn(e))return sb;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=dne(r);return SS(ui(e,{k:o,v:s,l:fne(r)}))}}else return tt&&(l=l.concat(w3(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(w3(s,t,n))),l}function Fh(e){return Kn(e)?[]:[...Fh(e.l),{k:e.k,v:e.v},...Fh(e.r)]}function dne(e){return Kn(e.r)?[e.k,e.v]:dne(e.r)}function fne(e){return Kn(e.r)?e.l:SS(ui(e,{r:fne(e.r)}))}function ui(e,t){return cne(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function gN(e){return Kn(e)||e.lvl>e.r.lvl}function L9(e){return _3(pne(e))}function SS(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(gN(t))return pne(ui(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ui(t.r,{l:ui(t,{r:t.r.l}),r:ui(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(gN(e))return _3(ui(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=gN(i)?n.lvl-1:n.lvl;return ui(i,{l:ui(e,{r:i.l,lvl:r-1}),r:_3(ui(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function CI(e,t,n){if(Kn(e))return[];const r=sl(e,t)[0];return U8e(w3(e,r,n))}function hne(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let s=1;s({index:t,value:n}))}function _3(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ui(t,{l:ui(e,{r:t.l}),lvl:n+1}):e}function pne(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ui(t,{r:ui(e,{l:t.r})}):e}function tC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function mne(e,t,n){return e[tC(e,t,n)]}function j8e(e,t,n,r){const i=tC(e,t,r),o=tC(e,n,r,i);return e.slice(i,o+1)}const e6=$n(()=>({recalcInProgress:Ze(!1)}),[],{singleton:!0});function H8e(e){const{size:t,startIndex:n,endIndex:r}=e;return i=>i.start===n&&(i.end===r||i.end===1/0)&&i.value===t}function B9(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=b3(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=vs(e,s+1,p));d&&(e=vs(e,o,i))}return[e,n]}function G8e(){return{offsetTree:[],sizeTree:Hm(),groupOffsetTree:Hm(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function t6({index:e},t){return t===e?0:t0&&(t=Math.max(t,mne(e,r,t6).offset)),hne(j8e(e,t,n,V8e),X8e)}function S3(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=tC(i,t-1,t6),l=i[c].offset;const f=sl(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===sl(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of CI(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function Y8e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Rs.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>vs(vs(v,y,p),y+1,g),s)}else[s,l]=W8e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=S3(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>vs(p,g,lb(g,c,i)),Hm()),groupIndices:n}}function lb(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=mne(t,e,t6),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function K8e(e){return typeof e.groupIndex<"u"}function gne(e,t,n){if(K8e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=vne(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function vne(e,t){if(!TI(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function TI(e){return!Kn(e.groupOffsetTree)}function J8e(e){return Fh(e).map(({k:t,v:n},r,i)=>{const o=i[r+1],s=o?o.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const Q8e={offsetHeight:"height",offsetWidth:"width"},Yl=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=_o(r,0),o=yn(),s=yn(),l=Ze(0),c=Ze([]),d=Ze(void 0),f=Ze(void 0),h=Ze((I,A)=>Pd(I,Q8e[A])),p=Ze(void 0),g=Ze(0),v=G8e(),y=_o(Oe(n,an(c,e,g),Rl(Y8e,v),hr()),v),S=_o(Oe(c,hr(),Rl((I,A)=>({prev:I.current,current:A}),{prev:[],current:[]}),lt(({prev:I})=>I)),[]);wt(Oe(c,Ut(I=>I.length>0),an(y,g),lt(([I,A,R])=>{const M=I.reduce((L,B,H)=>vs(L,B,lb(B,A.offsetTree,R)||H),Hm());return{...A,groupIndices:I,groupOffsetTree:M}})),y),wt(Oe(r,an(y),Ut(([I,{lastIndex:A}])=>I[{startIndex:I,endIndex:A,size:R}])),n),wt(d,f);const _=_o(Oe(d,lt(I=>I===void 0)),!0);wt(Oe(f,Ut(I=>I!==void 0&&Kn(bs(y).sizeTree)),lt(I=>[{startIndex:0,endIndex:0,size:I}])),n);const b=Is(Oe(n,an(y),Rl(({sizes:I},[A,R])=>({changed:R!==I,sizes:R}),{changed:!1,sizes:v}),lt(I=>I.changed)));Un(Oe(l,Rl((I,A)=>({diff:I.prev-A,prev:A}),{diff:0,prev:0}),lt(I=>I.diff)),I=>{const{groupIndices:A}=bs(y);if(I>0)en(t,!0),en(o,I+B9(I,A));else if(I<0){const R=bs(S);R.length>0&&(I-=B9(-I,R)),en(s,I)}}),Un(Oe(l,an(e)),([I,A])=>{I<0&&A("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Rs.ERROR)});const x=Is(o);wt(Oe(o,an(y),lt(([I,A])=>{const R=A.groupIndices.length>0,M=[],L=A.lastSize;if(R){const B=ab(A.sizeTree,0);let H=0,G=0;for(;H{let W=F.ranges;return F.prevSize!==0&&(W=[...F.ranges,{startIndex:F.prevIndex,endIndex:z+I-1,size:F.prevSize}]),{ranges:W,prevIndex:z+I,prevSize:V}},{ranges:M,prevIndex:I,prevSize:0}).ranges}return Fh(A.sizeTree).reduce((B,{k:H,v:G})=>({ranges:[...B.ranges,{startIndex:B.prevIndex,endIndex:H+I-1,size:B.prevSize}],prevIndex:H+I,prevSize:G}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Is(Oe(s,an(y,g),lt(([I,{offsetTree:A},R])=>{const M=-I;return lb(M,A,R)})));return wt(Oe(s,an(y,g),lt(([I,A,R])=>{if(A.groupIndices.length>0){if(Kn(A.sizeTree))return A;let L=Hm();const B=bs(S);let H=0,G=0,U=0;for(;H<-I;){U=B[G];const F=B[G+1]-U-1;G++,H+=F+1}if(L=Fh(A.sizeTree).reduce((F,{k:z,v:V})=>vs(F,Math.max(0,z+I),V),L),H!==-I){const F=ab(A.sizeTree,U);L=vs(L,0,F);const z=sl(A.sizeTree,-I+1)[1];L=vs(L,1,z)}return{...A,sizeTree:L,...S3(A.offsetTree,0,L,R)}}else{const L=Fh(A.sizeTree).reduce((B,{k:H,v:G})=>vs(B,Math.max(0,H+I),G),Hm());return{...A,sizeTree:L,...S3(A.offsetTree,0,L,R)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(Gd,e6),{singleton:!0}),Z8e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function yne(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Z8e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Qb=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=Ze(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return wt(Oe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,I,A,R,M,L,B],H,G,U])=>{const D=yne(x),{align:F,behavior:z,offset:V}=D,W=A-1,K=gne(D,E,W);let Y=lb(K,E.offsetTree,H)+M;F==="end"?(Y+=G+sl(E.sizeTree,K)[1]-I+U,K===W&&(Y+=L)):F==="center"?Y+=(G+sl(E.sizeTree,K)[1]-I+U)/2:Y-=R,V&&(Y+=V);const Q=re=>{b(),re?(B("retrying to scroll to",{location:x},Rs.DEBUG),en(g,x)):B("list did not change, scroll successful",{},Rs.DEBUG)};if(b(),z==="smooth"){let re=!1;_=Un(n,ue=>{re=re||ue}),y=yc(l,()=>{Q(re)})}else y=yc(Oe(n,eje(150)),Q);return S=setTimeout(()=>{b()},1200),en(i,!0),B("scrolling from index to",{index:K,top:Y,behavior:z},Rs.DEBUG),{top:Y,behavior:z}})),s),{scrollToIndex:g,topListHeight:v}},gr(Yl,Io,Gd),{singleton:!0});function eje(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ub="up",a1="down",tje="none",nje={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},rje=0,Zb=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=Ze(!1),l=Ze(!0),c=yn(),d=yn(),f=Ze(4),h=Ze(rje),p=_o(Oe(D9(Oe(zt(t),Sg(1),Ju(!0)),Oe(zt(t),Sg(1),Ju(!1),k9(100))),hr()),!1),g=_o(Oe(D9(Oe(o,Ju(!0)),Oe(o,Ju(!1),k9(200))),hr()),!1);wt(Oe(vi(zt(t),zt(h)),lt(([b,x])=>b<=x),hr()),l),wt(Oe(l,id(50)),d);const v=Is(Oe(vi(e,zt(n),zt(r),zt(i),zt(f)),Rl((b,[{scrollTop:x,scrollHeight:E},I,A,R,M])=>{const L=x+I-E>-M,B={viewportHeight:I,scrollTop:x,scrollHeight:E};if(L){let G,U;return x>b.state.scrollTop?(G="SCROLLED_DOWN",U=b.state.scrollTop-x):(G="SIZE_DECREASED",U=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:B,atBottomBecause:G,scrollTopDelta:U}}let H;return B.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ib&&b.atBottom===x.atBottom))),y=_o(Oe(e,Rl((b,{scrollTop:x,scrollHeight:E,viewportHeight:I})=>{if(lne(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const A=E-(x+I)<1;return b.scrollTop!==x&&A?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ut(b=>b.changed),lt(b=>b.jump)),0);wt(Oe(v,lt(b=>b.atBottom)),s),wt(Oe(s,id(50)),c);const S=Ze(a1);wt(Oe(e,lt(({scrollTop:b})=>b),hr(),Rl((b,x)=>bs(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),wt(Oe(e,id(50),Ju(tje)),S);const _=Ze(0);return wt(Oe(p,Ut(b=>!b),Ju(0)),_),wt(Oe(t,id(100),an(p),Ut(([b,x])=>!!x),Rl(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Io)),Vd=$n(([{log:e}])=>{const t=Ze(!1),n=Is(Oe(t,Ut(r=>r),hr()));return Un(t,r=>{r&&bs(e)("props updated",{},Rs.DEBUG)}),{propsReady:t,didMount:n}},gr(Gd),{singleton:!0});function n6(e,t){e==0?t():requestAnimationFrame(()=>n6(e-1,t))}function r6(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ew=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=Ze(!0),l=Ze(0),c=Ze(!1);return wt(Oe(o,an(l),Ut(([d,f])=>!!f),Ju(!1)),s),Un(Oe(vi(t,o),an(s,e,n,c),Ut(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||Jz(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),n6(3,()=>{yc(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(Yl,Io,Qb,Vd),{singleton:!0});function N9(e){return e?e==="smooth"?"smooth":"auto":!1}const ije=(e,t)=>typeof e=="function"?N9(e(t)):t&&N9(e),oje=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=Ze(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}Un(Oe(vi(Oe(zt(e),Sg(1)),l),an(zt(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let I=S&&x,A="auto";return I&&(A=ije(_,b||E),I=I&&!!A),{totalCount:y,shouldFollow:I,followOutputBehavior:A}}),Ut(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=yc(t,()=>{bs(c)("following output to ",{totalCount:y},Rs.DEBUG),g(S),p=null})});function v(y){const S=yc(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(bs(c)("scrolling to bottom due to increased size",{},Rs.DEBUG),g("auto"))});setTimeout(S,100)}return Un(Oe(vi(zt(f),e,s),Ut(([y,,S])=>y&&S),Rl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ut(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),Un(h,()=>{v(bs(f)!==!1)}),Un(vi(zt(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(Yl,Zb,Qb,ew,Vd,Gd,Io));function sje(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const xne=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Is(Oe(o,lt(sje)));return wt(Oe(l,lt(c=>c.totalCount)),e),wt(Oe(l,lt(c=>c.groupIndices)),t),wt(Oe(vi(r,n,i),Ut(([c,d])=>TI(d)),lt(([c,d,f])=>sl(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(Yl,Io));function cb(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function bne(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const nC="top",rC="bottom",$9="none";function F9(e,t,n){return typeof e=="number"?n===ub&&t===nC||n===a1&&t===rC?e:0:n===ub?t===nC?e.main:e.reverse:t===rC?e.main:e.reverse}function z9(e,t){return typeof e=="number"?e:e[t]||0}const i6=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=Ze(0),l=Ze(0),c=Ze(0),d=_o(Oe(vi(zt(e),zt(t),zt(r),zt(o,cb),zt(c),zt(s),zt(i),zt(n),zt(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,I=S+_,A=Math.max(p-E,0);let R=$9;const M=z9(x,nC),L=z9(x,rC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+I-M&&(R=ub),vf!=null),hr(cb)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Io),{singleton:!0});function aje(e,t,n){if(TI(t)){const r=vne(e,t);return[{index:sl(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const vN={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function U9(e,t,n){if(e.length===0)return[];if(!TI(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=CI(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:U9(e,i,o),topItems:U9(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function wne(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=r6(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return ES(d,[],l,i,n,r)}const Ap=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=Ze([]),S=Ze(0),_=yn();wt(o.topItemsIndexes,y);const b=_o(Oe(vi(g,v,zt(s,cb),zt(t),zt(e),zt(f),d,zt(y),zt(r),zt(i),n),Ut(([A,R,,M,,,,,,,L])=>{const B=L&&L.length!==M;return A&&!R&&!B}),lt(([,,[A,R],M,L,B,H,G,U,D,F])=>{const z=L,{sizeTree:V,offsetTree:W}=z,K=bs(S);if(M===0)return{...vN,totalCount:M};if(A===0&&R===0)return K===0?{...vN,totalCount:M}:wne(K,B,L,U,D,F||[]);if(Kn(V))return K>0?null:ES(aje(r6(B,M),z,F),[],M,D,z,U);const Y=[];if(G.length>0){const se=G[0],J=G[G.length-1];let ae=0;for(const le of CI(V,se,J)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,J);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return ES([],Y,M,D,z,U);const Q=G.length>0?G[G.length-1]+1:0,re=q8e(W,A,R,Q);if(re.length===0)return null;const ue=M-1,ce=EI([],se=>{for(const J of re){const ae=J.value;let le=ae.offset,he=J.start;const pe=ae.size;if(ae.offset=R);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return ES(ce,Y,M,D,z,U)}),Ut(A=>A!==null),hr()),vN);wt(Oe(n,Ut(Jz),lt(A=>A==null?void 0:A.length)),t),wt(Oe(b,lt(A=>A.topListHeight)),h),wt(h,c),wt(Oe(b,lt(A=>[A.top,A.bottom])),l),wt(Oe(b,lt(A=>A.items)),_);const x=Is(Oe(b,Ut(({items:A})=>A.length>0),an(t,n),Ut(([{items:A},R])=>A[A.length-1].originalIndex===R-1),lt(([,A,R])=>[A-1,R]),hr(cb),lt(([A])=>A))),E=Is(Oe(b,id(200),Ut(({items:A,topItems:R})=>A.length>0&&A[0].originalIndex===R.length),lt(({items:A})=>A[0].index),hr())),I=Is(Oe(b,Ut(({items:A})=>A.length>0),lt(({items:A})=>{let R=0,M=A.length-1;for(;A[R].type==="group"&&RR;)M--;return{startIndex:A[R].index,endIndex:A[M].index}}),hr(bne)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:I,itemsRendered:_,initialItemCount:S,...p}},gr(Yl,xne,i6,ew,Qb,Zb,Vd,e6),{singleton:!0}),lje=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(wt(Oe(l,an(o),Ut(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>wne(c,d,f,h,p,g))),s),{}),gr(Yl,ew,Ap,Vd),{singleton:!0}),_ne=$n(([{scrollVelocity:e}])=>{const t=Ze(!1),n=yn(),r=Ze(!1);return wt(Oe(e,an(r,t,n),Ut(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),Un(Oe(vi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Zb),{singleton:!0}),uje=$n(([{topItemsIndexes:e}])=>{const t=Ze(0);return wt(Oe(t,Ut(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Ap)),Sne=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=_o(Oe(vi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return wt(zt(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Io,Ap),{singleton:!0});function Ene(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const cje=Ene(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),dje=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Is(Oe(c,an(l),Rl(([,_,b,x],[{items:E,totalCount:I,bottom:A,offsetBottom:R},M])=>{const L=A+R;let B=0;return b===I&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(B=L-x,B!==0&&(B+=M))),[B,E,I,L]},[0,[],0,0]),Ut(([_])=>_!==0),an(t,s,r,o,g,v),Ut(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===ub),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Rs.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return Un(Oe(y,an(n,i)),([_,b,x])=>{x&&cje()?en(n,b-_):S(-_)}),Un(Oe(vi(_o(i,!1),n,v),Ut(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),id(1)),S),wt(Oe(f,lt(_=>({top:-_}))),e),Un(Oe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},I])=>{function A(R){return R*(b+I)}if(x.length===0)return A(_);{let R=0;const M=ab(E,0);let L=0,B=0;for(;L<_;){L++,R+=M;let H=x.length===B+1?1/0:x[B+1]-x[B]-1;L+H>_&&(R-=M,H=_-L+1),L+=H,R+=A(H),B++}return R}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Io,Zb,Ap,Yl,Gd,e6)),fje=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Ze(0);return Un(Oe(e,an(r),Ut(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{yc(Oe(n,Sg(1),Ut(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(Vd,Io,Ap),{singleton:!0}),hje=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Ze(!1),r=_o(Oe(vi(n,e,t),Ut(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),id(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Io,Sne),{singleton:!0}),o6=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=Ze(!1),s=Ze(void 0);return wt(Oe(vi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),wt(Oe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Io)),pje=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,mje=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return wt(Oe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:I,align:A,calculateViewLocation:R=pje,...M}=h,L=gne(h,p,v-1),B=lb(L,p.offsetTree,x)+y+S,H=B+sl(p.sizeTree,L)[1],G=b+S,U=b+g-_,D=R({itemTop:B,itemBottom:H,viewportTop:G,viewportBottom:U,locationParams:{behavior:I,align:A,...M}});return D?E&&yc(Oe(c,Ut(F=>F===!1),Sg(bs(c)?1:2)),E):E&&E(),D}),Ut(h=>h!==null)),d),{scrollIntoView:f}},gr(Yl,Io,Qb,Ap,Gd),{singleton:!0}),gje=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=Ze(void 0),f=Ze(null),h=Ze(null);return wt(s,f),wt(l,h),Un(Oe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=J8e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),wt(Oe(d,Ut(Jz),lt(vje)),r),wt(Oe(i,an(d),Ut(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(Yl,Io,ew,Vd,o6));function vje(e){return{offset:e.scrollTop,index:0,align:"start"}}const yje=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(i6,lje,Vd,_ne,Sne,fje,hje,o6,mje,Gd)),xje=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},I,{topItemCount:A},{groupCounts:R},M])=>(wt(x.rangeChanged,M.scrollSeekRangeChanged),wt(Oe(M.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:A,groupCounts:R,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...M,...v,sizes:h,...y}),gr(Yl,ew,Io,gje,oje,Ap,Qb,dje,uje,xne,yje)),yN="-webkit-sticky",j9="sticky",Cne=Ene(()=>{if(typeof document>"u")return j9;const e=document.createElement("div");return e.style.position=yN,e.style.position===yN?yN:j9});function Tne(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=Zz(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const Ine=de.createContext(void 0),Rne=de.createContext(void 0);function Ane(e){return e}const bje=$n(()=>{const e=Ze(c=>`Item ${c}`),t=Ze(null),n=Ze(c=>`Group ${c}`),r=Ze({}),i=Ze(Ane),o=Ze("div"),s=Ze(Qg),l=(c,d=null)=>_o(Oe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),wje=$n(([e,t])=>({...e,...t}),gr(xje,bje)),_je=({height:e})=>de.createElement("div",{style:{height:e}}),Sje={position:Cne(),zIndex:1,overflowAnchor:"none"},Eje={overflowAnchor:"none"},H9=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=Qs("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=Qs("windowScrollContainerState"),l=Qs("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=Qs("gap"),{callbackRef:S}=$8e(r,g,p,t?Qg:c,v,y,o),[_,b]=de.useState(0);s6("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||_je,I=mn("ListComponent"),A=mn("ItemComponent"),R=mn("GroupComponent"),M=mn("computeItemKey"),L=mn("isSeeking"),B=mn("groupIndices").length>0,H=mn("paddingTopAddition"),G=mn("scrolledToInitialItem"),U=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...G?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,ko(x,f)):de.createElement(I,{...ko(I,f),ref:S,style:U,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,z=M(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...ko(E,f),key:z,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(R,{...ko(R,f),key:z,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:Sje},h(D.index,f)):de.createElement(A,{...ko(A,f),key:z,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:Eje},B?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),Cje={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},II={width:"100%",height:"100%",position:"absolute",top:0},Tje={width:"100%",position:Cne(),top:0,zIndex:1};function ko(e,t){if(typeof e!="string")return{context:t}}const Ije=de.memo(function(){const t=mn("HeaderComponent"),n=Qs("headerHeight"),r=mn("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Rje=de.memo(function(){const t=mn("FooterComponent"),n=Qs("footerHeight"),r=mn("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null});function Pne({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=une(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...Cje,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...ko(d,p)},s)})}function One({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=une(c,f,d,Qg,g);return L8e(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...ko(d,v)},s)})}const Aje=({children:e})=>{const t=de.useContext(Ine),n=Qs("viewportHeight"),r=Qs("fixedItemHeight"),i=Rp(ine(n,o=>Pd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:II,ref:i,"data-viewport-type":"element"},e)},Pje=({children:e})=>{const t=de.useContext(Ine),n=Qs("windowViewportRect"),r=Qs("fixedItemHeight"),i=mn("customScrollParent"),o=Tne(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:II,"data-viewport-type":"window"},e)},Oje=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...Tje,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},Mje=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?Lje:Dje,s=i||n?Pje:Aje;return de.createElement(o,{...t},r&&de.createElement(Oje,null,de.createElement(H9,{showTopList:!0})),de.createElement(s,null,de.createElement(Ije,null),de.createElement(H9,null),de.createElement(Rje,null)))}),{Component:kje,usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}=ane(wje,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Mje),Dje=Pne({usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}),Lje=One({usePublisher:Qs,useEmitterValue:mn,useEmitter:s6}),Bje=kje,W9={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Nje={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:G9,ceil:V9,floor:iC,min:xN,max:l1}=Math;function $je(e){return{...Nje,items:e}}function X9(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>{const o=n===null?null:n[i+e];return{index:i+e,data:o}})}function Fje(e,t){return e&&e.column===t.column&&e.row===t.row}function N_(e,t){return e&&e.width===t.width&&e.height===t.height}const zje=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const I=Ze(0),A=Ze(0),R=Ze(W9),M=Ze({height:0,width:0}),L=Ze({height:0,width:0}),B=yn(),H=yn(),G=Ze(0),U=Ze(null),D=Ze({row:0,column:0}),F=yn(),z=yn(),V=Ze(!1),W=Ze(0),K=Ze(!0),Y=Ze(!1);Un(Oe(v,an(W),Ut(([J,ae])=>!!ae)),()=>{en(K,!1),en(A,0)}),Un(Oe(vi(v,K,L,M,W,Y),Ut(([J,ae,le,he,,pe])=>J&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,J])=>{en(Y,!0),n6(1,()=>{en(B,J)}),yc(Oe(r),()=>{en(n,[0,0]),en(K,!0)})}),wt(Oe(z,Ut(J=>J!=null&&J.scrollTop>0),Ju(0)),A),Un(Oe(v,an(z),Ut(([,J])=>J!=null)),([,J])=>{J&&(en(M,J.viewport),en(L,J==null?void 0:J.item),en(D,J.gap),J.scrollTop>0&&(en(V,!0),yc(Oe(r,Sg(1)),ae=>{en(V,!1)}),en(s,{top:J.scrollTop})))}),wt(Oe(M,lt(({height:J})=>J)),i),wt(Oe(vi(zt(M,N_),zt(L,N_),zt(D,(J,ae)=>J&&J.column===ae.column&&J.row===ae.row),zt(r)),lt(([J,ae,le,he])=>({viewport:J,item:ae,gap:le,scrollTop:he}))),F),wt(Oe(vi(zt(I),t,zt(D,Fje),zt(L,N_),zt(M,N_),zt(U),zt(A),zt(V),zt(K),zt(W)),Ut(([,,,,,,,J])=>!J),lt(([J,[ae,le],he,pe,ve,ye,be,,me,xe])=>{const{row:Je,column:Xe}=he,{height:at,width:Lt}=pe,{width:Pe}=ve;if(be===0&&(J===0||Pe===0))return W9;if(Lt===0){const Rt=r6(xe,J),ut=Rt===0?Math.max(be-1,0):Rt;return $je(X9(Rt,ut,ye))}const Fe=Mne(Pe,Lt,Xe);let it,ht;me?ae===0&&le===0&&be>0?(it=0,ht=be-1):(it=Fe*iC((ae+Je)/(at+Je)),ht=Fe*V9((le+Je)/(at+Je))-1,ht=xN(J-1,l1(ht,Fe-1)),it=xN(ht,l1(0,it))):(it=0,ht=-1);const pt=X9(it,ht,ye),{top:_e,bottom:ze}=q9(ve,he,pe,pt),Ye=V9(J/Fe),Be=Ye*at+(Ye-1)*Je-ze;return{items:pt,offsetTop:_e,offsetBottom:Be,top:_e,bottom:ze,itemHeight:at,itemWidth:Lt}})),R),wt(Oe(U,Ut(J=>J!==null),lt(J=>J.length)),I),wt(Oe(vi(M,L,R,D),Ut(([J,ae,{items:le}])=>le.length>0&&ae.height!==0&&J.height!==0),lt(([J,ae,{items:le},he])=>{const{top:pe,bottom:ve}=q9(J,he,ae,le);return[pe,ve]}),hr(cb)),n);const Q=Ze(!1);wt(Oe(r,an(Q),lt(([J,ae])=>ae||J!==0)),Q);const re=Is(Oe(zt(R),Ut(({items:J})=>J.length>0),an(I,Q),Ut(([{items:J},ae,le])=>le&&J[J.length-1].index===ae-1),lt(([,J])=>J-1),hr())),ue=Is(Oe(zt(R),Ut(({items:J})=>J.length>0&&J[0].index===0),Ju(0),hr())),ce=Is(Oe(zt(R),an(V),Ut(([{items:J},ae])=>J.length>0&&!ae),lt(([{items:J}])=>({startIndex:J[0].index,endIndex:J[J.length-1].index})),hr(bne),id(0)));wt(ce,p.scrollSeekRangeChanged),wt(Oe(B,an(M,L,I,D),lt(([J,ae,le,he,pe])=>{const ve=yne(J),{align:ye,behavior:be,offset:me}=ve;let xe=ve.index;xe==="LAST"&&(xe=he-1),xe=l1(0,xe,xN(he-1,xe));let Je=E3(ae,pe,le,xe);return ye==="end"?Je=G9(Je-ae.height+le.height):ye==="center"&&(Je=G9(Je-ae.height/2+le.height/2)),me&&(Je+=me),{top:Je,behavior:be}})),s);const se=_o(Oe(R,lt(J=>J.offsetBottom+J.bottom)),0);return wt(Oe(y,lt(J=>({width:J.visibleWidth,height:J.visibleHeight}))),M),{data:U,totalCount:I,viewportDimensions:M,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:B,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:G,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:A,gap:D,restoreStateFrom:z,...p,initialTopMostItemIndex:W,gridState:R,totalListHeight:se,...h,startReached:ue,endReached:re,rangeChanged:ce,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(i6,Io,Zb,_ne,Vd,o6,Gd));function q9(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=E3(e,t,n,r[0].index),s=E3(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function E3(e,t,n,r){const i=Mne(e.width,n.width,t.column),o=iC(r/i),s=o*n.height+l1(0,o-1)*t.row;return s>0?s+t.row:s}function Mne(e,t,n){return l1(1,iC((e+n)/(iC(t)+n)))}const Uje=$n(()=>{const e=Ze(d=>`Item ${d}`),t=Ze({}),n=Ze(null),r=Ze("virtuoso-grid-item"),i=Ze("virtuoso-grid-list"),o=Ze(Ane),s=Ze("div"),l=Ze(Qg),c=(d,f=null)=>_o(Oe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),jje=$n(([e,t])=>({...e,...t}),gr(zje,Uje)),Hje=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=nl("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=nl("itemDimensions"),g=nl("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Rp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:I}=x.getBoundingClientRect();p({width:E,height:I})}g({row:Y9("row-gap",getComputedStyle(_).rowGap,v),column:Y9("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...ko(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...ko(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...ko(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),Wje=de.memo(function(){const t=Sr("HeaderComponent"),n=nl("headerHeight"),r=Sr("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Gje=de.memo(function(){const t=Sr("FooterComponent"),n=nl("footerHeight"),r=Sr("headerFooterTag"),i=Rp(s=>n(Pd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,ko(t,o))):null}),Vje=({children:e})=>{const t=de.useContext(Rne),n=nl("itemDimensions"),r=nl("viewportDimensions"),i=Rp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:II,ref:i},e)},Xje=({children:e})=>{const t=de.useContext(Rne),n=nl("windowViewportRect"),r=nl("itemDimensions"),i=Sr("customScrollParent"),o=Tne(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:II},e)},qje=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?Kje:Yje,o=r||n?Xje:Vje;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(Wje,null),de.createElement(Hje,null),de.createElement(Gje,null)))}),{Component:XHe,usePublisher:nl,useEmitterValue:Sr,useEmitter:kne}=ane(jje,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},qje),Yje=Pne({usePublisher:nl,useEmitterValue:Sr,useEmitter:kne}),Kje=One({usePublisher:nl,useEmitterValue:Sr,useEmitter:kne});function Y9(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Rs.WARN),t==="normal"?0:parseInt(t??"0",10)}const Jje=O.forwardRef(({style:e,children:t,...n},r)=>{const i=O.useRef(null),{palette:o,spacing:s}=Pn(),l=k1({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=TK({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});O.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=O.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function Qje({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(Pt,{...i,children:C.jsx(Bje,{components:{Scroller:Jje},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function Zje({event:e,hidden:t}){return C.jsxs(xLe,{children:[ie.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Lye,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function eHe({event:e,index:t,selected:n,...r}){const{spacing:i}=Pn(),[,o]=dp();return C.jsxs(T$,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${V1(e==null?void 0:e.type)}`,...r.sx},onClick:()=>o({step:t}),children:[C.jsx(hd,{children:C.jsx(qt,{variant:"body2",children:t})}),C.jsx($d,{title:C.jsx(yF,{event:e,flexDirection:"column"}),children:C.jsx(Dl,{sx:{overflow:"hidden"},primary:C.jsx(Zje,{event:e,hidden:!1}),secondary:C.jsx(yF,{event:ie.pick(e,"f","g","pId")})})})]})}const tHe=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),nHe=e=>Number(e.replace(/px$/,""));function rHe(){const{spacing:e}=Pn(),{controls:t,onChange:n,state:r}=zd(),[{step:i=0,playback:o},s]=dp(),[{layers:l}]=ua(),c=O.useRef(null),[d,f]=O.useState(),h=ie.find(l,{key:d});O.useEffect(()=>{var g;d||f((g=ie.head(l))==null?void 0:g.key)},[d,f,l]);const p=O.useMemo(()=>{var g;if(h)return O.createElement(jb[((g=h==null?void 0:h.source)==null?void 0:g.type)??""].steps,{layer:h})},[h]);return O.useEffect(()=>{o==="paused"&&ie.delay(()=>{var g,v;return(v=(g=c==null?void 0:c.current)==null?void 0:g.scrollToIndex)==null?void 0:v.call(g,{index:i,align:"start",behavior:"smooth",offset:-nHe(e(6+2))})},150)},[i,o,e]),C.jsxs(Ln,{onChange:n,stack:r,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{vertical:!0,alignItems:"center",children:p?o!=="playing"?O.cloneElement(p,{children:g=>h?g.length?C.jsx(Qje,{sx:{width:"100%",height:"100%"},items:g,listOptions:{ref:c,defaultItemHeight:80,overscan:0},renderItem:(v,y)=>C.jsxs(Pt,{sx:{height:e(y?10:16),pt:y?0:e(6)},children:[C.jsx(eHe,{event:v,index:y,selected:y===i,sx:{height:"100%"}}),C.jsx(wc,{variant:"inset"})]})}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:`${ia(h)} has no steps to display`}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:"Steps"})}):C.jsx(Lh,{icon:C.jsx(t4,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:"Running"}),C.jsx(pc,{onClick:()=>s({playback:"paused"}),children:"Pause"})]})}):C.jsx(Lh,{icon:C.jsx(tS,{}),label:"Steps"})})}),C.jsxs(Ln.Options,{children:[C.jsx(Ss,{icon:C.jsx(TT,{}),label:"Layer",value:d,items:ie.map(l,g=>({id:g.key,name:ia(g)})),onChange:f,showArrow:!0}),tHe,C.jsx(C8e,{layer:h})]}),C.jsx(Ln.Extras,{children:t})]})}const iHe=e=>e?48:36,oHe=8;function sHe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=I4(),l=ie.max([ie.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(Bg,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx($d,{title:i,children:C.jsx("span",{children:e==null?void 0:e(T4(c))})}),C.jsx(Dg,{...BT(c),anchorOrigin:{horizontal:"center",vertical:-iHe(s)*l-oHe},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:d,label:f,disabled:h})=>C.jsxs(pd,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(hd,{children:C.jsx(Vhe,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function aHe({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ie.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ie.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(sHe,{defaultChecked:!0,placeholder:ie.startCase(e),trigger:f=>C.jsx(pc,{...f,disabled:!(r!=null&&r.length),startIcon:i,endIcon:o&&C.jsx(FY,{sx:{ml:-.5}}),children:c}),items:ie.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(qt,{children:h}),C.jsx(Yr,{}),C.jsx(qt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const K9=C.jsx(wc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function lHe(){var p,g,v,y;const{controls:e,onChange:t,state:n}=zd(),[r]=eI(),[{layers:i}]=ua(),[o,s]=O.useState({}),l=O.useMemo(()=>ie.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=O.useState(),f=O.useMemo(()=>ie.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(Ln,{onChange:t,stack:n,children:[C.jsx(Ln.Content,{children:C.jsx(wn,{children:C.jsx(A4,{children:S=>C.jsx(Pt,{children:C.jsx(vDe,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Ln.Options,{children:C.jsxs(M1,{direction:"row",children:[C.jsx(Ss,{label:"Renderer",icon:C.jsx(Eye,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ie.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),K9,C.jsx(aHe,{defaultChecked:!0,label:"Layers",icon:C.jsx(TT,{}),value:o,onChange:s,items:ie.map(i,S=>({id:S.key,name:ia(S)})),showArrow:!0}),K9,C.jsx(pc,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},startIcon:C.jsx(Iye,{}),children:"Fit"}),C.jsx(pc,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},startIcon:C.jsx(Aye,{}),children:"1:1"})]})}),C.jsx(Ln.Extras,{children:e})]})}const C3={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(WY,{}),content:lHe},tree:{id:"tree",name:"Tree",icon:C.jsx($Y,{}),content:lDe},steps:{id:"steps",name:"Steps",icon:C.jsx(tS,{}),content:rHe},info:{id:"info",name:"Logs",icon:C.jsx(jY,{}),content:pH},layers:{id:"layers",name:"Layers",icon:C.jsx(TT,{}),content:yLe},parameters:{id:"parameters",name:"Parameters",icon:C.jsx(jye,{}),content:pH},debug:{id:"debug",name:"Debugger",icon:C.jsx(Tye,{}),content:wIe},settings:{id:"settings",name:"Settings",icon:C.jsx(Hye,{}),content:b8e},about:{id:"about",name:"About",icon:C.jsx(Bye,{}),content:Pbe}},[uHe,cHe]=Gl({view:{type:"branch",key:js(),orientation:"horizontal",children:[{size:75,type:"branch",key:js(),orientation:"horizontal",children:[{type:"leaf",size:25,key:js(),content:{type:"layers"}},{size:75,type:"branch",key:js(),orientation:"vertical",children:[{type:"leaf",size:75,key:js(),content:{type:"viewport"}},{type:"leaf",size:25,key:js(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:js(),content:{type:"steps"}}]}});function dHe(e){const t=HIe(),[{view:n},r]=uHe();return C.jsxs(C.Fragment,{children:[C.jsx(wn,{...e,children:C.jsx(BK,{root:n,onChange:i=>r({view:i}),renderLeaf:({content:i})=>{var o;return C.jsx(sp,{in:!0,children:C.jsx(Pt,{sx:{width:"100%",height:"100%"},children:O.createElement((o=C3[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(sp,{in:t,children:C.jsx(Bme,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})})]})}function fHe(e){O.useEffect(()=>{document.querySelector('meta[name="theme-color"]').setAttribute("content",e)},[e])}function hHe(e){return new Promise(t=>ie.delay(t,e))}async function pHe(e,t=2500){const n=ie.now();return{result:await Promise.any([e(),hHe(t)]),delta:ie.now()-n}}function mHe(){const e=_c(),[{remote:t}]=Ec(),[,n]=hg(),r=xp("connections");return O.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(p8e(s))({url:l});await d.connect();const{result:f,delta:h}=await pHe(()=>d.call("about"));f?(e(`Connected to ${f.name}.`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(o)}i||e(`Connected to ${o.length} of ${t.length} solvers.`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const gHe=e=>t=>({...t,source:e});function vHe(){const[e]=hg(),[,t]=SE(),n=xp("features");return nZ(r=>n(async()=>{const i={algorithms:[],formats:ie.keys(vz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ie.uniqBy([...i[l],...ie.map(await o(`features/${l}`),gHe(s))],"id");r.aborted||t(i)}),[e,t]),C.jsx(C.Fragment,{})}function yHe(){const[{layers:e},t]=ua();return O.useMemo(()=>ie.map(e,n=>{const r=RZ(n).service;if(r)return O.createElement(r,{key:n.key,value:n,onChange:i=>t({layers:ie.map(e,o=>o.key===n.key?i:o)})})}),[e,t])}function xHe(){const e=yHe();return C.jsx(C.Fragment,{children:e})}function Dne({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ie.reduce(ie.map(e,r=>O.createElement(r)),(r,i)=>O.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ie.map(n,(r,i)=>O.createElement(r,{key:i}))]}))})}const bHe=[mHe,vHe,tUe,xHe];function wHe(){const t=Pn().palette.background.default;return fHe(t),C.jsx(wn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:C.jsx(dHe,{flex:1})})}function _He(){const[{theme:e="light",accentColor:t="teal"}]=Ec(),n=O.useMemo(()=>Cbe(e,t),[e,t]);return C.jsx(cae,{theme:n,children:C.jsx(_xe,{children:C.jsx(Dne,{services:bHe,children:C.jsx(wHe,{})})})})}const[qHe,SHe]=Gl({});const EHe=NY(document.getElementById("root")),CHe=[_be,zIe,UIe,Zwe,SHe,jIe,fDe,$Oe,wxe,cHe];EHe.render(C.jsx(ope,{children:C.jsx(Dne,{slices:CHe,children:C.jsx(_He,{})})})); diff --git a/index.html b/index.html index 319787f6..f1f02909 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ Waypoint - +