diff --git a/assets/index-51173628.js b/assets/index-7358ab39.js similarity index 78% rename from assets/index-51173628.js rename to assets/index-7358ab39.js index 1d7de224..b38bb12e 100644 --- a/assets/index-51173628.js +++ b/assets/index-7358ab39.js @@ -1,4 +1,4 @@ -var hoe=Object.defineProperty;var poe=(e,t,n)=>t in e?hoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fg=(e,t,n)=>(poe(e,typeof t!="symbol"?t+"":t,n),n),nL=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ot=(e,t,n)=>(nL(e,t,"read from private field"),n?n.call(e):t.get(e)),yr=(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)},fc=(e,t,n,r)=>(nL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var HU=(e,t,n,r)=>({set _(i){fc(e,t,i,n)},get _(){return ot(e,t,r)}}),io=(e,t,n)=>(nL(e,t,"access private method"),n);function goe(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 Kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Z5(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 UX={exports:{}},AT={},jX={exports:{}},hn={};/** +var poe=Object.defineProperty;var goe=(e,t,n)=>t in e?poe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fg=(e,t,n)=>(goe(e,typeof t!="symbol"?t+"":t,n),n),nD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ot=(e,t,n)=>(nD(e,t,"read from private field"),n?n.call(e):t.get(e)),yr=(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)},fc=(e,t,n,r)=>(nD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var WU=(e,t,n,r)=>({set _(i){fc(e,t,i,n)},get _(){return ot(e,t,r)}}),io=(e,t,n)=>(nD(e,t,"access private method"),n);function moe(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 Kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function e4(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 jX={exports:{}},AT={},HX={exports:{}},hn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var hoe=Object.defineProperty;var poe=(e,t,n)=>t in e?hoe(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 fw=Symbol.for("react.element"),moe=Symbol.for("react.portal"),voe=Symbol.for("react.fragment"),yoe=Symbol.for("react.strict_mode"),boe=Symbol.for("react.profiler"),xoe=Symbol.for("react.provider"),woe=Symbol.for("react.context"),_oe=Symbol.for("react.forward_ref"),Soe=Symbol.for("react.suspense"),Eoe=Symbol.for("react.memo"),Coe=Symbol.for("react.lazy"),WU=Symbol.iterator;function Toe(e){return e===null||typeof e!="object"?null:(e=WU&&e[WU]||e["@@iterator"],typeof e=="function"?e:null)}var HX={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},WX=Object.assign,GX={};function cv(e,t,n){this.props=e,this.context=t,this.refs=GX,this.updater=n||HX}cv.prototype.isReactComponent={};cv.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")};cv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function VX(){}VX.prototype=cv.prototype;function e4(e,t,n){this.props=e,this.context=t,this.refs=GX,this.updater=n||HX}var t4=e4.prototype=new VX;t4.constructor=e4;WX(t4,cv.prototype);t4.isPureReactComponent=!0;var GU=Array.isArray,XX=Object.prototype.hasOwnProperty,n4={current:null},qX={key:!0,ref:!0,__self:!0,__source:!0};function YX(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)XX.call(t,r)&&!qX.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t in e?hoe(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 Ooe=O,Moe=Symbol.for("react.element"),koe=Symbol.for("react.fragment"),Doe=Object.prototype.hasOwnProperty,Loe=Ooe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Noe={key:!0,ref:!0,__self:!0,__source:!0};function KX(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)Doe.call(t,r)&&!Noe.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:Moe,type:e,key:o,ref:s,props:i,_owner:Loe.current}}AT.Fragment=koe;AT.jsx=KX;AT.jsxs=KX;UX.exports=AT;var C=UX.exports;const Boe={black:"#000",white:"#fff"},Im=Boe,$oe={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"},ff=$oe,Foe={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"},QX=Foe,zoe={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"},Xh=zoe,Uoe={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"},JX=Uoe,joe={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"},Hoe=joe,Woe={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"},df=Woe,Goe={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"},qh=Goe,Voe={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"},Xoe=Voe,qoe={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"},Yoe=qoe,Koe={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"},hf=Koe,Qoe={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"},Joe=Qoe,Zoe={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"},ese=Zoe,tse={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"},ZX=tse,nse={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"},rse=nse,ise={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"},sp=ise,ose={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"},sse=ose,ase={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"},lse=ase,use={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"},i4=use,cse={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"},fse=cse,eq=Object.freeze(Object.defineProperty({__proto__:null,amber:rse,blue:df,blueGrey:fse,brown:lse,common:Im,cyan:Xoe,deepOrange:sse,deepPurple:JX,green:hf,grey:i4,indigo:Hoe,lightBlue:qh,lightGreen:Joe,lime:ese,orange:sp,pink:QX,purple:Xh,red:ff,teal:Yoe,yellow:ZX},Symbol.toStringTag,{value:"Module"}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=tq(e[n])}),t}function ts(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return ap(e)&&ap(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(ap(t[i])&&i in e&&ap(e[i])?r[i]=ts(e[i],t[i],n):n.clone?r[i]=ap(t[i])?tq(t[i]):t[i]:r[i]=t[i])}),r}var nq={exports:{}},dse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hse=dse,pse=hse;function rq(){}function iq(){}iq.resetWarningCache=rq;var gse=function(){function e(r,i,o,s,a,u){if(u!==pse){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}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:iq,resetWarningCache:rq};return n.PropTypes=n,n};nq.exports=gse();var dw=nq.exports;const hb=Ma(dw);function ed(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 IT(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 HS(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 Fr(e){return e&&e.ownerDocument||document}function Lc(e){return Fr(e).defaultView||window}function W$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const mse=typeof window<"u"?O.useLayoutEffect:O.useEffect,Uo=mse;let qU=0;function vse(e){const[t,n]=O.useState(e),r=e||t;return O.useEffect(()=>{t==null&&(qU+=1,n(`mui-${qU}`))},[t]),r}const YU=DE["useId".toString()];function o4(e){if(YU!==void 0){const t=YU();return e??t}return vse(e)}function tx({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=O.useRef(e!==void 0),[o,s]=O.useState(t),a=i?e:o,u=O.useCallback(c=>{i||s(c)},[]);return[a,u]}function go(e){const t=O.useRef(e);return Uo(()=>{t.current=e}),O.useCallback((...n)=>(0,t.current)(...n),[])}function Tr(...e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{W$(n,t)})},e)}let RT=!0,G$=!1,KU;const yse={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 bse(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&yse[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function xse(e){e.metaKey||e.altKey||e.ctrlKey||(RT=!0)}function iL(){RT=!1}function wse(){this.visibilityState==="hidden"&&G$&&(RT=!0)}function _se(e){e.addEventListener("keydown",xse,!0),e.addEventListener("mousedown",iL,!0),e.addEventListener("pointerdown",iL,!0),e.addEventListener("touchstart",iL,!0),e.addEventListener("visibilitychange",wse,!0)}function Sse(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return RT||bse(t)}function s4(){const e=O.useCallback(i=>{i!=null&&_se(i.ownerDocument)},[]),t=O.useRef(!1);function n(){return t.current?(G$=!0,window.clearTimeout(KU),KU=window.setTimeout(()=>{G$=!1},100),t.current=!1,!0):!1}function r(i){return Sse(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function oq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let dg;function sq(){if(dg)return dg;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),dg="reverse",e.scrollLeft>0?dg="default":(e.scrollLeft=1,e.scrollLeft===0&&(dg="negative")),document.body.removeChild(e),dg}function Ese(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(sq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Cse={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Tse=Cse;function a4(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]=a4(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function It(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const QU=e=>e,Ase=()=>{let e=QU;return{configure(t){e=t},generate(t){return e(t)},reset(){e=QU}}},Ise=Ase(),aq=Ise,Rse={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 Ct(e,t,n="Mui"){const r=Rse[t];return r?`${n}-${r}`:`${aq.generate(e)}-${t}`}function Rt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Ct(e,i,n)}),r}const Pp="$$material";function Ne(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 lq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Pse=/^((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)-.*))$/,Ose=lq(function(e){return Pse.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Mse(e){if(e.sheet)return e.sheet;for(var t=0;t0?qi(fv,--ls):0,Rm--,ii===10&&(Rm=1,OT--),ii}function Us(){return ii=ls2||rx(ii)>3?"":" "}function Gse(e,t){for(;--t&&Us()&&!(ii<48||ii>102||ii>57&&ii<65||ii>70&&ii<97););return hw(e,WS()+(t<6&&Jl()==32&&Us()==32))}function X$(e){for(;Us();)switch(ii){case e:return ls;case 34:case 39:e!==34&&e!==39&&X$(ii);break;case 40:e===41&&X$(e);break;case 92:Us();break}return ls}function Vse(e,t){for(;Us()&&e+ii!==47+10;)if(e+ii===42+42&&Jl()===47)break;return"/*"+hw(t,ls-1)+"*"+PT(e===47?e:Us())}function Xse(e){for(;!rx(Jl());)Us();return hw(e,ls)}function qse(e){return pq(VS("",null,null,null,[""],e=hq(e),0,[0],e))}function VS(e,t,n,r,i,o,s,a,u){for(var c=0,d=0,h=s,p=0,m=0,v=0,y=1,S=1,w=1,b=0,x="",E=i,A=o,I=r,R=x;S;)switch(v=b,b=Us()){case 40:if(v!=108&&qi(R,h-1)==58){V$(R+=kn(GS(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:R+=GS(b);break;case 9:case 10:case 13:case 32:R+=Wse(v);break;case 92:R+=Gse(WS()-1,7);continue;case 47:switch(Jl()){case 42:case 47:t_(Yse(Vse(Us(),WS()),t,n),u);break;default:R+="/"}break;case 123*y:a[c++]=Hl(R)*w;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+d:w==-1&&(R=kn(R,/\f/g,"")),m>0&&Hl(R)-h&&t_(m>32?ZU(R+";",r,n,h-1):ZU(kn(R," ","")+";",r,n,h-2),u);break;case 59:R+=";";default:if(t_(I=JU(R,t,n,c,d,i,a,x,E=[],A=[],h),o),b===123)if(d===0)VS(R,t,I,I,E,o,h,a,A);else switch(p===99&&qi(R,3)===110?100:p){case 100:case 108:case 109:case 115:VS(e,I,I,r&&t_(JU(e,I,I,0,0,i,a,x,i,E=[],h),A),i,A,h,a,r?E:A);break;default:VS(R,I,I,I,[""],A,0,a,A)}}c=d=m=0,y=w=1,x=R="",h=s;break;case 58:h=1+Hl(R),m=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Hse()==125)continue}switch(R+=PT(b),b*y){case 38:w=d>0?1:(R+="\f",-1);break;case 44:a[c++]=(Hl(R)-1)*w,w=1;break;case 64:Jl()===45&&(R+=GS(Us())),p=Jl(),d=h=Hl(x=R+=Xse(WS())),b++;break;case 45:v===45&&Hl(R)==2&&(y=0)}}return o}function JU(e,t,n,r,i,o,s,a,u,c,d){for(var h=i-1,p=i===0?o:[""],m=c4(p),v=0,y=0,S=0;v0?p[w]+" "+b:kn(b,/&\f/g,p[w])))&&(u[S++]=x);return MT(e,t,n,i===0?l4:a,u,c,d)}function Yse(e,t,n){return MT(e,t,n,uq,PT(jse()),nx(e,2,-2),0)}function ZU(e,t,n,r){return MT(e,t,n,u4,nx(e,0,r),nx(e,r+1,-1),r)}function lm(e,t){for(var n="",r=c4(e),i=0;i6)switch(qi(e,t+1)){case 109:if(qi(e,t+4)!==45)break;case 102:return kn(e,/(.+:)(.+)-([^]+)/,"$1"+Mn+"$2-$3$1"+LE+(qi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~V$(e,"stretch")?gq(kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qi(e,t+1)!==115)break;case 6444:switch(qi(e,Hl(e)-3-(~V$(e,"!important")&&10))){case 107:return kn(e,":",":"+Mn)+e;case 101:return kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mn+(qi(e,14)===45?"inline-":"")+"box$3$1"+Mn+"$2$3$1"+ao+"$2box$3")+e}break;case 5936:switch(qi(e,t+11)){case 114:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mn+e+ao+e+e}return e}var iae=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case u4:t.return=gq(t.value,t.length);break;case cq:return lm([pb(t,{value:kn(t.value,"@","@"+Mn)})],i);case l4:if(t.length)return Use(t.props,function(o){switch(zse(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return lm([pb(t,{props:[kn(o,/:(read-\w+)/,":"+LE+"$1")]})],i);case"::placeholder":return lm([pb(t,{props:[kn(o,/:(plac\w+)/,":"+Mn+"input-$1")]}),pb(t,{props:[kn(o,/:(plac\w+)/,":"+LE+"$1")]}),pb(t,{props:[kn(o,/:(plac\w+)/,ao+"input-$1")]})],i)}return""})}},oae=[iae],sae=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||oae,o={},s,a=[];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(" "),w=1;w{t[n]=nq(e[n])}),t}function ts(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return ap(e)&&ap(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(ap(t[i])&&i in e&&ap(e[i])?r[i]=ts(e[i],t[i],n):n.clone?r[i]=ap(t[i])?nq(t[i]):t[i]:r[i]=t[i])}),r}var rq={exports:{}},hse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pse=hse,gse=pse;function iq(){}function oq(){}oq.resetWarningCache=iq;var mse=function(){function e(r,i,o,s,a,u){if(u!==gse){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}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:oq,resetWarningCache:iq};return n.PropTypes=n,n};rq.exports=mse();var hw=rq.exports;const hb=Ma(hw);function ed(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 IT(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 WS(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 Fr(e){return e&&e.ownerDocument||document}function Dc(e){return Fr(e).defaultView||window}function W$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const vse=typeof window<"u"?O.useLayoutEffect:O.useEffect,Uo=vse;let YU=0;function yse(e){const[t,n]=O.useState(e),r=e||t;return O.useEffect(()=>{t==null&&(YU+=1,n(`mui-${YU}`))},[t]),r}const KU=DE["useId".toString()];function s4(e){if(KU!==void 0){const t=KU();return e??t}return yse(e)}function tx({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=O.useRef(e!==void 0),[o,s]=O.useState(t),a=i?e:o,u=O.useCallback(c=>{i||s(c)},[]);return[a,u]}function go(e){const t=O.useRef(e);return Uo(()=>{t.current=e}),O.useCallback((...n)=>(0,t.current)(...n),[])}function Tr(...e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{W$(n,t)})},e)}let RT=!0,G$=!1,QU;const bse={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 xse(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&bse[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function wse(e){e.metaKey||e.altKey||e.ctrlKey||(RT=!0)}function iD(){RT=!1}function _se(){this.visibilityState==="hidden"&&G$&&(RT=!0)}function Sse(e){e.addEventListener("keydown",wse,!0),e.addEventListener("mousedown",iD,!0),e.addEventListener("pointerdown",iD,!0),e.addEventListener("touchstart",iD,!0),e.addEventListener("visibilitychange",_se,!0)}function Ese(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return RT||xse(t)}function a4(){const e=O.useCallback(i=>{i!=null&&Sse(i.ownerDocument)},[]),t=O.useRef(!1);function n(){return t.current?(G$=!0,window.clearTimeout(QU),QU=window.setTimeout(()=>{G$=!1},100),t.current=!1,!0):!1}function r(i){return Ese(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function sq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let dg;function aq(){if(dg)return dg;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),dg="reverse",e.scrollLeft>0?dg="default":(e.scrollLeft=1,e.scrollLeft===0&&(dg="negative")),document.body.removeChild(e),dg}function Cse(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(aq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Tse={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Ase=Tse;function l4(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]=l4(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function It(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const JU=e=>e,Ise=()=>{let e=JU;return{configure(t){e=t},generate(t){return e(t)},reset(){e=JU}}},Rse=Ise(),lq=Rse,Pse={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 Ct(e,t,n="Mui"){const r=Pse[t];return r?`${n}-${r}`:`${lq.generate(e)}-${t}`}function Rt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Ct(e,i,n)}),r}const Pp="$$material";function Ne(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 uq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ose=/^((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)-.*))$/,Mse=uq(function(e){return Ose.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function kse(e){if(e.sheet)return e.sheet;for(var t=0;t0?qi(fv,--ls):0,Rm--,ii===10&&(Rm=1,OT--),ii}function Us(){return ii=ls2||rx(ii)>3?"":" "}function Vse(e,t){for(;--t&&Us()&&!(ii<48||ii>102||ii>57&&ii<65||ii>70&&ii<97););return pw(e,GS()+(t<6&&Jl()==32&&Us()==32))}function X$(e){for(;Us();)switch(ii){case e:return ls;case 34:case 39:e!==34&&e!==39&&X$(ii);break;case 40:e===41&&X$(e);break;case 92:Us();break}return ls}function Xse(e,t){for(;Us()&&e+ii!==47+10;)if(e+ii===42+42&&Jl()===47)break;return"/*"+pw(t,ls-1)+"*"+PT(e===47?e:Us())}function qse(e){for(;!rx(Jl());)Us();return pw(e,ls)}function Yse(e){return gq(XS("",null,null,null,[""],e=pq(e),0,[0],e))}function XS(e,t,n,r,i,o,s,a,u){for(var c=0,d=0,h=s,p=0,m=0,v=0,y=1,S=1,w=1,b=0,x="",E=i,A=o,I=r,R=x;S;)switch(v=b,b=Us()){case 40:if(v!=108&&qi(R,h-1)==58){V$(R+=kn(VS(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:R+=VS(b);break;case 9:case 10:case 13:case 32:R+=Gse(v);break;case 92:R+=Vse(GS()-1,7);continue;case 47:switch(Jl()){case 42:case 47:n_(Kse(Xse(Us(),GS()),t,n),u);break;default:R+="/"}break;case 123*y:a[c++]=Hl(R)*w;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+d:w==-1&&(R=kn(R,/\f/g,"")),m>0&&Hl(R)-h&&n_(m>32?ej(R+";",r,n,h-1):ej(kn(R," ","")+";",r,n,h-2),u);break;case 59:R+=";";default:if(n_(I=ZU(R,t,n,c,d,i,a,x,E=[],A=[],h),o),b===123)if(d===0)XS(R,t,I,I,E,o,h,a,A);else switch(p===99&&qi(R,3)===110?100:p){case 100:case 108:case 109:case 115:XS(e,I,I,r&&n_(ZU(e,I,I,0,0,i,a,x,i,E=[],h),A),i,A,h,a,r?E:A);break;default:XS(R,I,I,I,[""],A,0,a,A)}}c=d=m=0,y=w=1,x=R="",h=s;break;case 58:h=1+Hl(R),m=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Wse()==125)continue}switch(R+=PT(b),b*y){case 38:w=d>0?1:(R+="\f",-1);break;case 44:a[c++]=(Hl(R)-1)*w,w=1;break;case 64:Jl()===45&&(R+=VS(Us())),p=Jl(),d=h=Hl(x=R+=qse(GS())),b++;break;case 45:v===45&&Hl(R)==2&&(y=0)}}return o}function ZU(e,t,n,r,i,o,s,a,u,c,d){for(var h=i-1,p=i===0?o:[""],m=f4(p),v=0,y=0,S=0;v0?p[w]+" "+b:kn(b,/&\f/g,p[w])))&&(u[S++]=x);return MT(e,t,n,i===0?u4:a,u,c,d)}function Kse(e,t,n){return MT(e,t,n,cq,PT(Hse()),nx(e,2,-2),0)}function ej(e,t,n,r){return MT(e,t,n,c4,nx(e,0,r),nx(e,r+1,-1),r)}function lm(e,t){for(var n="",r=f4(e),i=0;i6)switch(qi(e,t+1)){case 109:if(qi(e,t+4)!==45)break;case 102:return kn(e,/(.+:)(.+)-([^]+)/,"$1"+Mn+"$2-$3$1"+NE+(qi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~V$(e,"stretch")?mq(kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qi(e,t+1)!==115)break;case 6444:switch(qi(e,Hl(e)-3-(~V$(e,"!important")&&10))){case 107:return kn(e,":",":"+Mn)+e;case 101:return kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mn+(qi(e,14)===45?"inline-":"")+"box$3$1"+Mn+"$2$3$1"+ao+"$2box$3")+e}break;case 5936:switch(qi(e,t+11)){case 114:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mn+e+ao+kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mn+e+ao+e+e}return e}var oae=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case c4:t.return=mq(t.value,t.length);break;case fq:return lm([pb(t,{value:kn(t.value,"@","@"+Mn)})],i);case u4:if(t.length)return jse(t.props,function(o){switch(Use(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return lm([pb(t,{props:[kn(o,/:(read-\w+)/,":"+NE+"$1")]})],i);case"::placeholder":return lm([pb(t,{props:[kn(o,/:(plac\w+)/,":"+Mn+"input-$1")]}),pb(t,{props:[kn(o,/:(plac\w+)/,":"+NE+"$1")]}),pb(t,{props:[kn(o,/:(plac\w+)/,ao+"input-$1")]})],i)}return""})}},sae=[oae],aae=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||sae,o={},s,a=[];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(" "),w=1;w=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 Eae={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},Cae=/[A-Z]|^ms/g,Tae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_q=function(t){return t.charCodeAt(1)===45},oj=function(t){return t!=null&&typeof t!="boolean"},oL=lq(function(e){return _q(e)?e:e.replace(Cae,"-$&").toLowerCase()}),sj=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Tae,function(r,i,o){return Wl={name:i,styles:o,next:Wl},i})}return Eae[t]!==1&&!_q(t)&&typeof n=="number"&&n!==0?n+"px":n};function ix(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 Aae(e,t,n)}case"function":{if(e!==void 0){var o=Wl,s=n(e);return Wl=o,ix(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function Aae(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Oae:Mae},cj=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},kae=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return xq(n,r,i),Rae(function(){return wq(n,r,i)}),null},Dae=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 a=cj(t,n,r),u=a||uj(i),c=!u("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var p=d.length,m=1;mt(Nae(i)?n:i):t;return C.jsx(Pae,{styles:r})}/** + */var ki=typeof Symbol=="function"&&Symbol.for,d4=ki?Symbol.for("react.element"):60103,h4=ki?Symbol.for("react.portal"):60106,kT=ki?Symbol.for("react.fragment"):60107,LT=ki?Symbol.for("react.strict_mode"):60108,DT=ki?Symbol.for("react.profiler"):60114,NT=ki?Symbol.for("react.provider"):60109,BT=ki?Symbol.for("react.context"):60110,p4=ki?Symbol.for("react.async_mode"):60111,$T=ki?Symbol.for("react.concurrent_mode"):60111,FT=ki?Symbol.for("react.forward_ref"):60112,zT=ki?Symbol.for("react.suspense"):60113,lae=ki?Symbol.for("react.suspense_list"):60120,UT=ki?Symbol.for("react.memo"):60115,jT=ki?Symbol.for("react.lazy"):60116,uae=ki?Symbol.for("react.block"):60121,cae=ki?Symbol.for("react.fundamental"):60117,fae=ki?Symbol.for("react.responder"):60118,dae=ki?Symbol.for("react.scope"):60119;function ta(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case d4:switch(e=e.type,e){case p4:case $T:case kT:case DT:case LT:case zT:return e;default:switch(e=e&&e.$$typeof,e){case BT:case FT:case jT:case UT:case NT:return e;default:return t}}case h4:return t}}}function yq(e){return ta(e)===$T}Hn.AsyncMode=p4;Hn.ConcurrentMode=$T;Hn.ContextConsumer=BT;Hn.ContextProvider=NT;Hn.Element=d4;Hn.ForwardRef=FT;Hn.Fragment=kT;Hn.Lazy=jT;Hn.Memo=UT;Hn.Portal=h4;Hn.Profiler=DT;Hn.StrictMode=LT;Hn.Suspense=zT;Hn.isAsyncMode=function(e){return yq(e)||ta(e)===p4};Hn.isConcurrentMode=yq;Hn.isContextConsumer=function(e){return ta(e)===BT};Hn.isContextProvider=function(e){return ta(e)===NT};Hn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===d4};Hn.isForwardRef=function(e){return ta(e)===FT};Hn.isFragment=function(e){return ta(e)===kT};Hn.isLazy=function(e){return ta(e)===jT};Hn.isMemo=function(e){return ta(e)===UT};Hn.isPortal=function(e){return ta(e)===h4};Hn.isProfiler=function(e){return ta(e)===DT};Hn.isStrictMode=function(e){return ta(e)===LT};Hn.isSuspense=function(e){return ta(e)===zT};Hn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kT||e===$T||e===DT||e===LT||e===zT||e===lae||typeof e=="object"&&e!==null&&(e.$$typeof===jT||e.$$typeof===UT||e.$$typeof===NT||e.$$typeof===BT||e.$$typeof===FT||e.$$typeof===cae||e.$$typeof===fae||e.$$typeof===dae||e.$$typeof===uae)};Hn.typeOf=ta;vq.exports=Hn;var hae=vq.exports,g4=hae,pae={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gae={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mae={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bq={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m4={};m4[g4.ForwardRef]=mae;m4[g4.Memo]=bq;function nj(e){return g4.isMemo(e)?bq:m4[e.$$typeof]||pae}var vae=Object.defineProperty,yae=Object.getOwnPropertyNames,rj=Object.getOwnPropertySymbols,bae=Object.getOwnPropertyDescriptor,xae=Object.getPrototypeOf,ij=Object.prototype;function xq(e,t,n){if(typeof t!="string"){if(ij){var r=xae(t);r&&r!==ij&&xq(e,r,n)}var i=yae(t);rj&&(i=i.concat(rj(t)));for(var o=nj(e),s=nj(t),a=0;a=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 Cae={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},Tae=/[A-Z]|^ms/g,Aae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sq=function(t){return t.charCodeAt(1)===45},sj=function(t){return t!=null&&typeof t!="boolean"},oD=uq(function(e){return Sq(e)?e:e.replace(Tae,"-$&").toLowerCase()}),aj=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Aae,function(r,i,o){return Wl={name:i,styles:o,next:Wl},i})}return Cae[t]!==1&&!Sq(t)&&typeof n=="number"&&n!==0?n+"px":n};function ix(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 Iae(e,t,n)}case"function":{if(e!==void 0){var o=Wl,s=n(e);return Wl=o,ix(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function Iae(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Mae:kae},fj=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},Lae=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return wq(n,r,i),Pae(function(){return _q(n,r,i)}),null},Dae=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 a=fj(t,n,r),u=a||cj(i),c=!u("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{h.push(d[0][0]);for(var p=d.length,m=1;mt(Bae(i)?n:i):t;return C.jsx(Oae,{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 Tq(e,t){return q$(e,t)}const $ae=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Fae=["values","unit","step"],zae=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 Uae(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ne(e,Fae),o=zae(t),s=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const v=s.indexOf(m);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]]:m)-r/100}${n})`}function d(p){return s.indexOf(p)+1`@media (min-width:${v4[e]}px)`};function Al(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||fj;return t.reduce((s,a,u)=>(s[o.up(o.keys[u])]=n(t[u]),s),{})}if(typeof t=="object"){const o=r.breakpoints||fj;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||v4).indexOf(a)!==-1){const u=o.up(a);s[u]=n(t[a],a)}else{const u=a;s[u]=t[u]}return s},{})}return n(t)}function Aq(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function Iq(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Wae(e,...t){const n=Aq(e),r=[n,...t].reduce((i,o)=>ts(i,o),{});return Iq(Object.keys(n),r)}function Gae(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 sL({values:e,breakpoints:t,base:n}){const r=n||Gae(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,u)=>(Array.isArray(e)?(s[a]=e[u]!=null?e[u]:e[o],o=u):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function WT(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 NE(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=WT(e,n)||r,t&&(i=t(i,r,e)),i}function Ln(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],u=s.theme,c=WT(u,r)||{};return Al(s,a,h=>{let p=NE(c,i,h);return h===p&&typeof h=="string"&&(p=NE(c,i,`${t}${h==="default"?"":De(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function Vae(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Xae={m:"margin",p:"padding"},qae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dj={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Yae=Vae(e=>{if(e.length>2)if(dj[e])e=dj[e];else return[e];const[t,n]=e.split(""),r=Xae[t],i=qae[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),y4=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],b4=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...y4,...b4];function pw(e,t,n,r){var i;const o=(i=WT(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 x4(e){return pw(e,"spacing",8)}function Op(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 Kae(e,t){return n=>e.reduce((r,i)=>(r[i]=Op(t,n),r),{})}function Qae(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=Yae(n),o=Kae(i,r),s=e[n];return Al(e,s,o)}function Rq(e,t){const n=x4(e.theme);return Object.keys(e).map(r=>Qae(e,t,r,n)).reduce(w1,{})}function Gr(e){return Rq(e,y4)}Gr.propTypes={};Gr.filterProps=y4;function Vr(e){return Rq(e,b4)}Vr.propTypes={};Vr.filterProps=b4;function Jae(e=8){if(e.mui)return e;const t=x4({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 GT(...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]?w1(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Xl(e){return typeof e!="number"?e:`${e}px solid`}const Zae=Ln({prop:"border",themeKey:"borders",transform:Xl}),ele=Ln({prop:"borderTop",themeKey:"borders",transform:Xl}),tle=Ln({prop:"borderRight",themeKey:"borders",transform:Xl}),nle=Ln({prop:"borderBottom",themeKey:"borders",transform:Xl}),rle=Ln({prop:"borderLeft",themeKey:"borders",transform:Xl}),ile=Ln({prop:"borderColor",themeKey:"palette"}),ole=Ln({prop:"borderTopColor",themeKey:"palette"}),sle=Ln({prop:"borderRightColor",themeKey:"palette"}),ale=Ln({prop:"borderBottomColor",themeKey:"palette"}),lle=Ln({prop:"borderLeftColor",themeKey:"palette"}),VT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=pw(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Op(t,r)});return Al(e,e.borderRadius,n)}return null};VT.propTypes={};VT.filterProps=["borderRadius"];GT(Zae,ele,tle,nle,rle,ile,ole,sle,ale,lle,VT);const XT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=pw(e.theme,"spacing",8),n=r=>({gap:Op(t,r)});return Al(e,e.gap,n)}return null};XT.propTypes={};XT.filterProps=["gap"];const qT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=pw(e.theme,"spacing",8),n=r=>({columnGap:Op(t,r)});return Al(e,e.columnGap,n)}return null};qT.propTypes={};qT.filterProps=["columnGap"];const YT=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=pw(e.theme,"spacing",8),n=r=>({rowGap:Op(t,r)});return Al(e,e.rowGap,n)}return null};YT.propTypes={};YT.filterProps=["rowGap"];const ule=Ln({prop:"gridColumn"}),cle=Ln({prop:"gridRow"}),fle=Ln({prop:"gridAutoFlow"}),dle=Ln({prop:"gridAutoColumns"}),hle=Ln({prop:"gridAutoRows"}),ple=Ln({prop:"gridTemplateColumns"}),gle=Ln({prop:"gridTemplateRows"}),mle=Ln({prop:"gridTemplateAreas"}),vle=Ln({prop:"gridArea"});GT(XT,qT,YT,ule,cle,fle,dle,hle,ple,gle,mle,vle);function um(e,t){return t==="grey"?t:e}const yle=Ln({prop:"color",themeKey:"palette",transform:um}),ble=Ln({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:um}),xle=Ln({prop:"backgroundColor",themeKey:"palette",transform:um});GT(yle,ble,xle);function Ls(e){return e<=1&&e!==0?`${e*100}%`:e}const wle=Ln({prop:"width",transform:Ls}),w4=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])||v4[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:Ls(n)}};return Al(e,e.maxWidth,t)}return null};w4.filterProps=["maxWidth"];const _le=Ln({prop:"minWidth",transform:Ls}),Sle=Ln({prop:"height",transform:Ls}),Ele=Ln({prop:"maxHeight",transform:Ls}),Cle=Ln({prop:"minHeight",transform:Ls});Ln({prop:"size",cssProperty:"width",transform:Ls});Ln({prop:"size",cssProperty:"height",transform:Ls});const Tle=Ln({prop:"boxSizing"});GT(wle,w4,_le,Sle,Ele,Cle,Tle);const Ale={border:{themeKey:"borders",transform:Xl},borderTop:{themeKey:"borders",transform:Xl},borderRight:{themeKey:"borders",transform:Xl},borderBottom:{themeKey:"borders",transform:Xl},borderLeft:{themeKey:"borders",transform:Xl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:VT},color:{themeKey:"palette",transform:um},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:um},backgroundColor:{themeKey:"palette",transform:um},p:{style:Vr},pt:{style:Vr},pr:{style:Vr},pb:{style:Vr},pl:{style:Vr},px:{style:Vr},py:{style:Vr},padding:{style:Vr},paddingTop:{style:Vr},paddingRight:{style:Vr},paddingBottom:{style:Vr},paddingLeft:{style:Vr},paddingX:{style:Vr},paddingY:{style:Vr},paddingInline:{style:Vr},paddingInlineStart:{style:Vr},paddingInlineEnd:{style:Vr},paddingBlock:{style:Vr},paddingBlockStart:{style:Vr},paddingBlockEnd:{style:Vr},m:{style:Gr},mt:{style:Gr},mr:{style:Gr},mb:{style:Gr},ml:{style:Gr},mx:{style:Gr},my:{style:Gr},margin:{style:Gr},marginTop:{style:Gr},marginRight:{style:Gr},marginBottom:{style:Gr},marginLeft:{style:Gr},marginX:{style:Gr},marginY:{style:Gr},marginInline:{style:Gr},marginInlineStart:{style:Gr},marginInlineEnd:{style:Gr},marginBlock:{style:Gr},marginBlockStart:{style:Gr},marginBlockEnd:{style:Gr},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:XT},rowGap:{style:YT},columnGap:{style:qT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ls},maxWidth:{style:w4},minWidth:{transform:Ls},height:{transform:Ls},maxHeight:{transform:Ls},minHeight:{transform:Ls},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},KT=Ale;function Ile(...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 Rle(e,t){return typeof e=="function"?e(t):e}function Ple(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:u=n,themeKey:c,transform:d,style:h}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=WT(i,c)||{};return h?h(s):Al(s,r,v=>{let y=NE(p,d,v);return v===y&&typeof v=="string"&&(y=NE(p,d,`${n}${v==="default"?"":De(v)}`,v)),u===!1?y:{[u]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:KT;function a(u){let c=u;if(typeof u=="function")c=u(o);else if(typeof u!="object")return u;if(!c)return null;const d=Aq(o.breakpoints),h=Object.keys(d);let p=d;return Object.keys(c).forEach(m=>{const v=Rle(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])p=w1(p,e(m,v,o,s));else{const y=Al({theme:o},v,S=>({[m]:S}));Ile(y,v)?p[m]=t({sx:v,theme:o}):p=w1(p,y)}else p=w1(p,e(m,v,o,s))}),Iq(h,p)}return Array.isArray(i)?i.map(a):a(i)}return t}const Pq=Ple();Pq.filterProps=["sx"];const QT=Pq,Ole=["breakpoints","palette","spacing","shape"];function JT(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ne(e,Ole),a=Uae(n),u=Jae(i);let c=ts({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:u,shape:$({},Hae,o)},s);return c=t.reduce((d,h)=>ts(d,h),c),c.unstable_sxConfig=$({},KT,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(h){return QT({sx:h,theme:this})},c}function Mle(e){return Object.keys(e).length===0}function ZT(e=null){const t=O.useContext(HT);return!t||Mle(t)?e:t}const kle=JT();function eA(e=kle){return ZT(e)}function Dle({styles:e,themeId:t,defaultTheme:n={}}){const r=eA(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(Bae,{styles:i})}const Lle=["sx"],Nle=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:KT;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function _4(e){const{sx:t}=e,n=Ne(e,Lle),{systemProps:r,otherProps:i}=Nle(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return ap(a)?$({},r,a):r}:o=$({},r,t),$({},i,{sx:o})}function Oq(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;ta!=="theme"&&a!=="sx"&&a!=="as"})(QT);return O.forwardRef(function(u,c){const d=eA(n),h=_4(u),{className:p,component:m="div"}=h,v=Ne(h,Ble);return C.jsx(o,$({as:m,ref:c,className:je(p,i?i(r):r),theme:t&&d[t]||d},v))})}const Fle=["variant"];function hj(e){return e.length===0}function Mq(e){const{variant:t}=e,n=Ne(e,Fle);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=hj(r)?e[i]:De(e[i]):r+=`${hj(r)?i:De(i)}${De(e[i].toString())}`}),r}const zle=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Ule(e){return Object.keys(e).length===0}function jle(e){return typeof e=="string"&&e.charCodeAt(0)>96}const Hle=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Wle=(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=Mq(i.props);r[o]=i.style}),r},Gle=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],a=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return a&&a.forEach(u=>{let c=!0;Object.keys(u.props).forEach(d=>{o[d]!==u.props[d]&&e[d]!==u.props[d]&&(c=!1)}),c&&s.push(t[Mq(u.props)])}),s};function _1(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vle=JT(),Xle=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function gb({defaultTheme:e,theme:t,themeId:n}){return Ule(t)?e:t[n]||t}function qle(e){return e?(t,n)=>n[e]:null}function kq(e={}){const{themeId:t,defaultTheme:n=Vle,rootShouldForwardProp:r=_1,slotShouldForwardProp:i=_1}=e,o=s=>QT($({},s,{theme:gb($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{$ae(s,E=>E.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:u,slot:c,skipVariantsResolver:d,skipSx:h,overridesResolver:p=qle(Xle(c))}=a,m=Ne(a,zle),v=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,y=h||!1;let S,w=_1;c==="Root"||c==="root"?w=r:c?w=i:jle(s)&&(w=void 0);const b=Tq(s,$({shouldForwardProp:w,label:S},m)),x=(E,...A)=>{const I=A?A.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N($({},H,{theme:gb($({},H,{defaultTheme:n,themeId:t}))})):N):[];let R=E;u&&p&&I.push(N=>{const H=gb($({},N,{defaultTheme:n,themeId:t})),V=Hle(u,H);if(V){const U={};return Object.entries(V).forEach(([D,F])=>{U[D]=typeof F=="function"?F($({},N,{theme:H})):F}),p(N,U)}return null}),u&&!v&&I.push(N=>{const H=gb($({},N,{defaultTheme:n,themeId:t}));return Gle(N,Wle(u,H),H,u)}),y||I.push(o);const M=I.length-A.length;if(Array.isArray(E)&&M>0){const N=new Array(M).fill("");R=[...E,...N],R.raw=[...E.raw,...N]}else typeof E=="function"&&E.__emotion_real!==E&&(R=N=>E($({},N,{theme:gb($({},N,{defaultTheme:n,themeId:t}))})));const L=b(R,...I);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const Yle=kq(),Kle=Yle;function Dq(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:a4(t.components[n].defaultProps,r)}function Lq({props:e,name:t,defaultTheme:n,themeId:r}){let i=eA(n);return r&&(i=i[r]||i),Dq({theme:i,name:t,props:e})}function S4(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function Qle(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 Mp(e){if(e.type)return e;if(e.charAt(0)==="#")return Mp(Qle(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ed(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(ed(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function tA(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 Jle(e){e=Mp(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let a="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",u.push(t[3])),tA({type:a,values:u})}function Y$(e){e=Mp(e);let t=e.type==="hsl"||e.type==="hsla"?Mp(Jle(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 Zle(e,t){const n=Y$(e),r=Y$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function An(e,t){return e=Mp(e),t=S4(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tA(e)}function hv(e,t){if(e=Mp(e),t=S4(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 tA(e)}function pv(e,t){if(e=Mp(e),t=S4(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 tA(e)}function eue(e,t=.15){return Y$(e)>.5?hv(e,t):pv(e,t)}const tue=O.createContext(null),Nq=tue;function Bq(){return O.useContext(Nq)}const nue=typeof Symbol=="function"&&Symbol.for,rue=nue?Symbol.for("mui.nested"):"__THEME_NESTED__";function iue(e,t){return typeof t=="function"?t(e):$({},e,t)}function oue(e){const{children:t,theme:n}=e,r=Bq(),i=O.useMemo(()=>{const o=r===null?n:iue(r,n);return o!=null&&(o[rue]=r!==null),o},[n,r]);return C.jsx(Nq.Provider,{value:i,children:t})}const pj={};function gj(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 sue(e){const{children:t,theme:n,themeId:r}=e,i=ZT(pj),o=Bq()||pj,s=gj(r,i,n),a=gj(r,o,n,!0);return C.jsx(oue,{theme:a,children:C.jsx(HT.Provider,{value:s,children:t})})}const aue=["component","direction","spacing","divider","children","className","useFlexGap"],lue=JT(),uue=Kle("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function cue(e){return Lq({props:e,name:"MuiStack",defaultTheme:lue})}function fue(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],hue=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},Al({theme:t},sL({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=x4(t),i=Object.keys(t.breakpoints.values).reduce((u,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(u[c]=!0),u),{}),o=sL({values:e.direction,base:i}),s=sL({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((u,c,d)=>{if(!o[u]){const p=c>0?o[d[c-1]]:"column";o[u]=p}}),n=ts(n,Al({theme:t},s,(u,c)=>e.useFlexGap?{gap:Op(r,u)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${due(c?o[c]:e.direction)}`]:Op(r,u)}}))}return n=Wae(t.breakpoints,n),n};function pue(e={}){const{createStyledComponent:t=uue,useThemeProps:n=cue,componentName:r="MuiStack"}=e,i=()=>It({root:["root"]},u=>Ct(r,u),{}),o=t(hue);return O.forwardRef(function(u,c){const d=n(u),h=_4(d),{component:p="div",direction:m="column",spacing:v=0,divider:y,children:S,className:w,useFlexGap:b=!1}=h,x=Ne(h,aue),E={direction:m,spacing:v,useFlexGap:b},A=i();return C.jsx(o,$({as:p,ownerState:E,ref:c,className:je(A.root,w)},x,{children:y?fue(S,y):S}))})}function gue(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const mue=["mode","contrastThreshold","tonalOffset"],mj={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:Im.white,default:Im.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}},aL={text:{primary:Im.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:Im.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 vj(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=pv(e.main,i):t==="dark"&&(e.dark=hv(e.main,o)))}function vue(e="light"){return e==="dark"?{main:df[200],light:df[50],dark:df[400]}:{main:df[700],light:df[400],dark:df[800]}}function yue(e="light"){return e==="dark"?{main:Xh[200],light:Xh[50],dark:Xh[400]}:{main:Xh[500],light:Xh[300],dark:Xh[700]}}function bue(e="light"){return e==="dark"?{main:ff[500],light:ff[300],dark:ff[700]}:{main:ff[700],light:ff[400],dark:ff[800]}}function xue(e="light"){return e==="dark"?{main:qh[400],light:qh[300],dark:qh[700]}:{main:qh[700],light:qh[500],dark:qh[900]}}function wue(e="light"){return e==="dark"?{main:hf[400],light:hf[300],dark:hf[700]}:{main:hf[800],light:hf[500],dark:hf[900]}}function _ue(e="light"){return e==="dark"?{main:sp[400],light:sp[300],dark:sp[700]}:{main:"#ed6c02",light:sp[500],dark:sp[900]}}function Sue(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ne(e,mue),o=e.primary||vue(t),s=e.secondary||yue(t),a=e.error||bue(t),u=e.info||xue(t),c=e.success||wue(t),d=e.warning||_ue(t);function h(y){return Zle(y,aL.text.primary)>=n?aL.text.primary:mj.text.primary}const p=({color:y,name:S,mainShade:w=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(ed(11,S?` (${S})`:"",w));if(typeof y.main!="string")throw new Error(ed(12,S?` (${S})`:"",JSON.stringify(y.main)));return vj(y,"light",b,r),vj(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},m={dark:aL,light:mj};return ts($({common:$({},Im),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:c,name:"success"}),grey:i4,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},m[t]),i)}const Eue=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Cue(e){return Math.round(e*1e5)/1e5}const yj={textTransform:"uppercase"},bj='"Roboto", "Helvetica", "Arial", sans-serif';function Tue(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=bj,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:h}=n,p=Ne(n,Eue),m=i/14,v=h||(w=>`${w/c*m}rem`),y=(w,b,x,E,A)=>$({fontFamily:r,fontWeight:w,fontSize:v(b),lineHeight:x},r===bj?{letterSpacing:`${Cue(E/b)}em`}:{},A,d),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(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,yj),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,yj),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ts($({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:u},S),p,{clone:!1})}const Aue=.2,Iue=.14,Rue=.12;function wr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Aue})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Iue})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rue})`].join(",")}const Pue=["none",wr(0,2,1,-1,0,1,1,0,0,1,3,0),wr(0,3,1,-2,0,2,2,0,0,1,5,0),wr(0,3,3,-2,0,3,4,0,0,1,8,0),wr(0,2,4,-1,0,4,5,0,0,1,10,0),wr(0,3,5,-1,0,5,8,0,0,1,14,0),wr(0,3,5,-1,0,6,10,0,0,1,18,0),wr(0,4,5,-2,0,7,10,1,0,2,16,1),wr(0,5,5,-3,0,8,10,1,0,3,14,2),wr(0,5,6,-3,0,9,12,1,0,3,16,2),wr(0,6,6,-3,0,10,14,1,0,4,18,3),wr(0,6,7,-4,0,11,15,1,0,4,20,3),wr(0,7,8,-4,0,12,17,2,0,5,22,4),wr(0,7,8,-4,0,13,19,2,0,5,24,4),wr(0,7,9,-4,0,14,21,2,0,5,26,4),wr(0,8,9,-5,0,15,22,2,0,6,28,5),wr(0,8,10,-5,0,16,24,2,0,6,30,5),wr(0,8,11,-5,0,17,26,2,0,6,32,5),wr(0,9,11,-5,0,18,28,2,0,7,34,6),wr(0,9,12,-6,0,19,29,2,0,7,36,6),wr(0,10,13,-6,0,20,31,3,0,8,38,7),wr(0,10,13,-6,0,21,33,3,0,8,40,7),wr(0,10,14,-6,0,22,35,3,0,8,42,7),wr(0,11,14,-7,0,23,36,3,0,9,44,8),wr(0,11,15,-7,0,24,38,3,0,9,46,8)],Oue=Pue,Mue=["duration","easing","delay"],kue={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)"},$q={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function xj(e){return`${Math.round(e)}ms`}function Due(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Lue(e){const t=$({},kue,e.easing),n=$({},$q,e.duration);return $({getAutoHeightDuration:Due,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:u=0}=o;return Ne(o,Mue),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:xj(s)} ${a} ${typeof u=="string"?u:xj(u)}`).join(",")}},e,{easing:t,duration:n})}const Nue={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Bue=Nue,$ue=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function E4(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ne(e,$ue);if(e.vars)throw new Error(ed(18));const a=Sue(r),u=JT(e);let c=ts(u,{mixins:gue(u.breakpoints,n),palette:a,shadows:Oue.slice(),typography:Tue(a,o),transitions:Lue(i),zIndex:$({},Bue)});return c=ts(c,s),c=t.reduce((d,h)=>ts(d,h),c),c.unstable_sxConfig=$({},KT,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(h){return QT({sx:h,theme:this})},c}const Fue=E4(),nA=Fue;function Dn(){const e=eA(nA);return e[Pp]||e}function Pt({props:e,name:t}){return Lq({props:e,name:t,defaultTheme:nA,themeId:Pp})}const ka=e=>_1(e)&&e!=="classes",C4=_1,zue=kq({themeId:Pp,defaultTheme:nA,rootShouldForwardProp:ka}),Ce=zue,Uue=["theme"];function jue(e){let{theme:t}=e,n=Ne(e,Uue);const r=t[Pp];return C.jsx(sue,$({},n,{themeId:r?Pp:void 0,theme:r||t}))}const Hue=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},wj=Hue;function Wue(e){return Ct("MuiSvgIcon",e)}Rt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Gue=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Vue=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return It(i,Wue,r)},Xue=Ce("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,u,c,d,h,p,m,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:((a=e.typography)==null||(u=a.pxToRem)==null?void 0:u.call(a,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,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:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),Fq=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,m=Ne(r,Gue),v=O.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:a,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:v}),S={};d||(S.viewBox=p);const w=Vue(y);return C.jsxs(Xue,$({as:a,className:je(w.root,o),focusable:"false",color:c,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,m,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});Fq.muiName="SvgIcon";const _j=Fq;function zt(e,t){function n(r,i){return C.jsx(_j,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=_j.muiName,O.memo(O.forwardRef(n))}var qn={};/** + */function Aq(e,t){return q$(e,t)}const Fae=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},zae=["values","unit","step"],Uae=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 jae(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ne(e,zae),o=Uae(t),s=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const v=s.indexOf(m);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]]:m)-r/100}${n})`}function d(p){return s.indexOf(p)+1`@media (min-width:${y4[e]}px)`};function Al(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||dj;return t.reduce((s,a,u)=>(s[o.up(o.keys[u])]=n(t[u]),s),{})}if(typeof t=="object"){const o=r.breakpoints||dj;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||y4).indexOf(a)!==-1){const u=o.up(a);s[u]=n(t[a],a)}else{const u=a;s[u]=t[u]}return s},{})}return n(t)}function Iq(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function Rq(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Gae(e,...t){const n=Iq(e),r=[n,...t].reduce((i,o)=>ts(i,o),{});return Rq(Object.keys(n),r)}function Vae(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 sD({values:e,breakpoints:t,base:n}){const r=n||Vae(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,u)=>(Array.isArray(e)?(s[a]=e[u]!=null?e[u]:e[o],o=u):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function WT(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 BE(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=WT(e,n)||r,t&&(i=t(i,r,e)),i}function Dn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],u=s.theme,c=WT(u,r)||{};return Al(s,a,h=>{let p=BE(c,i,h);return h===p&&typeof h=="string"&&(p=BE(c,i,`${t}${h==="default"?"":Le(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function Xae(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const qae={m:"margin",p:"padding"},Yae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},hj={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Kae=Xae(e=>{if(e.length>2)if(hj[e])e=hj[e];else return[e];const[t,n]=e.split(""),r=qae[t],i=Yae[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),b4=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],x4=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...b4,...x4];function gw(e,t,n,r){var i;const o=(i=WT(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 w4(e){return gw(e,"spacing",8)}function Op(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 Qae(e,t){return n=>e.reduce((r,i)=>(r[i]=Op(t,n),r),{})}function Jae(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=Kae(n),o=Qae(i,r),s=e[n];return Al(e,s,o)}function Pq(e,t){const n=w4(e.theme);return Object.keys(e).map(r=>Jae(e,t,r,n)).reduce(w1,{})}function Gr(e){return Pq(e,b4)}Gr.propTypes={};Gr.filterProps=b4;function Vr(e){return Pq(e,x4)}Vr.propTypes={};Vr.filterProps=x4;function Zae(e=8){if(e.mui)return e;const t=w4({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 GT(...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]?w1(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Xl(e){return typeof e!="number"?e:`${e}px solid`}const ele=Dn({prop:"border",themeKey:"borders",transform:Xl}),tle=Dn({prop:"borderTop",themeKey:"borders",transform:Xl}),nle=Dn({prop:"borderRight",themeKey:"borders",transform:Xl}),rle=Dn({prop:"borderBottom",themeKey:"borders",transform:Xl}),ile=Dn({prop:"borderLeft",themeKey:"borders",transform:Xl}),ole=Dn({prop:"borderColor",themeKey:"palette"}),sle=Dn({prop:"borderTopColor",themeKey:"palette"}),ale=Dn({prop:"borderRightColor",themeKey:"palette"}),lle=Dn({prop:"borderBottomColor",themeKey:"palette"}),ule=Dn({prop:"borderLeftColor",themeKey:"palette"}),VT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gw(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Op(t,r)});return Al(e,e.borderRadius,n)}return null};VT.propTypes={};VT.filterProps=["borderRadius"];GT(ele,tle,nle,rle,ile,ole,sle,ale,lle,ule,VT);const XT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gw(e.theme,"spacing",8),n=r=>({gap:Op(t,r)});return Al(e,e.gap,n)}return null};XT.propTypes={};XT.filterProps=["gap"];const qT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gw(e.theme,"spacing",8),n=r=>({columnGap:Op(t,r)});return Al(e,e.columnGap,n)}return null};qT.propTypes={};qT.filterProps=["columnGap"];const YT=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gw(e.theme,"spacing",8),n=r=>({rowGap:Op(t,r)});return Al(e,e.rowGap,n)}return null};YT.propTypes={};YT.filterProps=["rowGap"];const cle=Dn({prop:"gridColumn"}),fle=Dn({prop:"gridRow"}),dle=Dn({prop:"gridAutoFlow"}),hle=Dn({prop:"gridAutoColumns"}),ple=Dn({prop:"gridAutoRows"}),gle=Dn({prop:"gridTemplateColumns"}),mle=Dn({prop:"gridTemplateRows"}),vle=Dn({prop:"gridTemplateAreas"}),yle=Dn({prop:"gridArea"});GT(XT,qT,YT,cle,fle,dle,hle,ple,gle,mle,vle,yle);function um(e,t){return t==="grey"?t:e}const ble=Dn({prop:"color",themeKey:"palette",transform:um}),xle=Dn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:um}),wle=Dn({prop:"backgroundColor",themeKey:"palette",transform:um});GT(ble,xle,wle);function Ds(e){return e<=1&&e!==0?`${e*100}%`:e}const _le=Dn({prop:"width",transform:Ds}),_4=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])||y4[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:Ds(n)}};return Al(e,e.maxWidth,t)}return null};_4.filterProps=["maxWidth"];const Sle=Dn({prop:"minWidth",transform:Ds}),Ele=Dn({prop:"height",transform:Ds}),Cle=Dn({prop:"maxHeight",transform:Ds}),Tle=Dn({prop:"minHeight",transform:Ds});Dn({prop:"size",cssProperty:"width",transform:Ds});Dn({prop:"size",cssProperty:"height",transform:Ds});const Ale=Dn({prop:"boxSizing"});GT(_le,_4,Sle,Ele,Cle,Tle,Ale);const Ile={border:{themeKey:"borders",transform:Xl},borderTop:{themeKey:"borders",transform:Xl},borderRight:{themeKey:"borders",transform:Xl},borderBottom:{themeKey:"borders",transform:Xl},borderLeft:{themeKey:"borders",transform:Xl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:VT},color:{themeKey:"palette",transform:um},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:um},backgroundColor:{themeKey:"palette",transform:um},p:{style:Vr},pt:{style:Vr},pr:{style:Vr},pb:{style:Vr},pl:{style:Vr},px:{style:Vr},py:{style:Vr},padding:{style:Vr},paddingTop:{style:Vr},paddingRight:{style:Vr},paddingBottom:{style:Vr},paddingLeft:{style:Vr},paddingX:{style:Vr},paddingY:{style:Vr},paddingInline:{style:Vr},paddingInlineStart:{style:Vr},paddingInlineEnd:{style:Vr},paddingBlock:{style:Vr},paddingBlockStart:{style:Vr},paddingBlockEnd:{style:Vr},m:{style:Gr},mt:{style:Gr},mr:{style:Gr},mb:{style:Gr},ml:{style:Gr},mx:{style:Gr},my:{style:Gr},margin:{style:Gr},marginTop:{style:Gr},marginRight:{style:Gr},marginBottom:{style:Gr},marginLeft:{style:Gr},marginX:{style:Gr},marginY:{style:Gr},marginInline:{style:Gr},marginInlineStart:{style:Gr},marginInlineEnd:{style:Gr},marginBlock:{style:Gr},marginBlockStart:{style:Gr},marginBlockEnd:{style:Gr},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:XT},rowGap:{style:YT},columnGap:{style:qT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ds},maxWidth:{style:_4},minWidth:{transform:Ds},height:{transform:Ds},maxHeight:{transform:Ds},minHeight:{transform:Ds},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},KT=Ile;function Rle(...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 Ple(e,t){return typeof e=="function"?e(t):e}function Ole(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:u=n,themeKey:c,transform:d,style:h}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=WT(i,c)||{};return h?h(s):Al(s,r,v=>{let y=BE(p,d,v);return v===y&&typeof v=="string"&&(y=BE(p,d,`${n}${v==="default"?"":Le(v)}`,v)),u===!1?y:{[u]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:KT;function a(u){let c=u;if(typeof u=="function")c=u(o);else if(typeof u!="object")return u;if(!c)return null;const d=Iq(o.breakpoints),h=Object.keys(d);let p=d;return Object.keys(c).forEach(m=>{const v=Ple(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])p=w1(p,e(m,v,o,s));else{const y=Al({theme:o},v,S=>({[m]:S}));Rle(y,v)?p[m]=t({sx:v,theme:o}):p=w1(p,y)}else p=w1(p,e(m,v,o,s))}),Rq(h,p)}return Array.isArray(i)?i.map(a):a(i)}return t}const Oq=Ole();Oq.filterProps=["sx"];const QT=Oq,Mle=["breakpoints","palette","spacing","shape"];function JT(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ne(e,Mle),a=jae(n),u=Zae(i);let c=ts({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:u,shape:$({},Wae,o)},s);return c=t.reduce((d,h)=>ts(d,h),c),c.unstable_sxConfig=$({},KT,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(h){return QT({sx:h,theme:this})},c}function kle(e){return Object.keys(e).length===0}function ZT(e=null){const t=O.useContext(HT);return!t||kle(t)?e:t}const Lle=JT();function eA(e=Lle){return ZT(e)}function Dle({styles:e,themeId:t,defaultTheme:n={}}){const r=eA(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx($ae,{styles:i})}const Nle=["sx"],Ble=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:KT;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function S4(e){const{sx:t}=e,n=Ne(e,Nle),{systemProps:r,otherProps:i}=Ble(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return ap(a)?$({},r,a):r}:o=$({},r,t),$({},i,{sx:o})}function Mq(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;ta!=="theme"&&a!=="sx"&&a!=="as"})(QT);return O.forwardRef(function(u,c){const d=eA(n),h=S4(u),{className:p,component:m="div"}=h,v=Ne(h,$le);return C.jsx(o,$({as:m,ref:c,className:je(p,i?i(r):r),theme:t&&d[t]||d},v))})}const zle=["variant"];function pj(e){return e.length===0}function kq(e){const{variant:t}=e,n=Ne(e,zle);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=pj(r)?e[i]:Le(e[i]):r+=`${pj(r)?i:Le(i)}${Le(e[i].toString())}`}),r}const Ule=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function jle(e){return Object.keys(e).length===0}function Hle(e){return typeof e=="string"&&e.charCodeAt(0)>96}const Wle=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Gle=(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=kq(i.props);r[o]=i.style}),r},Vle=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],a=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return a&&a.forEach(u=>{let c=!0;Object.keys(u.props).forEach(d=>{o[d]!==u.props[d]&&e[d]!==u.props[d]&&(c=!1)}),c&&s.push(t[kq(u.props)])}),s};function _1(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Xle=JT(),qle=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function gb({defaultTheme:e,theme:t,themeId:n}){return jle(t)?e:t[n]||t}function Yle(e){return e?(t,n)=>n[e]:null}function Lq(e={}){const{themeId:t,defaultTheme:n=Xle,rootShouldForwardProp:r=_1,slotShouldForwardProp:i=_1}=e,o=s=>QT($({},s,{theme:gb($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{Fae(s,E=>E.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:u,slot:c,skipVariantsResolver:d,skipSx:h,overridesResolver:p=Yle(qle(c))}=a,m=Ne(a,Ule),v=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,y=h||!1;let S,w=_1;c==="Root"||c==="root"?w=r:c?w=i:Hle(s)&&(w=void 0);const b=Aq(s,$({shouldForwardProp:w,label:S},m)),x=(E,...A)=>{const I=A?A.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N($({},H,{theme:gb($({},H,{defaultTheme:n,themeId:t}))})):N):[];let R=E;u&&p&&I.push(N=>{const H=gb($({},N,{defaultTheme:n,themeId:t})),V=Wle(u,H);if(V){const U={};return Object.entries(V).forEach(([L,F])=>{U[L]=typeof F=="function"?F($({},N,{theme:H})):F}),p(N,U)}return null}),u&&!v&&I.push(N=>{const H=gb($({},N,{defaultTheme:n,themeId:t}));return Vle(N,Gle(u,H),H,u)}),y||I.push(o);const M=I.length-A.length;if(Array.isArray(E)&&M>0){const N=new Array(M).fill("");R=[...E,...N],R.raw=[...E.raw,...N]}else typeof E=="function"&&E.__emotion_real!==E&&(R=N=>E($({},N,{theme:gb($({},N,{defaultTheme:n,themeId:t}))})));const D=b(R,...I);return s.muiName&&(D.muiName=s.muiName),D};return b.withConfig&&(x.withConfig=b.withConfig),x}}const Kle=Lq(),Qle=Kle;function Dq(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:l4(t.components[n].defaultProps,r)}function Nq({props:e,name:t,defaultTheme:n,themeId:r}){let i=eA(n);return r&&(i=i[r]||i),Dq({theme:i,name:t,props:e})}function E4(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function Jle(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 Mp(e){if(e.type)return e;if(e.charAt(0)==="#")return Mp(Jle(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ed(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(ed(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function tA(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 Zle(e){e=Mp(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let a="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",u.push(t[3])),tA({type:a,values:u})}function Y$(e){e=Mp(e);let t=e.type==="hsl"||e.type==="hsla"?Mp(Zle(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 K$(e,t){const n=Y$(e),r=Y$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function An(e,t){return e=Mp(e),t=E4(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tA(e)}function hv(e,t){if(e=Mp(e),t=E4(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 tA(e)}function pv(e,t){if(e=Mp(e),t=E4(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 tA(e)}function eue(e,t=.15){return Y$(e)>.5?hv(e,t):pv(e,t)}const tue=O.createContext(null),Bq=tue;function $q(){return O.useContext(Bq)}const nue=typeof Symbol=="function"&&Symbol.for,rue=nue?Symbol.for("mui.nested"):"__THEME_NESTED__";function iue(e,t){return typeof t=="function"?t(e):$({},e,t)}function oue(e){const{children:t,theme:n}=e,r=$q(),i=O.useMemo(()=>{const o=r===null?n:iue(r,n);return o!=null&&(o[rue]=r!==null),o},[n,r]);return C.jsx(Bq.Provider,{value:i,children:t})}const gj={};function mj(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 sue(e){const{children:t,theme:n,themeId:r}=e,i=ZT(gj),o=$q()||gj,s=mj(r,i,n),a=mj(r,o,n,!0);return C.jsx(oue,{theme:a,children:C.jsx(HT.Provider,{value:s,children:t})})}const aue=["component","direction","spacing","divider","children","className","useFlexGap"],lue=JT(),uue=Qle("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function cue(e){return Nq({props:e,name:"MuiStack",defaultTheme:lue})}function fue(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],hue=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},Al({theme:t},sD({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=w4(t),i=Object.keys(t.breakpoints.values).reduce((u,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(u[c]=!0),u),{}),o=sD({values:e.direction,base:i}),s=sD({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((u,c,d)=>{if(!o[u]){const p=c>0?o[d[c-1]]:"column";o[u]=p}}),n=ts(n,Al({theme:t},s,(u,c)=>e.useFlexGap?{gap:Op(r,u)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${due(c?o[c]:e.direction)}`]:Op(r,u)}}))}return n=Gae(t.breakpoints,n),n};function pue(e={}){const{createStyledComponent:t=uue,useThemeProps:n=cue,componentName:r="MuiStack"}=e,i=()=>It({root:["root"]},u=>Ct(r,u),{}),o=t(hue);return O.forwardRef(function(u,c){const d=n(u),h=S4(d),{component:p="div",direction:m="column",spacing:v=0,divider:y,children:S,className:w,useFlexGap:b=!1}=h,x=Ne(h,aue),E={direction:m,spacing:v,useFlexGap:b},A=i();return C.jsx(o,$({as:p,ownerState:E,ref:c,className:je(A.root,w)},x,{children:y?fue(S,y):S}))})}function gue(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const mue=["mode","contrastThreshold","tonalOffset"],vj={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:Im.white,default:Im.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}},aD={text:{primary:Im.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:Im.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 yj(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=pv(e.main,i):t==="dark"&&(e.dark=hv(e.main,o)))}function vue(e="light"){return e==="dark"?{main:df[200],light:df[50],dark:df[400]}:{main:df[700],light:df[400],dark:df[800]}}function yue(e="light"){return e==="dark"?{main:Xh[200],light:Xh[50],dark:Xh[400]}:{main:Xh[500],light:Xh[300],dark:Xh[700]}}function bue(e="light"){return e==="dark"?{main:ff[500],light:ff[300],dark:ff[700]}:{main:ff[700],light:ff[400],dark:ff[800]}}function xue(e="light"){return e==="dark"?{main:qh[400],light:qh[300],dark:qh[700]}:{main:qh[700],light:qh[500],dark:qh[900]}}function wue(e="light"){return e==="dark"?{main:hf[400],light:hf[300],dark:hf[700]}:{main:hf[800],light:hf[500],dark:hf[900]}}function _ue(e="light"){return e==="dark"?{main:sp[400],light:sp[300],dark:sp[700]}:{main:"#ed6c02",light:sp[500],dark:sp[900]}}function Sue(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ne(e,mue),o=e.primary||vue(t),s=e.secondary||yue(t),a=e.error||bue(t),u=e.info||xue(t),c=e.success||wue(t),d=e.warning||_ue(t);function h(y){return K$(y,aD.text.primary)>=n?aD.text.primary:vj.text.primary}const p=({color:y,name:S,mainShade:w=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(ed(11,S?` (${S})`:"",w));if(typeof y.main!="string")throw new Error(ed(12,S?` (${S})`:"",JSON.stringify(y.main)));return yj(y,"light",b,r),yj(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},m={dark:aD,light:vj};return ts($({common:$({},Im),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:c,name:"success"}),grey:o4,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},m[t]),i)}const Eue=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Cue(e){return Math.round(e*1e5)/1e5}const bj={textTransform:"uppercase"},xj='"Roboto", "Helvetica", "Arial", sans-serif';function Tue(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=xj,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:h}=n,p=Ne(n,Eue),m=i/14,v=h||(w=>`${w/c*m}rem`),y=(w,b,x,E,A)=>$({fontFamily:r,fontWeight:w,fontSize:v(b),lineHeight:x},r===xj?{letterSpacing:`${Cue(E/b)}em`}:{},A,d),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(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,bj),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,bj),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ts($({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:u},S),p,{clone:!1})}const Aue=.2,Iue=.14,Rue=.12;function wr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Aue})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Iue})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rue})`].join(",")}const Pue=["none",wr(0,2,1,-1,0,1,1,0,0,1,3,0),wr(0,3,1,-2,0,2,2,0,0,1,5,0),wr(0,3,3,-2,0,3,4,0,0,1,8,0),wr(0,2,4,-1,0,4,5,0,0,1,10,0),wr(0,3,5,-1,0,5,8,0,0,1,14,0),wr(0,3,5,-1,0,6,10,0,0,1,18,0),wr(0,4,5,-2,0,7,10,1,0,2,16,1),wr(0,5,5,-3,0,8,10,1,0,3,14,2),wr(0,5,6,-3,0,9,12,1,0,3,16,2),wr(0,6,6,-3,0,10,14,1,0,4,18,3),wr(0,6,7,-4,0,11,15,1,0,4,20,3),wr(0,7,8,-4,0,12,17,2,0,5,22,4),wr(0,7,8,-4,0,13,19,2,0,5,24,4),wr(0,7,9,-4,0,14,21,2,0,5,26,4),wr(0,8,9,-5,0,15,22,2,0,6,28,5),wr(0,8,10,-5,0,16,24,2,0,6,30,5),wr(0,8,11,-5,0,17,26,2,0,6,32,5),wr(0,9,11,-5,0,18,28,2,0,7,34,6),wr(0,9,12,-6,0,19,29,2,0,7,36,6),wr(0,10,13,-6,0,20,31,3,0,8,38,7),wr(0,10,13,-6,0,21,33,3,0,8,40,7),wr(0,10,14,-6,0,22,35,3,0,8,42,7),wr(0,11,14,-7,0,23,36,3,0,9,44,8),wr(0,11,15,-7,0,24,38,3,0,9,46,8)],Oue=Pue,Mue=["duration","easing","delay"],kue={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)"},Fq={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function wj(e){return`${Math.round(e)}ms`}function Lue(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Due(e){const t=$({},kue,e.easing),n=$({},Fq,e.duration);return $({getAutoHeightDuration:Lue,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:u=0}=o;return Ne(o,Mue),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:wj(s)} ${a} ${typeof u=="string"?u:wj(u)}`).join(",")}},e,{easing:t,duration:n})}const Nue={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Bue=Nue,$ue=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function C4(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ne(e,$ue);if(e.vars)throw new Error(ed(18));const a=Sue(r),u=JT(e);let c=ts(u,{mixins:gue(u.breakpoints,n),palette:a,shadows:Oue.slice(),typography:Tue(a,o),transitions:Due(i),zIndex:$({},Bue)});return c=ts(c,s),c=t.reduce((d,h)=>ts(d,h),c),c.unstable_sxConfig=$({},KT,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(h){return QT({sx:h,theme:this})},c}const Fue=C4(),nA=Fue;function Ln(){const e=eA(nA);return e[Pp]||e}function Pt({props:e,name:t}){return Nq({props:e,name:t,defaultTheme:nA,themeId:Pp})}const ka=e=>_1(e)&&e!=="classes",T4=_1,zue=Lq({themeId:Pp,defaultTheme:nA,rootShouldForwardProp:ka}),Ce=zue,Uue=["theme"];function jue(e){let{theme:t}=e,n=Ne(e,Uue);const r=t[Pp];return C.jsx(sue,$({},n,{themeId:r?Pp:void 0,theme:r||t}))}const Hue=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},_j=Hue;function Wue(e){return Ct("MuiSvgIcon",e)}Rt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Gue=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Vue=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Le(t)}`,`fontSize${Le(n)}`]};return It(i,Wue,r)},Xue=Ce("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Le(n.color)}`],t[`fontSize${Le(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,u,c,d,h,p,m,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:((a=e.typography)==null||(u=a.pxToRem)==null?void 0:u.call(a,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,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:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),zq=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,m=Ne(r,Gue),v=O.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:a,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:v}),S={};d||(S.viewBox=p);const w=Vue(y);return C.jsxs(Xue,$({as:a,className:je(w.root,o),focusable:"false",color:c,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,m,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});zq.muiName="SvgIcon";const Sj=zq;function zt(e,t){function n(r,i){return C.jsx(Sj,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Sj.muiName,O.memo(O.forwardRef(n))}var qn={};/** * @license React * react-is.production.min.js * @@ -35,7 +35,7 @@ var hoe=Object.defineProperty;var poe=(e,t,n)=>t in e?hoe(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 T4=Symbol.for("react.element"),A4=Symbol.for("react.portal"),rA=Symbol.for("react.fragment"),iA=Symbol.for("react.strict_mode"),oA=Symbol.for("react.profiler"),sA=Symbol.for("react.provider"),aA=Symbol.for("react.context"),que=Symbol.for("react.server_context"),lA=Symbol.for("react.forward_ref"),uA=Symbol.for("react.suspense"),cA=Symbol.for("react.suspense_list"),fA=Symbol.for("react.memo"),dA=Symbol.for("react.lazy"),Yue=Symbol.for("react.offscreen"),zq;zq=Symbol.for("react.module.reference");function Da(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case T4:switch(e=e.type,e){case rA:case oA:case iA:case uA:case cA:return e;default:switch(e=e&&e.$$typeof,e){case que:case aA:case lA:case dA:case fA:case sA:return e;default:return t}}case A4:return t}}}qn.ContextConsumer=aA;qn.ContextProvider=sA;qn.Element=T4;qn.ForwardRef=lA;qn.Fragment=rA;qn.Lazy=dA;qn.Memo=fA;qn.Portal=A4;qn.Profiler=oA;qn.StrictMode=iA;qn.Suspense=uA;qn.SuspenseList=cA;qn.isAsyncMode=function(){return!1};qn.isConcurrentMode=function(){return!1};qn.isContextConsumer=function(e){return Da(e)===aA};qn.isContextProvider=function(e){return Da(e)===sA};qn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===T4};qn.isForwardRef=function(e){return Da(e)===lA};qn.isFragment=function(e){return Da(e)===rA};qn.isLazy=function(e){return Da(e)===dA};qn.isMemo=function(e){return Da(e)===fA};qn.isPortal=function(e){return Da(e)===A4};qn.isProfiler=function(e){return Da(e)===oA};qn.isStrictMode=function(e){return Da(e)===iA};qn.isSuspense=function(e){return Da(e)===uA};qn.isSuspenseList=function(e){return Da(e)===cA};qn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rA||e===oA||e===iA||e===uA||e===cA||e===Yue||typeof e=="object"&&e!==null&&(e.$$typeof===dA||e.$$typeof===fA||e.$$typeof===sA||e.$$typeof===aA||e.$$typeof===lA||e.$$typeof===zq||e.getModuleId!==void 0)};qn.typeOf=Da;function K$(e,t){return K$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},K$(e,t)}function hA(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,K$(e,t)}var Uq={exports:{}},na={},jq={exports:{}},Hq={};/** + */var A4=Symbol.for("react.element"),I4=Symbol.for("react.portal"),rA=Symbol.for("react.fragment"),iA=Symbol.for("react.strict_mode"),oA=Symbol.for("react.profiler"),sA=Symbol.for("react.provider"),aA=Symbol.for("react.context"),que=Symbol.for("react.server_context"),lA=Symbol.for("react.forward_ref"),uA=Symbol.for("react.suspense"),cA=Symbol.for("react.suspense_list"),fA=Symbol.for("react.memo"),dA=Symbol.for("react.lazy"),Yue=Symbol.for("react.offscreen"),Uq;Uq=Symbol.for("react.module.reference");function La(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case A4:switch(e=e.type,e){case rA:case oA:case iA:case uA:case cA:return e;default:switch(e=e&&e.$$typeof,e){case que:case aA:case lA:case dA:case fA:case sA:return e;default:return t}}case I4:return t}}}qn.ContextConsumer=aA;qn.ContextProvider=sA;qn.Element=A4;qn.ForwardRef=lA;qn.Fragment=rA;qn.Lazy=dA;qn.Memo=fA;qn.Portal=I4;qn.Profiler=oA;qn.StrictMode=iA;qn.Suspense=uA;qn.SuspenseList=cA;qn.isAsyncMode=function(){return!1};qn.isConcurrentMode=function(){return!1};qn.isContextConsumer=function(e){return La(e)===aA};qn.isContextProvider=function(e){return La(e)===sA};qn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===A4};qn.isForwardRef=function(e){return La(e)===lA};qn.isFragment=function(e){return La(e)===rA};qn.isLazy=function(e){return La(e)===dA};qn.isMemo=function(e){return La(e)===fA};qn.isPortal=function(e){return La(e)===I4};qn.isProfiler=function(e){return La(e)===oA};qn.isStrictMode=function(e){return La(e)===iA};qn.isSuspense=function(e){return La(e)===uA};qn.isSuspenseList=function(e){return La(e)===cA};qn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rA||e===oA||e===iA||e===uA||e===cA||e===Yue||typeof e=="object"&&e!==null&&(e.$$typeof===dA||e.$$typeof===fA||e.$$typeof===sA||e.$$typeof===aA||e.$$typeof===lA||e.$$typeof===Uq||e.getModuleId!==void 0)};qn.typeOf=La;function Q$(e,t){return Q$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Q$(e,t)}function hA(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Q$(e,t)}var jq={exports:{}},na={},Hq={exports:{}},Wq={};/** * @license React * scheduler.production.min.js * @@ -43,7 +43,7 @@ var hoe=Object.defineProperty;var poe=(e,t,n)=>t in e?hoe(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 q=W.length;W.push(K);e:for(;0>>1,re=W[Q];if(0>>1;Qi(se,q))Ji(ae,se)?(W[Q]=ae,W[J]=q,Q=J):(W[Q]=se,W[ce]=q,Q=ce);else if(Ji(ae,q))W[Q]=ae,W[J]=q,Q=J;else break e}}return K}function i(W,K){var q=W.sortIndex-K.sortIndex;return q!==0?q: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,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],d=1,h=null,p=3,m=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,w=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(c);K!==null;){if(K.callback===null)r(c);else if(K.startTime<=W)r(c),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(c)}}function E(W){if(y=!1,x(W),!v)if(n(u)!==null)v=!0,z(A);else{var K=n(c);K!==null&&G(E,K.startTime-W)}}function A(W,K){v=!1,y&&(y=!1,w(M),M=-1),m=!0;var q=p;try{for(x(K),h=n(u);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(u)&&r(u),x(K)}else r(u);h=n(u)}if(h!==null)var ue=!0;else{var ce=n(c);ce!==null&&G(E,ce.startTime-K),ue=!1}return ue}finally{h=null,p=q,m=!1}}var I=!1,R=null,M=-1,L=5,N=-1;function H(){return!(e.unstable_now()-NW||125Q?(W.sortIndex=q,t(c,W),n(u)===null&&W===n(c)&&(y?(w(M),M=-1):y=!0,G(E,q-Q))):(W.sortIndex=re,t(u,W),v||m||(v=!0,z(A))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var K=p;return function(){var q=p;p=K;try{return W.apply(this,arguments)}finally{p=q}}}})(Hq);jq.exports=Hq;var Kue=jq.exports;/** + */(function(e){function t(W,K){var q=W.length;W.push(K);e:for(;0>>1,re=W[Q];if(0>>1;Qi(se,q))Ji(ae,se)?(W[Q]=ae,W[J]=q,Q=J):(W[Q]=se,W[ce]=q,Q=ce);else if(Ji(ae,q))W[Q]=ae,W[J]=q,Q=J;else break e}}return K}function i(W,K){var q=W.sortIndex-K.sortIndex;return q!==0?q: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,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],d=1,h=null,p=3,m=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,w=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(c);K!==null;){if(K.callback===null)r(c);else if(K.startTime<=W)r(c),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(c)}}function E(W){if(y=!1,x(W),!v)if(n(u)!==null)v=!0,z(A);else{var K=n(c);K!==null&&G(E,K.startTime-W)}}function A(W,K){v=!1,y&&(y=!1,w(M),M=-1),m=!0;var q=p;try{for(x(K),h=n(u);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(u)&&r(u),x(K)}else r(u);h=n(u)}if(h!==null)var ue=!0;else{var ce=n(c);ce!==null&&G(E,ce.startTime-K),ue=!1}return ue}finally{h=null,p=q,m=!1}}var I=!1,R=null,M=-1,D=5,N=-1;function H(){return!(e.unstable_now()-NW||125Q?(W.sortIndex=q,t(c,W),n(u)===null&&W===n(c)&&(y?(w(M),M=-1):y=!0,G(E,q-Q))):(W.sortIndex=re,t(u,W),v||m||(v=!0,z(A))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var K=p;return function(){var q=p;p=K;try{return W.apply(this,arguments)}finally{p=q}}}})(Wq);Hq.exports=Wq;var Kue=Hq.exports;/** * @license React * react-dom.production.min.js * @@ -51,14 +51,14 @@ var hoe=Object.defineProperty;var poe=(e,t,n)=>t in e?hoe(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 Wq=O,Ks=Kue;function ke(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"),Q$=Object.prototype.hasOwnProperty,Que=/^[: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]*$/,Sj={},Ej={};function Jue(e){return Q$.call(Ej,e)?!0:Q$.call(Sj,e)?!1:Que.test(e)?Ej[e]=!0:(Sj[e]=!0,!1)}function Zue(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 ece(e,t,n,r){if(t===null||typeof t>"u"||Zue(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 Ho(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 no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new Ho(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new Ho(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new Ho(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){no[e]=new Ho(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){no[e]=new Ho(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){no[e]=new Ho(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){no[e]=new Ho(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){no[e]=new Ho(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){no[e]=new Ho(e,5,!1,e.toLowerCase(),null,!1,!1)});var I4=/[\-:]([a-z])/g;function R4(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(I4,R4);no[t]=new Ho(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(I4,R4);no[t]=new Ho(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(I4,R4);no[t]=new Ho(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){no[e]=new Ho(e,1,!1,e.toLowerCase(),null,!1,!1)});no.xlinkHref=new Ho("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){no[e]=new Ho(e,1,!1,e.toLowerCase(),null,!0,!0)});function P4(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),J$=Object.prototype.hasOwnProperty,Que=/^[: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]*$/,Ej={},Cj={};function Jue(e){return J$.call(Cj,e)?!0:J$.call(Ej,e)?!1:Que.test(e)?Cj[e]=!0:(Ej[e]=!0,!1)}function Zue(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 ece(e,t,n,r){if(t===null||typeof t>"u"||Zue(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 Ho(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 no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new Ho(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new Ho(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new Ho(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){no[e]=new Ho(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){no[e]=new Ho(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){no[e]=new Ho(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){no[e]=new Ho(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){no[e]=new Ho(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){no[e]=new Ho(e,5,!1,e.toLowerCase(),null,!1,!1)});var R4=/[\-:]([a-z])/g;function P4(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(R4,P4);no[t]=new Ho(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(R4,P4);no[t]=new Ho(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(R4,P4);no[t]=new Ho(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){no[e]=new Ho(e,1,!1,e.toLowerCase(),null,!1,!1)});no.xlinkHref=new Ho("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){no[e]=new Ho(e,1,!1,e.toLowerCase(),null,!0,!0)});function O4(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var u=` -`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{uL=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zb(e):""}function tce(e){switch(e.tag){case 5:return Zb(e.type);case 16:return Zb("Lazy");case 13:return Zb("Suspense");case 19:return Zb("SuspenseList");case 0:case 2:case 15:return e=cL(e.type,!1),e;case 11:return e=cL(e.type.render,!1),e;case 1:return e=cL(e.type,!0),e;default:return""}}function tF(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 Fg:return"Fragment";case $g:return"Portal";case J$:return"Profiler";case O4:return"StrictMode";case Z$:return"Suspense";case eF:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xq:return(e.displayName||"Context")+".Consumer";case Vq:return(e._context.displayName||"Context")+".Provider";case M4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case k4:return t=e.displayName||null,t!==null?t:tF(e.type)||"Memo";case pf:t=e._payload,e=e._init;try{return tF(e(t))}catch{}}return null}function nce(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 tF(t);case 8:return t===O4?"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 td(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yq(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rce(e){var t=Yq(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 r_(e){e._valueTracker||(e._valueTracker=rce(e))}function Kq(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yq(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function BE(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 nF(e,t){var n=t.checked;return Ur({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tj(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=td(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 Qq(e,t){t=t.checked,t!=null&&P4(e,"checked",t,!1)}function rF(e,t){Qq(e,t);var n=td(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")?iF(e,t.type,n):t.hasOwnProperty("defaultValue")&&iF(e,t.type,td(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Aj(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 iF(e,t,n){(t!=="number"||BE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var e1=Array.isArray;function cm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=i_.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var S1={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},ice=["Webkit","ms","Moz","O"];Object.keys(S1).forEach(function(e){ice.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),S1[t]=S1[e]})});function tY(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||S1.hasOwnProperty(e)&&S1[e]?(""+t).trim():t+"px"}function nY(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tY(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var oce=Ur({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 aF(e,t){if(t){if(oce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ke(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ke(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ke(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ke(62))}}function lF(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 uF=null;function D4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cF=null,fm=null,dm=null;function Pj(e){if(e=vw(e)){if(typeof cF!="function")throw Error(ke(280));var t=e.stateNode;t&&(t=yA(t),cF(e.stateNode,e.type,t))}}function rY(e){fm?dm?dm.push(e):dm=[e]:fm=e}function iY(){if(fm){var e=fm,t=dm;if(dm=fm=null,Pj(e),t)for(e=0;e>>=0,e===0?32:31-(mce(e)/vce|0)|0}var o_=64,s_=4194304;function t1(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 UE(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 a=s&~i;a!==0?r=t1(a):(o&=s,o!==0&&(r=t1(o)))}else s=n&~i,s!==0?r=t1(s):o!==0&&(r=t1(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 gw(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bl(t),e[t]=n}function wce(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=C1),Fj=String.fromCharCode(32),zj=!1;function EY(e,t){switch(e){case"keyup":return Yce.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zg=!1;function Qce(e,t){switch(e){case"compositionend":return CY(t);case"keypress":return t.which!==32?null:(zj=!0,Fj);case"textInput":return e=t.data,e===Fj&&zj?null:e;default:return null}}function Jce(e,t){if(zg)return e==="compositionend"||!j4&&EY(e,t)?(e=_Y(),qS=F4=Af=null,zg=!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=Wj(n)}}function RY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?RY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PY(){for(var e=window,t=BE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=BE(e.document)}return t}function H4(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 afe(e){var t=PY(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&RY(n.ownerDocument.documentElement,n)){if(r!==null&&H4(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=Gj(n,o);var s=Gj(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,Ug=null,mF=null,A1=null,vF=!1;function Vj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vF||Ug==null||Ug!==BE(r)||(r=Ug,"selectionStart"in r&&H4(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}),A1&&dx(A1,r)||(A1=r,r=WE(mF,"onSelect"),0Wg||(e.current=SF[Wg],SF[Wg]=null,Wg--)}function ur(e,t){Wg++,SF[Wg]=e.current,e.current=t}var nd={},yo=hd(nd),ns=hd(!1),kp=nd;function Om(e,t){var n=e.type.contextTypes;if(!n)return nd;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 rs(e){return e=e.childContextTypes,e!=null}function VE(){xr(ns),xr(yo)}function Zj(e,t,n){if(yo.current!==nd)throw Error(ke(168));ur(yo,t),ur(ns,n)}function FY(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(ke(108,nce(e)||"Unknown",i));return Ur({},n,r)}function XE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nd,kp=yo.current,ur(yo,e),ur(ns,ns.current),!0}function e8(e,t,n){var r=e.stateNode;if(!r)throw Error(ke(169));n?(e=FY(e,t,kp),r.__reactInternalMemoizedMergedChildContext=e,xr(ns),xr(yo),ur(yo,e)):xr(ns),ur(ns,n)}var xc=null,bA=!1,EL=!1;function zY(e){xc===null?xc=[e]:xc.push(e)}function bfe(e){bA=!0,zY(e)}function pd(){if(!EL&&xc!==null){EL=!0;var e=0,t=Un;try{var n=xc;for(Un=1;e>=s,i-=s,Ec=1<<32-bl(t)+i|n<M?(L=R,R=null):L=R.sibling;var N=p(w,R,x[M],E);if(N===null){R===null&&(R=L);break}e&&R&&N.alternate===null&&t(w,R),b=o(N,b,M),I===null?A=N:I.sibling=N,I=N,R=L}if(M===x.length)return n(w,R),_r&&Yh(w,M),A;if(R===null){for(;MM?(L=R,R=null):L=R.sibling;var H=p(w,R,N.value,E);if(H===null){R===null&&(R=L);break}e&&R&&H.alternate===null&&t(w,R),b=o(H,b,M),I===null?A=H:I.sibling=H,I=H,R=L}if(N.done)return n(w,R),_r&&Yh(w,M),A;if(R===null){for(;!N.done;M++,N=x.next())N=h(w,N.value,E),N!==null&&(b=o(N,b,M),I===null?A=N:I.sibling=N,I=N);return _r&&Yh(w,M),A}for(R=r(w,R);!N.done;M++,N=x.next())N=m(R,w,M,N.value,E),N!==null&&(e&&N.alternate!==null&&R.delete(N.key===null?M:N.key),b=o(N,b,M),I===null?A=N:I.sibling=N,I=N);return e&&R.forEach(function(V){return t(w,V)}),_r&&Yh(w,M),A}function S(w,b,x,E){if(typeof x=="object"&&x!==null&&x.type===Fg&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case n_:e:{for(var A=x.key,I=b;I!==null;){if(I.key===A){if(A=x.type,A===Fg){if(I.tag===7){n(w,I.sibling),b=i(I,x.props.children),b.return=w,w=b;break e}}else if(I.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===pf&&a8(A)===I.type){n(w,I.sibling),b=i(I,x.props),b.ref=wb(w,I,x),b.return=w,w=b;break e}n(w,I);break}else t(w,I);I=I.sibling}x.type===Fg?(b=xp(x.props.children,w.mode,E,x.key),b.return=w,w=b):(E=nE(x.type,x.key,x.props,null,w.mode,E),E.ref=wb(w,b,x),E.return=w,w=E)}return s(w);case $g:e:{for(I=x.key;b!==null;){if(b.key===I)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(w,b.sibling),b=i(b,x.children||[]),b.return=w,w=b;break e}else{n(w,b);break}else t(w,b);b=b.sibling}b=ML(x,w.mode,E),b.return=w,w=b}return s(w);case pf:return I=x._init,S(w,b,I(x._payload),E)}if(e1(x))return v(w,b,x,E);if(mb(x))return y(w,b,x,E);h_(w,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(w,b.sibling),b=i(b,x),b.return=w,w=b):(n(w,b),b=OL(x,w.mode,E),b.return=w,w=b),s(w)):n(w,b)}return S}var km=qY(!0),YY=qY(!1),yw={},eu=hd(yw),mx=hd(yw),vx=hd(yw);function fp(e){if(e===yw)throw Error(ke(174));return e}function J4(e,t){switch(ur(vx,t),ur(mx,e),ur(eu,yw),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sF(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sF(t,e)}xr(eu),ur(eu,t)}function Dm(){xr(eu),xr(mx),xr(vx)}function KY(e){fp(vx.current);var t=fp(eu.current),n=sF(t,e.type);t!==n&&(ur(mx,e),ur(eu,n))}function Z4(e){mx.current===e&&(xr(eu),xr(mx))}var Nr=hd(0);function ZE(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 CL=[];function ez(){for(var e=0;en?n:4,e(!0);var r=TL.transition;TL.transition={};try{e(!1),t()}finally{Un=n,TL.transition=r}}function dK(){return Ia().memoizedState}function Sfe(e,t,n){var r=Hf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hK(e))pK(t,n);else if(n=WY(e,t,n,r),n!==null){var i=zo();xl(n,e,r,i),gK(n,t,r)}}function Efe(e,t,n){var r=Hf(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hK(e))pK(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,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Il(a,s)){var u=t.interleaved;u===null?(i.next=i,K4(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=WY(e,t,i,r),n!==null&&(i=zo(),xl(n,e,r,i),gK(n,t,r))}}function hK(e){var t=e.alternate;return e===zr||t!==null&&t===zr}function pK(e,t){I1=eC=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gK(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,N4(e,n)}}var tC={readContext:Aa,useCallback:oo,useContext:oo,useEffect:oo,useImperativeHandle:oo,useInsertionEffect:oo,useLayoutEffect:oo,useMemo:oo,useReducer:oo,useRef:oo,useState:oo,useDebugValue:oo,useDeferredValue:oo,useTransition:oo,useMutableSource:oo,useSyncExternalStore:oo,useId:oo,unstable_isNewReconciler:!1},Cfe={readContext:Aa,useCallback:function(e,t){return Ul().memoizedState=[e,t===void 0?null:t],e},useContext:Aa,useEffect:u8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,JS(4194308,4,aK.bind(null,t,e),n)},useLayoutEffect:function(e,t){return JS(4194308,4,e,t)},useInsertionEffect:function(e,t){return JS(4,2,e,t)},useMemo:function(e,t){var n=Ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ul();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=Sfe.bind(null,zr,e),[r.memoizedState,e]},useRef:function(e){var t=Ul();return e={current:e},t.memoizedState=e},useState:l8,useDebugValue:oz,useDeferredValue:function(e){return Ul().memoizedState=e},useTransition:function(){var e=l8(!1),t=e[0];return e=_fe.bind(null,e[1]),Ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=zr,i=Ul();if(_r){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=t(),Pi===null)throw Error(ke(349));Lp&30||ZY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,u8(tK.bind(null,r,o,e),[e]),r.flags|=2048,xx(9,eK.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ul(),t=Pi.identifierPrefix;if(_r){var n=Cc,r=Ec;n=(r&~(1<<32-bl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yx++,0")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{uD=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zb(e):""}function tce(e){switch(e.tag){case 5:return Zb(e.type);case 16:return Zb("Lazy");case 13:return Zb("Suspense");case 19:return Zb("SuspenseList");case 0:case 2:case 15:return e=cD(e.type,!1),e;case 11:return e=cD(e.type.render,!1),e;case 1:return e=cD(e.type,!0),e;default:return""}}function nF(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 Fg:return"Fragment";case $g:return"Portal";case Z$:return"Profiler";case M4:return"StrictMode";case eF:return"Suspense";case tF:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qq:return(e.displayName||"Context")+".Consumer";case Xq:return(e._context.displayName||"Context")+".Provider";case k4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L4:return t=e.displayName||null,t!==null?t:nF(e.type)||"Memo";case pf:t=e._payload,e=e._init;try{return nF(e(t))}catch{}}return null}function nce(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 nF(t);case 8:return t===M4?"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 td(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kq(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rce(e){var t=Kq(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 i_(e){e._valueTracker||(e._valueTracker=rce(e))}function Qq(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kq(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $E(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 rF(e,t){var n=t.checked;return Ur({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Aj(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=td(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 Jq(e,t){t=t.checked,t!=null&&O4(e,"checked",t,!1)}function iF(e,t){Jq(e,t);var n=td(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")?oF(e,t.type,n):t.hasOwnProperty("defaultValue")&&oF(e,t.type,td(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ij(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 oF(e,t,n){(t!=="number"||$E(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var e1=Array.isArray;function cm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=o_.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var S1={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},ice=["Webkit","ms","Moz","O"];Object.keys(S1).forEach(function(e){ice.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),S1[t]=S1[e]})});function nY(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||S1.hasOwnProperty(e)&&S1[e]?(""+t).trim():t+"px"}function rY(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=nY(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var oce=Ur({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 lF(e,t){if(t){if(oce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ke(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ke(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ke(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ke(62))}}function uF(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 cF=null;function D4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fF=null,fm=null,dm=null;function Oj(e){if(e=yw(e)){if(typeof fF!="function")throw Error(ke(280));var t=e.stateNode;t&&(t=yA(t),fF(e.stateNode,e.type,t))}}function iY(e){fm?dm?dm.push(e):dm=[e]:fm=e}function oY(){if(fm){var e=fm,t=dm;if(dm=fm=null,Oj(e),t)for(e=0;e>>=0,e===0?32:31-(mce(e)/vce|0)|0}var s_=64,a_=4194304;function t1(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 jE(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 a=s&~i;a!==0?r=t1(a):(o&=s,o!==0&&(r=t1(o)))}else s=n&~i,s!==0?r=t1(s):o!==0&&(r=t1(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 mw(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bl(t),e[t]=n}function wce(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=C1),zj=String.fromCharCode(32),Uj=!1;function CY(e,t){switch(e){case"keyup":return Yce.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zg=!1;function Qce(e,t){switch(e){case"compositionend":return TY(t);case"keypress":return t.which!==32?null:(Uj=!0,zj);case"textInput":return e=t.data,e===zj&&Uj?null:e;default:return null}}function Jce(e,t){if(zg)return e==="compositionend"||!H4&&CY(e,t)?(e=SY(),YS=z4=Af=null,zg=!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=Gj(n)}}function PY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function OY(){for(var e=window,t=$E();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$E(e.document)}return t}function W4(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 afe(e){var t=OY(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&PY(n.ownerDocument.documentElement,n)){if(r!==null&&W4(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=Vj(n,o);var s=Vj(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,Ug=null,vF=null,A1=null,yF=!1;function Xj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yF||Ug==null||Ug!==$E(r)||(r=Ug,"selectionStart"in r&&W4(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}),A1&&dx(A1,r)||(A1=r,r=GE(vF,"onSelect"),0Wg||(e.current=EF[Wg],EF[Wg]=null,Wg--)}function ur(e,t){Wg++,EF[Wg]=e.current,e.current=t}var nd={},yo=hd(nd),ns=hd(!1),kp=nd;function Om(e,t){var n=e.type.contextTypes;if(!n)return nd;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 rs(e){return e=e.childContextTypes,e!=null}function XE(){xr(ns),xr(yo)}function e8(e,t,n){if(yo.current!==nd)throw Error(ke(168));ur(yo,t),ur(ns,n)}function zY(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(ke(108,nce(e)||"Unknown",i));return Ur({},n,r)}function qE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nd,kp=yo.current,ur(yo,e),ur(ns,ns.current),!0}function t8(e,t,n){var r=e.stateNode;if(!r)throw Error(ke(169));n?(e=zY(e,t,kp),r.__reactInternalMemoizedMergedChildContext=e,xr(ns),xr(yo),ur(yo,e)):xr(ns),ur(ns,n)}var xc=null,bA=!1,ED=!1;function UY(e){xc===null?xc=[e]:xc.push(e)}function bfe(e){bA=!0,UY(e)}function pd(){if(!ED&&xc!==null){ED=!0;var e=0,t=Un;try{var n=xc;for(Un=1;e>=s,i-=s,Ec=1<<32-bl(t)+i|n<M?(D=R,R=null):D=R.sibling;var N=p(w,R,x[M],E);if(N===null){R===null&&(R=D);break}e&&R&&N.alternate===null&&t(w,R),b=o(N,b,M),I===null?A=N:I.sibling=N,I=N,R=D}if(M===x.length)return n(w,R),_r&&Yh(w,M),A;if(R===null){for(;MM?(D=R,R=null):D=R.sibling;var H=p(w,R,N.value,E);if(H===null){R===null&&(R=D);break}e&&R&&H.alternate===null&&t(w,R),b=o(H,b,M),I===null?A=H:I.sibling=H,I=H,R=D}if(N.done)return n(w,R),_r&&Yh(w,M),A;if(R===null){for(;!N.done;M++,N=x.next())N=h(w,N.value,E),N!==null&&(b=o(N,b,M),I===null?A=N:I.sibling=N,I=N);return _r&&Yh(w,M),A}for(R=r(w,R);!N.done;M++,N=x.next())N=m(R,w,M,N.value,E),N!==null&&(e&&N.alternate!==null&&R.delete(N.key===null?M:N.key),b=o(N,b,M),I===null?A=N:I.sibling=N,I=N);return e&&R.forEach(function(V){return t(w,V)}),_r&&Yh(w,M),A}function S(w,b,x,E){if(typeof x=="object"&&x!==null&&x.type===Fg&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case r_:e:{for(var A=x.key,I=b;I!==null;){if(I.key===A){if(A=x.type,A===Fg){if(I.tag===7){n(w,I.sibling),b=i(I,x.props.children),b.return=w,w=b;break e}}else if(I.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===pf&&l8(A)===I.type){n(w,I.sibling),b=i(I,x.props),b.ref=wb(w,I,x),b.return=w,w=b;break e}n(w,I);break}else t(w,I);I=I.sibling}x.type===Fg?(b=xp(x.props.children,w.mode,E,x.key),b.return=w,w=b):(E=rE(x.type,x.key,x.props,null,w.mode,E),E.ref=wb(w,b,x),E.return=w,w=E)}return s(w);case $g:e:{for(I=x.key;b!==null;){if(b.key===I)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(w,b.sibling),b=i(b,x.children||[]),b.return=w,w=b;break e}else{n(w,b);break}else t(w,b);b=b.sibling}b=MD(x,w.mode,E),b.return=w,w=b}return s(w);case pf:return I=x._init,S(w,b,I(x._payload),E)}if(e1(x))return v(w,b,x,E);if(mb(x))return y(w,b,x,E);p_(w,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(w,b.sibling),b=i(b,x),b.return=w,w=b):(n(w,b),b=OD(x,w.mode,E),b.return=w,w=b),s(w)):n(w,b)}return S}var km=YY(!0),KY=YY(!1),bw={},eu=hd(bw),mx=hd(bw),vx=hd(bw);function fp(e){if(e===bw)throw Error(ke(174));return e}function Z4(e,t){switch(ur(vx,t),ur(mx,e),ur(eu,bw),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:aF(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=aF(t,e)}xr(eu),ur(eu,t)}function Lm(){xr(eu),xr(mx),xr(vx)}function QY(e){fp(vx.current);var t=fp(eu.current),n=aF(t,e.type);t!==n&&(ur(mx,e),ur(eu,n))}function ez(e){mx.current===e&&(xr(eu),xr(mx))}var Nr=hd(0);function eC(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 CD=[];function tz(){for(var e=0;en?n:4,e(!0);var r=TD.transition;TD.transition={};try{e(!1),t()}finally{Un=n,TD.transition=r}}function hK(){return Ia().memoizedState}function Sfe(e,t,n){var r=Hf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pK(e))gK(t,n);else if(n=GY(e,t,n,r),n!==null){var i=zo();xl(n,e,r,i),mK(n,t,r)}}function Efe(e,t,n){var r=Hf(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pK(e))gK(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,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Il(a,s)){var u=t.interleaved;u===null?(i.next=i,Q4(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=GY(e,t,i,r),n!==null&&(i=zo(),xl(n,e,r,i),mK(n,t,r))}}function pK(e){var t=e.alternate;return e===zr||t!==null&&t===zr}function gK(e,t){I1=tC=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mK(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,B4(e,n)}}var nC={readContext:Aa,useCallback:oo,useContext:oo,useEffect:oo,useImperativeHandle:oo,useInsertionEffect:oo,useLayoutEffect:oo,useMemo:oo,useReducer:oo,useRef:oo,useState:oo,useDebugValue:oo,useDeferredValue:oo,useTransition:oo,useMutableSource:oo,useSyncExternalStore:oo,useId:oo,unstable_isNewReconciler:!1},Cfe={readContext:Aa,useCallback:function(e,t){return Ul().memoizedState=[e,t===void 0?null:t],e},useContext:Aa,useEffect:c8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ZS(4194308,4,lK.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ZS(4194308,4,e,t)},useInsertionEffect:function(e,t){return ZS(4,2,e,t)},useMemo:function(e,t){var n=Ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ul();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=Sfe.bind(null,zr,e),[r.memoizedState,e]},useRef:function(e){var t=Ul();return e={current:e},t.memoizedState=e},useState:u8,useDebugValue:sz,useDeferredValue:function(e){return Ul().memoizedState=e},useTransition:function(){var e=u8(!1),t=e[0];return e=_fe.bind(null,e[1]),Ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=zr,i=Ul();if(_r){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=t(),Pi===null)throw Error(ke(349));Dp&30||eK(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,c8(nK.bind(null,r,o,e),[e]),r.flags|=2048,xx(9,tK.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ul(),t=Pi.identifierPrefix;if(_r){var n=Cc,r=Ec;n=(r&~(1<<32-bl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yx++,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[ql]=t,e[gx]=r,EK(e,t,!1,!1),t.stateNode=e;e:{switch(s=lF(n,r),n){case"dialog":br("cancel",e),br("close",e),i=r;break;case"iframe":case"object":case"embed":br("load",e),i=r;break;case"video":case"audio":for(i=0;iNm&&(t.flags|=128,r=!0,_b(o,!1),t.lanes=4194304)}else{if(!r)if(e=ZE(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_b(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!_r)return so(t),null}else 2*ei()-o.renderingStartTime>Nm&&n!==1073741824&&(t.flags|=128,r=!0,_b(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=ei(),t.sibling=null,n=Nr.current,ur(Nr,r?n&1|2:n&1),t):(so(t),null);case 22:case 23:return fz(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ks&1073741824&&(so(t),t.subtreeFlags&6&&(t.flags|=8192)):so(t),null;case 24:return null;case 25:return null}throw Error(ke(156,t.tag))}function kfe(e,t){switch(G4(t),t.tag){case 1:return rs(t.type)&&VE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dm(),xr(ns),xr(yo),ez(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Z4(t),null;case 13:if(xr(Nr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ke(340));Mm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xr(Nr),null;case 4:return Dm(),null;case 10:return Y4(t.type._context),null;case 22:case 23:return fz(),null;case 24:return null;default:return null}}var g_=!1,co=!1,Dfe=typeof WeakSet=="function"?WeakSet:Set,lt=null;function qg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qr(e,t,r)}else n.current=null}function LF(e,t,n){try{n()}catch(r){qr(e,t,r)}}var y8=!1;function Lfe(e,t){if(yF=jE,e=PY(),H4(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,a=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(u=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++d===r&&(u=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(bF={focusedElem:e,selectionRange:n},jE=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){t=lt;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,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?y:sl(t.type,y),S);w.__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(ke(163))}}catch(E){qr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}return v=y8,y8=!1,v}function R1(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&&LF(t,n,o)}i=i.next}while(i!==r)}}function _A(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 NF(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 AK(e){var t=e.alternate;t!==null&&(e.alternate=null,AK(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ql],delete t[gx],delete t[_F],delete t[vfe],delete t[yfe])),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 IK(e){return e.tag===5||e.tag===3||e.tag===4}function b8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||IK(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 BF(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=GE));else if(r!==4&&(e=e.child,e!==null))for(BF(e,t,n),e=e.sibling;e!==null;)BF(e,t,n),e=e.sibling}function $F(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($F(e,t,n),e=e.sibling;e!==null;)$F(e,t,n),e=e.sibling}var Vi=null,ll=!1;function nf(e,t,n){for(n=n.child;n!==null;)RK(e,t,n),n=n.sibling}function RK(e,t,n){if(Zl&&typeof Zl.onCommitFiberUnmount=="function")try{Zl.onCommitFiberUnmount(pA,n)}catch{}switch(n.tag){case 5:co||qg(n,t);case 6:var r=Vi,i=ll;Vi=null,nf(e,t,n),Vi=r,ll=i,Vi!==null&&(ll?(e=Vi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vi.removeChild(n.stateNode));break;case 18:Vi!==null&&(ll?(e=Vi,n=n.stateNode,e.nodeType===8?SL(e.parentNode,n):e.nodeType===1&&SL(e,n),cx(e)):SL(Vi,n.stateNode));break;case 4:r=Vi,i=ll,Vi=n.stateNode.containerInfo,ll=!0,nf(e,t,n),Vi=r,ll=i;break;case 0:case 11:case 14:case 15:if(!co&&(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)&&LF(n,t,s),i=i.next}while(i!==r)}nf(e,t,n);break;case 1:if(!co&&(qg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){qr(n,t,a)}nf(e,t,n);break;case 21:nf(e,t,n);break;case 22:n.mode&1?(co=(r=co)||n.memoizedState!==null,nf(e,t,n),co=r):nf(e,t,n);break;default:nf(e,t,n)}}function x8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dfe),t.forEach(function(r){var i=Wfe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ja(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ei()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bfe(r/1960))-r,10e?16:e,If===null)var r=!1;else{if(e=If,If=null,iC=0,Tn&6)throw Error(ke(331));var i=Tn;for(Tn|=4,lt=e.current;lt!==null;){var o=lt,s=o.child;if(lt.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uei()-uz?bp(e,0):lz|=n),is(e,t)}function BK(e,t){t===0&&(e.mode&1?(t=s_,s_<<=1,!(s_&130023424)&&(s_=4194304)):t=1);var n=zo();e=$c(e,t),e!==null&&(gw(e,t,n),is(e,n))}function Hfe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),BK(e,n)}function Wfe(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(ke(314))}r!==null&&r.delete(t),BK(e,n)}var $K;$K=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ns.current)Zo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Zo=!1,Ofe(e,t,n);Zo=!!(e.flags&131072)}else Zo=!1,_r&&t.flags&1048576&&UY(t,YE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ZS(e,t),e=t.pendingProps;var i=Om(t,yo.current);pm(t,n),i=nz(null,t,r,e,i,n);var o=rz();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,rs(r)?(o=!0,XE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Q4(t),i.updater=xA,t.stateNode=i,i._reactInternals=t,IF(t,r,e,n),t=OF(null,t,r,!0,o,n)):(t.tag=0,_r&&o&&W4(t),Lo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ZS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Vfe(r),e=sl(r,e),i){case 0:t=PF(null,t,r,e,n);break e;case 1:t=g8(null,t,r,e,n);break e;case 11:t=h8(null,t,r,e,n);break e;case 14:t=p8(null,t,r,sl(r.type,e),n);break e}throw Error(ke(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),PF(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),g8(e,t,r,i,n);case 3:e:{if(wK(t),e===null)throw Error(ke(387));r=t.pendingProps,o=t.memoizedState,i=o.element,GY(e,t),JE(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=Lm(Error(ke(423)),t),t=m8(e,t,r,n,i);break e}else if(r!==i){i=Lm(Error(ke(424)),t),t=m8(e,t,r,n,i);break e}else for($s=zf(t.stateNode.containerInfo.firstChild),js=t,_r=!0,cl=null,n=YY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mm(),r===i){t=Fc(e,t,n);break e}Lo(e,t,r,n)}t=t.child}return t;case 5:return KY(t),e===null&&CF(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,xF(r,i)?s=null:o!==null&&xF(r,o)&&(t.flags|=32),xK(e,t),Lo(e,t,s,n),t.child;case 6:return e===null&&CF(t),null;case 13:return _K(e,t,n);case 4:return J4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=km(t,null,r,n):Lo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),h8(e,t,r,i,n);case 7:return Lo(e,t,t.pendingProps,n),t.child;case 8:return Lo(e,t,t.pendingProps.children,n),t.child;case 12:return Lo(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,ur(KE,r._currentValue),r._currentValue=s,o!==null)if(Il(o.value,s)){if(o.children===i.children&&!ns.current){t=Fc(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Rc(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),TF(o.return,n,t),a.lanes|=n;break}u=u.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(ke(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),TF(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}Lo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pm(t,n),i=Aa(i),r=r(i),t.flags|=1,Lo(e,t,r,n),t.child;case 14:return r=t.type,i=sl(r,t.pendingProps),i=sl(r.type,i),p8(e,t,r,i,n);case 15:return yK(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),ZS(e,t),t.tag=1,rs(r)?(e=!0,XE(t)):e=!1,pm(t,n),XY(t,r,i),IF(t,r,i,n),OF(null,t,r,!0,e,n);case 19:return SK(e,t,n);case 22:return bK(e,t,n)}throw Error(ke(156,t.tag))};function FK(e,t){return fY(e,t)}function Gfe(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 ga(e,t,n,r){return new Gfe(e,t,n,r)}function hz(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vfe(e){if(typeof e=="function")return hz(e)?1:0;if(e!=null){if(e=e.$$typeof,e===M4)return 11;if(e===k4)return 14}return 2}function Wf(e,t){var n=e.alternate;return n===null?(n=ga(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 nE(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")hz(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fg:return xp(n.children,i,o,t);case O4:s=8,i|=8;break;case J$:return e=ga(12,n,t,i|2),e.elementType=J$,e.lanes=o,e;case Z$:return e=ga(13,n,t,i),e.elementType=Z$,e.lanes=o,e;case eF:return e=ga(19,n,t,i),e.elementType=eF,e.lanes=o,e;case qq:return EA(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vq:s=10;break e;case Xq:s=9;break e;case M4:s=11;break e;case k4:s=14;break e;case pf:s=16,r=null;break e}throw Error(ke(130,e==null?e:typeof e,""))}return t=ga(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function xp(e,t,n,r){return e=ga(7,e,r,t),e.lanes=n,e}function EA(e,t,n,r){return e=ga(22,e,r,t),e.elementType=qq,e.lanes=n,e.stateNode={isHidden:!1},e}function OL(e,t,n){return e=ga(6,e,null,t),e.lanes=n,e}function ML(e,t,n){return t=ga(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xfe(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=dL(0),this.expirationTimes=dL(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dL(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pz(e,t,n,r,i,o,s,a,u){return e=new Xfe(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ga(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q4(o),e}function qfe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HK)}catch(e){console.error(e)}}HK(),Uq.exports=na;var vv=Uq.exports;const Kg=Ma(vv),I8={disabled:!1},aC=fe.createContext(null);var Zfe=function(t){return t.scrollTop},r1="unmounted",Qh="exited",Jh="entering",Tg="entered",HF="exiting",qc=function(e){hA(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,u;return o.appearStatus=null,r.in?a?(u=Qh,o.appearStatus=Jh):u=Tg:r.unmountOnExit||r.mountOnEnter?u=r1:u=Qh,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===r1?{status:Qh}: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!==Jh&&s!==Tg&&(o=Jh):(s===Jh||s===Tg)&&(o=HF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Jh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Kg.findDOMNode(this);s&&Zfe(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qh&&this.setState({status:r1})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,u=this.props.nodeRef?[a]:[Kg.findDOMNode(this),a],c=u[0],d=u[1],h=this.getTimeouts(),p=a?h.appear:h.enter;if(!i&&!s||I8.disabled){this.safeSetState({status:Tg},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Jh},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:Tg},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Kg.findDOMNode(this);if(!o||I8.disabled){this.safeSetState({status:Qh},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:HF},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Qh},function(){i.props.onExited(a)})})})},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(a){s&&(s=!1,o.nextCallback=null,i(a))},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:Kg.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===r1)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 a=Ne(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return fe.createElement(aC.Provider,{value:null},typeof s=="function"?s(i,a):fe.cloneElement(fe.Children.only(s),a))},t}(fe.Component);qc.contextType=aC;qc.propTypes={};function pg(){}qc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pg,onEntering:pg,onEntered:pg,onExit:pg,onExiting:pg,onExited:pg};qc.UNMOUNTED=r1;qc.EXITED=Qh;qc.ENTERING=Jh;qc.ENTERED=Tg;qc.EXITING=HF;const yz=qc;function ede(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bz(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 tde(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}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,a={};for(var u in t){if(r[u])for(s=0;se.scrollTop;function Bm(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 ade(e){return Ct("MuiCollapse",e)}Rt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const lde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],ude=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return It(r,ade,n)},cde=Ce("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"})),fde=Ce("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),dde=Ce("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),GK=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:u,easing:c,in:d,onEnter:h,onEntered:p,onEntering:m,onExit:v,onExited:y,onExiting:S,orientation:w="vertical",style:b,timeout:x=$q.standard,TransitionComponent:E=yz}=r,A=Ne(r,lde),I=$({},r,{orientation:w,collapsedSize:a}),R=ude(I),M=Dn(),L=O.useRef(),N=O.useRef(null),H=O.useRef(),V=typeof a=="number"?`${a}px`:a,U=w==="horizontal",D=U?"width":"height";O.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=O.useRef(null),z=Tr(n,F),G=J=>ae=>{if(J){const le=F.current;ae===void 0?J(le):J(le,ae)}},W=()=>N.current?N.current[U?"clientWidth":"clientHeight"]:0,K=G((J,ae)=>{N.current&&U&&(N.current.style.position="absolute"),J.style[D]=V,h&&h(J,ae)}),q=G((J,ae)=>{const le=W();N.current&&U&&(N.current.style.position="");const{duration:he,easing:pe}=Bm({style:b,timeout:x,easing:c},{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,m&&m(J,ae)}),Q=G((J,ae)=>{J.style[D]="auto",p&&p(J,ae)}),re=G(J=>{J.style[D]=`${W()}px`,v&&v(J)}),ue=G(y),ce=G(J=>{const ae=W(),{duration:le,easing:he}=Bm({style:b,timeout:x,easing:c},{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]=V,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:d,onEnter:K,onEntered:Q,onEntering:q,onExit:re,onExited:ue,onExiting:ce,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(J,ae)=>C.jsx(cde,$({as:u,className:je(R.root,s,{entered:R.entered,exited:!d&&V==="0px"&&R.hidden}[J]),style:$({[U?"minWidth":"minHeight"]:V},b),ownerState:$({},I,{state:J}),ref:z},ae,{children:C.jsx(fde,{ownerState:$({},I,{state:J}),className:R.wrapper,ref:N,children:C.jsx(dde,{ownerState:$({},I,{state:J}),className:R.wrapperInner,children:o})})}))}))});GK.muiSupportAuto=!0;const kL=GK;function hde(e){return Ct("MuiPaper",e)}Rt("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 pde=["className","component","elevation","square","variant"],gde=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return It(o,hde,i)},mde=Ce("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(${An("#fff",wj(t.elevation))}, ${An("#fff",wj(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),vde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:u="elevation"}=r,c=Ne(r,pde),d=$({},r,{component:o,elevation:s,square:a,variant:u}),h=gde(d);return C.jsx(mde,$({as:o,ownerState:d,className:je(h.root,i),ref:n},c))}),yv=vde;function yde(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:u,timeout:c}=e,[d,h]=O.useState(!1),p=je(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=je(n.child,d&&n.childLeaving,r&&n.childPulsate);return!a&&!d&&h(!0),O.useEffect(()=>{if(!a&&u!=null){const y=setTimeout(u,c);return()=>{clearTimeout(y)}}},[u,a,c]),C.jsx("span",{className:p,style:m,children:C.jsx("span",{className:v})})}const bde=Rt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ua=bde,xde=["center","classes","className"];let RA=e=>e,R8,P8,O8,M8;const WF=550,wde=80,_de=fd(R8||(R8=RA` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function RD(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function PF(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ife=typeof WeakMap=="function"?WeakMap:Map;function vK(e,t,n){n=Rc(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){iC||(iC=!0,zF=r),PF(e,t)},n}function yK(e,t,n){n=Rc(-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(){PF(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){PF(e,t),typeof r!="function"&&(jf===null?jf=new Set([this]):jf.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function f8(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ife;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=jfe.bind(null,e,t,n),t.then(e,e))}function d8(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 h8(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=Rc(-1,1),t.tag=2,Uf(n,t,1))),n.lanes|=1),e)}var Rfe=Xc.ReactCurrentOwner,Zo=!1;function Do(e,t,n,r){t.child=e===null?KY(t,null,n,r):km(t,e.child,n,r)}function p8(e,t,n,r,i){n=n.render;var o=t.ref;return pm(t,i),r=rz(e,t,n,r,o,i),n=iz(),e!==null&&!Zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fc(e,t,i)):(_r&&n&&G4(t),t.flags|=1,Do(e,t,r,i),t.child)}function g8(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pz(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,bK(e,t,o,r,i)):(e=rE(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:dx,n(s,r)&&e.ref===t.ref)return Fc(e,t,i)}return t.flags|=1,e=Wf(o,r),e.ref=t.ref,e.return=t,t.child=e}function bK(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(dx(o,r)&&e.ref===t.ref)if(Zo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Zo=!0);else return t.lanes=e.lanes,Fc(e,t,i)}return OF(e,t,n,r,i)}function xK(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},ur(Yg,ks),ks|=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,ur(Yg,ks),ks|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ur(Yg,ks),ks|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ur(Yg,ks),ks|=r;return Do(e,t,i,n),t.child}function wK(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function OF(e,t,n,r,i){var o=rs(n)?kp:yo.current;return o=Om(t,o),pm(t,i),n=rz(e,t,n,r,o,i),r=iz(),e!==null&&!Zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fc(e,t,i)):(_r&&r&&G4(t),t.flags|=1,Do(e,t,n,i),t.child)}function m8(e,t,n,r,i){if(rs(n)){var o=!0;qE(t)}else o=!1;if(pm(t,i),t.stateNode===null)eE(e,t),qY(t,n,r),RF(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Aa(c):(c=rs(n)?kp:yo.current,c=Om(t,c));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==c)&&a8(t,s,r,c),gf=!1;var p=t.memoizedState;s.state=p,ZE(t,r,s,i),u=t.memoizedState,a!==r||p!==u||ns.current||gf?(typeof d=="function"&&(IF(t,n,d,r),u=t.memoizedState),(a=gf||s8(t,n,a,r,p,u,c))?(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=u),s.props=r,s.state=u,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,VY(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:sl(t.type,a),s.props=c,h=t.pendingProps,p=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Aa(u):(u=rs(n)?kp:yo.current,u=Om(t,u));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||p!==u)&&a8(t,s,r,u),gf=!1,p=t.memoizedState,s.state=p,ZE(t,r,s,i);var v=t.memoizedState;a!==h||p!==v||ns.current||gf?(typeof m=="function"&&(IF(t,n,m,r),v=t.memoizedState),(c=gf||s8(t,n,c,r,p,v,u)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return MF(e,t,n,r,o,i)}function MF(e,t,n,r,i,o){wK(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&t8(t,n,!1),Fc(e,t,o);r=t.stateNode,Rfe.current=t;var a=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,a,o)):Do(e,t,a,o),t.memoizedState=r.state,i&&t8(t,n,!0),t.child}function _K(e){var t=e.stateNode;t.pendingContext?e8(e,t.pendingContext,t.pendingContext!==t.context):t.context&&e8(e,t.context,!1),Z4(e,t.containerInfo)}function v8(e,t,n,r,i){return Mm(),X4(i),t.flags|=256,Do(e,t,n,r),t.child}var kF={dehydrated:null,treeContext:null,retryLane:0};function LF(e){return{baseLanes:e,cachePool:null,transitions:null}}function SK(e,t,n){var r=t.pendingProps,i=Nr.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ur(Nr,i&1),e===null)return TF(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=EA(s,r,0,null),e=xp(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=LF(n),t.memoizedState=kF,e):az(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Pfe(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Wf(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Wf(a,o):(o=xp(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?LF(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=kF,r}return o=e.child,e=o.sibling,r=Wf(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 az(e,t){return t=EA({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function g_(e,t,n,r){return r!==null&&X4(r),km(t,e.child,null,n),e=az(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pfe(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=RD(Error(ke(422))),g_(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=EA({mode:"visible",children:r.children},i,0,null),o=xp(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=LF(s),t.memoizedState=kF,o);if(!(t.mode&1))return g_(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ke(419)),r=RD(o,r,void 0),g_(e,t,s,r)}if(a=(s&e.childLanes)!==0,Zo||a){if(r=Pi,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,$c(e,i),xl(r,e,i,-1))}return hz(),r=RD(Error(ke(421))),g_(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Hfe.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,$s=zf(i.nextSibling),js=t,_r=!0,cl=null,e!==null&&(fa[da++]=Ec,fa[da++]=Cc,fa[da++]=Lp,Ec=e.id,Cc=e.overflow,Lp=t),t=az(t,r.children),t.flags|=4096,t)}function y8(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),AF(e.return,t,n)}function PD(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 EK(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Do(e,t,r.children,n),r=Nr.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&&y8(e,n,t);else if(e.tag===19)y8(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(ur(Nr,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&&eC(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),PD(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&&eC(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}PD(t,!0,n,null,o);break;case"together":PD(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function eE(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(ke(153));if(t.child!==null){for(e=t.child,n=Wf(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wf(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ofe(e,t,n){switch(t.tag){case 3:_K(t),Mm();break;case 5:QY(t);break;case 1:rs(t.type)&&qE(t);break;case 4:Z4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ur(QE,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ur(Nr,Nr.current&1),t.flags|=128,null):n&t.child.childLanes?SK(e,t,n):(ur(Nr,Nr.current&1),e=Fc(e,t,n),e!==null?e.sibling:null);ur(Nr,Nr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return EK(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ur(Nr,Nr.current),r)break;return null;case 22:case 23:return t.lanes=0,xK(e,t,n)}return Fc(e,t,n)}var CK,DF,TK,AK;CK=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}};DF=function(){};TK=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,fp(eu.current);var o=null;switch(n){case"input":i=rF(e,i),r=rF(e,r),o=[];break;case"select":i=Ur({},i,{value:void 0}),r=Ur({},r,{value:void 0}),o=[];break;case"textarea":i=sF(e,i),r=sF(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=VE)}lF(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ox.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ox.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&br("scroll",e),o||a===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};AK=function(e,t,n,r){n!==r&&(t.flags|=4)};function _b(e,t){if(!_r)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 so(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 Mfe(e,t,n){var r=t.pendingProps;switch(V4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return so(t),null;case 1:return rs(t.type)&&XE(),so(t),null;case 3:return r=t.stateNode,Lm(),xr(ns),xr(yo),tz(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(h_(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,cl!==null&&(HF(cl),cl=null))),DF(e,t),so(t),null;case 5:ez(t);var i=fp(vx.current);if(n=t.type,e!==null&&t.stateNode!=null)TK(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ke(166));return so(t),null}if(e=fp(eu.current),h_(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ql]=t,r[gx]=o,e=(t.mode&1)!==0,n){case"dialog":br("cancel",r),br("close",r);break;case"iframe":case"object":case"embed":br("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[ql]=t,e[gx]=r,CK(e,t,!1,!1),t.stateNode=e;e:{switch(s=uF(n,r),n){case"dialog":br("cancel",e),br("close",e),i=r;break;case"iframe":case"object":case"embed":br("load",e),i=r;break;case"video":case"audio":for(i=0;iNm&&(t.flags|=128,r=!0,_b(o,!1),t.lanes=4194304)}else{if(!r)if(e=eC(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_b(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!_r)return so(t),null}else 2*ei()-o.renderingStartTime>Nm&&n!==1073741824&&(t.flags|=128,r=!0,_b(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=ei(),t.sibling=null,n=Nr.current,ur(Nr,r?n&1|2:n&1),t):(so(t),null);case 22:case 23:return dz(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ks&1073741824&&(so(t),t.subtreeFlags&6&&(t.flags|=8192)):so(t),null;case 24:return null;case 25:return null}throw Error(ke(156,t.tag))}function kfe(e,t){switch(V4(t),t.tag){case 1:return rs(t.type)&&XE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lm(),xr(ns),xr(yo),tz(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ez(t),null;case 13:if(xr(Nr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ke(340));Mm()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xr(Nr),null;case 4:return Lm(),null;case 10:return K4(t.type._context),null;case 22:case 23:return dz(),null;case 24:return null;default:return null}}var m_=!1,co=!1,Lfe=typeof WeakSet=="function"?WeakSet:Set,lt=null;function qg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qr(e,t,r)}else n.current=null}function NF(e,t,n){try{n()}catch(r){qr(e,t,r)}}var b8=!1;function Dfe(e,t){if(bF=HE,e=OY(),W4(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,a=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(u=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++d===r&&(u=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(xF={focusedElem:e,selectionRange:n},HE=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){t=lt;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,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?y:sl(t.type,y),S);w.__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(ke(163))}}catch(E){qr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}return v=b8,b8=!1,v}function R1(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&&NF(t,n,o)}i=i.next}while(i!==r)}}function _A(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 BF(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 IK(e){var t=e.alternate;t!==null&&(e.alternate=null,IK(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ql],delete t[gx],delete t[SF],delete t[vfe],delete t[yfe])),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 RK(e){return e.tag===5||e.tag===3||e.tag===4}function x8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||RK(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 $F(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=VE));else if(r!==4&&(e=e.child,e!==null))for($F(e,t,n),e=e.sibling;e!==null;)$F(e,t,n),e=e.sibling}function FF(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(FF(e,t,n),e=e.sibling;e!==null;)FF(e,t,n),e=e.sibling}var Vi=null,ll=!1;function nf(e,t,n){for(n=n.child;n!==null;)PK(e,t,n),n=n.sibling}function PK(e,t,n){if(Zl&&typeof Zl.onCommitFiberUnmount=="function")try{Zl.onCommitFiberUnmount(pA,n)}catch{}switch(n.tag){case 5:co||qg(n,t);case 6:var r=Vi,i=ll;Vi=null,nf(e,t,n),Vi=r,ll=i,Vi!==null&&(ll?(e=Vi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vi.removeChild(n.stateNode));break;case 18:Vi!==null&&(ll?(e=Vi,n=n.stateNode,e.nodeType===8?SD(e.parentNode,n):e.nodeType===1&&SD(e,n),cx(e)):SD(Vi,n.stateNode));break;case 4:r=Vi,i=ll,Vi=n.stateNode.containerInfo,ll=!0,nf(e,t,n),Vi=r,ll=i;break;case 0:case 11:case 14:case 15:if(!co&&(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)&&NF(n,t,s),i=i.next}while(i!==r)}nf(e,t,n);break;case 1:if(!co&&(qg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){qr(n,t,a)}nf(e,t,n);break;case 21:nf(e,t,n);break;case 22:n.mode&1?(co=(r=co)||n.memoizedState!==null,nf(e,t,n),co=r):nf(e,t,n);break;default:nf(e,t,n)}}function w8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lfe),t.forEach(function(r){var i=Wfe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ja(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ei()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bfe(r/1960))-r,10e?16:e,If===null)var r=!1;else{if(e=If,If=null,oC=0,Tn&6)throw Error(ke(331));var i=Tn;for(Tn|=4,lt=e.current;lt!==null;){var o=lt,s=o.child;if(lt.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uei()-cz?bp(e,0):uz|=n),is(e,t)}function $K(e,t){t===0&&(e.mode&1?(t=a_,a_<<=1,!(a_&130023424)&&(a_=4194304)):t=1);var n=zo();e=$c(e,t),e!==null&&(mw(e,t,n),is(e,n))}function Hfe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$K(e,n)}function Wfe(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(ke(314))}r!==null&&r.delete(t),$K(e,n)}var FK;FK=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ns.current)Zo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Zo=!1,Ofe(e,t,n);Zo=!!(e.flags&131072)}else Zo=!1,_r&&t.flags&1048576&&jY(t,KE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;eE(e,t),e=t.pendingProps;var i=Om(t,yo.current);pm(t,n),i=rz(null,t,r,e,i,n);var o=iz();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,rs(r)?(o=!0,qE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,J4(t),i.updater=xA,t.stateNode=i,i._reactInternals=t,RF(t,r,e,n),t=MF(null,t,r,!0,o,n)):(t.tag=0,_r&&o&&G4(t),Do(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(eE(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Vfe(r),e=sl(r,e),i){case 0:t=OF(null,t,r,e,n);break e;case 1:t=m8(null,t,r,e,n);break e;case 11:t=p8(null,t,r,e,n);break e;case 14:t=g8(null,t,r,sl(r.type,e),n);break e}throw Error(ke(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),OF(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),m8(e,t,r,i,n);case 3:e:{if(_K(t),e===null)throw Error(ke(387));r=t.pendingProps,o=t.memoizedState,i=o.element,VY(e,t),ZE(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=Dm(Error(ke(423)),t),t=v8(e,t,r,n,i);break e}else if(r!==i){i=Dm(Error(ke(424)),t),t=v8(e,t,r,n,i);break e}else for($s=zf(t.stateNode.containerInfo.firstChild),js=t,_r=!0,cl=null,n=KY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mm(),r===i){t=Fc(e,t,n);break e}Do(e,t,r,n)}t=t.child}return t;case 5:return QY(t),e===null&&TF(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,wF(r,i)?s=null:o!==null&&wF(r,o)&&(t.flags|=32),wK(e,t),Do(e,t,s,n),t.child;case 6:return e===null&&TF(t),null;case 13:return SK(e,t,n);case 4:return Z4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=km(t,null,r,n):Do(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),p8(e,t,r,i,n);case 7:return Do(e,t,t.pendingProps,n),t.child;case 8:return Do(e,t,t.pendingProps.children,n),t.child;case 12:return Do(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,ur(QE,r._currentValue),r._currentValue=s,o!==null)if(Il(o.value,s)){if(o.children===i.children&&!ns.current){t=Fc(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Rc(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),AF(o.return,n,t),a.lanes|=n;break}u=u.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(ke(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),AF(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}Do(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pm(t,n),i=Aa(i),r=r(i),t.flags|=1,Do(e,t,r,n),t.child;case 14:return r=t.type,i=sl(r,t.pendingProps),i=sl(r.type,i),g8(e,t,r,i,n);case 15:return bK(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sl(r,i),eE(e,t),t.tag=1,rs(r)?(e=!0,qE(t)):e=!1,pm(t,n),qY(t,r,i),RF(t,r,i,n),MF(null,t,r,!0,e,n);case 19:return EK(e,t,n);case 22:return xK(e,t,n)}throw Error(ke(156,t.tag))};function zK(e,t){return dY(e,t)}function Gfe(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 ga(e,t,n,r){return new Gfe(e,t,n,r)}function pz(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vfe(e){if(typeof e=="function")return pz(e)?1:0;if(e!=null){if(e=e.$$typeof,e===k4)return 11;if(e===L4)return 14}return 2}function Wf(e,t){var n=e.alternate;return n===null?(n=ga(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 rE(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")pz(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fg:return xp(n.children,i,o,t);case M4:s=8,i|=8;break;case Z$:return e=ga(12,n,t,i|2),e.elementType=Z$,e.lanes=o,e;case eF:return e=ga(13,n,t,i),e.elementType=eF,e.lanes=o,e;case tF:return e=ga(19,n,t,i),e.elementType=tF,e.lanes=o,e;case Yq:return EA(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xq:s=10;break e;case qq:s=9;break e;case k4:s=11;break e;case L4:s=14;break e;case pf:s=16,r=null;break e}throw Error(ke(130,e==null?e:typeof e,""))}return t=ga(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function xp(e,t,n,r){return e=ga(7,e,r,t),e.lanes=n,e}function EA(e,t,n,r){return e=ga(22,e,r,t),e.elementType=Yq,e.lanes=n,e.stateNode={isHidden:!1},e}function OD(e,t,n){return e=ga(6,e,null,t),e.lanes=n,e}function MD(e,t,n){return t=ga(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xfe(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=dD(0),this.expirationTimes=dD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dD(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gz(e,t,n,r,i,o,s,a,u){return e=new Xfe(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ga(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},J4(o),e}function qfe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(WK)}catch(e){console.error(e)}}WK(),jq.exports=na;var vv=jq.exports;const Kg=Ma(vv),R8={disabled:!1},lC=fe.createContext(null);var Zfe=function(t){return t.scrollTop},r1="unmounted",Qh="exited",Jh="entering",Tg="entered",WF="exiting",qc=function(e){hA(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,u;return o.appearStatus=null,r.in?a?(u=Qh,o.appearStatus=Jh):u=Tg:r.unmountOnExit||r.mountOnEnter?u=r1:u=Qh,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===r1?{status:Qh}: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!==Jh&&s!==Tg&&(o=Jh):(s===Jh||s===Tg)&&(o=WF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Jh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Kg.findDOMNode(this);s&&Zfe(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qh&&this.setState({status:r1})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,u=this.props.nodeRef?[a]:[Kg.findDOMNode(this),a],c=u[0],d=u[1],h=this.getTimeouts(),p=a?h.appear:h.enter;if(!i&&!s||R8.disabled){this.safeSetState({status:Tg},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Jh},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:Tg},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Kg.findDOMNode(this);if(!o||R8.disabled){this.safeSetState({status:Qh},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:WF},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Qh},function(){i.props.onExited(a)})})})},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(a){s&&(s=!1,o.nextCallback=null,i(a))},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:Kg.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===r1)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 a=Ne(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return fe.createElement(lC.Provider,{value:null},typeof s=="function"?s(i,a):fe.cloneElement(fe.Children.only(s),a))},t}(fe.Component);qc.contextType=lC;qc.propTypes={};function pg(){}qc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pg,onEntering:pg,onEntered:pg,onExit:pg,onExiting:pg,onExited:pg};qc.UNMOUNTED=r1;qc.EXITED=Qh;qc.ENTERING=Jh;qc.ENTERED=Tg;qc.EXITING=WF;const bz=qc;function ede(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xz(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 tde(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}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,a={};for(var u in t){if(r[u])for(s=0;se.scrollTop;function Bm(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 ade(e){return Ct("MuiCollapse",e)}Rt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const lde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],ude=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return It(r,ade,n)},cde=Ce("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"})),fde=Ce("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),dde=Ce("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),VK=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:u,easing:c,in:d,onEnter:h,onEntered:p,onEntering:m,onExit:v,onExited:y,onExiting:S,orientation:w="vertical",style:b,timeout:x=Fq.standard,TransitionComponent:E=bz}=r,A=Ne(r,lde),I=$({},r,{orientation:w,collapsedSize:a}),R=ude(I),M=Ln(),D=O.useRef(),N=O.useRef(null),H=O.useRef(),V=typeof a=="number"?`${a}px`:a,U=w==="horizontal",L=U?"width":"height";O.useEffect(()=>()=>{clearTimeout(D.current)},[]);const F=O.useRef(null),z=Tr(n,F),G=J=>ae=>{if(J){const le=F.current;ae===void 0?J(le):J(le,ae)}},W=()=>N.current?N.current[U?"clientWidth":"clientHeight"]:0,K=G((J,ae)=>{N.current&&U&&(N.current.style.position="absolute"),J.style[L]=V,h&&h(J,ae)}),q=G((J,ae)=>{const le=W();N.current&&U&&(N.current.style.position="");const{duration:he,easing:pe}=Bm({style:b,timeout:x,easing:c},{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[L]=`${le}px`,J.style.transitionTimingFunction=pe,m&&m(J,ae)}),Q=G((J,ae)=>{J.style[L]="auto",p&&p(J,ae)}),re=G(J=>{J.style[L]=`${W()}px`,v&&v(J)}),ue=G(y),ce=G(J=>{const ae=W(),{duration:le,easing:he}=Bm({style:b,timeout:x,easing:c},{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[L]=V,J.style.transitionTimingFunction=he,S&&S(J)}),se=J=>{x==="auto"&&(D.current=setTimeout(J,H.current||0)),i&&i(F.current,J)};return C.jsx(E,$({in:d,onEnter:K,onEntered:Q,onEntering:q,onExit:re,onExited:ue,onExiting:ce,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(J,ae)=>C.jsx(cde,$({as:u,className:je(R.root,s,{entered:R.entered,exited:!d&&V==="0px"&&R.hidden}[J]),style:$({[U?"minWidth":"minHeight"]:V},b),ownerState:$({},I,{state:J}),ref:z},ae,{children:C.jsx(fde,{ownerState:$({},I,{state:J}),className:R.wrapper,ref:N,children:C.jsx(dde,{ownerState:$({},I,{state:J}),className:R.wrapperInner,children:o})})}))}))});VK.muiSupportAuto=!0;const kD=VK;function hde(e){return Ct("MuiPaper",e)}Rt("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 pde=["className","component","elevation","square","variant"],gde=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return It(o,hde,i)},mde=Ce("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(${An("#fff",_j(t.elevation))}, ${An("#fff",_j(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),vde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:u="elevation"}=r,c=Ne(r,pde),d=$({},r,{component:o,elevation:s,square:a,variant:u}),h=gde(d);return C.jsx(mde,$({as:o,ownerState:d,className:je(h.root,i),ref:n},c))}),yv=vde;function yde(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:u,timeout:c}=e,[d,h]=O.useState(!1),p=je(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=je(n.child,d&&n.childLeaving,r&&n.childPulsate);return!a&&!d&&h(!0),O.useEffect(()=>{if(!a&&u!=null){const y=setTimeout(u,c);return()=>{clearTimeout(y)}}},[u,a,c]),C.jsx("span",{className:p,style:m,children:C.jsx("span",{className:v})})}const bde=Rt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ua=bde,xde=["center","classes","className"];let RA=e=>e,P8,O8,M8,k8;const GF=550,wde=80,_de=fd(P8||(P8=RA` 0% { transform: scale(0); opacity: 0.1; @@ -68,7 +68,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),Sde=fd(P8||(P8=RA` +`)),Sde=fd(O8||(O8=RA` 0% { opacity: 1; } @@ -76,7 +76,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),Ede=fd(O8||(O8=RA` +`)),Ede=fd(M8||(M8=RA` 0% { transform: scale(1); } @@ -88,7 +88,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),Cde=Ce("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tde=Ce(yde,{name:"MuiTouchRipple",slot:"Ripple"})(M8||(M8=RA` +`)),Cde=Ce("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tde=Ce(yde,{name:"MuiTouchRipple",slot:"Ripple"})(k8||(k8=RA` opacity: 0; position: absolute; @@ -131,8 +131,8 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),ua.rippleVisible,_de,WF,({theme:e})=>e.transitions.easing.easeInOut,ua.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ua.child,ua.childLeaving,Sde,WF,({theme:e})=>e.transitions.easing.easeInOut,ua.childPulsate,Ede,({theme:e})=>e.transitions.easing.easeInOut),Ade=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ne(r,xde),[u,c]=O.useState([]),d=O.useRef(0),h=O.useRef(null);O.useEffect(()=>{h.current&&(h.current(),h.current=null)},[u]);const p=O.useRef(!1),m=O.useRef(0),v=O.useRef(null),y=O.useRef(null);O.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const S=O.useCallback(E=>{const{pulsate:A,rippleX:I,rippleY:R,rippleSize:M,cb:L}=E;c(N=>[...N,C.jsx(Tde,{classes:{ripple:je(o.ripple,ua.ripple),rippleVisible:je(o.rippleVisible,ua.rippleVisible),ripplePulsate:je(o.ripplePulsate,ua.ripplePulsate),child:je(o.child,ua.child),childLeaving:je(o.childLeaving,ua.childLeaving),childPulsate:je(o.childPulsate,ua.childPulsate)},timeout:WF,pulsate:A,rippleX:I,rippleY:R,rippleSize:M},d.current)]),d.current+=1,h.current=L},[o]),w=O.useCallback((E={},A={},I=()=>{})=>{const{pulsate:R=!1,center:M=i||A.pulsate,fakeElement:L=!1}=A;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 N=L?null:y.current,H=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,U,D;if(M||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)V=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;V=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((N?N.clientWidth:0)-V),V)*2+2,z=Math.max(Math.abs((N?N.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:V,rippleY:U,rippleSize:D,cb:I})},m.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},wde)):S({pulsate:R,rippleX:V,rippleY:U,rippleSize:D,cb:I})},[i,S]),b=O.useCallback(()=>{w({},{pulsate:!0})},[w]),x=O.useCallback((E,A)=>{if(clearTimeout(m.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,m.current=setTimeout(()=>{x(E,A)});return}v.current=null,c(I=>I.length>0?I.slice(1):I),h.current=A},[]);return O.useImperativeHandle(n,()=>({pulsate:b,start:w,stop:x}),[b,w,x]),C.jsx(Cde,$({className:je(ua.root,o.root,s),ref:y},a,{children:C.jsx(sde,{component:null,exit:!0,children:u})}))}),Ide=Ade;function Rde(e){return Ct("MuiButtonBase",e)}const Pde=Rt("MuiButtonBase",["root","disabled","focusVisible"]),Ode=Pde,Mde=["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"],kde=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=It({root:["root",t&&"disabled",n&&"focusVisible"]},Rde,i);return n&&r&&(s.root+=` ${r}`),s},Dde=Ce("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"},[`&.${Ode.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Lde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:u="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:m="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:w,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:I,onMouseLeave:R,onMouseUp:M,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:V=0,TouchRippleProps:U,touchRippleRef:D,type:F}=r,z=Ne(r,Mde),G=O.useRef(null),W=O.useRef(null),K=Tr(W,D),{isFocusVisibleRef:q,onFocus:Q,onBlur:re,ref:ue}=s4(),[ce,se]=O.useState(!1);c&&ce&&se(!1),O.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),G.current.focus()}}),[]);const[J,ae]=O.useState(!1);O.useEffect(()=>{ae(!0)},[]);const le=J&&!d&&!c;O.useEffect(()=>{ce&&p&&!d&&J&&W.current.pulsate()},[d,p,ce,J]);function he(Be,Ot,ft=h){return go(Re=>(Ot&&Ot(Re),!ft&&W.current&&W.current[Be](Re),!0))}const pe=he("start",I),ve=he("stop",S),ye=he("stop",w),xe=he("stop",M),ge=he("stop",Be=>{ce&&Be.preventDefault(),R&&R(Be)}),be=he("start",H),Ze=he("stop",L),qe=he("stop",N),ut=he("stop",Be=>{re(Be),q.current===!1&&se(!1),v&&v(Be)},!1),Bt=go(Be=>{G.current||(G.current=Be.currentTarget),Q(Be),q.current===!0&&(se(!0),x&&x(Be)),b&&b(Be)}),Oe=()=>{const Be=G.current;return u&&u!=="button"&&!(Be.tagName==="A"&&Be.href)},ze=O.useRef(!1),st=go(Be=>{p&&!ze.current&&ce&&W.current&&Be.key===" "&&(ze.current=!0,W.current.stop(Be,()=>{W.current.start(Be)})),Be.target===Be.currentTarget&&Oe()&&Be.key===" "&&Be.preventDefault(),E&&E(Be),Be.target===Be.currentTarget&&Oe()&&Be.key==="Enter"&&!c&&(Be.preventDefault(),y&&y(Be))}),mt=go(Be=>{p&&Be.key===" "&&W.current&&ce&&!Be.defaultPrevented&&(ze.current=!1,W.current.stop(Be,()=>{W.current.pulsate(Be)})),A&&A(Be),y&&Be.target===Be.currentTarget&&Oe()&&Be.key===" "&&!Be.defaultPrevented&&y(Be)});let vt=u;vt==="button"&&(z.href||z.to)&&(vt=m);const _e={};vt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=c):(!z.href&&!z.to&&(_e.role="button"),c&&(_e["aria-disabled"]=c));const Ue=Tr(n,ue,G),Ke=$({},r,{centerRipple:o,component:u,disabled:c,disableRipple:d,disableTouchRipple:h,focusRipple:p,tabIndex:V,focusVisible:ce}),Fe=kde(Ke);return C.jsxs(Dde,$({as:vt,className:je(Fe.root,a),ownerState:Ke,onBlur:ut,onClick:y,onContextMenu:ve,onFocus:Bt,onKeyDown:st,onKeyUp:mt,onMouseDown:pe,onMouseLeave:ge,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Ze,onTouchMove:qe,onTouchStart:be,ref:Ue,tabIndex:c?-1:V,type:F},_e,z,{children:[s,le?C.jsx(Ide,$({ref:K,center:o},U)):null]}))}),Yc=Lde;function Nde(e){return Ct("MuiIconButton",e)}const Bde=Rt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),$de=Bde,Fde=["edge","children","className","color","disabled","disableFocusRipple","size"],zde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${De(r)}`,i&&`edge${De(i)}`,`size${De(o)}`]};return It(s,Nde,t)},Ude=Ce(Yc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(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})`:An(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})`:An(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)},{[`&.${$de.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),jde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium"}=r,h=Ne(r,Fde),p=$({},r,{edge:i,color:a,disabled:u,disableFocusRipple:c,size:d}),m=zde(p);return C.jsx(Ude,$({className:je(m.root,s),centerRipple:!0,focusRipple:!c,disabled:u,ref:n,ownerState:p},h,{children:o}))}),$p=jde;function Hde(e){return Ct("MuiTypography",e)}Rt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Wde=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Gde=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${De(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return It(a,Hde,s)},Vde=Ce("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${De(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})),k8={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Xde={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},qde=e=>Xde[e]||e,Yde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTypography"}),i=qde(r.color),o=_4($({},r,{color:i})),{align:s="inherit",className:a,component:u,gutterBottom:c=!1,noWrap:d=!1,paragraph:h=!1,variant:p="body1",variantMapping:m=k8}=o,v=Ne(o,Wde),y=$({},o,{align:s,color:i,className:a,component:u,gutterBottom:c,noWrap:d,paragraph:h,variant:p,variantMapping:m}),S=u||(h?"p":m[p]||k8[p])||"span",w=Gde(y);return C.jsx(Vde,$({as:S,ref:n,ownerState:y,className:je(w.root,a)},v))}),Wt=Yde;function Kde(e){return Ct("MuiAppBar",e)}Rt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const Qde=["className","color","enableColorOnDark","position"],Jde=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${De(t)}`,`position${De(n)}`]};return It(i,Kde,r)},y_=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Zde=Ce(yv,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${De(n.position)}`],t[`color${De(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:y_(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:y_(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:y_(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:y_(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"}))}),ehe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,u=Ne(r,Qde),c=$({},r,{color:o,position:a,enableColorOnDark:s}),d=Jde(c);return C.jsx(Zde,$({square:!0,component:"header",ownerState:c,elevation:4,className:je(d.root,i,a==="fixed"&&"mui-fixed"),ref:n},u))}),the=ehe;function tu(e){return typeof e=="string"}function i1(e,t,n){return e===void 0||tu(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function nhe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const rhe={disableDefaultClasses:!1},ihe=O.createContext(rhe);function ohe(e){const{disableDefaultClasses:t}=O.useContext(ihe);return n=>t?"":e(n)}function lC(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 she(e,t,n){return typeof e=="function"?e(t,n):e}function D8(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 ahe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=je(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 m.length>0&&(y.className=m),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=lC($({},i,r)),a=D8(r),u=D8(i),c=t(s),d=je(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},c,n,u,a);return d.length>0&&(p.className=d),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:c.ref}}const lhe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ti(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ne(e,lhe),a=o?{}:she(r,i),{props:u,internalRef:c}=ahe($({},s,{externalSlotProps:a})),d=Tr(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return i1(n,$({},u,{ref:d}),i)}function L8(e){return e.substring(2).toLowerCase()}function uhe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=Tr(t.ref,a),h=go(v=>{const y=c.current;c.current=!1;const S=Fr(a.current);if(!u.current||!a.current||"clientX"in v&&uhe(v,S))return;if(s.current){s.current=!1;return}let w;v.composedPath?w=v.composedPath().indexOf(a.current)>-1:w=!S.documentElement.contains(v.target)||a.current.contains(v.target),!w&&(n||!y)&&i(v)}),p=v=>y=>{c.current=!0;const S=t.props[v];S&&S(y)},m={ref:d};return o!==!1&&(m[o]=p(o)),O.useEffect(()=>{if(o!==!1){const v=L8(o),y=Fr(a.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&&(m[r]=p(r)),O.useEffect(()=>{if(r!==!1){const v=L8(r),y=Fr(a.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(O.Fragment,{children:O.cloneElement(t,m)})}const fhe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function dhe(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 hhe(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 phe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||hhe(e))}function ghe(e){const t=[],n=[];return Array.from(e.querySelectorAll(fhe)).forEach((r,i)=>{const o=dhe(r);o===-1||!phe(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 mhe(){return!0}function vhe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=ghe,isEnabled:s=mhe,open:a}=e,u=O.useRef(!1),c=O.useRef(null),d=O.useRef(null),h=O.useRef(null),p=O.useRef(null),m=O.useRef(!1),v=O.useRef(null),y=Tr(t.ref,v),S=O.useRef(null);O.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),O.useEffect(()=>{if(!a||!v.current)return;const x=Fr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(u.current=!0,h.current.focus()),h.current=null)}},[a]),O.useEffect(()=>{if(!a||!v.current)return;const x=Fr(v.current),E=R=>{S.current=R,!(r||!s()||R.key!=="Tab")&&x.activeElement===v.current&&R.shiftKey&&(u.current=!0,d.current&&d.current.focus())},A=()=>{const R=v.current;if(R===null)return;if(!x.hasFocus()||!s()||u.current){u.current=!1;return}if(R.contains(x.activeElement)||r&&x.activeElement!==c.current&&x.activeElement!==d.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let M=[];if((x.activeElement===c.current||x.activeElement===d.current)&&(M=o(v.current)),M.length>0){var L,N;const H=!!((L=S.current)!=null&&L.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),V=M[0],U=M[M.length-1];typeof V!="string"&&typeof U!="string"&&(H?U.focus():V.focus())}else R.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const I=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(I),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,a,o]);const w=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0};return C.jsxs(O.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:y,onFocus:w}),C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}var os="top",Ra="bottom",Pa="right",ss="left",wz="auto",bw=[os,Ra,Pa,ss],$m="start",_x="end",yhe="clippingParents",VK="viewport",Eb="popper",bhe="reference",N8=bw.reduce(function(e,t){return e.concat([t+"-"+$m,t+"-"+_x])},[]),XK=[].concat(bw,[wz]).reduce(function(e,t){return e.concat([t,t+"-"+$m,t+"-"+_x])},[]),xhe="beforeRead",whe="read",_he="afterRead",She="beforeMain",Ehe="main",Che="afterMain",The="beforeWrite",Ahe="write",Ihe="afterWrite",Rhe=[xhe,whe,_he,She,Ehe,Che,The,Ahe,Ihe];function cu(e){return e?(e.nodeName||"").toLowerCase():null}function Qs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Fp(e){var t=Qs(e).Element;return e instanceof t||e instanceof Element}function _a(e){var t=Qs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _z(e){if(typeof ShadowRoot>"u")return!1;var t=Qs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(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];!_a(o)||!cu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Ohe(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]),a=s.reduce(function(u,c){return u[c]="",u},{});!_a(i)||!cu(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const Mhe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:Ohe,requires:["computeStyles"]};function nu(e){return e.split("-")[0]}var wp=Math.max,uC=Math.min,Fm=Math.round;function GF(){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 qK(){return!/^((?!chrome|android).)*safari/i.test(GF())}function zm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&_a(e)&&(i=e.offsetWidth>0&&Fm(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Fm(r.height)/e.offsetHeight||1);var s=Fp(e)?Qs(e):window,a=s.visualViewport,u=!qK()&&n,c=(r.left+(u&&a?a.offsetLeft:0))/i,d=(r.top+(u&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Sz(e){var t=zm(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 YK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_z(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zc(e){return Qs(e).getComputedStyle(e)}function khe(e){return["table","td","th"].indexOf(cu(e))>=0}function gd(e){return((Fp(e)?e.ownerDocument:e.document)||window.document).documentElement}function PA(e){return cu(e)==="html"?e:e.assignedSlot||e.parentNode||(_z(e)?e.host:null)||gd(e)}function B8(e){return!_a(e)||zc(e).position==="fixed"?null:e.offsetParent}function Dhe(e){var t=/firefox/i.test(GF()),n=/Trident/i.test(GF());if(n&&_a(e)){var r=zc(e);if(r.position==="fixed")return null}var i=PA(e);for(_z(i)&&(i=i.host);_a(i)&&["html","body"].indexOf(cu(i))<0;){var o=zc(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 xw(e){for(var t=Qs(e),n=B8(e);n&&khe(n)&&zc(n).position==="static";)n=B8(n);return n&&(cu(n)==="html"||cu(n)==="body"&&zc(n).position==="static")?t:n||Dhe(e)||t}function Ez(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function M1(e,t,n){return wp(e,uC(t,n))}function Lhe(e,t,n){var r=M1(e,t,n);return r>n?n:r}function KK(){return{top:0,right:0,bottom:0,left:0}}function QK(e){return Object.assign({},KK(),e)}function JK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Nhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,QK(typeof t!="number"?t:JK(t,bw))};function Bhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=nu(n.placement),u=Ez(a),c=[ss,Pa].indexOf(a)>=0,d=c?"height":"width";if(!(!o||!s)){var h=Nhe(i.padding,n),p=Sz(o),m=u==="y"?os:ss,v=u==="y"?Ra:Pa,y=n.rects.reference[d]+n.rects.reference[u]-s[u]-n.rects.popper[d],S=s[u]-n.rects.reference[u],w=xw(o),b=w?u==="y"?w.clientHeight||0:w.clientWidth||0:0,x=y/2-S/2,E=h[m],A=b-p[d]-h[v],I=b/2-p[d]/2+x,R=M1(E,I,A),M=u;n.modifiersData[r]=(t={},t[M]=R,t.centerOffset=R-I,t)}}function $he(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)||YK(t.elements.popper,i)&&(t.elements.arrow=i))}const Fhe={name:"arrow",enabled:!0,phase:"main",fn:Bhe,effect:$he,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Um(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uhe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Fm(n*i)/i||0,y:Fm(r*i)/i||0}}function $8(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof d=="function"?d({x:m,y}):{x:m,y};m=S.x,y=S.y;var w=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=ss,E=os,A=window;if(c){var I=xw(n),R="clientHeight",M="clientWidth";if(I===Qs(n)&&(I=gd(n),zc(I).position!=="static"&&a==="absolute"&&(R="scrollHeight",M="scrollWidth")),I=I,i===os||(i===ss||i===Pa)&&o===_x){E=Ra;var L=h&&I===A&&A.visualViewport?A.visualViewport.height:I[R];y-=L-r.height,y*=u?1:-1}if(i===ss||(i===os||i===Ra)&&o===_x){x=Pa;var N=h&&I===A&&A.visualViewport?A.visualViewport.width:I[M];m-=N-r.width,m*=u?1:-1}}var H=Object.assign({position:a},c&&zhe),V=d===!0?Uhe({x:m,y},Qs(n)):{x:m,y};if(m=V.x,y=V.y,u){var U;return Object.assign({},H,(U={},U[E]=b?"0":"",U[x]=w?"0":"",U.transform=(A.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",U))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=w?m+"px":"",t.transform="",t))}function jhe(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,a=n.roundOffsets,u=a===void 0?!0:a,c={placement:nu(t.placement),variation:Um(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,$8(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$8(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Hhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jhe,data:{}};var b_={passive:!0};function Whe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,u=Qs(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,b_)}),a&&u.addEventListener("resize",n.update,b_),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,b_)}),a&&u.removeEventListener("resize",n.update,b_)}}const Ghe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Whe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function rE(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Xhe={start:"end",end:"start"};function F8(e){return e.replace(/start|end/g,function(t){return Xhe[t]})}function Cz(e){var t=Qs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Tz(e){return zm(gd(e)).left+Cz(e).scrollLeft}function qhe(e,t){var n=Qs(e),r=gd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;var c=qK();(c||!c&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a+Tz(e),y:u}}function Yhe(e){var t,n=gd(e),r=Cz(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=wp(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=wp(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Tz(e),u=-r.scrollTop;return zc(i||n).direction==="rtl"&&(a+=wp(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}function Az(e){var t=zc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ZK(e){return["html","body","#document"].indexOf(cu(e))>=0?e.ownerDocument.body:_a(e)&&Az(e)?e:ZK(PA(e))}function k1(e,t){var n;t===void 0&&(t=[]);var r=ZK(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Qs(r),s=i?[o].concat(o.visualViewport||[],Az(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(k1(PA(s)))}function VF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Khe(e,t){var n=zm(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 z8(e,t,n){return t===VK?VF(qhe(e,n)):Fp(t)?Khe(t,n):VF(Yhe(gd(e)))}function Qhe(e){var t=k1(PA(e)),n=["absolute","fixed"].indexOf(zc(e).position)>=0,r=n&&_a(e)?xw(e):e;return Fp(r)?t.filter(function(i){return Fp(i)&&YK(i,r)&&cu(i)!=="body"}):[]}function Jhe(e,t,n,r){var i=t==="clippingParents"?Qhe(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(u,c){var d=z8(e,c,r);return u.top=wp(d.top,u.top),u.right=uC(d.right,u.right),u.bottom=uC(d.bottom,u.bottom),u.left=wp(d.left,u.left),u},z8(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function eQ(e){var t=e.reference,n=e.element,r=e.placement,i=r?nu(r):null,o=r?Um(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,u;switch(i){case os:u={x:s,y:t.y-n.height};break;case Ra:u={x:s,y:t.y+t.height};break;case Pa:u={x:t.x+t.width,y:a};break;case ss:u={x:t.x-n.width,y:a};break;default:u={x:t.x,y:t.y}}var c=i?Ez(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case $m:u[c]=u[c]-(t[d]/2-n[d]/2);break;case _x:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function Sx(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,a=n.boundary,u=a===void 0?yhe:a,c=n.rootBoundary,d=c===void 0?VK:c,h=n.elementContext,p=h===void 0?Eb:h,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,S=y===void 0?0:y,w=QK(typeof S!="number"?S:JK(S,bw)),b=p===Eb?bhe:Eb,x=e.rects.popper,E=e.elements[v?b:p],A=Jhe(Fp(E)?E:E.contextElement||gd(e.elements.popper),u,d,s),I=zm(e.elements.reference),R=eQ({reference:I,element:x,strategy:"absolute",placement:i}),M=VF(Object.assign({},x,R)),L=p===Eb?M:I,N={top:A.top-L.top+w.top,bottom:L.bottom-A.bottom+w.bottom,left:A.left-L.left+w.left,right:L.right-A.right+w.right},H=e.modifiersData.offset;if(p===Eb&&H){var V=H[i];Object.keys(N).forEach(function(U){var D=[Pa,Ra].indexOf(U)>=0?1:-1,F=[os,Ra].indexOf(U)>=0?"y":"x";N[U]+=V[F]*D})}return N}function Zhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?XK:u,d=Um(r),h=d?a?N8:N8.filter(function(v){return Um(v)===d}):bw,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,y){return v[y]=Sx(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[nu(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function epe(e){if(nu(e)===wz)return[];var t=rE(e);return[F8(e),t,F8(t)]}function tpe(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,a=s===void 0?!0:s,u=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,S=t.options.placement,w=nu(S),b=w===S,x=u||(b||!v?[rE(S)]:epe(S)),E=[S].concat(x).reduce(function(ce,se){return ce.concat(nu(se)===wz?Zhe(t,{placement:se,boundary:d,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,I=t.rects.popper,R=new Map,M=!0,L=E[0],N=0;N=0,F=D?"width":"height",z=Sx(t,{placement:H,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),G=D?U?Pa:ss:U?Ra:os;A[F]>I[F]&&(G=rE(G));var W=rE(G),K=[];if(o&&K.push(z[V]<=0),a&&K.push(z[G]<=0,z[W]<=0),K.every(function(ce){return ce})){L=H,M=!1;break}R.set(H,K)}if(M)for(var q=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=q;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 npe={name:"flip",enabled:!0,phase:"main",fn:tpe,requiresIfExists:["offset"],data:{_skip:!1}};function U8(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 j8(e){return[os,Pa,Ra,ss].some(function(t){return e[t]>=0})}function rpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Sx(t,{elementContext:"reference"}),a=Sx(t,{altBoundary:!0}),u=U8(s,r),c=U8(a,i,o),d=j8(u),h=j8(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const ipe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rpe};function ope(e,t,n){var r=nu(e),i=[ss,os].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ss,Pa].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function spe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=XK.reduce(function(d,h){return d[h]=ope(h,t.rects,o),d},{}),a=s[t.placement],u=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const ape={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:spe};function lpe(e){var t=e.state,n=e.name;t.modifiersData[n]=eQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const upe={name:"popperOffsets",enabled:!0,phase:"read",fn:lpe,data:{}};function cpe(e){return e==="x"?"y":"x"}function fpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=Sx(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),w=nu(t.placement),b=Um(t.placement),x=!b,E=Ez(w),A=cpe(E),I=t.modifiersData.popperOffsets,R=t.rects.reference,M=t.rects.popper,L=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(I){if(o){var U,D=E==="y"?os:ss,F=E==="y"?Ra:Pa,z=E==="y"?"height":"width",G=I[E],W=G+S[D],K=G-S[F],q=m?-M[z]/2:0,Q=b===$m?R[z]:M[z],re=b===$m?-M[z]:-R[z],ue=t.elements.arrow,ce=m&&ue?Sz(ue):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:KK(),J=se[D],ae=se[F],le=M1(0,R[z],ce[z]),he=x?R[z]/2-q-le-J-N.mainAxis:Q-le-J-N.mainAxis,pe=x?-R[z]/2+q+le+ae+N.mainAxis:re+le+ae+N.mainAxis,ve=t.elements.arrow&&xw(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(U=H==null?void 0:H[E])!=null?U:0,ge=G+he-xe-ye,be=G+pe-xe,Ze=M1(m?uC(W,ge):W,G,m?wp(K,be):K);I[E]=Ze,V[E]=Ze-G}if(a){var qe,ut=E==="x"?os:ss,Bt=E==="x"?Ra:Pa,Oe=I[A],ze=A==="y"?"height":"width",st=Oe+S[ut],mt=Oe-S[Bt],vt=[os,ss].indexOf(w)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,Ue=vt?st:Oe-R[ze]-M[ze]-_e+N.altAxis,Ke=vt?Oe+R[ze]+M[ze]-_e-N.altAxis:mt,Fe=m&&vt?Lhe(Ue,Oe,Ke):M1(m?Ue:st,Oe,m?Ke:mt);I[A]=Fe,V[A]=Fe-Oe}t.modifiersData[r]=V}}const dpe={name:"preventOverflow",enabled:!0,phase:"main",fn:fpe,requiresIfExists:["offset"]};function hpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ppe(e){return e===Qs(e)||!_a(e)?Cz(e):hpe(e)}function gpe(e){var t=e.getBoundingClientRect(),n=Fm(t.width)/e.offsetWidth||1,r=Fm(t.height)/e.offsetHeight||1;return n!==1||r!==1}function mpe(e,t,n){n===void 0&&(n=!1);var r=_a(t),i=_a(t)&&gpe(t),o=gd(t),s=zm(e,i,n),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((cu(t)!=="body"||Az(o))&&(a=ppe(t)),_a(t)?(u=zm(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=Tz(o))),{x:s.left+a.scrollLeft-u.x,y:s.top+a.scrollTop-u.y,width:s.width,height:s.height}}function vpe(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(a){if(!n.has(a)){var u=t.get(a);u&&i(u)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ype(e){var t=vpe(e);return Rhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function bpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xpe(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 H8={placement:"bottom",modifiers:[],strategy:"absolute"};function W8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||a(Epe(i)||document.body)},[i,o]),Uo(()=>{if(s&&!o)return W$(n,s),()=>{W$(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const c={ref:u};return O.cloneElement(r,c)}return C.jsx(O.Fragment,{children:r})}return C.jsx(O.Fragment,{children:s&&vv.createPortal(r,s)})});function Cpe(e){return Ct("MuiPopper",e)}Rt("MuiPopper",["root"]);const Tpe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Ape=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ipe(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 XF(e){return typeof e=="function"?e():e}function Rpe(e){return e.nodeType!==void 0}const Ppe=()=>It({root:["root"]},ohe(Cpe)),Ope={},Mpe=O.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:u,open:c,placement:d,popperOptions:h,popperRef:p,slotProps:m={},slots:v={},TransitionProps:y}=t,S=Ne(t,Tpe),w=O.useRef(null),b=Tr(w,n),x=O.useRef(null),E=Tr(x,p),A=O.useRef(E);Uo(()=>{A.current=E},[E]),O.useImperativeHandle(p,()=>x.current,[]);const I=Ipe(d,s),[R,M]=O.useState(I),[L,N]=O.useState(XF(i));O.useEffect(()=>{x.current&&x.current.forceUpdate()}),O.useEffect(()=>{i&&N(XF(i))},[i]),Uo(()=>{if(!L||!c)return;const F=W=>{M(W.placement)};let z=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{F(W)}}];u!=null&&(z=z.concat(u)),h&&h.modifiers!=null&&(z=z.concat(h.modifiers));const G=Spe(L,w.current,$({placement:I},h,{modifiers:z}));return A.current(G),()=>{G.destroy(),A.current(null)}},[L,a,u,c,h,I]);const H={placement:R};y!==null&&(H.TransitionProps=y);const V=Ppe(),U=(r=v.root)!=null?r:"div",D=ti({elementType:U,externalSlotProps:m.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:V.root});return C.jsx(U,$({},D,{children:typeof o=="function"?o(H):o}))}),kpe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=Ope,popperRef:m,style:v,transition:y=!1,slotProps:S={},slots:w={}}=t,b=Ne(t,Ape),[x,E]=O.useState(!0),A=()=>{E(!1)},I=()=>{E(!0)};if(!u&&!d&&(!y||x))return null;let R;if(o)R=o;else if(r){const N=XF(r);R=N&&Rpe(N)?Fr(N).body:Fr(null).body}const M=!d&&u&&(!y||x)?"none":void 0,L=y?{in:d,onEnter:A,onExited:I}:void 0;return C.jsx(tQ,{disablePortal:a,container:R,children:C.jsx(Mpe,$({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:y?!x:d,placement:h,popperOptions:p,popperRef:m,slotProps:S,slots:w},b,{style:$({position:"fixed",top:0,left:0,display:M},v),TransitionProps:L,children:i}))})});function Dpe(e){const t=Fr(e);return t.body===e?Lc(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function D1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function G8(e){return parseInt(Lc(e).getComputedStyle(e).paddingRight,10)||0}function Lpe(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 V8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,u=!Lpe(s);a&&u&&D1(s,i)})}function DL(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function Npe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Dpe(r)){const s=oq(Fr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${G8(r)+s}px`;const a=Fr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,u=>{n.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${G8(u)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Fr(r).body;else{const s=r.parentElement,a=Lc(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.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:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function Bpe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class $pe{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&&D1(t.modalRef,!1);const i=Bpe(n);V8(n,t.mount,t.modalRef,i,!0);const o=DL(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=DL(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=Npe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=DL(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&&D1(t.modalRef,n),V8(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&&D1(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Fpe(e){return typeof e=="function"?e():e}function zpe(e){return e?e.props.hasOwnProperty("in"):!1}const Upe=new $pe;function jpe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Upe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:u,onClose:c,open:d,rootRef:h}=e,p=O.useRef({}),m=O.useRef(null),v=O.useRef(null),y=Tr(v,h),[S,w]=O.useState(!d),b=zpe(u);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Fr(m.current),A=()=>(p.current.modalRef=v.current,p.current.mount=m.current,p.current),I=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=go(()=>{const z=Fpe(t)||E().body;i.add(A(),z),v.current&&I()}),M=O.useCallback(()=>i.isTopModal(A()),[i]),L=go(z=>{m.current=z,z&&(d&&M()?I():v.current&&D1(v.current,x))}),N=O.useCallback(()=>{i.remove(A(),x)},[x,i]);O.useEffect(()=>()=>{N()},[N]),O.useEffect(()=>{d?R():(!b||!o)&&N()},[d,N,b,o,R]);const H=z=>G=>{var W;(W=z.onKeyDown)==null||W.call(z,G),!(G.key!=="Escape"||!M())&&(n||(G.stopPropagation(),c&&c(G,"escapeKeyDown")))},V=z=>G=>{var W;(W=z.onClick)==null||W.call(z,G),G.target===G.currentTarget&&c&&c(G,"backdropClick")};return{getRootProps:(z={})=>{const G=lC(e);delete G.onTransitionEnter,delete G.onTransitionExited;const W=$({},G,z);return $({role:"presentation"},W,{onKeyDown:H(W),ref:y})},getBackdropProps:(z={})=>{const G=z;return $({"aria-hidden":!0},G,{onClick:V(G),open:d})},getTransitionProps:()=>{const z=()=>{w(!1),s&&s()},G=()=>{w(!0),a&&a(),o&&N()};return{onEnter:XU(z,u==null?void 0:u.props.onEnter),onExited:XU(G,u==null?void 0:u.props.onExited)}},rootRef:y,portalRef:L,isTopModal:M,exited:S,hasTransition:b}}const Hpe=2;function nQ(e,t){return e-t}function Cb(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function X8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const a=Math.abs(t-o);return i===null||a({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}%`})}},qpe=e=>e;let S_;function LL(){return S_===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?S_=CSS.supports("touch-action","none"):S_=!0),S_}function Ype(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:p="horizontal",rootRef:m,scale:v=qpe,step:y=1,tabIndex:S,value:w}=e,b=O.useRef(),[x,E]=O.useState(-1),[A,I]=O.useState(-1),[R,M]=O.useState(!1),L=O.useRef(0),[N,H]=tx({controlled:w,default:n??u,name:"Slider"}),V=d&&((_e,Ue,Ke)=>{const Fe=_e.nativeEvent||_e,Be=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Be,"target",{writable:!0,value:{value:Ue,name:c}}),d(Be,Ue,Ke)}),U=Array.isArray(N);let D=U?N.slice().sort(nQ):[N];D=D.map(_e=>Cb(_e,u,a));const F=s===!0&&y!==null?[...Array(Math.floor((a-u)/y)+1)].map((_e,Ue)=>({value:u+y*Ue})):s||[],z=F.map(_e=>_e.value),{isFocusVisibleRef:G,onBlur:W,onFocus:K,ref:q}=s4(),[Q,re]=O.useState(-1),ue=O.useRef(),ce=Tr(q,ue),se=Tr(m,ce),J=_e=>Ue=>{var Ke;const Fe=Number(Ue.currentTarget.getAttribute("data-index"));K(Ue),G.current===!0&&re(Fe),I(Fe),_e==null||(Ke=_e.onFocus)==null||Ke.call(_e,Ue)},ae=_e=>Ue=>{var Ke;W(Ue),G.current===!1&&re(-1),I(-1),_e==null||(Ke=_e.onBlur)==null||Ke.call(_e,Ue)};Uo(()=>{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=>Ue=>{var Ke;(Ke=_e.onChange)==null||Ke.call(_e,Ue);const Fe=Number(Ue.currentTarget.getAttribute("data-index")),Be=D[Fe],Ot=z.indexOf(Be);let ft=Ue.target.valueAsNumber;if(F&&y==null){const Re=z[z.length-1];ft>Re?ft=Re:ft{const{current:Ke}=ue,{width:Fe,height:Be,bottom:Ot,left:ft}=Ke.getBoundingClientRect();let Re;pe.indexOf("vertical")===0?Re=(Ot-_e.y)/Be:Re=(_e.x-ft)/Fe,pe.indexOf("-reverse")!==-1&&(Re=1-Re);let at;if(at=Wpe(Re,u,a),y)at=Vpe(at,y,u);else{const Pe=X8(z,at);at=z[Pe]}at=Cb(at,u,a);let $t=0;if(U){Ue?$t=he.current:$t=X8(D,at),i&&(at=Cb(at,D[$t-1]||-1/0,D[$t+1]||1/0));const Pe=at;at=q8({values:D,newValue:at,index:$t}),i&&Ue||($t=at.indexOf(Pe),he.current=$t)}return{newValue:at,activeIndex:$t}},ye=go(_e=>{const Ue=x_(_e,b);if(!Ue)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ke,activeIndex:Fe}=ve({finger:Ue,move:!0});w_({sliderRef:ue,activeIndex:Fe,setActive:E}),H(Ke),!R&&L.current>Hpe&&M(!0),V&&!__(Ke,N)&&V(_e,Ke,Fe)}),xe=go(_e=>{const Ue=x_(_e,b);if(M(!1),!Ue)return;const{newValue:Ke}=ve({finger:Ue,move:!0});E(-1),_e.type==="touchend"&&I(-1),h&&h(_e,Ke),b.current=void 0,be()}),ge=go(_e=>{if(r)return;LL()||_e.preventDefault();const Ue=_e.changedTouches[0];Ue!=null&&(b.current=Ue.identifier);const Ke=x_(_e,b);if(Ke!==!1){const{newValue:Be,activeIndex:Ot}=ve({finger:Ke});w_({sliderRef:ue,activeIndex:Ot,setActive:E}),H(Be),V&&!__(Be,N)&&V(_e,Be,Ot)}L.current=0;const Fe=Fr(ue.current);Fe.addEventListener("touchmove",ye),Fe.addEventListener("touchend",xe)}),be=O.useCallback(()=>{const _e=Fr(ue.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);O.useEffect(()=>{const{current:_e}=ue;return _e.addEventListener("touchstart",ge,{passive:LL()}),()=>{_e.removeEventListener("touchstart",ge,{passive:LL()}),be()}},[be,ge]),O.useEffect(()=>{r&&be()},[r,be]);const Ze=_e=>Ue=>{var Ke;if((Ke=_e.onMouseDown)==null||Ke.call(_e,Ue),r||Ue.defaultPrevented||Ue.button!==0)return;Ue.preventDefault();const Fe=x_(Ue,b);if(Fe!==!1){const{newValue:Ot,activeIndex:ft}=ve({finger:Fe});w_({sliderRef:ue,activeIndex:ft,setActive:E}),H(Ot),V&&!__(Ot,N)&&V(Ue,Ot,ft)}L.current=0;const Be=Fr(ue.current);Be.addEventListener("mousemove",ye),Be.addEventListener("mouseup",xe)},qe=cC(U?D[0]:u,u,a),ut=cC(D[D.length-1],u,a)-qe,Bt=(_e={})=>{const Ue={onMouseDown:Ze(_e||{})},Ke=$({},_e,Ue);return $({ref:se},Ke)},Oe=_e=>Ue=>{var Ke;(Ke=_e.onMouseOver)==null||Ke.call(_e,Ue);const Fe=Number(Ue.currentTarget.getAttribute("data-index"));I(Fe)},ze=_e=>Ue=>{var Ke;(Ke=_e.onMouseLeave)==null||Ke.call(_e,Ue),I(-1)};return{active:x,axis:pe,axisProps:Xpe,dragging:R,focusedThumbIndex:Q,getHiddenInputProps:(_e={})=>{var Ue;const Ke={onChange:le(_e||{}),onFocus:J(_e||{}),onBlur:ae(_e||{})},Fe=$({},_e,Ke);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(a),"aria-valuemin":v(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(Ue=e.step)!=null?Ue:void 0,disabled:r},Fe,{style:$({},Tse,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Bt,getThumbProps:(_e={})=>{const Ue={onMouseOver:Oe(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,Ue)},marks:F,open:A,range:U,rootRef:se,trackLeap:ut,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function Kpe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=O.useRef();O.useEffect(()=>{if(!i)return;function w(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[i,r]);const a=go((w,b)=>{r==null||r(w,b)}),u=go(w=>{!r||w==null||(clearTimeout(s.current),s.current=setTimeout(()=>{a(null,"timeout")},w))});O.useEffect(()=>(i&&u(t),()=>{clearTimeout(s.current)}),[i,t,u]);const c=w=>{r==null||r(w,"clickaway")},d=()=>{clearTimeout(s.current)},h=O.useCallback(()=>{t!=null&&u(o??t*.5)},[t,o,u]),p=w=>b=>{const x=w.onBlur;x==null||x(b),h()},m=w=>b=>{const x=w.onFocus;x==null||x(b),d()},v=w=>b=>{const x=w.onMouseEnter;x==null||x(b),d()},y=w=>b=>{const x=w.onMouseLeave;x==null||x(b),h()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",d)}},[n,h,i]),{getRootProps:(w={})=>{const b=$({},lC(e),lC(w));return $({role:"presentation"},w,b,{onBlur:p(b),onFocus:m(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:c}}const Qpe=["onChange","maxRows","minRows","style","value"];function E_(e){return parseInt(e,10)||0}const Jpe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Y8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const Zpe=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,u=Ne(t,Qpe),{current:c}=O.useRef(a!=null),d=O.useRef(null),h=Tr(n,d),p=O.useRef(null),m=O.useRef(0),[v,y]=O.useState({outerHeightStyle:0}),S=O.useCallback(()=>{const E=d.current,I=Lc(E).getComputedStyle(E);if(I.width==="0px")return{outerHeightStyle:0};const R=p.current;R.style.width=I.width,R.value=E.value||t.placeholder||"x",R.value.slice(-1)===` -`&&(R.value+=" ");const M=I.boxSizing,L=E_(I.paddingBottom)+E_(I.paddingTop),N=E_(I.borderBottomWidth)+E_(I.borderTopWidth),H=R.scrollHeight;R.value="x";const V=R.scrollHeight;let U=H;o&&(U=Math.max(Number(o)*V,U)),i&&(U=Math.min(Number(i)*V,U)),U=Math.max(U,V);const D=U+(M==="border-box"?L+N:0),F=Math.abs(U-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),w=(E,A)=>{const{outerHeightStyle:I,overflow:R}=A;return m.current<20&&(I>0&&Math.abs((E.outerHeightStyle||0)-I)>1||E.overflow!==R)?(m.current+=1,{overflow:R,outerHeightStyle:I}):E},b=O.useCallback(()=>{const E=S();Y8(E)||y(A=>w(A,E))},[S]);Uo(()=>{const E=()=>{const H=S();Y8(H)||vv.flushSync(()=>{y(V=>w(V,H))})},A=()=>{m.current=0,E()};let I;const R=IT(A),M=d.current,L=Lc(M);L.addEventListener("resize",R);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(A),N.observe(M)),()=>{R.clear(),cancelAnimationFrame(I),L.removeEventListener("resize",R),N&&N.disconnect()}},[S]),Uo(()=>{b()}),O.useEffect(()=>{m.current=0},[a]);const x=E=>{m.current=0,c||b(),r&&r(E)};return C.jsxs(O.Fragment,{children:[C.jsx("textarea",$({value:a,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},u)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},Jpe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),ege=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],tge=Ce(kpe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nge=O.forwardRef(function(t,n){var r;const i=ZT(),o=Pt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:u,componentsProps:c,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:v,placement:y,popperOptions:S,popperRef:w,transition:b,slots:x,slotProps:E}=o,A=Ne(o,ege),I=(r=x==null?void 0:x.root)!=null?r:u==null?void 0:u.Root,R=$({anchorEl:s,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:v,placement:y,popperOptions:S,popperRef:w,transition:b},A);return C.jsx(tge,$({as:a,direction:i==null?void 0:i.direction,slots:{root:I},slotProps:E??c},R,{ref:n}))}),rQ=nge;function rge(e){return Ct("MuiListSubheader",e)}Rt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const ige=["className","color","component","disableGutters","disableSticky","inset"],oge=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${De(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return It(s,rge,t)},sge=Ce("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(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})),iQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:u=!1,inset:c=!1}=r,d=Ne(r,ige),h=$({},r,{color:o,component:s,disableGutters:a,disableSticky:u,inset:c}),p=oge(h);return C.jsx(sge,$({as:s,className:je(p.root,i),ref:n,ownerState:h},d))});iQ.muiSkipListHighlight=!0;const age=iQ;function Zp({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 lge=O.createContext(void 0),Iz=lge;function md(){return O.useContext(Iz)}function oQ(e){return C.jsx(Dle,$({},e,{defaultTheme:nA,themeId:Pp}))}function K8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function fC(e,t=!1){return e&&(K8(e.value)&&e.value!==""||t&&K8(e.defaultValue)&&e.defaultValue!=="")}function uge(e){return e.startAdornment}function cge(e){return Ct("MuiInputBase",e)}const fge=Rt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jm=fge,dge=["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"],OA=(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${De(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},MA=(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]},hge=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:m,type:v}=e,y={root:["root",`color${De(n)}`,r&&"disabled",i&&"error",u&&"fullWidth",s&&"focused",a&&"formControl",p&&p!=="medium"&&`size${De(p)}`,d&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return It(y,cge,t)},kA=Ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:OA})(({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",[`&.${jm.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%"})),DA=Ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:MA})(({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] + .${jm.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},[`&.${jm.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"})}),pge=C.jsx(oQ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),gge=O.forwardRef(function(t,n){var r;const i=Pt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:u,components:c={},componentsProps:d={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:w="input",inputProps:b={},inputRef:x,maxRows:E,minRows:A,multiline:I=!1,name:R,onBlur:M,onChange:L,onClick:N,onFocus:H,onKeyDown:V,onKeyUp:U,placeholder:D,readOnly:F,renderSuffix:z,rows:G,slotProps:W={},slots:K={},startAdornment:q,type:Q="text",value:re}=i,ue=Ne(i,dge),ce=b.value!=null?b.value:re,{current:se}=O.useRef(ce!=null),J=O.useRef(),ae=O.useCallback(Fe=>{},[]),le=Tr(J,x,b.ref,ae),[he,pe]=O.useState(!1),ve=md(),ye=Zp({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 xe=ve&&ve.onFilled,ge=ve&&ve.onEmpty,be=O.useCallback(Fe=>{fC(Fe)?xe&&xe():ge&&ge()},[xe,ge]);Uo(()=>{se&&be({value:ce})},[ce,be,se]);const Ze=Fe=>{if(ye.disabled){Fe.stopPropagation();return}H&&H(Fe),b.onFocus&&b.onFocus(Fe),ve&&ve.onFocus?ve.onFocus(Fe):pe(!0)},qe=Fe=>{M&&M(Fe),b.onBlur&&b.onBlur(Fe),ve&&ve.onBlur?ve.onBlur(Fe):pe(!1)},ut=(Fe,...Be)=>{if(!se){const Ot=Fe.target||J.current;if(Ot==null)throw new Error(ed(1));be({value:Ot.value})}b.onChange&&b.onChange(Fe,...Be),L&&L(Fe,...Be)};O.useEffect(()=>{be(J.current)},[]);const Bt=Fe=>{J.current&&Fe.currentTarget===Fe.target&&J.current.focus(),N&&N(Fe)};let Oe=w,ze=b;I&&Oe==="input"&&(G?ze=$({type:void 0,minRows:G,maxRows:G},ze):ze=$({type:void 0,maxRows:E,minRows:A},ze),Oe=Zpe);const st=Fe=>{be(Fe.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};O.useEffect(()=>{ve&&ve.setAdornedStart(!!q)},[ve,q]);const mt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:I,size:ye.size,startAdornment:q,type:Q}),vt=hge(mt),_e=K.root||c.Root||kA,Ue=W.root||d.root||{},Ke=K.input||c.Input||DA;return ze=$({},ze,(r=W.input)!=null?r:d.input),C.jsxs(O.Fragment,{children:[!m&&pge,C.jsxs(_e,$({},Ue,!tu(_e)&&{ownerState:$({},mt,Ue.ownerState)},{ref:n,onClick:Bt},ue,{className:je(vt.root,Ue.className,u,F&&"MuiInputBase-readOnly"),children:[q,C.jsx(Iz.Provider,{value:null,children:C.jsx(Ke,$({ownerState:mt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:st,name:R,placeholder:D,readOnly:F,required:ye.required,rows:G,value:ce,onKeyDown:V,onKeyUp:U,type:Q},ze,!tu(Ke)&&{as:Oe,ownerState:$({},mt,ze.ownerState)},{ref:le,className:je(vt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:qe,onChange:ut,onFocus:Ze}))}),v,z?z($({},ye,{startAdornment:q})):null]}))]})}),LA=gge;function mge(e){return Ct("MuiInput",e)}const vge=$({},jm,Rt("MuiInput",["root","underline","input"])),Tb=vge;function yge(e){return Ct("MuiOutlinedInput",e)}const bge=$({},jm,Rt("MuiOutlinedInput",["root","notchedOutline","input"])),rf=bge;function xge(e){return Ct("MuiFilledInput",e)}const wge=$({},jm,Rt("MuiFilledInput",["root","underline","input"])),Fh=wge,_ge=zt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Sge=zt(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 Ege(e){return Ct("MuiAvatar",e)}Rt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Cge=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Tge=e=>{const{classes:t,variant:n,colorDefault:r}=e;return It({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Ege,t)},Age=Ce("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]}))),Ige=Ce("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Rge=Ce(Sge,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Pge({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 a=new Image;return a.onload=()=>{s&&o("loaded")},a.onerror=()=>{s&&o("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const Oge=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:a="div",imgProps:u,sizes:c,src:d,srcSet:h,variant:p="circular"}=r,m=Ne(r,Cge);let v=null;const y=Pge($({},u,{src:d,srcSet:h})),S=d||h,w=S&&y!=="error",b=$({},r,{colorDefault:!w,component:a,variant:p}),x=Tge(b);return w?v=C.jsx(Ige,$({alt:i,srcSet:h,src:d,sizes:c,ownerState:b,className:x.img},u)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Rge,{ownerState:b,className:x.fallback}),C.jsx(Age,$({as:a,ownerState:b,className:je(x.root,s),ref:n},m,{children:v}))}),Mge=Oge,kge=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Dge={entering:{opacity:1},entered:{opacity:1}},Lge=O.forwardRef(function(t,n){const r=Dn(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:u,in:c,onEnter:d,onEntered:h,onEntering:p,onExit:m,onExited:v,onExiting:y,style:S,timeout:w=i,TransitionComponent:b=yz}=t,x=Ne(t,kge),E=O.useRef(null),A=Tr(E,a.ref,n),I=D=>F=>{if(D){const z=E.current;F===void 0?D(z):D(z,F)}},R=I(p),M=I((D,F)=>{WK(D);const z=Bm({style:S,timeout:w,easing:u},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",z),D.style.transition=r.transitions.create("opacity",z),d&&d(D,F)}),L=I(h),N=I(y),H=I(D=>{const F=Bm({style:S,timeout:w,easing:u},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),m&&m(D)}),V=I(v),U=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:c,nodeRef:E,onEnter:M,onEntered:L,onEntering:R,onExit:H,onExited:V,onExiting:N,addEndListener:U,timeout:w},x,{children:(D,F)=>O.cloneElement(a,$({style:$({opacity:0,visibility:D==="exited"&&!c?"hidden":void 0},Dge[D],S,a.props.style),ref:A},F))}))}),zp=Lge;function Nge(e){return Ct("MuiBackdrop",e)}Rt("MuiBackdrop",["root","invisible"]);const Bge=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],$ge=e=>{const{classes:t,invisible:n}=e;return It({root:["root",n&&"invisible"]},Nge,t)},Fge=Ce("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"})),zge=O.forwardRef(function(t,n){var r,i,o;const s=Pt({props:t,name:"MuiBackdrop"}),{children:a,className:u,component:c="div",components:d={},componentsProps:h={},invisible:p=!1,open:m,slotProps:v={},slots:y={},TransitionComponent:S=zp,transitionDuration:w}=s,b=Ne(s,Bge),x=$({},s,{component:c,invisible:p}),E=$ge(x),A=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:m,timeout:w},b,{children:C.jsx(Fge,$({"aria-hidden":!0},A,{as:(i=(o=y.root)!=null?o:d.Root)!=null?i:c,className:je(E.root,u,A==null?void 0:A.className),ownerState:$({},x,A==null?void 0:A.ownerState),classes:E,ref:n,children:a}))}))}),sQ=zge,Uge=E4(),jge=$le({themeId:Pp,defaultTheme:Uge,defaultClassName:"MuiBox-root",generateClassName:aq.generate}),gt=jge;function Hge(e){return Ct("MuiButton",e)}const Wge=Rt("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"]),C_=Wge,Gge=O.createContext({}),Vge=Gge,Xge=O.createContext(void 0),qge=Xge,Yge=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Kge=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${De(t)}`,`size${De(i)}`,`${o}Size${De(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${De(i)}`],endIcon:["endIcon",`iconSize${De(i)}`]},u=It(a,Hge,s);return $({},s,u)},aQ=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}}),Qge=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${De(n.color)}`],t[`size${De(n.size)}`],t[`${n.variant}Size${De(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})`:An(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})`:An(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})`:An(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]}),[`&.${C_.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${C_.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 ${An(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"},[`&.${C_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${C_.disabled}`]:{boxShadow:"none"}}),Jge=Ce("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${De(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},aQ(e))),Zge=Ce("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${De(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},aQ(e))),eme=O.forwardRef(function(t,n){const r=O.useContext(Vge),i=O.useContext(qge),o=a4(r,t),s=Pt({props:o,name:"MuiButton"}),{children:a,color:u="primary",component:c="button",className:d,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:w="medium",startIcon:b,type:x,variant:E="text"}=s,A=Ne(s,Yge),I=$({},s,{color:u,component:c,disabled:h,disableElevation:p,disableFocusRipple:m,fullWidth:S,size:w,type:x,variant:E}),R=Kge(I),M=b&&C.jsx(Jge,{className:R.startIcon,ownerState:I,children:b}),L=v&&C.jsx(Zge,{className:R.endIcon,ownerState:I,children:v}),N=i||"";return C.jsxs(Qge,$({ownerState:I,className:je(r.className,R.root,d,N),component:c,disabled:h,focusRipple:!m,focusVisibleClassName:je(R.focusVisible,y),ref:n,type:x},A,{classes:R,children:[M,a,L]}))}),Rz=eme;function tme(e){return Ct("MuiCard",e)}Rt("MuiCard",["root"]);const nme=["className","raised"],rme=e=>{const{classes:t}=e;return It({root:["root"]},tme,t)},ime=Ce(yv,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),ome=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ne(r,nme),a=$({},r,{raised:o}),u=rme(a);return C.jsx(ime,$({className:je(u.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),sme=ome;function ame(e){return Ct("PrivateSwitchBase",e)}Rt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const lme=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ume=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${De(i)}`],input:["input"]};return It(o,ame,t)},cme=Ce(Yc)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),fme=Ce("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),dme=O.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:u,disableFocusRipple:c=!1,edge:d=!1,icon:h,id:p,inputProps:m,inputRef:v,name:y,onBlur:S,onChange:w,onFocus:b,readOnly:x,required:E=!1,tabIndex:A,type:I,value:R}=t,M=Ne(t,lme),[L,N]=tx({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),H=md(),V=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 q=K.target.checked;N(q),w&&w(K,q)};let F=u;H&&typeof F>"u"&&(F=H.disabled);const z=I==="checkbox"||I==="radio",G=$({},t,{checked:L,disabled:F,disableFocusRipple:c,edge:d}),W=ume(G);return C.jsxs(cme,$({component:"span",className:je(W.root,s),centerRipple:!0,focusRipple:!c,disabled:F,tabIndex:null,role:void 0,onFocus:V,onBlur:U,ownerState:G,ref:n},M,{children:[C.jsx(fme,$({autoFocus:r,checked:i,defaultChecked:a,className:W.input,disabled:F,id:z?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:G,tabIndex:A,type:I},I==="checkbox"&&R===void 0?{}:{value:R},m)),L?o:h]}))}),lQ=dme,hme=zt(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"),pme=zt(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"),gme=zt(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 mme(e){return Ct("MuiCheckbox",e)}const vme=Rt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),NL=vme,yme=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],bme=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${De(r)}`,`size${De(i)}`]},s=It(o,mme,t);return $({},t,s)},xme=Ce(lQ,{shouldForwardProp:e=>ka(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${De(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})`:An(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${NL.checked}, &.${NL.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${NL.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),wme=C.jsx(pme,{}),_me=C.jsx(hme,{}),Sme=C.jsx(gme,{}),Eme=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=wme,color:a="primary",icon:u=_me,indeterminate:c=!1,indeterminateIcon:d=Sme,inputProps:h,size:p="medium",className:m}=o,v=Ne(o,yme),y=c?d:u,S=c?d:s,w=$({},o,{color:a,indeterminate:c,size:p}),b=bme(w);return C.jsx(xme,$({type:"checkbox",inputProps:$({"data-indeterminate":c},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:w,ref:n,className:je(b.root,m)},v,{classes:b}))}),Cme=Eme;function Tme(e){return Ct("MuiCircularProgress",e)}Rt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ame=["className","color","disableShrink","size","style","thickness","value","variant"];let NA=e=>e,Q8,J8,Z8,eH;const of=44,Ime=fd(Q8||(Q8=NA` +`),ua.rippleVisible,_de,GF,({theme:e})=>e.transitions.easing.easeInOut,ua.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ua.child,ua.childLeaving,Sde,GF,({theme:e})=>e.transitions.easing.easeInOut,ua.childPulsate,Ede,({theme:e})=>e.transitions.easing.easeInOut),Ade=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ne(r,xde),[u,c]=O.useState([]),d=O.useRef(0),h=O.useRef(null);O.useEffect(()=>{h.current&&(h.current(),h.current=null)},[u]);const p=O.useRef(!1),m=O.useRef(0),v=O.useRef(null),y=O.useRef(null);O.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const S=O.useCallback(E=>{const{pulsate:A,rippleX:I,rippleY:R,rippleSize:M,cb:D}=E;c(N=>[...N,C.jsx(Tde,{classes:{ripple:je(o.ripple,ua.ripple),rippleVisible:je(o.rippleVisible,ua.rippleVisible),ripplePulsate:je(o.ripplePulsate,ua.ripplePulsate),child:je(o.child,ua.child),childLeaving:je(o.childLeaving,ua.childLeaving),childPulsate:je(o.childPulsate,ua.childPulsate)},timeout:GF,pulsate:A,rippleX:I,rippleY:R,rippleSize:M},d.current)]),d.current+=1,h.current=D},[o]),w=O.useCallback((E={},A={},I=()=>{})=>{const{pulsate:R=!1,center:M=i||A.pulsate,fakeElement:D=!1}=A;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 N=D?null:y.current,H=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,U,L;if(M||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)V=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;V=Math.round(F-H.left),U=Math.round(z-H.top)}if(M)L=Math.sqrt((2*H.width**2+H.height**2)/3),L%2===0&&(L+=1);else{const F=Math.max(Math.abs((N?N.clientWidth:0)-V),V)*2+2,z=Math.max(Math.abs((N?N.clientHeight:0)-U),U)*2+2;L=Math.sqrt(F**2+z**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:R,rippleX:V,rippleY:U,rippleSize:L,cb:I})},m.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},wde)):S({pulsate:R,rippleX:V,rippleY:U,rippleSize:L,cb:I})},[i,S]),b=O.useCallback(()=>{w({},{pulsate:!0})},[w]),x=O.useCallback((E,A)=>{if(clearTimeout(m.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,m.current=setTimeout(()=>{x(E,A)});return}v.current=null,c(I=>I.length>0?I.slice(1):I),h.current=A},[]);return O.useImperativeHandle(n,()=>({pulsate:b,start:w,stop:x}),[b,w,x]),C.jsx(Cde,$({className:je(ua.root,o.root,s),ref:y},a,{children:C.jsx(sde,{component:null,exit:!0,children:u})}))}),Ide=Ade;function Rde(e){return Ct("MuiButtonBase",e)}const Pde=Rt("MuiButtonBase",["root","disabled","focusVisible"]),Ode=Pde,Mde=["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"],kde=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=It({root:["root",t&&"disabled",n&&"focusVisible"]},Rde,i);return n&&r&&(s.root+=` ${r}`),s},Lde=Ce("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"},[`&.${Ode.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Dde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:u="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:m="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:w,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:I,onMouseLeave:R,onMouseUp:M,onTouchEnd:D,onTouchMove:N,onTouchStart:H,tabIndex:V=0,TouchRippleProps:U,touchRippleRef:L,type:F}=r,z=Ne(r,Mde),G=O.useRef(null),W=O.useRef(null),K=Tr(W,L),{isFocusVisibleRef:q,onFocus:Q,onBlur:re,ref:ue}=a4(),[ce,se]=O.useState(!1);c&&ce&&se(!1),O.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),G.current.focus()}}),[]);const[J,ae]=O.useState(!1);O.useEffect(()=>{ae(!0)},[]);const le=J&&!d&&!c;O.useEffect(()=>{ce&&p&&!d&&J&&W.current.pulsate()},[d,p,ce,J]);function he(Be,Ot,ft=h){return go(Re=>(Ot&&Ot(Re),!ft&&W.current&&W.current[Be](Re),!0))}const pe=he("start",I),ve=he("stop",S),ye=he("stop",w),xe=he("stop",M),ge=he("stop",Be=>{ce&&Be.preventDefault(),R&&R(Be)}),be=he("start",H),Ze=he("stop",D),qe=he("stop",N),ut=he("stop",Be=>{re(Be),q.current===!1&&se(!1),v&&v(Be)},!1),Bt=go(Be=>{G.current||(G.current=Be.currentTarget),Q(Be),q.current===!0&&(se(!0),x&&x(Be)),b&&b(Be)}),Oe=()=>{const Be=G.current;return u&&u!=="button"&&!(Be.tagName==="A"&&Be.href)},ze=O.useRef(!1),st=go(Be=>{p&&!ze.current&&ce&&W.current&&Be.key===" "&&(ze.current=!0,W.current.stop(Be,()=>{W.current.start(Be)})),Be.target===Be.currentTarget&&Oe()&&Be.key===" "&&Be.preventDefault(),E&&E(Be),Be.target===Be.currentTarget&&Oe()&&Be.key==="Enter"&&!c&&(Be.preventDefault(),y&&y(Be))}),mt=go(Be=>{p&&Be.key===" "&&W.current&&ce&&!Be.defaultPrevented&&(ze.current=!1,W.current.stop(Be,()=>{W.current.pulsate(Be)})),A&&A(Be),y&&Be.target===Be.currentTarget&&Oe()&&Be.key===" "&&!Be.defaultPrevented&&y(Be)});let vt=u;vt==="button"&&(z.href||z.to)&&(vt=m);const _e={};vt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=c):(!z.href&&!z.to&&(_e.role="button"),c&&(_e["aria-disabled"]=c));const Ue=Tr(n,ue,G),Ke=$({},r,{centerRipple:o,component:u,disabled:c,disableRipple:d,disableTouchRipple:h,focusRipple:p,tabIndex:V,focusVisible:ce}),Fe=kde(Ke);return C.jsxs(Lde,$({as:vt,className:je(Fe.root,a),ownerState:Ke,onBlur:ut,onClick:y,onContextMenu:ve,onFocus:Bt,onKeyDown:st,onKeyUp:mt,onMouseDown:pe,onMouseLeave:ge,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Ze,onTouchMove:qe,onTouchStart:be,ref:Ue,tabIndex:c?-1:V,type:F},_e,z,{children:[s,le?C.jsx(Ide,$({ref:K,center:o},U)):null]}))}),Yc=Dde;function Nde(e){return Ct("MuiIconButton",e)}const Bde=Rt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),$de=Bde,Fde=["edge","children","className","color","disabled","disableFocusRipple","size"],zde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Le(r)}`,i&&`edge${Le(i)}`,`size${Le(o)}`]};return It(s,Nde,t)},Ude=Ce(Yc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Le(n.color)}`],n.edge&&t[`edge${Le(n.edge)}`],t[`size${Le(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})`:An(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})`:An(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)},{[`&.${$de.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),jde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium"}=r,h=Ne(r,Fde),p=$({},r,{edge:i,color:a,disabled:u,disableFocusRipple:c,size:d}),m=zde(p);return C.jsx(Ude,$({className:je(m.root,s),centerRipple:!0,focusRipple:!c,disabled:u,ref:n,ownerState:p},h,{children:o}))}),$p=jde;function Hde(e){return Ct("MuiTypography",e)}Rt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Wde=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Gde=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${Le(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return It(a,Hde,s)},Vde=Ce("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${Le(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})),L8={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Xde={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},qde=e=>Xde[e]||e,Yde=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTypography"}),i=qde(r.color),o=S4($({},r,{color:i})),{align:s="inherit",className:a,component:u,gutterBottom:c=!1,noWrap:d=!1,paragraph:h=!1,variant:p="body1",variantMapping:m=L8}=o,v=Ne(o,Wde),y=$({},o,{align:s,color:i,className:a,component:u,gutterBottom:c,noWrap:d,paragraph:h,variant:p,variantMapping:m}),S=u||(h?"p":m[p]||L8[p])||"span",w=Gde(y);return C.jsx(Vde,$({as:S,ref:n,ownerState:y,className:je(w.root,a)},v))}),Wt=Yde;function Kde(e){return Ct("MuiAppBar",e)}Rt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const Qde=["className","color","enableColorOnDark","position"],Jde=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Le(t)}`,`position${Le(n)}`]};return It(i,Kde,r)},b_=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Zde=Ce(yv,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Le(n.position)}`],t[`color${Le(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:b_(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:b_(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:b_(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:b_(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"}))}),ehe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,u=Ne(r,Qde),c=$({},r,{color:o,position:a,enableColorOnDark:s}),d=Jde(c);return C.jsx(Zde,$({square:!0,component:"header",ownerState:c,elevation:4,className:je(d.root,i,a==="fixed"&&"mui-fixed"),ref:n},u))}),the=ehe;function tu(e){return typeof e=="string"}function i1(e,t,n){return e===void 0||tu(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function nhe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const rhe={disableDefaultClasses:!1},ihe=O.createContext(rhe);function ohe(e){const{disableDefaultClasses:t}=O.useContext(ihe);return n=>t?"":e(n)}function uC(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 she(e,t,n){return typeof e=="function"?e(t,n):e}function D8(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 ahe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=je(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 m.length>0&&(y.className=m),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=uC($({},i,r)),a=D8(r),u=D8(i),c=t(s),d=je(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},c,n,u,a);return d.length>0&&(p.className=d),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:c.ref}}const lhe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ti(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ne(e,lhe),a=o?{}:she(r,i),{props:u,internalRef:c}=ahe($({},s,{externalSlotProps:a})),d=Tr(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return i1(n,$({},u,{ref:d}),i)}function N8(e){return e.substring(2).toLowerCase()}function uhe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=Tr(t.ref,a),h=go(v=>{const y=c.current;c.current=!1;const S=Fr(a.current);if(!u.current||!a.current||"clientX"in v&&uhe(v,S))return;if(s.current){s.current=!1;return}let w;v.composedPath?w=v.composedPath().indexOf(a.current)>-1:w=!S.documentElement.contains(v.target)||a.current.contains(v.target),!w&&(n||!y)&&i(v)}),p=v=>y=>{c.current=!0;const S=t.props[v];S&&S(y)},m={ref:d};return o!==!1&&(m[o]=p(o)),O.useEffect(()=>{if(o!==!1){const v=N8(o),y=Fr(a.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&&(m[r]=p(r)),O.useEffect(()=>{if(r!==!1){const v=N8(r),y=Fr(a.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(O.Fragment,{children:O.cloneElement(t,m)})}const fhe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function dhe(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 hhe(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 phe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||hhe(e))}function ghe(e){const t=[],n=[];return Array.from(e.querySelectorAll(fhe)).forEach((r,i)=>{const o=dhe(r);o===-1||!phe(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 mhe(){return!0}function vhe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=ghe,isEnabled:s=mhe,open:a}=e,u=O.useRef(!1),c=O.useRef(null),d=O.useRef(null),h=O.useRef(null),p=O.useRef(null),m=O.useRef(!1),v=O.useRef(null),y=Tr(t.ref,v),S=O.useRef(null);O.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),O.useEffect(()=>{if(!a||!v.current)return;const x=Fr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(u.current=!0,h.current.focus()),h.current=null)}},[a]),O.useEffect(()=>{if(!a||!v.current)return;const x=Fr(v.current),E=R=>{S.current=R,!(r||!s()||R.key!=="Tab")&&x.activeElement===v.current&&R.shiftKey&&(u.current=!0,d.current&&d.current.focus())},A=()=>{const R=v.current;if(R===null)return;if(!x.hasFocus()||!s()||u.current){u.current=!1;return}if(R.contains(x.activeElement)||r&&x.activeElement!==c.current&&x.activeElement!==d.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let M=[];if((x.activeElement===c.current||x.activeElement===d.current)&&(M=o(v.current)),M.length>0){var D,N;const H=!!((D=S.current)!=null&&D.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),V=M[0],U=M[M.length-1];typeof V!="string"&&typeof U!="string"&&(H?U.focus():V.focus())}else R.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const I=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(I),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,a,o]);const w=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0};return C.jsxs(O.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:y,onFocus:w}),C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}var os="top",Ra="bottom",Pa="right",ss="left",_z="auto",xw=[os,Ra,Pa,ss],$m="start",_x="end",yhe="clippingParents",XK="viewport",Eb="popper",bhe="reference",B8=xw.reduce(function(e,t){return e.concat([t+"-"+$m,t+"-"+_x])},[]),qK=[].concat(xw,[_z]).reduce(function(e,t){return e.concat([t,t+"-"+$m,t+"-"+_x])},[]),xhe="beforeRead",whe="read",_he="afterRead",She="beforeMain",Ehe="main",Che="afterMain",The="beforeWrite",Ahe="write",Ihe="afterWrite",Rhe=[xhe,whe,_he,She,Ehe,Che,The,Ahe,Ihe];function cu(e){return e?(e.nodeName||"").toLowerCase():null}function Qs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Fp(e){var t=Qs(e).Element;return e instanceof t||e instanceof Element}function _a(e){var t=Qs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sz(e){if(typeof ShadowRoot>"u")return!1;var t=Qs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(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];!_a(o)||!cu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Ohe(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]),a=s.reduce(function(u,c){return u[c]="",u},{});!_a(i)||!cu(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const Mhe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:Ohe,requires:["computeStyles"]};function nu(e){return e.split("-")[0]}var wp=Math.max,cC=Math.min,Fm=Math.round;function VF(){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 YK(){return!/^((?!chrome|android).)*safari/i.test(VF())}function zm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&_a(e)&&(i=e.offsetWidth>0&&Fm(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Fm(r.height)/e.offsetHeight||1);var s=Fp(e)?Qs(e):window,a=s.visualViewport,u=!YK()&&n,c=(r.left+(u&&a?a.offsetLeft:0))/i,d=(r.top+(u&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Ez(e){var t=zm(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 KK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sz(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zc(e){return Qs(e).getComputedStyle(e)}function khe(e){return["table","td","th"].indexOf(cu(e))>=0}function gd(e){return((Fp(e)?e.ownerDocument:e.document)||window.document).documentElement}function PA(e){return cu(e)==="html"?e:e.assignedSlot||e.parentNode||(Sz(e)?e.host:null)||gd(e)}function $8(e){return!_a(e)||zc(e).position==="fixed"?null:e.offsetParent}function Lhe(e){var t=/firefox/i.test(VF()),n=/Trident/i.test(VF());if(n&&_a(e)){var r=zc(e);if(r.position==="fixed")return null}var i=PA(e);for(Sz(i)&&(i=i.host);_a(i)&&["html","body"].indexOf(cu(i))<0;){var o=zc(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 ww(e){for(var t=Qs(e),n=$8(e);n&&khe(n)&&zc(n).position==="static";)n=$8(n);return n&&(cu(n)==="html"||cu(n)==="body"&&zc(n).position==="static")?t:n||Lhe(e)||t}function Cz(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function M1(e,t,n){return wp(e,cC(t,n))}function Dhe(e,t,n){var r=M1(e,t,n);return r>n?n:r}function QK(){return{top:0,right:0,bottom:0,left:0}}function JK(e){return Object.assign({},QK(),e)}function ZK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Nhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,JK(typeof t!="number"?t:ZK(t,xw))};function Bhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=nu(n.placement),u=Cz(a),c=[ss,Pa].indexOf(a)>=0,d=c?"height":"width";if(!(!o||!s)){var h=Nhe(i.padding,n),p=Ez(o),m=u==="y"?os:ss,v=u==="y"?Ra:Pa,y=n.rects.reference[d]+n.rects.reference[u]-s[u]-n.rects.popper[d],S=s[u]-n.rects.reference[u],w=ww(o),b=w?u==="y"?w.clientHeight||0:w.clientWidth||0:0,x=y/2-S/2,E=h[m],A=b-p[d]-h[v],I=b/2-p[d]/2+x,R=M1(E,I,A),M=u;n.modifiersData[r]=(t={},t[M]=R,t.centerOffset=R-I,t)}}function $he(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)||KK(t.elements.popper,i)&&(t.elements.arrow=i))}const Fhe={name:"arrow",enabled:!0,phase:"main",fn:Bhe,effect:$he,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Um(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uhe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Fm(n*i)/i||0,y:Fm(r*i)/i||0}}function F8(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof d=="function"?d({x:m,y}):{x:m,y};m=S.x,y=S.y;var w=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=ss,E=os,A=window;if(c){var I=ww(n),R="clientHeight",M="clientWidth";if(I===Qs(n)&&(I=gd(n),zc(I).position!=="static"&&a==="absolute"&&(R="scrollHeight",M="scrollWidth")),I=I,i===os||(i===ss||i===Pa)&&o===_x){E=Ra;var D=h&&I===A&&A.visualViewport?A.visualViewport.height:I[R];y-=D-r.height,y*=u?1:-1}if(i===ss||(i===os||i===Ra)&&o===_x){x=Pa;var N=h&&I===A&&A.visualViewport?A.visualViewport.width:I[M];m-=N-r.width,m*=u?1:-1}}var H=Object.assign({position:a},c&&zhe),V=d===!0?Uhe({x:m,y},Qs(n)):{x:m,y};if(m=V.x,y=V.y,u){var U;return Object.assign({},H,(U={},U[E]=b?"0":"",U[x]=w?"0":"",U.transform=(A.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",U))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=w?m+"px":"",t.transform="",t))}function jhe(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,a=n.roundOffsets,u=a===void 0?!0:a,c={placement:nu(t.placement),variation:Um(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,F8(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,F8(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Hhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jhe,data:{}};var x_={passive:!0};function Whe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,u=Qs(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,x_)}),a&&u.addEventListener("resize",n.update,x_),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,x_)}),a&&u.removeEventListener("resize",n.update,x_)}}const Ghe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Whe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function iE(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Xhe={start:"end",end:"start"};function z8(e){return e.replace(/start|end/g,function(t){return Xhe[t]})}function Tz(e){var t=Qs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Az(e){return zm(gd(e)).left+Tz(e).scrollLeft}function qhe(e,t){var n=Qs(e),r=gd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;var c=YK();(c||!c&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a+Az(e),y:u}}function Yhe(e){var t,n=gd(e),r=Tz(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=wp(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=wp(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Az(e),u=-r.scrollTop;return zc(i||n).direction==="rtl"&&(a+=wp(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}function Iz(e){var t=zc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function eQ(e){return["html","body","#document"].indexOf(cu(e))>=0?e.ownerDocument.body:_a(e)&&Iz(e)?e:eQ(PA(e))}function k1(e,t){var n;t===void 0&&(t=[]);var r=eQ(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Qs(r),s=i?[o].concat(o.visualViewport||[],Iz(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(k1(PA(s)))}function XF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Khe(e,t){var n=zm(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 U8(e,t,n){return t===XK?XF(qhe(e,n)):Fp(t)?Khe(t,n):XF(Yhe(gd(e)))}function Qhe(e){var t=k1(PA(e)),n=["absolute","fixed"].indexOf(zc(e).position)>=0,r=n&&_a(e)?ww(e):e;return Fp(r)?t.filter(function(i){return Fp(i)&&KK(i,r)&&cu(i)!=="body"}):[]}function Jhe(e,t,n,r){var i=t==="clippingParents"?Qhe(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(u,c){var d=U8(e,c,r);return u.top=wp(d.top,u.top),u.right=cC(d.right,u.right),u.bottom=cC(d.bottom,u.bottom),u.left=wp(d.left,u.left),u},U8(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function tQ(e){var t=e.reference,n=e.element,r=e.placement,i=r?nu(r):null,o=r?Um(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,u;switch(i){case os:u={x:s,y:t.y-n.height};break;case Ra:u={x:s,y:t.y+t.height};break;case Pa:u={x:t.x+t.width,y:a};break;case ss:u={x:t.x-n.width,y:a};break;default:u={x:t.x,y:t.y}}var c=i?Cz(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case $m:u[c]=u[c]-(t[d]/2-n[d]/2);break;case _x:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function Sx(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,a=n.boundary,u=a===void 0?yhe:a,c=n.rootBoundary,d=c===void 0?XK:c,h=n.elementContext,p=h===void 0?Eb:h,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,S=y===void 0?0:y,w=JK(typeof S!="number"?S:ZK(S,xw)),b=p===Eb?bhe:Eb,x=e.rects.popper,E=e.elements[v?b:p],A=Jhe(Fp(E)?E:E.contextElement||gd(e.elements.popper),u,d,s),I=zm(e.elements.reference),R=tQ({reference:I,element:x,strategy:"absolute",placement:i}),M=XF(Object.assign({},x,R)),D=p===Eb?M:I,N={top:A.top-D.top+w.top,bottom:D.bottom-A.bottom+w.bottom,left:A.left-D.left+w.left,right:D.right-A.right+w.right},H=e.modifiersData.offset;if(p===Eb&&H){var V=H[i];Object.keys(N).forEach(function(U){var L=[Pa,Ra].indexOf(U)>=0?1:-1,F=[os,Ra].indexOf(U)>=0?"y":"x";N[U]+=V[F]*L})}return N}function Zhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?qK:u,d=Um(r),h=d?a?B8:B8.filter(function(v){return Um(v)===d}):xw,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,y){return v[y]=Sx(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[nu(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function epe(e){if(nu(e)===_z)return[];var t=iE(e);return[z8(e),t,z8(t)]}function tpe(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,a=s===void 0?!0:s,u=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,S=t.options.placement,w=nu(S),b=w===S,x=u||(b||!v?[iE(S)]:epe(S)),E=[S].concat(x).reduce(function(ce,se){return ce.concat(nu(se)===_z?Zhe(t,{placement:se,boundary:d,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,I=t.rects.popper,R=new Map,M=!0,D=E[0],N=0;N=0,F=L?"width":"height",z=Sx(t,{placement:H,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),G=L?U?Pa:ss:U?Ra:os;A[F]>I[F]&&(G=iE(G));var W=iE(G),K=[];if(o&&K.push(z[V]<=0),a&&K.push(z[G]<=0,z[W]<=0),K.every(function(ce){return ce})){D=H,M=!1;break}R.set(H,K)}if(M)for(var q=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 D=J,"break"},re=q;re>0;re--){var ue=Q(re);if(ue==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const npe={name:"flip",enabled:!0,phase:"main",fn:tpe,requiresIfExists:["offset"],data:{_skip:!1}};function j8(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 H8(e){return[os,Pa,Ra,ss].some(function(t){return e[t]>=0})}function rpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Sx(t,{elementContext:"reference"}),a=Sx(t,{altBoundary:!0}),u=j8(s,r),c=j8(a,i,o),d=H8(u),h=H8(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const ipe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rpe};function ope(e,t,n){var r=nu(e),i=[ss,os].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ss,Pa].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function spe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=qK.reduce(function(d,h){return d[h]=ope(h,t.rects,o),d},{}),a=s[t.placement],u=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const ape={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:spe};function lpe(e){var t=e.state,n=e.name;t.modifiersData[n]=tQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const upe={name:"popperOffsets",enabled:!0,phase:"read",fn:lpe,data:{}};function cpe(e){return e==="x"?"y":"x"}function fpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=Sx(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),w=nu(t.placement),b=Um(t.placement),x=!b,E=Cz(w),A=cpe(E),I=t.modifiersData.popperOffsets,R=t.rects.reference,M=t.rects.popper,D=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(I){if(o){var U,L=E==="y"?os:ss,F=E==="y"?Ra:Pa,z=E==="y"?"height":"width",G=I[E],W=G+S[L],K=G-S[F],q=m?-M[z]/2:0,Q=b===$m?R[z]:M[z],re=b===$m?-M[z]:-R[z],ue=t.elements.arrow,ce=m&&ue?Ez(ue):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:QK(),J=se[L],ae=se[F],le=M1(0,R[z],ce[z]),he=x?R[z]/2-q-le-J-N.mainAxis:Q-le-J-N.mainAxis,pe=x?-R[z]/2+q+le+ae+N.mainAxis:re+le+ae+N.mainAxis,ve=t.elements.arrow&&ww(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(U=H==null?void 0:H[E])!=null?U:0,ge=G+he-xe-ye,be=G+pe-xe,Ze=M1(m?cC(W,ge):W,G,m?wp(K,be):K);I[E]=Ze,V[E]=Ze-G}if(a){var qe,ut=E==="x"?os:ss,Bt=E==="x"?Ra:Pa,Oe=I[A],ze=A==="y"?"height":"width",st=Oe+S[ut],mt=Oe-S[Bt],vt=[os,ss].indexOf(w)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,Ue=vt?st:Oe-R[ze]-M[ze]-_e+N.altAxis,Ke=vt?Oe+R[ze]+M[ze]-_e-N.altAxis:mt,Fe=m&&vt?Dhe(Ue,Oe,Ke):M1(m?Ue:st,Oe,m?Ke:mt);I[A]=Fe,V[A]=Fe-Oe}t.modifiersData[r]=V}}const dpe={name:"preventOverflow",enabled:!0,phase:"main",fn:fpe,requiresIfExists:["offset"]};function hpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ppe(e){return e===Qs(e)||!_a(e)?Tz(e):hpe(e)}function gpe(e){var t=e.getBoundingClientRect(),n=Fm(t.width)/e.offsetWidth||1,r=Fm(t.height)/e.offsetHeight||1;return n!==1||r!==1}function mpe(e,t,n){n===void 0&&(n=!1);var r=_a(t),i=_a(t)&&gpe(t),o=gd(t),s=zm(e,i,n),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((cu(t)!=="body"||Iz(o))&&(a=ppe(t)),_a(t)?(u=zm(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=Az(o))),{x:s.left+a.scrollLeft-u.x,y:s.top+a.scrollTop-u.y,width:s.width,height:s.height}}function vpe(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(a){if(!n.has(a)){var u=t.get(a);u&&i(u)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ype(e){var t=vpe(e);return Rhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function bpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xpe(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 W8={placement:"bottom",modifiers:[],strategy:"absolute"};function G8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||a(Epe(i)||document.body)},[i,o]),Uo(()=>{if(s&&!o)return W$(n,s),()=>{W$(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const c={ref:u};return O.cloneElement(r,c)}return C.jsx(O.Fragment,{children:r})}return C.jsx(O.Fragment,{children:s&&vv.createPortal(r,s)})});function Cpe(e){return Ct("MuiPopper",e)}Rt("MuiPopper",["root"]);const Tpe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Ape=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ipe(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 qF(e){return typeof e=="function"?e():e}function Rpe(e){return e.nodeType!==void 0}const Ppe=()=>It({root:["root"]},ohe(Cpe)),Ope={},Mpe=O.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:u,open:c,placement:d,popperOptions:h,popperRef:p,slotProps:m={},slots:v={},TransitionProps:y}=t,S=Ne(t,Tpe),w=O.useRef(null),b=Tr(w,n),x=O.useRef(null),E=Tr(x,p),A=O.useRef(E);Uo(()=>{A.current=E},[E]),O.useImperativeHandle(p,()=>x.current,[]);const I=Ipe(d,s),[R,M]=O.useState(I),[D,N]=O.useState(qF(i));O.useEffect(()=>{x.current&&x.current.forceUpdate()}),O.useEffect(()=>{i&&N(qF(i))},[i]),Uo(()=>{if(!D||!c)return;const F=W=>{M(W.placement)};let z=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{F(W)}}];u!=null&&(z=z.concat(u)),h&&h.modifiers!=null&&(z=z.concat(h.modifiers));const G=Spe(D,w.current,$({placement:I},h,{modifiers:z}));return A.current(G),()=>{G.destroy(),A.current(null)}},[D,a,u,c,h,I]);const H={placement:R};y!==null&&(H.TransitionProps=y);const V=Ppe(),U=(r=v.root)!=null?r:"div",L=ti({elementType:U,externalSlotProps:m.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:V.root});return C.jsx(U,$({},L,{children:typeof o=="function"?o(H):o}))}),kpe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=Ope,popperRef:m,style:v,transition:y=!1,slotProps:S={},slots:w={}}=t,b=Ne(t,Ape),[x,E]=O.useState(!0),A=()=>{E(!1)},I=()=>{E(!0)};if(!u&&!d&&(!y||x))return null;let R;if(o)R=o;else if(r){const N=qF(r);R=N&&Rpe(N)?Fr(N).body:Fr(null).body}const M=!d&&u&&(!y||x)?"none":void 0,D=y?{in:d,onEnter:A,onExited:I}:void 0;return C.jsx(nQ,{disablePortal:a,container:R,children:C.jsx(Mpe,$({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:y?!x:d,placement:h,popperOptions:p,popperRef:m,slotProps:S,slots:w},b,{style:$({position:"fixed",top:0,left:0,display:M},v),TransitionProps:D,children:i}))})});function Lpe(e){const t=Fr(e);return t.body===e?Dc(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function L1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function V8(e){return parseInt(Dc(e).getComputedStyle(e).paddingRight,10)||0}function Dpe(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 X8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,u=!Dpe(s);a&&u&&L1(s,i)})}function LD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function Npe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Lpe(r)){const s=sq(Fr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${V8(r)+s}px`;const a=Fr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,u=>{n.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${V8(u)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Fr(r).body;else{const s=r.parentElement,a=Dc(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.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:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function Bpe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class $pe{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&&L1(t.modalRef,!1);const i=Bpe(n);X8(n,t.mount,t.modalRef,i,!0);const o=LD(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=LD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=Npe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=LD(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&&L1(t.modalRef,n),X8(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&&L1(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Fpe(e){return typeof e=="function"?e():e}function zpe(e){return e?e.props.hasOwnProperty("in"):!1}const Upe=new $pe;function jpe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Upe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:u,onClose:c,open:d,rootRef:h}=e,p=O.useRef({}),m=O.useRef(null),v=O.useRef(null),y=Tr(v,h),[S,w]=O.useState(!d),b=zpe(u);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Fr(m.current),A=()=>(p.current.modalRef=v.current,p.current.mount=m.current,p.current),I=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=go(()=>{const z=Fpe(t)||E().body;i.add(A(),z),v.current&&I()}),M=O.useCallback(()=>i.isTopModal(A()),[i]),D=go(z=>{m.current=z,z&&(d&&M()?I():v.current&&L1(v.current,x))}),N=O.useCallback(()=>{i.remove(A(),x)},[x,i]);O.useEffect(()=>()=>{N()},[N]),O.useEffect(()=>{d?R():(!b||!o)&&N()},[d,N,b,o,R]);const H=z=>G=>{var W;(W=z.onKeyDown)==null||W.call(z,G),!(G.key!=="Escape"||!M())&&(n||(G.stopPropagation(),c&&c(G,"escapeKeyDown")))},V=z=>G=>{var W;(W=z.onClick)==null||W.call(z,G),G.target===G.currentTarget&&c&&c(G,"backdropClick")};return{getRootProps:(z={})=>{const G=uC(e);delete G.onTransitionEnter,delete G.onTransitionExited;const W=$({},G,z);return $({role:"presentation"},W,{onKeyDown:H(W),ref:y})},getBackdropProps:(z={})=>{const G=z;return $({"aria-hidden":!0},G,{onClick:V(G),open:d})},getTransitionProps:()=>{const z=()=>{w(!1),s&&s()},G=()=>{w(!0),a&&a(),o&&N()};return{onEnter:qU(z,u==null?void 0:u.props.onEnter),onExited:qU(G,u==null?void 0:u.props.onExited)}},rootRef:y,portalRef:D,isTopModal:M,exited:S,hasTransition:b}}const Hpe=2;function rQ(e,t){return e-t}function Cb(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function q8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const a=Math.abs(t-o);return i===null||a({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}%`})}},qpe=e=>e;let E_;function DD(){return E_===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?E_=CSS.supports("touch-action","none"):E_=!0),E_}function Ype(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:p="horizontal",rootRef:m,scale:v=qpe,step:y=1,tabIndex:S,value:w}=e,b=O.useRef(),[x,E]=O.useState(-1),[A,I]=O.useState(-1),[R,M]=O.useState(!1),D=O.useRef(0),[N,H]=tx({controlled:w,default:n??u,name:"Slider"}),V=d&&((_e,Ue,Ke)=>{const Fe=_e.nativeEvent||_e,Be=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Be,"target",{writable:!0,value:{value:Ue,name:c}}),d(Be,Ue,Ke)}),U=Array.isArray(N);let L=U?N.slice().sort(rQ):[N];L=L.map(_e=>Cb(_e,u,a));const F=s===!0&&y!==null?[...Array(Math.floor((a-u)/y)+1)].map((_e,Ue)=>({value:u+y*Ue})):s||[],z=F.map(_e=>_e.value),{isFocusVisibleRef:G,onBlur:W,onFocus:K,ref:q}=a4(),[Q,re]=O.useState(-1),ue=O.useRef(),ce=Tr(q,ue),se=Tr(m,ce),J=_e=>Ue=>{var Ke;const Fe=Number(Ue.currentTarget.getAttribute("data-index"));K(Ue),G.current===!0&&re(Fe),I(Fe),_e==null||(Ke=_e.onFocus)==null||Ke.call(_e,Ue)},ae=_e=>Ue=>{var Ke;W(Ue),G.current===!1&&re(-1),I(-1),_e==null||(Ke=_e.onBlur)==null||Ke.call(_e,Ue)};Uo(()=>{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=>Ue=>{var Ke;(Ke=_e.onChange)==null||Ke.call(_e,Ue);const Fe=Number(Ue.currentTarget.getAttribute("data-index")),Be=L[Fe],Ot=z.indexOf(Be);let ft=Ue.target.valueAsNumber;if(F&&y==null){const Re=z[z.length-1];ft>Re?ft=Re:ft{const{current:Ke}=ue,{width:Fe,height:Be,bottom:Ot,left:ft}=Ke.getBoundingClientRect();let Re;pe.indexOf("vertical")===0?Re=(Ot-_e.y)/Be:Re=(_e.x-ft)/Fe,pe.indexOf("-reverse")!==-1&&(Re=1-Re);let at;if(at=Wpe(Re,u,a),y)at=Vpe(at,y,u);else{const Pe=q8(z,at);at=z[Pe]}at=Cb(at,u,a);let $t=0;if(U){Ue?$t=he.current:$t=q8(L,at),i&&(at=Cb(at,L[$t-1]||-1/0,L[$t+1]||1/0));const Pe=at;at=Y8({values:L,newValue:at,index:$t}),i&&Ue||($t=at.indexOf(Pe),he.current=$t)}return{newValue:at,activeIndex:$t}},ye=go(_e=>{const Ue=w_(_e,b);if(!Ue)return;if(D.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ke,activeIndex:Fe}=ve({finger:Ue,move:!0});__({sliderRef:ue,activeIndex:Fe,setActive:E}),H(Ke),!R&&D.current>Hpe&&M(!0),V&&!S_(Ke,N)&&V(_e,Ke,Fe)}),xe=go(_e=>{const Ue=w_(_e,b);if(M(!1),!Ue)return;const{newValue:Ke}=ve({finger:Ue,move:!0});E(-1),_e.type==="touchend"&&I(-1),h&&h(_e,Ke),b.current=void 0,be()}),ge=go(_e=>{if(r)return;DD()||_e.preventDefault();const Ue=_e.changedTouches[0];Ue!=null&&(b.current=Ue.identifier);const Ke=w_(_e,b);if(Ke!==!1){const{newValue:Be,activeIndex:Ot}=ve({finger:Ke});__({sliderRef:ue,activeIndex:Ot,setActive:E}),H(Be),V&&!S_(Be,N)&&V(_e,Be,Ot)}D.current=0;const Fe=Fr(ue.current);Fe.addEventListener("touchmove",ye),Fe.addEventListener("touchend",xe)}),be=O.useCallback(()=>{const _e=Fr(ue.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);O.useEffect(()=>{const{current:_e}=ue;return _e.addEventListener("touchstart",ge,{passive:DD()}),()=>{_e.removeEventListener("touchstart",ge,{passive:DD()}),be()}},[be,ge]),O.useEffect(()=>{r&&be()},[r,be]);const Ze=_e=>Ue=>{var Ke;if((Ke=_e.onMouseDown)==null||Ke.call(_e,Ue),r||Ue.defaultPrevented||Ue.button!==0)return;Ue.preventDefault();const Fe=w_(Ue,b);if(Fe!==!1){const{newValue:Ot,activeIndex:ft}=ve({finger:Fe});__({sliderRef:ue,activeIndex:ft,setActive:E}),H(Ot),V&&!S_(Ot,N)&&V(Ue,Ot,ft)}D.current=0;const Be=Fr(ue.current);Be.addEventListener("mousemove",ye),Be.addEventListener("mouseup",xe)},qe=fC(U?L[0]:u,u,a),ut=fC(L[L.length-1],u,a)-qe,Bt=(_e={})=>{const Ue={onMouseDown:Ze(_e||{})},Ke=$({},_e,Ue);return $({ref:se},Ke)},Oe=_e=>Ue=>{var Ke;(Ke=_e.onMouseOver)==null||Ke.call(_e,Ue);const Fe=Number(Ue.currentTarget.getAttribute("data-index"));I(Fe)},ze=_e=>Ue=>{var Ke;(Ke=_e.onMouseLeave)==null||Ke.call(_e,Ue),I(-1)};return{active:x,axis:pe,axisProps:Xpe,dragging:R,focusedThumbIndex:Q,getHiddenInputProps:(_e={})=>{var Ue;const Ke={onChange:le(_e||{}),onFocus:J(_e||{}),onBlur:ae(_e||{})},Fe=$({},_e,Ke);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(a),"aria-valuemin":v(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(Ue=e.step)!=null?Ue:void 0,disabled:r},Fe,{style:$({},Ase,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Bt,getThumbProps:(_e={})=>{const Ue={onMouseOver:Oe(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,Ue)},marks:F,open:A,range:U,rootRef:se,trackLeap:ut,trackOffset:qe,values:L,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function Kpe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=O.useRef();O.useEffect(()=>{if(!i)return;function w(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[i,r]);const a=go((w,b)=>{r==null||r(w,b)}),u=go(w=>{!r||w==null||(clearTimeout(s.current),s.current=setTimeout(()=>{a(null,"timeout")},w))});O.useEffect(()=>(i&&u(t),()=>{clearTimeout(s.current)}),[i,t,u]);const c=w=>{r==null||r(w,"clickaway")},d=()=>{clearTimeout(s.current)},h=O.useCallback(()=>{t!=null&&u(o??t*.5)},[t,o,u]),p=w=>b=>{const x=w.onBlur;x==null||x(b),h()},m=w=>b=>{const x=w.onFocus;x==null||x(b),d()},v=w=>b=>{const x=w.onMouseEnter;x==null||x(b),d()},y=w=>b=>{const x=w.onMouseLeave;x==null||x(b),h()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",d)}},[n,h,i]),{getRootProps:(w={})=>{const b=$({},uC(e),uC(w));return $({role:"presentation"},w,b,{onBlur:p(b),onFocus:m(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:c}}const Qpe=["onChange","maxRows","minRows","style","value"];function C_(e){return parseInt(e,10)||0}const Jpe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function K8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const Zpe=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,u=Ne(t,Qpe),{current:c}=O.useRef(a!=null),d=O.useRef(null),h=Tr(n,d),p=O.useRef(null),m=O.useRef(0),[v,y]=O.useState({outerHeightStyle:0}),S=O.useCallback(()=>{const E=d.current,I=Dc(E).getComputedStyle(E);if(I.width==="0px")return{outerHeightStyle:0};const R=p.current;R.style.width=I.width,R.value=E.value||t.placeholder||"x",R.value.slice(-1)===` +`&&(R.value+=" ");const M=I.boxSizing,D=C_(I.paddingBottom)+C_(I.paddingTop),N=C_(I.borderBottomWidth)+C_(I.borderTopWidth),H=R.scrollHeight;R.value="x";const V=R.scrollHeight;let U=H;o&&(U=Math.max(Number(o)*V,U)),i&&(U=Math.min(Number(i)*V,U)),U=Math.max(U,V);const L=U+(M==="border-box"?D+N:0),F=Math.abs(U-H)<=1;return{outerHeightStyle:L,overflow:F}},[i,o,t.placeholder]),w=(E,A)=>{const{outerHeightStyle:I,overflow:R}=A;return m.current<20&&(I>0&&Math.abs((E.outerHeightStyle||0)-I)>1||E.overflow!==R)?(m.current+=1,{overflow:R,outerHeightStyle:I}):E},b=O.useCallback(()=>{const E=S();K8(E)||y(A=>w(A,E))},[S]);Uo(()=>{const E=()=>{const H=S();K8(H)||vv.flushSync(()=>{y(V=>w(V,H))})},A=()=>{m.current=0,E()};let I;const R=IT(A),M=d.current,D=Dc(M);D.addEventListener("resize",R);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(A),N.observe(M)),()=>{R.clear(),cancelAnimationFrame(I),D.removeEventListener("resize",R),N&&N.disconnect()}},[S]),Uo(()=>{b()}),O.useEffect(()=>{m.current=0},[a]);const x=E=>{m.current=0,c||b(),r&&r(E)};return C.jsxs(O.Fragment,{children:[C.jsx("textarea",$({value:a,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},u)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},Jpe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),ege=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],tge=Ce(kpe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nge=O.forwardRef(function(t,n){var r;const i=ZT(),o=Pt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:u,componentsProps:c,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:v,placement:y,popperOptions:S,popperRef:w,transition:b,slots:x,slotProps:E}=o,A=Ne(o,ege),I=(r=x==null?void 0:x.root)!=null?r:u==null?void 0:u.Root,R=$({anchorEl:s,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:v,placement:y,popperOptions:S,popperRef:w,transition:b},A);return C.jsx(tge,$({as:a,direction:i==null?void 0:i.direction,slots:{root:I},slotProps:E??c},R,{ref:n}))}),iQ=nge;function rge(e){return Ct("MuiListSubheader",e)}Rt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const ige=["className","color","component","disableGutters","disableSticky","inset"],oge=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${Le(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return It(s,rge,t)},sge=Ce("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Le(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})),oQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:u=!1,inset:c=!1}=r,d=Ne(r,ige),h=$({},r,{color:o,component:s,disableGutters:a,disableSticky:u,inset:c}),p=oge(h);return C.jsx(sge,$({as:s,className:je(p.root,i),ref:n,ownerState:h},d))});oQ.muiSkipListHighlight=!0;const age=oQ;function Zp({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 lge=O.createContext(void 0),Rz=lge;function md(){return O.useContext(Rz)}function sQ(e){return C.jsx(Dle,$({},e,{defaultTheme:nA,themeId:Pp}))}function Q8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dC(e,t=!1){return e&&(Q8(e.value)&&e.value!==""||t&&Q8(e.defaultValue)&&e.defaultValue!=="")}function uge(e){return e.startAdornment}function cge(e){return Ct("MuiInputBase",e)}const fge=Rt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jm=fge,dge=["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"],OA=(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${Le(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},MA=(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]},hge=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:m,type:v}=e,y={root:["root",`color${Le(n)}`,r&&"disabled",i&&"error",u&&"fullWidth",s&&"focused",a&&"formControl",p&&p!=="medium"&&`size${Le(p)}`,d&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return It(y,cge,t)},kA=Ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:OA})(({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",[`&.${jm.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%"})),LA=Ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:MA})(({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] + .${jm.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},[`&.${jm.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"})}),pge=C.jsx(sQ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),gge=O.forwardRef(function(t,n){var r;const i=Pt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:u,components:c={},componentsProps:d={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:w="input",inputProps:b={},inputRef:x,maxRows:E,minRows:A,multiline:I=!1,name:R,onBlur:M,onChange:D,onClick:N,onFocus:H,onKeyDown:V,onKeyUp:U,placeholder:L,readOnly:F,renderSuffix:z,rows:G,slotProps:W={},slots:K={},startAdornment:q,type:Q="text",value:re}=i,ue=Ne(i,dge),ce=b.value!=null?b.value:re,{current:se}=O.useRef(ce!=null),J=O.useRef(),ae=O.useCallback(Fe=>{},[]),le=Tr(J,x,b.ref,ae),[he,pe]=O.useState(!1),ve=md(),ye=Zp({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 xe=ve&&ve.onFilled,ge=ve&&ve.onEmpty,be=O.useCallback(Fe=>{dC(Fe)?xe&&xe():ge&&ge()},[xe,ge]);Uo(()=>{se&&be({value:ce})},[ce,be,se]);const Ze=Fe=>{if(ye.disabled){Fe.stopPropagation();return}H&&H(Fe),b.onFocus&&b.onFocus(Fe),ve&&ve.onFocus?ve.onFocus(Fe):pe(!0)},qe=Fe=>{M&&M(Fe),b.onBlur&&b.onBlur(Fe),ve&&ve.onBlur?ve.onBlur(Fe):pe(!1)},ut=(Fe,...Be)=>{if(!se){const Ot=Fe.target||J.current;if(Ot==null)throw new Error(ed(1));be({value:Ot.value})}b.onChange&&b.onChange(Fe,...Be),D&&D(Fe,...Be)};O.useEffect(()=>{be(J.current)},[]);const Bt=Fe=>{J.current&&Fe.currentTarget===Fe.target&&J.current.focus(),N&&N(Fe)};let Oe=w,ze=b;I&&Oe==="input"&&(G?ze=$({type:void 0,minRows:G,maxRows:G},ze):ze=$({type:void 0,maxRows:E,minRows:A},ze),Oe=Zpe);const st=Fe=>{be(Fe.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};O.useEffect(()=>{ve&&ve.setAdornedStart(!!q)},[ve,q]);const mt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:I,size:ye.size,startAdornment:q,type:Q}),vt=hge(mt),_e=K.root||c.Root||kA,Ue=W.root||d.root||{},Ke=K.input||c.Input||LA;return ze=$({},ze,(r=W.input)!=null?r:d.input),C.jsxs(O.Fragment,{children:[!m&&pge,C.jsxs(_e,$({},Ue,!tu(_e)&&{ownerState:$({},mt,Ue.ownerState)},{ref:n,onClick:Bt},ue,{className:je(vt.root,Ue.className,u,F&&"MuiInputBase-readOnly"),children:[q,C.jsx(Rz.Provider,{value:null,children:C.jsx(Ke,$({ownerState:mt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:st,name:R,placeholder:L,readOnly:F,required:ye.required,rows:G,value:ce,onKeyDown:V,onKeyUp:U,type:Q},ze,!tu(Ke)&&{as:Oe,ownerState:$({},mt,ze.ownerState)},{ref:le,className:je(vt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:qe,onChange:ut,onFocus:Ze}))}),v,z?z($({},ye,{startAdornment:q})):null]}))]})}),DA=gge;function mge(e){return Ct("MuiInput",e)}const vge=$({},jm,Rt("MuiInput",["root","underline","input"])),Tb=vge;function yge(e){return Ct("MuiOutlinedInput",e)}const bge=$({},jm,Rt("MuiOutlinedInput",["root","notchedOutline","input"])),rf=bge;function xge(e){return Ct("MuiFilledInput",e)}const wge=$({},jm,Rt("MuiFilledInput",["root","underline","input"])),Fh=wge,_ge=zt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Sge=zt(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 Ege(e){return Ct("MuiAvatar",e)}Rt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Cge=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Tge=e=>{const{classes:t,variant:n,colorDefault:r}=e;return It({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Ege,t)},Age=Ce("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]}))),Ige=Ce("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Rge=Ce(Sge,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Pge({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 a=new Image;return a.onload=()=>{s&&o("loaded")},a.onerror=()=>{s&&o("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const Oge=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:a="div",imgProps:u,sizes:c,src:d,srcSet:h,variant:p="circular"}=r,m=Ne(r,Cge);let v=null;const y=Pge($({},u,{src:d,srcSet:h})),S=d||h,w=S&&y!=="error",b=$({},r,{colorDefault:!w,component:a,variant:p}),x=Tge(b);return w?v=C.jsx(Ige,$({alt:i,srcSet:h,src:d,sizes:c,ownerState:b,className:x.img},u)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Rge,{ownerState:b,className:x.fallback}),C.jsx(Age,$({as:a,ownerState:b,className:je(x.root,s),ref:n},m,{children:v}))}),Mge=Oge,kge=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Lge={entering:{opacity:1},entered:{opacity:1}},Dge=O.forwardRef(function(t,n){const r=Ln(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:u,in:c,onEnter:d,onEntered:h,onEntering:p,onExit:m,onExited:v,onExiting:y,style:S,timeout:w=i,TransitionComponent:b=bz}=t,x=Ne(t,kge),E=O.useRef(null),A=Tr(E,a.ref,n),I=L=>F=>{if(L){const z=E.current;F===void 0?L(z):L(z,F)}},R=I(p),M=I((L,F)=>{GK(L);const z=Bm({style:S,timeout:w,easing:u},{mode:"enter"});L.style.webkitTransition=r.transitions.create("opacity",z),L.style.transition=r.transitions.create("opacity",z),d&&d(L,F)}),D=I(h),N=I(y),H=I(L=>{const F=Bm({style:S,timeout:w,easing:u},{mode:"exit"});L.style.webkitTransition=r.transitions.create("opacity",F),L.style.transition=r.transitions.create("opacity",F),m&&m(L)}),V=I(v),U=L=>{o&&o(E.current,L)};return C.jsx(b,$({appear:s,in:c,nodeRef:E,onEnter:M,onEntered:D,onEntering:R,onExit:H,onExited:V,onExiting:N,addEndListener:U,timeout:w},x,{children:(L,F)=>O.cloneElement(a,$({style:$({opacity:0,visibility:L==="exited"&&!c?"hidden":void 0},Lge[L],S,a.props.style),ref:A},F))}))}),zp=Dge;function Nge(e){return Ct("MuiBackdrop",e)}Rt("MuiBackdrop",["root","invisible"]);const Bge=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],$ge=e=>{const{classes:t,invisible:n}=e;return It({root:["root",n&&"invisible"]},Nge,t)},Fge=Ce("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"})),zge=O.forwardRef(function(t,n){var r,i,o;const s=Pt({props:t,name:"MuiBackdrop"}),{children:a,className:u,component:c="div",components:d={},componentsProps:h={},invisible:p=!1,open:m,slotProps:v={},slots:y={},TransitionComponent:S=zp,transitionDuration:w}=s,b=Ne(s,Bge),x=$({},s,{component:c,invisible:p}),E=$ge(x),A=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:m,timeout:w},b,{children:C.jsx(Fge,$({"aria-hidden":!0},A,{as:(i=(o=y.root)!=null?o:d.Root)!=null?i:c,className:je(E.root,u,A==null?void 0:A.className),ownerState:$({},x,A==null?void 0:A.ownerState),classes:E,ref:n,children:a}))}))}),aQ=zge,Uge=C4(),jge=Fle({themeId:Pp,defaultTheme:Uge,defaultClassName:"MuiBox-root",generateClassName:lq.generate}),gt=jge;function Hge(e){return Ct("MuiButton",e)}const Wge=Rt("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"]),T_=Wge,Gge=O.createContext({}),Vge=Gge,Xge=O.createContext(void 0),qge=Xge,Yge=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Kge=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${Le(t)}`,`size${Le(i)}`,`${o}Size${Le(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Le(i)}`],endIcon:["endIcon",`iconSize${Le(i)}`]},u=It(a,Hge,s);return $({},s,u)},lQ=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}}),Qge=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Le(n.color)}`],t[`size${Le(n.size)}`],t[`${n.variant}Size${Le(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})`:An(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})`:An(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})`:An(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]}),[`&.${T_.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${T_.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 ${An(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"},[`&.${T_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${T_.disabled}`]:{boxShadow:"none"}}),Jge=Ce("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},lQ(e))),Zge=Ce("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Le(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},lQ(e))),eme=O.forwardRef(function(t,n){const r=O.useContext(Vge),i=O.useContext(qge),o=l4(r,t),s=Pt({props:o,name:"MuiButton"}),{children:a,color:u="primary",component:c="button",className:d,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:w="medium",startIcon:b,type:x,variant:E="text"}=s,A=Ne(s,Yge),I=$({},s,{color:u,component:c,disabled:h,disableElevation:p,disableFocusRipple:m,fullWidth:S,size:w,type:x,variant:E}),R=Kge(I),M=b&&C.jsx(Jge,{className:R.startIcon,ownerState:I,children:b}),D=v&&C.jsx(Zge,{className:R.endIcon,ownerState:I,children:v}),N=i||"";return C.jsxs(Qge,$({ownerState:I,className:je(r.className,R.root,d,N),component:c,disabled:h,focusRipple:!m,focusVisibleClassName:je(R.focusVisible,y),ref:n,type:x},A,{classes:R,children:[M,a,D]}))}),Pz=eme;function tme(e){return Ct("MuiCard",e)}Rt("MuiCard",["root"]);const nme=["className","raised"],rme=e=>{const{classes:t}=e;return It({root:["root"]},tme,t)},ime=Ce(yv,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),ome=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ne(r,nme),a=$({},r,{raised:o}),u=rme(a);return C.jsx(ime,$({className:je(u.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),sme=ome;function ame(e){return Ct("PrivateSwitchBase",e)}Rt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const lme=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ume=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${Le(i)}`],input:["input"]};return It(o,ame,t)},cme=Ce(Yc)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),fme=Ce("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),dme=O.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:u,disableFocusRipple:c=!1,edge:d=!1,icon:h,id:p,inputProps:m,inputRef:v,name:y,onBlur:S,onChange:w,onFocus:b,readOnly:x,required:E=!1,tabIndex:A,type:I,value:R}=t,M=Ne(t,lme),[D,N]=tx({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),H=md(),V=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},U=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},L=K=>{if(K.nativeEvent.defaultPrevented)return;const q=K.target.checked;N(q),w&&w(K,q)};let F=u;H&&typeof F>"u"&&(F=H.disabled);const z=I==="checkbox"||I==="radio",G=$({},t,{checked:D,disabled:F,disableFocusRipple:c,edge:d}),W=ume(G);return C.jsxs(cme,$({component:"span",className:je(W.root,s),centerRipple:!0,focusRipple:!c,disabled:F,tabIndex:null,role:void 0,onFocus:V,onBlur:U,ownerState:G,ref:n},M,{children:[C.jsx(fme,$({autoFocus:r,checked:i,defaultChecked:a,className:W.input,disabled:F,id:z?p:void 0,name:y,onChange:L,readOnly:x,ref:v,required:E,ownerState:G,tabIndex:A,type:I},I==="checkbox"&&R===void 0?{}:{value:R},m)),D?o:h]}))}),uQ=dme,hme=zt(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"),pme=zt(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"),gme=zt(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 mme(e){return Ct("MuiCheckbox",e)}const vme=Rt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ND=vme,yme=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],bme=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${Le(r)}`,`size${Le(i)}`]},s=It(o,mme,t);return $({},t,s)},xme=Ce(uQ,{shouldForwardProp:e=>ka(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${Le(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})`:An(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${ND.checked}, &.${ND.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ND.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),wme=C.jsx(pme,{}),_me=C.jsx(hme,{}),Sme=C.jsx(gme,{}),Eme=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=wme,color:a="primary",icon:u=_me,indeterminate:c=!1,indeterminateIcon:d=Sme,inputProps:h,size:p="medium",className:m}=o,v=Ne(o,yme),y=c?d:u,S=c?d:s,w=$({},o,{color:a,indeterminate:c,size:p}),b=bme(w);return C.jsx(xme,$({type:"checkbox",inputProps:$({"data-indeterminate":c},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:w,ref:n,className:je(b.root,m)},v,{classes:b}))}),Cme=Eme;function Tme(e){return Ct("MuiCircularProgress",e)}Rt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ame=["className","color","disableShrink","size","style","thickness","value","variant"];let NA=e=>e,J8,Z8,eH,tH;const of=44,Ime=fd(J8||(J8=NA` 0% { transform: rotate(0deg); } @@ -140,7 +140,7 @@ Error generating stack: `+o.message+` 100% { transform: rotate(360deg); } -`)),Rme=fd(J8||(J8=NA` +`)),Rme=fd(Z8||(Z8=NA` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -155,11 +155,11 @@ Error generating stack: `+o.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),Pme=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${De(r)}`],svg:["svg"],circle:["circle",`circle${De(n)}`,i&&"circleDisableShrink"]};return It(o,Tme,t)},Ome=Ce("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(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"&&dv(Z8||(Z8=NA` +`)),Pme=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${Le(r)}`],svg:["svg"],circle:["circle",`circle${Le(n)}`,i&&"circleDisableShrink"]};return It(o,Tme,t)},Ome=Ce("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Le(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"&&dv(eH||(eH=NA` animation: ${0} 1.4s linear infinite; - `),Ime)),Mme=Ce("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),kme=Ce("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${De(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&&dv(eH||(eH=NA` + `),Ime)),Mme=Ce("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),kme=Ce("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Le(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&&dv(tH||(tH=NA` animation: ${0} 1.4s ease-in-out infinite; - `),Rme)),Dme=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:u,thickness:c=3.6,value:d=0,variant:h="indeterminate"}=r,p=Ne(r,Ame),m=$({},r,{color:o,disableShrink:s,size:a,thickness:c,value:d,variant:h}),v=Pme(m),y={},S={},w={};if(h==="determinate"){const b=2*Math.PI*((of-c)/2);y.strokeDasharray=b.toFixed(3),w["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(Ome,$({className:je(v.root,i),style:$({width:a,height:a},S,u),ownerState:m,ref:n,role:"progressbar"},w,p,{children:C.jsx(Mme,{className:v.svg,ownerState:m,viewBox:`${of/2} ${of/2} ${of} ${of}`,children:C.jsx(kme,{className:v.circle,style:y,ownerState:m,cx:of,cy:of,r:(of-c)/2,fill:"none",strokeWidth:c})})}))}),BA=Dme,Lme=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),Nme=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}}),Bme=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var u;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(u=a.palette)==null?void 0:u.mode}});let i=$({html:Lme(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},Nme(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 $me(e){const t=Pt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(O.Fragment,{children:[C.jsx(oQ,{styles:i=>Bme(i,r)}),n]})}function Fme(e){return Ct("MuiModal",e)}Rt("MuiModal",["root","hidden","backdrop"]);const zme=["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"],Ume=e=>{const{open:t,exited:n,classes:r}=e;return It({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Fme,r)},jme=Ce("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"})),Hme=Ce(sQ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Wme=O.forwardRef(function(t,n){var r,i,o,s,a,u;const c=Pt({name:"MuiModal",props:t}),{BackdropComponent:d=Hme,BackdropProps:h,className:p,closeAfterTransition:m=!1,children:v,container:y,component:S,components:w={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:A=!1,disablePortal:I=!1,disableRestoreFocus:R=!1,disableScrollLock:M=!1,hideBackdrop:L=!1,keepMounted:N=!1,onBackdropClick:H,open:V,slotProps:U,slots:D}=c,F=Ne(c,zme),z=$({},c,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:A,disablePortal:I,disableRestoreFocus:R,disableScrollLock:M,hideBackdrop:L,keepMounted:N}),{getRootProps:G,getBackdropProps:W,getTransitionProps:K,portalRef:q,isTopModal:Q,exited:re,hasTransition:ue}=jpe($({},z,{rootRef:n})),ce=$({},z,{exited:re}),se=Ume(ce),J={};if(v.props.tabIndex===void 0&&(J.tabIndex="-1"),ue){const{onEnter:xe,onExited:ge}=K();J.onEnter=xe,J.onExited=ge}const ae=(r=(i=D==null?void 0:D.root)!=null?i:w.Root)!=null?r:jme,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:w.Backdrop)!=null?o:d,he=(a=U==null?void 0:U.root)!=null?a:b.root,pe=(u=U==null?void 0:U.backdrop)!=null?u:b.backdrop,ve=ti({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:G,additionalProps:{ref:n,as:S},ownerState:ce,className:je(p,he==null?void 0:he.className,se==null?void 0:se.root,!ce.open&&ce.exited&&(se==null?void 0:se.hidden))}),ye=ti({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>W($({},xe,{onClick:ge=>{H&&H(ge),xe!=null&&xe.onClick&&xe.onClick(ge)}})),className:je(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ce});return!N&&!V&&(!ue||re)?null:C.jsx(tQ,{ref:q,container:y,disablePortal:I,children:C.jsxs(ae,$({},ve,{children:[!L&&d?C.jsx(le,$({},ye)):null,C.jsx(vhe,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:R,isEnabled:Q,open:V,children:O.cloneElement(v,J)})]}))})}),uQ=Wme;function Gme(e){return Ct("MuiDialog",e)}const Vme=Rt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),BL=Vme,Xme=O.createContext({}),qme=Xme,Yme=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Kme=Ce(sQ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Qme=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${De(n)}`],paper:["paper",`paperScroll${De(n)}`,`paperWidth${De(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return It(s,Gme,t)},Jme=Ce(uQ,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Zme=Ce("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${De(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"}})),eve=Ce(yv,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${De(n.scroll)}`],t[`paperWidth${De(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)`,[`&.${BL.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}`,[`&.${BL.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,[`&.${BL.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),tve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiDialog"}),i=Dn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:u,BackdropProps:c,children:d,className:h,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:w,open:b,PaperComponent:x=yv,PaperProps:E={},scroll:A="paper",TransitionComponent:I=zp,transitionDuration:R=o,TransitionProps:M}=r,L=Ne(r,Yme),N=$({},r,{disableEscapeKeyDown:p,fullScreen:m,fullWidth:v,maxWidth:y,scroll:A}),H=Qme(N),V=O.useRef(),U=G=>{V.current=G.target===G.currentTarget},D=G=>{V.current&&(V.current=null,S&&S(G),w&&w(G,"backdropClick"))},F=o4(a),z=O.useMemo(()=>({titleId:F}),[F]);return C.jsx(Jme,$({className:je(H.root,h),closeAfterTransition:!0,components:{Backdrop:Kme},componentsProps:{backdrop:$({transitionDuration:R,as:u},c)},disableEscapeKeyDown:p,onClose:w,open:b,ref:n,onClick:D,ownerState:N},L,{children:C.jsx(I,$({appear:!0,in:b,timeout:R,role:"presentation"},M,{children:C.jsx(Zme,{className:je(H.container),onMouseDown:U,ownerState:N,children:C.jsx(eve,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:je(H.paper,E.className),ownerState:N,children:C.jsx(qme.Provider,{value:z,children:d})}))})}))}))}),nve=tve;function rve(e){return Ct("MuiDivider",e)}const ive=Rt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),tH=ive,ove=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],sve=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:u}=e;return It({root:["root",t&&"absolute",u,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},rve,r)},ave=Ce("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)`:An(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%"}})),lve=Ce("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)`})),cQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:u=!1,light:c=!1,orientation:d="horizontal",role:h=a!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth"}=r,v=Ne(r,ove),y=$({},r,{absolute:i,component:a,flexItem:u,light:c,orientation:d,role:h,textAlign:p,variant:m}),S=sve(y);return C.jsx(ave,$({as:a,className:je(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(lve,{className:S.wrapper,ownerState:y,children:o}):null}))});cQ.muiSkipListHighlight=!0;const Kc=cQ,uve=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],cve=e=>{const{classes:t,disableUnderline:n}=e,i=It({root:["root",!n&&"underline"],input:["input"]},xge,t);return $({},t,i)},fve=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...OA(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)",a=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}},[`&.${Fh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Fh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!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"},[`&.${Fh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fh.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(.${Fh.disabled}, .${Fh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Fh.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}))}),dve=Ce(DA,{name:"MuiFilledInput",slot:"Input",overridesResolver:MA})(({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})),fQ=O.forwardRef(function(t,n){var r,i,o,s;const a=Pt({props:t,name:"MuiFilledInput"}),{components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:h="input",multiline:p=!1,slotProps:m,slots:v={},type:y="text"}=a,S=Ne(a,uve),w=$({},a,{fullWidth:d,inputComponent:h,multiline:p,type:y}),b=cve(a),x={root:{ownerState:w},input:{ownerState:w}},E=m??c?ts(m??c,x):x,A=(r=(i=v.root)!=null?i:u.Root)!=null?r:fve,I=(o=(s=v.input)!=null?s:u.Input)!=null?o:dve;return C.jsx(LA,$({slots:{root:A,input:I},componentsProps:E,fullWidth:d,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});fQ.muiName="Input";const dQ=fQ;function hve(e){return Ct("MuiFormControl",e)}Rt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const pve=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],gve=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${De(n)}`,r&&"fullWidth"]};return It(i,hve,t)},mve=Ce("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${De(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%"})),vve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:u=!1,error:c=!1,focused:d,fullWidth:h=!1,hiddenLabel:p=!1,margin:m="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,w=Ne(r,pve),b=$({},r,{color:s,component:a,disabled:u,error:c,fullWidth:h,hiddenLabel:p,margin:m,required:v,size:y,variant:S}),x=gve(b),[E,A]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{if(!HS(D,["Input","Select"]))return;const F=HS(D,["Select"])?D.props.input:D;F&&uge(F.props)&&(U=!0)}),U}),[I,R]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,D=>{HS(D,["Input","Select"])&&(fC(D.props,!0)||fC(D.props.inputProps,!0))&&(U=!0)}),U}),[M,L]=O.useState(!1);u&&M&&L(!1);const N=d!==void 0&&!u?d:M;let H;const V=O.useMemo(()=>({adornedStart:E,setAdornedStart:A,color:s,disabled:u,error:c,filled:I,focused:N,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,u,c,I,N,h,p,H,v,y,S]);return C.jsx(Iz.Provider,{value:V,children:C.jsx(mve,$({as:a,ownerState:b,className:je(x.root,o),ref:n},w,{children:i}))})}),yve=vve,bve=pue({createStyledComponent:Ce("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Pt({props:e,name:"MuiStack"})}),Hm=bve;function xve(e){return Ct("MuiFormControlLabel",e)}const wve=Rt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),o1=wve,_ve=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Sve=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${De(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return It(s,xve,t)},Eve=Ce("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${o1.label}`]:t.label},t.root,t[`labelPlacement${De(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${o1.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},{[`& .${o1.label}`]:{[`&.${o1.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Cve=Ce("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${o1.error}`]:{color:(e.vars||e).palette.error.main}})),Tve=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:u,disabled:c,disableTypography:d,label:h,labelPlacement:p="end",required:m,slotProps:v={}}=o,y=Ne(o,_ve),S=md(),w=(r=c??u.props.disabled)!=null?r:S==null?void 0:S.disabled,b=m??u.props.required,x={disabled:w,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof u.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=Zp({props:o,muiFormControl:S,states:["error"]}),A=$({},o,{disabled:w,labelPlacement:p,required:b,error:E.error}),I=Sve(A),R=(i=v.typography)!=null?i:a.typography;let M=h;return M!=null&&M.type!==Wt&&!d&&(M=C.jsx(Wt,$({component:"span"},R,{className:je(I.label,R==null?void 0:R.className),children:M}))),C.jsxs(Eve,$({className:je(I.root,s),ownerState:A,ref:n},y,{children:[O.cloneElement(u,x),b?C.jsxs(Hm,{direction:"row",alignItems:"center",children:[M,C.jsxs(Cve,{ownerState:A,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):M]}))}),Ave=Tve;function Ive(e){return Ct("MuiFormHelperText",e)}const Rve=Rt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),nH=Rve;var rH;const Pve=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ove=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:u}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${De(r)}`,n&&"contained",a&&"focused",s&&"filled",u&&"required"]};return It(c,Ive,t)},Mve=Ce("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${De(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,[`&.${nH.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${nH.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),kve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ne(r,Pve),u=md(),c=Zp({props:r,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),d=$({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),h=Ove(d);return C.jsx(Mve,$({as:s,ownerState:d,className:je(h.root,o),ref:n},a,{children:i===" "?rH||(rH=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Dve=kve;function Lve(e){return Ct("MuiFormLabel",e)}const Nve=Rt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),L1=Nve,Bve=["children","className","color","component","disabled","error","filled","focused","required"],$ve=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,u={root:["root",`color${De(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return It(u,Lve,t)},Fve=Ce("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",[`&.${L1.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${L1.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${L1.error}`]:{color:(e.vars||e).palette.error.main}})),zve=Ce("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${L1.error}`]:{color:(e.vars||e).palette.error.main}})),Uve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ne(r,Bve),u=md(),c=Zp({props:r,muiFormControl:u,states:["color","required","focused","disabled","error","filled"]}),d=$({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),h=$ve(d);return C.jsxs(Fve,$({as:s,ownerState:d,className:je(h.root,o),ref:n},a,{children:[i,c.required&&C.jsxs(zve,{ownerState:d,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),jve=Uve,Hve=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qF(e){return`scale(${e}, ${e**2})`}const Wve={entering:{opacity:1,transform:qF(1)},entered:{opacity:1,transform:"none"}},$L=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),hQ=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:u,onEntered:c,onEntering:d,onExit:h,onExited:p,onExiting:m,style:v,timeout:y="auto",TransitionComponent:S=yz}=t,w=Ne(t,Hve),b=O.useRef(),x=O.useRef(),E=Dn(),A=O.useRef(null),I=Tr(A,o.ref,n),R=F=>z=>{if(F){const G=A.current;z===void 0?F(G):F(G,z)}},M=R(d),L=R((F,z)=>{WK(F);const{duration:G,delay:W,easing:K}=Bm({style:v,timeout:y,easing:s},{mode:"enter"});let q;y==="auto"?(q=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=q):q=G,F.style.transition=[E.transitions.create("opacity",{duration:q,delay:W}),E.transitions.create("transform",{duration:$L?q:q*.666,delay:W,easing:K})].join(","),u&&u(F,z)}),N=R(c),H=R(m),V=R(F=>{const{duration:z,delay:G,easing:W}=Bm({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:G}),E.transitions.create("transform",{duration:$L?K:K*.666,delay:$L?G:G||K*.333,easing:W})].join(","),F.style.opacity=0,F.style.transform=qF(.75),h&&h(F)}),U=R(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(A.current,F)};return O.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:a,nodeRef:A,onEnter:L,onEntered:N,onEntering:M,onExit:V,onExited:U,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},w,{children:(F,z)=>O.cloneElement(o,$({style:$({opacity:0,transform:qF(.75),visibility:F==="exited"&&!a?"hidden":void 0},Wve[F],v,o.props.style),ref:I},z))}))});hQ.muiSupportAuto=!0;const dC=hQ;function Gve(e,t,n,r,i){const[o,s]=O.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Uo(()=>{let a=!0;if(!n)return;const u=n(e),c=()=>{a&&s(u.matches)};return c(),u.addListener(c),()=>{a=!1,u.removeListener(c)}},[e,n]),o}const pQ=DE["useSyncExternalStore"];function Vve(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:d}=r(e);return()=>d}return o},[o,e,r,i,n]),[a,u]=O.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const d=n(e);return[()=>d.matches,h=>(d.addListener(h),()=>{d.removeListener(h)})]},[o,n,e]);return pQ(u,a,s)}function Xve(e,t={}){const n=ZT(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Dq({name:"MuiUseMediaQuery",props:t,theme:n});let u=typeof e=="function"?e(n):e;return u=u.replace(/^@media( ?)/m,""),(pQ!==void 0?Vve:Gve)(u,i,o,s,a)}const qve=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Yve=e=>{const{classes:t,disableUnderline:n}=e,i=It({root:["root",!n&&"underline"],input:["input"]},mge,t);return $({},t,i)},Kve=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...OA(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"},[`&.${Tb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Tb.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(.${Tb.disabled}, .${Tb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Tb.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Qve=Ce(DA,{name:"MuiInput",slot:"Input",overridesResolver:MA})({}),gQ=O.forwardRef(function(t,n){var r,i,o,s;const a=Pt({props:t,name:"MuiInput"}),{disableUnderline:u,components:c={},componentsProps:d,fullWidth:h=!1,inputComponent:p="input",multiline:m=!1,slotProps:v,slots:y={},type:S="text"}=a,w=Ne(a,qve),b=Yve(a),E={root:{ownerState:{disableUnderline:u}}},A=v??d?ts(v??d,E):E,I=(r=(i=y.root)!=null?i:c.Root)!=null?r:Kve,R=(o=(s=y.input)!=null?s:c.Input)!=null?o:Qve;return C.jsx(LA,$({slots:{root:I,input:R},slotProps:A,fullWidth:h,inputComponent:p,multiline:m,ref:n,type:S},w,{classes:b}))});gQ.muiName="Input";const mQ=gQ;function Jve(e){return Ct("MuiInputLabel",e)}Rt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Zve=["disableAnimation","margin","shrink","variant","className"],e0e=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,u={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${De(r)}`,s],asterisk:[a&&"asterisk"]},c=It(u,Jve,t);return $({},t,c)},t0e=Ce(jve,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${L1.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)"}))),n0e=O.forwardRef(function(t,n){const r=Pt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ne(r,Zve),u=md();let c=o;typeof c>"u"&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Zp({props:r,muiFormControl:u,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required}),p=e0e(h);return C.jsx(t0e,$({"data-shrink":c,ownerState:h,ref:n,className:je(p.root,s)},a,{classes:p}))}),r0e=n0e;function i0e(e){return Ct("MuiLinearProgress",e)}Rt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const o0e=["className","color","value","valueBuffer","variant"];let bv=e=>e,iH,oH,sH,aH,lH,uH;const YF=4,s0e=fd(iH||(iH=bv` + `),Rme)),Lme=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:u,thickness:c=3.6,value:d=0,variant:h="indeterminate"}=r,p=Ne(r,Ame),m=$({},r,{color:o,disableShrink:s,size:a,thickness:c,value:d,variant:h}),v=Pme(m),y={},S={},w={};if(h==="determinate"){const b=2*Math.PI*((of-c)/2);y.strokeDasharray=b.toFixed(3),w["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(Ome,$({className:je(v.root,i),style:$({width:a,height:a},S,u),ownerState:m,ref:n,role:"progressbar"},w,p,{children:C.jsx(Mme,{className:v.svg,ownerState:m,viewBox:`${of/2} ${of/2} ${of} ${of}`,children:C.jsx(kme,{className:v.circle,style:y,ownerState:m,cx:of,cy:of,r:(of-c)/2,fill:"none",strokeWidth:c})})}))}),BA=Lme,Dme=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),Nme=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}}),Bme=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var u;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(u=a.palette)==null?void 0:u.mode}});let i=$({html:Dme(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},Nme(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 $me(e){const t=Pt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(O.Fragment,{children:[C.jsx(sQ,{styles:i=>Bme(i,r)}),n]})}function Fme(e){return Ct("MuiModal",e)}Rt("MuiModal",["root","hidden","backdrop"]);const zme=["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"],Ume=e=>{const{open:t,exited:n,classes:r}=e;return It({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Fme,r)},jme=Ce("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"})),Hme=Ce(aQ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Wme=O.forwardRef(function(t,n){var r,i,o,s,a,u;const c=Pt({name:"MuiModal",props:t}),{BackdropComponent:d=Hme,BackdropProps:h,className:p,closeAfterTransition:m=!1,children:v,container:y,component:S,components:w={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:A=!1,disablePortal:I=!1,disableRestoreFocus:R=!1,disableScrollLock:M=!1,hideBackdrop:D=!1,keepMounted:N=!1,onBackdropClick:H,open:V,slotProps:U,slots:L}=c,F=Ne(c,zme),z=$({},c,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:A,disablePortal:I,disableRestoreFocus:R,disableScrollLock:M,hideBackdrop:D,keepMounted:N}),{getRootProps:G,getBackdropProps:W,getTransitionProps:K,portalRef:q,isTopModal:Q,exited:re,hasTransition:ue}=jpe($({},z,{rootRef:n})),ce=$({},z,{exited:re}),se=Ume(ce),J={};if(v.props.tabIndex===void 0&&(J.tabIndex="-1"),ue){const{onEnter:xe,onExited:ge}=K();J.onEnter=xe,J.onExited=ge}const ae=(r=(i=L==null?void 0:L.root)!=null?i:w.Root)!=null?r:jme,le=(o=(s=L==null?void 0:L.backdrop)!=null?s:w.Backdrop)!=null?o:d,he=(a=U==null?void 0:U.root)!=null?a:b.root,pe=(u=U==null?void 0:U.backdrop)!=null?u:b.backdrop,ve=ti({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:G,additionalProps:{ref:n,as:S},ownerState:ce,className:je(p,he==null?void 0:he.className,se==null?void 0:se.root,!ce.open&&ce.exited&&(se==null?void 0:se.hidden))}),ye=ti({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>W($({},xe,{onClick:ge=>{H&&H(ge),xe!=null&&xe.onClick&&xe.onClick(ge)}})),className:je(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ce});return!N&&!V&&(!ue||re)?null:C.jsx(nQ,{ref:q,container:y,disablePortal:I,children:C.jsxs(ae,$({},ve,{children:[!D&&d?C.jsx(le,$({},ye)):null,C.jsx(vhe,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:R,isEnabled:Q,open:V,children:O.cloneElement(v,J)})]}))})}),cQ=Wme;function Gme(e){return Ct("MuiDialog",e)}const Vme=Rt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),BD=Vme,Xme=O.createContext({}),qme=Xme,Yme=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Kme=Ce(aQ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Qme=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Le(n)}`],paper:["paper",`paperScroll${Le(n)}`,`paperWidth${Le(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return It(s,Gme,t)},Jme=Ce(cQ,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Zme=Ce("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Le(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"}})),eve=Ce(yv,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Le(n.scroll)}`],t[`paperWidth${Le(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)`,[`&.${BD.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}`,[`&.${BD.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,[`&.${BD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),tve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiDialog"}),i=Ln(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:u,BackdropProps:c,children:d,className:h,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:w,open:b,PaperComponent:x=yv,PaperProps:E={},scroll:A="paper",TransitionComponent:I=zp,transitionDuration:R=o,TransitionProps:M}=r,D=Ne(r,Yme),N=$({},r,{disableEscapeKeyDown:p,fullScreen:m,fullWidth:v,maxWidth:y,scroll:A}),H=Qme(N),V=O.useRef(),U=G=>{V.current=G.target===G.currentTarget},L=G=>{V.current&&(V.current=null,S&&S(G),w&&w(G,"backdropClick"))},F=s4(a),z=O.useMemo(()=>({titleId:F}),[F]);return C.jsx(Jme,$({className:je(H.root,h),closeAfterTransition:!0,components:{Backdrop:Kme},componentsProps:{backdrop:$({transitionDuration:R,as:u},c)},disableEscapeKeyDown:p,onClose:w,open:b,ref:n,onClick:L,ownerState:N},D,{children:C.jsx(I,$({appear:!0,in:b,timeout:R,role:"presentation"},M,{children:C.jsx(Zme,{className:je(H.container),onMouseDown:U,ownerState:N,children:C.jsx(eve,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:je(H.paper,E.className),ownerState:N,children:C.jsx(qme.Provider,{value:z,children:d})}))})}))}))}),nve=tve;function rve(e){return Ct("MuiDivider",e)}const ive=Rt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),nH=ive,ove=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],sve=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:u}=e;return It({root:["root",t&&"absolute",u,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},rve,r)},ave=Ce("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)`:An(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%"}})),lve=Ce("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)`})),fQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:u=!1,light:c=!1,orientation:d="horizontal",role:h=a!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth"}=r,v=Ne(r,ove),y=$({},r,{absolute:i,component:a,flexItem:u,light:c,orientation:d,role:h,textAlign:p,variant:m}),S=sve(y);return C.jsx(ave,$({as:a,className:je(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(lve,{className:S.wrapper,ownerState:y,children:o}):null}))});fQ.muiSkipListHighlight=!0;const Kc=fQ,uve=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],cve=e=>{const{classes:t,disableUnderline:n}=e,i=It({root:["root",!n&&"underline"],input:["input"]},xge,t);return $({},t,i)},fve=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...OA(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)",a=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}},[`&.${Fh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Fh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!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"},[`&.${Fh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fh.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(.${Fh.disabled}, .${Fh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Fh.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}))}),dve=Ce(LA,{name:"MuiFilledInput",slot:"Input",overridesResolver:MA})(({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})),dQ=O.forwardRef(function(t,n){var r,i,o,s;const a=Pt({props:t,name:"MuiFilledInput"}),{components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:h="input",multiline:p=!1,slotProps:m,slots:v={},type:y="text"}=a,S=Ne(a,uve),w=$({},a,{fullWidth:d,inputComponent:h,multiline:p,type:y}),b=cve(a),x={root:{ownerState:w},input:{ownerState:w}},E=m??c?ts(m??c,x):x,A=(r=(i=v.root)!=null?i:u.Root)!=null?r:fve,I=(o=(s=v.input)!=null?s:u.Input)!=null?o:dve;return C.jsx(DA,$({slots:{root:A,input:I},componentsProps:E,fullWidth:d,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});dQ.muiName="Input";const hQ=dQ;function hve(e){return Ct("MuiFormControl",e)}Rt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const pve=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],gve=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${Le(n)}`,r&&"fullWidth"]};return It(i,hve,t)},mve=Ce("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${Le(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%"})),vve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:u=!1,error:c=!1,focused:d,fullWidth:h=!1,hiddenLabel:p=!1,margin:m="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,w=Ne(r,pve),b=$({},r,{color:s,component:a,disabled:u,error:c,fullWidth:h,hiddenLabel:p,margin:m,required:v,size:y,variant:S}),x=gve(b),[E,A]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,L=>{if(!WS(L,["Input","Select"]))return;const F=WS(L,["Select"])?L.props.input:L;F&&uge(F.props)&&(U=!0)}),U}),[I,R]=O.useState(()=>{let U=!1;return i&&O.Children.forEach(i,L=>{WS(L,["Input","Select"])&&(dC(L.props,!0)||dC(L.props.inputProps,!0))&&(U=!0)}),U}),[M,D]=O.useState(!1);u&&M&&D(!1);const N=d!==void 0&&!u?d:M;let H;const V=O.useMemo(()=>({adornedStart:E,setAdornedStart:A,color:s,disabled:u,error:c,filled:I,focused:N,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{D(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{D(!0)},registerEffect:H,required:v,variant:S}),[E,s,u,c,I,N,h,p,H,v,y,S]);return C.jsx(Rz.Provider,{value:V,children:C.jsx(mve,$({as:a,ownerState:b,className:je(x.root,o),ref:n},w,{children:i}))})}),yve=vve,bve=pue({createStyledComponent:Ce("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Pt({props:e,name:"MuiStack"})}),Hm=bve;function xve(e){return Ct("MuiFormControlLabel",e)}const wve=Rt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),o1=wve,_ve=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Sve=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${Le(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return It(s,xve,t)},Eve=Ce("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${o1.label}`]:t.label},t.root,t[`labelPlacement${Le(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${o1.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},{[`& .${o1.label}`]:{[`&.${o1.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Cve=Ce("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${o1.error}`]:{color:(e.vars||e).palette.error.main}})),Tve=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:u,disabled:c,disableTypography:d,label:h,labelPlacement:p="end",required:m,slotProps:v={}}=o,y=Ne(o,_ve),S=md(),w=(r=c??u.props.disabled)!=null?r:S==null?void 0:S.disabled,b=m??u.props.required,x={disabled:w,required:b};["checked","name","onChange","value","inputRef"].forEach(D=>{typeof u.props[D]>"u"&&typeof o[D]<"u"&&(x[D]=o[D])});const E=Zp({props:o,muiFormControl:S,states:["error"]}),A=$({},o,{disabled:w,labelPlacement:p,required:b,error:E.error}),I=Sve(A),R=(i=v.typography)!=null?i:a.typography;let M=h;return M!=null&&M.type!==Wt&&!d&&(M=C.jsx(Wt,$({component:"span"},R,{className:je(I.label,R==null?void 0:R.className),children:M}))),C.jsxs(Eve,$({className:je(I.root,s),ownerState:A,ref:n},y,{children:[O.cloneElement(u,x),b?C.jsxs(Hm,{direction:"row",alignItems:"center",children:[M,C.jsxs(Cve,{ownerState:A,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):M]}))}),Ave=Tve;function Ive(e){return Ct("MuiFormHelperText",e)}const Rve=Rt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),rH=Rve;var iH;const Pve=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ove=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:u}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${Le(r)}`,n&&"contained",a&&"focused",s&&"filled",u&&"required"]};return It(c,Ive,t)},Mve=Ce("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Le(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,[`&.${rH.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${rH.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),kve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ne(r,Pve),u=md(),c=Zp({props:r,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),d=$({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),h=Ove(d);return C.jsx(Mve,$({as:s,ownerState:d,className:je(h.root,o),ref:n},a,{children:i===" "?iH||(iH=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Lve=kve;function Dve(e){return Ct("MuiFormLabel",e)}const Nve=Rt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),D1=Nve,Bve=["children","className","color","component","disabled","error","filled","focused","required"],$ve=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,u={root:["root",`color${Le(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return It(u,Dve,t)},Fve=Ce("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",[`&.${D1.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${D1.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${D1.error}`]:{color:(e.vars||e).palette.error.main}})),zve=Ce("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${D1.error}`]:{color:(e.vars||e).palette.error.main}})),Uve=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ne(r,Bve),u=md(),c=Zp({props:r,muiFormControl:u,states:["color","required","focused","disabled","error","filled"]}),d=$({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),h=$ve(d);return C.jsxs(Fve,$({as:s,ownerState:d,className:je(h.root,o),ref:n},a,{children:[i,c.required&&C.jsxs(zve,{ownerState:d,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),jve=Uve,Hve=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function YF(e){return`scale(${e}, ${e**2})`}const Wve={entering:{opacity:1,transform:YF(1)},entered:{opacity:1,transform:"none"}},$D=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),pQ=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:u,onEntered:c,onEntering:d,onExit:h,onExited:p,onExiting:m,style:v,timeout:y="auto",TransitionComponent:S=bz}=t,w=Ne(t,Hve),b=O.useRef(),x=O.useRef(),E=Ln(),A=O.useRef(null),I=Tr(A,o.ref,n),R=F=>z=>{if(F){const G=A.current;z===void 0?F(G):F(G,z)}},M=R(d),D=R((F,z)=>{GK(F);const{duration:G,delay:W,easing:K}=Bm({style:v,timeout:y,easing:s},{mode:"enter"});let q;y==="auto"?(q=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=q):q=G,F.style.transition=[E.transitions.create("opacity",{duration:q,delay:W}),E.transitions.create("transform",{duration:$D?q:q*.666,delay:W,easing:K})].join(","),u&&u(F,z)}),N=R(c),H=R(m),V=R(F=>{const{duration:z,delay:G,easing:W}=Bm({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:G}),E.transitions.create("transform",{duration:$D?K:K*.666,delay:$D?G:G||K*.333,easing:W})].join(","),F.style.opacity=0,F.style.transform=YF(.75),h&&h(F)}),U=R(p),L=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(A.current,F)};return O.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:a,nodeRef:A,onEnter:D,onEntered:N,onEntering:M,onExit:V,onExited:U,onExiting:H,addEndListener:L,timeout:y==="auto"?null:y},w,{children:(F,z)=>O.cloneElement(o,$({style:$({opacity:0,transform:YF(.75),visibility:F==="exited"&&!a?"hidden":void 0},Wve[F],v,o.props.style),ref:I},z))}))});pQ.muiSupportAuto=!0;const hC=pQ;function Gve(e,t,n,r,i){const[o,s]=O.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Uo(()=>{let a=!0;if(!n)return;const u=n(e),c=()=>{a&&s(u.matches)};return c(),u.addListener(c),()=>{a=!1,u.removeListener(c)}},[e,n]),o}const gQ=DE["useSyncExternalStore"];function Vve(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:d}=r(e);return()=>d}return o},[o,e,r,i,n]),[a,u]=O.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const d=n(e);return[()=>d.matches,h=>(d.addListener(h),()=>{d.removeListener(h)})]},[o,n,e]);return gQ(u,a,s)}function Xve(e,t={}){const n=ZT(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Dq({name:"MuiUseMediaQuery",props:t,theme:n});let u=typeof e=="function"?e(n):e;return u=u.replace(/^@media( ?)/m,""),(gQ!==void 0?Vve:Gve)(u,i,o,s,a)}const qve=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Yve=e=>{const{classes:t,disableUnderline:n}=e,i=It({root:["root",!n&&"underline"],input:["input"]},mge,t);return $({},t,i)},Kve=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...OA(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"},[`&.${Tb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Tb.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(.${Tb.disabled}, .${Tb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Tb.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Qve=Ce(LA,{name:"MuiInput",slot:"Input",overridesResolver:MA})({}),mQ=O.forwardRef(function(t,n){var r,i,o,s;const a=Pt({props:t,name:"MuiInput"}),{disableUnderline:u,components:c={},componentsProps:d,fullWidth:h=!1,inputComponent:p="input",multiline:m=!1,slotProps:v,slots:y={},type:S="text"}=a,w=Ne(a,qve),b=Yve(a),E={root:{ownerState:{disableUnderline:u}}},A=v??d?ts(v??d,E):E,I=(r=(i=y.root)!=null?i:c.Root)!=null?r:Kve,R=(o=(s=y.input)!=null?s:c.Input)!=null?o:Qve;return C.jsx(DA,$({slots:{root:I,input:R},slotProps:A,fullWidth:h,inputComponent:p,multiline:m,ref:n,type:S},w,{classes:b}))});mQ.muiName="Input";const vQ=mQ;function Jve(e){return Ct("MuiInputLabel",e)}Rt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Zve=["disableAnimation","margin","shrink","variant","className"],e0e=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,u={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Le(r)}`,s],asterisk:[a&&"asterisk"]},c=It(u,Jve,t);return $({},t,c)},t0e=Ce(jve,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${D1.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)"}))),n0e=O.forwardRef(function(t,n){const r=Pt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ne(r,Zve),u=md();let c=o;typeof c>"u"&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Zp({props:r,muiFormControl:u,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required}),p=e0e(h);return C.jsx(t0e,$({"data-shrink":c,ownerState:h,ref:n,className:je(p.root,s)},a,{classes:p}))}),r0e=n0e;function i0e(e){return Ct("MuiLinearProgress",e)}Rt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const o0e=["className","color","value","valueBuffer","variant"];let bv=e=>e,oH,sH,aH,lH,uH,cH;const KF=4,s0e=fd(oH||(oH=bv` 0% { left: -35%; right: 100%; @@ -174,7 +174,7 @@ Error generating stack: `+o.message+` left: 100%; right: -90%; } -`)),a0e=fd(oH||(oH=bv` +`)),a0e=fd(sH||(sH=bv` 0% { left: -200%; right: 100%; @@ -189,7 +189,7 @@ Error generating stack: `+o.message+` left: 107%; right: -8%; } -`)),l0e=fd(sH||(sH=bv` +`)),l0e=fd(aH||(aH=bv` 0% { opacity: 1; background-position: 0 -23px; @@ -204,24 +204,24 @@ Error generating stack: `+o.message+` opacity: 1; background-position: -200px -23px; } -`)),u0e=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${De(r)}`,n],dashed:["dashed",`dashedColor${De(r)}`],bar1:["bar",`barColor${De(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${De(r)}`,n==="buffer"&&`color${De(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return It(i,i0e,t)},Pz=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?pv(e.palette[t].main,.62):hv(e.palette[t].main,.5),c0e=Ce("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:Pz(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)"})),f0e=Ce("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${De(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=Pz(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"})},dv(aH||(aH=bv` +`)),u0e=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${Le(r)}`,n],dashed:["dashed",`dashedColor${Le(r)}`],bar1:["bar",`barColor${Le(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Le(r)}`,n==="buffer"&&`color${Le(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return It(i,i0e,t)},Oz=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?pv(e.palette[t].main,.62):hv(e.palette[t].main,.5),c0e=Ce("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Le(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:Oz(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)"})),f0e=Ce("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Le(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=Oz(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"})},dv(lH||(lH=bv` animation: ${0} 3s infinite linear; - `),l0e)),d0e=Ce("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${De(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 .${YF}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${YF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&dv(lH||(lH=bv` + `),l0e)),d0e=Ce("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Le(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 .${KF}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${KF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&dv(uH||(uH=bv` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `),s0e)),h0e=Ce("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${De(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:Pz(t,e.color),transition:`transform .${YF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&dv(uH||(uH=bv` + `),s0e)),h0e=Ce("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Le(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:Oz(t,e.color),transition:`transform .${KF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&dv(cH||(cH=bv` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `),a0e)),p0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:a,variant:u="indeterminate"}=r,c=Ne(r,o0e),d=$({},r,{color:o,variant:u}),h=u0e(d),p=Dn(),m={},v={bar1:{},bar2:{}};if((u==="determinate"||u==="buffer")&&s!==void 0){m["aria-valuenow"]=Math.round(s),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(u==="buffer"&&a!==void 0){let y=(a||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(c0e,$({className:je(h.root,i),ownerState:d,role:"progressbar"},m,{ref:n},c,{children:[u==="buffer"?C.jsx(f0e,{className:h.dashed,ownerState:d}):null,C.jsx(d0e,{className:h.bar1,ownerState:d,style:v.bar1}),u==="determinate"?null:C.jsx(h0e,{className:h.bar2,ownerState:d,style:v.bar2})]}))}),g0e=p0e,m0e=O.createContext({}),Sa=m0e;function v0e(e){return Ct("MuiList",e)}Rt("MuiList",["root","padding","dense","subheader"]);const y0e=["children","className","component","dense","disablePadding","subheader"],b0e=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return It({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},v0e,t)},x0e=Ce("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})),w0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:u=!1,subheader:c}=r,d=Ne(r,y0e),h=O.useMemo(()=>({dense:a}),[a]),p=$({},r,{component:s,dense:a,disablePadding:u}),m=b0e(p);return C.jsx(Sa.Provider,{value:h,children:C.jsxs(x0e,$({as:s,className:je(m.root,o),ref:n,ownerState:p},d,{children:[c,i]}))})}),Wm=w0e;function _0e(e){return Ct("MuiListItem",e)}const S0e=Rt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Ag=S0e;function E0e(e){return Ct("MuiListItemButton",e)}const C0e=Rt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Ig=C0e,T0e=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],A0e=(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]},I0e=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=It({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},E0e,n);return $({},n,c)},R0e=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:A0e})(({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"}},[`&.${Ig.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ig.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ig.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ig.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ig.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})),P0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:u=!1,disableGutters:c=!1,divider:d=!1,focusVisibleClassName:h,selected:p=!1,className:m}=r,v=Ne(r,T0e),y=O.useContext(Sa),S=O.useMemo(()=>({dense:u||y.dense||!1,alignItems:i,disableGutters:c}),[i,y.dense,u,c]),w=O.useRef(null);Uo(()=>{o&&w.current&&w.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:c,divider:d,selected:p}),x=I0e(b),E=Tr(w,n);return C.jsx(Sa.Provider,{value:S,children:C.jsx(R0e,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:je(x.focusVisible,h),ownerState:b,className:je(x.root,m)},v,{classes:x,children:a}))})}),KF=P0e;function O0e(e){return Ct("MuiListItemSecondaryAction",e)}Rt("MuiListItemSecondaryAction",["root","disableGutters"]);const M0e=["className"],k0e=e=>{const{disableGutters:t,classes:n}=e;return It({root:["root",t&&"disableGutters"]},O0e,n)},D0e=Ce("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})),vQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ne(r,M0e),s=O.useContext(Sa),a=$({},r,{disableGutters:s.disableGutters}),u=k0e(a);return C.jsx(D0e,$({className:je(u.root,i),ownerState:a,ref:n},o))});vQ.muiName="ListItemSecondaryAction";const L0e=vQ,N0e=["className"],B0e=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],$0e=(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]},F0e=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:u,hasSecondaryAction:c,selected:d}=e;return It({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",u&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]},_0e,r)},z0e=Ce("div",{name:"MuiListItem",slot:"Root",overridesResolver:$0e})(({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&&{[`& > .${Ig.root}`]:{paddingRight:48}},{[`&.${Ag.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ag.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ag.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ag.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"}},[`&.${Ag.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),U0e=Ce("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),j0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:u,component:c,components:d={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:m}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:w=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:A=!1,slotProps:I={},slots:R={}}=r,M=Ne(r.ContainerProps,N0e),L=Ne(r,B0e),N=O.useContext(Sa),H=O.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),V=O.useRef(null);Uo(()=>{o&&V.current&&V.current.focus()},[o]);const U=O.Children.toArray(a),D=U.length&&HS(U[U.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:w,divider:b,hasSecondaryAction:D,selected:A}),z=F0e(F),G=Tr(V,n),W=R.root||d.Root||z0e,K=I.root||h.root||{},q=$({className:je(z.root,K.className,u),disabled:y},L);let Q=c||"li";return s&&(q.component=c||"div",q.focusVisibleClassName=je(Ag.focusVisible,x),Q=Yc),D?(Q=!q.component&&!c?"div":Q,p==="li"&&(Q==="li"?Q="div":q.component==="li"&&(q.component="div")),C.jsx(Sa.Provider,{value:H,children:C.jsxs(U0e,$({as:p,className:je(z.container,m),ref:G,ownerState:F},M,{children:[C.jsx(W,$({},K,!tu(W)&&{as:Q,ownerState:$({},F,K.ownerState)},q,{children:U})),U.pop()]}))})):C.jsx(Sa.Provider,{value:H,children:C.jsxs(W,$({},K,{as:Q,ref:G},!tu(W)&&{ownerState:$({},F,K.ownerState)},q,{children:[U,E&&C.jsx(L0e,{children:E})]}))})}),N1=j0e;function H0e(e){return Ct("MuiListItemAvatar",e)}Rt("MuiListItemAvatar",["root","alignItemsFlexStart"]);const W0e=["className"],G0e=e=>{const{alignItems:t,classes:n}=e;return It({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},H0e,n)},V0e=Ce("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})),X0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Ne(r,W0e),s=O.useContext(Sa),a=$({},r,{alignItems:s.alignItems}),u=G0e(a);return C.jsx(V0e,$({className:je(u.root,i),ownerState:a,ref:n},o))}),q0e=X0e;function Y0e(e){return Ct("MuiListItemIcon",e)}const K0e=Rt("MuiListItemIcon",["root","alignItemsFlexStart"]),cH=K0e,Q0e=["className"],J0e=e=>{const{alignItems:t,classes:n}=e;return It({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Y0e,n)},Z0e=Ce("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})),eye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ne(r,Q0e),s=O.useContext(Sa),a=$({},r,{alignItems:s.alignItems}),u=J0e(a);return C.jsx(Z0e,$({className:je(u.root,i),ownerState:a,ref:n},o))}),Gf=eye;function tye(e){return Ct("MuiListItemText",e)}const nye=Rt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),hC=nye,rye=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],iye=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return It({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},tye,t)},oye=Ce("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${hC.primary}`]:t.primary},{[`& .${hC.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})),sye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:u,primaryTypographyProps:c,secondary:d,secondaryTypographyProps:h}=r,p=Ne(r,rye),{dense:m}=O.useContext(Sa);let v=u??i,y=d;const S=$({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!y,dense:m}),w=iye(S);return v!=null&&v.type!==Wt&&!s&&(v=C.jsx(Wt,$({variant:m?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),y!=null&&y.type!==Wt&&!s&&(y=C.jsx(Wt,$({variant:"body2",className:w.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(oye,$({className:je(w.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),ru=sye,aye=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function FL(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function fH(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function yQ(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 Ab(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const u=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!yQ(a,o)||u)a=i(e,a,n);else return a.focus(),!0}return!1}const lye=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:u=!1,disableListWrap:c=!1,onKeyDown:d,variant:h="selectedMenu"}=t,p=Ne(t,aye),m=O.useRef(null),v=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Uo(()=>{i&&m.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const A=!m.current.style.width;if(x.clientHeight{const E=m.current,A=x.key,I=Fr(E).activeElement;if(A==="ArrowDown")x.preventDefault(),Ab(E,I,c,u,FL);else if(A==="ArrowUp")x.preventDefault(),Ab(E,I,c,u,fH);else if(A==="Home")x.preventDefault(),Ab(E,null,c,u,FL);else if(A==="End")x.preventDefault(),Ab(E,null,c,u,fH);else if(A.length===1){const R=v.current,M=A.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 N=I&&!R.repeating&&yQ(I,R);R.previousKeyMatched&&(N||Ab(E,I,!1,u,FL,R))?x.preventDefault():R.previousKeyMatched=!1}d&&d(x)},S=Tr(m,n);let w=-1;O.Children.forEach(s,(x,E)=>{if(!O.isValidElement(x)){w===E&&(w+=1,w>=s.length&&(w=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||w===-1)&&(w=E),w===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(w+=1,w>=s.length&&(w=-1))});const b=O.Children.map(s,(x,E)=>{if(E===w){const A={};return o&&(A.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(A.tabIndex=0),O.cloneElement(x,A)}return x});return C.jsx(Wm,$({role:"menu",ref:S,className:a,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),Oz=lye;function uye(e){return Ct("MuiPopover",e)}Rt("MuiPopover",["root","paper"]);const cye=["onEntering"],fye=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],dye=["slotProps"];function dH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function hH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function pH(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function zL(e){return typeof e=="function"?e():e}const hye=e=>{const{classes:t}=e;return It({root:["root"],paper:["paper"]},uye,t)},pye=Ce(uQ,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bQ=Ce(yv,{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}),gye=O.forwardRef(function(t,n){var r,i,o;const s=Pt({props:t,name:"MuiPopover"}),{action:a,anchorEl:u,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:d,anchorReference:h="anchorEl",children:p,className:m,container:v,elevation:y=8,marginThreshold:S=16,open:w,PaperProps:b={},slots:x,slotProps:E,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:I=dC,transitionDuration:R="auto",TransitionProps:{onEntering:M}={},disableScrollLock:L=!1}=s,N=Ne(s.TransitionProps,cye),H=Ne(s,fye),V=(r=E==null?void 0:E.paper)!=null?r:b,U=O.useRef(),D=Tr(U,V.ref),F=$({},s,{anchorOrigin:c,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:V,transformOrigin:A,TransitionComponent:I,transitionDuration:R,TransitionProps:N}),z=hye(F),G=O.useCallback(()=>{if(h==="anchorPosition")return d;const xe=zL(u),be=(xe&&xe.nodeType===1?xe:Fr(U.current).body).getBoundingClientRect();return{top:be.top+dH(be,c.vertical),left:be.left+hH(be,c.horizontal)}},[u,c.horizontal,c.vertical,d,h]),W=O.useCallback(xe=>({vertical:dH(xe,A.vertical),horizontal:hH(xe,A.horizontal)}),[A.horizontal,A.vertical]),K=O.useCallback(xe=>{const ge={width:xe.offsetWidth,height:xe.offsetHeight},be=W(ge);if(h==="none")return{top:null,left:null,transformOrigin:pH(be)};const Ze=G();let qe=Ze.top-be.vertical,ut=Ze.left-be.horizontal;const Bt=qe+ge.height,Oe=ut+ge.width,ze=Lc(zL(u)),st=ze.innerHeight-S,mt=ze.innerWidth-S;if(S!==null&&qest){const vt=Bt-st;qe-=vt,be.vertical+=vt}if(S!==null&&utmt){const vt=Oe-mt;ut-=vt,be.horizontal+=vt}return{top:`${Math.round(qe)}px`,left:`${Math.round(ut)}px`,transformOrigin:pH(be)}},[u,h,G,W,S]),[q,Q]=O.useState(w),re=O.useCallback(()=>{const xe=U.current;if(!xe)return;const ge=K(xe);ge.top!==null&&(xe.style.top=ge.top),ge.left!==null&&(xe.style.left=ge.left),xe.style.transformOrigin=ge.transformOrigin,Q(!0)},[K]);O.useEffect(()=>(L&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[u,L,re]);const ue=(xe,ge)=>{M&&M(xe,ge),re()},ce=()=>{Q(!1)};O.useEffect(()=>{w&&re()}),O.useImperativeHandle(a,()=>w?{updatePosition:()=>{re()}}:null,[w,re]),O.useEffect(()=>{if(!w)return;const xe=IT(()=>{re()}),ge=Lc(u);return ge.addEventListener("resize",xe),()=>{xe.clear(),ge.removeEventListener("resize",xe)}},[u,w,re]);let se=R;R==="auto"&&!I.muiSupportAuto&&(se=void 0);const J=v||(u?Fr(zL(u)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:pye,le=(o=x==null?void 0:x.paper)!=null?o:bQ,he=ti({elementType:le,externalSlotProps:$({},V,{style:q?V.style:$({},V.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:je(z.paper,V==null?void 0:V.className)}),pe=ti({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:J,open:w},ownerState:F,className:je(z.root,m)}),{slotProps:ve}=pe,ye=Ne(pe,dye);return C.jsx(ae,$({},ye,!tu(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(I,$({appear:!0,in:w,onEntering:ue,onExited:ce,timeout:se},N,{children:C.jsx(le,$({},he,{children:p}))}))}))}),mye=gye;function vye(e){return Ct("MuiMenu",e)}Rt("MuiMenu",["root","paper","list"]);const yye=["onEntering"],bye=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],xye={vertical:"top",horizontal:"right"},wye={vertical:"top",horizontal:"left"},_ye=e=>{const{classes:t}=e;return It({root:["root"],paper:["paper"],list:["list"]},vye,t)},Sye=Ce(mye,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Eye=Ce(bQ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Cye=Ce(Oz,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Tye=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:u,disableAutoFocusItem:c=!1,MenuListProps:d={},onClose:h,open:p,PaperProps:m={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:w="selectedMenu",slots:b={},slotProps:x={}}=o,E=Ne(o.TransitionProps,yye),A=Ne(o,bye),I=Dn(),R=I.direction==="rtl",M=$({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:d,onEntering:S,PaperProps:m,transitionDuration:y,TransitionProps:E,variant:w}),L=_ye(M),N=s&&!c&&p,H=O.useRef(null),V=(K,q)=>{H.current&&H.current.adjustStyleForScrollbar(K,I),S&&S(K,q)},U=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;O.Children.map(a,(K,q)=>{O.isValidElement(K)&&(K.props.disabled||(w==="selectedMenu"&&K.props.selected||D===-1)&&(D=q))});const F=(r=b.paper)!=null?r:Eye,z=(i=x.paper)!=null?i:m,G=ti({elementType:b.root,externalSlotProps:x.root,ownerState:M,className:[L.root,u]}),W=ti({elementType:F,externalSlotProps:z,ownerState:M,className:L.paper});return C.jsx(Sye,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?xye:wye,slots:{paper:F,root:b.root},slotProps:{root:G,paper:W},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:V},E),ownerState:M},A,{classes:v,children:C.jsx(Cye,$({onKeyDown:U,actions:H,autoFocus:s&&(D===-1||c),autoFocusItem:N,variant:w},d,{className:je(L.list,d.className),children:a}))}))}),xv=Tye;function Aye(e){return Ct("MuiMenuItem",e)}const Iye=Rt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ib=Iye,Rye=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Pye=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Oye=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,u=It({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Aye,s);return $({},s,u)},Mye=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Pye})(({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"}},[`&.${Ib.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ib.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ib.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ib.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ib.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${tH.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${tH.inset}`]:{marginLeft:52},[`& .${hC.root}`]:{marginTop:0,marginBottom:0},[`& .${hC.inset}`]:{paddingLeft:36},[`& .${cH.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${cH.root} svg`]:{fontSize:"1.25rem"}}))),kye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:u=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:h,className:p}=r,m=Ne(r,Rye),v=O.useContext(Sa),y=O.useMemo(()=>({dense:s||v.dense||!1,disableGutters:u}),[v.dense,s,u]),S=O.useRef(null);Uo(()=>{i&&S.current&&S.current.focus()},[i]);const w=$({},r,{dense:y.dense,divider:a,disableGutters:u}),b=Oye(r),x=Tr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(Sa.Provider,{value:y,children:C.jsx(Mye,$({ref:x,role:d,tabIndex:E,component:o,focusVisibleClassName:je(b.focusVisible,c),className:je(b.root,p)},m,{ownerState:w,classes:b}))})}),Vf=kye;function Dye(e){return Ct("MuiNativeSelect",e)}const Lye=Rt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Mz=Lye,Nye=["className","disabled","error","IconComponent","inputRef","variant"],Bye=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${De(n)}`,o&&"iconOpen",r&&"disabled"]};return It(a,Dye,t)},xQ=({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"},[`&.${Mz.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}}),$ye=Ce("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ka,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Mz.multiple}`]:t.multiple}]}})(xQ),wQ=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Mz.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Fye=Ce("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})(wQ),zye=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:u="standard"}=t,c=Ne(t,Nye),d=$({},t,{disabled:i,variant:u,error:o}),h=Bye(d);return C.jsxs(O.Fragment,{children:[C.jsx($ye,$({ownerState:d,className:je(h.select,r),disabled:i,ref:a||n},c)),t.multiple?null:C.jsx(Fye,{as:s,ownerState:d,className:h.icon})]})}),Uye=zye;var gH;const jye=["children","classes","className","label","notched"],Hye=Ce("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%"}),Wye=Ce("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 Gye(e){const{className:t,label:n,notched:r}=e,i=Ne(e,jye),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(Hye,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(Wye,{ownerState:s,children:o?C.jsx("span",{children:n}):gH||(gH=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const Vye=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Xye=e=>{const{classes:t}=e,r=It({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yge,t);return $({},t,r)},qye=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:OA})(({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 .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${rf.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${rf.focused} .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${rf.error} .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${rf.disabled} .${rf.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"}))}),Yye=Ce(Gye,{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}}),Kye=Ce(DA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:MA})(({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})),_Q=O.forwardRef(function(t,n){var r,i,o,s,a;const u=Pt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:d=!1,inputComponent:h="input",label:p,multiline:m=!1,notched:v,slots:y={},type:S="text"}=u,w=Ne(u,Vye),b=Xye(u),x=md(),E=Zp({props:u,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},u,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:d,hiddenLabel:E.hiddenLabel,multiline:m,size:E.size,type:S}),I=(r=(i=y.root)!=null?i:c.Root)!=null?r:qye,R=(o=(s=y.input)!=null?s:c.Input)!=null?o:Kye;return C.jsx(LA,$({slots:{root:I,input:R},renderSuffix:M=>C.jsx(Yye,{ownerState:A,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?a||(a=C.jsxs(O.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:d,inputComponent:h,multiline:m,ref:n,type:S},w,{classes:$({},b,{notchedOutline:null})}))});_Q.muiName="Input";const SQ=_Q;function Qye(e){return Ct("MuiSelect",e)}const Jye=Rt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Rb=Jye;var mH;const Zye=["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"],ebe=Ce("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Rb.select}`]:t.select},{[`&.${Rb.select}`]:t[n.variant]},{[`&.${Rb.error}`]:t.error},{[`&.${Rb.multiple}`]:t.multiple}]}})(xQ,{[`&.${Rb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tbe=Ce("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})(wQ),nbe=Ce("input",{shouldForwardProp:e=>C4(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 vH(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function rbe(e){return e==null||typeof e=="string"&&!e.trim()}const ibe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${De(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return It(a,Qye,t)},obe=O.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:u,className:c,defaultOpen:d,defaultValue:h,disabled:p,displayEmpty:m,error:v=!1,IconComponent:y,inputRef:S,labelId:w,MenuProps:b={},multiple:x,name:E,onBlur:A,onChange:I,onClose:R,onFocus:M,onOpen:L,open:N,readOnly:H,renderValue:V,SelectDisplayProps:U={},tabIndex:D,value:F,variant:z="standard"}=t,G=Ne(t,Zye),[W,K]=tx({controlled:F,default:h,name:"Select"}),[q,Q]=tx({controlled:N,default:d,name:"Select"}),re=O.useRef(null),ue=O.useRef(null),[ce,se]=O.useState(null),{current:J}=O.useRef(N!=null),[ae,le]=O.useState(),he=Tr(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(()=>{d&&q&&ce&&!J&&(le(a?null:ve.clientWidth),ue.current.focus())},[ce,a]),O.useEffect(()=>{s&&ue.current.focus()},[s]),O.useEffect(()=>{if(!w)return;const Re=Fr(ue.current).getElementById(w);if(Re){const at=()=>{getSelection().isCollapsed&&ue.current.focus()};return Re.addEventListener("click",at),()=>{Re.removeEventListener("click",at)}}},[w]);const ye=(Re,at)=>{Re?L&&L(at):R&&R(at),J||(le(a?null:ve.clientWidth),Q(Re))},xe=Re=>{Re.button===0&&(Re.preventDefault(),ue.current.focus(),ye(!0,Re))},ge=Re=>{ye(!1,Re)},be=O.Children.toArray(u),Ze=Re=>{const at=be.find($t=>$t.props.value===Re.target.value);at!==void 0&&(K(at.props.value),I&&I(Re,at))},qe=Re=>at=>{let $t;if(at.currentTarget.hasAttribute("tabindex")){if(x){$t=Array.isArray(W)?W.slice():[];const Pe=W.indexOf(Re.props.value);Pe===-1?$t.push(Re.props.value):$t.splice(Pe,1)}else $t=Re.props.value;if(Re.props.onClick&&Re.props.onClick(at),W!==$t&&(K($t),I)){const Pe=at.nativeEvent||at,He=new Pe.constructor(Pe.type,Pe);Object.defineProperty(He,"target",{writable:!0,value:{value:$t,name:E}}),I(He,Re)}x||ye(!1,at)}},ut=Re=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Re.key)!==-1&&(Re.preventDefault(),ye(!0,Re))},Bt=ce!==null&&q,Oe=Re=>{!Bt&&A&&(Object.defineProperty(Re,"target",{writable:!0,value:{value:W,name:E}}),A(Re))};delete G["aria-invalid"];let ze,st;const mt=[];let vt=!1;(fC({value:W})||m)&&(V?ze=V(W):vt=!0);const _e=be.map(Re=>{if(!O.isValidElement(Re))return null;let at;if(x){if(!Array.isArray(W))throw new Error(ed(2));at=W.some($t=>vH($t,Re.props.value)),at&&vt&&mt.push(Re.props.children)}else at=vH(W,Re.props.value),at&&vt&&(st=Re.props.children);return O.cloneElement(Re,{"aria-selected":at?"true":"false",onClick:qe(Re),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),Re.props.onKeyUp&&Re.props.onKeyUp($t)},role:"option",selected:at,value:void 0,"data-value":Re.props.value})});vt&&(x?mt.length===0?ze=null:ze=mt.reduce((Re,at,$t)=>(Re.push(at),$t{const{classes:t}=e;return t},kz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ka(e)&&e!=="variant",slot:"Root"},cbe=Ce(mQ,kz)(""),fbe=Ce(SQ,kz)(""),dbe=Ce(dQ,kz)(""),EQ=O.forwardRef(function(t,n){const r=Pt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:u=!1,displayEmpty:c=!1,IconComponent:d=_ge,id:h,input:p,inputProps:m,label:v,labelId:y,MenuProps:S,multiple:w=!1,native:b=!1,onClose:x,onOpen:E,open:A,renderValue:I,SelectDisplayProps:R,variant:M="outlined"}=r,L=Ne(r,abe),N=b?Uye:sbe,H=md(),V=Zp({props:r,muiFormControl:H,states:["variant","error"]}),U=V.variant||M,D=$({},r,{variant:U,classes:s}),F=ube(D),z=Ne(F,lbe),G=p||{standard:C.jsx(cbe,{ownerState:D}),outlined:C.jsx(fbe,{label:v,ownerState:D}),filled:C.jsx(dbe,{ownerState:D})}[U],W=Tr(n,G.ref);return C.jsx(O.Fragment,{children:O.cloneElement(G,$({inputComponent:N,inputProps:$({children:o,error:V.error,IconComponent:d,variant:U,type:void 0,multiple:w},b?{id:h}:{autoWidth:i,defaultOpen:u,displayEmpty:c,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:A,renderValue:I,SelectDisplayProps:$({id:h},R)},m,{classes:m?ts(z,m.classes):z},p?p.props.inputProps:{})},w&&b&&U==="outlined"?{notched:!0}:{},{ref:W,className:je(G.props.className,a,F.root)},!p&&{variant:U},L))})});EQ.muiName="Select";const hbe=EQ,pbe=e=>!e||!tu(e),gbe=pbe;function mbe(e){return Ct("MuiSlider",e)}const vbe=Rt("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"]),ml=vbe,ybe=e=>{const{open:t}=e;return{offset:je(t&&ml.valueLabelOpen),circle:ml.valueLabelCircle,label:ml.valueLabelLabel}};function bbe(e){const{children:t,className:n,value:r}=e,i=ybe(e);return t?O.cloneElement(t,{className:je(t.props.className)},C.jsxs(O.Fragment,{children:[t.props.children,C.jsx("span",{className:je(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const xbe=["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 yH(e){return e}const wbe=Ce("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],n.size!=="medium"&&t[`size${De(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"},[`&.${ml.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${ml.dragging}`]:{[`& .${ml.thumb}, & .${ml.track}`]:{transition:"none"}}})),_be=Ce("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})),Sbe=Ce("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?pv(e.palette[t.color].main,.62):hv(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})}),Ebe=Ce("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${De(n.color)}`],n.size!=="medium"&&t[`thumbSize${De(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, &.${ml.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:An(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${ml.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:An(e.palette[t.color].main,.16)}`},[`&.${ml.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Cbe=Ce(bbe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${ml.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"})),Tbe=Ce("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>C4(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})),Abe=Ce("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>C4(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})),Ibe=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:u}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${De(a)}`,u&&`size${De(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${De(u)}`,a&&`thumbColor${De(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return It(c,mbe,s)},Rbe=({children:e})=>e,Pbe=O.forwardRef(function(t,n){var r,i,o,s,a,u,c,d,h,p,m,v,y,S,w,b,x,E,A,I,R,M,L,N;const H=Pt({props:t,name:"MuiSlider"}),U=Dn().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":z,component:G="span",components:W={},componentsProps:K={},color:q="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:xe=yH,slotProps:ge,slots:be,track:Ze="normal",valueLabelDisplay:qe="off",valueLabelFormat:ut=yH}=H,Bt=Ne(H,xbe),Oe=$({},H,{isRtl:U,max:le,min:he,classes:Q,disabled:ce,disableSwap:ue,orientation:pe,marks:ae,color:q,size:ve,step:ye,scale:xe,track:Ze,valueLabelDisplay:qe,valueLabelFormat:ut}),{axisProps:ze,getRootProps:st,getHiddenInputProps:mt,getThumbProps:vt,open:_e,active:Ue,axis:Ke,focusedThumbIndex:Fe,range:Be,dragging:Ot,marks:ft,values:Re,trackOffset:at,trackLeap:$t,getThumbStyle:Pe}=Ype($({},Oe,{rootRef:n}));Oe.marked=ft.length>0&&ft.some(Kn=>Kn.label),Oe.dragging=Ot,Oe.focusedThumbIndex=Fe;const He=Ibe(Oe),xt=(r=(i=be==null?void 0:be.root)!=null?i:W.Root)!=null?r:wbe,Gt=(o=(s=be==null?void 0:be.rail)!=null?s:W.Rail)!=null?o:_be,yn=(a=(u=be==null?void 0:be.track)!=null?u:W.Track)!=null?a:Sbe,Yr=(c=(d=be==null?void 0:be.thumb)!=null?d:W.Thumb)!=null?c:Ebe,Hr=(h=(p=be==null?void 0:be.valueLabel)!=null?p:W.ValueLabel)!=null?h:Cbe,Wr=(m=(v=be==null?void 0:be.mark)!=null?v:W.Mark)!=null?m:Tbe,Kr=(y=(S=be==null?void 0:be.markLabel)!=null?S:W.MarkLabel)!=null?y:Abe,ui=(w=(b=be==null?void 0:be.input)!=null?b:W.Input)!=null?w:"input",ds=(x=ge==null?void 0:ge.root)!=null?x:K.root,ef=(E=ge==null?void 0:ge.rail)!=null?E:K.rail,ia=(A=ge==null?void 0:ge.track)!=null?A:K.track,wu=(I=ge==null?void 0:ge.thumb)!=null?I:K.thumb,_u=(R=ge==null?void 0:ge.valueLabel)!=null?R:K.valueLabel,Td=(M=ge==null?void 0:ge.mark)!=null?M:K.mark,hs=(L=ge==null?void 0:ge.markLabel)!=null?L:K.markLabel,Ad=(N=ge==null?void 0:ge.input)!=null?N:K.input,xo=ti({elementType:xt,getSlotProps:st,externalSlotProps:ds,externalForwardedProps:Bt,additionalProps:$({},gbe(xt)&&{as:G}),ownerState:$({},Oe,ds==null?void 0:ds.ownerState),className:[He.root,re]}),Su=ti({elementType:Gt,externalSlotProps:ef,ownerState:Oe,className:He.rail}),Di=ti({elementType:yn,externalSlotProps:ia,additionalProps:{style:$({},ze[Ke].offset(at),ze[Ke].leap($t))},ownerState:$({},Oe,ia==null?void 0:ia.ownerState),className:He.track}),ps=ti({elementType:Yr,getSlotProps:vt,externalSlotProps:wu,ownerState:$({},Oe,wu==null?void 0:wu.ownerState),className:He.thumb}),Id=ti({elementType:Hr,externalSlotProps:_u,ownerState:$({},Oe,_u==null?void 0:_u.ownerState),className:He.valueLabel}),gs=ti({elementType:Wr,externalSlotProps:Td,ownerState:Oe,className:He.mark}),Na=ti({elementType:Kr,externalSlotProps:hs,ownerState:Oe,className:He.markLabel}),tf=ti({elementType:ui,getSlotProps:mt,externalSlotProps:Ad,ownerState:Oe});return C.jsxs(xt,$({},xo,{children:[C.jsx(Gt,$({},Su)),C.jsx(yn,$({},Di)),ft.filter(Kn=>Kn.value>=he&&Kn.value<=le).map((Kn,lr)=>{const Dl=cC(Kn.value,he,le),Ll=ze[Ke].offset(Dl);let wo;return Ze===!1?wo=Re.indexOf(Kn.value)!==-1:wo=Ze==="normal"&&(Be?Kn.value>=Re[0]&&Kn.value<=Re[Re.length-1]:Kn.value<=Re[0])||Ze==="inverted"&&(Be?Kn.value<=Re[0]||Kn.value>=Re[Re.length-1]:Kn.value>=Re[0]),C.jsxs(O.Fragment,{children:[C.jsx(Wr,$({"data-index":lr},gs,!tu(Wr)&&{markActive:wo},{style:$({},Ll,gs.style),className:je(gs.className,wo&&He.markActive)})),Kn.label!=null?C.jsx(Kr,$({"aria-hidden":!0,"data-index":lr},Na,!tu(Kr)&&{markLabelActive:wo},{style:$({},Ll,Na.style),className:je(He.markLabel,Na.className,wo&&He.markLabelActive),children:Kn.label})):null]},lr)}),Re.map((Kn,lr)=>{const Dl=cC(Kn,he,le),Ll=ze[Ke].offset(Dl),wo=qe==="off"?Rbe:Hr;return C.jsx(wo,$({},!tu(wo)&&{valueLabelFormat:ut,valueLabelDisplay:qe,value:typeof ut=="function"?ut(xe(Kn),lr):ut,index:lr,open:_e===lr||Ue===lr||qe==="on",disabled:ce},Id,{children:C.jsx(Yr,$({"data-index":lr},ps,{className:je(He.thumb,ps.className,Ue===lr&&He.active,Fe===lr&&He.focusVisible),style:$({},Ll,Pe(lr),ps.style),children:C.jsx(ui,$({"data-index":lr,"aria-label":se?se(lr):D,"aria-valuenow":xe(Kn),"aria-labelledby":z,"aria-valuetext":J?J(xe(Kn),lr):F,value:Re[lr]},tf))}))}),lr)})]}))}),Obe=Pbe;function Mbe(e){return Ct("MuiSnackbarContent",e)}Rt("MuiSnackbarContent",["root","message","action"]);const kbe=["action","className","message","role"],Dbe=e=>{const{classes:t}=e;return It({root:["root"],action:["action"],message:["message"]},Mbe,t)},Lbe=Ce(yv,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=eue(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}})}),Nbe=Ce("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Bbe=Ce("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),$be=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,u=Ne(r,kbe),c=r,d=Dbe(c);return C.jsxs(Lbe,$({role:a,square:!0,elevation:6,className:je(d.root,o),ownerState:c,ref:n},u,{children:[C.jsx(Nbe,{className:d.message,ownerState:c,children:s}),i?C.jsx(Bbe,{className:d.action,ownerState:c,children:i}):null]}))}),Fbe=$be;function zbe(e){return Ct("MuiSnackbar",e)}Rt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Ube=["onEnter","onExited"],jbe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Hbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${De(n.vertical)}${De(n.horizontal)}`]};return It(r,zbe,t)},bH=Ce("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${De(n.anchorOrigin.vertical)}${De(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"})})}),Wbe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSnackbar"}),i=Dn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:u}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:d,className:h,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:w=dC,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Ne(r.TransitionProps,Ube),I=Ne(r,jbe),R=$({},r,{anchorOrigin:{vertical:a,horizontal:u},autoHideDuration:c,disableWindowBlurListener:v,TransitionComponent:w,transitionDuration:b}),M=Hbe(R),{getRootProps:L,onClickAway:N}=Kpe($({},R)),[H,V]=O.useState(!0),U=ti({elementType:bH,getSlotProps:L,externalForwardedProps:I,ownerState:R,additionalProps:{ref:n},className:[M.root,h]}),D=z=>{V(!0),E&&E(z)},F=(z,G)=>{V(!1),x&&x(z,G)};return!S&&H?null:C.jsx(che,$({onClickAway:N},p,{children:C.jsx(bH,$({},U,{children:C.jsx(w,$({appear:!0,in:S,timeout:b,direction:a==="top"?"down":"up",onEnter:F,onExited:D},A,{children:d||C.jsx(Fbe,$({message:y,action:s},m))}))}))}))}),Gbe=Wbe;function Vbe(e){return Ct("MuiTooltip",e)}const Xbe=Rt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Rf=Xbe,qbe=["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 Ybe(e){return Math.round(e*1e5)/1e5}const Kbe=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${De(o.split("-")[0])}`],arrow:["arrow"]};return It(s,Vbe,t)},Qbe=Ce(rQ,{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"] .${Rf.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Rf.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Rf.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"] .${Rf.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Jbe=Ce("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${De(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:An(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:`${Ybe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Rf.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Rf.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Rf.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Rf.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),Zbe=Ce("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:An(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let T_=!1,UL=null,Pb={x:0,y:0};function A_(e,t){return n=>{t&&t(n),e(n)}}const e1e=O.forwardRef(function(t,n){var r,i,o,s,a,u,c,d,h,p,m,v,y,S,w,b,x,E,A;const I=Pt({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:M,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:V=!1,disableHoverListener:U=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:z=100,enterNextDelay:G=0,enterTouchDelay:W=700,followCursor:K=!1,id:q,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=dC,TransitionProps:xe}=I,ge=Ne(I,qbe),be=O.isValidElement(M)?M:C.jsx("span",{children:M}),Ze=Dn(),qe=Ze.direction==="rtl",[ut,Bt]=O.useState(),[Oe,ze]=O.useState(null),st=O.useRef(!1),mt=D||K,vt=O.useRef(),_e=O.useRef(),Ue=O.useRef(),Ke=O.useRef(),[Fe,Be]=tx({controlled:se,default:!1,name:"Tooltip",state:"open"});let Ot=Fe;const ft=o4(q),Re=O.useRef(),at=O.useCallback(()=>{Re.current!==void 0&&(document.body.style.WebkitUserSelect=Re.current,Re.current=void 0),clearTimeout(Ke.current)},[]);O.useEffect(()=>()=>{clearTimeout(vt.current),clearTimeout(_e.current),clearTimeout(Ue.current),at()},[at]);const $t=Zt=>{clearTimeout(UL),T_=!0,Be(!0),ce&&!Ot&&ce(Zt)},Pe=go(Zt=>{clearTimeout(UL),UL=setTimeout(()=>{T_=!1},800+Q),Be(!1),ue&&Ot&&ue(Zt),clearTimeout(vt.current),vt.current=setTimeout(()=>{st.current=!1},Ze.transitions.duration.shortest)}),He=Zt=>{st.current&&Zt.type!=="touchstart"||(ut&&ut.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(Ue.current),z||T_&&G?_e.current=setTimeout(()=>{$t(Zt)},T_?G:z):$t(Zt))},xt=Zt=>{clearTimeout(_e.current),clearTimeout(Ue.current),Ue.current=setTimeout(()=>{Pe(Zt)},Q)},{isFocusVisibleRef:Gt,onBlur:yn,onFocus:Yr,ref:Hr}=s4(),[,Wr]=O.useState(!1),Kr=Zt=>{yn(Zt),Gt.current===!1&&(Wr(!1),xt(Zt))},ui=Zt=>{ut||Bt(Zt.currentTarget),Yr(Zt),Gt.current===!0&&(Wr(!0),He(Zt))},ds=Zt=>{st.current=!0;const Ir=be.props;Ir.onTouchStart&&Ir.onTouchStart(Zt)},ef=He,ia=xt,wu=Zt=>{ds(Zt),clearTimeout(Ue.current),clearTimeout(vt.current),at(),Re.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ke.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Re.current,He(Zt)},W)},_u=Zt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Zt),at(),clearTimeout(Ue.current),Ue.current=setTimeout(()=>{Pe(Zt)},re)};O.useEffect(()=>{if(!Ot)return;function Zt(Ir){(Ir.key==="Escape"||Ir.key==="Esc")&&Pe(Ir)}return document.addEventListener("keydown",Zt),()=>{document.removeEventListener("keydown",Zt)}},[Pe,Ot]);const Td=Tr(be.ref,Hr,Bt,n);!ve&&ve!==0&&(Ot=!1);const hs=O.useRef(),Ad=Zt=>{const Ir=be.props;Ir.onMouseMove&&Ir.onMouseMove(Zt),Pb={x:Zt.clientX,y:Zt.clientY},hs.current&&hs.current.update()},xo={},Su=typeof ve=="string";H?(xo.title=!Ot&&Su&&!U?ve:null,xo["aria-describedby"]=Ot?ft:null):(xo["aria-label"]=Su?ve:null,xo["aria-labelledby"]=Ot&&!Su?ft:null);const Di=$({},xo,ge,be.props,{className:je(ge.className,be.props.className),onTouchStart:ds,ref:Td},K?{onMouseMove:Ad}:{}),ps={};F||(Di.onTouchStart=wu,Di.onTouchEnd=_u),U||(Di.onMouseOver=A_(ef,Di.onMouseOver),Di.onMouseLeave=A_(ia,Di.onMouseLeave),mt||(ps.onMouseOver=ef,ps.onMouseLeave=ia)),V||(Di.onFocus=A_(ui,Di.onFocus),Di.onBlur=A_(Kr,Di.onBlur),mt||(ps.onFocus=ui,ps.onBlur=Kr));const Id=O.useMemo(()=>{var Zt;let Ir=[{name:"arrow",enabled:!!Oe,options:{element:Oe,padding:4}}];return(Zt=le.popperOptions)!=null&&Zt.modifiers&&(Ir=Ir.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:Ir})},[Oe,le]),gs=$({},I,{isRtl:qe,arrow:R,disableInteractive:mt,placement:J,PopperComponentProp:ae,touch:st.current}),Na=Kbe(gs),tf=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:Qbe,Kn=(o=(s=(a=pe.transition)!=null?a:L.Transition)!=null?s:ye)!=null?o:dC,lr=(u=(c=pe.tooltip)!=null?c:L.Tooltip)!=null?u:Jbe,Dl=(d=(h=pe.arrow)!=null?h:L.Arrow)!=null?d:Zbe,Ll=i1(tf,$({},le,(p=he.popper)!=null?p:N.popper,{className:je(Na.popper,le==null?void 0:le.className,(m=(v=he.popper)!=null?v:N.popper)==null?void 0:m.className)}),gs),wo=i1(Kn,$({},xe,(y=he.transition)!=null?y:N.transition),gs),zv=i1(lr,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:je(Na.tooltip,(w=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:w.className)}),gs),Uv=i1(Dl,$({},(x=he.arrow)!=null?x:N.arrow,{className:je(Na.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),gs);return C.jsxs(O.Fragment,{children:[O.cloneElement(be,Di),C.jsx(tf,$({as:ae??rQ,placement:J,anchorEl:K?{getBoundingClientRect:()=>({top:Pb.y,left:Pb.x,right:Pb.x,bottom:Pb.y,width:0,height:0})}:ut,popperRef:hs,open:ut?Ot:!1,id:ft,transition:!0},ps,Ll,{popperOptions:Id,children:({TransitionProps:Zt})=>C.jsx(Kn,$({timeout:Ze.transitions.duration.shorter},Zt,wo,{children:C.jsxs(lr,$({},zv,{children:[ve,R?C.jsx(Dl,$({},Uv,{ref:ze})):null]}))}))}))]})}),vd=e1e;function t1e(e){return Ct("MuiSwitch",e)}const n1e=Rt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Do=n1e,r1e=["className","color","edge","size","sx"],i1e=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${De(n)}`,`size${De(r)}`],switchBase:["switchBase",`color${De(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=It(a,t1e,t);return $({},t,u)},o1e=Ce("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${De(n.edge)}`],t[`size${De(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,[`& .${Do.thumb}`]:{width:16,height:16},[`& .${Do.switchBase}`]:{padding:4,[`&.${Do.checked}`]:{transform:"translateX(16px)"}}})),s1e=Ce(lQ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Do.input}`]:t.input},n.color!=="default"&&t[`color${De(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}),[`&.${Do.checked}`]:{transform:"translateX(20px)"},[`&.${Do.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Do.checked} + .${Do.track}`]:{opacity:.5},[`&.${Do.disabled} + .${Do.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Do.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:An(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${Do.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})`:An(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Do.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?pv(e.palette[t.color].main,.62):hv(e.palette[t.color].main,.55)}`}},[`&.${Do.checked} + .${Do.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),a1e=Ce("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}`})),l1e=Ce("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%"})),u1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:u}=r,c=Ne(r,r1e),d=$({},r,{color:o,edge:s,size:a}),h=i1e(d),p=C.jsx(l1e,{className:h.thumb,ownerState:d});return C.jsxs(o1e,{className:je(h.root,i),sx:u,ownerState:d,children:[C.jsx(s1e,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:d},c,{classes:$({},h,{root:h.switchBase})})),C.jsx(a1e,{className:h.track,ownerState:d})]})}),Gm=u1e;function c1e(e){return Ct("MuiTab",e)}const f1e=Rt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),zh=f1e,d1e=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],h1e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:u}=e,c={root:["root",o&&s&&"labelIcon",`textColor${De(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return It(c,c1e,t)},p1e=Ce(Yc,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${De(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,[`& > .${zh.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,[`&.${zh.selected}`]:{opacity:1},[`&.${zh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${zh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${zh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${zh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${zh.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)})),g1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:u,iconPosition:c="top",indicator:d,label:h,onChange:p,onClick:m,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:w="inherit",value:b,wrapped:x=!1}=r,E=Ne(r,d1e),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!u,iconPosition:c,label:!!h,fullWidth:a,textColor:w,wrapped:x}),I=h1e(A),R=u&&h&&O.isValidElement(u)?O.cloneElement(u,{className:je(I.iconWrapper,u.props.className)}):u,M=N=>{!y&&p&&p(N,b),m&&m(N)},L=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(p1e,$({focusRipple:!s,className:je(I.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:M,onFocus:L,ownerState:A,tabIndex:y?0:-1},E,{children:[c==="top"||c==="start"?C.jsxs(O.Fragment,{children:[R,h]}):C.jsxs(O.Fragment,{children:[h,R]}),d]}))}),Qg=g1e;function m1e(e){return Ct("MuiToolbar",e)}Rt("MuiToolbar",["root","gutters","regular","dense"]);const v1e=["className","component","disableGutters","variant"],y1e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return It({root:["root",!n&&"gutters",r]},m1e,t)},b1e=Ce("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),x1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,u=Ne(r,v1e),c=$({},r,{component:o,disableGutters:s,variant:a}),d=y1e(c);return C.jsx(b1e,$({as:o,className:je(d.root,i),ref:n,ownerState:c},u))}),w1e=x1e,_1e=zt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),S1e=zt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function E1e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function C1e(e,t,n,r={},i=()=>{}){const{ease:o=E1e,duration:s=300}=r;let a=null;const u=t[e];let c=!1;const d=()=>{c=!0},h=p=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=p);const m=Math.min(1,(p-a)/s);if(t[e]=o(m)*(n-u)+u,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return u===n?(i(new Error("Element already at target position")),d):(requestAnimationFrame(h),d)}const T1e=["onChange"],A1e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function I1e(e){const{onChange:t}=e,n=Ne(e,T1e),r=O.useRef(),i=O.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Uo(()=>{const s=IT(()=>{const u=r.current;o(),u!==r.current&&t(r.current)}),a=Lc(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),O.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:A1e,ref:i},n))}function R1e(e){return Ct("MuiTabScrollButton",e)}const P1e=Rt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),O1e=P1e,M1e=["className","slots","slotProps","direction","orientation","disabled"],k1e=e=>{const{classes:t,orientation:n,disabled:r}=e;return It({root:["root",n,r&&"disabled"]},R1e,t)},D1e=Ce(Yc,{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,[`&.${O1e.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),L1e=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:u={},direction:c}=o,d=Ne(o,M1e),p=Dn().direction==="rtl",m=$({isRtl:p},o),v=k1e(m),y=(r=a.StartScrollButtonIcon)!=null?r:_1e,S=(i=a.EndScrollButtonIcon)!=null?i:S1e,w=ti({elementType:y,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),b=ti({elementType:S,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return C.jsx(D1e,$({component:"div",className:je(v.root,s),ref:n,role:null,ownerState:m,tabIndex:null},d,{children:c==="left"?C.jsx(y,$({},w)):C.jsx(S,$({},b))}))}),N1e=L1e;function B1e(e){return Ct("MuiTabs",e)}const $1e=Rt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),jL=$1e,F1e=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],xH=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,wH=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,I_=(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}}},z1e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:u}=e;return It({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},B1e,u)},U1e=Ce("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jL.scrollButtons}`]:t.scrollButtons},{[`& .${jL.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&&{[`& .${jL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),j1e=Ce("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"})),H1e=Ce("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"})),W1e=Ce("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})),G1e=Ce(I1e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),_H={},V1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTabs"}),i=Dn(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":a,action:u,centered:c=!1,children:d,className:h,component:p="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:w=N1e,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:I={},TabScrollButtonProps:R={},textColor:M="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,V=Ne(r,F1e),U=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",z=D?"top":"left",G=D?"bottom":"right",W=D?"clientHeight":"clientWidth",K=D?"height":"width",q=$({},r,{component:p,allowScrollButtonsMobile:m,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:M,variant:N,visibleScrollbar:H,fixed:!U,hideScrollbar:U&&!H,scrollableX:U&&!D,scrollableY:U&&D,centered:c&&!U,scrollButtonsHideMobile:!m}),Q=z1e(q),re=ti({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:q}),ue=ti({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:q}),[ce,se]=O.useState(!1),[J,ae]=O.useState(_H),[le,he]=O.useState(!1),[pe,ve]=O.useState(!1),[ye,xe]=O.useState(!1),[ge,be]=O.useState({overflow:"hidden",scrollbarWidth:0}),Ze=new Map,qe=O.useRef(null),ut=O.useRef(null),Bt=()=>{const Pe=qe.current;let He;if(Pe){const Gt=Pe.getBoundingClientRect();He={clientWidth:Pe.clientWidth,scrollLeft:Pe.scrollLeft,scrollTop:Pe.scrollTop,scrollLeftNormalized:Ese(Pe,i.direction),scrollWidth:Pe.scrollWidth,top:Gt.top,bottom:Gt.bottom,left:Gt.left,right:Gt.right}}let xt;if(Pe&&L!==!1){const Gt=ut.current.children;if(Gt.length>0){const yn=Gt[Ze.get(L)];xt=yn?yn.getBoundingClientRect():null}}return{tabsMeta:He,tabMeta:xt}},Oe=go(()=>{const{tabsMeta:Pe,tabMeta:He}=Bt();let xt=0,Gt;if(D)Gt="top",He&&Pe&&(xt=He.top-Pe.top+Pe.scrollTop);else if(Gt=o?"right":"left",He&&Pe){const Yr=o?Pe.scrollLeftNormalized+Pe.clientWidth-Pe.scrollWidth:Pe.scrollLeft;xt=(o?-1:1)*(He[Gt]-Pe[Gt]+Yr)}const yn={[Gt]:xt,[K]:He?He[K]:0};if(isNaN(J[Gt])||isNaN(J[K]))ae(yn);else{const Yr=Math.abs(J[Gt]-yn[Gt]),Hr=Math.abs(J[K]-yn[K]);(Yr>=1||Hr>=1)&&ae(yn)}}),ze=(Pe,{animation:He=!0}={})=>{He?C1e(F,qe.current,Pe,{duration:i.transitions.duration.standard}):qe.current[F]=Pe},st=Pe=>{let He=qe.current[F];D?He+=Pe:(He+=Pe*(o?-1:1),He*=o&&sq()==="reverse"?-1:1),ze(He)},mt=()=>{const Pe=qe.current[W];let He=0;const xt=Array.from(ut.current.children);for(let Gt=0;GtPe){Gt===0&&(He=Pe);break}He+=yn[W]}return He},vt=()=>{st(-1*mt())},_e=()=>{st(mt())},Ue=O.useCallback(Pe=>{be({overflow:null,scrollbarWidth:Pe})},[]),Ke=()=>{const Pe={};Pe.scrollbarSizeListener=U?C.jsx(G1e,{onChange:Ue,className:je(Q.scrollableX,Q.hideScrollbar)}):null;const xt=U&&(b==="auto"&&(le||pe)||b===!0);return Pe.scrollButtonStart=xt?C.jsx(w,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:S,direction:o?"right":"left",onClick:vt,disabled:!le},R,{className:je(Q.scrollButtons,R.className)})):null,Pe.scrollButtonEnd=xt?C.jsx(w,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ue},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},R,{className:je(Q.scrollButtons,R.className)})):null,Pe},Fe=go(Pe=>{const{tabsMeta:He,tabMeta:xt}=Bt();if(!(!xt||!He)){if(xt[z]He[G]){const Gt=He[F]+(xt[G]-He[G]);ze(Gt,{animation:Pe})}}}),Be=go(()=>{U&&b!==!1&&xe(!ye)});O.useEffect(()=>{const Pe=IT(()=>{qe.current&&Oe()}),He=Lc(qe.current);He.addEventListener("resize",Pe);let xt;return typeof ResizeObserver<"u"&&(xt=new ResizeObserver(Pe),Array.from(ut.current.children).forEach(Gt=>{xt.observe(Gt)})),()=>{Pe.clear(),He.removeEventListener("resize",Pe),xt&&xt.disconnect()}},[Oe]),O.useEffect(()=>{const Pe=Array.from(ut.current.children),He=Pe.length;if(typeof IntersectionObserver<"u"&&He>0&&U&&b!==!1){const xt=Pe[0],Gt=Pe[He-1],yn={root:qe.current,threshold:.99},Yr=ui=>{he(!ui[0].isIntersecting)},Hr=new IntersectionObserver(Yr,yn);Hr.observe(xt);const Wr=ui=>{ve(!ui[0].isIntersecting)},Kr=new IntersectionObserver(Wr,yn);return Kr.observe(Gt),()=>{Hr.disconnect(),Kr.disconnect()}}},[U,b,ye,d==null?void 0:d.length]),O.useEffect(()=>{se(!0)},[]),O.useEffect(()=>{Oe()}),O.useEffect(()=>{Fe(_H!==J)},[Fe,J]),O.useImperativeHandle(u,()=>({updateIndicator:Oe,updateScrollButtons:Be}),[Oe,Be]);const Ot=C.jsx(W1e,$({},I,{className:je(Q.indicator,I.className),ownerState:q,style:$({},J,I.style)}));let ft=0;const Re=O.Children.map(d,Pe=>{if(!O.isValidElement(Pe))return null;const He=Pe.props.value===void 0?ft:Pe.props.value;Ze.set(He,ft);const xt=He===L;return ft+=1,O.cloneElement(Pe,$({fullWidth:N==="fullWidth",indicator:xt&&!ce&&Ot,selected:xt,selectionFollowsFocus:x,onChange:y,textColor:M,value:He},ft===1&&L===!1&&!Pe.props.tabIndex?{tabIndex:0}:{}))}),at=Pe=>{const He=ut.current,xt=Fr(He).activeElement;if(xt.getAttribute("role")!=="tab")return;let yn=S==="horizontal"?"ArrowLeft":"ArrowUp",Yr=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(yn="ArrowRight",Yr="ArrowLeft"),Pe.key){case yn:Pe.preventDefault(),I_(He,xt,wH);break;case Yr:Pe.preventDefault(),I_(He,xt,xH);break;case"Home":Pe.preventDefault(),I_(He,null,xH);break;case"End":Pe.preventDefault(),I_(He,null,wH);break}},$t=Ke();return C.jsxs(U1e,$({className:je(Q.root,h),ownerState:q,ref:n,as:p},V,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(j1e,{className:Q.scroller,ownerState:q,style:{overflow:ge.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-ge.scrollbarWidth},ref:qe,children:[C.jsx(H1e,{"aria-label":s,"aria-labelledby":a,"aria-orientation":S==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:q,onKeyDown:at,ref:ut,role:"tablist",children:Re}),ce&&Ot]}),$t.scrollButtonEnd]}))}),X1e=V1e;function q1e(e){return Ct("MuiTextField",e)}Rt("MuiTextField",["root"]);const Y1e=["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"],K1e={standard:mQ,filled:dQ,outlined:SQ},Q1e=e=>{const{classes:t}=e;return It({root:["root"]},q1e,t)},J1e=Ce(yve,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:u="primary",defaultValue:c,disabled:d=!1,error:h=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:v,id:y,InputLabelProps:S,inputProps:w,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:I,multiline:R=!1,name:M,onBlur:L,onChange:N,onFocus:H,placeholder:V,required:U=!1,rows:D,select:F=!1,SelectProps:z,type:G,value:W,variant:K="outlined"}=r,q=Ne(r,Y1e),Q=$({},r,{autoFocus:o,color:u,disabled:d,error:h,fullWidth:m,multiline:R,required:U,select:F,variant:K}),re=Q1e(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=o4(y),se=v&&ce?`${ce}-helper-text`:void 0,J=E&&ce?`${ce}-label`:void 0,ae=K1e[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:R,name:M,rows:D,maxRows:A,minRows:I,type:G,value:W,id:ce,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:V,inputProps:w},ue,b));return C.jsxs(J1e,$({className:je(re.root,a),disabled:d,error:h,fullWidth:m,ref:n,required:U,color:u,variant:K,ownerState:Q},q,{children:[E!=null&&E!==""&&C.jsx(r0e,$({htmlFor:ce,id:J},S,{children:E})),F?C.jsx(hbe,$({"aria-describedby":se,id:ce,labelId:J,value:W,input:le},z,{children:s})):le,v&&C.jsx(Dve,$({id:se},p,{children:v}))]}))}),ww=Z1e;var CQ,SH=vv;CQ=SH.createRoot,SH.hydrateRoot;function En({vertical:e,...t}){return C.jsx(gt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const TQ=zt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),exe=zt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),txe=zt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),nxe=zt(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"),rxe=zt(C.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.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-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.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-.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 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"}),"BlurCircularOutlined"),ixe=zt(C.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"}),"BlurOnOutlined"),oxe=zt(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.48 8 15.23 8 15v-4c0-.23.03-.48.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"}),"BugReportOutlined"),sxe=zt(C.jsx("path",{d:"M17 12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5 5-2.24 5-5zm-5 3c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm-7 0H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"}),"CenterFocusStrongOutlined"),axe=zt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),lxe=zt(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"}),"ClearOutlined"),AQ=zt(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"),uxe=zt(C.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"CodeOutlined"),cxe=zt(C.jsx("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"}),"CropFreeOutlined"),fxe=zt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),$A=zt(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"),dxe=zt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),IQ=zt(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"}),"FileOpenOutlined"),hxe=zt(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"),pxe=zt(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"),gxe=zt(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"}),"InfoOutlined"),mxe=zt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),vxe=zt(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"),_w=zt(C.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}),"LayersOutlined"),RQ=zt(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"}),"ListOutlined"),yxe=zt(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"),bxe=zt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),xxe=zt(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"),wxe=zt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),PQ=zt(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"),_xe=zt(C.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined"),Sxe=zt(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.98 0 .33.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"}),"SettingsOutlined"),Exe=zt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Cxe=zt(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),iE=zt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),Txe=zt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Axe=zt(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"),EH=zt(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"),OQ=zt(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"}),"ViewInArOutlined"),Ixe=zt(C.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 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 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-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 7z"}),"VisibilityOutlined"),Rxe=zt(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 pC={exports:{}};/** + `),a0e)),p0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:a,variant:u="indeterminate"}=r,c=Ne(r,o0e),d=$({},r,{color:o,variant:u}),h=u0e(d),p=Ln(),m={},v={bar1:{},bar2:{}};if((u==="determinate"||u==="buffer")&&s!==void 0){m["aria-valuenow"]=Math.round(s),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(u==="buffer"&&a!==void 0){let y=(a||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(c0e,$({className:je(h.root,i),ownerState:d,role:"progressbar"},m,{ref:n},c,{children:[u==="buffer"?C.jsx(f0e,{className:h.dashed,ownerState:d}):null,C.jsx(d0e,{className:h.bar1,ownerState:d,style:v.bar1}),u==="determinate"?null:C.jsx(h0e,{className:h.bar2,ownerState:d,style:v.bar2})]}))}),g0e=p0e,m0e=O.createContext({}),Sa=m0e;function v0e(e){return Ct("MuiList",e)}Rt("MuiList",["root","padding","dense","subheader"]);const y0e=["children","className","component","dense","disablePadding","subheader"],b0e=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return It({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},v0e,t)},x0e=Ce("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})),w0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:u=!1,subheader:c}=r,d=Ne(r,y0e),h=O.useMemo(()=>({dense:a}),[a]),p=$({},r,{component:s,dense:a,disablePadding:u}),m=b0e(p);return C.jsx(Sa.Provider,{value:h,children:C.jsxs(x0e,$({as:s,className:je(m.root,o),ref:n,ownerState:p},d,{children:[c,i]}))})}),Wm=w0e;function _0e(e){return Ct("MuiListItem",e)}const S0e=Rt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Ag=S0e;function E0e(e){return Ct("MuiListItemButton",e)}const C0e=Rt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Ig=C0e,T0e=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],A0e=(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]},I0e=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=It({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},E0e,n);return $({},n,c)},R0e=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:A0e})(({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"}},[`&.${Ig.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ig.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ig.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ig.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ig.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})),P0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:u=!1,disableGutters:c=!1,divider:d=!1,focusVisibleClassName:h,selected:p=!1,className:m}=r,v=Ne(r,T0e),y=O.useContext(Sa),S=O.useMemo(()=>({dense:u||y.dense||!1,alignItems:i,disableGutters:c}),[i,y.dense,u,c]),w=O.useRef(null);Uo(()=>{o&&w.current&&w.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:c,divider:d,selected:p}),x=I0e(b),E=Tr(w,n);return C.jsx(Sa.Provider,{value:S,children:C.jsx(R0e,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:je(x.focusVisible,h),ownerState:b,className:je(x.root,m)},v,{classes:x,children:a}))})}),QF=P0e;function O0e(e){return Ct("MuiListItemSecondaryAction",e)}Rt("MuiListItemSecondaryAction",["root","disableGutters"]);const M0e=["className"],k0e=e=>{const{disableGutters:t,classes:n}=e;return It({root:["root",t&&"disableGutters"]},O0e,n)},L0e=Ce("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})),yQ=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ne(r,M0e),s=O.useContext(Sa),a=$({},r,{disableGutters:s.disableGutters}),u=k0e(a);return C.jsx(L0e,$({className:je(u.root,i),ownerState:a,ref:n},o))});yQ.muiName="ListItemSecondaryAction";const D0e=yQ,N0e=["className"],B0e=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],$0e=(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]},F0e=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:u,hasSecondaryAction:c,selected:d}=e;return It({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",u&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]},_0e,r)},z0e=Ce("div",{name:"MuiListItem",slot:"Root",overridesResolver:$0e})(({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&&{[`& > .${Ig.root}`]:{paddingRight:48}},{[`&.${Ag.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ag.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ag.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ag.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"}},[`&.${Ag.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),U0e=Ce("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),j0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:u,component:c,components:d={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:m}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:w=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:A=!1,slotProps:I={},slots:R={}}=r,M=Ne(r.ContainerProps,N0e),D=Ne(r,B0e),N=O.useContext(Sa),H=O.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),V=O.useRef(null);Uo(()=>{o&&V.current&&V.current.focus()},[o]);const U=O.Children.toArray(a),L=U.length&&WS(U[U.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:w,divider:b,hasSecondaryAction:L,selected:A}),z=F0e(F),G=Tr(V,n),W=R.root||d.Root||z0e,K=I.root||h.root||{},q=$({className:je(z.root,K.className,u),disabled:y},D);let Q=c||"li";return s&&(q.component=c||"div",q.focusVisibleClassName=je(Ag.focusVisible,x),Q=Yc),L?(Q=!q.component&&!c?"div":Q,p==="li"&&(Q==="li"?Q="div":q.component==="li"&&(q.component="div")),C.jsx(Sa.Provider,{value:H,children:C.jsxs(U0e,$({as:p,className:je(z.container,m),ref:G,ownerState:F},M,{children:[C.jsx(W,$({},K,!tu(W)&&{as:Q,ownerState:$({},F,K.ownerState)},q,{children:U})),U.pop()]}))})):C.jsx(Sa.Provider,{value:H,children:C.jsxs(W,$({},K,{as:Q,ref:G},!tu(W)&&{ownerState:$({},F,K.ownerState)},q,{children:[U,E&&C.jsx(D0e,{children:E})]}))})}),N1=j0e;function H0e(e){return Ct("MuiListItemAvatar",e)}Rt("MuiListItemAvatar",["root","alignItemsFlexStart"]);const W0e=["className"],G0e=e=>{const{alignItems:t,classes:n}=e;return It({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},H0e,n)},V0e=Ce("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})),X0e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Ne(r,W0e),s=O.useContext(Sa),a=$({},r,{alignItems:s.alignItems}),u=G0e(a);return C.jsx(V0e,$({className:je(u.root,i),ownerState:a,ref:n},o))}),q0e=X0e;function Y0e(e){return Ct("MuiListItemIcon",e)}const K0e=Rt("MuiListItemIcon",["root","alignItemsFlexStart"]),fH=K0e,Q0e=["className"],J0e=e=>{const{alignItems:t,classes:n}=e;return It({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Y0e,n)},Z0e=Ce("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})),eye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ne(r,Q0e),s=O.useContext(Sa),a=$({},r,{alignItems:s.alignItems}),u=J0e(a);return C.jsx(Z0e,$({className:je(u.root,i),ownerState:a,ref:n},o))}),Gf=eye;function tye(e){return Ct("MuiListItemText",e)}const nye=Rt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),pC=nye,rye=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],iye=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return It({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},tye,t)},oye=Ce("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${pC.primary}`]:t.primary},{[`& .${pC.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})),sye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:u,primaryTypographyProps:c,secondary:d,secondaryTypographyProps:h}=r,p=Ne(r,rye),{dense:m}=O.useContext(Sa);let v=u??i,y=d;const S=$({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!y,dense:m}),w=iye(S);return v!=null&&v.type!==Wt&&!s&&(v=C.jsx(Wt,$({variant:m?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),y!=null&&y.type!==Wt&&!s&&(y=C.jsx(Wt,$({variant:"body2",className:w.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(oye,$({className:je(w.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),ru=sye,aye=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function FD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function dH(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function bQ(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 Ab(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const u=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!bQ(a,o)||u)a=i(e,a,n);else return a.focus(),!0}return!1}const lye=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:u=!1,disableListWrap:c=!1,onKeyDown:d,variant:h="selectedMenu"}=t,p=Ne(t,aye),m=O.useRef(null),v=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Uo(()=>{i&&m.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const A=!m.current.style.width;if(x.clientHeight{const E=m.current,A=x.key,I=Fr(E).activeElement;if(A==="ArrowDown")x.preventDefault(),Ab(E,I,c,u,FD);else if(A==="ArrowUp")x.preventDefault(),Ab(E,I,c,u,dH);else if(A==="Home")x.preventDefault(),Ab(E,null,c,u,FD);else if(A==="End")x.preventDefault(),Ab(E,null,c,u,dH);else if(A.length===1){const R=v.current,M=A.toLowerCase(),D=performance.now();R.keys.length>0&&(D-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&M!==R.keys[0]&&(R.repeating=!1)),R.lastTime=D,R.keys.push(M);const N=I&&!R.repeating&&bQ(I,R);R.previousKeyMatched&&(N||Ab(E,I,!1,u,FD,R))?x.preventDefault():R.previousKeyMatched=!1}d&&d(x)},S=Tr(m,n);let w=-1;O.Children.forEach(s,(x,E)=>{if(!O.isValidElement(x)){w===E&&(w+=1,w>=s.length&&(w=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||w===-1)&&(w=E),w===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(w+=1,w>=s.length&&(w=-1))});const b=O.Children.map(s,(x,E)=>{if(E===w){const A={};return o&&(A.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(A.tabIndex=0),O.cloneElement(x,A)}return x});return C.jsx(Wm,$({role:"menu",ref:S,className:a,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),Mz=lye;function uye(e){return Ct("MuiPopover",e)}Rt("MuiPopover",["root","paper"]);const cye=["onEntering"],fye=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],dye=["slotProps"];function hH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function pH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function gH(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function zD(e){return typeof e=="function"?e():e}const hye=e=>{const{classes:t}=e;return It({root:["root"],paper:["paper"]},uye,t)},pye=Ce(cQ,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xQ=Ce(yv,{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}),gye=O.forwardRef(function(t,n){var r,i,o;const s=Pt({props:t,name:"MuiPopover"}),{action:a,anchorEl:u,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:d,anchorReference:h="anchorEl",children:p,className:m,container:v,elevation:y=8,marginThreshold:S=16,open:w,PaperProps:b={},slots:x,slotProps:E,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:I=hC,transitionDuration:R="auto",TransitionProps:{onEntering:M}={},disableScrollLock:D=!1}=s,N=Ne(s.TransitionProps,cye),H=Ne(s,fye),V=(r=E==null?void 0:E.paper)!=null?r:b,U=O.useRef(),L=Tr(U,V.ref),F=$({},s,{anchorOrigin:c,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:V,transformOrigin:A,TransitionComponent:I,transitionDuration:R,TransitionProps:N}),z=hye(F),G=O.useCallback(()=>{if(h==="anchorPosition")return d;const xe=zD(u),be=(xe&&xe.nodeType===1?xe:Fr(U.current).body).getBoundingClientRect();return{top:be.top+hH(be,c.vertical),left:be.left+pH(be,c.horizontal)}},[u,c.horizontal,c.vertical,d,h]),W=O.useCallback(xe=>({vertical:hH(xe,A.vertical),horizontal:pH(xe,A.horizontal)}),[A.horizontal,A.vertical]),K=O.useCallback(xe=>{const ge={width:xe.offsetWidth,height:xe.offsetHeight},be=W(ge);if(h==="none")return{top:null,left:null,transformOrigin:gH(be)};const Ze=G();let qe=Ze.top-be.vertical,ut=Ze.left-be.horizontal;const Bt=qe+ge.height,Oe=ut+ge.width,ze=Dc(zD(u)),st=ze.innerHeight-S,mt=ze.innerWidth-S;if(S!==null&&qest){const vt=Bt-st;qe-=vt,be.vertical+=vt}if(S!==null&&utmt){const vt=Oe-mt;ut-=vt,be.horizontal+=vt}return{top:`${Math.round(qe)}px`,left:`${Math.round(ut)}px`,transformOrigin:gH(be)}},[u,h,G,W,S]),[q,Q]=O.useState(w),re=O.useCallback(()=>{const xe=U.current;if(!xe)return;const ge=K(xe);ge.top!==null&&(xe.style.top=ge.top),ge.left!==null&&(xe.style.left=ge.left),xe.style.transformOrigin=ge.transformOrigin,Q(!0)},[K]);O.useEffect(()=>(D&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[u,D,re]);const ue=(xe,ge)=>{M&&M(xe,ge),re()},ce=()=>{Q(!1)};O.useEffect(()=>{w&&re()}),O.useImperativeHandle(a,()=>w?{updatePosition:()=>{re()}}:null,[w,re]),O.useEffect(()=>{if(!w)return;const xe=IT(()=>{re()}),ge=Dc(u);return ge.addEventListener("resize",xe),()=>{xe.clear(),ge.removeEventListener("resize",xe)}},[u,w,re]);let se=R;R==="auto"&&!I.muiSupportAuto&&(se=void 0);const J=v||(u?Fr(zD(u)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:pye,le=(o=x==null?void 0:x.paper)!=null?o:xQ,he=ti({elementType:le,externalSlotProps:$({},V,{style:q?V.style:$({},V.style,{opacity:0})}),additionalProps:{elevation:y,ref:L},ownerState:F,className:je(z.paper,V==null?void 0:V.className)}),pe=ti({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:J,open:w},ownerState:F,className:je(z.root,m)}),{slotProps:ve}=pe,ye=Ne(pe,dye);return C.jsx(ae,$({},ye,!tu(ae)&&{slotProps:ve,disableScrollLock:D},{children:C.jsx(I,$({appear:!0,in:w,onEntering:ue,onExited:ce,timeout:se},N,{children:C.jsx(le,$({},he,{children:p}))}))}))}),mye=gye;function vye(e){return Ct("MuiMenu",e)}Rt("MuiMenu",["root","paper","list"]);const yye=["onEntering"],bye=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],xye={vertical:"top",horizontal:"right"},wye={vertical:"top",horizontal:"left"},_ye=e=>{const{classes:t}=e;return It({root:["root"],paper:["paper"],list:["list"]},vye,t)},Sye=Ce(mye,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Eye=Ce(xQ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Cye=Ce(Mz,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Tye=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:u,disableAutoFocusItem:c=!1,MenuListProps:d={},onClose:h,open:p,PaperProps:m={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:w="selectedMenu",slots:b={},slotProps:x={}}=o,E=Ne(o.TransitionProps,yye),A=Ne(o,bye),I=Ln(),R=I.direction==="rtl",M=$({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:d,onEntering:S,PaperProps:m,transitionDuration:y,TransitionProps:E,variant:w}),D=_ye(M),N=s&&!c&&p,H=O.useRef(null),V=(K,q)=>{H.current&&H.current.adjustStyleForScrollbar(K,I),S&&S(K,q)},U=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let L=-1;O.Children.map(a,(K,q)=>{O.isValidElement(K)&&(K.props.disabled||(w==="selectedMenu"&&K.props.selected||L===-1)&&(L=q))});const F=(r=b.paper)!=null?r:Eye,z=(i=x.paper)!=null?i:m,G=ti({elementType:b.root,externalSlotProps:x.root,ownerState:M,className:[D.root,u]}),W=ti({elementType:F,externalSlotProps:z,ownerState:M,className:D.paper});return C.jsx(Sye,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?xye:wye,slots:{paper:F,root:b.root},slotProps:{root:G,paper:W},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:V},E),ownerState:M},A,{classes:v,children:C.jsx(Cye,$({onKeyDown:U,actions:H,autoFocus:s&&(L===-1||c),autoFocusItem:N,variant:w},d,{className:je(D.list,d.className),children:a}))}))}),xv=Tye;function Aye(e){return Ct("MuiMenuItem",e)}const Iye=Rt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ib=Iye,Rye=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Pye=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Oye=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,u=It({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Aye,s);return $({},s,u)},Mye=Ce(Yc,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Pye})(({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"}},[`&.${Ib.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:An(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ib.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:An(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ib.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:An(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})`:An(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ib.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ib.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${nH.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${nH.inset}`]:{marginLeft:52},[`& .${pC.root}`]:{marginTop:0,marginBottom:0},[`& .${pC.inset}`]:{paddingLeft:36},[`& .${fH.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${fH.root} svg`]:{fontSize:"1.25rem"}}))),kye=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:u=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:h,className:p}=r,m=Ne(r,Rye),v=O.useContext(Sa),y=O.useMemo(()=>({dense:s||v.dense||!1,disableGutters:u}),[v.dense,s,u]),S=O.useRef(null);Uo(()=>{i&&S.current&&S.current.focus()},[i]);const w=$({},r,{dense:y.dense,divider:a,disableGutters:u}),b=Oye(r),x=Tr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(Sa.Provider,{value:y,children:C.jsx(Mye,$({ref:x,role:d,tabIndex:E,component:o,focusVisibleClassName:je(b.focusVisible,c),className:je(b.root,p)},m,{ownerState:w,classes:b}))})}),Vf=kye;function Lye(e){return Ct("MuiNativeSelect",e)}const Dye=Rt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),kz=Dye,Nye=["className","disabled","error","IconComponent","inputRef","variant"],Bye=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Le(n)}`,o&&"iconOpen",r&&"disabled"]};return It(a,Lye,t)},wQ=({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"},[`&.${kz.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}}),$ye=Ce("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ka,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${kz.multiple}`]:t.multiple}]}})(wQ),_Q=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${kz.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Fye=Ce("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Le(n.variant)}`],n.open&&t.iconOpen]}})(_Q),zye=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:u="standard"}=t,c=Ne(t,Nye),d=$({},t,{disabled:i,variant:u,error:o}),h=Bye(d);return C.jsxs(O.Fragment,{children:[C.jsx($ye,$({ownerState:d,className:je(h.select,r),disabled:i,ref:a||n},c)),t.multiple?null:C.jsx(Fye,{as:s,ownerState:d,className:h.icon})]})}),Uye=zye;var mH;const jye=["children","classes","className","label","notched"],Hye=Ce("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%"}),Wye=Ce("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 Gye(e){const{className:t,label:n,notched:r}=e,i=Ne(e,jye),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(Hye,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(Wye,{ownerState:s,children:o?C.jsx("span",{children:n}):mH||(mH=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const Vye=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Xye=e=>{const{classes:t}=e,r=It({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yge,t);return $({},t,r)},qye=Ce(kA,{shouldForwardProp:e=>ka(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:OA})(({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 .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${rf.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${rf.focused} .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${rf.error} .${rf.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${rf.disabled} .${rf.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"}))}),Yye=Ce(Gye,{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}}),Kye=Ce(LA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:MA})(({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})),SQ=O.forwardRef(function(t,n){var r,i,o,s,a;const u=Pt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:d=!1,inputComponent:h="input",label:p,multiline:m=!1,notched:v,slots:y={},type:S="text"}=u,w=Ne(u,Vye),b=Xye(u),x=md(),E=Zp({props:u,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},u,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:d,hiddenLabel:E.hiddenLabel,multiline:m,size:E.size,type:S}),I=(r=(i=y.root)!=null?i:c.Root)!=null?r:qye,R=(o=(s=y.input)!=null?s:c.Input)!=null?o:Kye;return C.jsx(DA,$({slots:{root:I,input:R},renderSuffix:M=>C.jsx(Yye,{ownerState:A,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?a||(a=C.jsxs(O.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:d,inputComponent:h,multiline:m,ref:n,type:S},w,{classes:$({},b,{notchedOutline:null})}))});SQ.muiName="Input";const EQ=SQ;function Qye(e){return Ct("MuiSelect",e)}const Jye=Rt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Rb=Jye;var vH;const Zye=["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"],ebe=Ce("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Rb.select}`]:t.select},{[`&.${Rb.select}`]:t[n.variant]},{[`&.${Rb.error}`]:t.error},{[`&.${Rb.multiple}`]:t.multiple}]}})(wQ,{[`&.${Rb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tbe=Ce("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Le(n.variant)}`],n.open&&t.iconOpen]}})(_Q),nbe=Ce("input",{shouldForwardProp:e=>T4(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 yH(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function rbe(e){return e==null||typeof e=="string"&&!e.trim()}const ibe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Le(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return It(a,Qye,t)},obe=O.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:u,className:c,defaultOpen:d,defaultValue:h,disabled:p,displayEmpty:m,error:v=!1,IconComponent:y,inputRef:S,labelId:w,MenuProps:b={},multiple:x,name:E,onBlur:A,onChange:I,onClose:R,onFocus:M,onOpen:D,open:N,readOnly:H,renderValue:V,SelectDisplayProps:U={},tabIndex:L,value:F,variant:z="standard"}=t,G=Ne(t,Zye),[W,K]=tx({controlled:F,default:h,name:"Select"}),[q,Q]=tx({controlled:N,default:d,name:"Select"}),re=O.useRef(null),ue=O.useRef(null),[ce,se]=O.useState(null),{current:J}=O.useRef(N!=null),[ae,le]=O.useState(),he=Tr(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(()=>{d&&q&&ce&&!J&&(le(a?null:ve.clientWidth),ue.current.focus())},[ce,a]),O.useEffect(()=>{s&&ue.current.focus()},[s]),O.useEffect(()=>{if(!w)return;const Re=Fr(ue.current).getElementById(w);if(Re){const at=()=>{getSelection().isCollapsed&&ue.current.focus()};return Re.addEventListener("click",at),()=>{Re.removeEventListener("click",at)}}},[w]);const ye=(Re,at)=>{Re?D&&D(at):R&&R(at),J||(le(a?null:ve.clientWidth),Q(Re))},xe=Re=>{Re.button===0&&(Re.preventDefault(),ue.current.focus(),ye(!0,Re))},ge=Re=>{ye(!1,Re)},be=O.Children.toArray(u),Ze=Re=>{const at=be.find($t=>$t.props.value===Re.target.value);at!==void 0&&(K(at.props.value),I&&I(Re,at))},qe=Re=>at=>{let $t;if(at.currentTarget.hasAttribute("tabindex")){if(x){$t=Array.isArray(W)?W.slice():[];const Pe=W.indexOf(Re.props.value);Pe===-1?$t.push(Re.props.value):$t.splice(Pe,1)}else $t=Re.props.value;if(Re.props.onClick&&Re.props.onClick(at),W!==$t&&(K($t),I)){const Pe=at.nativeEvent||at,He=new Pe.constructor(Pe.type,Pe);Object.defineProperty(He,"target",{writable:!0,value:{value:$t,name:E}}),I(He,Re)}x||ye(!1,at)}},ut=Re=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Re.key)!==-1&&(Re.preventDefault(),ye(!0,Re))},Bt=ce!==null&&q,Oe=Re=>{!Bt&&A&&(Object.defineProperty(Re,"target",{writable:!0,value:{value:W,name:E}}),A(Re))};delete G["aria-invalid"];let ze,st;const mt=[];let vt=!1;(dC({value:W})||m)&&(V?ze=V(W):vt=!0);const _e=be.map(Re=>{if(!O.isValidElement(Re))return null;let at;if(x){if(!Array.isArray(W))throw new Error(ed(2));at=W.some($t=>yH($t,Re.props.value)),at&&vt&&mt.push(Re.props.children)}else at=yH(W,Re.props.value),at&&vt&&(st=Re.props.children);return O.cloneElement(Re,{"aria-selected":at?"true":"false",onClick:qe(Re),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),Re.props.onKeyUp&&Re.props.onKeyUp($t)},role:"option",selected:at,value:void 0,"data-value":Re.props.value})});vt&&(x?mt.length===0?ze=null:ze=mt.reduce((Re,at,$t)=>(Re.push(at),$t{const{classes:t}=e;return t},Lz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ka(e)&&e!=="variant",slot:"Root"},cbe=Ce(vQ,Lz)(""),fbe=Ce(EQ,Lz)(""),dbe=Ce(hQ,Lz)(""),CQ=O.forwardRef(function(t,n){const r=Pt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:u=!1,displayEmpty:c=!1,IconComponent:d=_ge,id:h,input:p,inputProps:m,label:v,labelId:y,MenuProps:S,multiple:w=!1,native:b=!1,onClose:x,onOpen:E,open:A,renderValue:I,SelectDisplayProps:R,variant:M="outlined"}=r,D=Ne(r,abe),N=b?Uye:sbe,H=md(),V=Zp({props:r,muiFormControl:H,states:["variant","error"]}),U=V.variant||M,L=$({},r,{variant:U,classes:s}),F=ube(L),z=Ne(F,lbe),G=p||{standard:C.jsx(cbe,{ownerState:L}),outlined:C.jsx(fbe,{label:v,ownerState:L}),filled:C.jsx(dbe,{ownerState:L})}[U],W=Tr(n,G.ref);return C.jsx(O.Fragment,{children:O.cloneElement(G,$({inputComponent:N,inputProps:$({children:o,error:V.error,IconComponent:d,variant:U,type:void 0,multiple:w},b?{id:h}:{autoWidth:i,defaultOpen:u,displayEmpty:c,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:A,renderValue:I,SelectDisplayProps:$({id:h},R)},m,{classes:m?ts(z,m.classes):z},p?p.props.inputProps:{})},w&&b&&U==="outlined"?{notched:!0}:{},{ref:W,className:je(G.props.className,a,F.root)},!p&&{variant:U},D))})});CQ.muiName="Select";const hbe=CQ,pbe=e=>!e||!tu(e),gbe=pbe;function mbe(e){return Ct("MuiSlider",e)}const vbe=Rt("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"]),ml=vbe,ybe=e=>{const{open:t}=e;return{offset:je(t&&ml.valueLabelOpen),circle:ml.valueLabelCircle,label:ml.valueLabelLabel}};function bbe(e){const{children:t,className:n,value:r}=e,i=ybe(e);return t?O.cloneElement(t,{className:je(t.props.className)},C.jsxs(O.Fragment,{children:[t.props.children,C.jsx("span",{className:je(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const xbe=["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 bH(e){return e}const wbe=Ce("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Le(n.color)}`],n.size!=="medium"&&t[`size${Le(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"},[`&.${ml.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${ml.dragging}`]:{[`& .${ml.thumb}, & .${ml.track}`]:{transition:"none"}}})),_be=Ce("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})),Sbe=Ce("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?pv(e.palette[t.color].main,.62):hv(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})}),Ebe=Ce("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Le(n.color)}`],n.size!=="medium"&&t[`thumbSize${Le(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, &.${ml.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:An(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${ml.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:An(e.palette[t.color].main,.16)}`},[`&.${ml.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Cbe=Ce(bbe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${ml.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"})),Tbe=Ce("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>T4(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})),Abe=Ce("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>T4(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})),Ibe=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:u}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${Le(a)}`,u&&`size${Le(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Le(u)}`,a&&`thumbColor${Le(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return It(c,mbe,s)},Rbe=({children:e})=>e,Pbe=O.forwardRef(function(t,n){var r,i,o,s,a,u,c,d,h,p,m,v,y,S,w,b,x,E,A,I,R,M,D,N;const H=Pt({props:t,name:"MuiSlider"}),U=Ln().direction==="rtl",{"aria-label":L,"aria-valuetext":F,"aria-labelledby":z,component:G="span",components:W={},componentsProps:K={},color:q="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:xe=bH,slotProps:ge,slots:be,track:Ze="normal",valueLabelDisplay:qe="off",valueLabelFormat:ut=bH}=H,Bt=Ne(H,xbe),Oe=$({},H,{isRtl:U,max:le,min:he,classes:Q,disabled:ce,disableSwap:ue,orientation:pe,marks:ae,color:q,size:ve,step:ye,scale:xe,track:Ze,valueLabelDisplay:qe,valueLabelFormat:ut}),{axisProps:ze,getRootProps:st,getHiddenInputProps:mt,getThumbProps:vt,open:_e,active:Ue,axis:Ke,focusedThumbIndex:Fe,range:Be,dragging:Ot,marks:ft,values:Re,trackOffset:at,trackLeap:$t,getThumbStyle:Pe}=Ype($({},Oe,{rootRef:n}));Oe.marked=ft.length>0&&ft.some(Kn=>Kn.label),Oe.dragging=Ot,Oe.focusedThumbIndex=Fe;const He=Ibe(Oe),xt=(r=(i=be==null?void 0:be.root)!=null?i:W.Root)!=null?r:wbe,Gt=(o=(s=be==null?void 0:be.rail)!=null?s:W.Rail)!=null?o:_be,yn=(a=(u=be==null?void 0:be.track)!=null?u:W.Track)!=null?a:Sbe,Yr=(c=(d=be==null?void 0:be.thumb)!=null?d:W.Thumb)!=null?c:Ebe,Hr=(h=(p=be==null?void 0:be.valueLabel)!=null?p:W.ValueLabel)!=null?h:Cbe,Wr=(m=(v=be==null?void 0:be.mark)!=null?v:W.Mark)!=null?m:Tbe,Kr=(y=(S=be==null?void 0:be.markLabel)!=null?S:W.MarkLabel)!=null?y:Abe,ui=(w=(b=be==null?void 0:be.input)!=null?b:W.Input)!=null?w:"input",ds=(x=ge==null?void 0:ge.root)!=null?x:K.root,ef=(E=ge==null?void 0:ge.rail)!=null?E:K.rail,ia=(A=ge==null?void 0:ge.track)!=null?A:K.track,wu=(I=ge==null?void 0:ge.thumb)!=null?I:K.thumb,_u=(R=ge==null?void 0:ge.valueLabel)!=null?R:K.valueLabel,Td=(M=ge==null?void 0:ge.mark)!=null?M:K.mark,hs=(D=ge==null?void 0:ge.markLabel)!=null?D:K.markLabel,Ad=(N=ge==null?void 0:ge.input)!=null?N:K.input,xo=ti({elementType:xt,getSlotProps:st,externalSlotProps:ds,externalForwardedProps:Bt,additionalProps:$({},gbe(xt)&&{as:G}),ownerState:$({},Oe,ds==null?void 0:ds.ownerState),className:[He.root,re]}),Su=ti({elementType:Gt,externalSlotProps:ef,ownerState:Oe,className:He.rail}),Li=ti({elementType:yn,externalSlotProps:ia,additionalProps:{style:$({},ze[Ke].offset(at),ze[Ke].leap($t))},ownerState:$({},Oe,ia==null?void 0:ia.ownerState),className:He.track}),ps=ti({elementType:Yr,getSlotProps:vt,externalSlotProps:wu,ownerState:$({},Oe,wu==null?void 0:wu.ownerState),className:He.thumb}),Id=ti({elementType:Hr,externalSlotProps:_u,ownerState:$({},Oe,_u==null?void 0:_u.ownerState),className:He.valueLabel}),gs=ti({elementType:Wr,externalSlotProps:Td,ownerState:Oe,className:He.mark}),Na=ti({elementType:Kr,externalSlotProps:hs,ownerState:Oe,className:He.markLabel}),tf=ti({elementType:ui,getSlotProps:mt,externalSlotProps:Ad,ownerState:Oe});return C.jsxs(xt,$({},xo,{children:[C.jsx(Gt,$({},Su)),C.jsx(yn,$({},Li)),ft.filter(Kn=>Kn.value>=he&&Kn.value<=le).map((Kn,lr)=>{const Ll=fC(Kn.value,he,le),Dl=ze[Ke].offset(Ll);let wo;return Ze===!1?wo=Re.indexOf(Kn.value)!==-1:wo=Ze==="normal"&&(Be?Kn.value>=Re[0]&&Kn.value<=Re[Re.length-1]:Kn.value<=Re[0])||Ze==="inverted"&&(Be?Kn.value<=Re[0]||Kn.value>=Re[Re.length-1]:Kn.value>=Re[0]),C.jsxs(O.Fragment,{children:[C.jsx(Wr,$({"data-index":lr},gs,!tu(Wr)&&{markActive:wo},{style:$({},Dl,gs.style),className:je(gs.className,wo&&He.markActive)})),Kn.label!=null?C.jsx(Kr,$({"aria-hidden":!0,"data-index":lr},Na,!tu(Kr)&&{markLabelActive:wo},{style:$({},Dl,Na.style),className:je(He.markLabel,Na.className,wo&&He.markLabelActive),children:Kn.label})):null]},lr)}),Re.map((Kn,lr)=>{const Ll=fC(Kn,he,le),Dl=ze[Ke].offset(Ll),wo=qe==="off"?Rbe:Hr;return C.jsx(wo,$({},!tu(wo)&&{valueLabelFormat:ut,valueLabelDisplay:qe,value:typeof ut=="function"?ut(xe(Kn),lr):ut,index:lr,open:_e===lr||Ue===lr||qe==="on",disabled:ce},Id,{children:C.jsx(Yr,$({"data-index":lr},ps,{className:je(He.thumb,ps.className,Ue===lr&&He.active,Fe===lr&&He.focusVisible),style:$({},Dl,Pe(lr),ps.style),children:C.jsx(ui,$({"data-index":lr,"aria-label":se?se(lr):L,"aria-valuenow":xe(Kn),"aria-labelledby":z,"aria-valuetext":J?J(xe(Kn),lr):F,value:Re[lr]},tf))}))}),lr)})]}))}),Obe=Pbe;function Mbe(e){return Ct("MuiSnackbarContent",e)}Rt("MuiSnackbarContent",["root","message","action"]);const kbe=["action","className","message","role"],Lbe=e=>{const{classes:t}=e;return It({root:["root"],action:["action"],message:["message"]},Mbe,t)},Dbe=Ce(yv,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=eue(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}})}),Nbe=Ce("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Bbe=Ce("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),$be=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,u=Ne(r,kbe),c=r,d=Lbe(c);return C.jsxs(Dbe,$({role:a,square:!0,elevation:6,className:je(d.root,o),ownerState:c,ref:n},u,{children:[C.jsx(Nbe,{className:d.message,ownerState:c,children:s}),i?C.jsx(Bbe,{className:d.action,ownerState:c,children:i}):null]}))}),Fbe=$be;function zbe(e){return Ct("MuiSnackbar",e)}Rt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Ube=["onEnter","onExited"],jbe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Hbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Le(n.vertical)}${Le(n.horizontal)}`]};return It(r,zbe,t)},xH=Ce("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Le(n.anchorOrigin.vertical)}${Le(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"})})}),Wbe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSnackbar"}),i=Ln(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:u}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:d,className:h,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:w=hC,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Ne(r.TransitionProps,Ube),I=Ne(r,jbe),R=$({},r,{anchorOrigin:{vertical:a,horizontal:u},autoHideDuration:c,disableWindowBlurListener:v,TransitionComponent:w,transitionDuration:b}),M=Hbe(R),{getRootProps:D,onClickAway:N}=Kpe($({},R)),[H,V]=O.useState(!0),U=ti({elementType:xH,getSlotProps:D,externalForwardedProps:I,ownerState:R,additionalProps:{ref:n},className:[M.root,h]}),L=z=>{V(!0),E&&E(z)},F=(z,G)=>{V(!1),x&&x(z,G)};return!S&&H?null:C.jsx(che,$({onClickAway:N},p,{children:C.jsx(xH,$({},U,{children:C.jsx(w,$({appear:!0,in:S,timeout:b,direction:a==="top"?"down":"up",onEnter:F,onExited:L},A,{children:d||C.jsx(Fbe,$({message:y,action:s},m))}))}))}))}),Gbe=Wbe;function Vbe(e){return Ct("MuiTooltip",e)}const Xbe=Rt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Rf=Xbe,qbe=["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 Ybe(e){return Math.round(e*1e5)/1e5}const Kbe=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${Le(o.split("-")[0])}`],arrow:["arrow"]};return It(s,Vbe,t)},Qbe=Ce(iQ,{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"] .${Rf.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Rf.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Rf.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"] .${Rf.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Jbe=Ce("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${Le(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:An(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:`${Ybe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Rf.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Rf.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Rf.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Rf.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),Zbe=Ce("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:An(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let A_=!1,UD=null,Pb={x:0,y:0};function I_(e,t){return n=>{t&&t(n),e(n)}}const e1e=O.forwardRef(function(t,n){var r,i,o,s,a,u,c,d,h,p,m,v,y,S,w,b,x,E,A;const I=Pt({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:M,components:D={},componentsProps:N={},describeChild:H=!1,disableFocusListener:V=!1,disableHoverListener:U=!1,disableInteractive:L=!1,disableTouchListener:F=!1,enterDelay:z=100,enterNextDelay:G=0,enterTouchDelay:W=700,followCursor:K=!1,id:q,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=hC,TransitionProps:xe}=I,ge=Ne(I,qbe),be=O.isValidElement(M)?M:C.jsx("span",{children:M}),Ze=Ln(),qe=Ze.direction==="rtl",[ut,Bt]=O.useState(),[Oe,ze]=O.useState(null),st=O.useRef(!1),mt=L||K,vt=O.useRef(),_e=O.useRef(),Ue=O.useRef(),Ke=O.useRef(),[Fe,Be]=tx({controlled:se,default:!1,name:"Tooltip",state:"open"});let Ot=Fe;const ft=s4(q),Re=O.useRef(),at=O.useCallback(()=>{Re.current!==void 0&&(document.body.style.WebkitUserSelect=Re.current,Re.current=void 0),clearTimeout(Ke.current)},[]);O.useEffect(()=>()=>{clearTimeout(vt.current),clearTimeout(_e.current),clearTimeout(Ue.current),at()},[at]);const $t=Zt=>{clearTimeout(UD),A_=!0,Be(!0),ce&&!Ot&&ce(Zt)},Pe=go(Zt=>{clearTimeout(UD),UD=setTimeout(()=>{A_=!1},800+Q),Be(!1),ue&&Ot&&ue(Zt),clearTimeout(vt.current),vt.current=setTimeout(()=>{st.current=!1},Ze.transitions.duration.shortest)}),He=Zt=>{st.current&&Zt.type!=="touchstart"||(ut&&ut.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(Ue.current),z||A_&&G?_e.current=setTimeout(()=>{$t(Zt)},A_?G:z):$t(Zt))},xt=Zt=>{clearTimeout(_e.current),clearTimeout(Ue.current),Ue.current=setTimeout(()=>{Pe(Zt)},Q)},{isFocusVisibleRef:Gt,onBlur:yn,onFocus:Yr,ref:Hr}=a4(),[,Wr]=O.useState(!1),Kr=Zt=>{yn(Zt),Gt.current===!1&&(Wr(!1),xt(Zt))},ui=Zt=>{ut||Bt(Zt.currentTarget),Yr(Zt),Gt.current===!0&&(Wr(!0),He(Zt))},ds=Zt=>{st.current=!0;const Ir=be.props;Ir.onTouchStart&&Ir.onTouchStart(Zt)},ef=He,ia=xt,wu=Zt=>{ds(Zt),clearTimeout(Ue.current),clearTimeout(vt.current),at(),Re.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ke.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Re.current,He(Zt)},W)},_u=Zt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Zt),at(),clearTimeout(Ue.current),Ue.current=setTimeout(()=>{Pe(Zt)},re)};O.useEffect(()=>{if(!Ot)return;function Zt(Ir){(Ir.key==="Escape"||Ir.key==="Esc")&&Pe(Ir)}return document.addEventListener("keydown",Zt),()=>{document.removeEventListener("keydown",Zt)}},[Pe,Ot]);const Td=Tr(be.ref,Hr,Bt,n);!ve&&ve!==0&&(Ot=!1);const hs=O.useRef(),Ad=Zt=>{const Ir=be.props;Ir.onMouseMove&&Ir.onMouseMove(Zt),Pb={x:Zt.clientX,y:Zt.clientY},hs.current&&hs.current.update()},xo={},Su=typeof ve=="string";H?(xo.title=!Ot&&Su&&!U?ve:null,xo["aria-describedby"]=Ot?ft:null):(xo["aria-label"]=Su?ve:null,xo["aria-labelledby"]=Ot&&!Su?ft:null);const Li=$({},xo,ge,be.props,{className:je(ge.className,be.props.className),onTouchStart:ds,ref:Td},K?{onMouseMove:Ad}:{}),ps={};F||(Li.onTouchStart=wu,Li.onTouchEnd=_u),U||(Li.onMouseOver=I_(ef,Li.onMouseOver),Li.onMouseLeave=I_(ia,Li.onMouseLeave),mt||(ps.onMouseOver=ef,ps.onMouseLeave=ia)),V||(Li.onFocus=I_(ui,Li.onFocus),Li.onBlur=I_(Kr,Li.onBlur),mt||(ps.onFocus=ui,ps.onBlur=Kr));const Id=O.useMemo(()=>{var Zt;let Ir=[{name:"arrow",enabled:!!Oe,options:{element:Oe,padding:4}}];return(Zt=le.popperOptions)!=null&&Zt.modifiers&&(Ir=Ir.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:Ir})},[Oe,le]),gs=$({},I,{isRtl:qe,arrow:R,disableInteractive:mt,placement:J,PopperComponentProp:ae,touch:st.current}),Na=Kbe(gs),tf=(r=(i=pe.popper)!=null?i:D.Popper)!=null?r:Qbe,Kn=(o=(s=(a=pe.transition)!=null?a:D.Transition)!=null?s:ye)!=null?o:hC,lr=(u=(c=pe.tooltip)!=null?c:D.Tooltip)!=null?u:Jbe,Ll=(d=(h=pe.arrow)!=null?h:D.Arrow)!=null?d:Zbe,Dl=i1(tf,$({},le,(p=he.popper)!=null?p:N.popper,{className:je(Na.popper,le==null?void 0:le.className,(m=(v=he.popper)!=null?v:N.popper)==null?void 0:m.className)}),gs),wo=i1(Kn,$({},xe,(y=he.transition)!=null?y:N.transition),gs),zv=i1(lr,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:je(Na.tooltip,(w=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:w.className)}),gs),Uv=i1(Ll,$({},(x=he.arrow)!=null?x:N.arrow,{className:je(Na.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),gs);return C.jsxs(O.Fragment,{children:[O.cloneElement(be,Li),C.jsx(tf,$({as:ae??iQ,placement:J,anchorEl:K?{getBoundingClientRect:()=>({top:Pb.y,left:Pb.x,right:Pb.x,bottom:Pb.y,width:0,height:0})}:ut,popperRef:hs,open:ut?Ot:!1,id:ft,transition:!0},ps,Dl,{popperOptions:Id,children:({TransitionProps:Zt})=>C.jsx(Kn,$({timeout:Ze.transitions.duration.shorter},Zt,wo,{children:C.jsxs(lr,$({},zv,{children:[ve,R?C.jsx(Ll,$({},Uv,{ref:ze})):null]}))}))}))]})}),vd=e1e;function t1e(e){return Ct("MuiSwitch",e)}const n1e=Rt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Lo=n1e,r1e=["className","color","edge","size","sx"],i1e=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${Le(n)}`,`size${Le(r)}`],switchBase:["switchBase",`color${Le(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=It(a,t1e,t);return $({},t,u)},o1e=Ce("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Le(n.edge)}`],t[`size${Le(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,[`& .${Lo.thumb}`]:{width:16,height:16},[`& .${Lo.switchBase}`]:{padding:4,[`&.${Lo.checked}`]:{transform:"translateX(16px)"}}})),s1e=Ce(uQ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Lo.input}`]:t.input},n.color!=="default"&&t[`color${Le(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}),[`&.${Lo.checked}`]:{transform:"translateX(20px)"},[`&.${Lo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Lo.checked} + .${Lo.track}`]:{opacity:.5},[`&.${Lo.disabled} + .${Lo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Lo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:An(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${Lo.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})`:An(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Lo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?pv(e.palette[t.color].main,.62):hv(e.palette[t.color].main,.55)}`}},[`&.${Lo.checked} + .${Lo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),a1e=Ce("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}`})),l1e=Ce("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%"})),u1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:u}=r,c=Ne(r,r1e),d=$({},r,{color:o,edge:s,size:a}),h=i1e(d),p=C.jsx(l1e,{className:h.thumb,ownerState:d});return C.jsxs(o1e,{className:je(h.root,i),sx:u,ownerState:d,children:[C.jsx(s1e,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:d},c,{classes:$({},h,{root:h.switchBase})})),C.jsx(a1e,{className:h.track,ownerState:d})]})}),Gm=u1e;function c1e(e){return Ct("MuiTab",e)}const f1e=Rt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),zh=f1e,d1e=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],h1e=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:u}=e,c={root:["root",o&&s&&"labelIcon",`textColor${Le(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return It(c,c1e,t)},p1e=Ce(Yc,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Le(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,[`& > .${zh.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,[`&.${zh.selected}`]:{opacity:1},[`&.${zh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${zh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${zh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${zh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${zh.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)})),g1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:u,iconPosition:c="top",indicator:d,label:h,onChange:p,onClick:m,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:w="inherit",value:b,wrapped:x=!1}=r,E=Ne(r,d1e),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!u,iconPosition:c,label:!!h,fullWidth:a,textColor:w,wrapped:x}),I=h1e(A),R=u&&h&&O.isValidElement(u)?O.cloneElement(u,{className:je(I.iconWrapper,u.props.className)}):u,M=N=>{!y&&p&&p(N,b),m&&m(N)},D=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(p1e,$({focusRipple:!s,className:je(I.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:M,onFocus:D,ownerState:A,tabIndex:y?0:-1},E,{children:[c==="top"||c==="start"?C.jsxs(O.Fragment,{children:[R,h]}):C.jsxs(O.Fragment,{children:[h,R]}),d]}))}),Qg=g1e;function m1e(e){return Ct("MuiToolbar",e)}Rt("MuiToolbar",["root","gutters","regular","dense"]);const v1e=["className","component","disableGutters","variant"],y1e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return It({root:["root",!n&&"gutters",r]},m1e,t)},b1e=Ce("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),x1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,u=Ne(r,v1e),c=$({},r,{component:o,disableGutters:s,variant:a}),d=y1e(c);return C.jsx(b1e,$({as:o,className:je(d.root,i),ref:n,ownerState:c},u))}),w1e=x1e,_1e=zt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),S1e=zt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function E1e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function C1e(e,t,n,r={},i=()=>{}){const{ease:o=E1e,duration:s=300}=r;let a=null;const u=t[e];let c=!1;const d=()=>{c=!0},h=p=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=p);const m=Math.min(1,(p-a)/s);if(t[e]=o(m)*(n-u)+u,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return u===n?(i(new Error("Element already at target position")),d):(requestAnimationFrame(h),d)}const T1e=["onChange"],A1e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function I1e(e){const{onChange:t}=e,n=Ne(e,T1e),r=O.useRef(),i=O.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Uo(()=>{const s=IT(()=>{const u=r.current;o(),u!==r.current&&t(r.current)}),a=Dc(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),O.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:A1e,ref:i},n))}function R1e(e){return Ct("MuiTabScrollButton",e)}const P1e=Rt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),O1e=P1e,M1e=["className","slots","slotProps","direction","orientation","disabled"],k1e=e=>{const{classes:t,orientation:n,disabled:r}=e;return It({root:["root",n,r&&"disabled"]},R1e,t)},L1e=Ce(Yc,{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,[`&.${O1e.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),D1e=O.forwardRef(function(t,n){var r,i;const o=Pt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:u={},direction:c}=o,d=Ne(o,M1e),p=Ln().direction==="rtl",m=$({isRtl:p},o),v=k1e(m),y=(r=a.StartScrollButtonIcon)!=null?r:_1e,S=(i=a.EndScrollButtonIcon)!=null?i:S1e,w=ti({elementType:y,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),b=ti({elementType:S,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return C.jsx(L1e,$({component:"div",className:je(v.root,s),ref:n,role:null,ownerState:m,tabIndex:null},d,{children:c==="left"?C.jsx(y,$({},w)):C.jsx(S,$({},b))}))}),N1e=D1e;function B1e(e){return Ct("MuiTabs",e)}const $1e=Rt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),jD=$1e,F1e=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],wH=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,_H=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,R_=(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}}},z1e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:u}=e;return It({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},B1e,u)},U1e=Ce("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jD.scrollButtons}`]:t.scrollButtons},{[`& .${jD.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&&{[`& .${jD.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),j1e=Ce("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"})),H1e=Ce("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"})),W1e=Ce("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})),G1e=Ce(I1e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),SH={},V1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTabs"}),i=Ln(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":a,action:u,centered:c=!1,children:d,className:h,component:p="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:w=N1e,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:I={},TabScrollButtonProps:R={},textColor:M="primary",value:D,variant:N="standard",visibleScrollbar:H=!1}=r,V=Ne(r,F1e),U=N==="scrollable",L=S==="vertical",F=L?"scrollTop":"scrollLeft",z=L?"top":"left",G=L?"bottom":"right",W=L?"clientHeight":"clientWidth",K=L?"height":"width",q=$({},r,{component:p,allowScrollButtonsMobile:m,indicatorColor:v,orientation:S,vertical:L,scrollButtons:b,textColor:M,variant:N,visibleScrollbar:H,fixed:!U,hideScrollbar:U&&!H,scrollableX:U&&!L,scrollableY:U&&L,centered:c&&!U,scrollButtonsHideMobile:!m}),Q=z1e(q),re=ti({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:q}),ue=ti({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:q}),[ce,se]=O.useState(!1),[J,ae]=O.useState(SH),[le,he]=O.useState(!1),[pe,ve]=O.useState(!1),[ye,xe]=O.useState(!1),[ge,be]=O.useState({overflow:"hidden",scrollbarWidth:0}),Ze=new Map,qe=O.useRef(null),ut=O.useRef(null),Bt=()=>{const Pe=qe.current;let He;if(Pe){const Gt=Pe.getBoundingClientRect();He={clientWidth:Pe.clientWidth,scrollLeft:Pe.scrollLeft,scrollTop:Pe.scrollTop,scrollLeftNormalized:Cse(Pe,i.direction),scrollWidth:Pe.scrollWidth,top:Gt.top,bottom:Gt.bottom,left:Gt.left,right:Gt.right}}let xt;if(Pe&&D!==!1){const Gt=ut.current.children;if(Gt.length>0){const yn=Gt[Ze.get(D)];xt=yn?yn.getBoundingClientRect():null}}return{tabsMeta:He,tabMeta:xt}},Oe=go(()=>{const{tabsMeta:Pe,tabMeta:He}=Bt();let xt=0,Gt;if(L)Gt="top",He&&Pe&&(xt=He.top-Pe.top+Pe.scrollTop);else if(Gt=o?"right":"left",He&&Pe){const Yr=o?Pe.scrollLeftNormalized+Pe.clientWidth-Pe.scrollWidth:Pe.scrollLeft;xt=(o?-1:1)*(He[Gt]-Pe[Gt]+Yr)}const yn={[Gt]:xt,[K]:He?He[K]:0};if(isNaN(J[Gt])||isNaN(J[K]))ae(yn);else{const Yr=Math.abs(J[Gt]-yn[Gt]),Hr=Math.abs(J[K]-yn[K]);(Yr>=1||Hr>=1)&&ae(yn)}}),ze=(Pe,{animation:He=!0}={})=>{He?C1e(F,qe.current,Pe,{duration:i.transitions.duration.standard}):qe.current[F]=Pe},st=Pe=>{let He=qe.current[F];L?He+=Pe:(He+=Pe*(o?-1:1),He*=o&&aq()==="reverse"?-1:1),ze(He)},mt=()=>{const Pe=qe.current[W];let He=0;const xt=Array.from(ut.current.children);for(let Gt=0;GtPe){Gt===0&&(He=Pe);break}He+=yn[W]}return He},vt=()=>{st(-1*mt())},_e=()=>{st(mt())},Ue=O.useCallback(Pe=>{be({overflow:null,scrollbarWidth:Pe})},[]),Ke=()=>{const Pe={};Pe.scrollbarSizeListener=U?C.jsx(G1e,{onChange:Ue,className:je(Q.scrollableX,Q.hideScrollbar)}):null;const xt=U&&(b==="auto"&&(le||pe)||b===!0);return Pe.scrollButtonStart=xt?C.jsx(w,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:re},orientation:S,direction:o?"right":"left",onClick:vt,disabled:!le},R,{className:je(Q.scrollButtons,R.className)})):null,Pe.scrollButtonEnd=xt?C.jsx(w,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ue},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},R,{className:je(Q.scrollButtons,R.className)})):null,Pe},Fe=go(Pe=>{const{tabsMeta:He,tabMeta:xt}=Bt();if(!(!xt||!He)){if(xt[z]He[G]){const Gt=He[F]+(xt[G]-He[G]);ze(Gt,{animation:Pe})}}}),Be=go(()=>{U&&b!==!1&&xe(!ye)});O.useEffect(()=>{const Pe=IT(()=>{qe.current&&Oe()}),He=Dc(qe.current);He.addEventListener("resize",Pe);let xt;return typeof ResizeObserver<"u"&&(xt=new ResizeObserver(Pe),Array.from(ut.current.children).forEach(Gt=>{xt.observe(Gt)})),()=>{Pe.clear(),He.removeEventListener("resize",Pe),xt&&xt.disconnect()}},[Oe]),O.useEffect(()=>{const Pe=Array.from(ut.current.children),He=Pe.length;if(typeof IntersectionObserver<"u"&&He>0&&U&&b!==!1){const xt=Pe[0],Gt=Pe[He-1],yn={root:qe.current,threshold:.99},Yr=ui=>{he(!ui[0].isIntersecting)},Hr=new IntersectionObserver(Yr,yn);Hr.observe(xt);const Wr=ui=>{ve(!ui[0].isIntersecting)},Kr=new IntersectionObserver(Wr,yn);return Kr.observe(Gt),()=>{Hr.disconnect(),Kr.disconnect()}}},[U,b,ye,d==null?void 0:d.length]),O.useEffect(()=>{se(!0)},[]),O.useEffect(()=>{Oe()}),O.useEffect(()=>{Fe(SH!==J)},[Fe,J]),O.useImperativeHandle(u,()=>({updateIndicator:Oe,updateScrollButtons:Be}),[Oe,Be]);const Ot=C.jsx(W1e,$({},I,{className:je(Q.indicator,I.className),ownerState:q,style:$({},J,I.style)}));let ft=0;const Re=O.Children.map(d,Pe=>{if(!O.isValidElement(Pe))return null;const He=Pe.props.value===void 0?ft:Pe.props.value;Ze.set(He,ft);const xt=He===D;return ft+=1,O.cloneElement(Pe,$({fullWidth:N==="fullWidth",indicator:xt&&!ce&&Ot,selected:xt,selectionFollowsFocus:x,onChange:y,textColor:M,value:He},ft===1&&D===!1&&!Pe.props.tabIndex?{tabIndex:0}:{}))}),at=Pe=>{const He=ut.current,xt=Fr(He).activeElement;if(xt.getAttribute("role")!=="tab")return;let yn=S==="horizontal"?"ArrowLeft":"ArrowUp",Yr=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(yn="ArrowRight",Yr="ArrowLeft"),Pe.key){case yn:Pe.preventDefault(),R_(He,xt,_H);break;case Yr:Pe.preventDefault(),R_(He,xt,wH);break;case"Home":Pe.preventDefault(),R_(He,null,wH);break;case"End":Pe.preventDefault(),R_(He,null,_H);break}},$t=Ke();return C.jsxs(U1e,$({className:je(Q.root,h),ownerState:q,ref:n,as:p},V,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(j1e,{className:Q.scroller,ownerState:q,style:{overflow:ge.overflow,[L?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-ge.scrollbarWidth},ref:qe,children:[C.jsx(H1e,{"aria-label":s,"aria-labelledby":a,"aria-orientation":S==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:q,onKeyDown:at,ref:ut,role:"tablist",children:Re}),ce&&Ot]}),$t.scrollButtonEnd]}))}),X1e=V1e;function q1e(e){return Ct("MuiTextField",e)}Rt("MuiTextField",["root"]);const Y1e=["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"],K1e={standard:vQ,filled:hQ,outlined:EQ},Q1e=e=>{const{classes:t}=e;return It({root:["root"]},q1e,t)},J1e=Ce(yve,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z1e=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:u="primary",defaultValue:c,disabled:d=!1,error:h=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:v,id:y,InputLabelProps:S,inputProps:w,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:I,multiline:R=!1,name:M,onBlur:D,onChange:N,onFocus:H,placeholder:V,required:U=!1,rows:L,select:F=!1,SelectProps:z,type:G,value:W,variant:K="outlined"}=r,q=Ne(r,Y1e),Q=$({},r,{autoFocus:o,color:u,disabled:d,error:h,fullWidth:m,multiline:R,required:U,select:F,variant:K}),re=Q1e(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=s4(y),se=v&&ce?`${ce}-helper-text`:void 0,J=E&&ce?`${ce}-label`:void 0,ae=K1e[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:R,name:M,rows:L,maxRows:A,minRows:I,type:G,value:W,id:ce,inputRef:x,onBlur:D,onChange:N,onFocus:H,placeholder:V,inputProps:w},ue,b));return C.jsxs(J1e,$({className:je(re.root,a),disabled:d,error:h,fullWidth:m,ref:n,required:U,color:u,variant:K,ownerState:Q},q,{children:[E!=null&&E!==""&&C.jsx(r0e,$({htmlFor:ce,id:J},S,{children:E})),F?C.jsx(hbe,$({"aria-describedby":se,id:ce,labelId:J,value:W,input:le},z,{children:s})):le,v&&C.jsx(Lve,$({id:se},p,{children:v}))]}))}),_w=Z1e;var TQ,EH=vv;TQ=EH.createRoot,EH.hydrateRoot;function En({vertical:e,...t}){return C.jsx(gt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const AQ=zt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),exe=zt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),txe=zt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),nxe=zt(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"),rxe=zt(C.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.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-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.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-.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 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"}),"BlurCircularOutlined"),ixe=zt(C.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"}),"BlurOnOutlined"),oxe=zt(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.48 8 15.23 8 15v-4c0-.23.03-.48.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"}),"BugReportOutlined"),sxe=zt(C.jsx("path",{d:"M17 12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5 5-2.24 5-5zm-5 3c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm-7 0H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"}),"CenterFocusStrongOutlined"),axe=zt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),lxe=zt(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"}),"ClearOutlined"),IQ=zt(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"),uxe=zt(C.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"CodeOutlined"),cxe=zt(C.jsx("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"}),"CropFreeOutlined"),fxe=zt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),$A=zt(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"),dxe=zt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),RQ=zt(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"}),"FileOpenOutlined"),hxe=zt(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"),pxe=zt(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"),gxe=zt(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"}),"InfoOutlined"),mxe=zt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),vxe=zt(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"),Sw=zt(C.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}),"LayersOutlined"),PQ=zt(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"}),"ListOutlined"),yxe=zt(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"),bxe=zt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),xxe=zt(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"),wxe=zt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),OQ=zt(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"),_xe=zt(C.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined"),Sxe=zt(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.98 0 .33.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"}),"SettingsOutlined"),Exe=zt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Cxe=zt(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),oE=zt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),Txe=zt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Axe=zt(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"),CH=zt(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"),MQ=zt(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"}),"ViewInArOutlined"),Ixe=zt(C.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 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 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-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 7z"}),"VisibilityOutlined"),Rxe=zt(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 gC={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */pC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,m=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,A=32,I=64,R=128,M=256,L=512,N=30,H="...",V=800,U=16,D=1,F=2,z=3,G=1/0,W=9007199254740991,K=17976931348623157e292,q=0/0,Q=4294967295,re=Q-1,ue=Q>>>1,ce=[["ary",R],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",I],["rearg",M]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",ge="[object Map]",be="[object Number]",Ze="[object Null]",qe="[object Object]",ut="[object Promise]",Bt="[object Proxy]",Oe="[object RegExp]",ze="[object Set]",st="[object String]",mt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",Ue="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Ot="[object Float64Array]",ft="[object Int8Array]",Re="[object Int16Array]",at="[object Int32Array]",$t="[object Uint8Array]",Pe="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Gt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ds=/<%-([\s\S]+?)%>/g,ef=/<%([\s\S]+?)%>/g,ia=/<%=([\s\S]+?)%>/g,wu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/,Td=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hs=/[\\^$.*+?()[\]{}|]/g,Ad=RegExp(hs.source),xo=/^\s+/,Su=/\s/,Di=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ps=/\{\n\/\* \[wrapped with (.+)\] \*/,Id=/,? & /,gs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Na=/[()=,{}\[\]\/\s]/,tf=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Dl=/^[-+]0x[0-9a-f]+$/i,Ll=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,zv=/^0o[0-7]+$/i,Uv=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,qI=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",YI="\\u0300-\\u036f",KI="\\ufe20-\\ufe2f",QI="\\u20d0-\\u20ff",jv=YI+KI+QI,Hv="\\u2700-\\u27bf",Wv="a-z\\xdf-\\xf6\\xf8-\\xff",JI="\\xac\\xb1\\xd7\\xf7",ZI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eR="\\u2000-\\u206f",tR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gv="A-Z\\xc0-\\xd6\\xd8-\\xde",Vv="\\ufe0e\\ufe0f",Xv=JI+ZI+eR+tR,Rd="['’]",nR="["+Eu+"]",qv="["+Xv+"]",Cu="["+jv+"]",Yv="\\d+",rR="["+Hv+"]",Kv="["+Wv+"]",Qv="[^"+Eu+Xv+Yv+Hv+Wv+Gv+"]",Pd="\\ud83c[\\udffb-\\udfff]",iR="(?:"+Cu+"|"+Pd+")",Jv="[^"+Eu+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Gv+"]",Zv="\\u200d",e0="(?:"+Kv+"|"+Qv+")",oR="(?:"+ms+"|"+Qv+")",t0="(?:"+Rd+"(?:d|ll|m|re|s|t|ve))?",n0="(?:"+Rd+"(?:D|LL|M|RE|S|T|VE))?",r0=iR+"?",i0="["+Vv+"]?",sR="(?:"+Zv+"(?:"+[Jv,Od,Md].join("|")+")"+i0+r0+")*",aR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",o0=i0+r0+sR,uR="(?:"+[rR,Od,Md].join("|")+")"+o0,cR="(?:"+[Jv+Cu+"?",Cu,Od,Md,nR].join("|")+")",fR=RegExp(Rd,"g"),dR=RegExp(Cu,"g"),kd=RegExp(Pd+"(?="+Pd+")|"+cR+o0,"g"),hR=RegExp([ms+"?"+Kv+"+"+t0+"(?="+[qv,ms,"$"].join("|")+")",oR+"+"+n0+"(?="+[qv,ms+e0,"$"].join("|")+")",ms+"?"+e0+"+"+t0,ms+"+"+n0,lR,aR,Yv,uR].join("|"),"g"),pR=RegExp("["+Zv+Eu+jv+Vv+"]"),gR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vR=-1,kt={};kt[Be]=kt[Ot]=kt[ft]=kt[Re]=kt[at]=kt[$t]=kt[Pe]=kt[He]=kt[xt]=!0,kt[se]=kt[J]=kt[Ke]=kt[le]=kt[Fe]=kt[he]=kt[ve]=kt[ye]=kt[ge]=kt[be]=kt[qe]=kt[Oe]=kt[ze]=kt[st]=kt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Ot]=Tt[ft]=Tt[Re]=Tt[at]=Tt[ge]=Tt[be]=Tt[qe]=Tt[Oe]=Tt[ze]=Tt[st]=Tt[mt]=Tt[$t]=Tt[Pe]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var yR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&","<":"<",">":">",'"':""","'":"'"},xR={"&":"&","<":"<",">":">",""":'"',"'":"'"},wR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_R=parseFloat,SR=parseInt,s0=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,ER=typeof self=="object"&&self&&self.Object===Object&&self,pn=s0||ER||Function("return this")(),Dd=t&&!t.nodeType&&t,_o=Dd&&!0&&e&&!e.nodeType&&e,a0=_o&&_o.exports===Dd,Ld=a0&&s0.process,cr=function(){try{var X=_o&&_o.require&&_o.require("util").types;return X||Ld&&Ld.binding&&Ld.binding("util")}catch{}}(),l0=cr&&cr.isArrayBuffer,u0=cr&&cr.isDate,c0=cr&&cr.isMap,f0=cr&&cr.isRegExp,d0=cr&&cr.isSet,h0=cr&&cr.isTypedArray;function Qn(X,ee,Z){switch(Z.length){case 0:return X.call(ee);case 1:return X.call(ee,Z[0]);case 2:return X.call(ee,Z[0],Z[1]);case 3:return X.call(ee,Z[0],Z[1],Z[2])}return X.apply(ee,Z)}function CR(X,ee,Z,me){for(var Le=-1,dt=X==null?0:X.length;++Le-1}function Nd(X,ee,Z){for(var me=-1,Le=X==null?0:X.length;++me-1;);return Z}function w0(X,ee){for(var Z=X.length;Z--&&vs(ee,X[Z],0)>-1;);return Z}function DR(X,ee){for(var Z=X.length,me=0;Z--;)X[Z]===ee&&++me;return me}var LR=zd(yR),NR=zd(bR);function BR(X){return"\\"+wR[X]}function $R(X,ee){return X==null?n:X[ee]}function ys(X){return pR.test(X)}function FR(X){return gR.test(X)}function zR(X){for(var ee,Z=[];!(ee=X.next()).done;)Z.push(ee.value);return Z}function Wd(X){var ee=-1,Z=Array(X.size);return X.forEach(function(me,Le){Z[++ee]=[Le,me]}),Z}function _0(X,ee){return function(Z){return X(ee(Z))}}function Bi(X,ee){for(var Z=-1,me=X.length,Le=0,dt=[];++Z-1}function AP(l,f){var g=this.__data__,_=Hu(g,l);return _<0?(++this.size,g.push([l,f])):g[_][1]=f,this}ci.prototype.clear=SP,ci.prototype.delete=EP,ci.prototype.get=CP,ci.prototype.has=TP,ci.prototype.set=AP;function fi(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f=f?l:f)),l}function pr(l,f,g,_,T,k){var B,j=f&h,Y=f&p,te=f&m;if(g&&(B=T?g(l,_,T,k):g(l)),B!==n)return B;if(!Ft(l))return l;var ne=$e(l);if(ne){if(B=O2(l),!j)return Nn(l,B)}else{var oe=_n(l),de=oe==ye||oe==xe;if(Hi(l))return iy(l,j);if(oe==qe||oe==se||de&&!T){if(B=Y||de?{}:Sy(l),!j)return Y?x2(l,HP(B,l)):b2(l,D0(B,l))}else{if(!Tt[oe])return T?l:{};B=M2(l,oe,j)}}k||(k=new Pr);var we=k.get(l);if(we)return we;k.set(l,B),Jy(l)?l.forEach(function(Ie){B.add(pr(Ie,f,g,Ie,l,k))}):Ky(l)&&l.forEach(function(Ie,Je){B.set(Je,pr(Ie,f,g,Je,l,k))});var Ae=te?Y?mh:gh:Y?$n:sn,Xe=ne?n:Ae(l);return fr(Xe||l,function(Ie,Je){Xe&&(Je=Ie,Ie=l[Je]),Ha(B,Je,pr(Ie,f,g,Je,l,k))}),B}function WP(l){var f=sn(l);return function(g){return L0(g,l,f)}}function L0(l,f,g){var _=g.length;if(l==null)return!_;for(l=St(l);_--;){var T=g[_],k=f[T],B=l[T];if(B===n&&!(T in l)||!k(B))return!1}return!0}function N0(l,f,g){if(typeof l!="function")throw new dr(s);return Ka(function(){l.apply(n,g)},f)}function Wa(l,f,g,_){var T=-1,k=Tu,B=!0,j=l.length,Y=[],te=f.length;if(!j)return Y;g&&(f=Nt(f,Jn(g))),_?(k=Nd,B=!1):f.length>=i&&(k=Ba,B=!1,f=new Co(f));e:for(;++TT?0:T+g),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=g>_?0:eb(_);g<_;)l[g++]=f;return l}function $0(l,f){var g=[];return Fi(l,function(_,T,k){f(_,T,k)&&g.push(_)}),g}function gn(l,f,g,_,T){var k=-1,B=l.length;for(g||(g=D2),T||(T=[]);++k0&&g(j)?f>1?gn(j,f-1,g,_,T):Ni(T,j):_||(T[T.length]=j)}return T}var Qd=cy(),F0=cy(!0);function Qr(l,f){return l&&Qd(l,f,sn)}function Jd(l,f){return l&&F0(l,f,sn)}function Gu(l,f){return Li(f,function(g){return mi(l[g])})}function Ao(l,f){f=Ui(f,l);for(var g=0,_=f.length;l!=null&&g<_;)l=l[Zr(f[g++])];return g&&g==_?l:n}function z0(l,f,g){var _=f(l);return $e(l)?_:Ni(_,g(l))}function Rn(l){return l==null?l===n?vt:Ze:So&&So in St(l)?I2(l):U2(l)}function Zd(l,f){return l>f}function XP(l,f){return l!=null&&bt.call(l,f)}function qP(l,f){return l!=null&&f in St(l)}function YP(l,f,g){return l>=wn(f,g)&&l=120&&ne.length>=120)?new Co(B&&ne):n}ne=l[0];var oe=-1,de=j[0];e:for(;++oe-1;)j!==l&&Nu.call(j,Y,1),Nu.call(l,Y,1);return l}function K0(l,f){for(var g=l?f.length:0,_=g-1;g--;){var T=f[g];if(g==_||T!==k){var k=T;gi(T)?Nu.call(l,T,1):lh(l,T)}}return l}function oh(l,f){return l+Fu(P0()*(f-l+1))}function l2(l,f,g,_){for(var T=-1,k=nn($u((f-l)/(g||1)),0),B=Z(k);k--;)B[_?k:++T]=l,l+=g;return B}function sh(l,f){var g="";if(!l||f<1||f>W)return g;do f%2&&(g+=l),f=Fu(f/2),f&&(l+=l);while(f);return g}function Ye(l,f){return Sh(Ty(l,f,Fn),l+"")}function u2(l){return k0(Rs(l))}function c2(l,f){var g=Rs(l);return nc(g,To(f,0,g.length))}function Xa(l,f,g,_){if(!Ft(l))return l;f=Ui(f,l);for(var T=-1,k=f.length,B=k-1,j=l;j!=null&&++TT?0:T+f),g=g>T?T:g,g<0&&(g+=T),T=f>g?0:g-f>>>0,f>>>=0;for(var k=Z(T);++_>>1,B=l[k];B!==null&&!er(B)&&(g?B<=f:B=i){var te=f?null:E2(l);if(te)return Iu(te);B=!1,T=Ba,Y=new Co}else Y=f?[]:j;e:for(;++_=_?l:gr(l,f,g)}var ry=tP||function(l){return pn.clearTimeout(l)};function iy(l,f){if(f)return l.slice();var g=l.length,_=C0?C0(g):new l.constructor(g);return l.copy(_),_}function dh(l){var f=new l.constructor(l.byteLength);return new Du(f).set(new Du(l)),f}function g2(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function m2(l){var f=new l.constructor(l.source,lr.exec(l));return f.lastIndex=l.lastIndex,f}function v2(l){return ja?St(ja.call(l)):{}}function oy(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sy(l,f){if(l!==f){var g=l!==n,_=l===null,T=l===l,k=er(l),B=f!==n,j=f===null,Y=f===f,te=er(f);if(!j&&!te&&!k&&l>f||k&&B&&Y&&!j&&!te||_&&B&&Y||!g&&Y||!T)return 1;if(!_&&!k&&!te&&l=j)return Y;var te=g[_];return Y*(te=="desc"?-1:1)}}return l.index-f.index}function ay(l,f,g,_){for(var T=-1,k=l.length,B=g.length,j=-1,Y=f.length,te=nn(k-B,0),ne=Z(Y+te),oe=!_;++j1?g[T-1]:n,B=T>2?g[2]:n;for(k=l.length>3&&typeof k=="function"?(T--,k):n,B&&Pn(g[0],g[1],B)&&(k=T<3?n:k,T=1),f=St(f);++_-1?T[k?f[B]:B]:n}}function hy(l){return pi(function(f){var g=f.length,_=g,T=hr.prototype.thru;for(l&&f.reverse();_--;){var k=f[_];if(typeof k!="function")throw new dr(s);if(T&&!B&&ec(k)=="wrapper")var B=new hr([],!0)}for(_=B?_:g;++_1&&rt.reverse(),ne&&Yj))return!1;var te=k.get(l),ne=k.get(f);if(te&&ne)return te==f&&ne==l;var oe=-1,de=!0,we=g&y?new Co:n;for(k.set(l,f),k.set(f,l);++oe1?"& ":"")+f[_],f=f.join(g>2?", ":" "),l.replace(Di,`{ + */gC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,m=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,A=32,I=64,R=128,M=256,D=512,N=30,H="...",V=800,U=16,L=1,F=2,z=3,G=1/0,W=9007199254740991,K=17976931348623157e292,q=0/0,Q=4294967295,re=Q-1,ue=Q>>>1,ce=[["ary",R],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",D],["partial",A],["partialRight",I],["rearg",M]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",ge="[object Map]",be="[object Number]",Ze="[object Null]",qe="[object Object]",ut="[object Promise]",Bt="[object Proxy]",Oe="[object RegExp]",ze="[object Set]",st="[object String]",mt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",Ue="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Ot="[object Float64Array]",ft="[object Int8Array]",Re="[object Int16Array]",at="[object Int32Array]",$t="[object Uint8Array]",Pe="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Gt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ds=/<%-([\s\S]+?)%>/g,ef=/<%([\s\S]+?)%>/g,ia=/<%=([\s\S]+?)%>/g,wu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/,Td=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hs=/[\\^$.*+?()[\]{}|]/g,Ad=RegExp(hs.source),xo=/^\s+/,Su=/\s/,Li=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ps=/\{\n\/\* \[wrapped with (.+)\] \*/,Id=/,? & /,gs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Na=/[()=,{}\[\]\/\s]/,tf=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Dl=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,zv=/^0o[0-7]+$/i,Uv=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,qI=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",YI="\\u0300-\\u036f",KI="\\ufe20-\\ufe2f",QI="\\u20d0-\\u20ff",jv=YI+KI+QI,Hv="\\u2700-\\u27bf",Wv="a-z\\xdf-\\xf6\\xf8-\\xff",JI="\\xac\\xb1\\xd7\\xf7",ZI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eR="\\u2000-\\u206f",tR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gv="A-Z\\xc0-\\xd6\\xd8-\\xde",Vv="\\ufe0e\\ufe0f",Xv=JI+ZI+eR+tR,Rd="['’]",nR="["+Eu+"]",qv="["+Xv+"]",Cu="["+jv+"]",Yv="\\d+",rR="["+Hv+"]",Kv="["+Wv+"]",Qv="[^"+Eu+Xv+Yv+Hv+Wv+Gv+"]",Pd="\\ud83c[\\udffb-\\udfff]",iR="(?:"+Cu+"|"+Pd+")",Jv="[^"+Eu+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Gv+"]",Zv="\\u200d",e0="(?:"+Kv+"|"+Qv+")",oR="(?:"+ms+"|"+Qv+")",t0="(?:"+Rd+"(?:d|ll|m|re|s|t|ve))?",n0="(?:"+Rd+"(?:D|LL|M|RE|S|T|VE))?",r0=iR+"?",i0="["+Vv+"]?",sR="(?:"+Zv+"(?:"+[Jv,Od,Md].join("|")+")"+i0+r0+")*",aR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",o0=i0+r0+sR,uR="(?:"+[rR,Od,Md].join("|")+")"+o0,cR="(?:"+[Jv+Cu+"?",Cu,Od,Md,nR].join("|")+")",fR=RegExp(Rd,"g"),dR=RegExp(Cu,"g"),kd=RegExp(Pd+"(?="+Pd+")|"+cR+o0,"g"),hR=RegExp([ms+"?"+Kv+"+"+t0+"(?="+[qv,ms,"$"].join("|")+")",oR+"+"+n0+"(?="+[qv,ms+e0,"$"].join("|")+")",ms+"?"+e0+"+"+t0,ms+"+"+n0,lR,aR,Yv,uR].join("|"),"g"),pR=RegExp("["+Zv+Eu+jv+Vv+"]"),gR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vR=-1,kt={};kt[Be]=kt[Ot]=kt[ft]=kt[Re]=kt[at]=kt[$t]=kt[Pe]=kt[He]=kt[xt]=!0,kt[se]=kt[J]=kt[Ke]=kt[le]=kt[Fe]=kt[he]=kt[ve]=kt[ye]=kt[ge]=kt[be]=kt[qe]=kt[Oe]=kt[ze]=kt[st]=kt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Ot]=Tt[ft]=Tt[Re]=Tt[at]=Tt[ge]=Tt[be]=Tt[qe]=Tt[Oe]=Tt[ze]=Tt[st]=Tt[mt]=Tt[$t]=Tt[Pe]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var yR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&","<":"<",">":">",'"':""","'":"'"},xR={"&":"&","<":"<",">":">",""":'"',"'":"'"},wR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_R=parseFloat,SR=parseInt,s0=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,ER=typeof self=="object"&&self&&self.Object===Object&&self,pn=s0||ER||Function("return this")(),Ld=t&&!t.nodeType&&t,_o=Ld&&!0&&e&&!e.nodeType&&e,a0=_o&&_o.exports===Ld,Dd=a0&&s0.process,cr=function(){try{var X=_o&&_o.require&&_o.require("util").types;return X||Dd&&Dd.binding&&Dd.binding("util")}catch{}}(),l0=cr&&cr.isArrayBuffer,u0=cr&&cr.isDate,c0=cr&&cr.isMap,f0=cr&&cr.isRegExp,d0=cr&&cr.isSet,h0=cr&&cr.isTypedArray;function Qn(X,ee,Z){switch(Z.length){case 0:return X.call(ee);case 1:return X.call(ee,Z[0]);case 2:return X.call(ee,Z[0],Z[1]);case 3:return X.call(ee,Z[0],Z[1],Z[2])}return X.apply(ee,Z)}function CR(X,ee,Z,me){for(var De=-1,dt=X==null?0:X.length;++De-1}function Nd(X,ee,Z){for(var me=-1,De=X==null?0:X.length;++me-1;);return Z}function w0(X,ee){for(var Z=X.length;Z--&&vs(ee,X[Z],0)>-1;);return Z}function LR(X,ee){for(var Z=X.length,me=0;Z--;)X[Z]===ee&&++me;return me}var DR=zd(yR),NR=zd(bR);function BR(X){return"\\"+wR[X]}function $R(X,ee){return X==null?n:X[ee]}function ys(X){return pR.test(X)}function FR(X){return gR.test(X)}function zR(X){for(var ee,Z=[];!(ee=X.next()).done;)Z.push(ee.value);return Z}function Wd(X){var ee=-1,Z=Array(X.size);return X.forEach(function(me,De){Z[++ee]=[De,me]}),Z}function _0(X,ee){return function(Z){return X(ee(Z))}}function Bi(X,ee){for(var Z=-1,me=X.length,De=0,dt=[];++Z-1}function AP(l,f){var g=this.__data__,_=Hu(g,l);return _<0?(++this.size,g.push([l,f])):g[_][1]=f,this}ci.prototype.clear=SP,ci.prototype.delete=EP,ci.prototype.get=CP,ci.prototype.has=TP,ci.prototype.set=AP;function fi(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f=f?l:f)),l}function pr(l,f,g,_,T,k){var B,j=f&h,Y=f&p,te=f&m;if(g&&(B=T?g(l,_,T,k):g(l)),B!==n)return B;if(!Ft(l))return l;var ne=$e(l);if(ne){if(B=O2(l),!j)return Nn(l,B)}else{var oe=_n(l),de=oe==ye||oe==xe;if(Hi(l))return iy(l,j);if(oe==qe||oe==se||de&&!T){if(B=Y||de?{}:Sy(l),!j)return Y?x2(l,HP(B,l)):b2(l,L0(B,l))}else{if(!Tt[oe])return T?l:{};B=M2(l,oe,j)}}k||(k=new Pr);var we=k.get(l);if(we)return we;k.set(l,B),Jy(l)?l.forEach(function(Ie){B.add(pr(Ie,f,g,Ie,l,k))}):Ky(l)&&l.forEach(function(Ie,Je){B.set(Je,pr(Ie,f,g,Je,l,k))});var Ae=te?Y?mh:gh:Y?$n:sn,Xe=ne?n:Ae(l);return fr(Xe||l,function(Ie,Je){Xe&&(Je=Ie,Ie=l[Je]),Ha(B,Je,pr(Ie,f,g,Je,l,k))}),B}function WP(l){var f=sn(l);return function(g){return D0(g,l,f)}}function D0(l,f,g){var _=g.length;if(l==null)return!_;for(l=St(l);_--;){var T=g[_],k=f[T],B=l[T];if(B===n&&!(T in l)||!k(B))return!1}return!0}function N0(l,f,g){if(typeof l!="function")throw new dr(s);return Ka(function(){l.apply(n,g)},f)}function Wa(l,f,g,_){var T=-1,k=Tu,B=!0,j=l.length,Y=[],te=f.length;if(!j)return Y;g&&(f=Nt(f,Jn(g))),_?(k=Nd,B=!1):f.length>=i&&(k=Ba,B=!1,f=new Co(f));e:for(;++TT?0:T+g),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=g>_?0:eb(_);g<_;)l[g++]=f;return l}function $0(l,f){var g=[];return Fi(l,function(_,T,k){f(_,T,k)&&g.push(_)}),g}function gn(l,f,g,_,T){var k=-1,B=l.length;for(g||(g=L2),T||(T=[]);++k0&&g(j)?f>1?gn(j,f-1,g,_,T):Ni(T,j):_||(T[T.length]=j)}return T}var Qd=cy(),F0=cy(!0);function Qr(l,f){return l&&Qd(l,f,sn)}function Jd(l,f){return l&&F0(l,f,sn)}function Gu(l,f){return Di(f,function(g){return mi(l[g])})}function Ao(l,f){f=Ui(f,l);for(var g=0,_=f.length;l!=null&&g<_;)l=l[Zr(f[g++])];return g&&g==_?l:n}function z0(l,f,g){var _=f(l);return $e(l)?_:Ni(_,g(l))}function Rn(l){return l==null?l===n?vt:Ze:So&&So in St(l)?I2(l):U2(l)}function Zd(l,f){return l>f}function XP(l,f){return l!=null&&bt.call(l,f)}function qP(l,f){return l!=null&&f in St(l)}function YP(l,f,g){return l>=wn(f,g)&&l=120&&ne.length>=120)?new Co(B&&ne):n}ne=l[0];var oe=-1,de=j[0];e:for(;++oe-1;)j!==l&&Nu.call(j,Y,1),Nu.call(l,Y,1);return l}function K0(l,f){for(var g=l?f.length:0,_=g-1;g--;){var T=f[g];if(g==_||T!==k){var k=T;gi(T)?Nu.call(l,T,1):lh(l,T)}}return l}function oh(l,f){return l+Fu(P0()*(f-l+1))}function l2(l,f,g,_){for(var T=-1,k=nn($u((f-l)/(g||1)),0),B=Z(k);k--;)B[_?k:++T]=l,l+=g;return B}function sh(l,f){var g="";if(!l||f<1||f>W)return g;do f%2&&(g+=l),f=Fu(f/2),f&&(l+=l);while(f);return g}function Ye(l,f){return Sh(Ty(l,f,Fn),l+"")}function u2(l){return k0(Rs(l))}function c2(l,f){var g=Rs(l);return nc(g,To(f,0,g.length))}function Xa(l,f,g,_){if(!Ft(l))return l;f=Ui(f,l);for(var T=-1,k=f.length,B=k-1,j=l;j!=null&&++TT?0:T+f),g=g>T?T:g,g<0&&(g+=T),T=f>g?0:g-f>>>0,f>>>=0;for(var k=Z(T);++_>>1,B=l[k];B!==null&&!er(B)&&(g?B<=f:B=i){var te=f?null:E2(l);if(te)return Iu(te);B=!1,T=Ba,Y=new Co}else Y=f?[]:j;e:for(;++_=_?l:gr(l,f,g)}var ry=tP||function(l){return pn.clearTimeout(l)};function iy(l,f){if(f)return l.slice();var g=l.length,_=C0?C0(g):new l.constructor(g);return l.copy(_),_}function dh(l){var f=new l.constructor(l.byteLength);return new Lu(f).set(new Lu(l)),f}function g2(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function m2(l){var f=new l.constructor(l.source,lr.exec(l));return f.lastIndex=l.lastIndex,f}function v2(l){return ja?St(ja.call(l)):{}}function oy(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sy(l,f){if(l!==f){var g=l!==n,_=l===null,T=l===l,k=er(l),B=f!==n,j=f===null,Y=f===f,te=er(f);if(!j&&!te&&!k&&l>f||k&&B&&Y&&!j&&!te||_&&B&&Y||!g&&Y||!T)return 1;if(!_&&!k&&!te&&l=j)return Y;var te=g[_];return Y*(te=="desc"?-1:1)}}return l.index-f.index}function ay(l,f,g,_){for(var T=-1,k=l.length,B=g.length,j=-1,Y=f.length,te=nn(k-B,0),ne=Z(Y+te),oe=!_;++j1?g[T-1]:n,B=T>2?g[2]:n;for(k=l.length>3&&typeof k=="function"?(T--,k):n,B&&Pn(g[0],g[1],B)&&(k=T<3?n:k,T=1),f=St(f);++_-1?T[k?f[B]:B]:n}}function hy(l){return pi(function(f){var g=f.length,_=g,T=hr.prototype.thru;for(l&&f.reverse();_--;){var k=f[_];if(typeof k!="function")throw new dr(s);if(T&&!B&&ec(k)=="wrapper")var B=new hr([],!0)}for(_=B?_:g;++_1&&rt.reverse(),ne&&Yj))return!1;var te=k.get(l),ne=k.get(f);if(te&&ne)return te==f&&ne==l;var oe=-1,de=!0,we=g&y?new Co:n;for(k.set(l,f),k.set(f,l);++oe1?"& ":"")+f[_],f=f.join(g>2?", ":" "),l.replace(Li,`{ /* [wrapped with `+f+`] */ -`)}function D2(l){return $e(l)||Po(l)||!!(I0&&l&&l[I0])}function gi(l,f){var g=typeof l;return f=f??W,!!f&&(g=="number"||g!="symbol"&&Uv.test(l))&&l>-1&&l%1==0&&l0){if(++f>=V)return arguments[0]}else f=0;return l.apply(n,arguments)}}function nc(l,f){var g=-1,_=l.length,T=_-1;for(f=f===n?_:f;++g1?l[f-1]:n;return g=typeof g=="function"?(l.pop(),g):n,$y(l,g)});function Fy(l){var f=P(l);return f.__chain__=!0,f}function GO(l,f){return f(l),l}function rc(l,f){return f(l)}var VO=pi(function(l){var f=l.length,g=f?l[0]:0,_=this.__wrapped__,T=function(k){return Kd(k,l)};return f>1||this.__actions__.length||!(_ instanceof et)||!gi(g)?this.thru(T):(_=_.slice(g,+g+(f?1:0)),_.__actions__.push({func:rc,args:[T],thisArg:n}),new hr(_,this.__chain__).thru(function(k){return f&&!k.length&&k.push(n),k}))});function XO(){return Fy(this)}function qO(){return new hr(this.value(),this.__chain__)}function YO(){this.__values__===n&&(this.__values__=Zy(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function KO(){return this}function QO(l){for(var f,g=this;g instanceof ju;){var _=My(g);_.__index__=0,_.__values__=n,f?T.__wrapped__=_:f=_;var T=_;g=g.__wrapped__}return T.__wrapped__=l,f}function JO(){var l=this.__wrapped__;if(l instanceof et){var f=l;return this.__actions__.length&&(f=new et(this)),f=f.reverse(),f.__actions__.push({func:rc,args:[Eh],thisArg:n}),new hr(f,this.__chain__)}return this.thru(Eh)}function ZO(){return ty(this.__wrapped__,this.__actions__)}var eM=Yu(function(l,f,g){bt.call(l,g)?++l[g]:di(l,g,1)});function tM(l,f,g){var _=$e(l)?p0:GP;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}function nM(l,f){var g=$e(l)?Li:$0;return g(l,Te(f,3))}var rM=dy(ky),iM=dy(Dy);function oM(l,f){return gn(ic(l,f),1)}function sM(l,f){return gn(ic(l,f),G)}function aM(l,f,g){return g=g===n?1:Ge(g),gn(ic(l,f),g)}function zy(l,f){var g=$e(l)?fr:Fi;return g(l,Te(f,3))}function Uy(l,f){var g=$e(l)?TR:B0;return g(l,Te(f,3))}var lM=Yu(function(l,f,g){bt.call(l,g)?l[g].push(f):di(l,g,[f])});function uM(l,f,g,_){l=Bn(l)?l:Rs(l),g=g&&!_?Ge(g):0;var T=l.length;return g<0&&(g=nn(T+g,0)),uc(l)?g<=T&&l.indexOf(f,g)>-1:!!T&&vs(l,f,g)>-1}var cM=Ye(function(l,f,g){var _=-1,T=typeof f=="function",k=Bn(l)?Z(l.length):[];return Fi(l,function(B){k[++_]=T?Qn(f,B,g):Ga(B,f,g)}),k}),fM=Yu(function(l,f,g){di(l,g,f)});function ic(l,f){var g=$e(l)?Nt:W0;return g(l,Te(f,3))}function dM(l,f,g,_){return l==null?[]:($e(f)||(f=f==null?[]:[f]),g=_?n:g,$e(g)||(g=g==null?[]:[g]),q0(l,f,g))}var hM=Yu(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function pM(l,f,g){var _=$e(l)?Bd:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,Fi)}function gM(l,f,g){var _=$e(l)?AR:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,B0)}function mM(l,f){var g=$e(l)?Li:$0;return g(l,ac(Te(f,3)))}function vM(l){var f=$e(l)?k0:u2;return f(l)}function yM(l,f,g){(g?Pn(l,f,g):f===n)?f=1:f=Ge(f);var _=$e(l)?zP:c2;return _(l,f)}function bM(l){var f=$e(l)?UP:d2;return f(l)}function xM(l){if(l==null)return 0;if(Bn(l))return uc(l)?bs(l):l.length;var f=_n(l);return f==ge||f==ze?l.size:nh(l).length}function wM(l,f,g){var _=$e(l)?$d:h2;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}var _M=Ye(function(l,f){if(l==null)return[];var g=f.length;return g>1&&Pn(l,f[0],f[1])?f=[]:g>2&&Pn(f[0],f[1],f[2])&&(f=[f[0]]),q0(l,gn(f,1),[])}),oc=nP||function(){return pn.Date.now()};function SM(l,f){if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){if(--l<1)return f.apply(this,arguments)}}function jy(l,f,g){return f=g?n:f,f=l&&f==null?l.length:f,hi(l,R,n,n,n,n,f)}function Hy(l,f){var g;if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=n),g}}var Th=Ye(function(l,f,g){var _=S;if(g.length){var T=Bi(g,As(Th));_|=A}return hi(l,_,f,g,T)}),Wy=Ye(function(l,f,g){var _=S|w;if(g.length){var T=Bi(g,As(Wy));_|=A}return hi(f,_,l,g,T)});function Gy(l,f,g){f=g?n:f;var _=hi(l,x,n,n,n,n,n,f);return _.placeholder=Gy.placeholder,_}function Vy(l,f,g){f=g?n:f;var _=hi(l,E,n,n,n,n,n,f);return _.placeholder=Vy.placeholder,_}function Xy(l,f,g){var _,T,k,B,j,Y,te=0,ne=!1,oe=!1,de=!0;if(typeof l!="function")throw new dr(s);f=vr(f)||0,Ft(g)&&(ne=!!g.leading,oe="maxWait"in g,k=oe?nn(vr(g.maxWait)||0,f):k,de="trailing"in g?!!g.trailing:de);function we(Yt){var Mr=_,yi=T;return _=T=n,te=Yt,B=l.apply(yi,Mr),B}function Ae(Yt){return te=Yt,j=Ka(Je,f),ne?we(Yt):B}function Xe(Yt){var Mr=Yt-Y,yi=Yt-te,db=f-Mr;return oe?wn(db,k-yi):db}function Ie(Yt){var Mr=Yt-Y,yi=Yt-te;return Y===n||Mr>=f||Mr<0||oe&&yi>=k}function Je(){var Yt=oc();if(Ie(Yt))return rt(Yt);j=Ka(Je,Xe(Yt))}function rt(Yt){return j=n,de&&_?we(Yt):(_=T=n,B)}function tr(){j!==n&&ry(j),te=0,_=Y=T=j=n}function On(){return j===n?B:rt(oc())}function nr(){var Yt=oc(),Mr=Ie(Yt);if(_=arguments,T=this,Y=Yt,Mr){if(j===n)return Ae(Y);if(oe)return ry(j),j=Ka(Je,f),we(Y)}return j===n&&(j=Ka(Je,f)),B}return nr.cancel=tr,nr.flush=On,nr}var EM=Ye(function(l,f){return N0(l,1,f)}),CM=Ye(function(l,f,g){return N0(l,vr(f)||0,g)});function TM(l){return hi(l,L)}function sc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new dr(s);var g=function(){var _=arguments,T=f?f.apply(this,_):_[0],k=g.cache;if(k.has(T))return k.get(T);var B=l.apply(this,_);return g.cache=k.set(T,B)||k,B};return g.cache=new(sc.Cache||fi),g}sc.Cache=fi;function ac(l){if(typeof l!="function")throw new dr(s);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function AM(l){return Hy(2,l)}var IM=p2(function(l,f){f=f.length==1&&$e(f[0])?Nt(f[0],Jn(Te())):Nt(gn(f,1),Jn(Te()));var g=f.length;return Ye(function(_){for(var T=-1,k=wn(_.length,g);++T=f}),Po=U0(function(){return arguments}())?U0:function(l){return Ut(l)&&bt.call(l,"callee")&&!A0.call(l,"callee")},$e=Z.isArray,HM=l0?Jn(l0):QP;function Bn(l){return l!=null&&lc(l.length)&&!mi(l)}function qt(l){return Ut(l)&&Bn(l)}function WM(l){return l===!0||l===!1||Ut(l)&&Rn(l)==le}var Hi=iP||$h,GM=u0?Jn(u0):JP;function VM(l){return Ut(l)&&l.nodeType===1&&!Qa(l)}function XM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Hi(l)||Is(l)||Po(l)))return!l.length;var f=_n(l);if(f==ge||f==ze)return!l.size;if(Ya(l))return!nh(l).length;for(var g in l)if(bt.call(l,g))return!1;return!0}function qM(l,f){return Va(l,f)}function YM(l,f,g){g=typeof g=="function"?g:n;var _=g?g(l,f):n;return _===n?Va(l,f,n,g):!!_}function Ih(l){if(!Ut(l))return!1;var f=Rn(l);return f==ve||f==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Qa(l)}function KM(l){return typeof l=="number"&&R0(l)}function mi(l){if(!Ft(l))return!1;var f=Rn(l);return f==ye||f==xe||f==ae||f==Bt}function Yy(l){return typeof l=="number"&&l==Ge(l)}function lc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function Ft(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Ut(l){return l!=null&&typeof l=="object"}var Ky=c0?Jn(c0):e2;function QM(l,f){return l===f||th(l,f,yh(f))}function JM(l,f,g){return g=typeof g=="function"?g:n,th(l,f,yh(f),g)}function ZM(l){return Qy(l)&&l!=+l}function ek(l){if(B2(l))throw new Le(o);return j0(l)}function tk(l){return l===null}function nk(l){return l==null}function Qy(l){return typeof l=="number"||Ut(l)&&Rn(l)==be}function Qa(l){if(!Ut(l)||Rn(l)!=qe)return!1;var f=Lu(l);if(f===null)return!0;var g=bt.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Ou.call(g)==JR}var Rh=f0?Jn(f0):t2;function rk(l){return Yy(l)&&l>=-W&&l<=W}var Jy=d0?Jn(d0):n2;function uc(l){return typeof l=="string"||!$e(l)&&Ut(l)&&Rn(l)==st}function er(l){return typeof l=="symbol"||Ut(l)&&Rn(l)==mt}var Is=h0?Jn(h0):r2;function ik(l){return l===n}function ok(l){return Ut(l)&&_n(l)==_e}function sk(l){return Ut(l)&&Rn(l)==Ue}var ak=Zu(rh),lk=Zu(function(l,f){return l<=f});function Zy(l){if(!l)return[];if(Bn(l))return uc(l)?Rr(l):Nn(l);if($a&&l[$a])return zR(l[$a]());var f=_n(l),g=f==ge?Wd:f==ze?Iu:Rs;return g(l)}function vi(l){if(!l)return l===0?l:0;if(l=vr(l),l===G||l===-G){var f=l<0?-1:1;return f*K}return l===l?l:0}function Ge(l){var f=vi(l),g=f%1;return f===f?g?f-g:f:0}function eb(l){return l?To(Ge(l),0,Q):0}function vr(l){if(typeof l=="number")return l;if(er(l))return q;if(Ft(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Ft(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=b0(l);var g=Ll.test(l);return g||zv.test(l)?SR(l.slice(2),g?2:8):Dl.test(l)?q:+l}function tb(l){return Jr(l,$n(l))}function uk(l){return l?To(Ge(l),-W,W):l===0?l:0}function ht(l){return l==null?"":Zn(l)}var ck=Cs(function(l,f){if(Ya(f)||Bn(f)){Jr(f,sn(f),l);return}for(var g in f)bt.call(f,g)&&Ha(l,g,f[g])}),nb=Cs(function(l,f){Jr(f,$n(f),l)}),cc=Cs(function(l,f,g,_){Jr(f,$n(f),l,_)}),fk=Cs(function(l,f,g,_){Jr(f,sn(f),l,_)}),dk=pi(Kd);function hk(l,f){var g=Es(l);return f==null?g:D0(g,f)}var pk=Ye(function(l,f){l=St(l);var g=-1,_=f.length,T=_>2?f[2]:n;for(T&&Pn(f[0],f[1],T)&&(_=1);++g<_;)for(var k=f[g],B=$n(k),j=-1,Y=B.length;++j1),k}),Jr(l,mh(l),g),_&&(g=pr(g,h|p|m,C2));for(var T=f.length;T--;)lh(g,f[T]);return g});function Mk(l,f){return ib(l,ac(Te(f)))}var kk=pi(function(l,f){return l==null?{}:s2(l,f)});function ib(l,f){if(l==null)return{};var g=Nt(mh(l),function(_){return[_]});return f=Te(f),Y0(l,g,function(_,T){return f(_,T[0])})}function Dk(l,f,g){f=Ui(f,l);var _=-1,T=f.length;for(T||(T=1,l=n);++_f){var _=l;l=f,f=_}if(g||l%1||f%1){var T=P0();return wn(l+T*(f-l+_R("1e-"+((T+"").length-1))),f)}return oh(l,f)}var Gk=Ts(function(l,f,g){return f=f.toLowerCase(),l+(g?ab(f):f)});function ab(l){return Mh(ht(l).toLowerCase())}function lb(l){return l=ht(l),l&&l.replace(Zt,LR).replace(dR,"")}function Vk(l,f,g){l=ht(l),f=Zn(f);var _=l.length;g=g===n?_:To(Ge(g),0,_);var T=g;return g-=f.length,g>=0&&l.slice(g,T)==f}function Xk(l){return l=ht(l),l&&ui.test(l)?l.replace(Wr,NR):l}function qk(l){return l=ht(l),l&&Ad.test(l)?l.replace(hs,"\\$&"):l}var Yk=Ts(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),Kk=Ts(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),Qk=fy("toLowerCase");function Jk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;if(!f||_>=f)return l;var T=(f-_)/2;return Ju(Fu(T),g)+l+Ju($u(T),g)}function Zk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;return f&&_>>0,g?(l=ht(l),l&&(typeof f=="string"||f!=null&&!Rh(f))&&(f=Zn(f),!f&&ys(l))?ji(Rr(l),0,g):l.split(f,g)):[]}var sD=Ts(function(l,f,g){return l+(g?" ":"")+Mh(f)});function aD(l,f,g){return l=ht(l),g=g==null?0:To(Ge(g),0,l.length),f=Zn(f),l.slice(g,g+f.length)==f}function lD(l,f,g){var _=P.templateSettings;g&&Pn(l,f,g)&&(f=n),l=ht(l),f=cc({},f,_,yy);var T=cc({},f.imports,_.imports,yy),k=sn(T),B=Hd(T,k),j,Y,te=0,ne=f.interpolate||Ir,oe="__p += '",de=Gd((f.escape||Ir).source+"|"+ne.source+"|"+(ne===ia?Kn:Ir).source+"|"+(f.evaluate||Ir).source+"|$","g"),we="//# sourceURL="+(bt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vR+"]")+` +`)}function L2(l){return $e(l)||Po(l)||!!(I0&&l&&l[I0])}function gi(l,f){var g=typeof l;return f=f??W,!!f&&(g=="number"||g!="symbol"&&Uv.test(l))&&l>-1&&l%1==0&&l0){if(++f>=V)return arguments[0]}else f=0;return l.apply(n,arguments)}}function nc(l,f){var g=-1,_=l.length,T=_-1;for(f=f===n?_:f;++g1?l[f-1]:n;return g=typeof g=="function"?(l.pop(),g):n,$y(l,g)});function Fy(l){var f=P(l);return f.__chain__=!0,f}function GO(l,f){return f(l),l}function rc(l,f){return f(l)}var VO=pi(function(l){var f=l.length,g=f?l[0]:0,_=this.__wrapped__,T=function(k){return Kd(k,l)};return f>1||this.__actions__.length||!(_ instanceof et)||!gi(g)?this.thru(T):(_=_.slice(g,+g+(f?1:0)),_.__actions__.push({func:rc,args:[T],thisArg:n}),new hr(_,this.__chain__).thru(function(k){return f&&!k.length&&k.push(n),k}))});function XO(){return Fy(this)}function qO(){return new hr(this.value(),this.__chain__)}function YO(){this.__values__===n&&(this.__values__=Zy(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function KO(){return this}function QO(l){for(var f,g=this;g instanceof ju;){var _=My(g);_.__index__=0,_.__values__=n,f?T.__wrapped__=_:f=_;var T=_;g=g.__wrapped__}return T.__wrapped__=l,f}function JO(){var l=this.__wrapped__;if(l instanceof et){var f=l;return this.__actions__.length&&(f=new et(this)),f=f.reverse(),f.__actions__.push({func:rc,args:[Eh],thisArg:n}),new hr(f,this.__chain__)}return this.thru(Eh)}function ZO(){return ty(this.__wrapped__,this.__actions__)}var eM=Yu(function(l,f,g){bt.call(l,g)?++l[g]:di(l,g,1)});function tM(l,f,g){var _=$e(l)?p0:GP;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}function nM(l,f){var g=$e(l)?Di:$0;return g(l,Te(f,3))}var rM=dy(ky),iM=dy(Ly);function oM(l,f){return gn(ic(l,f),1)}function sM(l,f){return gn(ic(l,f),G)}function aM(l,f,g){return g=g===n?1:Ge(g),gn(ic(l,f),g)}function zy(l,f){var g=$e(l)?fr:Fi;return g(l,Te(f,3))}function Uy(l,f){var g=$e(l)?TR:B0;return g(l,Te(f,3))}var lM=Yu(function(l,f,g){bt.call(l,g)?l[g].push(f):di(l,g,[f])});function uM(l,f,g,_){l=Bn(l)?l:Rs(l),g=g&&!_?Ge(g):0;var T=l.length;return g<0&&(g=nn(T+g,0)),uc(l)?g<=T&&l.indexOf(f,g)>-1:!!T&&vs(l,f,g)>-1}var cM=Ye(function(l,f,g){var _=-1,T=typeof f=="function",k=Bn(l)?Z(l.length):[];return Fi(l,function(B){k[++_]=T?Qn(f,B,g):Ga(B,f,g)}),k}),fM=Yu(function(l,f,g){di(l,g,f)});function ic(l,f){var g=$e(l)?Nt:W0;return g(l,Te(f,3))}function dM(l,f,g,_){return l==null?[]:($e(f)||(f=f==null?[]:[f]),g=_?n:g,$e(g)||(g=g==null?[]:[g]),q0(l,f,g))}var hM=Yu(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function pM(l,f,g){var _=$e(l)?Bd:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,Fi)}function gM(l,f,g){var _=$e(l)?AR:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,B0)}function mM(l,f){var g=$e(l)?Di:$0;return g(l,ac(Te(f,3)))}function vM(l){var f=$e(l)?k0:u2;return f(l)}function yM(l,f,g){(g?Pn(l,f,g):f===n)?f=1:f=Ge(f);var _=$e(l)?zP:c2;return _(l,f)}function bM(l){var f=$e(l)?UP:d2;return f(l)}function xM(l){if(l==null)return 0;if(Bn(l))return uc(l)?bs(l):l.length;var f=_n(l);return f==ge||f==ze?l.size:nh(l).length}function wM(l,f,g){var _=$e(l)?$d:h2;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}var _M=Ye(function(l,f){if(l==null)return[];var g=f.length;return g>1&&Pn(l,f[0],f[1])?f=[]:g>2&&Pn(f[0],f[1],f[2])&&(f=[f[0]]),q0(l,gn(f,1),[])}),oc=nP||function(){return pn.Date.now()};function SM(l,f){if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){if(--l<1)return f.apply(this,arguments)}}function jy(l,f,g){return f=g?n:f,f=l&&f==null?l.length:f,hi(l,R,n,n,n,n,f)}function Hy(l,f){var g;if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=n),g}}var Th=Ye(function(l,f,g){var _=S;if(g.length){var T=Bi(g,As(Th));_|=A}return hi(l,_,f,g,T)}),Wy=Ye(function(l,f,g){var _=S|w;if(g.length){var T=Bi(g,As(Wy));_|=A}return hi(f,_,l,g,T)});function Gy(l,f,g){f=g?n:f;var _=hi(l,x,n,n,n,n,n,f);return _.placeholder=Gy.placeholder,_}function Vy(l,f,g){f=g?n:f;var _=hi(l,E,n,n,n,n,n,f);return _.placeholder=Vy.placeholder,_}function Xy(l,f,g){var _,T,k,B,j,Y,te=0,ne=!1,oe=!1,de=!0;if(typeof l!="function")throw new dr(s);f=vr(f)||0,Ft(g)&&(ne=!!g.leading,oe="maxWait"in g,k=oe?nn(vr(g.maxWait)||0,f):k,de="trailing"in g?!!g.trailing:de);function we(Yt){var Mr=_,yi=T;return _=T=n,te=Yt,B=l.apply(yi,Mr),B}function Ae(Yt){return te=Yt,j=Ka(Je,f),ne?we(Yt):B}function Xe(Yt){var Mr=Yt-Y,yi=Yt-te,db=f-Mr;return oe?wn(db,k-yi):db}function Ie(Yt){var Mr=Yt-Y,yi=Yt-te;return Y===n||Mr>=f||Mr<0||oe&&yi>=k}function Je(){var Yt=oc();if(Ie(Yt))return rt(Yt);j=Ka(Je,Xe(Yt))}function rt(Yt){return j=n,de&&_?we(Yt):(_=T=n,B)}function tr(){j!==n&&ry(j),te=0,_=Y=T=j=n}function On(){return j===n?B:rt(oc())}function nr(){var Yt=oc(),Mr=Ie(Yt);if(_=arguments,T=this,Y=Yt,Mr){if(j===n)return Ae(Y);if(oe)return ry(j),j=Ka(Je,f),we(Y)}return j===n&&(j=Ka(Je,f)),B}return nr.cancel=tr,nr.flush=On,nr}var EM=Ye(function(l,f){return N0(l,1,f)}),CM=Ye(function(l,f,g){return N0(l,vr(f)||0,g)});function TM(l){return hi(l,D)}function sc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new dr(s);var g=function(){var _=arguments,T=f?f.apply(this,_):_[0],k=g.cache;if(k.has(T))return k.get(T);var B=l.apply(this,_);return g.cache=k.set(T,B)||k,B};return g.cache=new(sc.Cache||fi),g}sc.Cache=fi;function ac(l){if(typeof l!="function")throw new dr(s);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function AM(l){return Hy(2,l)}var IM=p2(function(l,f){f=f.length==1&&$e(f[0])?Nt(f[0],Jn(Te())):Nt(gn(f,1),Jn(Te()));var g=f.length;return Ye(function(_){for(var T=-1,k=wn(_.length,g);++T=f}),Po=U0(function(){return arguments}())?U0:function(l){return Ut(l)&&bt.call(l,"callee")&&!A0.call(l,"callee")},$e=Z.isArray,HM=l0?Jn(l0):QP;function Bn(l){return l!=null&&lc(l.length)&&!mi(l)}function qt(l){return Ut(l)&&Bn(l)}function WM(l){return l===!0||l===!1||Ut(l)&&Rn(l)==le}var Hi=iP||$h,GM=u0?Jn(u0):JP;function VM(l){return Ut(l)&&l.nodeType===1&&!Qa(l)}function XM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Hi(l)||Is(l)||Po(l)))return!l.length;var f=_n(l);if(f==ge||f==ze)return!l.size;if(Ya(l))return!nh(l).length;for(var g in l)if(bt.call(l,g))return!1;return!0}function qM(l,f){return Va(l,f)}function YM(l,f,g){g=typeof g=="function"?g:n;var _=g?g(l,f):n;return _===n?Va(l,f,n,g):!!_}function Ih(l){if(!Ut(l))return!1;var f=Rn(l);return f==ve||f==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Qa(l)}function KM(l){return typeof l=="number"&&R0(l)}function mi(l){if(!Ft(l))return!1;var f=Rn(l);return f==ye||f==xe||f==ae||f==Bt}function Yy(l){return typeof l=="number"&&l==Ge(l)}function lc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function Ft(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Ut(l){return l!=null&&typeof l=="object"}var Ky=c0?Jn(c0):e2;function QM(l,f){return l===f||th(l,f,yh(f))}function JM(l,f,g){return g=typeof g=="function"?g:n,th(l,f,yh(f),g)}function ZM(l){return Qy(l)&&l!=+l}function ek(l){if(B2(l))throw new De(o);return j0(l)}function tk(l){return l===null}function nk(l){return l==null}function Qy(l){return typeof l=="number"||Ut(l)&&Rn(l)==be}function Qa(l){if(!Ut(l)||Rn(l)!=qe)return!1;var f=Du(l);if(f===null)return!0;var g=bt.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Ou.call(g)==JR}var Rh=f0?Jn(f0):t2;function rk(l){return Yy(l)&&l>=-W&&l<=W}var Jy=d0?Jn(d0):n2;function uc(l){return typeof l=="string"||!$e(l)&&Ut(l)&&Rn(l)==st}function er(l){return typeof l=="symbol"||Ut(l)&&Rn(l)==mt}var Is=h0?Jn(h0):r2;function ik(l){return l===n}function ok(l){return Ut(l)&&_n(l)==_e}function sk(l){return Ut(l)&&Rn(l)==Ue}var ak=Zu(rh),lk=Zu(function(l,f){return l<=f});function Zy(l){if(!l)return[];if(Bn(l))return uc(l)?Rr(l):Nn(l);if($a&&l[$a])return zR(l[$a]());var f=_n(l),g=f==ge?Wd:f==ze?Iu:Rs;return g(l)}function vi(l){if(!l)return l===0?l:0;if(l=vr(l),l===G||l===-G){var f=l<0?-1:1;return f*K}return l===l?l:0}function Ge(l){var f=vi(l),g=f%1;return f===f?g?f-g:f:0}function eb(l){return l?To(Ge(l),0,Q):0}function vr(l){if(typeof l=="number")return l;if(er(l))return q;if(Ft(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Ft(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=b0(l);var g=Dl.test(l);return g||zv.test(l)?SR(l.slice(2),g?2:8):Ll.test(l)?q:+l}function tb(l){return Jr(l,$n(l))}function uk(l){return l?To(Ge(l),-W,W):l===0?l:0}function ht(l){return l==null?"":Zn(l)}var ck=Cs(function(l,f){if(Ya(f)||Bn(f)){Jr(f,sn(f),l);return}for(var g in f)bt.call(f,g)&&Ha(l,g,f[g])}),nb=Cs(function(l,f){Jr(f,$n(f),l)}),cc=Cs(function(l,f,g,_){Jr(f,$n(f),l,_)}),fk=Cs(function(l,f,g,_){Jr(f,sn(f),l,_)}),dk=pi(Kd);function hk(l,f){var g=Es(l);return f==null?g:L0(g,f)}var pk=Ye(function(l,f){l=St(l);var g=-1,_=f.length,T=_>2?f[2]:n;for(T&&Pn(f[0],f[1],T)&&(_=1);++g<_;)for(var k=f[g],B=$n(k),j=-1,Y=B.length;++j1),k}),Jr(l,mh(l),g),_&&(g=pr(g,h|p|m,C2));for(var T=f.length;T--;)lh(g,f[T]);return g});function Mk(l,f){return ib(l,ac(Te(f)))}var kk=pi(function(l,f){return l==null?{}:s2(l,f)});function ib(l,f){if(l==null)return{};var g=Nt(mh(l),function(_){return[_]});return f=Te(f),Y0(l,g,function(_,T){return f(_,T[0])})}function Lk(l,f,g){f=Ui(f,l);var _=-1,T=f.length;for(T||(T=1,l=n);++_f){var _=l;l=f,f=_}if(g||l%1||f%1){var T=P0();return wn(l+T*(f-l+_R("1e-"+((T+"").length-1))),f)}return oh(l,f)}var Gk=Ts(function(l,f,g){return f=f.toLowerCase(),l+(g?ab(f):f)});function ab(l){return Mh(ht(l).toLowerCase())}function lb(l){return l=ht(l),l&&l.replace(Zt,DR).replace(dR,"")}function Vk(l,f,g){l=ht(l),f=Zn(f);var _=l.length;g=g===n?_:To(Ge(g),0,_);var T=g;return g-=f.length,g>=0&&l.slice(g,T)==f}function Xk(l){return l=ht(l),l&&ui.test(l)?l.replace(Wr,NR):l}function qk(l){return l=ht(l),l&&Ad.test(l)?l.replace(hs,"\\$&"):l}var Yk=Ts(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),Kk=Ts(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),Qk=fy("toLowerCase");function Jk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;if(!f||_>=f)return l;var T=(f-_)/2;return Ju(Fu(T),g)+l+Ju($u(T),g)}function Zk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;return f&&_>>0,g?(l=ht(l),l&&(typeof f=="string"||f!=null&&!Rh(f))&&(f=Zn(f),!f&&ys(l))?ji(Rr(l),0,g):l.split(f,g)):[]}var sL=Ts(function(l,f,g){return l+(g?" ":"")+Mh(f)});function aL(l,f,g){return l=ht(l),g=g==null?0:To(Ge(g),0,l.length),f=Zn(f),l.slice(g,g+f.length)==f}function lL(l,f,g){var _=P.templateSettings;g&&Pn(l,f,g)&&(f=n),l=ht(l),f=cc({},f,_,yy);var T=cc({},f.imports,_.imports,yy),k=sn(T),B=Hd(T,k),j,Y,te=0,ne=f.interpolate||Ir,oe="__p += '",de=Gd((f.escape||Ir).source+"|"+ne.source+"|"+(ne===ia?Kn:Ir).source+"|"+(f.evaluate||Ir).source+"|$","g"),we="//# sourceURL="+(bt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vR+"]")+` `;l.replace(de,function(Ie,Je,rt,tr,On,nr){return rt||(rt=tr),oe+=l.slice(te,nr).replace(qI,BR),Je&&(j=!0,oe+=`' + __e(`+Je+`) + '`),On&&(Y=!0,oe+=`'; @@ -232,13 +232,13 @@ __p += '`),rt&&(oe+=`' + `;var Ae=bt.call(f,"variable")&&f.variable;if(!Ae)oe=`with (obj) { `+oe+` } -`;else if(Na.test(Ae))throw new Le(a);oe=(Y?oe.replace(Gt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(Ae||"obj")+`) { +`;else if(Na.test(Ae))throw new De(a);oe=(Y?oe.replace(Gt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(Ae||"obj")+`) { `+(Ae?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Xe=cb(function(){return dt(k,we+"return "+oe).apply(n,B)});if(Xe.source=oe,Ih(Xe))throw Xe;return Xe}function uD(l){return ht(l).toLowerCase()}function cD(l){return ht(l).toUpperCase()}function fD(l,f,g){if(l=ht(l),l&&(g||f===n))return b0(l);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=Rr(f),k=x0(_,T),B=w0(_,T)+1;return ji(_,k,B).join("")}function dD(l,f,g){if(l=ht(l),l&&(g||f===n))return l.slice(0,S0(l)+1);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=w0(_,Rr(f))+1;return ji(_,0,T).join("")}function hD(l,f,g){if(l=ht(l),l&&(g||f===n))return l.replace(xo,"");if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=x0(_,Rr(f));return ji(_,T).join("")}function pD(l,f){var g=N,_=H;if(Ft(f)){var T="separator"in f?f.separator:T;g="length"in f?Ge(f.length):g,_="omission"in f?Zn(f.omission):_}l=ht(l);var k=l.length;if(ys(l)){var B=Rr(l);k=B.length}if(g>=k)return l;var j=g-bs(_);if(j<1)return _;var Y=B?ji(B,0,j).join(""):l.slice(0,j);if(T===n)return Y+_;if(B&&(j+=Y.length-j),Rh(T)){if(l.slice(j).search(T)){var te,ne=Y;for(T.global||(T=Gd(T.source,ht(lr.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;Y=Y.slice(0,oe===n?j:oe)}}else if(l.indexOf(Zn(T),j)!=j){var de=Y.lastIndexOf(T);de>-1&&(Y=Y.slice(0,de))}return Y+_}function gD(l){return l=ht(l),l&&Kr.test(l)?l.replace(Hr,WR):l}var mD=Ts(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),Mh=fy("toUpperCase");function ub(l,f,g){return l=ht(l),f=g?n:f,f===n?FR(l)?XR(l):PR(l):l.match(f)||[]}var cb=Ye(function(l,f){try{return Qn(l,n,f)}catch(g){return Ih(g)?g:new Le(g)}}),vD=pi(function(l,f){return fr(f,function(g){g=Zr(g),di(l,g,Th(l[g],l))}),l});function yD(l){var f=l==null?0:l.length,g=Te();return l=f?Nt(l,function(_){if(typeof _[1]!="function")throw new dr(s);return[g(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var g=Q,_=wn(l,Q);f=Te(f),l-=Q;for(var T=jd(_,f);++g0||f<0)?new et(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==n&&(f=Ge(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),_=/^(?:head|last)$/.test(f),T=P[_?"take"+(f=="last"?"Right":""):f],k=_||/^find/.test(f);T&&(P.prototype[f]=function(){var B=this.__wrapped__,j=_?[1]:arguments,Y=B instanceof et,te=j[0],ne=Y||$e(B),oe=function(Je){var rt=T.apply(P,Ni([Je],j));return _&&de?rt[0]:rt};ne&&g&&typeof te=="function"&&te.length!=1&&(Y=ne=!1);var de=this.__chain__,we=!!this.__actions__.length,Ae=k&&!de,Xe=Y&&!we;if(!k&&ne){B=Xe?B:new et(this);var Ie=l.apply(B,j);return Ie.__actions__.push({func:rc,args:[oe],thisArg:n}),new hr(Ie,de)}return Ae&&Xe?l.apply(this,j):(Ie=this.thru(oe),Ae?_?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Ru[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var k=this.value();return f.apply($e(k)?k:[],T)}return this[g](function(B){return f.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,f){var g=P[f];if(g){var _=g.name+"";bt.call(Ss,_)||(Ss[_]=[]),Ss[_].push({name:f,func:g})}}),Ss[Ku(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=gP,et.prototype.reverse=mP,et.prototype.value=vP,P.prototype.at=VO,P.prototype.chain=XO,P.prototype.commit=qO,P.prototype.next=YO,P.prototype.plant=QO,P.prototype.reverse=JO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=ZO,P.prototype.first=P.prototype.head,$a&&(P.prototype[$a]=KO),P},xs=qR();_o?((_o.exports=xs)._=xs,Dd._=xs):pn._=xs}).call(Kt)})(pC,pC.exports);var ie=pC.exports;function ai(e){return C.jsx(gt,{px:.5,display:"inline-block",...e})}function Dz({primary:e,secondary:t}){return C.jsxs(En,{children:[C.jsx(gt,{children:e}),C.jsx(ai,{}),C.jsx(gt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** +}`;var Xe=cb(function(){return dt(k,we+"return "+oe).apply(n,B)});if(Xe.source=oe,Ih(Xe))throw Xe;return Xe}function uL(l){return ht(l).toLowerCase()}function cL(l){return ht(l).toUpperCase()}function fL(l,f,g){if(l=ht(l),l&&(g||f===n))return b0(l);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=Rr(f),k=x0(_,T),B=w0(_,T)+1;return ji(_,k,B).join("")}function dL(l,f,g){if(l=ht(l),l&&(g||f===n))return l.slice(0,S0(l)+1);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=w0(_,Rr(f))+1;return ji(_,0,T).join("")}function hL(l,f,g){if(l=ht(l),l&&(g||f===n))return l.replace(xo,"");if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=x0(_,Rr(f));return ji(_,T).join("")}function pL(l,f){var g=N,_=H;if(Ft(f)){var T="separator"in f?f.separator:T;g="length"in f?Ge(f.length):g,_="omission"in f?Zn(f.omission):_}l=ht(l);var k=l.length;if(ys(l)){var B=Rr(l);k=B.length}if(g>=k)return l;var j=g-bs(_);if(j<1)return _;var Y=B?ji(B,0,j).join(""):l.slice(0,j);if(T===n)return Y+_;if(B&&(j+=Y.length-j),Rh(T)){if(l.slice(j).search(T)){var te,ne=Y;for(T.global||(T=Gd(T.source,ht(lr.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;Y=Y.slice(0,oe===n?j:oe)}}else if(l.indexOf(Zn(T),j)!=j){var de=Y.lastIndexOf(T);de>-1&&(Y=Y.slice(0,de))}return Y+_}function gL(l){return l=ht(l),l&&Kr.test(l)?l.replace(Hr,WR):l}var mL=Ts(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),Mh=fy("toUpperCase");function ub(l,f,g){return l=ht(l),f=g?n:f,f===n?FR(l)?XR(l):PR(l):l.match(f)||[]}var cb=Ye(function(l,f){try{return Qn(l,n,f)}catch(g){return Ih(g)?g:new De(g)}}),vL=pi(function(l,f){return fr(f,function(g){g=Zr(g),di(l,g,Th(l[g],l))}),l});function yL(l){var f=l==null?0:l.length,g=Te();return l=f?Nt(l,function(_){if(typeof _[1]!="function")throw new dr(s);return[g(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var g=Q,_=wn(l,Q);f=Te(f),l-=Q;for(var T=jd(_,f);++g0||f<0)?new et(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==n&&(f=Ge(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),_=/^(?:head|last)$/.test(f),T=P[_?"take"+(f=="last"?"Right":""):f],k=_||/^find/.test(f);T&&(P.prototype[f]=function(){var B=this.__wrapped__,j=_?[1]:arguments,Y=B instanceof et,te=j[0],ne=Y||$e(B),oe=function(Je){var rt=T.apply(P,Ni([Je],j));return _&&de?rt[0]:rt};ne&&g&&typeof te=="function"&&te.length!=1&&(Y=ne=!1);var de=this.__chain__,we=!!this.__actions__.length,Ae=k&&!de,Xe=Y&&!we;if(!k&&ne){B=Xe?B:new et(this);var Ie=l.apply(B,j);return Ie.__actions__.push({func:rc,args:[oe],thisArg:n}),new hr(Ie,de)}return Ae&&Xe?l.apply(this,j):(Ie=this.thru(oe),Ae?_?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Ru[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var k=this.value();return f.apply($e(k)?k:[],T)}return this[g](function(B){return f.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,f){var g=P[f];if(g){var _=g.name+"";bt.call(Ss,_)||(Ss[_]=[]),Ss[_].push({name:f,func:g})}}),Ss[Ku(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=gP,et.prototype.reverse=mP,et.prototype.value=vP,P.prototype.at=VO,P.prototype.chain=XO,P.prototype.commit=qO,P.prototype.next=YO,P.prototype.plant=QO,P.prototype.reverse=JO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=ZO,P.prototype.first=P.prototype.head,$a&&(P.prototype[$a]=KO),P},xs=qR();_o?((_o.exports=xs)._=xs,Ld._=xs):pn._=xs}).call(Kt)})(gC,gC.exports);var ie=gC.exports;function ai(e){return C.jsx(gt,{px:.5,display:"inline-block",...e})}function Dz({primary:e,secondary:t}){return C.jsxs(En,{children:[C.jsx(gt,{children:e}),C.jsx(ai,{}),C.jsx(gt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -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 gC=function(){return gC=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(Dxe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return Lxe(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 a="",u,c,d=[];for(u in o)c=o[u],c instanceof Object&&!(c instanceof Array)?d.push(u):a+=r.decl(u,c,i,s);a&&(a=i+"{"+a+"}",r.putRaw(s?s+"{"+a+"}":a));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}MQ.removeRule=$xe;var Fxe=MQ.removeRule,zxe=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,a;for(a in o)i[a]===void 0&&s.removeProperty(a);for(a in i)i[a]!==o[a]&&s.setProperty(t(a),i[a]);this.decl=i},n.prototype.del=function(){Fxe(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 a=o[s];for(var u in a)a[u].del()}for(var s in i)if(o[s]===void 0)for(var u in i[s]){var c=new n(u,s);c.diff(i[s][u]),i[s][u]=c}else{var d=o[s],h=i[s];for(var u in d)h[u]||d[u].del();for(var u in h){var c=d[u];c?(c.diff(h[u]),h[u]=c):(c=new n(u,s),c.diff(h[u]),h[u]=c)}}this.tree=i},e.VRule=n,e.VSheet=r};function QF(e,t,n,r){var i={},o=!1,s,a;for(s in t)a=t[s],typeof a!="object"&&(o=!0,i[s]=a);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(a=t[s],typeof a=="object")if(s[0]==="@")QF(e,a,n,s);else{var u=s.indexOf("&")>-1,c=n.split(",");if(u)for(var d=0;dt,Bz=(e,t)=>({...e,...t});function gu(e,{init:t,effect:n,reduce:r=Bz}={}){const i=O.createContext([e,ie.noop]);return[()=>O.useContext(i),({children:o})=>{const[s,a]=O.useReducer((c,d)=>{const h=r(c,d);return n==null||n({prev:c,next:h}),h},e),u=O.useMemo(()=>[s,a],[s,a]);return Mxe(async()=>{const c=await(t==null?void 0:t());c&&a(c)}),C.jsx(i.Provider,{value:u,children:o})}]}function ewe(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[LQ,twe]=gu([],{reduce:(e,t)=>[t,...e]}),NQ=O.createContext(()=>ie.noop);function mu(){return O.useContext(NQ)}function nwe({children:e}){const[t,n]=O.useState([]),[r,i]=O.useState(!1),[o,s]=O.useState(void 0),[,a]=LQ();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 u=O.useCallback((h,p)=>(n(m=>[...m,{message:C.jsx(Dz,{primary:h,secondary:p}),key:new Date().getTime()}]),a({content:ie.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}),()=>c()),[n]),c=(h,p)=>{p!=="clickaway"&&i(!1)},d=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(NQ.Provider,{value:u,children:e}),C.jsx(Gbe,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:c,TransitionProps:{onExited:d},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx($p,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:c,children:C.jsx(AQ,{})})})},o==null?void 0:o.key)]})}/*! +***************************************************************************** */var mC=function(){return mC=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(Lxe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return Dxe(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 a="",u,c,d=[];for(u in o)c=o[u],c instanceof Object&&!(c instanceof Array)?d.push(u):a+=r.decl(u,c,i,s);a&&(a=i+"{"+a+"}",r.putRaw(s?s+"{"+a+"}":a));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}kQ.removeRule=$xe;var Fxe=kQ.removeRule,zxe=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,a;for(a in o)i[a]===void 0&&s.removeProperty(a);for(a in i)i[a]!==o[a]&&s.setProperty(t(a),i[a]);this.decl=i},n.prototype.del=function(){Fxe(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 a=o[s];for(var u in a)a[u].del()}for(var s in i)if(o[s]===void 0)for(var u in i[s]){var c=new n(u,s);c.diff(i[s][u]),i[s][u]=c}else{var d=o[s],h=i[s];for(var u in d)h[u]||d[u].del();for(var u in h){var c=d[u];c?(c.diff(h[u]),h[u]=c):(c=new n(u,s),c.diff(h[u]),h[u]=c)}}this.tree=i},e.VRule=n,e.VSheet=r};function JF(e,t,n,r){var i={},o=!1,s,a;for(s in t)a=t[s],typeof a!="object"&&(o=!0,i[s]=a);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(a=t[s],typeof a=="object")if(s[0]==="@")JF(e,a,n,s);else{var u=s.indexOf("&")>-1,c=n.split(",");if(u)for(var d=0;dt,$z=(e,t)=>({...e,...t});function gu(e,{init:t,effect:n,reduce:r=$z}={}){const i=O.createContext([e,ie.noop]);return[()=>O.useContext(i),({children:o})=>{const[s,a]=O.useReducer((c,d)=>{const h=r(c,d);return n==null||n({prev:c,next:h}),h},e),u=O.useMemo(()=>[s,a],[s,a]);return Mxe(async()=>{const c=await(t==null?void 0:t());c&&a(c)}),C.jsx(i.Provider,{value:u,children:o})}]}function ewe(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[NQ,twe]=gu([],{reduce:(e,t)=>[t,...e]}),BQ=O.createContext(()=>ie.noop);function mu(){return O.useContext(BQ)}function nwe({children:e}){const[t,n]=O.useState([]),[r,i]=O.useState(!1),[o,s]=O.useState(void 0),[,a]=NQ();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 u=O.useCallback((h,p)=>(n(m=>[...m,{message:C.jsx(Dz,{primary:h,secondary:p}),key:new Date().getTime()}]),a({content:ie.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}),()=>c()),[n]),c=(h,p)=>{p!=="clickaway"&&i(!1)},d=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(BQ.Provider,{value:u,children:e}),C.jsx(Gbe,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:c,TransitionProps:{onExited:d},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx($p,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:c,children:C.jsx(IQ,{})})})},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 In(e,t){if(zA(e))for(let n=0;nt(e[n],n,e));return e}function fo(e,t){const n=yd(t);if(Js(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?IH(e,o,t):t.reduce((s,a)=>(s[a]=IH(e,o,a),s),i)}return i}e&&In(Zs(t),i=>ywe(e,i,t[i]))}const hl=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const a=(d,h)=>{const p=o,m=d,v=h||(r?!r(p,m):p!==m);return(v||i)&&(o=m,s=p),[o,v,s]};return[t?d=>a(t(o,s),d):a,d=>[o,!!d,s]]},Sw=()=>typeof window<"u",BQ=Sw()&&Node.ELEMENT_NODE,{toString:rwe,hasOwnProperty:HL}=Object.prototype,Qc=e=>e===void 0,FA=e=>e===null,iwe=e=>Qc(e)||FA(e)?`${e}`:rwe.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Xf=e=>typeof e=="number",yd=e=>typeof e=="string",$z=e=>typeof e=="boolean",Rl=e=>typeof e=="function",Js=e=>Array.isArray(e),Cx=e=>typeof e=="object"&&!Js(e)&&!FA(e),zA=e=>{const t=!!e&&e.length,n=Xf(t)&&t>-1&&t%1==0;return Js(e)||!Rl(e)&&n?t>0&&Cx(e)?t-1 in e:!0:!1},JF=e=>{if(!e||!Cx(e)||iwe(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=HL.call(e,n),s=i&&HL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Qc(t)||HL.call(e,t)},B1=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===BQ:!1},UA=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===BQ:!1},jA=(e,t,n)=>e.indexOf(t,n),Gn=(e,t,n)=>(!n&&!yd(t)&&zA(t)?Array.prototype.push.apply(e,t):e.push(t),e),Up=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Gn(n,r)}):In(e,r=>{Gn(n,r)}),n)},Fz=e=>!!e&&e.length===0,vu=(e,t,n)=>{In(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},HA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Zs=e=>e?Object.keys(e):[],Br=(e,t,n,r,i,o,s)=>{const a=[t,n,r,i,o,s];return(typeof e!="object"||FA(e))&&!Rl(e)&&(e={}),In(a,u=>{In(Zs(u),c=>{const d=u[c];if(e===d)return!0;const h=Js(d);if(d&&JF(d)){const p=e[c];let m=p;h&&!Js(p)?m=[]:!h&&!JF(p)&&(m={}),e[c]=Br(m,d)}else e[c]=h?d.slice():d})}),e},zz=e=>{for(const t in e)return!1;return!0},$Q=(e,t,n,r)=>{if(Qc(r))return n?n[e]:t;n&&(yd(r)||Xf(r))&&(n[e]=r)},No=(e,t,n)=>{if(Qc(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},FQ=(e,t)=>new Set((No(e,t)||"").split(" ")),Go=(e,t)=>{e&&e.removeAttribute(t)},_p=(e,t,n,r)=>{if(n){const i=FQ(e,t);i[r?"add":"delete"](n);const o=Up(i).join(" ").trim();No(e,t,o)}},owe=(e,t,n)=>FQ(e,t).has(n),wl=(e,t)=>$Q("scrollLeft",0,e,t),Pc=(e,t)=>$Q("scrollTop",0,e,t),ZF=Sw()&&Element.prototype,zQ=(e,t)=>{const n=[],r=t?UA(t)&&t:document;return r?Gn(n,r.querySelectorAll(e)):n},swe=(e,t)=>{const n=t?UA(t)&&t:document;return n?n.querySelector(e):null},mC=(e,t)=>UA(e)?(ZF.matches||ZF.msMatchesSelector).call(e,t):!1,Uz=e=>e?Up(e.childNodes):[],Uc=e=>e&&e.parentElement,Jg=(e,t)=>{if(UA(e)){const n=ZF.closest;if(n)return n.call(e,t);do{if(mC(e,t))return e;e=Uc(e)}while(e)}},awe=(e,t,n)=>{const r=Jg(e,t),i=e&&swe(n,r),o=Jg(i,t)===r;return r&&i?r===e||i===e||o&&Jg(Jg(e,n),t)!==r:!1},jz=(e,t,n)=>{if(n&&e){let r=t,i;zA(n)?(i=document.createDocumentFragment(),In(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)}},ma=(e,t)=>{jz(e,null,t)},lwe=(e,t)=>{jz(Uc(e),e,t)},CH=(e,t)=>{jz(Uc(e),e&&e.nextSibling,t)},fu=e=>{if(zA(e))In(Up(e),t=>fu(t));else if(e){const t=Uc(e);t&&t.removeChild(e)}},Sp=e=>{const t=document.createElement("div");return e&&No(t,"class",e),t},UQ=e=>{const t=Sp();return t.innerHTML=e.trim(),In(Uz(t),n=>fu(n))},e3=e=>e.charAt(0).toUpperCase()+e.slice(1),uwe=()=>Sp().style,cwe=["-webkit-","-moz-","-o-","-ms-"],fwe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],WL={},GL={},dwe=e=>{let t=GL[e];if(HA(GL,e))return t;const n=e3(e),r=uwe();return In(cwe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,e3(o)+n].find(a=>r[a]!==void 0))}),GL[e]=t||""},wv=e=>{if(Sw()){let t=WL[e]||window[e];return HA(WL,e)||(In(fwe,n=>(t=t||window[n+e3(e)],!t)),WL[e]=t),t}},hwe=wv("MutationObserver"),TH=wv("IntersectionObserver"),Zg=wv("ResizeObserver"),jQ=wv("cancelAnimationFrame"),HQ=wv("requestAnimationFrame"),t3=wv("ScrollTimeline"),vC=Sw()&&window.setTimeout,n3=Sw()&&window.clearTimeout,pwe=/[^\x20\t\r\n\f]+/g,WQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&yd(t)){const a=t.match(pwe)||[];for(s=a.length>0;i=a[o++];)s=!!n(r,i)&&s}return s},Hz=(e,t)=>{WQ(e,t,(n,r)=>n.remove(r))},rd=(e,t)=>(WQ(e,t,(n,r)=>n.add(r)),Hz.bind(0,e,t)),WA=(e,t,n,r)=>{if(e&&t){let i=!0;return In(n,o=>{const s=r?r(e[o]):e[o],a=r?r(t[o]):t[o];s!==a&&(i=!1)}),i}return!1},GQ=(e,t)=>WA(e,t,["w","h"]),VQ=(e,t)=>WA(e,t,["x","y"]),gwe=(e,t)=>WA(e,t,["t","r","b","l"]),AH=(e,t,n)=>WA(e,t,["width","height"],n&&(r=>Math.round(r))),Ns=()=>{},Zh=e=>{let t;const n=e?vC:HQ,r=e?n3:jQ;return[i=>{r(t),t=n(i,Rl(e)?e():e)},()=>r(t)]},Wz=(e,t)=>{let n,r,i,o=Ns;const{g:s,v:a,p:u}=t||{},c=function(v){o(),n3(n),n=r=void 0,o=Ns,e.apply(this,v)},d=m=>u&&r?u(r,m):m,h=()=>{o!==Ns&&c(d(i)||i)},p=function(){const v=Up(arguments),y=Rl(s)?s():s;if(Xf(y)&&y>=0){const w=Rl(a)?a():a,b=Xf(w)&&w>=0,x=y>0?vC:HQ,E=y>0?n3:jQ,I=d(v)||v,R=c.bind(0,I);o();const M=x(R,y);o=()=>E(M),b&&!n&&(n=vC(h,w)),r=i=I}else c(v)};return p.m=h,p},mwe={opacity:1,zIndex:1},R_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},vwe=(e,t)=>!mwe[e]&&Xf(t)?`${t}px`:t,IH=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),ywe=(e,t,n)=>{try{const{style:r}=e;Qc(r[t])?r.setProperty(t,n):r[t]=vwe(t,n)}catch{}},Vm=e=>fo(e,"direction")==="rtl",RH=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,a=`${r}bottom${i}`,u=`${r}left${i}`,c=fo(e,[o,s,a,u]);return{t:R_(c[o],!0),r:R_(c[s],!0),b:R_(c[a],!0),l:R_(c[u],!0)}},Xm=(e,t)=>`translate${Js(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:PH}=Math,Gz={w:0,h:0},Tx=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:Gz,oE=e=>e?{w:e.clientWidth,h:e.clientHeight}:Gz,yC=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:Gz,bC=e=>{const t=parseFloat(fo(e,"height"))||0,n=parseFloat(fo(e,"width"))||0;return{w:n-PH(n),h:t-PH(t)}},Yl=e=>e.getBoundingClientRect(),em=e=>!!(e&&(e.height||e.width));let P_;const bwe=()=>{if(Qc(P_)){P_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){P_=!0}}))}catch{}}return P_},XQ=e=>e.split(" "),xwe=(e,t,n,r)=>{In(XQ(t),i=>{e.removeEventListener(i,n,r)})},oi=(e,t,n,r)=>{var i;const o=bwe(),s=(i=o&&r&&r.S)!=null?i:o,a=r&&r.$||!1,u=r&&r.C||!1,c=[],d=o?{passive:s,capture:a}:a;return In(XQ(t),h=>{const p=u?m=>{e.removeEventListener(h,p,a),n&&n(m)}:n;Gn(c,xwe.bind(null,e,h,p,a)),e.addEventListener(h,p,d)}),vu.bind(0,c)},qQ=e=>e.stopPropagation(),YQ=e=>e.preventDefault(),wwe={x:0,y:0},VL=e=>{const t=e?Yl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:wwe},OH=(e,t)=>{In(Js(t)?t:[t],e)},Vz=e=>{const t=new Map,n=(o,s)=>{if(o){const a=t.get(o);OH(u=>{a&&a[u?"delete":"clear"](u)},s)}else t.forEach(a=>{a.clear()}),t.clear()},r=(o,s)=>{if(yd(o)){const c=t.get(o)||new Set;return t.set(o,c),OH(d=>{Rl(d)&&c.add(d)},s),n.bind(0,o,s)}$z(s)&&s&&n();const a=Zs(o),u=[];return In(a,c=>{const d=o[c];d&&Gn(u,r(c,d))}),vu.bind(0,u)},i=(o,s)=>{const a=t.get(o);In(Up(a),u=>{s&&!Fz(s)?u.apply(0,s):u()})};return r(e||{}),[r,n,i]},MH=e=>JSON.stringify(e,(t,n)=>{if(Rl(n))throw new Error;return n}),_we={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"]}},KQ=(e,t)=>{const n={},r=Zs(t).concat(Zs(e));return In(r,i=>{const o=e[i],s=t[i];if(Cx(o)&&Cx(s))Br(n[i]={},KQ(o,s)),zz(n[i])&&delete n[i];else if(HA(t,i)&&s!==o){let a=!0;if(Js(o)||Js(s))try{MH(o)===MH(s)&&(a=!1)}catch{}a&&(n[i]=s)}}),n},Ew="data-overlayscrollbars",QQ="os-environment",JQ=`${QQ}-flexbox-glue`,Swe=`${JQ}-max`,ZQ="os-scrollbar-hidden",XL=`${Ew}-initialize`,pl=Ew,eJ=`${pl}-overflow-x`,tJ=`${pl}-overflow-y`,mm="overflowVisible",Ewe="scrollbarHidden",kH="scrollbarPressed",xC="updating",mf=`${Ew}-viewport`,qL="arrange",nJ="scrollbarHidden",vm=mm,r3=`${Ew}-padding`,Cwe=vm,DH=`${Ew}-content`,Xz="os-size-observer",Twe=`${Xz}-appear`,Awe=`${Xz}-listener`,Iwe="os-trinsic-observer",Rwe="os-no-css-vars",Pwe="os-theme-none",cs="os-scrollbar",Owe=`${cs}-rtl`,Mwe=`${cs}-horizontal`,kwe=`${cs}-vertical`,rJ=`${cs}-track`,qz=`${cs}-handle`,Dwe=`${cs}-visible`,Lwe=`${cs}-cornerless`,LH=`${cs}-transitionless`,NH=`${cs}-interaction`,BH=`${cs}-unusable`,i3=`${cs}-auto-hide`,$H=`${i3}-hidden`,FH=`${cs}-wheel`,Nwe=`${rJ}-interactive`,Bwe=`${qz}-interactive`,iJ={},jp=()=>iJ,$we=e=>{const t=[];return In(Js(e)?e:[e],n=>{const r=Zs(n);In(r,i=>{Gn(t,iJ[i]=n[i])})}),t},Fwe="__osOptionsValidationPlugin",zwe="__osSizeObserverPlugin",Yz="__osScrollbarsHidingPlugin",Uwe="__osClickScrollPlugin";let YL;const zH=(e,t,n,r)=>{ma(e,t);const i=oE(t),o=Tx(t),s=bC(n);return r&&fu(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},jwe=e=>{let t=!1;const n=rd(e,ZQ);try{t=fo(e,dwe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},Hwe=(e,t)=>{const n="hidden";fo(e,{overflowX:n,overflowY:n,direction:"rtl"}),wl(e,0);const r=VL(e),i=VL(t);wl(e,-999);const o=VL(t);return{i:r.x===i.x,n:i.x!==o.x}},Wwe=(e,t)=>{const n=rd(e,JQ),r=Yl(e),i=Yl(t),o=AH(i,r,!0),s=rd(e,Swe),a=Yl(e),u=Yl(t),c=AH(u,a,!0);return n(),s(),o&&c},Gwe=()=>{const{body:e}=document,n=UQ(`
`)[0],r=n.firstChild,[i,,o]=Vz(),[s,a]=hl({o:zH(e,n,r),u:VQ},zH.bind(0,e,n,r,!0)),[u]=a(),c=jwe(n),d={x:u.x===0,y:u.y===0},h={elements:{host:null,padding:!c,viewport:b=>c&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Br({},_we),m=Br.bind(0,{},p),v=Br.bind(0,{},h),y={k:u,I:d,A:c,H:fo(n,"zIndex")==="-1",B:!!t3,V:Hwe(n,r),Y:Wwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Br(h,b)&&v(),G:m,X:b=>Br(p,b)&&m(),U:Br({},h),W:Br({},p)},S=window.addEventListener,w=Wz(b=>o(b?"z":"r"),{g:33,v:99});if(Go(n,"style"),fu(n),S("resize",w.bind(0,!1)),!c&&(!d.x||!d.y)){let b;S("resize",()=>{const x=jp()[Yz];b=b||x&&x.R(),b&&b(y,s,w.bind(0,!0))})}return y},fs=()=>(YL||(YL=Gwe()),YL),Kz=(e,t)=>Rl(t)?t.apply(0,e):t,Vwe=(e,t,n,r)=>{const i=Qc(r)?n:r;return Kz(e,i)||t.apply(0,e)},oJ=(e,t,n,r)=>{const i=Qc(r)?n:r,o=Kz(e,i);return!!o&&(B1(o)?o:t.apply(0,e))},Xwe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=fs(),{nativeScrollbarsOverlaid:a,body:u}=t,c=r??a,d=Qc(i)?u:i,h=(o.x||o.y)&&c,p=e&&(FA(d)?!s:d);return!!h||!!p},Qz=new WeakMap,qwe=(e,t)=>{Qz.set(e,t)},Ywe=e=>{Qz.delete(e)},sJ=e=>Qz.get(e),UH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&HA(n,r)?n[r]:void 0,e):void 0,o3=(e,t,n)=>r=>[UH(e,r),n||UH(t,r)!==void 0],aJ=e=>{let t=e;return[()=>t,n=>{t=Br({},t,n)}]},O_="tabindex",M_=Sp.bind(0,""),KL=e=>{ma(Uc(e),Uz(e)),fu(e)},Kwe=e=>{const t=fs(),{q:n,A:r}=t,i=jp()[Yz],o=i&&i.T,{elements:s}=n(),{host:a,padding:u,viewport:c,content:d}=s,h=B1(e),p=h?{}:e,{elements:m}=p,{host:v,padding:y,viewport:S,content:w}=m||{},b=h?e:p.target,x=mC(b,"textarea"),E=b.ownerDocument,A=E.documentElement,I=b===E.body,R=E.defaultView,M=Vwe.bind(0,[b]),L=oJ.bind(0,[b]),N=Kz.bind(0,[b]),H=M.bind(0,M_,c),V=L.bind(0,M_,d),U=H(S),D=U===b,F=D&&I,z=!D&&V(w),G=!D&&B1(U)&&U===z,W=G&&!!N(d),K=W?H():U,q=W?z:V(),re=F?A:G?K:U,ue=x?M(M_,a,v):b,ce=F?re:ue,se=G?q:z,J=E.activeElement,ae=!D&&R.top===R&&J===b,le={Z:b,J:ce,K:re,tt:!D&&L(M_,u,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?A:re,et:F?E:re,ct:R,rt:E,lt:x,it:I,ut:h,ft:D,dt:G,_t:(st,mt)=>owe(re,D?pl:mf,D?mt:st),ht:(st,mt,vt)=>_p(re,D?pl:mf,D?mt:st,vt)},he=Zs(le).reduce((st,mt)=>{const vt=le[mt];return Gn(st,vt&&B1(vt)&&!Uc(vt)?vt:!1)},[]),pe=st=>st?jA(he,st)>-1:null,{Z:ve,J:ye,tt:xe,K:ge,nt:be,ot:Ze}=le,qe=[()=>{Go(ye,pl),Go(ye,XL),Go(ve,XL),I&&(Go(A,pl),Go(A,XL))}],ut=x&&pe(ye);let Bt=x?ve:Uz([be,ge,xe,ye,ve].find(st=>pe(st)===!1));const Oe=F?ve:be||ge;return[le,()=>{No(ye,pl,D?"viewport":"host"),No(xe,r3,""),No(be,DH,""),D||No(ge,mf,"");const st=I&&!D?rd(Uc(b),ZQ):Ns;if(ut&&(CH(ve,ye),Gn(qe,()=>{CH(ye,ve),fu(ye)})),ma(Oe,Bt),ma(ye,xe),ma(xe||ye,!D&&ge),ma(ge,be),Gn(qe,()=>{st(),Go(xe,r3),Go(be,DH),Go(ge,eJ),Go(ge,tJ),Go(ge,mf),pe(be)&&KL(be),pe(ge)&&KL(ge),pe(xe)&&KL(xe)}),r&&!D&&(_p(ge,mf,nJ,!0),Gn(qe,Go.bind(0,ge,mf))),Ze&&(lwe(ge,Ze),Gn(qe,fu.bind(0,Ze))),ae){const mt=No(ge,O_);No(ge,O_,"-1"),ge.focus();const vt=()=>mt?No(ge,O_,mt):Go(ge,O_),_e=oi(E,"pointerdown keydown",()=>{vt(),_e()});Gn(qe,[vt,_e])}else J&&J.focus&&J.focus();Bt=0},vu.bind(0,qe)]},Qwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=fs(),{gt:s}=r(),{vt:a}=i,u=(n||!o)&&a;return u&&fo(n,{height:s?"":"100%"}),{wt:u,bt:u}}},Jwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:a}=e,[u,c]=hl({u:gwe,o:RH()},RH.bind(0,i,"padding",""));return(d,h,p)=>{let[m,v]=c(p);const{A:y,Y:S}=fs(),{yt:w}=n(),{wt:b,bt:x,St:E}=d,[A,I]=h("paddingAbsolute");(b||v||!S&&x)&&([m,v]=u(p));const M=!a&&(I||E||v);if(M){const L=!A||!o&&!y,N=m.r+m.l,H=m.t+m.b,V={marginRight:L&&!w?-N:0,marginBottom:L?-H:0,marginLeft:L&&w?-N:0,top:L?-m.t:0,right:L?w?-m.r:"auto":0,left:L?w?"auto":-m.l:0,width:L?`calc(100% + ${N}px)`:""},U={paddingTop:L?m.t:0,paddingRight:L?m.r:0,paddingBottom:L?m.b:0,paddingLeft:L?m.l:0};fo(o||s,V),fo(s,U),r({tt:m,$t:!L,P:o?U:Br({},V,U)})}return{xt:M}}},{max:s3}=Math,vf=s3.bind(0,0),lJ="visible",jH="hidden",Zwe=42,k_={u:GQ,o:{w:0,h:0}},e_e={u:VQ,o:{x:jH,y:jH}},t_e=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:vf(e.w-t.w),h:vf(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},D_=e=>e.indexOf(lJ)===0,n_e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:a,ft:u,ht:c,it:d,ct:h}=e,{k:p,Y:m,A:v,I:y}=fs(),S=jp()[Yz],w=!u&&!v&&(y.x||y.y),b=d&&u,[x,E]=hl(k_,bC.bind(0,s)),[A,I]=hl(k_,yC.bind(0,s)),[R,M]=hl(k_),[L,N]=hl(k_),[H]=hl(e_e),V=(W,K)=>{if(fo(s,{height:""}),K){const{$t:q,tt:Q}=n(),{Ct:re,M:ue}=W,ce=bC(i),se=oE(i),J=fo(s,"boxSizing")==="content-box",ae=q||J?Q.b+Q.t:0,le=!(y.x&&J);fo(s,{height:se.h+ce.h+(re.x&&le?ue.x:0)-ae})}},U=(W,K)=>{const q=!v&&!W?Zwe:0,Q=(pe,ve,ye)=>{const xe=fo(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?q:ye:0,ve&&!!q]},[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,q,Q)=>{const re=(ae,le)=>{const he=D_(ae),pe=le&&he&&ae.replace(`${lJ}-`,"")||"";return[le&&!he?ae:"",D_(pe)?"hidden":pe]},[ue,ce]=re(q.x,K.x),[se,J]=re(q.y,K.y);return Q.overflowX=ce&&se?ce:ue,Q.overflowY=J&&ue?J:se,U(W,Q)},F=(W,K,q,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,xe=le[pe],ge=le.paddingBottom;Q.width=`calc(100% + ${ae+ve*-1}px)`,Q[he]=-ae+ve,Q.marginBottom=-J+ye,q&&(Q[pe]=xe+(se?ae:0),Q.paddingBottom=ge+(ce?J:0))},[z,G]=S?S.L(w,m,s,a,n,U,F):[()=>w,()=>[Ns]];return(W,K,q)=>{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"),xe=he&&y.x&&y.y,ge=!u&&!m&&(Q||ue||re||pe||se),be=D_(ve.x),Ze=D_(ve.y),qe=be||Ze;let ut=E(q),Bt=I(q),Oe=M(q),ze=N(q),st;if(pe&&v&&c(nJ,Ewe,!xe),ge&&(st=U(xe),V(st,ae)),Q||ce||ue||J||pe){qe&&c(vm,mm,!1);const[Pe,He]=G(xe,le,st),[xt,Gt]=ut=x(q),[yn,Yr]=Bt=A(q),Hr=oE(s);let Wr=yn,Kr=Hr;Pe(),(Yr||Gt||pe)&&He&&!xe&&z(He,yn,xt,le)&&(Kr=oE(s),Wr=yC(s));const ui={w:vf(s3(yn.w,Wr.w)+xt.w),h:vf(s3(yn.h,Wr.h)+xt.h)},ds={w:vf((b?h.innerWidth:Kr.w+vf(Hr.w-yn.w))+xt.w),h:vf((b?h.innerHeight+xt.h:Kr.h+vf(Hr.h-yn.h))+xt.h)};ze=L(ds),Oe=R(t_e(ui,ds),q)}const[mt,vt]=ze,[_e,Ue]=Oe,[Ke,Fe]=Bt,[Be,Ot]=ut,ft={x:_e.w>0,y:_e.h>0},Re=be&&Ze&&(ft.x||ft.y)||be&&ft.x&&!ft.y||Ze&&ft.y&&!ft.x;if(ce||J||Ot||Fe||vt||Ue||ye||pe||ge){const Pe={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},He=D(xe,ft,ve,Pe),xt=z(He,Ke,Be,le);u||F(He,le,xt,Pe),ge&&V(He,ae),u?(No(i,eJ,Pe.overflowX),No(i,tJ,Pe.overflowY)):fo(s,Pe)}_p(i,pl,mm,Re),_p(o,r3,Cwe,Re),u||_p(s,mf,vm,qe);const[at,$t]=H(U(xe).Ot);return r({Ot:at,zt:{x:mt.w,y:mt.h},Et:{x:_e.w,y:_e.h},At:ft}),{It:$t,Ht:vt,Lt:Ue}}},HH=(e,t,n)=>{const r={},i=t||{},o=Zs(e).concat(Zs(i));return In(o,s=>{const a=e[s],u=i[s];r[s]=!!(n||a||u)}),r},r_e=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:a,Y:u}=fs(),c=!s&&(a.x||a.y),d=[Qwe(e,t),Jwe(e,t),n_e(e,t)];return(h,p,m)=>{const v=HH(Br({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},m),y=c||!u,S=y&&wl(r),w=y&&Pc(r);i("",xC,!0);let b=v;return In(d,x=>{b=HH(b,x(b,h,!!m)||{},m)}),wl(r,S),Pc(r,w),i("",xC),o||(wl(n,0),Pc(n,0)),b}},i_e=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=a=>{if(n){const u=n.reduce((c,d)=>{if(d){const[h,p]=d,m=p&&h&&(a?a(h):zQ(h,e));m&&m.length&&p&&yd(p)&&Gn(c,[m,p.trim()],!0)}return c},[]);In(u,c=>In(c[0],d=>{const h=c[1],p=r.get(d)||[];if(e.contains(d)){const v=oi(d,h,y=>{i?(v(),r.delete(d)):t(y)});r.set(d,Gn(p,v))}else vu(p),r.delete(d)}))}};return n&&(r=new WeakMap,s()),[o,s]},WH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:a,kt:u,Bt:c,Vt:d}=r||{},h=Wz(()=>i&&n(!0),{g:33,v:99}),[p,m]=i_e(e,h,a),v=o||[],y=s||[],S=v.concat(y),w=(x,E)=>{const A=c||Ns,I=d||Ns,R=new Set,M=new Set;let L=!1,N=!1;if(In(x,H=>{const{attributeName:V,target:U,type:D,oldValue:F,addedNodes:z,removedNodes:G}=H,W=D==="attributes",K=D==="childList",q=e===U,Q=W&&yd(V)?No(U,V):0,re=Q!==0&&F!==Q,ue=jA(y,V)>-1&&re;if(t&&(K||!q)){const ce=!W,se=W&&re,J=se&&u&&mC(U,u),le=(J?!A(U,V,F,Q):ce||se)&&!I(H,!!J,e,r);In(z,he=>R.add(he)),In(G,he=>R.add(he)),N=N||le}!t&&q&&re&&!A(U,V,F,Q)&&(M.add(V),L=L||ue)}),R.size>0&&m(H=>Up(R).reduce((V,U)=>(Gn(V,zQ(H,U)),mC(U,H)?Gn(V,U):V),[])),t)return!E&&N&&n(!1),[!1];if(M.size>0||L){const H=[Up(M),L];return!E&&n.apply(0,H),H}},b=new hwe(x=>w(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!Fz(x)&&w(x,!0)}}]},L_=3333333,uJ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=jp()[zwe],{V:s}=fs(),u=UQ(`
`)[0],c=u.firstChild,d=Vm.bind(0,e),[h]=hl({o:!1,_:!0,u:(v,y)=>!(!v||!em(v)&&em(y))}),p=v=>{const y=Js(v)&&v.length>0&&Cx(v[0]),S=!y&&$z(v[0]);let w=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),I=em(E),R=em(A);w=!A&&!!R||!I,b=!R&&I,x=!w}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Vm(u);wl(u,E?s.n?-L_:s.i?0:L_:L_),Pc(u,L_)}w||t({wt:!S,jt:S?v:void 0,Pt:!!b})},m=[];return[()=>{vu(m),fu(u)},()=>{let v=i&&p;if(Zg){const y=new Zg(p);y.observe(c),Gn(m,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(c,p,i);v=y,Gn(m,S)}if(r){const[y]=hl({o:void 0},d);Gn(m,oi(u,"scroll",S=>{const w=y(),[b,x,E]=w;x&&(Hz(c,"ltr rtl"),rd(c,b?"rtl":"ltr"),p([!!b,x,E])),qQ(S)}))}v&&(rd(u,Twe),Gn(m,oi(u,"animationstart",v,{C:!!Zg}))),(Zg||o)&&ma(e,u)}]},o_e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,s_e=(e,t)=>{let n;const r=Sp(Iwe),i=[],[o]=hl({o:!1}),s=(u,c)=>{if(u){const d=o(o_e(u)),[,h]=d;return h&&!c&&t(d)&&[d]}},a=(u,c)=>u&&u.length>0&&s(u.pop(),c);return[()=>{vu(i),fu(r)},()=>{if(TH)n=new TH(u=>a(u),{root:e}),n.observe(r),Gn(i,()=>{n.disconnect()});else{const u=()=>{const h=Tx(r);s(h)},[c,d]=uJ(r,u);Gn(i,c),d(),u()}ma(e,r)},()=>n&&a(n.takeRecords(),!0)]},GH=`[${pl}]`,a_e=`[${mf}]`,QL=["tabindex"],VH=["wrap","cols","rows"],JL=["id","class","style","open"],l_e=(e,t,n)=>{let r,i,o;const{J:s,K:a,nt:u,lt:c,ft:d,_t:h,ht:p}=e,{Y:m}=fs(),[v]=hl({u:GQ,o:{w:0,h:0}},()=>{const F=h(vm,mm),z=h(qL,""),G=z&&wl(a),W=z&&Pc(a);p(vm,mm),p(qL,""),p("",xC,!0);const K=yC(u),q=yC(a),Q=bC(a);return p(vm,mm,F),p(qL,"",z),p("",xC),wl(a,G),Pc(a,W),{w:q.w+K.w+Q.w,h:q.h+K.h+Q.h}}),y=c?VH:JL.concat(VH),S=Wz(n,{g:()=>r,v:()=>i,p(F,z){const[G]=F,[W]=z;return[Zs(G).concat(Zs(W)).reduce((K,q)=>(K[q]=G[q]||W[q],K),{})]}}),w=F=>{In(F||QL,z=>{if(jA(QL,z)>-1){const G=No(s,z);yd(G)?No(a,z,G):Go(a,z)}})},b=(F,z)=>{const[G,W]=F,K={vt:W};return t({gt:G}),!z&&n(K),K},x=({wt:F,jt:z,Pt:G})=>{const W=!F||G?n:S;let K=!1;if(z){const[q,Q]=z;K=Q,t({yt:q})}W({wt:F,Pt:G,St:K})},E=(F,z)=>{const[,G]=v(),W={bt:G};return G&&!z&&(F?n:S)(W),W},A=(F,z,G)=>{const W={Tt:z};return z?!G&&S(W):d||w(F),W},[I,R,M]=u||!m?s_e(s,b):[Ns,Ns,Ns],[L,N]=d?[Ns,Ns]:uJ(s,x,{Pt:!0,Yt:!0}),[H,V]=WH(s,!1,A,{Dt:JL,Mt:JL.concat(QL)});let U;const D=d&&Zg&&new Zg(F=>{const z=F[F.length-1].contentRect,G=em(z),K=!em(U)&&G;x({wt:!0,Pt:K}),U=z});return[()=>{I(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),w(),N(),R()},()=>{const F={},z=V(),G=M(),W=o&&o[1]();return z&&Br(F,A.apply(0,Gn(z,!0))),G&&Br(F,b.apply(0,Gn(G,!0))),W&&Br(F,E.apply(0,Gn(W,!0))),F},F=>{const[z]=F("update.ignoreMutation"),[G,W]=F("update.attributes"),[K,q]=F("update.elementEvents"),[Q,re]=F("update.debounce"),ue=q||W,ce=se=>Rl(z)&&z(se);if(ue&&(o&&(o[1](),o[0]()),o=WH(u||a,!0,E,{Mt:y.concat(G||[]),Rt:K,kt:GH,Vt:(se,J)=>{const{target:ae,attributeName:le}=se;return(!J&&le&&!d?awe(ae,GH,a_e):!1)||!!Jg(ae,`.${cs}`)||!!ce(se)}})),re)if(S.m(),Js(Q)){const se=Q[0],J=Q[1];r=Xf(se)&&se,i=Xf(J)&&J}else Xf(Q)?(r=Q,i=!1):(r=!1,i=!1)}]},XH={x:0,y:0},u_e=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:XH,Et:XH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Vm(e.J)}),c_e=(e,t)=>{const n=o3(t,{}),[r,i,o]=Vz(),[s,a,u]=Kwe(e),c=aJ(u_e(s)),[d,h]=c,p=r_e(s,c),m=(x,E,A)=>{const R=Zs(x).some(M=>!!x[M])||!zz(E)||A;return R&&o("u",[x,E,A]),R},[v,y,S,w]=l_e(s,h,x=>m(p(n,x),{},!1)),b=d.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:I}=s,R=I?A.documentElement:x,M=wl(R),L=Pc(R);y(),a(),wl(E,M),Pc(E,L)},b.Ft=s,[(x,E)=>{const A=o3(t,x,E);return w(A),m(p(A,S(),E),x,!!E)},b,()=>{i(),v(),u()}]},{round:qH}=Math,f_e=e=>{const{width:t,height:n}=Yl(e),{w:r,h:i}=Tx(e);return{x:qH(t)/r||1,y:qH(n)/i||1}},d_e=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:a}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(a||[]).includes(s)},YH="pointerup pointerleave pointercancel lostpointercapture",h_e=(e,t)=>oi(e,"mousedown",oi.bind(0,t,"click",qQ,{C:!0,$:!0}),{$:!0}),p_e=(e,t,n,r,i,o,s)=>{const{V:a}=fs(),{Gt:u,Xt:c,Ut:d}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,m=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",w=(b,x)=>E=>{const{Et:A}=o(),I=Tx(c)[y]-Tx(u)[y],M=x*E/I*A[S],N=Vm(d)&&s?a.n||a.i?1:-1:1;i[h]=b+M*N};return oi(c,"pointerdown",b=>{const x=Jg(b.target,`.${qz}`)===u,E=x?u:c;if(_p(t,pl,kH,!0),d_e(b,e,x)){const A=!x&&b.shiftKey,I=()=>Yl(u),R=()=>Yl(c),M=(K,q)=>(K||I())[v]-(q||R())[v],L=w(i[h]||0,1/f_e(i)[S]),N=b[p],H=I(),V=R(),U=H[m],D=M(H,V)+U/2,F=N-V[v],z=x?0:F-D,G=K=>{vu(W),E.releasePointerCapture(K.pointerId)},W=[_p.bind(0,t,pl,kH),oi(n,YH,G),oi(n,"selectstart",K=>YQ(K),{S:!1}),oi(c,YH,G),oi(c,"pointermove",K=>{const q=K[p]-N;(x||A)&&L(z+q)})];if(A)L(z);else if(!x){const K=jp()[Uwe];K&&Gn(W,K.O(L,M,z,U,F))}E.setPointerCapture(b.pointerId)}})},g_e=(e,t)=>(n,r,i,o,s,a,u)=>{const{Ut:c}=n,[d,h]=Zh(333),p=!!s.scrollBy;let m=!0;return vu.bind(0,[oi(c,"pointerenter",()=>{r(NH,!0)}),oi(c,"pointerleave pointercancel",()=>{r(NH)}),oi(c,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:w}=v;p&&m&&w===0&&Uc(c)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),m=!1,r(FH,!0),d(()=>{m=!0,r(FH)}),YQ(v)},{S:!1,$:!0}),h_e(c,i),p_e(e,o,i,n,s,t,u),h])},{min:wC,max:a3,round:m_e}=Math,cJ=(e,t,n,r)=>{if(r){const a=n?"x":"y",{Et:u,zt:c}=r,d=c[a],h=u[a];return a3(0,wC(1,d/(d+h)))}const i=n?"width":"height",o=Yl(e)[i],s=Yl(t)[i];return a3(0,wC(1,o/s))},v_e=(e,t,n,r,i,o)=>{const{V:s}=fs(),a=o?"x":"y",u=o?"Left":"Top",{Et:c}=r,d=m_e(c[a]),h=wC(d,a3(0,n[`scroll${u}`])),p=o&&i,m=s.i?h:d-h,y=wC(1,(p?m:h)/d),S=cJ(e,t,o);return 1/S*(1-S)*y},fJ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),y_e=(e,t)=>({transform:[Xm("0%",t),Xm(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),b_e=e=>`${Math.max(0,e-.5)}px`,KH=(e,t,n,r)=>fJ(e,t,{transform:[Xm("0px",r),Xm(b_e(n),r)]},"add"),QH=(e,t)=>t3?new t3({source:e,axis:t}):null,x_e=(e,t,n)=>{const{q:r,H:i}=fs(),{scrollbars:o}=r(),{slot:s}=o,{rt:a,Z:u,J:c,K:d,ut:h,st:p,it:m,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},w=new Map,b=QH(p,"x"),x=QH(p,"y"),E=oJ([u,c,d],()=>v&&m?u:c,s,S),A=se=>v&&!m&&Uc(se)===d,I=se=>{w.forEach((J,ae)=>{(se?jA(Js(se)?se:[se],ae)>-1:!0)&&((J||[]).forEach(he=>{he&&he.cancel()}),w.delete(ae))})},R=(se,J,ae)=>{const le=ae?rd:Hz;In(se,he=>{le(he.Ut,J)})},M=(se,J)=>{In(se,ae=>{const[le,he]=J(ae);fo(le,he)})},L=(se,J,ae)=>{M(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(cJ(he,pe,ae,J)*100).toFixed(3)}%`}]})},N=(se,J,ae)=>{!x&&!x&&M(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=v_e(he,pe,p,J,Vm(ve),ae);return[he,{transform:ye===ye?Xm(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:J}=se,ae=A(J)&&J;return[ae,{transform:ae?Xm([`${wl(p)}px`,`${Pc(p)}px`]):""}]},V=[],U=[],D=[],F=(se,J,ae)=>{const le=$z(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)},G=se=>{N(U,se,!0),N(D,se)},W=()=>{const se=(J,{Ut:ae,Gt:le})=>{I(le),w.set(le,[fJ(le,J?b:x,y_e(J&&Vm(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))},q=({Et:se})=>{D.concat(U).forEach(({Ut:J})=>{I(J),A(J)&&w.set(J,[KH(J,b,se.x,!0),KH(J,x,se.y)])})},Q=se=>{const J=se?Mwe:kwe,ae=se?U:D,le=Fz(ae)?LH:"",he=Sp(`${cs} ${J} ${le}`),pe=Sp(rJ),ve=Sp(qz),ye={Ut:he,Xt:pe,Gt:ve};return i||rd(he,Rwe),ma(he,pe),ma(pe,ve),Gn(ae,ye),Gn(V,[fu.bind(0,he),I,n(ye,F,a,c,p,se?b:x,se)]),ye},re=Q.bind(0,!0),ue=Q.bind(0,!1),ce=()=>{ma(E,U[0].Ut),ma(E,D[0].Ut),vC(()=>{F(LH)},300)};return re(),ue(),[{Wt:z,Zt:G,Jt:W,Kt:q,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,vu.bind(0,V)]},ZL=e=>e.pointerType==="mouse",w_e=(e,t,n,r)=>{let i,o,s,a,u,c=Ns,d=0;const h=aJ({}),[p]=h,[m,v]=Zh(),[y,S]=Zh(),[w,b]=Zh(100),[x,E]=Zh(100),[A,I]=Zh(100),[R,M]=Zh(()=>d),[L,N,H]=x_e(e,n.Ft,g_e(t,n)),{J:V,et:U,it:D}=n.Ft,{tn:F,Wt:z,Zt:G,Jt:W,Kt:K,Qt:q}=L,Q=J=>{F(i3,J,!0),F(i3,J,!1)},re=(J,ae)=>{if(M(),J)F($H);else{const le=()=>F($H,!0);d>0&&!ae?R(le):le()}},ue=J=>{ZL(J)&&(a=o,a&&re(!0))},ce=[b,M,E,I,S,v,H,oi(V,"pointerover",ue,{C:!0}),oi(V,"pointerenter",ue),oi(V,"pointerleave",J=>{ZL(J)&&(a=!1,o&&re(!1))}),oi(V,"pointermove",J=>{ZL(J)&&i&&m(()=>{b(),re(!0),x(()=>{i&&re(!1)})})}),oi(U,"scroll",J=>{y(()=>{G(n()),s&&re(!0),w(()=>{s&&!a&&re(!1)})}),r(J),q()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(J,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:ge}=fs(),be=o3(t,J,ae),Ze=n(),{Et:qe,Ot:ut,yt:Bt,At:Oe}=Ze,[ze,st]=be("showNativeOverlaidScrollbars"),[mt,vt]=be("scrollbars.theme"),[_e,Ue]=be("scrollbars.visibility"),[Ke,Fe]=be("scrollbars.autoHide"),[Be,Ot]=be("scrollbars.autoHideSuspend"),[ft]=be("scrollbars.autoHideDelay"),[Re,at]=be("scrollbars.dragScroll"),[$t,Pe]=be("scrollbars.clickScroll"),He=xe&&!ae,xt=Oe.x||Oe.y,Gt=he||pe||ye,yn=ve||Ue,Yr=ze&&ge.x&&ge.y,Hr=(Wr,Kr)=>{const ui=_e==="visible"||_e==="auto"&&Wr==="scroll";return F(Dwe,ui,Kr),ui};if(d=ft,He&&(Be&&xt?(Q(!1),c(),A(()=>{c=oi(U,"scroll",Q.bind(0,!0),{C:!0})})):Q(!0)),st&&F(Pwe,Yr),vt&&(F(u),F(mt,!0),u=mt),Ot&&!Be&&Q(!0),Fe&&(i=Ke==="move",o=Ke==="leave",s=Ke!=="never",re(!s,!0)),at&&F(Bwe,Re),Pe&&F(Nwe,$t),yn){const Wr=Hr(ut.x,!0),Kr=Hr(ut.y,!1);F(Lwe,!(Wr&&Kr))}Gt&&(z(Ze),G(Ze),W(Ze),K(Ze),q(),F(BH,!qe.x,!0),F(BH,!qe.y,!1),F(Owe,Bt&&!D))},se,()=>{vu(ce),c()}]},dJ=(e,t,n)=>{Rl(e)&&e(t||void 0,n||void 0)},Pf=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=fs(),a=jp(),u=B1(e),c=u?e:e.target,d=sJ(c);if(t&&!d){let h=!1;const p=U=>{const D=jp()[Fwe],F=D&&D.O;return F?F(U,!0):U},m=Br({},r(),p(t)),[v,y,S]=Vz(n),[w,b,x]=c_e(e,m),[E,A,I]=w_e(e,m,b,U=>S("scroll",[V,U])),R=(U,D)=>w(U,!!D),M=R.bind(0,{},!0),L=o(M),N=s(M),H=U=>{Ywe(c),L(),N(),I(),x(),h=!0,S("destroyed",[V,!!U]),y()},V={options(U,D){if(U){const F=D?r():{},z=KQ(m,Br(F,p(U)));zz(z)||(Br(m,z),R(z))}return Br({},m)},on:v,off:(U,D)=>{U&&D&&y(U,D)},state(){const{zt:U,Et:D,Ot:F,At:z,tt:G,$t:W,yt:K}=b();return Br({},{overflowEdge:U,overflowAmount:D,overflowStyle:F,hasOverflow:z,padding:G,paddingAbsolute:W,directionRTL:K,destroyed:h})},elements(){const{Z:U,J:D,tt:F,K:z,nt:G,st:W,et:K}=b.Ft,{nn:q,rn:Q}=A.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 Br({},ae,{clone:()=>{const le=re(J());return E({},!0,{}),le}})};return Br({},{target:U,host:D,padding:F||z,viewport:z,content:G||z,scrollOffsetElement:W,scrollEventElement:K,scrollbarHorizontal:ue(q),scrollbarVertical:ue(Q)})},update:U=>R({},U),destroy:H.bind(0)};return b.Nt((U,D,F)=>{E(D,F,U)}),qwe(c,V),In(Zs(a),U=>dJ(a[U],0,V)),Xwe(b.Ft.it,i().cancel,!u&&e.cancel)?(H(!0),V):(b.qt(),A.qt(),S("initialized",[V]),b.Nt((U,D,F)=>{const{wt:z,St:G,vt:W,Ht:K,Lt:q,It:Q,bt:re,Tt:ue}=U;S("updated",[V,{updateHints:{sizeChanged:z,directionChanged:G,heightIntrinsicChanged:W,overflowEdgeChanged:K,overflowAmountChanged:q,overflowStyleChanged:Q,contentMutation:re,hostMutation:ue},changedOptions:D,force:F}])}),V.update(!0),V)}return d};Pf.plugin=e=>{In($we(e),t=>dJ(t,Pf))};Pf.valid=e=>{const t=e&&e.elements,n=Rl(t)&&t();return JF(n)&&!!sJ(n.target)};Pf.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:a,W:u,q:c,F:d,G:h,X:p}=fs();return Br({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:a,staticDefaultOptions:u,getDefaultInitialization:c,setDefaultInitialization:d,getDefaultOptions:h,setDefaultOptions:p})};const __e=()=>{if(typeof window>"u"){const c=()=>{};return[c,c]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,a=r?n.cancelIdleCallback:o,u=()=>{a(e),o(t)};return[(c,d)=>{u(),e=s(r?()=>{u(),t=i(c)}:c,typeof d=="object"?d:{timeout:2233})},u]},hJ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=O.useMemo(__e,[]),s=O.useRef(null),a=O.useRef(r),u=O.useRef(t),c=O.useRef(n);return O.useEffect(()=>{a.current=r},[r]),O.useEffect(()=>{const{current:d}=s;u.current=t,Pf.valid(d)&&d.options(t||{},!0)},[t]),O.useEffect(()=>{const{current:d}=s;c.current=n,Pf.valid(d)&&d.on(n||{},!0)},[n]),O.useEffect(()=>()=>{var d;o(),(d=s.current)==null||d.destroy()},[]),O.useMemo(()=>[d=>{const h=s.current;if(Pf.valid(h))return;const p=a.current,m=u.current||{},v=c.current||{},y=()=>s.current=Pf(d,m,v);p?i(y,p):y()},()=>s.current],[])},S_e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...a}=e,u=n,c=O.useRef(null),d=O.useRef(null),[h,p]=O.useState(!1),[m,v]=hJ({options:r,events:i,defer:o});return O.useEffect(()=>{p(!0)},[]),O.useEffect(()=>{const{current:y}=c,{current:S}=d;return h&&y&&S&&m({target:y,elements:{viewport:S,content:S}}),()=>{var w;return(w=v())==null?void 0:w.destroy()}},[h,m,n]),O.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>c.current}),[]),fe.createElement(u,{"data-overlayscrollbars-initialize":"",ref:c,...a},h?fe.createElement("div",{ref:d,"data-overlayscrollbars-contents":!0},s):s)},E_e=O.forwardRef(S_e),GA=O.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:a}=Dn(),u=Ex({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${a(r)})`,marginTop:a(r)}}),c=O.useCallback(d=>{if(o&&d){const h=d.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(E_e,{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:`${u} ${i.className}`,events:{initialized:c},children:e})});var pJ={exports:{}},or={};/** @license React v17.0.2 + */function In(e,t){if(zA(e))for(let n=0;nt(e[n],n,e));return e}function fo(e,t){const n=yd(t);if(Js(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?RH(e,o,t):t.reduce((s,a)=>(s[a]=RH(e,o,a),s),i)}return i}e&&In(Zs(t),i=>ywe(e,i,t[i]))}const hl=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const a=(d,h)=>{const p=o,m=d,v=h||(r?!r(p,m):p!==m);return(v||i)&&(o=m,s=p),[o,v,s]};return[t?d=>a(t(o,s),d):a,d=>[o,!!d,s]]},Ew=()=>typeof window<"u",$Q=Ew()&&Node.ELEMENT_NODE,{toString:rwe,hasOwnProperty:HD}=Object.prototype,Qc=e=>e===void 0,FA=e=>e===null,iwe=e=>Qc(e)||FA(e)?`${e}`:rwe.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Xf=e=>typeof e=="number",yd=e=>typeof e=="string",Fz=e=>typeof e=="boolean",Rl=e=>typeof e=="function",Js=e=>Array.isArray(e),Cx=e=>typeof e=="object"&&!Js(e)&&!FA(e),zA=e=>{const t=!!e&&e.length,n=Xf(t)&&t>-1&&t%1==0;return Js(e)||!Rl(e)&&n?t>0&&Cx(e)?t-1 in e:!0:!1},ZF=e=>{if(!e||!Cx(e)||iwe(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=HD.call(e,n),s=i&&HD.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Qc(t)||HD.call(e,t)},B1=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===$Q:!1},UA=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===$Q:!1},jA=(e,t,n)=>e.indexOf(t,n),Gn=(e,t,n)=>(!n&&!yd(t)&&zA(t)?Array.prototype.push.apply(e,t):e.push(t),e),Up=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Gn(n,r)}):In(e,r=>{Gn(n,r)}),n)},zz=e=>!!e&&e.length===0,vu=(e,t,n)=>{In(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},HA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Zs=e=>e?Object.keys(e):[],Br=(e,t,n,r,i,o,s)=>{const a=[t,n,r,i,o,s];return(typeof e!="object"||FA(e))&&!Rl(e)&&(e={}),In(a,u=>{In(Zs(u),c=>{const d=u[c];if(e===d)return!0;const h=Js(d);if(d&&ZF(d)){const p=e[c];let m=p;h&&!Js(p)?m=[]:!h&&!ZF(p)&&(m={}),e[c]=Br(m,d)}else e[c]=h?d.slice():d})}),e},Uz=e=>{for(const t in e)return!1;return!0},FQ=(e,t,n,r)=>{if(Qc(r))return n?n[e]:t;n&&(yd(r)||Xf(r))&&(n[e]=r)},No=(e,t,n)=>{if(Qc(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},zQ=(e,t)=>new Set((No(e,t)||"").split(" ")),Go=(e,t)=>{e&&e.removeAttribute(t)},_p=(e,t,n,r)=>{if(n){const i=zQ(e,t);i[r?"add":"delete"](n);const o=Up(i).join(" ").trim();No(e,t,o)}},owe=(e,t,n)=>zQ(e,t).has(n),wl=(e,t)=>FQ("scrollLeft",0,e,t),Pc=(e,t)=>FQ("scrollTop",0,e,t),e3=Ew()&&Element.prototype,UQ=(e,t)=>{const n=[],r=t?UA(t)&&t:document;return r?Gn(n,r.querySelectorAll(e)):n},swe=(e,t)=>{const n=t?UA(t)&&t:document;return n?n.querySelector(e):null},vC=(e,t)=>UA(e)?(e3.matches||e3.msMatchesSelector).call(e,t):!1,jz=e=>e?Up(e.childNodes):[],Uc=e=>e&&e.parentElement,Jg=(e,t)=>{if(UA(e)){const n=e3.closest;if(n)return n.call(e,t);do{if(vC(e,t))return e;e=Uc(e)}while(e)}},awe=(e,t,n)=>{const r=Jg(e,t),i=e&&swe(n,r),o=Jg(i,t)===r;return r&&i?r===e||i===e||o&&Jg(Jg(e,n),t)!==r:!1},Hz=(e,t,n)=>{if(n&&e){let r=t,i;zA(n)?(i=document.createDocumentFragment(),In(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)}},ma=(e,t)=>{Hz(e,null,t)},lwe=(e,t)=>{Hz(Uc(e),e,t)},TH=(e,t)=>{Hz(Uc(e),e&&e.nextSibling,t)},fu=e=>{if(zA(e))In(Up(e),t=>fu(t));else if(e){const t=Uc(e);t&&t.removeChild(e)}},Sp=e=>{const t=document.createElement("div");return e&&No(t,"class",e),t},jQ=e=>{const t=Sp();return t.innerHTML=e.trim(),In(jz(t),n=>fu(n))},t3=e=>e.charAt(0).toUpperCase()+e.slice(1),uwe=()=>Sp().style,cwe=["-webkit-","-moz-","-o-","-ms-"],fwe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],WD={},GD={},dwe=e=>{let t=GD[e];if(HA(GD,e))return t;const n=t3(e),r=uwe();return In(cwe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,t3(o)+n].find(a=>r[a]!==void 0))}),GD[e]=t||""},wv=e=>{if(Ew()){let t=WD[e]||window[e];return HA(WD,e)||(In(fwe,n=>(t=t||window[n+t3(e)],!t)),WD[e]=t),t}},hwe=wv("MutationObserver"),AH=wv("IntersectionObserver"),Zg=wv("ResizeObserver"),HQ=wv("cancelAnimationFrame"),WQ=wv("requestAnimationFrame"),n3=wv("ScrollTimeline"),yC=Ew()&&window.setTimeout,r3=Ew()&&window.clearTimeout,pwe=/[^\x20\t\r\n\f]+/g,GQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&yd(t)){const a=t.match(pwe)||[];for(s=a.length>0;i=a[o++];)s=!!n(r,i)&&s}return s},Wz=(e,t)=>{GQ(e,t,(n,r)=>n.remove(r))},rd=(e,t)=>(GQ(e,t,(n,r)=>n.add(r)),Wz.bind(0,e,t)),WA=(e,t,n,r)=>{if(e&&t){let i=!0;return In(n,o=>{const s=r?r(e[o]):e[o],a=r?r(t[o]):t[o];s!==a&&(i=!1)}),i}return!1},VQ=(e,t)=>WA(e,t,["w","h"]),XQ=(e,t)=>WA(e,t,["x","y"]),gwe=(e,t)=>WA(e,t,["t","r","b","l"]),IH=(e,t,n)=>WA(e,t,["width","height"],n&&(r=>Math.round(r))),Ns=()=>{},Zh=e=>{let t;const n=e?yC:WQ,r=e?r3:HQ;return[i=>{r(t),t=n(i,Rl(e)?e():e)},()=>r(t)]},Gz=(e,t)=>{let n,r,i,o=Ns;const{g:s,v:a,p:u}=t||{},c=function(v){o(),r3(n),n=r=void 0,o=Ns,e.apply(this,v)},d=m=>u&&r?u(r,m):m,h=()=>{o!==Ns&&c(d(i)||i)},p=function(){const v=Up(arguments),y=Rl(s)?s():s;if(Xf(y)&&y>=0){const w=Rl(a)?a():a,b=Xf(w)&&w>=0,x=y>0?yC:WQ,E=y>0?r3:HQ,I=d(v)||v,R=c.bind(0,I);o();const M=x(R,y);o=()=>E(M),b&&!n&&(n=yC(h,w)),r=i=I}else c(v)};return p.m=h,p},mwe={opacity:1,zIndex:1},P_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},vwe=(e,t)=>!mwe[e]&&Xf(t)?`${t}px`:t,RH=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),ywe=(e,t,n)=>{try{const{style:r}=e;Qc(r[t])?r.setProperty(t,n):r[t]=vwe(t,n)}catch{}},Vm=e=>fo(e,"direction")==="rtl",PH=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,a=`${r}bottom${i}`,u=`${r}left${i}`,c=fo(e,[o,s,a,u]);return{t:P_(c[o],!0),r:P_(c[s],!0),b:P_(c[a],!0),l:P_(c[u],!0)}},Xm=(e,t)=>`translate${Js(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:OH}=Math,Vz={w:0,h:0},Tx=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:Vz,sE=e=>e?{w:e.clientWidth,h:e.clientHeight}:Vz,bC=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:Vz,xC=e=>{const t=parseFloat(fo(e,"height"))||0,n=parseFloat(fo(e,"width"))||0;return{w:n-OH(n),h:t-OH(t)}},Yl=e=>e.getBoundingClientRect(),em=e=>!!(e&&(e.height||e.width));let O_;const bwe=()=>{if(Qc(O_)){O_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){O_=!0}}))}catch{}}return O_},qQ=e=>e.split(" "),xwe=(e,t,n,r)=>{In(qQ(t),i=>{e.removeEventListener(i,n,r)})},oi=(e,t,n,r)=>{var i;const o=bwe(),s=(i=o&&r&&r.S)!=null?i:o,a=r&&r.$||!1,u=r&&r.C||!1,c=[],d=o?{passive:s,capture:a}:a;return In(qQ(t),h=>{const p=u?m=>{e.removeEventListener(h,p,a),n&&n(m)}:n;Gn(c,xwe.bind(null,e,h,p,a)),e.addEventListener(h,p,d)}),vu.bind(0,c)},YQ=e=>e.stopPropagation(),KQ=e=>e.preventDefault(),wwe={x:0,y:0},VD=e=>{const t=e?Yl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:wwe},MH=(e,t)=>{In(Js(t)?t:[t],e)},Xz=e=>{const t=new Map,n=(o,s)=>{if(o){const a=t.get(o);MH(u=>{a&&a[u?"delete":"clear"](u)},s)}else t.forEach(a=>{a.clear()}),t.clear()},r=(o,s)=>{if(yd(o)){const c=t.get(o)||new Set;return t.set(o,c),MH(d=>{Rl(d)&&c.add(d)},s),n.bind(0,o,s)}Fz(s)&&s&&n();const a=Zs(o),u=[];return In(a,c=>{const d=o[c];d&&Gn(u,r(c,d))}),vu.bind(0,u)},i=(o,s)=>{const a=t.get(o);In(Up(a),u=>{s&&!zz(s)?u.apply(0,s):u()})};return r(e||{}),[r,n,i]},kH=e=>JSON.stringify(e,(t,n)=>{if(Rl(n))throw new Error;return n}),_we={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"]}},QQ=(e,t)=>{const n={},r=Zs(t).concat(Zs(e));return In(r,i=>{const o=e[i],s=t[i];if(Cx(o)&&Cx(s))Br(n[i]={},QQ(o,s)),Uz(n[i])&&delete n[i];else if(HA(t,i)&&s!==o){let a=!0;if(Js(o)||Js(s))try{kH(o)===kH(s)&&(a=!1)}catch{}a&&(n[i]=s)}}),n},Cw="data-overlayscrollbars",JQ="os-environment",ZQ=`${JQ}-flexbox-glue`,Swe=`${ZQ}-max`,eJ="os-scrollbar-hidden",XD=`${Cw}-initialize`,pl=Cw,tJ=`${pl}-overflow-x`,nJ=`${pl}-overflow-y`,mm="overflowVisible",Ewe="scrollbarHidden",LH="scrollbarPressed",wC="updating",mf=`${Cw}-viewport`,qD="arrange",rJ="scrollbarHidden",vm=mm,i3=`${Cw}-padding`,Cwe=vm,DH=`${Cw}-content`,qz="os-size-observer",Twe=`${qz}-appear`,Awe=`${qz}-listener`,Iwe="os-trinsic-observer",Rwe="os-no-css-vars",Pwe="os-theme-none",cs="os-scrollbar",Owe=`${cs}-rtl`,Mwe=`${cs}-horizontal`,kwe=`${cs}-vertical`,iJ=`${cs}-track`,Yz=`${cs}-handle`,Lwe=`${cs}-visible`,Dwe=`${cs}-cornerless`,NH=`${cs}-transitionless`,BH=`${cs}-interaction`,$H=`${cs}-unusable`,o3=`${cs}-auto-hide`,FH=`${o3}-hidden`,zH=`${cs}-wheel`,Nwe=`${iJ}-interactive`,Bwe=`${Yz}-interactive`,oJ={},jp=()=>oJ,$we=e=>{const t=[];return In(Js(e)?e:[e],n=>{const r=Zs(n);In(r,i=>{Gn(t,oJ[i]=n[i])})}),t},Fwe="__osOptionsValidationPlugin",zwe="__osSizeObserverPlugin",Kz="__osScrollbarsHidingPlugin",Uwe="__osClickScrollPlugin";let YD;const UH=(e,t,n,r)=>{ma(e,t);const i=sE(t),o=Tx(t),s=xC(n);return r&&fu(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},jwe=e=>{let t=!1;const n=rd(e,eJ);try{t=fo(e,dwe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},Hwe=(e,t)=>{const n="hidden";fo(e,{overflowX:n,overflowY:n,direction:"rtl"}),wl(e,0);const r=VD(e),i=VD(t);wl(e,-999);const o=VD(t);return{i:r.x===i.x,n:i.x!==o.x}},Wwe=(e,t)=>{const n=rd(e,ZQ),r=Yl(e),i=Yl(t),o=IH(i,r,!0),s=rd(e,Swe),a=Yl(e),u=Yl(t),c=IH(u,a,!0);return n(),s(),o&&c},Gwe=()=>{const{body:e}=document,n=jQ(`
`)[0],r=n.firstChild,[i,,o]=Xz(),[s,a]=hl({o:UH(e,n,r),u:XQ},UH.bind(0,e,n,r,!0)),[u]=a(),c=jwe(n),d={x:u.x===0,y:u.y===0},h={elements:{host:null,padding:!c,viewport:b=>c&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Br({},_we),m=Br.bind(0,{},p),v=Br.bind(0,{},h),y={k:u,I:d,A:c,H:fo(n,"zIndex")==="-1",B:!!n3,V:Hwe(n,r),Y:Wwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Br(h,b)&&v(),G:m,X:b=>Br(p,b)&&m(),U:Br({},h),W:Br({},p)},S=window.addEventListener,w=Gz(b=>o(b?"z":"r"),{g:33,v:99});if(Go(n,"style"),fu(n),S("resize",w.bind(0,!1)),!c&&(!d.x||!d.y)){let b;S("resize",()=>{const x=jp()[Kz];b=b||x&&x.R(),b&&b(y,s,w.bind(0,!0))})}return y},fs=()=>(YD||(YD=Gwe()),YD),Qz=(e,t)=>Rl(t)?t.apply(0,e):t,Vwe=(e,t,n,r)=>{const i=Qc(r)?n:r;return Qz(e,i)||t.apply(0,e)},sJ=(e,t,n,r)=>{const i=Qc(r)?n:r,o=Qz(e,i);return!!o&&(B1(o)?o:t.apply(0,e))},Xwe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=fs(),{nativeScrollbarsOverlaid:a,body:u}=t,c=r??a,d=Qc(i)?u:i,h=(o.x||o.y)&&c,p=e&&(FA(d)?!s:d);return!!h||!!p},Jz=new WeakMap,qwe=(e,t)=>{Jz.set(e,t)},Ywe=e=>{Jz.delete(e)},aJ=e=>Jz.get(e),jH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&HA(n,r)?n[r]:void 0,e):void 0,s3=(e,t,n)=>r=>[jH(e,r),n||jH(t,r)!==void 0],lJ=e=>{let t=e;return[()=>t,n=>{t=Br({},t,n)}]},M_="tabindex",k_=Sp.bind(0,""),KD=e=>{ma(Uc(e),jz(e)),fu(e)},Kwe=e=>{const t=fs(),{q:n,A:r}=t,i=jp()[Kz],o=i&&i.T,{elements:s}=n(),{host:a,padding:u,viewport:c,content:d}=s,h=B1(e),p=h?{}:e,{elements:m}=p,{host:v,padding:y,viewport:S,content:w}=m||{},b=h?e:p.target,x=vC(b,"textarea"),E=b.ownerDocument,A=E.documentElement,I=b===E.body,R=E.defaultView,M=Vwe.bind(0,[b]),D=sJ.bind(0,[b]),N=Qz.bind(0,[b]),H=M.bind(0,k_,c),V=D.bind(0,k_,d),U=H(S),L=U===b,F=L&&I,z=!L&&V(w),G=!L&&B1(U)&&U===z,W=G&&!!N(d),K=W?H():U,q=W?z:V(),re=F?A:G?K:U,ue=x?M(k_,a,v):b,ce=F?re:ue,se=G?q:z,J=E.activeElement,ae=!L&&R.top===R&&J===b,le={Z:b,J:ce,K:re,tt:!L&&D(k_,u,y),nt:se,ot:!L&&!r&&o&&o(t),st:F?A:re,et:F?E:re,ct:R,rt:E,lt:x,it:I,ut:h,ft:L,dt:G,_t:(st,mt)=>owe(re,L?pl:mf,L?mt:st),ht:(st,mt,vt)=>_p(re,L?pl:mf,L?mt:st,vt)},he=Zs(le).reduce((st,mt)=>{const vt=le[mt];return Gn(st,vt&&B1(vt)&&!Uc(vt)?vt:!1)},[]),pe=st=>st?jA(he,st)>-1:null,{Z:ve,J:ye,tt:xe,K:ge,nt:be,ot:Ze}=le,qe=[()=>{Go(ye,pl),Go(ye,XD),Go(ve,XD),I&&(Go(A,pl),Go(A,XD))}],ut=x&&pe(ye);let Bt=x?ve:jz([be,ge,xe,ye,ve].find(st=>pe(st)===!1));const Oe=F?ve:be||ge;return[le,()=>{No(ye,pl,L?"viewport":"host"),No(xe,i3,""),No(be,DH,""),L||No(ge,mf,"");const st=I&&!L?rd(Uc(b),eJ):Ns;if(ut&&(TH(ve,ye),Gn(qe,()=>{TH(ye,ve),fu(ye)})),ma(Oe,Bt),ma(ye,xe),ma(xe||ye,!L&&ge),ma(ge,be),Gn(qe,()=>{st(),Go(xe,i3),Go(be,DH),Go(ge,tJ),Go(ge,nJ),Go(ge,mf),pe(be)&&KD(be),pe(ge)&&KD(ge),pe(xe)&&KD(xe)}),r&&!L&&(_p(ge,mf,rJ,!0),Gn(qe,Go.bind(0,ge,mf))),Ze&&(lwe(ge,Ze),Gn(qe,fu.bind(0,Ze))),ae){const mt=No(ge,M_);No(ge,M_,"-1"),ge.focus();const vt=()=>mt?No(ge,M_,mt):Go(ge,M_),_e=oi(E,"pointerdown keydown",()=>{vt(),_e()});Gn(qe,[vt,_e])}else J&&J.focus&&J.focus();Bt=0},vu.bind(0,qe)]},Qwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=fs(),{gt:s}=r(),{vt:a}=i,u=(n||!o)&&a;return u&&fo(n,{height:s?"":"100%"}),{wt:u,bt:u}}},Jwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:a}=e,[u,c]=hl({u:gwe,o:PH()},PH.bind(0,i,"padding",""));return(d,h,p)=>{let[m,v]=c(p);const{A:y,Y:S}=fs(),{yt:w}=n(),{wt:b,bt:x,St:E}=d,[A,I]=h("paddingAbsolute");(b||v||!S&&x)&&([m,v]=u(p));const M=!a&&(I||E||v);if(M){const D=!A||!o&&!y,N=m.r+m.l,H=m.t+m.b,V={marginRight:D&&!w?-N:0,marginBottom:D?-H:0,marginLeft:D&&w?-N:0,top:D?-m.t:0,right:D?w?-m.r:"auto":0,left:D?w?"auto":-m.l:0,width:D?`calc(100% + ${N}px)`:""},U={paddingTop:D?m.t:0,paddingRight:D?m.r:0,paddingBottom:D?m.b:0,paddingLeft:D?m.l:0};fo(o||s,V),fo(s,U),r({tt:m,$t:!D,P:o?U:Br({},V,U)})}return{xt:M}}},{max:a3}=Math,vf=a3.bind(0,0),uJ="visible",HH="hidden",Zwe=42,L_={u:VQ,o:{w:0,h:0}},e_e={u:XQ,o:{x:HH,y:HH}},t_e=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:vf(e.w-t.w),h:vf(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},D_=e=>e.indexOf(uJ)===0,n_e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:a,ft:u,ht:c,it:d,ct:h}=e,{k:p,Y:m,A:v,I:y}=fs(),S=jp()[Kz],w=!u&&!v&&(y.x||y.y),b=d&&u,[x,E]=hl(L_,xC.bind(0,s)),[A,I]=hl(L_,bC.bind(0,s)),[R,M]=hl(L_),[D,N]=hl(L_),[H]=hl(e_e),V=(W,K)=>{if(fo(s,{height:""}),K){const{$t:q,tt:Q}=n(),{Ct:re,M:ue}=W,ce=xC(i),se=sE(i),J=fo(s,"boxSizing")==="content-box",ae=q||J?Q.b+Q.t:0,le=!(y.x&&J);fo(s,{height:se.h+ce.h+(re.x&&le?ue.x:0)-ae})}},U=(W,K)=>{const q=!v&&!W?Zwe:0,Q=(pe,ve,ye)=>{const xe=fo(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?q:ye:0,ve&&!!q]},[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}}},L=(W,K,q,Q)=>{const re=(ae,le)=>{const he=D_(ae),pe=le&&he&&ae.replace(`${uJ}-`,"")||"";return[le&&!he?ae:"",D_(pe)?"hidden":pe]},[ue,ce]=re(q.x,K.x),[se,J]=re(q.y,K.y);return Q.overflowX=ce&&se?ce:ue,Q.overflowY=J&&ue?J:se,U(W,Q)},F=(W,K,q,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,xe=le[pe],ge=le.paddingBottom;Q.width=`calc(100% + ${ae+ve*-1}px)`,Q[he]=-ae+ve,Q.marginBottom=-J+ye,q&&(Q[pe]=xe+(se?ae:0),Q.paddingBottom=ge+(ce?J:0))},[z,G]=S?S.L(w,m,s,a,n,U,F):[()=>w,()=>[Ns]];return(W,K,q)=>{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"),xe=he&&y.x&&y.y,ge=!u&&!m&&(Q||ue||re||pe||se),be=D_(ve.x),Ze=D_(ve.y),qe=be||Ze;let ut=E(q),Bt=I(q),Oe=M(q),ze=N(q),st;if(pe&&v&&c(rJ,Ewe,!xe),ge&&(st=U(xe),V(st,ae)),Q||ce||ue||J||pe){qe&&c(vm,mm,!1);const[Pe,He]=G(xe,le,st),[xt,Gt]=ut=x(q),[yn,Yr]=Bt=A(q),Hr=sE(s);let Wr=yn,Kr=Hr;Pe(),(Yr||Gt||pe)&&He&&!xe&&z(He,yn,xt,le)&&(Kr=sE(s),Wr=bC(s));const ui={w:vf(a3(yn.w,Wr.w)+xt.w),h:vf(a3(yn.h,Wr.h)+xt.h)},ds={w:vf((b?h.innerWidth:Kr.w+vf(Hr.w-yn.w))+xt.w),h:vf((b?h.innerHeight+xt.h:Kr.h+vf(Hr.h-yn.h))+xt.h)};ze=D(ds),Oe=R(t_e(ui,ds),q)}const[mt,vt]=ze,[_e,Ue]=Oe,[Ke,Fe]=Bt,[Be,Ot]=ut,ft={x:_e.w>0,y:_e.h>0},Re=be&&Ze&&(ft.x||ft.y)||be&&ft.x&&!ft.y||Ze&&ft.y&&!ft.x;if(ce||J||Ot||Fe||vt||Ue||ye||pe||ge){const Pe={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},He=L(xe,ft,ve,Pe),xt=z(He,Ke,Be,le);u||F(He,le,xt,Pe),ge&&V(He,ae),u?(No(i,tJ,Pe.overflowX),No(i,nJ,Pe.overflowY)):fo(s,Pe)}_p(i,pl,mm,Re),_p(o,i3,Cwe,Re),u||_p(s,mf,vm,qe);const[at,$t]=H(U(xe).Ot);return r({Ot:at,zt:{x:mt.w,y:mt.h},Et:{x:_e.w,y:_e.h},At:ft}),{It:$t,Ht:vt,Lt:Ue}}},WH=(e,t,n)=>{const r={},i=t||{},o=Zs(e).concat(Zs(i));return In(o,s=>{const a=e[s],u=i[s];r[s]=!!(n||a||u)}),r},r_e=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:a,Y:u}=fs(),c=!s&&(a.x||a.y),d=[Qwe(e,t),Jwe(e,t),n_e(e,t)];return(h,p,m)=>{const v=WH(Br({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},m),y=c||!u,S=y&&wl(r),w=y&&Pc(r);i("",wC,!0);let b=v;return In(d,x=>{b=WH(b,x(b,h,!!m)||{},m)}),wl(r,S),Pc(r,w),i("",wC),o||(wl(n,0),Pc(n,0)),b}},i_e=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=a=>{if(n){const u=n.reduce((c,d)=>{if(d){const[h,p]=d,m=p&&h&&(a?a(h):UQ(h,e));m&&m.length&&p&&yd(p)&&Gn(c,[m,p.trim()],!0)}return c},[]);In(u,c=>In(c[0],d=>{const h=c[1],p=r.get(d)||[];if(e.contains(d)){const v=oi(d,h,y=>{i?(v(),r.delete(d)):t(y)});r.set(d,Gn(p,v))}else vu(p),r.delete(d)}))}};return n&&(r=new WeakMap,s()),[o,s]},GH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:a,kt:u,Bt:c,Vt:d}=r||{},h=Gz(()=>i&&n(!0),{g:33,v:99}),[p,m]=i_e(e,h,a),v=o||[],y=s||[],S=v.concat(y),w=(x,E)=>{const A=c||Ns,I=d||Ns,R=new Set,M=new Set;let D=!1,N=!1;if(In(x,H=>{const{attributeName:V,target:U,type:L,oldValue:F,addedNodes:z,removedNodes:G}=H,W=L==="attributes",K=L==="childList",q=e===U,Q=W&&yd(V)?No(U,V):0,re=Q!==0&&F!==Q,ue=jA(y,V)>-1&&re;if(t&&(K||!q)){const ce=!W,se=W&&re,J=se&&u&&vC(U,u),le=(J?!A(U,V,F,Q):ce||se)&&!I(H,!!J,e,r);In(z,he=>R.add(he)),In(G,he=>R.add(he)),N=N||le}!t&&q&&re&&!A(U,V,F,Q)&&(M.add(V),D=D||ue)}),R.size>0&&m(H=>Up(R).reduce((V,U)=>(Gn(V,UQ(H,U)),vC(U,H)?Gn(V,U):V),[])),t)return!E&&N&&n(!1),[!1];if(M.size>0||D){const H=[Up(M),D];return!E&&n.apply(0,H),H}},b=new hwe(x=>w(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!zz(x)&&w(x,!0)}}]},N_=3333333,cJ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=jp()[zwe],{V:s}=fs(),u=jQ(`
`)[0],c=u.firstChild,d=Vm.bind(0,e),[h]=hl({o:!1,_:!0,u:(v,y)=>!(!v||!em(v)&&em(y))}),p=v=>{const y=Js(v)&&v.length>0&&Cx(v[0]),S=!y&&Fz(v[0]);let w=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),I=em(E),R=em(A);w=!A&&!!R||!I,b=!R&&I,x=!w}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Vm(u);wl(u,E?s.n?-N_:s.i?0:N_:N_),Pc(u,N_)}w||t({wt:!S,jt:S?v:void 0,Pt:!!b})},m=[];return[()=>{vu(m),fu(u)},()=>{let v=i&&p;if(Zg){const y=new Zg(p);y.observe(c),Gn(m,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(c,p,i);v=y,Gn(m,S)}if(r){const[y]=hl({o:void 0},d);Gn(m,oi(u,"scroll",S=>{const w=y(),[b,x,E]=w;x&&(Wz(c,"ltr rtl"),rd(c,b?"rtl":"ltr"),p([!!b,x,E])),YQ(S)}))}v&&(rd(u,Twe),Gn(m,oi(u,"animationstart",v,{C:!!Zg}))),(Zg||o)&&ma(e,u)}]},o_e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,s_e=(e,t)=>{let n;const r=Sp(Iwe),i=[],[o]=hl({o:!1}),s=(u,c)=>{if(u){const d=o(o_e(u)),[,h]=d;return h&&!c&&t(d)&&[d]}},a=(u,c)=>u&&u.length>0&&s(u.pop(),c);return[()=>{vu(i),fu(r)},()=>{if(AH)n=new AH(u=>a(u),{root:e}),n.observe(r),Gn(i,()=>{n.disconnect()});else{const u=()=>{const h=Tx(r);s(h)},[c,d]=cJ(r,u);Gn(i,c),d(),u()}ma(e,r)},()=>n&&a(n.takeRecords(),!0)]},VH=`[${pl}]`,a_e=`[${mf}]`,QD=["tabindex"],XH=["wrap","cols","rows"],JD=["id","class","style","open"],l_e=(e,t,n)=>{let r,i,o;const{J:s,K:a,nt:u,lt:c,ft:d,_t:h,ht:p}=e,{Y:m}=fs(),[v]=hl({u:VQ,o:{w:0,h:0}},()=>{const F=h(vm,mm),z=h(qD,""),G=z&&wl(a),W=z&&Pc(a);p(vm,mm),p(qD,""),p("",wC,!0);const K=bC(u),q=bC(a),Q=xC(a);return p(vm,mm,F),p(qD,"",z),p("",wC),wl(a,G),Pc(a,W),{w:q.w+K.w+Q.w,h:q.h+K.h+Q.h}}),y=c?XH:JD.concat(XH),S=Gz(n,{g:()=>r,v:()=>i,p(F,z){const[G]=F,[W]=z;return[Zs(G).concat(Zs(W)).reduce((K,q)=>(K[q]=G[q]||W[q],K),{})]}}),w=F=>{In(F||QD,z=>{if(jA(QD,z)>-1){const G=No(s,z);yd(G)?No(a,z,G):Go(a,z)}})},b=(F,z)=>{const[G,W]=F,K={vt:W};return t({gt:G}),!z&&n(K),K},x=({wt:F,jt:z,Pt:G})=>{const W=!F||G?n:S;let K=!1;if(z){const[q,Q]=z;K=Q,t({yt:q})}W({wt:F,Pt:G,St:K})},E=(F,z)=>{const[,G]=v(),W={bt:G};return G&&!z&&(F?n:S)(W),W},A=(F,z,G)=>{const W={Tt:z};return z?!G&&S(W):d||w(F),W},[I,R,M]=u||!m?s_e(s,b):[Ns,Ns,Ns],[D,N]=d?[Ns,Ns]:cJ(s,x,{Pt:!0,Yt:!0}),[H,V]=GH(s,!1,A,{Dt:JD,Mt:JD.concat(QD)});let U;const L=d&&Zg&&new Zg(F=>{const z=F[F.length-1].contentRect,G=em(z),K=!em(U)&&G;x({wt:!0,Pt:K}),U=z});return[()=>{I(),D(),o&&o[0](),L&&L.disconnect(),H()},()=>{L&&L.observe(s),w(),N(),R()},()=>{const F={},z=V(),G=M(),W=o&&o[1]();return z&&Br(F,A.apply(0,Gn(z,!0))),G&&Br(F,b.apply(0,Gn(G,!0))),W&&Br(F,E.apply(0,Gn(W,!0))),F},F=>{const[z]=F("update.ignoreMutation"),[G,W]=F("update.attributes"),[K,q]=F("update.elementEvents"),[Q,re]=F("update.debounce"),ue=q||W,ce=se=>Rl(z)&&z(se);if(ue&&(o&&(o[1](),o[0]()),o=GH(u||a,!0,E,{Mt:y.concat(G||[]),Rt:K,kt:VH,Vt:(se,J)=>{const{target:ae,attributeName:le}=se;return(!J&&le&&!d?awe(ae,VH,a_e):!1)||!!Jg(ae,`.${cs}`)||!!ce(se)}})),re)if(S.m(),Js(Q)){const se=Q[0],J=Q[1];r=Xf(se)&&se,i=Xf(J)&&J}else Xf(Q)?(r=Q,i=!1):(r=!1,i=!1)}]},qH={x:0,y:0},u_e=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:qH,Et:qH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Vm(e.J)}),c_e=(e,t)=>{const n=s3(t,{}),[r,i,o]=Xz(),[s,a,u]=Kwe(e),c=lJ(u_e(s)),[d,h]=c,p=r_e(s,c),m=(x,E,A)=>{const R=Zs(x).some(M=>!!x[M])||!Uz(E)||A;return R&&o("u",[x,E,A]),R},[v,y,S,w]=l_e(s,h,x=>m(p(n,x),{},!1)),b=d.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:I}=s,R=I?A.documentElement:x,M=wl(R),D=Pc(R);y(),a(),wl(E,M),Pc(E,D)},b.Ft=s,[(x,E)=>{const A=s3(t,x,E);return w(A),m(p(A,S(),E),x,!!E)},b,()=>{i(),v(),u()}]},{round:YH}=Math,f_e=e=>{const{width:t,height:n}=Yl(e),{w:r,h:i}=Tx(e);return{x:YH(t)/r||1,y:YH(n)/i||1}},d_e=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:a}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(a||[]).includes(s)},KH="pointerup pointerleave pointercancel lostpointercapture",h_e=(e,t)=>oi(e,"mousedown",oi.bind(0,t,"click",YQ,{C:!0,$:!0}),{$:!0}),p_e=(e,t,n,r,i,o,s)=>{const{V:a}=fs(),{Gt:u,Xt:c,Ut:d}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,m=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",w=(b,x)=>E=>{const{Et:A}=o(),I=Tx(c)[y]-Tx(u)[y],M=x*E/I*A[S],N=Vm(d)&&s?a.n||a.i?1:-1:1;i[h]=b+M*N};return oi(c,"pointerdown",b=>{const x=Jg(b.target,`.${Yz}`)===u,E=x?u:c;if(_p(t,pl,LH,!0),d_e(b,e,x)){const A=!x&&b.shiftKey,I=()=>Yl(u),R=()=>Yl(c),M=(K,q)=>(K||I())[v]-(q||R())[v],D=w(i[h]||0,1/f_e(i)[S]),N=b[p],H=I(),V=R(),U=H[m],L=M(H,V)+U/2,F=N-V[v],z=x?0:F-L,G=K=>{vu(W),E.releasePointerCapture(K.pointerId)},W=[_p.bind(0,t,pl,LH),oi(n,KH,G),oi(n,"selectstart",K=>KQ(K),{S:!1}),oi(c,KH,G),oi(c,"pointermove",K=>{const q=K[p]-N;(x||A)&&D(z+q)})];if(A)D(z);else if(!x){const K=jp()[Uwe];K&&Gn(W,K.O(D,M,z,U,F))}E.setPointerCapture(b.pointerId)}})},g_e=(e,t)=>(n,r,i,o,s,a,u)=>{const{Ut:c}=n,[d,h]=Zh(333),p=!!s.scrollBy;let m=!0;return vu.bind(0,[oi(c,"pointerenter",()=>{r(BH,!0)}),oi(c,"pointerleave pointercancel",()=>{r(BH)}),oi(c,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:w}=v;p&&m&&w===0&&Uc(c)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),m=!1,r(zH,!0),d(()=>{m=!0,r(zH)}),KQ(v)},{S:!1,$:!0}),h_e(c,i),p_e(e,o,i,n,s,t,u),h])},{min:_C,max:l3,round:m_e}=Math,fJ=(e,t,n,r)=>{if(r){const a=n?"x":"y",{Et:u,zt:c}=r,d=c[a],h=u[a];return l3(0,_C(1,d/(d+h)))}const i=n?"width":"height",o=Yl(e)[i],s=Yl(t)[i];return l3(0,_C(1,o/s))},v_e=(e,t,n,r,i,o)=>{const{V:s}=fs(),a=o?"x":"y",u=o?"Left":"Top",{Et:c}=r,d=m_e(c[a]),h=_C(d,l3(0,n[`scroll${u}`])),p=o&&i,m=s.i?h:d-h,y=_C(1,(p?m:h)/d),S=fJ(e,t,o);return 1/S*(1-S)*y},dJ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),y_e=(e,t)=>({transform:[Xm("0%",t),Xm(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),b_e=e=>`${Math.max(0,e-.5)}px`,QH=(e,t,n,r)=>dJ(e,t,{transform:[Xm("0px",r),Xm(b_e(n),r)]},"add"),JH=(e,t)=>n3?new n3({source:e,axis:t}):null,x_e=(e,t,n)=>{const{q:r,H:i}=fs(),{scrollbars:o}=r(),{slot:s}=o,{rt:a,Z:u,J:c,K:d,ut:h,st:p,it:m,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},w=new Map,b=JH(p,"x"),x=JH(p,"y"),E=sJ([u,c,d],()=>v&&m?u:c,s,S),A=se=>v&&!m&&Uc(se)===d,I=se=>{w.forEach((J,ae)=>{(se?jA(Js(se)?se:[se],ae)>-1:!0)&&((J||[]).forEach(he=>{he&&he.cancel()}),w.delete(ae))})},R=(se,J,ae)=>{const le=ae?rd:Wz;In(se,he=>{le(he.Ut,J)})},M=(se,J)=>{In(se,ae=>{const[le,he]=J(ae);fo(le,he)})},D=(se,J,ae)=>{M(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(fJ(he,pe,ae,J)*100).toFixed(3)}%`}]})},N=(se,J,ae)=>{!x&&!x&&M(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=v_e(he,pe,p,J,Vm(ve),ae);return[he,{transform:ye===ye?Xm(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:J}=se,ae=A(J)&&J;return[ae,{transform:ae?Xm([`${wl(p)}px`,`${Pc(p)}px`]):""}]},V=[],U=[],L=[],F=(se,J,ae)=>{const le=Fz(ae),he=le?ae:!0,pe=le?!ae:!0;he&&R(U,se,J),pe&&R(L,se,J)},z=se=>{D(U,se,!0),D(L,se)},G=se=>{N(U,se,!0),N(L,se)},W=()=>{const se=(J,{Ut:ae,Gt:le})=>{I(le),w.set(le,[dJ(le,J?b:x,y_e(J&&Vm(ae),J))])};U.forEach(se.bind(0,!0)),L.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&M(U,H),v&&M(L,H))},q=({Et:se})=>{L.concat(U).forEach(({Ut:J})=>{I(J),A(J)&&w.set(J,[QH(J,b,se.x,!0),QH(J,x,se.y)])})},Q=se=>{const J=se?Mwe:kwe,ae=se?U:L,le=zz(ae)?NH:"",he=Sp(`${cs} ${J} ${le}`),pe=Sp(iJ),ve=Sp(Yz),ye={Ut:he,Xt:pe,Gt:ve};return i||rd(he,Rwe),ma(he,pe),ma(pe,ve),Gn(ae,ye),Gn(V,[fu.bind(0,he),I,n(ye,F,a,c,p,se?b:x,se)]),ye},re=Q.bind(0,!0),ue=Q.bind(0,!1),ce=()=>{ma(E,U[0].Ut),ma(E,L[0].Ut),yC(()=>{F(NH)},300)};return re(),ue(),[{Wt:z,Zt:G,Jt:W,Kt:q,Qt:K,tn:F,nn:{B:b,sn:U,en:re,cn:M.bind(0,U)},rn:{B:x,sn:L,en:ue,cn:M.bind(0,L)}},ce,vu.bind(0,V)]},ZD=e=>e.pointerType==="mouse",w_e=(e,t,n,r)=>{let i,o,s,a,u,c=Ns,d=0;const h=lJ({}),[p]=h,[m,v]=Zh(),[y,S]=Zh(),[w,b]=Zh(100),[x,E]=Zh(100),[A,I]=Zh(100),[R,M]=Zh(()=>d),[D,N,H]=x_e(e,n.Ft,g_e(t,n)),{J:V,et:U,it:L}=n.Ft,{tn:F,Wt:z,Zt:G,Jt:W,Kt:K,Qt:q}=D,Q=J=>{F(o3,J,!0),F(o3,J,!1)},re=(J,ae)=>{if(M(),J)F(FH);else{const le=()=>F(FH,!0);d>0&&!ae?R(le):le()}},ue=J=>{ZD(J)&&(a=o,a&&re(!0))},ce=[b,M,E,I,S,v,H,oi(V,"pointerover",ue,{C:!0}),oi(V,"pointerenter",ue),oi(V,"pointerleave",J=>{ZD(J)&&(a=!1,o&&re(!1))}),oi(V,"pointermove",J=>{ZD(J)&&i&&m(()=>{b(),re(!0),x(()=>{i&&re(!1)})})}),oi(U,"scroll",J=>{y(()=>{G(n()),s&&re(!0),w(()=>{s&&!a&&re(!1)})}),r(J),q()})],se=p.bind(0);return se.Ft=D,se.qt=N,[(J,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:ge}=fs(),be=s3(t,J,ae),Ze=n(),{Et:qe,Ot:ut,yt:Bt,At:Oe}=Ze,[ze,st]=be("showNativeOverlaidScrollbars"),[mt,vt]=be("scrollbars.theme"),[_e,Ue]=be("scrollbars.visibility"),[Ke,Fe]=be("scrollbars.autoHide"),[Be,Ot]=be("scrollbars.autoHideSuspend"),[ft]=be("scrollbars.autoHideDelay"),[Re,at]=be("scrollbars.dragScroll"),[$t,Pe]=be("scrollbars.clickScroll"),He=xe&&!ae,xt=Oe.x||Oe.y,Gt=he||pe||ye,yn=ve||Ue,Yr=ze&&ge.x&&ge.y,Hr=(Wr,Kr)=>{const ui=_e==="visible"||_e==="auto"&&Wr==="scroll";return F(Lwe,ui,Kr),ui};if(d=ft,He&&(Be&&xt?(Q(!1),c(),A(()=>{c=oi(U,"scroll",Q.bind(0,!0),{C:!0})})):Q(!0)),st&&F(Pwe,Yr),vt&&(F(u),F(mt,!0),u=mt),Ot&&!Be&&Q(!0),Fe&&(i=Ke==="move",o=Ke==="leave",s=Ke!=="never",re(!s,!0)),at&&F(Bwe,Re),Pe&&F(Nwe,$t),yn){const Wr=Hr(ut.x,!0),Kr=Hr(ut.y,!1);F(Dwe,!(Wr&&Kr))}Gt&&(z(Ze),G(Ze),W(Ze),K(Ze),q(),F($H,!qe.x,!0),F($H,!qe.y,!1),F(Owe,Bt&&!L))},se,()=>{vu(ce),c()}]},hJ=(e,t,n)=>{Rl(e)&&e(t||void 0,n||void 0)},Pf=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=fs(),a=jp(),u=B1(e),c=u?e:e.target,d=aJ(c);if(t&&!d){let h=!1;const p=U=>{const L=jp()[Fwe],F=L&&L.O;return F?F(U,!0):U},m=Br({},r(),p(t)),[v,y,S]=Xz(n),[w,b,x]=c_e(e,m),[E,A,I]=w_e(e,m,b,U=>S("scroll",[V,U])),R=(U,L)=>w(U,!!L),M=R.bind(0,{},!0),D=o(M),N=s(M),H=U=>{Ywe(c),D(),N(),I(),x(),h=!0,S("destroyed",[V,!!U]),y()},V={options(U,L){if(U){const F=L?r():{},z=QQ(m,Br(F,p(U)));Uz(z)||(Br(m,z),R(z))}return Br({},m)},on:v,off:(U,L)=>{U&&L&&y(U,L)},state(){const{zt:U,Et:L,Ot:F,At:z,tt:G,$t:W,yt:K}=b();return Br({},{overflowEdge:U,overflowAmount:L,overflowStyle:F,hasOverflow:z,padding:G,paddingAbsolute:W,directionRTL:K,destroyed:h})},elements(){const{Z:U,J:L,tt:F,K:z,nt:G,st:W,et:K}=b.Ft,{nn:q,rn:Q}=A.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 Br({},ae,{clone:()=>{const le=re(J());return E({},!0,{}),le}})};return Br({},{target:U,host:L,padding:F||z,viewport:z,content:G||z,scrollOffsetElement:W,scrollEventElement:K,scrollbarHorizontal:ue(q),scrollbarVertical:ue(Q)})},update:U=>R({},U),destroy:H.bind(0)};return b.Nt((U,L,F)=>{E(L,F,U)}),qwe(c,V),In(Zs(a),U=>hJ(a[U],0,V)),Xwe(b.Ft.it,i().cancel,!u&&e.cancel)?(H(!0),V):(b.qt(),A.qt(),S("initialized",[V]),b.Nt((U,L,F)=>{const{wt:z,St:G,vt:W,Ht:K,Lt:q,It:Q,bt:re,Tt:ue}=U;S("updated",[V,{updateHints:{sizeChanged:z,directionChanged:G,heightIntrinsicChanged:W,overflowEdgeChanged:K,overflowAmountChanged:q,overflowStyleChanged:Q,contentMutation:re,hostMutation:ue},changedOptions:L,force:F}])}),V.update(!0),V)}return d};Pf.plugin=e=>{In($we(e),t=>hJ(t,Pf))};Pf.valid=e=>{const t=e&&e.elements,n=Rl(t)&&t();return ZF(n)&&!!aJ(n.target)};Pf.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:a,W:u,q:c,F:d,G:h,X:p}=fs();return Br({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:a,staticDefaultOptions:u,getDefaultInitialization:c,setDefaultInitialization:d,getDefaultOptions:h,setDefaultOptions:p})};const __e=()=>{if(typeof window>"u"){const c=()=>{};return[c,c]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,a=r?n.cancelIdleCallback:o,u=()=>{a(e),o(t)};return[(c,d)=>{u(),e=s(r?()=>{u(),t=i(c)}:c,typeof d=="object"?d:{timeout:2233})},u]},pJ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=O.useMemo(__e,[]),s=O.useRef(null),a=O.useRef(r),u=O.useRef(t),c=O.useRef(n);return O.useEffect(()=>{a.current=r},[r]),O.useEffect(()=>{const{current:d}=s;u.current=t,Pf.valid(d)&&d.options(t||{},!0)},[t]),O.useEffect(()=>{const{current:d}=s;c.current=n,Pf.valid(d)&&d.on(n||{},!0)},[n]),O.useEffect(()=>()=>{var d;o(),(d=s.current)==null||d.destroy()},[]),O.useMemo(()=>[d=>{const h=s.current;if(Pf.valid(h))return;const p=a.current,m=u.current||{},v=c.current||{},y=()=>s.current=Pf(d,m,v);p?i(y,p):y()},()=>s.current],[])},S_e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...a}=e,u=n,c=O.useRef(null),d=O.useRef(null),[h,p]=O.useState(!1),[m,v]=pJ({options:r,events:i,defer:o});return O.useEffect(()=>{p(!0)},[]),O.useEffect(()=>{const{current:y}=c,{current:S}=d;return h&&y&&S&&m({target:y,elements:{viewport:S,content:S}}),()=>{var w;return(w=v())==null?void 0:w.destroy()}},[h,m,n]),O.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>c.current}),[]),fe.createElement(u,{"data-overlayscrollbars-initialize":"",ref:c,...a},h?fe.createElement("div",{ref:d,"data-overlayscrollbars-contents":!0},s):s)},E_e=O.forwardRef(S_e),GA=O.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:a}=Ln(),u=Ex({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${a(r)})`,marginTop:a(r)}}),c=O.useCallback(d=>{if(o&&d){const h=d.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(E_e,{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:`${u} ${i.className}`,events:{initialized:c},children:e})});var gJ={exports:{}},or={};/** @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 VA=60103,XA=60106,Cw=60107,Tw=60108,Aw=60114,Iw=60109,Rw=60110,Pw=60112,Ow=60113,Jz=60120,Mw=60115,kw=60116,gJ=60121,mJ=60122,vJ=60117,yJ=60129,bJ=60131;if(typeof Symbol=="function"&&Symbol.for){var Wi=Symbol.for;VA=Wi("react.element"),XA=Wi("react.portal"),Cw=Wi("react.fragment"),Tw=Wi("react.strict_mode"),Aw=Wi("react.profiler"),Iw=Wi("react.provider"),Rw=Wi("react.context"),Pw=Wi("react.forward_ref"),Ow=Wi("react.suspense"),Jz=Wi("react.suspense_list"),Mw=Wi("react.memo"),kw=Wi("react.lazy"),gJ=Wi("react.block"),mJ=Wi("react.server.block"),vJ=Wi("react.fundamental"),yJ=Wi("react.debug_trace_mode"),bJ=Wi("react.legacy_hidden")}function Ol(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case VA:switch(e=e.type,e){case Cw:case Aw:case Tw:case Ow:case Jz:return e;default:switch(e=e&&e.$$typeof,e){case Rw:case Pw:case kw:case Mw:case Iw:return e;default:return t}}case XA:return t}}}var C_e=Iw,T_e=VA,A_e=Pw,I_e=Cw,R_e=kw,P_e=Mw,O_e=XA,M_e=Aw,k_e=Tw,D_e=Ow;or.ContextConsumer=Rw;or.ContextProvider=C_e;or.Element=T_e;or.ForwardRef=A_e;or.Fragment=I_e;or.Lazy=R_e;or.Memo=P_e;or.Portal=O_e;or.Profiler=M_e;or.StrictMode=k_e;or.Suspense=D_e;or.isAsyncMode=function(){return!1};or.isConcurrentMode=function(){return!1};or.isContextConsumer=function(e){return Ol(e)===Rw};or.isContextProvider=function(e){return Ol(e)===Iw};or.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VA};or.isForwardRef=function(e){return Ol(e)===Pw};or.isFragment=function(e){return Ol(e)===Cw};or.isLazy=function(e){return Ol(e)===kw};or.isMemo=function(e){return Ol(e)===Mw};or.isPortal=function(e){return Ol(e)===XA};or.isProfiler=function(e){return Ol(e)===Aw};or.isStrictMode=function(e){return Ol(e)===Tw};or.isSuspense=function(e){return Ol(e)===Ow};or.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cw||e===Aw||e===yJ||e===Tw||e===Ow||e===Jz||e===bJ||typeof e=="object"&&e!==null&&(e.$$typeof===kw||e.$$typeof===Mw||e.$$typeof===Iw||e.$$typeof===Rw||e.$$typeof===Pw||e.$$typeof===vJ||e.$$typeof===gJ||e[0]===mJ)};or.typeOf=Ol;pJ.exports=or;var xJ=pJ.exports;function _C(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Lr.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Lr.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** + */var VA=60103,XA=60106,Tw=60107,Aw=60108,Iw=60114,Rw=60109,Pw=60110,Ow=60112,Mw=60113,Zz=60120,kw=60115,Lw=60116,mJ=60121,vJ=60122,yJ=60117,bJ=60129,xJ=60131;if(typeof Symbol=="function"&&Symbol.for){var Wi=Symbol.for;VA=Wi("react.element"),XA=Wi("react.portal"),Tw=Wi("react.fragment"),Aw=Wi("react.strict_mode"),Iw=Wi("react.profiler"),Rw=Wi("react.provider"),Pw=Wi("react.context"),Ow=Wi("react.forward_ref"),Mw=Wi("react.suspense"),Zz=Wi("react.suspense_list"),kw=Wi("react.memo"),Lw=Wi("react.lazy"),mJ=Wi("react.block"),vJ=Wi("react.server.block"),yJ=Wi("react.fundamental"),bJ=Wi("react.debug_trace_mode"),xJ=Wi("react.legacy_hidden")}function Ol(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case VA:switch(e=e.type,e){case Tw:case Iw:case Aw:case Mw:case Zz:return e;default:switch(e=e&&e.$$typeof,e){case Pw:case Ow:case Lw:case kw:case Rw:return e;default:return t}}case XA:return t}}}var C_e=Rw,T_e=VA,A_e=Ow,I_e=Tw,R_e=Lw,P_e=kw,O_e=XA,M_e=Iw,k_e=Aw,L_e=Mw;or.ContextConsumer=Pw;or.ContextProvider=C_e;or.Element=T_e;or.ForwardRef=A_e;or.Fragment=I_e;or.Lazy=R_e;or.Memo=P_e;or.Portal=O_e;or.Profiler=M_e;or.StrictMode=k_e;or.Suspense=L_e;or.isAsyncMode=function(){return!1};or.isConcurrentMode=function(){return!1};or.isContextConsumer=function(e){return Ol(e)===Pw};or.isContextProvider=function(e){return Ol(e)===Rw};or.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VA};or.isForwardRef=function(e){return Ol(e)===Ow};or.isFragment=function(e){return Ol(e)===Tw};or.isLazy=function(e){return Ol(e)===Lw};or.isMemo=function(e){return Ol(e)===kw};or.isPortal=function(e){return Ol(e)===XA};or.isProfiler=function(e){return Ol(e)===Iw};or.isStrictMode=function(e){return Ol(e)===Aw};or.isSuspense=function(e){return Ol(e)===Mw};or.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tw||e===Iw||e===bJ||e===Aw||e===Mw||e===Zz||e===xJ||typeof e=="object"&&e!==null&&(e.$$typeof===Lw||e.$$typeof===kw||e.$$typeof===Rw||e.$$typeof===Pw||e.$$typeof===Ow||e.$$typeof===yJ||e.$$typeof===mJ||e[0]===vJ)};or.typeOf=Ol;gJ.exports=or;var wJ=gJ.exports;function SC(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Dr.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Dr.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 @@ -279,7 +279,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. -***************************************************************************** */function N_(e,t,n=[],r={condition:!0}){const{condition:i}=r,o=function(s,a){var u={};for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&a.indexOf(c)<0&&(u[c]=s[c]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var d=0;for(c=Object.getOwnPropertySymbols(s);d(i&&window.addEventListener(e,t,o),()=>{i&&window.removeEventListener(e,t)}),[e,t,i,...n])}(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`/* === Main Container === */ +***************************************************************************** */function B_(e,t,n=[],r={condition:!0}){const{condition:i}=r,o=function(s,a){var u={};for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&a.indexOf(c)<0&&(u[c]=s[c]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var d=0;for(c=Object.getOwnPropertySymbols(s);d(i&&window.addEventListener(e,t,o),()=>{i&&window.removeEventListener(e,t)}),[e,t,i,...n])}(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`/* === Main Container === */ .__dbk__container { height: 100%; width: 100%; @@ -368,12 +368,12 @@ PERFORMANCE OF THIS SOFTWARE. .__dbk__dragger.Dark { background: #434252; } -/* ====== */`);const L_e=fe.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Lr.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,a=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:sE?i:void 0},{children:C.jsx("div",{className:a},void 0)}),void 0)});var pa;function l3(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 N_e(e,t){switch(t.type){case pa.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case pa.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=_C(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const a=[];return r.forEach((u,c)=>{if(c>0){const d=r[c-1],h=r[c],p=i[c-1],m=n===Lr.Horizontal?d.getBoundingClientRect().left:d.getBoundingClientRect().top,v=n===Lr.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Lr.Horizontal?d.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:d.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Lr.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,w={idx:c-1,a:d,b:h,gutter:p,parent:o,start:m,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};a.push(w)}}),Object.assign(Object.assign({},e),{pairs:a})}case pa.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case pa.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case pa.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=_C(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Lr.Horizontal?"clientWidth":"clientHeight"],a=r===0,u=r===e.pairs.length-1,{aGutterSize:c,bGutterSize:d}=l3(s,a,u);let h,p,m,v,y;return n===Lr.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+c)/o*100,y=(i.b.getBoundingClientRect().width+d)/o*100,m=i.a.getBoundingClientRect().width+c+d+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+c)/o*100,y=(i.b.getBoundingClientRect().height+d)/o*100,m=i.a.getBoundingClientRect().height+c+d+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:m,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function wJ(e,t=0,n=[]){return O.Children.toArray(e).reduce((r,i,o)=>(xJ.isFragment(i)?r.push.apply(r,wJ(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"})(pa||(pa={}));const JH=e=>"changedTouches"in e;var Lr,u3;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Lr||(Lr={})),function(e){e.Light="Light",e.Dark="Dark"}(u3||(u3={}));const sE=typeof window<"u"&&"ontouchstart"in window;function eN(e){return e===Lr.Horizontal?"col-resize":"row-resize"}const B_e={isReady:!1,isDragging:!1,pairs:[]};function $_e({direction:e=Lr.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=u3.Dark,gutterClassName:o,draggerClassName:s,children:a,onResizeStarted:u,onResizeFinished:c,classes:d=[]}){const h=wJ(a),[p,m]=O.useReducer(N_e,B_e),v=O.useRef(null),y=O.useRef([]),S=O.useRef([]);y.current=[],S.current=[];const w=fe.useCallback(V=>{m({type:pa.SetIsReadyToCompute,payload:{isReady:V}})},[]),b=fe.useCallback((V,U)=>{m({type:pa.StartDragging,payload:{gutterIdx:U}});const D=p.pairs[U];u==null||u(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=eN(V),D.parent.style.cursor=eN(V),document.body.style.cursor=eN(V)},[p.pairs]),x=fe.useCallback(()=>{m({type:pa.StopDragging});const V=[];for(let D=0;D{m({type:pa.CalculateSizes,payload:{direction:V,gutterIdx:U}})},[]),A=fe.useCallback((V,U,D)=>{m({type:pa.CreatePairs,payload:{direction:V,children:U,gutters:D}})},[]),I=fe.useCallback((V,U,D,F)=>{const z=U[0].parentNode;if(!z)throw new Error("Cannot set initial sizes - parent is undefined");if(_C(V,z)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");U.forEach((G,W)=>{const K=W===0,q=W===U.length-1;let Q,re=0;U.length>1&&(re=D[q?W-1:W].getBoundingClientRect()[V===Lr.Horizontal?"width":"height"],re=K||q?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,G=F-U/D.size*F,W=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:q,bGutterSize:Q}=l3(D.gutterSize,W,K),re=`calc(${z}% - ${q}px)`,ue=`calc(${G}% - ${Q}px)`;V===Lr.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=fe.useCallback((V,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,q){const Q=JH(q)?q.changedTouches[0]:q;return K===Lr.Horizontal?Q.clientX:Q.clientY}(U,V)-F.start,G=16,W=16;D.length>p.draggingIdx&&(G=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()}},N=V=>{p.isDragging&&(JH(V)&&V.preventDefault(),M(V,e,e===Lr.Horizontal?t:n))};function H(V,U){if(!V.current)throw new Error("Can't add element to ref object - ref isn't initialized");U&&!V.current.includes(U)&&V.current.push(U)}return N_("mouseup",L,[p.isDragging,x]),N_("mousemove",N,[e,p.isDragging,M,t,n]),N_("touchend",L,[p.isDragging,x],{condition:sE}),N_("touchmove",N,[e,p.isDragging,M,t,n],{condition:sE,passive:!sE}),O.useEffect(function(){if(!v.current)return;const V=v.current.parentElement;if(!V)return;const U=new ResizeObserver(()=>{const D=getComputedStyle(V),F=e===Lr.Horizontal?V.clientWidth:V.clientHeight;w(!!D&&!!F)});return U.observe(V),()=>{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?I(e,y.current,S.current,r):(I(e,y.current,S.current,r),A(e,y.current,S.current))}},[a,p.isReady,e,I,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((V,U)=>C.jsxs(fe.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 ca=(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 Ob(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 ZH={};function F_e(e,t){ZH[e]||(ZH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const z_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function U_e({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(z_e),a=O.useCallback(b=>{i.current&&s(b)},[]),u=O.useCallback(b=>a(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),c=Ob(b=>(o.isOpen?p(b):d(b),o)),d=Ob(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"){a(L=>({...L,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,I=x==null?void 0:x.clientY,R=typeof A=="number"&&typeof I=="number"?{left:A,top:I}:void 0,M=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&F_e("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(w))}const N={...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||(N.anchorEl=x==null?void 0:x.currentTarget):E&&(N.anchorEl=E),N};a(L=>L._deferNextOpen?(setTimeout(()=>a(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=Ob(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){a(E=>({...E,_deferNextClose:!0}));return}a(E=>E._deferNextClose?(setTimeout(()=>a(h),0),{...E,_deferNextClose:!1}):h(E))}),m=O.useCallback((b,x)=>{b?d(x):p(x)},[]),v=Ob(b=>{const{relatedTarget:x}=b;a(E=>E.hovered&&!(x instanceof Element&&c3(x,w))?E.focused?{...E,hovered:!1}:h(E):E)}),y=Ob(b=>{if(!b)return;const{relatedTarget:x}=b;a(E=>E.focused&&!(x instanceof Element&&c3(x,w))?E.hovered?{...E,focused:!1}:h(E):E)}),S=O.useCallback(b=>a(x=>({...x,_childPopupState:b})),[]),w={...o,setAnchorEl:u,popupId:t,variant:n,open:d,close:p,toggle:c,setOpen:m,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return w}function j_e({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 Zz(e){return{...j_e(e),onClick:e.open,onTouchStart:e.open}}function qA({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:a}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:a==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function H_e(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 c3(e,t){const{anchorEl:n,_childPopupState:r}=t;return eW(n,e)||eW(H_e(e,t),e)||r!=null&&c3(e,r)}function eW(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function _v({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=U_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}_v.propTypes={children:hb.func.isRequired,popupId:hb.string,variant:hb.oneOf(["popover","popper"]).isRequired,parentPopupState:hb.object,disableAutoFocus:hb.bool};function W_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(_v,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Hm,{sx:{m:1},children:C.jsx(vd,{title:"Panel Options",children:C.jsx($p,{size:"small",...Zz(s),children:C.jsx(yxe,{fontSize:"small"})})})}),C.jsxs(xv,{...qA(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(Vf,{onClick:n,disabled:o,children:[C.jsx(Gf,{children:C.jsx(EH,{fontSize:"small"})}),C.jsx(ru,{children:"Split Vertical"})]}),C.jsxs(Vf,{onClick:e,disabled:i,children:[C.jsx(Gf,{children:C.jsx(EH,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(ru,{children:"Split Horizontal"})]}),C.jsx(Kc,{}),C.jsxs(Vf,{onClick:t,disabled:r,children:[C.jsx(Gf,{children:C.jsx(AQ,{fontSize:"small"})}),C.jsx(ru,{children:"Close Panel"})]})]})]})})}function Oc(e,t){const n=structuredClone(e);return t(n),n}function tW(e,t){return t(structuredClone(e))}function Ax(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,Oc(t.value,n))}})}const _J=O.createContext({});function bd(){return O.useContext(_J)}function SJ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:a}=Dn(),u=Ex({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:a.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),c=Ex({"div&":{background:o.background.default,[`&:hover .${u}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),d=m=>Number(s(m).slice(0,-2));function h(m){const v=100-ie.sumBy(m,"size"),y=ie.filter(m,S=>!S.size).length;return y?v/y:0}const p=O.useMemo(()=>{const m=v=>n==null?void 0:n(tW(e,y=>({key:ca(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:ca()},{...structuredClone(y),size:50,key:ca()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(W_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>m("horizontal"),onSplitVertical:()=>m("vertical")}),onChange:v=>n==null?void 0:n(Oc(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(En,{children:C.jsx(En,{sx:{borderRadius:m=>m.spacing(1),overflow:"hidden"},children:C.jsx(_J.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx($_e,{gutterClassName:c,draggerClassName:u,onResizeFinished:(m,v)=>n==null?void 0:n(Oc(e,y=>{ie.forEach(v,(S,w)=>{y.children[w].size=S})})),minHeights:ie.map(e.children,()=>d(6)-11),minWidths:ie.map(e.children,()=>d(32)),initialSizes:ie.map(e.children,(m,v,y)=>m.size??h(y)),direction:{vertical:Lr.Vertical,horizontal:Lr.Horizontal}[e.orientation],children:ie.map(e.children,(m,v)=>C.jsx(SJ,{depth:i+1,renderLeaf:t,root:m,onChange:y=>n==null?void 0:n(Oc(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(tW(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:ca(),content:y.children[0].content}:y.children[0]:(ie.forEach(y.children,(S,w,b)=>S.size=100/b.length),y))))},m.key))})})}function Ix(){return Ix=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var V_e=["PropTypes"],X_e=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},{})},q_e=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},Y_e=function(t){return typeof t=="string"&&!V_e.includes(t)&&t.match(/^[A-Z0-9]/)},K_e=function(t){var n=O.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,a=s===void 0?[]:s,u=G_e(r,["children","propagateSlotProps","slotKeys"]),c=O.useMemo(function(){return X_e(i,a)},[a,i]),d=O.useMemo(function(){return q_e(i,a)},[a,i]),h=O.useMemo(function(){return Ix({},u,{slotProps:Ix({},o,c)})},[u,c,o]);return O.createElement(t,h,d)});return n},Q_e=function(t){var n=O.memo(K_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,a){var u;if(s in o||typeof s=="symbol"||!Y_e(s))return Reflect.get(o,s,a);var c=((u=Reflect.get(o,"defaultProps"))==null?void 0:u.slotKeys)||[],d=Reflect.get(o,s);if(!d){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",Ix({},o.defaultProps,{slotKeys:[].concat(c,[s])})),Reflect.get(o,s,a)}});return r};function e6(){const e=Dn();return Xve(e.breakpoints.down("sm"))}const J_e=e=>e?48:36,Z_e=8;function eSe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=e6(),s=ie.max([ie.findIndex(t,{value:n}),0])??0;return C.jsx(_v,{variant:"popover",children:a=>C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(Zz(a))})}),C.jsx(xv,{...qA(a),anchorOrigin:{horizontal:"center",vertical:-J_e(o)*s-Z_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:u,label:c,disabled:d})=>C.jsx(Vf,{disabled:d,value:u,selected:u===n,onClick:()=>{a.close(),r==null||r(u)},children:c},u))})]})})}function $1(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(ww,{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(Vf,{value:o.value,children:o.label},o.value))})}function Hp({children:e,icon:t,showArrow:n,...r}){return C.jsx(Rz,{...r,startIcon:t,endIcon:n&&C.jsx(mxe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(gt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Hs({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:a}){const u=ie.find(r,{id:t});return C.jsx(eSe,{placeholder:ie.startCase(e),trigger:c=>C.jsx(Hp,{...c,...a,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(u==null?void 0:u.name)??e}),items:ie.map(r,({id:c,name:d,description:h,hidden:p})=>({value:c,label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:d}),C.jsx(ai,{}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:u==null?void 0:u.id,onChange:n})}const EJ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],CJ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],Rg=4,tSe={renderer:CJ,remote:EJ,playbackRate:Rg,theme:"dark",acrylic:!0,accentColor:"blue"},[Jc,nSe]=gu({},ewe("settings",tSe)),{common:A7e,...rSe}=eq,iSe=` +/* ====== */`);const D_e=fe.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Dr.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,a=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:aE?i:void 0},{children:C.jsx("div",{className:a},void 0)}),void 0)});var pa;function u3(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 N_e(e,t){switch(t.type){case pa.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case pa.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=SC(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const a=[];return r.forEach((u,c)=>{if(c>0){const d=r[c-1],h=r[c],p=i[c-1],m=n===Dr.Horizontal?d.getBoundingClientRect().left:d.getBoundingClientRect().top,v=n===Dr.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Dr.Horizontal?d.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:d.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Dr.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,w={idx:c-1,a:d,b:h,gutter:p,parent:o,start:m,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};a.push(w)}}),Object.assign(Object.assign({},e),{pairs:a})}case pa.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case pa.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case pa.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=SC(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Dr.Horizontal?"clientWidth":"clientHeight"],a=r===0,u=r===e.pairs.length-1,{aGutterSize:c,bGutterSize:d}=u3(s,a,u);let h,p,m,v,y;return n===Dr.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+c)/o*100,y=(i.b.getBoundingClientRect().width+d)/o*100,m=i.a.getBoundingClientRect().width+c+d+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+c)/o*100,y=(i.b.getBoundingClientRect().height+d)/o*100,m=i.a.getBoundingClientRect().height+c+d+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:m,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function _J(e,t=0,n=[]){return O.Children.toArray(e).reduce((r,i,o)=>(wJ.isFragment(i)?r.push.apply(r,_J(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"})(pa||(pa={}));const ZH=e=>"changedTouches"in e;var Dr,c3;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Dr||(Dr={})),function(e){e.Light="Light",e.Dark="Dark"}(c3||(c3={}));const aE=typeof window<"u"&&"ontouchstart"in window;function eN(e){return e===Dr.Horizontal?"col-resize":"row-resize"}const B_e={isReady:!1,isDragging:!1,pairs:[]};function $_e({direction:e=Dr.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=c3.Dark,gutterClassName:o,draggerClassName:s,children:a,onResizeStarted:u,onResizeFinished:c,classes:d=[]}){const h=_J(a),[p,m]=O.useReducer(N_e,B_e),v=O.useRef(null),y=O.useRef([]),S=O.useRef([]);y.current=[],S.current=[];const w=fe.useCallback(V=>{m({type:pa.SetIsReadyToCompute,payload:{isReady:V}})},[]),b=fe.useCallback((V,U)=>{m({type:pa.StartDragging,payload:{gutterIdx:U}});const L=p.pairs[U];u==null||u(L.idx),L.a.style.userSelect="none",L.b.style.userSelect="none",L.gutter.style.cursor=eN(V),L.parent.style.cursor=eN(V),document.body.style.cursor=eN(V)},[p.pairs]),x=fe.useCallback(()=>{m({type:pa.StopDragging});const V=[];for(let L=0;L{m({type:pa.CalculateSizes,payload:{direction:V,gutterIdx:U}})},[]),A=fe.useCallback((V,U,L)=>{m({type:pa.CreatePairs,payload:{direction:V,children:U,gutters:L}})},[]),I=fe.useCallback((V,U,L,F)=>{const z=U[0].parentNode;if(!z)throw new Error("Cannot set initial sizes - parent is undefined");if(SC(V,z)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");U.forEach((G,W)=>{const K=W===0,q=W===U.length-1;let Q,re=0;U.length>1&&(re=L[q?W-1:W].getBoundingClientRect()[V===Dr.Horizontal?"width":"height"],re=K||q?re/2:re),Q=F&&W{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const L=p.pairs[p.draggingIdx];if(L.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(L.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=L.aSizePct+L.bSizePct,z=U/L.size*F,G=F-U/L.size*F,W=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:q,bGutterSize:Q}=u3(L.gutterSize,W,K),re=`calc(${z}% - ${q}px)`,ue=`calc(${G}% - ${Q}px)`;V===Dr.Horizontal?(L.a.style.width=re,L.b.style.width=ue):(L.a.style.height=re,L.b.style.height=ue)},[p.draggingIdx,p.pairs,e]),M=fe.useCallback((V,U,L)=>{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,q){const Q=ZH(q)?q.changedTouches[0]:q;return K===Dr.Horizontal?Q.clientX:Q.clientY}(U,V)-F.start,G=16,W=16;L.length>p.draggingIdx&&(G=L[p.draggingIdx]),L.length>=p.draggingIdx+1&&(W=L[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]),D=()=>{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()}},N=V=>{p.isDragging&&(ZH(V)&&V.preventDefault(),M(V,e,e===Dr.Horizontal?t:n))};function H(V,U){if(!V.current)throw new Error("Can't add element to ref object - ref isn't initialized");U&&!V.current.includes(U)&&V.current.push(U)}return B_("mouseup",D,[p.isDragging,x]),B_("mousemove",N,[e,p.isDragging,M,t,n]),B_("touchend",D,[p.isDragging,x],{condition:aE}),B_("touchmove",N,[e,p.isDragging,M,t,n],{condition:aE,passive:!aE}),O.useEffect(function(){if(!v.current)return;const V=v.current.parentElement;if(!V)return;const U=new ResizeObserver(()=>{const L=getComputedStyle(V),F=e===Dr.Horizontal?V.clientWidth:V.clientHeight;w(!!L&&!!F)});return U.observe(V),()=>{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?I(e,y.current,S.current,r):(I(e,y.current,S.current,r),A(e,y.current,S.current))}},[a,p.isReady,e,I,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((V,U)=>C.jsxs(fe.Fragment,{children:[C.jsx("div",Object.assign({ref:L=>H(y,L),className:"__dbk__child-wrapper "+(UH(S,L),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,L=U),void b(e,L);var L}},void 0)]},U))}),void 0)}let ca=(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 Ob(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 eW={};function F_e(e,t){eW[e]||(eW[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const z_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function U_e({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(z_e),a=O.useCallback(b=>{i.current&&s(b)},[]),u=O.useCallback(b=>a(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),c=Ob(b=>(o.isOpen?p(b):d(b),o)),d=Ob(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"){a(D=>({...D,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,I=x==null?void 0:x.clientY,R=typeof A=="number"&&typeof I=="number"?{left:A,top:I}:void 0,M=D=>{if(!b&&!D.setAnchorElUsed&&n!=="dialog"&&F_e("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return D;setTimeout(()=>e._setChildPopupState(w))}const N={...D,isOpen:!0,anchorPosition:R,hovered:(x==null?void 0:x.type)==="mouseover"||D.hovered,focused:(x==null?void 0:x.type)==="focus"||D.focused,_openEventType:x==null?void 0:x.type};return x!=null&&x.currentTarget?D.setAnchorElUsed||(N.anchorEl=x==null?void 0:x.currentTarget):E&&(N.anchorEl=E),N};a(D=>D._deferNextOpen?(setTimeout(()=>a(M),0),{...D,_deferNextOpen:!1}):M(D))}),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=Ob(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){a(E=>({...E,_deferNextClose:!0}));return}a(E=>E._deferNextClose?(setTimeout(()=>a(h),0),{...E,_deferNextClose:!1}):h(E))}),m=O.useCallback((b,x)=>{b?d(x):p(x)},[]),v=Ob(b=>{const{relatedTarget:x}=b;a(E=>E.hovered&&!(x instanceof Element&&f3(x,w))?E.focused?{...E,hovered:!1}:h(E):E)}),y=Ob(b=>{if(!b)return;const{relatedTarget:x}=b;a(E=>E.focused&&!(x instanceof Element&&f3(x,w))?E.hovered?{...E,focused:!1}:h(E):E)}),S=O.useCallback(b=>a(x=>({...x,_childPopupState:b})),[]),w={...o,setAnchorEl:u,popupId:t,variant:n,open:d,close:p,toggle:c,setOpen:m,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return w}function j_e({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 e6(e){return{...j_e(e),onClick:e.open,onTouchStart:e.open}}function qA({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:a}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:a==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function H_e(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 f3(e,t){const{anchorEl:n,_childPopupState:r}=t;return tW(n,e)||tW(H_e(e,t),e)||r!=null&&f3(e,r)}function tW(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function _v({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=U_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}_v.propTypes={children:hb.func.isRequired,popupId:hb.string,variant:hb.oneOf(["popover","popper"]).isRequired,parentPopupState:hb.object,disableAutoFocus:hb.bool};function W_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(_v,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Hm,{sx:{m:1},children:C.jsx(vd,{title:"Panel Options",children:C.jsx($p,{size:"small",...e6(s),children:C.jsx(yxe,{fontSize:"small"})})})}),C.jsxs(xv,{...qA(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(Vf,{onClick:n,disabled:o,children:[C.jsx(Gf,{children:C.jsx(CH,{fontSize:"small"})}),C.jsx(ru,{children:"Split Vertical"})]}),C.jsxs(Vf,{onClick:e,disabled:i,children:[C.jsx(Gf,{children:C.jsx(CH,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(ru,{children:"Split Horizontal"})]}),C.jsx(Kc,{}),C.jsxs(Vf,{onClick:t,disabled:r,children:[C.jsx(Gf,{children:C.jsx(IQ,{fontSize:"small"})}),C.jsx(ru,{children:"Close Panel"})]})]})]})})}function Oc(e,t){const n=structuredClone(e);return t(n),n}function nW(e,t){return t(structuredClone(e))}function Ax(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,Oc(t.value,n))}})}const SJ=O.createContext({});function bd(){return O.useContext(SJ)}function EJ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:a}=Ln(),u=Ex({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:a.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),c=Ex({"div&":{background:o.background.default,[`&:hover .${u}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),d=m=>Number(s(m).slice(0,-2));function h(m){const v=100-ie.sumBy(m,"size"),y=ie.filter(m,S=>!S.size).length;return y?v/y:0}const p=O.useMemo(()=>{const m=v=>n==null?void 0:n(nW(e,y=>({key:ca(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:ca()},{...structuredClone(y),size:50,key:ca()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(W_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>m("horizontal"),onSplitVertical:()=>m("vertical")}),onChange:v=>n==null?void 0:n(Oc(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(En,{children:C.jsx(En,{sx:{borderRadius:m=>m.spacing(1),overflow:"hidden"},children:C.jsx(SJ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx($_e,{gutterClassName:c,draggerClassName:u,onResizeFinished:(m,v)=>n==null?void 0:n(Oc(e,y=>{ie.forEach(v,(S,w)=>{y.children[w].size=S})})),minHeights:ie.map(e.children,()=>d(6)-11),minWidths:ie.map(e.children,()=>d(32)),initialSizes:ie.map(e.children,(m,v,y)=>m.size??h(y)),direction:{vertical:Dr.Vertical,horizontal:Dr.Horizontal}[e.orientation],children:ie.map(e.children,(m,v)=>C.jsx(EJ,{depth:i+1,renderLeaf:t,root:m,onChange:y=>n==null?void 0:n(Oc(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(nW(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:ca(),content:y.children[0].content}:y.children[0]:(ie.forEach(y.children,(S,w,b)=>S.size=100/b.length),y))))},m.key))})})}function Ix(){return Ix=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var V_e=["PropTypes"],X_e=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},{})},q_e=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},Y_e=function(t){return typeof t=="string"&&!V_e.includes(t)&&t.match(/^[A-Z0-9]/)},K_e=function(t){var n=O.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,a=s===void 0?[]:s,u=G_e(r,["children","propagateSlotProps","slotKeys"]),c=O.useMemo(function(){return X_e(i,a)},[a,i]),d=O.useMemo(function(){return q_e(i,a)},[a,i]),h=O.useMemo(function(){return Ix({},u,{slotProps:Ix({},o,c)})},[u,c,o]);return O.createElement(t,h,d)});return n},Q_e=function(t){var n=O.memo(K_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,a){var u;if(s in o||typeof s=="symbol"||!Y_e(s))return Reflect.get(o,s,a);var c=((u=Reflect.get(o,"defaultProps"))==null?void 0:u.slotKeys)||[],d=Reflect.get(o,s);if(!d){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",Ix({},o.defaultProps,{slotKeys:[].concat(c,[s])})),Reflect.get(o,s,a)}});return r};function t6(){const e=Ln();return Xve(e.breakpoints.down("sm"))}const J_e=e=>e?48:36,Z_e=8;function eSe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=t6(),s=ie.max([ie.findIndex(t,{value:n}),0])??0;return C.jsx(_v,{variant:"popover",children:a=>C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(e6(a))})}),C.jsx(xv,{...qA(a),anchorOrigin:{horizontal:"center",vertical:-J_e(o)*s-Z_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:u,label:c,disabled:d})=>C.jsx(Vf,{disabled:d,value:u,selected:u===n,onClick:()=>{a.close(),r==null||r(u)},children:c},u))})]})})}function $1(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(_w,{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(Vf,{value:o.value,children:o.label},o.value))})}function Hp({children:e,icon:t,showArrow:n,...r}){return C.jsx(Pz,{...r,startIcon:t,endIcon:n&&C.jsx(mxe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(gt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Hs({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:a}){const u=ie.find(r,{id:t});return C.jsx(eSe,{placeholder:ie.startCase(e),trigger:c=>C.jsx(Hp,{...c,...a,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(u==null?void 0:u.name)??e}),items:ie.map(r,({id:c,name:d,description:h,hidden:p})=>({value:c,label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:d}),C.jsx(ai,{}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:u==null?void 0:u.id,onChange:n})}const CJ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],TJ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],Rg=4,tSe={renderer:TJ,remote:CJ,playbackRate:Rg,theme:"dark",acrylic:!0,accentColor:"blue"},[Jc,nSe]=gu({},ewe("settings",tSe)),{common:I7e,...rSe}=tq,iSe=` 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%) -`,oSe=(e,t)=>E4({palette:{primary:{main:eq[t][e==="dark"?"A100":"500"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:"Inter"},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ie.times(24,ie.constant(iSe))]});function sSe(){const[{acrylic:e}]=Jc();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>An(t.background.paper,.84)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const aSe=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),zn=Q_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,a;const r=sSe();return C.jsxs(En,{vertical:!0,children:[C.jsx(En,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(zp,{in:!0,children:C.jsx(gt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(En,{sx:{height:u=>u.spacing(6)},children:[C.jsx(En,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(GA,{x:!0,children:C.jsxs(En,{sx:{width:"max-content",height:u=>u.spacing(6),alignItems:"center",p:1},children:[C.jsx(Hs,{showArrow:!0,label:"Page",onChange:u=>t==null?void 0:t({...n,type:u}),icon:(o=J5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ie.values(J5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[aSe,e.Options.children]})]})})}),C.jsx(ai,{sx:{mx:"auto"}}),(a=e.Extras)==null?void 0:a.children]})]})}),TJ=""+new URL("logo512-23eace97.png",import.meta.url).href,SC="Visualiser",lSe="1.0.4; mid October 2023",uSe=[{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 cSe(){const{controls:e,onChange:t,state:n}=bd();function r(i,o){return C.jsxs(gt,{sx:{pt:2},children:[C.jsx(Wt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(Wt,{variant:"body2",children:o})]})}return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsxs(En,{children:[" ",C.jsx(GA,{y:!0,children:C.jsxs(gt,{sx:{p:2},children:[C.jsx(gt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:TJ,height:"64"})}),C.jsx(Wt,{variant:"h6",children:SC}),r("Build Info",C.jsx(C.Fragment,{children:lSe})),r("About this App",C.jsxs(C.Fragment,{children:[SC," 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(Wm,{sx:{mx:-2},children:uSe.map(({name:i,email:o},s)=>C.jsxs(KF,{href:`mailto:${o}`,children:[C.jsx(q0e,{children:C.jsx(Mge,{children:ie.head(i)})}),C.jsx(ru,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(Wm,{sx:{mx:-2},children:C.jsxs(KF,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Gf,{children:C.jsx(hxe,{})}),C.jsx(ru,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(zn.Extras,{children:e})]})}const AJ=O.createContext(null);function fSe(){const[e,t]=O.useState(null);return O.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function IJ(e){const{children:t,value:n}=e,r=fSe(),i=O.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(AJ.Provider,{value:i,children:t})}function RJ(){return O.useContext(AJ)}function PJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function OJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const dSe=["children"],hSe=O.forwardRef(function(t,n){const{children:r}=t,i=Ne(t,dSe),o=RJ();if(o===null)throw new TypeError("No TabContext provided");const s=O.Children.map(r,a=>O.isValidElement(a)?O.cloneElement(a,{"aria-controls":PJ(o,a.props.value),id:OJ(o,a.props.value)}):null);return C.jsx(X1e,$({},i,{ref:n,value:o.value,children:s}))}),MJ=hSe;function pSe(e){return Ct("MuiTabPanel",e)}Rt("MuiTabPanel",["root"]);const gSe=["children","className","value"],mSe=e=>{const{classes:t}=e;return It({root:["root"]},pSe,t)},vSe=Ce("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),ySe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,a=Ne(r,gSe),u=$({},r),c=mSe(u),d=RJ();if(d===null)throw new TypeError("No TabContext provided");const h=PJ(d,s),p=OJ(d,s);return C.jsx(vSe,$({"aria-labelledby":p,className:je(c.root,o),hidden:s!==d.value,id:h,ref:n,role:"tabpanel",ownerState:u},a,{children:s===d.value&&i}))}),tm=ySe;var kJ={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})(kJ);var t6=kJ.exports;function f3({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Ave,{control:C.jsx(Gm,{defaultChecked:!0,...t}),label:e})}function bSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nW(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 rW(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function wSe(e,t){if(e==null)return{};var n=xSe(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 _Se(e,t){return SSe(e)||ESe(e,t)||CSe(e,t)||TSe()}function SSe(e){if(Array.isArray(e))return e}function ESe(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](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function CSe(e,t){if(e){if(typeof e=="string")return iW(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 iW(e,t)}}function iW(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,a=new Array(s),u=0;u1&&arguments[1]!==void 0?arguments[1]:{};B_.initial(e),B_.handler(t);var n={current:e},r=s1(zSe)(n,t),i=s1(FSe)(n),o=s1(B_.changes)(e),s=s1($Se)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return B_.selector(c),c(n.current)}function u(c){ISe(r,i,o,s)(c)}return[a,u]}function $Se(e,t){return Rx(t)?t(e.current):t}function FSe(e,t){return e.current=sW(sW({},e.current),t),t}function zSe(e,t,n){return Rx(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 USe={create:BSe},jSe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function HSe(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,a=new Array(s),u=0;uC4({palette:{primary:{main:tq[t][e==="dark"?"A100":"500"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:"Inter"},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ie.times(24,ie.constant(iSe))]});function sSe(){const[{acrylic:e}]=Jc();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>An(t.background.paper,.84)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const aSe=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),zn=Q_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,a;const r=sSe();return C.jsxs(En,{vertical:!0,children:[C.jsx(En,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(zp,{in:!0,children:C.jsx(gt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(En,{sx:{height:u=>u.spacing(6)},children:[C.jsx(En,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(GA,{x:!0,children:C.jsxs(En,{sx:{width:"max-content",height:u=>u.spacing(6),alignItems:"center",p:1},children:[C.jsx(Hs,{showArrow:!0,label:"Page",onChange:u=>t==null?void 0:t({...n,type:u}),icon:(o=Z5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ie.values(Z5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[aSe,e.Options.children]})]})})}),C.jsx(ai,{sx:{mx:"auto"}}),(a=e.Extras)==null?void 0:a.children]})]})}),AJ=""+new URL("logo512-23eace97.png",import.meta.url).href,EC="Visualiser",lSe="1.0.4; mid October 2023",uSe=[{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 cSe(){const{controls:e,onChange:t,state:n}=bd();function r(i,o){return C.jsxs(gt,{sx:{pt:2},children:[C.jsx(Wt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(Wt,{variant:"body2",children:o})]})}return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsxs(En,{children:[" ",C.jsx(GA,{y:!0,children:C.jsxs(gt,{sx:{p:2},children:[C.jsx(gt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:AJ,height:"64"})}),C.jsx(Wt,{variant:"h6",children:EC}),r("Build Info",C.jsx(C.Fragment,{children:lSe})),r("About this App",C.jsxs(C.Fragment,{children:[EC," 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(Wm,{sx:{mx:-2},children:uSe.map(({name:i,email:o},s)=>C.jsxs(QF,{href:`mailto:${o}`,children:[C.jsx(q0e,{children:C.jsx(Mge,{children:ie.head(i)})}),C.jsx(ru,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(Wm,{sx:{mx:-2},children:C.jsxs(QF,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Gf,{children:C.jsx(hxe,{})}),C.jsx(ru,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(zn.Extras,{children:e})]})}const IJ=O.createContext(null);function fSe(){const[e,t]=O.useState(null);return O.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function RJ(e){const{children:t,value:n}=e,r=fSe(),i=O.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(IJ.Provider,{value:i,children:t})}function PJ(){return O.useContext(IJ)}function OJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function MJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const dSe=["children"],hSe=O.forwardRef(function(t,n){const{children:r}=t,i=Ne(t,dSe),o=PJ();if(o===null)throw new TypeError("No TabContext provided");const s=O.Children.map(r,a=>O.isValidElement(a)?O.cloneElement(a,{"aria-controls":OJ(o,a.props.value),id:MJ(o,a.props.value)}):null);return C.jsx(X1e,$({},i,{ref:n,value:o.value,children:s}))}),kJ=hSe;function pSe(e){return Ct("MuiTabPanel",e)}Rt("MuiTabPanel",["root"]);const gSe=["children","className","value"],mSe=e=>{const{classes:t}=e;return It({root:["root"]},pSe,t)},vSe=Ce("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),ySe=O.forwardRef(function(t,n){const r=Pt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,a=Ne(r,gSe),u=$({},r),c=mSe(u),d=PJ();if(d===null)throw new TypeError("No TabContext provided");const h=OJ(d,s),p=MJ(d,s);return C.jsx(vSe,$({"aria-labelledby":p,className:je(c.root,o),hidden:s!==d.value,id:h,ref:n,role:"tabpanel",ownerState:u},a,{children:s===d.value&&i}))}),tm=ySe;var LJ={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})(LJ);var n6=LJ.exports;function d3({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Ave,{control:C.jsx(Gm,{defaultChecked:!0,...t}),label:e})}function bSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rW(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 iW(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function wSe(e,t){if(e==null)return{};var n=xSe(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 _Se(e,t){return SSe(e)||ESe(e,t)||CSe(e,t)||TSe()}function SSe(e){if(Array.isArray(e))return e}function ESe(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](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function CSe(e,t){if(e){if(typeof e=="string")return oW(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 oW(e,t)}}function oW(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,a=new Array(s),u=0;u1&&arguments[1]!==void 0?arguments[1]:{};$_.initial(e),$_.handler(t);var n={current:e},r=s1(zSe)(n,t),i=s1(FSe)(n),o=s1($_.changes)(e),s=s1($Se)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return $_.selector(c),c(n.current)}function u(c){ISe(r,i,o,s)(c)}return[a,u]}function $Se(e,t){return Rx(t)?t(e.current):t}function FSe(e,t){return e.current=aW(aW({},e.current),t),t}function zSe(e,t,n){return Rx(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 USe={create:BSe},jSe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function HSe(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,a=new Array(s),u=0;u{r.current=!1}:e,t)}var Ds=pEe;function F1(){}function nm(e,t,n,r){return gEe(e,r)||mEe(e,t,n,r)}function gEe(e,t){return e.editor.getModel(UJ(e,t))}function mEe(e,t,n,r){return e.editor.createModel(t,n,r?UJ(e,r):void 0)}function UJ(e,t){return e.Uri.parse(t)}function vEe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:u=!1,theme:c="light",loading:d="Loading...",options:h={},height:p="100%",width:m="100%",className:v,wrapperProps:y={},beforeMount:S=F1,onMount:w=F1}){let[b,x]=O.useState(!1),[E,A]=O.useState(!0),I=O.useRef(null),R=O.useRef(null),M=O.useRef(null),L=O.useRef(w),N=O.useRef(S),H=O.useRef(!1);zJ(()=>{let F=$J.init();return F.then(z=>(R.current=z)&&A(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>I.current?D():F.cancel()}),Ds(()=>{if(I.current&&R.current){let F=I.current.getOriginalEditor(),z=nm(R.current,e||"",r||n||"text",o||"");z!==F.getModel()&&F.setModel(z)}},[o],b),Ds(()=>{if(I.current&&R.current){let F=I.current.getModifiedEditor(),z=nm(R.current,t||"",i||n||"text",s||"");z!==F.getModel()&&F.setModel(z)}},[s],b),Ds(()=>{let F=I.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),Ds(()=>{var F,z;(z=(F=I.current)==null?void 0:F.getModel())==null||z.original.setValue(e||"")},[e],b),Ds(()=>{let{original:F,modified:z}=I.current.getModel();R.current.editor.setModelLanguage(F,r||n||"text"),R.current.editor.setModelLanguage(z,i||n||"text")},[n,r,i],b),Ds(()=>{var F;(F=R.current)==null||F.editor.setTheme(c)},[c],b),Ds(()=>{var F;(F=I.current)==null||F.updateOptions(h)},[h],b);let V=O.useCallback(()=>{var G;if(!R.current)return;N.current(R.current);let F=nm(R.current,e||"",r||n||"text",o||""),z=nm(R.current,t||"",i||n||"text",s||"");(G=I.current)==null||G.setModel({original:F,modified:z})},[n,t,i,e,r,o,s]),U=O.useCallback(()=>{var F;!H.current&&M.current&&(I.current=R.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...h}),V(),(F=R.current)==null||F.editor.setTheme(c),x(!0),H.current=!0)},[h,c,V]);O.useEffect(()=>{b&&L.current(I.current,R.current)},[b]),O.useEffect(()=>{!E&&!b&&U()},[E,b,U]);function D(){var z,G,W,K;let F=(z=I.current)==null?void 0:z.getModel();a||((G=F==null?void 0:F.original)==null||G.dispose()),u||((W=F==null?void 0:F.modified)==null||W.dispose()),(K=I.current)==null||K.dispose()}return fe.createElement(FJ,{width:m,height:p,isEditorReady:b,loading:d,_ref:M,className:v,wrapperProps:y})}var yEe=vEe;O.memo(yEe);function bEe(e){let t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}var xEe=bEe,$_=new Map;function wEe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:a,loading:u="Loading...",options:c={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:p=!1,width:m="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:w=F1,onMount:b=F1,onChange:x,onValidate:E=F1}){let[A,I]=O.useState(!1),[R,M]=O.useState(!0),L=O.useRef(null),N=O.useRef(null),H=O.useRef(null),V=O.useRef(b),U=O.useRef(w),D=O.useRef(),F=O.useRef(r),z=xEe(o),G=O.useRef(!1),W=O.useRef(!1);zJ(()=>{let Q=$J.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)),()=>N.current?q():Q.cancel()}),Ds(()=>{var re,ue,ce,se;let Q=nm(L.current,e||r||"",t||i||"",o||n||"");Q!==((re=N.current)==null?void 0:re.getModel())&&(h&&$_.set(z,(ue=N.current)==null?void 0:ue.saveViewState()),(ce=N.current)==null||ce.setModel(Q),h&&((se=N.current)==null||se.restoreViewState($_.get(o))))},[o],A),Ds(()=>{var Q;(Q=N.current)==null||Q.updateOptions(c)},[c],A),Ds(()=>{!N.current||r===void 0||(N.current.getOption(L.current.editor.EditorOption.readOnly)?N.current.setValue(r):r!==N.current.getValue()&&(W.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),N.current.pushUndoStop(),W.current=!1))},[r],A),Ds(()=>{var re,ue;let Q=(re=N.current)==null?void 0:re.getModel();Q&&i&&((ue=L.current)==null||ue.editor.setModelLanguage(Q,i))},[i],A),Ds(()=>{var Q;a!==void 0&&((Q=N.current)==null||Q.revealLine(a))},[a],A),Ds(()=>{var Q;(Q=L.current)==null||Q.editor.setTheme(s)},[s],A);let K=O.useCallback(()=>{var Q;if(!(!H.current||!L.current)&&!G.current){U.current(L.current);let re=o||n,ue=nm(L.current,r||e||"",t||i||"",re||"");N.current=(Q=L.current)==null?void 0:Q.editor.create(H.current,{model:ue,automaticLayout:!0,...c},d),h&&N.current.restoreViewState($_.get(re)),L.current.editor.setTheme(s),I(!0),G.current=!0}},[e,t,n,r,i,o,c,d,h,s]);O.useEffect(()=>{A&&V.current(N.current,L.current)},[A]),O.useEffect(()=>{!R&&!A&&K()},[R,A,K]),F.current=r,O.useEffect(()=>{var Q,re;A&&x&&((Q=D.current)==null||Q.dispose(),D.current=(re=N.current)==null?void 0:re.onDidChangeModelContent(ue=>{W.current||x(N.current.getValue(),ue)}))},[A,x]),O.useEffect(()=>{if(A){let Q=L.current.editor.onDidChangeMarkers(re=>{var ce;let ue=(ce=N.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()=>{}},[A,E]);function q(){var Q,re;(Q=D.current)==null||Q.dispose(),p?h&&$_.set(o,N.current.saveViewState()):(re=N.current.getModel())==null||re.dispose(),N.current.dispose()}return fe.createElement(FJ,{width:m,height:v,isEditorReady:A,loading:u,_ref:H,className:y,wrapperProps:S})}var _Ee=wEe,SEe=O.memo(_Ee),jJ=SEe;let Ea;typeof window<"u"?Ea=window:typeof self<"u"?Ea=self:Ea=global;let d3=null,h3=null;const lW=20,iN=Ea.clearTimeout,uW=Ea.setTimeout,oN=Ea.cancelAnimationFrame||Ea.mozCancelAnimationFrame||Ea.webkitCancelAnimationFrame,cW=Ea.requestAnimationFrame||Ea.mozRequestAnimationFrame||Ea.webkitRequestAnimationFrame;oN==null||cW==null?(d3=iN,h3=function(t){return uW(t,lW)}):(d3=function([t,n]){oN(t),iN(n)},h3=function(t){const n=cW(function(){iN(r),t()}),r=uW(function(){oN(n),t()},lW);return[n,r]});function EEe(e){let t,n,r,i,o,s,a;const u=typeof document<"u"&&document.attachEvent;if(!u){s=function(w){const b=w.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,A=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,A.style.width=x.offsetWidth+1+"px",A.style.height=x.offsetHeight+1+"px",x.scrollLeft=x.scrollWidth,x.scrollTop=x.scrollHeight},o=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},a=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&d3(this.__resizeRAF__),this.__resizeRAF__=h3(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(A){A.call(b,w)}))})};let p=!1,m="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const w=document.createElement("fakeelement");if(w.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=m:y.appendChild(p.createTextNode(m)),v.appendChild(y)}};return{addResizeListener:function(p,m){if(u)p.attachEvent("onresize",m);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=Ea.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),c(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 w=v.createElement("div");w.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(w),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",a,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(m)}},removeResizeListener:function(p,m){if(u)p.detachEvent("onresize",m);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(m),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",a,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class KA 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,a,u;const c=window.getComputedStyle(this._parentNode)||{},d=parseFloat((o=c.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=c.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((a=c.paddingTop)!==null&&a!==void 0?a:"0"),m=parseFloat((u=c.paddingBottom)!==null&&u!==void 0?u:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-m,S=v.width-d-h,w=this._parentNode.offsetHeight-p-m,b=this._parentNode.offsetWidth-d-h;(!n&&(this.state.height!==w||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:w,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:w,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=EEe(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:a,style:u={},tagName:c="div",...d}=this.props,{height:h,scaledHeight:p,scaledWidth:m,width:v}=this.state,y={overflow:"visible"},S={};let w=!1;return i||(h===0&&(w=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(w=!0),y.width=0,S.width=v,S.scaledWidth=m),O.createElement(c,{ref:this._setRef,style:{...y,...u},...d},!w&&t(S))}}function CEe({returnType:e,params:t}){return`@type {(${ie.join(ie.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function TEe(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}${CEe(e)}`,r],` + `},lW=HSe(XSe)(DJ),qSe={config:GSe},YSe=function(){for(var t=arguments.length,n=new Array(t),r=0;r{r.current=!1}:e,t)}var Ls=pEe;function F1(){}function nm(e,t,n,r){return gEe(e,r)||mEe(e,t,n,r)}function gEe(e,t){return e.editor.getModel(jJ(e,t))}function mEe(e,t,n,r){return e.editor.createModel(t,n,r?jJ(e,r):void 0)}function jJ(e,t){return e.Uri.parse(t)}function vEe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:u=!1,theme:c="light",loading:d="Loading...",options:h={},height:p="100%",width:m="100%",className:v,wrapperProps:y={},beforeMount:S=F1,onMount:w=F1}){let[b,x]=O.useState(!1),[E,A]=O.useState(!0),I=O.useRef(null),R=O.useRef(null),M=O.useRef(null),D=O.useRef(w),N=O.useRef(S),H=O.useRef(!1);UJ(()=>{let F=FJ.init();return F.then(z=>(R.current=z)&&A(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>I.current?L():F.cancel()}),Ls(()=>{if(I.current&&R.current){let F=I.current.getOriginalEditor(),z=nm(R.current,e||"",r||n||"text",o||"");z!==F.getModel()&&F.setModel(z)}},[o],b),Ls(()=>{if(I.current&&R.current){let F=I.current.getModifiedEditor(),z=nm(R.current,t||"",i||n||"text",s||"");z!==F.getModel()&&F.setModel(z)}},[s],b),Ls(()=>{let F=I.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),Ls(()=>{var F,z;(z=(F=I.current)==null?void 0:F.getModel())==null||z.original.setValue(e||"")},[e],b),Ls(()=>{let{original:F,modified:z}=I.current.getModel();R.current.editor.setModelLanguage(F,r||n||"text"),R.current.editor.setModelLanguage(z,i||n||"text")},[n,r,i],b),Ls(()=>{var F;(F=R.current)==null||F.editor.setTheme(c)},[c],b),Ls(()=>{var F;(F=I.current)==null||F.updateOptions(h)},[h],b);let V=O.useCallback(()=>{var G;if(!R.current)return;N.current(R.current);let F=nm(R.current,e||"",r||n||"text",o||""),z=nm(R.current,t||"",i||n||"text",s||"");(G=I.current)==null||G.setModel({original:F,modified:z})},[n,t,i,e,r,o,s]),U=O.useCallback(()=>{var F;!H.current&&M.current&&(I.current=R.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...h}),V(),(F=R.current)==null||F.editor.setTheme(c),x(!0),H.current=!0)},[h,c,V]);O.useEffect(()=>{b&&D.current(I.current,R.current)},[b]),O.useEffect(()=>{!E&&!b&&U()},[E,b,U]);function L(){var z,G,W,K;let F=(z=I.current)==null?void 0:z.getModel();a||((G=F==null?void 0:F.original)==null||G.dispose()),u||((W=F==null?void 0:F.modified)==null||W.dispose()),(K=I.current)==null||K.dispose()}return fe.createElement(zJ,{width:m,height:p,isEditorReady:b,loading:d,_ref:M,className:v,wrapperProps:y})}var yEe=vEe;O.memo(yEe);function bEe(e){let t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}var xEe=bEe,F_=new Map;function wEe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:a,loading:u="Loading...",options:c={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:p=!1,width:m="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:w=F1,onMount:b=F1,onChange:x,onValidate:E=F1}){let[A,I]=O.useState(!1),[R,M]=O.useState(!0),D=O.useRef(null),N=O.useRef(null),H=O.useRef(null),V=O.useRef(b),U=O.useRef(w),L=O.useRef(),F=O.useRef(r),z=xEe(o),G=O.useRef(!1),W=O.useRef(!1);UJ(()=>{let Q=FJ.init();return Q.then(re=>(D.current=re)&&M(!1)).catch(re=>(re==null?void 0:re.type)!=="cancelation"&&console.error("Monaco initialization: error:",re)),()=>N.current?q():Q.cancel()}),Ls(()=>{var re,ue,ce,se;let Q=nm(D.current,e||r||"",t||i||"",o||n||"");Q!==((re=N.current)==null?void 0:re.getModel())&&(h&&F_.set(z,(ue=N.current)==null?void 0:ue.saveViewState()),(ce=N.current)==null||ce.setModel(Q),h&&((se=N.current)==null||se.restoreViewState(F_.get(o))))},[o],A),Ls(()=>{var Q;(Q=N.current)==null||Q.updateOptions(c)},[c],A),Ls(()=>{!N.current||r===void 0||(N.current.getOption(D.current.editor.EditorOption.readOnly)?N.current.setValue(r):r!==N.current.getValue()&&(W.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),N.current.pushUndoStop(),W.current=!1))},[r],A),Ls(()=>{var re,ue;let Q=(re=N.current)==null?void 0:re.getModel();Q&&i&&((ue=D.current)==null||ue.editor.setModelLanguage(Q,i))},[i],A),Ls(()=>{var Q;a!==void 0&&((Q=N.current)==null||Q.revealLine(a))},[a],A),Ls(()=>{var Q;(Q=D.current)==null||Q.editor.setTheme(s)},[s],A);let K=O.useCallback(()=>{var Q;if(!(!H.current||!D.current)&&!G.current){U.current(D.current);let re=o||n,ue=nm(D.current,r||e||"",t||i||"",re||"");N.current=(Q=D.current)==null?void 0:Q.editor.create(H.current,{model:ue,automaticLayout:!0,...c},d),h&&N.current.restoreViewState(F_.get(re)),D.current.editor.setTheme(s),I(!0),G.current=!0}},[e,t,n,r,i,o,c,d,h,s]);O.useEffect(()=>{A&&V.current(N.current,D.current)},[A]),O.useEffect(()=>{!R&&!A&&K()},[R,A,K]),F.current=r,O.useEffect(()=>{var Q,re;A&&x&&((Q=L.current)==null||Q.dispose(),L.current=(re=N.current)==null?void 0:re.onDidChangeModelContent(ue=>{W.current||x(N.current.getValue(),ue)}))},[A,x]),O.useEffect(()=>{if(A){let Q=D.current.editor.onDidChangeMarkers(re=>{var ce;let ue=(ce=N.current.getModel())==null?void 0:ce.uri;if(ue&&re.find(se=>se.path===ue.path)){let se=D.current.editor.getModelMarkers({resource:ue});E==null||E(se)}});return()=>{Q==null||Q.dispose()}}return()=>{}},[A,E]);function q(){var Q,re;(Q=L.current)==null||Q.dispose(),p?h&&F_.set(o,N.current.saveViewState()):(re=N.current.getModel())==null||re.dispose(),N.current.dispose()}return fe.createElement(zJ,{width:m,height:v,isEditorReady:A,loading:u,_ref:H,className:y,wrapperProps:S})}var _Ee=wEe,SEe=O.memo(_Ee),HJ=SEe;let Ea;typeof window<"u"?Ea=window:typeof self<"u"?Ea=self:Ea=global;let h3=null,p3=null;const uW=20,iN=Ea.clearTimeout,cW=Ea.setTimeout,oN=Ea.cancelAnimationFrame||Ea.mozCancelAnimationFrame||Ea.webkitCancelAnimationFrame,fW=Ea.requestAnimationFrame||Ea.mozRequestAnimationFrame||Ea.webkitRequestAnimationFrame;oN==null||fW==null?(h3=iN,p3=function(t){return cW(t,uW)}):(h3=function([t,n]){oN(t),iN(n)},p3=function(t){const n=fW(function(){iN(r),t()}),r=cW(function(){oN(n),t()},uW);return[n,r]});function EEe(e){let t,n,r,i,o,s,a;const u=typeof document<"u"&&document.attachEvent;if(!u){s=function(w){const b=w.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,A=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,A.style.width=x.offsetWidth+1+"px",A.style.height=x.offsetHeight+1+"px",x.scrollLeft=x.scrollWidth,x.scrollTop=x.scrollHeight},o=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},a=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&h3(this.__resizeRAF__),this.__resizeRAF__=p3(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(A){A.call(b,w)}))})};let p=!1,m="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const w=document.createElement("fakeelement");if(w.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=m:y.appendChild(p.createTextNode(m)),v.appendChild(y)}};return{addResizeListener:function(p,m){if(u)p.attachEvent("onresize",m);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=Ea.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),c(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 w=v.createElement("div");w.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(w),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",a,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(m)}},removeResizeListener:function(p,m){if(u)p.detachEvent("onresize",m);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(m),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",a,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class KA 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,a,u;const c=window.getComputedStyle(this._parentNode)||{},d=parseFloat((o=c.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=c.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((a=c.paddingTop)!==null&&a!==void 0?a:"0"),m=parseFloat((u=c.paddingBottom)!==null&&u!==void 0?u:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-m,S=v.width-d-h,w=this._parentNode.offsetHeight-p-m,b=this._parentNode.offsetWidth-d-h;(!n&&(this.state.height!==w||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:w,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:w,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=EEe(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:a,style:u={},tagName:c="div",...d}=this.props,{height:h,scaledHeight:p,scaledWidth:m,width:v}=this.state,y={overflow:"visible"},S={};let w=!1;return i||(h===0&&(w=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(w=!0),y.width=0,S.width=v,S.scaledWidth=m),O.createElement(c,{ref:this._setRef,style:{...y,...u},...d},!w&&t(S))}}function CEe({returnType:e,params:t}){return`@type {(${ie.join(ie.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function TEe(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}${CEe(e)}`,r],` `)}function AEe({name:e,params:t,defaultReturnValue:n}){return ie.join([`function ${e}(${ie.join(ie.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` `)}function IEe(e){return ie.join(ie.map(e,t=>ie.join([TEe(t),AEe(t)],` `)),` -`)}const REe={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"},PEe={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"},OEe={shouldRender:PEe,shouldBreak:REe},[Oa,MEe]=gu({code:IEe(ie.values(OEe)),layers:[]}),kEe=2500;function DEe(){const[{code:e},t]=Oa(),n=Dn();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(KA,{children:({width:r,height:i})=>C.jsx(jJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(BA,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ie.debounce(o=>t({code:o}),kEe),options:{minimap:{enabled:!1}}})})})}function LEe(e){const t=Dn();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(KA,{children:({width:n,height:r})=>C.jsx(jJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(BA,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function Px(e){"@babel/helpers - typeof";return Px=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},Px(e)}function NEe(e,t){if(Px(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Px(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BEe(e){var t=NEe(e,"string");return Px(t)==="symbol"?t:String(t)}function $Ee(e,t,n){return t=BEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fW(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 dW(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Vo(1));return n(HJ)(e,t)}if(typeof e!="function")throw new Error(Vo(2));var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function d(){if(u)throw new Error(Vo(3));return o}function h(y){if(typeof y!="function")throw new Error(Vo(4));if(u)throw new Error(Vo(5));var S=!0;return c(),a.push(y),function(){if(S){if(u)throw new Error(Vo(6));S=!1,c();var b=a.indexOf(y);a.splice(b,1),s=null}}}function p(y){if(!FEe(y))throw new Error(Vo(7));if(typeof y.type>"u")throw new Error(Vo(8));if(u)throw new Error(Vo(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var S=s=a,w=0;w=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 bCe(e,t){return e===t}function xCe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?eCe:n,i=t.mapStateToPropsFactories,o=i===void 0?lCe:i,s=t.mapDispatchToPropsFactories,a=s===void 0?oCe:s,u=t.mergePropsFactories,c=u===void 0?hCe:u,d=t.selectorFactory,h=d===void 0?vCe:d;return function(m,v,y,S){S===void 0&&(S={});var w=S,b=w.pure,x=b===void 0?!0:b,E=w.areStatesEqual,A=E===void 0?bCe:E,I=w.areOwnPropsEqual,R=I===void 0?aN:I,M=w.areStatePropsEqual,L=M===void 0?aN:M,N=w.areMergedPropsEqual,H=N===void 0?aN:N,V=Ne(w,yCe),U=lN(m,o,"mapStateToProps"),D=lN(v,a,"mapDispatchToProps"),F=lN(y,c,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(G){return"Connect("+G+")"},shouldHandleStateChanges:!!m,initMapStateToProps:U,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:R,areStatePropsEqual:L,areMergedPropsEqual:H},V))}}const KJ=xCe();jEe(vv.unstable_batchedUpdates);function wCe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(a){r.callbacks=a},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=va(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof AC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(fe.Component),kCe=` +`)}const REe={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"},PEe={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"},OEe={shouldRender:PEe,shouldBreak:REe},[Oa,MEe]=gu({code:IEe(ie.values(OEe)),layers:[]}),kEe=2500;function LEe(){const[{code:e},t]=Oa(),n=Ln();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(KA,{children:({width:r,height:i})=>C.jsx(HJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(BA,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ie.debounce(o=>t({code:o}),kEe),options:{minimap:{enabled:!1}}})})})}function DEe(e){const t=Ln();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(KA,{children:({width:n,height:r})=>C.jsx(HJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(BA,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function Px(e){"@babel/helpers - typeof";return Px=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},Px(e)}function NEe(e,t){if(Px(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Px(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BEe(e){var t=NEe(e,"string");return Px(t)==="symbol"?t:String(t)}function $Ee(e,t,n){return t=BEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dW(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 hW(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Vo(1));return n(WJ)(e,t)}if(typeof e!="function")throw new Error(Vo(2));var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function d(){if(u)throw new Error(Vo(3));return o}function h(y){if(typeof y!="function")throw new Error(Vo(4));if(u)throw new Error(Vo(5));var S=!0;return c(),a.push(y),function(){if(S){if(u)throw new Error(Vo(6));S=!1,c();var b=a.indexOf(y);a.splice(b,1),s=null}}}function p(y){if(!FEe(y))throw new Error(Vo(7));if(typeof y.type>"u")throw new Error(Vo(8));if(u)throw new Error(Vo(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var S=s=a,w=0;w=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 bCe(e,t){return e===t}function xCe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?eCe:n,i=t.mapStateToPropsFactories,o=i===void 0?lCe:i,s=t.mapDispatchToPropsFactories,a=s===void 0?oCe:s,u=t.mergePropsFactories,c=u===void 0?hCe:u,d=t.selectorFactory,h=d===void 0?vCe:d;return function(m,v,y,S){S===void 0&&(S={});var w=S,b=w.pure,x=b===void 0?!0:b,E=w.areStatesEqual,A=E===void 0?bCe:E,I=w.areOwnPropsEqual,R=I===void 0?aN:I,M=w.areStatePropsEqual,D=M===void 0?aN:M,N=w.areMergedPropsEqual,H=N===void 0?aN:N,V=Ne(w,yCe),U=lN(m,o,"mapStateToProps"),L=lN(v,a,"mapDispatchToProps"),F=lN(y,c,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(G){return"Connect("+G+")"},shouldHandleStateChanges:!!m,initMapStateToProps:U,initMapDispatchToProps:L,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:R,areStatePropsEqual:D,areMergedPropsEqual:H},V))}}const QJ=xCe();jEe(vv.unstable_batchedUpdates);function wCe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(a){r.callbacks=a},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=va(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof IC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(fe.Component),kCe=` 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 -`,IC=function(t){return t+1},DCe=function(t){return` - You have lifted an item in position `+IC(t.source.index)+` -`},tZ=function(t,n){var r=t.droppableId===n.droppableId,i=IC(t.index),o=IC(n.index);return r?` +`,RC=function(t){return t+1},LCe=function(t){return` + You have lifted an item in position `+RC(t.source.index)+` +`},nZ=function(t,n){var r=t.droppableId===n.droppableId,i=RC(t.index),o=RC(n.index);return r?` You have moved the item from position `+i+` to position `+o+` `:` @@ -401,29 +401,29 @@ 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+` - `},nZ=function(t,n,r){var i=n.droppableId===r.droppableId;return i?` + `},rZ=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+` - `},LCe=function(t){var n=t.destination;if(n)return tZ(t.source,n);var r=t.combine;return r?nZ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},SW=function(t){return` + `},DCe=function(t){var n=t.destination;if(n)return nZ(t.source,n);var r=t.combine;return r?rZ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},EW=function(t){return` The item has returned to its starting position - of `+IC(t.index)+` + of `+RC(t.index)+` `},NCe=function(t){if(t.reason==="CANCEL")return` Movement cancelled. - `+SW(t.source)+` + `+EW(t.source)+` `;var n=t.destination,r=t.combine;return n?` You have dropped the item. - `+tZ(t.source,n)+` + `+nZ(t.source,n)+` `:r?` You have dropped the item. - `+nZ(t.draggableId,t.source,r)+` + `+rZ(t.draggableId,t.source,r)+` `:` The item has been dropped while not over a drop area. - `+SW(t.source)+` - `},aE={dragHandleUsageInstructions:kCe,onDragStart:DCe,onDragUpdate:LCe,onDragEnd:NCe},Mi={x:0,y:0},Ji=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Fs=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Kf=function(t,n){return t.x===n.x&&t.y===n.y},Sv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Wp=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},Mx=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},EW=function(t,n){return Math.min.apply(Math,n.map(function(r){return Mx(t,r)}))},rZ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},BCe=function(e,t){var n=vl({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},Lw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},CW=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}]},$Ce={top:0,right:0,bottom:0,left:0},FCe=function(t,n){return n?Lw(t,n.scroll.diff.displacement):t},zCe=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},UCe=function(t,n){return n&&n.shouldClipSubject?BCe(n.pageMarginBox,t):vl(t)},qm=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=FCe(t.marginBox,i),s=zCe(o,r,n),a=UCe(s,i);return{page:t,withPlaceholder:n,active:a}},o6=function(e,t){e.frame||We(!1);var n=e.frame,r=Fs(t,n.scroll.initial),i=Sv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=qm({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=$({},e,{frame:o,subject:s});return a};function RC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function s6(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,c=r.lefte.right,d=u&&c;if(d)return!0;var h=u&&s||c&&o;return h}},GCe=function(e){var t=Ca(e.top,e.bottom),n=Ca(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},l6={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},uZ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},VCe=function(e){return function(t){var n=Ca(t.top,t.bottom),r=Ca(t.left,t.right);return function(i){return e===l6?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},XCe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:Mi;return Lw(t,r)},qCe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},YCe=function(t,n,r){return r(n)(t)},u6=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,a=o?XCe(n,r):n;return qCe(a,r,s)&&YCe(a,i,s)},KCe=function(t){return u6($({},t,{isVisibleThroughFrameFn:lZ}))},cZ=function(t){return u6($({},t,{isVisibleThroughFrameFn:GCe}))},QCe=function(t){return u6($({},t,{isVisibleThroughFrameFn:VCe(t.destination.axis)}))},JCe=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 ZCe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return vl(r6(n,r))}function Dx(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(u,c){var d=ZCe(c,r),h=c.descriptor.id;u.all.push(h);var p=KCe({target:d,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return u.invisible[c.descriptor.id]=!0,u;var m=JCe(h,s,o),v={draggableId:h,shouldAnimate:m};return u.visible[h]=v,u},{all:[],visible:{},invisible:{}})}function eTe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function TW(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=eTe(t,{inHomeList:n});return{displaced:kx,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function PC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,a=e.index,u=e.forceShouldAnimate,c=Cv(t,r);if(a==null)return TW({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var d=xd(n,function(y){return y.descriptor.index===a});if(!d)return TW({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var h=ZA(t,n),p=n.indexOf(d),m=h.slice(p),v=Dx({afterDragging:m,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:u});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function id(e,t){return!!t.effected[e]}var tTe=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,a=r[s],u=a.descriptor.index,c=id(s,o);return c?t?u:u-1:t?u+1:u},nTe=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,a=r[0].descriptor.index,u=r[r.length-1].descriptor.index,c=n?u:u+1;return sc?null:s},rTe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,a=e.previousImpact,u=e.viewport,c=e.afterCritical,d=a.at;if(d||We(!1),d.type==="REORDER"){var h=nTe({isMovingForward:t,isInHomeList:n,location:d.destination,insideDestination:s});return h==null?null:PC({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:h})}var p=tTe({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:d.combine,afterCritical:c});return p==null?null:PC({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:p})},iTe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return id(r,n)?o?Mi:Sv(i.point):o?i.point:Mi},oTe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=JA(n);i||We(!1);var o=i.draggableId,s=r[o].page.borderBox.center,a=iTe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Ji(s,a)},fZ=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},sTe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},c6=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},AW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Wp(n.line,r.marginBox[n.end]+fZ(n,i),c6(n,r.marginBox,i))},IW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Wp(n.line,r.marginBox[n.start]-sTe(n,i),c6(n,r.marginBox,i))},aTe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Wp(n.line,r.contentBox[n.start]+fZ(n,i),c6(n,r.contentBox,i))},lTe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=Ev(i.descriptor.id,r),a=n.page,u=i.axis;if(!s.length)return aTe({axis:u,moveInto:i.page,isMoving:a});var c=t.displaced,d=t.displacedBy,h=c.all[0];if(h){var p=r[h];if(id(h,o))return IW({axis:u,moveRelativeTo:p.page,isMoving:a});var m=CC(p.page,d.point);return IW({axis:u,moveRelativeTo:m,isMoving:a})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return a.borderBox.center;if(id(v.descriptor.id,o)){var y=CC(v.page,Sv(o.displacedBy.point));return AW({axis:u,moveRelativeTo:y,isMoving:a})}return AW({axis:u,moveRelativeTo:v.page,isMoving:a})},p3=function(e,t){var n=e.frame;return n?Ji(t,n.scroll.diff.displacement):t},uTe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,a=r.page.borderBox.center,u=n.at;return!i||!u?a:u.type==="REORDER"?lTe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):oTe({impact:n,draggables:o,afterCritical:s})},eI=function(e){var t=uTe(e),n=e.droppable,r=n?p3(n,t):t;return r},dZ=function(e,t){var n=Fs(t,e.scroll.initial),r=Sv(n),i=vl({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 RW(e,t){return e.map(function(n){return t[n]})}function cTe(e,t){for(var n=0;n1?d.sort(function(h,p){return Oo(h)[a.start]-Oo(p)[a.start]})[0]:c.sort(function(h,p){var m=EW(n,CW(Oo(h))),v=EW(n,CW(Oo(p)));return m!==v?m-v:Oo(h)[a.start]-Oo(p)[a.start]})[0]},PW=function(t,n){var r=t.page.borderBox.center;return id(t.descriptor.id,n)?Fs(r,n.displacedBy.point):r},gTe=function(t,n){var r=t.page.borderBox;return id(t.descriptor.id,n)?Lw(r,Sv(n.displacedBy.point)):r},mTe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(a){return cZ({target:gTe(a,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var c=Mx(t,p3(r,PW(a,o))),d=Mx(t,p3(r,PW(u,o)));return ct.left&&e.topt.top}function ETe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var a=s.axis,u=Wp(s.axis.line,t.center[a.line],s.page.borderBox.center[a.crossAxisLine]);return{id:s.descriptor.id,distance:Mx(i,u)}}).sort(function(s,a){return a.distance-s.distance});return o[0]?o[0].id:null}function CTe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=QA(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!STe(t,s))return!1;if(mZ(s)(t.center))return!0;var a=o.axis,u=s.center[a.crossAxisLine],c=t[a.crossAxisStart],d=t[a.crossAxisEnd],h=Ca(s[a.crossAxisStart],s[a.crossAxisEnd]),p=h(c),m=h(d);return!p&&!m?!0:p?cu});return i.length?i.length===1?i[0].descriptor.id:ETe({pageBorderBox:t,draggable:n,candidates:i}):null}var vZ=function(t,n){return vl(Lw(t,n))},TTe=function(e,t){var n=e.frame;return n?vZ(t,n.scroll.diff.value):t};function yZ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ATe(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 ITe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,a=e.afterCritical,u=r.axis,c=Nw(r.axis,n.displaceBy),d=c.value,h=t[u.start],p=t[u.end],m=ZA(n,i),v=xd(m,function(S){var w=S.descriptor.id,b=S.page.borderBox.center[u.line],x=id(w,a),E=yZ({displaced:o,id:w});return x?E?p<=b:hw[a.start]+x&&hw[a.start]-c+x&&dw[a.start]+c+x&&hw[a.start]+x&&d=kW)return AZ;var o=i/kW,s=v3+oAe*o,a=r==="CANCEL"?s*sAe:s;return Number(a.toFixed(2))},lAe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,a=r.droppables,u=Ws(t),c=u?a[u]:null,d=a[n.descriptor.droppableId],h=wZ({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:c||d,viewport:i}),p=Fs(h,n.client.borderBox.center);return p},uAe=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 a=xZ({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var u=$({},r,{displaced:kx});return{impact:u,didDropInsideDroppable:!0}},cAe=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(nAe({reason:s}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&We(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||We(!1);var u=o.critical,c=o.dimensions,d=c.draggables[o.critical.draggable.id],h=uAe({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,m=h.didDropInsideDroppable,v=m?a6(p):null,y=m?JA(p):null,S={index:u.draggable.index,droppableId:u.droppable.id},w={draggableId:d.descriptor.id,type:d.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=lAe({impact:p,draggable:d,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:w,impact:p},E=!Kf(o.current.client.offset,b)||!!w.combine;if(!E){n(p6({completed:x}));return}var A=aAe({current:o.current.client.offset,destination:b,reason:s}),I={newHomeClientOffset:b,dropDuration:A,completed:x};n(tAe(I))}}}},IZ=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function fAe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function dAe(e){var t=e.onWindowScroll;function n(){t(IZ())}var r=Ox(n),i=fAe(r),o=Yf;function s(){return o!==Yf}function a(){s()&&We(!1),o=va(window,[i])}function u(){s()||We(!1),r.cancel(),o(),o=Yf}return{start:a,stop:u,isActive:s}}var hAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},pAe=function(e){var t=dAe({onWindowScroll:function(r){e.dispatch(YTe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&hAe(r)&&t.stop(),n(r)}}},gAe=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},mAe=function(){var e=[],t=function(o){var s=s6(e,function(c){return c.timerId===o});s===-1&&We(!1);var a=e.splice(s,1),u=a[0];u.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),a={timerId:s,callback:o};e.push(a)},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}},vAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},yAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},bAe=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},Mb=function(t,n){n()},F_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},hN=function(t,n,r,i){if(!t){r(i(n));return}var o=gAe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},xAe=function(e,t){var n=mAe(),r=null,i=function(p,m){r&&We(!1),Mb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:m};v(y)}})},o=function(p,m){r&&We(!1),Mb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(F_(p,m))})},s=function(p,m){r&&We(!1);var v=F_(p,m);r={mode:m,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){Mb("onDragStart",function(){return hN(e().onDragStart,v,t,aE.onDragStart)})})},a=function(p,m){var v=a6(m),y=JA(m);r||We(!1);var S=!bAe(p,r.lastCritical);S&&(r.lastCritical=p);var w=!vAe(r.lastLocation,v);w&&(r.lastLocation=v);var b=!yAe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!w&&!b)){var x=$({},F_(p,r.mode),{combine:y,destination:v});n.add(function(){Mb("onDragUpdate",function(){return hN(e().onDragUpdate,x,t,aE.onDragUpdate)})})}},u=function(){r||We(!1),n.flush()},c=function(p){r||We(!1),r=null,Mb("onDragEnd",function(){return hN(e().onDragEnd,p,t,aE.onDragEnd)})},d=function(){if(r){var p=$({},F_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});c(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:a,flush:u,drop:c,abort:d}},wAe=function(e,t){var n=xAe(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 a=o.payload.completed.result;n.flush(),i(o),n.drop(a);return}if(i(o),o.type==="FLUSH"){n.abort();return}var u=r.getState();u.phase==="DRAGGING"&&n.update(u.critical,u.impact)}}}},_Ae=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"&&We(!1),e.dispatch(p6({completed:r.completed}))}}},SAe=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 u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(TZ())}};n=requestAnimationFrame(function(){n=null,t=va(window,[s])})}}}},EAe=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)}}}},CAe=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()}}}}}},TAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},AAe=function(e){return function(t){return function(n){return function(r){if(TAe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&We(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},IAe=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(CZ({reason:r.reason})))}}}},RAe=WJ,PAe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return HJ(zTe,RAe(zEe(iAe(r),EAe(t),rAe(t),cAe,_Ae,SAe,IAe,AAe(s),pAe,CAe(n),wAe(i,o))))},pN=function(){return{additions:{},removals:{},modified:{}}};function OAe(e){var t=e.registry,n=e.callbacks,r=pN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var d=r,h=d.additions,p=d.removals,m=d.modified,v=Object.keys(h).map(function(w){return t.draggable.getById(w).getDimension(Mi)}).sort(function(w,b){return w.descriptor.index-b.descriptor.index}),y=Object.keys(m).map(function(w){var b=t.droppable.getById(w),x=b.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=pN(),n.publish(S)}))},s=function(d){var h=d.descriptor.id;r.additions[h]=d,r.modified[d.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},a=function(d){var h=d.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},u=function(){i&&(cancelAnimationFrame(i),i=null,r=pN())};return{add:s,remove:a,stop:u}}var RZ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Fs({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},PZ=function(){var e=document.documentElement;return e||We(!1),e},OZ=function(){var e=PZ(),t=RZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},MAe=function(){var e=IZ(),t=OZ(),n=e.y,r=e.x,i=PZ(),o=i.clientWidth,s=i.clientHeight,a=r+o,u=n+s,c=vl({top:n,left:r,right:a,bottom:u}),d={frame:c,scroll:{initial:e,current:e,max:t,diff:{value:Mi,displacement:Mi}}};return d},kAe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=MAe(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),u=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),c={draggables:sZ(u),droppables:oZ(a)},d={dimensions:c,critical:t,viewport:i};return d};function DW(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 DAe=function(e,t){var n=null,r=OAe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(m,v){e.droppable.exists(m)||We(!1),n&&t.updateDroppableIsEnabled({id:m,isEnabled:v})},o=function(m,v){n&&(e.droppable.exists(m)||We(!1),t.updateDroppableIsCombineEnabled({id:m,isCombineEnabled:v}))},s=function(m,v){n&&(e.droppable.exists(m)||We(!1),t.updateDroppableScroll({id:m,newScroll:v}))},a=function(m,v){n&&e.droppable.getById(m).callbacks.scroll(v)},u=function(){if(n){r.stop();var m=n.critical.droppable;e.droppable.getAllByType(m.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},c=function(m){n||We(!1);var v=n.critical.draggable;m.type==="ADDITION"&&DW(e,v,m.value)&&r.add(m.value),m.type==="REMOVAL"&&DW(e,v,m.value)&&r.remove(m.value)},d=function(m){n&&We(!1);var v=e.draggable.getById(m.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},w=e.subscribe(c);return n={critical:S,unsubscribe:w},kAe({critical:S,registry:e,scrollOptions:m.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:d,stopPublishing:u};return h},MZ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},LAe=function(e){window.scrollBy(e.x,e.y)},NAe=Oi(function(e){return QA(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),BAe=function(t,n){var r=xd(NAe(n),function(i){return i.frame||We(!1),mZ(i.frame.pageMarginBox)(t)});return r},$Ae=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=BAe(t,r);return o},Qf={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},FAe=function(e,t){var n=e[t.size]*Qf.startFromPercentage,r=e[t.size]*Qf.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},kZ=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},v6=1,zAe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Qf.maxPixelScroll;if(e===t.startScrollingFrom)return v6;var n=kZ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Qf.maxPixelScroll*Qf.ease(r);return Math.ceil(i)},LW=Qf.durationDampening.accelerateAt,NW=Qf.durationDampening.stopDampeningAt,UAe=function(e,t){var n=t,r=NW,i=Date.now(),o=i-n;if(o>=NW)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}},HAe=rZ(function(e){return e===0?0:e}),DZ=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},a=$W({container:n,distanceToEdges:s,dragStartTime:t,axis:l6,shouldUseTimeDampening:o}),u=$W({container:n,distanceToEdges:s,dragStartTime:t,axis:uZ,shouldUseTimeDampening:o}),c=HAe({x:u,y:a});if(Kf(c,Mi))return null;var d=jAe({container:n,subject:r,proposedScroll:c});return d?Kf(d,Mi)?null:d:null},WAe=rZ(function(e){return e===0?0:e>0?1:-1}),y6=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=Ji(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Kf(s,Mi)?null:s}}(),LZ=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=WAe(i),a=y6({max:o,current:r,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},b6=function(t,n){return LZ({current:t.scroll.current,max:t.scroll.max,change:n})},GAe=function(t,n){if(!b6(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return y6({current:i,max:r,change:n})},x6=function(t,n){var r=t.frame;return r?LZ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},VAe=function(t,n){var r=t.frame;return!r||!x6(t,n)?null:y6({current:r.scroll.current,max:r.scroll.max,change:n})},XAe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=DZ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&b6(t,s)?s:null},qAe=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 a=DZ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return a&&x6(t,a)?a:null},FW=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var c=t.viewport,d=XAe({dragStartTime:n,viewport:c,subject:u,center:s,shouldUseTimeDampening:r});if(d){i(d);return}}var h=$Ae({center:s,destination:Ws(t.impact),droppables:t.dimensions.droppables});if(h){var p=qAe({dragStartTime:n,droppable:h,subject:u,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},YAe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Ox(t),i=Ox(n),o=null,s=function(d){o||We(!1);var h=o,p=h.shouldUseTimeDampening,m=h.dragStartTime;FW({state:d,scrollWindow:r,scrollDroppable:i,dragStartTime:m,shouldUseTimeDampening:p})},a=function(d){o&&We(!1);var h=Date.now(),p=!1,m=function(){p=!0};FW({state:d,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:m,scrollDroppable:m}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(d)},u=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:s}},KAe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(c,d){var h=Ji(c.current.client.selection,d);t({client:h})},o=function(c,d){if(!x6(c,d))return d;var h=VAe(c,d);if(!h)return n(c.descriptor.id,d),null;var p=Fs(d,h);n(c.descriptor.id,p);var m=Fs(d,p);return m},s=function(c,d,h){if(!c||!b6(d,h))return h;var p=GAe(d,h);if(!p)return r(h),null;var m=Fs(h,p);r(m);var v=Fs(h,m);return v},a=function(c){var d=c.scrollJumpRequest;if(d){var h=Ws(c.impact);h||We(!1);var p=o(c.dimensions.droppables[h],d);if(p){var m=c.viewport,v=s(c.isWindowScrollAllowed,m,p);v&&i(c,v)}}};return a},QAe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=YAe({scrollWindow:n,scrollDroppable:t}),o=KAe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&o(c)}},a={scroll:s,start:i.start,stop:i.stop};return a},Ym="data-rbd",Km=function(){var e=Ym+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),y3=function(){var e=Ym+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),JAe=function(){var e=Ym+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),zW={contextId:Ym+"-scroll-container-context-id"},ZAe=function(t){return function(n){return"["+n+'="'+t+'"]'}},kb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},eIe="pointer-events: none;",tIe=function(e){var t=ZAe(e),n=function(){var a=` + `+EW(t.source)+` + `},lE={dragHandleUsageInstructions:kCe,onDragStart:LCe,onDragUpdate:DCe,onDragEnd:NCe},Mi={x:0,y:0},Ji=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Fs=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Kf=function(t,n){return t.x===n.x&&t.y===n.y},Sv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Wp=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},Mx=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},CW=function(t,n){return Math.min.apply(Math,n.map(function(r){return Mx(t,r)}))},iZ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},BCe=function(e,t){var n=vl({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},Nw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},TW=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}]},$Ce={top:0,right:0,bottom:0,left:0},FCe=function(t,n){return n?Nw(t,n.scroll.diff.displacement):t},zCe=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},UCe=function(t,n){return n&&n.shouldClipSubject?BCe(n.pageMarginBox,t):vl(t)},qm=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=FCe(t.marginBox,i),s=zCe(o,r,n),a=UCe(s,i);return{page:t,withPlaceholder:n,active:a}},s6=function(e,t){e.frame||We(!1);var n=e.frame,r=Fs(t,n.scroll.initial),i=Sv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=qm({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=$({},e,{frame:o,subject:s});return a};function PC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function a6(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,c=r.lefte.right,d=u&&c;if(d)return!0;var h=u&&s||c&&o;return h}},GCe=function(e){var t=Ca(e.top,e.bottom),n=Ca(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},u6={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},cZ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},VCe=function(e){return function(t){var n=Ca(t.top,t.bottom),r=Ca(t.left,t.right);return function(i){return e===u6?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},XCe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:Mi;return Nw(t,r)},qCe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},YCe=function(t,n,r){return r(n)(t)},c6=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,a=o?XCe(n,r):n;return qCe(a,r,s)&&YCe(a,i,s)},KCe=function(t){return c6($({},t,{isVisibleThroughFrameFn:uZ}))},fZ=function(t){return c6($({},t,{isVisibleThroughFrameFn:GCe}))},QCe=function(t){return c6($({},t,{isVisibleThroughFrameFn:VCe(t.destination.axis)}))},JCe=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 ZCe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return vl(i6(n,r))}function Lx(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(u,c){var d=ZCe(c,r),h=c.descriptor.id;u.all.push(h);var p=KCe({target:d,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return u.invisible[c.descriptor.id]=!0,u;var m=JCe(h,s,o),v={draggableId:h,shouldAnimate:m};return u.visible[h]=v,u},{all:[],visible:{},invisible:{}})}function eTe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function AW(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=eTe(t,{inHomeList:n});return{displaced:kx,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function OC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,a=e.index,u=e.forceShouldAnimate,c=Cv(t,r);if(a==null)return AW({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var d=xd(n,function(y){return y.descriptor.index===a});if(!d)return AW({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var h=ZA(t,n),p=n.indexOf(d),m=h.slice(p),v=Lx({afterDragging:m,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:u});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function id(e,t){return!!t.effected[e]}var tTe=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,a=r[s],u=a.descriptor.index,c=id(s,o);return c?t?u:u-1:t?u+1:u},nTe=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,a=r[0].descriptor.index,u=r[r.length-1].descriptor.index,c=n?u:u+1;return sc?null:s},rTe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,a=e.previousImpact,u=e.viewport,c=e.afterCritical,d=a.at;if(d||We(!1),d.type==="REORDER"){var h=nTe({isMovingForward:t,isInHomeList:n,location:d.destination,insideDestination:s});return h==null?null:OC({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:h})}var p=tTe({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:d.combine,afterCritical:c});return p==null?null:OC({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:p})},iTe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return id(r,n)?o?Mi:Sv(i.point):o?i.point:Mi},oTe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=JA(n);i||We(!1);var o=i.draggableId,s=r[o].page.borderBox.center,a=iTe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Ji(s,a)},dZ=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},sTe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},f6=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},IW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Wp(n.line,r.marginBox[n.end]+dZ(n,i),f6(n,r.marginBox,i))},RW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Wp(n.line,r.marginBox[n.start]-sTe(n,i),f6(n,r.marginBox,i))},aTe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Wp(n.line,r.contentBox[n.start]+dZ(n,i),f6(n,r.contentBox,i))},lTe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=Ev(i.descriptor.id,r),a=n.page,u=i.axis;if(!s.length)return aTe({axis:u,moveInto:i.page,isMoving:a});var c=t.displaced,d=t.displacedBy,h=c.all[0];if(h){var p=r[h];if(id(h,o))return RW({axis:u,moveRelativeTo:p.page,isMoving:a});var m=TC(p.page,d.point);return RW({axis:u,moveRelativeTo:m,isMoving:a})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return a.borderBox.center;if(id(v.descriptor.id,o)){var y=TC(v.page,Sv(o.displacedBy.point));return IW({axis:u,moveRelativeTo:y,isMoving:a})}return IW({axis:u,moveRelativeTo:v.page,isMoving:a})},g3=function(e,t){var n=e.frame;return n?Ji(t,n.scroll.diff.displacement):t},uTe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,a=r.page.borderBox.center,u=n.at;return!i||!u?a:u.type==="REORDER"?lTe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):oTe({impact:n,draggables:o,afterCritical:s})},eI=function(e){var t=uTe(e),n=e.droppable,r=n?g3(n,t):t;return r},hZ=function(e,t){var n=Fs(t,e.scroll.initial),r=Sv(n),i=vl({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 PW(e,t){return e.map(function(n){return t[n]})}function cTe(e,t){for(var n=0;n1?d.sort(function(h,p){return Oo(h)[a.start]-Oo(p)[a.start]})[0]:c.sort(function(h,p){var m=CW(n,TW(Oo(h))),v=CW(n,TW(Oo(p)));return m!==v?m-v:Oo(h)[a.start]-Oo(p)[a.start]})[0]},OW=function(t,n){var r=t.page.borderBox.center;return id(t.descriptor.id,n)?Fs(r,n.displacedBy.point):r},gTe=function(t,n){var r=t.page.borderBox;return id(t.descriptor.id,n)?Nw(r,Sv(n.displacedBy.point)):r},mTe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(a){return fZ({target:gTe(a,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var c=Mx(t,g3(r,OW(a,o))),d=Mx(t,g3(r,OW(u,o)));return ct.left&&e.topt.top}function ETe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var a=s.axis,u=Wp(s.axis.line,t.center[a.line],s.page.borderBox.center[a.crossAxisLine]);return{id:s.descriptor.id,distance:Mx(i,u)}}).sort(function(s,a){return a.distance-s.distance});return o[0]?o[0].id:null}function CTe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=QA(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!STe(t,s))return!1;if(vZ(s)(t.center))return!0;var a=o.axis,u=s.center[a.crossAxisLine],c=t[a.crossAxisStart],d=t[a.crossAxisEnd],h=Ca(s[a.crossAxisStart],s[a.crossAxisEnd]),p=h(c),m=h(d);return!p&&!m?!0:p?cu});return i.length?i.length===1?i[0].descriptor.id:ETe({pageBorderBox:t,draggable:n,candidates:i}):null}var yZ=function(t,n){return vl(Nw(t,n))},TTe=function(e,t){var n=e.frame;return n?yZ(t,n.scroll.diff.value):t};function bZ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ATe(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 ITe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,a=e.afterCritical,u=r.axis,c=Bw(r.axis,n.displaceBy),d=c.value,h=t[u.start],p=t[u.end],m=ZA(n,i),v=xd(m,function(S){var w=S.descriptor.id,b=S.page.borderBox.center[u.line],x=id(w,a),E=bZ({displaced:o,id:w});return x?E?p<=b:hw[a.start]+x&&hw[a.start]-c+x&&dw[a.start]+c+x&&hw[a.start]+x&&d=LW)return IZ;var o=i/LW,s=y3+oAe*o,a=r==="CANCEL"?s*sAe:s;return Number(a.toFixed(2))},lAe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,a=r.droppables,u=Ws(t),c=u?a[u]:null,d=a[n.descriptor.droppableId],h=_Z({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:c||d,viewport:i}),p=Fs(h,n.client.borderBox.center);return p},uAe=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 a=wZ({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var u=$({},r,{displaced:kx});return{impact:u,didDropInsideDroppable:!0}},cAe=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(nAe({reason:s}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&We(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||We(!1);var u=o.critical,c=o.dimensions,d=c.draggables[o.critical.draggable.id],h=uAe({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,m=h.didDropInsideDroppable,v=m?l6(p):null,y=m?JA(p):null,S={index:u.draggable.index,droppableId:u.droppable.id},w={draggableId:d.descriptor.id,type:d.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=lAe({impact:p,draggable:d,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:w,impact:p},E=!Kf(o.current.client.offset,b)||!!w.combine;if(!E){n(g6({completed:x}));return}var A=aAe({current:o.current.client.offset,destination:b,reason:s}),I={newHomeClientOffset:b,dropDuration:A,completed:x};n(tAe(I))}}}},RZ=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function fAe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function dAe(e){var t=e.onWindowScroll;function n(){t(RZ())}var r=Ox(n),i=fAe(r),o=Yf;function s(){return o!==Yf}function a(){s()&&We(!1),o=va(window,[i])}function u(){s()||We(!1),r.cancel(),o(),o=Yf}return{start:a,stop:u,isActive:s}}var hAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},pAe=function(e){var t=dAe({onWindowScroll:function(r){e.dispatch(YTe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&hAe(r)&&t.stop(),n(r)}}},gAe=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},mAe=function(){var e=[],t=function(o){var s=a6(e,function(c){return c.timerId===o});s===-1&&We(!1);var a=e.splice(s,1),u=a[0];u.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),a={timerId:s,callback:o};e.push(a)},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}},vAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},yAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},bAe=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},Mb=function(t,n){n()},z_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},hN=function(t,n,r,i){if(!t){r(i(n));return}var o=gAe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},xAe=function(e,t){var n=mAe(),r=null,i=function(p,m){r&&We(!1),Mb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:m};v(y)}})},o=function(p,m){r&&We(!1),Mb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(z_(p,m))})},s=function(p,m){r&&We(!1);var v=z_(p,m);r={mode:m,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){Mb("onDragStart",function(){return hN(e().onDragStart,v,t,lE.onDragStart)})})},a=function(p,m){var v=l6(m),y=JA(m);r||We(!1);var S=!bAe(p,r.lastCritical);S&&(r.lastCritical=p);var w=!vAe(r.lastLocation,v);w&&(r.lastLocation=v);var b=!yAe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!w&&!b)){var x=$({},z_(p,r.mode),{combine:y,destination:v});n.add(function(){Mb("onDragUpdate",function(){return hN(e().onDragUpdate,x,t,lE.onDragUpdate)})})}},u=function(){r||We(!1),n.flush()},c=function(p){r||We(!1),r=null,Mb("onDragEnd",function(){return hN(e().onDragEnd,p,t,lE.onDragEnd)})},d=function(){if(r){var p=$({},z_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});c(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:a,flush:u,drop:c,abort:d}},wAe=function(e,t){var n=xAe(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 a=o.payload.completed.result;n.flush(),i(o),n.drop(a);return}if(i(o),o.type==="FLUSH"){n.abort();return}var u=r.getState();u.phase==="DRAGGING"&&n.update(u.critical,u.impact)}}}},_Ae=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"&&We(!1),e.dispatch(g6({completed:r.completed}))}}},SAe=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 u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(AZ())}};n=requestAnimationFrame(function(){n=null,t=va(window,[s])})}}}},EAe=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)}}}},CAe=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()}}}}}},TAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},AAe=function(e){return function(t){return function(n){return function(r){if(TAe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&We(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},IAe=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(TZ({reason:r.reason})))}}}},RAe=GJ,PAe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return WJ(zTe,RAe(zEe(iAe(r),EAe(t),rAe(t),cAe,_Ae,SAe,IAe,AAe(s),pAe,CAe(n),wAe(i,o))))},pN=function(){return{additions:{},removals:{},modified:{}}};function OAe(e){var t=e.registry,n=e.callbacks,r=pN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var d=r,h=d.additions,p=d.removals,m=d.modified,v=Object.keys(h).map(function(w){return t.draggable.getById(w).getDimension(Mi)}).sort(function(w,b){return w.descriptor.index-b.descriptor.index}),y=Object.keys(m).map(function(w){var b=t.droppable.getById(w),x=b.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=pN(),n.publish(S)}))},s=function(d){var h=d.descriptor.id;r.additions[h]=d,r.modified[d.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},a=function(d){var h=d.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},u=function(){i&&(cancelAnimationFrame(i),i=null,r=pN())};return{add:s,remove:a,stop:u}}var PZ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Fs({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},OZ=function(){var e=document.documentElement;return e||We(!1),e},MZ=function(){var e=OZ(),t=PZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},MAe=function(){var e=RZ(),t=MZ(),n=e.y,r=e.x,i=OZ(),o=i.clientWidth,s=i.clientHeight,a=r+o,u=n+s,c=vl({top:n,left:r,right:a,bottom:u}),d={frame:c,scroll:{initial:e,current:e,max:t,diff:{value:Mi,displacement:Mi}}};return d},kAe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=MAe(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),u=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),c={draggables:aZ(u),droppables:sZ(a)},d={dimensions:c,critical:t,viewport:i};return d};function DW(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 LAe=function(e,t){var n=null,r=OAe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(m,v){e.droppable.exists(m)||We(!1),n&&t.updateDroppableIsEnabled({id:m,isEnabled:v})},o=function(m,v){n&&(e.droppable.exists(m)||We(!1),t.updateDroppableIsCombineEnabled({id:m,isCombineEnabled:v}))},s=function(m,v){n&&(e.droppable.exists(m)||We(!1),t.updateDroppableScroll({id:m,newScroll:v}))},a=function(m,v){n&&e.droppable.getById(m).callbacks.scroll(v)},u=function(){if(n){r.stop();var m=n.critical.droppable;e.droppable.getAllByType(m.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},c=function(m){n||We(!1);var v=n.critical.draggable;m.type==="ADDITION"&&DW(e,v,m.value)&&r.add(m.value),m.type==="REMOVAL"&&DW(e,v,m.value)&&r.remove(m.value)},d=function(m){n&&We(!1);var v=e.draggable.getById(m.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},w=e.subscribe(c);return n={critical:S,unsubscribe:w},kAe({critical:S,registry:e,scrollOptions:m.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:d,stopPublishing:u};return h},kZ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},DAe=function(e){window.scrollBy(e.x,e.y)},NAe=Oi(function(e){return QA(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),BAe=function(t,n){var r=xd(NAe(n),function(i){return i.frame||We(!1),vZ(i.frame.pageMarginBox)(t)});return r},$Ae=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=BAe(t,r);return o},Qf={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},FAe=function(e,t){var n=e[t.size]*Qf.startFromPercentage,r=e[t.size]*Qf.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},LZ=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},y6=1,zAe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Qf.maxPixelScroll;if(e===t.startScrollingFrom)return y6;var n=LZ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Qf.maxPixelScroll*Qf.ease(r);return Math.ceil(i)},NW=Qf.durationDampening.accelerateAt,BW=Qf.durationDampening.stopDampeningAt,UAe=function(e,t){var n=t,r=BW,i=Date.now(),o=i-n;if(o>=BW)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}},HAe=iZ(function(e){return e===0?0:e}),DZ=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},a=FW({container:n,distanceToEdges:s,dragStartTime:t,axis:u6,shouldUseTimeDampening:o}),u=FW({container:n,distanceToEdges:s,dragStartTime:t,axis:cZ,shouldUseTimeDampening:o}),c=HAe({x:u,y:a});if(Kf(c,Mi))return null;var d=jAe({container:n,subject:r,proposedScroll:c});return d?Kf(d,Mi)?null:d:null},WAe=iZ(function(e){return e===0?0:e>0?1:-1}),b6=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=Ji(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Kf(s,Mi)?null:s}}(),NZ=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=WAe(i),a=b6({max:o,current:r,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},x6=function(t,n){return NZ({current:t.scroll.current,max:t.scroll.max,change:n})},GAe=function(t,n){if(!x6(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return b6({current:i,max:r,change:n})},w6=function(t,n){var r=t.frame;return r?NZ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},VAe=function(t,n){var r=t.frame;return!r||!w6(t,n)?null:b6({current:r.scroll.current,max:r.scroll.max,change:n})},XAe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=DZ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&x6(t,s)?s:null},qAe=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 a=DZ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return a&&w6(t,a)?a:null},zW=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var c=t.viewport,d=XAe({dragStartTime:n,viewport:c,subject:u,center:s,shouldUseTimeDampening:r});if(d){i(d);return}}var h=$Ae({center:s,destination:Ws(t.impact),droppables:t.dimensions.droppables});if(h){var p=qAe({dragStartTime:n,droppable:h,subject:u,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},YAe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Ox(t),i=Ox(n),o=null,s=function(d){o||We(!1);var h=o,p=h.shouldUseTimeDampening,m=h.dragStartTime;zW({state:d,scrollWindow:r,scrollDroppable:i,dragStartTime:m,shouldUseTimeDampening:p})},a=function(d){o&&We(!1);var h=Date.now(),p=!1,m=function(){p=!0};zW({state:d,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:m,scrollDroppable:m}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(d)},u=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:s}},KAe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(c,d){var h=Ji(c.current.client.selection,d);t({client:h})},o=function(c,d){if(!w6(c,d))return d;var h=VAe(c,d);if(!h)return n(c.descriptor.id,d),null;var p=Fs(d,h);n(c.descriptor.id,p);var m=Fs(d,p);return m},s=function(c,d,h){if(!c||!x6(d,h))return h;var p=GAe(d,h);if(!p)return r(h),null;var m=Fs(h,p);r(m);var v=Fs(h,m);return v},a=function(c){var d=c.scrollJumpRequest;if(d){var h=Ws(c.impact);h||We(!1);var p=o(c.dimensions.droppables[h],d);if(p){var m=c.viewport,v=s(c.isWindowScrollAllowed,m,p);v&&i(c,v)}}};return a},QAe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=YAe({scrollWindow:n,scrollDroppable:t}),o=KAe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&o(c)}},a={scroll:s,start:i.start,stop:i.stop};return a},Ym="data-rbd",Km=function(){var e=Ym+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),b3=function(){var e=Ym+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),JAe=function(){var e=Ym+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),UW={contextId:Ym+"-scroll-container-context-id"},ZAe=function(t){return function(n){return"["+n+'="'+t+'"]'}},kb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},eIe="pointer-events: none;",tIe=function(e){var t=ZAe(e),n=function(){var a=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(Km.contextId),styles:{always:` @@ -432,7 +432,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho touch-action: manipulation; `,resting:a,dragging:eIe,dropAnimating:a}}}(),r=function(){var a=` transition: `+U1.outOfTheWay+`; - `;return{selector:t(y3.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(JAe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` + `;return{selector:t(b3.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(JAe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` cursor: grabbing; cursor: -webkit-grabbing; user-select: none; @@ -440,17 +440,17 @@ 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:kb(s,"always"),resting:kb(s,"resting"),dragging:kb(s,"dragging"),dropAnimating:kb(s,"dropAnimating"),userCancel:kb(s,"userCancel")}},Gs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,gN=function(){var t=document.querySelector("head");return t||We(!1),t},UW=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function nIe(e,t){var n=Cn(function(){return tIe(e)},[e]),r=O.useRef(null),i=O.useRef(null),o=_t(Oi(function(h){var p=i.current;p||We(!1),p.textContent=h}),[]),s=_t(function(h){var p=r.current;p||We(!1),p.textContent=h},[]);Gs(function(){!r.current&&!i.current||We(!1);var h=UW(t),p=UW(t);return r.current=h,i.current=p,h.setAttribute(Ym+"-always",e),p.setAttribute(Ym+"-dynamic",e),gN().appendChild(h),gN().appendChild(p),s(n.always),o(n.resting),function(){var m=function(y){var S=y.current;S||We(!1),gN().removeChild(S),y.current=null};m(r),m(i)}},[t,s,o,n.always,n.resting,e]);var a=_t(function(){return o(n.dragging)},[o,n.dragging]),u=_t(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=_t(function(){i.current&&o(n.resting)},[o,n.resting]),d=Cn(function(){return{dragging:a,dropping:u,resting:c}},[a,u,c]);return d}var NZ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function tI(e){return e instanceof NZ(e).HTMLElement}function rIe(e,t){var n="["+Km.contextId+'="'+e+'"]',r=iZ(document.querySelectorAll(n));if(!r.length)return null;var i=xd(r,function(o){return o.getAttribute(Km.draggableId)===t});return!i||!tI(i)?null:i}function iIe(e){var t=O.useRef({}),n=O.useRef(null),r=O.useRef(null),i=O.useRef(!1),o=_t(function(p,m){var v={id:p,focus:m};return t.current[p]=v,function(){var S=t.current,w=S[p];w!==v&&delete S[p]}},[]),s=_t(function(p){var m=rIe(e,p);m&&m!==document.activeElement&&m.focus()},[e]),a=_t(function(p,m){n.current===p&&(n.current=m)},[]),u=_t(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),c=_t(function(p){n.current=null;var m=document.activeElement;m&&m.getAttribute(Km.draggableId)===p&&(n.current=p)},[]);Gs(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var d=Cn(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,c,u,a]);return d}function oIe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var m=t.indexOf(h);m!==-1&&t.splice(m,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||We(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,m){var v=e.draggables[m.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[m.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var m=p.descriptor.id,v=i(m);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[m],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return RC(e.draggables).filter(function(m){return m.descriptor.type===p})}};function a(h){return e.droppables[h]||null}function u(h){var p=a(h);return p||We(!1),p}var c={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var m=a(p.descriptor.id);m&&p.uniqueId===m.uniqueId&&delete e.droppables[p.descriptor.id]},getById:u,findById:a,exists:function(p){return!!a(p)},getAllByType:function(p){return RC(e.droppables).filter(function(m){return m.descriptor.type===p})}};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:c,subscribe:n,clean:d}}function sIe(){var e=Cn(oIe,[]);return O.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var w6=fe.createContext(null),OC=function(){var e=document.body;return e||We(!1),e},aIe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},lIe=function(t){return"rbd-announcement-"+t};function uIe(e){var t=Cn(function(){return lIe(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,aIe),OC().appendChild(o),function(){setTimeout(function(){var u=OC();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=_t(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var cIe=0,fIe={separator:"::"};function _6(e,t){return t===void 0&&(t=fIe),Cn(function(){return""+e+t.separator+cIe++},[t.separator,e])}function dIe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function hIe(e){var t=e.contextId,n=e.text,r=_6("hidden-text",{separator:"-"}),i=Cn(function(){return dIe({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",OC().appendChild(s),function(){var u=OC();u.contains(s)&&u.removeChild(s)}},[i,n]),i}var nI=fe.createContext(null);function BZ(e){var t=O.useRef(e);return O.useEffect(function(){t.current=e}),t}function pIe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&We(!1);var a={abandon:s};return e=a,a}function i(){e||We(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var gIe=9,mIe=13,S6=27,$Z=32,vIe=33,yIe=34,bIe=35,xIe=36,wIe=37,_Ie=38,SIe=39,EIe=40,z_,CIe=(z_={},z_[mIe]=!0,z_[gIe]=!0,z_),FZ=function(e){CIe[e.keyCode]&&e.preventDefault()},rI=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=xd(t,function(r){return"on"+r in document});return n||e}(),zZ=0,jW=5;function TIe(e,t){return Math.abs(t.x-e.x)>=jW||Math.abs(t.y-e.y)>=jW}var HW={type:"IDLE"};function AIe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,c=s.clientY;if(a===zZ){var d={x:u,y:c},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(d);return}h.type!=="PENDING"&&We(!1);var p=h.point;if(TIe(p,d)){s.preventDefault();var m=h.actions.fluidLift(d);i({type:"DRAGGING",actions:m})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===S6){s.preventDefault(),t();return}FZ(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&We(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:rI,fn:t}]}function IIe(e){var t=O.useRef(HW),n=O.useRef(Yf),r=Cn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===zZ&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var m=e.tryGetLock(p,s,{sourceEvent:h});if(m){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),c(m,v)}}}}}},[e]),i=Cn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var m=e.findOptionsForDraggable(p);m&&(m.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=_t(function(){var h={passive:!1,capture:!0};n.current=va(window,[i,r],h)},[i,r]),s=_t(function(){var d=t.current;d.type!=="IDLE"&&(t.current=HW,n.current(),o())},[o]),a=_t(function(){var d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),u=_t(function(){var h={capture:!0,passive:!1},p=AIe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=va(window,p,h)},[a,s]),c=_t(function(h,p){t.current.type!=="IDLE"&&We(!1),t.current={type:"PENDING",point:p,actions:h},u()},[u]);Gs(function(){return o(),function(){n.current()}},[o])}var gg;function RIe(){}var PIe=(gg={},gg[yIe]=!0,gg[vIe]=!0,gg[xIe]=!0,gg[bIe]=!0,gg);function OIe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===S6){o.preventDefault(),n();return}if(o.keyCode===$Z){o.preventDefault(),r();return}if(o.keyCode===EIe){o.preventDefault(),e.moveDown();return}if(o.keyCode===_Ie){o.preventDefault(),e.moveUp();return}if(o.keyCode===SIe){o.preventDefault(),e.moveRight();return}if(o.keyCode===wIe){o.preventDefault(),e.moveLeft();return}if(PIe[o.keyCode]){o.preventDefault();return}FZ(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:rI,fn:n}]}function MIe(e){var t=O.useRef(RIe),n=Cn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==$Z)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,d,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,c=a.snapLift();t.current();function d(){u||We(!1),u=!1,t.current(),r()}t.current=va(window,OIe(c,d),{capture:!0,passive:!1})}}},[e]),r=_t(function(){var o={passive:!1,capture:!0};t.current=va(window,[n],o)},[n]);Gs(function(){return r(),function(){t.current()}},[r])}var mN={type:"IDLE"},kIe=120,DIe=.15;function LIe(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===S6&&i.preventDefault(),t()}},{eventName:rI,fn:t}]}function NIe(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 a=o.touches[0],u=a.clientX,c=a.clientY,d={x:u,y:c};o.preventDefault(),s.actions.move(d)}},{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"&&We(!1);var a=o.touches[0];if(a){var u=a.force>=DIe;if(u){var c=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){c&&t();return}if(c){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:rI,fn:t}]}function BIe(e){var t=O.useRef(mN),n=O.useRef(Yf),r=_t(function(){return t.current},[]),i=_t(function(m){t.current=m},[]),o=Cn(function(){return{eventName:"touchstart",fn:function(m){if(!m.defaultPrevented){var v=e.findClosestDraggableId(m);if(v){var y=e.tryGetLock(v,a,{sourceEvent:m});if(y){var S=m.touches[0],w=S.clientX,b=S.clientY,x={x:w,y:b};n.current(),h(y,x)}}}}}},[e]),s=_t(function(){var m={capture:!0,passive:!1};n.current=va(window,[o],m)},[o]),a=_t(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(mN),n.current(),s())},[s,i]),u=_t(function(){var p=t.current;a(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[a]),c=_t(function(){var m={capture:!0,passive:!1},v={cancel:u,completed:a,getPhase:r},y=va(window,NIe(v),m),S=va(window,LIe(v),m);n.current=function(){y(),S()}},[u,r,a]),d=_t(function(){var m=r();m.type!=="PENDING"&&We(!1);var v=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=_t(function(m,v){r().type!=="IDLE"&&We(!1);var y=setTimeout(d,kIe);i({type:"PENDING",point:v,actions:m,longPressTimerId:y}),c()},[c,r,i,d]);Gs(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(mN))}},[r,s,i]),Gs(function(){var m=va(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return m},[])}var $Ie={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function UZ(e,t){if(t==null)return!1;var n=!!$Ie[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:UZ(e,t.parentElement)}function FIe(e,t){var n=t.target;return tI(n)?UZ(e,n):!1}var zIe=function(e){return vl(e.getBoundingClientRect()).center};function UIe(e){return e instanceof NZ(e).Element}var jIe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=xd(t,function(r){return r in Element.prototype});return n||e}();function jZ(e,t){return e==null?null:e[jIe](t)?e:jZ(e.parentElement,t)}function HIe(e,t){return e.closest?e.closest(t):jZ(e,t)}function WIe(e){return"["+Km.contextId+'="'+e+'"]'}function GIe(e,t){var n=t.target;if(!UIe(n))return null;var r=WIe(e),i=HIe(n,r);return!i||!tI(i)?null:i}function VIe(e,t){var n=GIe(e,t);return n?n.getAttribute(Km.draggableId):null}function XIe(e,t){var n="["+y3.contextId+'="'+e+'"]',r=iZ(document.querySelectorAll(n)),i=xd(r,function(o){return o.getAttribute(y3.id)===t});return!i||!tI(i)?null:i}function qIe(e){e.preventDefault()}function U_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function HZ(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||!MZ(n.getState(),i))}function YIe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=HZ({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var c=i.draggable.getById(o),d=XIe(n,c.descriptor.id);if(!d||a&&!c.options.canDragInteractiveElements&&FIe(d,a))return null;var h=t.claim(s||Yf),p="PRE_DRAG";function m(){return c.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(I,R){U_({expected:I,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(R())}var S=y.bind(null,"DRAGGING");function w(I){function R(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(R(),p!=="PRE_DRAG"&&We(!1)),r.dispatch(jTe(I.liftActionArgs)),p="DRAGGING";function M(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),I.cleanup(),N.shouldBlockNextClick){var H=va(window,[{eventName:"click",fn:qIe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}R(),r.dispatch(CZ({reason:L}))}return $({isActive:function(){return U_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(N){return M("DROP",N)},cancel:function(N){return M("CANCEL",N)}},I.actions)}function b(I){var R=Ox(function(L){S(function(){return EZ({client:L})})}),M=w({liftActionArgs:{id:o,clientSelection:I,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return $({},M,{move:R})}function x(){var I={moveUp:function(){return S(QTe)},moveRight:function(){return S(ZTe)},moveDown:function(){return S(JTe)},moveLeft:function(){return S(eAe)}};return w({liftActionArgs:{id:o,clientSelection:zIe(d),movementMode:"SNAP"},cleanup:Yf,actions:I})}function E(){var I=U_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});I&&t.release()}var A={isActive:function(){return U_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:b,snapLift:x,abort:E};return A}var KIe=[IIe,MIe,BIe];function QIe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?KIe:[],i||[]),a=O.useState(function(){return pIe()})[0],u=_t(function(b,x){b.isDragging&&!x.isDragging&&a.tryAbandon()},[a]);Gs(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();u(b,E),b=E});return x},[a,n,u]),Gs(function(){return a.tryAbandon},[a.tryAbandon]);for(var c=_t(function(w){return HZ({lockAPI:a,registry:r,store:n,draggableId:w})},[a,r,n]),d=_t(function(w,b,x){return YIe({lockAPI:a,registry:r,contextId:t,store:n,draggableId:w,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,a,r,n]),h=_t(function(w){return VIe(t,w)},[t]),p=_t(function(w){var b=r.draggable.findById(w);return b?b.options:null},[r.draggable]),m=_t(function(){a.isClaimed()&&(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(h6()))},[a,n]),v=_t(a.isClaimed,[a]),y=Cn(function(){return{canGetLock:c,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:m,isLockClaimed:v}},[c,d,h,p,m,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:a=C.jsx(GRe,{}),value:u,id:c,i:d=0,variant:h="default",extrasPlacement:p="center",autoFocus:m,cardStyle:v,sortable:y}){const[S,w]=O.useState(null),b=Dn(),x=E=>C.jsxs(gt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(gt,{color:"text.secondary",sx:{pr:2},children:C.jsx(fxe,{})})}),e!==null&&O.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(gt,{flexGrow:1,sx:{ml:e===null?2:0},children:O.cloneElement(a,{onDelete:()=>o(c??d),autoFocus:m,value:u,key:c??d,onValueChange:A=>i(c??d,A,s),onChange:A=>i(c??d,A.target.value,s),ref:A=>w(A)})}),C.jsxs(gt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Gm,{color:"primary",edge:"end",onChange:(A,I)=>i(c??d,u,I),checked:s}),r&&C.jsx($p,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx($A,{})}),n&&C.jsx($p,{onClick:()=>o(c??d),children:C.jsx(lxe,{})})]})]});return C.jsx(FRe,{index:d,draggableId:`${c}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(gt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(sme,{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 qRe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function YRe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:a,autoFocus:u,getCategory:c,getOrder:d,onChange:h,extras:p}=e,m=VRe(),v=Dn(),[y,S]=O.useState(s),[w,b]=O.useState(-1);O.useEffect(()=>{const I=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(I)}},[s,S,v.transitions.duration.standard]);const x=ie.uniqBy([...y,...s],I=>I.id).map(I=>s.find(R=>I.id===R.id)??I).map((I,R)=>{const{enabled:M,element:L,value:N,id:H}=I??{};return{value:N,render:V=>C.jsx(kL,{in:!!s.find(U=>U.id===I.id),unmountOnExit:!0,appear:!m,mountOnEnter:!0,children:C.jsx(XRe,{...e,onDeleteItem:U=>{o(U),b(-1)},enabled:M,element:L,value:N,id:H,i:R,autoFocus:u||R===w,...V})}),key:H,in:!!s.find(V=>V.id===I.id)}}),E=ie.sortBy(x,I=>c==null?void 0:c(I.value),I=>d==null?void 0:d(I.value)).map(I=>({...I,render:R=>C.jsx(gt,{children:I.render(R)},I.key)}));return C.jsx(nRe,{onDragEnd:I=>{if(!I.destination)return;const R=qRe(s,I.source.index,I.destination.index);h==null||h(R),S(R)},children:C.jsxs(Wm,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(age,{disableSticky:!0,children:[n&&C.jsx(Wt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(Wt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(gt,{mt:c?-1:0,children:C.jsx(YZ,{droppableId:"list",children:I=>C.jsxs("div",{...I.droppableProps,ref:I.innerRef,children:[(()=>{const R=[];return E.forEach((M,L)=>{c&&A(E,L,M)&&R.push(C.jsx(kL,{in:s.some(N=>c(N.value)===c(M.value)),appear:!0,children:C.jsx(gt,{pl:2,pb:2,pt:1,children:C.jsx(Wt,{variant:"overline",color:"text.secondary",children:c(M.value)})})},c(M.value))),R.push(M.render())}),R})(),I.placeholder]})})}),C.jsx(kL,{in:!(s!=null&&s.length),children:C.jsx(gt,{ml:2,mb:1,pt:c?1:0,children:C.jsx(Wt,{component:"div",color:"text.secondary",children:a??"No items"})})}),C.jsxs(gt,{p:2,pt:1,mb:-3,children:[C.jsx(Rz,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(exe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:I=>An(I.palette.text.primary,I.palette.action.activatedOpacity)},children:C.jsx(gt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(I,R,M){return!!(c&&(I[R-1]===void 0||c(I[R-1].value)!==c(M.value)))}}function iI({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=O.useState(t??[]);function a(u){s(u),e==null||e(u)}return O.useEffect(()=>{s(t)},[t]),C.jsx(gt,{sx:{ml:-2},children:C.jsx(YRe,{...i,items:o.map(u=>({id:u.key,value:u,element:n==null?void 0:n(u)})),useDelete:!0,useEdit:!1,onAddItem:()=>a==null?void 0:a([...o,{key:ca(),...r==null?void 0:r()}]),onDeleteItem:u=>a==null?void 0:a(ie.filter(o,c=>c.key!==u)),onChangeItem:(u,c)=>a==null?void 0:a(ie.map(o,d=>d.key===u?c:d)),onChange:u=>a==null?void 0:a(ie.map(u,c=>c.value))})})}const _f=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],KRe=["any","source","destination","expanding","generating","closing"];function QRe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(En,{children:[C.jsx($1,{placeholder:"Event",sx:{minWidth:160},items:ie.map(KRe,s=>({value:s,label:ie.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(Kc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx($1,{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(ai,{}),C.jsx(Wt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(ai,{}),C.jsx($1,{placeholder:"Condition",items:_f.map(s=>({value:s.key,label:ie.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=_f==null?void 0:_f[0])==null?void 0:o.key),onChange:s=>r({condition:ie.find(_f,{key:s})})}),C.jsx(ai,{}),C.jsx(ww,{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(ai,{sx:{px:2}}),C.jsx(f3,{checked:!!e.active,onChange:(s,a)=>r({active:a})})]})}const JRe=["f","g"],ZRe=["variables"];function ePe(){const[{breakpoints:e=[]},t]=Oa(),n=ie.uniq([...JRe,...ie.flatMap(ZRe,r=>ie.flatMap([],i=>ie.map(ie.keys(ie.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(gt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(gt,{sx:{minWidth:720,mb:2},children:C.jsx(iI,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(QRe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:_f==null?void 0:_f[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 tPe(){const{controls:e,onChange:t,state:n}=bd(),[{monotonicF:r,monotonicG:i},o]=Oa(),[s,a]=O.useState("standard");function u(c){return C.jsx(Wt,{variant:"overline",color:"text.secondary",children:c})}return C.jsx(IJ,{value:s,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(MJ,{onChange:(c,d)=>a(d),children:[C.jsx(Qg,{label:"Standard",value:"standard"}),C.jsx(Qg,{label:"Advanced",value:"advanced"})]})}),C.jsxs(zn.Content,{children:[C.jsx(gt,{overflow:"auto",height:"100%",children:C.jsxs(gt,{pt:6,height:"100%",children:[C.jsxs(tm,{value:"standard",children:[C.jsxs(gt,{children:[u("General"),C.jsxs(En,{children:[C.jsx(f3,{label:"Monotonic f value",checked:!!r,onChange:(c,d)=>o({monotonicF:d})}),C.jsx(ai,{}),C.jsx(f3,{label:"Monotonic g value",checked:!!i,onChange:(c,d)=>o({monotonicG:d})})]})]}),C.jsx(ai,{}),C.jsxs(gt,{children:[u("Breakpoints"),C.jsx(ePe,{})]}),C.jsxs(gt,{children:[u("Export"),C.jsx(En,{mt:1})]})]}),C.jsx(tm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(DEe,{})})]})})," "]}),C.jsx(zn.Extras,{children:e})]})})}function hp({label:e,icon:t=C.jsx(Rxe,{}),...n}){return C.jsxs(En,{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 nPe(){const{controls:e,onChange:t,state:n}=bd(),[r]=LQ();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:r.length?C.jsx(GA,{y:!0,children:C.jsx(Wm,{sx:{pt:6},children:ie.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(N1,{children:C.jsx(ru,{primary:i.content,secondary:i.timestamp})}),C.jsx(Kc,{})]},o))})}):C.jsx(hp,{pt:6,label:"Logs",icon:C.jsx(RQ,{})})})}),C.jsx(zn.Extras,{children:e})]})}var KZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Kt,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(d){return n.setTimeout(d,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(d){n.clearTimeout(d)};function o(d,h){var p=Object.prototype.toString.call(d),m=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&d instanceof jQuery||typeof Elements<"u"&&d instanceof Elements,v=0,y=d.length;if(m)for(;v=V&&(F+=N.value),N.mode==="max"&&U<=V&&(F+=N.value),D[z]||(D[z]=""),F&&(" "+D[z]+" ").indexOf(" "+F+" ")===-1&&(D[z]+=" "+F));for(var W in G)G.hasOwnProperty(W)&&(D[G[W]]?this.element.setAttribute(G[W],D[G[W]].substr(1)):this.element.removeAttribute(G[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 m(R,M,L,N){if(typeof s[R]>"u"){s[R]=[];var H=a.length;o.innerHTML+=` + `}},s=[r,n,i,o];return{always:kb(s,"always"),resting:kb(s,"resting"),dragging:kb(s,"dragging"),dropAnimating:kb(s,"dropAnimating"),userCancel:kb(s,"userCancel")}},Gs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,gN=function(){var t=document.querySelector("head");return t||We(!1),t},jW=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function nIe(e,t){var n=Cn(function(){return tIe(e)},[e]),r=O.useRef(null),i=O.useRef(null),o=_t(Oi(function(h){var p=i.current;p||We(!1),p.textContent=h}),[]),s=_t(function(h){var p=r.current;p||We(!1),p.textContent=h},[]);Gs(function(){!r.current&&!i.current||We(!1);var h=jW(t),p=jW(t);return r.current=h,i.current=p,h.setAttribute(Ym+"-always",e),p.setAttribute(Ym+"-dynamic",e),gN().appendChild(h),gN().appendChild(p),s(n.always),o(n.resting),function(){var m=function(y){var S=y.current;S||We(!1),gN().removeChild(S),y.current=null};m(r),m(i)}},[t,s,o,n.always,n.resting,e]);var a=_t(function(){return o(n.dragging)},[o,n.dragging]),u=_t(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=_t(function(){i.current&&o(n.resting)},[o,n.resting]),d=Cn(function(){return{dragging:a,dropping:u,resting:c}},[a,u,c]);return d}var BZ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function tI(e){return e instanceof BZ(e).HTMLElement}function rIe(e,t){var n="["+Km.contextId+'="'+e+'"]',r=oZ(document.querySelectorAll(n));if(!r.length)return null;var i=xd(r,function(o){return o.getAttribute(Km.draggableId)===t});return!i||!tI(i)?null:i}function iIe(e){var t=O.useRef({}),n=O.useRef(null),r=O.useRef(null),i=O.useRef(!1),o=_t(function(p,m){var v={id:p,focus:m};return t.current[p]=v,function(){var S=t.current,w=S[p];w!==v&&delete S[p]}},[]),s=_t(function(p){var m=rIe(e,p);m&&m!==document.activeElement&&m.focus()},[e]),a=_t(function(p,m){n.current===p&&(n.current=m)},[]),u=_t(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),c=_t(function(p){n.current=null;var m=document.activeElement;m&&m.getAttribute(Km.draggableId)===p&&(n.current=p)},[]);Gs(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var d=Cn(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,c,u,a]);return d}function oIe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var m=t.indexOf(h);m!==-1&&t.splice(m,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||We(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,m){var v=e.draggables[m.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[m.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var m=p.descriptor.id,v=i(m);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[m],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return PC(e.draggables).filter(function(m){return m.descriptor.type===p})}};function a(h){return e.droppables[h]||null}function u(h){var p=a(h);return p||We(!1),p}var c={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var m=a(p.descriptor.id);m&&p.uniqueId===m.uniqueId&&delete e.droppables[p.descriptor.id]},getById:u,findById:a,exists:function(p){return!!a(p)},getAllByType:function(p){return PC(e.droppables).filter(function(m){return m.descriptor.type===p})}};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:c,subscribe:n,clean:d}}function sIe(){var e=Cn(oIe,[]);return O.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var _6=fe.createContext(null),MC=function(){var e=document.body;return e||We(!1),e},aIe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},lIe=function(t){return"rbd-announcement-"+t};function uIe(e){var t=Cn(function(){return lIe(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,aIe),MC().appendChild(o),function(){setTimeout(function(){var u=MC();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=_t(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var cIe=0,fIe={separator:"::"};function S6(e,t){return t===void 0&&(t=fIe),Cn(function(){return""+e+t.separator+cIe++},[t.separator,e])}function dIe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function hIe(e){var t=e.contextId,n=e.text,r=S6("hidden-text",{separator:"-"}),i=Cn(function(){return dIe({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",MC().appendChild(s),function(){var u=MC();u.contains(s)&&u.removeChild(s)}},[i,n]),i}var nI=fe.createContext(null);function $Z(e){var t=O.useRef(e);return O.useEffect(function(){t.current=e}),t}function pIe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&We(!1);var a={abandon:s};return e=a,a}function i(){e||We(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var gIe=9,mIe=13,E6=27,FZ=32,vIe=33,yIe=34,bIe=35,xIe=36,wIe=37,_Ie=38,SIe=39,EIe=40,U_,CIe=(U_={},U_[mIe]=!0,U_[gIe]=!0,U_),zZ=function(e){CIe[e.keyCode]&&e.preventDefault()},rI=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=xd(t,function(r){return"on"+r in document});return n||e}(),UZ=0,HW=5;function TIe(e,t){return Math.abs(t.x-e.x)>=HW||Math.abs(t.y-e.y)>=HW}var WW={type:"IDLE"};function AIe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,c=s.clientY;if(a===UZ){var d={x:u,y:c},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(d);return}h.type!=="PENDING"&&We(!1);var p=h.point;if(TIe(p,d)){s.preventDefault();var m=h.actions.fluidLift(d);i({type:"DRAGGING",actions:m})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===E6){s.preventDefault(),t();return}zZ(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&We(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:rI,fn:t}]}function IIe(e){var t=O.useRef(WW),n=O.useRef(Yf),r=Cn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===UZ&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var m=e.tryGetLock(p,s,{sourceEvent:h});if(m){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),c(m,v)}}}}}},[e]),i=Cn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var m=e.findOptionsForDraggable(p);m&&(m.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=_t(function(){var h={passive:!1,capture:!0};n.current=va(window,[i,r],h)},[i,r]),s=_t(function(){var d=t.current;d.type!=="IDLE"&&(t.current=WW,n.current(),o())},[o]),a=_t(function(){var d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),u=_t(function(){var h={capture:!0,passive:!1},p=AIe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=va(window,p,h)},[a,s]),c=_t(function(h,p){t.current.type!=="IDLE"&&We(!1),t.current={type:"PENDING",point:p,actions:h},u()},[u]);Gs(function(){return o(),function(){n.current()}},[o])}var gg;function RIe(){}var PIe=(gg={},gg[yIe]=!0,gg[vIe]=!0,gg[xIe]=!0,gg[bIe]=!0,gg);function OIe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===E6){o.preventDefault(),n();return}if(o.keyCode===FZ){o.preventDefault(),r();return}if(o.keyCode===EIe){o.preventDefault(),e.moveDown();return}if(o.keyCode===_Ie){o.preventDefault(),e.moveUp();return}if(o.keyCode===SIe){o.preventDefault(),e.moveRight();return}if(o.keyCode===wIe){o.preventDefault(),e.moveLeft();return}if(PIe[o.keyCode]){o.preventDefault();return}zZ(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:rI,fn:n}]}function MIe(e){var t=O.useRef(RIe),n=Cn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==FZ)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,d,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,c=a.snapLift();t.current();function d(){u||We(!1),u=!1,t.current(),r()}t.current=va(window,OIe(c,d),{capture:!0,passive:!1})}}},[e]),r=_t(function(){var o={passive:!1,capture:!0};t.current=va(window,[n],o)},[n]);Gs(function(){return r(),function(){t.current()}},[r])}var mN={type:"IDLE"},kIe=120,LIe=.15;function DIe(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===E6&&i.preventDefault(),t()}},{eventName:rI,fn:t}]}function NIe(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 a=o.touches[0],u=a.clientX,c=a.clientY,d={x:u,y:c};o.preventDefault(),s.actions.move(d)}},{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"&&We(!1);var a=o.touches[0];if(a){var u=a.force>=LIe;if(u){var c=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){c&&t();return}if(c){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:rI,fn:t}]}function BIe(e){var t=O.useRef(mN),n=O.useRef(Yf),r=_t(function(){return t.current},[]),i=_t(function(m){t.current=m},[]),o=Cn(function(){return{eventName:"touchstart",fn:function(m){if(!m.defaultPrevented){var v=e.findClosestDraggableId(m);if(v){var y=e.tryGetLock(v,a,{sourceEvent:m});if(y){var S=m.touches[0],w=S.clientX,b=S.clientY,x={x:w,y:b};n.current(),h(y,x)}}}}}},[e]),s=_t(function(){var m={capture:!0,passive:!1};n.current=va(window,[o],m)},[o]),a=_t(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(mN),n.current(),s())},[s,i]),u=_t(function(){var p=t.current;a(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[a]),c=_t(function(){var m={capture:!0,passive:!1},v={cancel:u,completed:a,getPhase:r},y=va(window,NIe(v),m),S=va(window,DIe(v),m);n.current=function(){y(),S()}},[u,r,a]),d=_t(function(){var m=r();m.type!=="PENDING"&&We(!1);var v=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=_t(function(m,v){r().type!=="IDLE"&&We(!1);var y=setTimeout(d,kIe);i({type:"PENDING",point:v,actions:m,longPressTimerId:y}),c()},[c,r,i,d]);Gs(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(mN))}},[r,s,i]),Gs(function(){var m=va(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return m},[])}var $Ie={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function jZ(e,t){if(t==null)return!1;var n=!!$Ie[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:jZ(e,t.parentElement)}function FIe(e,t){var n=t.target;return tI(n)?jZ(e,n):!1}var zIe=function(e){return vl(e.getBoundingClientRect()).center};function UIe(e){return e instanceof BZ(e).Element}var jIe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=xd(t,function(r){return r in Element.prototype});return n||e}();function HZ(e,t){return e==null?null:e[jIe](t)?e:HZ(e.parentElement,t)}function HIe(e,t){return e.closest?e.closest(t):HZ(e,t)}function WIe(e){return"["+Km.contextId+'="'+e+'"]'}function GIe(e,t){var n=t.target;if(!UIe(n))return null;var r=WIe(e),i=HIe(n,r);return!i||!tI(i)?null:i}function VIe(e,t){var n=GIe(e,t);return n?n.getAttribute(Km.draggableId):null}function XIe(e,t){var n="["+b3.contextId+'="'+e+'"]',r=oZ(document.querySelectorAll(n)),i=xd(r,function(o){return o.getAttribute(b3.id)===t});return!i||!tI(i)?null:i}function qIe(e){e.preventDefault()}function j_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function WZ(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||!kZ(n.getState(),i))}function YIe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=WZ({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var c=i.draggable.getById(o),d=XIe(n,c.descriptor.id);if(!d||a&&!c.options.canDragInteractiveElements&&FIe(d,a))return null;var h=t.claim(s||Yf),p="PRE_DRAG";function m(){return c.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(I,R){j_({expected:I,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(R())}var S=y.bind(null,"DRAGGING");function w(I){function R(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(R(),p!=="PRE_DRAG"&&We(!1)),r.dispatch(jTe(I.liftActionArgs)),p="DRAGGING";function M(D,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),I.cleanup(),N.shouldBlockNextClick){var H=va(window,[{eventName:"click",fn:qIe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}R(),r.dispatch(TZ({reason:D}))}return $({isActive:function(){return j_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(N){return M("DROP",N)},cancel:function(N){return M("CANCEL",N)}},I.actions)}function b(I){var R=Ox(function(D){S(function(){return CZ({client:D})})}),M=w({liftActionArgs:{id:o,clientSelection:I,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return $({},M,{move:R})}function x(){var I={moveUp:function(){return S(QTe)},moveRight:function(){return S(ZTe)},moveDown:function(){return S(JTe)},moveLeft:function(){return S(eAe)}};return w({liftActionArgs:{id:o,clientSelection:zIe(d),movementMode:"SNAP"},cleanup:Yf,actions:I})}function E(){var I=j_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});I&&t.release()}var A={isActive:function(){return j_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:b,snapLift:x,abort:E};return A}var KIe=[IIe,MIe,BIe];function QIe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?KIe:[],i||[]),a=O.useState(function(){return pIe()})[0],u=_t(function(b,x){b.isDragging&&!x.isDragging&&a.tryAbandon()},[a]);Gs(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();u(b,E),b=E});return x},[a,n,u]),Gs(function(){return a.tryAbandon},[a.tryAbandon]);for(var c=_t(function(w){return WZ({lockAPI:a,registry:r,store:n,draggableId:w})},[a,r,n]),d=_t(function(w,b,x){return YIe({lockAPI:a,registry:r,contextId:t,store:n,draggableId:w,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,a,r,n]),h=_t(function(w){return VIe(t,w)},[t]),p=_t(function(w){var b=r.draggable.findById(w);return b?b.options:null},[r.draggable]),m=_t(function(){a.isClaimed()&&(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(p6()))},[a,n]),v=_t(a.isClaimed,[a]),y=Cn(function(){return{canGetLock:c,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:m,isLockClaimed:v}},[c,d,h,p,m,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:a=C.jsx(GRe,{}),value:u,id:c,i:d=0,variant:h="default",extrasPlacement:p="center",autoFocus:m,cardStyle:v,sortable:y}){const[S,w]=O.useState(null),b=Ln(),x=E=>C.jsxs(gt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(gt,{color:"text.secondary",sx:{pr:2},children:C.jsx(fxe,{})})}),e!==null&&O.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(gt,{flexGrow:1,sx:{ml:e===null?2:0},children:O.cloneElement(a,{onDelete:()=>o(c??d),autoFocus:m,value:u,key:c??d,onValueChange:A=>i(c??d,A,s),onChange:A=>i(c??d,A.target.value,s),ref:A=>w(A)})}),C.jsxs(gt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Gm,{color:"primary",edge:"end",onChange:(A,I)=>i(c??d,u,I),checked:s}),r&&C.jsx($p,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx($A,{})}),n&&C.jsx($p,{onClick:()=>o(c??d),children:C.jsx(lxe,{})})]})]});return C.jsx(FRe,{index:d,draggableId:`${c}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(gt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(sme,{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 qRe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function YRe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:a,autoFocus:u,getCategory:c,getOrder:d,onChange:h,extras:p}=e,m=VRe(),v=Ln(),[y,S]=O.useState(s),[w,b]=O.useState(-1);O.useEffect(()=>{const I=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(I)}},[s,S,v.transitions.duration.standard]);const x=ie.uniqBy([...y,...s],I=>I.id).map(I=>s.find(R=>I.id===R.id)??I).map((I,R)=>{const{enabled:M,element:D,value:N,id:H}=I??{};return{value:N,render:V=>C.jsx(kD,{in:!!s.find(U=>U.id===I.id),unmountOnExit:!0,appear:!m,mountOnEnter:!0,children:C.jsx(XRe,{...e,onDeleteItem:U=>{o(U),b(-1)},enabled:M,element:D,value:N,id:H,i:R,autoFocus:u||R===w,...V})}),key:H,in:!!s.find(V=>V.id===I.id)}}),E=ie.sortBy(x,I=>c==null?void 0:c(I.value),I=>d==null?void 0:d(I.value)).map(I=>({...I,render:R=>C.jsx(gt,{children:I.render(R)},I.key)}));return C.jsx(nRe,{onDragEnd:I=>{if(!I.destination)return;const R=qRe(s,I.source.index,I.destination.index);h==null||h(R),S(R)},children:C.jsxs(Wm,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(age,{disableSticky:!0,children:[n&&C.jsx(Wt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(Wt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(gt,{mt:c?-1:0,children:C.jsx(KZ,{droppableId:"list",children:I=>C.jsxs("div",{...I.droppableProps,ref:I.innerRef,children:[(()=>{const R=[];return E.forEach((M,D)=>{c&&A(E,D,M)&&R.push(C.jsx(kD,{in:s.some(N=>c(N.value)===c(M.value)),appear:!0,children:C.jsx(gt,{pl:2,pb:2,pt:1,children:C.jsx(Wt,{variant:"overline",color:"text.secondary",children:c(M.value)})})},c(M.value))),R.push(M.render())}),R})(),I.placeholder]})})}),C.jsx(kD,{in:!(s!=null&&s.length),children:C.jsx(gt,{ml:2,mb:1,pt:c?1:0,children:C.jsx(Wt,{component:"div",color:"text.secondary",children:a??"No items"})})}),C.jsxs(gt,{p:2,pt:1,mb:-3,children:[C.jsx(Pz,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(exe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:I=>An(I.palette.text.primary,I.palette.action.activatedOpacity)},children:C.jsx(gt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(I,R,M){return!!(c&&(I[R-1]===void 0||c(I[R-1].value)!==c(M.value)))}}function iI({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=O.useState(t??[]);function a(u){s(u),e==null||e(u)}return O.useEffect(()=>{s(t)},[t]),C.jsx(gt,{sx:{ml:-2},children:C.jsx(YRe,{...i,items:o.map(u=>({id:u.key,value:u,element:n==null?void 0:n(u)})),useDelete:!0,useEdit:!1,onAddItem:()=>a==null?void 0:a([...o,{key:ca(),...r==null?void 0:r()}]),onDeleteItem:u=>a==null?void 0:a(ie.filter(o,c=>c.key!==u)),onChangeItem:(u,c)=>a==null?void 0:a(ie.map(o,d=>d.key===u?c:d)),onChange:u=>a==null?void 0:a(ie.map(u,c=>c.value))})})}const _f=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],KRe=["any","source","destination","expanding","generating","closing"];function QRe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(En,{children:[C.jsx($1,{placeholder:"Event",sx:{minWidth:160},items:ie.map(KRe,s=>({value:s,label:ie.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(Kc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx($1,{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(ai,{}),C.jsx(Wt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(ai,{}),C.jsx($1,{placeholder:"Condition",items:_f.map(s=>({value:s.key,label:ie.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=_f==null?void 0:_f[0])==null?void 0:o.key),onChange:s=>r({condition:ie.find(_f,{key:s})})}),C.jsx(ai,{}),C.jsx(_w,{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(ai,{sx:{px:2}}),C.jsx(d3,{checked:!!e.active,onChange:(s,a)=>r({active:a})})]})}const JRe=["f","g"],ZRe=["variables"];function ePe(){const[{breakpoints:e=[]},t]=Oa(),n=ie.uniq([...JRe,...ie.flatMap(ZRe,r=>ie.flatMap([],i=>ie.map(ie.keys(ie.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(gt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(gt,{sx:{minWidth:720,mb:2},children:C.jsx(iI,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(QRe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:_f==null?void 0:_f[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 tPe(){const{controls:e,onChange:t,state:n}=bd(),[{monotonicF:r,monotonicG:i},o]=Oa(),[s,a]=O.useState("standard");function u(c){return C.jsx(Wt,{variant:"overline",color:"text.secondary",children:c})}return C.jsx(RJ,{value:s,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(kJ,{onChange:(c,d)=>a(d),children:[C.jsx(Qg,{label:"Standard",value:"standard"}),C.jsx(Qg,{label:"Advanced",value:"advanced"})]})}),C.jsxs(zn.Content,{children:[C.jsx(gt,{overflow:"auto",height:"100%",children:C.jsxs(gt,{pt:6,height:"100%",children:[C.jsxs(tm,{value:"standard",children:[C.jsxs(gt,{children:[u("General"),C.jsxs(En,{children:[C.jsx(d3,{label:"Monotonic f value",checked:!!r,onChange:(c,d)=>o({monotonicF:d})}),C.jsx(ai,{}),C.jsx(d3,{label:"Monotonic g value",checked:!!i,onChange:(c,d)=>o({monotonicG:d})})]})]}),C.jsx(ai,{}),C.jsxs(gt,{children:[u("Breakpoints"),C.jsx(ePe,{})]}),C.jsxs(gt,{children:[u("Export"),C.jsx(En,{mt:1})]})]}),C.jsx(tm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(LEe,{})})]})})," "]}),C.jsx(zn.Extras,{children:e})]})})}function hp({label:e,icon:t=C.jsx(Rxe,{}),...n}){return C.jsxs(En,{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 nPe(){const{controls:e,onChange:t,state:n}=bd(),[r]=NQ();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:r.length?C.jsx(GA,{y:!0,children:C.jsx(Wm,{sx:{pt:6},children:ie.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(N1,{children:C.jsx(ru,{primary:i.content,secondary:i.timestamp})}),C.jsx(Kc,{})]},o))})}):C.jsx(hp,{pt:6,label:"Logs",icon:C.jsx(PQ,{})})})}),C.jsx(zn.Extras,{children:e})]})}var QZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Kt,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(d){return n.setTimeout(d,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(d){n.clearTimeout(d)};function o(d,h){var p=Object.prototype.toString.call(d),m=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&d instanceof jQuery||typeof Elements<"u"&&d instanceof Elements,v=0,y=d.length;if(m)for(;v=V&&(F+=N.value),N.mode==="max"&&U<=V&&(F+=N.value),L[z]||(L[z]=""),F&&(" "+L[z]+" ").indexOf(" "+F+" ")===-1&&(L[z]+=" "+F));for(var W in G)G.hasOwnProperty(W)&&(L[G[W]]?this.element.setAttribute(G[W],L[G[W]].substr(1)):this.element.removeAttribute(G[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 m(R,M,D,N){if(typeof s[R]>"u"){s[R]=[];var H=a.length;o.innerHTML+=` `+R+" {animation: 0.1s element-queries;}",o.innerHTML+=` -`+R+" > .resize-sensor {min-width: "+H+"px;}",a.push(R)}s[R].push({mode:M,property:L,value:N})}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 N=M(L,R),H=0,V=N.length;HL[q].minWidth&&(K=q);if(K||(K=H),V!==K)if(U[K])M[V].style.display="none",M[K].style.display="block",V=K;else{var Q=new Image;Q.onload=function(){M[K].src=N[K],M[V].style.display="none",M[K].style.display="block",U[K]=!0,V=K},Q.src=N[K]}else M[K].src=N[K]}R.resizeSensorInstance=new n(R,W),W()}function w(){for(var R=v(),M=R("[data-responsive-image],[responsive-image]"),L=0,N=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),I=!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(ZZ.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const ZZ=O.createContext(null);function sPe(){return O.useContext(ZZ)}function aPe(e=128){const[t,n]=O.useState(!0),[r,i]=O.useState(!0),[o,s]=O.useState(!0),[a,u]=O.useState(null),c=O.useRef(0);return O.useEffect(()=>{if(a){const d=()=>{{const h=a.scrollTop<=e;h!==o&&s(h)}{const h=a.scrollTop<=1;h!==r&&i(h)}c.current-a.scrollTop&&(Math.abs(c.current-a.scrollTop)>2&&c.current>=0&&n(c.current>a.scrollTop),c.current=a.scrollTop)};return a.addEventListener("scroll",d,{passive:!0}),()=>{a.removeEventListener("scroll",d)}}},[a,o,r,c,e]),[t||o,o,r,a,u]}function C6({children:e}){return C.jsx(Wt,{variant:"h6",children:e})}function lPe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:a="sticky"}){const u=sPe(),c=Dn(),[,,d,,h]=aPe();O.useEffect(()=>{h(u)},[u,h]);const p=d?{background:c.palette.background.paper,...!s&&{boxShadow:c.shadows[0]},...t}:{background:c.palette.background.paper,...!s&&{boxShadow:c.shadows[4]},...n};return C.jsx(the,{elevation:0,position:a,style:{color:c.palette.text.primary,transition:c.transitions.create(i),...p},children:C.jsxs(w1e,{children:[C.jsx($p,{style:{marginRight:c.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(txe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(zp,{in:!!(!o||d),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(gt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(zp,{in:!!(o&&!d),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(gt,{style:{width:"100%"},children:o})})})]})})}function uPe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...a}){var A;const[u,c]=O.useState(void 0);O.useEffect(()=>{e&&c(e)},[e]);const d=Dn(),h=e6(),[p,m]=O.useState(null),[v,y]=O.useState(null),[S,w]=O.useState(!1),[b,x]=O.useState(0);O.useEffect(()=>{if(p&&v&&!h&&!r){const I=()=>{const M=window.innerHeight-64{window.removeEventListener("resize",I),R.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(nve,{fullScreen:h,...a,style:{...E&&{paddingTop:d.spacing(8)},...a.style},PaperProps:{ref:I=>m(I),style:{...E&&{borderRadius:`${d.shape.borderRadius}px ${d.shape.borderRadius}px 0 0`},background:d.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=a.PaperProps)==null?void 0:A.style},...a.PaperProps},children:[C.jsx(oPe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:I=>y(I),style:{width:"100%",height:"100%"},children:u})}),t]})}function T6({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(_v,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[O.cloneElement(n(i)),C.jsxs(uPe,{open:s,onClose:o,...e,children:[C.jsx(lPe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const eee=({label:e})=>C.jsx(Wt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),cPe=({label:e})=>C.jsx(Wt,{variant:"body1",children:e}),Nx=({label:e,content:t})=>C.jsxs(En,{alignItems:"center",children:[C.jsx(cPe,{label:e}),C.jsx(ai,{flex:1}),t]});let tee=class extends Error{},fPe=class extends tee{},dPe=class extends tee{};const hPe=(e,t=",")=>e.join(t),pPe={accept:"*",multiple:!1,strict:!1},nee=e=>{const{accept:t,multiple:n,strict:r}={...pPe,...e},i=vPe({multiple:n,accept:Array.isArray(t)?hPe(t):t});return new Promise(o=>{i.onchange=()=>{o(gPe(i.files,n,r)),i.remove()},i.click()})},gPe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new fPe);const o=mPe(e,t,n);if(!o)return i(new dPe);r(o)}),mPe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,vPe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n};function Vs(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(t){return typeof t}:Vs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function xn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YW(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lE(e,t,n){return ree()?lE=Reflect.construct:lE=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),c=new u;return s&&Bx(c,s.prototype),c},lE.apply(null,arguments)}function yPe(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function x3(e){var t=typeof Map=="function"?new Map:void 0;return x3=function(r){if(r===null||!yPe(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return lE(r,arguments,ro(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Bx(i,r)},x3(e)}function sa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iee(e,t){return t&&(typeof t=="object"||typeof t=="function")?t:sa(e)}function ar(e){var t=ree();return function(){var r=ro(e),i;if(t){var o=ro(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return iee(this,i)}}function bPe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ro(e),e!==null););return e}function as(e,t,n){return typeof Reflect<"u"&&Reflect.get?as=Reflect.get:as=function(i,o,s){var a=bPe(i,o);if(a){var u=Object.getOwnPropertyDescriptor(a,o);return u.get?u.get.call(s):u.value}},as(e,t,n||e)}function Bw(e,t){return oee(e)||wPe(e,t)||A6(e,t)||see()}function Lb(e){return oee(e)||xPe(e)||A6(e)||see()}function oee(e){if(Array.isArray(e))return e}function xPe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function wPe(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](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function A6(e,t){if(e){if(typeof e=="string")return KW(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 KW(e,t)}}function KW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=A6(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}var ni={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Se={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},uE="tag:yaml.org,2002:",Of={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function QW(e){for(var t=[0],n=e.indexOf(` +`+R+" > .resize-sensor {min-width: "+H+"px;}",a.push(R)}s[R].push({mode:M,property:D,value:N})}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 D in s)if(s.hasOwnProperty(D))for(var N=M(D,R),H=0,V=N.length;HD[q].minWidth&&(K=q);if(K||(K=H),V!==K)if(U[K])M[V].style.display="none",M[K].style.display="block",V=K;else{var Q=new Image;Q.onload=function(){M[K].src=N[K],M[V].style.display="none",M[K].style.display="block",U[K]=!0,V=K},Q.src=N[K]}else M[K].src=N[K]}R.resizeSensorInstance=new n(R,W),W()}function w(){for(var R=v(),M=R("[data-responsive-image],[responsive-image]"),D=0,N=M.length;D 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),I=!0);for(var M=0,D=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(eee.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const eee=O.createContext(null);function sPe(){return O.useContext(eee)}function aPe(e=128){const[t,n]=O.useState(!0),[r,i]=O.useState(!0),[o,s]=O.useState(!0),[a,u]=O.useState(null),c=O.useRef(0);return O.useEffect(()=>{if(a){const d=()=>{{const h=a.scrollTop<=e;h!==o&&s(h)}{const h=a.scrollTop<=1;h!==r&&i(h)}c.current-a.scrollTop&&(Math.abs(c.current-a.scrollTop)>2&&c.current>=0&&n(c.current>a.scrollTop),c.current=a.scrollTop)};return a.addEventListener("scroll",d,{passive:!0}),()=>{a.removeEventListener("scroll",d)}}},[a,o,r,c,e]),[t||o,o,r,a,u]}function T6({children:e}){return C.jsx(Wt,{variant:"h6",children:e})}function lPe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:a="sticky"}){const u=sPe(),c=Ln(),[,,d,,h]=aPe();O.useEffect(()=>{h(u)},[u,h]);const p=d?{background:c.palette.background.paper,...!s&&{boxShadow:c.shadows[0]},...t}:{background:c.palette.background.paper,...!s&&{boxShadow:c.shadows[4]},...n};return C.jsx(the,{elevation:0,position:a,style:{color:c.palette.text.primary,transition:c.transitions.create(i),...p},children:C.jsxs(w1e,{children:[C.jsx($p,{style:{marginRight:c.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(txe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(zp,{in:!!(!o||d),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(gt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(zp,{in:!!(o&&!d),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(gt,{style:{width:"100%"},children:o})})})]})})}function uPe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...a}){var A;const[u,c]=O.useState(void 0);O.useEffect(()=>{e&&c(e)},[e]);const d=Ln(),h=t6(),[p,m]=O.useState(null),[v,y]=O.useState(null),[S,w]=O.useState(!1),[b,x]=O.useState(0);O.useEffect(()=>{if(p&&v&&!h&&!r){const I=()=>{const M=window.innerHeight-64{window.removeEventListener("resize",I),R.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(nve,{fullScreen:h,...a,style:{...E&&{paddingTop:d.spacing(8)},...a.style},PaperProps:{ref:I=>m(I),style:{...E&&{borderRadius:`${d.shape.borderRadius}px ${d.shape.borderRadius}px 0 0`},background:d.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=a.PaperProps)==null?void 0:A.style},...a.PaperProps},children:[C.jsx(oPe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:I=>y(I),style:{width:"100%",height:"100%"},children:u})}),t]})}function A6({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(_v,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[O.cloneElement(n(i)),C.jsxs(uPe,{open:s,onClose:o,...e,children:[C.jsx(lPe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const tee=({label:e})=>C.jsx(Wt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),cPe=({label:e})=>C.jsx(Wt,{variant:"body1",children:e}),Nx=({label:e,content:t})=>C.jsxs(En,{alignItems:"center",children:[C.jsx(cPe,{label:e}),C.jsx(ai,{flex:1}),t]});let nee=class extends Error{},fPe=class extends nee{},dPe=class extends nee{};const hPe=(e,t=",")=>e.join(t),pPe={accept:"*",multiple:!1,strict:!1},ree=e=>{const{accept:t,multiple:n,strict:r}={...pPe,...e},i=vPe({multiple:n,accept:Array.isArray(t)?hPe(t):t});return new Promise(o=>{i.onchange=()=>{o(gPe(i.files,n,r)),i.remove()},i.click()})},gPe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new fPe);const o=mPe(e,t,n);if(!o)return i(new dPe);r(o)}),mPe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,vPe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n};function Vs(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(t){return typeof t}:Vs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function xn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KW(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uE(e,t,n){return iee()?uE=Reflect.construct:uE=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),c=new u;return s&&Bx(c,s.prototype),c},uE.apply(null,arguments)}function yPe(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function w3(e){var t=typeof Map=="function"?new Map:void 0;return w3=function(r){if(r===null||!yPe(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return uE(r,arguments,ro(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Bx(i,r)},w3(e)}function sa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oee(e,t){return t&&(typeof t=="object"||typeof t=="function")?t:sa(e)}function ar(e){var t=iee();return function(){var r=ro(e),i;if(t){var o=ro(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return oee(this,i)}}function bPe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ro(e),e!==null););return e}function as(e,t,n){return typeof Reflect<"u"&&Reflect.get?as=Reflect.get:as=function(i,o,s){var a=bPe(i,o);if(a){var u=Object.getOwnPropertyDescriptor(a,o);return u.get?u.get.call(s):u.value}},as(e,t,n||e)}function $w(e,t){return see(e)||wPe(e,t)||I6(e,t)||aee()}function Db(e){return see(e)||xPe(e)||I6(e)||aee()}function see(e){if(Array.isArray(e))return e}function xPe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function wPe(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](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function I6(e,t){if(e){if(typeof e=="string")return QW(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 QW(e,t)}}function QW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=I6(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}var ni={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Se={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},cE="tag:yaml.org,2002:",Of={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function JW(e){for(var t=[0],n=e.indexOf(` `);n!==-1;)n+=1,t.push(n),n=e.indexOf(` -`,n);return t}function aee(e){var t,n;return typeof e=="string"?(t=QW(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=QW(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function w3(e,t){if(typeof e!="number"||e<0)return null;var n=aee(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],s=r[e];s&&s>o&&i[s-1]===` +`,n);return t}function lee(e){var t,n;return typeof e=="string"?(t=JW(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=JW(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function _3(e,t){if(typeof e!="number"||e<0)return null;var n=lee(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],s=r[e];s&&s>o&&i[s-1]===` `;)--s;return i.slice(o,s)}function SPe(e,t){var n=e.start,r=e.end,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:80,o=_Pe(n.line,t);if(!o)return null;var s=n.col;if(o.length>i)if(s<=i-10)o=o.substr(0,i-1)+"…";else{var a=Math.round(i/2);o.length>s+a&&(o=o.substr(0,s+a-1)+"…"),s-=o.length-i,o="…"+o.substr(1-i)}var u=1,c="";r&&(r.line===n.line&&s+(r.col-n.col)<=i+1?u=r.col-n.col:(u=Math.min(o.length+1,i)-s,c="…"));var d=s>1?" ".repeat(s-1):"",h="^".repeat(u);return"".concat(o,` `).concat(d).concat(h).concat(c)}var Er=function(){function e(t,n){xn(this,e),this.start=t,this.end=n||t}return Yn(e,[{key:"isEmpty",value:function(){return typeof this.start!="number"||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(n,r){var i=this.start,o=this.end;if(n.length===0||o<=n[0])return this.origStart=i,this.origEnd=o,r;for(var s=r;si);)++s;this.origStart=i+s;for(var a=s;s=o);)++s;return this.origEnd=o+s,a}}],[{key:"copy",value:function(n){return new e(n.start,n.end)}}]),e}(),Qe=function(){function e(t,n,r){xn(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return Yn(e,[{key:"getPropValue",value:function(n,r,i){if(!this.context)return null;var o=this.context.src,s=this.props[n];return s&&o[s.start]===r?o.slice(s.start+(i?1:0),s.end):null}},{key:"anchor",get:function(){for(var n=0;n0?n.join(` -`):null}},{key:"commentHasRequiredWhitespace",value:function(n){var r=this.context.src;if(this.header&&n===this.header.end||!this.valueRange)return!1;var i=this.valueRange.end;return n!==i||e.atBlank(r,i-1)}},{key:"hasComment",get:function(){if(this.context){for(var n=this.context.src,r=0;r=n.length||n[o]===` `?i+` @@ -468,10 +468,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `?r-1:e.endOfWhiteSpace(n,r):r}},{key:"foldNewline",value:function(n,r,i){for(var o=0,s=!1,a="",u=n[r+1];u===" "||u===" "||u===` `;){switch(u){case` `:o=0,r+=1,a+=` -`;break;case" ":o<=i&&(s=!0),r=e.endOfWhiteSpace(n,r+2)-1;break;case" ":o+=1,r+=1;break}u=n[r+1]}return a||(a=" "),u&&o<=i&&(s=!0),{fold:a,offset:r,error:s}}}]),e}(),Qm=function(e){sr(n,e);var t=ar(n);function n(r,i,o){var s;if(xn(this,n),!o||!(i instanceof Qe))throw new Error("Invalid arguments for new ".concat(r));return s=t.call(this),s.name=r,s.message=o,s.source=i,s}return Yn(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var i=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Er(this.offset,this.offset+1);var o=i&&w3(this.offset,i);if(o){var s={line:o.line,col:o.col+1};this.linePos={start:o,end:s}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var a=this.linePos.start,u=a.line,c=a.col;this.message+=" at line ".concat(u,", column ").concat(c);var d=i&&SPe(this.linePos,i);d&&(this.message+=`: +`;break;case" ":o<=i&&(s=!0),r=e.endOfWhiteSpace(n,r+2)-1;break;case" ":o+=1,r+=1;break}u=n[r+1]}return a||(a=" "),u&&o<=i&&(s=!0),{fold:a,offset:r,error:s}}}]),e}(),Qm=function(e){sr(n,e);var t=ar(n);function n(r,i,o){var s;if(xn(this,n),!o||!(i instanceof Qe))throw new Error("Invalid arguments for new ".concat(r));return s=t.call(this),s.name=r,s.message=o,s.source=i,s}return Yn(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var i=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Er(this.offset,this.offset+1);var o=i&&_3(this.offset,i);if(o){var s={line:o.line,col:o.col+1};this.linePos={start:o,end:s}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var a=this.linePos.start,u=a.line,c=a.col;this.message+=" at line ".concat(u,", column ").concat(c);var d=i&&SPe(this.linePos,i);d&&(this.message+=`: `.concat(d,` -`))}delete this.source}}}]),n}(x3(Error)),$x=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLReferenceError",r,i)}return n}(Qm),Qt=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLSemanticError",r,i)}return n}(Qm),mo=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLSyntaxError",r,i)}return n}(Qm),Tv=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLWarning",r,i)}return n}(Qm),lee=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var i=this.valueRange,o=i.start,s=i.end,a=this.context.src,u=a[s-1];oy?a.slice(y,d+1):h)}else c+=h}var w=a[o];switch(w){case" ":{var b="Plain value cannot start with a tab character",x=[new Qt(this,b)];return{errors:x,str:c}}case"@":case"`":{var E="Plain value cannot start with reserved character ".concat(w),A=[new Qt(this,E)];return{errors:A,str:c}}default:return c}}},{key:"parseBlockValue",value:function(i){for(var o=this.context,s=o.indent,a=o.inFlow,u=o.src,c=i,d=i,h=u[c];h===` @@ -479,19 +479,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `?c=p:(d=n.endOfLine(u,p,a),c=d)}return this.valueRange.isEmpty()&&(this.valueRange.start=i),this.valueRange.end=d,d}},{key:"parse",value:function(i,o){this.context=i;var s=i.inFlow,a=i.src,u=o,c=a[u];return c&&c!=="#"&&c!==` `&&(u=n.endOfLine(a,o,s)),this.valueRange=new Er(o,u),u=Qe.endOfWhiteSpace(a,u),u=this.parseComment(u),(!this.hasComment||this.valueRange.isEmpty())&&(u=this.parseBlockValue(u)),u}}],[{key:"endOfLine",value:function(i,o,s){for(var a=i[o],u=o;a&&a!==` `&&!(s&&(a==="["||a==="]"||a==="{"||a==="}"||a===","));){var c=i[u+1];if(a===":"&&(!c||c===` -`||c===" "||c===" "||s&&c===",")||(a===" "||a===" ")&&c==="#")break;u+=1,a=c}return u}}]),n}(Qe),Fx=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.BLANK_LINE)}return Yn(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(i,o){return this.context=i,this.range=new Er(o,o+1),o+1}}]),n}(Qe),I6=function(e){sr(n,e);var t=ar(n);function n(r,i){var o;return xn(this,n),o=t.call(this,r,i),o.node=null,o}return Yn(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,u=i.atLineStart,c=i.lineStart;!u&&this.type===Se.SEQ_ITEM&&(this.error=new Qt(this,"Sequence items must not have preceding content on the same line"));for(var d=u?o-c:i.indent,h=Qe.endOfWhiteSpace(a,o+1),p=a[h],m=p==="#",v=[],y=null;p===` +`||c===" "||c===" "||s&&c===",")||(a===" "||a===" ")&&c==="#")break;u+=1,a=c}return u}}]),n}(Qe),Fx=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.BLANK_LINE)}return Yn(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(i,o){return this.context=i,this.range=new Er(o,o+1),o+1}}]),n}(Qe),R6=function(e){sr(n,e);var t=ar(n);function n(r,i){var o;return xn(this,n),o=t.call(this,r,i),o.node=null,o}return Yn(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,u=i.atLineStart,c=i.lineStart;!u&&this.type===Se.SEQ_ITEM&&(this.error=new Qt(this,"Sequence items must not have preceding content on the same line"));for(var d=u?o-c:i.indent,h=Qe.endOfWhiteSpace(a,o+1),p=a[h],m=p==="#",v=[],y=null;p===` `||p==="#";){if(p==="#"){var S=Qe.endOfLine(a,h+1);v.push(new Er(h,S)),h=S}else{u=!0,c=h+1;var w=Qe.endOfWhiteSpace(a,c);a[w]===` -`&&v.length===0&&(y=new Fx,c=y.parse({src:a},c)),h=Qe.endOfIndent(a,c)}p=a[h]}if(Qe.nextNodeIsIndented(p,h-(c+d),this.type!==Se.SEQ_ITEM)?this.node=s({atLineStart:u,inCollection:!1,indent:d,lineStart:c,parent:this},h):p&&c>o+1&&(h=c-1),this.node){if(y){var b=i.parent.items||i.parent.contents;b&&b.push(y)}v.length&&Array.prototype.push.apply(this.props,v),h=this.node.range.end}else if(m){var x=v[0];this.props.push(x),h=x.end}else h=Qe.endOfLine(a,o+1);var E=this.node?this.node.valueRange.end:h;return this.valueRange=new Er(o,E),h}},{key:"setOrigRanges",value:function(i,o){return o=as(ro(n.prototype),"setOrigRanges",this).call(this,i,o),this.node?this.node.setOrigRanges(i,o):o}},{key:"toString",value:function(){var i=this.context.src,o=this.node,s=this.range,a=this.value;if(a!=null)return a;var u=o?i.slice(s.start,o.range.start)+String(o):i.slice(s.start,s.end);return Qe.addStringTerminator(i,s.end,u)}}]),n}(Qe),j1=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.COMMENT)}return Yn(n,[{key:"parse",value:function(i,o){this.context=i;var s=this.parseComment(o);return this.range=new Er(o,s),s}}]),n}(Qe);function _3(e){for(var t=e;t instanceof I6;)t=t.node;if(!(t instanceof uee))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===Se.COMMENT){var s=o.context,a=s.indent,u=s.lineStart;if(a>0&&o.range.start>=u+a)break;r=i}else if(o.type===Se.BLANK_LINE)r=i;else break}if(r===-1)return null;for(var c=t.items.splice(r,n-r),d=c[0].range.start;t.range.end=d,t.valueRange&&t.valueRange.end>d&&(t.valueRange.end=d),t!==e;)t=t.context.parent;return c}var uee=function(e){sr(n,e);var t=ar(n);function n(r){var i;xn(this,n),i=t.call(this,r.type===Se.SEQ_ITEM?Se.SEQ:Se.MAP);for(var o=r.props.length-1;o>=0;--o)if(r.props[o].start0}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,u=Qe.startOfLine(a,o),c=this.items[0];c.context.parent=this,this.valueRange=Er.copy(c.valueRange);var d=c.range.start-c.context.lineStart,h=o;h=Qe.normalizeOffset(a,h);for(var p=a[h],m=Qe.endOfWhiteSpace(a,u)===h,v=!1;p;){for(;p===` +`&&v.length===0&&(y=new Fx,c=y.parse({src:a},c)),h=Qe.endOfIndent(a,c)}p=a[h]}if(Qe.nextNodeIsIndented(p,h-(c+d),this.type!==Se.SEQ_ITEM)?this.node=s({atLineStart:u,inCollection:!1,indent:d,lineStart:c,parent:this},h):p&&c>o+1&&(h=c-1),this.node){if(y){var b=i.parent.items||i.parent.contents;b&&b.push(y)}v.length&&Array.prototype.push.apply(this.props,v),h=this.node.range.end}else if(m){var x=v[0];this.props.push(x),h=x.end}else h=Qe.endOfLine(a,o+1);var E=this.node?this.node.valueRange.end:h;return this.valueRange=new Er(o,E),h}},{key:"setOrigRanges",value:function(i,o){return o=as(ro(n.prototype),"setOrigRanges",this).call(this,i,o),this.node?this.node.setOrigRanges(i,o):o}},{key:"toString",value:function(){var i=this.context.src,o=this.node,s=this.range,a=this.value;if(a!=null)return a;var u=o?i.slice(s.start,o.range.start)+String(o):i.slice(s.start,s.end);return Qe.addStringTerminator(i,s.end,u)}}]),n}(Qe),j1=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.COMMENT)}return Yn(n,[{key:"parse",value:function(i,o){this.context=i;var s=this.parseComment(o);return this.range=new Er(o,s),s}}]),n}(Qe);function S3(e){for(var t=e;t instanceof R6;)t=t.node;if(!(t instanceof cee))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===Se.COMMENT){var s=o.context,a=s.indent,u=s.lineStart;if(a>0&&o.range.start>=u+a)break;r=i}else if(o.type===Se.BLANK_LINE)r=i;else break}if(r===-1)return null;for(var c=t.items.splice(r,n-r),d=c[0].range.start;t.range.end=d,t.valueRange&&t.valueRange.end>d&&(t.valueRange.end=d),t!==e;)t=t.context.parent;return c}var cee=function(e){sr(n,e);var t=ar(n);function n(r){var i;xn(this,n),i=t.call(this,r.type===Se.SEQ_ITEM?Se.SEQ:Se.MAP);for(var o=r.props.length-1;o>=0;--o)if(r.props[o].start0}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,u=Qe.startOfLine(a,o),c=this.items[0];c.context.parent=this,this.valueRange=Er.copy(c.valueRange);var d=c.range.start-c.context.lineStart,h=o;h=Qe.normalizeOffset(a,h);for(var p=a[h],m=Qe.endOfWhiteSpace(a,u)===h,v=!1;p;){for(;p===` `||p==="#";){if(m&&p===` `&&!v){var y=new Fx;if(h=y.parse({src:a},h),this.valueRange.end=h,h>=a.length){p=null;break}this.items.push(y),h-=1}else if(p==="#"){if(h=a.length){p=null;break}}if(u=h+1,h=Qe.endOfIndent(a,u),Qe.atBlank(a,h)){var w=Qe.endOfWhiteSpace(a,h),b=a[w];(!b||b===` `||b==="#")&&(h=w)}p=a[h],m=!0}if(!p)break;if(h!==u+d&&(m||p!==":")){if(ho&&(h=u);break}else if(!this.error){var x="All collection items must start at the same column";this.error=new mo(this,x)}}if(c.type===Se.SEQ_ITEM){if(p!=="-"){u>o&&(h=u);break}}else if(p==="-"&&!this.error){var E=a[h+1];if(!E||E===` `||E===" "||E===" "){var A="A collection cannot be both a mapping and a sequence";this.error=new mo(this,A)}}var I=s({atLineStart:m,inCollection:!0,indent:d,lineStart:u,parent:this},h);if(!I)return h;if(this.items.push(I),this.valueRange.end=I.valueRange.end,h=Qe.normalizeOffset(a,I.range.end),p=a[h],m=!1,v=I.includesTrailingLines,p){for(var R=h-1,M=a[R];M===" "||M===" ";)M=a[--R];M===` -`&&(u=R+1,m=!0)}var L=_3(I);L&&Array.prototype.push.apply(this.items,L)}return h}},{key:"setOrigRanges",value:function(i,o){return o=as(ro(n.prototype),"setOrigRanges",this).call(this,i,o),this.items.forEach(function(s){o=s.setOrigRanges(i,o)}),o}},{key:"toString",value:function(){var i=this.context.src,o=this.items,s=this.range,a=this.value;if(a!=null)return a;for(var u=i.slice(s.start,o[0].range.start)+String(o[0]),c=1;c=a+s?!0:u!=="#"&&u!==` +`&&(u=R+1,m=!0)}var D=S3(I);D&&Array.prototype.push.apply(this.items,D)}return h}},{key:"setOrigRanges",value:function(i,o){return o=as(ro(n.prototype),"setOrigRanges",this).call(this,i,o),this.items.forEach(function(s){o=s.setOrigRanges(i,o)}),o}},{key:"toString",value:function(){var i=this.context.src,o=this.items,s=this.range,a=this.value;if(a!=null)return a;for(var u=i.slice(s.start,o[0].range.start)+String(o[0]),c=1;c=a+s?!0:u!=="#"&&u!==` `?!1:n.nextContentHasIndent(i,o,s):!1}}]),n}(Qe),EPe=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this,Se.DIRECTIVE),r.name=null,r}return Yn(n,[{key:"parameters",get:function(){var i=this.rawValue;return i?i.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(i){for(var o=this.context.src,s=i,a=o[s];a&&a!==` `&&a!==" "&&a!==" ";)a=o[s+=1];return this.name=o.slice(i,s),s}},{key:"parseParameters",value:function(i){for(var o=this.context.src,s=i,a=o[s];a&&a!==` `&&a!=="#";)a=o[s+=1];return this.valueRange=new Er(i,s),s}},{key:"parse",value:function(i,o){this.context=i;var s=this.parseName(o+1);return s=this.parseParameters(s),s=this.parseComment(s),this.range=new Er(o,s),s}}]),n}(Qe),CPe=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this,Se.DOCUMENT),r.directives=null,r.contents=null,r.directivesEndMarker=null,r.documentEndMarker=null,r}return Yn(n,[{key:"parseDirectives",value:function(i){var o=this.context.src;this.directives=[];for(var s=!0,a=!1,u=i;!Qe.atDocumentBoundary(o,u,ni.DIRECTIVES_END);)switch(u=n.startCommentOrEndBlankLine(o,u),o[u]){case` `:if(s){var c=new Fx;u=c.parse({src:o},u),u0&&(this.contents=this.directives,this.directives=[]),u}return o[u]?(this.directivesEndMarker=new Er(u,u+3),u+3):(a?this.error=new Qt(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),u)}},{key:"parseContents",value:function(i){var o=this.context,s=o.parseNode,a=o.src;this.contents||(this.contents=[]);for(var u=i;a[u-1]==="-";)u-=1;var c=Qe.endOfWhiteSpace(a,i),d=u===i;for(this.valueRange=new Er(c);!Qe.atDocumentBoundary(a,c,ni.DOCUMENT_END);){switch(a[c]){case` -`:if(d){var h=new Fx;c=h.parse({src:a},c),c0&&((o.length>0||i[0].type===Se.COMMENT)&&(a+=`--- `),a+=i.join("")),a[a.length-1]!==` `&&(a+=` @@ -524,74 +524,74 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `:for(;d[p+1]===" "||d[p+1]===" ";)p+=1;break;default:i.push(new mo(this,"Invalid escape sequence ".concat(d.substr(p-1,2)))),h+="\\"+d[p]}else if(m===" "||m===" "){for(var b=p,x=d[p+1];x===" "||x===" ";)p+=1,x=d[p+1];x!==` `&&(h+=p>b?d.slice(b,p+1):m)}else h+=m}return i.length>0?{errors:i,str:h}:h}},{key:"parseCharCode",value:function(i,o,s){var a=this.context.src,u=a.substr(i,o),c=u.length===o&&/^[0-9a-fA-F]+$/.test(u),d=c?parseInt(u,16):NaN;return isNaN(d)?(s.push(new mo(this,"Invalid escape sequence ".concat(a.substr(i-2,o+2)))),a.substr(i-2,o+2)):String.fromCodePoint(d)}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=n.endOfQuote(s,o+1);return this.valueRange=new Er(o,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}],[{key:"endOfQuote",value:function(i,o){for(var s=i[o];s&&s!=='"';)o+=s==="\\"?2:1,s=i[o];return o+1}}]),n}(Qe),PPe=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var i=[],o=this.valueRange,s=o.start,a=o.end,u=this.context,c=u.indent,d=u.src;d[a-1]!=="'"&&i.push(new mo(this,"Missing closing 'quote"));for(var h="",p=s+1;pb?d.slice(b,p+1):m)}else h+=m}return i.length>0?{errors:i,str:h}:h}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=n.endOfQuote(s,o+1);return this.valueRange=new Er(o,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}],[{key:"endOfQuote",value:function(i,o){for(var s=i[o];s;)if(s==="'"){if(i[o+1]!=="'")break;s=i[o+=2]}else s=i[o+=1];return o+1}}]),n}(Qe);function OPe(e,t){switch(e){case Se.ALIAS:return new TPe(e,t);case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return new APe(e,t);case Se.FLOW_MAP:case Se.FLOW_SEQ:return new IPe(e,t);case Se.MAP_KEY:case Se.MAP_VALUE:case Se.SEQ_ITEM:return new I6(e,t);case Se.COMMENT:case Se.PLAIN:return new lee(e,t);case Se.QUOTE_DOUBLE:return new RPe(e,t);case Se.QUOTE_SINGLE:return new PPe(e,t);default:return null}}var MPe=function(){function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.atLineStart,o=r.inCollection,s=r.inFlow,a=r.indent,u=r.lineStart,c=r.parent;xn(this,e),ho(this,"parseNode",function(d,h){if(Qe.atDocumentBoundary(t.src,h))return null;var p=new e(t,d),m=p.parseProps(h),v=m.props,y=m.type,S=m.valueStart,w=OPe(y,v),b=w.parse(p,S);if(w.range=new Er(h,b),b<=h&&(w.error=new Error("Node#parse consumed no characters"),w.error.parseEnd=b,w.error.source=w,w.range.end=h+1),p.nodeStartsCollection(w)){!w.error&&!p.atLineStart&&p.parent.type===Se.DOCUMENT&&(w.error=new mo(w,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var x=new uee(w);return b=x.parse(new e(p),b),x.range=new Er(h,b),x}return w}),this.atLineStart=i??(n.atLineStart||!1),this.inCollection=o??(n.inCollection||!1),this.inFlow=s??(n.inFlow||!1),this.indent=a??n.indent,this.lineStart=u??n.lineStart,this.parent=c??(n.parent||{}),this.root=n.root,this.src=n.src}return Yn(e,[{key:"nodeStartsCollection",value:function(n){var r=this.inCollection,i=this.inFlow,o=this.src;if(r||i)return!1;if(n instanceof I6)return!0;var s=n.range.end;return o[s]===` +`&&(h+=p>b?d.slice(b,p+1):m)}else h+=m}return i.length>0?{errors:i,str:h}:h}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=n.endOfQuote(s,o+1);return this.valueRange=new Er(o,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}],[{key:"endOfQuote",value:function(i,o){for(var s=i[o];s;)if(s==="'"){if(i[o+1]!=="'")break;s=i[o+=2]}else s=i[o+=1];return o+1}}]),n}(Qe);function OPe(e,t){switch(e){case Se.ALIAS:return new TPe(e,t);case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return new APe(e,t);case Se.FLOW_MAP:case Se.FLOW_SEQ:return new IPe(e,t);case Se.MAP_KEY:case Se.MAP_VALUE:case Se.SEQ_ITEM:return new R6(e,t);case Se.COMMENT:case Se.PLAIN:return new uee(e,t);case Se.QUOTE_DOUBLE:return new RPe(e,t);case Se.QUOTE_SINGLE:return new PPe(e,t);default:return null}}var MPe=function(){function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.atLineStart,o=r.inCollection,s=r.inFlow,a=r.indent,u=r.lineStart,c=r.parent;xn(this,e),ho(this,"parseNode",function(d,h){if(Qe.atDocumentBoundary(t.src,h))return null;var p=new e(t,d),m=p.parseProps(h),v=m.props,y=m.type,S=m.valueStart,w=OPe(y,v),b=w.parse(p,S);if(w.range=new Er(h,b),b<=h&&(w.error=new Error("Node#parse consumed no characters"),w.error.parseEnd=b,w.error.source=w,w.range.end=h+1),p.nodeStartsCollection(w)){!w.error&&!p.atLineStart&&p.parent.type===Se.DOCUMENT&&(w.error=new mo(w,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var x=new cee(w);return b=x.parse(new e(p),b),x.range=new Er(h,b),x}return w}),this.atLineStart=i??(n.atLineStart||!1),this.inCollection=o??(n.inCollection||!1),this.inFlow=s??(n.inFlow||!1),this.indent=a??n.indent,this.lineStart=u??n.lineStart,this.parent=c??(n.parent||{}),this.root=n.root,this.src=n.src}return Yn(e,[{key:"nodeStartsCollection",value:function(n){var r=this.inCollection,i=this.inFlow,o=this.src;if(r||i)return!1;if(n instanceof R6)return!0;var s=n.range.end;return o[s]===` `||o[s-1]===` `?!1:(s=Qe.endOfWhiteSpace(o,s),o[s]===":")}},{key:"parseProps",value:function(n){var r=this.inFlow,i=this.parent,o=this.src,s=[],a=!1;n=this.atLineStart?Qe.endOfIndent(o,n):Qe.endOfWhiteSpace(o,n);for(var u=o[n];u===ni.ANCHOR||u===ni.COMMENT||u===ni.TAG||u===` `;){if(u===` `){var c=n,d=void 0;do d=c+1,c=Qe.endOfIndent(o,d);while(o[c]===` -`);var h=c-(d+this.indent),p=i.type===Se.SEQ_ITEM&&i.context.atLineStart;if(o[c]!=="#"&&!Qe.nextNodeIsIndented(o[c],h,!p))break;this.atLineStart=!0,this.lineStart=d,a=!1,n=c}else if(u===ni.COMMENT){var m=Qe.endOfLine(o,n+1);s.push(new Er(n,m)),n=m}else{var v=Qe.endOfIdentifier(o,n+1);u===ni.TAG&&o[v]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(o.slice(n+1,v+13))&&(v=Qe.endOfIdentifier(o,v+5)),s.push(new Er(n,v)),a=!0,n=Qe.endOfWhiteSpace(o,v)}u=o[n]}a&&u===":"&&Qe.atBlank(o,n+1,!0)&&(n-=1);var y=e.parseType(o,n,r);return{props:s,type:y,valueStart:n}}}],[{key:"parseType",value:function(n,r,i){switch(n[r]){case"*":return Se.ALIAS;case">":return Se.BLOCK_FOLDED;case"|":return Se.BLOCK_LITERAL;case"{":return Se.FLOW_MAP;case"[":return Se.FLOW_SEQ;case"?":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_KEY:Se.PLAIN;case":":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_VALUE:Se.PLAIN;case"-":return!i&&Qe.atBlank(n,r+1,!0)?Se.SEQ_ITEM:Se.PLAIN;case'"':return Se.QUOTE_DOUBLE;case"'":return Se.QUOTE_SINGLE;default:return Se.PLAIN}}}]),e}();function R6(e){var t=[];e.indexOf("\r")!==-1&&(e=e.replace(/\r\n?/g,function(s,a){return s.length>1&&t.push(a),` +`);var h=c-(d+this.indent),p=i.type===Se.SEQ_ITEM&&i.context.atLineStart;if(o[c]!=="#"&&!Qe.nextNodeIsIndented(o[c],h,!p))break;this.atLineStart=!0,this.lineStart=d,a=!1,n=c}else if(u===ni.COMMENT){var m=Qe.endOfLine(o,n+1);s.push(new Er(n,m)),n=m}else{var v=Qe.endOfIdentifier(o,n+1);u===ni.TAG&&o[v]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(o.slice(n+1,v+13))&&(v=Qe.endOfIdentifier(o,v+5)),s.push(new Er(n,v)),a=!0,n=Qe.endOfWhiteSpace(o,v)}u=o[n]}a&&u===":"&&Qe.atBlank(o,n+1,!0)&&(n-=1);var y=e.parseType(o,n,r);return{props:s,type:y,valueStart:n}}}],[{key:"parseType",value:function(n,r,i){switch(n[r]){case"*":return Se.ALIAS;case">":return Se.BLOCK_FOLDED;case"|":return Se.BLOCK_LITERAL;case"{":return Se.FLOW_MAP;case"[":return Se.FLOW_SEQ;case"?":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_KEY:Se.PLAIN;case":":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_VALUE:Se.PLAIN;case"-":return!i&&Qe.atBlank(n,r+1,!0)?Se.SEQ_ITEM:Se.PLAIN;case'"':return Se.QUOTE_DOUBLE;case"'":return Se.QUOTE_SINGLE;default:return Se.PLAIN}}}]),e}();function P6(e){var t=[];e.indexOf("\r")!==-1&&(e=e.replace(/\r\n?/g,function(s,a){return s.length>1&&t.push(a),` `}));var n=[],r=0;do{var i=new CPe,o=new MPe({src:e});r=i.parse(o,r),n.push(i)}while(r=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var s=[];s[o]=r,r=s}else{var a={};Object.defineProperty(a,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=a}}return e.createNode(r,!1)}var a1=function(t){return t==null||Vs(t)==="object"&&t[Symbol.iterator]().next().done},Zi=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),ho(sa(i),"items",[]),i.schema=r,i}return Yn(n,[{key:"addIn",value:function(i,o){if(a1(i))this.add(o);else{var s=Lb(i),a=s[0],u=s.slice(1),c=this.get(a,!0);if(c instanceof n)c.addIn(u,o);else if(c===void 0&&this.schema)this.set(a,JW(this.schema,u,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(u))}}},{key:"deleteIn",value:function(i){var o=Lb(i),s=o[0],a=o.slice(1);if(a.length===0)return this.delete(s);var u=this.get(s,!0);if(u instanceof n)return u.deleteIn(a);throw new Error("Expected YAML collection at ".concat(s,". Remaining path: ").concat(a))}},{key:"getIn",value:function(i,o){var s=Lb(i),a=s[0],u=s.slice(1),c=this.get(a,!0);return u.length===0?!o&&c instanceof jn?c.value:c:c instanceof n?c.getIn(u,o):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every(function(i){if(!i||i.type!=="PAIR")return!1;var o=i.value;return o==null||o instanceof jn&&o.value==null&&!o.commentBefore&&!o.comment&&!o.tag})}},{key:"hasIn",value:function(i){var o=Lb(i),s=o[0],a=o.slice(1);if(a.length===0)return this.has(s);var u=this.get(s,!0);return u instanceof n?u.hasIn(a):!1}},{key:"setIn",value:function(i,o){var s=Lb(i),a=s[0],u=s.slice(1);if(u.length===0)this.set(a,o);else{var c=this.get(a,!0);if(c instanceof n)c.setIn(u,o);else if(c===void 0&&this.schema)this.set(a,JW(this.schema,u,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(u))}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(i,o,s,a){var u=this,c=o.blockItem,d=o.flowChars,h=o.isMap,p=o.itemIndent,m=i,v=m.indent,y=m.indentStep,S=m.stringify,w=this.type===Se.FLOW_MAP||this.type===Se.FLOW_SEQ||i.inFlow;w&&(p+=y);var b=h&&this.hasAllNullValues();i=Object.assign({},i,{allNullValues:b,indent:p,inFlow:w,type:null});var x=!1,E=!1,A=this.items.reduce(function(G,W,K){var q;W&&(!x&&W.spaceBefore&&G.push({type:"comment",str:""}),W.commentBefore&&W.commentBefore.match(/^.*$/gm).forEach(function(re){G.push({type:"comment",str:"#".concat(re)})}),W.comment&&(q=W.comment),w&&(!x&&W.spaceBefore||W.commentBefore||W.comment||W.key&&(W.key.commentBefore||W.key.comment)||W.value&&(W.value.commentBefore||W.value.comment))&&(E=!0)),x=!1;var Q=S(W,i,function(){return q=null},function(){return x=!0});return w&&!E&&Q.includes(` -`)&&(E=!0),w&&Kn.maxFlowStringSingleLineLength){I=R;var N=ir(L),H;try{for(N.s();!(H=N.n()).done;){var V=H.value;I+=V?` +`)+n.replace(/^/gm,"".concat(t||"","#")):e}var Ko=function e(){xn(this,e)};function _l(e,t,n){if(Array.isArray(e))return e.map(function(o,s){return _l(o,String(s),n)});if(e&&typeof e.toJSON=="function"){var r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=function(o){r.res=o,delete n.onCreate});var i=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(i),i}return(!n||!n.keep)&&typeof e=="bigint"?Number(e):e}var jn=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),i.value=r,i}return Yn(n,[{key:"toJSON",value:function(i,o){return o&&o.keep?this.value:_l(this.value,i,o)}},{key:"toString",value:function(){return String(this.value)}}]),n}(Ko);function ZW(e,t,n){for(var r=n,i=t.length-1;i>=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var s=[];s[o]=r,r=s}else{var a={};Object.defineProperty(a,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=a}}return e.createNode(r,!1)}var a1=function(t){return t==null||Vs(t)==="object"&&t[Symbol.iterator]().next().done},Zi=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),ho(sa(i),"items",[]),i.schema=r,i}return Yn(n,[{key:"addIn",value:function(i,o){if(a1(i))this.add(o);else{var s=Db(i),a=s[0],u=s.slice(1),c=this.get(a,!0);if(c instanceof n)c.addIn(u,o);else if(c===void 0&&this.schema)this.set(a,ZW(this.schema,u,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(u))}}},{key:"deleteIn",value:function(i){var o=Db(i),s=o[0],a=o.slice(1);if(a.length===0)return this.delete(s);var u=this.get(s,!0);if(u instanceof n)return u.deleteIn(a);throw new Error("Expected YAML collection at ".concat(s,". Remaining path: ").concat(a))}},{key:"getIn",value:function(i,o){var s=Db(i),a=s[0],u=s.slice(1),c=this.get(a,!0);return u.length===0?!o&&c instanceof jn?c.value:c:c instanceof n?c.getIn(u,o):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every(function(i){if(!i||i.type!=="PAIR")return!1;var o=i.value;return o==null||o instanceof jn&&o.value==null&&!o.commentBefore&&!o.comment&&!o.tag})}},{key:"hasIn",value:function(i){var o=Db(i),s=o[0],a=o.slice(1);if(a.length===0)return this.has(s);var u=this.get(s,!0);return u instanceof n?u.hasIn(a):!1}},{key:"setIn",value:function(i,o){var s=Db(i),a=s[0],u=s.slice(1);if(u.length===0)this.set(a,o);else{var c=this.get(a,!0);if(c instanceof n)c.setIn(u,o);else if(c===void 0&&this.schema)this.set(a,ZW(this.schema,u,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(u))}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(i,o,s,a){var u=this,c=o.blockItem,d=o.flowChars,h=o.isMap,p=o.itemIndent,m=i,v=m.indent,y=m.indentStep,S=m.stringify,w=this.type===Se.FLOW_MAP||this.type===Se.FLOW_SEQ||i.inFlow;w&&(p+=y);var b=h&&this.hasAllNullValues();i=Object.assign({},i,{allNullValues:b,indent:p,inFlow:w,type:null});var x=!1,E=!1,A=this.items.reduce(function(G,W,K){var q;W&&(!x&&W.spaceBefore&&G.push({type:"comment",str:""}),W.commentBefore&&W.commentBefore.match(/^.*$/gm).forEach(function(re){G.push({type:"comment",str:"#".concat(re)})}),W.comment&&(q=W.comment),w&&(!x&&W.spaceBefore||W.commentBefore||W.comment||W.key&&(W.key.commentBefore||W.key.comment)||W.value&&(W.value.commentBefore||W.value.comment))&&(E=!0)),x=!1;var Q=S(W,i,function(){return q=null},function(){return x=!0});return w&&!E&&Q.includes(` +`)&&(E=!0),w&&Kn.maxFlowStringSingleLineLength){I=R;var N=ir(D),H;try{for(N.s();!(H=N.n()).done;){var V=H.value;I+=V?` `.concat(y).concat(v).concat(V):` `}}catch(G){N.e(G)}finally{N.f()}I+=` -`.concat(v).concat(M)}else I="".concat(R," ").concat(L.join(" ")," ").concat(M)}else{var U=A.map(c);I=U.shift();var D=ir(U),F;try{for(D.s();!(F=D.n()).done;){var z=F.value;I+=z?` +`.concat(v).concat(M)}else I="".concat(R," ").concat(D.join(" ")," ").concat(M)}else{var U=A.map(c);I=U.shift();var L=ir(U),F;try{for(L.s();!(F=L.n()).done;){var z=F.value;I+=z?` `.concat(v).concat(z):` -`}}catch(G){D.e(G)}finally{D.f()}}return this.comment?(I+=` -`+this.comment.replace(/^/gm,"".concat(v,"#")),s&&s()):x&&a&&a(),I}}]),n}(Ko);ho(Zi,"maxFlowStringSingleLineLength",60);function H_(e){var t=e instanceof jn?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}var iu=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i){this.items.push(i)}},{key:"delete",value:function(i){var o=H_(i);if(typeof o!="number")return!1;var s=this.items.splice(o,1);return s.length>0}},{key:"get",value:function(i,o){var s=H_(i);if(typeof s=="number"){var a=this.items[s];return!o&&a instanceof jn?a.value:a}}},{key:"has",value:function(i){var o=H_(i);return typeof o=="number"&&o1&&arguments[1]!==void 0?arguments[1]:null;return xn(this,n),i=t.call(this),i.key=r,i.value=o,i.type=n.Type.PAIR,i}return Yn(n,[{key:"commentBefore",get:function(){return this.key instanceof Ko?this.key.commentBefore:void 0},set:function(i){if(this.key==null&&(this.key=new jn(null)),this.key instanceof Ko)this.key.commentBefore=i;else{var o="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(o)}}},{key:"addToJSMap",value:function(i,o){var s=_l(this.key,"",i);if(o instanceof Map){var a=_l(this.value,s,i);o.set(s,a)}else if(o instanceof Set)o.add(s);else{var u=DPe(this.key,s,i),c=_l(this.value,u,i);u in o?Object.defineProperty(o,u,{value:c,writable:!0,enumerable:!0,configurable:!0}):o[u]=c}return o}},{key:"toJSON",value:function(i,o){var s=o&&o.mapAsMap?new Map:{};return this.addToJSMap(o,s)}},{key:"toString",value:function(i,o,s){if(!i||!i.doc)return JSON.stringify(this);var a=i.doc.options,u=a.indent,c=a.indentSeq,d=a.simpleKeys,h=this.key,p=this.value,m=h instanceof Ko&&h.comment;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(h instanceof Zi){var v="With simple keys, collection cannot be used as a key value";throw new Error(v)}}var y=!d&&(!h||m||(h instanceof Ko?h instanceof Zi||h.type===Se.BLOCK_FOLDED||h.type===Se.BLOCK_LITERAL:Vs(h)==="object")),S=i,w=S.doc,b=S.indent,x=S.indentStep,E=S.stringify;i=Object.assign({},i,{implicitKey:!y,indent:b+x});var A=!1,I=E(h,i,function(){return m=null},function(){return A=!0});if(I=rm(I,i.indent,m),!y&&I.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.allNullValues&&!d)return this.comment?(I=rm(I,i.indent,this.comment),o&&o()):A&&!m&&s&&s(),i.inFlow&&!y?I:"? ".concat(I);I=y?"? ".concat(I,` +`}}catch(G){L.e(G)}finally{L.f()}}return this.comment?(I+=` +`+this.comment.replace(/^/gm,"".concat(v,"#")),s&&s()):x&&a&&a(),I}}]),n}(Ko);ho(Zi,"maxFlowStringSingleLineLength",60);function W_(e){var t=e instanceof jn?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}var iu=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i){this.items.push(i)}},{key:"delete",value:function(i){var o=W_(i);if(typeof o!="number")return!1;var s=this.items.splice(o,1);return s.length>0}},{key:"get",value:function(i,o){var s=W_(i);if(typeof s=="number"){var a=this.items[s];return!o&&a instanceof jn?a.value:a}}},{key:"has",value:function(i){var o=W_(i);return typeof o=="number"&&o1&&arguments[1]!==void 0?arguments[1]:null;return xn(this,n),i=t.call(this),i.key=r,i.value=o,i.type=n.Type.PAIR,i}return Yn(n,[{key:"commentBefore",get:function(){return this.key instanceof Ko?this.key.commentBefore:void 0},set:function(i){if(this.key==null&&(this.key=new jn(null)),this.key instanceof Ko)this.key.commentBefore=i;else{var o="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(o)}}},{key:"addToJSMap",value:function(i,o){var s=_l(this.key,"",i);if(o instanceof Map){var a=_l(this.value,s,i);o.set(s,a)}else if(o instanceof Set)o.add(s);else{var u=LPe(this.key,s,i),c=_l(this.value,u,i);u in o?Object.defineProperty(o,u,{value:c,writable:!0,enumerable:!0,configurable:!0}):o[u]=c}return o}},{key:"toJSON",value:function(i,o){var s=o&&o.mapAsMap?new Map:{};return this.addToJSMap(o,s)}},{key:"toString",value:function(i,o,s){if(!i||!i.doc)return JSON.stringify(this);var a=i.doc.options,u=a.indent,c=a.indentSeq,d=a.simpleKeys,h=this.key,p=this.value,m=h instanceof Ko&&h.comment;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(h instanceof Zi){var v="With simple keys, collection cannot be used as a key value";throw new Error(v)}}var y=!d&&(!h||m||(h instanceof Ko?h instanceof Zi||h.type===Se.BLOCK_FOLDED||h.type===Se.BLOCK_LITERAL:Vs(h)==="object")),S=i,w=S.doc,b=S.indent,x=S.indentStep,E=S.stringify;i=Object.assign({},i,{implicitKey:!y,indent:b+x});var A=!1,I=E(h,i,function(){return m=null},function(){return A=!0});if(I=rm(I,i.indent,m),!y&&I.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.allNullValues&&!d)return this.comment?(I=rm(I,i.indent,this.comment),o&&o()):A&&!m&&s&&s(),i.inFlow&&!y?I:"? ".concat(I);I=y?"? ".concat(I,` `).concat(b,":"):"".concat(I,":"),this.comment&&(I=rm(I,i.indent,this.comment),o&&o());var R="",M=null;if(p instanceof Ko){if(p.spaceBefore&&(R=` -`),p.commentBefore){var L=p.commentBefore.replace(/^/gm,"".concat(i.indent,"#"));R+=` -`.concat(L)}M=p.comment}else p&&Vs(p)==="object"&&(p=w.schema.createNode(p,!0));i.implicitKey=!1,!y&&!this.comment&&p instanceof jn&&(i.indentAtStart=I.length+1),A=!1,!c&&u>=2&&!i.inFlow&&!y&&p instanceof iu&&p.type!==Se.FLOW_SEQ&&!p.tag&&!w.anchors.getName(p)&&(i.indent=i.indent.substr(2));var N=E(p,i,function(){return M=null},function(){return A=!0}),H=" ";if(R||this.comment)H="".concat(R,` +`),p.commentBefore){var D=p.commentBefore.replace(/^/gm,"".concat(i.indent,"#"));R+=` +`.concat(D)}M=p.comment}else p&&Vs(p)==="object"&&(p=w.schema.createNode(p,!0));i.implicitKey=!1,!y&&!this.comment&&p instanceof jn&&(i.indentAtStart=I.length+1),A=!1,!c&&u>=2&&!i.inFlow&&!y&&p instanceof iu&&p.type!==Se.FLOW_SEQ&&!p.tag&&!w.anchors.getName(p)&&(i.indent=i.indent.substr(2));var N=E(p,i,function(){return M=null},function(){return A=!0}),H=" ";if(R||this.comment)H="".concat(R,` `).concat(i.indent);else if(!y&&p instanceof Zi){var V=N[0]==="["||N[0]==="{";(!V||N.includes(` `))&&(H=` `.concat(i.indent))}else N[0]===` -`&&(H="");return A&&!M&&s&&s(),rm(I+H+N,i.indent,M)}}]),n}(Ko);ho(vn,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var LPe=function e(t,n){if(t instanceof jc){var r=n.get(t.source);return r.count*r.aliasCount}else if(t instanceof Zi){var i=0,o=ir(t.items),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,u=e(a,n);u>i&&(i=u)}}catch(h){o.e(h)}finally{o.f()}return i}else if(t instanceof vn){var c=e(t.key,n),d=e(t.value,n);return Math.max(c,d)}return 1},jc=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),i.source=r,i.type=Se.ALIAS,i}return Yn(n,[{key:"tag",set:function(i){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(i,o){if(!o)return _l(this.source,i,o);var s=o.anchors,a=o.maxAliasCount,u=s.get(this.source);if(!u||u.res===void 0){var c="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new $x(this.cstNode,c):new ReferenceError(c)}if(a>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=LPe(this.source,s)),u.count*u.aliasCount>a)){var d="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new $x(this.cstNode,d):new ReferenceError(d)}return u.res}},{key:"toString",value:function(i){return n.stringify(this,i)}}],[{key:"stringify",value:function(i,o){var s=i.range,a=i.source,u=o.anchors,c=o.doc,d=o.implicitKey,h=o.inStringifyKey,p=Object.keys(u).find(function(v){return u[v]===a});if(!p&&h&&(p=c.anchors.getName(a)||c.anchors.newName()),p)return"*".concat(p).concat(d?" ":"");var m=c.anchors.getName(a)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(m," [").concat(s,"]"))}}]),n}(Ko);ho(jc,"default",!0);function pp(e,t){var n=t instanceof jn?t.value:t,r=ir(e),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o instanceof vn&&(o.key===t||o.key===n||o.key&&o.key.value===n))return o}}catch(s){r.e(s)}finally{r.f()}}var Qo=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i,o){i?i instanceof vn||(i=new vn(i.key||i,i.value)):i=new vn(i);var s=pp(this.items,i.key),a=this.schema&&this.schema.sortMapEntries;if(s)if(o)s.value=i.value;else throw new Error("Key ".concat(i.key," already set"));else if(a){var u=this.items.findIndex(function(c){return a(i,c)<0});u===-1?this.items.push(i):this.items.splice(u,0,i)}else this.items.push(i)}},{key:"delete",value:function(i){var o=pp(this.items,i);if(!o)return!1;var s=this.items.splice(this.items.indexOf(o),1);return s.length>0}},{key:"get",value:function(i,o){var s=pp(this.items,i),a=s&&s.value;return!o&&a instanceof jn?a.value:a}},{key:"has",value:function(i){return!!pp(this.items,i)}},{key:"set",value:function(i,o){this.add(new vn(i,o),!0)}},{key:"toJSON",value:function(i,o,s){var a=s?new s:o&&o.mapAsMap?new Map:{};o&&o.onCreate&&o.onCreate(a);var u=ir(this.items),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;d.addToJSMap(o,a)}}catch(h){u.e(h)}finally{u.f()}return a}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);var a=ir(this.items),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;if(!(c instanceof vn))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(c)," instead"))}}catch(d){a.e(d)}finally{a.f()}return as(ro(n.prototype),"toString",this).call(this,i,{blockItem:function(h){return h.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:i.indent||""},o,s)}}]),n}(Zi),cee="<<",fee=function(e){sr(n,e);var t=ar(n);function n(r){var i;if(xn(this,n),r instanceof vn){var o=r.value;o instanceof iu||(o=new iu,o.items.push(r.value),o.range=r.value.range),i=t.call(this,r.key,o),i.range=r.range}else i=t.call(this,new jn(cee),new iu);return i.type=vn.Type.MERGE_PAIR,iee(i)}return Yn(n,[{key:"addToJSMap",value:function(i,o){var s=ir(this.value.items),a;try{for(s.s();!(a=s.n()).done;){var u=a.value.source;if(!(u instanceof Qo))throw new Error("Merge sources must be maps");var c=u.toJSON(null,i,Map),d=ir(c),h;try{for(d.s();!(h=d.n()).done;){var p=Bw(h.value,2),m=p[0],v=p[1];o instanceof Map?o.has(m)||o.set(m,v):o instanceof Set?o.add(m):Object.prototype.hasOwnProperty.call(o,m)||Object.defineProperty(o,m,{value:v,writable:!0,enumerable:!0,configurable:!0})}}catch(y){d.e(y)}finally{d.f()}}}catch(y){s.e(y)}finally{s.f()}return o}},{key:"toString",value:function(i,o){var s=this.value;if(s.items.length>1)return as(ro(n.prototype),"toString",this).call(this,i,o);this.value=s.items[0];var a=as(ro(n.prototype),"toString",this).call(this,i,o);return this.value=s,a}}]),n}(vn),H1={defaultType:Se.BLOCK_LITERAL,lineWidth:76},Mc={trueStr:"true",falseStr:"false"},od={asBigInt:!1},Jm={nullStr:"null"},Hc={defaultType:Se.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function P6(e,t,n){var r=ir(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.format,a=o.test,u=o.resolve;if(a){var c=e.match(a);if(c){var d=u.apply(null,c);return d instanceof jn||(d=new jn(d)),s&&(d.format=s),d}}}}catch(h){r.e(h)}finally{r.f()}return n&&(e=n(e)),new jn(e)}var dee="flow",S3="block",cE="quoted",ZW=function(t,n){for(var r=t[n+1];r===" "||r===" ";){do r=t[n+=1];while(r&&r!==` -`);r=t[n+1]}return n};function oI(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,s=o===void 0?80:o,a=r.minContentWidth,u=a===void 0?20:a,c=r.onFold,d=r.onOverflow;if(!s||s<0)return e;var h=Math.max(1+u,1+s-t.length);if(e.length<=h)return e;var p=[],m={},v=s-t.length;typeof i=="number"&&(i>s-Math.max(2,u)?p.push(0):v=s-i);var y=void 0,S=void 0,w=!1,b=-1,x=-1,E=-1;n===S3&&(b=ZW(e,b),b!==-1&&(v=b+h));for(var A;A=e[b+=1];){if(n===cE&&A==="\\"){switch(x=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}E=b}if(A===` -`)n===S3&&(b=ZW(e,b)),v=b+h,y=void 0;else{if(A===" "&&S&&S!==" "&&S!==` +`&&(H="");return A&&!M&&s&&s(),rm(I+H+N,i.indent,M)}}]),n}(Ko);ho(vn,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var DPe=function e(t,n){if(t instanceof jc){var r=n.get(t.source);return r.count*r.aliasCount}else if(t instanceof Zi){var i=0,o=ir(t.items),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,u=e(a,n);u>i&&(i=u)}}catch(h){o.e(h)}finally{o.f()}return i}else if(t instanceof vn){var c=e(t.key,n),d=e(t.value,n);return Math.max(c,d)}return 1},jc=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),i.source=r,i.type=Se.ALIAS,i}return Yn(n,[{key:"tag",set:function(i){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(i,o){if(!o)return _l(this.source,i,o);var s=o.anchors,a=o.maxAliasCount,u=s.get(this.source);if(!u||u.res===void 0){var c="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new $x(this.cstNode,c):new ReferenceError(c)}if(a>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=DPe(this.source,s)),u.count*u.aliasCount>a)){var d="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new $x(this.cstNode,d):new ReferenceError(d)}return u.res}},{key:"toString",value:function(i){return n.stringify(this,i)}}],[{key:"stringify",value:function(i,o){var s=i.range,a=i.source,u=o.anchors,c=o.doc,d=o.implicitKey,h=o.inStringifyKey,p=Object.keys(u).find(function(v){return u[v]===a});if(!p&&h&&(p=c.anchors.getName(a)||c.anchors.newName()),p)return"*".concat(p).concat(d?" ":"");var m=c.anchors.getName(a)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(m," [").concat(s,"]"))}}]),n}(Ko);ho(jc,"default",!0);function pp(e,t){var n=t instanceof jn?t.value:t,r=ir(e),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o instanceof vn&&(o.key===t||o.key===n||o.key&&o.key.value===n))return o}}catch(s){r.e(s)}finally{r.f()}}var Qo=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i,o){i?i instanceof vn||(i=new vn(i.key||i,i.value)):i=new vn(i);var s=pp(this.items,i.key),a=this.schema&&this.schema.sortMapEntries;if(s)if(o)s.value=i.value;else throw new Error("Key ".concat(i.key," already set"));else if(a){var u=this.items.findIndex(function(c){return a(i,c)<0});u===-1?this.items.push(i):this.items.splice(u,0,i)}else this.items.push(i)}},{key:"delete",value:function(i){var o=pp(this.items,i);if(!o)return!1;var s=this.items.splice(this.items.indexOf(o),1);return s.length>0}},{key:"get",value:function(i,o){var s=pp(this.items,i),a=s&&s.value;return!o&&a instanceof jn?a.value:a}},{key:"has",value:function(i){return!!pp(this.items,i)}},{key:"set",value:function(i,o){this.add(new vn(i,o),!0)}},{key:"toJSON",value:function(i,o,s){var a=s?new s:o&&o.mapAsMap?new Map:{};o&&o.onCreate&&o.onCreate(a);var u=ir(this.items),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;d.addToJSMap(o,a)}}catch(h){u.e(h)}finally{u.f()}return a}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);var a=ir(this.items),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;if(!(c instanceof vn))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(c)," instead"))}}catch(d){a.e(d)}finally{a.f()}return as(ro(n.prototype),"toString",this).call(this,i,{blockItem:function(h){return h.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:i.indent||""},o,s)}}]),n}(Zi),fee="<<",dee=function(e){sr(n,e);var t=ar(n);function n(r){var i;if(xn(this,n),r instanceof vn){var o=r.value;o instanceof iu||(o=new iu,o.items.push(r.value),o.range=r.value.range),i=t.call(this,r.key,o),i.range=r.range}else i=t.call(this,new jn(fee),new iu);return i.type=vn.Type.MERGE_PAIR,oee(i)}return Yn(n,[{key:"addToJSMap",value:function(i,o){var s=ir(this.value.items),a;try{for(s.s();!(a=s.n()).done;){var u=a.value.source;if(!(u instanceof Qo))throw new Error("Merge sources must be maps");var c=u.toJSON(null,i,Map),d=ir(c),h;try{for(d.s();!(h=d.n()).done;){var p=$w(h.value,2),m=p[0],v=p[1];o instanceof Map?o.has(m)||o.set(m,v):o instanceof Set?o.add(m):Object.prototype.hasOwnProperty.call(o,m)||Object.defineProperty(o,m,{value:v,writable:!0,enumerable:!0,configurable:!0})}}catch(y){d.e(y)}finally{d.f()}}}catch(y){s.e(y)}finally{s.f()}return o}},{key:"toString",value:function(i,o){var s=this.value;if(s.items.length>1)return as(ro(n.prototype),"toString",this).call(this,i,o);this.value=s.items[0];var a=as(ro(n.prototype),"toString",this).call(this,i,o);return this.value=s,a}}]),n}(vn),H1={defaultType:Se.BLOCK_LITERAL,lineWidth:76},Mc={trueStr:"true",falseStr:"false"},od={asBigInt:!1},Jm={nullStr:"null"},Hc={defaultType:Se.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function O6(e,t,n){var r=ir(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.format,a=o.test,u=o.resolve;if(a){var c=e.match(a);if(c){var d=u.apply(null,c);return d instanceof jn||(d=new jn(d)),s&&(d.format=s),d}}}}catch(h){r.e(h)}finally{r.f()}return n&&(e=n(e)),new jn(e)}var hee="flow",E3="block",fE="quoted",eG=function(t,n){for(var r=t[n+1];r===" "||r===" ";){do r=t[n+=1];while(r&&r!==` +`);r=t[n+1]}return n};function oI(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,s=o===void 0?80:o,a=r.minContentWidth,u=a===void 0?20:a,c=r.onFold,d=r.onOverflow;if(!s||s<0)return e;var h=Math.max(1+u,1+s-t.length);if(e.length<=h)return e;var p=[],m={},v=s-t.length;typeof i=="number"&&(i>s-Math.max(2,u)?p.push(0):v=s-i);var y=void 0,S=void 0,w=!1,b=-1,x=-1,E=-1;n===E3&&(b=eG(e,b),b!==-1&&(v=b+h));for(var A;A=e[b+=1];){if(n===fE&&A==="\\"){switch(x=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}E=b}if(A===` +`)n===E3&&(b=eG(e,b)),v=b+h,y=void 0;else{if(A===" "&&S&&S!==" "&&S!==` `&&S!==" "){var I=e[b+1];I&&I!==" "&&I!==` -`&&I!==" "&&(y=b)}if(b>=v)if(y)p.push(y),v=y+h,y=void 0;else if(n===cE){for(;S===" "||S===" ";)S=A,A=e[b+=1],w=!0;var R=b>E+1?b-2:x-1;if(m[R])return e;p.push(R),m[R]=!0,v=R+h,y=void 0}else w=!0}S=A}if(w&&d&&d(),p.length===0)return e;c&&c();for(var M=e.slice(0,p[0]),L=0;L=v)if(y)p.push(y),v=y+h,y=void 0;else if(n===fE){for(;S===" "||S===" ";)S=A,A=e[b+=1],w=!0;var R=b>E+1?b-2:x-1;if(m[R])return e;p.push(R),m[R]=!0,v=R+h,y=void 0}else w=!0}S=A}if(w&&d&&d(),p.length===0)return e;c&&c();for(var M=e.slice(0,p[0]),D=0;Dr)return!0;if(s=o+1,i-s<=r)return!1}return!0}function Ep(e,t){var n=t.implicitKey,r=Hc.doubleQuoted,i=r.jsonEncoding,o=r.minMultiLineLength,s=JSON.stringify(e);if(i)return s;for(var a=t.indent||(sI(e)?" ":""),u="",c=0,d=0,h=s[d];h;h=s[++d])if(h===" "&&s[d+1]==="\\"&&s[d+2]==="n"&&(u+=s.slice(c,d)+"\\ ",d+=1,c=d,h="\\"),h==="\\")switch(s[d+1]){case"u":{u+=s.slice(c,d);var p=s.substr(d+2,4);switch(p){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:p.substr(0,2)==="00"?u+="\\x"+p.substr(2):u+=s.substr(d,6)}d+=5,c=d+1}break;case"n":if(n||s[d+2]==='"'||s.length";if(!s)return d+` +`,d+=2;u+=a,s[d+2]===" "&&(u+="\\"),d+=1,c=d+1}break;default:d+=1}return u=c?u+s.slice(c):s,n?u:oI(u,a,fE,M6(t))}function pee(e,t){if(t.implicitKey){if(/\n/.test(e))return Ep(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return Ep(e,t);var n=t.indent||(sI(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$& +`.concat(n))+"'";return t.implicitKey?r:oI(r,n,hee,M6(t))}function dE(e,t,n,r){var i=e.comment,o=e.type,s=e.value;if(/\n[\t ]+$/.test(s)||/^\s*$/.test(s))return Ep(s,t);var a=t.indent||(t.forceBlockIndent||sI(s)?" ":""),u=a?"2":"1",c=o===Se.BLOCK_FOLDED?!1:o===Se.BLOCK_LITERAL?!0:!NPe(s,Hc.fold.lineWidth,a.length),d=c?"|":">";if(!s)return d+` `;var h="",p="";if(s=s.replace(/[\n\t ]*$/,function(v){var y=v.indexOf(` `);return y===-1?d+="-":(s===v||y!==v.length-1)&&(d+="+",r&&r()),p=v.replace(/\n$/,""),""}).replace(/^[\n ]*/,function(v){v.indexOf(" ")!==-1&&(d+=u);var y=v.match(/ +$/);return y?(h=v.slice(0,-y[0].length),y[0]):(h=v,"")}),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(a))),h&&(h=h.replace(/\n+/g,"$&".concat(a))),i&&(d+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!s)return"".concat(d).concat(u,` `).concat(a).concat(p);if(c)return s=s.replace(/\n+/g,"$&".concat(a)),"".concat(d,` `).concat(a).concat(h).concat(s).concat(p);s=s.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(a));var m=oI("".concat(h).concat(s).concat(p),a,S3,Hc.fold);return"".concat(d,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(a));var m=oI("".concat(h).concat(s).concat(p),a,E3,Hc.fold);return"".concat(d,` `).concat(a).concat(m)}function BPe(e,t,n,r){var i=e.comment,o=e.type,s=e.value,a=t.actualString,u=t.implicitKey,c=t.indent,d=t.inFlow;if(u&&/[\n[\]{},]/.test(s)||d&&/[[\]{},]/.test(s))return Ep(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return u||d||s.indexOf(` -`)===-1?s.indexOf('"')!==-1&&s.indexOf("'")===-1?hee(s,t):Ep(s,t):fE(e,t,n,r);if(!u&&!d&&o!==Se.PLAIN&&s.indexOf(` -`)!==-1)return fE(e,t,n,r);if(c===""&&sI(s))return t.forceBlockIndent=!0,fE(e,t,n,r);var h=s.replace(/\n+/g,`$& -`.concat(c));if(a){var p=t.doc.schema.tags,m=P6(h,p,p.scalarFallback).value;if(typeof m!="string")return Ep(s,t)}var v=u?h:oI(h,c,dee,O6(t));return i&&!d&&(v.indexOf(` +`)===-1?s.indexOf('"')!==-1&&s.indexOf("'")===-1?pee(s,t):Ep(s,t):dE(e,t,n,r);if(!u&&!d&&o!==Se.PLAIN&&s.indexOf(` +`)!==-1)return dE(e,t,n,r);if(c===""&&sI(s))return t.forceBlockIndent=!0,dE(e,t,n,r);var h=s.replace(/\n+/g,`$& +`.concat(c));if(a){var p=t.doc.schema.tags,m=O6(h,p,p.scalarFallback).value;if(typeof m!="string")return Ep(s,t)}var v=u?h:oI(h,c,hee,M6(t));return i&&!d&&(v.indexOf(` `)!==-1||i.indexOf(` -`)!==-1)?(n&&n(),kPe(v,c,i)):v}function M6(e,t,n,r){var i=Hc.defaultType,o=t.implicitKey,s=t.inFlow,a=e,u=a.type,c=a.value;typeof c!="string"&&(c=String(c),e=Object.assign({},e,{value:c}));var d=function(m){switch(m){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return fE(e,t,n,r);case Se.QUOTE_DOUBLE:return Ep(c,t);case Se.QUOTE_SINGLE:return hee(c,t);case Se.PLAIN:return BPe(e,t,n,r);default:return null}};(u!==Se.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(o||s)&&(u===Se.BLOCK_FOLDED||u===Se.BLOCK_LITERAL))&&(u=Se.QUOTE_DOUBLE);var h=d(u);if(h===null&&(h=d(i),h===null))throw new Error("Unsupported default string type ".concat(i));return h}function kc(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if(typeof i=="bigint")return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){var s=o.indexOf(".");s<0&&(s=o.length,o+=".");for(var a=n-(o.length-s-1);a-- >0;)o+="0"}return o}function pee(e,t){var n,r;switch(t.type){case Se.FLOW_MAP:n="}",r="flow map";break;case Se.FLOW_SEQ:n="]",r="flow sequence";break;default:e.push(new Qt(t,"Not a flow collection!?"));return}for(var i,o=t.items.length-1;o>=0;--o){var s=t.items[o];if(!s||s.type!==Se.COMMENT){i=s;break}}if(i&&i.char!==n){var a="Expected ".concat(r," to end with ").concat(n),u;typeof i.offset=="number"?(u=new Qt(t,a),u.offset=i.offset+1):(u=new Qt(i,a),i.range&&i.range.end&&(u.offset=i.range.end-i.range.start)),e.push(u)}}function gee(e,t){var n=t.context.src[t.range.start-1];if(n!==` -`&&n!==" "&&n!==" "){var r="Comments must be separated from other tokens by white space characters";e.push(new Qt(t,r))}}function mee(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Qt(e,'The "'.concat(r,'" key is too long'))}function vee(e,t){var n=ir(t),r;try{for(n.s();!(r=n.n()).done;){var i=r.value,o=i.afterKey,s=i.before,a=i.comment,u=e.items[s];u?(o&&u.value&&(u=u.value),a===void 0?(o||!u.commentBefore)&&(u.spaceBefore=!0):u.commentBefore?u.commentBefore+=` +`)!==-1)?(n&&n(),kPe(v,c,i)):v}function k6(e,t,n,r){var i=Hc.defaultType,o=t.implicitKey,s=t.inFlow,a=e,u=a.type,c=a.value;typeof c!="string"&&(c=String(c),e=Object.assign({},e,{value:c}));var d=function(m){switch(m){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return dE(e,t,n,r);case Se.QUOTE_DOUBLE:return Ep(c,t);case Se.QUOTE_SINGLE:return pee(c,t);case Se.PLAIN:return BPe(e,t,n,r);default:return null}};(u!==Se.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(o||s)&&(u===Se.BLOCK_FOLDED||u===Se.BLOCK_LITERAL))&&(u=Se.QUOTE_DOUBLE);var h=d(u);if(h===null&&(h=d(i),h===null))throw new Error("Unsupported default string type ".concat(i));return h}function kc(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if(typeof i=="bigint")return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){var s=o.indexOf(".");s<0&&(s=o.length,o+=".");for(var a=n-(o.length-s-1);a-- >0;)o+="0"}return o}function gee(e,t){var n,r;switch(t.type){case Se.FLOW_MAP:n="}",r="flow map";break;case Se.FLOW_SEQ:n="]",r="flow sequence";break;default:e.push(new Qt(t,"Not a flow collection!?"));return}for(var i,o=t.items.length-1;o>=0;--o){var s=t.items[o];if(!s||s.type!==Se.COMMENT){i=s;break}}if(i&&i.char!==n){var a="Expected ".concat(r," to end with ").concat(n),u;typeof i.offset=="number"?(u=new Qt(t,a),u.offset=i.offset+1):(u=new Qt(i,a),i.range&&i.range.end&&(u.offset=i.range.end-i.range.start)),e.push(u)}}function mee(e,t){var n=t.context.src[t.range.start-1];if(n!==` +`&&n!==" "&&n!==" "){var r="Comments must be separated from other tokens by white space characters";e.push(new Qt(t,r))}}function vee(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Qt(e,'The "'.concat(r,'" key is too long'))}function yee(e,t){var n=ir(t),r;try{for(n.s();!(r=n.n()).done;){var i=r.value,o=i.afterKey,s=i.before,a=i.comment,u=e.items[s];u?(o&&u.value&&(u=u.value),a===void 0?(o||!u.commentBefore)&&(u.spaceBefore=!0):u.commentBefore?u.commentBefore+=` `+a:u.commentBefore=a):a!==void 0&&(e.comment?e.comment+=` -`+a:e.comment=a)}}catch(c){n.e(c)}finally{n.f()}}function $w(e,t){var n=t.strValue;return n?typeof n=="string"?n:(n.errors.forEach(function(r){r.source||(r.source=t),e.errors.push(r)}),n.str):""}function $Pe(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find(function(u){return u.handle===r});if(!o){var s=e.getDefaults().tagPrefixes;if(s&&(o=s.find(function(u){return u.handle===r})),!o)throw new Qt(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new Qt(t,"The ".concat(r," tag has no suffix."));if(r==="!"&&(e.version||e.options.version)==="1.0"){if(i[0]==="^")return e.warnings.push(new Tv(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var a=i.match(/^([a-z0-9-]+)\/(.*)/i);return a?"tag:".concat(a[1],".yaml.org,2002:").concat(a[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}function FPe(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,s=n.suffix,a=n.verbatim;if(a){if(a!=="!"&&a!=="!!")return a;var u="Verbatim tags aren't resolved, so ".concat(a," is invalid.");e.errors.push(new Qt(t,u))}else if(o==="!"&&!s)i=!0;else try{return $Pe(e,t)}catch(c){e.errors.push(c)}}switch(r){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:case Se.QUOTE_DOUBLE:case Se.QUOTE_SINGLE:return Of.STR;case Se.FLOW_MAP:case Se.MAP:return Of.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Of.SEQ;case Se.PLAIN:return i?Of.STR:null;default:return null}}function eG(e,t,n){var r=e.schema.tags,i=[],o=ir(r),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.tag===n)if(a.test)i.push(a);else{var u=a.resolve(e,t);return u instanceof Zi?u:new jn(u)}}}catch(d){o.e(d)}finally{o.f()}var c=$w(e,t);return typeof c=="string"&&i.length>0?P6(c,i,r.scalarFallback):null}function zPe(e){var t=e.type;switch(t){case Se.FLOW_MAP:case Se.MAP:return Of.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Of.SEQ;default:return Of.STR}}function UPe(e,t,n){try{var r=eG(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(u){return u.source||(u.source=t),e.errors.push(u),null}try{var i=zPe(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new Tv(t,o));var s=eG(e,t,i);return s.tag=n,s}catch(u){var a=new $x(t,u.message);return a.stack=u.stack,e.errors.push(a),null}}var jPe=function(t){if(!t)return!1;var n=t.type;return n===Se.MAP_KEY||n===Se.MAP_VALUE||n===Se.SEQ_ITEM};function HPe(e,t){var n={before:[],after:[]},r=!1,i=!1,o=jPe(t.context.parent)?t.context.parent.props.concat(t.props):t.props,s=ir(o),a;try{for(s.s();!(a=s.n()).done;){var u=a.value,c=u.start,d=u.end;switch(t.context.src[c]){case ni.COMMENT:{if(!t.commentHasRequiredWhitespace(c)){var h="Comments must be separated from other tokens by white space characters";e.push(new Qt(t,h))}var p=t.header,m=t.valueRange,v=m&&(c>m.start||p&&c>p.start)?n.after:n.before;v.push(t.context.src.slice(c+1,d));break}case ni.ANCHOR:if(r){var y="A node can have at most one anchor";e.push(new Qt(t,y))}r=!0;break;case ni.TAG:if(i){var S="A node can have at most one tag";e.push(new Qt(t,S))}i=!0;break}}}catch(w){s.e(w)}finally{s.f()}return{comments:n,hasAnchor:r,hasTag:i}}function WPe(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===Se.ALIAS){var o=t.rawValue,s=n.getNode(o);if(!s){var a="Aliased anchor not found: ".concat(o);return r.push(new $x(t,a)),null}var u=new jc(s);return n._cstAliases.push(u),u}var c=FPe(e,t);if(c)return UPe(e,t,c);if(t.type!==Se.PLAIN){var d="Failed to resolve ".concat(t.type," node here");return r.push(new mo(t,d)),null}try{var h=$w(e,t);return P6(h,i.tags,i.tags.scalarFallback)}catch(p){return p.source||(p.source=t),r.push(p),null}}function Jf(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=HPe(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var s=e.anchors,a=t.anchor,u=s.getNode(a);u&&(s.map[s.newName(a)]=u),s.map[a]=t}if(t.type===Se.ALIAS&&(i||o)){var c="An alias node must not specify any properties";e.errors.push(new Qt(t,c))}var d=WPe(e,t);if(d){d.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(d.cstNode=t),e.options.keepNodeTypes&&(d.type=t.type);var h=r.before.join(` +`+a:e.comment=a)}}catch(c){n.e(c)}finally{n.f()}}function Fw(e,t){var n=t.strValue;return n?typeof n=="string"?n:(n.errors.forEach(function(r){r.source||(r.source=t),e.errors.push(r)}),n.str):""}function $Pe(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find(function(u){return u.handle===r});if(!o){var s=e.getDefaults().tagPrefixes;if(s&&(o=s.find(function(u){return u.handle===r})),!o)throw new Qt(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new Qt(t,"The ".concat(r," tag has no suffix."));if(r==="!"&&(e.version||e.options.version)==="1.0"){if(i[0]==="^")return e.warnings.push(new Tv(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var a=i.match(/^([a-z0-9-]+)\/(.*)/i);return a?"tag:".concat(a[1],".yaml.org,2002:").concat(a[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}function FPe(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,s=n.suffix,a=n.verbatim;if(a){if(a!=="!"&&a!=="!!")return a;var u="Verbatim tags aren't resolved, so ".concat(a," is invalid.");e.errors.push(new Qt(t,u))}else if(o==="!"&&!s)i=!0;else try{return $Pe(e,t)}catch(c){e.errors.push(c)}}switch(r){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:case Se.QUOTE_DOUBLE:case Se.QUOTE_SINGLE:return Of.STR;case Se.FLOW_MAP:case Se.MAP:return Of.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Of.SEQ;case Se.PLAIN:return i?Of.STR:null;default:return null}}function tG(e,t,n){var r=e.schema.tags,i=[],o=ir(r),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.tag===n)if(a.test)i.push(a);else{var u=a.resolve(e,t);return u instanceof Zi?u:new jn(u)}}}catch(d){o.e(d)}finally{o.f()}var c=Fw(e,t);return typeof c=="string"&&i.length>0?O6(c,i,r.scalarFallback):null}function zPe(e){var t=e.type;switch(t){case Se.FLOW_MAP:case Se.MAP:return Of.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Of.SEQ;default:return Of.STR}}function UPe(e,t,n){try{var r=tG(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(u){return u.source||(u.source=t),e.errors.push(u),null}try{var i=zPe(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new Tv(t,o));var s=tG(e,t,i);return s.tag=n,s}catch(u){var a=new $x(t,u.message);return a.stack=u.stack,e.errors.push(a),null}}var jPe=function(t){if(!t)return!1;var n=t.type;return n===Se.MAP_KEY||n===Se.MAP_VALUE||n===Se.SEQ_ITEM};function HPe(e,t){var n={before:[],after:[]},r=!1,i=!1,o=jPe(t.context.parent)?t.context.parent.props.concat(t.props):t.props,s=ir(o),a;try{for(s.s();!(a=s.n()).done;){var u=a.value,c=u.start,d=u.end;switch(t.context.src[c]){case ni.COMMENT:{if(!t.commentHasRequiredWhitespace(c)){var h="Comments must be separated from other tokens by white space characters";e.push(new Qt(t,h))}var p=t.header,m=t.valueRange,v=m&&(c>m.start||p&&c>p.start)?n.after:n.before;v.push(t.context.src.slice(c+1,d));break}case ni.ANCHOR:if(r){var y="A node can have at most one anchor";e.push(new Qt(t,y))}r=!0;break;case ni.TAG:if(i){var S="A node can have at most one tag";e.push(new Qt(t,S))}i=!0;break}}}catch(w){s.e(w)}finally{s.f()}return{comments:n,hasAnchor:r,hasTag:i}}function WPe(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===Se.ALIAS){var o=t.rawValue,s=n.getNode(o);if(!s){var a="Aliased anchor not found: ".concat(o);return r.push(new $x(t,a)),null}var u=new jc(s);return n._cstAliases.push(u),u}var c=FPe(e,t);if(c)return UPe(e,t,c);if(t.type!==Se.PLAIN){var d="Failed to resolve ".concat(t.type," node here");return r.push(new mo(t,d)),null}try{var h=Fw(e,t);return O6(h,i.tags,i.tags.scalarFallback)}catch(p){return p.source||(p.source=t),r.push(p),null}}function Jf(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=HPe(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var s=e.anchors,a=t.anchor,u=s.getNode(a);u&&(s.map[s.newName(a)]=u),s.map[a]=t}if(t.type===Se.ALIAS&&(i||o)){var c="An alias node must not specify any properties";e.errors.push(new Qt(t,c))}var d=WPe(e,t);if(d){d.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(d.cstNode=t),e.options.keepNodeTypes&&(d.type=t.type);var h=r.before.join(` `);h&&(d.commentBefore=d.commentBefore?"".concat(d.commentBefore,` `).concat(h):h);var p=r.after.join(` `);p&&(d.comment=d.comment?"".concat(d.comment,` -`).concat(p):p)}return t.resolved=d}function yee(e,t){if(t.type!==Se.MAP&&t.type!==Se.FLOW_MAP){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new mo(t,n)),null}var r=t.type===Se.FLOW_MAP?qPe(e,t):XPe(e,t),i=r.comments,o=r.items,s=new Qo;s.items=o,vee(s,i);for(var a=!1,u=0;ui.valueRange.start||o[a]!==ni.COMMENT)return!1;for(var u=r;u0){c=new lee(Se.PLAIN,[]),c.context={parent:a,src:a.context.src};var d=a.range.start+1;if(c.range={start:d,end:d},c.valueRange={start:d,end:d},typeof a.range.origStart=="number"){var h=a.range.origStart+1;c.range.origStart=c.range.origEnd=h,c.valueRange.origStart=c.valueRange.origEnd=h}}var p=new vn(i,Jf(e,c));VPe(a,p),r.push(p),i&&typeof o=="number"&&a.range.start>o+1024&&e.errors.push(mee(t,i)),i=void 0,o=null}break;default:i!==void 0&&r.push(new vn(i)),i=Jf(e,a),o=a.range.start,a.error&&e.errors.push(a.error);e:for(var m=s+1;;++m){var v=t.items[m];switch(v&&v.type){case Se.BLANK_LINE:case Se.COMMENT:continue e;case Se.MAP_VALUE:break e;default:{var y="Implicit map keys need to be followed by map values";e.errors.push(new Qt(a,y));break e}}}if(a.valueRangeContainsNewline){var S="Implicit map keys need to be on a single line";e.errors.push(new Qt(a,S))}}}return i!==void 0&&r.push(new vn(i)),{comments:n,items:r}}function qPe(e,t){for(var n=[],r=[],i=void 0,o=!1,s="{",a=0;as+1024&&e.errors.push(mee(t,o));for(var S=u.context.src,w=s;w1){var o="Each pair must have its own sequence indicator";throw new Qt(t,o)}var s=i.items[0]||new vn;i.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(i.commentBefore,` +`).concat(p):p)}return t.resolved=d}function bee(e,t){if(t.type!==Se.MAP&&t.type!==Se.FLOW_MAP){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new mo(t,n)),null}var r=t.type===Se.FLOW_MAP?qPe(e,t):XPe(e,t),i=r.comments,o=r.items,s=new Qo;s.items=o,yee(s,i);for(var a=!1,u=0;ui.valueRange.start||o[a]!==ni.COMMENT)return!1;for(var u=r;u0){c=new uee(Se.PLAIN,[]),c.context={parent:a,src:a.context.src};var d=a.range.start+1;if(c.range={start:d,end:d},c.valueRange={start:d,end:d},typeof a.range.origStart=="number"){var h=a.range.origStart+1;c.range.origStart=c.range.origEnd=h,c.valueRange.origStart=c.valueRange.origEnd=h}}var p=new vn(i,Jf(e,c));VPe(a,p),r.push(p),i&&typeof o=="number"&&a.range.start>o+1024&&e.errors.push(vee(t,i)),i=void 0,o=null}break;default:i!==void 0&&r.push(new vn(i)),i=Jf(e,a),o=a.range.start,a.error&&e.errors.push(a.error);e:for(var m=s+1;;++m){var v=t.items[m];switch(v&&v.type){case Se.BLANK_LINE:case Se.COMMENT:continue e;case Se.MAP_VALUE:break e;default:{var y="Implicit map keys need to be followed by map values";e.errors.push(new Qt(a,y));break e}}}if(a.valueRangeContainsNewline){var S="Implicit map keys need to be on a single line";e.errors.push(new Qt(a,S))}}}return i!==void 0&&r.push(new vn(i)),{comments:n,items:r}}function qPe(e,t){for(var n=[],r=[],i=void 0,o=!1,s="{",a=0;as+1024&&e.errors.push(vee(t,o));for(var S=u.context.src,w=s;w1){var o="Each pair must have its own sequence indicator";throw new Qt(t,o)}var s=i.items[0]||new vn;i.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(i.commentBefore,` `).concat(s.commentBefore):i.commentBefore),i.comment&&(s.comment=s.comment?"".concat(i.comment,` -`).concat(s.comment):i.comment),i=s}n.items[r]=i instanceof vn?i:new vn(i)}}return n}function _ee(e,t,n){var r=new iu(e);r.tag="tag:yaml.org,2002:pairs";var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=void 0,u=void 0;if(Array.isArray(s))if(s.length===2)a=s[0],u=s[1];else throw new TypeError("Expected [key, value] tuple: ".concat(s));else if(s&&s instanceof Object){var c=Object.keys(s);if(c.length===1)a=c[0],u=s[a];else throw new TypeError("Expected { key: value } tuple: ".concat(s))}else a=s;var d=e.createPair(a,u,n);r.items.push(d)}}catch(h){i.e(h)}finally{i.f()}return r}var See={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:wee,createNode:_ee},aI=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),ho(sa(r),"add",Qo.prototype.add.bind(sa(r))),ho(sa(r),"delete",Qo.prototype.delete.bind(sa(r))),ho(sa(r),"get",Qo.prototype.get.bind(sa(r))),ho(sa(r),"has",Qo.prototype.has.bind(sa(r))),ho(sa(r),"set",Qo.prototype.set.bind(sa(r))),r.tag=n.tag,r}return Yn(n,[{key:"toJSON",value:function(i,o){var s=new Map;o&&o.onCreate&&o.onCreate(s);var a=ir(this.items),u;try{for(a.s();!(u=a.n()).done;){var c=u.value,d=void 0,h=void 0;if(c instanceof vn?(d=_l(c.key,"",o),h=_l(c.value,d,o)):d=_l(c,"",o),s.has(d))throw new Error("Ordered maps must not include duplicate keys");s.set(d,h)}}catch(p){a.e(p)}finally{a.f()}return s}}]),n}(iu);ho(aI,"tag","tag:yaml.org,2002:omap");function QPe(e,t){var n=wee(e,t),r=[],i=ir(n.items),o;try{for(i.s();!(o=i.n()).done;){var s=o.value.key;if(s instanceof jn)if(r.includes(s.value)){var a="Ordered maps must not include duplicate keys";throw new Qt(t,a)}else r.push(s.value)}}catch(u){i.e(u)}finally{i.f()}return Object.assign(new aI,n)}function JPe(e,t,n){var r=_ee(e,t,n),i=new aI;return i.items=r.items,i}var Eee={identify:function(t){return t instanceof Map},nodeClass:aI,default:!1,tag:"tag:yaml.org,2002:omap",resolve:QPe,createNode:JPe},lI=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),r.tag=n.tag,r}return Yn(n,[{key:"add",value:function(i){var o=i instanceof vn?i:new vn(i),s=pp(this.items,o.key);s||this.items.push(o)}},{key:"get",value:function(i,o){var s=pp(this.items,i);return!o&&s instanceof vn?s.key instanceof jn?s.key.value:s.key:s}},{key:"set",value:function(i,o){if(typeof o!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Vs(o)));var s=pp(this.items,i);s&&!o?this.items.splice(this.items.indexOf(s),1):!s&&o&&this.items.push(new vn(i))}},{key:"toJSON",value:function(i,o){return as(ro(n.prototype),"toJSON",this).call(this,i,o,Set)}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);if(this.hasAllNullValues())return as(ro(n.prototype),"toString",this).call(this,i,o,s);throw new Error("Set items must all have null values")}}]),n}(Qo);ho(lI,"tag","tag:yaml.org,2002:set");function ZPe(e,t){var n=yee(e,t);if(!n.hasAllNullValues())throw new Qt(t,"Set items must all have null values");return Object.assign(new lI,n)}function e2e(e,t,n){var r=new lI,i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;r.items.push(e.createPair(s,null,n))}}catch(a){i.e(a)}finally{i.f()}return r}var Cee={identify:function(t){return t instanceof Set},nodeClass:lI,default:!1,tag:"tag:yaml.org,2002:set",resolve:ZPe,createNode:e2e},k6=function(t,n){var r=n.split(":").reduce(function(i,o){return i*60+Number(o)},0);return t==="-"?-r:r},Tee=function(t){var n=t.value;if(isNaN(n)||!isFinite(n))return kc(n);var r="";n<0&&(r="-",n=Math.abs(n));var i=[n%60];return n<60?i.unshift(0):(n=Math.round((n-i[0])/60),i.unshift(n%60),n>=60&&(n=Math.round((n-i[0])/60),i.unshift(n))),r+i.map(function(o){return o<10?"0"+String(o):String(o)}).join(":").replace(/000000\d*$/,"")},Aee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(t,n,r){return k6(n,r.replace(/_/g,""))},stringify:Tee},Iee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(t,n,r){return k6(n,r.replace(/_/g,""))},stringify:Tee},Ree={identify:function(t){return t instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(t,n,r,i,o,s,a,u,c){u&&(u=(u+"00").substr(1,3));var d=Date.UTC(n,r-1,i,o||0,s||0,a||0,u||0);if(c&&c!=="Z"){var h=k6(c[0],c.slice(1));Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:function(t){var n=t.value;return n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function Pee(e){var t=typeof process<"u"&&process.env||{};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function Oee(e,t){if(Pee(!1)){var n=typeof process<"u"&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var tG={};function t2e(e,t){if(!tG[e]&&Pee(!0)){tG[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");n+=t?", use '".concat(t,"' instead."):".",Oee(n,"DeprecationWarning")}}function n2e(e,t,n){var r=new Qo(e);if(t instanceof Map){var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=Bw(o.value,2),a=s[0],u=s[1];r.items.push(e.createPair(a,u,n))}}catch(p){i.e(p)}finally{i.f()}}else if(t&&Vs(t)==="object")for(var c=0,d=Object.keys(t);c=0?n+r.toString(t):kc(e)}var kee={identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Jm,stringify:function(){return Jm.nullStr}},Dee={identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(t){return t[0]==="t"||t[0]==="T"},options:Mc,stringify:function(t){var n=t.value;return n?Mc.trueStr:Mc.falseStr}},Lee={identify:function(t){return cI(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(t,n){return L6(t,n,8)},options:od,stringify:function(t){return Mee(t,8,"0o")}},Nee={identify:cI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(t){return L6(t,t,10)},options:od,stringify:kc},Bee={identify:function(t){return cI(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(t,n){return L6(t,n,16)},options:od,stringify:function(t){return Mee(t,16,"0x")}},$ee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:kc},Fee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t)},stringify:function(t){var n=t.value;return Number(n).toExponential()}},zee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(t,n,r){var i=n||r,o=new jn(parseFloat(t));return i&&i[i.length-1]==="0"&&(o.minFractionDigits=i.length),o},stringify:kc},o2e=D6.concat([kee,Dee,Lee,Nee,Bee,$ee,Fee,zee]),nG=function(t){return typeof t=="bigint"||Number.isInteger(t)},W_=function(t){var n=t.value;return JSON.stringify(n)},Uee=[zx,uI,{identify:function(t){return typeof t=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:$w,stringify:W_},{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:W_},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(t){return t==="true"},stringify:W_},{identify:nG,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(t){return od.asBigInt?BigInt(t):parseInt(t,10)},stringify:function(t){var n=t.value;return nG(n)?n.toString():JSON.stringify(n)}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(t){return parseFloat(t)},stringify:W_}];Uee.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var rG=function(t){var n=t.value;return n?Mc.trueStr:Mc.falseStr},l1=function(t){return typeof t=="bigint"||Number.isInteger(t)};function G_(e,t,n){var r=t.replace(/_/g,"");if(od.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r);break}var i=BigInt(r);return e==="-"?BigInt(-1)*i:i}var o=parseInt(r,n);return e==="-"?-1*o:o}function bN(e,t,n){var r=e.value;if(l1(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return kc(e)}var s2e=D6.concat([{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Jm,stringify:function(){return Jm.nullStr}},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:Mc,stringify:rG},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:Mc,stringify:rG},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(t,n,r){return G_(n,r,2)},stringify:function(t){return bN(t,2,"0b")}},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(t,n,r){return G_(n,r,8)},stringify:function(t){return bN(t,8,"0")}},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(t,n,r){return G_(n,r,10)},stringify:kc},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(t,n,r){return G_(n,r,16)},stringify:function(t){return bN(t,16,"0x")}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:kc},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t.replace(/_/g,""))},stringify:function(t){var n=t.value;return Number(n).toExponential()}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(t,n){var r=new jn(parseFloat(t.replace(/_/g,"")));if(n){var i=n.replace(/_/g,"");i[i.length-1]==="0"&&(r.minFractionDigits=i.length)}return r},stringify:kc}],xee,Eee,See,Cee,Aee,Iee,Ree),a2e={core:o2e,failsafe:D6,json:Uee,yaml11:s2e},l2e={binary:xee,bool:Dee,float:zee,floatExp:Fee,floatNaN:$ee,floatTime:Iee,int:Nee,intHex:Bee,intOct:Lee,intTime:Aee,map:zx,null:kee,omap:Eee,pairs:See,seq:uI,set:Cee,timestamp:Ree};function u2e(e,t,n){if(t){var r=n.filter(function(o){return o.tag===t}),i=r.find(function(o){return!o.format})||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find(function(o){return(o.identify&&o.identify(e)||o.class&&e instanceof o.class)&&!o.format})}function c2e(e,t,n){if(e instanceof Ko)return e;var r=n.defaultPrefix,i=n.onTagObj,o=n.prevObjects,s=n.schema,a=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=u2e(e,t,s.tags);if(!u){if(typeof e.toJSON=="function"&&(e=e.toJSON()),!e||Vs(e)!=="object")return a?new jn(e):e;u=e instanceof Map?zx:e[Symbol.iterator]?uI:zx}i&&(i(u),delete n.onTagObj);var c={value:void 0,node:void 0};if(e&&Vs(e)==="object"&&o){var d=o.get(e);if(d){var h=new jc(d);return n.aliasNodes.push(h),h}c.value=e,o.set(e,c)}return c.node=u.createNode?u.createNode(n.schema,e,n):a?new jn(e):e,t&&c.node instanceof Ko&&(c.node.tag=t),c.node}function f2e(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map(function(m){return JSON.stringify(m)}).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var s=ir(n),a;try{for(s.s();!(a=s.n()).done;){var u=a.value;i=i.concat(u)}}catch(m){s.e(m)}finally{s.f()}}else typeof n=="function"&&(i=n(i.slice()));for(var c=0;cn.key?1:0},Ux=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,o=t.sortMapEntries,s=t.tags;xn(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=o===!0?d2e:o||null,!n&&s&&t2e("tags","customTags"),this.tags=f2e(a2e,l2e,n||s,i)}return Yn(e,[{key:"createNode",value:function(n,r,i,o){var s={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r},a=o?Object.assign(o,s):s;return c2e(n,i,a)}},{key:"createPair",value:function(n,r,i){i||(i={wrapScalars:!0});var o=this.createNode(n,i.wrapScalars,null,i),s=this.createNode(r,i.wrapScalars,null,i);return new vn(o,s)}}]),e}();ho(Ux,"defaultPrefix",uE);ho(Ux,"defaultTags",Of);var kC={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},h2e={get binary(){return H1},set binary(e){Object.assign(H1,e)},get bool(){return Mc},set bool(e){Object.assign(Mc,e)},get int(){return od},set int(e){Object.assign(od,e)},get null(){return Jm},set null(e){Object.assign(Jm,e)},get str(){return Hc},set str(e){Object.assign(Hc,e)}},jee={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:uE},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:uE}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:uE}]}};function iG(e,t){if((e.version||e.options.version)==="1.0"){var n=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(n)return"!"+n[1];var r=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return r?"!".concat(r[1],"/").concat(r[2]):"!".concat(t.replace(/^tag:/,""))}var i=e.tagPrefixes.find(function(a){return t.indexOf(a.prefix)===0});if(!i){var o=e.getDefaults().tagPrefixes;i=o&&o.find(function(a){return t.indexOf(a.prefix)===0})}if(!i)return t[0]==="!"?t:"!<".concat(t,">");var s=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,function(a){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[a]});return i.handle+s}function p2e(e,t){if(t instanceof jc)return jc;if(t.tag){var n=e.filter(function(a){return a.tag===t.tag});if(n.length>0)return n.find(function(a){return a.format===t.format})||n[0]}var r,i;if(t instanceof jn){i=t.value;var o=e.filter(function(a){return a.identify&&a.identify(i)||a.class&&i instanceof a.class});r=o.find(function(a){return a.format===t.format})||o.find(function(a){return!a.format})}else i=t,r=e.find(function(a){return a.nodeClass&&i instanceof a.nodeClass});if(!r){var s=i&&i.constructor?i.constructor.name:Vs(i);throw new Error("Tag not resolved for ".concat(s," value"))}return r}function g2e(e,t,n){var r=n.anchors,i=n.doc,o=[],s=i.anchors.getName(e);return s&&(r[s]=e,o.push("&".concat(s))),e.tag?o.push(iG(i,e.tag)):t.default||o.push(iG(i,t.tag)),o.join(" ")}function V_(e,t,n,r){var i=t.doc,o=i.anchors,s=i.schema,a;if(!(e instanceof Ko)){var u={aliasNodes:[],onTagObj:function(S){return a=S},prevObjects:new Map};e=s.createNode(e,!0,null,u);var c=ir(u.aliasNodes),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;h.source=h.source.node;var p=o.getName(h.source);p||(p=o.newName(),o.map[p]=h.source)}}catch(y){c.e(y)}finally{c.f()}}if(e instanceof vn)return e.toString(t,n,r);a||(a=p2e(s.tags,e));var m=g2e(e,a,t);m.length>0&&(t.indentAtStart=(t.indentAtStart||0)+m.length+1);var v=typeof a.stringify=="function"?a.stringify(e,t,n,r):e instanceof jn?M6(e,t,n,r):e.toString(t,n,r);return m?e instanceof jn||v[0]==="{"||v[0]==="["?"".concat(m," ").concat(v):"".concat(m,` -`).concat(t.indent).concat(v):v}var m2e=function(){function e(t){xn(this,e),ho(this,"map",Object.create(null)),this.prefix=t}return Yn(e,[{key:"createAlias",value:function(n,r){return this.setAnchor(n,r),new jc(n)}},{key:"createMergePair",value:function(){for(var n=this,r=new fee,i=arguments.length,o=new Array(i),s=0;s0&&!e.commentBefore&&(e.commentBefore=n.before.join(` +`).concat(s.comment):i.comment),i=s}n.items[r]=i instanceof vn?i:new vn(i)}}return n}function See(e,t,n){var r=new iu(e);r.tag="tag:yaml.org,2002:pairs";var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=void 0,u=void 0;if(Array.isArray(s))if(s.length===2)a=s[0],u=s[1];else throw new TypeError("Expected [key, value] tuple: ".concat(s));else if(s&&s instanceof Object){var c=Object.keys(s);if(c.length===1)a=c[0],u=s[a];else throw new TypeError("Expected { key: value } tuple: ".concat(s))}else a=s;var d=e.createPair(a,u,n);r.items.push(d)}}catch(h){i.e(h)}finally{i.f()}return r}var Eee={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:_ee,createNode:See},aI=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),ho(sa(r),"add",Qo.prototype.add.bind(sa(r))),ho(sa(r),"delete",Qo.prototype.delete.bind(sa(r))),ho(sa(r),"get",Qo.prototype.get.bind(sa(r))),ho(sa(r),"has",Qo.prototype.has.bind(sa(r))),ho(sa(r),"set",Qo.prototype.set.bind(sa(r))),r.tag=n.tag,r}return Yn(n,[{key:"toJSON",value:function(i,o){var s=new Map;o&&o.onCreate&&o.onCreate(s);var a=ir(this.items),u;try{for(a.s();!(u=a.n()).done;){var c=u.value,d=void 0,h=void 0;if(c instanceof vn?(d=_l(c.key,"",o),h=_l(c.value,d,o)):d=_l(c,"",o),s.has(d))throw new Error("Ordered maps must not include duplicate keys");s.set(d,h)}}catch(p){a.e(p)}finally{a.f()}return s}}]),n}(iu);ho(aI,"tag","tag:yaml.org,2002:omap");function QPe(e,t){var n=_ee(e,t),r=[],i=ir(n.items),o;try{for(i.s();!(o=i.n()).done;){var s=o.value.key;if(s instanceof jn)if(r.includes(s.value)){var a="Ordered maps must not include duplicate keys";throw new Qt(t,a)}else r.push(s.value)}}catch(u){i.e(u)}finally{i.f()}return Object.assign(new aI,n)}function JPe(e,t,n){var r=See(e,t,n),i=new aI;return i.items=r.items,i}var Cee={identify:function(t){return t instanceof Map},nodeClass:aI,default:!1,tag:"tag:yaml.org,2002:omap",resolve:QPe,createNode:JPe},lI=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),r.tag=n.tag,r}return Yn(n,[{key:"add",value:function(i){var o=i instanceof vn?i:new vn(i),s=pp(this.items,o.key);s||this.items.push(o)}},{key:"get",value:function(i,o){var s=pp(this.items,i);return!o&&s instanceof vn?s.key instanceof jn?s.key.value:s.key:s}},{key:"set",value:function(i,o){if(typeof o!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Vs(o)));var s=pp(this.items,i);s&&!o?this.items.splice(this.items.indexOf(s),1):!s&&o&&this.items.push(new vn(i))}},{key:"toJSON",value:function(i,o){return as(ro(n.prototype),"toJSON",this).call(this,i,o,Set)}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);if(this.hasAllNullValues())return as(ro(n.prototype),"toString",this).call(this,i,o,s);throw new Error("Set items must all have null values")}}]),n}(Qo);ho(lI,"tag","tag:yaml.org,2002:set");function ZPe(e,t){var n=bee(e,t);if(!n.hasAllNullValues())throw new Qt(t,"Set items must all have null values");return Object.assign(new lI,n)}function e2e(e,t,n){var r=new lI,i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;r.items.push(e.createPair(s,null,n))}}catch(a){i.e(a)}finally{i.f()}return r}var Tee={identify:function(t){return t instanceof Set},nodeClass:lI,default:!1,tag:"tag:yaml.org,2002:set",resolve:ZPe,createNode:e2e},L6=function(t,n){var r=n.split(":").reduce(function(i,o){return i*60+Number(o)},0);return t==="-"?-r:r},Aee=function(t){var n=t.value;if(isNaN(n)||!isFinite(n))return kc(n);var r="";n<0&&(r="-",n=Math.abs(n));var i=[n%60];return n<60?i.unshift(0):(n=Math.round((n-i[0])/60),i.unshift(n%60),n>=60&&(n=Math.round((n-i[0])/60),i.unshift(n))),r+i.map(function(o){return o<10?"0"+String(o):String(o)}).join(":").replace(/000000\d*$/,"")},Iee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(t,n,r){return L6(n,r.replace(/_/g,""))},stringify:Aee},Ree={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(t,n,r){return L6(n,r.replace(/_/g,""))},stringify:Aee},Pee={identify:function(t){return t instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(t,n,r,i,o,s,a,u,c){u&&(u=(u+"00").substr(1,3));var d=Date.UTC(n,r-1,i,o||0,s||0,a||0,u||0);if(c&&c!=="Z"){var h=L6(c[0],c.slice(1));Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:function(t){var n=t.value;return n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function Oee(e){var t=typeof process<"u"&&process.env||{};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function Mee(e,t){if(Oee(!1)){var n=typeof process<"u"&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var nG={};function t2e(e,t){if(!nG[e]&&Oee(!0)){nG[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");n+=t?", use '".concat(t,"' instead."):".",Mee(n,"DeprecationWarning")}}function n2e(e,t,n){var r=new Qo(e);if(t instanceof Map){var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=$w(o.value,2),a=s[0],u=s[1];r.items.push(e.createPair(a,u,n))}}catch(p){i.e(p)}finally{i.f()}}else if(t&&Vs(t)==="object")for(var c=0,d=Object.keys(t);c=0?n+r.toString(t):kc(e)}var Lee={identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Jm,stringify:function(){return Jm.nullStr}},Dee={identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(t){return t[0]==="t"||t[0]==="T"},options:Mc,stringify:function(t){var n=t.value;return n?Mc.trueStr:Mc.falseStr}},Nee={identify:function(t){return cI(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(t,n){return N6(t,n,8)},options:od,stringify:function(t){return kee(t,8,"0o")}},Bee={identify:cI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(t){return N6(t,t,10)},options:od,stringify:kc},$ee={identify:function(t){return cI(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(t,n){return N6(t,n,16)},options:od,stringify:function(t){return kee(t,16,"0x")}},Fee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:kc},zee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t)},stringify:function(t){var n=t.value;return Number(n).toExponential()}},Uee={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(t,n,r){var i=n||r,o=new jn(parseFloat(t));return i&&i[i.length-1]==="0"&&(o.minFractionDigits=i.length),o},stringify:kc},o2e=D6.concat([Lee,Dee,Nee,Bee,$ee,Fee,zee,Uee]),rG=function(t){return typeof t=="bigint"||Number.isInteger(t)},G_=function(t){var n=t.value;return JSON.stringify(n)},jee=[zx,uI,{identify:function(t){return typeof t=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:Fw,stringify:G_},{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:G_},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(t){return t==="true"},stringify:G_},{identify:rG,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(t){return od.asBigInt?BigInt(t):parseInt(t,10)},stringify:function(t){var n=t.value;return rG(n)?n.toString():JSON.stringify(n)}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(t){return parseFloat(t)},stringify:G_}];jee.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var iG=function(t){var n=t.value;return n?Mc.trueStr:Mc.falseStr},l1=function(t){return typeof t=="bigint"||Number.isInteger(t)};function V_(e,t,n){var r=t.replace(/_/g,"");if(od.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r);break}var i=BigInt(r);return e==="-"?BigInt(-1)*i:i}var o=parseInt(r,n);return e==="-"?-1*o:o}function bN(e,t,n){var r=e.value;if(l1(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return kc(e)}var s2e=D6.concat([{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new jn(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Jm,stringify:function(){return Jm.nullStr}},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:Mc,stringify:iG},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:Mc,stringify:iG},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(t,n,r){return V_(n,r,2)},stringify:function(t){return bN(t,2,"0b")}},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(t,n,r){return V_(n,r,8)},stringify:function(t){return bN(t,8,"0")}},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(t,n,r){return V_(n,r,10)},stringify:kc},{identify:l1,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(t,n,r){return V_(n,r,16)},stringify:function(t){return bN(t,16,"0x")}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:kc},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t.replace(/_/g,""))},stringify:function(t){var n=t.value;return Number(n).toExponential()}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(t,n){var r=new jn(parseFloat(t.replace(/_/g,"")));if(n){var i=n.replace(/_/g,"");i[i.length-1]==="0"&&(r.minFractionDigits=i.length)}return r},stringify:kc}],wee,Cee,Eee,Tee,Iee,Ree,Pee),a2e={core:o2e,failsafe:D6,json:jee,yaml11:s2e},l2e={binary:wee,bool:Dee,float:Uee,floatExp:zee,floatNaN:Fee,floatTime:Ree,int:Bee,intHex:$ee,intOct:Nee,intTime:Iee,map:zx,null:Lee,omap:Cee,pairs:Eee,seq:uI,set:Tee,timestamp:Pee};function u2e(e,t,n){if(t){var r=n.filter(function(o){return o.tag===t}),i=r.find(function(o){return!o.format})||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find(function(o){return(o.identify&&o.identify(e)||o.class&&e instanceof o.class)&&!o.format})}function c2e(e,t,n){if(e instanceof Ko)return e;var r=n.defaultPrefix,i=n.onTagObj,o=n.prevObjects,s=n.schema,a=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=u2e(e,t,s.tags);if(!u){if(typeof e.toJSON=="function"&&(e=e.toJSON()),!e||Vs(e)!=="object")return a?new jn(e):e;u=e instanceof Map?zx:e[Symbol.iterator]?uI:zx}i&&(i(u),delete n.onTagObj);var c={value:void 0,node:void 0};if(e&&Vs(e)==="object"&&o){var d=o.get(e);if(d){var h=new jc(d);return n.aliasNodes.push(h),h}c.value=e,o.set(e,c)}return c.node=u.createNode?u.createNode(n.schema,e,n):a?new jn(e):e,t&&c.node instanceof Ko&&(c.node.tag=t),c.node}function f2e(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map(function(m){return JSON.stringify(m)}).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var s=ir(n),a;try{for(s.s();!(a=s.n()).done;){var u=a.value;i=i.concat(u)}}catch(m){s.e(m)}finally{s.f()}}else typeof n=="function"&&(i=n(i.slice()));for(var c=0;cn.key?1:0},Ux=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,o=t.sortMapEntries,s=t.tags;xn(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=o===!0?d2e:o||null,!n&&s&&t2e("tags","customTags"),this.tags=f2e(a2e,l2e,n||s,i)}return Yn(e,[{key:"createNode",value:function(n,r,i,o){var s={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r},a=o?Object.assign(o,s):s;return c2e(n,i,a)}},{key:"createPair",value:function(n,r,i){i||(i={wrapScalars:!0});var o=this.createNode(n,i.wrapScalars,null,i),s=this.createNode(r,i.wrapScalars,null,i);return new vn(o,s)}}]),e}();ho(Ux,"defaultPrefix",cE);ho(Ux,"defaultTags",Of);var LC={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},h2e={get binary(){return H1},set binary(e){Object.assign(H1,e)},get bool(){return Mc},set bool(e){Object.assign(Mc,e)},get int(){return od},set int(e){Object.assign(od,e)},get null(){return Jm},set null(e){Object.assign(Jm,e)},get str(){return Hc},set str(e){Object.assign(Hc,e)}},Hee={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:cE},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:cE}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:cE}]}};function oG(e,t){if((e.version||e.options.version)==="1.0"){var n=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(n)return"!"+n[1];var r=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return r?"!".concat(r[1],"/").concat(r[2]):"!".concat(t.replace(/^tag:/,""))}var i=e.tagPrefixes.find(function(a){return t.indexOf(a.prefix)===0});if(!i){var o=e.getDefaults().tagPrefixes;i=o&&o.find(function(a){return t.indexOf(a.prefix)===0})}if(!i)return t[0]==="!"?t:"!<".concat(t,">");var s=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,function(a){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[a]});return i.handle+s}function p2e(e,t){if(t instanceof jc)return jc;if(t.tag){var n=e.filter(function(a){return a.tag===t.tag});if(n.length>0)return n.find(function(a){return a.format===t.format})||n[0]}var r,i;if(t instanceof jn){i=t.value;var o=e.filter(function(a){return a.identify&&a.identify(i)||a.class&&i instanceof a.class});r=o.find(function(a){return a.format===t.format})||o.find(function(a){return!a.format})}else i=t,r=e.find(function(a){return a.nodeClass&&i instanceof a.nodeClass});if(!r){var s=i&&i.constructor?i.constructor.name:Vs(i);throw new Error("Tag not resolved for ".concat(s," value"))}return r}function g2e(e,t,n){var r=n.anchors,i=n.doc,o=[],s=i.anchors.getName(e);return s&&(r[s]=e,o.push("&".concat(s))),e.tag?o.push(oG(i,e.tag)):t.default||o.push(oG(i,t.tag)),o.join(" ")}function X_(e,t,n,r){var i=t.doc,o=i.anchors,s=i.schema,a;if(!(e instanceof Ko)){var u={aliasNodes:[],onTagObj:function(S){return a=S},prevObjects:new Map};e=s.createNode(e,!0,null,u);var c=ir(u.aliasNodes),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;h.source=h.source.node;var p=o.getName(h.source);p||(p=o.newName(),o.map[p]=h.source)}}catch(y){c.e(y)}finally{c.f()}}if(e instanceof vn)return e.toString(t,n,r);a||(a=p2e(s.tags,e));var m=g2e(e,a,t);m.length>0&&(t.indentAtStart=(t.indentAtStart||0)+m.length+1);var v=typeof a.stringify=="function"?a.stringify(e,t,n,r):e instanceof jn?k6(e,t,n,r):e.toString(t,n,r);return m?e instanceof jn||v[0]==="{"||v[0]==="["?"".concat(m," ").concat(v):"".concat(m,` +`).concat(t.indent).concat(v):v}var m2e=function(){function e(t){xn(this,e),ho(this,"map",Object.create(null)),this.prefix=t}return Yn(e,[{key:"createAlias",value:function(n,r){return this.setAnchor(n,r),new jc(n)}},{key:"createMergePair",value:function(){for(var n=this,r=new dee,i=arguments.length,o=new Array(i),s=0;s0&&!e.commentBefore&&(e.commentBefore=n.before.join(` `),n.before=[]))}}catch(m){o.e(m)}finally{o.f()}if(e.contents=r||null,!r)e.comment=n.before.concat(n.after).join(` `)||null;else{var h=n.before.join(` `);if(h){var p=r instanceof Zi&&r.items[0]?r.items[0]:r;p.commentBefore=p.commentBefore?"".concat(h,` `).concat(p.commentBefore):h}e.comment=n.after.join(` -`)||null}}function x2e(e,t){var n=e.tagPrefixes,r=Bw(t.parameters,2),i=r[0],o=r[1];if(!i||!o){var s="Insufficient parameters given for %TAG directive";throw new Qt(t,s)}if(n.some(function(u){return u.handle===i})){var a="The %TAG directive must only be given at most once per handle in the same document.";throw new Qt(t,a)}return{handle:i,prefix:o}}function w2e(e,t){var n=Bw(t.parameters,1),r=n[0];if(t.name==="YAML:1.0"&&(r="1.0"),!r){var i="Insufficient parameters given for %YAML directive";throw new Qt(t,i)}if(!jee[r]){var o=e.version||e.options.version,s="Document will be parsed as YAML ".concat(o," rather than YAML ").concat(r);e.warnings.push(new Tv(t,s))}return r}function _2e(e,t,n){var r=[],i=!1,o=ir(t),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,u=a.comment,c=a.name;switch(c){case"TAG":try{e.tagPrefixes.push(x2e(e,a))}catch(m){e.errors.push(m)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){var d="The %YAML directive must only be given at most once per document.";e.errors.push(new Qt(a,d))}try{e.version=w2e(e,a)}catch(m){e.errors.push(m)}i=!0;break;default:if(c){var h="YAML only supports %TAG and %YAML directives, and not %".concat(c);e.warnings.push(new Tv(a,h))}}u&&r.push(u)}}catch(m){o.e(m)}finally{o.f()}if(n&&!i&&(e.version||n.version||e.options.version)==="1.1"){var p=function(v){var y=v.handle,S=v.prefix;return{handle:y,prefix:S}};e.tagPrefixes=n.tagPrefixes.map(p),e.version=n.version}e.commentBefore=r.join(` -`)||null}function mg(e){if(e instanceof Zi)return!0;throw new Error("Expected a YAML collection as document contents")}var N6=function(){function e(t){xn(this,e),this.anchors=new m2e(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return Yn(e,[{key:"add",value:function(n){return mg(this.contents),this.contents.add(n)}},{key:"addIn",value:function(n,r){mg(this.contents),this.contents.addIn(n,r)}},{key:"delete",value:function(n){return mg(this.contents),this.contents.delete(n)}},{key:"deleteIn",value:function(n){return a1(n)?this.contents==null?!1:(this.contents=null,!0):(mg(this.contents),this.contents.deleteIn(n))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(n,r){return this.contents instanceof Zi?this.contents.get(n,r):void 0}},{key:"getIn",value:function(n,r){return a1(n)?!r&&this.contents instanceof jn?this.contents.value:this.contents:this.contents instanceof Zi?this.contents.getIn(n,r):void 0}},{key:"has",value:function(n){return this.contents instanceof Zi?this.contents.has(n):!1}},{key:"hasIn",value:function(n){return a1(n)?this.contents!==void 0:this.contents instanceof Zi?this.contents.hasIn(n):!1}},{key:"set",value:function(n,r){mg(this.contents),this.contents.set(n,r)}},{key:"setIn",value:function(n,r){a1(n)?this.contents=r:(mg(this.contents),this.contents.setIn(n,r))}},{key:"setSchema",value:function(n,r){if(!(!n&&!r&&this.schema)){typeof n=="number"&&(n=n.toFixed(1)),n==="1.0"||n==="1.1"||n==="1.2"?(this.version?this.version=n:this.options.version=n,delete this.options.schema):n&&typeof n=="string"&&(this.options.schema=n),Array.isArray(r)&&(this.options.customTags=r);var i=Object.assign({},this.getDefaults(),this.options);this.schema=new Ux(i)}}},{key:"parse",value:function(n,r){this.options.keepCstNodes&&(this.cstNode=n),this.options.keepNodeTypes&&(this.type="DOCUMENT");var i=n.directives,o=i===void 0?[]:i,s=n.contents,a=s===void 0?[]:s,u=n.directivesEndMarker,c=n.error,d=n.valueRange;if(c&&(c.source||(c.source=this),this.errors.push(c)),_2e(this,o,r),u&&(this.directivesEndMarker=!0),this.range=d?[d.start,d.end]:null,this.setSchema(),this.anchors._cstAliases=[],b2e(this,a),this.anchors.resolveNodes(),this.options.prettyErrors){var h=ir(this.errors),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;m instanceof Qm&&m.makePretty()}}catch(w){h.e(w)}finally{h.f()}var v=ir(this.warnings),y;try{for(v.s();!(y=v.n()).done;){var S=y.value;S instanceof Qm&&S.makePretty()}}catch(w){v.e(w)}finally{v.f()}}return this}},{key:"listNonDefaultTags",value:function(){return y2e(this.contents).filter(function(n){return n.indexOf(Ux.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(n,r){if(n[0]!=="!"||n[n.length-1]!=="!")throw new Error("Handle must start and end with !");if(r){var i=this.tagPrefixes.find(function(o){return o.handle===n});i?i.prefix=r:this.tagPrefixes.push({handle:n,prefix:r})}else this.tagPrefixes=this.tagPrefixes.filter(function(o){return o.handle!==n})}},{key:"toJSON",value:function(n,r){var i=this,o=this.options,s=o.keepBlobsInJSON,a=o.mapAsMap,u=o.maxAliasCount,c=s&&(typeof n!="string"||!(this.contents instanceof jn)),d={doc:this,indentStep:" ",keep:c,mapAsMap:c&&!!a,maxAliasCount:u,stringify:V_},h=Object.keys(this.anchors.map);h.length>0&&(d.anchors=new Map(h.map(function(b){return[i.anchors.map[b],{alias:[],aliasCount:0,count:1}]})));var p=_l(this.contents,n,d);if(typeof r=="function"&&d.anchors){var m=ir(d.anchors.values()),v;try{for(m.s();!(v=m.n()).done;){var y=v.value,S=y.count,w=y.res;r(w,S)}}catch(b){m.e(b)}finally{m.f()}}return p}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var n=this.options.indent;if(!Number.isInteger(n)||n<=0){var r=JSON.stringify(n);throw new Error('"indent" option must be a positive integer, not '.concat(r))}this.setSchema();var i=[],o=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),i.push(s),o=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach(function(m){var v=m.handle,y=m.prefix;a.some(function(S){return S.indexOf(y)===0})&&(i.push("%TAG ".concat(v," ").concat(y)),o=!0)}),(o||this.directivesEndMarker)&&i.push("---"),this.commentBefore&&((o||!this.directivesEndMarker)&&i.unshift(""),i.unshift(this.commentBefore.replace(/^/gm,"#")));var u={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(n),stringify:V_},c=!1,d=null;if(this.contents){this.contents instanceof Ko&&(this.contents.spaceBefore&&(o||this.directivesEndMarker)&&i.push(""),this.contents.commentBefore&&i.push(this.contents.commentBefore.replace(/^/gm,"#")),u.forceBlockIndent=!!this.comment,d=this.contents.comment);var h=d?null:function(){return c=!0},p=V_(this.contents,u,function(){return d=null},h);i.push(rm(p,"",d))}else this.contents!==void 0&&i.push(V_(this.contents,u));return this.comment&&((!c||d)&&i[i.length-1]!==""&&i.push(""),i.push(this.comment.replace(/^/gm,"#"))),i.join(` +`)||null}}function x2e(e,t){var n=e.tagPrefixes,r=$w(t.parameters,2),i=r[0],o=r[1];if(!i||!o){var s="Insufficient parameters given for %TAG directive";throw new Qt(t,s)}if(n.some(function(u){return u.handle===i})){var a="The %TAG directive must only be given at most once per handle in the same document.";throw new Qt(t,a)}return{handle:i,prefix:o}}function w2e(e,t){var n=$w(t.parameters,1),r=n[0];if(t.name==="YAML:1.0"&&(r="1.0"),!r){var i="Insufficient parameters given for %YAML directive";throw new Qt(t,i)}if(!Hee[r]){var o=e.version||e.options.version,s="Document will be parsed as YAML ".concat(o," rather than YAML ").concat(r);e.warnings.push(new Tv(t,s))}return r}function _2e(e,t,n){var r=[],i=!1,o=ir(t),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,u=a.comment,c=a.name;switch(c){case"TAG":try{e.tagPrefixes.push(x2e(e,a))}catch(m){e.errors.push(m)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){var d="The %YAML directive must only be given at most once per document.";e.errors.push(new Qt(a,d))}try{e.version=w2e(e,a)}catch(m){e.errors.push(m)}i=!0;break;default:if(c){var h="YAML only supports %TAG and %YAML directives, and not %".concat(c);e.warnings.push(new Tv(a,h))}}u&&r.push(u)}}catch(m){o.e(m)}finally{o.f()}if(n&&!i&&(e.version||n.version||e.options.version)==="1.1"){var p=function(v){var y=v.handle,S=v.prefix;return{handle:y,prefix:S}};e.tagPrefixes=n.tagPrefixes.map(p),e.version=n.version}e.commentBefore=r.join(` +`)||null}function mg(e){if(e instanceof Zi)return!0;throw new Error("Expected a YAML collection as document contents")}var B6=function(){function e(t){xn(this,e),this.anchors=new m2e(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return Yn(e,[{key:"add",value:function(n){return mg(this.contents),this.contents.add(n)}},{key:"addIn",value:function(n,r){mg(this.contents),this.contents.addIn(n,r)}},{key:"delete",value:function(n){return mg(this.contents),this.contents.delete(n)}},{key:"deleteIn",value:function(n){return a1(n)?this.contents==null?!1:(this.contents=null,!0):(mg(this.contents),this.contents.deleteIn(n))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(n,r){return this.contents instanceof Zi?this.contents.get(n,r):void 0}},{key:"getIn",value:function(n,r){return a1(n)?!r&&this.contents instanceof jn?this.contents.value:this.contents:this.contents instanceof Zi?this.contents.getIn(n,r):void 0}},{key:"has",value:function(n){return this.contents instanceof Zi?this.contents.has(n):!1}},{key:"hasIn",value:function(n){return a1(n)?this.contents!==void 0:this.contents instanceof Zi?this.contents.hasIn(n):!1}},{key:"set",value:function(n,r){mg(this.contents),this.contents.set(n,r)}},{key:"setIn",value:function(n,r){a1(n)?this.contents=r:(mg(this.contents),this.contents.setIn(n,r))}},{key:"setSchema",value:function(n,r){if(!(!n&&!r&&this.schema)){typeof n=="number"&&(n=n.toFixed(1)),n==="1.0"||n==="1.1"||n==="1.2"?(this.version?this.version=n:this.options.version=n,delete this.options.schema):n&&typeof n=="string"&&(this.options.schema=n),Array.isArray(r)&&(this.options.customTags=r);var i=Object.assign({},this.getDefaults(),this.options);this.schema=new Ux(i)}}},{key:"parse",value:function(n,r){this.options.keepCstNodes&&(this.cstNode=n),this.options.keepNodeTypes&&(this.type="DOCUMENT");var i=n.directives,o=i===void 0?[]:i,s=n.contents,a=s===void 0?[]:s,u=n.directivesEndMarker,c=n.error,d=n.valueRange;if(c&&(c.source||(c.source=this),this.errors.push(c)),_2e(this,o,r),u&&(this.directivesEndMarker=!0),this.range=d?[d.start,d.end]:null,this.setSchema(),this.anchors._cstAliases=[],b2e(this,a),this.anchors.resolveNodes(),this.options.prettyErrors){var h=ir(this.errors),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;m instanceof Qm&&m.makePretty()}}catch(w){h.e(w)}finally{h.f()}var v=ir(this.warnings),y;try{for(v.s();!(y=v.n()).done;){var S=y.value;S instanceof Qm&&S.makePretty()}}catch(w){v.e(w)}finally{v.f()}}return this}},{key:"listNonDefaultTags",value:function(){return y2e(this.contents).filter(function(n){return n.indexOf(Ux.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(n,r){if(n[0]!=="!"||n[n.length-1]!=="!")throw new Error("Handle must start and end with !");if(r){var i=this.tagPrefixes.find(function(o){return o.handle===n});i?i.prefix=r:this.tagPrefixes.push({handle:n,prefix:r})}else this.tagPrefixes=this.tagPrefixes.filter(function(o){return o.handle!==n})}},{key:"toJSON",value:function(n,r){var i=this,o=this.options,s=o.keepBlobsInJSON,a=o.mapAsMap,u=o.maxAliasCount,c=s&&(typeof n!="string"||!(this.contents instanceof jn)),d={doc:this,indentStep:" ",keep:c,mapAsMap:c&&!!a,maxAliasCount:u,stringify:X_},h=Object.keys(this.anchors.map);h.length>0&&(d.anchors=new Map(h.map(function(b){return[i.anchors.map[b],{alias:[],aliasCount:0,count:1}]})));var p=_l(this.contents,n,d);if(typeof r=="function"&&d.anchors){var m=ir(d.anchors.values()),v;try{for(m.s();!(v=m.n()).done;){var y=v.value,S=y.count,w=y.res;r(w,S)}}catch(b){m.e(b)}finally{m.f()}}return p}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var n=this.options.indent;if(!Number.isInteger(n)||n<=0){var r=JSON.stringify(n);throw new Error('"indent" option must be a positive integer, not '.concat(r))}this.setSchema();var i=[],o=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),i.push(s),o=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach(function(m){var v=m.handle,y=m.prefix;a.some(function(S){return S.indexOf(y)===0})&&(i.push("%TAG ".concat(v," ").concat(y)),o=!0)}),(o||this.directivesEndMarker)&&i.push("---"),this.commentBefore&&((o||!this.directivesEndMarker)&&i.unshift(""),i.unshift(this.commentBefore.replace(/^/gm,"#")));var u={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(n),stringify:X_},c=!1,d=null;if(this.contents){this.contents instanceof Ko&&(this.contents.spaceBefore&&(o||this.directivesEndMarker)&&i.push(""),this.contents.commentBefore&&i.push(this.contents.commentBefore.replace(/^/gm,"#")),u.forceBlockIndent=!!this.comment,d=this.contents.comment);var h=d?null:function(){return c=!0},p=X_(this.contents,u,function(){return d=null},h);i.push(rm(p,"",d))}else this.contents!==void 0&&i.push(X_(this.contents,u));return this.comment&&((!c||d)&&i[i.length-1]!==""&&i.push(""),i.push(this.comment.replace(/^/gm,"#"))),i.join(` `)+` -`}}]),e}();ho(N6,"defaults",jee);function S2e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2?arguments[2]:void 0;n===void 0&&typeof t=="string"&&(n=t,t=!0);var r=Object.assign({},N6.defaults[kC.version],kC),i=new Ux(r);return i.createNode(e,t,n)}var fI=function(e){sr(n,e);var t=ar(n);function n(r){return xn(this,n),t.call(this,Object.assign({},kC,r))}return n}(N6);function E2e(e,t){var n=[],r,i=ir(R6(e)),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=new fI(t);a.parse(s,r),n.push(a),r=a}}catch(u){i.e(u)}finally{i.f()}return n}function Hee(e,t){var n=R6(e),r=new fI(t).parse(n[0]);if(n.length>1){var i="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Qt(n[1],i))}return r}function C2e(e,t){var n=Hee(e,t);if(n.warnings.forEach(function(r){return Oee(r)}),n.errors.length>0)throw n.errors[0];return n.toJSON()}function T2e(e,t){var n=new fI(t);return n.contents=e,String(n)}var A2e={createNode:S2e,defaultOptions:kC,Document:fI,parse:C2e,parseAllDocuments:E2e,parseCST:R6,parseDocument:Hee,scalarOptions:h2e,stringify:T2e};const I2e=Object.freeze(Object.defineProperty({__proto__:null,YAML:A2e},Symbol.toStringTag,{value:"Module"})),R2e=Z5(I2e);var P2e=R2e.YAML;function W1(e){return e.split(".").pop()}function Wee(e){return e.split(".").shift()}const oG="internal/custom",E3="json",C3=e=>({name:(e==null?void 0:e.id)===oG?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:oG}),O2e=e=>({name:(e==null?void 0:e.type)===E3?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:E3}),sG=["json","yaml"];async function M2e(){const e=await nee({accept:sG.map(t=>`.${t}`),strict:!0});if(e)return async()=>{if(sG.includes(W1(e.name))){const t=await e.text(),n=P2e.parse(t);return{...O2e(),format:n==null?void 0:n.format,content:n,name:ie.startCase(Wee(e.name)),type:E3}}else throw new Error(`The format (${W1(e.name)}) is unsupported.`)}}async function k2e(e){const t=await nee({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return async()=>{if(ie.find(e,{id:W1(t.name)}))return{...C3(),format:W1(t.name),content:await t.text(),name:ie.startCase(Wee(t.name))};throw new Error(`The format (${W1(t.name)}) is unsupported.`)}}const[Zm,D2e]=gu([],{reduce:DQ}),[DC,L2e]=gu({algorithms:[],maps:[],formats:[]}),[dI,N2e]=gu({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>Oc(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function B2e(){const[e]=dI();return ie.some(ie.values(e))}function eg(e){const[,t]=dI();return O.useCallback(async n=>{t({action:"start",key:e});const r=await n();return t({action:"end",key:e}),r},[e,t])}function $2e({onChange:e,value:t}){const n=mu(),r=eg("specimen"),[i]=Zm(),[{maps:o,formats:s}]=DC();return C.jsx(Hs,{showArrow:!0,icon:C.jsx(IQ,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[C3(t),...o.map(a=>{var u;return{...a,description:(u=ie.find(i,{url:a.source}))==null?void 0:u.name}})],onChange:async a=>{switch(a){case C3().id:try{const u=await k2e(s);u&&r(async()=>{n("Reading map..."),e==null||e(await u())})}catch(u){n(`${u}`)}break;default:e==null||e(ie.find(o,{id:a}));break}}})}function F2e({onChange:e,value:t}){const n=mu(),r=eg("specimen");return C.jsx(Hp,{icon:C.jsx(IQ,{}),onClick:async()=>{try{const i=await M2e();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 u1="500";function z2e(e){return parseInt(e.replace("#","0x"))}const hI={source:hf.A400,destination:ff.A400,updating:sp[u1],expanding:JX[u1],generating:ZX[u1],closing:QX[u1],end:df.A400};ie.mapValues(hI,z2e);function jx(e){return(e&&hI[e])??i4[u1]}function U2e(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 j2e(){return this.eachAfter(U2e)}function H2e(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 G2e(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 X2e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function q2e(e){for(var t=this,n=Y2e(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 Y2e(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 K2e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Q2e(){var e=[];return this.each(function(t){e.push(t)}),e}function J2e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Z2e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function B6(e,t){var n=new Hx(e),r=+e.value&&(n.value=e.value),i,o=[n],s,a,u,c;for(t==null&&(t=tOe);i=o.pop();)if(r&&(i.value=+i.data.value),(a=t(i.data))&&(c=a.length))for(i.children=new Array(c),u=c-1;u>=0;--u)o.push(s=i.children[u]=new Hx(a[u])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(rOe)}function eOe(){return B6(this).eachBefore(nOe)}function tOe(e){return e.children}function nOe(e){e.data=e.data.data}function rOe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Hx(e){this.data=e,this.depth=this.height=0,this.parent=null}Hx.prototype=B6.prototype={constructor:Hx,count:j2e,each:H2e,eachAfter:G2e,eachBefore:W2e,sum:V2e,sort:X2e,path:q2e,ancestors:K2e,descendants:Q2e,leaves:J2e,links:Z2e,copy:eOe};function iOe(e,t){return e.parent===t.parent?1:2}function xN(e){var t=e.children;return t?t[0]:e.t}function wN(e){var t=e.children;return t?t[t.length-1]:e.t}function oOe(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 sOe(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 aOe(e,t,n){return e.a.parent===t.parent?e.a:n}function dE(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}dE.prototype=Object.create(Hx.prototype);function lOe(e){for(var t=new dE(e,0),n,r=[t],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new dE(o[s],s)),i.parent=n;return(t.parent=new dE(null,0)).children=[t],t}function uOe(){var e=iOe,t=1,n=1,r=null;function i(c){var d=lOe(c);if(d.eachAfter(o),d.parent.m=-d.z,d.eachBefore(s),r)c.eachBefore(u);else{var h=c,p=c,m=c;c.eachBefore(function(b){b.xp.x&&(p=b),b.depth>m.depth&&(m=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),w=n/(m.depth||1);c.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*w})}return c}function o(c){var d=c.children,h=c.parent.children,p=c.i?h[c.i-1]:null;if(d){sOe(c);var m=(d[0].z+d[d.length-1].z)/2;p?(c.z=p.z+e(c._,p._),c.m=c.z-m):c.z=m}else p&&(c.z=p.z+e(c._,p._));c.parent.A=a(c,p,c.parent.A||h[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,d,h){if(d){for(var p=c,m=c,v=d,y=p.parent.children[0],S=p.m,w=m.m,b=v.m,x=y.m,E;v=wN(v),p=xN(p),v&&p;)y=xN(y),m=wN(m),m.a=c,E=v.z+b-p.z-S+e(v._,p._),E>0&&(oOe(aOe(v,c,h),c,E),S+=E,w+=E),b+=v.m,S+=p.m,x+=y.m,w+=m.m;v&&!wN(m)&&(m.t=v,m.m+=b-w),p&&!xN(y)&&(y.t=p,y.m+=S-x,h=c)}return h}function u(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}var T3="http://www.w3.org/1999/xhtml";const aG={svg:"http://www.w3.org/2000/svg",xhtml:T3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pI(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),aG.hasOwnProperty(t)?{space:aG[t],local:e}:e}function cOe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===T3&&t.documentElement.namespaceURI===T3?t.createElement(e):t.createElementNS(n,e)}}function fOe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gee(e){var t=pI(e);return(t.local?fOe:cOe)(t)}function dOe(){}function $6(e){return e==null?dOe:function(){return this.querySelector(e)}}function hOe(e){typeof e!="function"&&(e=$6(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(A=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function $Oe(e){e||(e=FOe);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 zOe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function UOe(){return Array.from(this)}function jOe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?ZOe:typeof t=="function"?tMe:eMe)(e,t,n??"")):ev(this.node(),e)}function ev(e,t){return e.style.getPropertyValue(t)||Kee(e).getComputedStyle(e,null).getPropertyValue(t)}function rMe(e){return function(){delete this[e]}}function iMe(e,t){return function(){this[e]=t}}function oMe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function sMe(e,t){return arguments.length>1?this.each((t==null?rMe:typeof t=="function"?oMe:iMe)(e,t)):this.node()[e]}function Qee(e){return e.trim().split(/^|\s+/)}function F6(e){return e.classList||new Jee(e)}function Jee(e){this._node=e,this._names=Qee(e.getAttribute("class")||"")}Jee.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 Zee(e,t){for(var n=F6(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function DMe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function z6(){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}})}hE.prototype=z6.prototype={constructor:hE,on:function(e,t){var n=this._,r=WMe(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?X_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?X_(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=YMe.exec(e))?new es(t[1],t[2],t[3],1):(t=KMe.exec(e))?new es(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QMe.exec(e))?X_(t[1],t[2],t[3],t[4]):(t=JMe.exec(e))?X_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZMe.exec(e))?gG(t[1],t[2]/100,t[3]/100,1):(t=eke.exec(e))?gG(t[1],t[2]/100,t[3]/100,t[4]):uG.hasOwnProperty(e)?dG(uG[e]):e==="transparent"?new es(NaN,NaN,NaN,0):null}function dG(e){return new es(e>>16&255,e>>8&255,e&255,1)}function X_(e,t,n,r){return r<=0&&(e=t=n=NaN),new es(e,t,n,r)}function rke(e){return e instanceof zw||(e=Vx(e)),e?(e=e.rgb(),new es(e.r,e.g,e.b,e.opacity)):new es}function R3(e,t,n,r){return arguments.length===1?rke(e):new es(e,t,n,r??1)}function es(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}U6(es,R3,rte(zw,{brighter(e){return e=e==null?NC:Math.pow(NC,e),new es(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wx:Math.pow(Wx,e),new es(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new es(Cp(this.r),Cp(this.g),Cp(this.b),BC(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:hG,formatHex:hG,formatHex8:ike,formatRgb:pG,toString:pG}));function hG(){return`#${gp(this.r)}${gp(this.g)}${gp(this.b)}`}function ike(){return`#${gp(this.r)}${gp(this.g)}${gp(this.b)}${gp((isNaN(this.opacity)?1:this.opacity)*255)}`}function pG(){const e=BC(this.opacity);return`${e===1?"rgb(":"rgba("}${Cp(this.r)}, ${Cp(this.g)}, ${Cp(this.b)}${e===1?")":`, ${e})`}`}function BC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Cp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gp(e){return e=Cp(e),(e<16?"0":"")+e.toString(16)}function gG(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gl(e,t,n,r)}function ite(e){if(e instanceof gl)return new gl(e.h,e.s,e.l,e.opacity);if(e instanceof zw||(e=Vx(e)),!e)return new gl;if(e instanceof gl)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,a=o-i,u=(o+i)/2;return a?(t===o?s=(n-r)/a+(n0&&u<1?0:s,new gl(s,a,u,e.opacity)}function oke(e,t,n,r){return arguments.length===1?ite(e):new gl(e,t,n,r??1)}function gl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}U6(gl,oke,rte(zw,{brighter(e){return e=e==null?NC:Math.pow(NC,e),new gl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wx:Math.pow(Wx,e),new gl(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 es(_N(e>=240?e-240:e+120,i,r),_N(e,i,r),_N(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gl(mG(this.h),q_(this.s),q_(this.l),BC(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=BC(this.opacity);return`${e===1?"hsl(":"hsla("}${mG(this.h)}, ${q_(this.s)*100}%, ${q_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mG(e){return e=(e||0)%360,e<0?e+360:e}function q_(e){return Math.max(0,Math.min(1,e||0))}function _N(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 ote=e=>()=>e;function ske(e,t){return function(n){return e+n*t}}function ake(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 lke(e){return(e=+e)==1?ste:function(t,n){return n-t?ake(t,n,e):ote(isNaN(t)?n:t)}}function ste(e,t){var n=t-e;return n?ske(e,n):ote(isNaN(e)?t:e)}const vG=function e(t){var n=lke(t);function r(i,o){var s=n((i=R3(i)).r,(o=R3(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=ste(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=u(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function yf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var P3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SN=new RegExp(P3.source,"g");function uke(e){return function(){return e}}function cke(e){return function(t){return e(t)+""}}function fke(e,t){var n=P3.lastIndex=SN.lastIndex=0,r,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(r=P3.exec(e))&&(i=SN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:yf(r,i)})),n=SN.lastIndex;return n180?d+=360:d-c>180&&(c+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:yf(c,d)})):d&&h.push(i(h)+"rotate("+d+r)}function a(c,d,h,p){c!==d?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:yf(c,d)}):d&&h.push(i(h)+"skewX("+d+r)}function u(c,d,h,p,m,v){if(c!==h||d!==p){var y=m.push(i(m)+"scale(",null,",",null,")");v.push({i:y-4,x:yf(c,h)},{i:y-2,x:yf(d,p)})}else(h!==1||p!==1)&&m.push(i(m)+"scale("+h+","+p+")")}return function(c,d){var h=[],p=[];return c=e(c),d=e(d),o(c.translateX,c.translateY,d.translateX,d.translateY,h,p),s(c.rotate,d.rotate,h,p),a(c.skewX,d.skewX,h,p),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,h,p),c=d=null,function(m){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--tv}function xG(){Gp=(FC=Xx.now())+gI,tv=c1=0;try{wke()}finally{tv=0,Ske(),Gp=0}}function _ke(){var e=Xx.now(),t=e-FC;t>ute&&(gI-=t,FC=e)}function Ske(){for(var e,t=$C,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:$C=n);f1=e,M3(r)}function M3(e){if(!tv){c1&&(c1=clearTimeout(c1));var t=e-Gp;t>24?(e<1/0&&(c1=setTimeout(xG,e-Xx.now()-gI)),Nb&&(Nb=clearInterval(Nb))):(Nb||(FC=Xx.now(),Nb=setInterval(_ke,ute)),tv=1,cte(xG))}}function wG(e,t,n){var r=new zC;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Eke=z6("start","end","cancel","interrupt"),Cke=[],dte=0,_G=1,k3=2,pE=3,SG=4,D3=5,gE=6;function mI(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Tke(e,n,{name:t,index:r,group:i,on:Eke,tween:Cke,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dte})}function H6(e,t){var n=Ml(e,t);if(n.state>dte)throw new Error("too late; already scheduled");return n}function yu(e,t){var n=Ml(e,t);if(n.state>pE)throw new Error("too late; already running");return n}function Ml(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Tke(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=fte(o,0,n.time);function o(c){n.state=_G,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var d,h,p,m;if(n.state!==_G)return u();for(d in r)if(m=r[d],m.name===n.name){if(m.state===pE)return wG(s);m.state===SG?(m.state=gE,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+dk3&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function nDe(e,t,n){var r,i,o=tDe(t)?H6:yu;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function rDe(e,t){var n=this._id;return arguments.length<2?Ml(this.node(),n).on.on(e):this.each(nDe(n,e,t))}function iDe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oDe(){return this.on("end.remove",iDe(this._id))}function sDe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=$6(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function ODe(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 UC=new Tc(1,0,0);Tc.prototype;function EN(e){e.stopImmediatePropagation()}function Bb(e){e.preventDefault(),e.stopImmediatePropagation()}function MDe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function kDe(){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 EG(){return this.__zoom||UC}function DDe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function LDe(){return navigator.maxTouchPoints||"ontouchstart"in this}function NDe(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 CN(){var e=MDe,t=kDe,n=NDe,r=DDe,i=LDe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=bke,c=z6("start","zoom","end"),d,h,p,m=500,v=150,y=0,S=10;function w(D){D.property("__zoom",EG).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(D,F,z,G){var W=D.selection?D.selection():D;W.property("__zoom",EG),D!==W?A(D,F,z,G):W.interrupt().each(function(){I(this,arguments).event(G).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},w.scaleBy=function(D,F,z,G){w.scaleTo(D,function(){var W=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return W*K},z,G)},w.scaleTo=function(D,F,z,G){w.transform(D,function(){var W=t.apply(this,arguments),K=this.__zoom,q=z==null?E(W):typeof z=="function"?z.apply(this,arguments):z,Q=K.invert(q),re=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,re),q,Q),W,s)},z,G)},w.translateBy=function(D,F,z,G){w.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,G)},w.translateTo=function(D,F,z,G,W){w.transform(D,function(){var K=t.apply(this,arguments),q=this.__zoom,Q=G==null?E(K):typeof G=="function"?G.apply(this,arguments):G;return n(UC.translate(Q[0],Q[1]).scale(q.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),K,s)},G,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 G=F[0]-z[0]*D.k,W=F[1]-z[1]*D.k;return G===D.x&&W===D.y?D:new Tc(D.k,G,W)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function A(D,F,z,G){D.on("start.zoom",function(){I(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(G).end()}).tween("zoom",function(){var W=this,K=arguments,q=I(W,K).event(G),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=u(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)}q.zoom(null,ae)}})}function I(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=$o(this.that).datum();c.call(D,this.that,new ODe(D,{sourceEvent:this.sourceEvent,target:w,type:D,transform:this.that.__zoom,dispatch:c}),F)}};function M(D,...F){if(!e.apply(this,arguments))return;var z=I(this,F).event(D),G=this.__zoom,W=Math.max(o[0],Math.min(o[1],G.k*Math.pow(2,r.apply(this,arguments)))),K=jh(D);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=G.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(G.k===W)return;z.mouse=[K,G.invert(K)],mE(this),z.start()}Bb(D),z.wheel=setTimeout(q,v),z.zoom("mouse",n(x(b(G,W),z.mouse[0],z.mouse[1]),z.extent,s));function q(){z.wheel=null,z.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var z=D.currentTarget,G=I(this,F,!0).event(D),W=$o(D.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",ue,!0),K=jh(D,z),q=D.clientX,Q=D.clientY;VMe(D.view),EN(D),G.mouse=[K,this.__zoom.invert(K)],mE(this),G.start();function re(ce){if(Bb(ce),!G.moved){var se=ce.clientX-q,J=ce.clientY-Q;G.moved=se*se+J*J>y}G.event(ce).zoom("mouse",n(x(G.that.__zoom,G.mouse[0]=jh(ce,z),G.mouse[1]),G.extent,s))}function ue(ce){W.on("mousemove.zoom mouseup.zoom",null),XMe(ce.view,G.moved),Bb(ce),G.event(ce).end()}}function N(D,...F){if(e.apply(this,arguments)){var z=this.__zoom,G=jh(D.changedTouches?D.changedTouches[0]:D,this),W=z.invert(G),K=z.k*(D.shiftKey?.5:2),q=n(x(b(z,K),G,W),t.apply(this,F),s);Bb(D),a>0?$o(this).transition().duration(a).call(A,q,G,D):$o(this).call(w.transform,q,G,D)}}function H(D,...F){if(e.apply(this,arguments)){var z=D.touches,G=z.length,W=I(this,F,D.changedTouches.length===G).event(D),K,q,Q,re;for(EN(D),q=0;q"u"&&(m=!0),typeof v>"u"&&(v=1/0);function E(A,I){if(A===null)return null;if(I===0)return A;var R,M;if(typeof A!="object")return A;if(n(A,r))R=new r;else if(n(A,i))R=new i;else if(n(A,o))R=new o(function(G,W){A.then(function(K){G(E(K,I-1))},function(K){W(E(K,I-1))})});else if(s.__isArray(A))R=[];else if(s.__isRegExp(A))R=new RegExp(A.source,h(A)),A.lastIndex&&(R.lastIndex=A.lastIndex);else if(s.__isDate(A))R=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(A.length):R=new Buffer(A.length),A.copy(R),R;n(A,Error)?R=Object.create(A):typeof y>"u"?(M=Object.getPrototypeOf(A),R=Object.create(M)):(R=Object.create(y),M=y)}if(m){var L=w.indexOf(A);if(L!=-1)return b[L];w.push(A),b.push(R)}n(A,r)&&A.forEach(function(G,W){var K=E(W,I-1),q=E(G,I-1);R.set(K,q)}),n(A,i)&&A.forEach(function(G){var W=E(G,I-1);R.add(W)});for(var N in A){var H;M&&(H=Object.getOwnPropertyDescriptor(M,N)),!(H&&H.set==null)&&(R[N]=E(A[N],I-1))}if(Object.getOwnPropertySymbols)for(var V=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Gi[e[t+0]]+Gi[e[t+1]]+Gi[e[t+2]]+Gi[e[t+3]]+"-"+Gi[e[t+4]]+Gi[e[t+5]]+"-"+Gi[e[t+6]]+Gi[e[t+7]]+"-"+Gi[e[t+8]]+Gi[e[t+9]]+"-"+Gi[e[t+10]]+Gi[e[t+11]]+Gi[e[t+12]]+Gi[e[t+13]]+Gi[e[t+14]]+Gi[e[t+15]]).toLowerCase();if(!UDe(n))throw TypeError("Stringified UUID is invalid");return n}function AN(e,t,n){e=e||{};var r=e.random||(e.rng||FDe)();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 jDe(r)}var L3={exports:{}},N3={exports:{}},HDe=function(){for(var t=arguments.length,n=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2?arguments[2]:void 0;n===void 0&&typeof t=="string"&&(n=t,t=!0);var r=Object.assign({},B6.defaults[LC.version],LC),i=new Ux(r);return i.createNode(e,t,n)}var fI=function(e){sr(n,e);var t=ar(n);function n(r){return xn(this,n),t.call(this,Object.assign({},LC,r))}return n}(B6);function E2e(e,t){var n=[],r,i=ir(P6(e)),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=new fI(t);a.parse(s,r),n.push(a),r=a}}catch(u){i.e(u)}finally{i.f()}return n}function Wee(e,t){var n=P6(e),r=new fI(t).parse(n[0]);if(n.length>1){var i="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Qt(n[1],i))}return r}function C2e(e,t){var n=Wee(e,t);if(n.warnings.forEach(function(r){return Mee(r)}),n.errors.length>0)throw n.errors[0];return n.toJSON()}function T2e(e,t){var n=new fI(t);return n.contents=e,String(n)}var A2e={createNode:S2e,defaultOptions:LC,Document:fI,parse:C2e,parseAllDocuments:E2e,parseCST:P6,parseDocument:Wee,scalarOptions:h2e,stringify:T2e};const I2e=Object.freeze(Object.defineProperty({__proto__:null,YAML:A2e},Symbol.toStringTag,{value:"Module"})),R2e=e4(I2e);var P2e=R2e.YAML;function W1(e){return e.split(".").pop()}function Gee(e){return e.split(".").shift()}const sG="internal/custom",C3="json",T3=e=>({name:(e==null?void 0:e.id)===sG?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:sG}),O2e=e=>({name:(e==null?void 0:e.type)===C3?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:C3}),aG=["json","yaml"];async function M2e(){const e=await ree({accept:aG.map(t=>`.${t}`),strict:!0});if(e)return async()=>{if(aG.includes(W1(e.name))){const t=await e.text(),n=P2e.parse(t);return{...O2e(),format:n==null?void 0:n.format,content:n,name:ie.startCase(Gee(e.name)),type:C3}}else throw new Error(`The format (${W1(e.name)}) is unsupported.`)}}async function k2e(e){const t=await ree({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return async()=>{if(ie.find(e,{id:W1(t.name)}))return{...T3(),format:W1(t.name),content:await t.text(),name:ie.startCase(Gee(t.name))};throw new Error(`The format (${W1(t.name)}) is unsupported.`)}}const[Zm,L2e]=gu([],{reduce:DQ}),[DC,D2e]=gu({algorithms:[],maps:[],formats:[]}),[dI,N2e]=gu({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>Oc(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function B2e(){const[e]=dI();return ie.some(ie.values(e))}function eg(e){const[,t]=dI();return O.useCallback(async n=>{t({action:"start",key:e});const r=await n();return t({action:"end",key:e}),r},[e,t])}function $2e({onChange:e,value:t}){const n=mu(),r=eg("specimen"),[i]=Zm(),[{maps:o,formats:s}]=DC();return C.jsx(Hs,{showArrow:!0,icon:C.jsx(RQ,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[T3(t),...o.map(a=>{var u;return{...a,description:(u=ie.find(i,{url:a.source}))==null?void 0:u.name}})],onChange:async a=>{switch(a){case T3().id:try{const u=await k2e(s);u&&r(async()=>{n("Reading map..."),e==null||e(await u())})}catch(u){n(`${u}`)}break;default:e==null||e(ie.find(o,{id:a}));break}}})}function F2e({onChange:e,value:t}){const n=mu(),r=eg("specimen");return C.jsx(Hp,{icon:C.jsx(RQ,{}),onClick:async()=>{try{const i=await M2e();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 u1="500";function z2e(e){return parseInt(e.replace("#","0x"))}const hI={source:hf.A400,destination:ff.A400,updating:sp[u1],expanding:ZX[u1],generating:eq[u1],closing:JX[u1],end:df.A400};ie.mapValues(hI,z2e);function jx(e){return(e&&hI[e])??o4[u1]}function U2e(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 j2e(){return this.eachAfter(U2e)}function H2e(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 G2e(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 X2e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function q2e(e){for(var t=this,n=Y2e(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 Y2e(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 K2e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Q2e(){var e=[];return this.each(function(t){e.push(t)}),e}function J2e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Z2e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function $6(e,t){var n=new Hx(e),r=+e.value&&(n.value=e.value),i,o=[n],s,a,u,c;for(t==null&&(t=tOe);i=o.pop();)if(r&&(i.value=+i.data.value),(a=t(i.data))&&(c=a.length))for(i.children=new Array(c),u=c-1;u>=0;--u)o.push(s=i.children[u]=new Hx(a[u])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(rOe)}function eOe(){return $6(this).eachBefore(nOe)}function tOe(e){return e.children}function nOe(e){e.data=e.data.data}function rOe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Hx(e){this.data=e,this.depth=this.height=0,this.parent=null}Hx.prototype=$6.prototype={constructor:Hx,count:j2e,each:H2e,eachAfter:G2e,eachBefore:W2e,sum:V2e,sort:X2e,path:q2e,ancestors:K2e,descendants:Q2e,leaves:J2e,links:Z2e,copy:eOe};function iOe(e,t){return e.parent===t.parent?1:2}function xN(e){var t=e.children;return t?t[0]:e.t}function wN(e){var t=e.children;return t?t[t.length-1]:e.t}function oOe(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 sOe(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 aOe(e,t,n){return e.a.parent===t.parent?e.a:n}function hE(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}hE.prototype=Object.create(Hx.prototype);function lOe(e){for(var t=new hE(e,0),n,r=[t],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new hE(o[s],s)),i.parent=n;return(t.parent=new hE(null,0)).children=[t],t}function uOe(){var e=iOe,t=1,n=1,r=null;function i(c){var d=lOe(c);if(d.eachAfter(o),d.parent.m=-d.z,d.eachBefore(s),r)c.eachBefore(u);else{var h=c,p=c,m=c;c.eachBefore(function(b){b.xp.x&&(p=b),b.depth>m.depth&&(m=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),w=n/(m.depth||1);c.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*w})}return c}function o(c){var d=c.children,h=c.parent.children,p=c.i?h[c.i-1]:null;if(d){sOe(c);var m=(d[0].z+d[d.length-1].z)/2;p?(c.z=p.z+e(c._,p._),c.m=c.z-m):c.z=m}else p&&(c.z=p.z+e(c._,p._));c.parent.A=a(c,p,c.parent.A||h[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,d,h){if(d){for(var p=c,m=c,v=d,y=p.parent.children[0],S=p.m,w=m.m,b=v.m,x=y.m,E;v=wN(v),p=xN(p),v&&p;)y=xN(y),m=wN(m),m.a=c,E=v.z+b-p.z-S+e(v._,p._),E>0&&(oOe(aOe(v,c,h),c,E),S+=E,w+=E),b+=v.m,S+=p.m,x+=y.m,w+=m.m;v&&!wN(m)&&(m.t=v,m.m+=b-w),p&&!xN(y)&&(y.t=p,y.m+=S-x,h=c)}return h}function u(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}var A3="http://www.w3.org/1999/xhtml";const lG={svg:"http://www.w3.org/2000/svg",xhtml:A3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pI(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),lG.hasOwnProperty(t)?{space:lG[t],local:e}:e}function cOe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===A3&&t.documentElement.namespaceURI===A3?t.createElement(e):t.createElementNS(n,e)}}function fOe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vee(e){var t=pI(e);return(t.local?fOe:cOe)(t)}function dOe(){}function F6(e){return e==null?dOe:function(){return this.querySelector(e)}}function hOe(e){typeof e!="function"&&(e=F6(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(A=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function $Oe(e){e||(e=FOe);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 zOe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function UOe(){return Array.from(this)}function jOe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?ZOe:typeof t=="function"?tMe:eMe)(e,t,n??"")):ev(this.node(),e)}function ev(e,t){return e.style.getPropertyValue(t)||Qee(e).getComputedStyle(e,null).getPropertyValue(t)}function rMe(e){return function(){delete this[e]}}function iMe(e,t){return function(){this[e]=t}}function oMe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function sMe(e,t){return arguments.length>1?this.each((t==null?rMe:typeof t=="function"?oMe:iMe)(e,t)):this.node()[e]}function Jee(e){return e.trim().split(/^|\s+/)}function z6(e){return e.classList||new Zee(e)}function Zee(e){this._node=e,this._names=Jee(e.getAttribute("class")||"")}Zee.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 ete(e,t){for(var n=z6(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function LMe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function U6(){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}})}pE.prototype=U6.prototype={constructor:pE,on:function(e,t){var n=this._,r=WMe(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?q_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?q_(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=YMe.exec(e))?new es(t[1],t[2],t[3],1):(t=KMe.exec(e))?new es(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QMe.exec(e))?q_(t[1],t[2],t[3],t[4]):(t=JMe.exec(e))?q_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZMe.exec(e))?mG(t[1],t[2]/100,t[3]/100,1):(t=eke.exec(e))?mG(t[1],t[2]/100,t[3]/100,t[4]):cG.hasOwnProperty(e)?hG(cG[e]):e==="transparent"?new es(NaN,NaN,NaN,0):null}function hG(e){return new es(e>>16&255,e>>8&255,e&255,1)}function q_(e,t,n,r){return r<=0&&(e=t=n=NaN),new es(e,t,n,r)}function rke(e){return e instanceof Uw||(e=Vx(e)),e?(e=e.rgb(),new es(e.r,e.g,e.b,e.opacity)):new es}function P3(e,t,n,r){return arguments.length===1?rke(e):new es(e,t,n,r??1)}function es(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j6(es,P3,ite(Uw,{brighter(e){return e=e==null?BC:Math.pow(BC,e),new es(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wx:Math.pow(Wx,e),new es(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new es(Cp(this.r),Cp(this.g),Cp(this.b),$C(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:pG,formatHex:pG,formatHex8:ike,formatRgb:gG,toString:gG}));function pG(){return`#${gp(this.r)}${gp(this.g)}${gp(this.b)}`}function ike(){return`#${gp(this.r)}${gp(this.g)}${gp(this.b)}${gp((isNaN(this.opacity)?1:this.opacity)*255)}`}function gG(){const e=$C(this.opacity);return`${e===1?"rgb(":"rgba("}${Cp(this.r)}, ${Cp(this.g)}, ${Cp(this.b)}${e===1?")":`, ${e})`}`}function $C(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Cp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gp(e){return e=Cp(e),(e<16?"0":"")+e.toString(16)}function mG(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gl(e,t,n,r)}function ote(e){if(e instanceof gl)return new gl(e.h,e.s,e.l,e.opacity);if(e instanceof Uw||(e=Vx(e)),!e)return new gl;if(e instanceof gl)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,a=o-i,u=(o+i)/2;return a?(t===o?s=(n-r)/a+(n0&&u<1?0:s,new gl(s,a,u,e.opacity)}function oke(e,t,n,r){return arguments.length===1?ote(e):new gl(e,t,n,r??1)}function gl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j6(gl,oke,ite(Uw,{brighter(e){return e=e==null?BC:Math.pow(BC,e),new gl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wx:Math.pow(Wx,e),new gl(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 es(_N(e>=240?e-240:e+120,i,r),_N(e,i,r),_N(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gl(vG(this.h),Y_(this.s),Y_(this.l),$C(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=$C(this.opacity);return`${e===1?"hsl(":"hsla("}${vG(this.h)}, ${Y_(this.s)*100}%, ${Y_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function vG(e){return e=(e||0)%360,e<0?e+360:e}function Y_(e){return Math.max(0,Math.min(1,e||0))}function _N(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 ste=e=>()=>e;function ske(e,t){return function(n){return e+n*t}}function ake(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 lke(e){return(e=+e)==1?ate:function(t,n){return n-t?ake(t,n,e):ste(isNaN(t)?n:t)}}function ate(e,t){var n=t-e;return n?ske(e,n):ste(isNaN(e)?t:e)}const yG=function e(t){var n=lke(t);function r(i,o){var s=n((i=P3(i)).r,(o=P3(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=ate(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=u(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function yf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var O3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SN=new RegExp(O3.source,"g");function uke(e){return function(){return e}}function cke(e){return function(t){return e(t)+""}}function fke(e,t){var n=O3.lastIndex=SN.lastIndex=0,r,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(r=O3.exec(e))&&(i=SN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:yf(r,i)})),n=SN.lastIndex;return n180?d+=360:d-c>180&&(c+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:yf(c,d)})):d&&h.push(i(h)+"rotate("+d+r)}function a(c,d,h,p){c!==d?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:yf(c,d)}):d&&h.push(i(h)+"skewX("+d+r)}function u(c,d,h,p,m,v){if(c!==h||d!==p){var y=m.push(i(m)+"scale(",null,",",null,")");v.push({i:y-4,x:yf(c,h)},{i:y-2,x:yf(d,p)})}else(h!==1||p!==1)&&m.push(i(m)+"scale("+h+","+p+")")}return function(c,d){var h=[],p=[];return c=e(c),d=e(d),o(c.translateX,c.translateY,d.translateX,d.translateY,h,p),s(c.rotate,d.rotate,h,p),a(c.skewX,d.skewX,h,p),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,h,p),c=d=null,function(m){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--tv}function wG(){Gp=(zC=Xx.now())+gI,tv=c1=0;try{wke()}finally{tv=0,Ske(),Gp=0}}function _ke(){var e=Xx.now(),t=e-zC;t>cte&&(gI-=t,zC=e)}function Ske(){for(var e,t=FC,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:FC=n);f1=e,k3(r)}function k3(e){if(!tv){c1&&(c1=clearTimeout(c1));var t=e-Gp;t>24?(e<1/0&&(c1=setTimeout(wG,e-Xx.now()-gI)),Nb&&(Nb=clearInterval(Nb))):(Nb||(zC=Xx.now(),Nb=setInterval(_ke,cte)),tv=1,fte(wG))}}function _G(e,t,n){var r=new UC;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Eke=U6("start","end","cancel","interrupt"),Cke=[],hte=0,SG=1,L3=2,gE=3,EG=4,D3=5,mE=6;function mI(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Tke(e,n,{name:t,index:r,group:i,on:Eke,tween:Cke,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:hte})}function W6(e,t){var n=Ml(e,t);if(n.state>hte)throw new Error("too late; already scheduled");return n}function yu(e,t){var n=Ml(e,t);if(n.state>gE)throw new Error("too late; already running");return n}function Ml(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Tke(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=dte(o,0,n.time);function o(c){n.state=SG,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var d,h,p,m;if(n.state!==SG)return u();for(d in r)if(m=r[d],m.name===n.name){if(m.state===gE)return _G(s);m.state===EG?(m.state=mE,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+dL3&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function nLe(e,t,n){var r,i,o=tLe(t)?W6:yu;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function rLe(e,t){var n=this._id;return arguments.length<2?Ml(this.node(),n).on.on(e):this.each(nLe(n,e,t))}function iLe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oLe(){return this.on("end.remove",iLe(this._id))}function sLe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=F6(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function OLe(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 jC=new Tc(1,0,0);Tc.prototype;function EN(e){e.stopImmediatePropagation()}function Bb(e){e.preventDefault(),e.stopImmediatePropagation()}function MLe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function kLe(){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 CG(){return this.__zoom||jC}function LLe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function DLe(){return navigator.maxTouchPoints||"ontouchstart"in this}function NLe(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 CN(){var e=MLe,t=kLe,n=NLe,r=LLe,i=DLe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=bke,c=U6("start","zoom","end"),d,h,p,m=500,v=150,y=0,S=10;function w(L){L.property("__zoom",CG).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(L,F,z,G){var W=L.selection?L.selection():L;W.property("__zoom",CG),L!==W?A(L,F,z,G):W.interrupt().each(function(){I(this,arguments).event(G).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},w.scaleBy=function(L,F,z,G){w.scaleTo(L,function(){var W=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return W*K},z,G)},w.scaleTo=function(L,F,z,G){w.transform(L,function(){var W=t.apply(this,arguments),K=this.__zoom,q=z==null?E(W):typeof z=="function"?z.apply(this,arguments):z,Q=K.invert(q),re=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,re),q,Q),W,s)},z,G)},w.translateBy=function(L,F,z,G){w.transform(L,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,G)},w.translateTo=function(L,F,z,G,W){w.transform(L,function(){var K=t.apply(this,arguments),q=this.__zoom,Q=G==null?E(K):typeof G=="function"?G.apply(this,arguments):G;return n(jC.translate(Q[0],Q[1]).scale(q.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),K,s)},G,W)};function b(L,F){return F=Math.max(o[0],Math.min(o[1],F)),F===L.k?L:new Tc(F,L.x,L.y)}function x(L,F,z){var G=F[0]-z[0]*L.k,W=F[1]-z[1]*L.k;return G===L.x&&W===L.y?L:new Tc(L.k,G,W)}function E(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function A(L,F,z,G){L.on("start.zoom",function(){I(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(G).end()}).tween("zoom",function(){var W=this,K=arguments,q=I(W,K).event(G),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=u(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)}q.zoom(null,ae)}})}function I(L,F,z){return!z&&L.__zooming||new R(L,F)}function R(L,F){this.that=L,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(L,F),this.taps=0}R.prototype={event:function(L){return L&&(this.sourceEvent=L),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,F){return this.mouse&&L!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&L!=="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(L){var F=$o(this.that).datum();c.call(L,this.that,new OLe(L,{sourceEvent:this.sourceEvent,target:w,type:L,transform:this.that.__zoom,dispatch:c}),F)}};function M(L,...F){if(!e.apply(this,arguments))return;var z=I(this,F).event(L),G=this.__zoom,W=Math.max(o[0],Math.min(o[1],G.k*Math.pow(2,r.apply(this,arguments)))),K=jh(L);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=G.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(G.k===W)return;z.mouse=[K,G.invert(K)],vE(this),z.start()}Bb(L),z.wheel=setTimeout(q,v),z.zoom("mouse",n(x(b(G,W),z.mouse[0],z.mouse[1]),z.extent,s));function q(){z.wheel=null,z.end()}}function D(L,...F){if(p||!e.apply(this,arguments))return;var z=L.currentTarget,G=I(this,F,!0).event(L),W=$o(L.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",ue,!0),K=jh(L,z),q=L.clientX,Q=L.clientY;VMe(L.view),EN(L),G.mouse=[K,this.__zoom.invert(K)],vE(this),G.start();function re(ce){if(Bb(ce),!G.moved){var se=ce.clientX-q,J=ce.clientY-Q;G.moved=se*se+J*J>y}G.event(ce).zoom("mouse",n(x(G.that.__zoom,G.mouse[0]=jh(ce,z),G.mouse[1]),G.extent,s))}function ue(ce){W.on("mousemove.zoom mouseup.zoom",null),XMe(ce.view,G.moved),Bb(ce),G.event(ce).end()}}function N(L,...F){if(e.apply(this,arguments)){var z=this.__zoom,G=jh(L.changedTouches?L.changedTouches[0]:L,this),W=z.invert(G),K=z.k*(L.shiftKey?.5:2),q=n(x(b(z,K),G,W),t.apply(this,F),s);Bb(L),a>0?$o(this).transition().duration(a).call(A,q,G,L):$o(this).call(w.transform,q,G,L)}}function H(L,...F){if(e.apply(this,arguments)){var z=L.touches,G=z.length,W=I(this,F,L.changedTouches.length===G).event(L),K,q,Q,re;for(EN(L),q=0;q"u"&&(m=!0),typeof v>"u"&&(v=1/0);function E(A,I){if(A===null)return null;if(I===0)return A;var R,M;if(typeof A!="object")return A;if(n(A,r))R=new r;else if(n(A,i))R=new i;else if(n(A,o))R=new o(function(G,W){A.then(function(K){G(E(K,I-1))},function(K){W(E(K,I-1))})});else if(s.__isArray(A))R=[];else if(s.__isRegExp(A))R=new RegExp(A.source,h(A)),A.lastIndex&&(R.lastIndex=A.lastIndex);else if(s.__isDate(A))R=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(A.length):R=new Buffer(A.length),A.copy(R),R;n(A,Error)?R=Object.create(A):typeof y>"u"?(M=Object.getPrototypeOf(A),R=Object.create(M)):(R=Object.create(y),M=y)}if(m){var D=w.indexOf(A);if(D!=-1)return b[D];w.push(A),b.push(R)}n(A,r)&&A.forEach(function(G,W){var K=E(W,I-1),q=E(G,I-1);R.set(K,q)}),n(A,i)&&A.forEach(function(G){var W=E(G,I-1);R.add(W)});for(var N in A){var H;M&&(H=Object.getOwnPropertyDescriptor(M,N)),!(H&&H.set==null)&&(R[N]=E(A[N],I-1))}if(Object.getOwnPropertySymbols)for(var V=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Gi[e[t+0]]+Gi[e[t+1]]+Gi[e[t+2]]+Gi[e[t+3]]+"-"+Gi[e[t+4]]+Gi[e[t+5]]+"-"+Gi[e[t+6]]+Gi[e[t+7]]+"-"+Gi[e[t+8]]+Gi[e[t+9]]+"-"+Gi[e[t+10]]+Gi[e[t+11]]+Gi[e[t+12]]+Gi[e[t+13]]+Gi[e[t+14]]+Gi[e[t+15]]).toLowerCase();if(!ULe(n))throw TypeError("Stringified UUID is invalid");return n}function AN(e,t,n){e=e||{};var r=e.random||(e.rng||FLe)();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 jLe(r)}var N3={exports:{}},B3={exports:{}},HLe=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?fe.createElement(gLe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):fe.createElement("g",{className:e.className,transform:e.transform},e.children),vLe=15,RG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},yLe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>fe.createElement(fe.Fragment,null,fe.createElement("circle",{r:vLe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),fe.createElement("g",{className:"rd3t-label"},fe.createElement("text",Object.assign({className:"rd3t-label__title"},RG.title),e.name),fe.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],a)=>fe.createElement("tspan",Object.assign({key:`${o}-${a}`},RG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let bLe=class extends fe.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:yLe,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,a=o?n.y:0;return r==="horizontal"?`translate(${a},${s})`:`translate(${s},${a})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?$o(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):($o(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 fe.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 z3=Math.PI,U3=2*z3,tp=1e-6,xLe=U3-tp;function j3(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Rte(){return new j3}j3.prototype=Rte.prototype={constructor:j3,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,a=n-e,u=r-t,c=o-e,d=s-t,h=c*c+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>tp)if(!(Math.abs(d*a-u*c)>tp)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,m=r-s,v=a*a+u*u,y=p*p+m*m,S=Math.sqrt(v),w=Math.sqrt(h),b=i*Math.tan((z3-Math.acos((v+h-y)/(2*S*w)))/2),x=b/w,E=b/S;Math.abs(x-1)>tp&&(this._+="L"+(e+x*c)+","+(t+x*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>c*m)+","+(this._x1=e+E*a)+","+(this._y1=t+E*u)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),a=n*Math.sin(r),u=e+s,c=t+a,d=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+u+","+c:(Math.abs(this._x1-u)>tp||Math.abs(this._y1-c)>tp)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%U3+U3),h>xLe?this._+="A"+n+","+n+",0,1,"+d+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+d+","+(this._x1=u)+","+(this._y1=c):h>tp&&(this._+="A"+n+","+n+",0,"+ +(h>=z3)+","+d+","+(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 PG(e){return function(){return e}}function wLe(e){return e[0]}function _Le(e){return e[1]}var SLe=Array.prototype.slice;function ELe(e){return e.source}function CLe(e){return e.target}function Pte(e){var t=ELe,n=CLe,r=wLe,i=_Le,o=null;function s(){var a,u=SLe.call(arguments),c=t.apply(this,u),d=n.apply(this,u);if(o||(o=a=Rte()),e(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=d,u)),+i.apply(this,u)),a)return o=null,a+""||null}return s.source=function(a){return arguments.length?(t=a,s):t},s.target=function(a){return arguments.length?(n=a,s):n},s.x=function(a){return arguments.length?(r=typeof a=="function"?a:PG(+a),s):r},s.y=function(a){return arguments.length?(i=typeof a=="function"?a:PG(+a),s):i},s.context=function(a){return arguments.length?(o=a??null,s):o},s}function TLe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function ALe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function ILe(){return Pte(TLe)}function RLe(){return Pte(ALe)}class PLe extends fe.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?$o(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):($o(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"?ILe()({source:[r.y,r.x],target:[i.y,i.x]}):RLe()({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 fe.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 OLe=` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=yte,t.componentWillReceiveProps=bte),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=xte;var a=t.componentDidUpdate;t.componentDidUpdate=function(c,d,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;a.call(this,c,d,p)}}return e}const XLe=Object.freeze(Object.defineProperty({__proto__:null,polyfill:VLe},Symbol.toStringTag,{value:"Module"})),qLe=e4(XLe);var vI={};vI.__esModule=!0;vI.getChildMapping=KLe;vI.mergeChildMappings=QLe;var YLe=O;function KLe(e){if(!e)return e;var t={};return YLe.Children.map(e,function(n){return n}).forEach(function(n){t[n.key]=n}),t}function QLe(e,t){e=e||{},t=t||{};function n(d){return t.hasOwnProperty(d)?t[d]:e[d]}var r={},i=[];for(var o in e)t.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var s=void 0,a={};for(var u in t){if(r.hasOwnProperty(u))for(s=0;se.enableLegacyTransitions?fe.createElement(gDe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):fe.createElement("g",{className:e.className,transform:e.transform},e.children),vDe=15,PG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},yDe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>fe.createElement(fe.Fragment,null,fe.createElement("circle",{r:vDe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),fe.createElement("g",{className:"rd3t-label"},fe.createElement("text",Object.assign({className:"rd3t-label__title"},PG.title),e.name),fe.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],a)=>fe.createElement("tspan",Object.assign({key:`${o}-${a}`},PG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let bDe=class extends fe.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:yDe,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,a=o?n.y:0;return r==="horizontal"?`translate(${a},${s})`:`translate(${s},${a})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?$o(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):($o(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 fe.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 U3=Math.PI,j3=2*U3,tp=1e-6,xDe=j3-tp;function H3(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Pte(){return new H3}H3.prototype=Pte.prototype={constructor:H3,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,a=n-e,u=r-t,c=o-e,d=s-t,h=c*c+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>tp)if(!(Math.abs(d*a-u*c)>tp)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,m=r-s,v=a*a+u*u,y=p*p+m*m,S=Math.sqrt(v),w=Math.sqrt(h),b=i*Math.tan((U3-Math.acos((v+h-y)/(2*S*w)))/2),x=b/w,E=b/S;Math.abs(x-1)>tp&&(this._+="L"+(e+x*c)+","+(t+x*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>c*m)+","+(this._x1=e+E*a)+","+(this._y1=t+E*u)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),a=n*Math.sin(r),u=e+s,c=t+a,d=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+u+","+c:(Math.abs(this._x1-u)>tp||Math.abs(this._y1-c)>tp)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%j3+j3),h>xDe?this._+="A"+n+","+n+",0,1,"+d+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+d+","+(this._x1=u)+","+(this._y1=c):h>tp&&(this._+="A"+n+","+n+",0,"+ +(h>=U3)+","+d+","+(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 OG(e){return function(){return e}}function wDe(e){return e[0]}function _De(e){return e[1]}var SDe=Array.prototype.slice;function EDe(e){return e.source}function CDe(e){return e.target}function Ote(e){var t=EDe,n=CDe,r=wDe,i=_De,o=null;function s(){var a,u=SDe.call(arguments),c=t.apply(this,u),d=n.apply(this,u);if(o||(o=a=Pte()),e(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=d,u)),+i.apply(this,u)),a)return o=null,a+""||null}return s.source=function(a){return arguments.length?(t=a,s):t},s.target=function(a){return arguments.length?(n=a,s):n},s.x=function(a){return arguments.length?(r=typeof a=="function"?a:OG(+a),s):r},s.y=function(a){return arguments.length?(i=typeof a=="function"?a:OG(+a),s):i},s.context=function(a){return arguments.length?(o=a??null,s):o},s}function TDe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function ADe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function IDe(){return Ote(TDe)}function RDe(){return Ote(ADe)}class PDe extends fe.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?$o(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):($o(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"?IDe()({source:[r.y,r.x],target:[i.y,i.x]}):RDe()({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 fe.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 ODe=` /* Tree */ .rd3t-tree-container { width: 100%; @@ -651,23 +651,23 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat fill: none; stroke: #000; } -`;let Ote=class tl extends fe.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:tl.assignInternalProperties(Mo(this.props.data)),d3:tl.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${AN()}`,this.gInstanceRef=`rd3t-g-${AN()}`,this.handleNodeToggle=t=>{const n=Mo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(tl.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):tl.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=Mo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,a=Mo(n).map(u=>tl.assignInternalProperties([u],s+1));o.children.push(...a.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=$o(`.${this.gInstanceRef}`),a=$o(`.${this.svgInstanceRef}`),u=this.state.d3.scale;let c,d;r==="horizontal"?(d=-t.x*u+n.height/2,c=-t.y*u+n.width/2):(c=-t.x*u+n.width/2,d=-t.y*u+n.height/2),s.transition().duration(o).attr("transform","translate("+c+","+d+")scale("+u+")"),a.call(CN().transform,UC.translate(c,d).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:tl.assignInternalProperties(Mo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=tl.calculateD3Geometry(t);return G1(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}),(!G1(this.props.translate,t.translate)||!G1(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?Mo(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:a}=t,u=$o(`.${this.svgInstanceRef}`),c=$o(`.${this.gInstanceRef}`);u.call(CN().transform,UC.translate(i.x,i.y).scale(o)),u.call(CN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(d=>a?d.target.classList.contains(this.svgInstanceRef)||d.target.classList.contains(this.gInstanceRef)||d.shiftKey:!0).on("zoom",d=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(d.sourceEvent.type)||(c.attr("transform",d.transform),typeof s=="function"&&(s({node:null,zoom:d.transform.k,translate:{x:d.transform.x,y:d.transform.y}}),this.state.d3.scale=d.transform.k,this.state.d3.translate={x:d.transform.x,y:d.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=AN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=tl.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=>{tl.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=>tl.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,u=uOe().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)(B6(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let c=u.descendants();const d=u.links();return t!==void 0&&s&&this.setInitialTreeDepth(c,t),n&&c.forEach(h=>{h.y=h.depth*n}),{nodes:c,links:d}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomfe.createElement(PLe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:m,linkData:w,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((w,b)=>{const{data:x,x:E,y:A,parent:I}=w;return fe.createElement(bLe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:w,parent:I,nodeClassName:this.getNodeClassName(I,x),renderCustomNodeElement:r,nodeSize:a,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})}))))}};Ote.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[Vp,MLe]=gu({playback:"paused"});function qx(){return qx=Object.assign||function(e){for(var t=1;t0?1:-1}),RN}var eNe=JLe()?Math.sign:ZLe(),tNe=eNe,nNe=Math.abs,rNe=Math.floor,iNe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:tNe(e)*rNe(nNe(e)))},oNe=iNe,sNe=Math.max,ng=function(e){return sNe(0,oNe(e))},aNe=ng,Lte=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:aNe(e)},wd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},lNe=tg,Rv=function(e){if(!lNe(e))throw new TypeError("Cannot use null or undefined");return e},uNe=wd,cNe=Rv,fNe=Function.prototype.bind,kG=Function.prototype.call,dNe=Object.keys,hNe=Object.prototype.propertyIsEnumerable,pNe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(cNe(n)),uNe(r),i=dNe(n),s&&i.sort(typeof s=="function"?fNe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),kG.call(e,i,function(a,u){return hNe.call(n,a)?kG.call(r,o,n[a],a,n,u):t})}},yI=pNe("forEach"),rg={},Nte={exports:{}},gNe=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")},PN,DG;function mNe(){return DG||(DG=1,PN=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),PN}var ON,LG;function vNe(){if(LG)return ON;LG=1;var e=tg,t=Object.keys;return ON=function(n){return t(e(n)?Object(n):n)},ON}var MN,NG;function yNe(){return NG||(NG=1,MN=mNe()()?Object.keys:vNe()),MN}var kN,BG;function bNe(){if(BG)return kN;BG=1;var e=yNe(),t=Rv,n=Math.max;return kN=function(r,i){var o,s,a=n(arguments.length,2),u;for(r=Object(t(r)),u=function(c){try{r[c]=i[c]}catch(d){o||(o=d)}},s=1;s-1},BN}var $Ne=NNe()?String.prototype.contains:BNe(),vE=jte,WG=LNe,Hte=Bte,Wte=Dte,V1=$Ne,FNe=Ute.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],vE(e)?(n=V1.call(e,"c"),r=V1.call(e,"e"),i=V1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Hte(Wte(o),s):s};FNe.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],vE(t)?WG(t)?vE(n)?WG(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,vE(e)?(r=V1.call(e,"c"),i=V1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Hte(Wte(o),s):s};var ig=Ute.exports,W3={exports:{}};(function(e,t){var n=ig,r=wd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,u=Object.defineProperties,c=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},h,p,m,v,y,S,w;h=function(b,x){var E;return r(x),c.call(this,"__ee__")?E=this.__ee__:(E=d.value=s(null),a(this,"__ee__",d),d.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,A;return r(x),A=this,h.call(this,b,E=function(){m.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},m=function(b,x){var E,A,I,R;if(r(x),!c.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(R=0;I=A[R];++R)(I===x||I.__eeOnceListener__===x)&&(A.length===2?E[b]=A[R?0:1]:A.splice(R,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,I,R;if(c.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=m?c.call(m,v,M,w):M,y?(d.value=M,h(b,w,d)):b[w]=M,++w;x=w}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?d=s(d):d=t(this.length)-s(o(d)),u=d;u"}},yB}var bB,R9;function DBe(){if(R9)return bB;R9=1;var e=kBe(),t=/[\n\r\u2028\u2029]/g;return bB=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},bB}var rS={exports:{}},P9;function Kte(){if(P9)return rS.exports;P9=1,rS.exports=e,rS.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return rS.exports}var O9;function LBe(){if(O9)return S9;O9=1;var e=qte(),t=PBe(),n=MBe(),r=DBe(),i=Kte(),o=J6(),s=Object.create,a=t("then","then:finally","done","done:finally");return rg.promise=function(u,c){var d=s(null),h=s(null),p=s(null);if(u===!0)u=null;else if(u=n(u),!a[u])throw new TypeError("'"+r(u)+"' is not valid promise mode");c.on("set",function(m,v,y){var S=!1;if(!i(y)){h[m]=y,c.emit("setasync",m,1);return}d[m]=1,p[m]=y;var w=function(A){var I=d[m];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.`);I&&(delete d[m],h[m]=A,c.emit("setasync",m,I))},b=function(){S=!0,d[m]&&(delete d[m],delete p[m],c.delete(m))},x=u;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(w.bind(this,A))},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(w,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(w),y.finally(b)}}),c.on("get",function(m,v,y){var S;if(d[m]){++d[m];return}S=p[m];var w=function(){c.emit("getasync",m,v,y)};i(S)?typeof S.done=="function"?S.done(w):S.then(function(){o(w)}):w()}),c.on("delete",function(m){if(delete p[m],d[m]){delete d[m];return}if(hasOwnProperty.call(h,m)){var v=h[m];delete h[m],c.emit("deleteasync",m,[v])}}),c.on("clear",function(){var m=h;h=s(null),d=s(null),p=s(null),c.emit("clearasync",e(m,function(v){return[v]}))})},S9}var M9={},k9;function NBe(){if(k9)return M9;k9=1;var e=wd,t=yI,n=rg,r=Function.prototype.apply;return n.dispose=function(i,o,s){var a;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",a=function(u,c){r.call(i,null,c)}),o.on("clearasync",function(u){t(u,function(c,d){a(d,c)})});return}o.on("delete",a=function(u,c){i(c)}),o.on("clear",function(u){t(u,function(c,d){a(d,c)})})},M9}var D9={},xB,L9;function BBe(){return L9||(L9=1,xB=2147483647),xB}var wB,N9;function $Be(){if(N9)return wB;N9=1;var e=ng,t=BBe();return wB=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},wB}var B9;function FBe(){if(B9)return D9;B9=1;var e=K6(),t=yI,n=J6(),r=Kte(),i=$Be(),o=rg,s=Function.prototype,a=Math.max,u=Math.min,c=Object.create;return o.maxAge=function(d,h,p){var m,v,y,S;d=i(d),d&&(m=c(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(w){m[w]=setTimeout(function(){h.delete(w)},d),typeof m[w].unref=="function"&&m[w].unref(),S&&(S[w]&&S[w]!=="nextTick"&&clearTimeout(S[w]),S[w]=setTimeout(function(){delete S[w]},y),typeof S[w].unref=="function"&&S[w].unref())}),h.on("delete"+v,function(w){clearTimeout(m[w]),delete m[w],S&&(S[w]!=="nextTick"&&clearTimeout(S[w]),delete S[w])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=a(u(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*d,h.on("get"+v,function(w,b,x){S[w]||(S[w]="nextTick",n(function(){var E;S[w]==="nextTick"&&(delete S[w],h.delete(w),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(m,function(w){clearTimeout(w)}),m={},S&&(t(S,function(w){w!=="nextTick"&&clearTimeout(w)}),S={})}))},D9}var $9={},_B,F9;function zBe(){if(F9)return _B;F9=1;var e=ng,t=Object.create,n=Object.prototype.hasOwnProperty;return _B=function(r){var i=0,o=1,s=t(null),a=t(null),u=0,c;return r=e(r),{hit:function(d){var h=a[d],p=++u;if(s[p]=d,a[d]=p,!h)return++i,i<=r?void 0:(d=s[o],c(d),d);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:c=function(d){var h=a[d];if(h&&(delete s[h],delete a[d],--i,o===h)){if(!i){u=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),a=t(null),u=0}}},_B}var z9;function UBe(){if(z9)return $9;z9=1;var e=ng,t=zBe(),n=rg;return n.max=function(r,i,o){var s,a,u;r=e(r),r&&(a=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,u=function(c){c=a.hit(c),c!==void 0&&i.delete(c)}),i.on("get"+s,u),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))},$9}var U9={},j9;function jBe(){if(j9)return U9;j9=1;var e=ig,t=rg,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var a,u;a=n(null),u=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+u,function(c,d){a[c]=d||1}),o.on("get"+u,function(c){++a[c]}),o.on("delete"+u,function(c){delete a[c]}),o.on("clear"+u,function(){a={}}),r(o.memoized,{deleteRef:e(function(){var c=o.get(arguments);return c===null||!a[c]?null:--a[c]?!1:(o.delete(c),!0)}),getRefCount:e(function(){var c=o.get(arguments);return c===null||!a[c]?0:a[c]})})},U9}var HBe=Dte,WBe=Lte,GBe=xBe,VBe=function(e){var t=HBe(arguments[1]),n;return t.normalizer||(n=t.length=WBe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=wBe():n>1&&(t.normalizer=_Be()(n)):n===!1?t.normalizer=TBe()():n===1?t.normalizer=ABe()():t.normalizer=IBe()(n))),t.async&&RBe(),t.promise&&LBe(),t.dispose&&NBe(),t.maxAge&&FBe(),t.max&&UBe(),t.refCounter&&jBe(),GBe(e,t)};const Pv=Ma(VBe),XBe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},qBe=e=>t=>XBe(e)(n=>(n.postMessage(t),new Promise(r=>{n.onmessage=i=>{r(i.data)}}))),Ov=(e,t={async:!0,length:1})=>Pv(qBe(e),t),YBe=""+new URL("tree.worker-a5e2610c.js",import.meta.url).href;class KBe extends Worker{constructor(){super(YBe,{type:"module"})}}const QBe=Ov(KBe);function JBe(e){return Iv(async()=>await QBe(e),[e])}function ZBe(e,t){const n=O.useMemo(()=>e,t);return JBe(n)}const e$e=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),t$e=Ote;function Qte(e,t=!1){const[n,r]=O.useState();return O.useEffect(()=>{t||e&&r(e)},[e,t]),n}const H9={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 n$e(){var w,b,x,E;const[{step:e=0}]=Vp(),t=Nz(e,600),{palette:n}=Dn(),[{layers:r}]=Oa(),[i,o]=O.useState();O.useEffect(()=>{var A;i||o((A=ie.head(r))==null?void 0:A.key)},[i,o,r]);const s=ie.find(r,{key:i}),{controls:a,onChange:u,state:c}=bd(),[d,h]=O.useState("small"),p=Ex({"&.rd3t-link":{stroke:An(n.text.primary,n.action.disabledOpacity)}}),{result:m,loading:v}=ZBe({trace:(b=(w=s==null?void 0:s.source)==null?void 0:w.trace)==null?void 0:b.content,step:t,radius:H9[d].value},[t,s,d]),y=Qte(m,v),S=O.useCallback(()=>p,[p]);return C.jsxs(zn,{onChange:u,stack:c,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:(E=(x=s==null?void 0:s.source)==null?void 0:x.trace)!=null&&E.content&&(y!=null&&y.tree)?C.jsx(KA,{children:({width:A,height:I})=>C.jsx(gt,{width:A,height:I,children:C.jsx(t$e,{scaleExtent:{max:10,min:.01},translate:{x:A/2,y:A/2},data:y.tree,dimensions:{width:A,height:I},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:R,onNodeClick:M})=>C.jsx(r$e,{node:R,onClick:()=>M==null?void 0:M({})})})})}):C.jsx(hp,{icon:C.jsx(TQ,{}),label:"Tree"})})})," ",C.jsxs(zn.Options,{children:[C.jsx(Hs,{icon:C.jsx(_w,{}),label:"Layer",value:i,items:ie.map(r,A=>({id:A.key,name:Ta(A)})),onChange:o,showArrow:!0}),e$e,C.jsx(Hs,{icon:C.jsx(Ixe,{}),label:"Radius",value:d,onChange:A=>h(A),items:ie.map(ie.entries(H9),([A,I])=>({id:A,...I})),showArrow:!0})]}),C.jsx(zn.Extras,{children:a})]})}const Fb=16,hc=4;function r$e({onClick:e,node:t}){var h;const[{step:n=0},r]=Vp(),i=Nz(n,1e3/24),{palette:o,spacing:s,shape:a}=Dn(),u=ie.findLast(t==null?void 0:t.events,p=>p.step<=i),c=!!ie.find(t==null?void 0:t.events,p=>p.step===i),d=jx((h=u==null?void 0:u.data)==null?void 0:h.type);return C.jsx(_v,{variant:"popover",children:p=>{var m,v;return C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:`f: ${((m=u==null?void 0:u.data)==null?void 0:m.f)??"unknown"}, g: ${((v=u==null?void 0:u.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(-hc/2),x:s(-.25),strokeWidth:0,width:s(Fb),height:s(hc),rx:a.borderRadius})}),C.jsx("rect",{y:s(-hc/2),x:s(-.25),strokeWidth:0,fill:o.background.default,width:s(Fb),height:s(hc),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:s(-hc/2),x:s(-.25),strokeWidth:0,fill:An(o.primary.main,o.action.selectedOpacity),width:s(Fb),height:s(hc),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:s(-.25),y:s(-hc/2),height:s(hc),width:s(.5),fill:d,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(Fb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(axe,{width:s(2),height:s(2),x:s(Fb-2-1),y:s(-hc/2+1),strokeWidth:0,fill:o.text.primary,opacity:o.action.disabledOpacity})]})]})}),C.jsx(xv,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...qA(p),children:C.jsx(Oz,{dense:!0,sx:{p:0},children:ie.map(t==null?void 0:t.events,y=>C.jsx(Vf,{selected:y.step===i,sx:{borderLeft:`4px solid ${jx(y.data.type)}`},onClick:()=>{p.close(),e==null||e(),ie.delay(()=>r({step:y.step}),150)},children:C.jsx(Dz,{primary:ie.startCase(y.data.type),secondary:`Step ${y.step}`})}))})})]})}})}function i$e({selection:e,onClose:t}){const n=o$e(),r=Qte(e),{client:i}=e??{};return C.jsx(xv,{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(Oz,{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(([,a])=>a.index).map(([,{items:a,primary:u}],c)=>C.jsxs(C.Fragment,{children:[!!c&&C.jsx(Kc,{sx:{my:1,mx:2}}),u&&C.jsx(N1,{sx:{py:0},children:C.jsx(Wt,{color:"text.secondary",variant:"overline",children:u})}),ie.chain(a).entries().sortBy(([,d])=>d.index).map(([d,{action:h,icon:p,primary:m,secondary:v}])=>h?C.jsxs(Vf,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Gf,{children:p}),C.jsx(ru,{primary:m,sx:{mr:4}}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:v})]},d):C.jsxs(N1,{children:[p&&C.jsx(Gf,{children:p}),C.jsx(ru,{primary:m,sx:{mr:4}}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:v})]},d)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(N1,{children:C.jsx(Wt,{children:"No info to show."})})})}})})})}const W9=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function o$e(){const[{layers:e}]=Oa();return O.useMemo(()=>ie.chain(e).reduce((t,n)=>{var i;const r=((i=sne(n))==null?void 0:i.getSelectionInfo)??W9;return({children:o,event:s})=>C.jsx(r,{layer:n,event:s,children:a=>C.jsx(t,{event:s,children:u=>o==null?void 0:o(ie.merge(a,u))})})},W9).value(),[e])}const[xI,s$e]=gu([],{reduce:DQ}),a$e={tileSubdivision:2,workerCount:2,tileResolution:{width:1024,height:1024}},Jte=O.createContext({});function l$e(){return O.useContext(Jte)}function u$e(e,{width:t,height:n}={}){const r=Dn(),[i]=xI(),o=O.useRef(null),[s,a]=O.useState(""),[u,c]=O.useState();return O.useEffect(()=>{if(a(""),o.current&&t&&n&&e){const d=ie.find(i,h=>h.renderer.meta.id===e);if(d){const h=new d.renderer.constructor;return h.setup({...a$e,backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),c(h),()=>{var p,m;try{(m=(p=o.current)==null?void 0:p.removeChild)==null||m.call(p,h.getView()),c(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ie.map,e,i,r,a,c]),Vxe(()=>{u&&t&&n&&u.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[u,t,n]),{instance:u,ref:o,error:s}}function c$e(){const[{map:e,specimen:t}]=dI();return!!(e||t)&&C.jsx(BA,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function f$e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:a}=u$e(n,{width:e,height:t}),[u,c]=O.useState();O.useEffect(()=>{if(o){const h=(p,m)=>{const v=p;c({client:{x:v.clientX,y:v.clientY},world:m.world,info:{point:m.world,components:m.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const d=O.useMemo(()=>({renderer:o}),[o]);return O.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(c$e,{}),C.jsx(Jte.Provider,{value:d,children:i!=null&&i.length?s?C.jsxs(gt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(ixe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(gt,{ref:a,children:i.map(h=>C.jsx(fFe,{layer:h},h.key))})}):C.jsx(hp,{icon:C.jsx(OQ,{}),label:"No layers to render",width:e,height:t})}),C.jsx(i$e,{selection:u,onClose:()=>c(void 0)})]})}function HC({nodes:e}){const{renderer:t}=l$e();return O.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function d$e({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(HC,{nodes:i}),C.jsx(HC,{nodes:o})]})}const wI=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,h$e=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class p$e extends Worker{constructor(){super(h$e,{type:"module"})}}const g$e=Ov(p$e),{floor:G9}=Math;function V9(e,t,n){return e>=t&&e({...await g$e({map:e,options:t})}),{normalizer:JSON.stringify}),v$e=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,a]=[G9(r+o/2),G9(i+o/2)];if(V9(s,0,t)&&V9(a,0,n))return{x:s,y:a}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wI}},y$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:v$e,parse:m$e},Symbol.toStringTag,{value:"Module"})),b$e=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class x$e extends Worker{constructor(){super(b$e,{type:"module"})}}const w$e=Ov(x$e),_$e=Pv(async(e="",t)=>await w$e({map:e,options:t}),{normalizer:JSON.stringify}),S$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),E$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:S$e,parse:_$e},Symbol.toStringTag,{value:"Module"})),C$e=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class T$e extends Worker{constructor(){super(C$e,{type:"module"})}}const A$e=Ov(T$e),I$e=Pv(async(e="",t)=>await A$e({map:e,options:t}),{normalizer:JSON.stringify}),R$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),P$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:R$e,parse:I$e},Symbol.toStringTag,{value:"Module"})),O$e=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class M$e extends Worker{constructor(){super(O$e,{type:"module"})}}const k$e=Ov(M$e),D$e=Pv(async(e="",t)=>await k$e({map:e,options:t}),{normalizer:JSON.stringify}),L$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),N$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:L$e,parse:D$e},Symbol.toStringTag,{value:"Module"})),Z6={grid:y$e,xy:P$e,mesh:E$e,poly:N$e};function Zte(e=""){return Z6[e]}const B$e=(e,t,n)=>{const r=O.useRef(n||[]),o=r.current===n||!r.current.every((a,u)=>a===n[u]);r.current=n;const s=t.map(()=>null);return O.useEffect(o?()=>void e():()=>{},o?t:s)};function $$e(e,t){return ie.zip(e,t).every(([n,r])=>n===r)}const F$e=(e,t=[],n=[])=>{const[r,i]=O.useState(t),[o,s]=O.useState(n);return O.useEffect(()=>{$$e(o,n)||(i(t),s(n))},[t,n,o]),kte(e,[...r,...o])};function eU(){const[e]=Zm();return O.useCallback(t=>ie.find(e,t),[e])}function z$e(e){return eU()({url:e})}function U$e(e){const t=mu(),n=eg("map"),r=eU(),i=O.useMemo(()=>Pv(async({source:u,id:c}={})=>{if(u&&c){const d=r({url:u});if(d){t("Fetching map...");const h=await d.call("features/map",{id:c});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:a}=e??{};return Iv(()=>n(async()=>{if(a)return{...e,content:o||await i({source:s,id:a})}}),[i,o,s,a])}function j$e(e){const t=mu(),n=Dn(),r=eg("map"),{format:i,content:o}=e??{};return Iv(()=>r(async()=>{var a,u;const s=n.palette.mode==="dark"?pv:hv;if(i&&o){t("Processing map...");const c=await((u=(a=Zte(i))==null?void 0:a.parse)==null?void 0:u.call(a,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${c.nodes.length} elements, ${c.log.join(", ")}`),c}}),[i,o,n])}const H$e={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:Ax(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(Nx,{label:"Source",content:C.jsx($2e,{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(HC,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Ax(({value:e,produce:t})=>{var i;const{result:n}=U$e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=j$e(n);return B$e(()=>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]=Oa(),{point:s,node:a}=O.useMemo(()=>{var c,d,h,p;if(r&&t){const m=(p=(h=Zte((d=(c=n==null?void 0:n.source)==null?void 0:c.map)==null?void 0:d.format))==null?void 0:h.hydrate)==null?void 0:p.call(h,r);if(m){const v=(t==null?void 0:t.world)&&m.snap(t.world);if(v){const y=(t==null?void 0:t.world)&&m.nodeAt(v);return{point:v,node:y}}}}return{}},[r,t]),u=O.useMemo(()=>{const c=ie.filter(i,{source:{type:"query"}});return{...n&&s&&!ie.isUndefined(a)&&{[n.key]:{primary:Ta(n),items:{point:{primary:"Point",secondary:`(${ie.round(s.x,2)}, ${ie.round(s.y,2)})`},...ie.reduce(c,(d,h)=>({...d,[`${h.key}-a`]:{primary:"Set as source",secondary:Ta(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?Oc(p,m=>{ie.set(m,"source.start",a),ie.set(m,"source.query",void 0),ie.set(m,"source.mapLayerKey",n.key),ie.set(m,"source.trace",void 0)}):p)}),icon:C.jsx(Axe,{sx:{transform:"scale(0.5)"}})},[`${h.key}-b`]:{primary:"Set as destination",secondary:Ta(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?Oc(p,m=>{ie.set(m,"source.end",a),ie.set(m,"source.query",void 0),ie.set(m,"source.mapLayerKey",n.key),ie.set(m,"source.trace",void 0)}):p)}),icon:C.jsx(xxe,{})}}),{})}}}}},[s,a,n,i,o]);return C.jsx(C.Fragment,{children:e==null?void 0:e(u)})}};function W$e({label:e,value:t,type:n}){return C.jsxs(En,{width:"auto",mr:3,mt:.5,children:[C.jsx(Wt,{component:"div",sx:{opacity:.54},...n,children:e}),C.jsx(ai,{}),C.jsx(Wt,{component:"div",...n,children:t??"none"})]},`${e}::${t}`)}function G3({event:e,variant:t="body2",...n}){return C.jsx(En,{...n,children:ie.map(ie.filter(ie.entries(e),([,r])=>r!==void 0),([r,i])=>C.jsx(W$e,{label:r,value:i,type:{variant:t}}))})}var ene={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Kt,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,a){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},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(a){var u=a===void 0?{}:a,c=u.ESCAPE,d=c===void 0?/^\\/:c,h=u.VARIABLE_START,p=h===void 0?/^\${\s*/:h,m=u.VARIABLE_END,v=m===void 0?/^\s*}/:m,y=u.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,w=u.PIPE_PARAMETER_START,b=w===void 0?/^\s*:\s*/:w,x=u.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,A=u.QUOTED_STRING_TEST,I=A===void 0?null:A,R=u.QUOTED_STRING_GET_AND_ADVANCE,M=R===void 0?null:R,L=u.QUOTED_STRING_IN_PARAMETER_TEST,N=L===void 0?null:L,H=u.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,V=H===void 0?null:H,U=I||function(G){return E.test(G)},D=M||s(E),F=N||function(G){return E.test(G)},z=V||s(E);return function(G){function W(Oe){Oe===void 0&&(Oe=1),pe=pe.substr(Oe)}function K(Oe){Oe===void 0&&(Oe=/^/),W(pe.match(Oe)[0].length)}function q(){var Oe;return K(d),Oe=pe.length>0?pe[0]:"",W(),Oe}function Q(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;ge={name:"",pipes:[]},qe=!st}function re(){ve.variables.push(ge),Q({isNull:!0})}function ue(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;be={name:"",parameters:[]},ut=!st}function ce(){ge.pipes.push(be),ue({isNull:!0})}function se(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;Ze="",Bt=!st}function J(){be.parameters.push(Ze),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=G,ve={literals:[],variables:[]},ye=0,xe="",ge={name:"",pipes:[]},be={name:"",parameters:[]},Ze="",qe=!1,ut=!1,Bt=!1;pe&&pe.length>0;)switch(ye){case 0:if(d.test(pe)){xe+=q();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],W();break;case 1:if(d.test(pe)){ge.name+=q();continue}if(ae()||le())continue;if(U(pe)){ge.name+=D(pe,W);continue}ge.name+=pe[0],W();break;case 2:if(d.test(pe)){be.name+=q();continue}if(ae()||he()||le())continue;if(U(pe)){be.name+=D(pe,W);continue}be.name+=pe[0],W();break;case 3:if(d.test(pe)){Ze+=q();continue}if(ae()||he()||le())continue;if(F(pe)){Ze+=z(pe,W);continue}Ze+=pe[0],W()}return Bt&&be.parameters.push(Ze),ut&&ge.pipes.push(be),qe&&ve.variables.push(ge),ve.literals.push(xe),ve}}function s(a){return function(u,c){var d=u.match(a);return c(d[0].length),d.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 a in s)r.hasOwnProperty(a)||(r[a]=s[a])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(d){return function(h){return d.hasOwnProperty(h)?d[h]:h.split(".").reduce(function(p,m){return p.hasOwnProperty(m)?p[m]:""},d)}}function s(d,h,p,m){m===void 0&&(m=o(h));var v=m(d.name);return d.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function a(d,h,p,m){return m===void 0&&(m=o(h)),d.literals.length===0?"":d.literals.slice(1).reduce(function(v,y,S){return""+v+s(d.variables[S],h,p,m)+y},d.literals[0])}function u(d,h,p){return a(c.parseStringTemplate(d),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var c=i(0);r.evaluateParsedString=a,r.evaluateStringTemplate=u}])})})(ene);var X9=ene.exports;function tU(e={},t){const{$:n,...r}=e;return{...ie.mapValues(r,t),$:n}}function V3(e){switch(e==null?void 0:e.constructor){case Array:{const t=ie.map(e,V3);return n=>ie.map(t,r=>r(n))}case Object:{const t=ie.mapValues(e,V3);return n=>ie.mapValues(t,r=>r(n))}case String:return X3(e);default:return ie.constant(e)}}function WC(e={}){return tU(e,t=>ie.isFunction(t)?t:V3(t))}function q9(e){const t=Function("ctx",`return ${e};`);return n=>t(new Proxy(WC(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))}const G$e=/^\{\{\s*/,V$e=/^\s*\}\}/,SB=/\b\B/;function X3(e){const n=X9.parseStringTemplateGenerator({VARIABLE_START:G$e,VARIABLE_END:V$e,PIPE_START:SB,PIPE_PARAMETER_START:SB,QUOTED_STRING:SB})(e);return ie.join(n.literals,"")?r=>X9.evaluateParsedString(n,{},{},i=>q9(i)(r)):q9(n.variables[0].name)}function X$e(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 tne={exports:{}};(function(e,t){(function(n,r){typeof X$e=="function"?e.exports=r():n.pluralize=r()})(Kt,function(){var n=[],r=[],i={},o={},s={};function a(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function u(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 c(y,S){return y.replace(/\$(\d{1,2})/g,function(w,b){return S[b]||""})}function d(y,S){return y.replace(S[0],function(w,b){var x=c(S[1],arguments);return u(w===""?y[b-1]:w,x)})}function h(y,S,w){if(!y.length||i.hasOwnProperty(y))return S;for(var b=w.length;b--;){var x=w[b];if(x[0].test(S))return d(S,x)}return S}function p(y,S,w){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?u(b,x):y.hasOwnProperty(x)?u(b,y[x]):h(x,b,w)}}function m(y,S,w,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,w)===E}}function v(y,S,w){var b=S===1?v.singular(y):v.plural(y);return(w?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=m(s,o,n),v.singular=p(o,s,r),v.isSingular=m(o,s,r),v.addPluralRule=function(y,S){n.push([a(y),S])},v.addSingularRule=function(y,S){r.push([a(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})})(tne);var q$e=tne.exports;const Y$e=Ma(q$e),K$e=""+new URL("parseTrace.worker-b498921b.js",import.meta.url).href;class Q$e extends Worker{constructor(){super(K$e,{type:"module"})}}const J$e=Ov(Q$e);function Z$e(e){const t=mu(),n=eg("specimen");return Iv(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");const i=await J$e(e);return t("Trace loaded",Y$e("step",((r=i==null?void 0:i.steps)==null?void 0:r.length)??0,!0)),i}}),[e])}function eFe(e,t){const n=O.useMemo(()=>e,t);return Z$e(n)}function nne(e,t){const n=tU(t,r=>i=>r(nne(WC(i),e)));return{...e,...n}}function rne(e,t,n={}){return e.flatMap(r=>{const{$:i}=r,o=nne(WC(n),WC(r));return i in t?rne(t[i],t,o):[o]})}const tFe={color:hI};function ine(e,t="main"){const n=Dn();return O.useMemo(()=>{var i,o,s,a;const r=rne(((s=(o=(i=e==null?void 0:e.render)==null?void 0:i.views)==null?void 0:o[t])==null?void 0:s.components)??[],((a=e==null?void 0:e.render)==null?void 0:a.components)??{});return{events:(e==null?void 0:e.events)??[],apply:(u,c)=>ie.map(r,d=>tU(d,h=>h({fill:n.palette.primary.main,alpha:1,...tFe,...c,...u})))}},[e,t,n])}var EB=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ko,yE,nFe={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},cf;function CB(e){return EB.lastIndex=0,EB.test(e)?'"'+e.replace(EB,function(t){var n=nFe[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function bE(e,t,n){var r,i,o,s,a=ko,u,c=t[e];switch(c&&typeof c=="object"&&typeof c.toJSON=="function"&&(c=c.toJSON(e)),typeof cf=="function"&&(c=cf.call(t,e,c)),typeof c){case"string":return CB(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(ko+=yE,u=[],Object.prototype.toString.apply(c)==="[object Array]"){for(s=c.length,r=0;rn?`[ +`;let Mte=class tl extends fe.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:tl.assignInternalProperties(Mo(this.props.data)),d3:tl.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${AN()}`,this.gInstanceRef=`rd3t-g-${AN()}`,this.handleNodeToggle=t=>{const n=Mo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(tl.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):tl.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=Mo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,a=Mo(n).map(u=>tl.assignInternalProperties([u],s+1));o.children.push(...a.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Mo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Mo(t),Mo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=$o(`.${this.gInstanceRef}`),a=$o(`.${this.svgInstanceRef}`),u=this.state.d3.scale;let c,d;r==="horizontal"?(d=-t.x*u+n.height/2,c=-t.y*u+n.width/2):(c=-t.x*u+n.width/2,d=-t.y*u+n.height/2),s.transition().duration(o).attr("transform","translate("+c+","+d+")scale("+u+")"),a.call(CN().transform,jC.translate(c,d).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:tl.assignInternalProperties(Mo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=tl.calculateD3Geometry(t);return G1(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}),(!G1(this.props.translate,t.translate)||!G1(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?Mo(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:a}=t,u=$o(`.${this.svgInstanceRef}`),c=$o(`.${this.gInstanceRef}`);u.call(CN().transform,jC.translate(i.x,i.y).scale(o)),u.call(CN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(d=>a?d.target.classList.contains(this.svgInstanceRef)||d.target.classList.contains(this.gInstanceRef)||d.shiftKey:!0).on("zoom",d=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(d.sourceEvent.type)||(c.attr("transform",d.transform),typeof s=="function"&&(s({node:null,zoom:d.transform.k,translate:{x:d.transform.x,y:d.transform.y}}),this.state.d3.scale=d.transform.k,this.state.d3.translate={x:d.transform.x,y:d.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=AN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=tl.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=>{tl.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=>tl.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,u=uOe().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)($6(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let c=u.descendants();const d=u.links();return t!==void 0&&s&&this.setInitialTreeDepth(c,t),n&&c.forEach(h=>{h.y=h.depth*n}),{nodes:c,links:d}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomfe.createElement(PDe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:m,linkData:w,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((w,b)=>{const{data:x,x:E,y:A,parent:I}=w;return fe.createElement(bDe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:w,parent:I,nodeClassName:this.getNodeClassName(I,x),renderCustomNodeElement:r,nodeSize:a,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})}))))}};Mte.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[Vp,MDe]=gu({playback:"paused"});function qx(){return qx=Object.assign||function(e){for(var t=1;t0?1:-1}),RN}var eNe=JDe()?Math.sign:ZDe(),tNe=eNe,nNe=Math.abs,rNe=Math.floor,iNe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:tNe(e)*rNe(nNe(e)))},oNe=iNe,sNe=Math.max,ng=function(e){return sNe(0,oNe(e))},aNe=ng,Nte=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:aNe(e)},wd=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},lNe=tg,Rv=function(e){if(!lNe(e))throw new TypeError("Cannot use null or undefined");return e},uNe=wd,cNe=Rv,fNe=Function.prototype.bind,LG=Function.prototype.call,dNe=Object.keys,hNe=Object.prototype.propertyIsEnumerable,pNe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(cNe(n)),uNe(r),i=dNe(n),s&&i.sort(typeof s=="function"?fNe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),LG.call(e,i,function(a,u){return hNe.call(n,a)?LG.call(r,o,n[a],a,n,u):t})}},yI=pNe("forEach"),rg={},Bte={exports:{}},gNe=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")},PN,DG;function mNe(){return DG||(DG=1,PN=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),PN}var ON,NG;function vNe(){if(NG)return ON;NG=1;var e=tg,t=Object.keys;return ON=function(n){return t(e(n)?Object(n):n)},ON}var MN,BG;function yNe(){return BG||(BG=1,MN=mNe()()?Object.keys:vNe()),MN}var kN,$G;function bNe(){if($G)return kN;$G=1;var e=yNe(),t=Rv,n=Math.max;return kN=function(r,i){var o,s,a=n(arguments.length,2),u;for(r=Object(t(r)),u=function(c){try{r[c]=i[c]}catch(d){o||(o=d)}},s=1;s-1},BN}var $Ne=NNe()?String.prototype.contains:BNe(),yE=Hte,GG=DNe,Wte=$te,Gte=Dte,V1=$Ne,FNe=jte.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],yE(e)?(n=V1.call(e,"c"),r=V1.call(e,"e"),i=V1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Wte(Gte(o),s):s};FNe.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],yE(t)?GG(t)?yE(n)?GG(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,yE(e)?(r=V1.call(e,"c"),i=V1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Wte(Gte(o),s):s};var ig=jte.exports,G3={exports:{}};(function(e,t){var n=ig,r=wd,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,u=Object.defineProperties,c=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},h,p,m,v,y,S,w;h=function(b,x){var E;return r(x),c.call(this,"__ee__")?E=this.__ee__:(E=d.value=s(null),a(this,"__ee__",d),d.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,A;return r(x),A=this,h.call(this,b,E=function(){m.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},m=function(b,x){var E,A,I,R;if(r(x),!c.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(R=0;I=A[R];++R)(I===x||I.__eeOnceListener__===x)&&(A.length===2?E[b]=A[R?0:1]:A.splice(R,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,I,R;if(c.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=m?c.call(m,v,M,w):M,y?(d.value=M,h(b,w,d)):b[w]=M,++w;x=w}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?d=s(d):d=t(this.length)-s(o(d)),u=d;u"}},yB}var bB,P9;function LBe(){if(P9)return bB;P9=1;var e=kBe(),t=/[\n\r\u2028\u2029]/g;return bB=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},bB}var iS={exports:{}},O9;function Qte(){if(O9)return iS.exports;O9=1,iS.exports=e,iS.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return iS.exports}var M9;function DBe(){if(M9)return E9;M9=1;var e=Yte(),t=PBe(),n=MBe(),r=LBe(),i=Qte(),o=Z6(),s=Object.create,a=t("then","then:finally","done","done:finally");return rg.promise=function(u,c){var d=s(null),h=s(null),p=s(null);if(u===!0)u=null;else if(u=n(u),!a[u])throw new TypeError("'"+r(u)+"' is not valid promise mode");c.on("set",function(m,v,y){var S=!1;if(!i(y)){h[m]=y,c.emit("setasync",m,1);return}d[m]=1,p[m]=y;var w=function(A){var I=d[m];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.`);I&&(delete d[m],h[m]=A,c.emit("setasync",m,I))},b=function(){S=!0,d[m]&&(delete d[m],delete p[m],c.delete(m))},x=u;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(w.bind(this,A))},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(w,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(w),y.finally(b)}}),c.on("get",function(m,v,y){var S;if(d[m]){++d[m];return}S=p[m];var w=function(){c.emit("getasync",m,v,y)};i(S)?typeof S.done=="function"?S.done(w):S.then(function(){o(w)}):w()}),c.on("delete",function(m){if(delete p[m],d[m]){delete d[m];return}if(hasOwnProperty.call(h,m)){var v=h[m];delete h[m],c.emit("deleteasync",m,[v])}}),c.on("clear",function(){var m=h;h=s(null),d=s(null),p=s(null),c.emit("clearasync",e(m,function(v){return[v]}))})},E9}var k9={},L9;function NBe(){if(L9)return k9;L9=1;var e=wd,t=yI,n=rg,r=Function.prototype.apply;return n.dispose=function(i,o,s){var a;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",a=function(u,c){r.call(i,null,c)}),o.on("clearasync",function(u){t(u,function(c,d){a(d,c)})});return}o.on("delete",a=function(u,c){i(c)}),o.on("clear",function(u){t(u,function(c,d){a(d,c)})})},k9}var D9={},xB,N9;function BBe(){return N9||(N9=1,xB=2147483647),xB}var wB,B9;function $Be(){if(B9)return wB;B9=1;var e=ng,t=BBe();return wB=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},wB}var $9;function FBe(){if($9)return D9;$9=1;var e=Q6(),t=yI,n=Z6(),r=Qte(),i=$Be(),o=rg,s=Function.prototype,a=Math.max,u=Math.min,c=Object.create;return o.maxAge=function(d,h,p){var m,v,y,S;d=i(d),d&&(m=c(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(w){m[w]=setTimeout(function(){h.delete(w)},d),typeof m[w].unref=="function"&&m[w].unref(),S&&(S[w]&&S[w]!=="nextTick"&&clearTimeout(S[w]),S[w]=setTimeout(function(){delete S[w]},y),typeof S[w].unref=="function"&&S[w].unref())}),h.on("delete"+v,function(w){clearTimeout(m[w]),delete m[w],S&&(S[w]!=="nextTick"&&clearTimeout(S[w]),delete S[w])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=a(u(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*d,h.on("get"+v,function(w,b,x){S[w]||(S[w]="nextTick",n(function(){var E;S[w]==="nextTick"&&(delete S[w],h.delete(w),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(m,function(w){clearTimeout(w)}),m={},S&&(t(S,function(w){w!=="nextTick"&&clearTimeout(w)}),S={})}))},D9}var F9={},_B,z9;function zBe(){if(z9)return _B;z9=1;var e=ng,t=Object.create,n=Object.prototype.hasOwnProperty;return _B=function(r){var i=0,o=1,s=t(null),a=t(null),u=0,c;return r=e(r),{hit:function(d){var h=a[d],p=++u;if(s[p]=d,a[d]=p,!h)return++i,i<=r?void 0:(d=s[o],c(d),d);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:c=function(d){var h=a[d];if(h&&(delete s[h],delete a[d],--i,o===h)){if(!i){u=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),a=t(null),u=0}}},_B}var U9;function UBe(){if(U9)return F9;U9=1;var e=ng,t=zBe(),n=rg;return n.max=function(r,i,o){var s,a,u;r=e(r),r&&(a=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,u=function(c){c=a.hit(c),c!==void 0&&i.delete(c)}),i.on("get"+s,u),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))},F9}var j9={},H9;function jBe(){if(H9)return j9;H9=1;var e=ig,t=rg,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var a,u;a=n(null),u=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+u,function(c,d){a[c]=d||1}),o.on("get"+u,function(c){++a[c]}),o.on("delete"+u,function(c){delete a[c]}),o.on("clear"+u,function(){a={}}),r(o.memoized,{deleteRef:e(function(){var c=o.get(arguments);return c===null||!a[c]?null:--a[c]?!1:(o.delete(c),!0)}),getRefCount:e(function(){var c=o.get(arguments);return c===null||!a[c]?0:a[c]})})},j9}var HBe=Dte,WBe=Nte,GBe=xBe,VBe=function(e){var t=HBe(arguments[1]),n;return t.normalizer||(n=t.length=WBe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=wBe():n>1&&(t.normalizer=_Be()(n)):n===!1?t.normalizer=TBe()():n===1?t.normalizer=ABe()():t.normalizer=IBe()(n))),t.async&&RBe(),t.promise&&DBe(),t.dispose&&NBe(),t.maxAge&&FBe(),t.max&&UBe(),t.refCounter&&jBe(),GBe(e,t)};const Pv=Ma(VBe),XBe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},qBe=e=>t=>XBe(e)(n=>(n.postMessage(t),new Promise(r=>{n.onmessage=i=>{r(i.data)}}))),Ov=(e,t={async:!0,length:1})=>Pv(qBe(e),t),YBe=""+new URL("tree.worker-a5e2610c.js",import.meta.url).href;class KBe extends Worker{constructor(){super(YBe,{type:"module"})}}const QBe=Ov(KBe);function JBe(e){return Iv(async()=>await QBe(e),[e])}function ZBe(e,t){const n=O.useMemo(()=>e,t);return JBe(n)}const e$e=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),t$e=Mte;function Jte(e,t=!1){const[n,r]=O.useState();return O.useEffect(()=>{t||e&&r(e)},[e,t]),n}const W9={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 n$e(){var w,b,x,E;const[{step:e=0}]=Vp(),t=Bz(e,600),{palette:n}=Ln(),[{layers:r}]=Oa(),[i,o]=O.useState();O.useEffect(()=>{var A;i||o((A=ie.head(r))==null?void 0:A.key)},[i,o,r]);const s=ie.find(r,{key:i}),{controls:a,onChange:u,state:c}=bd(),[d,h]=O.useState("small"),p=Ex({"&.rd3t-link":{stroke:An(n.text.primary,n.action.disabledOpacity)}}),{result:m,loading:v}=ZBe({trace:(b=(w=s==null?void 0:s.source)==null?void 0:w.trace)==null?void 0:b.content,step:t,radius:W9[d].value},[t,s,d]),y=Jte(m,v),S=O.useCallback(()=>p,[p]);return C.jsxs(zn,{onChange:u,stack:c,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:(E=(x=s==null?void 0:s.source)==null?void 0:x.trace)!=null&&E.content&&(y!=null&&y.tree)?C.jsx(KA,{children:({width:A,height:I})=>C.jsx(gt,{width:A,height:I,children:C.jsx(t$e,{scaleExtent:{max:10,min:.01},translate:{x:A/2,y:A/2},data:y.tree,dimensions:{width:A,height:I},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:R,onNodeClick:M})=>C.jsx(r$e,{node:R,onClick:()=>M==null?void 0:M({})})})})}):C.jsx(hp,{icon:C.jsx(AQ,{}),label:"Tree"})})})," ",C.jsxs(zn.Options,{children:[C.jsx(Hs,{icon:C.jsx(Sw,{}),label:"Layer",value:i,items:ie.map(r,A=>({id:A.key,name:Ta(A)})),onChange:o,showArrow:!0}),e$e,C.jsx(Hs,{icon:C.jsx(Ixe,{}),label:"Radius",value:d,onChange:A=>h(A),items:ie.map(ie.entries(W9),([A,I])=>({id:A,...I})),showArrow:!0})]}),C.jsx(zn.Extras,{children:a})]})}const Fb=16,hc=4;function r$e({onClick:e,node:t}){var h;const[{step:n=0},r]=Vp(),i=Bz(n,1e3/24),{palette:o,spacing:s,shape:a}=Ln(),u=ie.findLast(t==null?void 0:t.events,p=>p.step<=i),c=!!ie.find(t==null?void 0:t.events,p=>p.step===i),d=jx((h=u==null?void 0:u.data)==null?void 0:h.type);return C.jsx(_v,{variant:"popover",children:p=>{var m,v;return C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:`f: ${((m=u==null?void 0:u.data)==null?void 0:m.f)??"unknown"}, g: ${((v=u==null?void 0:u.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(-hc/2),x:s(-.25),strokeWidth:0,width:s(Fb),height:s(hc),rx:a.borderRadius})}),C.jsx("rect",{y:s(-hc/2),x:s(-.25),strokeWidth:0,fill:o.background.default,width:s(Fb),height:s(hc),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:s(-hc/2),x:s(-.25),strokeWidth:0,fill:An(o.primary.main,o.action.selectedOpacity),width:s(Fb),height:s(hc),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:s(-.25),y:s(-hc/2),height:s(hc),width:s(.5),fill:d,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(Fb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(axe,{width:s(2),height:s(2),x:s(Fb-2-1),y:s(-hc/2+1),strokeWidth:0,fill:o.text.primary,opacity:o.action.disabledOpacity})]})]})}),C.jsx(xv,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...qA(p),children:C.jsx(Mz,{dense:!0,sx:{p:0},children:ie.map(t==null?void 0:t.events,y=>C.jsx(Vf,{selected:y.step===i,sx:{borderLeft:`4px solid ${jx(y.data.type)}`},onClick:()=>{p.close(),e==null||e(),ie.delay(()=>r({step:y.step}),150)},children:C.jsx(Dz,{primary:ie.startCase(y.data.type),secondary:`Step ${y.step}`})}))})})]})}})}function i$e({selection:e,onClose:t}){const n=o$e(),r=Jte(e),{client:i}=e??{};return C.jsx(xv,{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(Mz,{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(([,a])=>a.index).map(([,{items:a,primary:u}],c)=>C.jsxs(C.Fragment,{children:[!!c&&C.jsx(Kc,{sx:{my:1,mx:2}}),u&&C.jsx(N1,{sx:{py:0},children:C.jsx(Wt,{color:"text.secondary",variant:"overline",children:u})}),ie.chain(a).entries().sortBy(([,d])=>d.index).map(([d,{action:h,icon:p,primary:m,secondary:v}])=>h?C.jsxs(Vf,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Gf,{children:p}),C.jsx(ru,{primary:m,sx:{mr:4}}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:v})]},d):C.jsxs(N1,{children:[p&&C.jsx(Gf,{children:p}),C.jsx(ru,{primary:m,sx:{mr:4}}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:v})]},d)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(N1,{children:C.jsx(Wt,{children:"No info to show."})})})}})})})}const G9=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function o$e(){const[{layers:e}]=Oa();return O.useMemo(()=>ie.chain(e).reduce((t,n)=>{var i;const r=((i=ane(n))==null?void 0:i.getSelectionInfo)??G9;return({children:o,event:s})=>C.jsx(r,{layer:n,event:s,children:a=>C.jsx(t,{event:s,children:u=>o==null?void 0:o(ie.merge(a,u))})})},G9).value(),[e])}const[xI,s$e]=gu([],{reduce:DQ}),a$e={tileSubdivision:2,workerCount:2,tileResolution:{width:1024,height:1024}},Zte=O.createContext({});function l$e(){return O.useContext(Zte)}function u$e(e,{width:t,height:n}={}){const r=Ln(),[i]=xI(),o=O.useRef(null),[s,a]=O.useState(""),[u,c]=O.useState();return O.useEffect(()=>{if(a(""),o.current&&t&&n&&e){const d=ie.find(i,h=>h.renderer.meta.id===e);if(d){const h=new d.renderer.constructor;return h.setup({...a$e,backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),c(h),()=>{var p,m;try{(m=(p=o.current)==null?void 0:p.removeChild)==null||m.call(p,h.getView()),c(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ie.map,e,i,r,a,c]),Vxe(()=>{u&&t&&n&&u.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[u,t,n]),{instance:u,ref:o,error:s}}function c$e(){const[{map:e,specimen:t}]=dI();return!!(e||t)&&C.jsx(BA,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function f$e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:a}=u$e(n,{width:e,height:t}),[u,c]=O.useState();O.useEffect(()=>{if(o){const h=(p,m)=>{const v=p;c({client:{x:v.clientX,y:v.clientY},world:m.world,info:{point:m.world,components:m.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const d=O.useMemo(()=>({renderer:o}),[o]);return O.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(c$e,{}),C.jsx(Zte.Provider,{value:d,children:i!=null&&i.length?s?C.jsxs(gt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(ixe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(gt,{ref:a,children:i.map(h=>C.jsx(fFe,{layer:h},h.key))})}):C.jsx(hp,{icon:C.jsx(MQ,{}),label:"No layers to render",width:e,height:t})}),C.jsx(i$e,{selection:u,onClose:()=>c(void 0)})]})}function Yx({nodes:e}){const{renderer:t}=l$e();return O.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function d$e({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(Yx,{nodes:i}),C.jsx(Yx,{nodes:o})]})}const wI=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,h$e=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class p$e extends Worker{constructor(){super(h$e,{type:"module"})}}const g$e=Ov(p$e),{floor:V9}=Math;function X9(e,t,n){return e>=t&&e({...await g$e({map:e,options:t})}),{normalizer:JSON.stringify}),v$e=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,a]=[V9(r+o/2),V9(i+o/2)];if(X9(s,0,t)&&X9(a,0,n))return{x:s,y:a}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wI}},y$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:v$e,parse:m$e},Symbol.toStringTag,{value:"Module"})),b$e=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class x$e extends Worker{constructor(){super(b$e,{type:"module"})}}const w$e=Ov(x$e),_$e=Pv(async(e="",t)=>await w$e({map:e,options:t}),{normalizer:JSON.stringify}),S$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),E$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:S$e,parse:_$e},Symbol.toStringTag,{value:"Module"})),C$e=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class T$e extends Worker{constructor(){super(C$e,{type:"module"})}}const A$e=Ov(T$e),I$e=Pv(async(e="",t)=>await A$e({map:e,options:t}),{normalizer:JSON.stringify}),R$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),P$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:R$e,parse:I$e},Symbol.toStringTag,{value:"Module"})),O$e=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class M$e extends Worker{constructor(){super(O$e,{type:"module"})}}const k$e=Ov(M$e),L$e=Pv(async(e="",t)=>await k$e({map:e,options:t}),{normalizer:JSON.stringify}),D$e=e=>({...e,snap:ie.identity,nodeAt:ie.constant(0),pointOf:ie.constant({x:0,y:0}),matchNode:wI}),N$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:D$e,parse:L$e},Symbol.toStringTag,{value:"Module"})),eU={grid:y$e,xy:P$e,mesh:E$e,poly:N$e};function ene(e=""){return eU[e]}const B$e=(e,t,n)=>{const r=O.useRef(n||[]),o=r.current===n||!r.current.every((a,u)=>a===n[u]);r.current=n;const s=t.map(()=>null);return O.useEffect(o?()=>void e():()=>{},o?t:s)};function $$e(e,t){return ie.zip(e,t).every(([n,r])=>n===r)}const F$e=(e,t=[],n=[])=>{const[r,i]=O.useState(t),[o,s]=O.useState(n);return O.useEffect(()=>{$$e(o,n)||(i(t),s(n))},[t,n,o]),Lte(e,[...r,...o])};function tU(){const[e]=Zm();return O.useCallback(t=>ie.find(e,t),[e])}function z$e(e){return tU()({url:e})}function U$e(e){const t=mu(),n=eg("map"),r=tU(),i=O.useMemo(()=>Pv(async({source:u,id:c}={})=>{if(u&&c){const d=r({url:u});if(d){t("Fetching map...");const h=await d.call("features/map",{id:c});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:a}=e??{};return Iv(()=>n(async()=>{if(a)return{...e,content:o||await i({source:s,id:a})}}),[i,o,s,a])}function j$e(e){const t=mu(),n=Ln(),r=eg("map"),{format:i,content:o}=e??{};return Iv(()=>r(async()=>{var a,u;const s=n.palette.mode==="dark"?pv:hv;if(i&&o){t("Processing map...");const c=await((u=(a=ene(i))==null?void 0:a.parse)==null?void 0:u.call(a,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${c.nodes.length} elements, ${c.log.join(", ")}`),c}}),[i,o,n])}const H$e={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:Ax(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(Nx,{label:"Source",content:C.jsx($2e,{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(Yx,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Ax(({value:e,produce:t})=>{var i;const{result:n}=U$e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=j$e(n);return B$e(()=>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]=Oa(),{point:s,node:a}=O.useMemo(()=>{var c,d,h,p;if(r&&t){const m=(p=(h=ene((d=(c=n==null?void 0:n.source)==null?void 0:c.map)==null?void 0:d.format))==null?void 0:h.hydrate)==null?void 0:p.call(h,r);if(m){const v=(t==null?void 0:t.world)&&m.snap(t.world);if(v){const y=(t==null?void 0:t.world)&&m.nodeAt(v);return{point:v,node:y}}}}return{}},[r,t]),u=O.useMemo(()=>{const c=ie.filter(i,{source:{type:"query"}});return{...n&&s&&!ie.isUndefined(a)&&{[n.key]:{primary:Ta(n),items:{point:{primary:"Point",secondary:`(${ie.round(s.x,2)}, ${ie.round(s.y,2)})`},...ie.reduce(c,(d,h)=>({...d,[`${h.key}-a`]:{primary:"Set as source",secondary:Ta(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?Oc(p,m=>{ie.set(m,"source.start",a),ie.set(m,"source.query",void 0),ie.set(m,"source.mapLayerKey",n.key),ie.set(m,"source.trace",void 0)}):p)}),icon:C.jsx(Axe,{sx:{transform:"scale(0.5)"}})},[`${h.key}-b`]:{primary:"Set as destination",secondary:Ta(h),action:()=>o({layers:ie.map(i,p=>p.key===h.key?Oc(p,m=>{ie.set(m,"source.end",a),ie.set(m,"source.query",void 0),ie.set(m,"source.mapLayerKey",n.key),ie.set(m,"source.trace",void 0)}):p)}),icon:C.jsx(xxe,{})}}),{})}}}}},[s,a,n,i,o]);return C.jsx(C.Fragment,{children:e==null?void 0:e(u)})}};function W$e({label:e,value:t,type:n}){return C.jsxs(En,{width:"auto",mr:3,mt:.5,children:[C.jsx(Wt,{component:"div",sx:{opacity:.54},...n,children:e}),C.jsx(ai,{}),C.jsx(Wt,{component:"div",...n,children:t??"none"})]},`${e}::${t}`)}function V3({event:e,variant:t="body2",...n}){return C.jsx(En,{...n,children:ie.map(ie.filter(ie.entries(e),([,r])=>r!==void 0),([r,i])=>C.jsx(W$e,{label:r,value:i,type:{variant:t}}))})}var tne={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Kt,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,a){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},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(a){var u=a===void 0?{}:a,c=u.ESCAPE,d=c===void 0?/^\\/:c,h=u.VARIABLE_START,p=h===void 0?/^\${\s*/:h,m=u.VARIABLE_END,v=m===void 0?/^\s*}/:m,y=u.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,w=u.PIPE_PARAMETER_START,b=w===void 0?/^\s*:\s*/:w,x=u.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,A=u.QUOTED_STRING_TEST,I=A===void 0?null:A,R=u.QUOTED_STRING_GET_AND_ADVANCE,M=R===void 0?null:R,D=u.QUOTED_STRING_IN_PARAMETER_TEST,N=D===void 0?null:D,H=u.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,V=H===void 0?null:H,U=I||function(G){return E.test(G)},L=M||s(E),F=N||function(G){return E.test(G)},z=V||s(E);return function(G){function W(Oe){Oe===void 0&&(Oe=1),pe=pe.substr(Oe)}function K(Oe){Oe===void 0&&(Oe=/^/),W(pe.match(Oe)[0].length)}function q(){var Oe;return K(d),Oe=pe.length>0?pe[0]:"",W(),Oe}function Q(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;ge={name:"",pipes:[]},qe=!st}function re(){ve.variables.push(ge),Q({isNull:!0})}function ue(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;be={name:"",parameters:[]},ut=!st}function ce(){ge.pipes.push(be),ue({isNull:!0})}function se(Oe){var ze=(Oe===void 0?{}:Oe).isNull,st=ze!==void 0&&ze;Ze="",Bt=!st}function J(){be.parameters.push(Ze),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=G,ve={literals:[],variables:[]},ye=0,xe="",ge={name:"",pipes:[]},be={name:"",parameters:[]},Ze="",qe=!1,ut=!1,Bt=!1;pe&&pe.length>0;)switch(ye){case 0:if(d.test(pe)){xe+=q();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],W();break;case 1:if(d.test(pe)){ge.name+=q();continue}if(ae()||le())continue;if(U(pe)){ge.name+=L(pe,W);continue}ge.name+=pe[0],W();break;case 2:if(d.test(pe)){be.name+=q();continue}if(ae()||he()||le())continue;if(U(pe)){be.name+=L(pe,W);continue}be.name+=pe[0],W();break;case 3:if(d.test(pe)){Ze+=q();continue}if(ae()||he()||le())continue;if(F(pe)){Ze+=z(pe,W);continue}Ze+=pe[0],W()}return Bt&&be.parameters.push(Ze),ut&&ge.pipes.push(be),qe&&ve.variables.push(ge),ve.literals.push(xe),ve}}function s(a){return function(u,c){var d=u.match(a);return c(d[0].length),d.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 a in s)r.hasOwnProperty(a)||(r[a]=s[a])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(d){return function(h){return d.hasOwnProperty(h)?d[h]:h.split(".").reduce(function(p,m){return p.hasOwnProperty(m)?p[m]:""},d)}}function s(d,h,p,m){m===void 0&&(m=o(h));var v=m(d.name);return d.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function a(d,h,p,m){return m===void 0&&(m=o(h)),d.literals.length===0?"":d.literals.slice(1).reduce(function(v,y,S){return""+v+s(d.variables[S],h,p,m)+y},d.literals[0])}function u(d,h,p){return a(c.parseStringTemplate(d),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var c=i(0);r.evaluateParsedString=a,r.evaluateStringTemplate=u}])})})(tne);var q9=tne.exports;function nU(e={},t){const{$:n,...r}=e;return{...ie.mapValues(r,t),$:n}}function X3(e){switch(e==null?void 0:e.constructor){case Array:{const t=ie.map(e,X3);return n=>ie.map(t,r=>r(n))}case Object:{const t=ie.mapValues(e,X3);return n=>ie.mapValues(t,r=>r(n))}case String:return q3(e);default:return ie.constant(e)}}function WC(e={}){return nU(e,t=>ie.isFunction(t)?t:X3(t))}function Y9(e){const t=Function("ctx",`return ${e};`);return n=>t(new Proxy(WC(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))}const G$e=/^\{\{\s*/,V$e=/^\s*\}\}/,SB=/\b\B/;function q3(e){const n=q9.parseStringTemplateGenerator({VARIABLE_START:G$e,VARIABLE_END:V$e,PIPE_START:SB,PIPE_PARAMETER_START:SB,QUOTED_STRING:SB})(e);return ie.join(n.literals,"")?r=>q9.evaluateParsedString(n,{},{},i=>Y9(i)(r)):Y9(n.variables[0].name)}function X$e(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 nne={exports:{}};(function(e,t){(function(n,r){typeof X$e=="function"?e.exports=r():n.pluralize=r()})(Kt,function(){var n=[],r=[],i={},o={},s={};function a(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function u(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 c(y,S){return y.replace(/\$(\d{1,2})/g,function(w,b){return S[b]||""})}function d(y,S){return y.replace(S[0],function(w,b){var x=c(S[1],arguments);return u(w===""?y[b-1]:w,x)})}function h(y,S,w){if(!y.length||i.hasOwnProperty(y))return S;for(var b=w.length;b--;){var x=w[b];if(x[0].test(S))return d(S,x)}return S}function p(y,S,w){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?u(b,x):y.hasOwnProperty(x)?u(b,y[x]):h(x,b,w)}}function m(y,S,w,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,w)===E}}function v(y,S,w){var b=S===1?v.singular(y):v.plural(y);return(w?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=m(s,o,n),v.singular=p(o,s,r),v.isSingular=m(o,s,r),v.addPluralRule=function(y,S){n.push([a(y),S])},v.addSingularRule=function(y,S){r.push([a(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})})(nne);var q$e=nne.exports;const Y$e=Ma(q$e),K$e=""+new URL("parseTrace.worker-aa84109d.js",import.meta.url).href;class Q$e extends Worker{constructor(){super(K$e,{type:"module"})}}const J$e=Ov(Q$e);function Z$e(e){const t=mu(),n=eg("specimen");return Iv(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");const i=await J$e(e);return t("Trace loaded",Y$e("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}}),[e])}function eFe(e,t){const n=O.useMemo(()=>e,t);return Z$e(n)}function rne(e,t){const n=nU(t,r=>i=>r(rne(WC(i),e)));return{...e,...n}}function ine(e,t,n={}){return e.flatMap(r=>{const{$:i}=r,o=rne(WC(n),WC(r));return i in t?ine(t[i],t,o):[o]})}const tFe={color:hI};function one(e,t="main"){const n=Ln();return O.useMemo(()=>{var i,o,s,a;const r=ine(((s=(o=(i=e==null?void 0:e.render)==null?void 0:i.views)==null?void 0:o[t])==null?void 0:s.components)??[],((a=e==null?void 0:e.render)==null?void 0:a.components)??{});return{events:(e==null?void 0:e.events)??[],apply:(u,c)=>ie.map(r,d=>nU(d,h=>h({fill:n.palette.primary.main,alpha:1,...tFe,...c,...u})))}},[e,t,n])}var EB=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ko,bE,nFe={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},cf;function CB(e){return EB.lastIndex=0,EB.test(e)?'"'+e.replace(EB,function(t){var n=nFe[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function xE(e,t,n){var r,i,o,s,a=ko,u,c=t[e];switch(c&&typeof c=="object"&&typeof c.toJSON=="function"&&(c=c.toJSON(e)),typeof cf=="function"&&(c=cf.call(t,e,c)),typeof c){case"string":return CB(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(ko+=bE,u=[],Object.prototype.toString.apply(c)==="[object Array]"){for(s=c.length,r=0;rn?`[ `+ko+u.join(`, `+ko)+` -`+a+"]":"[ "+u.join(", ")+" ]":"["+u.join(",")+"]",ko=a,o}if(cf&&typeof cf=="object")for(s=cf.length,r=0;rn?`{ +`+a+"]":"[ "+u.join(", ")+" ]":"["+u.join(",")+"]",ko=a,o}if(cf&&typeof cf=="object")for(s=cf.length,r=0;rn?`{ `+ko+u.join(`, `+ko)+` -`+a+"}":"{ "+u.join(", ")+" }":"{"+u.join(",")+"}",ko=a,o}}function rFe(e,t,n,r){var i;if(ko="",yE="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;ie==null;function aFe(e){const t=[],n={},r={},i=ie.chain(e==null?void 0:e.events).map((a,u)=>({step:u,id:a.id,pId:a.pId})).groupBy("id").value();ie.forEach(e==null?void 0:e.events,({id:a,pId:u},c)=>{!sFe(u)&&n[a]!==u&&(t.push({id:a,pId:u,step:c,prev:ie.last(t)}),n[a]=u),r[c]=ie.last(t)});const o=(a,u=(c=>(c=e==null?void 0:e.events)==null?void 0:c.length)()??0)=>{let d=r[u];for(;d;){if(d.id===a)return d.pId;d=d.prev}};return{getParent:o,getPath:a=>{const u=[a];let c={...(e.events??[])[a],step:a};for(;c;){const d=o(c.id,c.step);if(d){const h=ie.findLast(i[d],p=>p.step<=c.step);if(h)u.push(h.step),c=h;else break}else break}return u}}}const xE={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:Ax(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(Nx,{label:"Trace",content:C.jsx(F2e,{onChange:s=>t(a=>ie.set(a,"source.trace",s)),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(Nx,{label:"Onion Skinning",content:C.jsx(Hs,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:ie.startCase(s)})),onChange:s=>t(a=>ie.set(a,"source.onion",s))})}),C.jsx(eee,{label:"Preview"}),C.jsx(gt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(one,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),renderer:({layer:e})=>{var a,u,c;const{palette:t}=Dn(),[{step:n=0}]=Vp(),r=Nz(n,1e3/60),{result:i}=eFe({trace:(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:u.content,context:{color:hI,themeAccent:t.primary.main,themeTextPrimary:t.text.primary,themeBackground:t.background.paper},view:"main"},[t,(c=e==null?void 0:e.source)==null?void 0:c.trace]),o=lFe(e,r),s=O.useMemo(()=>ie.map(i==null?void 0:i.steps,d=>ie.map(d,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(d$e,{step:r,nodes:s}),o]})},steps:({layer:e,children:t})=>{var r,i;const{events:n}=ine((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]=Vp(),i=O.useMemo(()=>{var a,u,c,d;const o=((c=(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:u.content)==null?void 0:c.events)??[],s=ie.chain((d=t==null?void 0:t.info)==null?void 0:d.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:Ta(e),items:{properties:{index:-1,primary:C.jsx(G3,{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(nxe,{})}}}}}return{}},[e,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(i)})}};function lFe(e,t=0){var o,s;const{palette:n}=Dn(),{getPath:r}=O.useMemo(()=>{var a,u;return(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)!=null&&u.content?aFe(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 a,u,c,d;if((d=(c=(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:u.content)==null?void 0:c.render)!=null&&d.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:m,y:v}=h,y=m?X3(m):b=>b.x,S=v?X3(v):b=>b.y,w=ie.map(r(t),b=>{var x,E,A,I;return(I=(A=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:A.events)==null?void 0:I[b]});if(w.length){const b=[{$:"rect",x:y({x:0,y:0,...ie.head(w)})-2*p/2,y:S({x:0,y:0,...ie.head(w)})-2*p/2,fill:jx("destination"),width:2*p,height:2*p},{$:"rect",x:y({x:0,y:0,...ie.last(w)})-2*p/2,y:S({x:0,y:0,...ie.last(w)})-2*p/2,fill:jx("source"),width:2*p,height:2*p},{$:"path",points:w.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(HC,{nodes:[ie.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}async function uFe(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 cFe={key:"query",editor:Ax(({value:e,produce:t})=>{var c,d;const{algorithm:n,mapLayerKey:r}=(e==null?void 0:e.source)??{},[{layers:i}]=Oa(),[{algorithms:o}]=DC(),[s]=Zm(),a=ie.filter(i,h=>{var p;return((p=h.source)==null?void 0:p.type)==="map"}),u=ie.find(a,{key:r});return C.jsxs(C.Fragment,{children:[C.jsx(Nx,{label:"Algorithm",content:C.jsx(Hs,{showArrow:!0,icon:C.jsx(uxe,{}),label:"Choose Algorithm",value:n,items:o.map(h=>{var p;return{...h,description:(p=ie.find(s,{url:h.source}))==null?void 0:p.name}}),onChange:async h=>t(p=>ie.set(p,"source.algorithm",h))})}),!(o!=null&&o.length)&&C.jsx(Wt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(Nx,{label:"Map",content:C.jsx(Hs,{showArrow:!0,icon:C.jsx(_w,{}),label:"Choose Layer",value:r,items:a.map(h=>({id:h.key,name:Ta(h)})),onChange:async h=>t(p=>ie.set(p,"source.mapLayerKey",h))})}),u&&C.jsxs(Wt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",Ta(u)]}),C.jsx(eee,{label:"Preview"}),C.jsx(gt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(one,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Ax(({value:e,produce:t})=>{const n=mu(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:a}]=Oa(),[u]=Zm(),[{algorithms:c}]=DC(),d=O.useMemo(()=>{if(i&&r)return ie.find(a,{key:i})},[i,r,a]);return F$e(async h=>{var p;if(d&&r){const{format:m,content:v}=((p=d==null?void 0:d.source)==null?void 0:p.map)??{};if(m&&v){const y=await uFe(u,r,m),S=ie.find(c,{id:r});if(y){n(`Executing ${Ta(e)} using ${y.name}...`);const w=await y.call("solve/pathfinding",{format:m,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:w}))}}}},[d,u,r,o,s,t,n,e,c],[d,u,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:xE.renderer,steps:xE.steps,getSelectionInfo:xE.getSelectionInfo};function fFe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&O.createElement((n=Uw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function Ta(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?Uw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function sne(e){var t;return Uw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const Uw={map:H$e,trace:xE,query:cFe};function dFe(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 hFe({value:e,onValueChange:t},n){var d,h,p;const[r,i]=dFe(e,t),o=m=>C.jsx(Wt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:m}),s=m=>C.jsx(Wt,{variant:"body1",children:m}),a=(m,v)=>C.jsxs(En,{alignItems:"center",children:[s(m),C.jsx(ai,{flex:1}),v]}),u=m=>m.map(v=>({id:v,name:ie.startCase(v)})),c=r.name||Ta(e);return C.jsx(C.Fragment,{children:C.jsxs(Hm,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(gt,{py:1,ml:-1,children:[C.jsx(Wt,{children:c}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:ie.startCase((d=r.source)==null?void 0:d.type)})]}),C.jsx(ai,{flex:1}),C.jsx(Hm,{alignItems:"center",direction:"row",children:C.jsx(T6,{appBar:{children:C.jsx(C6,{children:"Edit Layer"})},trigger:m=>C.jsx($p,{size:"small",onClick:m,children:C.jsx($A,{})}),children:C.jsxs(gt,{p:2,children:[C.jsx(gt,{pb:2,children:C.jsx(ww,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:m=>i==null?void 0:i(Oc(r,v=>ie.set(v,"name",m.target.value)))})}),o("Layer Options"),a("Transparency",C.jsx(Hs,{label:"Transparency",items:u(["100%"]),showArrow:!0})),a("Display Mode",C.jsx(Hs,{label:"Display Mode",value:"normal",items:u(["normal","difference"]),showArrow:!0})),o("Source Options"),a("Type",C.jsx(Hs,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(m=>({id:m,name:ie.startCase(m)})),onChange:m=>i==null?void 0:i(Oc(r,v=>ie.set(v,"source.type",m))),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&O.createElement(Uw[r.source.type].editor,{onChange:i,value:r})]})})})]})})}const pFe=O.forwardRef(hFe);function gFe(){const[{layers:e=[]},t]=Oa();return C.jsx(gt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(gt,{sx:{mb:2},children:C.jsx(iI,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(pFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t({layers:n}),addItemLabel:"Layer",placeholderText:C.jsx(gt,{pt:2,children:"Click the button below to add a layer."})})})})}function mFe(){const{controls:e,onChange:t,state:n}=bd();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(gt,{p:2,pr:1,pt:6,children:C.jsx(gFe,{})})}),C.jsx(zn.Extras,{children:e})]})}function im({label:e,icon:t,...n}){return C.jsx(vd,{title:ie.startCase(e),children:C.jsx("span",{children:C.jsx($p,{...n,children:t})})},e)}function ane(e){return C.jsx(dxe,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function vFe({children:e}){return C.jsx(Wt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var GC={exports:{}};/** +`+a+"}":"{ "+u.join(", ")+" }":"{"+u.join(",")+"}",ko=a,o}}function rFe(e,t,n,r){var i;if(ko="",bE="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;ie==null;function aFe(e){const t=[],n={},r={},i=ie.chain(e==null?void 0:e.events).map((a,u)=>({step:u,id:a.id,pId:a.pId})).groupBy("id").value();ie.forEach(e==null?void 0:e.events,({id:a,pId:u},c)=>{!sFe(u)&&n[a]!==u&&(t.push({id:a,pId:u,step:c,prev:ie.last(t)}),n[a]=u),r[c]=ie.last(t)});const o=(a,u=(c=>(c=e==null?void 0:e.events)==null?void 0:c.length)()??0)=>{let d=r[u];for(;d;){if(d.id===a)return d.pId;d=d.prev}};return{getParent:o,getPath:a=>{const u=[a];let c={...(e.events??[])[a],step:a};for(;c;){const d=o(c.id,c.step);if(d){const h=ie.findLast(i[d],p=>p.step<=c.step);if(h)u.push(h.step),c=h;else break}else break}return u}}}const wE={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:Ax(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(Nx,{label:"Trace",content:C.jsx(F2e,{onChange:s=>t(a=>ie.set(a,"source.trace",s)),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(Nx,{label:"Onion Skinning",content:C.jsx(Hs,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:ie.startCase(s)})),onChange:s=>t(a=>ie.set(a,"source.onion",s))})}),C.jsx(tee,{label:"Preview"}),C.jsx(gt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(sne,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),renderer:({layer:e})=>{var c,d,h;const{palette:t}=Ln(),[{step:n=0}]=Vp(),r=Bz(n,1e3/60),{result:i}=eFe({trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content,context:{color:hI,themeAccent:t.primary.main,themeTextPrimary:t.text.primary,themeBackground:t.background.paper},view:"main"},[t,(h=e==null?void 0:e.source)==null?void 0:h.trace]),o=lFe(e,r),s=O.useMemo(()=>ie.map(i==null?void 0:i.stepsPersistent,p=>ie.map(p,m=>ie.merge(m,{meta:{sourceLayer:e==null?void 0:e.key}}))),[i==null?void 0:i.stepsPersistent,e]),a=O.useMemo(()=>ie.map(i==null?void 0:i.stepsTransient,p=>ie.map(p,m=>ie.merge(m,{meta:{sourceLayer:e==null?void 0:e.key}}))),[i==null?void 0:i.stepsTransient,e]),u=O.useMemo(()=>[a[r]??[]],[a,r]);return C.jsxs(C.Fragment,{children:[C.jsx(d$e,{step:r,nodes:s}),C.jsx(Yx,{nodes:u}),o]})},steps:({layer:e,children:t})=>{var r,i;const{events:n}=one((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]=Vp(),i=O.useMemo(()=>{var a,u,c,d;const o=((c=(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:u.content)==null?void 0:c.events)??[],s=ie.chain((d=t==null?void 0:t.info)==null?void 0:d.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:Ta(e),items:{properties:{index:-1,primary:C.jsx(V3,{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(nxe,{})}}}}}return{}},[e,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(i)})}};function lFe(e,t=0){var o,s;const{palette:n}=Ln(),{getPath:r}=O.useMemo(()=>{var a,u;return(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)!=null&&u.content?aFe(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 a,u,c,d;if((d=(c=(u=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:u.content)==null?void 0:c.render)!=null&&d.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:m,y:v}=h,y=m?q3(m):b=>b.x,S=v?q3(v):b=>b.y,w=ie.map(r(t),b=>{var x,E,A,I;return(I=(A=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:A.events)==null?void 0:I[b]});if(w.length){const b=[{$:"rect",x:y({x:0,y:0,...ie.head(w)})-2*p/2,y:S({x:0,y:0,...ie.head(w)})-2*p/2,fill:jx("destination"),width:2*p,height:2*p},{$:"rect",x:y({x:0,y:0,...ie.last(w)})-2*p/2,y:S({x:0,y:0,...ie.last(w)})-2*p/2,fill:jx("source"),width:2*p,height:2*p},{$:"path",points:w.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(Yx,{nodes:[ie.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}async function uFe(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 cFe={key:"query",editor:Ax(({value:e,produce:t})=>{var c,d;const{algorithm:n,mapLayerKey:r}=(e==null?void 0:e.source)??{},[{layers:i}]=Oa(),[{algorithms:o}]=DC(),[s]=Zm(),a=ie.filter(i,h=>{var p;return((p=h.source)==null?void 0:p.type)==="map"}),u=ie.find(a,{key:r});return C.jsxs(C.Fragment,{children:[C.jsx(Nx,{label:"Algorithm",content:C.jsx(Hs,{showArrow:!0,icon:C.jsx(uxe,{}),label:"Choose Algorithm",value:n,items:o.map(h=>{var p;return{...h,description:(p=ie.find(s,{url:h.source}))==null?void 0:p.name}}),onChange:async h=>t(p=>ie.set(p,"source.algorithm",h))})}),!(o!=null&&o.length)&&C.jsx(Wt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(Nx,{label:"Map",content:C.jsx(Hs,{showArrow:!0,icon:C.jsx(Sw,{}),label:"Choose Layer",value:r,items:a.map(h=>({id:h.key,name:Ta(h)})),onChange:async h=>t(p=>ie.set(p,"source.mapLayerKey",h))})}),u&&C.jsxs(Wt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",Ta(u)]}),C.jsx(tee,{label:"Preview"}),C.jsx(gt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(sne,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Ax(({value:e,produce:t})=>{const n=mu(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:a}]=Oa(),[u]=Zm(),[{algorithms:c}]=DC(),d=O.useMemo(()=>{if(i&&r)return ie.find(a,{key:i})},[i,r,a]);return F$e(async h=>{var p;if(d&&r){const{format:m,content:v}=((p=d==null?void 0:d.source)==null?void 0:p.map)??{};if(m&&v){const y=await uFe(u,r,m),S=ie.find(c,{id:r});if(y){n(`Executing ${Ta(e)} using ${y.name}...`);const w=await y.call("solve/pathfinding",{format:m,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:w}))}}}},[d,u,r,o,s,t,n,e,c],[d,u,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:wE.renderer,steps:wE.steps,getSelectionInfo:wE.getSelectionInfo};function fFe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&O.createElement((n=jw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function Ta(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?jw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function ane(e){var t;return jw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const jw={map:H$e,trace:wE,query:cFe};function dFe(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 hFe({value:e,onValueChange:t},n){var d,h,p;const[r,i]=dFe(e,t),o=m=>C.jsx(Wt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:m}),s=m=>C.jsx(Wt,{variant:"body1",children:m}),a=(m,v)=>C.jsxs(En,{alignItems:"center",children:[s(m),C.jsx(ai,{flex:1}),v]}),u=m=>m.map(v=>({id:v,name:ie.startCase(v)})),c=r.name||Ta(e);return C.jsx(C.Fragment,{children:C.jsxs(Hm,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(gt,{py:1,ml:-1,children:[C.jsx(Wt,{children:c}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:ie.startCase((d=r.source)==null?void 0:d.type)})]}),C.jsx(ai,{flex:1}),C.jsx(Hm,{alignItems:"center",direction:"row",children:C.jsx(A6,{appBar:{children:C.jsx(T6,{children:"Edit Layer"})},trigger:m=>C.jsx($p,{size:"small",onClick:m,children:C.jsx($A,{})}),children:C.jsxs(gt,{p:2,children:[C.jsx(gt,{pb:2,children:C.jsx(_w,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:m=>i==null?void 0:i(Oc(r,v=>ie.set(v,"name",m.target.value)))})}),o("Layer Options"),a("Transparency",C.jsx(Hs,{label:"Transparency",items:u(["100%"]),showArrow:!0})),a("Display Mode",C.jsx(Hs,{label:"Display Mode",value:"normal",items:u(["normal","difference"]),showArrow:!0})),o("Source Options"),a("Type",C.jsx(Hs,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(m=>({id:m,name:ie.startCase(m)})),onChange:m=>i==null?void 0:i(Oc(r,v=>ie.set(v,"source.type",m))),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&O.createElement(jw[r.source.type].editor,{onChange:i,value:r})]})})})]})})}const pFe=O.forwardRef(hFe);function gFe(){const[{layers:e=[]},t]=Oa();return C.jsx(gt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(gt,{sx:{mb:2},children:C.jsx(iI,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(pFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t({layers:n}),addItemLabel:"Layer",placeholderText:C.jsx(gt,{pt:2,children:"Click the button below to add a layer."})})})})}function mFe(){const{controls:e,onChange:t,state:n}=bd();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(gt,{p:2,pr:1,pt:6,children:C.jsx(gFe,{})})}),C.jsx(zn.Extras,{children:e})]})}function im({label:e,icon:t,...n}){return C.jsx(vd,{title:ie.startCase(e),children:C.jsx("span",{children:C.jsx($p,{...n,children:t})})},e)}function lne(e){return C.jsx(dxe,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function vFe({children:e}){return C.jsx(Wt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var GC={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */GC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,m=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,A=32,I=64,R=128,M=256,L=512,N=30,H="...",V=800,U=16,D=1,F=2,z=3,G=1/0,W=9007199254740991,K=17976931348623157e292,q=0/0,Q=4294967295,re=Q-1,ue=Q>>>1,ce=[["ary",R],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",I],["rearg",M]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",ge="[object Map]",be="[object Number]",Ze="[object Null]",qe="[object Object]",ut="[object Promise]",Bt="[object Proxy]",Oe="[object RegExp]",ze="[object Set]",st="[object String]",mt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",Ue="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Ot="[object Float64Array]",ft="[object Int8Array]",Re="[object Int16Array]",at="[object Int32Array]",$t="[object Uint8Array]",Pe="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Gt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ds=/<%-([\s\S]+?)%>/g,ef=/<%([\s\S]+?)%>/g,ia=/<%=([\s\S]+?)%>/g,wu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/,Td=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hs=/[\\^$.*+?()[\]{}|]/g,Ad=RegExp(hs.source),xo=/^\s+/,Su=/\s/,Di=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ps=/\{\n\/\* \[wrapped with (.+)\] \*/,Id=/,? & /,gs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Na=/[()=,{}\[\]\/\s]/,tf=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Dl=/^[-+]0x[0-9a-f]+$/i,Ll=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,zv=/^0o[0-7]+$/i,Uv=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,qI=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",YI="\\u0300-\\u036f",KI="\\ufe20-\\ufe2f",QI="\\u20d0-\\u20ff",jv=YI+KI+QI,Hv="\\u2700-\\u27bf",Wv="a-z\\xdf-\\xf6\\xf8-\\xff",JI="\\xac\\xb1\\xd7\\xf7",ZI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eR="\\u2000-\\u206f",tR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gv="A-Z\\xc0-\\xd6\\xd8-\\xde",Vv="\\ufe0e\\ufe0f",Xv=JI+ZI+eR+tR,Rd="['’]",nR="["+Eu+"]",qv="["+Xv+"]",Cu="["+jv+"]",Yv="\\d+",rR="["+Hv+"]",Kv="["+Wv+"]",Qv="[^"+Eu+Xv+Yv+Hv+Wv+Gv+"]",Pd="\\ud83c[\\udffb-\\udfff]",iR="(?:"+Cu+"|"+Pd+")",Jv="[^"+Eu+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Gv+"]",Zv="\\u200d",e0="(?:"+Kv+"|"+Qv+")",oR="(?:"+ms+"|"+Qv+")",t0="(?:"+Rd+"(?:d|ll|m|re|s|t|ve))?",n0="(?:"+Rd+"(?:D|LL|M|RE|S|T|VE))?",r0=iR+"?",i0="["+Vv+"]?",sR="(?:"+Zv+"(?:"+[Jv,Od,Md].join("|")+")"+i0+r0+")*",aR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",o0=i0+r0+sR,uR="(?:"+[rR,Od,Md].join("|")+")"+o0,cR="(?:"+[Jv+Cu+"?",Cu,Od,Md,nR].join("|")+")",fR=RegExp(Rd,"g"),dR=RegExp(Cu,"g"),kd=RegExp(Pd+"(?="+Pd+")|"+cR+o0,"g"),hR=RegExp([ms+"?"+Kv+"+"+t0+"(?="+[qv,ms,"$"].join("|")+")",oR+"+"+n0+"(?="+[qv,ms+e0,"$"].join("|")+")",ms+"?"+e0+"+"+t0,ms+"+"+n0,lR,aR,Yv,uR].join("|"),"g"),pR=RegExp("["+Zv+Eu+jv+Vv+"]"),gR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vR=-1,kt={};kt[Be]=kt[Ot]=kt[ft]=kt[Re]=kt[at]=kt[$t]=kt[Pe]=kt[He]=kt[xt]=!0,kt[se]=kt[J]=kt[Ke]=kt[le]=kt[Fe]=kt[he]=kt[ve]=kt[ye]=kt[ge]=kt[be]=kt[qe]=kt[Oe]=kt[ze]=kt[st]=kt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Ot]=Tt[ft]=Tt[Re]=Tt[at]=Tt[ge]=Tt[be]=Tt[qe]=Tt[Oe]=Tt[ze]=Tt[st]=Tt[mt]=Tt[$t]=Tt[Pe]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var yR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&","<":"<",">":">",'"':""","'":"'"},xR={"&":"&","<":"<",">":">",""":'"',"'":"'"},wR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_R=parseFloat,SR=parseInt,s0=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,ER=typeof self=="object"&&self&&self.Object===Object&&self,pn=s0||ER||Function("return this")(),Dd=t&&!t.nodeType&&t,_o=Dd&&!0&&e&&!e.nodeType&&e,a0=_o&&_o.exports===Dd,Ld=a0&&s0.process,cr=function(){try{var X=_o&&_o.require&&_o.require("util").types;return X||Ld&&Ld.binding&&Ld.binding("util")}catch{}}(),l0=cr&&cr.isArrayBuffer,u0=cr&&cr.isDate,c0=cr&&cr.isMap,f0=cr&&cr.isRegExp,d0=cr&&cr.isSet,h0=cr&&cr.isTypedArray;function Qn(X,ee,Z){switch(Z.length){case 0:return X.call(ee);case 1:return X.call(ee,Z[0]);case 2:return X.call(ee,Z[0],Z[1]);case 3:return X.call(ee,Z[0],Z[1],Z[2])}return X.apply(ee,Z)}function CR(X,ee,Z,me){for(var Le=-1,dt=X==null?0:X.length;++Le-1}function Nd(X,ee,Z){for(var me=-1,Le=X==null?0:X.length;++me-1;);return Z}function w0(X,ee){for(var Z=X.length;Z--&&vs(ee,X[Z],0)>-1;);return Z}function DR(X,ee){for(var Z=X.length,me=0;Z--;)X[Z]===ee&&++me;return me}var LR=zd(yR),NR=zd(bR);function BR(X){return"\\"+wR[X]}function $R(X,ee){return X==null?n:X[ee]}function ys(X){return pR.test(X)}function FR(X){return gR.test(X)}function zR(X){for(var ee,Z=[];!(ee=X.next()).done;)Z.push(ee.value);return Z}function Wd(X){var ee=-1,Z=Array(X.size);return X.forEach(function(me,Le){Z[++ee]=[Le,me]}),Z}function _0(X,ee){return function(Z){return X(ee(Z))}}function Bi(X,ee){for(var Z=-1,me=X.length,Le=0,dt=[];++Z-1}function AP(l,f){var g=this.__data__,_=Hu(g,l);return _<0?(++this.size,g.push([l,f])):g[_][1]=f,this}ci.prototype.clear=SP,ci.prototype.delete=EP,ci.prototype.get=CP,ci.prototype.has=TP,ci.prototype.set=AP;function fi(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f=f?l:f)),l}function pr(l,f,g,_,T,k){var B,j=f&h,Y=f&p,te=f&m;if(g&&(B=T?g(l,_,T,k):g(l)),B!==n)return B;if(!Ft(l))return l;var ne=$e(l);if(ne){if(B=O2(l),!j)return Nn(l,B)}else{var oe=_n(l),de=oe==ye||oe==xe;if(Hi(l))return iy(l,j);if(oe==qe||oe==se||de&&!T){if(B=Y||de?{}:Sy(l),!j)return Y?x2(l,HP(B,l)):b2(l,D0(B,l))}else{if(!Tt[oe])return T?l:{};B=M2(l,oe,j)}}k||(k=new Pr);var we=k.get(l);if(we)return we;k.set(l,B),Jy(l)?l.forEach(function(Ie){B.add(pr(Ie,f,g,Ie,l,k))}):Ky(l)&&l.forEach(function(Ie,Je){B.set(Je,pr(Ie,f,g,Je,l,k))});var Ae=te?Y?mh:gh:Y?$n:sn,Xe=ne?n:Ae(l);return fr(Xe||l,function(Ie,Je){Xe&&(Je=Ie,Ie=l[Je]),Ha(B,Je,pr(Ie,f,g,Je,l,k))}),B}function WP(l){var f=sn(l);return function(g){return L0(g,l,f)}}function L0(l,f,g){var _=g.length;if(l==null)return!_;for(l=St(l);_--;){var T=g[_],k=f[T],B=l[T];if(B===n&&!(T in l)||!k(B))return!1}return!0}function N0(l,f,g){if(typeof l!="function")throw new dr(s);return Ka(function(){l.apply(n,g)},f)}function Wa(l,f,g,_){var T=-1,k=Tu,B=!0,j=l.length,Y=[],te=f.length;if(!j)return Y;g&&(f=Nt(f,Jn(g))),_?(k=Nd,B=!1):f.length>=i&&(k=Ba,B=!1,f=new Co(f));e:for(;++TT?0:T+g),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=g>_?0:eb(_);g<_;)l[g++]=f;return l}function $0(l,f){var g=[];return Fi(l,function(_,T,k){f(_,T,k)&&g.push(_)}),g}function gn(l,f,g,_,T){var k=-1,B=l.length;for(g||(g=D2),T||(T=[]);++k0&&g(j)?f>1?gn(j,f-1,g,_,T):Ni(T,j):_||(T[T.length]=j)}return T}var Qd=cy(),F0=cy(!0);function Qr(l,f){return l&&Qd(l,f,sn)}function Jd(l,f){return l&&F0(l,f,sn)}function Gu(l,f){return Li(f,function(g){return mi(l[g])})}function Ao(l,f){f=Ui(f,l);for(var g=0,_=f.length;l!=null&&g<_;)l=l[Zr(f[g++])];return g&&g==_?l:n}function z0(l,f,g){var _=f(l);return $e(l)?_:Ni(_,g(l))}function Rn(l){return l==null?l===n?vt:Ze:So&&So in St(l)?I2(l):U2(l)}function Zd(l,f){return l>f}function XP(l,f){return l!=null&&bt.call(l,f)}function qP(l,f){return l!=null&&f in St(l)}function YP(l,f,g){return l>=wn(f,g)&&l=120&&ne.length>=120)?new Co(B&&ne):n}ne=l[0];var oe=-1,de=j[0];e:for(;++oe-1;)j!==l&&Nu.call(j,Y,1),Nu.call(l,Y,1);return l}function K0(l,f){for(var g=l?f.length:0,_=g-1;g--;){var T=f[g];if(g==_||T!==k){var k=T;gi(T)?Nu.call(l,T,1):lh(l,T)}}return l}function oh(l,f){return l+Fu(P0()*(f-l+1))}function l2(l,f,g,_){for(var T=-1,k=nn($u((f-l)/(g||1)),0),B=Z(k);k--;)B[_?k:++T]=l,l+=g;return B}function sh(l,f){var g="";if(!l||f<1||f>W)return g;do f%2&&(g+=l),f=Fu(f/2),f&&(l+=l);while(f);return g}function Ye(l,f){return Sh(Ty(l,f,Fn),l+"")}function u2(l){return k0(Rs(l))}function c2(l,f){var g=Rs(l);return nc(g,To(f,0,g.length))}function Xa(l,f,g,_){if(!Ft(l))return l;f=Ui(f,l);for(var T=-1,k=f.length,B=k-1,j=l;j!=null&&++TT?0:T+f),g=g>T?T:g,g<0&&(g+=T),T=f>g?0:g-f>>>0,f>>>=0;for(var k=Z(T);++_>>1,B=l[k];B!==null&&!er(B)&&(g?B<=f:B=i){var te=f?null:E2(l);if(te)return Iu(te);B=!1,T=Ba,Y=new Co}else Y=f?[]:j;e:for(;++_=_?l:gr(l,f,g)}var ry=tP||function(l){return pn.clearTimeout(l)};function iy(l,f){if(f)return l.slice();var g=l.length,_=C0?C0(g):new l.constructor(g);return l.copy(_),_}function dh(l){var f=new l.constructor(l.byteLength);return new Du(f).set(new Du(l)),f}function g2(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function m2(l){var f=new l.constructor(l.source,lr.exec(l));return f.lastIndex=l.lastIndex,f}function v2(l){return ja?St(ja.call(l)):{}}function oy(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sy(l,f){if(l!==f){var g=l!==n,_=l===null,T=l===l,k=er(l),B=f!==n,j=f===null,Y=f===f,te=er(f);if(!j&&!te&&!k&&l>f||k&&B&&Y&&!j&&!te||_&&B&&Y||!g&&Y||!T)return 1;if(!_&&!k&&!te&&l=j)return Y;var te=g[_];return Y*(te=="desc"?-1:1)}}return l.index-f.index}function ay(l,f,g,_){for(var T=-1,k=l.length,B=g.length,j=-1,Y=f.length,te=nn(k-B,0),ne=Z(Y+te),oe=!_;++j1?g[T-1]:n,B=T>2?g[2]:n;for(k=l.length>3&&typeof k=="function"?(T--,k):n,B&&Pn(g[0],g[1],B)&&(k=T<3?n:k,T=1),f=St(f);++_-1?T[k?f[B]:B]:n}}function hy(l){return pi(function(f){var g=f.length,_=g,T=hr.prototype.thru;for(l&&f.reverse();_--;){var k=f[_];if(typeof k!="function")throw new dr(s);if(T&&!B&&ec(k)=="wrapper")var B=new hr([],!0)}for(_=B?_:g;++_1&&rt.reverse(),ne&&Yj))return!1;var te=k.get(l),ne=k.get(f);if(te&&ne)return te==f&&ne==l;var oe=-1,de=!0,we=g&y?new Co:n;for(k.set(l,f),k.set(f,l);++oe1?"& ":"")+f[_],f=f.join(g>2?", ":" "),l.replace(Di,`{ + */GC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,m=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,A=32,I=64,R=128,M=256,D=512,N=30,H="...",V=800,U=16,L=1,F=2,z=3,G=1/0,W=9007199254740991,K=17976931348623157e292,q=0/0,Q=4294967295,re=Q-1,ue=Q>>>1,ce=[["ary",R],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",D],["partial",A],["partialRight",I],["rearg",M]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",ge="[object Map]",be="[object Number]",Ze="[object Null]",qe="[object Object]",ut="[object Promise]",Bt="[object Proxy]",Oe="[object RegExp]",ze="[object Set]",st="[object String]",mt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",Ue="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Ot="[object Float64Array]",ft="[object Int8Array]",Re="[object Int16Array]",at="[object Int32Array]",$t="[object Uint8Array]",Pe="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Gt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ds=/<%-([\s\S]+?)%>/g,ef=/<%([\s\S]+?)%>/g,ia=/<%=([\s\S]+?)%>/g,wu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/,Td=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hs=/[\\^$.*+?()[\]{}|]/g,Ad=RegExp(hs.source),xo=/^\s+/,Su=/\s/,Li=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ps=/\{\n\/\* \[wrapped with (.+)\] \*/,Id=/,? & /,gs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Na=/[()=,{}\[\]\/\s]/,tf=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Dl=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,zv=/^0o[0-7]+$/i,Uv=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,qI=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",YI="\\u0300-\\u036f",KI="\\ufe20-\\ufe2f",QI="\\u20d0-\\u20ff",jv=YI+KI+QI,Hv="\\u2700-\\u27bf",Wv="a-z\\xdf-\\xf6\\xf8-\\xff",JI="\\xac\\xb1\\xd7\\xf7",ZI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eR="\\u2000-\\u206f",tR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gv="A-Z\\xc0-\\xd6\\xd8-\\xde",Vv="\\ufe0e\\ufe0f",Xv=JI+ZI+eR+tR,Rd="['’]",nR="["+Eu+"]",qv="["+Xv+"]",Cu="["+jv+"]",Yv="\\d+",rR="["+Hv+"]",Kv="["+Wv+"]",Qv="[^"+Eu+Xv+Yv+Hv+Wv+Gv+"]",Pd="\\ud83c[\\udffb-\\udfff]",iR="(?:"+Cu+"|"+Pd+")",Jv="[^"+Eu+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Gv+"]",Zv="\\u200d",e0="(?:"+Kv+"|"+Qv+")",oR="(?:"+ms+"|"+Qv+")",t0="(?:"+Rd+"(?:d|ll|m|re|s|t|ve))?",n0="(?:"+Rd+"(?:D|LL|M|RE|S|T|VE))?",r0=iR+"?",i0="["+Vv+"]?",sR="(?:"+Zv+"(?:"+[Jv,Od,Md].join("|")+")"+i0+r0+")*",aR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",o0=i0+r0+sR,uR="(?:"+[rR,Od,Md].join("|")+")"+o0,cR="(?:"+[Jv+Cu+"?",Cu,Od,Md,nR].join("|")+")",fR=RegExp(Rd,"g"),dR=RegExp(Cu,"g"),kd=RegExp(Pd+"(?="+Pd+")|"+cR+o0,"g"),hR=RegExp([ms+"?"+Kv+"+"+t0+"(?="+[qv,ms,"$"].join("|")+")",oR+"+"+n0+"(?="+[qv,ms+e0,"$"].join("|")+")",ms+"?"+e0+"+"+t0,ms+"+"+n0,lR,aR,Yv,uR].join("|"),"g"),pR=RegExp("["+Zv+Eu+jv+Vv+"]"),gR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vR=-1,kt={};kt[Be]=kt[Ot]=kt[ft]=kt[Re]=kt[at]=kt[$t]=kt[Pe]=kt[He]=kt[xt]=!0,kt[se]=kt[J]=kt[Ke]=kt[le]=kt[Fe]=kt[he]=kt[ve]=kt[ye]=kt[ge]=kt[be]=kt[qe]=kt[Oe]=kt[ze]=kt[st]=kt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Ot]=Tt[ft]=Tt[Re]=Tt[at]=Tt[ge]=Tt[be]=Tt[qe]=Tt[Oe]=Tt[ze]=Tt[st]=Tt[mt]=Tt[$t]=Tt[Pe]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var yR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&","<":"<",">":">",'"':""","'":"'"},xR={"&":"&","<":"<",">":">",""":'"',"'":"'"},wR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_R=parseFloat,SR=parseInt,s0=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,ER=typeof self=="object"&&self&&self.Object===Object&&self,pn=s0||ER||Function("return this")(),Ld=t&&!t.nodeType&&t,_o=Ld&&!0&&e&&!e.nodeType&&e,a0=_o&&_o.exports===Ld,Dd=a0&&s0.process,cr=function(){try{var X=_o&&_o.require&&_o.require("util").types;return X||Dd&&Dd.binding&&Dd.binding("util")}catch{}}(),l0=cr&&cr.isArrayBuffer,u0=cr&&cr.isDate,c0=cr&&cr.isMap,f0=cr&&cr.isRegExp,d0=cr&&cr.isSet,h0=cr&&cr.isTypedArray;function Qn(X,ee,Z){switch(Z.length){case 0:return X.call(ee);case 1:return X.call(ee,Z[0]);case 2:return X.call(ee,Z[0],Z[1]);case 3:return X.call(ee,Z[0],Z[1],Z[2])}return X.apply(ee,Z)}function CR(X,ee,Z,me){for(var De=-1,dt=X==null?0:X.length;++De-1}function Nd(X,ee,Z){for(var me=-1,De=X==null?0:X.length;++me-1;);return Z}function w0(X,ee){for(var Z=X.length;Z--&&vs(ee,X[Z],0)>-1;);return Z}function LR(X,ee){for(var Z=X.length,me=0;Z--;)X[Z]===ee&&++me;return me}var DR=zd(yR),NR=zd(bR);function BR(X){return"\\"+wR[X]}function $R(X,ee){return X==null?n:X[ee]}function ys(X){return pR.test(X)}function FR(X){return gR.test(X)}function zR(X){for(var ee,Z=[];!(ee=X.next()).done;)Z.push(ee.value);return Z}function Wd(X){var ee=-1,Z=Array(X.size);return X.forEach(function(me,De){Z[++ee]=[De,me]}),Z}function _0(X,ee){return function(Z){return X(ee(Z))}}function Bi(X,ee){for(var Z=-1,me=X.length,De=0,dt=[];++Z-1}function AP(l,f){var g=this.__data__,_=Hu(g,l);return _<0?(++this.size,g.push([l,f])):g[_][1]=f,this}ci.prototype.clear=SP,ci.prototype.delete=EP,ci.prototype.get=CP,ci.prototype.has=TP,ci.prototype.set=AP;function fi(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f=f?l:f)),l}function pr(l,f,g,_,T,k){var B,j=f&h,Y=f&p,te=f&m;if(g&&(B=T?g(l,_,T,k):g(l)),B!==n)return B;if(!Ft(l))return l;var ne=$e(l);if(ne){if(B=O2(l),!j)return Nn(l,B)}else{var oe=_n(l),de=oe==ye||oe==xe;if(Hi(l))return iy(l,j);if(oe==qe||oe==se||de&&!T){if(B=Y||de?{}:Sy(l),!j)return Y?x2(l,HP(B,l)):b2(l,L0(B,l))}else{if(!Tt[oe])return T?l:{};B=M2(l,oe,j)}}k||(k=new Pr);var we=k.get(l);if(we)return we;k.set(l,B),Jy(l)?l.forEach(function(Ie){B.add(pr(Ie,f,g,Ie,l,k))}):Ky(l)&&l.forEach(function(Ie,Je){B.set(Je,pr(Ie,f,g,Je,l,k))});var Ae=te?Y?mh:gh:Y?$n:sn,Xe=ne?n:Ae(l);return fr(Xe||l,function(Ie,Je){Xe&&(Je=Ie,Ie=l[Je]),Ha(B,Je,pr(Ie,f,g,Je,l,k))}),B}function WP(l){var f=sn(l);return function(g){return D0(g,l,f)}}function D0(l,f,g){var _=g.length;if(l==null)return!_;for(l=St(l);_--;){var T=g[_],k=f[T],B=l[T];if(B===n&&!(T in l)||!k(B))return!1}return!0}function N0(l,f,g){if(typeof l!="function")throw new dr(s);return Ka(function(){l.apply(n,g)},f)}function Wa(l,f,g,_){var T=-1,k=Tu,B=!0,j=l.length,Y=[],te=f.length;if(!j)return Y;g&&(f=Nt(f,Jn(g))),_?(k=Nd,B=!1):f.length>=i&&(k=Ba,B=!1,f=new Co(f));e:for(;++TT?0:T+g),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=g>_?0:eb(_);g<_;)l[g++]=f;return l}function $0(l,f){var g=[];return Fi(l,function(_,T,k){f(_,T,k)&&g.push(_)}),g}function gn(l,f,g,_,T){var k=-1,B=l.length;for(g||(g=L2),T||(T=[]);++k0&&g(j)?f>1?gn(j,f-1,g,_,T):Ni(T,j):_||(T[T.length]=j)}return T}var Qd=cy(),F0=cy(!0);function Qr(l,f){return l&&Qd(l,f,sn)}function Jd(l,f){return l&&F0(l,f,sn)}function Gu(l,f){return Di(f,function(g){return mi(l[g])})}function Ao(l,f){f=Ui(f,l);for(var g=0,_=f.length;l!=null&&g<_;)l=l[Zr(f[g++])];return g&&g==_?l:n}function z0(l,f,g){var _=f(l);return $e(l)?_:Ni(_,g(l))}function Rn(l){return l==null?l===n?vt:Ze:So&&So in St(l)?I2(l):U2(l)}function Zd(l,f){return l>f}function XP(l,f){return l!=null&&bt.call(l,f)}function qP(l,f){return l!=null&&f in St(l)}function YP(l,f,g){return l>=wn(f,g)&&l=120&&ne.length>=120)?new Co(B&&ne):n}ne=l[0];var oe=-1,de=j[0];e:for(;++oe-1;)j!==l&&Nu.call(j,Y,1),Nu.call(l,Y,1);return l}function K0(l,f){for(var g=l?f.length:0,_=g-1;g--;){var T=f[g];if(g==_||T!==k){var k=T;gi(T)?Nu.call(l,T,1):lh(l,T)}}return l}function oh(l,f){return l+Fu(P0()*(f-l+1))}function l2(l,f,g,_){for(var T=-1,k=nn($u((f-l)/(g||1)),0),B=Z(k);k--;)B[_?k:++T]=l,l+=g;return B}function sh(l,f){var g="";if(!l||f<1||f>W)return g;do f%2&&(g+=l),f=Fu(f/2),f&&(l+=l);while(f);return g}function Ye(l,f){return Sh(Ty(l,f,Fn),l+"")}function u2(l){return k0(Rs(l))}function c2(l,f){var g=Rs(l);return nc(g,To(f,0,g.length))}function Xa(l,f,g,_){if(!Ft(l))return l;f=Ui(f,l);for(var T=-1,k=f.length,B=k-1,j=l;j!=null&&++TT?0:T+f),g=g>T?T:g,g<0&&(g+=T),T=f>g?0:g-f>>>0,f>>>=0;for(var k=Z(T);++_>>1,B=l[k];B!==null&&!er(B)&&(g?B<=f:B=i){var te=f?null:E2(l);if(te)return Iu(te);B=!1,T=Ba,Y=new Co}else Y=f?[]:j;e:for(;++_=_?l:gr(l,f,g)}var ry=tP||function(l){return pn.clearTimeout(l)};function iy(l,f){if(f)return l.slice();var g=l.length,_=C0?C0(g):new l.constructor(g);return l.copy(_),_}function dh(l){var f=new l.constructor(l.byteLength);return new Lu(f).set(new Lu(l)),f}function g2(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function m2(l){var f=new l.constructor(l.source,lr.exec(l));return f.lastIndex=l.lastIndex,f}function v2(l){return ja?St(ja.call(l)):{}}function oy(l,f){var g=f?dh(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sy(l,f){if(l!==f){var g=l!==n,_=l===null,T=l===l,k=er(l),B=f!==n,j=f===null,Y=f===f,te=er(f);if(!j&&!te&&!k&&l>f||k&&B&&Y&&!j&&!te||_&&B&&Y||!g&&Y||!T)return 1;if(!_&&!k&&!te&&l=j)return Y;var te=g[_];return Y*(te=="desc"?-1:1)}}return l.index-f.index}function ay(l,f,g,_){for(var T=-1,k=l.length,B=g.length,j=-1,Y=f.length,te=nn(k-B,0),ne=Z(Y+te),oe=!_;++j1?g[T-1]:n,B=T>2?g[2]:n;for(k=l.length>3&&typeof k=="function"?(T--,k):n,B&&Pn(g[0],g[1],B)&&(k=T<3?n:k,T=1),f=St(f);++_-1?T[k?f[B]:B]:n}}function hy(l){return pi(function(f){var g=f.length,_=g,T=hr.prototype.thru;for(l&&f.reverse();_--;){var k=f[_];if(typeof k!="function")throw new dr(s);if(T&&!B&&ec(k)=="wrapper")var B=new hr([],!0)}for(_=B?_:g;++_1&&rt.reverse(),ne&&Yj))return!1;var te=k.get(l),ne=k.get(f);if(te&&ne)return te==f&&ne==l;var oe=-1,de=!0,we=g&y?new Co:n;for(k.set(l,f),k.set(f,l);++oe1?"& ":"")+f[_],f=f.join(g>2?", ":" "),l.replace(Li,`{ /* [wrapped with `+f+`] */ -`)}function D2(l){return $e(l)||Po(l)||!!(I0&&l&&l[I0])}function gi(l,f){var g=typeof l;return f=f??W,!!f&&(g=="number"||g!="symbol"&&Uv.test(l))&&l>-1&&l%1==0&&l0){if(++f>=V)return arguments[0]}else f=0;return l.apply(n,arguments)}}function nc(l,f){var g=-1,_=l.length,T=_-1;for(f=f===n?_:f;++g1?l[f-1]:n;return g=typeof g=="function"?(l.pop(),g):n,$y(l,g)});function Fy(l){var f=P(l);return f.__chain__=!0,f}function GO(l,f){return f(l),l}function rc(l,f){return f(l)}var VO=pi(function(l){var f=l.length,g=f?l[0]:0,_=this.__wrapped__,T=function(k){return Kd(k,l)};return f>1||this.__actions__.length||!(_ instanceof et)||!gi(g)?this.thru(T):(_=_.slice(g,+g+(f?1:0)),_.__actions__.push({func:rc,args:[T],thisArg:n}),new hr(_,this.__chain__).thru(function(k){return f&&!k.length&&k.push(n),k}))});function XO(){return Fy(this)}function qO(){return new hr(this.value(),this.__chain__)}function YO(){this.__values__===n&&(this.__values__=Zy(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function KO(){return this}function QO(l){for(var f,g=this;g instanceof ju;){var _=My(g);_.__index__=0,_.__values__=n,f?T.__wrapped__=_:f=_;var T=_;g=g.__wrapped__}return T.__wrapped__=l,f}function JO(){var l=this.__wrapped__;if(l instanceof et){var f=l;return this.__actions__.length&&(f=new et(this)),f=f.reverse(),f.__actions__.push({func:rc,args:[Eh],thisArg:n}),new hr(f,this.__chain__)}return this.thru(Eh)}function ZO(){return ty(this.__wrapped__,this.__actions__)}var eM=Yu(function(l,f,g){bt.call(l,g)?++l[g]:di(l,g,1)});function tM(l,f,g){var _=$e(l)?p0:GP;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}function nM(l,f){var g=$e(l)?Li:$0;return g(l,Te(f,3))}var rM=dy(ky),iM=dy(Dy);function oM(l,f){return gn(ic(l,f),1)}function sM(l,f){return gn(ic(l,f),G)}function aM(l,f,g){return g=g===n?1:Ge(g),gn(ic(l,f),g)}function zy(l,f){var g=$e(l)?fr:Fi;return g(l,Te(f,3))}function Uy(l,f){var g=$e(l)?TR:B0;return g(l,Te(f,3))}var lM=Yu(function(l,f,g){bt.call(l,g)?l[g].push(f):di(l,g,[f])});function uM(l,f,g,_){l=Bn(l)?l:Rs(l),g=g&&!_?Ge(g):0;var T=l.length;return g<0&&(g=nn(T+g,0)),uc(l)?g<=T&&l.indexOf(f,g)>-1:!!T&&vs(l,f,g)>-1}var cM=Ye(function(l,f,g){var _=-1,T=typeof f=="function",k=Bn(l)?Z(l.length):[];return Fi(l,function(B){k[++_]=T?Qn(f,B,g):Ga(B,f,g)}),k}),fM=Yu(function(l,f,g){di(l,g,f)});function ic(l,f){var g=$e(l)?Nt:W0;return g(l,Te(f,3))}function dM(l,f,g,_){return l==null?[]:($e(f)||(f=f==null?[]:[f]),g=_?n:g,$e(g)||(g=g==null?[]:[g]),q0(l,f,g))}var hM=Yu(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function pM(l,f,g){var _=$e(l)?Bd:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,Fi)}function gM(l,f,g){var _=$e(l)?AR:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,B0)}function mM(l,f){var g=$e(l)?Li:$0;return g(l,ac(Te(f,3)))}function vM(l){var f=$e(l)?k0:u2;return f(l)}function yM(l,f,g){(g?Pn(l,f,g):f===n)?f=1:f=Ge(f);var _=$e(l)?zP:c2;return _(l,f)}function bM(l){var f=$e(l)?UP:d2;return f(l)}function xM(l){if(l==null)return 0;if(Bn(l))return uc(l)?bs(l):l.length;var f=_n(l);return f==ge||f==ze?l.size:nh(l).length}function wM(l,f,g){var _=$e(l)?$d:h2;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}var _M=Ye(function(l,f){if(l==null)return[];var g=f.length;return g>1&&Pn(l,f[0],f[1])?f=[]:g>2&&Pn(f[0],f[1],f[2])&&(f=[f[0]]),q0(l,gn(f,1),[])}),oc=nP||function(){return pn.Date.now()};function SM(l,f){if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){if(--l<1)return f.apply(this,arguments)}}function jy(l,f,g){return f=g?n:f,f=l&&f==null?l.length:f,hi(l,R,n,n,n,n,f)}function Hy(l,f){var g;if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=n),g}}var Th=Ye(function(l,f,g){var _=S;if(g.length){var T=Bi(g,As(Th));_|=A}return hi(l,_,f,g,T)}),Wy=Ye(function(l,f,g){var _=S|w;if(g.length){var T=Bi(g,As(Wy));_|=A}return hi(f,_,l,g,T)});function Gy(l,f,g){f=g?n:f;var _=hi(l,x,n,n,n,n,n,f);return _.placeholder=Gy.placeholder,_}function Vy(l,f,g){f=g?n:f;var _=hi(l,E,n,n,n,n,n,f);return _.placeholder=Vy.placeholder,_}function Xy(l,f,g){var _,T,k,B,j,Y,te=0,ne=!1,oe=!1,de=!0;if(typeof l!="function")throw new dr(s);f=vr(f)||0,Ft(g)&&(ne=!!g.leading,oe="maxWait"in g,k=oe?nn(vr(g.maxWait)||0,f):k,de="trailing"in g?!!g.trailing:de);function we(Yt){var Mr=_,yi=T;return _=T=n,te=Yt,B=l.apply(yi,Mr),B}function Ae(Yt){return te=Yt,j=Ka(Je,f),ne?we(Yt):B}function Xe(Yt){var Mr=Yt-Y,yi=Yt-te,db=f-Mr;return oe?wn(db,k-yi):db}function Ie(Yt){var Mr=Yt-Y,yi=Yt-te;return Y===n||Mr>=f||Mr<0||oe&&yi>=k}function Je(){var Yt=oc();if(Ie(Yt))return rt(Yt);j=Ka(Je,Xe(Yt))}function rt(Yt){return j=n,de&&_?we(Yt):(_=T=n,B)}function tr(){j!==n&&ry(j),te=0,_=Y=T=j=n}function On(){return j===n?B:rt(oc())}function nr(){var Yt=oc(),Mr=Ie(Yt);if(_=arguments,T=this,Y=Yt,Mr){if(j===n)return Ae(Y);if(oe)return ry(j),j=Ka(Je,f),we(Y)}return j===n&&(j=Ka(Je,f)),B}return nr.cancel=tr,nr.flush=On,nr}var EM=Ye(function(l,f){return N0(l,1,f)}),CM=Ye(function(l,f,g){return N0(l,vr(f)||0,g)});function TM(l){return hi(l,L)}function sc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new dr(s);var g=function(){var _=arguments,T=f?f.apply(this,_):_[0],k=g.cache;if(k.has(T))return k.get(T);var B=l.apply(this,_);return g.cache=k.set(T,B)||k,B};return g.cache=new(sc.Cache||fi),g}sc.Cache=fi;function ac(l){if(typeof l!="function")throw new dr(s);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function AM(l){return Hy(2,l)}var IM=p2(function(l,f){f=f.length==1&&$e(f[0])?Nt(f[0],Jn(Te())):Nt(gn(f,1),Jn(Te()));var g=f.length;return Ye(function(_){for(var T=-1,k=wn(_.length,g);++T=f}),Po=U0(function(){return arguments}())?U0:function(l){return Ut(l)&&bt.call(l,"callee")&&!A0.call(l,"callee")},$e=Z.isArray,HM=l0?Jn(l0):QP;function Bn(l){return l!=null&&lc(l.length)&&!mi(l)}function qt(l){return Ut(l)&&Bn(l)}function WM(l){return l===!0||l===!1||Ut(l)&&Rn(l)==le}var Hi=iP||$h,GM=u0?Jn(u0):JP;function VM(l){return Ut(l)&&l.nodeType===1&&!Qa(l)}function XM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Hi(l)||Is(l)||Po(l)))return!l.length;var f=_n(l);if(f==ge||f==ze)return!l.size;if(Ya(l))return!nh(l).length;for(var g in l)if(bt.call(l,g))return!1;return!0}function qM(l,f){return Va(l,f)}function YM(l,f,g){g=typeof g=="function"?g:n;var _=g?g(l,f):n;return _===n?Va(l,f,n,g):!!_}function Ih(l){if(!Ut(l))return!1;var f=Rn(l);return f==ve||f==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Qa(l)}function KM(l){return typeof l=="number"&&R0(l)}function mi(l){if(!Ft(l))return!1;var f=Rn(l);return f==ye||f==xe||f==ae||f==Bt}function Yy(l){return typeof l=="number"&&l==Ge(l)}function lc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function Ft(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Ut(l){return l!=null&&typeof l=="object"}var Ky=c0?Jn(c0):e2;function QM(l,f){return l===f||th(l,f,yh(f))}function JM(l,f,g){return g=typeof g=="function"?g:n,th(l,f,yh(f),g)}function ZM(l){return Qy(l)&&l!=+l}function ek(l){if(B2(l))throw new Le(o);return j0(l)}function tk(l){return l===null}function nk(l){return l==null}function Qy(l){return typeof l=="number"||Ut(l)&&Rn(l)==be}function Qa(l){if(!Ut(l)||Rn(l)!=qe)return!1;var f=Lu(l);if(f===null)return!0;var g=bt.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Ou.call(g)==JR}var Rh=f0?Jn(f0):t2;function rk(l){return Yy(l)&&l>=-W&&l<=W}var Jy=d0?Jn(d0):n2;function uc(l){return typeof l=="string"||!$e(l)&&Ut(l)&&Rn(l)==st}function er(l){return typeof l=="symbol"||Ut(l)&&Rn(l)==mt}var Is=h0?Jn(h0):r2;function ik(l){return l===n}function ok(l){return Ut(l)&&_n(l)==_e}function sk(l){return Ut(l)&&Rn(l)==Ue}var ak=Zu(rh),lk=Zu(function(l,f){return l<=f});function Zy(l){if(!l)return[];if(Bn(l))return uc(l)?Rr(l):Nn(l);if($a&&l[$a])return zR(l[$a]());var f=_n(l),g=f==ge?Wd:f==ze?Iu:Rs;return g(l)}function vi(l){if(!l)return l===0?l:0;if(l=vr(l),l===G||l===-G){var f=l<0?-1:1;return f*K}return l===l?l:0}function Ge(l){var f=vi(l),g=f%1;return f===f?g?f-g:f:0}function eb(l){return l?To(Ge(l),0,Q):0}function vr(l){if(typeof l=="number")return l;if(er(l))return q;if(Ft(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Ft(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=b0(l);var g=Ll.test(l);return g||zv.test(l)?SR(l.slice(2),g?2:8):Dl.test(l)?q:+l}function tb(l){return Jr(l,$n(l))}function uk(l){return l?To(Ge(l),-W,W):l===0?l:0}function ht(l){return l==null?"":Zn(l)}var ck=Cs(function(l,f){if(Ya(f)||Bn(f)){Jr(f,sn(f),l);return}for(var g in f)bt.call(f,g)&&Ha(l,g,f[g])}),nb=Cs(function(l,f){Jr(f,$n(f),l)}),cc=Cs(function(l,f,g,_){Jr(f,$n(f),l,_)}),fk=Cs(function(l,f,g,_){Jr(f,sn(f),l,_)}),dk=pi(Kd);function hk(l,f){var g=Es(l);return f==null?g:D0(g,f)}var pk=Ye(function(l,f){l=St(l);var g=-1,_=f.length,T=_>2?f[2]:n;for(T&&Pn(f[0],f[1],T)&&(_=1);++g<_;)for(var k=f[g],B=$n(k),j=-1,Y=B.length;++j1),k}),Jr(l,mh(l),g),_&&(g=pr(g,h|p|m,C2));for(var T=f.length;T--;)lh(g,f[T]);return g});function Mk(l,f){return ib(l,ac(Te(f)))}var kk=pi(function(l,f){return l==null?{}:s2(l,f)});function ib(l,f){if(l==null)return{};var g=Nt(mh(l),function(_){return[_]});return f=Te(f),Y0(l,g,function(_,T){return f(_,T[0])})}function Dk(l,f,g){f=Ui(f,l);var _=-1,T=f.length;for(T||(T=1,l=n);++_f){var _=l;l=f,f=_}if(g||l%1||f%1){var T=P0();return wn(l+T*(f-l+_R("1e-"+((T+"").length-1))),f)}return oh(l,f)}var Gk=Ts(function(l,f,g){return f=f.toLowerCase(),l+(g?ab(f):f)});function ab(l){return Mh(ht(l).toLowerCase())}function lb(l){return l=ht(l),l&&l.replace(Zt,LR).replace(dR,"")}function Vk(l,f,g){l=ht(l),f=Zn(f);var _=l.length;g=g===n?_:To(Ge(g),0,_);var T=g;return g-=f.length,g>=0&&l.slice(g,T)==f}function Xk(l){return l=ht(l),l&&ui.test(l)?l.replace(Wr,NR):l}function qk(l){return l=ht(l),l&&Ad.test(l)?l.replace(hs,"\\$&"):l}var Yk=Ts(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),Kk=Ts(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),Qk=fy("toLowerCase");function Jk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;if(!f||_>=f)return l;var T=(f-_)/2;return Ju(Fu(T),g)+l+Ju($u(T),g)}function Zk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;return f&&_>>0,g?(l=ht(l),l&&(typeof f=="string"||f!=null&&!Rh(f))&&(f=Zn(f),!f&&ys(l))?ji(Rr(l),0,g):l.split(f,g)):[]}var sD=Ts(function(l,f,g){return l+(g?" ":"")+Mh(f)});function aD(l,f,g){return l=ht(l),g=g==null?0:To(Ge(g),0,l.length),f=Zn(f),l.slice(g,g+f.length)==f}function lD(l,f,g){var _=P.templateSettings;g&&Pn(l,f,g)&&(f=n),l=ht(l),f=cc({},f,_,yy);var T=cc({},f.imports,_.imports,yy),k=sn(T),B=Hd(T,k),j,Y,te=0,ne=f.interpolate||Ir,oe="__p += '",de=Gd((f.escape||Ir).source+"|"+ne.source+"|"+(ne===ia?Kn:Ir).source+"|"+(f.evaluate||Ir).source+"|$","g"),we="//# sourceURL="+(bt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vR+"]")+` +`)}function L2(l){return $e(l)||Po(l)||!!(I0&&l&&l[I0])}function gi(l,f){var g=typeof l;return f=f??W,!!f&&(g=="number"||g!="symbol"&&Uv.test(l))&&l>-1&&l%1==0&&l0){if(++f>=V)return arguments[0]}else f=0;return l.apply(n,arguments)}}function nc(l,f){var g=-1,_=l.length,T=_-1;for(f=f===n?_:f;++g1?l[f-1]:n;return g=typeof g=="function"?(l.pop(),g):n,$y(l,g)});function Fy(l){var f=P(l);return f.__chain__=!0,f}function GO(l,f){return f(l),l}function rc(l,f){return f(l)}var VO=pi(function(l){var f=l.length,g=f?l[0]:0,_=this.__wrapped__,T=function(k){return Kd(k,l)};return f>1||this.__actions__.length||!(_ instanceof et)||!gi(g)?this.thru(T):(_=_.slice(g,+g+(f?1:0)),_.__actions__.push({func:rc,args:[T],thisArg:n}),new hr(_,this.__chain__).thru(function(k){return f&&!k.length&&k.push(n),k}))});function XO(){return Fy(this)}function qO(){return new hr(this.value(),this.__chain__)}function YO(){this.__values__===n&&(this.__values__=Zy(this.value()));var l=this.__index__>=this.__values__.length,f=l?n:this.__values__[this.__index__++];return{done:l,value:f}}function KO(){return this}function QO(l){for(var f,g=this;g instanceof ju;){var _=My(g);_.__index__=0,_.__values__=n,f?T.__wrapped__=_:f=_;var T=_;g=g.__wrapped__}return T.__wrapped__=l,f}function JO(){var l=this.__wrapped__;if(l instanceof et){var f=l;return this.__actions__.length&&(f=new et(this)),f=f.reverse(),f.__actions__.push({func:rc,args:[Eh],thisArg:n}),new hr(f,this.__chain__)}return this.thru(Eh)}function ZO(){return ty(this.__wrapped__,this.__actions__)}var eM=Yu(function(l,f,g){bt.call(l,g)?++l[g]:di(l,g,1)});function tM(l,f,g){var _=$e(l)?p0:GP;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}function nM(l,f){var g=$e(l)?Di:$0;return g(l,Te(f,3))}var rM=dy(ky),iM=dy(Ly);function oM(l,f){return gn(ic(l,f),1)}function sM(l,f){return gn(ic(l,f),G)}function aM(l,f,g){return g=g===n?1:Ge(g),gn(ic(l,f),g)}function zy(l,f){var g=$e(l)?fr:Fi;return g(l,Te(f,3))}function Uy(l,f){var g=$e(l)?TR:B0;return g(l,Te(f,3))}var lM=Yu(function(l,f,g){bt.call(l,g)?l[g].push(f):di(l,g,[f])});function uM(l,f,g,_){l=Bn(l)?l:Rs(l),g=g&&!_?Ge(g):0;var T=l.length;return g<0&&(g=nn(T+g,0)),uc(l)?g<=T&&l.indexOf(f,g)>-1:!!T&&vs(l,f,g)>-1}var cM=Ye(function(l,f,g){var _=-1,T=typeof f=="function",k=Bn(l)?Z(l.length):[];return Fi(l,function(B){k[++_]=T?Qn(f,B,g):Ga(B,f,g)}),k}),fM=Yu(function(l,f,g){di(l,g,f)});function ic(l,f){var g=$e(l)?Nt:W0;return g(l,Te(f,3))}function dM(l,f,g,_){return l==null?[]:($e(f)||(f=f==null?[]:[f]),g=_?n:g,$e(g)||(g=g==null?[]:[g]),q0(l,f,g))}var hM=Yu(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function pM(l,f,g){var _=$e(l)?Bd:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,Fi)}function gM(l,f,g){var _=$e(l)?AR:y0,T=arguments.length<3;return _(l,Te(f,4),g,T,B0)}function mM(l,f){var g=$e(l)?Di:$0;return g(l,ac(Te(f,3)))}function vM(l){var f=$e(l)?k0:u2;return f(l)}function yM(l,f,g){(g?Pn(l,f,g):f===n)?f=1:f=Ge(f);var _=$e(l)?zP:c2;return _(l,f)}function bM(l){var f=$e(l)?UP:d2;return f(l)}function xM(l){if(l==null)return 0;if(Bn(l))return uc(l)?bs(l):l.length;var f=_n(l);return f==ge||f==ze?l.size:nh(l).length}function wM(l,f,g){var _=$e(l)?$d:h2;return g&&Pn(l,f,g)&&(f=n),_(l,Te(f,3))}var _M=Ye(function(l,f){if(l==null)return[];var g=f.length;return g>1&&Pn(l,f[0],f[1])?f=[]:g>2&&Pn(f[0],f[1],f[2])&&(f=[f[0]]),q0(l,gn(f,1),[])}),oc=nP||function(){return pn.Date.now()};function SM(l,f){if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){if(--l<1)return f.apply(this,arguments)}}function jy(l,f,g){return f=g?n:f,f=l&&f==null?l.length:f,hi(l,R,n,n,n,n,f)}function Hy(l,f){var g;if(typeof f!="function")throw new dr(s);return l=Ge(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=n),g}}var Th=Ye(function(l,f,g){var _=S;if(g.length){var T=Bi(g,As(Th));_|=A}return hi(l,_,f,g,T)}),Wy=Ye(function(l,f,g){var _=S|w;if(g.length){var T=Bi(g,As(Wy));_|=A}return hi(f,_,l,g,T)});function Gy(l,f,g){f=g?n:f;var _=hi(l,x,n,n,n,n,n,f);return _.placeholder=Gy.placeholder,_}function Vy(l,f,g){f=g?n:f;var _=hi(l,E,n,n,n,n,n,f);return _.placeholder=Vy.placeholder,_}function Xy(l,f,g){var _,T,k,B,j,Y,te=0,ne=!1,oe=!1,de=!0;if(typeof l!="function")throw new dr(s);f=vr(f)||0,Ft(g)&&(ne=!!g.leading,oe="maxWait"in g,k=oe?nn(vr(g.maxWait)||0,f):k,de="trailing"in g?!!g.trailing:de);function we(Yt){var Mr=_,yi=T;return _=T=n,te=Yt,B=l.apply(yi,Mr),B}function Ae(Yt){return te=Yt,j=Ka(Je,f),ne?we(Yt):B}function Xe(Yt){var Mr=Yt-Y,yi=Yt-te,db=f-Mr;return oe?wn(db,k-yi):db}function Ie(Yt){var Mr=Yt-Y,yi=Yt-te;return Y===n||Mr>=f||Mr<0||oe&&yi>=k}function Je(){var Yt=oc();if(Ie(Yt))return rt(Yt);j=Ka(Je,Xe(Yt))}function rt(Yt){return j=n,de&&_?we(Yt):(_=T=n,B)}function tr(){j!==n&&ry(j),te=0,_=Y=T=j=n}function On(){return j===n?B:rt(oc())}function nr(){var Yt=oc(),Mr=Ie(Yt);if(_=arguments,T=this,Y=Yt,Mr){if(j===n)return Ae(Y);if(oe)return ry(j),j=Ka(Je,f),we(Y)}return j===n&&(j=Ka(Je,f)),B}return nr.cancel=tr,nr.flush=On,nr}var EM=Ye(function(l,f){return N0(l,1,f)}),CM=Ye(function(l,f,g){return N0(l,vr(f)||0,g)});function TM(l){return hi(l,D)}function sc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new dr(s);var g=function(){var _=arguments,T=f?f.apply(this,_):_[0],k=g.cache;if(k.has(T))return k.get(T);var B=l.apply(this,_);return g.cache=k.set(T,B)||k,B};return g.cache=new(sc.Cache||fi),g}sc.Cache=fi;function ac(l){if(typeof l!="function")throw new dr(s);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function AM(l){return Hy(2,l)}var IM=p2(function(l,f){f=f.length==1&&$e(f[0])?Nt(f[0],Jn(Te())):Nt(gn(f,1),Jn(Te()));var g=f.length;return Ye(function(_){for(var T=-1,k=wn(_.length,g);++T=f}),Po=U0(function(){return arguments}())?U0:function(l){return Ut(l)&&bt.call(l,"callee")&&!A0.call(l,"callee")},$e=Z.isArray,HM=l0?Jn(l0):QP;function Bn(l){return l!=null&&lc(l.length)&&!mi(l)}function qt(l){return Ut(l)&&Bn(l)}function WM(l){return l===!0||l===!1||Ut(l)&&Rn(l)==le}var Hi=iP||$h,GM=u0?Jn(u0):JP;function VM(l){return Ut(l)&&l.nodeType===1&&!Qa(l)}function XM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Hi(l)||Is(l)||Po(l)))return!l.length;var f=_n(l);if(f==ge||f==ze)return!l.size;if(Ya(l))return!nh(l).length;for(var g in l)if(bt.call(l,g))return!1;return!0}function qM(l,f){return Va(l,f)}function YM(l,f,g){g=typeof g=="function"?g:n;var _=g?g(l,f):n;return _===n?Va(l,f,n,g):!!_}function Ih(l){if(!Ut(l))return!1;var f=Rn(l);return f==ve||f==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Qa(l)}function KM(l){return typeof l=="number"&&R0(l)}function mi(l){if(!Ft(l))return!1;var f=Rn(l);return f==ye||f==xe||f==ae||f==Bt}function Yy(l){return typeof l=="number"&&l==Ge(l)}function lc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function Ft(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Ut(l){return l!=null&&typeof l=="object"}var Ky=c0?Jn(c0):e2;function QM(l,f){return l===f||th(l,f,yh(f))}function JM(l,f,g){return g=typeof g=="function"?g:n,th(l,f,yh(f),g)}function ZM(l){return Qy(l)&&l!=+l}function ek(l){if(B2(l))throw new De(o);return j0(l)}function tk(l){return l===null}function nk(l){return l==null}function Qy(l){return typeof l=="number"||Ut(l)&&Rn(l)==be}function Qa(l){if(!Ut(l)||Rn(l)!=qe)return!1;var f=Du(l);if(f===null)return!0;var g=bt.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Ou.call(g)==JR}var Rh=f0?Jn(f0):t2;function rk(l){return Yy(l)&&l>=-W&&l<=W}var Jy=d0?Jn(d0):n2;function uc(l){return typeof l=="string"||!$e(l)&&Ut(l)&&Rn(l)==st}function er(l){return typeof l=="symbol"||Ut(l)&&Rn(l)==mt}var Is=h0?Jn(h0):r2;function ik(l){return l===n}function ok(l){return Ut(l)&&_n(l)==_e}function sk(l){return Ut(l)&&Rn(l)==Ue}var ak=Zu(rh),lk=Zu(function(l,f){return l<=f});function Zy(l){if(!l)return[];if(Bn(l))return uc(l)?Rr(l):Nn(l);if($a&&l[$a])return zR(l[$a]());var f=_n(l),g=f==ge?Wd:f==ze?Iu:Rs;return g(l)}function vi(l){if(!l)return l===0?l:0;if(l=vr(l),l===G||l===-G){var f=l<0?-1:1;return f*K}return l===l?l:0}function Ge(l){var f=vi(l),g=f%1;return f===f?g?f-g:f:0}function eb(l){return l?To(Ge(l),0,Q):0}function vr(l){if(typeof l=="number")return l;if(er(l))return q;if(Ft(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Ft(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=b0(l);var g=Dl.test(l);return g||zv.test(l)?SR(l.slice(2),g?2:8):Ll.test(l)?q:+l}function tb(l){return Jr(l,$n(l))}function uk(l){return l?To(Ge(l),-W,W):l===0?l:0}function ht(l){return l==null?"":Zn(l)}var ck=Cs(function(l,f){if(Ya(f)||Bn(f)){Jr(f,sn(f),l);return}for(var g in f)bt.call(f,g)&&Ha(l,g,f[g])}),nb=Cs(function(l,f){Jr(f,$n(f),l)}),cc=Cs(function(l,f,g,_){Jr(f,$n(f),l,_)}),fk=Cs(function(l,f,g,_){Jr(f,sn(f),l,_)}),dk=pi(Kd);function hk(l,f){var g=Es(l);return f==null?g:L0(g,f)}var pk=Ye(function(l,f){l=St(l);var g=-1,_=f.length,T=_>2?f[2]:n;for(T&&Pn(f[0],f[1],T)&&(_=1);++g<_;)for(var k=f[g],B=$n(k),j=-1,Y=B.length;++j1),k}),Jr(l,mh(l),g),_&&(g=pr(g,h|p|m,C2));for(var T=f.length;T--;)lh(g,f[T]);return g});function Mk(l,f){return ib(l,ac(Te(f)))}var kk=pi(function(l,f){return l==null?{}:s2(l,f)});function ib(l,f){if(l==null)return{};var g=Nt(mh(l),function(_){return[_]});return f=Te(f),Y0(l,g,function(_,T){return f(_,T[0])})}function Lk(l,f,g){f=Ui(f,l);var _=-1,T=f.length;for(T||(T=1,l=n);++_f){var _=l;l=f,f=_}if(g||l%1||f%1){var T=P0();return wn(l+T*(f-l+_R("1e-"+((T+"").length-1))),f)}return oh(l,f)}var Gk=Ts(function(l,f,g){return f=f.toLowerCase(),l+(g?ab(f):f)});function ab(l){return Mh(ht(l).toLowerCase())}function lb(l){return l=ht(l),l&&l.replace(Zt,DR).replace(dR,"")}function Vk(l,f,g){l=ht(l),f=Zn(f);var _=l.length;g=g===n?_:To(Ge(g),0,_);var T=g;return g-=f.length,g>=0&&l.slice(g,T)==f}function Xk(l){return l=ht(l),l&&ui.test(l)?l.replace(Wr,NR):l}function qk(l){return l=ht(l),l&&Ad.test(l)?l.replace(hs,"\\$&"):l}var Yk=Ts(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),Kk=Ts(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),Qk=fy("toLowerCase");function Jk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;if(!f||_>=f)return l;var T=(f-_)/2;return Ju(Fu(T),g)+l+Ju($u(T),g)}function Zk(l,f,g){l=ht(l),f=Ge(f);var _=f?bs(l):0;return f&&_>>0,g?(l=ht(l),l&&(typeof f=="string"||f!=null&&!Rh(f))&&(f=Zn(f),!f&&ys(l))?ji(Rr(l),0,g):l.split(f,g)):[]}var sL=Ts(function(l,f,g){return l+(g?" ":"")+Mh(f)});function aL(l,f,g){return l=ht(l),g=g==null?0:To(Ge(g),0,l.length),f=Zn(f),l.slice(g,g+f.length)==f}function lL(l,f,g){var _=P.templateSettings;g&&Pn(l,f,g)&&(f=n),l=ht(l),f=cc({},f,_,yy);var T=cc({},f.imports,_.imports,yy),k=sn(T),B=Hd(T,k),j,Y,te=0,ne=f.interpolate||Ir,oe="__p += '",de=Gd((f.escape||Ir).source+"|"+ne.source+"|"+(ne===ia?Kn:Ir).source+"|"+(f.evaluate||Ir).source+"|$","g"),we="//# sourceURL="+(bt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vR+"]")+` `;l.replace(de,function(Ie,Je,rt,tr,On,nr){return rt||(rt=tr),oe+=l.slice(te,nr).replace(qI,BR),Je&&(j=!0,oe+=`' + __e(`+Je+`) + '`),On&&(Y=!0,oe+=`'; @@ -678,24 +678,24 @@ __p += '`),rt&&(oe+=`' + `;var Ae=bt.call(f,"variable")&&f.variable;if(!Ae)oe=`with (obj) { `+oe+` } -`;else if(Na.test(Ae))throw new Le(a);oe=(Y?oe.replace(Gt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(Ae||"obj")+`) { +`;else if(Na.test(Ae))throw new De(a);oe=(Y?oe.replace(Gt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(Ae||"obj")+`) { `+(Ae?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Xe=cb(function(){return dt(k,we+"return "+oe).apply(n,B)});if(Xe.source=oe,Ih(Xe))throw Xe;return Xe}function uD(l){return ht(l).toLowerCase()}function cD(l){return ht(l).toUpperCase()}function fD(l,f,g){if(l=ht(l),l&&(g||f===n))return b0(l);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=Rr(f),k=x0(_,T),B=w0(_,T)+1;return ji(_,k,B).join("")}function dD(l,f,g){if(l=ht(l),l&&(g||f===n))return l.slice(0,S0(l)+1);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=w0(_,Rr(f))+1;return ji(_,0,T).join("")}function hD(l,f,g){if(l=ht(l),l&&(g||f===n))return l.replace(xo,"");if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=x0(_,Rr(f));return ji(_,T).join("")}function pD(l,f){var g=N,_=H;if(Ft(f)){var T="separator"in f?f.separator:T;g="length"in f?Ge(f.length):g,_="omission"in f?Zn(f.omission):_}l=ht(l);var k=l.length;if(ys(l)){var B=Rr(l);k=B.length}if(g>=k)return l;var j=g-bs(_);if(j<1)return _;var Y=B?ji(B,0,j).join(""):l.slice(0,j);if(T===n)return Y+_;if(B&&(j+=Y.length-j),Rh(T)){if(l.slice(j).search(T)){var te,ne=Y;for(T.global||(T=Gd(T.source,ht(lr.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;Y=Y.slice(0,oe===n?j:oe)}}else if(l.indexOf(Zn(T),j)!=j){var de=Y.lastIndexOf(T);de>-1&&(Y=Y.slice(0,de))}return Y+_}function gD(l){return l=ht(l),l&&Kr.test(l)?l.replace(Hr,WR):l}var mD=Ts(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),Mh=fy("toUpperCase");function ub(l,f,g){return l=ht(l),f=g?n:f,f===n?FR(l)?XR(l):PR(l):l.match(f)||[]}var cb=Ye(function(l,f){try{return Qn(l,n,f)}catch(g){return Ih(g)?g:new Le(g)}}),vD=pi(function(l,f){return fr(f,function(g){g=Zr(g),di(l,g,Th(l[g],l))}),l});function yD(l){var f=l==null?0:l.length,g=Te();return l=f?Nt(l,function(_){if(typeof _[1]!="function")throw new dr(s);return[g(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var g=Q,_=wn(l,Q);f=Te(f),l-=Q;for(var T=jd(_,f);++g0||f<0)?new et(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==n&&(f=Ge(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),_=/^(?:head|last)$/.test(f),T=P[_?"take"+(f=="last"?"Right":""):f],k=_||/^find/.test(f);T&&(P.prototype[f]=function(){var B=this.__wrapped__,j=_?[1]:arguments,Y=B instanceof et,te=j[0],ne=Y||$e(B),oe=function(Je){var rt=T.apply(P,Ni([Je],j));return _&&de?rt[0]:rt};ne&&g&&typeof te=="function"&&te.length!=1&&(Y=ne=!1);var de=this.__chain__,we=!!this.__actions__.length,Ae=k&&!de,Xe=Y&&!we;if(!k&&ne){B=Xe?B:new et(this);var Ie=l.apply(B,j);return Ie.__actions__.push({func:rc,args:[oe],thisArg:n}),new hr(Ie,de)}return Ae&&Xe?l.apply(this,j):(Ie=this.thru(oe),Ae?_?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Ru[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var k=this.value();return f.apply($e(k)?k:[],T)}return this[g](function(B){return f.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,f){var g=P[f];if(g){var _=g.name+"";bt.call(Ss,_)||(Ss[_]=[]),Ss[_].push({name:f,func:g})}}),Ss[Ku(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=gP,et.prototype.reverse=mP,et.prototype.value=vP,P.prototype.at=VO,P.prototype.chain=XO,P.prototype.commit=qO,P.prototype.next=YO,P.prototype.plant=QO,P.prototype.reverse=JO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=ZO,P.prototype.first=P.prototype.head,$a&&(P.prototype[$a]=KO),P},xs=qR();_o?((_o.exports=xs)._=xs,Dd._=xs):pn._=xs}).call(Kt)})(GC,GC.exports);var en=GC.exports;let yFe=(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 og=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(og||{}),lne=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(lne||{}),q3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(q3||{}),Lt=(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))(Lt||{}),Kl=(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))(Kl||{}),Ve=(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))(Ve||{}),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||{}),Mt=(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))(Mt||{}),Y3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(Y3||{}),Ac=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Ac||{}),Zf=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Zf||{}),du=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(du||{}),kl=(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))(kl||{}),Gl=(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))(Gl||{}),nU=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(nU||{}),ya=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(ya||{}),bi=(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))(bi||{}),ri=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(ri||{}),su=(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))(su||{});const bFe={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")},nt={ADAPTER:bFe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var TB=/iPhone/i,Y9=/iPod/i,K9=/iPad/i,Q9=/\biOS-universal(?:.+)Mac\b/i,AB=/\bAndroid(?:.+)Mobile\b/i,J9=/Android/i,vg=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,iS=/Silk/i,pc=/Windows Phone/i,Z9=/\bWindows(?:.+)ARM\b/i,e7=/BlackBerry/i,t7=/BB10/i,n7=/Opera Mini/i,r7=/\b(CriOS|Chrome)(?:.+)Mobile/i,i7=/Mobile(?:.+)Firefox\b/i,o7=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function xFe(e){return function(t){return t.test(e)}}function s7(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=xFe(n),o={apple:{phone:i(TB)&&!i(pc),ipod:i(Y9),tablet:!i(TB)&&(i(K9)||o7(t))&&!i(pc),universal:i(Q9),device:(i(TB)||i(Y9)||i(K9)||i(Q9)||o7(t))&&!i(pc)},amazon:{phone:i(vg),tablet:!i(vg)&&i(iS),device:i(vg)||i(iS)},android:{phone:!i(pc)&&i(vg)||!i(pc)&&i(AB),tablet:!i(pc)&&!i(vg)&&!i(AB)&&(i(iS)||i(J9)),device:!i(pc)&&(i(vg)||i(iS)||i(AB)||i(J9))||i(/\bokhttp\b/i)},windows:{phone:i(pc),tablet:i(Z9),device:i(pc)||i(Z9)},other:{blackberry:i(e7),blackberry10:i(t7),opera:i(n7),firefox:i(i7),chrome:i(r7),device:i(e7)||i(t7)||i(n7)||i(i7)||i(r7)},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 wFe=s7.default??s7,Ic=wFe(globalThis.navigator);nt.RETINA_PREFIX=/@([0-9\.]+)x/;nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var une={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(u,c,d){this.fn=u,this.context=c,this.once=d||!1}function o(u,c,d,h,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,h||u,p),v=n?n+c:c;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],m]:u._events[v].push(m):(u._events[v]=m,u._eventsCount++),u}function s(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,h;if(this._eventsCount===0)return c;for(h in d=this._events)t.call(d,h)&&c.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=n?n+c:c,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,m=h.length,v=new Array(m);p80*n){a=c=e[0],u=d=e[1];for(var v=n;vc&&(c=h),p>d&&(d=p);m=Math.max(c-a,d-u),m=m!==0?32767/m:0}return Yx(o,s,n,a,u,m,0),s}function cne(e,t,n,r,i){var o,s;if(i===J3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=a7(o,e[o],e[o+1],s);return s&&SI(s,s.next)&&(Qx(s),s=s.next),s}function Xp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(SI(n,n.next)||$r(n.prev,n,n.next)===0)){if(Qx(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Yx(e,t,n,r,i,o,s){if(e){!s&&o&&MFe(e,r,i,o);for(var a=e,u,c;e.prev!==e.next;){if(u=e.prev,c=e.next,o?EFe(e,r,i,o):SFe(e)){t.push(u.i/n|0),t.push(e.i/n|0),t.push(c.i/n|0),Qx(e),e=c.next,a=c.next;continue}if(e=c,e===a){s?s===1?(e=CFe(Xp(e),t,n),Yx(e,t,n,r,i,o,2)):s===2&&TFe(e,t,n,r,i,o):Yx(Xp(e),t,n,r,i,o,1);break}}}}function SFe(e){var t=e.prev,n=e,r=e.next;if($r(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,a=t.y,u=n.y,c=r.y,d=io?i>s?i:s:o>s?o:s,m=a>u?a>c?a:c:u>c?u:c,v=r.next;v!==t;){if(v.x>=d&&v.x<=p&&v.y>=h&&v.y<=m&&om(i,a,o,u,s,c,v.x,v.y)&&$r(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function EFe(e,t,n,r){var i=e.prev,o=e,s=e.next;if($r(i,o,s)>=0)return!1;for(var a=i.x,u=o.x,c=s.x,d=i.y,h=o.y,p=s.y,m=au?a>c?a:c:u>c?u:c,S=d>h?d>p?d:p:h>p?h:p,w=K3(m,v,t,n,r),b=K3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=w&&E&&E.z<=b;){if(x.x>=m&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&om(a,d,u,h,c,p,x.x,x.y)&&$r(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=m&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&om(a,d,u,h,c,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=w;){if(x.x>=m&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&om(a,d,u,h,c,p,x.x,x.y)&&$r(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=m&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&om(a,d,u,h,c,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function CFe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!SI(i,o)&&fne(i,r,r.next,o)&&Kx(i,o)&&Kx(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),Qx(r),Qx(r.next),r=e=o),r=r.next}while(r!==e);return Xp(r)}function TFe(e,t,n,r,i,o){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&LFe(s,a)){var u=dne(s,a);s=Xp(s,s.next),u=Xp(u,u.next),Yx(s,t,n,r,i,o,0),Yx(u,t,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==e)}function AFe(e,t,n,r){var i=[],o,s,a,u,c;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,s=n.x=n.x&&n.x>=c&&r!==n.x&&om(is.x||n.x===s.x&&OFe(s,n)))&&(s=n,h=p)),n=n.next;while(n!==u);return s}function OFe(e,t){return $r(e.prev,e,t.prev)<0&&$r(t.next,e,e.next)<0}function MFe(e,t,n,r){var i=e;do i.z===0&&(i.z=K3(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,kFe(i)}function kFe(e){var t,n,r,i,o,s,a,u,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t0||u>0&&r;)a!==0&&(u===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return e}function K3(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 DFe(e){var t=e,n=e;do(t.x=(e-s)*(o-a)&&(e-s)*(r-a)>=(n-s)*(t-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function LFe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!NFe(e,t)&&(Kx(e,t)&&Kx(t,e)&&BFe(e,t)&&($r(e.prev,e,t.prev)||$r(e,t.prev,t))||SI(e,t)&&$r(e.prev,e,e.next)>0&&$r(t.prev,t,t.next)>0)}function $r(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function SI(e,t){return e.x===t.x&&e.y===t.y}function fne(e,t,n,r){var i=sS($r(e,t,n)),o=sS($r(e,t,r)),s=sS($r(n,r,e)),a=sS($r(n,r,t));return!!(i!==o&&s!==a||i===0&&oS(e,n,t)||o===0&&oS(e,r,t)||s===0&&oS(n,e,r)||a===0&&oS(n,t,r))}function oS(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 sS(e){return e>0?1:e<0?-1:0}function NFe(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&&fne(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Kx(e,t){return $r(e.prev,e,e.next)<0?$r(e,t,e.next)>=0&&$r(e,e.prev,t)>=0:$r(e,t,e.prev)<0||$r(e,e.next,t)<0}function BFe(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 dne(e,t){var n=new Q3(e.i,e.x,e.y),r=new Q3(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 a7(e,t,n,r){var i=new Q3(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 Qx(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 Q3(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}_I.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(J3(e,0,o,n));if(i)for(var a=0,u=t.length;a0&&(r+=e[i-1].length,n.holes.push(r))}return n};var $Fe=rU.exports;const FFe=Ma($Fe);var VC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */VC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Kt=="object"&&Kt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,a=2147483647,u=36,c=1,d=26,h=38,p=700,m=72,v=128,y="-",S=/^xn--/,w=/[^\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=u-c,A=Math.floor,I=String.fromCharCode,R;function M(q){throw new RangeError(x[q])}function L(q,Q){for(var re=q.length,ue=[];re--;)ue[re]=Q(q[re]);return ue}function N(q,Q){var re=q.split("@"),ue="";re.length>1&&(ue=re[0]+"@",q=re[1]),q=q.replace(b,".");var ce=q.split("."),se=L(ce,Q).join(".");return ue+se}function H(q){for(var Q=[],re=0,ue=q.length,ce,se;re=55296&&ce<=56319&&re65535&&(Q-=65536,re+=I(Q>>>10&1023|55296),Q=56320|Q&1023),re+=I(Q),re}).join("")}function U(q){return q-48<10?q-22:q-65<26?q-65:q-97<26?q-97:u}function D(q,Q){return q+22+75*(q<26)-((Q!=0)<<5)}function F(q,Q,re){var ue=0;for(q=re?A(q/p):q>>1,q+=A(q/Q);q>E*d>>1;ue+=u)q=A(q/E);return A(ue+(E+1)*q/(q+h))}function z(q){var Q=[],re=q.length,ue,ce=0,se=v,J=m,ae,le,he,pe,ve,ye,xe,ge,be;for(ae=q.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&M("not-basic"),Q.push(q.charCodeAt(le));for(he=ae>0?ae+1:0;he=re&&M("invalid-input"),xe=U(q.charCodeAt(he++)),(xe>=u||xe>A((a-ce)/ve))&&M("overflow"),ce+=xe*ve,ge=ye<=J?c:ye>=J+d?d:ye-J,!(xeA(a/be)&&M("overflow"),ve*=be;ue=Q.length+1,J=F(ce-pe,ue,pe==0),A(ce/ue)>a-se&&M("overflow"),se+=A(ce/ue),ce%=ue,Q.splice(ce++,0,se)}return V(Q)}function G(q){var Q,re,ue,ce,se,J,ae,le,he,pe,ve,ye=[],xe,ge,be,Ze;for(q=H(q),xe=q.length,Q=v,re=0,se=m,J=0;J=Q&&veA((a-re)/ge)&&M("overflow"),re+=(ae-Q)*ge,Q=ae,J=0;Ja&&M("overflow"),ve==Q){for(le=re,he=u;pe=he<=se?c:he>=se+d?d:he-se,!(le"u"||!Ti?fn:Ti(Uint8Array),Ap={"%AggregateError%":typeof AggregateError>"u"?fn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?fn:ArrayBuffer,"%ArrayIteratorPrototype%":yg&&Ti?Ti([][Symbol.iterator]()):fn,"%AsyncFromSyncIteratorPrototype%":fn,"%AsyncFunction%":Pg,"%AsyncGenerator%":Pg,"%AsyncGeneratorFunction%":Pg,"%AsyncIteratorPrototype%":Pg,"%Atomics%":typeof Atomics>"u"?fn:Atomics,"%BigInt%":typeof BigInt>"u"?fn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?fn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?fn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?fn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?fn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?fn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?fn:FinalizationRegistry,"%Function%":hne,"%GeneratorFunction%":Pg,"%Int8Array%":typeof Int8Array>"u"?fn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?fn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?fn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":yg&&Ti?Ti(Ti([][Symbol.iterator]())):fn,"%JSON%":typeof JSON=="object"?JSON:fn,"%Map%":typeof Map>"u"?fn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!yg||!Ti?fn:Ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?fn:Promise,"%Proxy%":typeof Proxy>"u"?fn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?fn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?fn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!yg||!Ti?fn:Ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?fn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":yg&&Ti?Ti(""[Symbol.iterator]()):fn,"%Symbol%":yg?Symbol:fn,"%SyntaxError%":nv,"%ThrowTypeError%":ZFe,"%TypedArray%":t3e,"%TypeError%":xm,"%Uint8Array%":typeof Uint8Array>"u"?fn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?fn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?fn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?fn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?fn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?fn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?fn:WeakSet};if(Ti)try{null.error}catch(e){var n3e=Ti(Ti(e));Ap["%Error.prototype%"]=n3e}var r3e=function e(t){var n;if(t==="%AsyncFunction%")n=RB("async function () {}");else if(t==="%GeneratorFunction%")n=RB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=RB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ti&&(n=Ti(i.prototype))}return Ap[t]=n,n},c7={"%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"]},Hw=iU,XC=JFe,i3e=Hw.call(Function.call,Array.prototype.concat),o3e=Hw.call(Function.apply,Array.prototype.splice),f7=Hw.call(Function.call,String.prototype.replace),qC=Hw.call(Function.call,String.prototype.slice),s3e=Hw.call(Function.call,RegExp.prototype.exec),a3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,l3e=/\\(\\)?/g,u3e=function(t){var n=qC(t,0,1),r=qC(t,-1);if(n==="%"&&r!=="%")throw new nv("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new nv("invalid intrinsic syntax, expected opening `%`");var i=[];return f7(t,a3e,function(o,s,a,u){i[i.length]=a?f7(u,l3e,"$1"):s||o}),i},c3e=function(t,n){var r=t,i;if(XC(c7,r)&&(i=c7[r],r="%"+i[0]+"%"),XC(Ap,r)){var o=Ap[r];if(o===Pg&&(o=r3e(r)),typeof o>"u"&&!n)throw new xm("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new nv("intrinsic "+t+" does not exist!")},oU=function(t,n){if(typeof t!="string"||t.length===0)throw new xm("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new xm('"allowMissing" argument must be a boolean');if(s3e(/^%?[^%]*%?$/,t)===null)throw new nv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=u3e(t),i=r.length>0?r[0]:"",o=c3e("%"+i+"%",n),s=o.name,a=o.value,u=!1,c=o.alias;c&&(i=c[0],o3e(r,i3e([0,1],c)));for(var d=1,h=!0;d=r.length){var y=Tp(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=XC(a,p),a=a[p];h&&!u&&(Ap[s]=a)}}return a},pne={exports:{}};(function(e){var t=iU,n=oU,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+u(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(pne);var f3e=pne.exports,gne=oU,mne=f3e,d3e=mne(gne("String.prototype.indexOf")),h3e=function(t,n){var r=gne(t,!!n);return typeof r=="function"&&d3e(t,".prototype.")>-1?mne(r):r};const p3e={},g3e=Object.freeze(Object.defineProperty({__proto__:null,default:p3e},Symbol.toStringTag,{value:"Module"})),m3e=Z5(g3e);var sU=typeof Map=="function"&&Map.prototype,OB=Object.getOwnPropertyDescriptor&&sU?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,YC=sU&&OB&&typeof OB.get=="function"?OB.get:null,d7=sU&&Map.prototype.forEach,aU=typeof Set=="function"&&Set.prototype,MB=Object.getOwnPropertyDescriptor&&aU?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,KC=aU&&MB&&typeof MB.get=="function"?MB.get:null,h7=aU&&Set.prototype.forEach,v3e=typeof WeakMap=="function"&&WeakMap.prototype,X1=v3e?WeakMap.prototype.has:null,y3e=typeof WeakSet=="function"&&WeakSet.prototype,q1=y3e?WeakSet.prototype.has:null,b3e=typeof WeakRef=="function"&&WeakRef.prototype,p7=b3e?WeakRef.prototype.deref:null,x3e=Boolean.prototype.valueOf,w3e=Object.prototype.toString,_3e=Function.prototype.toString,S3e=String.prototype.match,lU=String.prototype.slice,Mf=String.prototype.replace,E3e=String.prototype.toUpperCase,g7=String.prototype.toLowerCase,vne=RegExp.prototype.test,m7=Array.prototype.concat,Vl=Array.prototype.join,C3e=Array.prototype.slice,v7=Math.floor,Z3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,kB=Object.getOwnPropertySymbols,e5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,rv=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===rv||"symbol")?Symbol.toStringTag:null,yne=Object.prototype.propertyIsEnumerable,y7=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function b7(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||vne.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-v7(-e):v7(e);if(r!==e){var i=String(r),o=lU.call(t,i.length+1);return Mf.call(i,n,"$&_")+"."+Mf.call(Mf.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mf.call(t,n,"$&_")}var t5=m3e,x7=t5.custom,w7=xne(x7)?x7:null,T3e=function e(t,n,r,i){var o=n||{};if(bf(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bf(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=bf(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(bf(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(bf(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=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 _ne(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return a?b7(t,u):u}if(typeof t=="bigint"){var c=String(t)+"n";return a?b7(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return n5(t)?"[Array]":"[Object]";var h=W3e(o,r);if(typeof i>"u")i=[];else if(wne(i,t)>=0)return"[Circular]";function p(U,D,F){if(D&&(i=C3e.call(i),i.push(D)),F){var z={depth:o.depth};return bf(o,"quoteStyle")&&(z.quoteStyle=o.quoteStyle),e(U,z,r+1,i)}return e(U,o,r+1,i)}if(typeof t=="function"&&!_7(t)){var m=L3e(t),v=aS(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+Vl.call(v,", ")+" }":"")}if(xne(t)){var y=rv?Mf.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):e5.call(t);return typeof t=="object"&&!rv?zb(y):y}if(U3e(t)){for(var S="<"+g7.call(String(t.nodeName)),w=t.attributes||[],b=0;b",S}if(n5(t)){if(t.length===0)return"[]";var x=aS(t,p);return h&&!H3e(x)?"["+r5(x,h)+"]":"[ "+Vl.call(x,", ")+" ]"}if(R3e(t)){var E=aS(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!yne.call(t,"cause")?"{ ["+String(t)+"] "+Vl.call(m7.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vl.call(E,", ")+" }"}if(typeof t=="object"&&s){if(w7&&typeof t[w7]=="function"&&t5)return t5(t,{depth:d-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(N3e(t)){var A=[];return d7&&d7.call(t,function(U,D){A.push(p(D,t,!0)+" => "+p(U,t))}),S7("Map",YC.call(t),A,h)}if(F3e(t)){var I=[];return h7&&h7.call(t,function(U){I.push(p(U,t))}),S7("Set",KC.call(t),I,h)}if(B3e(t))return DB("WeakMap");if(z3e(t))return DB("WeakSet");if($3e(t))return DB("WeakRef");if(O3e(t))return zb(p(Number(t)));if(k3e(t))return zb(p(Z3.call(t)));if(M3e(t))return zb(x3e.call(t));if(P3e(t))return zb(p(String(t)));if(!I3e(t)&&!_7(t)){var R=aS(t,p),M=y7?y7(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!M&&bo&&Object(t)===t&&bo in t?lU.call(_d(t),8,-1):L?"Object":"",H=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=H+(N||L?"["+Vl.call(m7.call([],N||[],L||[]),": ")+"] ":"");return R.length===0?V+"{}":h?V+"{"+r5(R,h)+"}":V+"{ "+Vl.call(R,", ")+" }"}return String(t)};function bne(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function A3e(e){return Mf.call(String(e),/"/g,""")}function n5(e){return _d(e)==="[object Array]"&&(!bo||!(typeof e=="object"&&bo in e))}function I3e(e){return _d(e)==="[object Date]"&&(!bo||!(typeof e=="object"&&bo in e))}function _7(e){return _d(e)==="[object RegExp]"&&(!bo||!(typeof e=="object"&&bo in e))}function R3e(e){return _d(e)==="[object Error]"&&(!bo||!(typeof e=="object"&&bo in e))}function P3e(e){return _d(e)==="[object String]"&&(!bo||!(typeof e=="object"&&bo in e))}function O3e(e){return _d(e)==="[object Number]"&&(!bo||!(typeof e=="object"&&bo in e))}function M3e(e){return _d(e)==="[object Boolean]"&&(!bo||!(typeof e=="object"&&bo in e))}function xne(e){if(rv)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!e5)return!1;try{return e5.call(e),!0}catch{}return!1}function k3e(e){if(!e||typeof e!="object"||!Z3)return!1;try{return Z3.call(e),!0}catch{}return!1}var D3e=Object.prototype.hasOwnProperty||function(e){return e in this};function bf(e,t){return D3e.call(e,t)}function _d(e){return w3e.call(e)}function L3e(e){if(e.name)return e.name;var t=S3e.call(_3e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function wne(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 _ne(lU.call(e,0,t.maxStringLength),t)+r}var i=Mf.call(Mf.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,j3e);return bne(i,"single",t)}function j3e(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":"")+E3e.call(t.toString(16))}function zb(e){return"Object("+e+")"}function DB(e){return e+" { ? }"}function S7(e,t,n,r){var i=r?r5(n,r):Vl.call(n,", ");return e+" ("+t+") {"+i+"}"}function H3e(e){for(var t=0;t=0)return!1;return!0}function W3e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Vl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Vl.call(Array(t+1),n)}}function r5(e,t){if(e.length===0)return"";var n=` +}`;var Xe=cb(function(){return dt(k,we+"return "+oe).apply(n,B)});if(Xe.source=oe,Ih(Xe))throw Xe;return Xe}function uL(l){return ht(l).toLowerCase()}function cL(l){return ht(l).toUpperCase()}function fL(l,f,g){if(l=ht(l),l&&(g||f===n))return b0(l);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=Rr(f),k=x0(_,T),B=w0(_,T)+1;return ji(_,k,B).join("")}function dL(l,f,g){if(l=ht(l),l&&(g||f===n))return l.slice(0,S0(l)+1);if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=w0(_,Rr(f))+1;return ji(_,0,T).join("")}function hL(l,f,g){if(l=ht(l),l&&(g||f===n))return l.replace(xo,"");if(!l||!(f=Zn(f)))return l;var _=Rr(l),T=x0(_,Rr(f));return ji(_,T).join("")}function pL(l,f){var g=N,_=H;if(Ft(f)){var T="separator"in f?f.separator:T;g="length"in f?Ge(f.length):g,_="omission"in f?Zn(f.omission):_}l=ht(l);var k=l.length;if(ys(l)){var B=Rr(l);k=B.length}if(g>=k)return l;var j=g-bs(_);if(j<1)return _;var Y=B?ji(B,0,j).join(""):l.slice(0,j);if(T===n)return Y+_;if(B&&(j+=Y.length-j),Rh(T)){if(l.slice(j).search(T)){var te,ne=Y;for(T.global||(T=Gd(T.source,ht(lr.exec(T))+"g")),T.lastIndex=0;te=T.exec(ne);)var oe=te.index;Y=Y.slice(0,oe===n?j:oe)}}else if(l.indexOf(Zn(T),j)!=j){var de=Y.lastIndexOf(T);de>-1&&(Y=Y.slice(0,de))}return Y+_}function gL(l){return l=ht(l),l&&Kr.test(l)?l.replace(Hr,WR):l}var mL=Ts(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),Mh=fy("toUpperCase");function ub(l,f,g){return l=ht(l),f=g?n:f,f===n?FR(l)?XR(l):PR(l):l.match(f)||[]}var cb=Ye(function(l,f){try{return Qn(l,n,f)}catch(g){return Ih(g)?g:new De(g)}}),vL=pi(function(l,f){return fr(f,function(g){g=Zr(g),di(l,g,Th(l[g],l))}),l});function yL(l){var f=l==null?0:l.length,g=Te();return l=f?Nt(l,function(_){if(typeof _[1]!="function")throw new dr(s);return[g(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var g=Q,_=wn(l,Q);f=Te(f),l-=Q;for(var T=jd(_,f);++g0||f<0)?new et(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==n&&(f=Ge(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),_=/^(?:head|last)$/.test(f),T=P[_?"take"+(f=="last"?"Right":""):f],k=_||/^find/.test(f);T&&(P.prototype[f]=function(){var B=this.__wrapped__,j=_?[1]:arguments,Y=B instanceof et,te=j[0],ne=Y||$e(B),oe=function(Je){var rt=T.apply(P,Ni([Je],j));return _&&de?rt[0]:rt};ne&&g&&typeof te=="function"&&te.length!=1&&(Y=ne=!1);var de=this.__chain__,we=!!this.__actions__.length,Ae=k&&!de,Xe=Y&&!we;if(!k&&ne){B=Xe?B:new et(this);var Ie=l.apply(B,j);return Ie.__actions__.push({func:rc,args:[oe],thisArg:n}),new hr(Ie,de)}return Ae&&Xe?l.apply(this,j):(Ie=this.thru(oe),Ae?_?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Ru[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var k=this.value();return f.apply($e(k)?k:[],T)}return this[g](function(B){return f.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,f){var g=P[f];if(g){var _=g.name+"";bt.call(Ss,_)||(Ss[_]=[]),Ss[_].push({name:f,func:g})}}),Ss[Ku(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=gP,et.prototype.reverse=mP,et.prototype.value=vP,P.prototype.at=VO,P.prototype.chain=XO,P.prototype.commit=qO,P.prototype.next=YO,P.prototype.plant=QO,P.prototype.reverse=JO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=ZO,P.prototype.first=P.prototype.head,$a&&(P.prototype[$a]=KO),P},xs=qR();_o?((_o.exports=xs)._=xs,Ld._=xs):pn._=xs}).call(Kt)})(GC,GC.exports);var en=GC.exports;let yFe=(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 og=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(og||{}),une=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(une||{}),Y3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Y3||{}),Dt=(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))(Dt||{}),Kl=(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))(Kl||{}),Ve=(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))(Ve||{}),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||{}),Mt=(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))(Mt||{}),K3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(K3||{}),Ac=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Ac||{}),Zf=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Zf||{}),du=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(du||{}),kl=(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))(kl||{}),Gl=(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))(Gl||{}),rU=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(rU||{}),ya=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(ya||{}),bi=(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))(bi||{}),ri=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(ri||{}),su=(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))(su||{});const bFe={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")},nt={ADAPTER:bFe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var TB=/iPhone/i,K9=/iPod/i,Q9=/iPad/i,J9=/\biOS-universal(?:.+)Mac\b/i,AB=/\bAndroid(?:.+)Mobile\b/i,Z9=/Android/i,vg=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,oS=/Silk/i,pc=/Windows Phone/i,e7=/\bWindows(?:.+)ARM\b/i,t7=/BlackBerry/i,n7=/BB10/i,r7=/Opera Mini/i,i7=/\b(CriOS|Chrome)(?:.+)Mobile/i,o7=/Mobile(?:.+)Firefox\b/i,s7=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function xFe(e){return function(t){return t.test(e)}}function a7(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=xFe(n),o={apple:{phone:i(TB)&&!i(pc),ipod:i(K9),tablet:!i(TB)&&(i(Q9)||s7(t))&&!i(pc),universal:i(J9),device:(i(TB)||i(K9)||i(Q9)||i(J9)||s7(t))&&!i(pc)},amazon:{phone:i(vg),tablet:!i(vg)&&i(oS),device:i(vg)||i(oS)},android:{phone:!i(pc)&&i(vg)||!i(pc)&&i(AB),tablet:!i(pc)&&!i(vg)&&!i(AB)&&(i(oS)||i(Z9)),device:!i(pc)&&(i(vg)||i(oS)||i(AB)||i(Z9))||i(/\bokhttp\b/i)},windows:{phone:i(pc),tablet:i(e7),device:i(pc)||i(e7)},other:{blackberry:i(t7),blackberry10:i(n7),opera:i(r7),firefox:i(o7),chrome:i(i7),device:i(t7)||i(n7)||i(r7)||i(o7)||i(i7)},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 wFe=a7.default??a7,Ic=wFe(globalThis.navigator);nt.RETINA_PREFIX=/@([0-9\.]+)x/;nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var cne={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(u,c,d){this.fn=u,this.context=c,this.once=d||!1}function o(u,c,d,h,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,h||u,p),v=n?n+c:c;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],m]:u._events[v].push(m):(u._events[v]=m,u._eventsCount++),u}function s(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,h;if(this._eventsCount===0)return c;for(h in d=this._events)t.call(d,h)&&c.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=n?n+c:c,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,m=h.length,v=new Array(m);p80*n){a=c=e[0],u=d=e[1];for(var v=n;vc&&(c=h),p>d&&(d=p);m=Math.max(c-a,d-u),m=m!==0?32767/m:0}return Kx(o,s,n,a,u,m,0),s}function fne(e,t,n,r,i){var o,s;if(i===Z3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=l7(o,e[o],e[o+1],s);return s&&SI(s,s.next)&&(Jx(s),s=s.next),s}function Xp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(SI(n,n.next)||$r(n.prev,n,n.next)===0)){if(Jx(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Kx(e,t,n,r,i,o,s){if(e){!s&&o&&MFe(e,r,i,o);for(var a=e,u,c;e.prev!==e.next;){if(u=e.prev,c=e.next,o?EFe(e,r,i,o):SFe(e)){t.push(u.i/n|0),t.push(e.i/n|0),t.push(c.i/n|0),Jx(e),e=c.next,a=c.next;continue}if(e=c,e===a){s?s===1?(e=CFe(Xp(e),t,n),Kx(e,t,n,r,i,o,2)):s===2&&TFe(e,t,n,r,i,o):Kx(Xp(e),t,n,r,i,o,1);break}}}}function SFe(e){var t=e.prev,n=e,r=e.next;if($r(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,a=t.y,u=n.y,c=r.y,d=io?i>s?i:s:o>s?o:s,m=a>u?a>c?a:c:u>c?u:c,v=r.next;v!==t;){if(v.x>=d&&v.x<=p&&v.y>=h&&v.y<=m&&om(i,a,o,u,s,c,v.x,v.y)&&$r(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function EFe(e,t,n,r){var i=e.prev,o=e,s=e.next;if($r(i,o,s)>=0)return!1;for(var a=i.x,u=o.x,c=s.x,d=i.y,h=o.y,p=s.y,m=au?a>c?a:c:u>c?u:c,S=d>h?d>p?d:p:h>p?h:p,w=Q3(m,v,t,n,r),b=Q3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=w&&E&&E.z<=b;){if(x.x>=m&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&om(a,d,u,h,c,p,x.x,x.y)&&$r(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=m&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&om(a,d,u,h,c,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=w;){if(x.x>=m&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&om(a,d,u,h,c,p,x.x,x.y)&&$r(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=m&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&om(a,d,u,h,c,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function CFe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!SI(i,o)&&dne(i,r,r.next,o)&&Qx(i,o)&&Qx(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),Jx(r),Jx(r.next),r=e=o),r=r.next}while(r!==e);return Xp(r)}function TFe(e,t,n,r,i,o){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&DFe(s,a)){var u=hne(s,a);s=Xp(s,s.next),u=Xp(u,u.next),Kx(s,t,n,r,i,o,0),Kx(u,t,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==e)}function AFe(e,t,n,r){var i=[],o,s,a,u,c;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,s=n.x=n.x&&n.x>=c&&r!==n.x&&om(is.x||n.x===s.x&&OFe(s,n)))&&(s=n,h=p)),n=n.next;while(n!==u);return s}function OFe(e,t){return $r(e.prev,e,t.prev)<0&&$r(t.next,e,e.next)<0}function MFe(e,t,n,r){var i=e;do i.z===0&&(i.z=Q3(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,kFe(i)}function kFe(e){var t,n,r,i,o,s,a,u,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t0||u>0&&r;)a!==0&&(u===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return e}function Q3(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 LFe(e){var t=e,n=e;do(t.x=(e-s)*(o-a)&&(e-s)*(r-a)>=(n-s)*(t-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function DFe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!NFe(e,t)&&(Qx(e,t)&&Qx(t,e)&&BFe(e,t)&&($r(e.prev,e,t.prev)||$r(e,t.prev,t))||SI(e,t)&&$r(e.prev,e,e.next)>0&&$r(t.prev,t,t.next)>0)}function $r(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function SI(e,t){return e.x===t.x&&e.y===t.y}function dne(e,t,n,r){var i=aS($r(e,t,n)),o=aS($r(e,t,r)),s=aS($r(n,r,e)),a=aS($r(n,r,t));return!!(i!==o&&s!==a||i===0&&sS(e,n,t)||o===0&&sS(e,r,t)||s===0&&sS(n,e,r)||a===0&&sS(n,t,r))}function sS(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 aS(e){return e>0?1:e<0?-1:0}function NFe(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&&dne(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Qx(e,t){return $r(e.prev,e,e.next)<0?$r(e,t,e.next)>=0&&$r(e,e.prev,t)>=0:$r(e,t,e.prev)<0||$r(e,e.next,t)<0}function BFe(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 hne(e,t){var n=new J3(e.i,e.x,e.y),r=new J3(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 l7(e,t,n,r){var i=new J3(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 Jx(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 J3(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}_I.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(Z3(e,0,o,n));if(i)for(var a=0,u=t.length;a0&&(r+=e[i-1].length,n.holes.push(r))}return n};var $Fe=iU.exports;const FFe=Ma($Fe);var VC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */VC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Kt=="object"&&Kt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,a=2147483647,u=36,c=1,d=26,h=38,p=700,m=72,v=128,y="-",S=/^xn--/,w=/[^\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=u-c,A=Math.floor,I=String.fromCharCode,R;function M(q){throw new RangeError(x[q])}function D(q,Q){for(var re=q.length,ue=[];re--;)ue[re]=Q(q[re]);return ue}function N(q,Q){var re=q.split("@"),ue="";re.length>1&&(ue=re[0]+"@",q=re[1]),q=q.replace(b,".");var ce=q.split("."),se=D(ce,Q).join(".");return ue+se}function H(q){for(var Q=[],re=0,ue=q.length,ce,se;re=55296&&ce<=56319&&re65535&&(Q-=65536,re+=I(Q>>>10&1023|55296),Q=56320|Q&1023),re+=I(Q),re}).join("")}function U(q){return q-48<10?q-22:q-65<26?q-65:q-97<26?q-97:u}function L(q,Q){return q+22+75*(q<26)-((Q!=0)<<5)}function F(q,Q,re){var ue=0;for(q=re?A(q/p):q>>1,q+=A(q/Q);q>E*d>>1;ue+=u)q=A(q/E);return A(ue+(E+1)*q/(q+h))}function z(q){var Q=[],re=q.length,ue,ce=0,se=v,J=m,ae,le,he,pe,ve,ye,xe,ge,be;for(ae=q.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&M("not-basic"),Q.push(q.charCodeAt(le));for(he=ae>0?ae+1:0;he=re&&M("invalid-input"),xe=U(q.charCodeAt(he++)),(xe>=u||xe>A((a-ce)/ve))&&M("overflow"),ce+=xe*ve,ge=ye<=J?c:ye>=J+d?d:ye-J,!(xeA(a/be)&&M("overflow"),ve*=be;ue=Q.length+1,J=F(ce-pe,ue,pe==0),A(ce/ue)>a-se&&M("overflow"),se+=A(ce/ue),ce%=ue,Q.splice(ce++,0,se)}return V(Q)}function G(q){var Q,re,ue,ce,se,J,ae,le,he,pe,ve,ye=[],xe,ge,be,Ze;for(q=H(q),xe=q.length,Q=v,re=0,se=m,J=0;J=Q&&veA((a-re)/ge)&&M("overflow"),re+=(ae-Q)*ge,Q=ae,J=0;Ja&&M("overflow"),ve==Q){for(le=re,he=u;pe=he<=se?c:he>=se+d?d:he-se,!(le"u"||!Ti?fn:Ti(Uint8Array),Ap={"%AggregateError%":typeof AggregateError>"u"?fn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?fn:ArrayBuffer,"%ArrayIteratorPrototype%":yg&&Ti?Ti([][Symbol.iterator]()):fn,"%AsyncFromSyncIteratorPrototype%":fn,"%AsyncFunction%":Pg,"%AsyncGenerator%":Pg,"%AsyncGeneratorFunction%":Pg,"%AsyncIteratorPrototype%":Pg,"%Atomics%":typeof Atomics>"u"?fn:Atomics,"%BigInt%":typeof BigInt>"u"?fn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?fn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?fn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?fn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?fn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?fn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?fn:FinalizationRegistry,"%Function%":pne,"%GeneratorFunction%":Pg,"%Int8Array%":typeof Int8Array>"u"?fn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?fn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?fn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":yg&&Ti?Ti(Ti([][Symbol.iterator]())):fn,"%JSON%":typeof JSON=="object"?JSON:fn,"%Map%":typeof Map>"u"?fn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!yg||!Ti?fn:Ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?fn:Promise,"%Proxy%":typeof Proxy>"u"?fn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?fn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?fn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!yg||!Ti?fn:Ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?fn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":yg&&Ti?Ti(""[Symbol.iterator]()):fn,"%Symbol%":yg?Symbol:fn,"%SyntaxError%":nv,"%ThrowTypeError%":ZFe,"%TypedArray%":t3e,"%TypeError%":xm,"%Uint8Array%":typeof Uint8Array>"u"?fn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?fn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?fn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?fn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?fn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?fn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?fn:WeakSet};if(Ti)try{null.error}catch(e){var n3e=Ti(Ti(e));Ap["%Error.prototype%"]=n3e}var r3e=function e(t){var n;if(t==="%AsyncFunction%")n=RB("async function () {}");else if(t==="%GeneratorFunction%")n=RB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=RB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ti&&(n=Ti(i.prototype))}return Ap[t]=n,n},f7={"%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"]},Ww=oU,XC=JFe,i3e=Ww.call(Function.call,Array.prototype.concat),o3e=Ww.call(Function.apply,Array.prototype.splice),d7=Ww.call(Function.call,String.prototype.replace),qC=Ww.call(Function.call,String.prototype.slice),s3e=Ww.call(Function.call,RegExp.prototype.exec),a3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,l3e=/\\(\\)?/g,u3e=function(t){var n=qC(t,0,1),r=qC(t,-1);if(n==="%"&&r!=="%")throw new nv("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new nv("invalid intrinsic syntax, expected opening `%`");var i=[];return d7(t,a3e,function(o,s,a,u){i[i.length]=a?d7(u,l3e,"$1"):s||o}),i},c3e=function(t,n){var r=t,i;if(XC(f7,r)&&(i=f7[r],r="%"+i[0]+"%"),XC(Ap,r)){var o=Ap[r];if(o===Pg&&(o=r3e(r)),typeof o>"u"&&!n)throw new xm("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new nv("intrinsic "+t+" does not exist!")},sU=function(t,n){if(typeof t!="string"||t.length===0)throw new xm("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new xm('"allowMissing" argument must be a boolean');if(s3e(/^%?[^%]*%?$/,t)===null)throw new nv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=u3e(t),i=r.length>0?r[0]:"",o=c3e("%"+i+"%",n),s=o.name,a=o.value,u=!1,c=o.alias;c&&(i=c[0],o3e(r,i3e([0,1],c)));for(var d=1,h=!0;d=r.length){var y=Tp(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=XC(a,p),a=a[p];h&&!u&&(Ap[s]=a)}}return a},gne={exports:{}};(function(e){var t=oU,n=sU,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+u(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(gne);var f3e=gne.exports,mne=sU,vne=f3e,d3e=vne(mne("String.prototype.indexOf")),h3e=function(t,n){var r=mne(t,!!n);return typeof r=="function"&&d3e(t,".prototype.")>-1?vne(r):r};const p3e={},g3e=Object.freeze(Object.defineProperty({__proto__:null,default:p3e},Symbol.toStringTag,{value:"Module"})),m3e=e4(g3e);var aU=typeof Map=="function"&&Map.prototype,OB=Object.getOwnPropertyDescriptor&&aU?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,YC=aU&&OB&&typeof OB.get=="function"?OB.get:null,h7=aU&&Map.prototype.forEach,lU=typeof Set=="function"&&Set.prototype,MB=Object.getOwnPropertyDescriptor&&lU?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,KC=lU&&MB&&typeof MB.get=="function"?MB.get:null,p7=lU&&Set.prototype.forEach,v3e=typeof WeakMap=="function"&&WeakMap.prototype,X1=v3e?WeakMap.prototype.has:null,y3e=typeof WeakSet=="function"&&WeakSet.prototype,q1=y3e?WeakSet.prototype.has:null,b3e=typeof WeakRef=="function"&&WeakRef.prototype,g7=b3e?WeakRef.prototype.deref:null,x3e=Boolean.prototype.valueOf,w3e=Object.prototype.toString,_3e=Function.prototype.toString,S3e=String.prototype.match,uU=String.prototype.slice,Mf=String.prototype.replace,E3e=String.prototype.toUpperCase,m7=String.prototype.toLowerCase,yne=RegExp.prototype.test,v7=Array.prototype.concat,Vl=Array.prototype.join,C3e=Array.prototype.slice,y7=Math.floor,e5=typeof BigInt=="function"?BigInt.prototype.valueOf:null,kB=Object.getOwnPropertySymbols,t5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,rv=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===rv||"symbol")?Symbol.toStringTag:null,bne=Object.prototype.propertyIsEnumerable,b7=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function x7(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||yne.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-y7(-e):y7(e);if(r!==e){var i=String(r),o=uU.call(t,i.length+1);return Mf.call(i,n,"$&_")+"."+Mf.call(Mf.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mf.call(t,n,"$&_")}var n5=m3e,w7=n5.custom,_7=wne(w7)?w7:null,T3e=function e(t,n,r,i){var o=n||{};if(bf(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bf(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=bf(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(bf(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(bf(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=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 Sne(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return a?x7(t,u):u}if(typeof t=="bigint"){var c=String(t)+"n";return a?x7(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return r5(t)?"[Array]":"[Object]";var h=W3e(o,r);if(typeof i>"u")i=[];else if(_ne(i,t)>=0)return"[Circular]";function p(U,L,F){if(L&&(i=C3e.call(i),i.push(L)),F){var z={depth:o.depth};return bf(o,"quoteStyle")&&(z.quoteStyle=o.quoteStyle),e(U,z,r+1,i)}return e(U,o,r+1,i)}if(typeof t=="function"&&!S7(t)){var m=D3e(t),v=lS(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+Vl.call(v,", ")+" }":"")}if(wne(t)){var y=rv?Mf.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):t5.call(t);return typeof t=="object"&&!rv?zb(y):y}if(U3e(t)){for(var S="<"+m7.call(String(t.nodeName)),w=t.attributes||[],b=0;b",S}if(r5(t)){if(t.length===0)return"[]";var x=lS(t,p);return h&&!H3e(x)?"["+i5(x,h)+"]":"[ "+Vl.call(x,", ")+" ]"}if(R3e(t)){var E=lS(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!bne.call(t,"cause")?"{ ["+String(t)+"] "+Vl.call(v7.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vl.call(E,", ")+" }"}if(typeof t=="object"&&s){if(_7&&typeof t[_7]=="function"&&n5)return n5(t,{depth:d-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(N3e(t)){var A=[];return h7&&h7.call(t,function(U,L){A.push(p(L,t,!0)+" => "+p(U,t))}),E7("Map",YC.call(t),A,h)}if(F3e(t)){var I=[];return p7&&p7.call(t,function(U){I.push(p(U,t))}),E7("Set",KC.call(t),I,h)}if(B3e(t))return LB("WeakMap");if(z3e(t))return LB("WeakSet");if($3e(t))return LB("WeakRef");if(O3e(t))return zb(p(Number(t)));if(k3e(t))return zb(p(e5.call(t)));if(M3e(t))return zb(x3e.call(t));if(P3e(t))return zb(p(String(t)));if(!I3e(t)&&!S7(t)){var R=lS(t,p),M=b7?b7(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",N=!M&&bo&&Object(t)===t&&bo in t?uU.call(_d(t),8,-1):D?"Object":"",H=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=H+(N||D?"["+Vl.call(v7.call([],N||[],D||[]),": ")+"] ":"");return R.length===0?V+"{}":h?V+"{"+i5(R,h)+"}":V+"{ "+Vl.call(R,", ")+" }"}return String(t)};function xne(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function A3e(e){return Mf.call(String(e),/"/g,""")}function r5(e){return _d(e)==="[object Array]"&&(!bo||!(typeof e=="object"&&bo in e))}function I3e(e){return _d(e)==="[object Date]"&&(!bo||!(typeof e=="object"&&bo in e))}function S7(e){return _d(e)==="[object RegExp]"&&(!bo||!(typeof e=="object"&&bo in e))}function R3e(e){return _d(e)==="[object Error]"&&(!bo||!(typeof e=="object"&&bo in e))}function P3e(e){return _d(e)==="[object String]"&&(!bo||!(typeof e=="object"&&bo in e))}function O3e(e){return _d(e)==="[object Number]"&&(!bo||!(typeof e=="object"&&bo in e))}function M3e(e){return _d(e)==="[object Boolean]"&&(!bo||!(typeof e=="object"&&bo in e))}function wne(e){if(rv)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!t5)return!1;try{return t5.call(e),!0}catch{}return!1}function k3e(e){if(!e||typeof e!="object"||!e5)return!1;try{return e5.call(e),!0}catch{}return!1}var L3e=Object.prototype.hasOwnProperty||function(e){return e in this};function bf(e,t){return L3e.call(e,t)}function _d(e){return w3e.call(e)}function D3e(e){if(e.name)return e.name;var t=S3e.call(_3e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function _ne(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 Sne(uU.call(e,0,t.maxStringLength),t)+r}var i=Mf.call(Mf.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,j3e);return xne(i,"single",t)}function j3e(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":"")+E3e.call(t.toString(16))}function zb(e){return"Object("+e+")"}function LB(e){return e+" { ? }"}function E7(e,t,n,r){var i=r?i5(n,r):Vl.call(n,", ");return e+" ("+t+") {"+i+"}"}function H3e(e){for(var t=0;t=0)return!1;return!0}function W3e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Vl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Vl.call(Array(t+1),n)}}function i5(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Vl.call(e,","+n)+` -`+t.prev}function aS(e,t){var n=n5(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(lp(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===o5e.RFC1738&&(c===40||c===41)){a+=s.charAt(u);continue}if(c<128){a=a+$l[c];continue}if(c<2048){a=a+($l[192|c>>6]+$l[128|c&63]);continue}if(c<55296||c>=57344){a=a+($l[224|c>>12]+$l[128|c>>6&63]+$l[128|c&63]);continue}u+=1,c=65536+((c&1023)<<10|s.charCodeAt(u)&1023),a+=$l[240|c>>18]+$l[128|c>>12&63]+$l[128|c>>6&63]+$l[128|c&63]}return a},f5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof u=="function"?w=u(n,w):w instanceof Date?w=h(w):r==="comma"&&wc(w)&&(w=wE.maybeMap(w,function(z){return z instanceof Date?h(z):z})),w===null){if(o)return a&&!v?a(n,lo.encoder,y,"key",p):n;w=""}if(b5e(w)||wE.isBuffer(w)){if(a){var I=v?n:a(n,lo.encoder,y,"key",p);return[m(I)+"="+m(a(w,lo.encoder,y,"value",p))]}return[m(n)+"="+m(String(w))]}var R=[];if(typeof w>"u")return R;var M;if(r==="comma"&&wc(w))v&&a&&(w=wE.maybeMap(w,a)),M=[{value:w.length>0?w.join(",")||null:void 0}];else if(wc(u))M=u;else{var L=Object.keys(w);M=c?L.sort(c):L}for(var N=i&&wc(w)&&w.length===1?n+"[]":n,H=0;H"u"?lo.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:lo.charsetSentinel,delimiter:typeof t.delimiter>"u"?lo.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:lo.encode,encoder:typeof t.encoder=="function"?t.encoder:lo.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:lo.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:lo.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:lo.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:lo.strictNullHandling}},_5e=function(e,t){var n=e,r=w5e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):wc(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in E7?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var u=E7[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=u==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=Cne(),h=0;h0?v+m:""},iv=Ene,i5=Object.prototype.hasOwnProperty,S5e=Array.isArray,Ci={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:iv.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},E5e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ane=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},C5e="utf8=%26%2310003%3B",T5e="utf8=%E2%9C%93",A5e=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),a=-1,u,c=n.charset;if(n.charsetSentinel)for(u=0;u-1&&(v=S5e(v)?[v]:v),i5.call(r,m)?r[m]=iv.combine(r[m],v):r[m]=v}return r},I5e=function(e,t,n,r){for(var i=r?t:Ane(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var u=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(u,10);!n.parseArrays&&u===""?s={0:i}:!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):u!=="__proto__"&&(s[u]=i)}i=s}return i},R5e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=r.depth>0&&s.exec(o),c=u?o.slice(0,u.index):o,d=[];if(c){if(!r.plainObjects&&i5.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var h=0;r.depth>0&&(u=a.exec(o))!==null&&h"u"?Ci.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ci.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ci.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ci.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ci.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ci.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ci.comma,decoder:typeof t.decoder=="function"?t.decoder:Ci.decoder,delimiter:typeof t.delimiter=="string"||iv.isRegExp(t.delimiter)?t.delimiter:Ci.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ci.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ci.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ci.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ci.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ci.strictNullHandling}},O5e=function(e,t){var n=P5e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?A5e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` -`," "],U5e=["{","}","|","\\","^","`"].concat(z5e),o5=["'"].concat(U5e),T7=["%","/","?",";","#"].concat(o5),A7=["/","?","#"],j5e=255,I7=/^[+a-z0-9A-Z_-]{0,63}$/,H5e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,W5e={javascript:!0,"javascript:":!0},s5={javascript:!0,"javascript:":!0},wm={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},a5=L5e;function EI(e,t,n){if(e&&typeof e=="object"&&e instanceof Sl)return e;var r=new Sl;return r.parse(e,t,n),r}Sl.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?A+="x":A+=E[I];if(!A.match(I7)){var M=b.slice(0,m),L=b.slice(m+1),N=E.match(H5e);N&&(M.push(N[1]),L.unshift(N[2])),L.length&&(a="/"+L.join(".")+a),this.hostname=M.join(".");break}}}this.hostname.length>j5e?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=N5e.toASCII(this.hostname));var H=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+H,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!W5e[d])for(var m=0,x=o5.length;m0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.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 I=b.slice(-1)[0],R=(n.host||e.host||b.length>1)&&(I==="."||I==="..")||I==="",M=0,L=b.length;L>=0;L--)I=b[L],I==="."?b.splice(L,1):I===".."?(b.splice(L,1),M++):M&&(b.splice(L,1),M--);if(!S&&!w)for(;M--;M)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),R&&b.join("/").substr(-1)!=="/"&&b.push("");var N=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(E){n.hostname=N?"":b.length?b.shift():"",n.host=n.hostname;var A=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!N&&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};Sl.prototype.parseHost=function(){var e=this.host,t=$5e.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 X5e=EI,q5e=V5e,Y5e=G5e;const K5e={parse:X5e,format:Y5e,resolve:q5e};function Za(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function Ub(e){return e.split("?")[0].split("#")[0]}function Q5e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function J5e(e,t,n){return e.replace(new RegExp(Q5e(t),"g"),n)}function Z5e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let a=0;a<=e.length;++a){if(a2){const u=n.lastIndexOf("/");if(u!==n.length-1){u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,a)}`:n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}const vo={toPosix(e){return J5e(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){Za(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=Ub(this.toPosix(t??nt.ADAPTER.getBaseUrl())),i=Ub(this.toPosix(n??this.rootname(r)));return Za(e),e=this.toPosix(e),e.startsWith("/")?vo.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),Za(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=Z5e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return Za(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(Za(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 a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!i){r=a;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){Za(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){Za(e),t&&Za(t),e=Ub(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,a=-1;for(o=e.length-1;o>=0;--o){const u=e.charCodeAt(o);if(u===47){if(!i){n=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=a))}return n===r?r=a: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){Za(e),e=Ub(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),a===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){Za(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=Ub(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,a=-1,u=!0,c=e.length-1,d=0;for(;c>=i;--c){if(n=e.charCodeAt(c),n===47){if(!u){s=c+1;break}continue}a===-1&&(u=!1,a=c+1),n===46?o===-1?o=c:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||a===-1||d===0||d===1&&o===a-1&&o===s+1?a!==-1&&(s===0&&r?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,a)):(t.name=e.slice(s,o),t.base=e.slice(s,a)),t.ext=e.slice(o,a)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},R7={};function dn(e,t,n=3){if(R7[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} +`+t.prev}function lS(e,t){var n=r5(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(lp(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===o5e.RFC1738&&(c===40||c===41)){a+=s.charAt(u);continue}if(c<128){a=a+$l[c];continue}if(c<2048){a=a+($l[192|c>>6]+$l[128|c&63]);continue}if(c<55296||c>=57344){a=a+($l[224|c>>12]+$l[128|c>>6&63]+$l[128|c&63]);continue}u+=1,c=65536+((c&1023)<<10|s.charCodeAt(u)&1023),a+=$l[240|c>>18]+$l[128|c>>12&63]+$l[128|c>>6&63]+$l[128|c&63]}return a},f5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof u=="function"?w=u(n,w):w instanceof Date?w=h(w):r==="comma"&&wc(w)&&(w=_E.maybeMap(w,function(z){return z instanceof Date?h(z):z})),w===null){if(o)return a&&!v?a(n,lo.encoder,y,"key",p):n;w=""}if(b5e(w)||_E.isBuffer(w)){if(a){var I=v?n:a(n,lo.encoder,y,"key",p);return[m(I)+"="+m(a(w,lo.encoder,y,"value",p))]}return[m(n)+"="+m(String(w))]}var R=[];if(typeof w>"u")return R;var M;if(r==="comma"&&wc(w))v&&a&&(w=_E.maybeMap(w,a)),M=[{value:w.length>0?w.join(",")||null:void 0}];else if(wc(u))M=u;else{var D=Object.keys(w);M=c?D.sort(c):D}for(var N=i&&wc(w)&&w.length===1?n+"[]":n,H=0;H"u"?lo.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:lo.charsetSentinel,delimiter:typeof t.delimiter>"u"?lo.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:lo.encode,encoder:typeof t.encoder=="function"?t.encoder:lo.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:lo.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:lo.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:lo.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:lo.strictNullHandling}},_5e=function(e,t){var n=e,r=w5e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):wc(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in C7?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var u=C7[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=u==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=Tne(),h=0;h0?v+m:""},iv=Cne,o5=Object.prototype.hasOwnProperty,S5e=Array.isArray,Ci={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:iv.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},E5e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ine=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},C5e="utf8=%26%2310003%3B",T5e="utf8=%E2%9C%93",A5e=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),a=-1,u,c=n.charset;if(n.charsetSentinel)for(u=0;u-1&&(v=S5e(v)?[v]:v),o5.call(r,m)?r[m]=iv.combine(r[m],v):r[m]=v}return r},I5e=function(e,t,n,r){for(var i=r?t:Ine(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var u=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(u,10);!n.parseArrays&&u===""?s={0:i}:!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):u!=="__proto__"&&(s[u]=i)}i=s}return i},R5e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=r.depth>0&&s.exec(o),c=u?o.slice(0,u.index):o,d=[];if(c){if(!r.plainObjects&&o5.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var h=0;r.depth>0&&(u=a.exec(o))!==null&&h"u"?Ci.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ci.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ci.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ci.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ci.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ci.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ci.comma,decoder:typeof t.decoder=="function"?t.decoder:Ci.decoder,delimiter:typeof t.delimiter=="string"||iv.isRegExp(t.delimiter)?t.delimiter:Ci.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ci.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ci.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ci.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ci.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ci.strictNullHandling}},O5e=function(e,t){var n=P5e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?A5e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` +`," "],U5e=["{","}","|","\\","^","`"].concat(z5e),s5=["'"].concat(U5e),A7=["%","/","?",";","#"].concat(s5),I7=["/","?","#"],j5e=255,R7=/^[+a-z0-9A-Z_-]{0,63}$/,H5e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,W5e={javascript:!0,"javascript:":!0},a5={javascript:!0,"javascript:":!0},wm={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},l5=D5e;function EI(e,t,n){if(e&&typeof e=="object"&&e instanceof Sl)return e;var r=new Sl;return r.parse(e,t,n),r}Sl.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?A+="x":A+=E[I];if(!A.match(R7)){var M=b.slice(0,m),D=b.slice(m+1),N=E.match(H5e);N&&(M.push(N[1]),D.unshift(N[2])),D.length&&(a="/"+D.join(".")+a),this.hostname=M.join(".");break}}}this.hostname.length>j5e?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=N5e.toASCII(this.hostname));var H=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+H,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!W5e[d])for(var m=0,x=s5.length;m0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.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 I=b.slice(-1)[0],R=(n.host||e.host||b.length>1)&&(I==="."||I==="..")||I==="",M=0,D=b.length;D>=0;D--)I=b[D],I==="."?b.splice(D,1):I===".."?(b.splice(D,1),M++):M&&(b.splice(D,1),M--);if(!S&&!w)for(;M--;M)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),R&&b.join("/").substr(-1)!=="/"&&b.push("");var N=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(E){n.hostname=N?"":b.length?b.shift():"",n.host=n.hostname;var A=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;A&&(n.auth=A.shift(),n.hostname=A.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!N&&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};Sl.prototype.parseHost=function(){var e=this.host,t=$5e.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 X5e=EI,q5e=V5e,Y5e=G5e;const K5e={parse:X5e,format:Y5e,resolve:q5e};function Za(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function Ub(e){return e.split("?")[0].split("#")[0]}function Q5e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function J5e(e,t,n){return e.replace(new RegExp(Q5e(t),"g"),n)}function Z5e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let a=0;a<=e.length;++a){if(a2){const u=n.lastIndexOf("/");if(u!==n.length-1){u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,a)}`:n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}const vo={toPosix(e){return J5e(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){Za(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=Ub(this.toPosix(t??nt.ADAPTER.getBaseUrl())),i=Ub(this.toPosix(n??this.rootname(r)));return Za(e),e=this.toPosix(e),e.startsWith("/")?vo.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),Za(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=Z5e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return Za(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(Za(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 a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!i){r=a;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){Za(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){Za(e),t&&Za(t),e=Ub(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,a=-1;for(o=e.length-1;o>=0;--o){const u=e.charCodeAt(o);if(u===47){if(!i){n=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(u===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=a))}return n===r?r=a: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){Za(e),e=Ub(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),a===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){Za(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=Ub(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,a=-1,u=!0,c=e.length-1,d=0;for(;c>=i;--c){if(n=e.charCodeAt(c),n===47){if(!u){s=c+1;break}continue}a===-1&&(u=!1,a=c+1),n===46?o===-1?o=c:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||a===-1||d===0||d===1&&o===a-1&&o===s+1?a!==-1&&(s===0&&r?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,a)):(t.name=e.slice(s,o),t.base=e.slice(s,a)),t.ext=e.slice(o,a)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},P7={};function dn(e,t,n=3){if(P7[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))),R7[t]=!0}let $B;function e4e(){return typeof $B>"u"&&($B=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!nt.ADAPTER.getWebGLRenderingContext())return!1;const r=nt.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}}()),$B}var t4e={grad:.9,turn:360,rad:360/(2*Math.PI)},gc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ii=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ba=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Ine=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},P7=function(e){return{r:ba(e.r,0,255),g:ba(e.g,0,255),b:ba(e.b,0,255),a:ba(e.a)}},FB=function(e){return{r:Ii(e.r),g:Ii(e.g),b:Ii(e.b),a:Ii(e.a,3)}},n4e=/^#([0-9a-f]{3,8})$/i,cS=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Rne=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),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},Pne=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),a=r*(1-(t-o)*n),u=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,a,s,s,u,r][c],g:255*[u,r,r,a,s,s][c],b:255*[s,s,u,r,r,a][c],a:i}},O7=function(e){return{h:Ine(e.h),s:ba(e.s,0,100),l:ba(e.l,0,100),a:ba(e.a)}},M7=function(e){return{h:Ii(e.h),s:Ii(e.s),l:Ii(e.l),a:Ii(e.a,3)}},k7=function(e){return Pne((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},K1=function(e){return{h:(t=Rne(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},r4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,i4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,o4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,l5={string:[[function(e){var t=n4e.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?Ii(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?Ii(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=o4e.exec(e)||s4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:P7({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=r4e.exec(e)||i4e.exec(e);if(!t)return null;var n,r,i=O7({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(t4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return k7(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 gc(t)&&gc(n)&&gc(r)?P7({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(!gc(t)||!gc(n)||!gc(r))return null;var s=O7({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return k7(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!gc(t)||!gc(n)||!gc(r))return null;var s=function(a){return{h:Ine(a.h),s:ba(a.s,0,100),v:ba(a.v,0,100),a:ba(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Pne(s)},"hsv"]]},D7=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=FB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?cS(Ii(255*o)):"","#"+cS(n)+cS(r)+cS(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return FB(this.rgba)},e.prototype.toRgbString=function(){return t=FB(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 M7(K1(this.rgba))},e.prototype.toHslString=function(){return t=M7(K1(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=Rne(this.rgba),{h:Ii(t.h),s:Ii(t.s),v:Ii(t.v),a:Ii(t.a,3)};var t},e.prototype.invert=function(){return Fl({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),Fl(zB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Fl(zB(this.rgba,-t))},e.prototype.grayscale=function(){return Fl(zB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Fl(L7(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Fl(L7(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"?Fl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):Ii(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=K1(this.rgba);return typeof t=="number"?Fl({h:t,s:n.s,l:n.l,a:n.a}):Ii(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Fl(t).toHex()},e}(),Fl=function(e){return e instanceof u5?e:new u5(e)},N7=[],l4e=function(e){e.forEach(function(t){N7.indexOf(t)<0&&(t(u5,l5),N7.push(t))})};function u4e(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 a,u,c=r[this.toHex()];if(c)return c;if(s!=null&&s.closest){var d=this.toRgb(),h=1/0,p="black";if(!o.length)for(var m in n)o[m]=new e(n[m]).toRgb();for(var v in n){var y=(a=d,u=o[v],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.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]=_m.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=_m.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=Fl(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 Vn=_m;Vn.shared=new _m;Vn.temp=new _m;Vn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function c4e(e){return dn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Vn.shared.setValue(e).toHex()}function f4e(e){return dn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Vn.shared.setValue(e).toNumber()}function d4e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Lt.NORMAL_NPM]=Lt.NORMAL,e[Lt.ADD_NPM]=Lt.ADD,e[Lt.SCREEN_NPM]=Lt.SCREEN,t[Lt.NORMAL]=Lt.NORMAL_NPM,t[Lt.ADD]=Lt.ADD_NPM,t[Lt.SCREEN]=Lt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const One=d4e();function Mne(e,t){return One[t?1:0][e]}function h4e(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 B7(e){return!(e&e-1)&&!!e}function $7(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 Sm(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))(it||{});const f5=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},j7=(e,t)=>f5(e).priority??t,wt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(f5).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(f5).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)=>j7(o,n)-j7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class d5{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 b4e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +Deprecated since v${e}`),console.warn(r))),P7[t]=!0}let $B;function e4e(){return typeof $B>"u"&&($B=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!nt.ADAPTER.getWebGLRenderingContext())return!1;const r=nt.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}}()),$B}var t4e={grad:.9,turn:360,rad:360/(2*Math.PI)},gc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ii=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ba=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Rne=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},O7=function(e){return{r:ba(e.r,0,255),g:ba(e.g,0,255),b:ba(e.b,0,255),a:ba(e.a)}},FB=function(e){return{r:Ii(e.r),g:Ii(e.g),b:Ii(e.b),a:Ii(e.a,3)}},n4e=/^#([0-9a-f]{3,8})$/i,fS=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pne=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),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},One=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),a=r*(1-(t-o)*n),u=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,a,s,s,u,r][c],g:255*[u,r,r,a,s,s][c],b:255*[s,s,u,r,r,a][c],a:i}},M7=function(e){return{h:Rne(e.h),s:ba(e.s,0,100),l:ba(e.l,0,100),a:ba(e.a)}},k7=function(e){return{h:Ii(e.h),s:Ii(e.s),l:Ii(e.l),a:Ii(e.a,3)}},L7=function(e){return One((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},K1=function(e){return{h:(t=Pne(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},r4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,i4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,o4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,u5={string:[[function(e){var t=n4e.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?Ii(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?Ii(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=o4e.exec(e)||s4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:O7({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=r4e.exec(e)||i4e.exec(e);if(!t)return null;var n,r,i=M7({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(t4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return L7(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 gc(t)&&gc(n)&&gc(r)?O7({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(!gc(t)||!gc(n)||!gc(r))return null;var s=M7({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return L7(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!gc(t)||!gc(n)||!gc(r))return null;var s=function(a){return{h:Rne(a.h),s:ba(a.s,0,100),v:ba(a.v,0,100),a:ba(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return One(s)},"hsv"]]},D7=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=FB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?fS(Ii(255*o)):"","#"+fS(n)+fS(r)+fS(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return FB(this.rgba)},e.prototype.toRgbString=function(){return t=FB(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 k7(K1(this.rgba))},e.prototype.toHslString=function(){return t=k7(K1(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=Pne(this.rgba),{h:Ii(t.h),s:Ii(t.s),v:Ii(t.v),a:Ii(t.a,3)};var t},e.prototype.invert=function(){return Fl({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),Fl(zB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Fl(zB(this.rgba,-t))},e.prototype.grayscale=function(){return Fl(zB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Fl(N7(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Fl(N7(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"?Fl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):Ii(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=K1(this.rgba);return typeof t=="number"?Fl({h:t,s:n.s,l:n.l,a:n.a}):Ii(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Fl(t).toHex()},e}(),Fl=function(e){return e instanceof c5?e:new c5(e)},B7=[],l4e=function(e){e.forEach(function(t){B7.indexOf(t)<0&&(t(c5,u5),B7.push(t))})};function u4e(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 a,u,c=r[this.toHex()];if(c)return c;if(s!=null&&s.closest){var d=this.toRgb(),h=1/0,p="black";if(!o.length)for(var m in n)o[m]=new e(n[m]).toRgb();for(var v in n){var y=(a=d,u=o[v],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.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]=_m.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=_m.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=Fl(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 Vn=_m;Vn.shared=new _m;Vn.temp=new _m;Vn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function c4e(e){return dn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Vn.shared.setValue(e).toHex()}function f4e(e){return dn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Vn.shared.setValue(e).toNumber()}function d4e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Dt.NORMAL_NPM]=Dt.NORMAL,e[Dt.ADD_NPM]=Dt.ADD,e[Dt.SCREEN_NPM]=Dt.SCREEN,t[Dt.NORMAL]=Dt.NORMAL_NPM,t[Dt.ADD]=Dt.ADD_NPM,t[Dt.SCREEN]=Dt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const Mne=d4e();function kne(e,t){return Mne[t?1:0][e]}function h4e(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 $7(e){return!(e&e-1)&&!!e}function F7(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 Sm(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))(it||{});const d5=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},H7=(e,t)=>d5(e).priority??t,wt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(d5).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(d5).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)=>H7(o,n)-H7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class h5{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 b4e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` `);function x4e(e){let t="";for(let n=0;n0&&(t+=` -else `),n=0;--r){const i=h5[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,a,u){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:d}=this;this._aliasCount++;for(let h=0,p=d.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 Jx{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 Ww extends Jx{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===kl.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 _4e={scaleMode:Ac.NEAREST,format:Ve.RGBA,alphaMode:kl.NPM},Og=class extends jw{constructor(e=null,t=null){super(),t=Object.assign({},Og.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:a,wrapMode:u,format:c,type:d,target:h,resolution:p,resourceOptions:m}=t;e&&!(e instanceof Jx)&&(e=Lne(e,m),e.internal=!0),this.resolution=p||nt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=u,this._scaleMode=o,this.format=c,this.type=d,this.target=h,this.alphaMode=n,this.uid=qp(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&a>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=B7(this.realWidth)&&B7(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 af[this.cacheId],delete zl[this.cacheId],this.cacheId=null),this.dispose(),Og.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=nt.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}_${qp()}`}i=e._pixiId}let o=af[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new Og(e,t),o.cacheId=i,Og.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new Ww(e,{width:t,height:n}),o=e instanceof Float32Array?Mt.FLOAT:Mt.UNSIGNED_BYTE;return new Og(i,Object.assign({},_4e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),af[t]&&af[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),af[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=af[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete af[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))(Ki||{});class Dt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Dt(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 dS=[new Dt,new Dt,new Dt,new Dt];class Jt{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=Ki.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 Jt(0,0,0,0)}clone(){return new Jt(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 N=this.yt.bottom?t.bottom:this.bottom)>N}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const a=dS[0].set(t.left,t.top),u=dS[1].set(t.left,t.bottom),c=dS[2].set(t.right,t.top),d=dS[3].set(t.right,t.bottom);if(c.x<=a.x||u.y<=a.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(a,a),n.apply(u,u),n.apply(c,c),n.apply(d,d),Math.max(a.x,u.x,c.x,d.x)<=r||Math.min(a.x,u.x,c.x,d.x)>=i||Math.max(a.y,u.y,c.y,d.y)<=o||Math.min(a.y,u.y,c.y,d.y)>=s))return!1;const p=h*(u.y-a.y),m=h*(a.x-u.x),v=p*r+m*o,y=p*i+m*o,S=p*r+m*s,w=p*i+m*s;if(Math.max(v,y,S,w)<=p*a.x+m*a.y||Math.min(v,y,S,w)>=p*d.x+m*d.y)return!1;const b=h*(a.y-c.y),x=h*(c.x-a.x),E=b*r+x*o,A=b*i+x*o,I=b*r+x*s,R=b*i+x*s;return!(Math.max(E,A,I,R)<=b*a.x+x*a.y||Math.min(E,A,I,R)>=b*d.x+x*d.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 dU{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=Ki.CIRC}clone(){return new dU(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 Jt(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 hU{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=Ki.ELIP}clone(){return new hU(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 Jt(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 Em{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!=d>n&&t<(c-a)*((n-u)/(d-u))+a&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class pU{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=Ki.RREC}clone(){return new pU(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 Cr{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 Dt;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 Dt;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,a,u,c){return this.a=Math.cos(a+c)*o,this.b=Math.sin(a+c)*o,this.c=-Math.sin(a-u)*s,this.d=Math.cos(a-u)*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,a=-Math.atan2(-i,o),u=Math.atan2(r,n),c=Math.abs(a+u);return c<1e-5||Math.abs(ZC-c)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),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 Cr;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 Cr}static get TEMP_MATRIX(){return new Cr}}const np=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],rp=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ip=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],op=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],g5=[],$ne=[],hS=Math.sign;function P4e(){for(let e=0;e<16;e++){const t=[];g5.push(t);for(let n=0;n<16;n++){const r=hS(np[e]*np[n]+ip[e]*rp[n]),i=hS(rp[e]*np[n]+op[e]*rp[n]),o=hS(np[e]*ip[n]+ip[e]*op[n]),s=hS(rp[e]*ip[n]+op[e]*op[n]);for(let a=0;a<16;a++)if(np[a]===r&&rp[a]===i&&ip[a]===o&&op[a]===s){t.push(a);break}}}for(let e=0;e<16;e++){const t=new Cr;t.set(np[e],rp[e],ip[e],op[e],0,0),$ne.push(t)}}P4e();const kr={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=>np[e],uY:e=>rp[e],vX:e=>ip[e],vY:e=>op[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>g5[e][t],sub:(e,t)=>g5[e][kr.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?kr.S:kr.N:Math.abs(t)*2<=Math.abs(e)?e>0?kr.E:kr.W:t>0?e>0?kr.SE:kr.SW:e>0?kr.NE:kr.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=$ne[kr.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class Df{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 Df(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 Fne=class{constructor(){this.worldTransform=new Cr,this.localTransform=new Cr,this.position=new Df(this.onChange,this,0,0),this.scale=new Df(this.onChange,this,1,1),this.pivot=new Df(this.onChange,this,0,0),this.skew=new Df(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 gU=Fne;gU.IDENTITY=new Fne;var O4e=`varying vec2 vTextureCoord; +else `),n=0;--r){const i=p5[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,a,u){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:d}=this;this._aliasCount++;for(let h=0,p=d.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 Zx{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 Gw extends Zx{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===kl.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 _4e={scaleMode:Ac.NEAREST,format:Ve.RGBA,alphaMode:kl.NPM},Og=class extends Hw{constructor(e=null,t=null){super(),t=Object.assign({},Og.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:a,wrapMode:u,format:c,type:d,target:h,resolution:p,resourceOptions:m}=t;e&&!(e instanceof Zx)&&(e=Nne(e,m),e.internal=!0),this.resolution=p||nt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=u,this._scaleMode=o,this.format=c,this.type=d,this.target=h,this.alphaMode=n,this.uid=qp(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&a>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=$7(this.realWidth)&&$7(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 af[this.cacheId],delete zl[this.cacheId],this.cacheId=null),this.dispose(),Og.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=nt.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}_${qp()}`}i=e._pixiId}let o=af[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new Og(e,t),o.cacheId=i,Og.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new Gw(e,{width:t,height:n}),o=e instanceof Float32Array?Mt.FLOAT:Mt.UNSIGNED_BYTE;return new Og(i,Object.assign({},_4e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),af[t]&&af[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),af[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=af[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete af[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))(Ki||{});class Lt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Lt(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 hS=[new Lt,new Lt,new Lt,new Lt];class Jt{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=Ki.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 Jt(0,0,0,0)}clone(){return new Jt(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 N=this.yt.bottom?t.bottom:this.bottom)>N}const r=this.left,i=this.right,o=this.top,s=this.bottom;if(i<=r||s<=o)return!1;const a=hS[0].set(t.left,t.top),u=hS[1].set(t.left,t.bottom),c=hS[2].set(t.right,t.top),d=hS[3].set(t.right,t.bottom);if(c.x<=a.x||u.y<=a.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(a,a),n.apply(u,u),n.apply(c,c),n.apply(d,d),Math.max(a.x,u.x,c.x,d.x)<=r||Math.min(a.x,u.x,c.x,d.x)>=i||Math.max(a.y,u.y,c.y,d.y)<=o||Math.min(a.y,u.y,c.y,d.y)>=s))return!1;const p=h*(u.y-a.y),m=h*(a.x-u.x),v=p*r+m*o,y=p*i+m*o,S=p*r+m*s,w=p*i+m*s;if(Math.max(v,y,S,w)<=p*a.x+m*a.y||Math.min(v,y,S,w)>=p*d.x+m*d.y)return!1;const b=h*(a.y-c.y),x=h*(c.x-a.x),E=b*r+x*o,A=b*i+x*o,I=b*r+x*s,R=b*i+x*s;return!(Math.max(E,A,I,R)<=b*a.x+x*a.y||Math.min(E,A,I,R)>=b*d.x+x*d.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 hU{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=Ki.CIRC}clone(){return new hU(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 Jt(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 pU{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=Ki.ELIP}clone(){return new pU(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 Jt(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 Em{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!=d>n&&t<(c-a)*((n-u)/(d-u))+a&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class gU{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=Ki.RREC}clone(){return new gU(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 Cr{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 Lt;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 Lt;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,a,u,c){return this.a=Math.cos(a+c)*o,this.b=Math.sin(a+c)*o,this.c=-Math.sin(a-u)*s,this.d=Math.cos(a-u)*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,a=-Math.atan2(-i,o),u=Math.atan2(r,n),c=Math.abs(a+u);return c<1e-5||Math.abs(ZC-c)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),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 Cr;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 Cr}static get TEMP_MATRIX(){return new Cr}}const np=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],rp=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ip=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],op=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],m5=[],Fne=[],pS=Math.sign;function P4e(){for(let e=0;e<16;e++){const t=[];m5.push(t);for(let n=0;n<16;n++){const r=pS(np[e]*np[n]+ip[e]*rp[n]),i=pS(rp[e]*np[n]+op[e]*rp[n]),o=pS(np[e]*ip[n]+ip[e]*op[n]),s=pS(rp[e]*ip[n]+op[e]*op[n]);for(let a=0;a<16;a++)if(np[a]===r&&rp[a]===i&&ip[a]===o&&op[a]===s){t.push(a);break}}}for(let e=0;e<16;e++){const t=new Cr;t.set(np[e],rp[e],ip[e],op[e],0,0),Fne.push(t)}}P4e();const kr={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=>np[e],uY:e=>rp[e],vX:e=>ip[e],vY:e=>op[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>m5[e][t],sub:(e,t)=>m5[e][kr.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?kr.S:kr.N:Math.abs(t)*2<=Math.abs(e)?e>0?kr.E:kr.W:t>0?e>0?kr.SE:kr.SW:e>0?kr.NE:kr.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=Fne[kr.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class Lf{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 Lf(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 zne=class{constructor(){this.worldTransform=new Cr,this.localTransform=new Cr,this.position=new Lf(this.onChange,this,0,0),this.scale=new Lf(this.onChange,this,1,1),this.pivot=new Lf(this.onChange,this,0,0),this.skew=new Lf(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 mU=zne;mU.IDENTITY=new zne;var O4e=`varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -712,7 +712,7 @@ void main(void){ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; } -`;function W7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function qB(e){const t=new Array(e);for(let n=0;ne.type==="float"&&e.size===1&&!e.isArray,code:e=>` +`;function G7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function qB(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}"] @@ -968,7 +968,7 @@ void main(void){ cu.value = v; gl.uniform1i(location, v); - }`},D4e={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function L4e(e,t){var r;const n=[` + }`},L4e={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function D4e(e,t){var r;const n=[` var v = null; var cv = null; var cu = null; @@ -978,18 +978,18 @@ void main(void){ renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}'); `):n.push(` renderer.shader.syncUniformGroup(uv.${i}, syncData); - `));continue}const s=e.uniforms[i];let a=!1;for(let u=0;u=og.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),bg=t}return bg}let pS;function B4e(){if(!pS){pS=ya.MEDIUM;const e=N4e();e&&e.getShaderPrecisionFormat&&(pS=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?ya.HIGH:ya.MEDIUM)}return pS}function G7(e,t){const n=e.getShaderSource(t).split(` +`))}const jne={};let bg=jne;function N4e(){if(bg===jne||bg!=null&&bg.isContextLost()){const e=nt.ADAPTER.createCanvas();let t;nt.PREFER_ENV>=og.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),bg=t}return bg}let gS;function B4e(){if(!gS){gS=ya.MEDIUM;const e=N4e();e&&e.getShaderPrecisionFormat&&(gS=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?ya.HIGH:ya.MEDIUM)}return gS}function V7(e,t){const n=e.getShaderSource(t).split(` `).map((c,d)=>`${d}: ${c}`),r=e.getShaderInfoLog(t),i=r.split(` `),o={},s=i.map(c=>parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(c=>c&&!o[c]?(o[c]=!0,!0):!1),a=[""];s.forEach(c=>{n[c-1]=`%c${n[c-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const u=n.join(` -`);a[0]=u,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function $4e(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||G7(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||G7(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const F4e={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 jne(e){return F4e[e]}let gS=null;const V7={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 Hne(e,t){if(!gS){const n=Object.keys(V7);gS={};for(let r=0;r0&&(n+=` else `),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=nl._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Vt._globalBatch,a=0,u=n[0],c=0;r.copyBoundTextures(i,t);for(let d=0;d=t&&(r.boundArray(u,i,s,t),this.buildDrawCalls(u,c,d),c=d,u=n[++a],++s),h._batchEnabled=s,h.touched=o,u.elements[u.count++]=h)}u.count>0&&(r.boundArray(u,i,s,t),this.buildDrawCalls(u,c,this._bufferSize),++a,++s);for(let d=0;d0);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=nl._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Vt._globalBatch,a=0,u=n[0],c=0;r.copyBoundTextures(i,t);for(let d=0;d=t&&(r.boundArray(u,i,s,t),this.buildDrawCalls(u,c,d),c=d,u=n[++a],++s),h._batchEnabled=s,h.touched=o,u.elements[u.count++]=h)}u.count>0&&(r.boundArray(u,i,s,t),this.buildDrawCalls(u,c,this._bufferSize),++a,++s);for(let d=0;d0);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:a}=t;let u=0;for(let c=0;c=0&&h=og.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:it.RendererSystem,name:"context"};wt.add(AI);class K4e extends Ww{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===kl.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 v5{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=ri.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Vt(null,{scaleMode:Ac.NEAREST,resolution:1,mipmap:du.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Vt(new K4e(null,{width:this.width,height:this.height}),{scaleMode:Ac.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:du.OFF,format:Ve.DEPTH_COMPONENT,type:Mt.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===kl.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 a=o[s];if(a!==r&&a.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 Xne{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,a=t.height/2/o,u=t.x/i+s,c=t.y/o+a;r=kr.add(r,kr.NW),this.x0=u+s*kr.uX(r),this.y0=c+a*kr.uY(r),r=kr.add(r,2),this.x1=u+s*kr.uX(r),this.y1=c+a*kr.uY(r),r=kr.add(r,2),this.x2=u+s*kr.uX(r),this.y2=c+a*kr.uY(r),r=kr.add(r,2),this.x3=u+s*kr.uX(r),this.y3=c+a*kr.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 Y7=new Xne;function vS(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class pt extends jw{constructor(t,n,r,i,o,s,a){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Jt(0,0,1,1)),t instanceof pt&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=Y7,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 Dt(s.x,s.y):new Dt(0,0),this.defaultBorders=a,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&&zl[n.url]&&pt.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,pt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new pt(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===Y7&&(this._uvs=new Xne),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=nt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Vt){if(!t.cacheId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${a}-${qp()}`,Vt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${a}_${qp()}`}o=t._pixiId}let s=zl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Vt)?(n.resolution||(n.resolution=sd(t)),s=new pt(new Vt(t,n)),s.baseTexture.cacheId=o,Vt.addToCache(s.baseTexture,o),pt.addToCache(s,o)):!s&&t instanceof Vt&&(s=new pt(t),pt.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=pt.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 pt(Vt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Vt(t,Object.assign({scaleMode:Vt.defaultOptions.scaleMode,resolution:sd(n)},i)),{resource:s}=o;s instanceof Vne&&(s.url=n);const a=new pt(o);return r||(r=n),Vt.addToCache(a.baseTexture,r),pt.addToCache(a,r),r!==n&&(Vt.addToCache(a.baseTexture,n),pt.addToCache(a,n)),a.baseTexture.valid?Promise.resolve(a):new Promise(u=>{a.baseTexture.once("loaded",()=>u(a))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),zl[n]&&zl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),zl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=zl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete zl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,a=r+o>this.baseTexture.height;if(s||a){const u=s&&a?"and":"or",c=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,d=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${u} ${d}`)}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 pt._EMPTY||(pt._EMPTY=new pt(new Vt),vS(pt._EMPTY),vS(pt._EMPTY.baseTexture)),pt._EMPTY}static get WHITE(){if(!pt._WHITE){const t=nt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),pt._WHITE=new pt(Vt.from(t)),vS(pt._WHITE),vS(pt._WHITE.baseTexture)}return pt._WHITE}}class sg extends pt{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 sg(new Gne(t))}}class qne{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=ri.NONE){const i=new Gne(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new sg(i)}getOptimalTexture(t,n,r=1,i=ri.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=QC(t),n=QC(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||ri.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&&(d=this.getOptimalFilterTexture(c.width,c.height,n.resolution),d.filterFrame=c.filterFrame),r[h].apply(this,c,d,Gl.CLEAR,n);const p=c;c=d,d=p}r[h].apply(this,c,u.renderTexture,Gl.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(d)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Gl.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===Gl.CLEAR||n===Gl.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(Kl.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Kl.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),a=n.worldTransform.copyTo(Cr.TEMP_MATRIX);return a.invert(),s.prepend(a),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=ri.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||ri.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=yS[0],i=yS[1],o=yS[2],s=yS[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 a=Math.min(r.x,i.x,o.x,s.x),u=Math.min(r.y,i.y,o.y,s.y),c=Math.max(r.x,i.x,o.x,s.x),d=Math.max(r.y,i.y,o.y,s.y);n.x=a,n.y=u,n.width=c-a,n.height=d-u}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:a,c:u,d:c}=o;if((Math.abs(a)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(c)>1e-4))return}o=o?YB.copyFrom(o):YB.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)}}}Kne.extension={type:it.RendererSystem,name:"filter"};wt.add(Kne);class Z4e{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ri.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const eze=new Jt;class Qne{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new v5(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 Jt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;nt.PREFER_ENV===og.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,a=n.height>>r,u=s/n.width;this.setViewport(n.x*u,n.y*u,s,a)}else{const s=t.width>>r,a=t.height>>r;this.setViewport(0,0,s,a)}}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=q3.COLOR|q3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Z4e(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 a=[];for(let u=0;u1&&r.drawBuffers(a),t.depthTexture&&this.writeDepthTexture){const c=t.depthTexture;this.renderer.texture.bind(c,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,c._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=ri.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,a,u)=>r.drawElementsInstancedANGLE(i,o,s,a,u),t.drawArraysInstanced=(i,o,s,a)=>r.drawArraysInstancedANGLE(i,o,s,a)):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:a}=t;let u=0;for(let c=0;c=0&&h=og.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:it.RendererSystem,name:"context"};wt.add(AI);class K4e extends Gw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===kl.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 y5{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=ri.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Vt(null,{scaleMode:Ac.NEAREST,resolution:1,mipmap:du.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Vt(new K4e(null,{width:this.width,height:this.height}),{scaleMode:Ac.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:du.OFF,format:Ve.DEPTH_COMPONENT,type:Mt.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===kl.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 a=o[s];if(a!==r&&a.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 qne{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,a=t.height/2/o,u=t.x/i+s,c=t.y/o+a;r=kr.add(r,kr.NW),this.x0=u+s*kr.uX(r),this.y0=c+a*kr.uY(r),r=kr.add(r,2),this.x1=u+s*kr.uX(r),this.y1=c+a*kr.uY(r),r=kr.add(r,2),this.x2=u+s*kr.uX(r),this.y2=c+a*kr.uY(r),r=kr.add(r,2),this.x3=u+s*kr.uX(r),this.y3=c+a*kr.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 K7=new qne;function yS(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class pt extends Hw{constructor(t,n,r,i,o,s,a){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Jt(0,0,1,1)),t instanceof pt&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=K7,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 Lt(s.x,s.y):new Lt(0,0),this.defaultBorders=a,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&&zl[n.url]&&pt.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,pt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new pt(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===K7&&(this._uvs=new qne),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=nt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Vt){if(!t.cacheId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${a}-${qp()}`,Vt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${a}_${qp()}`}o=t._pixiId}let s=zl[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof Vt)?(n.resolution||(n.resolution=sd(t)),s=new pt(new Vt(t,n)),s.baseTexture.cacheId=o,Vt.addToCache(s.baseTexture,o),pt.addToCache(s,o)):!s&&t instanceof Vt&&(s=new pt(t),pt.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=pt.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 pt(Vt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Vt(t,Object.assign({scaleMode:Vt.defaultOptions.scaleMode,resolution:sd(n)},i)),{resource:s}=o;s instanceof Xne&&(s.url=n);const a=new pt(o);return r||(r=n),Vt.addToCache(a.baseTexture,r),pt.addToCache(a,r),r!==n&&(Vt.addToCache(a.baseTexture,n),pt.addToCache(a,n)),a.baseTexture.valid?Promise.resolve(a):new Promise(u=>{a.baseTexture.once("loaded",()=>u(a))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),zl[n]&&zl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),zl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=zl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete zl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,a=r+o>this.baseTexture.height;if(s||a){const u=s&&a?"and":"or",c=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,d=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${u} ${d}`)}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 pt._EMPTY||(pt._EMPTY=new pt(new Vt),yS(pt._EMPTY),yS(pt._EMPTY.baseTexture)),pt._EMPTY}static get WHITE(){if(!pt._WHITE){const t=nt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),pt._WHITE=new pt(Vt.from(t)),yS(pt._WHITE),yS(pt._WHITE.baseTexture)}return pt._WHITE}}class sg extends pt{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 sg(new Vne(t))}}class Yne{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=ri.NONE){const i=new Vne(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new sg(i)}getOptimalTexture(t,n,r=1,i=ri.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=QC(t),n=QC(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||ri.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&&(d=this.getOptimalFilterTexture(c.width,c.height,n.resolution),d.filterFrame=c.filterFrame),r[h].apply(this,c,d,Gl.CLEAR,n);const p=c;c=d,d=p}r[h].apply(this,c,u.renderTexture,Gl.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(d)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Gl.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===Gl.CLEAR||n===Gl.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(Kl.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Kl.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),a=n.worldTransform.copyTo(Cr.TEMP_MATRIX);return a.invert(),s.prepend(a),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=ri.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||ri.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=bS[0],i=bS[1],o=bS[2],s=bS[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 a=Math.min(r.x,i.x,o.x,s.x),u=Math.min(r.y,i.y,o.y,s.y),c=Math.max(r.x,i.x,o.x,s.x),d=Math.max(r.y,i.y,o.y,s.y);n.x=a,n.y=u,n.width=c-a,n.height=d-u}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:a,c:u,d:c}=o;if((Math.abs(a)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(c)>1e-4))return}o=o?YB.copyFrom(o):YB.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)}}}Qne.extension={type:it.RendererSystem,name:"filter"};wt.add(Qne);class Z4e{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ri.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const eze=new Jt;class Jne{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new y5(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 Jt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;nt.PREFER_ENV===og.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,a=n.height>>r,u=s/n.width;this.setViewport(n.x*u,n.y*u,s,a)}else{const s=t.width>>r,a=t.height>>r;this.setViewport(0,0,s,a)}}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=Y3.COLOR|Y3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Z4e(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 a=[];for(let u=0;u1&&r.drawBuffers(a),t.depthTexture&&this.writeDepthTexture){const c=t.depthTexture;this.renderer.texture.bind(c,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,c._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=ri.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,a,u)=>r.drawElementsInstancedANGLE(i,o,s,a,u),t.drawArraysInstanced=(i,o,s,a)=>r.drawArraysInstancedANGLE(i,o,s,a)):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}}ere.extension={type:it.RendererSystem,name:"mask"};wt.add(ere);class tre{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 Q7=new Cr,J7=[],_E=class extends tre{constructor(e){super(e),this.glConst=nt.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,J7.pop()??new Jt);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()||_E.isMatrixRotated(t.worldTransform)||_E.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){_E.isMatrixRotated(i)||(i=i?Q7.copyFrom(i):Q7.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&&J7.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 nre=_E;nre.extension={type:it.RendererSystem,name:"scissor"};wt.add(nre);class rre extends tre{constructor(t){super(t),this.glConst=nt.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)}}rre.extension={type:it.RendererSystem,name:"stencil"};wt.add(rre);class ire{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return dn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return dn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return dn("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}}ire.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"_plugin"};wt.add(ire);class ore{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Cr,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}}ore.extension={type:it.RendererSystem,name:"projection"};wt.add(ore);const oze=new gU;class sre{constructor(t){this.renderer=t,this._tempMatrix=new Cr}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=sg.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const a=t.transform;return t.transform=oze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=a,s}destroy(){}}sre.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"textureGenerator"};wt.add(sre);const Hh=new Jt,Hb=new Jt;class are{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Jt,this.destinationFrame=new Jt,this.viewportFrame=new Jt}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,a;t?(o=t.baseTexture,a=o.resolution,n||(Hh.width=t.frame.width,Hh.height=t.frame.height,n=Hh),r||(Hb.x=t.frame.x,Hb.y=t.frame.y,Hb.width=n.width,Hb.height=n.height,r=Hb),s=o.framebuffer):(a=i.resolution,n||(Hh.width=i._view.screen.width,Hh.height=i._view.screen.height,n=Hh),r||(r=Hh,r.width=n.width,r.height=n.height));const u=this.viewportFrame;u.x=r.x*a,u.y=r.y*a,u.width=r.width*a,u.height=r.height*a,t||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(s,u),this.renderer.projection.update(r,n,a,!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=Vn.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,a=o.width!==s.width||o.height!==s.height;if(a){let{x:u,y:c,width:d,height:h}=this.viewportFrame;u=Math.round(u),c=Math.round(c),d=Math.round(d),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(u,c,d,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}are.extension={type:it.RendererSystem,name:"renderTexture"};wt.add(are);class sze{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 aze(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;id>h?1:-1);for(let d=0;d0?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}}tre.extension={type:it.RendererSystem,name:"mask"};wt.add(tre);class nre{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 J7=new Cr,Z7=[],SE=class extends nre{constructor(e){super(e),this.glConst=nt.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,Z7.pop()??new Jt);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()||SE.isMatrixRotated(t.worldTransform)||SE.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){SE.isMatrixRotated(i)||(i=i?J7.copyFrom(i):J7.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&&Z7.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 rre=SE;rre.extension={type:it.RendererSystem,name:"scissor"};wt.add(rre);class ire extends nre{constructor(t){super(t),this.glConst=nt.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)}}ire.extension={type:it.RendererSystem,name:"stencil"};wt.add(ire);class ore{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return dn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return dn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return dn("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}}ore.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"_plugin"};wt.add(ore);class sre{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Cr,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}}sre.extension={type:it.RendererSystem,name:"projection"};wt.add(sre);const oze=new mU;class are{constructor(t){this.renderer=t,this._tempMatrix=new Cr}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=sg.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const a=t.transform;return t.transform=oze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=a,s}destroy(){}}are.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"textureGenerator"};wt.add(are);const Hh=new Jt,Hb=new Jt;class lre{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Jt,this.destinationFrame=new Jt,this.viewportFrame=new Jt}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,a;t?(o=t.baseTexture,a=o.resolution,n||(Hh.width=t.frame.width,Hh.height=t.frame.height,n=Hh),r||(Hb.x=t.frame.x,Hb.y=t.frame.y,Hb.width=n.width,Hb.height=n.height,r=Hb),s=o.framebuffer):(a=i.resolution,n||(Hh.width=i._view.screen.width,Hh.height=i._view.screen.height,n=Hh),r||(r=Hh,r.width=n.width,r.height=n.height));const u=this.viewportFrame;u.x=r.x*a,u.y=r.y*a,u.width=r.width*a,u.height=r.height*a,t||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(s,u),this.renderer.projection.update(r,n,a,!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=Vn.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,a=o.width!==s.width||o.height!==s.height;if(a){let{x:u,y:c,width:d,height:h}=this.viewportFrame;u=Math.round(u),c=Math.round(c),d=Math.round(d),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(u,c,d,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}lre.extension={type:it.RendererSystem,name:"renderTexture"};wt.add(lre);class sze{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 aze(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;id>h?1:-1);for(let d=0;d({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 a=r%n%16;r+=a,i+=a}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 hze(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 pze(e,t){if(!e.autoManage)return{size:0,syncFunc:cze};const n=hze(e.uniforms,t),{uboElements:r,size:i}=dze(n),o=[` + `},ure={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 dze(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 a=r%n%16;r+=a,i+=a}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 hze(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 pze(e,t){if(!e.autoManage)return{size:0,syncFunc:cze};const n=hze(e.uniforms,t),{uboElements:r,size:i}=dze(n),o=[` var v = null; var v2 = null; var cv = null; @@ -1148,7 +1148,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `];for(let s=0;s1){const h=jne(a.data.type),p=Math.max(lre[a.data.type]/16,1),m=h/p,v=(4-m%4)%4;o.push(` + `];for(let s=0;s1){const h=Hne(a.data.type),p=Math.max(ure[a.data.type]/16,1),m=h/p,v=(4-m%4)%4;o.push(` cv = ud.${c}.value; v = uv.${c}; offset = ${a.offset/4}; @@ -1172,7 +1172,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}let gze=0;const bS={textureCount:0,uboCount:0};class ure{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=gze++}systemCheck(){if(!z4e())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||(bS.textureCount=0,bS.uboCount=0,this.syncUniformGroup(t.uniformGroup,bS)),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]=L4e(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,bS,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 a=this._uboCache[s];if(a||(a=this._uboCache[s]=pze(t,this.shader.program.uniformData)),t.autoManage){const u=new Float32Array(a.size/4);t.buffer.update(u)}return n.uniformGroups[t.id]=a.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=uze(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}}ure.extension={type:it.RendererSystem,name:"shader"};wt.add(ure);class II{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(){}}II.defaultOptions={hello:!1};II.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"startup"};wt.add(II);function mze(e,t=[]){return t[Lt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.ADD]=[e.ONE,e.ONE],t[Lt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.NONE]=[0,0],t[Lt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Lt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Lt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Lt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Lt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Lt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Lt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Lt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Lt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Lt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const vze=0,yze=1,bze=2,xze=3,wze=4,_ze=5,y5=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Lt.NONE,this._blendEq=!1,this.map=[],this.map[vze]=this.setBlend,this.map[yze]=this.setOffset,this.map[bze]=this.setCullFace,this.map[xze]=this.setDepthTest,this.map[wze]=this.setFrontFace,this.map[_ze]=this.setDepthMask,this.checks=[],this.defaultState=new Zc,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=mze(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 SE=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=SE.defaultMaxIdle,this.checkCountMax=SE.defaultCheckCountMax,this.mode=SE.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==nU.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 dl=SE;dl.defaultMode=nU.AUTO;dl.defaultMaxIdle=60*60;dl.defaultCheckCountMax=60*10;dl.extension={type:it.RendererSystem,name:"textureGC"};wt.add(dl);class QB{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=Mt.UNSIGNED_BYTE,this.internalFormat=Ve.RGBA,this.samplerType=0}}function Eze(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Mt.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA8,[Ve.RGB]:e.RGB8,[Ve.RG]:e.RG8,[Ve.RED]:e.R8,[Ve.RGBA_INTEGER]:e.RGBA8UI,[Ve.RGB_INTEGER]:e.RGB8UI,[Ve.RG_INTEGER]:e.RG8UI,[Ve.RED_INTEGER]:e.R8UI,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Mt.BYTE]:{[Ve.RGBA]:e.RGBA8_SNORM,[Ve.RGB]:e.RGB8_SNORM,[Ve.RG]:e.RG8_SNORM,[Ve.RED]:e.R8_SNORM,[Ve.RGBA_INTEGER]:e.RGBA8I,[Ve.RGB_INTEGER]:e.RGB8I,[Ve.RG_INTEGER]:e.RG8I,[Ve.RED_INTEGER]:e.R8I},[Mt.UNSIGNED_SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16UI,[Ve.RGB_INTEGER]:e.RGB16UI,[Ve.RG_INTEGER]:e.RG16UI,[Ve.RED_INTEGER]:e.R16UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Mt.SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16I,[Ve.RGB_INTEGER]:e.RGB16I,[Ve.RG_INTEGER]:e.RG16I,[Ve.RED_INTEGER]:e.R16I},[Mt.UNSIGNED_INT]:{[Ve.RGBA_INTEGER]:e.RGBA32UI,[Ve.RGB_INTEGER]:e.RGB32UI,[Ve.RG_INTEGER]:e.RG32UI,[Ve.RED_INTEGER]:e.R32UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Mt.INT]:{[Ve.RGBA_INTEGER]:e.RGBA32I,[Ve.RGB_INTEGER]:e.RGB32I,[Ve.RG_INTEGER]:e.RG32I,[Ve.RED_INTEGER]:e.R32I},[Mt.FLOAT]:{[Ve.RGBA]:e.RGBA32F,[Ve.RGB]:e.RGB32F,[Ve.RG]:e.RG32F,[Ve.RED]:e.R32F,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Mt.HALF_FLOAT]:{[Ve.RGBA]:e.RGBA16F,[Ve.RGB]:e.RGB16F,[Ve.RG]:e.RG16F,[Ve.RED]:e.R16F},[Mt.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB565},[Mt.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA4},[Mt.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGB5_A1},[Mt.UNSIGNED_INT_2_10_10_10_REV]:{[Ve.RGBA]:e.RGB10_A2,[Ve.RGBA_INTEGER]:e.RGB10_A2UI},[Mt.UNSIGNED_INT_10F_11F_11F_REV]:{[Ve.RGB]:e.R11F_G11F_B10F},[Mt.UNSIGNED_INT_5_9_9_9_REV]:{[Ve.RGB]:e.RGB9_E5},[Mt.UNSIGNED_INT_24_8]:{[Ve.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Mt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ve.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Mt.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA,[Ve.RGB]:e.RGB,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Mt.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB},[Mt.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA},[Mt.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGBA}},t}class fre{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Vt,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=Eze(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!==Y3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new QB(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===Mt.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!==Y3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,a=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,a.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&&Sm(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===du.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Zf.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!==du.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===Ac.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Ac.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===Ac.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===Ac.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}fre.extension={type:it.RendererSystem,name:"texture"};wt.add(fre);class dre{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))(Yp||{});class JB{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 Os=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 JB(null,null,1/0),this.deltaMS=1/Os.targetFPMS,this.elapsedMS=1/Os.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=Yp.NORMAL){return this._addListener(new JB(e,t,n))}addOnce(e,t,n=Yp.NORMAL){return this._addListener(new JB(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?Si.shared:new Si,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}hre.extension=it.Application;wt.add(hre);const pre=[];wt.handleByList(it.Renderer,pre);function Cze(e){for(const t of pre)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Tze=`attribute vec2 aVertexPosition; +`))}}let gze=0;const xS={textureCount:0,uboCount:0};class cre{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=gze++}systemCheck(){if(!z4e())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||(xS.textureCount=0,xS.uboCount=0,this.syncUniformGroup(t.uniformGroup,xS)),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]=D4e(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,xS,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 a=this._uboCache[s];if(a||(a=this._uboCache[s]=pze(t,this.shader.program.uniformData)),t.autoManage){const u=new Float32Array(a.size/4);t.buffer.update(u)}return n.uniformGroups[t.id]=a.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=uze(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}}cre.extension={type:it.RendererSystem,name:"shader"};wt.add(cre);class II{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(){}}II.defaultOptions={hello:!1};II.extension={type:[it.RendererSystem,it.CanvasRendererSystem],name:"startup"};wt.add(II);function mze(e,t=[]){return t[Dt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.ADD]=[e.ONE,e.ONE],t[Dt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.NONE]=[0,0],t[Dt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Dt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Dt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Dt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Dt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Dt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Dt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Dt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Dt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Dt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Dt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const vze=0,yze=1,bze=2,xze=3,wze=4,_ze=5,b5=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Dt.NONE,this._blendEq=!1,this.map=[],this.map[vze]=this.setBlend,this.map[yze]=this.setOffset,this.map[bze]=this.setCullFace,this.map[xze]=this.setDepthTest,this.map[wze]=this.setFrontFace,this.map[_ze]=this.setDepthMask,this.checks=[],this.defaultState=new Zc,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=mze(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 EE=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=EE.defaultMaxIdle,this.checkCountMax=EE.defaultCheckCountMax,this.mode=EE.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==rU.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 dl=EE;dl.defaultMode=rU.AUTO;dl.defaultMaxIdle=60*60;dl.defaultCheckCountMax=60*10;dl.extension={type:it.RendererSystem,name:"textureGC"};wt.add(dl);class QB{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=Mt.UNSIGNED_BYTE,this.internalFormat=Ve.RGBA,this.samplerType=0}}function Eze(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Mt.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA8,[Ve.RGB]:e.RGB8,[Ve.RG]:e.RG8,[Ve.RED]:e.R8,[Ve.RGBA_INTEGER]:e.RGBA8UI,[Ve.RGB_INTEGER]:e.RGB8UI,[Ve.RG_INTEGER]:e.RG8UI,[Ve.RED_INTEGER]:e.R8UI,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Mt.BYTE]:{[Ve.RGBA]:e.RGBA8_SNORM,[Ve.RGB]:e.RGB8_SNORM,[Ve.RG]:e.RG8_SNORM,[Ve.RED]:e.R8_SNORM,[Ve.RGBA_INTEGER]:e.RGBA8I,[Ve.RGB_INTEGER]:e.RGB8I,[Ve.RG_INTEGER]:e.RG8I,[Ve.RED_INTEGER]:e.R8I},[Mt.UNSIGNED_SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16UI,[Ve.RGB_INTEGER]:e.RGB16UI,[Ve.RG_INTEGER]:e.RG16UI,[Ve.RED_INTEGER]:e.R16UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Mt.SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16I,[Ve.RGB_INTEGER]:e.RGB16I,[Ve.RG_INTEGER]:e.RG16I,[Ve.RED_INTEGER]:e.R16I},[Mt.UNSIGNED_INT]:{[Ve.RGBA_INTEGER]:e.RGBA32UI,[Ve.RGB_INTEGER]:e.RGB32UI,[Ve.RG_INTEGER]:e.RG32UI,[Ve.RED_INTEGER]:e.R32UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Mt.INT]:{[Ve.RGBA_INTEGER]:e.RGBA32I,[Ve.RGB_INTEGER]:e.RGB32I,[Ve.RG_INTEGER]:e.RG32I,[Ve.RED_INTEGER]:e.R32I},[Mt.FLOAT]:{[Ve.RGBA]:e.RGBA32F,[Ve.RGB]:e.RGB32F,[Ve.RG]:e.RG32F,[Ve.RED]:e.R32F,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Mt.HALF_FLOAT]:{[Ve.RGBA]:e.RGBA16F,[Ve.RGB]:e.RGB16F,[Ve.RG]:e.RG16F,[Ve.RED]:e.R16F},[Mt.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB565},[Mt.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA4},[Mt.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGB5_A1},[Mt.UNSIGNED_INT_2_10_10_10_REV]:{[Ve.RGBA]:e.RGB10_A2,[Ve.RGBA_INTEGER]:e.RGB10_A2UI},[Mt.UNSIGNED_INT_10F_11F_11F_REV]:{[Ve.RGB]:e.R11F_G11F_B10F},[Mt.UNSIGNED_INT_5_9_9_9_REV]:{[Ve.RGB]:e.RGB9_E5},[Mt.UNSIGNED_INT_24_8]:{[Ve.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Mt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ve.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Mt.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA,[Ve.RGB]:e.RGB,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Mt.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB},[Mt.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA},[Mt.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGBA}},t}class dre{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Vt,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=Eze(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!==K3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new QB(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===Mt.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!==K3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,a=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,a.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&&Sm(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===du.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Zf.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!==du.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===Ac.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Ac.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===Ac.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===Ac.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}dre.extension={type:it.RendererSystem,name:"texture"};wt.add(dre);class hre{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))(Yp||{});class JB{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 Os=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 JB(null,null,1/0),this.deltaMS=1/Os.targetFPMS,this.elapsedMS=1/Os.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=Yp.NORMAL){return this._addListener(new JB(e,t,n))}addOnce(e,t,n=Yp.NORMAL){return this._addListener(new JB(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?Si.shared:new Si,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}pre.extension=it.Application;wt.add(pre);const gre=[];wt.handleByList(it.Renderer,gre);function Cze(e){for(const t of gre)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Tze=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -1209,7 +1209,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const Ize=Tze,gre=Aze;class mre{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>=ri.HIGH?this.multisample=ri.HIGH:n>=ri.MEDIUM?this.multisample=ri.MEDIUM:n>=ri.LOW?this.multisample=ri.LOW:this.multisample=ri.NONE}destroy(){}}mre.extension={type:it.RendererSystem,name:"_multisample"};wt.add(mre);class Rze{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class vre{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 Pze extends bre{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:a}=t;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let u=0;u0)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 nt.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===kl.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??nt.ADAPTER.createCanvas(0,0),sm._EMPTY}}const EE=class extends ld{constructor(e,t){t=t||{},super(nt.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)},EE.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;ld.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_${qp()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=EE.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"&&EE.SVG_XML.test(e)}};let Zx=EE;Zx.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const x5=class extends ld{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];ld.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&&(Si.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Si.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&&(Si.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?(Si.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Si.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||x5.TYPES.includes(t)}};let mU=x5;mU.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];mU.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};h5.push(sm,Vne,Oze,mU,Zx,Ww,xre,Pze);class eT{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?Jt.EMPTY:(t=t||new Jt(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:a,ty:u}=t,c=r*n.x+o*n.y+a,d=i*n.x+s*n.y+u;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],a=t[1];n=si?s:i,o=a>o?a:o,s=t[2],a=t[3],n=si?s:i,o=a>o?a:o,s=t[4],a=t[5],n=si?s:i,o=a>o?a:o,s=t[6],a=t[7],n=si?s:i,o=a>o?a: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,a=t.b,u=t.c,c=t.d,d=t.tx,h=t.ty;let p=this.minX,m=this.minY,v=this.maxX,y=this.maxY,S=s*n+u*r+d,w=a*n+c*r+h;p=Sv?S:v,y=w>y?w:y,S=s*i+u*r+d,w=a*i+c*r+h,p=Sv?S:v,y=w>y?w:y,S=s*n+u*o+d,w=a*n+c*o+h,p=Sv?S:v,y=w>y?w:y,S=s*i+u*o+d,w=a*i+c*o+h,p=Sv?S:v,y=w>y?w:y,this.minX=p,this.minY=m,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,a=this.maxY;for(let u=n;us?c:s,a=d>a?d:a}this.minX=i,this.minY=o,this.maxX=s,this.maxY=a}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const a=t.a,u=t.b,c=t.c,d=t.d,h=t.tx,p=t.ty;let m=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let w=r;wi?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.maxXc?o:c,this.maxY=s>d?s:d}}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.maxXc?o:c,this.maxY=s>d?s:d}}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 jr extends jw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new gU,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 eT,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);Sm(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(Dze),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!==w5.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=kze.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?Lze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ee=(e,t,n)=>(Nze(e,typeof t!="symbol"?t+"":t,n),n);let La=class{constructor(t){Ee(this,"parent"),Ee(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 Bze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wre={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,a){return s*i/a+o},easeInQuad:function(i,o,s,a){return s*(i/=a)*i+o},easeOutQuad:function(i,o,s,a){return-s*(i/=a)*(i-2)+o},easeInOutQuad:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,a){return s*(i/=a)*i*i+o},easeOutCubic:function(i,o,s,a){return s*((i=i/a-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,a){return s*(i/=a)*i*i*i+o},easeOutQuart:function(i,o,s,a){return-s*((i=i/a-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,a){return s*(i/=a)*i*i*i*i+o},easeOutQuint:function(i,o,s,a){return s*((i=i/a-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,a){return(i/=a/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,a){return-s*Math.cos(i/a*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,a){return s*Math.sin(i/a*(Math.PI/2))+o},easeInOutSine:function(i,o,s,a){return-s/2*(Math.cos(Math.PI*i/a)-1)+o},easeInExpo:function(i,o,s,a){return i===0?o:s*Math.pow(2,10*(i/a-1))+o},easeOutExpo:function(i,o,s,a){return i===a?o+s:s*(-Math.pow(2,-10*i/a)+1)+o},easeInOutExpo:function(i,o,s,a){return(i/=a/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,a){return-s*(Math.sqrt(1-(i/=a)*i)-1)+o},easeOutCirc:function(i,o,s,a){return s*Math.sqrt(1-(i=i/a-1)*i)+o},easeInOutCirc:function(i,o,s,a){return(i/=a/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,a){var u,c,d;return d=1.70158,c=0,u=s,i===0||(i/=a),c||(c=a*.3),u=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,a=this.deltaY,u=new Dt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+a*r),this.parent.emit("moved",{viewport:this.parent,original:u,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const zze={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let Uze=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"underflowX"),Ee(this,"underflowY"),Ee(this,"ease"),Ee(this,"toX"),Ee(this,"toY"),this.options=Object.assign({},zze,n),this.ease=PI(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 Dt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Dt(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 Dt(0,0),bottomRight:new Dt(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 a=r.topLeft,u=r.bottomRight;if(!this.toX&&!i.x){let c=null;r.left&&this.left?c=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 Wze={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let Gze=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),this.options=Object.assign({},Wze,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 Vze={friction:.98,bounce:.8,minSpeed:.01},lf=16;let Xze=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percentChangeX"),Ee(this,"percentChangeY"),Ee(this,"saved"),Ee(this,"timeSinceRelease"),this.options=Object.assign({},Vze,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*lf/s*(Math.pow(o,i/lf)-Math.pow(o,r/lf)),this.x*=Math.pow(this.percentChangeX,t/lf)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*lf/s*(Math.pow(o,i/lf)-Math.pow(o,r/lf)),this.y*=Math.pow(this.percentChangeY,t/lf)}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 a={x:n,y:r};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new Dt(this.last.x,this.last.y),world:this.parent.toWorld(new Dt(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 Dt(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 Kze={speed:0,acceleration:null,radius:null};let Qze=class extends La{constructor(t,n,r={}){super(t),Ee(this,"options"),Ee(this,"target"),Ee(this,"velocity"),this.target=n,this.options=Object.assign({},Kze,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 a=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(a)*this.options.radius,i=this.target.y-Math.sin(a)*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 a=Math.atan2(i-n.y,r-n.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(u){const c=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);u>c?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 d=Math.cos(a)*this.velocity.x,h=Math.sin(a)*this.velocity.y,p=Math.abs(d)>Math.abs(o)?r:n.x+d,m=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,m),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const a=Math.atan2(i-n.y,r-n.x),u=Math.cos(a)*this.options.speed,c=Math.sin(a)*this.options.speed,d=Math.abs(u)>Math.abs(o)?r:n.x+u,h=Math.abs(c)>Math.abs(s)?i:n.y+c;this.parent.moveCenter(d,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 Jze={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Zze=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"reverse"),Ee(this,"radiusSquared"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"horizontal"),Ee(this,"vertical"),this.options=Object.assign({},Jze,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 e6e={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let t6e=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"active",!1),Ee(this,"pinching",!1),Ee(this,"moved",!1),Ee(this,"lastCenter"),this.options=Object.assign({},e6e,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],a=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}),a){let u;const c=new Dt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(u=this.parent.toLocal(c));let d=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));d=d===0?d=1e-10:d;const h=(1-a/d)*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:c});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const m=this.parent.toGlobal(u);this.parent.x+=(c.x-m.x)*this.options.factor,this.parent.y+=(c.y-m.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(c.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(c.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=c,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 n6e={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let r6e=class extends La{constructor(t,n,r,i={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percent"),Ee(this,"snapping"),Ee(this,"deltaX"),Ee(this,"deltaY"),Ee(this,"startX"),Ee(this,"startY"),this.options=Object.assign({},n6e,i),this.ease=PI(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,a=this.startY,u=this.deltaX,c=this.deltaY;if(n.time>this.options.time)r=!0,i=s+u,o=a+c;else{const d=this.ease(n.time,0,1,this.options.time);i=s+u*d,o=a+c*d}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 i6e={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let o6e=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"xScale"),Ee(this,"yScale"),Ee(this,"xIndependent"),Ee(this,"yIndependent"),Ee(this,"snapping"),this.options=Object.assign({},i6e,n),this.ease=PI(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),a=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/a}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 s6e={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let a6e=class extends La{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"smoothing"),Ee(this,"smoothingCenter"),Ee(this,"smoothingCount"),Ee(this,"keyIsPressed"),this.options=Object.assign({},s6e,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 a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.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 a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.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}},l6e=class{constructor(t){Ee(this,"viewport"),Ee(this,"clickedAvailable"),Ee(this,"isMouseDown"),Ee(this,"last"),Ee(this,"wheelFunction"),Ee(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Jt(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 Dt;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 Wb)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 c6e={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Si.shared,allowPreserveDragOutside:!1};class f6e extends us{constructor(t){super(),Ee(this,"moving"),Ee(this,"screenWidth"),Ee(this,"screenHeight"),Ee(this,"threshold"),Ee(this,"input"),Ee(this,"plugins"),Ee(this,"zooming"),Ee(this,"lastViewport"),Ee(this,"options"),Ee(this,"_dirty"),Ee(this,"_forceHitArea"),Ee(this,"_hitAreaDefault"),Ee(this,"_pause"),Ee(this,"tickerFunction"),Ee(this,"_worldWidth"),Ee(this,"_worldHeight"),Ee(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...c6e,...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 l6e(this),this.plugins=new u6e(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 Jt(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 Jt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Dt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Dt(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 Dt(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 Dt(-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 Dt(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 Jt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new Yze(this,t)),this}clamp(t){return this.plugins.add("clamp",new Hze(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new Xze(this,t)),this}bounce(t){return this.plugins.add("bounce",new Uze(this,t)),this}pinch(t){return this.plugins.add("pinch",new t6e(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new r6e(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new Qze(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new a6e(this,t)),this}animate(t){return this.plugins.add("animate",new Fze(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new Gze(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Zze(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 Gb=new Dt,d6e=new Uint16Array([0,1,2,0,2,3]);class ag extends us{constructor(t){super(),this._anchor=new Df(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 Vn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Lt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||pt.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=d6e,this.pluginName="batch",this.isSprite=!0,this._roundPixels=nt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=kf(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=kf(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,a=n.tx,u=n.ty,c=this.vertexData,d=t.trim,h=t.orig,p=this._anchor;let m=0,v=0,y=0,S=0;if(d?(v=d.x-p._x*h.width,m=v+d.width,S=d.y-p._y*h.height,y=S+d.height):(v=-p._x*h.width,m=v+h.width,S=-p._y*h.height,y=S+h.height),c[0]=r*v+o*S+a,c[1]=s*S+i*v+u,c[2]=r*m+o*S+a,c[3]=s*S+i*m+u,c[4]=r*m+o*y+a,c[5]=s*y+i*m+u,c[6]=r*v+o*y+a,c[7]=s*y+i*v+u,this._roundPixels){const w=nt.RESOLUTION;for(let b=0;b=i&&Gb.x=o&&Gb.y=ri.HIGH?this.multisample=ri.HIGH:n>=ri.MEDIUM?this.multisample=ri.MEDIUM:n>=ri.LOW?this.multisample=ri.LOW:this.multisample=ri.NONE}destroy(){}}vre.extension={type:it.RendererSystem,name:"_multisample"};wt.add(vre);class Rze{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class yre{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 Pze extends xre{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:a}=t;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let u=0;u0)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 nt.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===kl.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??nt.ADAPTER.createCanvas(0,0),sm._EMPTY}}const CE=class extends ld{constructor(e,t){t=t||{},super(nt.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)},CE.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;ld.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_${qp()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=CE.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"&&CE.SVG_XML.test(e)}};let ew=CE;ew.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const w5=class extends ld{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];ld.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&&(Si.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Si.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&&(Si.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?(Si.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Si.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||w5.TYPES.includes(t)}};let vU=w5;vU.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];vU.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};p5.push(sm,Xne,Oze,vU,ew,Gw,wre,Pze);class eT{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?Jt.EMPTY:(t=t||new Jt(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:a,ty:u}=t,c=r*n.x+o*n.y+a,d=i*n.x+s*n.y+u;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],a=t[1];n=si?s:i,o=a>o?a:o,s=t[2],a=t[3],n=si?s:i,o=a>o?a:o,s=t[4],a=t[5],n=si?s:i,o=a>o?a:o,s=t[6],a=t[7],n=si?s:i,o=a>o?a: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,a=t.b,u=t.c,c=t.d,d=t.tx,h=t.ty;let p=this.minX,m=this.minY,v=this.maxX,y=this.maxY,S=s*n+u*r+d,w=a*n+c*r+h;p=Sv?S:v,y=w>y?w:y,S=s*i+u*r+d,w=a*i+c*r+h,p=Sv?S:v,y=w>y?w:y,S=s*n+u*o+d,w=a*n+c*o+h,p=Sv?S:v,y=w>y?w:y,S=s*i+u*o+d,w=a*i+c*o+h,p=Sv?S:v,y=w>y?w:y,this.minX=p,this.minY=m,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,a=this.maxY;for(let u=n;us?c:s,a=d>a?d:a}this.minX=i,this.minY=o,this.maxX=s,this.maxY=a}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const a=t.a,u=t.b,c=t.c,d=t.d,h=t.tx,p=t.ty;let m=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let w=r;wi?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.maxXc?o:c,this.maxY=s>d?s:d}}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.maxXc?o:c,this.maxY=s>d?s:d}}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 jr extends Hw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new mU,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 eT,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);Sm(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(Lze),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!==_5.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=kze.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?Dze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ee=(e,t,n)=>(Nze(e,typeof t!="symbol"?t+"":t,n),n);let Da=class{constructor(t){Ee(this,"parent"),Ee(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 Bze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_re={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,a){return s*i/a+o},easeInQuad:function(i,o,s,a){return s*(i/=a)*i+o},easeOutQuad:function(i,o,s,a){return-s*(i/=a)*(i-2)+o},easeInOutQuad:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,a){return s*(i/=a)*i*i+o},easeOutCubic:function(i,o,s,a){return s*((i=i/a-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,a){return s*(i/=a)*i*i*i+o},easeOutQuart:function(i,o,s,a){return-s*((i=i/a-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,a){return s*(i/=a)*i*i*i*i+o},easeOutQuint:function(i,o,s,a){return s*((i=i/a-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,a){return(i/=a/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,a){return-s*Math.cos(i/a*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,a){return s*Math.sin(i/a*(Math.PI/2))+o},easeInOutSine:function(i,o,s,a){return-s/2*(Math.cos(Math.PI*i/a)-1)+o},easeInExpo:function(i,o,s,a){return i===0?o:s*Math.pow(2,10*(i/a-1))+o},easeOutExpo:function(i,o,s,a){return i===a?o+s:s*(-Math.pow(2,-10*i/a)+1)+o},easeInOutExpo:function(i,o,s,a){return(i/=a/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,a){return-s*(Math.sqrt(1-(i/=a)*i)-1)+o},easeOutCirc:function(i,o,s,a){return s*Math.sqrt(1-(i=i/a-1)*i)+o},easeInOutCirc:function(i,o,s,a){return(i/=a/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,a){var u,c,d;return d=1.70158,c=0,u=s,i===0||(i/=a),c||(c=a*.3),u=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,a=this.deltaY,u=new Lt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+a*r),this.parent.emit("moved",{viewport:this.parent,original:u,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const zze={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let Uze=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"underflowX"),Ee(this,"underflowY"),Ee(this,"ease"),Ee(this,"toX"),Ee(this,"toY"),this.options=Object.assign({},zze,n),this.ease=PI(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 Lt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Lt(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 Lt(0,0),bottomRight:new Lt(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 a=r.topLeft,u=r.bottomRight;if(!this.toX&&!i.x){let c=null;r.left&&this.left?c=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 Wze={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let Gze=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),this.options=Object.assign({},Wze,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 Vze={friction:.98,bounce:.8,minSpeed:.01},lf=16;let Xze=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percentChangeX"),Ee(this,"percentChangeY"),Ee(this,"saved"),Ee(this,"timeSinceRelease"),this.options=Object.assign({},Vze,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*lf/s*(Math.pow(o,i/lf)-Math.pow(o,r/lf)),this.x*=Math.pow(this.percentChangeX,t/lf)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*lf/s*(Math.pow(o,i/lf)-Math.pow(o,r/lf)),this.y*=Math.pow(this.percentChangeY,t/lf)}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 a={x:n,y:r};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new Lt(this.last.x,this.last.y),world:this.parent.toWorld(new Lt(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 Lt(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 Kze={speed:0,acceleration:null,radius:null};let Qze=class extends Da{constructor(t,n,r={}){super(t),Ee(this,"options"),Ee(this,"target"),Ee(this,"velocity"),this.target=n,this.options=Object.assign({},Kze,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 a=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(a)*this.options.radius,i=this.target.y-Math.sin(a)*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 a=Math.atan2(i-n.y,r-n.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(u){const c=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);u>c?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 d=Math.cos(a)*this.velocity.x,h=Math.sin(a)*this.velocity.y,p=Math.abs(d)>Math.abs(o)?r:n.x+d,m=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,m),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const a=Math.atan2(i-n.y,r-n.x),u=Math.cos(a)*this.options.speed,c=Math.sin(a)*this.options.speed,d=Math.abs(u)>Math.abs(o)?r:n.x+u,h=Math.abs(c)>Math.abs(s)?i:n.y+c;this.parent.moveCenter(d,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 Jze={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Zze=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"reverse"),Ee(this,"radiusSquared"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"horizontal"),Ee(this,"vertical"),this.options=Object.assign({},Jze,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 e6e={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let t6e=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"active",!1),Ee(this,"pinching",!1),Ee(this,"moved",!1),Ee(this,"lastCenter"),this.options=Object.assign({},e6e,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],a=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}),a){let u;const c=new Lt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(u=this.parent.toLocal(c));let d=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));d=d===0?d=1e-10:d;const h=(1-a/d)*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:c});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const m=this.parent.toGlobal(u);this.parent.x+=(c.x-m.x)*this.options.factor,this.parent.y+=(c.y-m.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(c.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(c.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=c,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 n6e={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let r6e=class extends Da{constructor(t,n,r,i={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percent"),Ee(this,"snapping"),Ee(this,"deltaX"),Ee(this,"deltaY"),Ee(this,"startX"),Ee(this,"startY"),this.options=Object.assign({},n6e,i),this.ease=PI(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,a=this.startY,u=this.deltaX,c=this.deltaY;if(n.time>this.options.time)r=!0,i=s+u,o=a+c;else{const d=this.ease(n.time,0,1,this.options.time);i=s+u*d,o=a+c*d}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 i6e={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let o6e=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"xScale"),Ee(this,"yScale"),Ee(this,"xIndependent"),Ee(this,"yIndependent"),Ee(this,"snapping"),this.options=Object.assign({},i6e,n),this.ease=PI(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),a=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/a}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 s6e={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let a6e=class extends Da{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"smoothing"),Ee(this,"smoothingCenter"),Ee(this,"smoothingCount"),Ee(this,"keyIsPressed"),this.options=Object.assign({},s6e,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 a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.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 a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.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}},l6e=class{constructor(t){Ee(this,"viewport"),Ee(this,"clickedAvailable"),Ee(this,"isMouseDown"),Ee(this,"last"),Ee(this,"wheelFunction"),Ee(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Jt(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 Lt;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 Wb)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 c6e={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Si.shared,allowPreserveDragOutside:!1};class f6e extends us{constructor(t){super(),Ee(this,"moving"),Ee(this,"screenWidth"),Ee(this,"screenHeight"),Ee(this,"threshold"),Ee(this,"input"),Ee(this,"plugins"),Ee(this,"zooming"),Ee(this,"lastViewport"),Ee(this,"options"),Ee(this,"_dirty"),Ee(this,"_forceHitArea"),Ee(this,"_hitAreaDefault"),Ee(this,"_pause"),Ee(this,"tickerFunction"),Ee(this,"_worldWidth"),Ee(this,"_worldHeight"),Ee(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...c6e,...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 l6e(this),this.plugins=new u6e(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 Jt(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 Jt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Lt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Lt(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 Lt(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 Lt(-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 Lt(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 Jt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new Yze(this,t)),this}clamp(t){return this.plugins.add("clamp",new Hze(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new Xze(this,t)),this}bounce(t){return this.plugins.add("bounce",new Uze(this,t)),this}pinch(t){return this.plugins.add("pinch",new t6e(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new r6e(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new Qze(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new a6e(this,t)),this}animate(t){return this.plugins.add("animate",new Fze(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new Gze(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Zze(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 Gb=new Lt,d6e=new Uint16Array([0,1,2,0,2,3]);class ag extends us{constructor(t){super(),this._anchor=new Lf(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 Vn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Dt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||pt.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=d6e,this.pluginName="batch",this.isSprite=!0,this._roundPixels=nt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=kf(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=kf(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,a=n.tx,u=n.ty,c=this.vertexData,d=t.trim,h=t.orig,p=this._anchor;let m=0,v=0,y=0,S=0;if(d?(v=d.x-p._x*h.width,m=v+d.width,S=d.y-p._y*h.height,y=S+d.height):(v=-p._x*h.width,m=v+h.width,S=-p._y*h.height,y=S+h.height),c[0]=r*v+o*S+a,c[1]=s*S+i*v+u,c[2]=r*m+o*S+a,c[3]=s*S+i*m+u,c[4]=r*m+o*y+a,c[5]=s*y+i*m+u,c[6]=r*v+o*y+a,c[7]=s*y+i*v+u,this._roundPixels){const w=nt.RESOLUTION;for(let b=0;b=i&&Gb.x=o&&Gb.y{Object.defineProperty(eV,e,{get(){return dn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class O6e{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||(Si.system.add(this.tickerUpdate,this,Yp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Si.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=d[h],m=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(m){if(m.length>0&&!m[m.length-1].parent)continue;const v=t.isInteractive();(m.length>0||v)&&(v&&this._allInteractiveElements.push(t),m.push(t)),this._hitElements.length===0&&(this._hitElements=m),a=!0}}}const u=this._isInteractive(n),c=t.isInteractive();return c&&c&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:a?this._hitElements:u&&!o(t,r)&&i(t,r)?c?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(Sf.pauseUpdate=!1),t.interactiveChildren&&t.children){const u=t.children;for(let c=u.length-1;c>=0;c--){const d=u[c],h=this.hitTestRecursive(d,this._isInteractive(n)?n:d.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),a=t.isInteractive();return s&&i(t,r)?a?[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,ZB),!t.hitArea.contains(ZB.x,ZB.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 rl)){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 u,c;if(!(t instanceof rl)){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(((u=i.overTargets)==null?void 0:u.length)>0&&o!==n.target){const d=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,d,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 d=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,d);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=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),a&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),a&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),a&&s.push("globalmousemove"),this.cursor=(c=n.target)==null?void 0:c.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 rl)){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 rl)){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 rl)){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 a=r.button===2;this.dispatchEvent(r,a?"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 a=o;for(;a&&!r.composedPath().includes(a);){if(r.currentTarget=a,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const u=r.button===2;this.notifyTarget(r,u?"rightupoutside":"mouseupoutside")}a=a.parent}delete i.pressTargetsByButton[t.button],s=a}if(s){const a=this.clonePointerEvent(r,"click");a.target=s,a.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:n});const u=i.clicksByButton[t.button];if(u.target===a.target&&n-u.timeStamp<200?++u.clickCount:u.clickCount=1,u.target=a.target,u.timeStamp=n,a.detail=u.clickCount,a.pointerType==="mouse"){const c=a.button===2;this.dispatchEvent(a,c?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof rl)){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 ov)){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,E5._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=L6e),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=N6e[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 ew=E5;ew.extension={name:"events",type:[it.RendererSystem,it.CanvasRendererSystem]};ew.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};wt.add(ew);function tV(e){return e==="dynamic"||e==="static"}const B6e={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??tV(ew.defaultEventMode)},set interactive(e){dn("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??ew.defaultEventMode},set eventMode(e){this._internalInteractive=tV(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 Gw))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}};jr.mixin(B6e);const $6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};jr.mixin($6e);const F6e=9,xS=100,z6e=0,U6e=0,nV=2,rV=1,j6e=-1e3,H6e=-1e3,W6e=2;class Sre{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,(Ic.tablet||Ic.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${xS}px`,n.style.height=`${xS}px`,n.style.position="absolute",n.style.top=`${z6e}px`,n.style.left=`${U6e}px`,n.style.zIndex=nV.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=`${rV}px`,t.style.height=`${rV}px`,t.style.position="absolute",t.style.top=`${j6e}px`,t.style.left=`${H6e}px`,t.style.zIndex=W6e.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=`${xS}px`,n.style.height=`${xS}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=nV.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 Gw(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===F6e&&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}}Sre.extension={name:"accessibility",type:[it.RendererPlugin,it.CanvasRendererPlugin]};wt.add(Sre);const C5=class{constructor(e){this.stage=new us,e=Object.assign({forceCanvas:!1},e),this.renderer=Cze(e),C5._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=C5._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 vU=C5;vU._plugins=[];wt.handleByList(it.Application,vU._plugins);class Ere{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}}Ere.extension=it.Application;wt.add(Ere);const iV={loader:it.LoadParser,resolver:it.ResolveParser,cache:it.CacheParser,detection:it.DetectionParser};wt.handle(it.Asset,e=>{const t=e.ref;Object.entries(iV).filter(([n])=>!!t[n]).forEach(([n,r])=>wt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(iV).filter(n=>!!t[n]).forEach(n=>wt.remove(t[n]))});class G6e{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),T5=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Cre(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)}),Cre(e,i,0,n,r)}else r.push(e);return r}const nT=e=>!Array.isArray(e);class X6e{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=Dc(t);let i;for(let a=0;a{i[a]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(a=>{this._cacheMap.set(a,s)}),o.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==n&&console.warn("[Cache] already has key:",a),this._cache.set(a,i[a])}),n instanceof pt){const a=n;r.forEach(u=>{a.baseTexture!==pt.EMPTY.baseTexture&&Vt.addToCache(a.baseTexture,u),pt.addToCache(a,u)})}}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 Vb=new X6e;class q6e{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,a;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 u=0;u({src:c})),a=s.length,u=s.map(async c=>{const d=vo.toAbsolute(c.src);if(!i[c.src])try{this.promiseCache[d]||(this.promiseCache[d]=this._getLoadPromiseAndParser(d,c)),i[c.src]=await this.promiseCache[d].promise,n&&n(++r/a)}catch(h){throw delete this.promiseCache[d],delete i[c.src],new Error(`[Loader.load] Failed to load ${d}. -${h}`)}});return await Promise.all(u),o?i[s[0].src]:i}async unload(t){const r=Dc(t,i=>({src:i})).map(async i=>{var a,u;const o=vo.toAbsolute(i.src),s=this.promiseCache[o];if(s){const c=await s.promise;(u=(a=s.parser)==null?void 0:a.unload)==null||u.call(a,c,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 bu=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(bu||{});const Y6e=".json",K6e="application/json",Q6e={extension:{type:it.LoadParser,priority:bu.Low},name:"loadJson",test(e){return Vw(e,K6e)||lg(e,Y6e)},async load(e){return await(await nt.ADAPTER.fetch(e)).json()}};wt.add(Q6e);const J6e=".txt",Z6e="text/plain",eUe={name:"loadTxt",extension:{type:it.LoadParser,priority:bu.Low},test(e){return Vw(e,Z6e)||lg(e,J6e)},async load(e){return await(await nt.ADAPTER.fetch(e)).text()}};wt.add(eUe);const tUe=["normal","bold","100","200","300","400","500","600","700","800","900"],nUe=[".ttf",".otf",".woff",".woff2"],rUe=["font/ttf","font/otf","font/woff","font/woff2"],iUe=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function oUe(e){const t=vo.extname(e),i=vo.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1));let o=i.length>0;for(const a of i)if(!a.match(iUe)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const sUe={extension:{type:it.LoadParser,priority:bu.Low},name:"loadWebFont",test(e){return Vw(e,rUe)||lg(e,nUe)},async load(e,t){var r,i,o;const n=nt.ADAPTER.getFontFaceSet();if(n){const s=[],a=((r=t.data)==null?void 0:r.family)??oUe(e),u=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(d=>tUe.includes(d)))??["normal"],c=t.data??{};for(let d=0;dnt.ADAPTER.getFontFaceSet().delete(t))}};wt.add(sUe);let oV=0,e$;const aUe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",lUe={id:"checkImageBitmap",code:` +`;class P6e extends eo{constructor(t=.5,n=Math.random()){super(mre,R6e,{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 tV={AlphaFilter:g6e,BlurFilter:w6e,BlurFilterPass:S5,ColorMatrixFilter:E5,DisplacementFilter:C6e,FXAAFilter:I6e,NoiseFilter:P6e};Object.entries(tV).forEach(([e,t])=>{Object.defineProperty(tV,e,{get(){return dn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class O6e{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||(Si.system.add(this.tickerUpdate,this,Yp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Si.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=d[h],m=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(m){if(m.length>0&&!m[m.length-1].parent)continue;const v=t.isInteractive();(m.length>0||v)&&(v&&this._allInteractiveElements.push(t),m.push(t)),this._hitElements.length===0&&(this._hitElements=m),a=!0}}}const u=this._isInteractive(n),c=t.isInteractive();return c&&c&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:a?this._hitElements:u&&!o(t,r)&&i(t,r)?c?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(Sf.pauseUpdate=!1),t.interactiveChildren&&t.children){const u=t.children;for(let c=u.length-1;c>=0;c--){const d=u[c],h=this.hitTestRecursive(d,this._isInteractive(n)?n:d.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),a=t.isInteractive();return s&&i(t,r)?a?[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,ZB),!t.hitArea.contains(ZB.x,ZB.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 rl)){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 u,c;if(!(t instanceof rl)){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(((u=i.overTargets)==null?void 0:u.length)>0&&o!==n.target){const d=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,d,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 d=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,d);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=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),a&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),a&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),a&&s.push("globalmousemove"),this.cursor=(c=n.target)==null?void 0:c.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 rl)){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 rl)){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 rl)){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 a=r.button===2;this.dispatchEvent(r,a?"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 a=o;for(;a&&!r.composedPath().includes(a);){if(r.currentTarget=a,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const u=r.button===2;this.notifyTarget(r,u?"rightupoutside":"mouseupoutside")}a=a.parent}delete i.pressTargetsByButton[t.button],s=a}if(s){const a=this.clonePointerEvent(r,"click");a.target=s,a.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:n});const u=i.clicksByButton[t.button];if(u.target===a.target&&n-u.timeStamp<200?++u.clickCount:u.clickCount=1,u.target=a.target,u.timeStamp=n,a.detail=u.clickCount,a.pointerType==="mouse"){const c=a.button===2;this.dispatchEvent(a,c?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof rl)){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 ov)){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,C5._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=D6e),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=N6e[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 tw=C5;tw.extension={name:"events",type:[it.RendererSystem,it.CanvasRendererSystem]};tw.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};wt.add(tw);function nV(e){return e==="dynamic"||e==="static"}const B6e={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??nV(tw.defaultEventMode)},set interactive(e){dn("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??tw.defaultEventMode},set eventMode(e){this._internalInteractive=nV(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 Vw))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}};jr.mixin(B6e);const $6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};jr.mixin($6e);const F6e=9,wS=100,z6e=0,U6e=0,rV=2,iV=1,j6e=-1e3,H6e=-1e3,W6e=2;class Ere{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,(Ic.tablet||Ic.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${wS}px`,n.style.height=`${wS}px`,n.style.position="absolute",n.style.top=`${z6e}px`,n.style.left=`${U6e}px`,n.style.zIndex=rV.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=`${iV}px`,t.style.height=`${iV}px`,t.style.position="absolute",t.style.top=`${j6e}px`,t.style.left=`${H6e}px`,t.style.zIndex=W6e.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=`${wS}px`,n.style.height=`${wS}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=rV.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 Vw(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===F6e&&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}}Ere.extension={name:"accessibility",type:[it.RendererPlugin,it.CanvasRendererPlugin]};wt.add(Ere);const T5=class{constructor(e){this.stage=new us,e=Object.assign({forceCanvas:!1},e),this.renderer=Cze(e),T5._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=T5._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 yU=T5;yU._plugins=[];wt.handleByList(it.Application,yU._plugins);class Cre{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}}Cre.extension=it.Application;wt.add(Cre);const oV={loader:it.LoadParser,resolver:it.ResolveParser,cache:it.CacheParser,detection:it.DetectionParser};wt.handle(it.Asset,e=>{const t=e.ref;Object.entries(oV).filter(([n])=>!!t[n]).forEach(([n,r])=>wt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(oV).filter(n=>!!t[n]).forEach(n=>wt.remove(t[n]))});class G6e{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),A5=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Tre(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)}),Tre(e,i,0,n,r)}else r.push(e);return r}const nT=e=>!Array.isArray(e);class X6e{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=Lc(t);let i;for(let a=0;a{i[a]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(a=>{this._cacheMap.set(a,s)}),o.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==n&&console.warn("[Cache] already has key:",a),this._cache.set(a,i[a])}),n instanceof pt){const a=n;r.forEach(u=>{a.baseTexture!==pt.EMPTY.baseTexture&&Vt.addToCache(a.baseTexture,u),pt.addToCache(a,u)})}}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 Vb=new X6e;class q6e{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,a;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 u=0;u({src:c})),a=s.length,u=s.map(async c=>{const d=vo.toAbsolute(c.src);if(!i[c.src])try{this.promiseCache[d]||(this.promiseCache[d]=this._getLoadPromiseAndParser(d,c)),i[c.src]=await this.promiseCache[d].promise,n&&n(++r/a)}catch(h){throw delete this.promiseCache[d],delete i[c.src],new Error(`[Loader.load] Failed to load ${d}. +${h}`)}});return await Promise.all(u),o?i[s[0].src]:i}async unload(t){const r=Lc(t,i=>({src:i})).map(async i=>{var a,u;const o=vo.toAbsolute(i.src),s=this.promiseCache[o];if(s){const c=await s.promise;(u=(a=s.parser)==null?void 0:a.unload)==null||u.call(a,c,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 bu=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(bu||{});const Y6e=".json",K6e="application/json",Q6e={extension:{type:it.LoadParser,priority:bu.Low},name:"loadJson",test(e){return Xw(e,K6e)||lg(e,Y6e)},async load(e){return await(await nt.ADAPTER.fetch(e)).json()}};wt.add(Q6e);const J6e=".txt",Z6e="text/plain",eUe={name:"loadTxt",extension:{type:it.LoadParser,priority:bu.Low},test(e){return Xw(e,Z6e)||lg(e,J6e)},async load(e){return await(await nt.ADAPTER.fetch(e)).text()}};wt.add(eUe);const tUe=["normal","bold","100","200","300","400","500","600","700","800","900"],nUe=[".ttf",".otf",".woff",".woff2"],rUe=["font/ttf","font/otf","font/woff","font/woff2"],iUe=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function oUe(e){const t=vo.extname(e),i=vo.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1));let o=i.length>0;for(const a of i)if(!a.match(iUe)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const sUe={extension:{type:it.LoadParser,priority:bu.Low},name:"loadWebFont",test(e){return Xw(e,rUe)||lg(e,nUe)},async load(e,t){var r,i,o;const n=nt.ADAPTER.getFontFaceSet();if(n){const s=[],a=((r=t.data)==null?void 0:r.family)??oUe(e),u=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(d=>tUe.includes(d)))??["normal"],c=t.data??{};for(let d=0;dnt.ADAPTER.getFontFaceSet().delete(t))}};wt.add(sUe);let sV=0,e$;const aUe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",lUe={id:"checkImageBitmap",code:` async function checkImageBitmap() { try @@ -1605,7 +1605,7 @@ ${h}`)}});return await Promise.all(u),o?i[s[0].src]:i}async unload(t){const r=Dc id: event.data.id, }); } - };`};let t$;class cUe{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([lUe.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(){e$===void 0&&(e$=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[oV]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:oV++,id:r})}}const sV=new cUe;function OI(e,t,n){const r=new pt(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const fUe=[".jpeg",".jpg",".png",".webp",".avif"],dUe=["image/jpeg","image/png","image/webp","image/avif"];async function hUe(e){const t=await nt.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 MI={name:"loadTextures",extension:{type:it.LoadParser,priority:bu.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Vw(e,dUe)||lg(e,fUe)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await sV.isImageBitmapSupported()?r=await sV.loadImageBitmap(e):r=await hUe(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 Vt(r,{resolution:sd(e),...t.data});return i.resource.src=e,OI(i,n,e)},unload(e){e.destroy(!0)}};wt.add(MI);const pUe=".svg",gUe="image/svg+xml",mUe={extension:{type:it.LoadParser,priority:bu.High},name:"loadSVG",test(e){return Vw(e,gUe)||lg(e,pUe)},async testParse(e){return Zx.test(e)},async parse(e,t,n){var s;const r=new Zx(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Vt(r,{resolution:sd(e),...t==null?void 0:t.data});return i.resource.src=e,OI(i,n,e)},async load(e,t){return(await nt.ADAPTER.fetch(e)).text()},unload:MI.unload};wt.add(mUe);class vUe{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=Dc(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=V6e(n):n=[n]);const o=n.map(s=>{let a=s;if(typeof s=="string"){let u=!1;for(let c=0;c{this._assetMap[s]=o})}resolveBundle(t){const n=nT(t);t=Dc(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),a={};for(const u in s){const c=s[u];a[this._extractAssetIdFromBundle(i,u)]=c}r[i]=a}}),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=nT(t);t=Dc(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),a=o[0];s==null||s.priority.forEach(u=>{s.params[u].forEach(c=>{const d=o.filter(h=>h[u]?h[u]===c:!1);d.length&&(o=d)})}),this._resolverHash[i]=o[0]??a}else{let o=i;(this._basePath||this._rootPath)&&(o=vo.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 yUe{constructor(){this._detections=[],this._initialized=!1,this.resolver=new vUe,this.loader=new q6e,this.cache=Vb,this._backgroundLoader=new G6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,a;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 u=t.manifest;typeof u=="string"&&(u=await this.load(u)),this.resolver.addManifest(u)}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 u=(a=t.texturePreference)==null?void 0:a.format;i=typeof u=="string"?[u]:u;for(const c of this._detections)await c.test()||(i=await c.remove(i))}else for(const u of this._detections)await u.test()&&(i=await u.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=nT(t),i=Dc(t).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),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 a=0,u=0;const c=()=>{n==null||n(++a/u)},d=s.map(h=>{const p=i[h];return u+=Object.keys(p).length,this._mapLoadToResolve(p,c).then(m=>{o[h]=m})});return await Promise.all(d),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 Vb.get(t);const n={};for(let r=0;r{const c=o[a.src],d=[a.src];a.alias&&d.push(...a.alias),s[i[u]]=c,Vb.set(d,c)}),s}async unload(t){this._initialized||await this.init();const n=Dc(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=Dc(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=>{Vb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return MI.config.preferWorkers}set preferWorkers(t){dn("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 wS=new yUe;wt.handleByList(it.LoadParser,wS.loader.parsers).handleByList(it.ResolveParser,wS.resolver.parsers).handleByList(it.CacheParser,wS.cache.parsers).handleByList(it.DetectionParser,wS.detections);const bUe={extension:it.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof pt),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};wt.add(bUe);const xUe={extension:{type:it.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await nt.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")};wt.add(xUe);const wUe={extension:{type:it.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await nt.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")};wt.add(wUe);const aV=["png","jpg","jpeg"],_Ue={extension:{type:it.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...aV],remove:async e=>e.filter(t=>!aV.includes(t))};wt.add(_Ue);const SUe={extension:it.ResolveParser,test:MI.test,parse:e=>{var t;return{resolution:parseFloat(((t=nt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(SUe);var Ms=(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))(Ms||{});const rT={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 vc,kg;function lV(){kg={s3tc:vc.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:vc.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:vc.getExtension("WEBGL_compressed_texture_etc"),etc1:vc.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:vc.getExtension("WEBGL_compressed_texture_pvrtc")||vc.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:vc.getExtension("WEBGL_compressed_texture_atc"),astc:vc.getExtension("WEBGL_compressed_texture_astc")}}const EUe={extension:{type:it.DetectionParser,priority:2},test:async()=>{const t=nt.ADAPTER.createCanvas().getContext("webgl");return t?(vc=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{kg||lV();const t=[];for(const n in kg)kg[n]&&t.push(n);return[...t,...e]},remove:async e=>(kg||lV(),e.filter(t=>!(t in kg)))};wt.add(EUe);class CUe extends Ww{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 d5(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 d5(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class Ip extends CUe{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=Ip._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||Ip._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,a=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,a){const u=new Array(r);let c=t.byteOffset,d=s,h=a,p=d+i-1&~(i-1),m=h+o-1&~(o-1),v=p*m*rT[n];for(let y=0;y1?d:p,levelHeight:r>1?h:m,levelBuffer:new Uint8Array(t.buffer,c,v)},c+=v,d=d>>1||1,h=h>>1||1,p=d+i-1&~(i-1),m=h+o-1&~(o-1),v=p*m*rT[n];return u}}const n$=4,_S=124,TUe=32,uV=20,AUe=542327876,SS={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},IUe={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},ES={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},RUe=1,PUe=2,OUe=4,MUe=64,kUe=512,DUe=131072,LUe=827611204,NUe=861165636,BUe=894720068,$Ue=808540228,FUe=4,zUe={[LUe]:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,[NUe]:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,[BUe]:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT},UUe={70:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function jUe(e){const t=new Uint32Array(e);if(t[0]!==AUe)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,_S/Uint32Array.BYTES_PER_ELEMENT),i=r[SS.HEIGHT],o=r[SS.WIDTH],s=r[SS.MIPMAP_COUNT],a=new Uint32Array(e,SS.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,TUe/Uint32Array.BYTES_PER_ELEMENT),u=a[RUe];if(u&OUe){const c=a[IUe.FOURCC];if(c!==$Ue){const x=zUe[c],E=n$+_S,A=new Uint8Array(e,E);return[new Ip(A,{format:x,width:o,height:i,levels:s})]}const d=n$+_S,h=new Uint32Array(t.buffer,d,uV/Uint32Array.BYTES_PER_ELEMENT),p=h[ES.DXGI_FORMAT],m=h[ES.RESOURCE_DIMENSION],v=h[ES.MISC_FLAG],y=h[ES.ARRAY_SIZE],S=UUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===FUe)throw new Error("DDSParser does not support cubemap textures");if(m===6)throw new Error("DDSParser does not supported 3D texture data");const w=new Array,b=n$+_S+uV;if(y===1)w.push(new Uint8Array(e,b));else{const x=rT[S];let E=0,A=o,I=i;for(let M=0;M>>1,I=I>>>1}let R=b;for(let M=0;Mnew Ip(x,{format:S,width:o,height:i,levels:s}))}throw u&MUe?new Error("DDSParser does not support uncompressed texture data."):u&kUe?new Error("DDSParser does not supported YUV uncompressed texture data."):u&DUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&PUe?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 cV=[171,75,84,88,32,49,49,187,13,10,26,10],HUe=67305985,el={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},A5=64,fV={[Mt.UNSIGNED_BYTE]:1,[Mt.UNSIGNED_SHORT]:2,[Mt.INT]:4,[Mt.UNSIGNED_INT]:4,[Mt.FLOAT]:4,[Mt.HALF_FLOAT]:8},WUe={[Ve.RGBA]:4,[Ve.RGB]:3,[Ve.RG]:2,[Ve.RED]:1,[Ve.LUMINANCE]:1,[Ve.LUMINANCE_ALPHA]:2,[Ve.ALPHA]:1},GUe={[Mt.UNSIGNED_SHORT_4_4_4_4]:2,[Mt.UNSIGNED_SHORT_5_5_5_1]:2,[Mt.UNSIGNED_SHORT_5_6_5]:2};function VUe(e,t,n=!1){const r=new DataView(t);if(!XUe(e,r))return null;const i=r.getUint32(el.ENDIANNESS,!0)===HUe,o=r.getUint32(el.GL_TYPE,i),s=r.getUint32(el.GL_FORMAT,i),a=r.getUint32(el.GL_INTERNAL_FORMAT,i),u=r.getUint32(el.PIXEL_WIDTH,i),c=r.getUint32(el.PIXEL_HEIGHT,i)||1,d=r.getUint32(el.PIXEL_DEPTH,i)||1,h=r.getUint32(el.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(el.NUMBER_OF_FACES,i),m=r.getUint32(el.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(el.BYTES_OF_KEY_VALUE_DATA,i);if(c===0||d!==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,w=u+3&-4,b=c+3&-4,x=new Array(h);let E=u*c;o===0&&(E=w*b);let A;if(o!==0?fV[o]?A=fV[o]*WUe[s]:A=GUe[o]:A=rT[a],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const I=n?YUe(r,v,i):null;let M=E*A,L=u,N=c,H=w,V=b,U=A5+v;for(let D=0;D1||o!==0?L:H,levelHeight:m>1||o!==0?N:V,levelBuffer:new Uint8Array(t,z,M)},z+=M}U+=F+4,U=U%4!==0?U+4-U%4:U,L=L>>1||1,N=N>>1||1,H=L+y-1&~(y-1),V=N+S-1&~(S-1),M=H*V*A}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,z=!1;return o===Mt.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===Mt.UNSIGNED_INT?(z=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===Mt.INT&&(z=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new Ww(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:z?qUe(s):s}}),kvData:I}:{compressed:x.map(D=>new Ip(null,{format:a,width:u,height:c,levels:m,levelBuffers:D})),kvData:I}}function XUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let u=0;for(;u{const u=new Vt(a,{mipmap:du.OFF,alphaMode:kl.NO_PREMULTIPLIED_ALPHA,resolution:sd(e),...t.data});return OI(u,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(KUe);const QUe={extension:{type:it.LoadParser,priority:bu.High},name:"loadKTX",test(e){return lg(e,".ktx")},async load(e,t,n){const i=await(await nt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:a}=VUe(e,i),u=o??s,c={mipmap:du.OFF,alphaMode:kl.NO_PREMULTIPLIED_ALPHA,resolution:sd(e),...t.data},d=u.map(h=>{u===s&&Object.assign(c,{type:h.type,format:h.format});const p=new Vt(h,c);return p.ktxKeyValueData=a,OI(p,n,e)});return d.length===1?d[0]:d},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(QUe);const JUe={extension:it.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=nt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=nt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(JUe);const ZUe=new Jt,eje=4,p1=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 a=new FileReader;a.onload=()=>i(a.result),a.onerror=o,a.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 a=new FileReader;a.onload=()=>o(a.result),a.onerror=s,a.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&&p1._flipY(n,r,i),p1._unpremultiplyAlpha(n);const s=new g4e(r,i,1),a=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(a,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&p1._flipY(n,r,i),p1._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 sg?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=ZUe,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const a=Math.round(t.width*r),u=Math.round(t.height*r),c=new Uint8Array(eje*a*u),d=n.gl;return d.readPixels(Math.round(t.x*r),Math.round(t.y*r),a,u,d.RGBA,d.UNSIGNED_BYTE,c),s&&(o==null||o.destroy(!0)),{pixels:c,width:a,height:u,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&&a>=0&&i>=0&&o>=0)){t.length=0;return}const u=Math.ceil(2.3*Math.sqrt(s+a)),c=u*8+(i?4:0)+(o?4:0);if(t.length=c,c===0)return;if(u===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 d=0,h=u*4+(i?2:0)+2,p=h,m=c;{const v=i+s,y=o,S=n+v,w=n-v,b=r+y;if(t[d++]=S,t[d++]=b,t[--h]=b,t[--h]=w,o){const x=r-y;t[p++]=w,t[p++]=x,t[--m]=x,t[--m]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){dV(n,!1);const s=[];for(let c=0;c=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)}},nje={build(e){iT.build(e)},triangulate(e,t){iT.triangulate(e,t)}};var al=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(al||{}),mp=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(mp||{});const sv={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 hV{static curveTo(t,n,r,i,o,s){const a=s[s.length-2],c=s[s.length-1]-n,d=a-t,h=i-n,p=r-t,m=Math.abs(c*p-d*h);if(m<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=c*c+d*d,y=h*h+p*p,S=c*h+d*p,w=o*Math.sqrt(v)/m,b=o*Math.sqrt(y)/m,x=w*S/v,E=b*S/y,A=w*p+b*d,I=w*h+b*c,R=d*(b+x),M=c*(b+x),L=p*(w+E),N=h*(w+E),H=Math.atan2(M-I,R-A),V=Math.atan2(N-I,L-A);return{cx:A+t,cy:I+n,radius:o,startAngle:H,endAngle:V,anticlockwise:d*h>p*c}}static arc(t,n,r,i,o,s,a,u,c){const d=a-s,h=sv._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/ZC)*40),p=d/(h*2),m=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,w=S%1/S;for(let b=0;b<=S;++b){const x=b+w*b,E=p+s+m*x,A=Math.cos(E),I=-Math.sin(E);c.push((v*A+y*I)*o+r,(v*-I+y*A)*o+i)}}}class rje{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 yU{static curveLength(t,n,r,i,o,s,a,u){let d=0,h=0,p=0,m=0,v=0,y=0,S=0,w=0,b=0,x=0,E=0,A=t,I=n;for(let R=1;R<=10;++R)h=R/10,p=h*h,m=p*h,v=1-h,y=v*v,S=y*v,w=S*t+3*y*h*r+3*v*p*o+m*a,b=S*n+3*y*h*i+3*v*p*s+m*u,x=A-w,E=I-b,A=w,I=b,d+=Math.sqrt(x*x+E*E);return d}static curveTo(t,n,r,i,o,s,a){const u=a[a.length-2],c=a[a.length-1];a.length-=2;const d=sv._segmentsCount(yU.curveLength(u,c,t,n,r,i,o,s));let h=0,p=0,m=0,v=0,y=0;a.push(u,c);for(let S=1,w=0;S<=d;++S)w=S/d,h=1-w,p=h*h,m=p*h,v=w*w,y=v*w,a.push(m*u+3*p*w*t+3*h*v*r+y*o,m*c+3*p*w*n+3*h*v*i+y*s)}}function pV(e,t,n,r,i,o,s,a){const u=e-n*i,c=t-r*i,d=e+n*o,h=t+r*o;let p,m;s?(p=r,m=-n):(p=-r,m=n);const v=u+p,y=c+m,S=d+p,w=h+m;return a.push(v,y,S,w),2}function Wh(e,t,n,r,i,o,s,a){const u=n-e,c=r-t;let d=Math.atan2(u,c),h=Math.atan2(i-e,o-t);a&&dh&&(h+=Math.PI*2);let p=d;const m=h-d,v=Math.abs(m),y=Math.sqrt(u*u+c*c),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,w=m/S;if(p+=w,a){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===al.ROUND?p+=Wh(x,E,x-R*U,E-M*U,x-L*U,E-N*U,d,!1)+4:p+=2,d.push(x-L*D,E-N*D,x+L*U,E+N*U));continue}const se=(-R+w)*(-M+E)-(-R+x)*(-M+b),J=(-L+A)*(-N+E)-(-L+x)*(-N+I),ae=(W*J-q*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,xe=E-(le-E)*D,ge=Math.min(W*W+K*K,q*q+Q*Q),be=ce?U:D,Ze=ge+be*be*y,qe=he<=Ze;let ut=o.join;if(ut===al.MITER&&he/y>S&&(ut=al.BEVEL),qe)switch(ut){case al.MITER:{d.push(pe,ve,ye,xe);break}case al.BEVEL:{ce?d.push(pe,ve,x+R*D,E+M*D,pe,ve,x+L*D,E+N*D):d.push(x-R*U,E-M*U,ye,xe,x-L*U,E-N*U,ye,xe),p+=2;break}case al.ROUND:{ce?(d.push(pe,ve,x+R*D,E+M*D),p+=Wh(x,E,x+R*D,E+M*D,x+L*D,E+N*D,d,!0)+4,d.push(pe,ve,x+L*D,E+N*D)):(d.push(x-R*U,E-M*U,ye,xe),p+=Wh(x,E,x-R*U,E-M*U,x-L*U,E-N*U,d,!1)+4,d.push(x-L*U,E-N*U,ye,xe));break}}else{switch(d.push(x-R*U,E-M*U,x+R*D,E+M*D),ut){case al.MITER:{ce?d.push(ye,xe,ye,xe):d.push(pe,ve,pe,ve),p+=2;break}case al.ROUND:{ce?p+=Wh(x,E,x+R*D,E+M*D,x+L*D,E+N*D,d,!0)+2:p+=Wh(x,E,x-R*U,E-M*U,x-L*U,E-N*U,d,!1)+2;break}}d.push(x-L*U,E-N*U,x+L*D,E+N*D),p+=2}}w=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=w-x,H=Math.sqrt(R*R+M*M),R/=H,M/=H,R*=v,M*=v,d.push(x-R*U,E-M*U,x+R*D,E+M*D),u||(o.cap===mp.ROUND?p+=Wh(x-R*(U-D)*.5,E-M*(U-D)*.5,x-R*U,E-M*U,x+R*D,E+M*D,d,!1)+2:o.cap===mp.SQUARE&&(p+=pV(x,E,R,M,U,D,!1,d)));const F=t.indices,z=sv.epsilon*sv.epsilon;for(let G=m;G0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new oT(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 oT(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 a=this.shapeIndex;a65535;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=CS.pop(),r||(r=new p5,r.texArray=new m5),this.drawCalls.push(r)),r.start=c,r.size=0,r.texArray.count=0,r.type=u),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Zf.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,c+=h.size,s=v._batchLocation,this.addColors(t,m.color,m.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Vt._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 a=0;for(let u=0;u0&&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 Em,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Em,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),bU.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),yU.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=hV.curveTo(e,t,n,r,i,o);if(s){const{cx:a,cy:u,radius:c,startAngle:d,endAngle:h,anticlockwise:p}=s;this.arc(a,u,c,d,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=ZC:o&&r<=i&&(r+=ZC),i-r===0)return this;const a=e+Math.cos(r)*n,u=t+Math.sin(r)*n,c=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const h=Math.abs(d[d.length-2]-a),p=Math.abs(d[d.length-1]-u);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 Jt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new pU(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new dU(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new hU(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 Em(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===Ki.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([lUe.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(){e$===void 0&&(e$=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[sV]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:sV++,id:r})}}const aV=new cUe;function OI(e,t,n){const r=new pt(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const fUe=[".jpeg",".jpg",".png",".webp",".avif"],dUe=["image/jpeg","image/png","image/webp","image/avif"];async function hUe(e){const t=await nt.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 MI={name:"loadTextures",extension:{type:it.LoadParser,priority:bu.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Xw(e,dUe)||lg(e,fUe)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await aV.isImageBitmapSupported()?r=await aV.loadImageBitmap(e):r=await hUe(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 Vt(r,{resolution:sd(e),...t.data});return i.resource.src=e,OI(i,n,e)},unload(e){e.destroy(!0)}};wt.add(MI);const pUe=".svg",gUe="image/svg+xml",mUe={extension:{type:it.LoadParser,priority:bu.High},name:"loadSVG",test(e){return Xw(e,gUe)||lg(e,pUe)},async testParse(e){return ew.test(e)},async parse(e,t,n){var s;const r=new ew(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Vt(r,{resolution:sd(e),...t==null?void 0:t.data});return i.resource.src=e,OI(i,n,e)},async load(e,t){return(await nt.ADAPTER.fetch(e)).text()},unload:MI.unload};wt.add(mUe);class vUe{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=Lc(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=V6e(n):n=[n]);const o=n.map(s=>{let a=s;if(typeof s=="string"){let u=!1;for(let c=0;c{this._assetMap[s]=o})}resolveBundle(t){const n=nT(t);t=Lc(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),a={};for(const u in s){const c=s[u];a[this._extractAssetIdFromBundle(i,u)]=c}r[i]=a}}),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=nT(t);t=Lc(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),a=o[0];s==null||s.priority.forEach(u=>{s.params[u].forEach(c=>{const d=o.filter(h=>h[u]?h[u]===c:!1);d.length&&(o=d)})}),this._resolverHash[i]=o[0]??a}else{let o=i;(this._basePath||this._rootPath)&&(o=vo.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 yUe{constructor(){this._detections=[],this._initialized=!1,this.resolver=new vUe,this.loader=new q6e,this.cache=Vb,this._backgroundLoader=new G6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,a;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 u=t.manifest;typeof u=="string"&&(u=await this.load(u)),this.resolver.addManifest(u)}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 u=(a=t.texturePreference)==null?void 0:a.format;i=typeof u=="string"?[u]:u;for(const c of this._detections)await c.test()||(i=await c.remove(i))}else for(const u of this._detections)await u.test()&&(i=await u.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=nT(t),i=Lc(t).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),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 a=0,u=0;const c=()=>{n==null||n(++a/u)},d=s.map(h=>{const p=i[h];return u+=Object.keys(p).length,this._mapLoadToResolve(p,c).then(m=>{o[h]=m})});return await Promise.all(d),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 Vb.get(t);const n={};for(let r=0;r{const c=o[a.src],d=[a.src];a.alias&&d.push(...a.alias),s[i[u]]=c,Vb.set(d,c)}),s}async unload(t){this._initialized||await this.init();const n=Lc(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=Lc(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=>{Vb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return MI.config.preferWorkers}set preferWorkers(t){dn("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 _S=new yUe;wt.handleByList(it.LoadParser,_S.loader.parsers).handleByList(it.ResolveParser,_S.resolver.parsers).handleByList(it.CacheParser,_S.cache.parsers).handleByList(it.DetectionParser,_S.detections);const bUe={extension:it.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof pt),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};wt.add(bUe);const xUe={extension:{type:it.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await nt.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")};wt.add(xUe);const wUe={extension:{type:it.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await nt.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")};wt.add(wUe);const lV=["png","jpg","jpeg"],_Ue={extension:{type:it.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...lV],remove:async e=>e.filter(t=>!lV.includes(t))};wt.add(_Ue);const SUe={extension:it.ResolveParser,test:MI.test,parse:e=>{var t;return{resolution:parseFloat(((t=nt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(SUe);var Ms=(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))(Ms||{});const rT={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 vc,kg;function uV(){kg={s3tc:vc.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:vc.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:vc.getExtension("WEBGL_compressed_texture_etc"),etc1:vc.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:vc.getExtension("WEBGL_compressed_texture_pvrtc")||vc.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:vc.getExtension("WEBGL_compressed_texture_atc"),astc:vc.getExtension("WEBGL_compressed_texture_astc")}}const EUe={extension:{type:it.DetectionParser,priority:2},test:async()=>{const t=nt.ADAPTER.createCanvas().getContext("webgl");return t?(vc=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{kg||uV();const t=[];for(const n in kg)kg[n]&&t.push(n);return[...t,...e]},remove:async e=>(kg||uV(),e.filter(t=>!(t in kg)))};wt.add(EUe);class CUe extends Gw{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 h5(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 h5(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class Ip extends CUe{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=Ip._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||Ip._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,a=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,a){const u=new Array(r);let c=t.byteOffset,d=s,h=a,p=d+i-1&~(i-1),m=h+o-1&~(o-1),v=p*m*rT[n];for(let y=0;y1?d:p,levelHeight:r>1?h:m,levelBuffer:new Uint8Array(t.buffer,c,v)},c+=v,d=d>>1||1,h=h>>1||1,p=d+i-1&~(i-1),m=h+o-1&~(o-1),v=p*m*rT[n];return u}}const n$=4,SS=124,TUe=32,cV=20,AUe=542327876,ES={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},IUe={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},CS={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},RUe=1,PUe=2,OUe=4,MUe=64,kUe=512,LUe=131072,DUe=827611204,NUe=861165636,BUe=894720068,$Ue=808540228,FUe=4,zUe={[DUe]:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,[NUe]:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,[BUe]:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT},UUe={70:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Ms.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Ms.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Ms.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Ms.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function jUe(e){const t=new Uint32Array(e);if(t[0]!==AUe)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,SS/Uint32Array.BYTES_PER_ELEMENT),i=r[ES.HEIGHT],o=r[ES.WIDTH],s=r[ES.MIPMAP_COUNT],a=new Uint32Array(e,ES.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,TUe/Uint32Array.BYTES_PER_ELEMENT),u=a[RUe];if(u&OUe){const c=a[IUe.FOURCC];if(c!==$Ue){const x=zUe[c],E=n$+SS,A=new Uint8Array(e,E);return[new Ip(A,{format:x,width:o,height:i,levels:s})]}const d=n$+SS,h=new Uint32Array(t.buffer,d,cV/Uint32Array.BYTES_PER_ELEMENT),p=h[CS.DXGI_FORMAT],m=h[CS.RESOURCE_DIMENSION],v=h[CS.MISC_FLAG],y=h[CS.ARRAY_SIZE],S=UUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===FUe)throw new Error("DDSParser does not support cubemap textures");if(m===6)throw new Error("DDSParser does not supported 3D texture data");const w=new Array,b=n$+SS+cV;if(y===1)w.push(new Uint8Array(e,b));else{const x=rT[S];let E=0,A=o,I=i;for(let M=0;M>>1,I=I>>>1}let R=b;for(let M=0;Mnew Ip(x,{format:S,width:o,height:i,levels:s}))}throw u&MUe?new Error("DDSParser does not support uncompressed texture data."):u&kUe?new Error("DDSParser does not supported YUV uncompressed texture data."):u&LUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&PUe?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 fV=[171,75,84,88,32,49,49,187,13,10,26,10],HUe=67305985,el={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},I5=64,dV={[Mt.UNSIGNED_BYTE]:1,[Mt.UNSIGNED_SHORT]:2,[Mt.INT]:4,[Mt.UNSIGNED_INT]:4,[Mt.FLOAT]:4,[Mt.HALF_FLOAT]:8},WUe={[Ve.RGBA]:4,[Ve.RGB]:3,[Ve.RG]:2,[Ve.RED]:1,[Ve.LUMINANCE]:1,[Ve.LUMINANCE_ALPHA]:2,[Ve.ALPHA]:1},GUe={[Mt.UNSIGNED_SHORT_4_4_4_4]:2,[Mt.UNSIGNED_SHORT_5_5_5_1]:2,[Mt.UNSIGNED_SHORT_5_6_5]:2};function VUe(e,t,n=!1){const r=new DataView(t);if(!XUe(e,r))return null;const i=r.getUint32(el.ENDIANNESS,!0)===HUe,o=r.getUint32(el.GL_TYPE,i),s=r.getUint32(el.GL_FORMAT,i),a=r.getUint32(el.GL_INTERNAL_FORMAT,i),u=r.getUint32(el.PIXEL_WIDTH,i),c=r.getUint32(el.PIXEL_HEIGHT,i)||1,d=r.getUint32(el.PIXEL_DEPTH,i)||1,h=r.getUint32(el.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(el.NUMBER_OF_FACES,i),m=r.getUint32(el.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(el.BYTES_OF_KEY_VALUE_DATA,i);if(c===0||d!==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,w=u+3&-4,b=c+3&-4,x=new Array(h);let E=u*c;o===0&&(E=w*b);let A;if(o!==0?dV[o]?A=dV[o]*WUe[s]:A=GUe[o]:A=rT[a],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const I=n?YUe(r,v,i):null;let M=E*A,D=u,N=c,H=w,V=b,U=I5+v;for(let L=0;L1||o!==0?D:H,levelHeight:m>1||o!==0?N:V,levelBuffer:new Uint8Array(t,z,M)},z+=M}U+=F+4,U=U%4!==0?U+4-U%4:U,D=D>>1||1,N=N>>1||1,H=D+y-1&~(y-1),V=N+S-1&~(S-1),M=H*V*A}return o!==0?{uncompressed:x.map(L=>{let F=L[0].levelBuffer,z=!1;return o===Mt.FLOAT?F=new Float32Array(L[0].levelBuffer.buffer,L[0].levelBuffer.byteOffset,L[0].levelBuffer.byteLength/4):o===Mt.UNSIGNED_INT?(z=!0,F=new Uint32Array(L[0].levelBuffer.buffer,L[0].levelBuffer.byteOffset,L[0].levelBuffer.byteLength/4)):o===Mt.INT&&(z=!0,F=new Int32Array(L[0].levelBuffer.buffer,L[0].levelBuffer.byteOffset,L[0].levelBuffer.byteLength/4)),{resource:new Gw(F,{width:L[0].levelWidth,height:L[0].levelHeight}),type:o,format:z?qUe(s):s}}),kvData:I}:{compressed:x.map(L=>new Ip(null,{format:a,width:u,height:c,levels:m,levelBuffers:L})),kvData:I}}function XUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let u=0;for(;u{const u=new Vt(a,{mipmap:du.OFF,alphaMode:kl.NO_PREMULTIPLIED_ALPHA,resolution:sd(e),...t.data});return OI(u,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(KUe);const QUe={extension:{type:it.LoadParser,priority:bu.High},name:"loadKTX",test(e){return lg(e,".ktx")},async load(e,t,n){const i=await(await nt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:a}=VUe(e,i),u=o??s,c={mipmap:du.OFF,alphaMode:kl.NO_PREMULTIPLIED_ALPHA,resolution:sd(e),...t.data},d=u.map(h=>{u===s&&Object.assign(c,{type:h.type,format:h.format});const p=new Vt(h,c);return p.ktxKeyValueData=a,OI(p,n,e)});return d.length===1?d[0]:d},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(QUe);const JUe={extension:it.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=nt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=nt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(JUe);const ZUe=new Jt,eje=4,p1=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 a=new FileReader;a.onload=()=>i(a.result),a.onerror=o,a.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 a=new FileReader;a.onload=()=>o(a.result),a.onerror=s,a.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&&p1._flipY(n,r,i),p1._unpremultiplyAlpha(n);const s=new g4e(r,i,1),a=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(a,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&p1._flipY(n,r,i),p1._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 sg?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=ZUe,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const a=Math.round(t.width*r),u=Math.round(t.height*r),c=new Uint8Array(eje*a*u),d=n.gl;return d.readPixels(Math.round(t.x*r),Math.round(t.y*r),a,u,d.RGBA,d.UNSIGNED_BYTE,c),s&&(o==null||o.destroy(!0)),{pixels:c,width:a,height:u,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&&a>=0&&i>=0&&o>=0)){t.length=0;return}const u=Math.ceil(2.3*Math.sqrt(s+a)),c=u*8+(i?4:0)+(o?4:0);if(t.length=c,c===0)return;if(u===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 d=0,h=u*4+(i?2:0)+2,p=h,m=c;{const v=i+s,y=o,S=n+v,w=n-v,b=r+y;if(t[d++]=S,t[d++]=b,t[--h]=b,t[--h]=w,o){const x=r-y;t[p++]=w,t[p++]=x,t[--m]=x,t[--m]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){hV(n,!1);const s=[];for(let c=0;c=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)}},nje={build(e){iT.build(e)},triangulate(e,t){iT.triangulate(e,t)}};var al=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(al||{}),mp=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(mp||{});const sv={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 pV{static curveTo(t,n,r,i,o,s){const a=s[s.length-2],c=s[s.length-1]-n,d=a-t,h=i-n,p=r-t,m=Math.abs(c*p-d*h);if(m<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=c*c+d*d,y=h*h+p*p,S=c*h+d*p,w=o*Math.sqrt(v)/m,b=o*Math.sqrt(y)/m,x=w*S/v,E=b*S/y,A=w*p+b*d,I=w*h+b*c,R=d*(b+x),M=c*(b+x),D=p*(w+E),N=h*(w+E),H=Math.atan2(M-I,R-A),V=Math.atan2(N-I,D-A);return{cx:A+t,cy:I+n,radius:o,startAngle:H,endAngle:V,anticlockwise:d*h>p*c}}static arc(t,n,r,i,o,s,a,u,c){const d=a-s,h=sv._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/ZC)*40),p=d/(h*2),m=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,w=S%1/S;for(let b=0;b<=S;++b){const x=b+w*b,E=p+s+m*x,A=Math.cos(E),I=-Math.sin(E);c.push((v*A+y*I)*o+r,(v*-I+y*A)*o+i)}}}class rje{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 bU{static curveLength(t,n,r,i,o,s,a,u){let d=0,h=0,p=0,m=0,v=0,y=0,S=0,w=0,b=0,x=0,E=0,A=t,I=n;for(let R=1;R<=10;++R)h=R/10,p=h*h,m=p*h,v=1-h,y=v*v,S=y*v,w=S*t+3*y*h*r+3*v*p*o+m*a,b=S*n+3*y*h*i+3*v*p*s+m*u,x=A-w,E=I-b,A=w,I=b,d+=Math.sqrt(x*x+E*E);return d}static curveTo(t,n,r,i,o,s,a){const u=a[a.length-2],c=a[a.length-1];a.length-=2;const d=sv._segmentsCount(bU.curveLength(u,c,t,n,r,i,o,s));let h=0,p=0,m=0,v=0,y=0;a.push(u,c);for(let S=1,w=0;S<=d;++S)w=S/d,h=1-w,p=h*h,m=p*h,v=w*w,y=v*w,a.push(m*u+3*p*w*t+3*h*v*r+y*o,m*c+3*p*w*n+3*h*v*i+y*s)}}function gV(e,t,n,r,i,o,s,a){const u=e-n*i,c=t-r*i,d=e+n*o,h=t+r*o;let p,m;s?(p=r,m=-n):(p=-r,m=n);const v=u+p,y=c+m,S=d+p,w=h+m;return a.push(v,y,S,w),2}function Wh(e,t,n,r,i,o,s,a){const u=n-e,c=r-t;let d=Math.atan2(u,c),h=Math.atan2(i-e,o-t);a&&dh&&(h+=Math.PI*2);let p=d;const m=h-d,v=Math.abs(m),y=Math.sqrt(u*u+c*c),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,w=m/S;if(p+=w,a){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===al.ROUND?p+=Wh(x,E,x-R*U,E-M*U,x-D*U,E-N*U,d,!1)+4:p+=2,d.push(x-D*L,E-N*L,x+D*U,E+N*U));continue}const se=(-R+w)*(-M+E)-(-R+x)*(-M+b),J=(-D+A)*(-N+E)-(-D+x)*(-N+I),ae=(W*J-q*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)*L,xe=E-(le-E)*L,ge=Math.min(W*W+K*K,q*q+Q*Q),be=ce?U:L,Ze=ge+be*be*y,qe=he<=Ze;let ut=o.join;if(ut===al.MITER&&he/y>S&&(ut=al.BEVEL),qe)switch(ut){case al.MITER:{d.push(pe,ve,ye,xe);break}case al.BEVEL:{ce?d.push(pe,ve,x+R*L,E+M*L,pe,ve,x+D*L,E+N*L):d.push(x-R*U,E-M*U,ye,xe,x-D*U,E-N*U,ye,xe),p+=2;break}case al.ROUND:{ce?(d.push(pe,ve,x+R*L,E+M*L),p+=Wh(x,E,x+R*L,E+M*L,x+D*L,E+N*L,d,!0)+4,d.push(pe,ve,x+D*L,E+N*L)):(d.push(x-R*U,E-M*U,ye,xe),p+=Wh(x,E,x-R*U,E-M*U,x-D*U,E-N*U,d,!1)+4,d.push(x-D*U,E-N*U,ye,xe));break}}else{switch(d.push(x-R*U,E-M*U,x+R*L,E+M*L),ut){case al.MITER:{ce?d.push(ye,xe,ye,xe):d.push(pe,ve,pe,ve),p+=2;break}case al.ROUND:{ce?p+=Wh(x,E,x+R*L,E+M*L,x+D*L,E+N*L,d,!0)+2:p+=Wh(x,E,x-R*U,E-M*U,x-D*U,E-N*U,d,!1)+2;break}}d.push(x-D*U,E-N*U,x+D*L,E+N*L),p+=2}}w=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=w-x,H=Math.sqrt(R*R+M*M),R/=H,M/=H,R*=v,M*=v,d.push(x-R*U,E-M*U,x+R*L,E+M*L),u||(o.cap===mp.ROUND?p+=Wh(x-R*(U-L)*.5,E-M*(U-L)*.5,x-R*U,E-M*U,x+R*L,E+M*L,d,!1)+2:o.cap===mp.SQUARE&&(p+=gV(x,E,R,M,U,L,!1,d)));const F=t.indices,z=sv.epsilon*sv.epsilon;for(let G=m;G0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new oT(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 oT(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 a=this.shapeIndex;a65535;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=TS.pop(),r||(r=new g5,r.texArray=new v5),this.drawCalls.push(r)),r.start=c,r.size=0,r.texArray.count=0,r.type=u),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Zf.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,c+=h.size,s=v._batchLocation,this.addColors(t,m.color,m.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}Vt._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 a=0;for(let u=0;u0&&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 Em,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Em,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),xU.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),bU.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=pV.curveTo(e,t,n,r,i,o);if(s){const{cx:a,cy:u,radius:c,startAngle:d,endAngle:h,anticlockwise:p}=s;this.arc(a,u,c,d,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=ZC:o&&r<=i&&(r+=ZC),i-r===0)return this;const a=e+Math.cos(r)*n,u=t+Math.sin(r)*n,c=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const h=Math.abs(d[d.length-2]-a),p=Math.abs(d[d.length-1]-u);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 Jt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new gU(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new hU(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new pU(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 Em(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===Ki.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 a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));const u=n[0]._texture.baseTexture,c=u.alphaMode>0;this.state.blendMode=Mne(t.blendMode,c),o.state.set(this.state);const d=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=Vn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=u,this.renderer.shader.bind(this.shader);let p=!1;for(let m=0,v=0;mi&&(y=i),v>=a.length&&a.push(this._generateOneMoreBuffer(t));const S=a[v];S.uploadDynamic(n,m,y);const w=t._bufferUpdateIDs[v]||0;p=p||S._updateID0);i[s]=c,i[s+o]=c,i[s+o*2]=c,i[s+o*3]=c,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Ore.extension={name:"particle",type:it.RendererPlugin};wt.add(Ore);var DI=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(DI||{});const TS={willReadFrequently:!0},yt=class{static get experimentalLetterSpacingSupported(){let e=yt._experimentalLetterSpacingSupported;if(e!==void 0){const t=nt.ADAPTER.getCanvasRenderingContext2D().prototype;e=yt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,a,u){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=u}static measureText(e,t,n,r=yt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=yt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",TS);s.font=i;const u=(n?yt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),c=new Array(u.length);let d=0;for(let v=0;v0&&(r?i-=t:i+=(yt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=yt._canvas){const r=n.getContext("2d",TS);let i=0,o="",s="";const a=Object.create(null),{letterSpacing:u,whiteSpace:c}=t,d=yt.collapseSpaces(c),h=yt.collapseNewlines(c);let p=!d;const m=t.wordWrapWidth+u,v=yt.tokenize(e);for(let y=0;ym)if(o!==""&&(s+=yt.addLine(o),o="",i=0),yt.canBreakWords(S,t.breakWords)){const b=yt.wordWrapSplit(S);for(let x=0;xm&&(s+=yt.addLine(o),p=!1,o="",i=0),o+=E,i+=R}}else{o.length>0&&(s+=yt.addLine(o),o="",i=0);const b=y===v.length-1;s+=yt.addLine(S,!b),p=!1,o="",i=0}else w+i>m&&(p=!1,s+=yt.addLine(o),o="",i=0),(o.length>0||!yt.isBreakingSpace(S)||p)&&(o+=S,i+=w)}return s+=yt.addLine(o,!1),s}static addLine(e,t=!0){return e=yt.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=yt._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(!yt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:yt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:yt._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]})();Yi.experimentalLetterSpacing=!1;Yi._fonts={};Yi._newlines=[10,13];Yi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const dje=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],g1=class{constructor(e){this.styleID=0,this.reset(),a$(this,e,e)}clone(){const e={};return a$(e,this,g1.defaultStyle),new g1(e)}reset(){a$(this,g1.defaultStyle,g1.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=s$(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=s$(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){hje(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=s$(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)&&!dje.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Gc=g1;Gc.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:DI.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 s$(e){const t=Vn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function hje(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&m>v&&(y=(v+m)/2);const S=v+h,w=n.lineHeight*(p+1);let b=S;p+10}}function mje(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(wje),this.registerFindHook(_je),this.registerFindHook(mje),this.registerFindHook(vje),this.registerFindHook(yje),this.registerUploadHook(bje),this.registerUploadHook(xje)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Si.system.addOnce(this.tick,this,Yp.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&&Si.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 sT=Mre;sT.uploadsPerFrame=4;Object.defineProperties(nt,{UPLOADS_PER_FRAME:{get(){return sT.uploadsPerFrame},set(e){dn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),sT.uploadsPerFrame=e}}});function kre(e,t){return t instanceof Vt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function Sje(e,t){if(!(t instanceof av))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;ir&&!t.autoResize&&(s=r);let a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));const u=n[0]._texture.baseTexture,c=u.alphaMode>0;this.state.blendMode=kne(t.blendMode,c),o.state.set(this.state);const d=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=Vn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=u,this.renderer.shader.bind(this.shader);let p=!1;for(let m=0,v=0;mi&&(y=i),v>=a.length&&a.push(this._generateOneMoreBuffer(t));const S=a[v];S.uploadDynamic(n,m,y);const w=t._bufferUpdateIDs[v]||0;p=p||S._updateID0);i[s]=c,i[s+o]=c,i[s+o*2]=c,i[s+o*3]=c,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Mre.extension={name:"particle",type:it.RendererPlugin};wt.add(Mre);var LI=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(LI||{});const AS={willReadFrequently:!0},yt=class{static get experimentalLetterSpacingSupported(){let e=yt._experimentalLetterSpacingSupported;if(e!==void 0){const t=nt.ADAPTER.getCanvasRenderingContext2D().prototype;e=yt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,a,u){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=u}static measureText(e,t,n,r=yt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=yt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",AS);s.font=i;const u=(n?yt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),c=new Array(u.length);let d=0;for(let v=0;v0&&(r?i-=t:i+=(yt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=yt._canvas){const r=n.getContext("2d",AS);let i=0,o="",s="";const a=Object.create(null),{letterSpacing:u,whiteSpace:c}=t,d=yt.collapseSpaces(c),h=yt.collapseNewlines(c);let p=!d;const m=t.wordWrapWidth+u,v=yt.tokenize(e);for(let y=0;ym)if(o!==""&&(s+=yt.addLine(o),o="",i=0),yt.canBreakWords(S,t.breakWords)){const b=yt.wordWrapSplit(S);for(let x=0;xm&&(s+=yt.addLine(o),p=!1,o="",i=0),o+=E,i+=R}}else{o.length>0&&(s+=yt.addLine(o),o="",i=0);const b=y===v.length-1;s+=yt.addLine(S,!b),p=!1,o="",i=0}else w+i>m&&(p=!1,s+=yt.addLine(o),o="",i=0),(o.length>0||!yt.isBreakingSpace(S)||p)&&(o+=S,i+=w)}return s+=yt.addLine(o,!1),s}static addLine(e,t=!0){return e=yt.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=yt._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(!yt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:yt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:yt._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]})();Yi.experimentalLetterSpacing=!1;Yi._fonts={};Yi._newlines=[10,13];Yi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const dje=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],g1=class{constructor(e){this.styleID=0,this.reset(),a$(this,e,e)}clone(){const e={};return a$(e,this,g1.defaultStyle),new g1(e)}reset(){a$(this,g1.defaultStyle,g1.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=s$(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=s$(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){hje(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=s$(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)&&!dje.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Gc=g1;Gc.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:LI.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 s$(e){const t=Vn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function hje(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&m>v&&(y=(v+m)/2);const S=v+h,w=n.lineHeight*(p+1);let b=S;p+10}}function mje(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(wje),this.registerFindHook(_je),this.registerFindHook(mje),this.registerFindHook(vje),this.registerFindHook(yje),this.registerUploadHook(bje),this.registerUploadHook(xje)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Si.system.addOnce(this.tick,this,Yp.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&&Si.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 sT=kre;sT.uploadsPerFrame=4;Object.defineProperties(nt,{UPLOADS_PER_FRAME:{get(){return sT.uploadsPerFrame},set(e){dn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),sT.uploadsPerFrame=e}}});function Lre(e,t){return t instanceof Vt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function Sje(e,t){if(!(t instanceof av))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?au.from(Tje,Cje,n):au.from(xV,Aje,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 a=t._texture,u=a.baseTexture,c=u.alphaMode>0,d=t.tileTransform.localTransform,h=t.uvMatrix;let p=u.isPowerOfTwo&&a.frame.width===u.width&&a.frame.height===u.height;p&&(u._glTextures[n.CONTEXT_UID]?p=u.wrapMode!==Zf.CLAMP:u.wrapMode===Zf.CLAMP&&(u.wrapMode=Zf.REPEAT));const m=p?this.simpleShader:this.shader,v=a.width,y=a.height,S=t._width,w=t._height;AS.set(d.a*v/S,d.b*v/w,d.c*y/S,d.d*y/w,d.tx/S,d.ty/w),AS.invert(),p?AS.prepend(h.mapCoord):(m.uniforms.uMapCoord=h.mapCoord.toArray(!0),m.uniforms.uClampFrame=h.uClampFrame,m.uniforms.uClampOffset=h.uClampOffset),m.uniforms.uTransform=AS.toArray(!0),m.uniforms.uColor=Vn.shared.setValue(t.tint).premultiply(t.worldAlpha,c).toArray(m.uniforms.uColor),m.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),m.uniforms.uSampler=a,n.shader.bind(m),n.geometry.bind(r),this.state.blendMode=Mne(t.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Lre.extension={name:"tilingSprite",type:it.RendererPlugin};wt.add(Lre);const m1=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof pt?e:null,this.baseTexture=e instanceof Vt?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=sd(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<=m1.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=m1.BATCH_SIZE;for(;t-e{this._batchIndex*m1.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=vo.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const a=Nre([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,a)})}return r}const Pje={extension:it.Asset,cache:{test:e=>e instanceof P5,getCacheableAssets:(e,t)=>Nre(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&Rje.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=nt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:it.LoadParser,priority:bu.Normal},async testParse(e,t){return vo.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var c,d;let r=vo.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=T5(i,t.src);const s=(await n.load([i]))[i],a=new P5(s.baseTexture,e,t.src);await a.parse();const u=(c=e==null?void 0:e.meta)==null?void 0:c.related_multi_packs;if(Array.isArray(u)){const h=[];for(const m of u){if(typeof m!="string")continue;let v=r+m;(d=t.data)!=null&&d.ignoreMultiPack||(v=T5(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);a.linkedSheets=p,p.forEach(m=>{m.linkedSheets=[a].concat(a.linkedSheets.filter(v=>v!==m))})}return a},unload(e){e.destroy(!0)}}};wt.add(Pje);class aT{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class TE{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],a=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),u={};for(const c in a){const d=a[c].split("="),h=d[0],p=d[1].replace(/"/gm,""),m=parseFloat(p),v=isNaN(m)?p:m;u[h]=v}r[s].push(u)}const i=new aT;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 O5{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 aT,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),u=t.getElementsByTagName("distanceField");for(let c=0;c")?O5.test(nt.ADAPTER.parseXML(t)):!1}static parse(t){return O5.parse(nt.ADAPTER.parseXML(t))}}const l$=[TE,O5,M5];function Oje(e){for(let t=0;t=a-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: '${d.fontFamily}', fontSize: ${d.fontSize}px, char: '${I}')`);--A,y=null,S=null,w=null,v=0,m=0,b=0;continue}if(b=Math.max(L+R.fontProperties.descent,b),N*o+m>=h){if(m===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${d.fontFamily}', fontSize: ${d.fontSize}px, char: '${I}')`);--A,v+=b*o,v=Math.ceil(v),m=0,b=0;continue}kje(y,S,R,m,v,o,d);const H=AE(R.text);p.char.push({id:H,page:x.length-1,x:m/o,y:v/o,width:N,height:L,xoffset:0,yoffset:0,xadvance:M-(d.dropShadow?d.dropShadowDistance:0)-(d.stroke?d.strokeThickness:0)}),m+=(N+2*i)*o,m=Math.ceil(m)}for(let A=0,I=c.length;A1?au.from(Tje,Cje,n):au.from(wV,Aje,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 a=t._texture,u=a.baseTexture,c=u.alphaMode>0,d=t.tileTransform.localTransform,h=t.uvMatrix;let p=u.isPowerOfTwo&&a.frame.width===u.width&&a.frame.height===u.height;p&&(u._glTextures[n.CONTEXT_UID]?p=u.wrapMode!==Zf.CLAMP:u.wrapMode===Zf.CLAMP&&(u.wrapMode=Zf.REPEAT));const m=p?this.simpleShader:this.shader,v=a.width,y=a.height,S=t._width,w=t._height;IS.set(d.a*v/S,d.b*v/w,d.c*y/S,d.d*y/w,d.tx/S,d.ty/w),IS.invert(),p?IS.prepend(h.mapCoord):(m.uniforms.uMapCoord=h.mapCoord.toArray(!0),m.uniforms.uClampFrame=h.uClampFrame,m.uniforms.uClampOffset=h.uClampOffset),m.uniforms.uTransform=IS.toArray(!0),m.uniforms.uColor=Vn.shared.setValue(t.tint).premultiply(t.worldAlpha,c).toArray(m.uniforms.uColor),m.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),m.uniforms.uSampler=a,n.shader.bind(m),n.geometry.bind(r),this.state.blendMode=kne(t.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Nre.extension={name:"tilingSprite",type:it.RendererPlugin};wt.add(Nre);const m1=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof pt?e:null,this.baseTexture=e instanceof Vt?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=sd(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<=m1.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=m1.BATCH_SIZE;for(;t-e{this._batchIndex*m1.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=vo.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const a=Bre([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,a)})}return r}const Pje={extension:it.Asset,cache:{test:e=>e instanceof O5,getCacheableAssets:(e,t)=>Bre(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&Rje.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=nt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:it.LoadParser,priority:bu.Normal},async testParse(e,t){return vo.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var c,d;let r=vo.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=A5(i,t.src);const s=(await n.load([i]))[i],a=new O5(s.baseTexture,e,t.src);await a.parse();const u=(c=e==null?void 0:e.meta)==null?void 0:c.related_multi_packs;if(Array.isArray(u)){const h=[];for(const m of u){if(typeof m!="string")continue;let v=r+m;(d=t.data)!=null&&d.ignoreMultiPack||(v=A5(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);a.linkedSheets=p,p.forEach(m=>{m.linkedSheets=[a].concat(a.linkedSheets.filter(v=>v!==m))})}return a},unload(e){e.destroy(!0)}}};wt.add(Pje);class aT{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class AE{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],a=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),u={};for(const c in a){const d=a[c].split("="),h=d[0],p=d[1].replace(/"/gm,""),m=parseFloat(p),v=isNaN(m)?p:m;u[h]=v}r[s].push(u)}const i=new aT;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 M5{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 aT,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),u=t.getElementsByTagName("distanceField");for(let c=0;c")?M5.test(nt.ADAPTER.parseXML(t)):!1}static parse(t){return M5.parse(nt.ADAPTER.parseXML(t))}}const l$=[AE,M5,k5];function Oje(e){for(let t=0;t=a-D*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: '${d.fontFamily}', fontSize: ${d.fontSize}px, char: '${I}')`);--A,y=null,S=null,w=null,v=0,m=0,b=0;continue}if(b=Math.max(D+R.fontProperties.descent,b),N*o+m>=h){if(m===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${d.fontFamily}', fontSize: ${d.fontSize}px, char: '${I}')`);--A,v+=b*o,v=Math.ceil(v),m=0,b=0;continue}kje(y,S,R,m,v,o,d);const H=IE(R.text);p.char.push({id:H,page:x.length-1,x:m/o,y:v/o,width:N,height:D,xoffset:0,yoffset:0,xadvance:M-(d.dropShadow?d.dropShadowDistance:0)-(d.stroke?d.strokeThickness:0)}),m+=(N+2*i)*o,m=Math.ceil(m)}for(let A=0,I=c.length;A{this.dirty=!0},this,0,0),this._roundPixels=nt.ROUND_PIXELS,this.dirty=!0,this._resolution=nt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=Xo.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Dt,i=[],o=[],s=[],a=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",u=Bre(a),c=this._maxWidth*e.size/t,d=e.distanceFieldType==="none"?wV:_V;let h=null,p=0,m=0,v=0,y=-1,S=0,w=0,b=0,x=0;for(let H=0;H0&&r.x>c&&(++w,Sm(i,1+y-w,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),m=Math.max(m,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=u[u.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),m=Math.max(m,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let V=0;this._align==="right"?V=m-o[H]:this._align==="center"?V=(m-o[H])/2:this._align==="justify"&&(V=s[H]<0?0:(m-o[H])/s[H]),A.push(V)}const I=i.length,R={},M=[],L=this._activePagesMeshData;d.push(...L);for(let H=0;H6*U)||V.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=pt.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 Bje=$re;Bje.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const $je=[".xml",".fnt"],Fje={extension:{type:it.LoadParser,priority:bu.Normal},name:"loadBitmapFont",test(e){return $je.includes(vo.extname(e).toLowerCase())},async testParse(e){return TE.test(e)||M5.test(e)},async parse(e,t,n){const r=TE.test(e)?TE.parse(e):M5.parse(e),{src:i}=t,{page:o}=r,s=[];for(let c=0;ca[c]);return Xo.install(r,u,!0)},async load(e,t){return(await nt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};wt.add(Fje);const Dg=class extends Gc{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Dg(Object.keys(Dg.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 Dg.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=Dg;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return nt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),a=new FileReader;a.onload=()=>i([s,a.result]),a.onerror=o,a.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:vo.basename(e,vo.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} +`;const _V=[],SV=[],EV=[],Fre=class extends us{constructor(e,t={}){super();const{align:n,tint:r,maxWidth:i,letterSpacing:o,fontName:s,fontSize:a}=Object.assign({},Fre.styleDefaults,t);if(!Xo.available[s])throw new Error(`Missing BitmapFont "${s}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new Vn(r),this._font=void 0,this._fontName=s,this._fontSize=a,this.text=e,this._maxWidth=i,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new Lf(()=>{this.dirty=!0},this,0,0),this._roundPixels=nt.ROUND_PIXELS,this.dirty=!0,this._resolution=nt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=Xo.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Lt,i=[],o=[],s=[],a=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",u=$re(a),c=this._maxWidth*e.size/t,d=e.distanceFieldType==="none"?_V:SV;let h=null,p=0,m=0,v=0,y=-1,S=0,w=0,b=0,x=0;for(let H=0;H0&&r.x>c&&(++w,Sm(i,1+y-w,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),m=Math.max(m,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=u[u.length-1];E!=="\r"&&E!==` +`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),m=Math.max(m,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let V=0;this._align==="right"?V=m-o[H]:this._align==="center"?V=(m-o[H])/2:this._align==="justify"&&(V=s[H]<0?0:(m-o[H])/s[H]),A.push(V)}const I=i.length,R={},M=[],D=this._activePagesMeshData;d.push(...D);for(let H=0;H6*U)||V.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=pt.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 Bje=Fre;Bje.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const $je=[".xml",".fnt"],Fje={extension:{type:it.LoadParser,priority:bu.Normal},name:"loadBitmapFont",test(e){return $je.includes(vo.extname(e).toLowerCase())},async testParse(e){return AE.test(e)||k5.test(e)},async parse(e,t,n){const r=AE.test(e)?AE.parse(e):k5.parse(e),{src:i}=t,{page:o}=r,s=[];for(let c=0;ca[c]);return Xo.install(r,u,!0)},async load(e,t){return(await nt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};wt.add(Fje);const Lg=class extends Gc{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Lg(Object.keys(Lg.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 Lg.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=Lg;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return nt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),a=new FileReader;a.onload=()=>i([s,a.result]),a.onerror=o,a.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:vo.basename(e,vo.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=f4e(e)),typeof e=="number"?c4e(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,Dg.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}=nt.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 Q1=Dg;Q1.availableFonts={};Q1.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 Lg=class extends ag{constructor(e="",t={}){super(pt.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=pt.from(n,{scaleMode:nt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Jt,r.trim=new Jt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject"),u=document.createElementNS(o,"div"),c=document.createElementNS(o,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",s.appendChild(a),this.maxWidth=Lg.defaultMaxWidth,this.maxHeight=Lg.defaultMaxHeight,this._domElement=u,this._styleElement=c,this._svgRoot=s,this._foreignObject=a,this._foreignObject.appendChild(c),this._foreignObject.appendChild(u),this._image=n,this._loadImage=new Image,this._autoResolution=Lg.defaultAutoResolution,this._resolution=Lg.defaultResolution??nt.RESOLUTION,this.text=e,this.style=t}measureText(e){var a,u;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:(a=this._style)==null?void 0:a.toCSS(r)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.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 a=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}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({},Lg.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=kf(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=kf(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 Q1?(this.ownsStyle=!1,this._style=e):e instanceof Gc?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Q1.from(e)):(this.ownsStyle=!0,this._style=new Q1(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 LI=Lg;LI.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};LI.defaultMaxWidth=2024;LI.defaultMaxHeight=2024;LI.defaultAutoResolution=!0;function zje(e,t){return{constructor:e,meta:t}}function Uje(e,t,n,r,i){Fre(e,t,n||0,r||e.length-1,i||jje)}function Fre(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,a=Math.log(o),u=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*u*(o-u)/o)*(s-o/2<0?-1:1),d=Math.max(n,Math.floor(t-s*u/o+c)),h=Math.min(r,Math.floor(t+(o-s)*u/o+c));Fre(e,t,d,h,i)}var p=e[t],m=n,v=r;for(Xb(e,n,t),i(e[r],p)>0&&Xb(e,n,r);m0;)v--}i(e[n],p)===0?Xb(e,n,v):(v++,Xb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Xb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function jje(e,t){return et?1:0}class Hje{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(!RS(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),a=Ng(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,wg(r,this.toBBox),wg(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(r,a)}_splitRoot(t,n){this.data=Ng([t,n]),this.data.height=t.height+1,this.data.leaf=!1,wg(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let a=n;a<=r-n;a++){const u=v1(t,0,a,this.toBBox),c=v1(t,a,r,this.toBBox),d=qje(u,c),h=u$(u)+u$(c);d=n;c--){const d=t.children[c];y1(a,t.leaf?o(d):d),u+=IS(a)}return u}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)y1(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():wg(t[n],this.toBBox)}}function Wje(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function Ng(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function EV(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;Uje(e,s,t,n,i),o.push(t,s,s,n)}}class Yje extends Hje{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 CV={screenSize:{width:256,height:256},workerCount:4,workerIndex:0,tileResolution:{width:128,height:128},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:75,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var zre={},lT=Kt&&Kt.__assign||function(){return lT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),f$}var a8e=o8e()?Math.sign:s8e(),l8e=a8e,u8e=Math.abs,c8e=Math.floor,f8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:l8e(e)*c8e(u8e(e)))},d8e=f8e,h8e=Math.max,p8e=function(e){return h8e(0,d8e(e))},Ure=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},g8e=Dv,jre=function(e){if(!g8e(e))throw new TypeError("Cannot use null or undefined");return e},m8e={exports:{}},v8e=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")},d$,AV;function y8e(){return AV||(AV=1,d$=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),d$}var h$,IV;function b8e(){if(IV)return h$;IV=1;var e=Dv,t=Object.keys;return h$=function(n){return t(e(n)?Object(n):n)},h$}var p$,RV;function x8e(){return RV||(RV=1,p$=y8e()()?Object.keys:b8e()),p$}var g$,PV;function w8e(){if(PV)return g$;PV=1;var e=x8e(),t=jre,n=Math.max;return g$=function(r,i){var o,s,a=n(arguments.length,2),u;for(r=Object(t(r)),u=function(c){try{r[c]=i[c]}catch(d){o||(o=d)}},s=1;s-1},v$}var F8e=B8e()?String.prototype.contains:$8e(),IE=Vre,MV=N8e,Xre=Hre,qre=i8e,J1=F8e,z8e=Gre.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],IE(e)?(n=J1.call(e,"c"),r=J1.call(e,"e"),i=J1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Xre(qre(o),s):s};z8e.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],IE(t)?MV(t)?IE(n)?MV(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,IE(e)?(r=J1.call(e,"c"),i=J1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Xre(qre(o),s):s};var Xw=Gre.exports,k5={exports:{}};(function(e,t){var n=Xw,r=Ure,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,u=Object.defineProperties,c=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},h,p,m,v,y,S,w;h=function(b,x){var E;return r(x),c.call(this,"__ee__")?E=this.__ee__:(E=d.value=s(null),a(this,"__ee__",d),d.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,A;return r(x),A=this,h.call(this,b,E=function(){m.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},m=function(b,x){var E,A,I,R;if(r(x),!c.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(R=0;I=A[R];++R)(I===x||I.__eeOnceListener__===x)&&(A.length===2?E[b]=A[R?0:1]:A.splice(R,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,I,R;if(c.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=m?c.call(m,v,M,w):M,y?(d.value=M,h(b,w,d)):b[w]=M,++w;x=w}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),At(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Xi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:L$(i,r,(e/=60)+2),g:L$(i,r,e),b:L$(i,r,e-2)}},_U=function(e,t,n,r){return{r:At(255*(1-e)*(r=1-r)),g:At(255*(1-t)*r),b:At(255*(1-n)*r)}},eie=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:At(100*(i&&(i-e)/i)),m:At(100*o),y:At(100*s),k:At(100*r)}},lv=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,a=0,u=0,c=(i+o)/2;if(s!==0){switch(i){case e:a=(t-n)/s%6;break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}(a=At(60*a))<0&&(a+=360),u=s/(1-Math.abs(2*c-1))}return{h:a,s:At(100*u),l:At(100*c),a:r}},KV=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,a=0,u=0;return(t?n:r).find(function(c,d){return e>=c[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Bo=function(e){return typeof e=="string"&&(e=Lv.test(e)?BI(e)/100:+e),isNaN(+e)||e>1?1:At(e)},Nv=function(e,t,n){return t.reduce(function(r,i){return D5(D5([],r,!0),[un(un({},e),{h:n===qo.ADDITIVE?tw(e.h+i):tw(KV(KV(e.h,!1)+i,!0))})],!1)},[un({},e)])},fHe=function(e,t){return Nv(e,[30,-30],t)},dHe=function(e,t){return Nv(e,[180],t)},hHe=function(e,t){return Nv(e,[150,-150],t)},pHe=function(e,t){return Nv(e,[120,-120],t)},gHe=function(e,t){return Nv(e,[60,-120,180],t)},mHe=function(e,t){return Nv(e,[90,-90,180],t)},la=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Xt).some(function(r){if(b1[r].test(t))return n=r,!0}),!n&&~Jre.indexOf(t)&&(n=Xt.HEX),!n)throw new Error(uHe);return n}(e):function(t){var n,r=!1,i=Zre(Object.keys(t));if(L5[i]&&(n=L5[i]),n&&n===Xt.RGB){var o=Object.entries(t).some(function(a){return!N5.test("".concat(a[1]))}),s=Object.entries(t).some(function(a){return!(Lv.test("".concat(a[1]))||!N5.test("".concat(a[1]))&&!isNaN(+a[1])&&+a[1]<=255)});o&&s&&(r=!0),o||(n=Xt.HEX)}if(!n||r)throw new Error(cHe);return n}(e)},vHe=((Kb={})[Xt.HEX]=function(e){var t=(~Jre.indexOf(e)?uT[e]:e).match(b1.HEX),n={r:PS(t[1]||t[5]),g:PS(t[2]||t[6]),b:PS(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=PS(r)/255),n},Kb[Xt.RGB]=function(e){var t=e.match(b1.RGB),n=vp(t[1]||t[5]),r=vp(t[2]||t[6]),i=vp(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},Kb[Xt.HSL]=function(e){var t=e.match(b1.HSL),n=tw(t[1]||t[5]),r=cT(t[2]||t[6]),i=cT(t[3]||t[7]),o=t[4]||t[8],s=Xi(n,r,i);return o!==void 0&&(s.a=Bo(o)),s},Kb[Xt.CMYK]=function(e){var t=e.match(b1.CMYK),n=Lf(t[1]||t[6]),r=Lf(t[2]||t[7]),i=Lf(t[3]||t[8]),o=Lf(t[4]||t[9]),s=t[5]||t[10],a=_U(n,r,i,o);return s!==void 0&&(a.a=Bo(s)),a},Kb),yHe=((Qb={})[Xt.HEX]=function(e){var t={r:vp("".concat(e.r)),g:vp("".concat(e.g)),b:vp("".concat(e.b))};return po(e,"a")&&(t.a=Math.min(vp("".concat(e.a),!0),1)),t},Qb[Xt.RGB]=function(e){return this.HEX(e)},Qb[Xt.HSL]=function(e){var t=cT("".concat(e.s)),n=cT("".concat(e.l)),r=Xi(tw(e.h),t,n);return po(e,"a")&&(r.a=Bo(e.a)),r},Qb[Xt.CMYK]=function(e){var t=Lf("".concat(e.c)),n=Lf("".concat(e.m)),r=Lf("".concat(e.y)),i=Lf("".concat(e.k)),o=_U(t,n,r,i);return po(e,"a")&&(o.a=Bo(e.a)),o},Qb),Kp=function(e,t){return t===void 0&&(t=la(e)),typeof e=="string"?vHe[t](e):yHe[t](e)},an=((mc={})[Xt.HEX]=function(e){return{r:OS(e.r),g:OS(e.g),b:OS(e.b)}},mc.HEXA=function(e){var t=an.HEX(e);return t.a=po(e,"a")?OS(255*e.a):"0xFF",t},mc[Xt.RGB]=function(e,t){return po(e,"a")&&delete e.a,Rp(e,t)},mc.RGBA=function(e,t){return e.a=po(e,"a")?At(e.a):1,Rp(e,t)},mc[Xt.HSL]=function(e,t){var n=lv(e.r,e.g,e.b);return delete n.a,am(n,t)},mc.HSLA=function(e,t){var n=an.HSL(e,t);return n.a=po(e,"a")?At(e.a,t):1,n},mc[Xt.CMYK]=function(e,t){return bHe(eie(e.r,e.g,e.b),t)},mc.CMYKA=function(e,t){var n=an.CMYK(e,t);return n.a=po(e,"a")?At(e.a,t):1,n},mc),QV=function(e,t,n,r){var i=la(e),o=typeof e=="string",s=Kp(e,i),a=typeof e=="string"&&po(s,"a")||typeof e!="string"&&po(e,"a"),u=lv(s.r,s.g,s.b,s.a);a||delete u.a;var c=n?u.l/(t+1):(100-u.l)/(t+1),d=Array(t).fill(null).map(function(h,p){return un(un({},u),{l:u.l+c*(p+1)*(1-2*+n)})});switch(i){case Xt.HEX:default:return d.map(function(h){var p=Xi(h.h,h.s,h.l);return a&&(p.a=h.a),o?a?on.HEX(Rp(un(un({},p),{a:At(255*p.a)}),r)):on.HEX(Rp(p,r)):a?an.HEXA(p):an.HEX(p)});case Xt.RGB:return d.map(function(h){var p=Xi(h.h,h.s,h.l);return a&&(p.a=h.a),o?on.RGB(Rp(p,r)):a?an.RGBA(p,r):an.RGB(p,r)});case Xt.HSL:return d.map(function(h){return o?on.HSL(am(h,r)):a?an.HSLA(un(un({},Xi(h.h,h.s,h.l)),{a:h.a}),r):an.HSL(Xi(h.h,h.s,h.l),r)})}},_g=((Gh={buildHarmony:function(e,t,n,r){var i=la(e),o=Kp(e,i),s=lv(o.r,o.g,o.b,o.a),a=typeof e=="string"&&po(o,"a")||typeof e!="string"&&po(e,"a"),u=typeof e=="string";switch(i){case Xt.HEX:default:return a?this.HEXA(am(s,0),t,n,u):this.HEX(am(s,0),t,n,u);case Xt.HSL:return a?this.HSLA(s,t,n,u,r):this.HSL(s,t,n,u,r);case Xt.RGB:return a?this.RGBA(s,t,n,u,r):this.RGB(s,t,n,u,r)}}})[Xt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(Xi(i.h,i.s,i.l)):an.HEX(Xi(i.h,i.s,i.l))})},Gh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(un(un({},Xi(i.h,i.s,i.l)),{a:255*Bo(i.a)})):an.HEXA(un(un({},Xi(i.h,i.s,i.l)),{a:Bo(i.a)}))})},Gh[Xt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Rp(Xi(o.h,o.s,o.l),i)):an.RGB(Xi(o.h,o.s,o.l),i)})},Gh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Rp(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)):an.RGBA(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Gh[Xt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(am({h:o.h,s:o.s,l:o.l},i)):an.HSL(Xi(o.h,o.s,o.l),i)})},Gh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(am(un(un({},o),{a:Bo(o.a)}),i)):an.HSLA(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Gh),Sg=((Vh={mix:function(e,t){var n,r,i,o,s,a,u,c,d,h,p,m,v,y,S,w=e.map(function(A){var I=la(A);return Kp(A,I)}),b=t===qo.SUBTRACTIVE?w.map(function(A){var I,R,M,L,N,H,V,U,D,F,z,G,W,K,q=(I=A.r,R=A.g,M=A.b,L=Math.min(I,R,M),N=Math.min(255-I,255-R,255-M),H=I-L,V=R-L,U=M-L,D=Math.min(H,V),F=H-D,z=(V+D)/2,G=(U+V-D)/2,W=Math.max(F,z,G)/Math.max(H,V,U),K=isNaN(W)||W===1/0||W<=0?1:W,{r:F/K+N,y:z/K+N,b:G/K+N});return po(A,"a")&&(q.a=A.a),q}):null;function x(A){var I=t===qo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(R,M){var L=po(M,"a")?M.a:1,N={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,V="g"in M?M.g:M.y;return un(un({},N),t===qo.ADDITIVE?{g:Math.min(H+V*L,255)}:{y:Math.min(H+V*L,255)})},I)}if(t===qo.ADDITIVE)n=x(w);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),a=Math.min(255-r,255-i,255-o),u=r-s,c=i-s,d=o-s,h=Math.min(c,d),p=u+c-h,m=c+h,v=2*(d-h),y=Math.max(p,m,v)/Math.max(u,c,d),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+a,g:m/S+a,b:v/S+a}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:il(n.a,0,1)}}})[Xt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?on.HEX(r):an.HEX(r)},Vh.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Bo(r.a):Bo(r.a),n?on.HEX(r):an.HEXA(r)},Vh[Xt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?on.RGB(i):an.RGB(i,r)},Vh.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?on.RGB(i):an.RGBA(i,r)},Vh[Xt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=lv(i.r,i.g,i.b);return delete i.a,delete o.a,n?on.HSL(o):an.HSL(i,r)},Vh.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=lv(i.r,i.g,i.b,i.a);return n?on.HSL(o):an.HSLA(i,r)},Vh),Rp=function(e,t){return un({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},po(e,"a")?{a:At(e.a,t)}:{})},am=function(e,t){return un({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},po(e,"a")?{a:At(e.a,t)}:{})},bHe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},uf=function(e,t,n,r,i,o){var s=i(Kp(e,t),r);return n?o(s):s},Eg=function(e,t,n,r,i,o,s){n<1&&(n=5);var a=function(u,c,d){var h=d-1,p=(c.r-u.r)/h,m=(c.g-u.g)/h,v=(c.b-u.b)/h,y=Bo(u.a),S=(Bo(c.a)-y)/h;return Array(d).fill(null).map(function(w,b){return b===0?u:b===h?c:{r:At(u.r+p*b),g:At(u.g+m*b),b:At(u.b+v*b),a:At(y+S*b)}})}(Kp(e),Kp(t),n);return a.map(function(u){var c=o(u,i);return r?s(c):c})},xHe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Kp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=un(un({},Xi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=un(un({},_U(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=lv(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=eie(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=tw(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=il(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=il(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=il(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=il(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 At(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return At(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return At(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return At(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return At(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return At(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return At(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return At(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return At(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return At(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return At(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return an.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return an.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 un(un({},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 un(un({},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 un(un({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return on.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return on.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 on.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return on.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 on.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return on.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 on.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 on.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=la(t);return uf(t,r,n,0,an.HEX,on.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=la(t);return uf(t,r,n,0,an.HEXA,on.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.RGB,on.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.RGBA,on.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.HSL,on.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.HSLA,on.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.CMYK,on.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.CMYKA,on.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),Eg(t,n,r,i,o,an.HEX,on.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),Eg(t,n,r,i,o,an.HEXA,on.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),Eg(t,n,r,i,o,an.RGB,on.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),Eg(t,n,r,i,o,an.RGBA,on.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),Eg(t,n,r,i,o,an.HSL,on.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),Eg(t,n,r,i,o,an.HSLA,on.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),Sg.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),Sg.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),QV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),QV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=bc.COMPLEMENTARY),r===void 0&&(r=qo.ADDITIVE),i===void 0&&(i=6),function(o,s,a,u){var c;return(c={},c[bc.ANALOGOUS]=_g.buildHarmony(s,fHe,u,a),c[bc.COMPLEMENTARY]=_g.buildHarmony(s,dHe,u,a),c[bc.SPLIT_COMPLEMENTARY]=_g.buildHarmony(s,hHe,u,a),c[bc.TRIADIC]=_g.buildHarmony(s,pHe,u,a),c[bc.TETRADIC]=_g.buildHarmony(s,gHe,u,a),c[bc.SQUARE]=_g.buildHarmony(s,mHe,u,a),c)[o]}(n,t,i,r)},e}();const wHe={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:Qi,PI:_He}=Math,qw=(e,t)=>new xHe(e).setA(t??wHe.alpha).RGBA,SHe=(e,t)=>qw(e,t);function ud(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 EHe={draw(e,t,n){if(e.text){const r=ud(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=ud(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=qw(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}}},CHe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=ud(e,n);t.fillStyle=qw(e.fill,e.alpha),t.fillRect(Qi(r),Qi(i),Qi(o)||1,Qi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},THe={draw(e,t,n){t.fillStyle=qw(e.fill,e.alpha),t.beginPath();const r=ud({...e,width:e.radius,height:e.radius},n);t.ellipse(Qi(r.x),Qi(r.y),Qi(r.width),Qi(r.height),0,0,2*_He),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}}},AHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=qw(e.fill,e.alpha);const{x:o,y:s}=ud({...r,width:0,height:0},n);t.moveTo(Qi(o),Qi(s));for(const a of i){const{x:u,y:c}=ud({...a,width:0,height:0},n);t.lineTo(Qi(u),Qi(c))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=en.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=en.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=en.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=en.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},IHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=SHe(e.fill,e.alpha);const{x:o,y:s,width:a}=ud({...r,width:e.lineWidth,height:0},n);t.lineWidth=Qi(a),t.moveTo(Qi(o),Qi(s));for(const u of i){const{x:c,y:d}=ud({...u,width:0,height:0},n);t.lineTo(Qi(c),Qi(d))}t.stroke()},test(e){var t,n,r,i;return{left:((t=en.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=en.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=en.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=en.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},RHe={text:EHe,path:IHe,rect:CHe,polygon:AHe,circle:THe},{log2:PHe,max:OHe}=Math,JV=e=>en.floor(PHe(e+1));function ZV({right:e,left:t,bottom:n,top:r},i){const o=OHe(JV(e-t),JV(n-r))-i,s=2**o,a={left:en.floor(t/s),right:en.ceil((e+1)/s),top:en.floor(r/s),bottom:en.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Qje({x:en.range(a.left,a.right+1),y:en.range(a.top,a.bottom+1)}).map(u=>{const c=u.x*s,d=u.y*s;return{tile:u,bounds:{left:c-s/2,right:c+s/2,top:d-s/2,bottom:d+s/2}}})}}const MHe=""+new URL("D2Renderer.worker-df022396.js",import.meta.url).href;class kHe extends Worker{constructor(){super(MHe,{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 DHe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:eX,min:tX}=Math,tie=class nie extends ag{constructor(t,n){super(t),this.bounds=n,this.age=nie.age++}};tie.age=0;let LHe=tie;var aa,Xr,Ef,Sc,uo,jl,Cf,Tf,mT,vT,rie,yT,iie,Am,aw,bT,xT,oie,wT,sie,_T,aie,ST,lie,lw,B5,uw,$5,ET,uie,cw,F5,CT,cie,TT,fie;class NHe extends oHe{constructor(){super(...arguments);yr(this,vT);yr(this,yT);yr(this,xT);yr(this,wT);yr(this,_T);yr(this,ST);yr(this,lw);yr(this,uw);yr(this,ET);yr(this,cw);yr(this,CT);yr(this,TT);yr(this,aa,void 0);yr(this,Xr,void 0);yr(this,Ef,void 0);yr(this,Sc,void 0);yr(this,uo,CV);yr(this,jl,[]);yr(this,Cf,new Yje(16));yr(this,Tf,void 0);yr(this,mT,0);yr(this,Am,en.once(()=>en.debounce(()=>io(this,lw,B5).call(this),ot(this,uo).debounceInterval)));yr(this,aw,en.once(()=>en.throttle(()=>io(this,uw,$5).call(this),ot(this,uo).refreshInterval)));yr(this,bT,en.once(()=>en.throttle(n=>io(this,ET,uie).call(this,n),ot(this,uo).refreshInterval)))}getInstance(){return{app:ot(this,aa),viewport:ot(this,Xr)}}fitCamera(){var r,i,o,s;const n=en.values(ot(this,Cf).all()).flat();if(n.length){const a=en.reduce(n,(u,c)=>({top:tX(u.top,c.top),left:tX(u.top,c.left),bottom:eX(u.bottom,c.bottom),right:eX(u.right,c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=ot(this,Xr))==null?void 0:r.animate)==null||s.call(r,{position:new Dt((a.left+a.right)/2,(a.top+a.bottom)/2),scale:((o=(i=ot(this,Xr))==null?void 0:i.findFit)==null?void 0:o.call(i,a.right-a.left,a.bottom-a.top))*.8,ease:"easeOutExpo",time:ot(this,uo).animationDuration*1.5,callbackOnComplete:()=>ot(this,Am).call(this)()})}}initialCamera(){var n,r;(r=(n=ot(this,Xr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:ot(this,uo).animationDuration*1.5,callbackOnComplete:()=>ot(this,Am).call(this)()})}getView(){var n;return(n=ot(this,aa))==null?void 0:n.view}setup(n){const r={...CV,...n};io(this,yT,iie).call(this,r),this.setOptions(r),io(this,wT,sie).call(this,r)}destroy(){en.map(ot(this,jl),n=>n.terminate()),ot(this,aa).destroy()}add(n){const r=yFe(),i=en.map(n,({component:o,meta:s})=>({...RHe[o.$].test(o),component:o,meta:s,index:io(this,vT,rie).call(this)}));return ot(this,Cf).load(i),en.map(ot(this,jl),o=>o.call("add",[en.map(n,"component"),r])),()=>{for(const o of i)ot(this,Cf).remove(o);en.map(ot(this,jl),o=>o.call("remove",[r]))}}setOptions(n){const r={...ot(this,uo),...n};io(this,_T,aie).call(this,r),fc(this,uo,r),io(this,lw,B5).call(this),io(this,uw,$5).call(this)}}aa=new WeakMap,Xr=new WeakMap,Ef=new WeakMap,Sc=new WeakMap,uo=new WeakMap,jl=new WeakMap,Cf=new WeakMap,Tf=new WeakMap,mT=new WeakMap,vT=new WeakSet,rie=function(){return HU(this,mT)._++},yT=new WeakSet,iie=function(n){fc(this,aa,new vU({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height})),fc(this,Xr,new f6e({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:ot(this,aa).renderer.events,passiveWheel:!1})),ot(this,Xr).on("clicked",r=>{const{x:i,y:o}=r.world,s=ot(this,Cf).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})}),ot(this,aa).stage.addChild(ot(this,Xr)),ot(this,Xr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-4}),ot(this,Xr).on("moved",()=>{ot(this,Am).call(this)(),ot(this,aw).call(this)()}),ot(this,Xr).on("mousemove",r=>ot(this,bT).call(this)(r)),fc(this,Ef,new us),ot(this,Xr).addChild(ot(this,Ef)),fc(this,Sc,new av),ot(this,Xr).addChild(ot(this,Sc)),fc(this,Tf,new av),ot(this,Xr).addChild(ot(this,Tf)),io(this,xT,oie).call(this)},Am=new WeakMap,aw=new WeakMap,bT=new WeakMap,xT=new WeakSet,oie=function(){const{tileResolution:n,dynamicResolution:r}=ot(this,uo),{dtMax:i,dtMin:o,increment:s,intervalMs:a,maxScale:u,minScale:c}=r,d=en.floor(Si.targetFPMS*a);let h=0,p=0,m=1;ot(this,aa).ticker.add(v=>{if(!(h%d)){const y=p/d;m=en.clamp(y>=i?m+s:y<=o?m-s:m,c,u),en.map(ot(this,jl),S=>{S.call("setTileResolution",[{width:en.ceil(n.width/m),height:en.ceil(n.height/m)}])}),p=0}p+=v,h++})},wT=new WeakSet,sie=function(n){en.map(ot(this,jl),r=>r.terminate()),fc(this,jl,en.times(n.workerCount,r=>{const i=new kHe;return i.on("update",o=>io(this,ST,lie).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},_T=new WeakSet,aie=function(n){var o,s,a,u;const{width:r,height:i}=n.screenSize;(a=(s=(o=ot(this,aa))==null?void 0:o.renderer)==null?void 0:s.resize)==null||a.call(s,r,i),(u=ot(this,Xr))==null||u.resize(r,i)},ST=new WeakSet,lie=function({bounds:n,bitmap:r}){const i=pt.from(r);io(this,CT,cie).call(this,i,n)},lw=new WeakSet,B5=function(){const{top:n,bottom:r,left:i,right:o}=ot(this,Xr);en.map(ot(this,jl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},uw=new WeakSet,$5=function(){var s,a,u,c,d;const{tileSubdivision:n,accentColor:r}=ot(this,uo),{tiles:i}=ZV(ot(this,Xr),n),o=io(this,cw,F5).call(this);(s=ot(this,Sc))==null||s.clear(),(a=ot(this,Sc))==null||a.lineStyle(1*o,r,.5),(u=ot(this,Sc))==null||u.beginFill(r,.05);for(const{bounds:h,tile:p}of i)en.find((c=ot(this,Ef))==null?void 0:c.children,m=>en.isEqual(m.bounds,h))||(d=ot(this,Sc))==null||d.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},ET=new WeakSet,uie=function(n){var u;const{accentColor:r}=ot(this,uo),i=io(this,cw,F5).call(this),{x:o,y:s}=ot(this,Xr).toWorld(n.globalX,n.globalY),a=ot(this,Cf).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});ot(this,Tf).clear(),ot(this,Tf).lineStyle(2*i,r,1);for(const c of a)(u=ot(this,Tf))==null||u.drawRect(c.left,c.top,c.right-c.left,c.bottom-c.top)},cw=new WeakSet,F5=function(){const{right:n,left:r}=ot(this,Xr),{width:i}=ot(this,uo).screenSize;return(n-r)/i},CT=new WeakSet,cie=async function(n,r){var s;const{tileSubdivision:i}=ot(this,uo),{tiles:o}=ZV(ot(this,Xr),i);if(en.find(o,a=>en.isEqual(a.bounds,r))){const a={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},u=new LHe(n,r);(s=ot(this,Ef))==null||s.addChild(u).setTransform(r.left,r.top,a.x,a.y),ot(this,aw).call(this)(),await io(this,TT,fie).call(this,u);for(const c of ot(this,Ef).children)DHe(c.bounds,r)&&c.age{const o=s=>{n.alpha+=s/Si.targetFPMS/ot(this,uo).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})};const BHe=zje(NHe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),$He={"d2-renderer":BHe};var FHe=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},SU={},zHe=Object.prototype.hasOwnProperty,UHe;function nX(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function rX(e){try{return encodeURIComponent(e)}catch{return null}}function jHe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=nX(r[1]),o=nX(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function HHe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(zHe.call(e,i)){if(r=e[i],!r&&(r===null||r===UHe||isNaN(r))&&(r=""),i=rX(i),r=rX(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}SU.stringify=HHe;SU.parse=jHe;var die=FHe,$I=SU,WHe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,hie=/[\n\r\t]/g,GHe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,pie=/:\d+$/,VHe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,XHe=/^[a-zA-Z]:/;function EU(e){return(e||"").toString().replace(WHe,"")}var z5=[["#","hash"],["?","query"],function(t,n){return lu(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]],iX={hash:1,query:1};function gie(e){var t;typeof window<"u"?t=window:typeof Kt<"u"?t=Kt: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 hu(unescape(e.pathname),{});else if(i==="string"){r=new hu(e,{});for(o in iX)delete r[o]}else if(i==="object"){for(o in e)o in iX||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=GHe.test(e.href))}return r}function lu(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function mie(e,t){e=EU(e),e=e.replace(hie,""),t=t||{};var n=VHe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,a;return i?o?(a=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(a=n[2]+n[4],s=n[2].length):o?(a=n[3]+n[4],s=n[3].length):a=n[4],r==="file:"?s>=2&&(a=a.slice(2)):lu(r)?a=n[4]:r?i&&(a=a.slice(2)):s>=2&&lu(t.protocol)&&(a=n[4]),{protocol:r,slashes:i||lu(r),slashesCount:s,rest:a}}function qHe(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 hu(e,t,n){if(e=EU(e),e=e.replace(hie,""),!(this instanceof hu))return new hu(e,t,n);var r,i,o,s,a,u,c=z5.slice(),d=typeof t,h=this,p=0;for(d!=="object"&&d!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=$I.parse),t=gie(t),i=mie(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||XHe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!lu(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const a=new yie[r].constructor({url:i});n.push({key:o,url:i,renderer:await a.get()})}t(n)},[e,t]),C.jsx(C.Fragment,{})}const eWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function tWe({value:e,onValueChange:t}){const[n]=xI(),r=ie.find(n,{key:e.key});function i(s){t==null||t(Bz(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(ane,{sx:{color:eWe[o]}}),C.jsx(ai,{}),C.jsxs(gt,{flex:1,children:[C.jsx(Wt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ie.startCase(o)}),C.jsx(Wt,{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(vd,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(gt,{children:C.jsx(Gm,{checked:!e.disabled,onChange:(s,a)=>i({disabled:!a})})})}),C.jsx(T6,{trigger:s=>C.jsx(im,{icon:C.jsx($A,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(C6,{children:"Edit Renderer"})},children:C.jsxs(gt,{p:2.5,children:[C.jsx(ww,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx($1,{placeholder:"Renderer Type",items:ie.entries(yie).map(([s,{name:a}])=>({value:s,label:a})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var CU={},FI={},Yw={};(function(e){var t=Kt&&Kt.__extends||function(){var m=function(v,y){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(S[b]=w[b])},m(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");m(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(m){return typeof m=="string"||typeof m=="number"||m===null};e.isJSONRPCID=n;var r=function(m){return m.jsonrpc===e.JSONRPC&&m.method!==void 0&&m.result===void 0&&m.error===void 0};e.isJSONRPCRequest=r;var i=function(m){return Array.isArray(m)&&m.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(m){return m.jsonrpc===e.JSONRPC&&m.id!==void 0&&(m.result!==void 0||m.error!==void 0)};e.isJSONRPCResponse=o;var s=function(m){return Array.isArray(m)&&m.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var a=function(m,v,y){var S={code:m,message:v};return y!=null&&(S.data=y),S},u=function(m){t(v,m);function v(y,S,w){var b=m.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=w,b}return v.prototype.toObject=function(){return a(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=u,function(m){m[m.ParseError=-32700]="ParseError",m[m.InvalidRequest=-32600]="InvalidRequest",m[m.MethodNotFound=-32601]="MethodNotFound",m[m.InvalidParams=-32602]="InvalidParams",m[m.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var c=function(m,v,y,S){return{jsonrpc:e.JSONRPC,id:m,error:a(v,y,S)}};e.createJSONRPCErrorResponse=c;var d=function(m,v){return{jsonrpc:e.JSONRPC,id:m,result:v??null}};e.createJSONRPCSuccessResponse=d;var h=function(m,v,y){return{jsonrpc:e.JSONRPC,id:m,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(m,v){return{jsonrpc:e.JSONRPC,method:m,params:v}};e.createJSONRPCNotification=p})(Yw);var Kw={};Object.defineProperty(Kw,"__esModule",{value:!0});Kw.DefaultErrorCode=void 0;Kw.DefaultErrorCode=0;var oX=Kt&&Kt.__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 a(d){try{c(r.next(d))}catch(h){s(h)}}function u(d){try{c(r.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):i(d.value).then(a,u)}c((r=r.apply(e,t||[])).next())})},sX=Kt&&Kt.__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:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return u([c,d])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[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 xWe={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 wWe{constructor(t){fg(this,"handler");this.options=t;const{hostname:n}=vie(t.url);this.handler=xWe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const pu=Object.create(null);pu.open="0";pu.close="1";pu.ping="2";pu.pong="3";pu.message="4";pu.upgrade="5";pu.noop="6";const RE=Object.create(null);Object.keys(pu).forEach(e=>{RE[pu[e]]=e});const U5={type:"error",data:"parser error"},xie=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wie=typeof ArrayBuffer=="function",_ie=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,TU=({type:e,data:t},n,r)=>xie&&t instanceof Blob?n?r(t):cX(t,r):wie&&(t instanceof ArrayBuffer||_ie(t))?n?r(t):cX(new Blob([t]),r):r(pu[e]+(t||"")),cX=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function fX(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let B$;function _We(e,t){if(xie&&e.data instanceof Blob)return e.data.arrayBuffer().then(fX).then(t);if(wie&&(e.data instanceof ArrayBuffer||_ie(e.data)))return t(fX(e.data));TU(e,!1,n=>{B$||(B$=new TextEncoder),t(B$.encode(n))})}const dX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r>4,d[i++]=(s&15)<<4|a>>2,d[i++]=(a&3)<<6|u&63;return c},EWe=typeof ArrayBuffer=="function",AU=(e,t)=>{if(typeof e!="string")return{type:"message",data:Sie(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CWe(e.substring(1),t)}:RE[n]?e.length>1?{type:RE[n],data:e.substring(1)}:{type:RE[n]}:U5},CWe=(e,t)=>{if(EWe){const n=SWe(e);return Sie(n,t)}else return{base64:!0,data:e}},Sie=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Eie=String.fromCharCode(30),TWe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{TU(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Eie))})})},AWe=(e,t)=>{const n=e.split(Eie),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 F$;function LS(e){return e.reduce((t,n)=>t+n.length,0)}function NS(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){a.enqueue(U5);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(LS(n)e){a.enqueue(U5);break}}}})}const Cie=4;function li(e){if(e)return PWe(e)}function PWe(e){for(var t in li.prototype)e[t]=li.prototype[t];return e}li.prototype.on=li.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};li.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};li.prototype.off=li.prototype.removeListener=li.prototype.removeAllListeners=li.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 Tie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const OWe=ha.setTimeout,MWe=ha.clearTimeout;function jI(e,t){t.useNativeTimers?(e.setTimeoutFn=OWe.bind(ha),e.clearTimeoutFn=MWe.bind(ha)):(e.setTimeoutFn=ha.setTimeout.bind(ha),e.clearTimeoutFn=ha.clearTimeout.bind(ha))}const kWe=1.33;function DWe(e){return typeof e=="string"?LWe(e):Math.ceil((e.byteLength||e.size)*kWe)}function LWe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function NWe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BWe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Iie(){const e=gX(+new Date);return e!==pX?(hX=0,pX=e):e+"."+gX(hX++)}for(;BS{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)};AWe(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,TWe(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]=Iie()),!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 uu(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 uu extends li{constructor(t,n){super(),jI(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=Tie(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Pie(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=uu.requestsCount++,uu.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=UWe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete uu.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()}}uu.requestsCount=0;uu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mX);else if(typeof addEventListener=="function"){const e="onpagehide"in ha?"pagehide":"unload";addEventListener(e,mX,!1)}}function mX(){for(let e in uu.requests)uu.requests.hasOwnProperty(e)&&uu.requests[e].abort()}const RU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),$S=ha.WebSocket||ha.MozWebSocket,vX=!0,WWe="arraybuffer",yX=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class GWe extends IU{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=yX?{}:Tie(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=vX&&!yX?n?new $S(t,n):new $S(t):new $S(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{vX&&this.ws.send(o)}catch{}i&&RU(()=>{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]=Iie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!$S}}class VWe extends IU{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=RWe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=IWe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:u})=>{a||(this.onPacket(u),o())}).catch(a=>{})};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&&RU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const XWe={websocket:GWe,webtransport:VWe,polling:HWe},qWe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,YWe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H5(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=qWe.exec(e||""),o={},s=14;for(;s--;)o[YWe[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=KWe(o,o.path),o.queryKey=QWe(o,o.query),o}function KWe(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 QWe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Oie=class Bg extends li{constructor(t,n={}){super(),this.binaryType=WWe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=H5(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=H5(n.host).host),jI(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=BWe(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=Cie,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 XWe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bg.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;Bg.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;Bg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),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,d(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function a(){s("transport closed")}function u(){s("socket closed")}function c(h){n&&h.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",u),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",u),this.once("upgrading",c),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Bg.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){Bg.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,Mie=Object.prototype.toString,tGe=typeof Blob=="function"||typeof Blob<"u"&&Mie.call(Blob)==="[object BlobConstructor]",nGe=typeof File=="function"||typeof File<"u"&&Mie.call(File)==="[object FileConstructor]";function PU(e){return ZWe&&(e instanceof ArrayBuffer||eGe(e))||tGe&&e instanceof Blob||nGe&&e instanceof File}function PE(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,a)=>r?s?o(s):i(a):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:mn.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 mn.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 mn.EVENT:case mn.BINARY_EVENT:this.onevent(t);break;case mn.ACK:case mn.BINARY_ACK:this.onack(t);break;case mn.DISCONNECT:this.ondisconnect();break;case mn.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:mn.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:mn.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}Bv.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};Bv.prototype.reset=function(){this.attempts=0};Bv.prototype.setMin=function(e){this.ms=e};Bv.prototype.setMax=function(e){this.max=e};Bv.prototype.setJitter=function(e){this.jitter=e};class V5 extends li{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,jI(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 Bv({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||uGe;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 Oie(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ul(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=ul(n,"error",o);if(this._timeout!==!1){const a=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}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(ul(t,"ping",this.onping.bind(this)),ul(t,"data",this.ondata.bind(this)),ul(t,"error",this.onerror.bind(this)),ul(t,"close",this.onclose.bind(this)),ul(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){RU(()=>{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 kie(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 Jb={};function OE(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=JWe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Jb[i]&&o in Jb[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return a?u=new V5(r,t):(Jb[i]||(Jb[i]=new V5(r,t)),u=Jb[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(OE,{Manager:V5,Socket:kie,io:OE,connect:OE});class fGe{constructor(t){fg(this,"rpc");fg(this,"socket");this.options=t,this.socket=OE(t.url),this.rpc=new CU.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 MU={socketio:{name:"socket.io",constructor:fGe},ipc:{name:"Web Worker",constructor:bWe},native:{name:"Internal",constructor:wWe}};function dGe(e){return MU[e].constructor}const Die=ie.first(ie.keys(MU));function hGe(){const[{renderer:e},t]=Jc();return C.jsx(C.Fragment,{children:C.jsx(iI,{editor:n=>C.jsx(tWe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({renderer:n}),300),addItemLabel:"Add Renderer",create:()=>({transport:Die,url:"",disabled:!0}),extras:C.jsx(Hp,{icon:C.jsx(PQ,{}),sx:{ml:2},onClick:()=>t({renderer:CJ}),children:"Reset to Defaults"})})})}function pGe(e){const[{connections:t}]=dI(),n=eU(),[{remote:r}]=Jc(),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 gGe={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function mGe({value:e,onValueChange:t}){const n=z$e(e.url),r=pGe(e.url);function i(o){t==null||t(Bz(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(ane,{sx:{color:gGe[r]}}),C.jsx(ai,{}),C.jsxs(gt,{flex:1,children:[C.jsx(Wt,{children:n?`${n.name} ${n.version}`:ie.startCase(r)}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(vd,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(gt,{children:C.jsx(Gm,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(T6,{trigger:o=>C.jsx(im,{icon:C.jsx($A,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(C6,{children:"Edit Connection"})},children:C.jsxs(gt,{p:2.5,children:[C.jsx(ww,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx($1,{placeholder:"Connection Type",items:ie.entries(MU).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function vGe(){const[{remote:e},t]=Jc();return C.jsx(C.Fragment,{children:C.jsx(iI,{editor:n=>C.jsx(mGe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({remote:n}),300),addItemLabel:"Add Solver",create:()=>({transport:Die,url:"",disabled:!0}),extras:C.jsx(Hp,{icon:C.jsx(PQ,{}),sx:{ml:2},onClick:()=>t({remote:EJ}),children:"Reset to Defaults"})})})}const xX=e=>`${e}x`;function yGe(){const{controls:e,onChange:t,state:n}=bd(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},a]=Jc(),[u,c]=O.useState("general");function d(p){return C.jsx(Wt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(Wt,{variant:"body1",children:p})}return C.jsx(IJ,{value:u,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(MJ,{onChange:(p,m)=>c(m),children:[C.jsx(Qg,{label:"General",value:"general"}),C.jsx(Qg,{label:"Connections",value:"connections"}),C.jsx(Qg,{label:"Renderers",value:"renderers"}),C.jsx(Qg,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:C.jsx(GA,{y:!0,children:C.jsxs(En,{vertical:!0,pt:6,children:[C.jsx(tm,{value:"general",children:C.jsxs(gt,{children:[d("Playback"),C.jsxs(En,{alignItems:"center",children:[h("Playback Rate"),C.jsx(ai,{flex:1}),C.jsx(Obe,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*Rg,label:xX(p)})),step:.25*Rg,min:.25*Rg,max:5*Rg,valueLabelFormat:p=>xX(p/Rg),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,m)=>a({playbackRate:m})})]}),d("UI"),C.jsxs(En,{alignItems:"center",children:[h("Acrylic"),C.jsx(ai,{flex:1}),C.jsx(Gm,{defaultChecked:!!i,onChange:(p,m)=>a({acrylic:m})})]}),C.jsxs(En,{alignItems:"center",children:[h("Dark Mode"),C.jsx(ai,{flex:1}),C.jsx(Gm,{defaultChecked:o==="dark",onChange:(p,m)=>a({theme:m?"dark":"light"})})]}),C.jsxs(En,{alignItems:"center",children:[h("Accent"),C.jsx(ai,{flex:1}),C.jsx(Hs,{value:s,items:ie.map(ie.keys(rSe),p=>({id:p,name:ie.startCase(p)})),showArrow:!0,onChange:p=>a({accentColor:p})})]})]})}),C.jsx(tm,{value:"connections",children:C.jsxs(gt,{children:[d("Solvers"),C.jsx(vGe,{})]})}),C.jsx(tm,{value:"renderers",children:C.jsxs(gt,{children:[d("Renderers"),C.jsx(hGe,{})]})}),C.jsx(tm,{value:"map-parsers",children:C.jsxs(gt,{children:[d("Map Parsers"),C.jsx(bGe,{})]})})]})})})}),C.jsx(zn.Extras,{children:e})]})})}function bGe(){return C.jsx(Wm,{children:ie.keys(Z6).map(e=>C.jsx(N1,{children:C.jsx(ru,{primary:e,secondary:"Internal"})},e))})}function xGe(){return O.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function wGe(e){var d,h;const t=mu(),[{playback:n,step:r=0},i]=Vp(),{events:o}=ine((h=(d=e==null?void 0:e.source)==null?void 0:d.trace)==null?void 0:h.content),s=!!o,a=n==="playing",[u,c]=[0,((o==null?void 0:o.length)??1)-1];return O.useMemo(()=>{const p={start:u,end:c,step:r,canPlay:s&&!a&&r0},m=y=>ie.clamp(r+y,u,c);return{playing:n==="playing",...p,...{play:()=>{t("Playback started"),i({playback:"playing",step:m(1)})},pause:(y=0)=>{t("Playback paused"),i({playback:"paused",step:m(y)})},stop:()=>i({step:u,playback:"paused"}),stepForward:()=>i({step:m(1)}),stepBackward:()=>i({step:m(-1)}),tick:(y=1)=>i({playback:"playing",step:m(y)})}}},[c,n,a,s,i,u,r])}function _Ge(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function SGe({layer:e}){const{step:t,tick:n,end:r,playing:i,canPause:o,canPlay:s,canStepBackward:a,canStepForward:u,canStop:c,pause:d,play:h,stepBackward:p,stepForward:m,stop:v}=wGe(e);Jxe();const y=mu(),[{playbackRate:S=1}]=Jc(),w=xGe(),b=O.useCallback((x,E)=>C.jsx(Dz,{primary:x,secondary:`Step ${t+E}`}),[t]);return O.useEffect(()=>{if(i)return t{for(const x of ie.range(S)){const E=w(t+x);if(E.result||E.error)return{...E,offset:x}}return{result:"",offset:0,error:void 0}},({result:x,offset:E,error:A})=>{A?(y(`${ie.trimEnd(A,".")}.`,`${E}`),d()):x?(y(`Breakpoint hit: ${x}.`,`${E}`),d(E)):n(S)}):d()},[b,i,r,t,d,n,y,w,S]),C.jsxs(C.Fragment,{children:[C.jsx(im,{label:"step-backward",icon:C.jsx(Cxe,{}),onClick:p,disabled:!a}),C.jsx(im,{...i?{label:"pause",icon:C.jsx(bxe,{}),onClick:()=>d(),disabled:!o}:{label:"play",icon:C.jsx(wxe,{}),onClick:()=>h(),disabled:!s,color:"primary"}}),C.jsx(im,{label:"step-forward",icon:C.jsx(Exe,{}),onClick:m,disabled:!u}),C.jsx(im,{label:"stop",icon:C.jsx(Txe,{}),onClick:v,disabled:!c})]})}const HI=0,Sd=1,$v=2,Lie=4;function Nie(e,t){return n=>e(t(n))}function EGe(e,t){return t(e)}function Bie(e,t){return n=>e(t,n)}function wX(e,t){return()=>e(t)}function WI(e,t){return t(e),e}function Ar(...e){return e}function CGe(e){e()}function _X(e){return()=>e}function TGe(...e){return()=>{e.map(CGe)}}function kU(e){return e!==void 0}function Fv(){}function Xn(e,t){return e(Sd,t)}function rn(e,t){e(HI,t)}function DU(e){e($v)}function zs(e){return e(Lie)}function Et(e,t){return Xn(e,Bie(t,HI))}function Vc(e,t){const n=e(Sd,r=>{n(),t(r)});return n}function Sn(){const e=[];return(t,n)=>{switch(t){case $v:e.splice(0,e.length);return;case Sd:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case HI:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function tt(e){let t=e;const n=Sn();return(r,i)=>{switch(r){case Sd:i(t);break;case HI:t=i;break;case Lie:return t}return n(r,i)}}function AGe(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case Sd:return o?n===o?void 0:(r(),n=o,t=Xn(e,o),t):(r(),Fv);case $v:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function qs(e){return WI(Sn(),t=>Et(e,t))}function Fo(e,t){return WI(tt(t),n=>Et(e,n))}function IGe(...e){return t=>e.reduceRight(EGe,t)}function Me(e,...t){const n=IGe(...t);return(r,i)=>{switch(r){case Sd:return Xn(e,n(i));case $v:DU(e);return}}}function $ie(e,t){return e===t}function Sr(e=$ie){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function ct(e){return t=>Nie(t,e)}function _c(e){return t=>()=>t(e)}function Ql(e,t){return n=>r=>n(t=e(t,r))}function uv(e){return t=>n=>{e>0?e--:t(n)}}function Nf(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function SX(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function cn(...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 a=Math.pow(2,s);Xn(o,u=>{const c=n;n=n|a,t[s]=u,c!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const a=()=>o([s].concat(t));n===i?a():r=a}}function EX(...e){return function(t,n){switch(t){case Sd:return TGe(...e.map(r=>Xn(r,n)));case $v:return;default:throw new Error(`unrecognized action ${t}`)}}}function jt(e,t=$ie){return Me(e,Sr(t))}function Ri(...e){const t=Sn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);Xn(o,u=>{n[s]=u,r=r|a,r===i&&rn(t,n)})}),function(o,s){switch(o){case Sd:return r===i&&s(n),Xn(t,s);case $v:return DU(t);default:throw new Error(`unrecognized action ${o}`)}}}function Wn(e,t=[],{singleton:n}={singleton:!0}){return{id:RGe(),constructor:e,dependencies:t,singleton:n}}const RGe=()=>Symbol();function PGe(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=i(o.map(u=>n(u)));return s&&t.set(r,a),a};return n(e)}function OGe(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[w]=b=>{const x=y[t.methods[w]];rn(x,b)},S),{})}function d(y){return s.reduce((S,w)=>(S[w]=AGe(y[t.events[w]]),S),{})}return{Component:fe.forwardRef((y,S)=>{const{children:w,...b}=y,[x]=fe.useState(()=>WI(PGe(e),A=>u(A,b))),[E]=fe.useState(wX(d,x));return FS(()=>{for(const A of s)A in b&&Xn(E[A],b[A]);return()=>{Object.values(E).map(DU)}},[b,E,x]),FS(()=>{u(x,b)}),fe.useImperativeHandle(S,_X(c(x))),fe.createElement(a.Provider,{value:x},n?fe.createElement(n,OGe([...r,...i,...s],b),w):w)}),usePublisher:y=>fe.useCallback(Bie(rn,fe.useContext(a)[y]),[y]),useEmitterValue:y=>{const w=fe.useContext(a)[y],[b,x]=fe.useState(wX(zs,w));return FS(()=>Xn(w,E=>{E!==b&&x(_X(E))}),[w,b]),b},useEmitter:(y,S)=>{const b=fe.useContext(a)[y];FS(()=>Xn(b,S),[S,b])}}}const MGe=typeof document<"u"?fe.useLayoutEffect:fe.useEffect,kGe=MGe;var Ys=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ys||{});const DGe={0:"debug",1:"log",2:"warn",3:"error"},LGe=()=>typeof globalThis>"u"?window:globalThis,Ed=Wn(()=>{const e=tt(3);return{log:tt((n,r,i=1)=>{var o;const s=(o=LGe().VIRTUOSO_LOG_LEVEL)!=null?o:zs(e);i>=s&&console[DGe[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function LU(e,t=!0){const n=fe.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=fe.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 ug(e,t=!0){return LU(e,t).callbackRef}function NGe(e,t,n,r,i,o,s){const a=fe.useCallback(u=>{const c=BGe(u.children,t,"offsetHeight",i);let d=u.parentElement;for(;!d.dataset.virtuosoScroller;)d=d.parentElement;const h=d.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=s?s.scrollHeight:h?document.documentElement.scrollHeight:d.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:d.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v}),o==null||o($Ge("row-gap",getComputedStyle(u).rowGap,i)),c!==null&&e(c)},[e,t,i,o,s,r]);return LU(a,n)}function BGe(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,m=p===window||p===document,v=m?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=m?document.documentElement.scrollHeight:p.scrollHeight,S=m?window.innerHeight:p.offsetHeight,w=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?w():Kg.flushSync(w),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);fe.useEffect(()=>{const h=i||o.current;return r(i||o.current),u({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",u,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",u)}},[o,u,n,r,i]);function c(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const m=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(cd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=cd(p,"height"),S=p.scrollTop);const w=y-v;if(h.top=Math.ceil(Math.max(Math.min(w,h.top),0)),zie(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),m&&t(!0);return}m?(s.current=h.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function d(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:d,scrollToCallback:c}}const Wo=Wn(()=>{const e=Sn(),t=Sn(),n=tt(0),r=Sn(),i=tt(0),o=Sn(),s=Sn(),a=tt(0),u=tt(0),c=tt(0),d=tt(0),h=Sn(),p=Sn(),m=tt(!1);return Et(Me(e,ct(({scrollTop:v})=>v)),t),Et(Me(e,ct(({scrollHeight:v})=>v)),s),Et(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:a,fixedHeaderHeight:u,fixedFooterHeight:c,footerHeight:d,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:m}},[],{singleton:!0}),nw={lvl:0};function jie(e,t,n,r=nw,i=nw){return{k:e,v:t,lvl:n,l:r,r:i}}function rr(e){return e===nw}function Tm(){return nw}function X5(e,t){if(rr(e))return nw;const{k:n,l:r,r:i}=e;if(t===n){if(rr(r))return i;if(rr(i))return r;{const[o,s]=Hie(r);return ME(wi(e,{k:o,v:s,l:Wie(r)}))}}else return tt&&(a=a.concat(q5(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:i}),r<=n&&(a=a.concat(q5(s,t,n))),a}function yp(e){return rr(e)?[]:[...yp(e.l),{k:e.k,v:e.v},...yp(e.r)]}function Hie(e){return rr(e.r)?[e.k,e.v]:Hie(e.r)}function Wie(e){return rr(e.r)?e.l:ME(wi(e,{r:Wie(e.r)}))}function wi(e,t){return jie(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 z$(e){return rr(e)||e.lvl>e.r.lvl}function CX(e){return Y5(Vie(e))}function ME(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(z$(t))return Vie(wi(e,{lvl:r-1}));if(!rr(t)&&!rr(t.r))return wi(t.r,{l:wi(t,{r:t.r.l}),r:wi(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(z$(e))return Y5(wi(e,{lvl:r-1}));if(!rr(n)&&!rr(n.l)){const i=n.l,o=z$(i)?n.lvl-1:n.lvl;return wi(i,{l:wi(e,{r:i.l,lvl:r-1}),r:Y5(wi(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function GI(e,t,n){if(rr(e))return[];const r=Pl(e,t)[0];return FGe(q5(e,r,n))}function Gie(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 Y5(e){const{r:t,lvl:n}=e;return!rr(t)&&!rr(t.r)&&t.lvl===n&&t.r.lvl===n?wi(t,{l:wi(e,{r:t.l}),lvl:n+1}):e}function Vie(e){const{l:t}=e;return!rr(t)&&t.lvl===e.lvl?wi(t,{r:wi(e,{l:t.r})}):e}function dT(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],a=n(s,t);if(a===0)return o;if(a===-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 Xie(e,t,n){return e[dT(e,t,n)]}function zGe(e,t,n,r){const i=dT(e,t,r),o=dT(e,n,r,i);return e.slice(i,o+1)}const NU=Wn(()=>({recalcInProgress:tt(!1)}),[],{singleton:!0});function UGe(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 TX(e,t){let n=0,r=0;for(;n=d||i===p)&&(e=X5(e,d)):(c=p!==i,u=!0),h>s&&s>=d&&p!==i&&(e=Bs(e,s+1,p));c&&(e=Bs(e,o,i))}return[e,n]}function HGe(){return{offsetTree:[],sizeTree:Tm(),groupOffsetTree:Tm(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function BU({index:e},t){return t===e?0:t0&&(t=Math.max(t,Xie(e,r,BU).offset)),Gie(zGe(e,t,n,WGe),GGe)}function K5(e,t,n,r){let i=e,o=0,s=0,a=0,u=0;if(t!==0){u=dT(i,t-1,BU),a=i[u].offset;const d=Pl(n,t-1);o=d[0],s=d[1],i.length&&i[u].size===Pl(n,t)[1]&&(u-=1),i=i.slice(0,u+1)}else i=[];for(const{start:c,value:d}of GI(n,t,1/0)){const h=c-o,p=h*s+a+h*r;i.push({offset:p,size:d,index:c}),o=c,a=p,s=d}return{offsetTree:i,lastIndex:o,lastOffset:a,lastSize:s}}function XGe(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ys.DEBUG);const o=e.sizeTree;let s=o,a=0;if(n.length>0&&rr(o)&&t.length===2){const p=t[0].size,m=t[1].size;s=n.reduce((v,y)=>Bs(Bs(v,y,p),y+1,m),s)}else[s,a]=jGe(s,t);if(s===o)return e;const{offsetTree:u,lastIndex:c,lastSize:d,lastOffset:h}=K5(e.offsetTree,a,s,i);return{sizeTree:s,offsetTree:u,lastIndex:c,lastOffset:h,lastSize:d,groupOffsetTree:n.reduce((p,m)=>Bs(p,m,iw(m,u,i)),Tm()),groupIndices:n}}function iw(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Xie(t,e,BU),s=e-i,a=o*s+(s-1)*n+r;return a>0?a+n:a}function qGe(e){return typeof e.groupIndex<"u"}function qie(e,t,n){if(qGe(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=Yie(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function Yie(e,t){if(!VI(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function VI(e){return!rr(e.groupOffsetTree)}function YGe(e){return yp(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 KGe={offsetHeight:"height",offsetWidth:"width"},xu=Wn(([{log:e},{recalcInProgress:t}])=>{const n=Sn(),r=Sn(),i=Fo(r,0),o=Sn(),s=Sn(),a=tt(0),u=tt([]),c=tt(void 0),d=tt(void 0),h=tt((A,I)=>cd(A,KGe[I])),p=tt(void 0),m=tt(0),v=HGe(),y=Fo(Me(n,cn(u,e,m),Ql(XGe,v),Sr()),v),S=Fo(Me(u,Sr(),Ql((A,I)=>({prev:A.current,current:I}),{prev:[],current:[]}),ct(({prev:A})=>A)),[]);Et(Me(u,Ht(A=>A.length>0),cn(y,m),ct(([A,I,R])=>{const M=A.reduce((L,N,H)=>Bs(L,N,iw(N,I.offsetTree,R)||H),Tm());return{...I,groupIndices:A,groupOffsetTree:M}})),y),Et(Me(r,cn(y),Ht(([A,{lastIndex:I}])=>A[{startIndex:A,endIndex:I,size:R}])),n),Et(c,d);const w=Fo(Me(c,ct(A=>A===void 0)),!0);Et(Me(d,Ht(A=>A!==void 0&&rr(zs(y).sizeTree)),ct(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=qs(Me(n,cn(y),Ql(({sizes:A},[I,R])=>({changed:R!==A,sizes:R}),{changed:!1,sizes:v}),ct(A=>A.changed)));Xn(Me(a,Ql((A,I)=>({diff:A.prev-I,prev:I}),{diff:0,prev:0}),ct(A=>A.diff)),A=>{const{groupIndices:I}=zs(y);if(A>0)rn(t,!0),rn(o,A+TX(A,I));else if(A<0){const R=zs(S);R.length>0&&(A-=TX(-A,R)),rn(s,A)}}),Xn(Me(a,cn(e)),([A,I])=>{A<0&&I("`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:a},Ys.ERROR)});const x=qs(o);Et(Me(o,cn(y),ct(([A,I])=>{const R=I.groupIndices.length>0,M=[],L=I.lastSize;if(R){const N=rw(I.sizeTree,0);let H=0,V=0;for(;H{let W=F.ranges;return F.prevSize!==0&&(W=[...F.ranges,{startIndex:F.prevIndex,endIndex:z+A-1,size:F.prevSize}]),{ranges:W,prevIndex:z+A,prevSize:G}},{ranges:M,prevIndex:A,prevSize:0}).ranges}return yp(I.sizeTree).reduce((N,{k:H,v:V})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:V}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=qs(Me(s,cn(y,m),ct(([A,{offsetTree:I},R])=>{const M=-A;return iw(M,I,R)})));return Et(Me(s,cn(y,m),ct(([A,I,R])=>{if(I.groupIndices.length>0){if(rr(I.sizeTree))return I;let L=Tm();const N=zs(S);let H=0,V=0,U=0;for(;H<-A;){U=N[V];const F=N[V+1]-U-1;V++,H+=F+1}if(L=yp(I.sizeTree).reduce((F,{k:z,v:G})=>Bs(F,Math.max(0,z+A),G),L),H!==-A){const F=rw(I.sizeTree,U);L=Bs(L,0,F);const z=Pl(I.sizeTree,-A+1)[1];L=Bs(L,1,z)}return{...I,sizeTree:L,...K5(I.offsetTree,0,L,R)}}else{const L=yp(I.sizeTree).reduce((N,{k:H,v:V})=>Bs(N,Math.max(0,H+A),V),Tm());return{...I,sizeTree:L,...K5(I.offsetTree,0,L,R)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:u,defaultItemSize:d,fixedItemSize:c,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:a,gap:m,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:w,itemSize:h}},Ar(Ed,NU),{singleton:!0}),QGe=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Kie(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!QGe)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Qw=Wn(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:a,headerHeight:u,footerHeight:c,fixedHeaderHeight:d,fixedFooterHeight:h},{log:p}])=>{const m=Sn(),v=tt(0);let y=null,S=null,w=null;function b(){y&&(y(),y=null),w&&(w(),w=null),S&&(clearTimeout(S),S=null),rn(i,!1)}return Et(Me(m,cn(e,o,t,v,u,c,p),cn(r,d,h),ct(([[x,E,A,I,R,M,L,N],H,V,U])=>{const D=Kie(x),{align:F,behavior:z,offset:G}=D,W=I-1,K=qie(D,E,W);let q=iw(K,E.offsetTree,H)+M;F==="end"?(q+=V+Pl(E.sizeTree,K)[1]-A+U,K===W&&(q+=L)):F==="center"?q+=(V+Pl(E.sizeTree,K)[1]-A+U)/2:q-=R,G&&(q+=G);const Q=re=>{b(),re?(N("retrying to scroll to",{location:x},Ys.DEBUG),rn(m,x)):N("list did not change, scroll successful",{},Ys.DEBUG)};if(b(),z==="smooth"){let re=!1;w=Xn(n,ue=>{re=re||ue}),y=Vc(a,()=>{Q(re)})}else y=Vc(Me(n,JGe(150)),Q);return S=setTimeout(()=>{b()},1200),rn(i,!0),N("scrolling from index to",{index:K,top:q,behavior:z},Ys.DEBUG),{top:q,behavior:z}})),s),{scrollToIndex:m,topListHeight:v}},Ar(xu,Wo,Ed),{singleton:!0});function JGe(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ow="up",Z1="down",ZGe="none",e9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},t9e=0,Jw=Wn(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=tt(!1),a=tt(!0),u=Sn(),c=Sn(),d=tt(4),h=tt(t9e),p=Fo(Me(EX(Me(jt(t),uv(1),_c(!0)),Me(jt(t),uv(1),_c(!1),SX(100))),Sr()),!1),m=Fo(Me(EX(Me(o,_c(!0)),Me(o,_c(!1),SX(200))),Sr()),!1);Et(Me(Ri(jt(t),jt(h)),ct(([b,x])=>b<=x),Sr()),a),Et(Me(a,Nf(50)),c);const v=qs(Me(Ri(e,jt(n),jt(r),jt(i),jt(d)),Ql((b,[{scrollTop:x,scrollHeight:E},A,I,R,M])=>{const L=x+A-E>-M,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(L){let V,U;return x>b.state.scrollTop?(V="SCROLLED_DOWN",U=b.state.scrollTop-x):(V="SIZE_DECREASED",U=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:V,scrollTopDelta:U}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=Fo(Me(e,Ql((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if(zie(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const I=E-(x+A)<1;return b.scrollTop!==x&&I?{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}),Ht(b=>b.changed),ct(b=>b.jump)),0);Et(Me(v,ct(b=>b.atBottom)),s),Et(Me(s,Nf(50)),u);const S=tt(Z1);Et(Me(e,ct(({scrollTop:b})=>b),Sr(),Ql((b,x)=>zs(m)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),Et(Me(e,Nf(50),_c(ZGe)),S);const w=tt(0);return Et(Me(p,Ht(b=>!b),_c(0)),w),Et(Me(t,Nf(100),cn(p),Ht(([b,x])=>!!x),Ql(([b,x],[E])=>[x,E],[0,0]),ct(([b,x])=>x-b)),w),{isScrolling:p,isAtTop:a,isAtBottom:s,atBottomState:v,atTopStateChange:c,atBottomStateChange:u,scrollDirection:S,atBottomThreshold:d,atTopThreshold:h,scrollVelocity:w,lastJumpDueToItemResize:y}},Ar(Wo)),Cd=Wn(([{log:e}])=>{const t=tt(!1),n=qs(Me(t,Ht(r=>r),Sr()));return Xn(t,r=>{r&&zs(e)("props updated",{},Ys.DEBUG)}),{propsReady:t,didMount:n}},Ar(Ed),{singleton:!0});function $U(e,t){e==0?t():requestAnimationFrame(()=>$U(e-1,t))}function FU(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Zw=Wn(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=tt(!0),a=tt(0),u=tt(!1);return Et(Me(o,cn(a),Ht(([c,d])=>!!d),_c(!1)),s),Xn(Me(Ri(t,o),cn(s,e,n,u),Ht(([[,c],d,{sizeTree:h},p,m])=>c&&(!rr(h)||kU(p))&&!d&&!m),cn(a)),([,c])=>{rn(u,!0),$U(3,()=>{Vc(r,()=>rn(s,!0)),rn(i,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:a}},Ar(xu,Wo,Qw,Cd),{singleton:!0});function AX(e){return e?e==="smooth"?"smooth":"auto":!1}const n9e=(e,t)=>typeof e=="function"?AX(e(t)):t&&AX(e),r9e=Wn(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:a},{log:u},{scrollingInProgress:c}])=>{const d=tt(!1),h=Sn();let p=null;function m(y){rn(i,{index:"LAST",align:"end",behavior:y})}Xn(Me(Ri(Me(jt(e),uv(1)),a),cn(jt(d),n,o,c),ct(([[y,S],w,b,x,E])=>{let A=S&&x,I="auto";return A&&(I=n9e(w,b||E),A=A&&!!I),{totalCount:y,shouldFollow:A,followOutputBehavior:I}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Vc(t,()=>{zs(u)("following output to ",{totalCount:y},Ys.DEBUG),m(S),p=null})});function v(y){const S=Vc(r,w=>{y&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zs(u)("scrolling to bottom due to increased size",{},Ys.DEBUG),m("auto"))});setTimeout(S,100)}return Xn(Me(Ri(jt(d),e,s),Ht(([y,,S])=>y&&S),Ql(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),cn(d,e)),([,y])=>{v(y!==!1)}),Xn(h,()=>{v(zs(d)!==!1)}),Xn(Ri(jt(d),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&m("auto")}),{followOutput:d,autoscrollToBottom:h}},Ar(xu,Jw,Qw,Zw,Cd,Ed,Wo));function i9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qie=Wn(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=Sn(),s=Sn(),a=qs(Me(o,ct(i9e)));return Et(Me(a,ct(u=>u.totalCount)),e),Et(Me(a,ct(u=>u.groupIndices)),t),Et(Me(Ri(r,n,i),Ht(([u,c])=>VI(c)),ct(([u,c,d])=>Pl(c.groupOffsetTree,Math.max(u-d,0),"v")[0]),Sr(),ct(u=>[u])),s),{groupCounts:o,topItemsIndexes:s}},Ar(xu,Wo));function sw(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jie(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const hT="top",pT="bottom",IX="none";function RX(e,t,n){return typeof e=="number"?n===ow&&t===hT||n===Z1&&t===pT?e:0:n===ow?t===hT?e.main:e.reverse:t===pT?e.main:e.reverse}function PX(e,t){return typeof e=="number"?e:e[t]||0}const zU=Wn(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=Sn(),s=tt(0),a=tt(0),u=tt(0),c=Fo(Me(Ri(jt(e),jt(t),jt(r),jt(o,sw),jt(u),jt(s),jt(i),jt(n),jt(a)),ct(([d,h,p,[m,v],y,S,w,b,x])=>{const E=d-b,A=S+w,I=Math.max(p-E,0);let R=IX;const M=PX(x,hT),L=PX(x,pT);return m-=b,m+=p+w,v+=p+w,v-=b,m>d+A-M&&(R=ow),vd!=null),Sr(sw)),[0,0]);return{listBoundary:o,overscan:u,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ar(Wo),{singleton:!0});function o9e(e,t,n){if(VI(t)){const r=Yie(e,t);return[{index:Pl(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 U$={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function OX(e,t,n){if(e.length===0)return[];if(!VI(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=GI(t.groupOffsetTree,r,i);let a,u=0;for(const c of e){(!a||a.end0){c=e[0].offset;const y=e[e.length-1];d=y.offset+y.size}const h=n-u,p=a+h*s+(h-1)*r,m=c,v=p-d;return{items:OX(e,i,o),topItems:OX(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:c,offsetBottom:v,top:m,bottom:d,totalCount:n,firstItemIndex:o}}function Zie(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const d of n.groupIndices){if(d-s>=e)break;s++}const a=e+s,u=FU(t,a),c=Array.from({length:a}).map((d,h)=>({index:h+u,size:0,offset:0,data:o[h+u]}));return kE(c,[],a,i,n,r)}const cg=Wn(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:a,topListHeight:u},{scrolledToInitialItem:c,initialTopMostItemIndex:d},{topListHeight:h},p,{didMount:m},{recalcInProgress:v}])=>{const y=tt([]),S=tt(0),w=Sn();Et(o.topItemsIndexes,y);const b=Fo(Me(Ri(m,v,jt(s,sw),jt(t),jt(e),jt(d),c,jt(y),jt(r),jt(i),n),Ht(([I,R,,M,,,,,,,L])=>{const N=L&&L.length!==M;return I&&!R&&!N}),ct(([,,[I,R],M,L,N,H,V,U,D,F])=>{const z=L,{sizeTree:G,offsetTree:W}=z,K=zs(S);if(M===0)return{...U$,totalCount:M};if(I===0&&R===0)return K===0?{...U$,totalCount:M}:Zie(K,N,L,U,D,F||[]);if(rr(G))return K>0?null:kE(o9e(FU(N,M),z,F),[],M,D,z,U);const q=[];if(V.length>0){const se=V[0],J=V[V.length-1];let ae=0;for(const le of GI(G,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++)q.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return kE([],q,M,D,z,U);const Q=V.length>0?V[V.length-1]+1:0,re=VGe(W,I,R,Q);if(re.length===0)return null;const ue=M-1,ce=WI([],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 kE(ce,q,M,D,z,U)}),Ht(I=>I!==null),Sr()),U$);Et(Me(n,Ht(kU),ct(I=>I==null?void 0:I.length)),t),Et(Me(b,ct(I=>I.topListHeight)),h),Et(h,u),Et(Me(b,ct(I=>[I.top,I.bottom])),a),Et(Me(b,ct(I=>I.items)),w);const x=qs(Me(b,Ht(({items:I})=>I.length>0),cn(t,n),Ht(([{items:I},R])=>I[I.length-1].originalIndex===R-1),ct(([,I,R])=>[I-1,R]),Sr(sw),ct(([I])=>I))),E=qs(Me(b,Nf(200),Ht(({items:I,topItems:R})=>I.length>0&&I[0].originalIndex===R.length),ct(({items:I})=>I[0].index),Sr())),A=qs(Me(b,Ht(({items:I})=>I.length>0),ct(({items:I})=>{let R=0,M=I.length-1;for(;I[R].type==="group"&&RR;)M--;return{startIndex:I[R].index,endIndex:I[M].index}}),Sr(Jie)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:w,initialItemCount:S,...p}},Ar(xu,Qie,zU,Zw,Qw,Jw,Cd,NU),{singleton:!0}),s9e=Wn(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:a}])=>(Et(Me(a,cn(o),Ht(([,u])=>u!==0),cn(i,e,t,r,n),ct(([[,u],c,d,h,p,m=[]])=>Zie(u,c,d,h,p,m))),s),{}),Ar(xu,Zw,cg,Cd),{singleton:!0}),eoe=Wn(([{scrollVelocity:e}])=>{const t=tt(!1),n=Sn(),r=tt(!1);return Et(Me(e,cn(r,t,n),Ht(([i,o])=>!!o),ct(([i,o,s,a])=>{const{exit:u,enter:c}=o;if(s){if(u(i,a))return!1}else if(c(i,a))return!0;return s}),Sr()),t),Xn(Me(Ri(t,e,n),cn(r)),([[i,o,s],a])=>i&&a&&a.change&&a.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ar(Jw),{singleton:!0}),a9e=Wn(([{topItemsIndexes:e}])=>{const t=tt(0);return Et(Me(t,Ht(n=>n>0),ct(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},Ar(cg)),toe=Wn(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=Sn(),s=Fo(Me(Ri(e,r,t,n,i),ct(([a,u,c,d,h])=>a+u+c+d+h.offsetBottom+h.bottom)),0);return Et(jt(s),o),{totalListHeight:s,totalListHeightChanged:o}},Ar(Wo,cg),{singleton:!0});function noe(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const l9e=noe(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),u9e=Wn(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:a},{listState:u},{beforeUnshiftWith:c,shiftWithOffset:d,sizes:h,gap:p},{log:m},{recalcInProgress:v}])=>{const y=qs(Me(u,cn(a),Ql(([,w,b,x],[{items:E,totalCount:A,bottom:I,offsetBottom:R},M])=>{const L=I+R;let N=0;return b===A&&w.length>0&&E.length>0&&(E[0].originalIndex===0&&w[0].originalIndex===0||(N=L-x,N!==0&&(N+=M))),[N,E,A,L]},[0,[],0,0]),Ht(([w])=>w!==0),cn(t,s,r,o,m,v),Ht(([,w,b,x,,,E])=>!E&&!x&&w!==0&&b===ow),ct(([[w],,,,,b])=>(b("Upward scrolling compensation",{amount:w},Ys.DEBUG),w))));function S(w){w>0?(rn(e,{top:-w,behavior:"auto"}),rn(n,0)):(rn(n,0),rn(e,{top:-w,behavior:"auto"}))}return Xn(Me(y,cn(n,i)),([w,b,x])=>{x&&l9e()?rn(n,b-w):S(-w)}),Xn(Me(Ri(Fo(i,!1),n,v),Ht(([w,b,x])=>!w&&!x&&b!==0),ct(([w,b])=>b),Nf(1)),S),Et(Me(d,ct(w=>({top:-w}))),e),Xn(Me(c,cn(h,p),ct(([w,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function I(R){return R*(b+A)}if(x.length===0)return I(w);{let R=0;const M=rw(E,0);let L=0,N=0;for(;Lw&&(R-=M,H=w-L+1),L+=H,R+=I(H),N++}return R}})),w=>{rn(n,w),requestAnimationFrame(()=>{rn(e,{top:w}),requestAnimationFrame(()=>{rn(n,0),rn(v,!1)})})}),{deviation:n}},Ar(Wo,Jw,cg,xu,Ed,NU)),c9e=Wn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=tt(0);return Xn(Me(e,cn(r),Ht(([,i])=>i!==0),ct(([,i])=>({top:i}))),i=>{Vc(Me(n,uv(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{rn(t,i)})})}),{initialScrollTop:r}},Ar(Cd,Wo,cg),{singleton:!0}),f9e=Wn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=tt(!1),r=Fo(Me(Ri(n,e,t),Ht(([i])=>i),ct(([,i,o])=>Math.max(0,i-o)),Nf(0),Sr()),0);return{alignToBottom:n,paddingTopAddition:r}},Ar(Wo,toe),{singleton:!0}),UU=Wn(([{scrollTo:e,scrollContainerState:t}])=>{const n=Sn(),r=Sn(),i=Sn(),o=tt(!1),s=tt(void 0);return Et(Me(Ri(n,r),ct(([{viewportHeight:a,scrollTop:u,scrollHeight:c},{offsetTop:d}])=>({scrollTop:Math.max(0,u-d),scrollHeight:c,viewportHeight:a}))),t),Et(Me(e,cn(r),ct(([a,{offsetTop:u}])=>({...a,top:a.top+u}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},Ar(Wo)),d9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,h9e=Wn(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:u},{scrollToIndex:c}])=>{const d=Sn();return Et(Me(d,cn(e,i,t,o,s,a,r),cn(n),ct(([[h,p,m,v,y,S,w,b],x])=>{const{done:E,behavior:A,align:I,calculateViewLocation:R=d9e,...M}=h,L=qie(h,p,v-1),N=iw(L,p.offsetTree,x)+y+S,H=N+Pl(p.sizeTree,L)[1],V=b+S,U=b+m-w,D=R({itemTop:N,itemBottom:H,viewportTop:V,viewportBottom:U,locationParams:{behavior:A,align:I,...M}});return D?E&&Vc(Me(u,Ht(F=>F===!1),uv(zs(u)?1:2)),E):E&&E(),D}),Ht(h=>h!==null)),c),{scrollIntoView:d}},Ar(xu,Wo,Qw,cg,Ed),{singleton:!0}),p9e=Wn(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:a}])=>{const u=Sn(),c=tt(void 0),d=tt(null),h=tt(null);return Et(s,d),Et(a,h),Xn(Me(u,cn(e,n,o,d,h)),([p,m,v,y,S,w])=>{const b=YGe(m.sizeTree);y&&S!==null&&w!==null&&(v=S.scrollTop-w.offsetTop),p({ranges:b,scrollTop:v})}),Et(Me(c,Ht(kU),ct(g9e)),r),Et(Me(i,cn(c),Ht(([,p])=>p!==void 0),Sr(),ct(([,p])=>p.ranges)),t),{getState:u,restoreStateFrom:c}},Ar(xu,Wo,Zw,Cd,UU));function g9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const m9e=Wn(([e,t,n,r,i,o,s,a,u,c])=>({...e,...t,...n,...r,...i,...o,...s,...a,...u,...c}),Ar(zU,s9e,Cd,eoe,toe,c9e,f9e,UU,h9e,Ed)),v9e=Wn(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:a,groupIndices:u,statefulTotalCount:c,gap:d,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:m},v,y,S,{listState:w,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:I},{groupCounts:R},M])=>(Et(x.rangeChanged,M.scrollSeekRangeChanged),Et(Me(M.windowViewportRect,ct(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:m,topItemsIndexes:b,topItemCount:I,groupCounts:R,fixedItemHeight:n,defaultItemHeight:r,gap:d,...S,statefulTotalCount:c,listState:w,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:u,...x,...M,...v,sizes:h,...y}),Ar(xu,Zw,Wo,p9e,r9e,cg,Qw,u9e,a9e,Qie,m9e)),j$="-webkit-sticky",MX="sticky",roe=noe(()=>{if(typeof document>"u")return MX;const e=document.createElement("div");return e.style.position=j$,e.style.position===j$?j$:MX});function ioe(e,t){const n=fe.useRef(null),r=fe.useCallback(a=>{if(a===null||!a.offsetParent)return;const u=a.getBoundingClientRect(),c=u.width;let d,h;if(t){const p=t.getBoundingClientRect(),m=u.top-p.top;d=p.height-Math.max(0,m),h=m+t.scrollTop}else d=window.innerHeight-Math.max(0,u.top),h=u.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:d,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:i,ref:o}=LU(r),s=fe.useCallback(()=>{r(o.current)},[r,o]);return fe.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(s);return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const ooe=fe.createContext(void 0),soe=fe.createContext(void 0);function aoe(e){return e}const y9e=Wn(()=>{const e=tt(u=>`Item ${u}`),t=tt(null),n=tt(u=>`Group ${u}`),r=tt({}),i=tt(aoe),o=tt("div"),s=tt(Fv),a=(u,c=null)=>Fo(Me(r,ct(d=>d[u]),Sr()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),b9e=Wn(([e,t])=>({...e,...t}),Ar(v9e,y9e)),x9e=({height:e})=>fe.createElement("div",{style:{height:e}}),w9e={position:roe(),zIndex:1,overflowAnchor:"none"},_9e={overflowAnchor:"none"},kX=fe.memo(function({showTopList:t=!1}){const n=bn("listState"),r=xa("sizeRanges"),i=bn("useWindowScroll"),o=bn("customScrollParent"),s=xa("windowScrollContainerState"),a=xa("scrollContainerState"),u=o||i?s:a,c=bn("itemContent"),d=bn("context"),h=bn("groupContent"),p=bn("trackItemSizes"),m=bn("itemSize"),v=bn("log"),y=xa("gap"),{callbackRef:S}=NGe(r,m,p,t?Fv:u,v,y,o),[w,b]=fe.useState(0);jU("deviation",D=>{w!==D&&b(D)});const x=bn("EmptyPlaceholder"),E=bn("ScrollSeekPlaceholder")||x9e,A=bn("ListComponent"),I=bn("ItemComponent"),R=bn("GroupComponent"),M=bn("computeItemKey"),L=bn("isSeeking"),N=bn("groupIndices").length>0,H=bn("paddingTopAddition"),V=bn("scrolledToInitialItem"),U=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:w,...V?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?fe.createElement(x,Jo(x,d)):fe.createElement(A,{...Jo(A,d),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,d);return L?fe.createElement(E,{...Jo(E,d),key:z,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?fe.createElement(R,{...Jo(R,d),key:z,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:w9e},h(D.index,d)):fe.createElement(I,{...Jo(I,d),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:_9e},N?c(D.index,D.groupIndex,D.data,d):c(D.index,D.data,d))}))}),S9e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},XI={width:"100%",height:"100%",position:"absolute",top:0},E9e={width:"100%",position:roe(),top:0,zIndex:1};function Jo(e,t){if(typeof e!="string")return{context:t}}const C9e=fe.memo(function(){const t=bn("HeaderComponent"),n=xa("headerHeight"),r=bn("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=bn("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),T9e=fe.memo(function(){const t=bn("FooterComponent"),n=xa("footerHeight"),r=bn("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=bn("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null});function loe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return fe.memo(function({style:o,children:s,...a}){const u=e("scrollContainerState"),c=n("ScrollerComponent"),d=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:y}=Uie(u,d,c,h);return t("scrollTo",y),t("scrollBy",v),fe.createElement(c,{ref:m,style:{...S9e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Jo(c,p)},s)})}function uoe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return fe.memo(function({style:o,children:s,...a}){const u=e("windowScrollContainerState"),c=n("ScrollerComponent"),d=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),m=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:w}=Uie(u,d,c,Fv,m);return kGe(()=>(y.current=m||window,()=>{y.current=null}),[y,m]),t("windowScrollTo",w),t("scrollBy",S),fe.createElement(c,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...a,...Jo(c,v)},s)})}const A9e=({children:e})=>{const t=fe.useContext(ooe),n=xa("viewportHeight"),r=xa("fixedItemHeight"),i=ug(Nie(n,o=>cd(o,"height")));return fe.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),fe.createElement("div",{style:XI,ref:i,"data-viewport-type":"element"},e)},I9e=({children:e})=>{const t=fe.useContext(ooe),n=xa("windowViewportRect"),r=xa("fixedItemHeight"),i=bn("customScrollParent"),o=ioe(n,i);return fe.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),fe.createElement("div",{ref:o,style:XI,"data-viewport-type":"window"},e)},R9e=({children:e})=>{const t=bn("TopItemListComponent"),n=bn("headerHeight"),r={...E9e,marginTop:`${n}px`},i=bn("context");return fe.createElement(t||"div",{style:r,context:i},e)},P9e=fe.memo(function(t){const n=bn("useWindowScroll"),r=bn("topItemsIndexes").length>0,i=bn("customScrollParent"),o=i||n?k9e:M9e,s=i||n?I9e:A9e;return fe.createElement(o,{...t},r&&fe.createElement(R9e,null,fe.createElement(kX,{showTopList:!0})),fe.createElement(s,null,fe.createElement(C9e,null),fe.createElement(kX,null),fe.createElement(T9e,null)))}),{Component:O9e,usePublisher:xa,useEmitterValue:bn,useEmitter:jU}=Fie(b9e,{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"}},P9e),M9e=loe({usePublisher:xa,useEmitterValue:bn,useEmitter:jU}),k9e=uoe({usePublisher:xa,useEmitterValue:bn,useEmitter:jU}),D9e=O9e,DX={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},L9e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:LX,ceil:NX,floor:gT,min:H$,max:ex}=Math;function N9e(e){return{...L9e,items:e}}function BX(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 B9e(e,t){return e&&e.column===t.column&&e.row===t.row}function zS(e,t){return e&&e.width===t.width&&e.height===t.height}const $9e=Wn(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:u,footerHeight:c,headerHeight:d},h,p,{propsReady:m,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=tt(0),I=tt(0),R=tt(DX),M=tt({height:0,width:0}),L=tt({height:0,width:0}),N=Sn(),H=Sn(),V=tt(0),U=tt(null),D=tt({row:0,column:0}),F=Sn(),z=Sn(),G=tt(!1),W=tt(0),K=tt(!0),q=tt(!1);Xn(Me(v,cn(W),Ht(([J,ae])=>!!ae)),()=>{rn(K,!1),rn(I,0)}),Xn(Me(Ri(v,K,L,M,W,q),Ht(([J,ae,le,he,,pe])=>J&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,J])=>{rn(q,!0),$U(1,()=>{rn(N,J)}),Vc(Me(r),()=>{rn(n,[0,0]),rn(K,!0)})}),Et(Me(z,Ht(J=>J!=null&&J.scrollTop>0),_c(0)),I),Xn(Me(v,cn(z),Ht(([,J])=>J!=null)),([,J])=>{J&&(rn(M,J.viewport),rn(L,J==null?void 0:J.item),rn(D,J.gap),J.scrollTop>0&&(rn(G,!0),Vc(Me(r,uv(1)),ae=>{rn(G,!1)}),rn(s,{top:J.scrollTop})))}),Et(Me(M,ct(({height:J})=>J)),i),Et(Me(Ri(jt(M,zS),jt(L,zS),jt(D,(J,ae)=>J&&J.column===ae.column&&J.row===ae.row),jt(r)),ct(([J,ae,le,he])=>({viewport:J,item:ae,gap:le,scrollTop:he}))),F),Et(Me(Ri(jt(A),t,jt(D,B9e),jt(L,zS),jt(M,zS),jt(U),jt(I),jt(G),jt(K),jt(W)),Ht(([,,,,,,,J])=>!J),ct(([J,[ae,le],he,pe,ve,ye,xe,,ge,be])=>{const{row:Ze,column:qe}=he,{height:ut,width:Bt}=pe,{width:Oe}=ve;if(xe===0&&(J===0||Oe===0))return DX;if(Bt===0){const Ot=FU(be,J),ft=Ot===0?Math.max(xe-1,0):Ot;return N9e(BX(Ot,ft,ye))}const ze=coe(Oe,Bt,qe);let st,mt;ge?ae===0&&le===0&&xe>0?(st=0,mt=xe-1):(st=ze*gT((ae+Ze)/(ut+Ze)),mt=ze*NX((le+Ze)/(ut+Ze))-1,mt=H$(J-1,ex(mt,ze-1)),st=H$(mt,ex(0,st))):(st=0,mt=-1);const vt=BX(st,mt,ye),{top:_e,bottom:Ue}=$X(ve,he,pe,vt),Ke=NX(J/ze),Be=Ke*ut+(Ke-1)*Ze-Ue;return{items:vt,offsetTop:_e,offsetBottom:Be,top:_e,bottom:Ue,itemHeight:ut,itemWidth:Bt}})),R),Et(Me(U,Ht(J=>J!==null),ct(J=>J.length)),A),Et(Me(Ri(M,L,R,D),Ht(([J,ae,{items:le}])=>le.length>0&&ae.height!==0&&J.height!==0),ct(([J,ae,{items:le},he])=>{const{top:pe,bottom:ve}=$X(J,he,ae,le);return[pe,ve]}),Sr(sw)),n);const Q=tt(!1);Et(Me(r,cn(Q),ct(([J,ae])=>ae||J!==0)),Q);const re=qs(Me(jt(R),Ht(({items:J})=>J.length>0),cn(A,Q),Ht(([{items:J},ae,le])=>le&&J[J.length-1].index===ae-1),ct(([,J])=>J-1),Sr())),ue=qs(Me(jt(R),Ht(({items:J})=>J.length>0&&J[0].index===0),_c(0),Sr())),ce=qs(Me(jt(R),cn(G),Ht(([{items:J},ae])=>J.length>0&&!ae),ct(([{items:J}])=>({startIndex:J[0].index,endIndex:J[J.length-1].index})),Sr(Jie),Nf(0)));Et(ce,p.scrollSeekRangeChanged),Et(Me(N,cn(M,L,A,D),ct(([J,ae,le,he,pe])=>{const ve=Kie(J),{align:ye,behavior:xe,offset:ge}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=ex(0,be,H$(he-1,be));let Ze=Q5(ae,pe,le,be);return ye==="end"?Ze=LX(Ze-ae.height+le.height):ye==="center"&&(Ze=LX(Ze-ae.height/2+le.height/2)),ge&&(Ze+=ge),{top:Ze,behavior:xe}})),s);const se=Fo(Me(R,ct(J=>J.offsetBottom+J.bottom)),0);return Et(Me(y,ct(J=>({width:J.visibleWidth,height:J.visibleHeight}))),M),{data:U,totalCount:A,viewportDimensions:M,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,deviation:V,scrollContainerState:u,footerHeight:c,headerHeight:d,initialItemCount:I,gap:D,restoreStateFrom:z,...p,initialTopMostItemIndex:W,gridState:R,totalListHeight:se,...h,startReached:ue,endReached:re,rangeChanged:ce,stateChanged:F,propsReady:m,stateRestoreInProgress:G,...E}},Ar(zU,Wo,Jw,eoe,Cd,UU,Ed));function $X(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=Q5(e,t,n,r[0].index),s=Q5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function Q5(e,t,n,r){const i=coe(e.width,n.width,t.column),o=gT(r/i),s=o*n.height+ex(0,o-1)*t.row;return s>0?s+t.row:s}function coe(e,t,n){return ex(1,gT((e+n)/(gT(t)+n)))}const F9e=Wn(()=>{const e=tt(c=>`Item ${c}`),t=tt({}),n=tt(null),r=tt("virtuoso-grid-item"),i=tt("virtuoso-grid-list"),o=tt(aoe),s=tt("div"),a=tt(Fv),u=(c,d=null)=>Fo(Me(t,ct(h=>h[c]),Sr()),d);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:a,FooterComponent:u("Footer"),HeaderComponent:u("Header"),ListComponent:u("List","div"),ItemComponent:u("Item","div"),ScrollerComponent:u("Scroller","div"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder","div")}}),z9e=Wn(([e,t])=>({...e,...t}),Ar($9e,F9e)),U9e=fe.memo(function(){const t=Dr("gridState"),n=Dr("listClassName"),r=Dr("itemClassName"),i=Dr("itemContent"),o=Dr("computeItemKey"),s=Dr("isSeeking"),a=Tl("scrollHeight"),u=Dr("ItemComponent"),c=Dr("ListComponent"),d=Dr("ScrollSeekPlaceholder"),h=Dr("context"),p=Tl("itemDimensions"),m=Tl("gap"),v=Dr("log"),y=Dr("stateRestoreInProgress"),S=ug(w=>{const b=w.parentElement.parentElement.scrollHeight;a(b);const x=w.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}m({row:FX("row-gap",getComputedStyle(w).rowGap,v),column:FX("column-gap",getComputedStyle(w).columnGap,v)})});return y?null:fe.createElement(c,{ref:S,className:n,...Jo(c,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(w=>{const b=o(w.index,w.data,h);return s?fe.createElement(d,{key:b,...Jo(d,h),index:w.index,height:t.itemHeight,width:t.itemWidth}):fe.createElement(u,{...Jo(u,h),className:r,"data-index":w.index,key:b},i(w.index,w.data,h))}))}),j9e=fe.memo(function(){const t=Dr("HeaderComponent"),n=Tl("headerHeight"),r=Dr("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=Dr("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),H9e=fe.memo(function(){const t=Dr("FooterComponent"),n=Tl("footerHeight"),r=Dr("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=Dr("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),W9e=({children:e})=>{const t=fe.useContext(soe),n=Tl("itemDimensions"),r=Tl("viewportDimensions"),i=ug(o=>{r(o.getBoundingClientRect())});return fe.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),fe.createElement("div",{style:XI,ref:i},e)},G9e=({children:e})=>{const t=fe.useContext(soe),n=Tl("windowViewportRect"),r=Tl("itemDimensions"),i=Dr("customScrollParent"),o=ioe(n,i);return fe.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),fe.createElement("div",{ref:o,style:XI},e)},V9e=fe.memo(function({...t}){const n=Dr("useWindowScroll"),r=Dr("customScrollParent"),i=r||n?q9e:X9e,o=r||n?G9e:W9e;return fe.createElement(i,{...t},fe.createElement(o,null,fe.createElement(j9e,null),fe.createElement(U9e,null),fe.createElement(H9e,null)))}),{Component:X7e,usePublisher:Tl,useEmitterValue:Dr,useEmitter:foe}=Fie(z9e,{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"}},V9e),X9e=loe({usePublisher:Tl,useEmitterValue:Dr,useEmitter:foe}),q9e=uoe({usePublisher:Tl,useEmitterValue:Dr,useEmitter:foe});function FX(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ys.WARN),t==="normal"?0:parseInt(t??"0",10)}const Y9e=O.forwardRef(({style:e,children:t,...n},r)=>{const i=O.useRef(null),{palette:o,spacing:s}=Dn(),a=Ex({".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)}}),[u]=hJ({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)&&u({target:i.current,elements:{viewport:r.current}})},[u]);const c=O.useCallback(d=>{d&&r&&(typeof r=="function"?r(d):r.current=d)},[r]);return C.jsx("div",{ref:i,style:e,className:a,children:C.jsx("div",{ref:c,...n,children:t})})});function K9e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(gt,{...i,children:C.jsx(D9e,{components:{Scroller:Y9e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function Q9e({event:e,hidden:t}){return C.jsxs(vFe,{children:[ie.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(pxe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function J9e({event:e,index:t,selected:n,...r}){const{spacing:i}=Dn(),[,o]=Vp();return C.jsxs(KF,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${jx(e==null?void 0:e.type)}`,...r.sx},onClick:()=>o({step:t}),children:[C.jsx(Gf,{children:C.jsx(Wt,{variant:"body2",children:t})}),C.jsx(vd,{title:C.jsx(G3,{event:e,flexDirection:"column"}),children:C.jsx(ru,{sx:{overflow:"hidden"},primary:C.jsx(Q9e,{event:e,hidden:!1}),secondary:C.jsx(G3,{event:ie.pick(e,"f","g","pId")})})})]})}const Z9e=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),e7e=e=>Number(e.replace(/px$/,""));function t7e(){const{spacing:e}=Dn(),{controls:t,onChange:n,state:r}=bd(),[{step:i=0,playback:o},s]=Vp(),[{layers:a}]=Oa(),u=O.useRef(null),[c,d]=O.useState(),h=ie.find(a,{key:c});O.useEffect(()=>{var m;c||d((m=ie.head(a))==null?void 0:m.key)},[c,d,a]);const p=O.useMemo(()=>{var m;if(h)return O.createElement(Uw[((m=h==null?void 0:h.source)==null?void 0:m.type)??""].steps,{layer:h})},[h]);return O.useEffect(()=>{o==="paused"&&ie.delay(()=>{var m,v;return(v=(m=u==null?void 0:u.current)==null?void 0:m.scrollToIndex)==null?void 0:v.call(m,{index:i,align:"start",behavior:"smooth",offset:-e7e(e(6+2))})},150)},[i,o,e]),C.jsxs(zn,{onChange:n,stack:r,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,alignItems:"center",children:p?o!=="playing"?O.cloneElement(p,{children:m=>h?m.length?C.jsx(K9e,{sx:{width:"100%",height:"100%"},items:m,listOptions:{ref:u,defaultItemHeight:80,overscan:0},renderItem:(v,y)=>C.jsxs(gt,{sx:{height:e(y?10:16),pt:y?0:e(6)},children:[C.jsx(J9e,{event:v,index:y,selected:y===i,sx:{height:"100%"}}),C.jsx(Kc,{variant:"inset"})]})}):C.jsx(hp,{icon:C.jsx(iE,{}),label:`${Ta(h)} has no steps to display`}):C.jsx(hp,{icon:C.jsx(iE,{}),label:"Steps"})}):C.jsx(hp,{icon:C.jsx(BA,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:"Running"}),C.jsx(Rz,{onClick:()=>s({playback:"paused"}),children:"Pause"})]})}):C.jsx(hp,{icon:C.jsx(iE,{}),label:"Steps"})})}),C.jsxs(zn.Options,{children:[C.jsx(Hs,{icon:C.jsx(_w,{}),label:"Layer",value:c,items:ie.map(a,m=>({id:m.key,name:Ta(m)})),onChange:d,showArrow:!0}),Z9e,C.jsx(SGe,{layer:h})]}),C.jsx(zn.Extras,{children:t})]})}const n7e=e=>e?48:36,r7e=8;function i7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=e6(),a=ie.max([ie.findIndex(t,({value:u})=>!!(n!=null&&n[u])),0])??0;return C.jsx(_v,{variant:"popover",children:u=>C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(Zz(u))})}),C.jsx(xv,{...qA(u),anchorOrigin:{horizontal:"center",vertical:-n7e(s)*a-r7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:c,label:d,disabled:h})=>C.jsxs(Vf,{disabled:h,onClick:()=>{r==null||r({...n,[c]:!((n==null?void 0:n[c])??o)})},children:[C.jsx(Gf,{children:C.jsx(Cme,{sx:{p:0},checked:!!((n==null?void 0:n[c])??o)})}),d]},c))})]})})}function o7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var c;const a=ie.filter(r,({id:d})=>!!((t==null?void 0:t[d])??s)),u=a.length?a.length===1?(c=ie.head(a))==null?void 0:c.name:`${a.length} Selected`:e;return C.jsx(i7e,{defaultChecked:!0,placeholder:ie.startCase(e),trigger:d=>C.jsx(Hp,{...d,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:u}),items:ie.map(r,({id:d,name:h,description:p,hidden:m})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:h}),C.jsx(ai,{}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:m})),value:t,onChange:n})}const zX=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function s7e(){var p,m,v,y;const{controls:e,onChange:t,state:n}=bd(),[r]=xI(),[{layers:i}]=Oa(),[o,s]=O.useState({}),a=O.useMemo(()=>ie.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[u,c]=O.useState(),d=O.useMemo(()=>ie.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(m=(p=d==null?void 0:d.renderer)==null?void 0:p.meta)==null?void 0:m.id;return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:C.jsx(KA,{children:S=>C.jsx(gt,{children:C.jsx(f$e,{...S,layers:a,renderer:h,rendererRef:c})})})})}),C.jsx(zn.Options,{children:C.jsxs(Hm,{direction:"row",children:[C.jsx(Hs,{label:"Renderer",icon:C.jsx(rxe,{}),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=d==null?void 0:d.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}),zX,C.jsx(o7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(_w,{}),value:o,onChange:s,items:ie.map(i,S=>({id:S.key,name:Ta(S)})),showArrow:!0}),zX,C.jsx(Hp,{disabled:!u,onClick:()=>{u==null||u.fitCamera()},icon:C.jsx(sxe,{}),children:"Fit"}),C.jsx(Hp,{disabled:!u,onClick:()=>{u==null||u.initialCamera()},icon:C.jsx(cxe,{}),children:"1:1"})]})}),C.jsx(zn.Extras,{children:e})]})}const J5={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(OQ,{}),content:s7e},tree:{id:"tree",name:"Tree",icon:C.jsx(TQ,{}),content:n$e},steps:{id:"steps",name:"Steps",icon:C.jsx(iE,{}),content:t7e},info:{id:"info",name:"Logs",icon:C.jsx(RQ,{}),content:nPe},layers:{id:"layers",name:"Layers",icon:C.jsx(_w,{}),content:mFe},debug:{id:"debug",name:"Debugger",icon:C.jsx(oxe,{}),content:tPe},settings:{id:"settings",name:"Settings",icon:C.jsx(Sxe,{}),content:yGe},about:{id:"about",name:"About",icon:C.jsx(gxe,{}),content:cSe}},[a7e,l7e]=gu({view:{type:"branch",key:ca(),orientation:"horizontal",children:[{size:75,type:"branch",key:ca(),orientation:"horizontal",children:[{type:"leaf",size:25,key:ca(),content:{type:"layers"}},{size:75,type:"branch",key:ca(),orientation:"vertical",children:[{type:"leaf",size:75,key:ca(),content:{type:"viewport"}},{type:"leaf",size:25,key:ca(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:ca(),content:{type:"steps"}}]}});function u7e(e){const t=B2e(),[{view:n},r]=a7e();return C.jsxs(C.Fragment,{children:[C.jsx(En,{...e,children:C.jsx(SJ,{root:n,onChange:i=>r({view:i}),renderLeaf:({content:i})=>{var o;return C.jsx(zp,{in:!0,children:C.jsx(gt,{sx:{width:"100%",height:"100%"},children:O.createElement((o=J5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(zp,{in:t,children:C.jsx(g0e,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})})]})}function c7e(e){O.useEffect(()=>{document.querySelector('meta[name="theme-color"]').setAttribute("content",e),document.title=SC},[e])}function f7e(e){return new Promise(t=>ie.delay(t,e))}async function d7e(e,t=2500){const n=ie.now();return{result:await Promise.any([e(),f7e(t)]),delta:ie.now()-n}}function h7e(){const e=mu(),[{remote:t}]=Jc(),[,n]=Zm(),r=eg("connections");return O.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:a,disabled:u}of t){if(u!==!0){e(`Connecting to ${a}...`);const c=new(dGe(s))({url:a});await c.connect();const{result:d,delta:h}=await d7e(()=>c.call("about"));d?(e(`Connected to ${d.name}.`),o=[...o,{...d,url:a,ping:h,call:c.call.bind(c),disconnect:c.disconnect.bind(c)}]):await c.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 p7e=e=>t=>({...t,source:e});function g7e(){const[e]=Zm(),[,t]=DC(),n=eg("features");return kte(r=>n(async()=>{const i={algorithms:[],formats:ie.keys(Z6).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const a of["algorithms","formats","maps"])i[a]=ie.uniqBy([...i[a],...ie.map(await o(`features/${a}`),p7e(s))],"id");r.aborted||t(i)}),[e,t]),C.jsx(C.Fragment,{})}function m7e(){const[{layers:e},t]=Oa();return O.useMemo(()=>ie.map(e,n=>{const r=sne(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 v7e(){const e=m7e();return C.jsx(C.Fragment,{children:e})}function doe({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 y7e=()=>{const[e,t]=O.useState(!1);return O.useEffect(()=>{if("windowControlsOverlay"in navigator){const n=()=>{t(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",n),n(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",n)}},[t]),C.jsx(gt,{sx:{mt:-.5,minHeight:36,height:e?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag"},children:C.jsx(gt,{sx:{height:"100%"},children:C.jsxs(Hm,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(gt,{sx:{p:1,pr:0,height:"100%"},children:C.jsx("img",{src:TJ,style:{height:"100%"}})}),C.jsx(Wt,{sx:{fontSize:14,fontWeight:300},children:SC}),C.jsx(gt,{sx:{p:.75,height:"100%"},children:C.jsx(b7e,{})})]})})})};function b7e(){const e=mu();return C.jsxs(Yc,{onClick:()=>e("Commands are not yet implemented."),sx:{WebkitAppRegion:"no-drag",fontSize:14,borderRadius:t=>t.shape.borderRadius,"&:hover":{bgcolor:"background.paper"},height:"100%",m:0,display:"flex",alignItems:"center",px:1,pr:2,gap:t=>t.spacing(1),color:"text.secondary",cursor:"text"},children:[C.jsx(_xe,{fontSize:"small",color:"disabled"})," ",C.jsx(Wt,{sx:{mt:0},children:"Commands"})]})}const x7e=[h7e,g7e,ZHe,v7e];function w7e(){const t=Dn().palette.background.default;return c7e(t),C.jsxs(En,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(y7e,{}),C.jsx(u7e,{flex:1})]})}function _7e(){const[{theme:e="light",accentColor:t="teal"}]=Jc(),n=O.useMemo(()=>oSe(e,t),[e,t]);return C.jsx(jue,{theme:n,children:C.jsx(nwe,{children:C.jsx(doe,{services:x7e,children:C.jsx(w7e,{})})})})}const[q7e,S7e]=gu({});const E7e=CQ(document.getElementById("root")),C7e=[nSe,D2e,L2e,MEe,S7e,N2e,s$e,MLe,twe,l7e];E7e.render(C.jsx($me,{children:C.jsx(doe,{slices:C7e,children:C.jsx(_7e,{})})})); + }`,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=f4e(e)),typeof e=="number"?c4e(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,Lg.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}=nt.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 Q1=Lg;Q1.availableFonts={};Q1.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 Dg=class extends ag{constructor(e="",t={}){super(pt.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=pt.from(n,{scaleMode:nt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Jt,r.trim=new Jt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject"),u=document.createElementNS(o,"div"),c=document.createElementNS(o,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",s.appendChild(a),this.maxWidth=Dg.defaultMaxWidth,this.maxHeight=Dg.defaultMaxHeight,this._domElement=u,this._styleElement=c,this._svgRoot=s,this._foreignObject=a,this._foreignObject.appendChild(c),this._foreignObject.appendChild(u),this._image=n,this._loadImage=new Image,this._autoResolution=Dg.defaultAutoResolution,this._resolution=Dg.defaultResolution??nt.RESOLUTION,this.text=e,this.style=t}measureText(e){var a,u;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:(a=this._style)==null?void 0:a.toCSS(r)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.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 a=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}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({},Dg.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=kf(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=kf(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 Q1?(this.ownsStyle=!1,this._style=e):e instanceof Gc?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Q1.from(e)):(this.ownsStyle=!0,this._style=new Q1(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 DI=Dg;DI.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};DI.defaultMaxWidth=2024;DI.defaultMaxHeight=2024;DI.defaultAutoResolution=!0;function zje(e,t){return{constructor:e,meta:t}}function Uje(e,t,n,r,i){zre(e,t,n||0,r||e.length-1,i||jje)}function zre(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,a=Math.log(o),u=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*u*(o-u)/o)*(s-o/2<0?-1:1),d=Math.max(n,Math.floor(t-s*u/o+c)),h=Math.min(r,Math.floor(t+(o-s)*u/o+c));zre(e,t,d,h,i)}var p=e[t],m=n,v=r;for(Xb(e,n,t),i(e[r],p)>0&&Xb(e,n,r);m0;)v--}i(e[n],p)===0?Xb(e,n,v):(v++,Xb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Xb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function jje(e,t){return et?1:0}class Hje{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(!PS(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),a=Ng(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,wg(r,this.toBBox),wg(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(r,a)}_splitRoot(t,n){this.data=Ng([t,n]),this.data.height=t.height+1,this.data.leaf=!1,wg(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let a=n;a<=r-n;a++){const u=v1(t,0,a,this.toBBox),c=v1(t,a,r,this.toBBox),d=qje(u,c),h=u$(u)+u$(c);d=n;c--){const d=t.children[c];y1(a,t.leaf?o(d):d),u+=RS(a)}return u}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)y1(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():wg(t[n],this.toBBox)}}function Wje(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function Ng(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function CV(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;Uje(e,s,t,n,i),o.push(t,s,s,n)}}class Yje extends Hje{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 TV={screenSize:{width:256,height:256},workerCount:4,workerIndex:0,tileResolution:{width:128,height:128},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:75,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var Ure={},lT=Kt&&Kt.__assign||function(){return lT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),f$}var a8e=o8e()?Math.sign:s8e(),l8e=a8e,u8e=Math.abs,c8e=Math.floor,f8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:l8e(e)*c8e(u8e(e)))},d8e=f8e,h8e=Math.max,p8e=function(e){return h8e(0,d8e(e))},jre=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},g8e=Lv,Hre=function(e){if(!g8e(e))throw new TypeError("Cannot use null or undefined");return e},m8e={exports:{}},v8e=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")},d$,IV;function y8e(){return IV||(IV=1,d$=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),d$}var h$,RV;function b8e(){if(RV)return h$;RV=1;var e=Lv,t=Object.keys;return h$=function(n){return t(e(n)?Object(n):n)},h$}var p$,PV;function x8e(){return PV||(PV=1,p$=y8e()()?Object.keys:b8e()),p$}var g$,OV;function w8e(){if(OV)return g$;OV=1;var e=x8e(),t=Hre,n=Math.max;return g$=function(r,i){var o,s,a=n(arguments.length,2),u;for(r=Object(t(r)),u=function(c){try{r[c]=i[c]}catch(d){o||(o=d)}},s=1;s-1},v$}var F8e=B8e()?String.prototype.contains:$8e(),RE=Xre,kV=N8e,qre=Wre,Yre=i8e,J1=F8e,z8e=Vre.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],RE(e)?(n=J1.call(e,"c"),r=J1.call(e,"e"),i=J1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?qre(Yre(o),s):s};z8e.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],RE(t)?kV(t)?RE(n)?kV(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,RE(e)?(r=J1.call(e,"c"),i=J1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?qre(Yre(o),s):s};var qw=Vre.exports,L5={exports:{}};(function(e,t){var n=qw,r=jre,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,u=Object.defineProperties,c=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},h,p,m,v,y,S,w;h=function(b,x){var E;return r(x),c.call(this,"__ee__")?E=this.__ee__:(E=d.value=s(null),a(this,"__ee__",d),d.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,A;return r(x),A=this,h.call(this,b,E=function(){m.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},m=function(b,x){var E,A,I,R;if(r(x),!c.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(R=0;I=A[R];++R)(I===x||I.__eeOnceListener__===x)&&(A.length===2?E[b]=A[R?0:1]:A.splice(R,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,I,R;if(c.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,R=new Array(E-1),x=1;x=55296&&E<=56319&&(M+=p[++S])),M=m?c.call(m,v,M,w):M,y?(d.value=M,h(b,w,d)):b[w]=M,++w;x=w}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),At(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Xi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:D$(i,r,(e/=60)+2),g:D$(i,r,e),b:D$(i,r,e-2)}},SU=function(e,t,n,r){return{r:At(255*(1-e)*(r=1-r)),g:At(255*(1-t)*r),b:At(255*(1-n)*r)}},tie=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:At(100*(i&&(i-e)/i)),m:At(100*o),y:At(100*s),k:At(100*r)}},lv=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,a=0,u=0,c=(i+o)/2;if(s!==0){switch(i){case e:a=(t-n)/s%6;break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}(a=At(60*a))<0&&(a+=360),u=s/(1-Math.abs(2*c-1))}return{h:a,s:At(100*u),l:At(100*c),a:r}},QV=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,a=0,u=0;return(t?n:r).find(function(c,d){return e>=c[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Bo=function(e){return typeof e=="string"&&(e=Dv.test(e)?BI(e)/100:+e),isNaN(+e)||e>1?1:At(e)},Nv=function(e,t,n){return t.reduce(function(r,i){return D5(D5([],r,!0),[un(un({},e),{h:n===qo.ADDITIVE?nw(e.h+i):nw(QV(QV(e.h,!1)+i,!0))})],!1)},[un({},e)])},fHe=function(e,t){return Nv(e,[30,-30],t)},dHe=function(e,t){return Nv(e,[180],t)},hHe=function(e,t){return Nv(e,[150,-150],t)},pHe=function(e,t){return Nv(e,[120,-120],t)},gHe=function(e,t){return Nv(e,[60,-120,180],t)},mHe=function(e,t){return Nv(e,[90,-90,180],t)},la=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Xt).some(function(r){if(b1[r].test(t))return n=r,!0}),!n&&~Zre.indexOf(t)&&(n=Xt.HEX),!n)throw new Error(uHe);return n}(e):function(t){var n,r=!1,i=eie(Object.keys(t));if(N5[i]&&(n=N5[i]),n&&n===Xt.RGB){var o=Object.entries(t).some(function(a){return!B5.test("".concat(a[1]))}),s=Object.entries(t).some(function(a){return!(Dv.test("".concat(a[1]))||!B5.test("".concat(a[1]))&&!isNaN(+a[1])&&+a[1]<=255)});o&&s&&(r=!0),o||(n=Xt.HEX)}if(!n||r)throw new Error(cHe);return n}(e)},vHe=((Kb={})[Xt.HEX]=function(e){var t=(~Zre.indexOf(e)?uT[e]:e).match(b1.HEX),n={r:OS(t[1]||t[5]),g:OS(t[2]||t[6]),b:OS(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=OS(r)/255),n},Kb[Xt.RGB]=function(e){var t=e.match(b1.RGB),n=vp(t[1]||t[5]),r=vp(t[2]||t[6]),i=vp(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},Kb[Xt.HSL]=function(e){var t=e.match(b1.HSL),n=nw(t[1]||t[5]),r=cT(t[2]||t[6]),i=cT(t[3]||t[7]),o=t[4]||t[8],s=Xi(n,r,i);return o!==void 0&&(s.a=Bo(o)),s},Kb[Xt.CMYK]=function(e){var t=e.match(b1.CMYK),n=Df(t[1]||t[6]),r=Df(t[2]||t[7]),i=Df(t[3]||t[8]),o=Df(t[4]||t[9]),s=t[5]||t[10],a=SU(n,r,i,o);return s!==void 0&&(a.a=Bo(s)),a},Kb),yHe=((Qb={})[Xt.HEX]=function(e){var t={r:vp("".concat(e.r)),g:vp("".concat(e.g)),b:vp("".concat(e.b))};return po(e,"a")&&(t.a=Math.min(vp("".concat(e.a),!0),1)),t},Qb[Xt.RGB]=function(e){return this.HEX(e)},Qb[Xt.HSL]=function(e){var t=cT("".concat(e.s)),n=cT("".concat(e.l)),r=Xi(nw(e.h),t,n);return po(e,"a")&&(r.a=Bo(e.a)),r},Qb[Xt.CMYK]=function(e){var t=Df("".concat(e.c)),n=Df("".concat(e.m)),r=Df("".concat(e.y)),i=Df("".concat(e.k)),o=SU(t,n,r,i);return po(e,"a")&&(o.a=Bo(e.a)),o},Qb),Kp=function(e,t){return t===void 0&&(t=la(e)),typeof e=="string"?vHe[t](e):yHe[t](e)},an=((mc={})[Xt.HEX]=function(e){return{r:MS(e.r),g:MS(e.g),b:MS(e.b)}},mc.HEXA=function(e){var t=an.HEX(e);return t.a=po(e,"a")?MS(255*e.a):"0xFF",t},mc[Xt.RGB]=function(e,t){return po(e,"a")&&delete e.a,Rp(e,t)},mc.RGBA=function(e,t){return e.a=po(e,"a")?At(e.a):1,Rp(e,t)},mc[Xt.HSL]=function(e,t){var n=lv(e.r,e.g,e.b);return delete n.a,am(n,t)},mc.HSLA=function(e,t){var n=an.HSL(e,t);return n.a=po(e,"a")?At(e.a,t):1,n},mc[Xt.CMYK]=function(e,t){return bHe(tie(e.r,e.g,e.b),t)},mc.CMYKA=function(e,t){var n=an.CMYK(e,t);return n.a=po(e,"a")?At(e.a,t):1,n},mc),JV=function(e,t,n,r){var i=la(e),o=typeof e=="string",s=Kp(e,i),a=typeof e=="string"&&po(s,"a")||typeof e!="string"&&po(e,"a"),u=lv(s.r,s.g,s.b,s.a);a||delete u.a;var c=n?u.l/(t+1):(100-u.l)/(t+1),d=Array(t).fill(null).map(function(h,p){return un(un({},u),{l:u.l+c*(p+1)*(1-2*+n)})});switch(i){case Xt.HEX:default:return d.map(function(h){var p=Xi(h.h,h.s,h.l);return a&&(p.a=h.a),o?a?on.HEX(Rp(un(un({},p),{a:At(255*p.a)}),r)):on.HEX(Rp(p,r)):a?an.HEXA(p):an.HEX(p)});case Xt.RGB:return d.map(function(h){var p=Xi(h.h,h.s,h.l);return a&&(p.a=h.a),o?on.RGB(Rp(p,r)):a?an.RGBA(p,r):an.RGB(p,r)});case Xt.HSL:return d.map(function(h){return o?on.HSL(am(h,r)):a?an.HSLA(un(un({},Xi(h.h,h.s,h.l)),{a:h.a}),r):an.HSL(Xi(h.h,h.s,h.l),r)})}},_g=((Gh={buildHarmony:function(e,t,n,r){var i=la(e),o=Kp(e,i),s=lv(o.r,o.g,o.b,o.a),a=typeof e=="string"&&po(o,"a")||typeof e!="string"&&po(e,"a"),u=typeof e=="string";switch(i){case Xt.HEX:default:return a?this.HEXA(am(s,0),t,n,u):this.HEX(am(s,0),t,n,u);case Xt.HSL:return a?this.HSLA(s,t,n,u,r):this.HSL(s,t,n,u,r);case Xt.RGB:return a?this.RGBA(s,t,n,u,r):this.RGB(s,t,n,u,r)}}})[Xt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(Xi(i.h,i.s,i.l)):an.HEX(Xi(i.h,i.s,i.l))})},Gh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(un(un({},Xi(i.h,i.s,i.l)),{a:255*Bo(i.a)})):an.HEXA(un(un({},Xi(i.h,i.s,i.l)),{a:Bo(i.a)}))})},Gh[Xt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Rp(Xi(o.h,o.s,o.l),i)):an.RGB(Xi(o.h,o.s,o.l),i)})},Gh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Rp(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)):an.RGBA(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Gh[Xt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(am({h:o.h,s:o.s,l:o.l},i)):an.HSL(Xi(o.h,o.s,o.l),i)})},Gh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(am(un(un({},o),{a:Bo(o.a)}),i)):an.HSLA(un(un({},Xi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Gh),Sg=((Vh={mix:function(e,t){var n,r,i,o,s,a,u,c,d,h,p,m,v,y,S,w=e.map(function(A){var I=la(A);return Kp(A,I)}),b=t===qo.SUBTRACTIVE?w.map(function(A){var I,R,M,D,N,H,V,U,L,F,z,G,W,K,q=(I=A.r,R=A.g,M=A.b,D=Math.min(I,R,M),N=Math.min(255-I,255-R,255-M),H=I-D,V=R-D,U=M-D,L=Math.min(H,V),F=H-L,z=(V+L)/2,G=(U+V-L)/2,W=Math.max(F,z,G)/Math.max(H,V,U),K=isNaN(W)||W===1/0||W<=0?1:W,{r:F/K+N,y:z/K+N,b:G/K+N});return po(A,"a")&&(q.a=A.a),q}):null;function x(A){var I=t===qo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(R,M){var D=po(M,"a")?M.a:1,N={r:Math.min(R.r+M.r*D,255),b:Math.min(R.b+M.b*D,255),a:1-(1-D)*(1-R.a)},H="g"in R?R.g:R.y,V="g"in M?M.g:M.y;return un(un({},N),t===qo.ADDITIVE?{g:Math.min(H+V*D,255)}:{y:Math.min(H+V*D,255)})},I)}if(t===qo.ADDITIVE)n=x(w);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),a=Math.min(255-r,255-i,255-o),u=r-s,c=i-s,d=o-s,h=Math.min(c,d),p=u+c-h,m=c+h,v=2*(d-h),y=Math.max(p,m,v)/Math.max(u,c,d),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+a,g:m/S+a,b:v/S+a}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:il(n.a,0,1)}}})[Xt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?on.HEX(r):an.HEX(r)},Vh.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Bo(r.a):Bo(r.a),n?on.HEX(r):an.HEXA(r)},Vh[Xt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?on.RGB(i):an.RGB(i,r)},Vh.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?on.RGB(i):an.RGBA(i,r)},Vh[Xt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=lv(i.r,i.g,i.b);return delete i.a,delete o.a,n?on.HSL(o):an.HSL(i,r)},Vh.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=lv(i.r,i.g,i.b,i.a);return n?on.HSL(o):an.HSLA(i,r)},Vh),Rp=function(e,t){return un({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},po(e,"a")?{a:At(e.a,t)}:{})},am=function(e,t){return un({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},po(e,"a")?{a:At(e.a,t)}:{})},bHe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},uf=function(e,t,n,r,i,o){var s=i(Kp(e,t),r);return n?o(s):s},Eg=function(e,t,n,r,i,o,s){n<1&&(n=5);var a=function(u,c,d){var h=d-1,p=(c.r-u.r)/h,m=(c.g-u.g)/h,v=(c.b-u.b)/h,y=Bo(u.a),S=(Bo(c.a)-y)/h;return Array(d).fill(null).map(function(w,b){return b===0?u:b===h?c:{r:At(u.r+p*b),g:At(u.g+m*b),b:At(u.b+v*b),a:At(y+S*b)}})}(Kp(e),Kp(t),n);return a.map(function(u){var c=o(u,i);return r?s(c):c})},xHe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Kp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=un(un({},Xi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=un(un({},SU(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=lv(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=tie(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=nw(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=il(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=il(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=il(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=il(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=il(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=il(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 At(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return At(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return At(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return At(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return At(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return At(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return At(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return At(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return At(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return At(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return At(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return an.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return an.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 un(un({},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 un(un({},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 un(un({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return on.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return on.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 on.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return on.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 on.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return on.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 on.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 on.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=la(t);return uf(t,r,n,0,an.HEX,on.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=la(t);return uf(t,r,n,0,an.HEXA,on.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.RGB,on.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.RGBA,on.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.HSL,on.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.HSLA,on.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.CMYK,on.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=la(t);return uf(t,i,n,r,an.CMYKA,on.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),Eg(t,n,r,i,o,an.HEX,on.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),Eg(t,n,r,i,o,an.HEXA,on.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),Eg(t,n,r,i,o,an.RGB,on.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),Eg(t,n,r,i,o,an.RGBA,on.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),Eg(t,n,r,i,o,an.HSL,on.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),Eg(t,n,r,i,o,an.HSLA,on.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),Sg.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),Sg.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=qo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),Sg.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),JV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),JV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=bc.COMPLEMENTARY),r===void 0&&(r=qo.ADDITIVE),i===void 0&&(i=6),function(o,s,a,u){var c;return(c={},c[bc.ANALOGOUS]=_g.buildHarmony(s,fHe,u,a),c[bc.COMPLEMENTARY]=_g.buildHarmony(s,dHe,u,a),c[bc.SPLIT_COMPLEMENTARY]=_g.buildHarmony(s,hHe,u,a),c[bc.TRIADIC]=_g.buildHarmony(s,pHe,u,a),c[bc.TETRADIC]=_g.buildHarmony(s,gHe,u,a),c[bc.SQUARE]=_g.buildHarmony(s,mHe,u,a),c)[o]}(n,t,i,r)},e}();const wHe={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:Qi,PI:_He}=Math,Yw=(e,t)=>new xHe(e).setA(t??wHe.alpha).RGBA,SHe=(e,t)=>Yw(e,t);function ud(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 EHe={draw(e,t,n){if(e.text){const r=ud(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=ud(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=Yw(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}}},CHe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=ud(e,n);t.fillStyle=Yw(e.fill,e.alpha),t.fillRect(Qi(r),Qi(i),Qi(o)||1,Qi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},THe={draw(e,t,n){t.fillStyle=Yw(e.fill,e.alpha),t.beginPath();const r=ud({...e,width:e.radius,height:e.radius},n);t.ellipse(Qi(r.x),Qi(r.y),Qi(r.width),Qi(r.height),0,0,2*_He),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}}},AHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=Yw(e.fill,e.alpha);const{x:o,y:s}=ud({...r,width:0,height:0},n);t.moveTo(Qi(o),Qi(s));for(const a of i){const{x:u,y:c}=ud({...a,width:0,height:0},n);t.lineTo(Qi(u),Qi(c))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=en.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=en.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=en.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=en.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},IHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=SHe(e.fill,e.alpha);const{x:o,y:s,width:a}=ud({...r,width:e.lineWidth,height:0},n);t.lineWidth=Qi(a),t.moveTo(Qi(o),Qi(s));for(const u of i){const{x:c,y:d}=ud({...u,width:0,height:0},n);t.lineTo(Qi(c),Qi(d))}t.stroke()},test(e){var t,n,r,i;return{left:((t=en.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=en.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=en.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=en.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},RHe={text:EHe,path:IHe,rect:CHe,polygon:AHe,circle:THe},{log2:PHe,max:OHe}=Math,ZV=e=>en.floor(PHe(e+1));function eX({right:e,left:t,bottom:n,top:r},i){const o=OHe(ZV(e-t),ZV(n-r))-i,s=2**o,a={left:en.floor(t/s),right:en.ceil((e+1)/s),top:en.floor(r/s),bottom:en.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Qje({x:en.range(a.left,a.right+1),y:en.range(a.top,a.bottom+1)}).map(u=>{const c=u.x*s,d=u.y*s;return{tile:u,bounds:{left:c-s/2,right:c+s/2,top:d-s/2,bottom:d+s/2}}})}}const MHe=""+new URL("D2Renderer.worker-df022396.js",import.meta.url).href;class kHe extends Worker{constructor(){super(MHe,{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 LHe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:tX,min:nX}=Math,nie=class rie extends ag{constructor(t,n){super(t),this.bounds=n,this.age=rie.age++}};nie.age=0;let DHe=nie;var aa,Xr,Ef,Sc,uo,jl,Cf,Tf,mT,vT,iie,yT,oie,Am,lw,bT,xT,sie,wT,aie,_T,lie,ST,uie,uw,$5,cw,F5,ET,cie,fw,z5,CT,fie,TT,die;class NHe extends oHe{constructor(){super(...arguments);yr(this,vT);yr(this,yT);yr(this,xT);yr(this,wT);yr(this,_T);yr(this,ST);yr(this,uw);yr(this,cw);yr(this,ET);yr(this,fw);yr(this,CT);yr(this,TT);yr(this,aa,void 0);yr(this,Xr,void 0);yr(this,Ef,void 0);yr(this,Sc,void 0);yr(this,uo,TV);yr(this,jl,[]);yr(this,Cf,new Yje(16));yr(this,Tf,void 0);yr(this,mT,0);yr(this,Am,en.once(()=>en.debounce(()=>io(this,uw,$5).call(this),ot(this,uo).debounceInterval)));yr(this,lw,en.once(()=>en.throttle(()=>io(this,cw,F5).call(this),ot(this,uo).refreshInterval)));yr(this,bT,en.once(()=>en.throttle(n=>io(this,ET,cie).call(this,n),ot(this,uo).refreshInterval)))}getInstance(){return{app:ot(this,aa),viewport:ot(this,Xr)}}fitCamera(){var r,i,o,s;const n=en.values(ot(this,Cf).all()).flat();if(n.length){const a=en.reduce(n,(u,c)=>({top:nX(u.top,c.top),left:nX(u.top,c.left),bottom:tX(u.bottom,c.bottom),right:tX(u.right,c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=ot(this,Xr))==null?void 0:r.animate)==null||s.call(r,{position:new Lt((a.left+a.right)/2,(a.top+a.bottom)/2),scale:((o=(i=ot(this,Xr))==null?void 0:i.findFit)==null?void 0:o.call(i,a.right-a.left,a.bottom-a.top))*.8,ease:"easeOutExpo",time:ot(this,uo).animationDuration*1.5,callbackOnComplete:()=>ot(this,Am).call(this)()})}}initialCamera(){var n,r;(r=(n=ot(this,Xr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:ot(this,uo).animationDuration*1.5,callbackOnComplete:()=>ot(this,Am).call(this)()})}getView(){var n;return(n=ot(this,aa))==null?void 0:n.view}setup(n){const r={...TV,...n};io(this,yT,oie).call(this,r),this.setOptions(r),io(this,wT,aie).call(this,r)}destroy(){en.map(ot(this,jl),n=>n.terminate()),ot(this,aa).destroy()}add(n){const r=yFe(),i=en.map(n,({component:o,meta:s})=>({...RHe[o.$].test(o),component:o,meta:s,index:io(this,vT,iie).call(this)}));return ot(this,Cf).load(i),en.map(ot(this,jl),o=>o.call("add",[en.map(n,"component"),r])),()=>{for(const o of i)ot(this,Cf).remove(o);en.map(ot(this,jl),o=>o.call("remove",[r]))}}setOptions(n){const r={...ot(this,uo),...n};io(this,_T,lie).call(this,r),fc(this,uo,r),io(this,uw,$5).call(this),io(this,cw,F5).call(this)}}aa=new WeakMap,Xr=new WeakMap,Ef=new WeakMap,Sc=new WeakMap,uo=new WeakMap,jl=new WeakMap,Cf=new WeakMap,Tf=new WeakMap,mT=new WeakMap,vT=new WeakSet,iie=function(){return WU(this,mT)._++},yT=new WeakSet,oie=function(n){fc(this,aa,new yU({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height})),fc(this,Xr,new f6e({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:ot(this,aa).renderer.events,passiveWheel:!1})),ot(this,Xr).on("clicked",r=>{const{x:i,y:o}=r.world,s=ot(this,Cf).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})}),ot(this,aa).stage.addChild(ot(this,Xr)),ot(this,Xr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-4}),ot(this,Xr).on("moved",()=>{ot(this,Am).call(this)(),ot(this,lw).call(this)()}),ot(this,Xr).on("mousemove",r=>ot(this,bT).call(this)(r)),fc(this,Ef,new us),ot(this,Xr).addChild(ot(this,Ef)),fc(this,Sc,new av),ot(this,Xr).addChild(ot(this,Sc)),fc(this,Tf,new av),ot(this,Xr).addChild(ot(this,Tf)),io(this,xT,sie).call(this)},Am=new WeakMap,lw=new WeakMap,bT=new WeakMap,xT=new WeakSet,sie=function(){const{tileResolution:n,dynamicResolution:r}=ot(this,uo),{dtMax:i,dtMin:o,increment:s,intervalMs:a,maxScale:u,minScale:c}=r,d=en.floor(Si.targetFPMS*a);let h=0,p=0,m=1;ot(this,aa).ticker.add(v=>{if(!(h%d)){const y=p/d;m=en.clamp(y>=i?m+s:y<=o?m-s:m,c,u),en.map(ot(this,jl),S=>{S.call("setTileResolution",[{width:en.ceil(n.width/m),height:en.ceil(n.height/m)}])}),p=0}p+=v,h++})},wT=new WeakSet,aie=function(n){en.map(ot(this,jl),r=>r.terminate()),fc(this,jl,en.times(n.workerCount,r=>{const i=new kHe;return i.on("update",o=>io(this,ST,uie).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},_T=new WeakSet,lie=function(n){var o,s,a,u;const{width:r,height:i}=n.screenSize;(a=(s=(o=ot(this,aa))==null?void 0:o.renderer)==null?void 0:s.resize)==null||a.call(s,r,i),(u=ot(this,Xr))==null||u.resize(r,i)},ST=new WeakSet,uie=function({bounds:n,bitmap:r}){const i=pt.from(r);io(this,CT,fie).call(this,i,n)},uw=new WeakSet,$5=function(){const{top:n,bottom:r,left:i,right:o}=ot(this,Xr);en.map(ot(this,jl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},cw=new WeakSet,F5=function(){var s,a,u,c,d;const{tileSubdivision:n,accentColor:r}=ot(this,uo),{tiles:i}=eX(ot(this,Xr),n),o=io(this,fw,z5).call(this);(s=ot(this,Sc))==null||s.clear(),(a=ot(this,Sc))==null||a.lineStyle(1*o,r,.5),(u=ot(this,Sc))==null||u.beginFill(r,.05);for(const{bounds:h,tile:p}of i)en.find((c=ot(this,Ef))==null?void 0:c.children,m=>en.isEqual(m.bounds,h))||(d=ot(this,Sc))==null||d.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},ET=new WeakSet,cie=function(n){var u;const{accentColor:r}=ot(this,uo),i=io(this,fw,z5).call(this),{x:o,y:s}=ot(this,Xr).toWorld(n.globalX,n.globalY),a=ot(this,Cf).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});ot(this,Tf).clear(),ot(this,Tf).lineStyle(2*i,r,1);for(const c of a)(u=ot(this,Tf))==null||u.drawRect(c.left,c.top,c.right-c.left,c.bottom-c.top)},fw=new WeakSet,z5=function(){const{right:n,left:r}=ot(this,Xr),{width:i}=ot(this,uo).screenSize;return(n-r)/i},CT=new WeakSet,fie=async function(n,r){var s;const{tileSubdivision:i}=ot(this,uo),{tiles:o}=eX(ot(this,Xr),i);if(en.find(o,a=>en.isEqual(a.bounds,r))){const a={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},u=new DHe(n,r);(s=ot(this,Ef))==null||s.addChild(u).setTransform(r.left,r.top,a.x,a.y),ot(this,lw).call(this)(),await io(this,TT,die).call(this,u);for(const c of ot(this,Ef).children)LHe(c.bounds,r)&&c.age{const o=s=>{n.alpha+=s/Si.targetFPMS/ot(this,uo).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})};const BHe=zje(NHe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),$He={"d2-renderer":BHe};var FHe=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},EU={},zHe=Object.prototype.hasOwnProperty,UHe;function rX(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function iX(e){try{return encodeURIComponent(e)}catch{return null}}function jHe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=rX(r[1]),o=rX(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function HHe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(zHe.call(e,i)){if(r=e[i],!r&&(r===null||r===UHe||isNaN(r))&&(r=""),i=iX(i),r=iX(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}EU.stringify=HHe;EU.parse=jHe;var hie=FHe,$I=EU,WHe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,pie=/[\n\r\t]/g,GHe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,gie=/:\d+$/,VHe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,XHe=/^[a-zA-Z]:/;function CU(e){return(e||"").toString().replace(WHe,"")}var U5=[["#","hash"],["?","query"],function(t,n){return lu(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]],oX={hash:1,query:1};function mie(e){var t;typeof window<"u"?t=window:typeof Kt<"u"?t=Kt: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 hu(unescape(e.pathname),{});else if(i==="string"){r=new hu(e,{});for(o in oX)delete r[o]}else if(i==="object"){for(o in e)o in oX||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=GHe.test(e.href))}return r}function lu(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function vie(e,t){e=CU(e),e=e.replace(pie,""),t=t||{};var n=VHe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,a;return i?o?(a=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(a=n[2]+n[4],s=n[2].length):o?(a=n[3]+n[4],s=n[3].length):a=n[4],r==="file:"?s>=2&&(a=a.slice(2)):lu(r)?a=n[4]:r?i&&(a=a.slice(2)):s>=2&&lu(t.protocol)&&(a=n[4]),{protocol:r,slashes:i||lu(r),slashesCount:s,rest:a}}function qHe(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 hu(e,t,n){if(e=CU(e),e=e.replace(pie,""),!(this instanceof hu))return new hu(e,t,n);var r,i,o,s,a,u,c=U5.slice(),d=typeof t,h=this,p=0;for(d!=="object"&&d!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=$I.parse),t=mie(t),i=vie(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||XHe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!lu(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const a=new bie[r].constructor({url:i});n.push({key:o,url:i,renderer:await a.get()})}t(n)},[e,t]),C.jsx(C.Fragment,{})}const eWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function tWe({value:e,onValueChange:t}){const[n]=xI(),r=ie.find(n,{key:e.key});function i(s){t==null||t($z(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(lne,{sx:{color:eWe[o]}}),C.jsx(ai,{}),C.jsxs(gt,{flex:1,children:[C.jsx(Wt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ie.startCase(o)}),C.jsx(Wt,{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(vd,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(gt,{children:C.jsx(Gm,{checked:!e.disabled,onChange:(s,a)=>i({disabled:!a})})})}),C.jsx(A6,{trigger:s=>C.jsx(im,{icon:C.jsx($A,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(T6,{children:"Edit Renderer"})},children:C.jsxs(gt,{p:2.5,children:[C.jsx(_w,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx($1,{placeholder:"Renderer Type",items:ie.entries(bie).map(([s,{name:a}])=>({value:s,label:a})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var TU={},FI={},Kw={};(function(e){var t=Kt&&Kt.__extends||function(){var m=function(v,y){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(S[b]=w[b])},m(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");m(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(m){return typeof m=="string"||typeof m=="number"||m===null};e.isJSONRPCID=n;var r=function(m){return m.jsonrpc===e.JSONRPC&&m.method!==void 0&&m.result===void 0&&m.error===void 0};e.isJSONRPCRequest=r;var i=function(m){return Array.isArray(m)&&m.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(m){return m.jsonrpc===e.JSONRPC&&m.id!==void 0&&(m.result!==void 0||m.error!==void 0)};e.isJSONRPCResponse=o;var s=function(m){return Array.isArray(m)&&m.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var a=function(m,v,y){var S={code:m,message:v};return y!=null&&(S.data=y),S},u=function(m){t(v,m);function v(y,S,w){var b=m.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=w,b}return v.prototype.toObject=function(){return a(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=u,function(m){m[m.ParseError=-32700]="ParseError",m[m.InvalidRequest=-32600]="InvalidRequest",m[m.MethodNotFound=-32601]="MethodNotFound",m[m.InvalidParams=-32602]="InvalidParams",m[m.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var c=function(m,v,y,S){return{jsonrpc:e.JSONRPC,id:m,error:a(v,y,S)}};e.createJSONRPCErrorResponse=c;var d=function(m,v){return{jsonrpc:e.JSONRPC,id:m,result:v??null}};e.createJSONRPCSuccessResponse=d;var h=function(m,v,y){return{jsonrpc:e.JSONRPC,id:m,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(m,v){return{jsonrpc:e.JSONRPC,method:m,params:v}};e.createJSONRPCNotification=p})(Kw);var Qw={};Object.defineProperty(Qw,"__esModule",{value:!0});Qw.DefaultErrorCode=void 0;Qw.DefaultErrorCode=0;var sX=Kt&&Kt.__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 a(d){try{c(r.next(d))}catch(h){s(h)}}function u(d){try{c(r.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):i(d.value).then(a,u)}c((r=r.apply(e,t||[])).next())})},aX=Kt&&Kt.__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:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return u([c,d])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[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 xWe={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 wWe{constructor(t){fg(this,"handler");this.options=t;const{hostname:n}=yie(t.url);this.handler=xWe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const pu=Object.create(null);pu.open="0";pu.close="1";pu.ping="2";pu.pong="3";pu.message="4";pu.upgrade="5";pu.noop="6";const PE=Object.create(null);Object.keys(pu).forEach(e=>{PE[pu[e]]=e});const j5={type:"error",data:"parser error"},wie=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_ie=typeof ArrayBuffer=="function",Sie=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,AU=({type:e,data:t},n,r)=>wie&&t instanceof Blob?n?r(t):fX(t,r):_ie&&(t instanceof ArrayBuffer||Sie(t))?n?r(t):fX(new Blob([t]),r):r(pu[e]+(t||"")),fX=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function dX(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let B$;function _We(e,t){if(wie&&e.data instanceof Blob)return e.data.arrayBuffer().then(dX).then(t);if(_ie&&(e.data instanceof ArrayBuffer||Sie(e.data)))return t(dX(e.data));AU(e,!1,n=>{B$||(B$=new TextEncoder),t(B$.encode(n))})}const hX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r>4,d[i++]=(s&15)<<4|a>>2,d[i++]=(a&3)<<6|u&63;return c},EWe=typeof ArrayBuffer=="function",IU=(e,t)=>{if(typeof e!="string")return{type:"message",data:Eie(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CWe(e.substring(1),t)}:PE[n]?e.length>1?{type:PE[n],data:e.substring(1)}:{type:PE[n]}:j5},CWe=(e,t)=>{if(EWe){const n=SWe(e);return Eie(n,t)}else return{base64:!0,data:e}},Eie=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Cie=String.fromCharCode(30),TWe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{AU(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Cie))})})},AWe=(e,t)=>{const n=e.split(Cie),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 F$;function NS(e){return e.reduce((t,n)=>t+n.length,0)}function BS(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){a.enqueue(j5);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(NS(n)e){a.enqueue(j5);break}}}})}const Tie=4;function li(e){if(e)return PWe(e)}function PWe(e){for(var t in li.prototype)e[t]=li.prototype[t];return e}li.prototype.on=li.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};li.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};li.prototype.off=li.prototype.removeListener=li.prototype.removeAllListeners=li.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 Aie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const OWe=ha.setTimeout,MWe=ha.clearTimeout;function jI(e,t){t.useNativeTimers?(e.setTimeoutFn=OWe.bind(ha),e.clearTimeoutFn=MWe.bind(ha)):(e.setTimeoutFn=ha.setTimeout.bind(ha),e.clearTimeoutFn=ha.clearTimeout.bind(ha))}const kWe=1.33;function LWe(e){return typeof e=="string"?DWe(e):Math.ceil((e.byteLength||e.size)*kWe)}function DWe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function NWe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BWe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Rie(){const e=mX(+new Date);return e!==gX?(pX=0,gX=e):e+"."+mX(pX++)}for(;$S{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)};AWe(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,TWe(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]=Rie()),!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 uu(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 uu extends li{constructor(t,n){super(),jI(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=Aie(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Oie(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=uu.requestsCount++,uu.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=UWe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete uu.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()}}uu.requestsCount=0;uu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vX);else if(typeof addEventListener=="function"){const e="onpagehide"in ha?"pagehide":"unload";addEventListener(e,vX,!1)}}function vX(){for(let e in uu.requests)uu.requests.hasOwnProperty(e)&&uu.requests[e].abort()}const PU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),FS=ha.WebSocket||ha.MozWebSocket,yX=!0,WWe="arraybuffer",bX=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class GWe extends RU{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=bX?{}:Aie(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=yX&&!bX?n?new FS(t,n):new FS(t):new FS(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{yX&&this.ws.send(o)}catch{}i&&PU(()=>{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]=Rie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!FS}}class VWe extends RU{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=RWe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=IWe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:u})=>{a||(this.onPacket(u),o())}).catch(a=>{})};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&&PU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const XWe={websocket:GWe,webtransport:VWe,polling:HWe},qWe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,YWe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function W5(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=qWe.exec(e||""),o={},s=14;for(;s--;)o[YWe[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=KWe(o,o.path),o.queryKey=QWe(o,o.query),o}function KWe(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 QWe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Mie=class Bg extends li{constructor(t,n={}){super(),this.binaryType=WWe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=W5(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=W5(n.host).host),jI(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=BWe(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=Tie,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 XWe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Bg.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;Bg.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;Bg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),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,d(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function a(){s("transport closed")}function u(){s("socket closed")}function c(h){n&&h.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",u),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",u),this.once("upgrading",c),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Bg.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){Bg.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,kie=Object.prototype.toString,tGe=typeof Blob=="function"||typeof Blob<"u"&&kie.call(Blob)==="[object BlobConstructor]",nGe=typeof File=="function"||typeof File<"u"&&kie.call(File)==="[object FileConstructor]";function OU(e){return ZWe&&(e instanceof ArrayBuffer||eGe(e))||tGe&&e instanceof Blob||nGe&&e instanceof File}function OE(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,a)=>r?s?o(s):i(a):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:mn.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 mn.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 mn.EVENT:case mn.BINARY_EVENT:this.onevent(t);break;case mn.ACK:case mn.BINARY_ACK:this.onack(t);break;case mn.DISCONNECT:this.ondisconnect();break;case mn.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:mn.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:mn.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}Bv.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};Bv.prototype.reset=function(){this.attempts=0};Bv.prototype.setMin=function(e){this.ms=e};Bv.prototype.setMax=function(e){this.max=e};Bv.prototype.setJitter=function(e){this.jitter=e};class X5 extends li{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,jI(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 Bv({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||uGe;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 Mie(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ul(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=ul(n,"error",o);if(this._timeout!==!1){const a=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}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(ul(t,"ping",this.onping.bind(this)),ul(t,"data",this.ondata.bind(this)),ul(t,"error",this.onerror.bind(this)),ul(t,"close",this.onclose.bind(this)),ul(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){PU(()=>{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 Lie(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 Jb={};function ME(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=JWe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Jb[i]&&o in Jb[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return a?u=new X5(r,t):(Jb[i]||(Jb[i]=new X5(r,t)),u=Jb[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(ME,{Manager:X5,Socket:Lie,io:ME,connect:ME});class fGe{constructor(t){fg(this,"rpc");fg(this,"socket");this.options=t,this.socket=ME(t.url),this.rpc=new TU.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 kU={socketio:{name:"socket.io",constructor:fGe},ipc:{name:"Web Worker",constructor:bWe},native:{name:"Internal",constructor:wWe}};function dGe(e){return kU[e].constructor}const Die=ie.first(ie.keys(kU));function hGe(){const[{renderer:e},t]=Jc();return C.jsx(C.Fragment,{children:C.jsx(iI,{editor:n=>C.jsx(tWe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({renderer:n}),300),addItemLabel:"Add Renderer",create:()=>({transport:Die,url:"",disabled:!0}),extras:C.jsx(Hp,{icon:C.jsx(OQ,{}),sx:{ml:2},onClick:()=>t({renderer:TJ}),children:"Reset to Defaults"})})})}function pGe(e){const[{connections:t}]=dI(),n=tU(),[{remote:r}]=Jc(),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 gGe={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function mGe({value:e,onValueChange:t}){const n=z$e(e.url),r=pGe(e.url);function i(o){t==null||t($z(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(lne,{sx:{color:gGe[r]}}),C.jsx(ai,{}),C.jsxs(gt,{flex:1,children:[C.jsx(Wt,{children:n?`${n.name} ${n.version}`:ie.startCase(r)}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(vd,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(gt,{children:C.jsx(Gm,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(A6,{trigger:o=>C.jsx(im,{icon:C.jsx($A,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(T6,{children:"Edit Connection"})},children:C.jsxs(gt,{p:2.5,children:[C.jsx(_w,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx($1,{placeholder:"Connection Type",items:ie.entries(kU).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function vGe(){const[{remote:e},t]=Jc();return C.jsx(C.Fragment,{children:C.jsx(iI,{editor:n=>C.jsx(mGe,{value:n}),icon:null,value:e,onChange:ie.debounce(n=>t({remote:n}),300),addItemLabel:"Add Solver",create:()=>({transport:Die,url:"",disabled:!0}),extras:C.jsx(Hp,{icon:C.jsx(OQ,{}),sx:{ml:2},onClick:()=>t({remote:CJ}),children:"Reset to Defaults"})})})}const wX=e=>`${e}x`;function yGe(){const{controls:e,onChange:t,state:n}=bd(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},a]=Jc(),[u,c]=O.useState("general");function d(p){return C.jsx(Wt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(Wt,{variant:"body1",children:p})}return C.jsx(RJ,{value:u,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(kJ,{onChange:(p,m)=>c(m),children:[C.jsx(Qg,{label:"General",value:"general"}),C.jsx(Qg,{label:"Connections",value:"connections"}),C.jsx(Qg,{label:"Renderers",value:"renderers"}),C.jsx(Qg,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:C.jsx(GA,{y:!0,children:C.jsxs(En,{vertical:!0,pt:6,children:[C.jsx(tm,{value:"general",children:C.jsxs(gt,{children:[d("Playback"),C.jsxs(En,{alignItems:"center",children:[h("Playback Rate"),C.jsx(ai,{flex:1}),C.jsx(Obe,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*Rg,label:wX(p)})),step:.25*Rg,min:.25*Rg,max:5*Rg,valueLabelFormat:p=>wX(p/Rg),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,m)=>a({playbackRate:m})})]}),d("UI"),C.jsxs(En,{alignItems:"center",children:[h("Acrylic"),C.jsx(ai,{flex:1}),C.jsx(Gm,{defaultChecked:!!i,onChange:(p,m)=>a({acrylic:m})})]}),C.jsxs(En,{alignItems:"center",children:[h("Dark Mode"),C.jsx(ai,{flex:1}),C.jsx(Gm,{defaultChecked:o==="dark",onChange:(p,m)=>a({theme:m?"dark":"light"})})]}),C.jsxs(En,{alignItems:"center",children:[h("Accent"),C.jsx(ai,{flex:1}),C.jsx(Hs,{value:s,items:ie.map(ie.keys(rSe),p=>({id:p,name:ie.startCase(p)})),showArrow:!0,onChange:p=>a({accentColor:p})})]})]})}),C.jsx(tm,{value:"connections",children:C.jsxs(gt,{children:[d("Solvers"),C.jsx(vGe,{})]})}),C.jsx(tm,{value:"renderers",children:C.jsxs(gt,{children:[d("Renderers"),C.jsx(hGe,{})]})}),C.jsx(tm,{value:"map-parsers",children:C.jsxs(gt,{children:[d("Map Parsers"),C.jsx(bGe,{})]})})]})})})}),C.jsx(zn.Extras,{children:e})]})})}function bGe(){return C.jsx(Wm,{children:ie.keys(eU).map(e=>C.jsx(N1,{children:C.jsx(ru,{primary:e,secondary:"Internal"})},e))})}function xGe(){return O.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function wGe(e){var d,h;const t=mu(),[{playback:n,step:r=0},i]=Vp(),{events:o}=one((h=(d=e==null?void 0:e.source)==null?void 0:d.trace)==null?void 0:h.content),s=!!o,a=n==="playing",[u,c]=[0,((o==null?void 0:o.length)??1)-1];return O.useMemo(()=>{const p={start:u,end:c,step:r,canPlay:s&&!a&&r0},m=y=>ie.clamp(r+y,u,c);return{playing:n==="playing",...p,...{play:()=>{t("Playback started"),i({playback:"playing",step:m(1)})},pause:(y=0)=>{t("Playback paused"),i({playback:"paused",step:m(y)})},stop:()=>i({step:u,playback:"paused"}),stepForward:()=>i({step:m(1)}),stepBackward:()=>i({step:m(-1)}),tick:(y=1)=>i({playback:"playing",step:m(y)})}}},[c,n,a,s,i,u,r])}function _Ge(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function SGe({layer:e}){const{step:t,tick:n,end:r,playing:i,canPause:o,canPlay:s,canStepBackward:a,canStepForward:u,canStop:c,pause:d,play:h,stepBackward:p,stepForward:m,stop:v}=wGe(e);Jxe();const y=mu(),[{playbackRate:S=1}]=Jc(),w=xGe(),b=O.useCallback((x,E)=>C.jsx(Dz,{primary:x,secondary:`Step ${t+E}`}),[t]);return O.useEffect(()=>{if(i)return t{for(const x of ie.range(S)){const E=w(t+x);if(E.result||E.error)return{...E,offset:x}}return{result:"",offset:0,error:void 0}},({result:x,offset:E,error:A})=>{A?(y(`${ie.trimEnd(A,".")}.`,`${E}`),d()):x?(y(`Breakpoint hit: ${x}.`,`${E}`),d(E)):n(S)}):d()},[b,i,r,t,d,n,y,w,S]),C.jsxs(C.Fragment,{children:[C.jsx(im,{label:"step-backward",icon:C.jsx(Cxe,{}),onClick:p,disabled:!a}),C.jsx(im,{...i?{label:"pause",icon:C.jsx(bxe,{}),onClick:()=>d(),disabled:!o}:{label:"play",icon:C.jsx(wxe,{}),onClick:()=>h(),disabled:!s,color:"primary"}}),C.jsx(im,{label:"step-forward",icon:C.jsx(Exe,{}),onClick:m,disabled:!u}),C.jsx(im,{label:"stop",icon:C.jsx(Txe,{}),onClick:v,disabled:!c})]})}const HI=0,Sd=1,$v=2,Nie=4;function Bie(e,t){return n=>e(t(n))}function EGe(e,t){return t(e)}function $ie(e,t){return n=>e(t,n)}function _X(e,t){return()=>e(t)}function WI(e,t){return t(e),e}function Ar(...e){return e}function CGe(e){e()}function SX(e){return()=>e}function TGe(...e){return()=>{e.map(CGe)}}function LU(e){return e!==void 0}function Fv(){}function Xn(e,t){return e(Sd,t)}function rn(e,t){e(HI,t)}function DU(e){e($v)}function zs(e){return e(Nie)}function Et(e,t){return Xn(e,$ie(t,HI))}function Vc(e,t){const n=e(Sd,r=>{n(),t(r)});return n}function Sn(){const e=[];return(t,n)=>{switch(t){case $v:e.splice(0,e.length);return;case Sd:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case HI:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function tt(e){let t=e;const n=Sn();return(r,i)=>{switch(r){case Sd:i(t);break;case HI:t=i;break;case Nie:return t}return n(r,i)}}function AGe(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case Sd:return o?n===o?void 0:(r(),n=o,t=Xn(e,o),t):(r(),Fv);case $v:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function qs(e){return WI(Sn(),t=>Et(e,t))}function Fo(e,t){return WI(tt(t),n=>Et(e,n))}function IGe(...e){return t=>e.reduceRight(EGe,t)}function Me(e,...t){const n=IGe(...t);return(r,i)=>{switch(r){case Sd:return Xn(e,n(i));case $v:DU(e);return}}}function Fie(e,t){return e===t}function Sr(e=Fie){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function ct(e){return t=>Bie(t,e)}function _c(e){return t=>()=>t(e)}function Ql(e,t){return n=>r=>n(t=e(t,r))}function uv(e){return t=>n=>{e>0?e--:t(n)}}function Nf(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function EX(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function cn(...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 a=Math.pow(2,s);Xn(o,u=>{const c=n;n=n|a,t[s]=u,c!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const a=()=>o([s].concat(t));n===i?a():r=a}}function CX(...e){return function(t,n){switch(t){case Sd:return TGe(...e.map(r=>Xn(r,n)));case $v:return;default:throw new Error(`unrecognized action ${t}`)}}}function jt(e,t=Fie){return Me(e,Sr(t))}function Ri(...e){const t=Sn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);Xn(o,u=>{n[s]=u,r=r|a,r===i&&rn(t,n)})}),function(o,s){switch(o){case Sd:return r===i&&s(n),Xn(t,s);case $v:return DU(t);default:throw new Error(`unrecognized action ${o}`)}}}function Wn(e,t=[],{singleton:n}={singleton:!0}){return{id:RGe(),constructor:e,dependencies:t,singleton:n}}const RGe=()=>Symbol();function PGe(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=i(o.map(u=>n(u)));return s&&t.set(r,a),a};return n(e)}function OGe(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[w]=b=>{const x=y[t.methods[w]];rn(x,b)},S),{})}function d(y){return s.reduce((S,w)=>(S[w]=AGe(y[t.events[w]]),S),{})}return{Component:fe.forwardRef((y,S)=>{const{children:w,...b}=y,[x]=fe.useState(()=>WI(PGe(e),A=>u(A,b))),[E]=fe.useState(_X(d,x));return zS(()=>{for(const A of s)A in b&&Xn(E[A],b[A]);return()=>{Object.values(E).map(DU)}},[b,E,x]),zS(()=>{u(x,b)}),fe.useImperativeHandle(S,SX(c(x))),fe.createElement(a.Provider,{value:x},n?fe.createElement(n,OGe([...r,...i,...s],b),w):w)}),usePublisher:y=>fe.useCallback($ie(rn,fe.useContext(a)[y]),[y]),useEmitterValue:y=>{const w=fe.useContext(a)[y],[b,x]=fe.useState(_X(zs,w));return zS(()=>Xn(w,E=>{E!==b&&x(SX(E))}),[w,b]),b},useEmitter:(y,S)=>{const b=fe.useContext(a)[y];zS(()=>Xn(b,S),[S,b])}}}const MGe=typeof document<"u"?fe.useLayoutEffect:fe.useEffect,kGe=MGe;var Ys=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ys||{});const LGe={0:"debug",1:"log",2:"warn",3:"error"},DGe=()=>typeof globalThis>"u"?window:globalThis,Ed=Wn(()=>{const e=tt(3);return{log:tt((n,r,i=1)=>{var o;const s=(o=DGe().VIRTUOSO_LOG_LEVEL)!=null?o:zs(e);i>=s&&console[LGe[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function NU(e,t=!0){const n=fe.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=fe.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 ug(e,t=!0){return NU(e,t).callbackRef}function NGe(e,t,n,r,i,o,s){const a=fe.useCallback(u=>{const c=BGe(u.children,t,"offsetHeight",i);let d=u.parentElement;for(;!d.dataset.virtuosoScroller;)d=d.parentElement;const h=d.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=s?s.scrollHeight:h?document.documentElement.scrollHeight:d.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:d.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v}),o==null||o($Ge("row-gap",getComputedStyle(u).rowGap,i)),c!==null&&e(c)},[e,t,i,o,s,r]);return NU(a,n)}function BGe(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,m=p===window||p===document,v=m?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=m?document.documentElement.scrollHeight:p.scrollHeight,S=m?window.innerHeight:p.offsetHeight,w=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?w():Kg.flushSync(w),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);fe.useEffect(()=>{const h=i||o.current;return r(i||o.current),u({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",u,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",u)}},[o,u,n,r,i]);function c(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const m=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(cd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=cd(p,"height"),S=p.scrollTop);const w=y-v;if(h.top=Math.ceil(Math.max(Math.min(w,h.top),0)),Uie(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),m&&t(!0);return}m?(s.current=h.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function d(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:d,scrollToCallback:c}}const Wo=Wn(()=>{const e=Sn(),t=Sn(),n=tt(0),r=Sn(),i=tt(0),o=Sn(),s=Sn(),a=tt(0),u=tt(0),c=tt(0),d=tt(0),h=Sn(),p=Sn(),m=tt(!1);return Et(Me(e,ct(({scrollTop:v})=>v)),t),Et(Me(e,ct(({scrollHeight:v})=>v)),s),Et(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:a,fixedHeaderHeight:u,fixedFooterHeight:c,footerHeight:d,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:m}},[],{singleton:!0}),rw={lvl:0};function Hie(e,t,n,r=rw,i=rw){return{k:e,v:t,lvl:n,l:r,r:i}}function rr(e){return e===rw}function Tm(){return rw}function q5(e,t){if(rr(e))return rw;const{k:n,l:r,r:i}=e;if(t===n){if(rr(r))return i;if(rr(i))return r;{const[o,s]=Wie(r);return kE(wi(e,{k:o,v:s,l:Gie(r)}))}}else return tt&&(a=a.concat(Y5(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:i}),r<=n&&(a=a.concat(Y5(s,t,n))),a}function yp(e){return rr(e)?[]:[...yp(e.l),{k:e.k,v:e.v},...yp(e.r)]}function Wie(e){return rr(e.r)?[e.k,e.v]:Wie(e.r)}function Gie(e){return rr(e.r)?e.l:kE(wi(e,{r:Gie(e.r)}))}function wi(e,t){return Hie(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 z$(e){return rr(e)||e.lvl>e.r.lvl}function TX(e){return K5(Xie(e))}function kE(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(z$(t))return Xie(wi(e,{lvl:r-1}));if(!rr(t)&&!rr(t.r))return wi(t.r,{l:wi(t,{r:t.r.l}),r:wi(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(z$(e))return K5(wi(e,{lvl:r-1}));if(!rr(n)&&!rr(n.l)){const i=n.l,o=z$(i)?n.lvl-1:n.lvl;return wi(i,{l:wi(e,{r:i.l,lvl:r-1}),r:K5(wi(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function GI(e,t,n){if(rr(e))return[];const r=Pl(e,t)[0];return FGe(Y5(e,r,n))}function Vie(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 K5(e){const{r:t,lvl:n}=e;return!rr(t)&&!rr(t.r)&&t.lvl===n&&t.r.lvl===n?wi(t,{l:wi(e,{r:t.l}),lvl:n+1}):e}function Xie(e){const{l:t}=e;return!rr(t)&&t.lvl===e.lvl?wi(t,{r:wi(e,{l:t.r})}):e}function dT(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],a=n(s,t);if(a===0)return o;if(a===-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 qie(e,t,n){return e[dT(e,t,n)]}function zGe(e,t,n,r){const i=dT(e,t,r),o=dT(e,n,r,i);return e.slice(i,o+1)}const BU=Wn(()=>({recalcInProgress:tt(!1)}),[],{singleton:!0});function UGe(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 AX(e,t){let n=0,r=0;for(;n=d||i===p)&&(e=q5(e,d)):(c=p!==i,u=!0),h>s&&s>=d&&p!==i&&(e=Bs(e,s+1,p));c&&(e=Bs(e,o,i))}return[e,n]}function HGe(){return{offsetTree:[],sizeTree:Tm(),groupOffsetTree:Tm(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function $U({index:e},t){return t===e?0:t0&&(t=Math.max(t,qie(e,r,$U).offset)),Vie(zGe(e,t,n,WGe),GGe)}function Q5(e,t,n,r){let i=e,o=0,s=0,a=0,u=0;if(t!==0){u=dT(i,t-1,$U),a=i[u].offset;const d=Pl(n,t-1);o=d[0],s=d[1],i.length&&i[u].size===Pl(n,t)[1]&&(u-=1),i=i.slice(0,u+1)}else i=[];for(const{start:c,value:d}of GI(n,t,1/0)){const h=c-o,p=h*s+a+h*r;i.push({offset:p,size:d,index:c}),o=c,a=p,s=d}return{offsetTree:i,lastIndex:o,lastOffset:a,lastSize:s}}function XGe(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ys.DEBUG);const o=e.sizeTree;let s=o,a=0;if(n.length>0&&rr(o)&&t.length===2){const p=t[0].size,m=t[1].size;s=n.reduce((v,y)=>Bs(Bs(v,y,p),y+1,m),s)}else[s,a]=jGe(s,t);if(s===o)return e;const{offsetTree:u,lastIndex:c,lastSize:d,lastOffset:h}=Q5(e.offsetTree,a,s,i);return{sizeTree:s,offsetTree:u,lastIndex:c,lastOffset:h,lastSize:d,groupOffsetTree:n.reduce((p,m)=>Bs(p,m,ow(m,u,i)),Tm()),groupIndices:n}}function ow(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=qie(t,e,$U),s=e-i,a=o*s+(s-1)*n+r;return a>0?a+n:a}function qGe(e){return typeof e.groupIndex<"u"}function Yie(e,t,n){if(qGe(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=Kie(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function Kie(e,t){if(!VI(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function VI(e){return!rr(e.groupOffsetTree)}function YGe(e){return yp(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 KGe={offsetHeight:"height",offsetWidth:"width"},xu=Wn(([{log:e},{recalcInProgress:t}])=>{const n=Sn(),r=Sn(),i=Fo(r,0),o=Sn(),s=Sn(),a=tt(0),u=tt([]),c=tt(void 0),d=tt(void 0),h=tt((A,I)=>cd(A,KGe[I])),p=tt(void 0),m=tt(0),v=HGe(),y=Fo(Me(n,cn(u,e,m),Ql(XGe,v),Sr()),v),S=Fo(Me(u,Sr(),Ql((A,I)=>({prev:A.current,current:I}),{prev:[],current:[]}),ct(({prev:A})=>A)),[]);Et(Me(u,Ht(A=>A.length>0),cn(y,m),ct(([A,I,R])=>{const M=A.reduce((D,N,H)=>Bs(D,N,ow(N,I.offsetTree,R)||H),Tm());return{...I,groupIndices:A,groupOffsetTree:M}})),y),Et(Me(r,cn(y),Ht(([A,{lastIndex:I}])=>A[{startIndex:A,endIndex:I,size:R}])),n),Et(c,d);const w=Fo(Me(c,ct(A=>A===void 0)),!0);Et(Me(d,Ht(A=>A!==void 0&&rr(zs(y).sizeTree)),ct(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=qs(Me(n,cn(y),Ql(({sizes:A},[I,R])=>({changed:R!==A,sizes:R}),{changed:!1,sizes:v}),ct(A=>A.changed)));Xn(Me(a,Ql((A,I)=>({diff:A.prev-I,prev:I}),{diff:0,prev:0}),ct(A=>A.diff)),A=>{const{groupIndices:I}=zs(y);if(A>0)rn(t,!0),rn(o,A+AX(A,I));else if(A<0){const R=zs(S);R.length>0&&(A-=AX(-A,R)),rn(s,A)}}),Xn(Me(a,cn(e)),([A,I])=>{A<0&&I("`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:a},Ys.ERROR)});const x=qs(o);Et(Me(o,cn(y),ct(([A,I])=>{const R=I.groupIndices.length>0,M=[],D=I.lastSize;if(R){const N=iw(I.sizeTree,0);let H=0,V=0;for(;H{let W=F.ranges;return F.prevSize!==0&&(W=[...F.ranges,{startIndex:F.prevIndex,endIndex:z+A-1,size:F.prevSize}]),{ranges:W,prevIndex:z+A,prevSize:G}},{ranges:M,prevIndex:A,prevSize:0}).ranges}return yp(I.sizeTree).reduce((N,{k:H,v:V})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:V}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const E=qs(Me(s,cn(y,m),ct(([A,{offsetTree:I},R])=>{const M=-A;return ow(M,I,R)})));return Et(Me(s,cn(y,m),ct(([A,I,R])=>{if(I.groupIndices.length>0){if(rr(I.sizeTree))return I;let D=Tm();const N=zs(S);let H=0,V=0,U=0;for(;H<-A;){U=N[V];const F=N[V+1]-U-1;V++,H+=F+1}if(D=yp(I.sizeTree).reduce((F,{k:z,v:G})=>Bs(F,Math.max(0,z+A),G),D),H!==-A){const F=iw(I.sizeTree,U);D=Bs(D,0,F);const z=Pl(I.sizeTree,-A+1)[1];D=Bs(D,1,z)}return{...I,sizeTree:D,...Q5(I.offsetTree,0,D,R)}}else{const D=yp(I.sizeTree).reduce((N,{k:H,v:V})=>Bs(N,Math.max(0,H+A),V),Tm());return{...I,sizeTree:D,...Q5(I.offsetTree,0,D,R)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:u,defaultItemSize:d,fixedItemSize:c,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:a,gap:m,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:w,itemSize:h}},Ar(Ed,BU),{singleton:!0}),QGe=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Qie(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!QGe)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Jw=Wn(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:a,headerHeight:u,footerHeight:c,fixedHeaderHeight:d,fixedFooterHeight:h},{log:p}])=>{const m=Sn(),v=tt(0);let y=null,S=null,w=null;function b(){y&&(y(),y=null),w&&(w(),w=null),S&&(clearTimeout(S),S=null),rn(i,!1)}return Et(Me(m,cn(e,o,t,v,u,c,p),cn(r,d,h),ct(([[x,E,A,I,R,M,D,N],H,V,U])=>{const L=Qie(x),{align:F,behavior:z,offset:G}=L,W=I-1,K=Yie(L,E,W);let q=ow(K,E.offsetTree,H)+M;F==="end"?(q+=V+Pl(E.sizeTree,K)[1]-A+U,K===W&&(q+=D)):F==="center"?q+=(V+Pl(E.sizeTree,K)[1]-A+U)/2:q-=R,G&&(q+=G);const Q=re=>{b(),re?(N("retrying to scroll to",{location:x},Ys.DEBUG),rn(m,x)):N("list did not change, scroll successful",{},Ys.DEBUG)};if(b(),z==="smooth"){let re=!1;w=Xn(n,ue=>{re=re||ue}),y=Vc(a,()=>{Q(re)})}else y=Vc(Me(n,JGe(150)),Q);return S=setTimeout(()=>{b()},1200),rn(i,!0),N("scrolling from index to",{index:K,top:q,behavior:z},Ys.DEBUG),{top:q,behavior:z}})),s),{scrollToIndex:m,topListHeight:v}},Ar(xu,Wo,Ed),{singleton:!0});function JGe(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const sw="up",Z1="down",ZGe="none",e9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},t9e=0,Zw=Wn(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=tt(!1),a=tt(!0),u=Sn(),c=Sn(),d=tt(4),h=tt(t9e),p=Fo(Me(CX(Me(jt(t),uv(1),_c(!0)),Me(jt(t),uv(1),_c(!1),EX(100))),Sr()),!1),m=Fo(Me(CX(Me(o,_c(!0)),Me(o,_c(!1),EX(200))),Sr()),!1);Et(Me(Ri(jt(t),jt(h)),ct(([b,x])=>b<=x),Sr()),a),Et(Me(a,Nf(50)),c);const v=qs(Me(Ri(e,jt(n),jt(r),jt(i),jt(d)),Ql((b,[{scrollTop:x,scrollHeight:E},A,I,R,M])=>{const D=x+A-E>-M,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(D){let V,U;return x>b.state.scrollTop?(V="SCROLLED_DOWN",U=b.state.scrollTop-x):(V="SIZE_DECREASED",U=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:V,scrollTopDelta:U}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=Fo(Me(e,Ql((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if(Uie(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const I=E-(x+A)<1;return b.scrollTop!==x&&I?{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}),Ht(b=>b.changed),ct(b=>b.jump)),0);Et(Me(v,ct(b=>b.atBottom)),s),Et(Me(s,Nf(50)),u);const S=tt(Z1);Et(Me(e,ct(({scrollTop:b})=>b),Sr(),Ql((b,x)=>zs(m)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),Et(Me(e,Nf(50),_c(ZGe)),S);const w=tt(0);return Et(Me(p,Ht(b=>!b),_c(0)),w),Et(Me(t,Nf(100),cn(p),Ht(([b,x])=>!!x),Ql(([b,x],[E])=>[x,E],[0,0]),ct(([b,x])=>x-b)),w),{isScrolling:p,isAtTop:a,isAtBottom:s,atBottomState:v,atTopStateChange:c,atBottomStateChange:u,scrollDirection:S,atBottomThreshold:d,atTopThreshold:h,scrollVelocity:w,lastJumpDueToItemResize:y}},Ar(Wo)),Cd=Wn(([{log:e}])=>{const t=tt(!1),n=qs(Me(t,Ht(r=>r),Sr()));return Xn(t,r=>{r&&zs(e)("props updated",{},Ys.DEBUG)}),{propsReady:t,didMount:n}},Ar(Ed),{singleton:!0});function FU(e,t){e==0?t():requestAnimationFrame(()=>FU(e-1,t))}function zU(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const e_=Wn(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=tt(!0),a=tt(0),u=tt(!1);return Et(Me(o,cn(a),Ht(([c,d])=>!!d),_c(!1)),s),Xn(Me(Ri(t,o),cn(s,e,n,u),Ht(([[,c],d,{sizeTree:h},p,m])=>c&&(!rr(h)||LU(p))&&!d&&!m),cn(a)),([,c])=>{rn(u,!0),FU(3,()=>{Vc(r,()=>rn(s,!0)),rn(i,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:a}},Ar(xu,Wo,Jw,Cd),{singleton:!0});function IX(e){return e?e==="smooth"?"smooth":"auto":!1}const n9e=(e,t)=>typeof e=="function"?IX(e(t)):t&&IX(e),r9e=Wn(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:a},{log:u},{scrollingInProgress:c}])=>{const d=tt(!1),h=Sn();let p=null;function m(y){rn(i,{index:"LAST",align:"end",behavior:y})}Xn(Me(Ri(Me(jt(e),uv(1)),a),cn(jt(d),n,o,c),ct(([[y,S],w,b,x,E])=>{let A=S&&x,I="auto";return A&&(I=n9e(w,b||E),A=A&&!!I),{totalCount:y,shouldFollow:A,followOutputBehavior:I}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Vc(t,()=>{zs(u)("following output to ",{totalCount:y},Ys.DEBUG),m(S),p=null})});function v(y){const S=Vc(r,w=>{y&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zs(u)("scrolling to bottom due to increased size",{},Ys.DEBUG),m("auto"))});setTimeout(S,100)}return Xn(Me(Ri(jt(d),e,s),Ht(([y,,S])=>y&&S),Ql(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),cn(d,e)),([,y])=>{v(y!==!1)}),Xn(h,()=>{v(zs(d)!==!1)}),Xn(Ri(jt(d),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&m("auto")}),{followOutput:d,autoscrollToBottom:h}},Ar(xu,Zw,Jw,e_,Cd,Ed,Wo));function i9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Jie=Wn(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=Sn(),s=Sn(),a=qs(Me(o,ct(i9e)));return Et(Me(a,ct(u=>u.totalCount)),e),Et(Me(a,ct(u=>u.groupIndices)),t),Et(Me(Ri(r,n,i),Ht(([u,c])=>VI(c)),ct(([u,c,d])=>Pl(c.groupOffsetTree,Math.max(u-d,0),"v")[0]),Sr(),ct(u=>[u])),s),{groupCounts:o,topItemsIndexes:s}},Ar(xu,Wo));function aw(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Zie(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const hT="top",pT="bottom",RX="none";function PX(e,t,n){return typeof e=="number"?n===sw&&t===hT||n===Z1&&t===pT?e:0:n===sw?t===hT?e.main:e.reverse:t===pT?e.main:e.reverse}function OX(e,t){return typeof e=="number"?e:e[t]||0}const UU=Wn(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=Sn(),s=tt(0),a=tt(0),u=tt(0),c=Fo(Me(Ri(jt(e),jt(t),jt(r),jt(o,aw),jt(u),jt(s),jt(i),jt(n),jt(a)),ct(([d,h,p,[m,v],y,S,w,b,x])=>{const E=d-b,A=S+w,I=Math.max(p-E,0);let R=RX;const M=OX(x,hT),D=OX(x,pT);return m-=b,m+=p+w,v+=p+w,v-=b,m>d+A-M&&(R=sw),vd!=null),Sr(aw)),[0,0]);return{listBoundary:o,overscan:u,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ar(Wo),{singleton:!0});function o9e(e,t,n){if(VI(t)){const r=Kie(e,t);return[{index:Pl(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 U$={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function MX(e,t,n){if(e.length===0)return[];if(!VI(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=GI(t.groupOffsetTree,r,i);let a,u=0;for(const c of e){(!a||a.end0){c=e[0].offset;const y=e[e.length-1];d=y.offset+y.size}const h=n-u,p=a+h*s+(h-1)*r,m=c,v=p-d;return{items:MX(e,i,o),topItems:MX(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:c,offsetBottom:v,top:m,bottom:d,totalCount:n,firstItemIndex:o}}function eoe(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const d of n.groupIndices){if(d-s>=e)break;s++}const a=e+s,u=zU(t,a),c=Array.from({length:a}).map((d,h)=>({index:h+u,size:0,offset:0,data:o[h+u]}));return LE(c,[],a,i,n,r)}const cg=Wn(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:a,topListHeight:u},{scrolledToInitialItem:c,initialTopMostItemIndex:d},{topListHeight:h},p,{didMount:m},{recalcInProgress:v}])=>{const y=tt([]),S=tt(0),w=Sn();Et(o.topItemsIndexes,y);const b=Fo(Me(Ri(m,v,jt(s,aw),jt(t),jt(e),jt(d),c,jt(y),jt(r),jt(i),n),Ht(([I,R,,M,,,,,,,D])=>{const N=D&&D.length!==M;return I&&!R&&!N}),ct(([,,[I,R],M,D,N,H,V,U,L,F])=>{const z=D,{sizeTree:G,offsetTree:W}=z,K=zs(S);if(M===0)return{...U$,totalCount:M};if(I===0&&R===0)return K===0?{...U$,totalCount:M}:eoe(K,N,D,U,L,F||[]);if(rr(G))return K>0?null:LE(o9e(zU(N,M),z,F),[],M,L,z,U);const q=[];if(V.length>0){const se=V[0],J=V[V.length-1];let ae=0;for(const le of GI(G,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++)q.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return LE([],q,M,L,z,U);const Q=V.length>0?V[V.length-1]+1:0,re=VGe(W,I,R,Q);if(re.length===0)return null;const ue=M-1,ce=WI([],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+L}});return LE(ce,q,M,L,z,U)}),Ht(I=>I!==null),Sr()),U$);Et(Me(n,Ht(LU),ct(I=>I==null?void 0:I.length)),t),Et(Me(b,ct(I=>I.topListHeight)),h),Et(h,u),Et(Me(b,ct(I=>[I.top,I.bottom])),a),Et(Me(b,ct(I=>I.items)),w);const x=qs(Me(b,Ht(({items:I})=>I.length>0),cn(t,n),Ht(([{items:I},R])=>I[I.length-1].originalIndex===R-1),ct(([,I,R])=>[I-1,R]),Sr(aw),ct(([I])=>I))),E=qs(Me(b,Nf(200),Ht(({items:I,topItems:R})=>I.length>0&&I[0].originalIndex===R.length),ct(({items:I})=>I[0].index),Sr())),A=qs(Me(b,Ht(({items:I})=>I.length>0),ct(({items:I})=>{let R=0,M=I.length-1;for(;I[R].type==="group"&&RR;)M--;return{startIndex:I[R].index,endIndex:I[M].index}}),Sr(Zie)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:w,initialItemCount:S,...p}},Ar(xu,Jie,UU,e_,Jw,Zw,Cd,BU),{singleton:!0}),s9e=Wn(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:a}])=>(Et(Me(a,cn(o),Ht(([,u])=>u!==0),cn(i,e,t,r,n),ct(([[,u],c,d,h,p,m=[]])=>eoe(u,c,d,h,p,m))),s),{}),Ar(xu,e_,cg,Cd),{singleton:!0}),toe=Wn(([{scrollVelocity:e}])=>{const t=tt(!1),n=Sn(),r=tt(!1);return Et(Me(e,cn(r,t,n),Ht(([i,o])=>!!o),ct(([i,o,s,a])=>{const{exit:u,enter:c}=o;if(s){if(u(i,a))return!1}else if(c(i,a))return!0;return s}),Sr()),t),Xn(Me(Ri(t,e,n),cn(r)),([[i,o,s],a])=>i&&a&&a.change&&a.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ar(Zw),{singleton:!0}),a9e=Wn(([{topItemsIndexes:e}])=>{const t=tt(0);return Et(Me(t,Ht(n=>n>0),ct(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},Ar(cg)),noe=Wn(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=Sn(),s=Fo(Me(Ri(e,r,t,n,i),ct(([a,u,c,d,h])=>a+u+c+d+h.offsetBottom+h.bottom)),0);return Et(jt(s),o),{totalListHeight:s,totalListHeightChanged:o}},Ar(Wo,cg),{singleton:!0});function roe(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const l9e=roe(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),u9e=Wn(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:a},{listState:u},{beforeUnshiftWith:c,shiftWithOffset:d,sizes:h,gap:p},{log:m},{recalcInProgress:v}])=>{const y=qs(Me(u,cn(a),Ql(([,w,b,x],[{items:E,totalCount:A,bottom:I,offsetBottom:R},M])=>{const D=I+R;let N=0;return b===A&&w.length>0&&E.length>0&&(E[0].originalIndex===0&&w[0].originalIndex===0||(N=D-x,N!==0&&(N+=M))),[N,E,A,D]},[0,[],0,0]),Ht(([w])=>w!==0),cn(t,s,r,o,m,v),Ht(([,w,b,x,,,E])=>!E&&!x&&w!==0&&b===sw),ct(([[w],,,,,b])=>(b("Upward scrolling compensation",{amount:w},Ys.DEBUG),w))));function S(w){w>0?(rn(e,{top:-w,behavior:"auto"}),rn(n,0)):(rn(n,0),rn(e,{top:-w,behavior:"auto"}))}return Xn(Me(y,cn(n,i)),([w,b,x])=>{x&&l9e()?rn(n,b-w):S(-w)}),Xn(Me(Ri(Fo(i,!1),n,v),Ht(([w,b,x])=>!w&&!x&&b!==0),ct(([w,b])=>b),Nf(1)),S),Et(Me(d,ct(w=>({top:-w}))),e),Xn(Me(c,cn(h,p),ct(([w,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function I(R){return R*(b+A)}if(x.length===0)return I(w);{let R=0;const M=iw(E,0);let D=0,N=0;for(;Dw&&(R-=M,H=w-D+1),D+=H,R+=I(H),N++}return R}})),w=>{rn(n,w),requestAnimationFrame(()=>{rn(e,{top:w}),requestAnimationFrame(()=>{rn(n,0),rn(v,!1)})})}),{deviation:n}},Ar(Wo,Zw,cg,xu,Ed,BU)),c9e=Wn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=tt(0);return Xn(Me(e,cn(r),Ht(([,i])=>i!==0),ct(([,i])=>({top:i}))),i=>{Vc(Me(n,uv(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{rn(t,i)})})}),{initialScrollTop:r}},Ar(Cd,Wo,cg),{singleton:!0}),f9e=Wn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=tt(!1),r=Fo(Me(Ri(n,e,t),Ht(([i])=>i),ct(([,i,o])=>Math.max(0,i-o)),Nf(0),Sr()),0);return{alignToBottom:n,paddingTopAddition:r}},Ar(Wo,noe),{singleton:!0}),jU=Wn(([{scrollTo:e,scrollContainerState:t}])=>{const n=Sn(),r=Sn(),i=Sn(),o=tt(!1),s=tt(void 0);return Et(Me(Ri(n,r),ct(([{viewportHeight:a,scrollTop:u,scrollHeight:c},{offsetTop:d}])=>({scrollTop:Math.max(0,u-d),scrollHeight:c,viewportHeight:a}))),t),Et(Me(e,cn(r),ct(([a,{offsetTop:u}])=>({...a,top:a.top+u}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},Ar(Wo)),d9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,h9e=Wn(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:u},{scrollToIndex:c}])=>{const d=Sn();return Et(Me(d,cn(e,i,t,o,s,a,r),cn(n),ct(([[h,p,m,v,y,S,w,b],x])=>{const{done:E,behavior:A,align:I,calculateViewLocation:R=d9e,...M}=h,D=Yie(h,p,v-1),N=ow(D,p.offsetTree,x)+y+S,H=N+Pl(p.sizeTree,D)[1],V=b+S,U=b+m-w,L=R({itemTop:N,itemBottom:H,viewportTop:V,viewportBottom:U,locationParams:{behavior:A,align:I,...M}});return L?E&&Vc(Me(u,Ht(F=>F===!1),uv(zs(u)?1:2)),E):E&&E(),L}),Ht(h=>h!==null)),c),{scrollIntoView:d}},Ar(xu,Wo,Jw,cg,Ed),{singleton:!0}),p9e=Wn(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:a}])=>{const u=Sn(),c=tt(void 0),d=tt(null),h=tt(null);return Et(s,d),Et(a,h),Xn(Me(u,cn(e,n,o,d,h)),([p,m,v,y,S,w])=>{const b=YGe(m.sizeTree);y&&S!==null&&w!==null&&(v=S.scrollTop-w.offsetTop),p({ranges:b,scrollTop:v})}),Et(Me(c,Ht(LU),ct(g9e)),r),Et(Me(i,cn(c),Ht(([,p])=>p!==void 0),Sr(),ct(([,p])=>p.ranges)),t),{getState:u,restoreStateFrom:c}},Ar(xu,Wo,e_,Cd,jU));function g9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const m9e=Wn(([e,t,n,r,i,o,s,a,u,c])=>({...e,...t,...n,...r,...i,...o,...s,...a,...u,...c}),Ar(UU,s9e,Cd,toe,noe,c9e,f9e,jU,h9e,Ed)),v9e=Wn(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:a,groupIndices:u,statefulTotalCount:c,gap:d,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:m},v,y,S,{listState:w,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:I},{groupCounts:R},M])=>(Et(x.rangeChanged,M.scrollSeekRangeChanged),Et(Me(M.windowViewportRect,ct(D=>D.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:m,topItemsIndexes:b,topItemCount:I,groupCounts:R,fixedItemHeight:n,defaultItemHeight:r,gap:d,...S,statefulTotalCount:c,listState:w,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:u,...x,...M,...v,sizes:h,...y}),Ar(xu,e_,Wo,p9e,r9e,cg,Jw,u9e,a9e,Jie,m9e)),j$="-webkit-sticky",kX="sticky",ioe=roe(()=>{if(typeof document>"u")return kX;const e=document.createElement("div");return e.style.position=j$,e.style.position===j$?j$:kX});function ooe(e,t){const n=fe.useRef(null),r=fe.useCallback(a=>{if(a===null||!a.offsetParent)return;const u=a.getBoundingClientRect(),c=u.width;let d,h;if(t){const p=t.getBoundingClientRect(),m=u.top-p.top;d=p.height-Math.max(0,m),h=m+t.scrollTop}else d=window.innerHeight-Math.max(0,u.top),h=u.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:d,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:i,ref:o}=NU(r),s=fe.useCallback(()=>{r(o.current)},[r,o]);return fe.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(s);return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const soe=fe.createContext(void 0),aoe=fe.createContext(void 0);function loe(e){return e}const y9e=Wn(()=>{const e=tt(u=>`Item ${u}`),t=tt(null),n=tt(u=>`Group ${u}`),r=tt({}),i=tt(loe),o=tt("div"),s=tt(Fv),a=(u,c=null)=>Fo(Me(r,ct(d=>d[u]),Sr()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),b9e=Wn(([e,t])=>({...e,...t}),Ar(v9e,y9e)),x9e=({height:e})=>fe.createElement("div",{style:{height:e}}),w9e={position:ioe(),zIndex:1,overflowAnchor:"none"},_9e={overflowAnchor:"none"},LX=fe.memo(function({showTopList:t=!1}){const n=bn("listState"),r=xa("sizeRanges"),i=bn("useWindowScroll"),o=bn("customScrollParent"),s=xa("windowScrollContainerState"),a=xa("scrollContainerState"),u=o||i?s:a,c=bn("itemContent"),d=bn("context"),h=bn("groupContent"),p=bn("trackItemSizes"),m=bn("itemSize"),v=bn("log"),y=xa("gap"),{callbackRef:S}=NGe(r,m,p,t?Fv:u,v,y,o),[w,b]=fe.useState(0);HU("deviation",L=>{w!==L&&b(L)});const x=bn("EmptyPlaceholder"),E=bn("ScrollSeekPlaceholder")||x9e,A=bn("ListComponent"),I=bn("ItemComponent"),R=bn("GroupComponent"),M=bn("computeItemKey"),D=bn("isSeeking"),N=bn("groupIndices").length>0,H=bn("paddingTopAddition"),V=bn("scrolledToInitialItem"),U=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:w,...V?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?fe.createElement(x,Jo(x,d)):fe.createElement(A,{...Jo(A,d),ref:S,style:U,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(L=>{const F=L.originalIndex,z=M(F+n.firstItemIndex,L.data,d);return D?fe.createElement(E,{...Jo(E,d),key:z,index:L.index,height:L.size,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?fe.createElement(R,{...Jo(R,d),key:z,"data-index":F,"data-known-size":L.size,"data-item-index":L.index,style:w9e},h(L.index,d)):fe.createElement(I,{...Jo(I,d),key:z,"data-index":F,"data-known-size":L.size,"data-item-index":L.index,"data-item-group-index":L.groupIndex,item:L.data,style:_9e},N?c(L.index,L.groupIndex,L.data,d):c(L.index,L.data,d))}))}),S9e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},XI={width:"100%",height:"100%",position:"absolute",top:0},E9e={width:"100%",position:ioe(),top:0,zIndex:1};function Jo(e,t){if(typeof e!="string")return{context:t}}const C9e=fe.memo(function(){const t=bn("HeaderComponent"),n=xa("headerHeight"),r=bn("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=bn("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),T9e=fe.memo(function(){const t=bn("FooterComponent"),n=xa("footerHeight"),r=bn("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=bn("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null});function uoe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return fe.memo(function({style:o,children:s,...a}){const u=e("scrollContainerState"),c=n("ScrollerComponent"),d=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:y}=jie(u,d,c,h);return t("scrollTo",y),t("scrollBy",v),fe.createElement(c,{ref:m,style:{...S9e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Jo(c,p)},s)})}function coe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return fe.memo(function({style:o,children:s,...a}){const u=e("windowScrollContainerState"),c=n("ScrollerComponent"),d=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),m=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:w}=jie(u,d,c,Fv,m);return kGe(()=>(y.current=m||window,()=>{y.current=null}),[y,m]),t("windowScrollTo",w),t("scrollBy",S),fe.createElement(c,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...a,...Jo(c,v)},s)})}const A9e=({children:e})=>{const t=fe.useContext(soe),n=xa("viewportHeight"),r=xa("fixedItemHeight"),i=ug(Bie(n,o=>cd(o,"height")));return fe.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),fe.createElement("div",{style:XI,ref:i,"data-viewport-type":"element"},e)},I9e=({children:e})=>{const t=fe.useContext(soe),n=xa("windowViewportRect"),r=xa("fixedItemHeight"),i=bn("customScrollParent"),o=ooe(n,i);return fe.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),fe.createElement("div",{ref:o,style:XI,"data-viewport-type":"window"},e)},R9e=({children:e})=>{const t=bn("TopItemListComponent"),n=bn("headerHeight"),r={...E9e,marginTop:`${n}px`},i=bn("context");return fe.createElement(t||"div",{style:r,context:i},e)},P9e=fe.memo(function(t){const n=bn("useWindowScroll"),r=bn("topItemsIndexes").length>0,i=bn("customScrollParent"),o=i||n?k9e:M9e,s=i||n?I9e:A9e;return fe.createElement(o,{...t},r&&fe.createElement(R9e,null,fe.createElement(LX,{showTopList:!0})),fe.createElement(s,null,fe.createElement(C9e,null),fe.createElement(LX,null),fe.createElement(T9e,null)))}),{Component:O9e,usePublisher:xa,useEmitterValue:bn,useEmitter:HU}=zie(b9e,{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"}},P9e),M9e=uoe({usePublisher:xa,useEmitterValue:bn,useEmitter:HU}),k9e=coe({usePublisher:xa,useEmitterValue:bn,useEmitter:HU}),L9e=O9e,DX={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},D9e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:NX,ceil:BX,floor:gT,min:H$,max:ex}=Math;function N9e(e){return{...D9e,items:e}}function $X(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 B9e(e,t){return e&&e.column===t.column&&e.row===t.row}function US(e,t){return e&&e.width===t.width&&e.height===t.height}const $9e=Wn(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:u,footerHeight:c,headerHeight:d},h,p,{propsReady:m,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=tt(0),I=tt(0),R=tt(DX),M=tt({height:0,width:0}),D=tt({height:0,width:0}),N=Sn(),H=Sn(),V=tt(0),U=tt(null),L=tt({row:0,column:0}),F=Sn(),z=Sn(),G=tt(!1),W=tt(0),K=tt(!0),q=tt(!1);Xn(Me(v,cn(W),Ht(([J,ae])=>!!ae)),()=>{rn(K,!1),rn(I,0)}),Xn(Me(Ri(v,K,D,M,W,q),Ht(([J,ae,le,he,,pe])=>J&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,J])=>{rn(q,!0),FU(1,()=>{rn(N,J)}),Vc(Me(r),()=>{rn(n,[0,0]),rn(K,!0)})}),Et(Me(z,Ht(J=>J!=null&&J.scrollTop>0),_c(0)),I),Xn(Me(v,cn(z),Ht(([,J])=>J!=null)),([,J])=>{J&&(rn(M,J.viewport),rn(D,J==null?void 0:J.item),rn(L,J.gap),J.scrollTop>0&&(rn(G,!0),Vc(Me(r,uv(1)),ae=>{rn(G,!1)}),rn(s,{top:J.scrollTop})))}),Et(Me(M,ct(({height:J})=>J)),i),Et(Me(Ri(jt(M,US),jt(D,US),jt(L,(J,ae)=>J&&J.column===ae.column&&J.row===ae.row),jt(r)),ct(([J,ae,le,he])=>({viewport:J,item:ae,gap:le,scrollTop:he}))),F),Et(Me(Ri(jt(A),t,jt(L,B9e),jt(D,US),jt(M,US),jt(U),jt(I),jt(G),jt(K),jt(W)),Ht(([,,,,,,,J])=>!J),ct(([J,[ae,le],he,pe,ve,ye,xe,,ge,be])=>{const{row:Ze,column:qe}=he,{height:ut,width:Bt}=pe,{width:Oe}=ve;if(xe===0&&(J===0||Oe===0))return DX;if(Bt===0){const Ot=zU(be,J),ft=Ot===0?Math.max(xe-1,0):Ot;return N9e($X(Ot,ft,ye))}const ze=foe(Oe,Bt,qe);let st,mt;ge?ae===0&&le===0&&xe>0?(st=0,mt=xe-1):(st=ze*gT((ae+Ze)/(ut+Ze)),mt=ze*BX((le+Ze)/(ut+Ze))-1,mt=H$(J-1,ex(mt,ze-1)),st=H$(mt,ex(0,st))):(st=0,mt=-1);const vt=$X(st,mt,ye),{top:_e,bottom:Ue}=FX(ve,he,pe,vt),Ke=BX(J/ze),Be=Ke*ut+(Ke-1)*Ze-Ue;return{items:vt,offsetTop:_e,offsetBottom:Be,top:_e,bottom:Ue,itemHeight:ut,itemWidth:Bt}})),R),Et(Me(U,Ht(J=>J!==null),ct(J=>J.length)),A),Et(Me(Ri(M,D,R,L),Ht(([J,ae,{items:le}])=>le.length>0&&ae.height!==0&&J.height!==0),ct(([J,ae,{items:le},he])=>{const{top:pe,bottom:ve}=FX(J,he,ae,le);return[pe,ve]}),Sr(aw)),n);const Q=tt(!1);Et(Me(r,cn(Q),ct(([J,ae])=>ae||J!==0)),Q);const re=qs(Me(jt(R),Ht(({items:J})=>J.length>0),cn(A,Q),Ht(([{items:J},ae,le])=>le&&J[J.length-1].index===ae-1),ct(([,J])=>J-1),Sr())),ue=qs(Me(jt(R),Ht(({items:J})=>J.length>0&&J[0].index===0),_c(0),Sr())),ce=qs(Me(jt(R),cn(G),Ht(([{items:J},ae])=>J.length>0&&!ae),ct(([{items:J}])=>({startIndex:J[0].index,endIndex:J[J.length-1].index})),Sr(Zie),Nf(0)));Et(ce,p.scrollSeekRangeChanged),Et(Me(N,cn(M,D,A,L),ct(([J,ae,le,he,pe])=>{const ve=Qie(J),{align:ye,behavior:xe,offset:ge}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=ex(0,be,H$(he-1,be));let Ze=J5(ae,pe,le,be);return ye==="end"?Ze=NX(Ze-ae.height+le.height):ye==="center"&&(Ze=NX(Ze-ae.height/2+le.height/2)),ge&&(Ze+=ge),{top:Ze,behavior:xe}})),s);const se=Fo(Me(R,ct(J=>J.offsetBottom+J.bottom)),0);return Et(Me(y,ct(J=>({width:J.visibleWidth,height:J.visibleHeight}))),M),{data:U,totalCount:A,viewportDimensions:M,itemDimensions:D,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,deviation:V,scrollContainerState:u,footerHeight:c,headerHeight:d,initialItemCount:I,gap:L,restoreStateFrom:z,...p,initialTopMostItemIndex:W,gridState:R,totalListHeight:se,...h,startReached:ue,endReached:re,rangeChanged:ce,stateChanged:F,propsReady:m,stateRestoreInProgress:G,...E}},Ar(UU,Wo,Zw,toe,Cd,jU,Ed));function FX(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=J5(e,t,n,r[0].index),s=J5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function J5(e,t,n,r){const i=foe(e.width,n.width,t.column),o=gT(r/i),s=o*n.height+ex(0,o-1)*t.row;return s>0?s+t.row:s}function foe(e,t,n){return ex(1,gT((e+n)/(gT(t)+n)))}const F9e=Wn(()=>{const e=tt(c=>`Item ${c}`),t=tt({}),n=tt(null),r=tt("virtuoso-grid-item"),i=tt("virtuoso-grid-list"),o=tt(loe),s=tt("div"),a=tt(Fv),u=(c,d=null)=>Fo(Me(t,ct(h=>h[c]),Sr()),d);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:a,FooterComponent:u("Footer"),HeaderComponent:u("Header"),ListComponent:u("List","div"),ItemComponent:u("Item","div"),ScrollerComponent:u("Scroller","div"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder","div")}}),z9e=Wn(([e,t])=>({...e,...t}),Ar($9e,F9e)),U9e=fe.memo(function(){const t=Lr("gridState"),n=Lr("listClassName"),r=Lr("itemClassName"),i=Lr("itemContent"),o=Lr("computeItemKey"),s=Lr("isSeeking"),a=Tl("scrollHeight"),u=Lr("ItemComponent"),c=Lr("ListComponent"),d=Lr("ScrollSeekPlaceholder"),h=Lr("context"),p=Tl("itemDimensions"),m=Tl("gap"),v=Lr("log"),y=Lr("stateRestoreInProgress"),S=ug(w=>{const b=w.parentElement.parentElement.scrollHeight;a(b);const x=w.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}m({row:zX("row-gap",getComputedStyle(w).rowGap,v),column:zX("column-gap",getComputedStyle(w).columnGap,v)})});return y?null:fe.createElement(c,{ref:S,className:n,...Jo(c,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(w=>{const b=o(w.index,w.data,h);return s?fe.createElement(d,{key:b,...Jo(d,h),index:w.index,height:t.itemHeight,width:t.itemWidth}):fe.createElement(u,{...Jo(u,h),className:r,"data-index":w.index,key:b},i(w.index,w.data,h))}))}),j9e=fe.memo(function(){const t=Lr("HeaderComponent"),n=Tl("headerHeight"),r=Lr("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=Lr("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),H9e=fe.memo(function(){const t=Lr("FooterComponent"),n=Tl("footerHeight"),r=Lr("headerFooterTag"),i=ug(s=>n(cd(s,"height"))),o=Lr("context");return t?fe.createElement(r,{ref:i},fe.createElement(t,Jo(t,o))):null}),W9e=({children:e})=>{const t=fe.useContext(aoe),n=Tl("itemDimensions"),r=Tl("viewportDimensions"),i=ug(o=>{r(o.getBoundingClientRect())});return fe.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),fe.createElement("div",{style:XI,ref:i},e)},G9e=({children:e})=>{const t=fe.useContext(aoe),n=Tl("windowViewportRect"),r=Tl("itemDimensions"),i=Lr("customScrollParent"),o=ooe(n,i);return fe.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),fe.createElement("div",{ref:o,style:XI},e)},V9e=fe.memo(function({...t}){const n=Lr("useWindowScroll"),r=Lr("customScrollParent"),i=r||n?q9e:X9e,o=r||n?G9e:W9e;return fe.createElement(i,{...t},fe.createElement(o,null,fe.createElement(j9e,null),fe.createElement(U9e,null),fe.createElement(H9e,null)))}),{Component:q7e,usePublisher:Tl,useEmitterValue:Lr,useEmitter:doe}=zie(z9e,{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"}},V9e),X9e=uoe({usePublisher:Tl,useEmitterValue:Lr,useEmitter:doe}),q9e=coe({usePublisher:Tl,useEmitterValue:Lr,useEmitter:doe});function zX(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ys.WARN),t==="normal"?0:parseInt(t??"0",10)}const Y9e=O.forwardRef(({style:e,children:t,...n},r)=>{const i=O.useRef(null),{palette:o,spacing:s}=Ln(),a=Ex({".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)}}),[u]=pJ({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)&&u({target:i.current,elements:{viewport:r.current}})},[u]);const c=O.useCallback(d=>{d&&r&&(typeof r=="function"?r(d):r.current=d)},[r]);return C.jsx("div",{ref:i,style:e,className:a,children:C.jsx("div",{ref:c,...n,children:t})})});function K9e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(gt,{...i,children:C.jsx(L9e,{components:{Scroller:Y9e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function Q9e({event:e,hidden:t}){return C.jsxs(vFe,{children:[ie.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(pxe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function J9e({event:e,index:t,selected:n,...r}){const{spacing:i}=Ln(),[,o]=Vp();return C.jsxs(QF,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${jx(e==null?void 0:e.type)}`,...r.sx},onClick:()=>o({step:t}),children:[C.jsx(Gf,{children:C.jsx(Wt,{variant:"body2",children:t})}),C.jsx(vd,{title:C.jsx(V3,{event:e,flexDirection:"column"}),children:C.jsx(ru,{sx:{overflow:"hidden"},primary:C.jsx(Q9e,{event:e,hidden:!1}),secondary:C.jsx(V3,{event:ie.pick(e,"f","g","pId")})})})]})}const Z9e=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),e7e=e=>Number(e.replace(/px$/,""));function t7e(){const{spacing:e}=Ln(),{controls:t,onChange:n,state:r}=bd(),[{step:i=0,playback:o},s]=Vp(),[{layers:a}]=Oa(),u=O.useRef(null),[c,d]=O.useState(),h=ie.find(a,{key:c});O.useEffect(()=>{var m;c||d((m=ie.head(a))==null?void 0:m.key)},[c,d,a]);const p=O.useMemo(()=>{var m;if(h)return O.createElement(jw[((m=h==null?void 0:h.source)==null?void 0:m.type)??""].steps,{layer:h})},[h]);return O.useEffect(()=>{o==="paused"&&ie.delay(()=>{var m,v;return(v=(m=u==null?void 0:u.current)==null?void 0:m.scrollToIndex)==null?void 0:v.call(m,{index:i,align:"start",behavior:"smooth",offset:-e7e(e(6+2))})},150)},[i,o,e]),C.jsxs(zn,{onChange:n,stack:r,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,alignItems:"center",children:p?o!=="playing"?O.cloneElement(p,{children:m=>h?m.length?C.jsx(K9e,{sx:{width:"100%",height:"100%"},items:m,listOptions:{ref:u,defaultItemHeight:80,overscan:0},renderItem:(v,y)=>C.jsxs(gt,{sx:{height:e(y?10:16),pt:y?0:e(6)},children:[C.jsx(J9e,{event:v,index:y,selected:y===i,sx:{height:"100%"}}),C.jsx(Kc,{variant:"inset"})]})}):C.jsx(hp,{icon:C.jsx(oE,{}),label:`${Ta(h)} has no steps to display`}):C.jsx(hp,{icon:C.jsx(oE,{}),label:"Steps"})}):C.jsx(hp,{icon:C.jsx(BA,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:"Running"}),C.jsx(Pz,{onClick:()=>s({playback:"paused"}),children:"Pause"})]})}):C.jsx(hp,{icon:C.jsx(oE,{}),label:"Steps"})})}),C.jsxs(zn.Options,{children:[C.jsx(Hs,{icon:C.jsx(Sw,{}),label:"Layer",value:c,items:ie.map(a,m=>({id:m.key,name:Ta(m)})),onChange:d,showArrow:!0}),Z9e,C.jsx(SGe,{layer:h})]}),C.jsx(zn.Extras,{children:t})]})}const n7e=e=>e?48:36,r7e=8;function i7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=t6(),a=ie.max([ie.findIndex(t,({value:u})=>!!(n!=null&&n[u])),0])??0;return C.jsx(_v,{variant:"popover",children:u=>C.jsxs(C.Fragment,{children:[C.jsx(vd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(e6(u))})}),C.jsx(xv,{...qA(u),anchorOrigin:{horizontal:"center",vertical:-n7e(s)*a-r7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ie.map(t,({value:c,label:d,disabled:h})=>C.jsxs(Vf,{disabled:h,onClick:()=>{r==null||r({...n,[c]:!((n==null?void 0:n[c])??o)})},children:[C.jsx(Gf,{children:C.jsx(Cme,{sx:{p:0},checked:!!((n==null?void 0:n[c])??o)})}),d]},c))})]})})}function o7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var c;const a=ie.filter(r,({id:d})=>!!((t==null?void 0:t[d])??s)),u=a.length?a.length===1?(c=ie.head(a))==null?void 0:c.name:`${a.length} Selected`:e;return C.jsx(i7e,{defaultChecked:!0,placeholder:ie.startCase(e),trigger:d=>C.jsx(Hp,{...d,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:u}),items:ie.map(r,({id:d,name:h,description:p,hidden:m})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(Wt,{children:h}),C.jsx(ai,{}),C.jsx(Wt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:m})),value:t,onChange:n})}const UX=C.jsx(Kc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function s7e(){var p,m,v,y;const{controls:e,onChange:t,state:n}=bd(),[r]=xI(),[{layers:i}]=Oa(),[o,s]=O.useState({}),a=O.useMemo(()=>ie.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[u,c]=O.useState(),d=O.useMemo(()=>ie.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(m=(p=d==null?void 0:d.renderer)==null?void 0:p.meta)==null?void 0:m.id;return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:C.jsx(KA,{children:S=>C.jsx(gt,{children:C.jsx(f$e,{...S,layers:a,renderer:h,rendererRef:c})})})})}),C.jsx(zn.Options,{children:C.jsxs(Hm,{direction:"row",children:[C.jsx(Hs,{label:"Renderer",icon:C.jsx(rxe,{}),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=d==null?void 0:d.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}),UX,C.jsx(o7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(Sw,{}),value:o,onChange:s,items:ie.map(i,S=>({id:S.key,name:Ta(S)})),showArrow:!0}),UX,C.jsx(Hp,{disabled:!u,onClick:()=>{u==null||u.fitCamera()},icon:C.jsx(sxe,{}),children:"Fit"}),C.jsx(Hp,{disabled:!u,onClick:()=>{u==null||u.initialCamera()},icon:C.jsx(cxe,{}),children:"1:1"})]})}),C.jsx(zn.Extras,{children:e})]})}const Z5={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(MQ,{}),content:s7e},tree:{id:"tree",name:"Tree",icon:C.jsx(AQ,{}),content:n$e},steps:{id:"steps",name:"Steps",icon:C.jsx(oE,{}),content:t7e},info:{id:"info",name:"Logs",icon:C.jsx(PQ,{}),content:nPe},layers:{id:"layers",name:"Layers",icon:C.jsx(Sw,{}),content:mFe},debug:{id:"debug",name:"Debugger",icon:C.jsx(oxe,{}),content:tPe},settings:{id:"settings",name:"Settings",icon:C.jsx(Sxe,{}),content:yGe},about:{id:"about",name:"About",icon:C.jsx(gxe,{}),content:cSe}},[a7e,l7e]=gu({view:{type:"branch",key:ca(),orientation:"horizontal",children:[{size:75,type:"branch",key:ca(),orientation:"horizontal",children:[{type:"leaf",size:25,key:ca(),content:{type:"layers"}},{size:75,type:"branch",key:ca(),orientation:"vertical",children:[{type:"leaf",size:75,key:ca(),content:{type:"viewport"}},{type:"leaf",size:25,key:ca(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:ca(),content:{type:"steps"}}]}});function u7e(e){const t=B2e(),[{view:n},r]=a7e();return C.jsxs(C.Fragment,{children:[C.jsx(En,{...e,children:C.jsx(EJ,{root:n,onChange:i=>r({view:i}),renderLeaf:({content:i})=>{var o;return C.jsx(zp,{in:!0,children:C.jsx(gt,{sx:{width:"100%",height:"100%"},children:O.createElement((o=Z5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(zp,{in:t,children:C.jsx(g0e,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})})]})}const c7e=e=>K$(e,"#ffffff")>K$(e,"#000000")?"#ffffff":"#000000";function f7e(e){O.useEffect(()=>{document.querySelector('meta[name="theme-color"]').setAttribute("content",e),document.title=EC,"electron"in window&&window.electron.invoke("title-bar","#00000000",c7e(e))},[e])}function d7e(e){return new Promise(t=>ie.delay(t,e))}async function h7e(e,t=2500){const n=ie.now();return{result:await Promise.any([e(),d7e(t)]),delta:ie.now()-n}}function p7e(){const e=mu(),[{remote:t}]=Jc(),[,n]=Zm(),r=eg("connections");return O.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:a,disabled:u}of t){if(u!==!0){e(`Connecting to ${a}...`);const c=new(dGe(s))({url:a});await c.connect();const{result:d,delta:h}=await h7e(()=>c.call("about"));d?(e(`Connected to ${d.name}.`),o=[...o,{...d,url:a,ping:h,call:c.call.bind(c),disconnect:c.disconnect.bind(c)}]):await c.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 g7e=e=>t=>({...t,source:e});function m7e(){const[e]=Zm(),[,t]=DC(),n=eg("features");return Lte(r=>n(async()=>{const i={algorithms:[],formats:ie.keys(eU).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const a of["algorithms","formats","maps"])i[a]=ie.uniqBy([...i[a],...ie.map(await o(`features/${a}`),g7e(s))],"id");r.aborted||t(i)}),[e,t]),C.jsx(C.Fragment,{})}function v7e(){const[{layers:e},t]=Oa();return O.useMemo(()=>ie.map(e,n=>{const r=ane(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 y7e(){const e=v7e();return C.jsx(C.Fragment,{children:e})}function hoe({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 b7e=()=>{const[e,t]=O.useState(!1);return O.useEffect(()=>{if("windowControlsOverlay"in navigator){const n=()=>{t(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",n),n(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",n)}},[t]),C.jsx(gt,{sx:{mt:-.5,minHeight:36,height:e?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag"},children:C.jsx(gt,{sx:{height:"100%"},children:C.jsxs(Hm,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(gt,{sx:{p:1,pr:0,height:"100%"},children:C.jsx("img",{src:AJ,style:{height:"100%"}})}),C.jsx(Wt,{sx:{fontSize:14,fontWeight:300},children:EC}),C.jsx(gt,{sx:{p:.75,height:"100%"},children:C.jsx(x7e,{})})]})})})};function x7e(){const e=mu();return C.jsxs(Yc,{onClick:()=>e("Commands are not yet implemented."),sx:{WebkitAppRegion:"no-drag",fontSize:14,borderRadius:t=>t.shape.borderRadius,"&:hover":{bgcolor:"background.paper"},height:"100%",m:0,display:"flex",alignItems:"center",px:1,pr:2,gap:t=>t.spacing(1),color:"text.secondary",cursor:"text"},children:[C.jsx(_xe,{fontSize:"small",color:"disabled"})," ",C.jsx(Wt,{sx:{mt:0},children:"Commands"})]})}const w7e=[p7e,m7e,ZHe,y7e];function _7e(){const t=Ln().palette.background.default;return f7e(t),C.jsxs(En,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(b7e,{}),C.jsx(u7e,{flex:1})]})}function S7e(){const[{theme:e="light",accentColor:t="teal"}]=Jc(),n=O.useMemo(()=>oSe(e,t),[e,t]);return C.jsx(jue,{theme:n,children:C.jsx(nwe,{children:C.jsx(hoe,{services:w7e,children:C.jsx(_7e,{})})})})}const[Y7e,E7e]=gu({});const C7e=TQ(document.getElementById("root")),T7e=[nSe,L2e,D2e,MEe,E7e,N2e,s$e,MDe,twe,l7e];C7e.render(C.jsx($me,{children:C.jsx(hoe,{slices:T7e,children:C.jsx(S7e,{})})})); diff --git a/assets/parseTrace.worker-aa84109d.js b/assets/parseTrace.worker-aa84109d.js new file mode 100644 index 00000000..0e2e8f97 --- /dev/null +++ b/assets/parseTrace.worker-aa84109d.js @@ -0,0 +1,27 @@ +(function(){"use strict";var $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Se={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Se.exports,function(I,K){(function(){var o,T="4.17.21",G=200,D="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",P="Expected a function",gn="Invalid `variable` option passed into `_.template`",j="__lodash_hash_undefined__",Xn=500,U="__lodash_placeholder__",Y=1,on=2,L=4,H=1,sn=2,z=1,Un=2,Ct=4,vn=8,yn=16,Ln=32,vt=64,Fn=128,Pt=256,qt=512,Ir=30,ye="...",Sr=800,Le=16,ue=1,Er=2,yr=3,On=1/0,ln=9007199254740991,bt=17976931348623157e292,it=0/0,Cn=4294967295,Lr=Cn-1,Oe=Cn>>>1,Ce=[["ary",Fn],["bind",z],["bindKey",Un],["curry",vn],["curryRight",yn],["flip",qt],["partial",Ln],["partialRight",vt],["rearg",Pt]],ut="[object Arguments]",dt="[object Array]",fe="[object AsyncFunction]",ft="[object Boolean]",wt="[object Date]",$="[object DOMException]",nt="[object Error]",an="[object Function]",xt="[object GeneratorFunction]",en="[object Map]",mn="[object Number]",At="[object Null]",Nn="[object Object]",oe="[object Promise]",Pe="[object Proxy]",X="[object RegExp]",rn="[object Set]",Qn="[object String]",be="[object Symbol]",Fo="[object Undefined]",se="[object WeakMap]",No="[object WeakSet]",le="[object ArrayBuffer]",Kt="[object DataView]",Or="[object Float32Array]",Cr="[object Float64Array]",Pr="[object Int8Array]",br="[object Int16Array]",Wr="[object Int32Array]",Br="[object Uint8Array]",Dr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Ur="[object Uint32Array]",Go=/\b__p \+= '';/g,Ho=/\b(__p \+=) '' \+/g,$o=/(__e\(.*?\)|\b__t\)) \+\n'';/g,eu=/&(?:amp|lt|gt|quot|#39);/g,ru=/[&<>"']/g,qo=RegExp(eu.source),Ko=RegExp(ru.source),zo=/<%-([\s\S]+?)%>/g,Zo=/<%([\s\S]+?)%>/g,iu=/<%=([\s\S]+?)%>/g,Yo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xo=/^\w*$/,Qo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/[\\^$.*+?()[\]{}|]/g,Jo=RegExp(Fr.source),Nr=/^\s+/,Vo=/\s/,ko=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jo=/\{\n\/\* \[wrapped with (.+)\] \*/,ns=/,? & /,ts=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,es=/[()=,{}\[\]\/\s]/,rs=/\\(\\)?/g,is=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,uu=/\w*$/,us=/^[-+]0x[0-9a-f]+$/i,fs=/^0b[01]+$/i,os=/^\[object .+?Constructor\]$/,ss=/^0o[0-7]+$/i,ls=/^(?:0|[1-9]\d*)$/,as=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,We=/($^)/,cs=/['\n\r\u2028\u2029\\]/g,Be="\\ud800-\\udfff",hs="\\u0300-\\u036f",gs="\\ufe20-\\ufe2f",ps="\\u20d0-\\u20ff",fu=hs+gs+ps,ou="\\u2700-\\u27bf",su="a-z\\xdf-\\xf6\\xf8-\\xff",_s="\\xac\\xb1\\xd7\\xf7",vs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ds="\\u2000-\\u206f",ws=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lu="A-Z\\xc0-\\xd6\\xd8-\\xde",au="\\ufe0e\\ufe0f",cu=_s+vs+ds+ws,Gr="['’]",xs="["+Be+"]",hu="["+cu+"]",De="["+fu+"]",gu="\\d+",As="["+ou+"]",pu="["+su+"]",_u="[^"+Be+cu+gu+ou+su+lu+"]",Hr="\\ud83c[\\udffb-\\udfff]",Ts="(?:"+De+"|"+Hr+")",vu="[^"+Be+"]",$r="(?:\\ud83c[\\udde6-\\uddff]){2}",qr="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+lu+"]",du="\\u200d",wu="(?:"+pu+"|"+_u+")",ms="(?:"+zt+"|"+_u+")",xu="(?:"+Gr+"(?:d|ll|m|re|s|t|ve))?",Au="(?:"+Gr+"(?:D|LL|M|RE|S|T|VE))?",Tu=Ts+"?",mu="["+au+"]?",Rs="(?:"+du+"(?:"+[vu,$r,qr].join("|")+")"+mu+Tu+")*",Is="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ss="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ru=mu+Tu+Rs,Es="(?:"+[As,$r,qr].join("|")+")"+Ru,ys="(?:"+[vu+De+"?",De,$r,qr,xs].join("|")+")",Ls=RegExp(Gr,"g"),Os=RegExp(De,"g"),Kr=RegExp(Hr+"(?="+Hr+")|"+ys+Ru,"g"),Cs=RegExp([zt+"?"+pu+"+"+xu+"(?="+[hu,zt,"$"].join("|")+")",ms+"+"+Au+"(?="+[hu,zt+wu,"$"].join("|")+")",zt+"?"+wu+"+"+xu,zt+"+"+Au,Ss,Is,gu,Es].join("|"),"g"),Ps=RegExp("["+du+Be+fu+au+"]"),bs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ws=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bs=-1,Q={};Q[Or]=Q[Cr]=Q[Pr]=Q[br]=Q[Wr]=Q[Br]=Q[Dr]=Q[Mr]=Q[Ur]=!0,Q[ut]=Q[dt]=Q[le]=Q[ft]=Q[Kt]=Q[wt]=Q[nt]=Q[an]=Q[en]=Q[mn]=Q[Nn]=Q[X]=Q[rn]=Q[Qn]=Q[se]=!1;var Z={};Z[ut]=Z[dt]=Z[le]=Z[Kt]=Z[ft]=Z[wt]=Z[Or]=Z[Cr]=Z[Pr]=Z[br]=Z[Wr]=Z[en]=Z[mn]=Z[Nn]=Z[X]=Z[rn]=Z[Qn]=Z[be]=Z[Br]=Z[Dr]=Z[Mr]=Z[Ur]=!0,Z[nt]=Z[an]=Z[se]=!1;var Ds={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ms={"&":"&","<":"<",">":">",'"':""","'":"'"},Us={"&":"&","<":"<",">":">",""":'"',"'":"'"},Fs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ns=parseFloat,Gs=parseInt,Iu=typeof $t=="object"&&$t&&$t.Object===Object&&$t,Hs=typeof self=="object"&&self&&self.Object===Object&&self,pn=Iu||Hs||Function("return this")(),zr=K&&!K.nodeType&&K,Wt=zr&&!0&&I&&!I.nodeType&&I,Su=Wt&&Wt.exports===zr,Zr=Su&&Iu.process,Gn=function(){try{var a=Wt&&Wt.require&&Wt.require("util").types;return a||Zr&&Zr.binding&&Zr.binding("util")}catch{}}(),Eu=Gn&&Gn.isArrayBuffer,yu=Gn&&Gn.isDate,Lu=Gn&&Gn.isMap,Ou=Gn&&Gn.isRegExp,Cu=Gn&&Gn.isSet,Pu=Gn&&Gn.isTypedArray;function Pn(a,g,h){switch(h.length){case 0:return a.call(g);case 1:return a.call(g,h[0]);case 2:return a.call(g,h[0],h[1]);case 3:return a.call(g,h[0],h[1],h[2])}return a.apply(g,h)}function $s(a,g,h,w){for(var S=-1,M=a==null?0:a.length;++S-1}function Yr(a,g,h){for(var w=-1,S=a==null?0:a.length;++w-1;);return h}function Nu(a,g){for(var h=a.length;h--&&Zt(g,a[h],0)>-1;);return h}function Vs(a,g){for(var h=a.length,w=0;h--;)a[h]===g&&++w;return w}var ks=Vr(Ds),js=Vr(Ms);function nl(a){return"\\"+Fs[a]}function tl(a,g){return a==null?o:a[g]}function Yt(a){return Ps.test(a)}function el(a){return bs.test(a)}function rl(a){for(var g,h=[];!(g=a.next()).done;)h.push(g.value);return h}function ti(a){var g=-1,h=Array(a.size);return a.forEach(function(w,S){h[++g]=[S,w]}),h}function Gu(a,g){return function(h){return a(g(h))}}function Rt(a,g){for(var h=-1,w=a.length,S=0,M=[];++h-1}function Kl(n,t){var e=this.__data__,r=je(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}ot.prototype.clear=Gl,ot.prototype.delete=Hl,ot.prototype.get=$l,ot.prototype.has=ql,ot.prototype.set=Kl;function st(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function Kn(n,t,e,r,i,f){var s,l=t&Y,c=t&on,p=t&L;if(e&&(s=i?e(n,r,i,f):e(n)),s!==o)return s;if(!V(n))return n;var _=E(n);if(_){if(s=Xa(n),!l)return Rn(n,s)}else{var v=wn(n),d=v==an||v==xt;if(Ot(n))return Rf(n,l);if(v==Nn||v==ut||d&&!i){if(s=c||d?{}:$f(n),!l)return c?Ua(n,fa(s,n)):Ma(n,ku(s,n))}else{if(!Z[v])return i?n:{};s=Qa(n,v,l)}}f||(f=new Vn);var x=f.get(n);if(x)return x;f.set(n,s),wo(n)?n.forEach(function(R){s.add(Kn(R,t,e,R,n,f))}):_o(n)&&n.forEach(function(R,b){s.set(b,Kn(R,t,e,b,n,f))});var m=p?c?yi:Ei:c?Sn:cn,O=_?o:m(n);return Hn(O||n,function(R,b){O&&(b=R,R=n[b]),ve(s,b,Kn(R,t,e,b,n,f))}),s}function oa(n){var t=cn(n);return function(e){return ju(e,n,t)}}function ju(n,t,e){var r=e.length;if(n==null)return!r;for(n=q(n);r--;){var i=e[r],f=t[i],s=n[i];if(s===o&&!(i in n)||!f(s))return!1}return!0}function nf(n,t,e){if(typeof n!="function")throw new $n(P);return Re(function(){n.apply(o,e)},t)}function de(n,t,e,r){var i=-1,f=Me,s=!0,l=n.length,c=[],p=t.length;if(!l)return c;e&&(t=J(t,bn(e))),r?(f=Yr,s=!1):t.length>=G&&(f=ae,s=!1,t=new Mt(t));n:for(;++ii?0:i+e),r=r===o||r>i?i:y(r),r<0&&(r+=i),r=e>r?0:Ao(r);e0&&e(l)?t>1?_n(l,t-1,e,r,i):mt(i,l):r||(i[i.length]=l)}return i}var si=Of(),rf=Of(!0);function tt(n,t){return n&&si(n,t,cn)}function li(n,t){return n&&rf(n,t,cn)}function tr(n,t){return Tt(t,function(e){return gt(n[e])})}function Ft(n,t){t=yt(t,n);for(var e=0,r=t.length;n!=null&&et}function aa(n,t){return n!=null&&N.call(n,t)}function ca(n,t){return n!=null&&t in q(n)}function ha(n,t,e){return n>=dn(t,e)&&n=120&&_.length>=120)?new Mt(s&&_):o}_=n[0];var v=-1,d=l[0];n:for(;++v-1;)l!==n&&Ze.call(l,c,1),Ze.call(n,c,1);return n}function _f(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==f){var f=i;ht(i)?Ze.call(n,i,1):xi(n,i)}}return n}function vi(n,t){return n+Qe(Xu()*(t-n+1))}function Sa(n,t,e,r){for(var i=-1,f=fn(Xe((t-n)/(e||1)),0),s=h(f);f--;)s[r?f:++i]=n,n+=e;return s}function di(n,t){var e="";if(!n||t<1||t>ln)return e;do t%2&&(e+=n),t=Qe(t/2),t&&(n+=n);while(t);return e}function C(n,t){return Bi(zf(n,t,En),n+"")}function Ea(n){return Vu(ie(n))}function ya(n,t){var e=ie(n);return hr(e,Ut(t,0,e.length))}function Ae(n,t,e,r){if(!V(n))return n;t=yt(t,n);for(var i=-1,f=t.length,s=f-1,l=n;l!=null&&++ii?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var f=h(i);++r>>1,s=n[f];s!==null&&!Bn(s)&&(e?s<=t:s=G){var p=t?null:Ha(n);if(p)return Fe(p);s=!1,i=ae,c=new Mt}else c=t?[]:l;n:for(;++r=r?n:zn(n,t,e)}var mf=wl||function(n){return pn.clearTimeout(n)};function Rf(n,t){if(t)return n.slice();var e=n.length,r=qu?qu(e):new n.constructor(e);return n.copy(r),r}function Ri(n){var t=new n.constructor(n.byteLength);return new Ke(t).set(new Ke(n)),t}function ba(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function Wa(n){var t=new n.constructor(n.source,uu.exec(n));return t.lastIndex=n.lastIndex,t}function Ba(n){return _e?q(_e.call(n)):{}}function If(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Sf(n,t){if(n!==t){var e=n!==o,r=n===null,i=n===n,f=Bn(n),s=t!==o,l=t===null,c=t===t,p=Bn(t);if(!l&&!p&&!f&&n>t||f&&s&&c&&!l&&!p||r&&s&&c||!e&&c||!i)return 1;if(!r&&!f&&!p&&n=l)return c;var p=e[r];return c*(p=="desc"?-1:1)}}return n.index-t.index}function Ef(n,t,e,r){for(var i=-1,f=n.length,s=e.length,l=-1,c=t.length,p=fn(f-s,0),_=h(c+p),v=!r;++l1?e[i-1]:o,s=i>2?e[2]:o;for(f=n.length>3&&typeof f=="function"?(i--,f):o,s&&An(e[0],e[1],s)&&(f=i<3?o:f,i=1),t=q(t);++r-1?i[f?t[s]:s]:o}}function bf(n){return ct(function(t){var e=t.length,r=e,i=qn.prototype.thru;for(n&&t.reverse();r--;){var f=t[r];if(typeof f!="function")throw new $n(P);if(i&&!s&&ar(f)=="wrapper")var s=new qn([],!0)}for(r=s?r:e;++r1&&B.reverse(),_&&cl))return!1;var p=f.get(n),_=f.get(t);if(p&&_)return p==t&&_==n;var v=-1,d=!0,x=e&sn?new Mt:o;for(f.set(n,t),f.set(t,n);++v1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(ko,`{ +/* [wrapped with `+t+`] */ +`)}function Va(n){return E(n)||Ht(n)||!!(Zu&&n&&n[Zu])}function ht(n,t){var e=typeof n;return t=t??ln,!!t&&(e=="number"||e!="symbol"&&ls.test(n))&&n>-1&&n%1==0&&n0){if(++t>=Sr)return arguments[0]}else t=0;return n.apply(o,arguments)}}function hr(n,t){var e=-1,r=n.length,i=r-1;for(t=t===o?r:t;++e1?n[t-1]:o;return e=typeof e=="function"?(n.pop(),e):o,ro(n,e)});function io(n){var t=u(n);return t.__chain__=!0,t}function sh(n,t){return t(n),n}function gr(n,t){return t(n)}var lh=ct(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(f){return oi(f,n)};return t>1||this.__actions__.length||!(r instanceof W)||!ht(e)?this.thru(i):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:gr,args:[i],thisArg:o}),new qn(r,this.__chain__).thru(function(f){return t&&!f.length&&f.push(o),f}))});function ah(){return io(this)}function ch(){return new qn(this.value(),this.__chain__)}function hh(){this.__values__===o&&(this.__values__=xo(this.value()));var n=this.__index__>=this.__values__.length,t=n?o:this.__values__[this.__index__++];return{done:n,value:t}}function gh(){return this}function ph(n){for(var t,e=this;e instanceof ke;){var r=Vf(e);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t}function _h(){var n=this.__wrapped__;if(n instanceof W){var t=n;return this.__actions__.length&&(t=new W(this)),t=t.reverse(),t.__actions__.push({func:gr,args:[Di],thisArg:o}),new qn(t,this.__chain__)}return this.thru(Di)}function vh(){return Af(this.__wrapped__,this.__actions__)}var dh=ur(function(n,t,e){N.call(n,e)?++n[e]:lt(n,e,1)});function wh(n,t,e){var r=E(n)?bu:sa;return e&&An(n,t,e)&&(t=o),r(n,A(t,3))}function xh(n,t){var e=E(n)?Tt:ef;return e(n,A(t,3))}var Ah=Pf(kf),Th=Pf(jf);function mh(n,t){return _n(pr(n,t),1)}function Rh(n,t){return _n(pr(n,t),On)}function Ih(n,t,e){return e=e===o?1:y(e),_n(pr(n,t),e)}function uo(n,t){var e=E(n)?Hn:St;return e(n,A(t,3))}function fo(n,t){var e=E(n)?qs:tf;return e(n,A(t,3))}var Sh=ur(function(n,t,e){N.call(n,e)?n[e].push(t):lt(n,e,[t])});function Eh(n,t,e,r){n=In(n)?n:ie(n),e=e&&!r?y(e):0;var i=n.length;return e<0&&(e=fn(i+e,0)),xr(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&Zt(n,t,e)>-1}var yh=C(function(n,t,e){var r=-1,i=typeof t=="function",f=In(n)?h(n.length):[];return St(n,function(s){f[++r]=i?Pn(t,s,e):we(s,t,e)}),f}),Lh=ur(function(n,t,e){lt(n,e,t)});function pr(n,t){var e=E(n)?J:lf;return e(n,A(t,3))}function Oh(n,t,e,r){return n==null?[]:(E(t)||(t=t==null?[]:[t]),e=r?o:e,E(e)||(e=e==null?[]:[e]),gf(n,t,e))}var Ch=ur(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function Ph(n,t,e){var r=E(n)?Xr:Mu,i=arguments.length<3;return r(n,A(t,4),e,i,St)}function bh(n,t,e){var r=E(n)?Ks:Mu,i=arguments.length<3;return r(n,A(t,4),e,i,tf)}function Wh(n,t){var e=E(n)?Tt:ef;return e(n,dr(A(t,3)))}function Bh(n){var t=E(n)?Vu:Ea;return t(n)}function Dh(n,t,e){(e?An(n,t,e):t===o)?t=1:t=y(t);var r=E(n)?ra:ya;return r(n,t)}function Mh(n){var t=E(n)?ia:Oa;return t(n)}function Uh(n){if(n==null)return 0;if(In(n))return xr(n)?Xt(n):n.length;var t=wn(n);return t==en||t==rn?n.size:gi(n).length}function Fh(n,t,e){var r=E(n)?Qr:Ca;return e&&An(n,t,e)&&(t=o),r(n,A(t,3))}var Nh=C(function(n,t){if(n==null)return[];var e=t.length;return e>1&&An(n,t[0],t[1])?t=[]:e>2&&An(t[0],t[1],t[2])&&(t=[t[0]]),gf(n,_n(t,1),[])}),_r=xl||function(){return pn.Date.now()};function Gh(n,t){if(typeof t!="function")throw new $n(P);return n=y(n),function(){if(--n<1)return t.apply(this,arguments)}}function oo(n,t,e){return t=e?o:t,t=n&&t==null?n.length:t,at(n,Fn,o,o,o,o,t)}function so(n,t){var e;if(typeof t!="function")throw new $n(P);return n=y(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=o),e}}var Ui=C(function(n,t,e){var r=z;if(e.length){var i=Rt(e,ee(Ui));r|=Ln}return at(n,r,t,e,i)}),lo=C(function(n,t,e){var r=z|Un;if(e.length){var i=Rt(e,ee(lo));r|=Ln}return at(t,r,n,e,i)});function ao(n,t,e){t=e?o:t;var r=at(n,vn,o,o,o,o,o,t);return r.placeholder=ao.placeholder,r}function co(n,t,e){t=e?o:t;var r=at(n,yn,o,o,o,o,o,t);return r.placeholder=co.placeholder,r}function ho(n,t,e){var r,i,f,s,l,c,p=0,_=!1,v=!1,d=!0;if(typeof n!="function")throw new $n(P);t=Yn(t)||0,V(e)&&(_=!!e.leading,v="maxWait"in e,f=v?fn(Yn(e.maxWait)||0,t):f,d="trailing"in e?!!e.trailing:d);function x(tn){var jn=r,_t=i;return r=i=o,p=tn,s=n.apply(_t,jn),s}function m(tn){return p=tn,l=Re(b,t),_?x(tn):s}function O(tn){var jn=tn-c,_t=tn-p,bo=t-jn;return v?dn(bo,f-_t):bo}function R(tn){var jn=tn-c,_t=tn-p;return c===o||jn>=t||jn<0||v&&_t>=f}function b(){var tn=_r();if(R(tn))return B(tn);l=Re(b,O(tn))}function B(tn){return l=o,d&&r?x(tn):(r=i=o,s)}function Dn(){l!==o&&mf(l),p=0,r=c=i=l=o}function Tn(){return l===o?s:B(_r())}function Mn(){var tn=_r(),jn=R(tn);if(r=arguments,i=this,c=tn,jn){if(l===o)return m(c);if(v)return mf(l),l=Re(b,t),x(c)}return l===o&&(l=Re(b,t)),s}return Mn.cancel=Dn,Mn.flush=Tn,Mn}var Hh=C(function(n,t){return nf(n,1,t)}),$h=C(function(n,t,e){return nf(n,Yn(t)||0,e)});function qh(n){return at(n,qt)}function vr(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new $n(P);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],f=e.cache;if(f.has(i))return f.get(i);var s=n.apply(this,r);return e.cache=f.set(i,s)||f,s};return e.cache=new(vr.Cache||st),e}vr.Cache=st;function dr(n){if(typeof n!="function")throw new $n(P);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Kh(n){return so(2,n)}var zh=Pa(function(n,t){t=t.length==1&&E(t[0])?J(t[0],bn(A())):J(_n(t,1),bn(A()));var e=t.length;return C(function(r){for(var i=-1,f=dn(r.length,e);++i=t}),Ht=ff(function(){return arguments}())?ff:function(n){return k(n)&&N.call(n,"callee")&&!zu.call(n,"callee")},E=h.isArray,fg=Eu?bn(Eu):pa;function In(n){return n!=null&&wr(n.length)&&!gt(n)}function nn(n){return k(n)&&In(n)}function og(n){return n===!0||n===!1||k(n)&&xn(n)==ft}var Ot=Tl||Qi,sg=yu?bn(yu):_a;function lg(n){return k(n)&&n.nodeType===1&&!Ie(n)}function ag(n){if(n==null)return!0;if(In(n)&&(E(n)||typeof n=="string"||typeof n.splice=="function"||Ot(n)||re(n)||Ht(n)))return!n.length;var t=wn(n);if(t==en||t==rn)return!n.size;if(me(n))return!gi(n).length;for(var e in n)if(N.call(n,e))return!1;return!0}function cg(n,t){return xe(n,t)}function hg(n,t,e){e=typeof e=="function"?e:o;var r=e?e(n,t):o;return r===o?xe(n,t,o,e):!!r}function Ni(n){if(!k(n))return!1;var t=xn(n);return t==nt||t==$||typeof n.message=="string"&&typeof n.name=="string"&&!Ie(n)}function gg(n){return typeof n=="number"&&Yu(n)}function gt(n){if(!V(n))return!1;var t=xn(n);return t==an||t==xt||t==fe||t==Pe}function po(n){return typeof n=="number"&&n==y(n)}function wr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ln}function V(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function k(n){return n!=null&&typeof n=="object"}var _o=Lu?bn(Lu):da;function pg(n,t){return n===t||hi(n,t,Oi(t))}function _g(n,t,e){return e=typeof e=="function"?e:o,hi(n,t,Oi(t),e)}function vg(n){return vo(n)&&n!=+n}function dg(n){if(nc(n))throw new S(D);return of(n)}function wg(n){return n===null}function xg(n){return n==null}function vo(n){return typeof n=="number"||k(n)&&xn(n)==mn}function Ie(n){if(!k(n)||xn(n)!=Nn)return!1;var t=ze(n);if(t===null)return!0;var e=N.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&He.call(e)==_l}var Gi=Ou?bn(Ou):wa;function Ag(n){return po(n)&&n>=-ln&&n<=ln}var wo=Cu?bn(Cu):xa;function xr(n){return typeof n=="string"||!E(n)&&k(n)&&xn(n)==Qn}function Bn(n){return typeof n=="symbol"||k(n)&&xn(n)==be}var re=Pu?bn(Pu):Aa;function Tg(n){return n===o}function mg(n){return k(n)&&wn(n)==se}function Rg(n){return k(n)&&xn(n)==No}var Ig=lr(pi),Sg=lr(function(n,t){return n<=t});function xo(n){if(!n)return[];if(In(n))return xr(n)?Jn(n):Rn(n);if(ce&&n[ce])return rl(n[ce]());var t=wn(n),e=t==en?ti:t==rn?Fe:ie;return e(n)}function pt(n){if(!n)return n===0?n:0;if(n=Yn(n),n===On||n===-On){var t=n<0?-1:1;return t*bt}return n===n?n:0}function y(n){var t=pt(n),e=t%1;return t===t?e?t-e:t:0}function Ao(n){return n?Ut(y(n),0,Cn):0}function Yn(n){if(typeof n=="number")return n;if(Bn(n))return it;if(V(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=V(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=Uu(n);var e=fs.test(n);return e||ss.test(n)?Gs(n.slice(2),e?2:8):us.test(n)?it:+n}function To(n){return et(n,Sn(n))}function Eg(n){return n?Ut(y(n),-ln,ln):n===0?n:0}function F(n){return n==null?"":Wn(n)}var yg=ne(function(n,t){if(me(t)||In(t)){et(t,cn(t),n);return}for(var e in t)N.call(t,e)&&ve(n,e,t[e])}),mo=ne(function(n,t){et(t,Sn(t),n)}),Ar=ne(function(n,t,e,r){et(t,Sn(t),n,r)}),Lg=ne(function(n,t,e,r){et(t,cn(t),n,r)}),Og=ct(oi);function Cg(n,t){var e=jt(n);return t==null?e:ku(e,t)}var Pg=C(function(n,t){n=q(n);var e=-1,r=t.length,i=r>2?t[2]:o;for(i&&An(t[0],t[1],i)&&(r=1);++e1),f}),et(n,yi(n),e),r&&(e=Kn(e,Y|on|L,$a));for(var i=t.length;i--;)xi(e,t[i]);return e});function Qg(n,t){return Io(n,dr(A(t)))}var Jg=ct(function(n,t){return n==null?{}:Ra(n,t)});function Io(n,t){if(n==null)return{};var e=J(yi(n),function(r){return[r]});return t=A(t),pf(n,e,function(r,i){return t(r,i[0])})}function Vg(n,t,e){t=yt(t,n);var r=-1,i=t.length;for(i||(i=1,n=o);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var i=Xu();return dn(n+i*(t-n+Ns("1e-"+((i+"").length-1))),t)}return vi(n,t)}var sp=te(function(n,t,e){return t=t.toLowerCase(),n+(e?yo(t):t)});function yo(n){return qi(F(n).toLowerCase())}function Lo(n){return n=F(n),n&&n.replace(as,ks).replace(Os,"")}function lp(n,t,e){n=F(n),t=Wn(t);var r=n.length;e=e===o?r:Ut(y(e),0,r);var i=e;return e-=t.length,e>=0&&n.slice(e,i)==t}function ap(n){return n=F(n),n&&Ko.test(n)?n.replace(ru,js):n}function cp(n){return n=F(n),n&&Jo.test(n)?n.replace(Fr,"\\$&"):n}var hp=te(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),gp=te(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),pp=Cf("toLowerCase");function _p(n,t,e){n=F(n),t=y(t);var r=t?Xt(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return sr(Qe(i),e)+n+sr(Xe(i),e)}function vp(n,t,e){n=F(n),t=y(t);var r=t?Xt(n):0;return t&&r>>0,e?(n=F(n),n&&(typeof t=="string"||t!=null&&!Gi(t))&&(t=Wn(t),!t&&Yt(n))?Lt(Jn(n),0,e):n.split(t,e)):[]}var Rp=te(function(n,t,e){return n+(e?" ":"")+qi(t)});function Ip(n,t,e){return n=F(n),e=e==null?0:Ut(y(e),0,n.length),t=Wn(t),n.slice(e,e+t.length)==t}function Sp(n,t,e){var r=u.templateSettings;e&&An(n,t,e)&&(t=o),n=F(n),t=Ar({},t,r,Uf);var i=Ar({},t.imports,r.imports,Uf),f=cn(i),s=ni(i,f),l,c,p=0,_=t.interpolate||We,v="__p += '",d=ei((t.escape||We).source+"|"+_.source+"|"+(_===iu?is:We).source+"|"+(t.evaluate||We).source+"|$","g"),x="//# sourceURL="+(N.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bs+"]")+` +`;n.replace(d,function(R,b,B,Dn,Tn,Mn){return B||(B=Dn),v+=n.slice(p,Mn).replace(cs,nl),b&&(l=!0,v+=`' + +__e(`+b+`) + +'`),Tn&&(c=!0,v+=`'; +`+Tn+`; +__p += '`),B&&(v+=`' + +((__t = (`+B+`)) == null ? '' : __t) + +'`),p=Mn+R.length,R}),v+=`'; +`;var m=N.call(t,"variable")&&t.variable;if(!m)v=`with (obj) { +`+v+` +} +`;else if(es.test(m))throw new S(gn);v=(c?v.replace(Go,""):v).replace(Ho,"$1").replace($o,"$1;"),v="function("+(m||"obj")+`) { +`+(m?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+v+`return __p +}`;var O=Co(function(){return M(f,x+"return "+v).apply(o,s)});if(O.source=v,Ni(O))throw O;return O}function Ep(n){return F(n).toLowerCase()}function yp(n){return F(n).toUpperCase()}function Lp(n,t,e){if(n=F(n),n&&(e||t===o))return Uu(n);if(!n||!(t=Wn(t)))return n;var r=Jn(n),i=Jn(t),f=Fu(r,i),s=Nu(r,i)+1;return Lt(r,f,s).join("")}function Op(n,t,e){if(n=F(n),n&&(e||t===o))return n.slice(0,Hu(n)+1);if(!n||!(t=Wn(t)))return n;var r=Jn(n),i=Nu(r,Jn(t))+1;return Lt(r,0,i).join("")}function Cp(n,t,e){if(n=F(n),n&&(e||t===o))return n.replace(Nr,"");if(!n||!(t=Wn(t)))return n;var r=Jn(n),i=Fu(r,Jn(t));return Lt(r,i).join("")}function Pp(n,t){var e=Ir,r=ye;if(V(t)){var i="separator"in t?t.separator:i;e="length"in t?y(t.length):e,r="omission"in t?Wn(t.omission):r}n=F(n);var f=n.length;if(Yt(n)){var s=Jn(n);f=s.length}if(e>=f)return n;var l=e-Xt(r);if(l<1)return r;var c=s?Lt(s,0,l).join(""):n.slice(0,l);if(i===o)return c+r;if(s&&(l+=c.length-l),Gi(i)){if(n.slice(l).search(i)){var p,_=c;for(i.global||(i=ei(i.source,F(uu.exec(i))+"g")),i.lastIndex=0;p=i.exec(_);)var v=p.index;c=c.slice(0,v===o?l:v)}}else if(n.indexOf(Wn(i),l)!=l){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r}function bp(n){return n=F(n),n&&qo.test(n)?n.replace(eu,ol):n}var Wp=te(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),qi=Cf("toUpperCase");function Oo(n,t,e){return n=F(n),t=e?o:t,t===o?el(n)?al(n):Ys(n):n.match(t)||[]}var Co=C(function(n,t){try{return Pn(n,o,t)}catch(e){return Ni(e)?e:new S(e)}}),Bp=ct(function(n,t){return Hn(t,function(e){e=rt(e),lt(n,e,Ui(n[e],n))}),n});function Dp(n){var t=n==null?0:n.length,e=A();return n=t?J(n,function(r){if(typeof r[1]!="function")throw new $n(P);return[e(r[0]),r[1]]}):[],C(function(r){for(var i=-1;++iln)return[];var e=Cn,r=dn(n,Cn);t=A(t),n-=Cn;for(var i=jr(r,t);++e0||t<0)?new W(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==o&&(t=y(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},W.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},W.prototype.toArray=function(){return this.take(Cn)},tt(W.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=u[r?"take"+(t=="last"?"Right":""):t],f=r||/^find/.test(t);i&&(u.prototype[t]=function(){var s=this.__wrapped__,l=r?[1]:arguments,c=s instanceof W,p=l[0],_=c||E(s),v=function(b){var B=i.apply(u,mt([b],l));return r&&d?B[0]:B};_&&e&&typeof p=="function"&&p.length!=1&&(c=_=!1);var d=this.__chain__,x=!!this.__actions__.length,m=f&&!d,O=c&&!x;if(!f&&_){s=O?s:new W(this);var R=n.apply(s,l);return R.__actions__.push({func:gr,args:[v],thisArg:o}),new qn(R,d)}return m&&O?n.apply(this,l):(R=this.thru(v),m?r?R.value()[0]:R.value():R)})}),Hn(["pop","push","shift","sort","splice","unshift"],function(n){var t=Ne[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return t.apply(E(f)?f:[],i)}return this[e](function(s){return t.apply(E(s)?s:[],i)})}}),tt(W.prototype,function(n,t){var e=u[t];if(e){var r=e.name+"";N.call(kt,r)||(kt[r]=[]),kt[r].push({name:t,func:e})}}),kt[fr(o,Un).name]=[{name:"wrapper",func:o}],W.prototype.clone=bl,W.prototype.reverse=Wl,W.prototype.value=Bl,u.prototype.at=lh,u.prototype.chain=ah,u.prototype.commit=ch,u.prototype.next=hh,u.prototype.plant=ph,u.prototype.reverse=_h,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=vh,u.prototype.first=u.prototype.head,ce&&(u.prototype[ce]=gh),u},Qt=cl();Wt?((Wt.exports=Qt)._=Qt,zr._=Qt):pn._=Qt}).call($t)}(Se,Se.exports);var hn=Se.exports;function Tr(I={},K){const{$:o,...T}=I;return{...hn.mapValues(T,K),$:o}}var Ji={exports:{}};(function(I,K){(function(o,T){I.exports=T()})($t,function(){return function(o){function T(D){if(G[D])return G[D].exports;var P=G[D]={i:D,l:!1,exports:{}};return o[D].call(P.exports,P,P.exports,T),P.l=!0,P.exports}var G={};return T.m=o,T.c=G,T.d=function(D,P,gn){T.o(D,P)||Object.defineProperty(D,P,{configurable:!1,enumerable:!0,get:gn})},T.n=function(D){var P=D&&D.__esModule?function(){return D.default}:function(){return D};return T.d(P,"a",P),P},T.o=function(D,P){return Object.prototype.hasOwnProperty.call(D,P)},T.p="",T(T.s=1)}([function(o,T,G){function D(gn){var j=gn===void 0?{}:gn,Xn=j.ESCAPE,U=Xn===void 0?/^\\/:Xn,Y=j.VARIABLE_START,on=Y===void 0?/^\${\s*/:Y,L=j.VARIABLE_END,H=L===void 0?/^\s*}/:L,sn=j.PIPE_START,z=sn===void 0?/^\s*\|\s*/:sn,Un=j.PIPE_PARAMETER_START,Ct=Un===void 0?/^\s*:\s*/:Un,vn=j.QUOTED_STRING,yn=vn===void 0?T.DEFAULT_QUOTED_STRING_REGEX:vn,Ln=j.QUOTED_STRING_TEST,vt=Ln===void 0?null:Ln,Fn=j.QUOTED_STRING_GET_AND_ADVANCE,Pt=Fn===void 0?null:Fn,qt=j.QUOTED_STRING_IN_PARAMETER_TEST,Ir=qt===void 0?null:qt,ye=j.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Sr=ye===void 0?null:ye,Le=vt||function(On){return yn.test(On)},ue=Pt||P(yn),Er=Ir||function(On){return yn.test(On)},yr=Sr||P(yn);return function(On){function ln(X){X===void 0&&(X=1),$=$.substr(X)}function bt(X){X===void 0&&(X=/^/),ln($.match(X)[0].length)}function it(){var X;return bt(U),X=$.length>0?$[0]:"",ln(),X}function Cn(X){var rn=(X===void 0?{}:X).isNull,Qn=rn!==void 0&&rn;en={name:"",pipes:[]},Nn=!Qn}function Lr(){nt.variables.push(en),Cn({isNull:!0})}function Oe(X){var rn=(X===void 0?{}:X).isNull,Qn=rn!==void 0&&rn;mn={name:"",parameters:[]},oe=!Qn}function Ce(){en.pipes.push(mn),Oe({isNull:!0})}function ut(X){var rn=(X===void 0?{}:X).isNull,Qn=rn!==void 0&&rn;At="",Pe=!Qn}function dt(){mn.parameters.push(At),ut({isNull:!0})}function fe(){return!!H.test($)&&(bt(H),an>=3&&dt(),an>=2&&Ce(),an>=1&&Lr(),an=0,!0)}function ft(){return!!z.test($)&&(bt(z),an>=3&&dt(),an>=2&&Ce(),an>=1&&Oe(),an=2,!0)}function wt(){return!!Ct.test($)&&(bt(Ct),an>=3&&dt(),an>=2&&ut(),an=3,!0)}for(var $=On,nt={literals:[],variables:[]},an=0,xt="",en={name:"",pipes:[]},mn={name:"",parameters:[]},At="",Nn=!1,oe=!1,Pe=!1;$&&$.length>0;)switch(an){case 0:if(U.test($)){xt+=it();continue}if(on.test($)){an=1,Cn(),nt.literals.push(xt),xt="",bt(on);continue}xt+=$[0],ln();break;case 1:if(U.test($)){en.name+=it();continue}if(fe()||ft())continue;if(Le($)){en.name+=ue($,ln);continue}en.name+=$[0],ln();break;case 2:if(U.test($)){mn.name+=it();continue}if(fe()||wt()||ft())continue;if(Le($)){mn.name+=ue($,ln);continue}mn.name+=$[0],ln();break;case 3:if(U.test($)){At+=it();continue}if(fe()||wt()||ft())continue;if(Er($)){At+=yr($,ln);continue}At+=$[0],ln()}return Pe&&mn.parameters.push(At),oe&&en.pipes.push(mn),Nn&&nt.variables.push(en),nt.literals.push(xt),nt}}function P(gn){return function(j,Xn){var U=j.match(gn);return Xn(U[0].length),U.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(T,"__esModule",{value:!0}),T.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,T.parseStringTemplateGenerator=D,T.parseStringTemplate=D(),T.getQuotedStringAndAdvanceForRegex=P},function(o,T,G){o.exports=G(2)},function(o,T,G){function D(P){for(var gn in P)T.hasOwnProperty(gn)||(T[gn]=P[gn])}Object.defineProperty(T,"__esModule",{value:!0}),D(G(0)),D(G(3))},function(o,T,G){function D(U){return function(Y){return U.hasOwnProperty(Y)?U[Y]:Y.split(".").reduce(function(on,L){return on.hasOwnProperty(L)?on[L]:""},U)}}function P(U,Y,on,L){L===void 0&&(L=D(Y));var H=L(U.name);return U.pipes.reduce(function(sn,z){return on.hasOwnProperty(z.name)?on[z.name](sn,z.parameters):sn},H??"")}function gn(U,Y,on,L){return L===void 0&&(L=D(Y)),U.literals.length===0?"":U.literals.slice(1).reduce(function(H,sn,z){return""+H+P(U.variables[z],Y,on,L)+sn},U.literals[0])}function j(U,Y,on){return gn(Xn.parseStringTemplate(U),Y,on)}Object.defineProperty(T,"__esModule",{value:!0});var Xn=G(0);T.evaluateParsedString=gn,T.evaluateStringTemplate=j}])})})(Ji);var Vi=Ji.exports;function ki(I){const K=Function("ctx",`return ${I};`);return o=>K(new Proxy(Ee(o),{get(T,G){var D;return(D=T[G])==null?void 0:D.call(T,{})}}))}const Wo=/^\{\{\s*/,Bo=/^\s*\}\}/,mr=/\b\B/;function Do(I){const o=Vi.parseStringTemplateGenerator({VARIABLE_START:Wo,VARIABLE_END:Bo,PIPE_START:mr,PIPE_PARAMETER_START:mr,QUOTED_STRING:mr})(I);return hn.join(o.literals,"")?T=>Vi.evaluateParsedString(o,{},{},G=>ki(G)(T)):ki(o.variables[0].name)}function Rr(I){switch(I==null?void 0:I.constructor){case Array:{const K=hn.map(I,Rr);return o=>hn.map(K,T=>T(o))}case Object:{const K=hn.mapValues(I,Rr);return o=>hn.mapValues(K,T=>T(o))}case String:return Do(I);default:return hn.constant(I)}}function Ee(I={}){return Tr(I,K=>hn.isFunction(K)?K:Rr(K))}function ji(I,K){const o=Tr(K,T=>G=>T(ji(Ee(G),I)));return{...I,...o}}function nu(I,K,o={}){return I.flatMap(T=>{const{$:G}=T,D=ji(Ee(o),Ee(T));return G in K?nu(K[G],K,D):[D]})}const Mo=I=>I==null,tu=I=>I.display!=="transient";function Uo({trace:I,context:K,view:o="main"}){var Xn,U,Y,on;const T=nu(((Y=(U=(Xn=I==null?void 0:I.render)==null?void 0:Xn.views)==null?void 0:U[o])==null?void 0:Y.components)??[],((on=I==null?void 0:I.render)==null?void 0:on.components)??{}),G=(L,H)=>hn.map(T,sn=>Tr(sn,z=>z({alpha:1,...K,...H,...L}))),D=L=>L&&Object.hasOwn(L,"alpha")?L.alpha>0:!0,P=L=>H=>({component:H,meta:{source:"trace",step:L}}),gn=hn.chain(I==null?void 0:I.events).map((L,H)=>({step:H,id:L.id,data:L,pId:L.pId})).groupBy("id").value(),j=hn.chain(I==null?void 0:I.events).map((L,H,sn)=>{var vn;const z=G(L,{...K,step:H,parent:Mo(L.pId)?void 0:sn[((vn=hn.findLast(gn[L.pId],yn=>yn.step<=H))==null?void 0:vn.step)??0]}),Un=z.filter(tu),Ct=z.filter(hn.negate(tu));return{persistent:Un,transient:Ct}}).map(L=>hn.mapValues(L,H=>H.filter(D))).map((L,H)=>hn.mapValues(L,sn=>sn.map(P(H)))).value();return{stepsPersistent:hn.map(j,"persistent"),stepsTransient:hn.map(j,"transient")}}onmessage=({data:I})=>{postMessage(Uo(I))}})(); diff --git a/assets/parseTrace.worker-b498921b.js b/assets/parseTrace.worker-b498921b.js deleted file mode 100644 index 9c3990b5..00000000 --- a/assets/parseTrace.worker-b498921b.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var Ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Se={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Se.exports,function(I,q){(function(){var o,T="4.17.21",G=200,D="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",P="Expected a function",cn="Invalid `variable` option passed into `_.template`",rn="__lodash_hash_undefined__",Yn=500,U="__lodash_placeholder__",Z=1,on=2,L=4,Y=1,pn=2,K=1,Mn=2,ie=4,Sn=8,Xn=16,En=32,vt=64,Un=128,Ct=256,$t=512,Ir=30,ye="...",Sr=800,Le=16,ue=1,Er=2,yr=3,yn=1/0,ln=9007199254740991,Pt=17976931348623157e292,it=0/0,Ln=4294967295,Lr=Ln-1,Oe=Ln>>>1,Ce=[["ary",Un],["bind",K],["bindKey",Mn],["curry",Sn],["curryRight",Xn],["flip",$t],["partial",En],["partialRight",vt],["rearg",Ct]],ut="[object Arguments]",dt="[object Array]",fe="[object AsyncFunction]",ft="[object Boolean]",wt="[object Date]",H="[object DOMException]",nt="[object Error]",sn="[object Function]",xt="[object GeneratorFunction]",tn="[object Map]",An="[object Number]",At="[object Null]",Fn="[object Object]",oe="[object Promise]",Pe="[object Proxy]",X="[object RegExp]",en="[object Set]",Qn="[object String]",be="[object Symbol]",Uo="[object Undefined]",le="[object WeakMap]",Fo="[object WeakSet]",se="[object ArrayBuffer]",qt="[object DataView]",Or="[object Float32Array]",Cr="[object Float64Array]",Pr="[object Int8Array]",br="[object Int16Array]",Wr="[object Int32Array]",Br="[object Uint8Array]",Dr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Ur="[object Uint32Array]",No=/\b__p \+= '';/g,Go=/\b(__p \+=) '' \+/g,Ho=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tu=/&(?:amp|lt|gt|quot|#39);/g,eu=/[&<>"']/g,$o=RegExp(tu.source),qo=RegExp(eu.source),Ko=/<%-([\s\S]+?)%>/g,zo=/<%([\s\S]+?)%>/g,ru=/<%=([\s\S]+?)%>/g,Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/,Xo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/[\\^$.*+?()[\]{}|]/g,Qo=RegExp(Fr.source),Nr=/^\s+/,Jo=/\s/,Vo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ko=/\{\n\/\* \[wrapped with (.+)\] \*/,jo=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tl=/[()=,{}\[\]\/\s]/,el=/\\(\\)?/g,rl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,iu=/\w*$/,il=/^[-+]0x[0-9a-f]+$/i,ul=/^0b[01]+$/i,fl=/^\[object .+?Constructor\]$/,ol=/^0o[0-7]+$/i,ll=/^(?:0|[1-9]\d*)$/,sl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,We=/($^)/,al=/['\n\r\u2028\u2029\\]/g,Be="\\ud800-\\udfff",cl="\\u0300-\\u036f",hl="\\ufe20-\\ufe2f",gl="\\u20d0-\\u20ff",uu=cl+hl+gl,fu="\\u2700-\\u27bf",ou="a-z\\xdf-\\xf6\\xf8-\\xff",pl="\\xac\\xb1\\xd7\\xf7",_l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vl="\\u2000-\\u206f",dl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lu="A-Z\\xc0-\\xd6\\xd8-\\xde",su="\\ufe0e\\ufe0f",au=pl+_l+vl+dl,Gr="['’]",wl="["+Be+"]",cu="["+au+"]",De="["+uu+"]",hu="\\d+",xl="["+fu+"]",gu="["+ou+"]",pu="[^"+Be+au+hu+fu+ou+lu+"]",Hr="\\ud83c[\\udffb-\\udfff]",Al="(?:"+De+"|"+Hr+")",_u="[^"+Be+"]",$r="(?:\\ud83c[\\udde6-\\uddff]){2}",qr="[\\ud800-\\udbff][\\udc00-\\udfff]",Kt="["+lu+"]",vu="\\u200d",du="(?:"+gu+"|"+pu+")",Tl="(?:"+Kt+"|"+pu+")",wu="(?:"+Gr+"(?:d|ll|m|re|s|t|ve))?",xu="(?:"+Gr+"(?:D|LL|M|RE|S|T|VE))?",Au=Al+"?",Tu="["+su+"]?",ml="(?:"+vu+"(?:"+[_u,$r,qr].join("|")+")"+Tu+Au+")*",Rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Il="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mu=Tu+Au+ml,Sl="(?:"+[xl,$r,qr].join("|")+")"+mu,El="(?:"+[_u+De+"?",De,$r,qr,wl].join("|")+")",yl=RegExp(Gr,"g"),Ll=RegExp(De,"g"),Kr=RegExp(Hr+"(?="+Hr+")|"+El+mu,"g"),Ol=RegExp([Kt+"?"+gu+"+"+wu+"(?="+[cu,Kt,"$"].join("|")+")",Tl+"+"+xu+"(?="+[cu,Kt+du,"$"].join("|")+")",Kt+"?"+du+"+"+wu,Kt+"+"+xu,Il,Rl,hu,Sl].join("|"),"g"),Cl=RegExp("["+vu+Be+uu+su+"]"),Pl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Wl=-1,Q={};Q[Or]=Q[Cr]=Q[Pr]=Q[br]=Q[Wr]=Q[Br]=Q[Dr]=Q[Mr]=Q[Ur]=!0,Q[ut]=Q[dt]=Q[se]=Q[ft]=Q[qt]=Q[wt]=Q[nt]=Q[sn]=Q[tn]=Q[An]=Q[Fn]=Q[X]=Q[en]=Q[Qn]=Q[le]=!1;var z={};z[ut]=z[dt]=z[se]=z[qt]=z[ft]=z[wt]=z[Or]=z[Cr]=z[Pr]=z[br]=z[Wr]=z[tn]=z[An]=z[Fn]=z[X]=z[en]=z[Qn]=z[be]=z[Br]=z[Dr]=z[Mr]=z[Ur]=!0,z[nt]=z[sn]=z[le]=!1;var Bl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dl={"&":"&","<":"<",">":">",'"':""","'":"'"},Ml={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ul={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fl=parseFloat,Nl=parseInt,Ru=typeof Ht=="object"&&Ht&&Ht.Object===Object&&Ht,Gl=typeof self=="object"&&self&&self.Object===Object&&self,hn=Ru||Gl||Function("return this")(),zr=q&&!q.nodeType&&q,bt=zr&&!0&&I&&!I.nodeType&&I,Iu=bt&&bt.exports===zr,Zr=Iu&&Ru.process,Nn=function(){try{var a=bt&&bt.require&&bt.require("util").types;return a||Zr&&Zr.binding&&Zr.binding("util")}catch{}}(),Su=Nn&&Nn.isArrayBuffer,Eu=Nn&&Nn.isDate,yu=Nn&&Nn.isMap,Lu=Nn&&Nn.isRegExp,Ou=Nn&&Nn.isSet,Cu=Nn&&Nn.isTypedArray;function On(a,g,h){switch(h.length){case 0:return a.call(g);case 1:return a.call(g,h[0]);case 2:return a.call(g,h[0],h[1]);case 3:return a.call(g,h[0],h[1],h[2])}return a.apply(g,h)}function Hl(a,g,h,w){for(var S=-1,M=a==null?0:a.length;++S-1}function Yr(a,g,h){for(var w=-1,S=a==null?0:a.length;++w-1;);return h}function Fu(a,g){for(var h=a.length;h--&&zt(g,a[h],0)>-1;);return h}function Jl(a,g){for(var h=a.length,w=0;h--;)a[h]===g&&++w;return w}var Vl=Vr(Bl),kl=Vr(Dl);function jl(a){return"\\"+Ul[a]}function ns(a,g){return a==null?o:a[g]}function Zt(a){return Cl.test(a)}function ts(a){return Pl.test(a)}function es(a){for(var g,h=[];!(g=a.next()).done;)h.push(g.value);return h}function ti(a){var g=-1,h=Array(a.size);return a.forEach(function(w,S){h[++g]=[S,w]}),h}function Nu(a,g){return function(h){return a(g(h))}}function Rt(a,g){for(var h=-1,w=a.length,S=0,M=[];++h-1}function qs(n,t){var e=this.__data__,r=je(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}ot.prototype.clear=Ns,ot.prototype.delete=Gs,ot.prototype.get=Hs,ot.prototype.has=$s,ot.prototype.set=qs;function lt(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function qn(n,t,e,r,i,f){var l,s=t&Z,c=t&on,p=t&L;if(e&&(l=i?e(n,r,i,f):e(n)),l!==o)return l;if(!V(n))return n;var _=E(n);if(_){if(l=Ya(n),!s)return Tn(n,l)}else{var v=vn(n),d=v==sn||v==xt;if(Ot(n))return mf(n,s);if(v==Fn||v==ut||d&&!i){if(l=c||d?{}:Hf(n),!s)return c?Ma(n,ua(l,n)):Da(n,Vu(l,n))}else{if(!z[v])return i?n:{};l=Xa(n,v,s)}}f||(f=new Vn);var x=f.get(n);if(x)return x;f.set(n,l),vo(n)?n.forEach(function(R){l.add(qn(R,t,e,R,n,f))}):po(n)&&n.forEach(function(R,b){l.set(b,qn(R,t,e,b,n,f))});var m=p?c?yi:Ei:c?Rn:an,O=_?o:m(n);return Gn(O||n,function(R,b){O&&(b=R,R=n[b]),ve(l,b,qn(R,t,e,b,n,f))}),l}function fa(n){var t=an(n);return function(e){return ku(e,n,t)}}function ku(n,t,e){var r=e.length;if(n==null)return!r;for(n=$(n);r--;){var i=e[r],f=t[i],l=n[i];if(l===o&&!(i in n)||!f(l))return!1}return!0}function ju(n,t,e){if(typeof n!="function")throw new Hn(P);return Re(function(){n.apply(o,e)},t)}function de(n,t,e,r){var i=-1,f=Me,l=!0,s=n.length,c=[],p=t.length;if(!s)return c;e&&(t=J(t,Cn(e))),r?(f=Yr,l=!1):t.length>=G&&(f=ae,l=!1,t=new Dt(t));n:for(;++ii?0:i+e),r=r===o||r>i?i:y(r),r<0&&(r+=i),r=e>r?0:xo(r);e0&&e(s)?t>1?gn(s,t-1,e,r,i):mt(i,s):r||(i[i.length]=s)}return i}var li=Lf(),ef=Lf(!0);function tt(n,t){return n&&li(n,t,an)}function si(n,t){return n&&ef(n,t,an)}function tr(n,t){return Tt(t,function(e){return gt(n[e])})}function Ut(n,t){t=yt(t,n);for(var e=0,r=t.length;n!=null&&et}function sa(n,t){return n!=null&&N.call(n,t)}function aa(n,t){return n!=null&&t in $(n)}function ca(n,t,e){return n>=_n(t,e)&&n=120&&_.length>=120)?new Dt(l&&_):o}_=n[0];var v=-1,d=s[0];n:for(;++v-1;)s!==n&&Ze.call(s,c,1),Ze.call(n,c,1);return n}function pf(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==f){var f=i;ht(i)?Ze.call(n,i,1):xi(n,i)}}return n}function vi(n,t){return n+Qe(Yu()*(t-n+1))}function Ia(n,t,e,r){for(var i=-1,f=fn(Xe((t-n)/(e||1)),0),l=h(f);f--;)l[r?f:++i]=n,n+=e;return l}function di(n,t){var e="";if(!n||t<1||t>ln)return e;do t%2&&(e+=n),t=Qe(t/2),t&&(n+=n);while(t);return e}function C(n,t){return Bi(Kf(n,t,In),n+"")}function Sa(n){return Ju(re(n))}function Ea(n,t){var e=re(n);return hr(e,Mt(t,0,e.length))}function Ae(n,t,e,r){if(!V(n))return n;t=yt(t,n);for(var i=-1,f=t.length,l=f-1,s=n;s!=null&&++ii?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var f=h(i);++r>>1,l=n[f];l!==null&&!bn(l)&&(e?l<=t:l=G){var p=t?null:Ga(n);if(p)return Fe(p);l=!1,i=ae,c=new Dt}else c=t?[]:s;n:for(;++r=r?n:Kn(n,t,e)}var Tf=ds||function(n){return hn.clearTimeout(n)};function mf(n,t){if(t)return n.slice();var e=n.length,r=$u?$u(e):new n.constructor(e);return n.copy(r),r}function Ri(n){var t=new n.constructor(n.byteLength);return new Ke(t).set(new Ke(n)),t}function Pa(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function ba(n){var t=new n.constructor(n.source,iu.exec(n));return t.lastIndex=n.lastIndex,t}function Wa(n){return _e?$(_e.call(n)):{}}function Rf(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function If(n,t){if(n!==t){var e=n!==o,r=n===null,i=n===n,f=bn(n),l=t!==o,s=t===null,c=t===t,p=bn(t);if(!s&&!p&&!f&&n>t||f&&l&&c&&!s&&!p||r&&l&&c||!e&&c||!i)return 1;if(!r&&!f&&!p&&n=s)return c;var p=e[r];return c*(p=="desc"?-1:1)}}return n.index-t.index}function Sf(n,t,e,r){for(var i=-1,f=n.length,l=e.length,s=-1,c=t.length,p=fn(f-l,0),_=h(c+p),v=!r;++s1?e[i-1]:o,l=i>2?e[2]:o;for(f=n.length>3&&typeof f=="function"?(i--,f):o,l&&wn(e[0],e[1],l)&&(f=i<3?o:f,i=1),t=$(t);++r-1?i[f?t[l]:l]:o}}function Pf(n){return ct(function(t){var e=t.length,r=e,i=$n.prototype.thru;for(n&&t.reverse();r--;){var f=t[r];if(typeof f!="function")throw new Hn(P);if(i&&!l&&ar(f)=="wrapper")var l=new $n([],!0)}for(r=l?r:e;++r1&&B.reverse(),_&&cs))return!1;var p=f.get(n),_=f.get(t);if(p&&_)return p==t&&_==n;var v=-1,d=!0,x=e&pn?new Dt:o;for(f.set(n,t),f.set(t,n);++v1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(Vo,`{ -/* [wrapped with `+t+`] */ -`)}function Ja(n){return E(n)||Gt(n)||!!(zu&&n&&n[zu])}function ht(n,t){var e=typeof n;return t=t??ln,!!t&&(e=="number"||e!="symbol"&&ll.test(n))&&n>-1&&n%1==0&&n0){if(++t>=Sr)return arguments[0]}else t=0;return n.apply(o,arguments)}}function hr(n,t){var e=-1,r=n.length,i=r-1;for(t=t===o?r:t;++e1?n[t-1]:o;return e=typeof e=="function"?(n.pop(),e):o,eo(n,e)});function ro(n){var t=u(n);return t.__chain__=!0,t}function oh(n,t){return t(n),n}function gr(n,t){return t(n)}var lh=ct(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(f){return oi(f,n)};return t>1||this.__actions__.length||!(r instanceof W)||!ht(e)?this.thru(i):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:gr,args:[i],thisArg:o}),new $n(r,this.__chain__).thru(function(f){return t&&!f.length&&f.push(o),f}))});function sh(){return ro(this)}function ah(){return new $n(this.value(),this.__chain__)}function ch(){this.__values__===o&&(this.__values__=wo(this.value()));var n=this.__index__>=this.__values__.length,t=n?o:this.__values__[this.__index__++];return{done:n,value:t}}function hh(){return this}function gh(n){for(var t,e=this;e instanceof ke;){var r=Jf(e);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t}function ph(){var n=this.__wrapped__;if(n instanceof W){var t=n;return this.__actions__.length&&(t=new W(this)),t=t.reverse(),t.__actions__.push({func:gr,args:[Di],thisArg:o}),new $n(t,this.__chain__)}return this.thru(Di)}function _h(){return xf(this.__wrapped__,this.__actions__)}var vh=ur(function(n,t,e){N.call(n,e)?++n[e]:st(n,e,1)});function dh(n,t,e){var r=E(n)?Pu:oa;return e&&wn(n,t,e)&&(t=o),r(n,A(t,3))}function wh(n,t){var e=E(n)?Tt:tf;return e(n,A(t,3))}var xh=Cf(Vf),Ah=Cf(kf);function Th(n,t){return gn(pr(n,t),1)}function mh(n,t){return gn(pr(n,t),yn)}function Rh(n,t,e){return e=e===o?1:y(e),gn(pr(n,t),e)}function io(n,t){var e=E(n)?Gn:St;return e(n,A(t,3))}function uo(n,t){var e=E(n)?$l:nf;return e(n,A(t,3))}var Ih=ur(function(n,t,e){N.call(n,e)?n[e].push(t):st(n,e,[t])});function Sh(n,t,e,r){n=mn(n)?n:re(n),e=e&&!r?y(e):0;var i=n.length;return e<0&&(e=fn(i+e,0)),xr(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&zt(n,t,e)>-1}var Eh=C(function(n,t,e){var r=-1,i=typeof t=="function",f=mn(n)?h(n.length):[];return St(n,function(l){f[++r]=i?On(t,l,e):we(l,t,e)}),f}),yh=ur(function(n,t,e){st(n,e,t)});function pr(n,t){var e=E(n)?J:lf;return e(n,A(t,3))}function Lh(n,t,e,r){return n==null?[]:(E(t)||(t=t==null?[]:[t]),e=r?o:e,E(e)||(e=e==null?[]:[e]),hf(n,t,e))}var Oh=ur(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function Ch(n,t,e){var r=E(n)?Xr:Du,i=arguments.length<3;return r(n,A(t,4),e,i,St)}function Ph(n,t,e){var r=E(n)?ql:Du,i=arguments.length<3;return r(n,A(t,4),e,i,nf)}function bh(n,t){var e=E(n)?Tt:tf;return e(n,dr(A(t,3)))}function Wh(n){var t=E(n)?Ju:Sa;return t(n)}function Bh(n,t,e){(e?wn(n,t,e):t===o)?t=1:t=y(t);var r=E(n)?ea:Ea;return r(n,t)}function Dh(n){var t=E(n)?ra:La;return t(n)}function Mh(n){if(n==null)return 0;if(mn(n))return xr(n)?Yt(n):n.length;var t=vn(n);return t==tn||t==en?n.size:gi(n).length}function Uh(n,t,e){var r=E(n)?Qr:Oa;return e&&wn(n,t,e)&&(t=o),r(n,A(t,3))}var Fh=C(function(n,t){if(n==null)return[];var e=t.length;return e>1&&wn(n,t[0],t[1])?t=[]:e>2&&wn(t[0],t[1],t[2])&&(t=[t[0]]),hf(n,gn(t,1),[])}),_r=ws||function(){return hn.Date.now()};function Nh(n,t){if(typeof t!="function")throw new Hn(P);return n=y(n),function(){if(--n<1)return t.apply(this,arguments)}}function fo(n,t,e){return t=e?o:t,t=n&&t==null?n.length:t,at(n,Un,o,o,o,o,t)}function oo(n,t){var e;if(typeof t!="function")throw new Hn(P);return n=y(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=o),e}}var Ui=C(function(n,t,e){var r=K;if(e.length){var i=Rt(e,te(Ui));r|=En}return at(n,r,t,e,i)}),lo=C(function(n,t,e){var r=K|Mn;if(e.length){var i=Rt(e,te(lo));r|=En}return at(t,r,n,e,i)});function so(n,t,e){t=e?o:t;var r=at(n,Sn,o,o,o,o,o,t);return r.placeholder=so.placeholder,r}function ao(n,t,e){t=e?o:t;var r=at(n,Xn,o,o,o,o,o,t);return r.placeholder=ao.placeholder,r}function co(n,t,e){var r,i,f,l,s,c,p=0,_=!1,v=!1,d=!0;if(typeof n!="function")throw new Hn(P);t=Zn(t)||0,V(e)&&(_=!!e.leading,v="maxWait"in e,f=v?fn(Zn(e.maxWait)||0,t):f,d="trailing"in e?!!e.trailing:d);function x(nn){var jn=r,_t=i;return r=i=o,p=nn,l=n.apply(_t,jn),l}function m(nn){return p=nn,s=Re(b,t),_?x(nn):l}function O(nn){var jn=nn-c,_t=nn-p,Po=t-jn;return v?_n(Po,f-_t):Po}function R(nn){var jn=nn-c,_t=nn-p;return c===o||jn>=t||jn<0||v&&_t>=f}function b(){var nn=_r();if(R(nn))return B(nn);s=Re(b,O(nn))}function B(nn){return s=o,d&&r?x(nn):(r=i=o,l)}function Wn(){s!==o&&Tf(s),p=0,r=c=i=s=o}function xn(){return s===o?l:B(_r())}function Bn(){var nn=_r(),jn=R(nn);if(r=arguments,i=this,c=nn,jn){if(s===o)return m(c);if(v)return Tf(s),s=Re(b,t),x(c)}return s===o&&(s=Re(b,t)),l}return Bn.cancel=Wn,Bn.flush=xn,Bn}var Gh=C(function(n,t){return ju(n,1,t)}),Hh=C(function(n,t,e){return ju(n,Zn(t)||0,e)});function $h(n){return at(n,$t)}function vr(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new Hn(P);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],f=e.cache;if(f.has(i))return f.get(i);var l=n.apply(this,r);return e.cache=f.set(i,l)||f,l};return e.cache=new(vr.Cache||lt),e}vr.Cache=lt;function dr(n){if(typeof n!="function")throw new Hn(P);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function qh(n){return oo(2,n)}var Kh=Ca(function(n,t){t=t.length==1&&E(t[0])?J(t[0],Cn(A())):J(gn(t,1),Cn(A()));var e=t.length;return C(function(r){for(var i=-1,f=_n(r.length,e);++i=t}),Gt=uf(function(){return arguments}())?uf:function(n){return k(n)&&N.call(n,"callee")&&!Ku.call(n,"callee")},E=h.isArray,ug=Su?Cn(Su):ga;function mn(n){return n!=null&&wr(n.length)&&!gt(n)}function j(n){return k(n)&&mn(n)}function fg(n){return n===!0||n===!1||k(n)&&dn(n)==ft}var Ot=As||Qi,og=Eu?Cn(Eu):pa;function lg(n){return k(n)&&n.nodeType===1&&!Ie(n)}function sg(n){if(n==null)return!0;if(mn(n)&&(E(n)||typeof n=="string"||typeof n.splice=="function"||Ot(n)||ee(n)||Gt(n)))return!n.length;var t=vn(n);if(t==tn||t==en)return!n.size;if(me(n))return!gi(n).length;for(var e in n)if(N.call(n,e))return!1;return!0}function ag(n,t){return xe(n,t)}function cg(n,t,e){e=typeof e=="function"?e:o;var r=e?e(n,t):o;return r===o?xe(n,t,o,e):!!r}function Ni(n){if(!k(n))return!1;var t=dn(n);return t==nt||t==H||typeof n.message=="string"&&typeof n.name=="string"&&!Ie(n)}function hg(n){return typeof n=="number"&&Zu(n)}function gt(n){if(!V(n))return!1;var t=dn(n);return t==sn||t==xt||t==fe||t==Pe}function go(n){return typeof n=="number"&&n==y(n)}function wr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ln}function V(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function k(n){return n!=null&&typeof n=="object"}var po=yu?Cn(yu):va;function gg(n,t){return n===t||hi(n,t,Oi(t))}function pg(n,t,e){return e=typeof e=="function"?e:o,hi(n,t,Oi(t),e)}function _g(n){return _o(n)&&n!=+n}function vg(n){if(ja(n))throw new S(D);return ff(n)}function dg(n){return n===null}function wg(n){return n==null}function _o(n){return typeof n=="number"||k(n)&&dn(n)==An}function Ie(n){if(!k(n)||dn(n)!=Fn)return!1;var t=ze(n);if(t===null)return!0;var e=N.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&He.call(e)==ps}var Gi=Lu?Cn(Lu):da;function xg(n){return go(n)&&n>=-ln&&n<=ln}var vo=Ou?Cn(Ou):wa;function xr(n){return typeof n=="string"||!E(n)&&k(n)&&dn(n)==Qn}function bn(n){return typeof n=="symbol"||k(n)&&dn(n)==be}var ee=Cu?Cn(Cu):xa;function Ag(n){return n===o}function Tg(n){return k(n)&&vn(n)==le}function mg(n){return k(n)&&dn(n)==Fo}var Rg=sr(pi),Ig=sr(function(n,t){return n<=t});function wo(n){if(!n)return[];if(mn(n))return xr(n)?Jn(n):Tn(n);if(ce&&n[ce])return es(n[ce]());var t=vn(n),e=t==tn?ti:t==en?Fe:re;return e(n)}function pt(n){if(!n)return n===0?n:0;if(n=Zn(n),n===yn||n===-yn){var t=n<0?-1:1;return t*Pt}return n===n?n:0}function y(n){var t=pt(n),e=t%1;return t===t?e?t-e:t:0}function xo(n){return n?Mt(y(n),0,Ln):0}function Zn(n){if(typeof n=="number")return n;if(bn(n))return it;if(V(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=V(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=Mu(n);var e=ul.test(n);return e||ol.test(n)?Nl(n.slice(2),e?2:8):il.test(n)?it:+n}function Ao(n){return et(n,Rn(n))}function Sg(n){return n?Mt(y(n),-ln,ln):n===0?n:0}function F(n){return n==null?"":Pn(n)}var Eg=jt(function(n,t){if(me(t)||mn(t)){et(t,an(t),n);return}for(var e in t)N.call(t,e)&&ve(n,e,t[e])}),To=jt(function(n,t){et(t,Rn(t),n)}),Ar=jt(function(n,t,e,r){et(t,Rn(t),n,r)}),yg=jt(function(n,t,e,r){et(t,an(t),n,r)}),Lg=ct(oi);function Og(n,t){var e=kt(n);return t==null?e:Vu(e,t)}var Cg=C(function(n,t){n=$(n);var e=-1,r=t.length,i=r>2?t[2]:o;for(i&&wn(t[0],t[1],i)&&(r=1);++e1),f}),et(n,yi(n),e),r&&(e=qn(e,Z|on|L,Ha));for(var i=t.length;i--;)xi(e,t[i]);return e});function Xg(n,t){return Ro(n,dr(A(t)))}var Qg=ct(function(n,t){return n==null?{}:ma(n,t)});function Ro(n,t){if(n==null)return{};var e=J(yi(n),function(r){return[r]});return t=A(t),gf(n,e,function(r,i){return t(r,i[0])})}function Jg(n,t,e){t=yt(t,n);var r=-1,i=t.length;for(i||(i=1,n=o);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var i=Yu();return _n(n+i*(t-n+Fl("1e-"+((i+"").length-1))),t)}return vi(n,t)}var op=ne(function(n,t,e){return t=t.toLowerCase(),n+(e?Eo(t):t)});function Eo(n){return qi(F(n).toLowerCase())}function yo(n){return n=F(n),n&&n.replace(sl,Vl).replace(Ll,"")}function lp(n,t,e){n=F(n),t=Pn(t);var r=n.length;e=e===o?r:Mt(y(e),0,r);var i=e;return e-=t.length,e>=0&&n.slice(e,i)==t}function sp(n){return n=F(n),n&&qo.test(n)?n.replace(eu,kl):n}function ap(n){return n=F(n),n&&Qo.test(n)?n.replace(Fr,"\\$&"):n}var cp=ne(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),hp=ne(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),gp=Of("toLowerCase");function pp(n,t,e){n=F(n),t=y(t);var r=t?Yt(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return lr(Qe(i),e)+n+lr(Xe(i),e)}function _p(n,t,e){n=F(n),t=y(t);var r=t?Yt(n):0;return t&&r>>0,e?(n=F(n),n&&(typeof t=="string"||t!=null&&!Gi(t))&&(t=Pn(t),!t&&Zt(n))?Lt(Jn(n),0,e):n.split(t,e)):[]}var mp=ne(function(n,t,e){return n+(e?" ":"")+qi(t)});function Rp(n,t,e){return n=F(n),e=e==null?0:Mt(y(e),0,n.length),t=Pn(t),n.slice(e,e+t.length)==t}function Ip(n,t,e){var r=u.templateSettings;e&&wn(n,t,e)&&(t=o),n=F(n),t=Ar({},t,r,Mf);var i=Ar({},t.imports,r.imports,Mf),f=an(i),l=ni(i,f),s,c,p=0,_=t.interpolate||We,v="__p += '",d=ei((t.escape||We).source+"|"+_.source+"|"+(_===ru?rl:We).source+"|"+(t.evaluate||We).source+"|$","g"),x="//# sourceURL="+(N.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wl+"]")+` -`;n.replace(d,function(R,b,B,Wn,xn,Bn){return B||(B=Wn),v+=n.slice(p,Bn).replace(al,jl),b&&(s=!0,v+=`' + -__e(`+b+`) + -'`),xn&&(c=!0,v+=`'; -`+xn+`; -__p += '`),B&&(v+=`' + -((__t = (`+B+`)) == null ? '' : __t) + -'`),p=Bn+R.length,R}),v+=`'; -`;var m=N.call(t,"variable")&&t.variable;if(!m)v=`with (obj) { -`+v+` -} -`;else if(tl.test(m))throw new S(cn);v=(c?v.replace(No,""):v).replace(Go,"$1").replace(Ho,"$1;"),v="function("+(m||"obj")+`) { -`+(m?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+v+`return __p -}`;var O=Oo(function(){return M(f,x+"return "+v).apply(o,l)});if(O.source=v,Ni(O))throw O;return O}function Sp(n){return F(n).toLowerCase()}function Ep(n){return F(n).toUpperCase()}function yp(n,t,e){if(n=F(n),n&&(e||t===o))return Mu(n);if(!n||!(t=Pn(t)))return n;var r=Jn(n),i=Jn(t),f=Uu(r,i),l=Fu(r,i)+1;return Lt(r,f,l).join("")}function Lp(n,t,e){if(n=F(n),n&&(e||t===o))return n.slice(0,Gu(n)+1);if(!n||!(t=Pn(t)))return n;var r=Jn(n),i=Fu(r,Jn(t))+1;return Lt(r,0,i).join("")}function Op(n,t,e){if(n=F(n),n&&(e||t===o))return n.replace(Nr,"");if(!n||!(t=Pn(t)))return n;var r=Jn(n),i=Uu(r,Jn(t));return Lt(r,i).join("")}function Cp(n,t){var e=Ir,r=ye;if(V(t)){var i="separator"in t?t.separator:i;e="length"in t?y(t.length):e,r="omission"in t?Pn(t.omission):r}n=F(n);var f=n.length;if(Zt(n)){var l=Jn(n);f=l.length}if(e>=f)return n;var s=e-Yt(r);if(s<1)return r;var c=l?Lt(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),Gi(i)){if(n.slice(s).search(i)){var p,_=c;for(i.global||(i=ei(i.source,F(iu.exec(i))+"g")),i.lastIndex=0;p=i.exec(_);)var v=p.index;c=c.slice(0,v===o?s:v)}}else if(n.indexOf(Pn(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r}function Pp(n){return n=F(n),n&&$o.test(n)?n.replace(tu,fs):n}var bp=ne(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),qi=Of("toUpperCase");function Lo(n,t,e){return n=F(n),t=e?o:t,t===o?ts(n)?ss(n):Zl(n):n.match(t)||[]}var Oo=C(function(n,t){try{return On(n,o,t)}catch(e){return Ni(e)?e:new S(e)}}),Wp=ct(function(n,t){return Gn(t,function(e){e=rt(e),st(n,e,Ui(n[e],n))}),n});function Bp(n){var t=n==null?0:n.length,e=A();return n=t?J(n,function(r){if(typeof r[1]!="function")throw new Hn(P);return[e(r[0]),r[1]]}):[],C(function(r){for(var i=-1;++iln)return[];var e=Ln,r=_n(n,Ln);t=A(t),n-=Ln;for(var i=jr(r,t);++e0||t<0)?new W(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==o&&(t=y(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},W.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},W.prototype.toArray=function(){return this.take(Ln)},tt(W.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=u[r?"take"+(t=="last"?"Right":""):t],f=r||/^find/.test(t);i&&(u.prototype[t]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof W,p=s[0],_=c||E(l),v=function(b){var B=i.apply(u,mt([b],s));return r&&d?B[0]:B};_&&e&&typeof p=="function"&&p.length!=1&&(c=_=!1);var d=this.__chain__,x=!!this.__actions__.length,m=f&&!d,O=c&&!x;if(!f&&_){l=O?l:new W(this);var R=n.apply(l,s);return R.__actions__.push({func:gr,args:[v],thisArg:o}),new $n(R,d)}return m&&O?n.apply(this,s):(R=this.thru(v),m?r?R.value()[0]:R.value():R)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(n){var t=Ne[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return t.apply(E(f)?f:[],i)}return this[e](function(l){return t.apply(E(l)?l:[],i)})}}),tt(W.prototype,function(n,t){var e=u[t];if(e){var r=e.name+"";N.call(Vt,r)||(Vt[r]=[]),Vt[r].push({name:t,func:e})}}),Vt[fr(o,Mn).name]=[{name:"wrapper",func:o}],W.prototype.clone=Ps,W.prototype.reverse=bs,W.prototype.value=Ws,u.prototype.at=lh,u.prototype.chain=sh,u.prototype.commit=ah,u.prototype.next=ch,u.prototype.plant=gh,u.prototype.reverse=ph,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=_h,u.prototype.first=u.prototype.head,ce&&(u.prototype[ce]=hh),u},Xt=as();bt?((bt.exports=Xt)._=Xt,zr._=Xt):hn._=Xt}).call(Ht)}(Se,Se.exports);var Dn=Se.exports;function Tr(I={},q){const{$:o,...T}=I;return{...Dn.mapValues(T,q),$:o}}var Ji={exports:{}};(function(I,q){(function(o,T){I.exports=T()})(Ht,function(){return function(o){function T(D){if(G[D])return G[D].exports;var P=G[D]={i:D,l:!1,exports:{}};return o[D].call(P.exports,P,P.exports,T),P.l=!0,P.exports}var G={};return T.m=o,T.c=G,T.d=function(D,P,cn){T.o(D,P)||Object.defineProperty(D,P,{configurable:!1,enumerable:!0,get:cn})},T.n=function(D){var P=D&&D.__esModule?function(){return D.default}:function(){return D};return T.d(P,"a",P),P},T.o=function(D,P){return Object.prototype.hasOwnProperty.call(D,P)},T.p="",T(T.s=1)}([function(o,T,G){function D(cn){var rn=cn===void 0?{}:cn,Yn=rn.ESCAPE,U=Yn===void 0?/^\\/:Yn,Z=rn.VARIABLE_START,on=Z===void 0?/^\${\s*/:Z,L=rn.VARIABLE_END,Y=L===void 0?/^\s*}/:L,pn=rn.PIPE_START,K=pn===void 0?/^\s*\|\s*/:pn,Mn=rn.PIPE_PARAMETER_START,ie=Mn===void 0?/^\s*:\s*/:Mn,Sn=rn.QUOTED_STRING,Xn=Sn===void 0?T.DEFAULT_QUOTED_STRING_REGEX:Sn,En=rn.QUOTED_STRING_TEST,vt=En===void 0?null:En,Un=rn.QUOTED_STRING_GET_AND_ADVANCE,Ct=Un===void 0?null:Un,$t=rn.QUOTED_STRING_IN_PARAMETER_TEST,Ir=$t===void 0?null:$t,ye=rn.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Sr=ye===void 0?null:ye,Le=vt||function(yn){return Xn.test(yn)},ue=Ct||P(Xn),Er=Ir||function(yn){return Xn.test(yn)},yr=Sr||P(Xn);return function(yn){function ln(X){X===void 0&&(X=1),H=H.substr(X)}function Pt(X){X===void 0&&(X=/^/),ln(H.match(X)[0].length)}function it(){var X;return Pt(U),X=H.length>0?H[0]:"",ln(),X}function Ln(X){var en=(X===void 0?{}:X).isNull,Qn=en!==void 0&&en;tn={name:"",pipes:[]},Fn=!Qn}function Lr(){nt.variables.push(tn),Ln({isNull:!0})}function Oe(X){var en=(X===void 0?{}:X).isNull,Qn=en!==void 0&&en;An={name:"",parameters:[]},oe=!Qn}function Ce(){tn.pipes.push(An),Oe({isNull:!0})}function ut(X){var en=(X===void 0?{}:X).isNull,Qn=en!==void 0&&en;At="",Pe=!Qn}function dt(){An.parameters.push(At),ut({isNull:!0})}function fe(){return!!Y.test(H)&&(Pt(Y),sn>=3&&dt(),sn>=2&&Ce(),sn>=1&&Lr(),sn=0,!0)}function ft(){return!!K.test(H)&&(Pt(K),sn>=3&&dt(),sn>=2&&Ce(),sn>=1&&Oe(),sn=2,!0)}function wt(){return!!ie.test(H)&&(Pt(ie),sn>=3&&dt(),sn>=2&&ut(),sn=3,!0)}for(var H=yn,nt={literals:[],variables:[]},sn=0,xt="",tn={name:"",pipes:[]},An={name:"",parameters:[]},At="",Fn=!1,oe=!1,Pe=!1;H&&H.length>0;)switch(sn){case 0:if(U.test(H)){xt+=it();continue}if(on.test(H)){sn=1,Ln(),nt.literals.push(xt),xt="",Pt(on);continue}xt+=H[0],ln();break;case 1:if(U.test(H)){tn.name+=it();continue}if(fe()||ft())continue;if(Le(H)){tn.name+=ue(H,ln);continue}tn.name+=H[0],ln();break;case 2:if(U.test(H)){An.name+=it();continue}if(fe()||wt()||ft())continue;if(Le(H)){An.name+=ue(H,ln);continue}An.name+=H[0],ln();break;case 3:if(U.test(H)){At+=it();continue}if(fe()||wt()||ft())continue;if(Er(H)){At+=yr(H,ln);continue}At+=H[0],ln()}return Pe&&An.parameters.push(At),oe&&tn.pipes.push(An),Fn&&nt.variables.push(tn),nt.literals.push(xt),nt}}function P(cn){return function(rn,Yn){var U=rn.match(cn);return Yn(U[0].length),U.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(T,"__esModule",{value:!0}),T.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,T.parseStringTemplateGenerator=D,T.parseStringTemplate=D(),T.getQuotedStringAndAdvanceForRegex=P},function(o,T,G){o.exports=G(2)},function(o,T,G){function D(P){for(var cn in P)T.hasOwnProperty(cn)||(T[cn]=P[cn])}Object.defineProperty(T,"__esModule",{value:!0}),D(G(0)),D(G(3))},function(o,T,G){function D(U){return function(Z){return U.hasOwnProperty(Z)?U[Z]:Z.split(".").reduce(function(on,L){return on.hasOwnProperty(L)?on[L]:""},U)}}function P(U,Z,on,L){L===void 0&&(L=D(Z));var Y=L(U.name);return U.pipes.reduce(function(pn,K){return on.hasOwnProperty(K.name)?on[K.name](pn,K.parameters):pn},Y??"")}function cn(U,Z,on,L){return L===void 0&&(L=D(Z)),U.literals.length===0?"":U.literals.slice(1).reduce(function(Y,pn,K){return""+Y+P(U.variables[K],Z,on,L)+pn},U.literals[0])}function rn(U,Z,on){return cn(Yn.parseStringTemplate(U),Z,on)}Object.defineProperty(T,"__esModule",{value:!0});var Yn=G(0);T.evaluateParsedString=cn,T.evaluateStringTemplate=rn}])})})(Ji);var Vi=Ji.exports;function ki(I){const q=Function("ctx",`return ${I};`);return o=>q(new Proxy(Ee(o),{get(T,G){var D;return(D=T[G])==null?void 0:D.call(T,{})}}))}const bo=/^\{\{\s*/,Wo=/^\s*\}\}/,mr=/\b\B/;function Bo(I){const o=Vi.parseStringTemplateGenerator({VARIABLE_START:bo,VARIABLE_END:Wo,PIPE_START:mr,PIPE_PARAMETER_START:mr,QUOTED_STRING:mr})(I);return Dn.join(o.literals,"")?T=>Vi.evaluateParsedString(o,{},{},G=>ki(G)(T)):ki(o.variables[0].name)}function Rr(I){switch(I==null?void 0:I.constructor){case Array:{const q=Dn.map(I,Rr);return o=>Dn.map(q,T=>T(o))}case Object:{const q=Dn.mapValues(I,Rr);return o=>Dn.mapValues(q,T=>T(o))}case String:return Bo(I);default:return Dn.constant(I)}}function Ee(I={}){return Tr(I,q=>Dn.isFunction(q)?q:Rr(q))}function ji(I,q){const o=Tr(q,T=>G=>T(ji(Ee(G),I)));return{...I,...o}}function nu(I,q,o={}){return I.flatMap(T=>{const{$:G}=T,D=ji(Ee(o),Ee(T));return G in q?nu(q[G],q,D):[D]})}const Do=I=>I==null;function Mo({trace:I,context:q,view:o="main"}){var Yn,U,Z,on;const T=nu(((Z=(U=(Yn=I==null?void 0:I.render)==null?void 0:Yn.views)==null?void 0:U[o])==null?void 0:Z.components)??[],((on=I==null?void 0:I.render)==null?void 0:on.components)??{}),G=(L,Y)=>Dn.map(T,pn=>Tr(pn,K=>K({alpha:1,...q,...Y,...L}))),D=L=>L&&Object.hasOwn(L,"alpha")?L.alpha>0:!0,P=L=>Y=>({component:Y,meta:{source:"trace",step:L}}),cn=Dn.chain(I==null?void 0:I.events).map((L,Y)=>({step:Y,id:L.id,data:L,pId:L.pId})).groupBy("id").value();return{steps:Dn.chain(I==null?void 0:I.events).map((L,Y,pn)=>{var K;return G(L,{...q,step:Y,parent:Do(L.pId)?void 0:pn[((K=Dn.findLast(cn[L.pId],Mn=>Mn.step<=Y))==null?void 0:K.step)??0]})}).map(L=>L.filter(D)).map((L,Y)=>L.map(P(Y))).value()}}onmessage=({data:I})=>{postMessage(Mo(I))}})(); diff --git a/coi.js b/coi.js index 2ce52153..bae8820d 100644 --- a/coi.js +++ b/coi.js @@ -1,102 +1,136 @@ /*! coi-serviceworker v0.1.7 - Guido Zuidhof and contributors, licensed under MIT */ -let coepCredentialless = !1; -"undefined" == typeof window - ? (self.addEventListener("install", () => self.skipWaiting()), - self.addEventListener("activate", (e) => e.waitUntil(self.clients.claim())), - self.addEventListener("message", (e) => { - e.data && - ("deregister" === e.data.type - ? self.registration - .unregister() - .then(() => self.clients.matchAll()) - .then((e) => { - e.forEach((e) => e.navigate(e.url)); - }) - : "coepCredentialless" === e.data.type && - (coepCredentialless = e.data.value)); - }), - self.addEventListener("fetch", function (e) { - const r = e.request; - if ("only-if-cached" === r.cache && "same-origin" !== r.mode) return; - const s = - coepCredentialless && "no-cors" === r.mode - ? new Request(r, { credentials: "omit" }) - : r; - e.respondWith( - fetch(s) - .then((e) => { - if (0 === e.status) return e; - const r = new Headers(e.headers); - return ( - r.set( - "Cross-Origin-Embedder-Policy", - coepCredentialless ? "credentialless" : "require-corp" - ), - coepCredentialless || - r.set("Cross-Origin-Resource-Policy", "cross-origin"), - r.set("Cross-Origin-Opener-Policy", "same-origin"), - new Response(e.body, { - status: e.status, - statusText: e.statusText, - headers: r, - }) - ); +let coepCredentialless = false; +if (typeof window === "undefined") { + self.addEventListener("install", () => self.skipWaiting()); + self.addEventListener("activate", (event) => + event.waitUntil(self.clients.claim()) + ); + + self.addEventListener("message", (ev) => { + if (!ev.data) { + return; + } else if (ev.data.type === "deregister") { + self.registration + .unregister() + .then(() => { + return self.clients.matchAll(); + }) + .then((clients) => { + clients.forEach((client) => client.navigate(client.url)); + }); + } else if (ev.data.type === "coepCredentialless") { + coepCredentialless = ev.data.value; + } + }); + + self.addEventListener("fetch", function (event) { + const r = event.request; + if (r.cache === "only-if-cached" && r.mode !== "same-origin") { + return; + } + + const request = + coepCredentialless && r.mode === "no-cors" + ? new Request(r, { + credentials: "omit", }) - .catch((e) => console.error(e)) - ); - })) - : (() => { - const e = { - shouldRegister: () => !0, - shouldDeregister: () => !1, - coepCredentialless: () => - window.chrome !== undefined || window.netscape !== undefined, - doReload: () => window.location.reload(), - quiet: !1, - ...window.coi, - }, - r = navigator; - r.serviceWorker && - r.serviceWorker.controller && - (r.serviceWorker.controller.postMessage({ - type: "coepCredentialless", - value: e.coepCredentialless(), - }), - e.shouldDeregister() && - r.serviceWorker.controller.postMessage({ type: "deregister" })), - !1 === window.crossOriginIsolated && - e.shouldRegister() && - (window.isSecureContext - ? r.serviceWorker && - r.serviceWorker.register(window.document.currentScript.src).then( - (s) => { - !e.quiet && - console.log("COOP/COEP Service Worker registered", s.scope), - s.addEventListener("updatefound", () => { - !e.quiet && - console.log( - "Reloading page to make use of updated COOP/COEP Service Worker." - ), - e.doReload(); - }), - s.active && - !r.serviceWorker.controller && - (!e.quiet && - console.log( - "Reloading page to make use of COOP/COEP Service Worker." - ), - e.doReload()); - }, - (r) => { - !e.quiet && - console.error( - "COOP/COEP Service Worker failed to register:", - r - ); - } - ) - : !e.quiet && + : r; + event.respondWith( + fetch(request) + .then((response) => { + if (response.status === 0) { + return response; + } + + const newHeaders = new Headers(response.headers); + newHeaders.set( + "Cross-Origin-Embedder-Policy", + coepCredentialless ? "credentialless" : "require-corp" + ); + if (!coepCredentialless) { + newHeaders.set("Cross-Origin-Resource-Policy", "cross-origin"); + } + newHeaders.set("Cross-Origin-Opener-Policy", "same-origin"); + + return new Response(response.body, { + status: response.status, + statusText: response.statusText, + headers: newHeaders, + }); + }) + .catch((e) => console.error(e)) + ); + }); +} else { + (() => { + // You can customize the behavior of this script through a global `coi` variable. + const coi = { + shouldRegister: () => true, + shouldDeregister: () => false, + coepCredentialless: () => + window.chrome !== undefined || window.netscape !== undefined, + doReload: () => window.location.reload(), + quiet: false, + ...window.coi, + }; + + const n = navigator; + + if (n.serviceWorker && n.serviceWorker.controller) { + n.serviceWorker.controller.postMessage({ + type: "coepCredentialless", + value: coi.coepCredentialless(), + }); + + if (coi.shouldDeregister()) { + n.serviceWorker.controller.postMessage({ type: "deregister" }); + } + } + + // If we're already coi: do nothing. Perhaps it's due to this script doing its job, or COOP/COEP are + // already set from the origin server. Also if the browser has no notion of crossOriginIsolated, just give up here. + if (window.crossOriginIsolated !== false || !coi.shouldRegister()) return; + + if (!window.isSecureContext) { + !coi.quiet && + console.log( + "COOP/COEP Service Worker not registered, a secure context is required." + ); + return; + } + + // In some environments (e.g. Chrome incognito mode) this won't be available + if (n.serviceWorker) { + n.serviceWorker.register(window.document.currentScript.src).then( + (registration) => { + !coi.quiet && + console.log( + "COOP/COEP Service Worker registered", + registration.scope + ); + + registration.addEventListener("updatefound", () => { + !coi.quiet && console.log( - "COOP/COEP Service Worker not registered, a secure context is required." - )); - })(); + "Reloading page to make use of updated COOP/COEP Service Worker." + ); + coi.doReload(); + }); + + // If the registration is active, but it's not controlling the page + if (registration.active && !n.serviceWorker.controller) { + !coi.quiet && + console.log( + "Reloading page to make use of COOP/COEP Service Worker." + ); + coi.doReload(); + } + }, + (err) => { + !coi.quiet && + console.error("COOP/COEP Service Worker failed to register:", err); + } + ); + } + })(); +} diff --git a/index.html b/index.html index abe7e8eb..a4bf584d 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - +