From 350eda764e71e24c56e7ebeee4c4464cafc0cea9 Mon Sep 17 00:00:00 2001 From: Spaaaacccee Date: Thu, 21 Dec 2023 12:40:10 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20path-vis?= =?UTF-8?q?ualiser/app@5300df4bb40ff3ccd8b7c1703711d107e214f28f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/D2Renderer.worker-19d00eda.js | 28 ++ assets/D2Renderer.worker-c5f0c7ab.js | 28 -- .../{index-4b4f04ba.js => index-d21fd498.js} | 290 +++++++++--------- index.html | 2 +- 4 files changed, 174 insertions(+), 174 deletions(-) create mode 100644 assets/D2Renderer.worker-19d00eda.js delete mode 100644 assets/D2Renderer.worker-c5f0c7ab.js rename assets/{index-4b4f04ba.js => index-d21fd498.js} (71%) diff --git a/assets/D2Renderer.worker-19d00eda.js b/assets/D2Renderer.worker-19d00eda.js new file mode 100644 index 00000000..5ca4e3c6 --- /dev/null +++ b/assets/D2Renderer.worker-19d00eda.js @@ -0,0 +1,28 @@ +var Af=(cn,wn,Rn)=>{if(!wn.has(cn))throw TypeError("Cannot "+Rn)};var yn=(cn,wn,Rn)=>(Af(cn,wn,"read from private field"),Rn?Rn.call(cn):wn.get(cn)),fe=(cn,wn,Rn)=>{if(wn.has(cn))throw TypeError("Cannot add the same private member more than once");wn instanceof WeakSet?wn.add(cn):wn.set(cn,Rn)},me=(cn,wn,Rn,Ae)=>(Af(cn,wn,"write to private field"),Ae?Ae.call(cn,Rn):wn.set(cn,Rn),Rn);var Yc=(cn,wn,Rn,Ae)=>({set _(Ki){me(cn,wn,Ki,Rn)},get _(){return yn(cn,wn,Ae)}}),Je=(cn,wn,Rn)=>(Af(cn,wn,"access private method"),Rn);(function(){var Qn,Ct,Ne,Ye,fr,Jr,$c,Ft,ft,Mr,Bt,Qr,Xc,jr,Wc;"use strict";var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rn={},Ae=cn&&cn.__assign||function(){return Ae=Object.assign||function(t){for(var u,i=1,f=arguments.length;i + * 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 + */Lr.exports,function(t,u){(function(){var i,f="4.17.21",s=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",g="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",w=1,B=2,F=4,M=1,H=2,E=1,T=2,C=4,A=8,L=16,D=32,N=64,K=128,Z=256,gn=512,Wn=30,se="...",_e=800,ar=16,at=1,sr=2,lr=3,le=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,ye=4294967295,Mg=ye-1,Lg=ye>>>1,Pg=[["ary",K],["bind",E],["bindKey",T],["curry",A],["curryRight",L],["flip",gn],["partial",D],["partialRight",N],["rearg",Z]],Mt="[object Arguments]",ni="[object Array]",Hg="[object AsyncFunction]",cr="[object Boolean]",hr="[object Date]",Dg="[object DOMException]",ei="[object Error]",ti="[object Function]",ls="[object GeneratorFunction]",ce="[object Map]",pr="[object Number]",qg="[object Null]",Re="[object Object]",cs="[object Promise]",Gg="[object Proxy]",gr="[object RegExp]",he="[object Set]",dr="[object String]",ri="[object Symbol]",Ng="[object Undefined]",vr="[object WeakMap]",Yg="[object WeakSet]",mr="[object ArrayBuffer]",Lt="[object DataView]",no="[object Float32Array]",eo="[object Float64Array]",to="[object Int8Array]",ro="[object Int16Array]",io="[object Int32Array]",uo="[object Uint8Array]",oo="[object Uint8ClampedArray]",fo="[object Uint16Array]",ao="[object Uint32Array]",$g=/\b__p \+= '';/g,Xg=/\b(__p \+=) '' \+/g,Wg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hs=/&(?:amp|lt|gt|quot|#39);/g,ps=/[&<>"']/g,Ug=RegExp(hs.source),Kg=RegExp(ps.source),zg=/<%-([\s\S]+?)%>/g,kg=/<%([\s\S]+?)%>/g,gs=/<%=([\s\S]+?)%>/g,Vg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zg=/^\w*$/,Jg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,so=/[\\^$.*+?()[\]{}|]/g,Qg=RegExp(so.source),lo=/^\s+/,jg=/\s/,nd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ed=/\{\n\/\* \[wrapped with (.+)\] \*/,td=/,? & /,rd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,id=/[()=,{}\[\]\/\s]/,ud=/\\(\\)?/g,od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ds=/\w*$/,fd=/^[-+]0x[0-9a-f]+$/i,ad=/^0b[01]+$/i,sd=/^\[object .+?Constructor\]$/,ld=/^0o[0-7]+$/i,cd=/^(?:0|[1-9]\d*)$/,hd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ii=/($^)/,pd=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",gd="\\u0300-\\u036f",dd="\\ufe20-\\ufe2f",vd="\\u20d0-\\u20ff",vs=gd+dd+vd,ms="\\u2700-\\u27bf",_s="a-z\\xdf-\\xf6\\xf8-\\xff",md="\\xac\\xb1\\xd7\\xf7",_d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\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",ys="A-Z\\xc0-\\xd6\\xd8-\\xde",bs="\\ufe0e\\ufe0f",xs=md+_d+yd+bd,co="['’]",xd="["+ui+"]",ws="["+xs+"]",oi="["+vs+"]",As="\\d+",wd="["+ms+"]",Ss="["+_s+"]",Es="[^"+ui+xs+As+ms+_s+ys+"]",ho="\\ud83c[\\udffb-\\udfff]",Ad="(?:"+oi+"|"+ho+")",Rs="[^"+ui+"]",po="(?:\\ud83c[\\udde6-\\uddff]){2}",go="[\\ud800-\\udbff][\\udc00-\\udfff]",Pt="["+ys+"]",Os="\\u200d",Is="(?:"+Ss+"|"+Es+")",Sd="(?:"+Pt+"|"+Es+")",Cs="(?:"+co+"(?:d|ll|m|re|s|t|ve))?",Fs="(?:"+co+"(?:D|LL|M|RE|S|T|VE))?",Bs=Ad+"?",Ts="["+bs+"]?",Ed="(?:"+Os+"(?:"+[Rs,po,go].join("|")+")"+Ts+Bs+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Od="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ms=Ts+Bs+Ed,Id="(?:"+[wd,po,go].join("|")+")"+Ms,Cd="(?:"+[Rs+oi+"?",oi,po,go,xd].join("|")+")",Fd=RegExp(co,"g"),Bd=RegExp(oi,"g"),vo=RegExp(ho+"(?="+ho+")|"+Cd+Ms,"g"),Td=RegExp([Pt+"?"+Ss+"+"+Cs+"(?="+[ws,Pt,"$"].join("|")+")",Sd+"+"+Fs+"(?="+[ws,Pt+Is,"$"].join("|")+")",Pt+"?"+Is+"+"+Cs,Pt+"+"+Fs,Od,Rd,As,Id].join("|"),"g"),Md=RegExp("["+Os+ui+vs+bs+"]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pd=["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"],Hd=-1,dn={};dn[no]=dn[eo]=dn[to]=dn[ro]=dn[io]=dn[uo]=dn[oo]=dn[fo]=dn[ao]=!0,dn[Mt]=dn[ni]=dn[mr]=dn[cr]=dn[Lt]=dn[hr]=dn[ei]=dn[ti]=dn[ce]=dn[pr]=dn[Re]=dn[gr]=dn[he]=dn[dr]=dn[vr]=!1;var pn={};pn[Mt]=pn[ni]=pn[mr]=pn[Lt]=pn[cr]=pn[hr]=pn[no]=pn[eo]=pn[to]=pn[ro]=pn[io]=pn[ce]=pn[pr]=pn[Re]=pn[gr]=pn[he]=pn[dr]=pn[ri]=pn[uo]=pn[oo]=pn[fo]=pn[ao]=!0,pn[ei]=pn[ti]=pn[vr]=!1;var Dd={À:"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"},qd={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yd=parseFloat,$d=parseInt,Ls=typeof cn=="object"&&cn&&cn.Object===Object&&cn,Xd=typeof self=="object"&&self&&self.Object===Object&&self,Cn=Ls||Xd||Function("return this")(),mo=u&&!u.nodeType&&u,lt=mo&&!0&&t&&!t.nodeType&&t,Ps=lt&<.exports===mo,_o=Ps&&Ls.process,jn=function(){try{var b=lt&<.require&<.require("util").types;return b||_o&&_o.binding&&_o.binding("util")}catch{}}(),Hs=jn&&jn.isArrayBuffer,Ds=jn&&jn.isDate,qs=jn&&jn.isMap,Gs=jn&&jn.isRegExp,Ns=jn&&jn.isSet,Ys=jn&&jn.isTypedArray;function Un(b,R,S){switch(S.length){case 0:return b.call(R);case 1:return b.call(R,S[0]);case 2:return b.call(R,S[0],S[1]);case 3:return b.call(R,S[0],S[1],S[2])}return b.apply(R,S)}function Wd(b,R,S,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function yo(b,R,S){for(var G=-1,k=b==null?0:b.length;++G-1;);return S}function Vs(b,R){for(var S=b.length;S--&&Ht(R,b[S],0)>-1;);return S}function jd(b,R){for(var S=b.length,G=0;S--;)b[S]===R&&++G;return G}var n0=Ao(Dd),e0=Ao(qd);function t0(b){return"\\"+Nd[b]}function r0(b,R){return b==null?i:b[R]}function Dt(b){return Md.test(b)}function i0(b){return Ld.test(b)}function u0(b){for(var R,S=[];!(R=b.next()).done;)S.push(R.value);return S}function Oo(b){var R=-1,S=Array(b.size);return b.forEach(function(G,k){S[++R]=[k,G]}),S}function Zs(b,R){return function(S){return b(R(S))}}function We(b,R){for(var S=-1,G=b.length,k=0,fn=[];++S-1}function K0(n,e){var r=this.__data__,o=Si(r,n);return o<0?(++this.size,r.push([n,e])):r[o][1]=e,this}Oe.prototype.clear=$0,Oe.prototype.delete=X0,Oe.prototype.get=W0,Oe.prototype.has=U0,Oe.prototype.set=K0;function Ie(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function re(n,e,r,o,a,h){var v,_=e&w,x=e&B,O=e&F;if(r&&(v=a?r(n,o,a,h):r(n)),v!==i)return v;if(!mn(n))return n;var I=V(n);if(I){if(v=Zv(n),!_)return Nn(n,v)}else{var P=Mn(n),q=P==ti||P==ls;if(Ze(n))return Tl(n,_);if(P==Re||P==Mt||q&&!a){if(v=x||q?{}:Jl(n),!_)return x?Gv(n,av(v,n)):qv(n,al(v,n))}else{if(!pn[P])return a?n:{};v=Jv(n,P,_)}}h||(h=new ge);var Y=h.get(n);if(Y)return Y;h.set(n,v),Rc(n)?n.forEach(function(U){v.add(re(U,e,r,U,n,h))}):Sc(n)&&n.forEach(function(U,rn){v.set(rn,re(U,e,r,rn,n,h))});var W=O?x?jo:Qo:x?$n:En,Q=I?i:W(n);return ne(Q||n,function(U,rn){Q&&(rn=U,U=n[rn]),Sr(v,rn,re(U,e,r,rn,n,h))}),v}function sv(n){var e=En(n);return function(r){return sl(r,n,e)}}function sl(n,e,r){var o=r.length;if(n==null)return!o;for(n=ln(n);o--;){var a=r[o],h=e[a],v=n[a];if(v===i&&!(a in n)||!h(v))return!1}return!0}function ll(n,e,r){if(typeof n!="function")throw new ee(p);return Br(function(){n.apply(i,r)},e)}function Er(n,e,r,o){var a=-1,h=fi,v=!0,_=n.length,x=[],O=e.length;if(!_)return x;r&&(e=vn(e,Kn(r))),o?(h=yo,v=!1):e.length>=s&&(h=_r,v=!1,e=new pt(e));n:for(;++a<_;){var I=n[a],P=r==null?I:r(I);if(I=o||I!==0?I:0,v&&P===P){for(var q=O;q--;)if(e[q]===P)continue n;x.push(I)}else h(e,P,o)||x.push(I)}return x}var Ke=Dl(be),cl=Dl(Po,!0);function lv(n,e){var r=!0;return Ke(n,function(o,a,h){return r=!!e(o,a,h),r}),r}function Ei(n,e,r){for(var o=-1,a=n.length;++oa?0:a+r),o=o===i||o>a?a:J(o),o<0&&(o+=a),o=r>o?0:Ic(o);r0&&r(_)?e>1?Fn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Lo=ql(),pl=ql(!0);function be(n,e){return n&&Lo(n,e,En)}function Po(n,e){return n&&pl(n,e,En)}function Ri(n,e){return $e(e,function(r){return Me(n[r])})}function dt(n,e){e=ke(e,n);for(var r=0,o=e.length;n!=null&&re}function hv(n,e){return n!=null&&sn.call(n,e)}function pv(n,e){return n!=null&&e in ln(n)}function gv(n,e,r){return n>=Tn(e,r)&&n=120&&I.length>=120)?new pt(v&&I):i}I=n[0];var P=-1,q=_[0];n:for(;++P-1;)_!==n&&mi.call(_,x,1),mi.call(n,x,1);return n}function Sl(n,e){for(var r=n?e.length:0,o=r-1;r--;){var a=e[r];if(r==o||a!==h){var h=a;Te(a)?mi.call(n,a,1):Uo(n,a)}}return n}function $o(n,e){return n+bi(il()*(e-n+1))}function Ov(n,e,r,o){for(var a=-1,h=Sn(yi((e-n)/(r||1)),0),v=S(h);h--;)v[o?h:++a]=n,n+=r;return v}function Xo(n,e){var r="";if(!n||e<1||e>Gn)return r;do e%2&&(r+=n),e=bi(e/2),e&&(n+=n);while(e);return r}function j(n,e){return ff(nc(n,e,Xn),n+"")}function Iv(n){return fl(kt(n))}function Cv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!mn(n))return n;e=ke(e,n);for(var a=-1,h=e.length,v=h-1,_=n;_!=null&&++aa?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var h=S(a);++o>>1,v=n[h];v!==null&&!kn(v)&&(r?v<=e:v=s){var O=e?null:Xv(n);if(O)return si(O);v=!1,a=_r,x=new pt}else x=e?[]:_;n:for(;++o=o?n:ie(n,e,r)}var Bl=b0||function(n){return Cn.clearTimeout(n)};function Tl(n,e){if(e)return n.slice();var r=n.length,o=js?js(r):new n.constructor(r);return n.copy(o),o}function Vo(n){var e=new n.constructor(n.byteLength);return new di(e).set(new di(n)),e}function Lv(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,ds.exec(n));return e.lastIndex=n.lastIndex,e}function Hv(n){return Ar?ln(Ar.call(n)):{}}function Ml(n,e){var r=e?Vo(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Ll(n,e){if(n!==e){var r=n!==i,o=n===null,a=n===n,h=kn(n),v=e!==i,_=e===null,x=e===e,O=kn(e);if(!_&&!O&&!h&&n>e||h&&v&&x&&!_&&!O||o&&v&&x||!r&&x||!a)return 1;if(!o&&!h&&!O&&n=_)return x;var O=r[o];return x*(O=="desc"?-1:1)}}return n.index-e.index}function Pl(n,e,r,o){for(var a=-1,h=n.length,v=r.length,_=-1,x=e.length,O=Sn(h-v,0),I=S(x+O),P=!o;++_1?r[a-1]:i,v=a>2?r[2]:i;for(h=n.length>3&&typeof h=="function"?(a--,h):i,v&&Hn(r[0],r[1],v)&&(h=a<3?i:h,a=1),e=ln(e);++o-1?a[h?e[v]:v]:i}}function Yl(n){return Be(function(e){var r=e.length,o=r,a=te.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new ee(p);if(a&&!v&&Pi(h)=="wrapper")var v=new te([],!0)}for(o=v?o:r;++o1&&on.reverse(),I&&x_))return!1;var O=h.get(n),I=h.get(e);if(O&&I)return O==e&&I==n;var P=-1,q=!0,Y=r&H?new pt:i;for(h.set(n,e),h.set(e,n);++P<_;){var W=n[P],Q=e[P];if(o)var U=v?o(Q,W,P,e,n,h):o(W,Q,P,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(Y){if(!xo(e,function(rn,on){if(!_r(Y,on)&&(W===rn||a(W,rn,r,o,h)))return Y.push(on)})){q=!1;break}}else if(!(W===Q||a(W,Q,r,o,h))){q=!1;break}}return h.delete(n),h.delete(e),q}function Uv(n,e,r,o,a,h,v){switch(r){case Lt:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case mr:return!(n.byteLength!=e.byteLength||!h(new di(n),new di(e)));case cr:case hr:case pr:return de(+n,+e);case ei:return n.name==e.name&&n.message==e.message;case gr:case dr:return n==e+"";case ce:var _=Oo;case he:var x=o&M;if(_||(_=si),n.size!=e.size&&!x)return!1;var O=v.get(n);if(O)return O==e;o|=H,v.set(n,e);var I=kl(_(n),_(e),o,a,h,v);return v.delete(n),I;case ri:if(Ar)return Ar.call(n)==Ar.call(e)}return!1}function Kv(n,e,r,o,a,h){var v=r&M,_=Qo(n),x=_.length,O=Qo(e),I=O.length;if(x!=I&&!v)return!1;for(var P=x;P--;){var q=_[P];if(!(v?q in e:sn.call(e,q)))return!1}var Y=h.get(n),W=h.get(e);if(Y&&W)return Y==e&&W==n;var Q=!0;h.set(n,e),h.set(e,n);for(var U=v;++P1?"& ":"")+e[o],e=e.join(r>2?", ":" "),n.replace(nd,`{ +/* [wrapped with `+e+`] */ +`)}function jv(n){return V(n)||_t(n)||!!(tl&&n&&n[tl])}function Te(n,e){var r=typeof n;return e=e??Gn,!!e&&(r=="number"||r!="symbol"&&cd.test(n))&&n>-1&&n%1==0&&n0){if(++e>=_e)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Di(n,e){var r=-1,o=n.length,a=o-1;for(e=e===i?o:e;++r1?n[e-1]:i;return r=typeof r=="function"?(n.pop(),r):i,hc(n,r)});function pc(n){var e=l(n);return e.__chain__=!0,e}function lm(n,e){return e(n),n}function qi(n,e){return e(n)}var cm=Be(function(n){var e=n.length,r=e?n[0]:0,o=this.__wrapped__,a=function(h){return Mo(h,n)};return e>1||this.__actions__.length||!(o instanceof un)||!Te(r)?this.thru(a):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:qi,args:[a],thisArg:i}),new te(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return pc(this)}function pm(){return new te(this.value(),this.__chain__)}function gm(){this.__values__===i&&(this.__values__=Oc(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function dm(){return this}function vm(n){for(var e,r=this;r instanceof Ai;){var o=oc(r);o.__index__=0,o.__values__=i,e?a.__wrapped__=o:e=o;var a=o;r=r.__wrapped__}return a.__wrapped__=n,e}function mm(){var n=this.__wrapped__;if(n instanceof un){var e=n;return this.__actions__.length&&(e=new un(this)),e=e.reverse(),e.__actions__.push({func:qi,args:[af],thisArg:i}),new te(e,this.__chain__)}return this.thru(af)}function _m(){return Cl(this.__wrapped__,this.__actions__)}var ym=Fi(function(n,e,r){sn.call(n,r)?++n[r]:Ce(n,r,1)});function bm(n,e,r){var o=V(n)?$s:lv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}function xm(n,e){var r=V(n)?$e:hl;return r(n,X(e,3))}var wm=Nl(fc),Am=Nl(ac);function Sm(n,e){return Fn(Gi(n,e),1)}function Em(n,e){return Fn(Gi(n,e),le)}function Rm(n,e,r){return r=r===i?1:J(r),Fn(Gi(n,e),r)}function gc(n,e){var r=V(n)?ne:Ke;return r(n,X(e,3))}function dc(n,e){var r=V(n)?Ud:cl;return r(n,X(e,3))}var Om=Fi(function(n,e,r){sn.call(n,r)?n[r].push(e):Ce(n,r,[e])});function Im(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?J(r):0;var a=n.length;return r<0&&(r=Sn(a+r,0)),Wi(n)?r<=a&&n.indexOf(e,r)>-1:!!a&&Ht(n,e,r)>-1}var Cm=j(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?S(n.length):[];return Ke(n,function(v){h[++o]=a?Un(e,v,r):Rr(v,e,r)}),h}),Fm=Fi(function(n,e,r){Ce(n,r,e)});function Gi(n,e){var r=V(n)?vn:_l;return r(n,X(e,3))}function Bm(n,e,r,o){return n==null?[]:(V(e)||(e=e==null?[]:[e]),r=o?i:r,V(r)||(r=r==null?[]:[r]),wl(n,e,r))}var Tm=Fi(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Mm(n,e,r){var o=V(n)?bo:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,Ke)}function Lm(n,e,r){var o=V(n)?Kd:Ks,a=arguments.length<3;return o(n,X(e,4),r,a,cl)}function Pm(n,e){var r=V(n)?$e:hl;return r(n,$i(X(e,3)))}function Hm(n){var e=V(n)?fl:Iv;return e(n)}function Dm(n,e,r){(r?Hn(n,e,r):e===i)?e=1:e=J(e);var o=V(n)?uv:Cv;return o(n,e)}function qm(n){var e=V(n)?ov:Bv;return e(n)}function Gm(n){if(n==null)return 0;if(Yn(n))return Wi(n)?qt(n):n.length;var e=Mn(n);return e==ce||e==he?n.size:Go(n).length}function Nm(n,e,r){var o=V(n)?xo:Tv;return r&&Hn(n,e,r)&&(e=i),o(n,X(e,3))}var Ym=j(function(n,e){if(n==null)return[];var r=e.length;return r>1&&Hn(n,e[0],e[1])?e=[]:r>2&&Hn(e[0],e[1],e[2])&&(e=[e[0]]),wl(n,Fn(e,1),[])}),Ni=x0||function(){return Cn.Date.now()};function $m(n,e){if(typeof e!="function")throw new ee(p);return n=J(n),function(){if(--n<1)return e.apply(this,arguments)}}function vc(n,e,r){return e=r?i:e,e=n&&e==null?n.length:e,Fe(n,K,i,i,i,i,e)}function mc(n,e){var r;if(typeof e!="function")throw new ee(p);return n=J(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var lf=j(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(lf));o|=D}return Fe(n,o,e,r,a)}),_c=j(function(n,e,r){var o=E|T;if(r.length){var a=We(r,Kt(_c));o|=D}return Fe(e,o,n,r,a)});function yc(n,e,r){e=r?i:e;var o=Fe(n,A,i,i,i,i,i,e);return o.placeholder=yc.placeholder,o}function bc(n,e,r){e=r?i:e;var o=Fe(n,L,i,i,i,i,i,e);return o.placeholder=bc.placeholder,o}function xc(n,e,r){var o,a,h,v,_,x,O=0,I=!1,P=!1,q=!0;if(typeof n!="function")throw new ee(p);e=oe(e)||0,mn(r)&&(I=!!r.leading,P="maxWait"in r,h=P?Sn(oe(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function Y(xn){var ve=o,Pe=a;return o=a=i,O=xn,v=n.apply(Pe,ve),v}function W(xn){return O=xn,_=Br(rn,e),I?Y(xn):v}function Q(xn){var ve=xn-x,Pe=xn-O,Nc=e-ve;return P?Tn(Nc,h-Pe):Nc}function U(xn){var ve=xn-x,Pe=xn-O;return x===i||ve>=e||ve<0||P&&Pe>=h}function rn(){var xn=Ni();if(U(xn))return on(xn);_=Br(rn,Q(xn))}function on(xn){return _=i,q&&o?Y(xn):(o=a=i,v)}function Vn(){_!==i&&Bl(_),O=0,o=x=a=_=i}function Dn(){return _===i?v:on(Ni())}function Zn(){var xn=Ni(),ve=U(xn);if(o=arguments,a=this,x=xn,ve){if(_===i)return W(x);if(P)return Bl(_),_=Br(rn,e),Y(x)}return _===i&&(_=Br(rn,e)),v}return Zn.cancel=Vn,Zn.flush=Dn,Zn}var Xm=j(function(n,e){return ll(n,1,e)}),Wm=j(function(n,e,r){return ll(n,oe(e)||0,r)});function Um(n){return Fe(n,gn)}function Yi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ee(p);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],h=r.cache;if(h.has(a))return h.get(a);var v=n.apply(this,o);return r.cache=h.set(a,v)||h,v};return r.cache=new(Yi.Cache||Ie),r}Yi.Cache=Ie;function $i(n){if(typeof n!="function")throw new ee(p);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Km(n){return mc(2,n)}var zm=Mv(function(n,e){e=e.length==1&&V(e[0])?vn(e[0],Kn(X())):vn(Fn(e,1),Kn(X()));var r=e.length;return j(function(o){for(var a=-1,h=Tn(o.length,r);++a=e}),_t=dl(function(){return arguments}())?dl:function(n){return _n(n)&&sn.call(n,"callee")&&!el.call(n,"callee")},V=S.isArray,a_=Hs?Kn(Hs):vv;function Yn(n){return n!=null&&Xi(n.length)&&!Me(n)}function bn(n){return _n(n)&&Yn(n)}function s_(n){return n===!0||n===!1||_n(n)&&Pn(n)==cr}var Ze=A0||wf,l_=Ds?Kn(Ds):mv;function c_(n){return _n(n)&&n.nodeType===1&&!Tr(n)}function h_(n){if(n==null)return!0;if(Yn(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||Ze(n)||zt(n)||_t(n)))return!n.length;var e=Mn(n);if(e==ce||e==he)return!n.size;if(Fr(n))return!Go(n).length;for(var r in n)if(sn.call(n,r))return!1;return!0}function p_(n,e){return Or(n,e)}function g_(n,e,r){r=typeof r=="function"?r:i;var o=r?r(n,e):i;return o===i?Or(n,e,i,r):!!o}function hf(n){if(!_n(n))return!1;var e=Pn(n);return e==ei||e==Dg||typeof n.message=="string"&&typeof n.name=="string"&&!Tr(n)}function d_(n){return typeof n=="number"&&rl(n)}function Me(n){if(!mn(n))return!1;var e=Pn(n);return e==ti||e==ls||e==Hg||e==Gg}function Ac(n){return typeof n=="number"&&n==J(n)}function Xi(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function mn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Sc=qs?Kn(qs):yv;function v_(n,e){return n===e||qo(n,e,ef(e))}function m_(n,e,r){return r=typeof r=="function"?r:i,qo(n,e,ef(e),r)}function __(n){return Ec(n)&&n!=+n}function y_(n){if(t1(n))throw new k(c);return vl(n)}function b_(n){return n===null}function x_(n){return n==null}function Ec(n){return typeof n=="number"||_n(n)&&Pn(n)==pr}function Tr(n){if(!_n(n)||Pn(n)!=Re)return!1;var e=vi(n);if(e===null)return!0;var r=sn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&hi.call(r)==m0}var pf=Gs?Kn(Gs):bv;function w_(n){return Ac(n)&&n>=-Gn&&n<=Gn}var Rc=Ns?Kn(Ns):xv;function Wi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==dr}function kn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ri}var zt=Ys?Kn(Ys):wv;function A_(n){return n===i}function S_(n){return _n(n)&&Mn(n)==vr}function E_(n){return _n(n)&&Pn(n)==Yg}var R_=Li(No),O_=Li(function(n,e){return n<=e});function Oc(n){if(!n)return[];if(Yn(n))return Wi(n)?pe(n):Nn(n);if(yr&&n[yr])return u0(n[yr]());var e=Mn(n),r=e==ce?Oo:e==he?si:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=oe(n),n===le||n===-le){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function J(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function Ic(n){return n?gt(J(n),0,ye):0}function oe(n){if(typeof n=="number")return n;if(kn(n))return st;if(mn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=mn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=zs(n);var r=ad.test(n);return r||ld.test(n)?$d(n.slice(2),r?2:8):fd.test(n)?st:+n}function Cc(n){return xe(n,$n(n))}function I_(n){return n?gt(J(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":zn(n)}var C_=Wt(function(n,e){if(Fr(e)||Yn(e)){xe(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Sr(n,r,e[r])}),Fc=Wt(function(n,e){xe(e,$n(e),n)}),Ui=Wt(function(n,e,r,o){xe(e,$n(e),n,o)}),F_=Wt(function(n,e,r,o){xe(e,En(e),n,o)}),B_=Be(Mo);function T_(n,e){var r=Xt(n);return e==null?r:al(r,e)}var M_=j(function(n,e){n=ln(n);var r=-1,o=e.length,a=o>2?e[2]:i;for(a&&Hn(e[0],e[1],a)&&(o=1);++r1),h}),xe(n,jo(n),r),o&&(r=re(r,w|B|F,Wv));for(var a=e.length;a--;)Uo(r,e[a]);return r});function J_(n,e){return Tc(n,$i(X(e)))}var Q_=Be(function(n,e){return n==null?{}:Ev(n,e)});function Tc(n,e){if(n==null)return{};var r=vn(jo(n),function(o){return[o]});return e=X(e),Al(n,r,function(o,a){return e(o,a[0])})}function j_(n,e,r){e=ke(e,n);var o=-1,a=e.length;for(a||(a=1,n=i);++oe){var o=n;n=e,e=o}if(r||n%1||e%1){var a=il();return Tn(n+a*(e-n+Yd("1e-"+((a+"").length-1))),e)}return $o(n,e)}var ly=Ut(function(n,e,r){return e=e.toLowerCase(),n+(r?Pc(e):e)});function Pc(n){return vf(an(n).toLowerCase())}function Hc(n){return n=an(n),n&&n.replace(hd,n0).replace(Bd,"")}function cy(n,e,r){n=an(n),e=zn(e);var o=n.length;r=r===i?o:gt(J(r),0,o);var a=r;return r-=e.length,r>=0&&n.slice(r,a)==e}function hy(n){return n=an(n),n&&Kg.test(n)?n.replace(ps,e0):n}function py(n){return n=an(n),n&&Qg.test(n)?n.replace(so,"\\$&"):n}var gy=Ut(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),dy=Ut(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),vy=Gl("toLowerCase");function my(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;if(!e||o>=e)return n;var a=(e-o)/2;return Mi(bi(a),r)+n+Mi(yi(a),r)}function _y(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!pf(e))&&(e=zn(e),!e&&Dt(n))?Ve(pe(n),0,r):n.split(e,r)):[]}var Ey=Ut(function(n,e,r){return n+(r?" ":"")+vf(e)});function Ry(n,e,r){return n=an(n),r=r==null?0:gt(J(r),0,n.length),e=zn(e),n.slice(r,r+e.length)==e}function Oy(n,e,r){var o=l.templateSettings;r&&Hn(n,e,r)&&(e=i),n=an(n),e=Ui({},e,o,Kl);var a=Ui({},e.imports,o.imports,Kl),h=En(a),v=Ro(a,h),_,x,O=0,I=e.interpolate||ii,P="__p += '",q=Io((e.escape||ii).source+"|"+I.source+"|"+(I===gs?od:ii).source+"|"+(e.evaluate||ii).source+"|$","g"),Y="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hd+"]")+` +`;n.replace(q,function(U,rn,on,Vn,Dn,Zn){return on||(on=Vn),P+=n.slice(O,Zn).replace(pd,t0),rn&&(_=!0,P+=`' + +__e(`+rn+`) + +'`),Dn&&(x=!0,P+=`'; +`+Dn+`; +__p += '`),on&&(P+=`' + +((__t = (`+on+`)) == null ? '' : __t) + +'`),O=Zn+U.length,U}),P+=`'; +`;var W=sn.call(e,"variable")&&e.variable;if(!W)P=`with (obj) { +`+P+` +} +`;else if(id.test(W))throw new k(g);P=(x?P.replace($g,""):P).replace(Xg,"$1").replace(Wg,"$1;"),P="function("+(W||"obj")+`) { +`+(W?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(x?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+P+`return __p +}`;var Q=qc(function(){return fn(h,Y+"return "+P).apply(i,v)});if(Q.source=P,hf(Q))throw Q;return Q}function Iy(n){return an(n).toLowerCase()}function Cy(n){return an(n).toUpperCase()}function Fy(n,e,r){if(n=an(n),n&&(r||e===i))return zs(n);if(!n||!(e=zn(e)))return n;var o=pe(n),a=pe(e),h=ks(o,a),v=Vs(o,a)+1;return Ve(o,h,v).join("")}function By(n,e,r){if(n=an(n),n&&(r||e===i))return n.slice(0,Js(n)+1);if(!n||!(e=zn(e)))return n;var o=pe(n),a=Vs(o,pe(e))+1;return Ve(o,0,a).join("")}function Ty(n,e,r){if(n=an(n),n&&(r||e===i))return n.replace(lo,"");if(!n||!(e=zn(e)))return n;var o=pe(n),a=ks(o,pe(e));return Ve(o,a).join("")}function My(n,e){var r=Wn,o=se;if(mn(e)){var a="separator"in e?e.separator:a;r="length"in e?J(e.length):r,o="omission"in e?zn(e.omission):o}n=an(n);var h=n.length;if(Dt(n)){var v=pe(n);h=v.length}if(r>=h)return n;var _=r-qt(o);if(_<1)return o;var x=v?Ve(v,0,_).join(""):n.slice(0,_);if(a===i)return x+o;if(v&&(_+=x.length-_),pf(a)){if(n.slice(_).search(a)){var O,I=x;for(a.global||(a=Io(a.source,an(ds.exec(a))+"g")),a.lastIndex=0;O=a.exec(I);)var P=O.index;x=x.slice(0,P===i?_:P)}}else if(n.indexOf(zn(a),_)!=_){var q=x.lastIndexOf(a);q>-1&&(x=x.slice(0,q))}return x+o}function Ly(n){return n=an(n),n&&Ug.test(n)?n.replace(hs,s0):n}var Py=Ut(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),vf=Gl("toUpperCase");function Dc(n,e,r){return n=an(n),e=r?i:e,e===i?i0(n)?h0(n):Vd(n):n.match(e)||[]}var qc=j(function(n,e){try{return Un(n,i,e)}catch(r){return hf(r)?r:new k(r)}}),Hy=Be(function(n,e){return ne(e,function(r){r=we(r),Ce(n,r,lf(n[r],n))}),n});function Dy(n){var e=n==null?0:n.length,r=X();return n=e?vn(n,function(o){if(typeof o[1]!="function")throw new ee(p);return[r(o[0]),o[1]]}):[],j(function(o){for(var a=-1;++aGn)return[];var r=ye,o=Tn(n,ye);e=X(e),n-=ye;for(var a=Eo(o,e);++r0||e<0)?new un(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==i&&(e=J(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},un.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},un.prototype.toArray=function(){return this.take(ye)},be(un.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),a=l[o?"take"+(e=="last"?"Right":""):e],h=o||/^find/.test(e);a&&(l.prototype[e]=function(){var v=this.__wrapped__,_=o?[1]:arguments,x=v instanceof un,O=_[0],I=x||V(v),P=function(rn){var on=a.apply(l,Xe([rn],_));return o&&q?on[0]:on};I&&r&&typeof O=="function"&&O.length!=1&&(x=I=!1);var q=this.__chain__,Y=!!this.__actions__.length,W=h&&!q,Q=x&&!Y;if(!h&&I){v=Q?v:new un(this);var U=n.apply(v,_);return U.__actions__.push({func:qi,args:[P],thisArg:i}),new te(U,q)}return W&&Q?n.apply(this,_):(U=this.thru(P),W?o?U.value()[0]:U.value():U)})}),ne(["pop","push","shift","sort","splice","unshift"],function(n){var e=li[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",o=/^(?:pop|shift)$/.test(n);l.prototype[n]=function(){var a=arguments;if(o&&!this.__chain__){var h=this.value();return e.apply(V(h)?h:[],a)}return this[r](function(v){return e.apply(V(v)?v:[],a)})}}),be(un.prototype,function(n,e){var r=l[e];if(r){var o=r.name+"";sn.call($t,o)||($t[o]=[]),$t[o].push({name:e,func:r})}}),$t[Bi(i,T).name]=[{name:"wrapper",func:i}],un.prototype.clone=L0,un.prototype.reverse=P0,un.prototype.value=H0,l.prototype.at=cm,l.prototype.chain=hm,l.prototype.commit=pm,l.prototype.next=gm,l.prototype.plant=vm,l.prototype.reverse=mm,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=_m,l.prototype.first=l.prototype.head,yr&&(l.prototype[yr]=dm),l},Gt=p0();lt?((lt.exports=Gt)._=Gt,mo._=Gt):Cn._=Gt}).call(cn)}(Lr,Lr.exports);var hn=Lr.exports,Kc=function(){},zc=Kc(),Qe=function(t){return t!==zc&&t!==null},kc=Qe,Vc=Array.prototype.forEach,Zc=Object.create,Jc=function(t,u){var i;for(i in t)u[i]=t[i]},Sf=function(t){var u=Zc(null);return Vc.call(arguments,function(i){kc(i)&&Jc(Object(i),u)}),u},Qc=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},zi,Ef;function jc(){return Ef||(Ef=1,zi=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),zi}var nh=Qc()?Math.sign:jc(),eh=nh,th=Math.abs,rh=Math.floor,ih=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:eh(t)*rh(th(t)))},uh=ih,oh=Math.max,je=function(t){return oh(0,uh(t))},fh=je,Rf=function(t,u,i){var f;return isNaN(t)?(f=u,f>=0?i&&f?f-1:f:1):t===!1?!1:fh(t)},He=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},ah=Qe,yt=function(t){if(!ah(t))throw new TypeError("Cannot use null or undefined");return t},sh=He,lh=yt,ch=Function.prototype.bind,Of=Function.prototype.call,hh=Object.keys,ph=Object.prototype.propertyIsEnumerable,gh=function(t,u){return function(i,f){var s,c=arguments[2],p=arguments[3];return i=Object(lh(i)),sh(f),s=hh(i),p&&s.sort(typeof p=="function"?ch.call(p,i):void 0),typeof t!="function"&&(t=s[t]),Of.call(t,s,function(g,m){return ph.call(i,g)?Of.call(f,c,i[g],g,i,m):u})}},Pr=gh("forEach"),nt={},If={exports:{}},dh=function(){var t=Object.assign,u;return typeof t!="function"?!1:(u={foo:"raz"},t(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")},ki,Cf;function vh(){return Cf||(Cf=1,ki=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ki}var Vi,Ff;function mh(){if(Ff)return Vi;Ff=1;var t=Qe,u=Object.keys;return Vi=function(i){return u(t(i)?Object(i):i)},Vi}var Zi,Bf;function _h(){return Bf||(Bf=1,Zi=vh()()?Object.keys:mh()),Zi}var Ji,Tf;function yh(){if(Tf)return Ji;Tf=1;var t=_h(),u=yt,i=Math.max;return Ji=function(f,s){var c,p,g=i(arguments.length,2),m;for(f=Object(u(f)),m=function(d){try{f[d]=s[d]}catch(y){c||(c=y)}},p=1;p-1},tu}var qh=Hh()?String.prototype.contains:Dh(),Hr=Xf,Uf=Ph,Kf=Mf,zf=Sf,Vt=qh,Gh=$f.exports=function(t,u){var i,f,s,c,p;return arguments.length<2||typeof t!="string"?(c=u,u=t,t=null):c=arguments[2],Hr(t)?(i=Vt.call(t,"c"),f=Vt.call(t,"e"),s=Vt.call(t,"w")):(i=s=!0,f=!1),p={value:u,configurable:i,enumerable:f,writable:s},c?Kf(zf(c),p):p};Gh.gs=function(t,u,i){var f,s,c,p;return typeof t!="string"?(c=i,i=u,u=t,t=null):c=arguments[3],Hr(u)?Uf(u)?Hr(i)?Uf(i)||(c=i,i=void 0):i=void 0:(c=u,u=i=void 0):u=void 0,Hr(t)?(f=Vt.call(t,"c"),s=Vt.call(t,"e")):(f=!0,s=!1),p={get:u,set:i,configurable:f,enumerable:s},c?Kf(zf(c),p):p};var et=$f.exports,ru={exports:{}};(function(t,u){var i=et,f=He,s=Function.prototype.apply,c=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},w,B,F,M,H,E,T;w=function(C,A){var L;return f(A),d.call(this,"__ee__")?L=this.__ee__:(L=y.value=p(null),g(this,"__ee__",y),y.value=null),L[C]?typeof L[C]=="object"?L[C].push(A):L[C]=[L[C],A]:L[C]=A,this},B=function(C,A){var L,D;return f(A),D=this,w.call(this,C,L=function(){F.call(D,C,L),s.call(A,this,arguments)}),L.__eeOnceListener__=A,this},F=function(C,A){var L,D,N,K;if(f(A),!d.call(this,"__ee__"))return this;if(L=this.__ee__,!L[C])return this;if(D=L[C],typeof D=="object")for(K=0;N=D[K];++K)(N===A||N.__eeOnceListener__===A)&&(D.length===2?L[C]=D[K?0:1]:D.splice(K,1));else(D===A||D.__eeOnceListener__===A)&&delete L[C];return this},M=function(C){var A,L,D,N,K;if(d.call(this,"__ee__")&&(N=this.__ee__[C],!!N))if(typeof N=="object"){for(L=arguments.length,K=new Array(L-1),A=1;A=55296&&L<=56319&&(Z+=B[++E])),Z=F?d.call(F,M,Z,T):Z,H?(y.value=Z,w(C,T,y)):C[T]=Z,++T;A=T}}if(A===void 0)for(A=f(B.length),H&&(C=new H(A)),E=0;E=0?y=p(y):y=u(this.length)-p(c(y)),m=y;m"}},Yu}var $u,Da;function Lp(){if(Da)return $u;Da=1;var t=Mp(),u=/[\n\r\u2028\u2029]/g;return $u=function(i){var f=t(i);return f.length>100&&(f=f.slice(0,99)+"…"),f=f.replace(u,function(s){return JSON.stringify(s).slice(1,-1)}),f},$u}var Yr={exports:{}},qa;function Ga(){if(qa)return Yr.exports;qa=1,Yr.exports=t,Yr.exports.default=t;function t(u){return!!u&&(typeof u=="object"||typeof u=="function")&&typeof u.then=="function"}return Yr.exports}var Na;function Pp(){if(Na)return Fa;Na=1;var t=Oa(),u=Fp(),i=Tp(),f=Lp(),s=Ga(),c=Hu(),p=Object.create,g=u("then","then:finally","done","done:finally");return nt.promise=function(m,d){var y=p(null),w=p(null),B=p(null);if(m===!0)m=null;else if(m=i(m),!g[m])throw new TypeError("'"+f(m)+"' is not valid promise mode");d.on("set",function(F,M,H){var E=!1;if(!s(H)){w[F]=H,d.emit("setasync",F,1);return}y[F]=1,B[F]=H;var T=function(D){var N=y[F];if(E)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.`);N&&(delete y[F],w[F]=D,d.emit("setasync",F,N))},C=function(){E=!0,y[F]&&(delete y[F],delete B[F],d.delete(F))},A=m;if(A||(A="then"),A==="then"){var L=function(){c(C)};H=H.then(function(D){c(T.bind(this,D))},L),typeof H.finally=="function"&&H.finally(L)}else if(A==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(T,C)}else if(A==="done:finally"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof H.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");H.done(T),H.finally(C)}}),d.on("get",function(F,M,H){var E;if(y[F]){++y[F];return}E=B[F];var T=function(){d.emit("getasync",F,M,H)};s(E)?typeof E.done=="function"?E.done(T):E.then(function(){c(T)}):T()}),d.on("delete",function(F){if(delete B[F],y[F]){delete y[F];return}if(hasOwnProperty.call(w,F)){var M=w[F];delete w[F],d.emit("deleteasync",F,[M])}}),d.on("clear",function(){var F=w;w=p(null),y=p(null),B=p(null),d.emit("clearasync",t(F,function(M){return[M]}))})},Fa}var Ya={},$a;function Hp(){if($a)return Ya;$a=1;var t=He,u=Pr,i=nt,f=Function.prototype.apply;return i.dispose=function(s,c,p){var g;if(t(s),p.async&&i.async||p.promise&&i.promise){c.on("deleteasync",g=function(m,d){f.call(s,null,d)}),c.on("clearasync",function(m){u(m,function(d,y){g(y,d)})});return}c.on("delete",g=function(m,d){s(d)}),c.on("clear",function(m){u(m,function(d,y){g(y,d)})})},Ya}var Xa={},Xu,Wa;function Dp(){return Wa||(Wa=1,Xu=2147483647),Xu}var Wu,Ua;function qp(){if(Ua)return Wu;Ua=1;var t=je,u=Dp();return Wu=function(i){if(i=t(i),i>u)throw new TypeError(i+" exceeds maximum possible timeout");return i},Wu}var Ka;function Gp(){if(Ka)return Xa;Ka=1;var t=xu(),u=Pr,i=Hu(),f=Ga(),s=qp(),c=nt,p=Function.prototype,g=Math.max,m=Math.min,d=Object.create;return c.maxAge=function(y,w,B){var F,M,H,E;y=s(y),y&&(F=d(null),M=B.async&&c.async||B.promise&&c.promise?"async":"",w.on("set"+M,function(T){F[T]=setTimeout(function(){w.delete(T)},y),typeof F[T].unref=="function"&&F[T].unref(),E&&(E[T]&&E[T]!=="nextTick"&&clearTimeout(E[T]),E[T]=setTimeout(function(){delete E[T]},H),typeof E[T].unref=="function"&&E[T].unref())}),w.on("delete"+M,function(T){clearTimeout(F[T]),delete F[T],E&&(E[T]!=="nextTick"&&clearTimeout(E[T]),delete E[T])}),B.preFetch&&(B.preFetch===!0||isNaN(B.preFetch)?H=.333:H=g(m(Number(B.preFetch),1),0),H&&(E={},H=(1-H)*y,w.on("get"+M,function(T,C,A){E[T]||(E[T]="nextTick",i(function(){var L;E[T]==="nextTick"&&(delete E[T],w.delete(T),B.async&&(C=t(C),C.push(p)),L=w.memoized.apply(A,C),B.promise&&f(L)&&(typeof L.done=="function"?L.done(p,p):L.then(p,p)))}))}))),w.on("clear"+M,function(){u(F,function(T){clearTimeout(T)}),F={},E&&(u(E,function(T){T!=="nextTick"&&clearTimeout(T)}),E={})}))},Xa}var za={},Uu,ka;function Np(){if(ka)return Uu;ka=1;var t=je,u=Object.create,i=Object.prototype.hasOwnProperty;return Uu=function(f){var s=0,c=1,p=u(null),g=u(null),m=0,d;return f=t(f),{hit:function(y){var w=g[y],B=++m;if(p[B]=y,g[y]=B,!w)return++s,s<=f?void 0:(y=p[c],d(y),y);if(delete p[w],c===w)for(;!i.call(p,++c););},delete:d=function(y){var w=g[y];if(w&&(delete p[w],delete g[y],--s,c===w)){if(!s){m=0,c=1;return}for(;!i.call(p,++c););}},clear:function(){s=0,c=1,p=u(null),g=u(null),m=0}}},Uu}var Va;function Yp(){if(Va)return za;Va=1;var t=je,u=Np(),i=nt;return i.max=function(f,s,c){var p,g,m;f=t(f),f&&(g=u(f),p=c.async&&i.async||c.promise&&i.promise?"async":"",s.on("set"+p,m=function(d){d=g.hit(d),d!==void 0&&s.delete(d)}),s.on("get"+p,m),s.on("delete"+p,g.delete),s.on("clear"+p,g.clear))},za}var Za={},Ja;function $p(){if(Ja)return Za;Ja=1;var t=et,u=nt,i=Object.create,f=Object.defineProperties;return u.refCounter=function(s,c,p){var g,m;g=i(null),m=p.async&&u.async||p.promise&&u.promise?"async":"",c.on("set"+m,function(d,y){g[d]=y||1}),c.on("get"+m,function(d){++g[d]}),c.on("delete"+m,function(d){delete g[d]}),c.on("clear"+m,function(){g={}}),f(c.memoized,{deleteRef:t(function(){var d=c.get(arguments);return d===null||!g[d]?null:--g[d]?!1:(c.delete(d),!0)}),getRefCount:t(function(){var d=c.get(arguments);return d===null||!g[d]?0:g[d]})})},Za}var Xp=Sf,Wp=Rf,Up=bp,Kp=function(t){var u=Xp(arguments[1]),i;return u.normalizer||(i=u.length=Wp(u.length,t.length,u.async),i!==0&&(u.primitive?i===!1?u.normalizer=xp():i>1&&(u.normalizer=wp()(i)):i===!1?u.normalizer=Rp()():i===1?u.normalizer=Op()():u.normalizer=Ip()(i))),u.async&&Cp(),u.promise&&Pp(),u.dispose&&Hp(),u.maxAge&&Gp(),u.max&&Yp(),u.refCounter&&$p(),Up(t,u)},zp=wn(Kp);function kp(t,u,i,f,s){Qa(t,u,i||0,f||t.length-1,s||Vp)}function Qa(t,u,i,f,s){for(;f>i;){if(f-i>600){var c=f-i+1,p=u-i+1,g=Math.log(c),m=.5*Math.exp(2*g/3),d=.5*Math.sqrt(g*m*(c-m)/c)*(p-c/2<0?-1:1),y=Math.max(i,Math.floor(u-p*m/c+d)),w=Math.min(f,Math.floor(u+(c-p)*m/c+d));Qa(t,u,y,w,s)}var B=t[u],F=i,M=f;for(Jt(t,i,u),s(t[f],B)>0&&Jt(t,i,f);F0;)M--}s(t[i],B)===0?Jt(t,i,M):(M++,Jt(t,M,f)),M<=u&&(i=M+1),u<=M&&(f=M-1)}}function Jt(t,u,i){var f=t[u];t[u]=t[i],t[i]=f}function Vp(t,u){return tu?1:0}class Zp{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let i=this.data;const f=[];if(!Xr(u,i))return f;const s=this.toBBox,c=[];for(;i;){for(let p=0;p=0&&c[i].children.length>this._maxEntries;)this._split(c,i),i--;this._adjustParentBBoxes(s,c,i)}_split(u,i){const f=u[i],s=f.children.length,c=this._minEntries;this._chooseSplitAxis(f,c,s);const p=this._chooseSplitIndex(f,c,s),g=xt(f.children.splice(p,f.children.length-p));g.height=f.height,g.leaf=f.leaf,bt(f,this.toBBox),bt(g,this.toBBox),i?u[i-1].children.push(g):this._splitRoot(f,g)}_splitRoot(u,i){this.data=xt([u,i]),this.data.height=u.height+1,this.data.leaf=!1,bt(this.data,this.toBBox)}_chooseSplitIndex(u,i,f){let s,c=1/0,p=1/0;for(let g=i;g<=f-i;g++){const m=Qt(u,0,g,this.toBBox),d=Qt(u,g,f,this.toBBox),y=eg(m,d),w=Ku(m)+Ku(d);y=i;d--){const y=u.children[d];jt(g,u.leaf?c(y):y),m+=$r(g)}return m}_adjustParentBBoxes(u,i,f){for(let s=f;s>=0;s--)jt(i[s],u)}_condense(u){for(let i=u.length-1,f;i>=0;i--)u[i].children.length===0?i>0?(f=u[i-1].children,f.splice(f.indexOf(u[i]),1)):this.clear():bt(u[i],this.toBBox)}}function Jp(t,u,i){if(!i)return u.indexOf(t);for(let f=0;f=t.minX&&u.maxY>=t.minY}function xt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ja(t,u,i,f,s){const c=[u,i];for(;c.length;){if(i=c.pop(),u=c.pop(),i-u<=f)continue;const p=u+Math.ceil((i-u)/f/2)*f;kp(t,p,u,i,s),c.push(u,p,p,i)}}class tg extends Zp{toBBox(u){return{minX:u.left,minY:u.top,maxX:u.right,maxY:u.bottom}}compareMinX(u,i){return u.left-i.left}compareMinY(u,i){return u.top-i.top}}const rg={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var ns={exports:{}};(function(t){var u=Object.prototype.hasOwnProperty,i="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(i=!1));function s(m,d,y){this.fn=m,this.context=d,this.once=y||!1}function c(m,d,y,w,B){if(typeof y!="function")throw new TypeError("The listener must be a function");var F=new s(y,w||m,B),M=i?i+d:d;return m._events[M]?m._events[M].fn?m._events[M]=[m._events[M],F]:m._events[M].push(F):(m._events[M]=F,m._eventsCount++),m}function p(m,d){--m._eventsCount===0?m._events=new f:delete m._events[d]}function g(){this._events=new f,this._eventsCount=0}g.prototype.eventNames=function(){var d=[],y,w;if(this._eventsCount===0)return d;for(w in y=this._events)u.call(y,w)&&d.push(i?w.slice(1):w);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},g.prototype.listeners=function(d){var y=i?i+d:d,w=this._events[y];if(!w)return[];if(w.fn)return[w.fn];for(var B=0,F=w.length,M=new Array(F);B=6&&(i-=6),$(i<1?255*((u-t)*i+t):i<3?255*u:i<4?255*((u-t)*(4-i)+t):255*t)},On=function(t,u,i){u/=100;var f=(i/=100)<=.5?i*(u+1):i+u-i*u,s=2*i-f;return{r:Ju(s,f,(t/=60)+2),g:Ju(s,f,t),b:Ju(s,f,t-2)}},Qu=function(t,u,i,f){return{r:$(255*(1-t)*(f=1-f)),g:$(255*(1-u)*f),b:$(255*(1-i)*f)}},rs=function(t,u,i){t/=255,u/=255,i/=255;var f=1-Math.max(t,u,i),s=1-f,c=s&&(s-u)/s,p=s&&(s-i)/s;return{c:$(100*(s&&(s-t)/s)),m:$(100*c),y:$(100*p),k:$(100*f)}},At=function(t,u,i,f){f===void 0&&(f=1),t/=255,u/=255,i/=255,f=Math.min(f,1);var s=Math.max(t,u,i),c=Math.min(t,u,i),p=s-c,g=0,m=0,d=(s+c)/2;if(p!==0){switch(s){case t:g=(u-i)/p%6;break;case u:g=(i-t)/p+2;break;case i:g=(t-u)/p+4}(g=$(60*g))<0&&(g+=360),m=p/(1-Math.abs(2*d-1))}return{h:g,s:$(100*m),l:$(100*d),a:f}},is=function(t,u){if(t<0&&(t+=360),t>360&&(t-=360),t===360||t===0)return t;var i=[[0,120],[120,180],[180,240],[240,360]],f=[[0,60],[60,120],[120,240],[240,360]],s=u?f:i,c=0,p=0,g=0,m=0;return(u?i:f).find(function(d,y){return t>=d[0]&&t360||t<0)&&(t-=360*Math.floor(t/360)),t},Ln=function(t){return typeof t=="string"&&(t=wt.test(t)?Ur(t)/100:+t),isNaN(+t)||t>1?1:$(t)},St=function(t,u,i){return u.reduce(function(f,s){return ku(ku([],f,!0),[en(en({},t),{h:i===qn.ADDITIVE?ur(t.h+s):ur(is(is(t.h,!1)+s,!0))})],!1)},[en({},t)])},hg=function(t,u){return St(t,[30,-30],u)},pg=function(t,u){return St(t,[180],u)},gg=function(t,u){return St(t,[150,-150],u)},dg=function(t,u){return St(t,[120,-120],u)},vg=function(t,u){return St(t,[60,-120,180],u)},mg=function(t,u){return St(t,[90,-90,180],u)},Jn=function(t){return typeof t=="string"?function(u){var i;if(Object.keys(z).some(function(f){if(ir[f].test(u))return i=f,!0}),!i&&~es.indexOf(u)&&(i=z.HEX),!i)throw new Error(lg);return i}(t):function(u){var i,f=!1,s=ts(Object.keys(u));if(Vu[s]&&(i=Vu[s]),i&&i===z.RGB){var c=Object.entries(u).some(function(g){return!Zu.test("".concat(g[1]))}),p=Object.entries(u).some(function(g){return!(wt.test("".concat(g[1]))||!Zu.test("".concat(g[1]))&&!isNaN(+g[1])&&+g[1]<=255)});c&&p&&(f=!0),c||(i=z.HEX)}if(!i||f)throw new Error(cg);return i}(t)},_g=((tr={})[z.HEX]=function(t){var u=(~es.indexOf(t)?Wr[t]:t).match(ir.HEX),i={r:zr(u[1]||u[5]),g:zr(u[2]||u[6]),b:zr(u[3]||u[7])},f=u[4]||u[8];return f!==void 0&&(i.a=zr(f)/255),i},tr[z.RGB]=function(t){var u=t.match(ir.RGB),i=it(u[1]||u[5]),f=it(u[2]||u[6]),s=it(u[3]||u[7]),c=u[4]||u[8],p={r:Math.min(i,255),g:Math.min(f,255),b:Math.min(s,255)};return c!==void 0&&(p.a=Ln(c)),p},tr[z.HSL]=function(t){var u=t.match(ir.HSL),i=ur(u[1]||u[5]),f=Kr(u[2]||u[6]),s=Kr(u[3]||u[7]),c=u[4]||u[8],p=On(i,f,s);return c!==void 0&&(p.a=Ln(c)),p},tr[z.CMYK]=function(t){var u=t.match(ir.CMYK),i=De(u[1]||u[6]),f=De(u[2]||u[7]),s=De(u[3]||u[8]),c=De(u[4]||u[9]),p=u[5]||u[10],g=Qu(i,f,s,c);return p!==void 0&&(g.a=Ln(p)),g},tr),yg=((rr={})[z.HEX]=function(t){var u={r:it("".concat(t.r)),g:it("".concat(t.g)),b:it("".concat(t.b))};return Bn(t,"a")&&(u.a=Math.min(it("".concat(t.a),!0),1)),u},rr[z.RGB]=function(t){return this.HEX(t)},rr[z.HSL]=function(t){var u=Kr("".concat(t.s)),i=Kr("".concat(t.l)),f=On(ur(t.h),u,i);return Bn(t,"a")&&(f.a=Ln(t.a)),f},rr[z.CMYK]=function(t){var u=De("".concat(t.c)),i=De("".concat(t.m)),f=De("".concat(t.y)),s=De("".concat(t.k)),c=Qu(u,i,f,s);return Bn(t,"a")&&(c.a=Ln(t.a)),c},rr),ut=function(t,u){return u===void 0&&(u=Jn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Ee={})[z.HEX]=function(t){return{r:kr(t.r),g:kr(t.g),b:kr(t.b)}},Ee.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?kr(255*t.a):"0xFF",u},Ee[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Ee.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Ee[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,Ot(i,u)},Ee.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee[z.CMYK]=function(t,u){return bg(rs(t.r,t.g,t.b),u)},Ee.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee),us=function(t,u,i,f){var s=Jn(t),c=typeof t=="string",p=ut(t,s),g=typeof t=="string"&&Bn(p,"a")||typeof t!="string"&&Bn(t,"a"),m=At(p.r,p.g,p.b,p.a);g||delete m.a;var d=i?m.l/(u+1):(100-m.l)/(u+1),y=Array(u).fill(null).map(function(w,B){return en(en({},m),{l:m.l+d*(B+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var B=On(w.h,w.s,w.l);return g&&(B.a=w.a),c?g?nn.HEX(ot(en(en({},B),{a:$(255*B.a)}),f)):nn.HEX(ot(B,f)):g?tn.HEXA(B):tn.HEX(B)});case z.RGB:return y.map(function(w){var B=On(w.h,w.s,w.l);return g&&(B.a=w.a),c?nn.RGB(ot(B,f)):g?tn.RGBA(B,f):tn.RGB(B,f)});case z.HSL:return y.map(function(w){return c?nn.HSL(Ot(w,f)):g?tn.HSLA(en(en({},On(w.h,w.s,w.l)),{a:w.a}),f):tn.HSL(On(w.h,w.s,w.l),f)})}},Et=((tt={buildHarmony:function(t,u,i,f){var s=Jn(t),c=ut(t,s),p=At(c.r,c.g,c.b,c.a),g=typeof t=="string"&&Bn(c,"a")||typeof t!="string"&&Bn(t,"a"),m=typeof t=="string";switch(s){case z.HEX:default:return g?this.HEXA(Ot(p,0),u,i,m):this.HEX(Ot(p,0),u,i,m);case z.HSL:return g?this.HSLA(p,u,i,m,f):this.HSL(p,u,i,m,f);case z.RGB:return g?this.RGBA(p,u,i,m,f):this.RGB(p,u,i,m,f)}}})[z.HEX]=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(On(s.h,s.s,s.l)):tn.HEX(On(s.h,s.s,s.l))})},tt.HEXA=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(en(en({},On(s.h,s.s,s.l)),{a:255*Ln(s.a)})):tn.HEXA(en(en({},On(s.h,s.s,s.l)),{a:Ln(s.a)}))})},tt[z.RGB]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(On(c.h,c.s,c.l),s)):tn.RGB(On(c.h,c.s,c.l),s)})},tt.RGBA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)):tn.RGBA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt[z.HSL]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(Ot({h:c.h,s:c.s,l:c.l},s)):tn.HSL(On(c.h,c.s,c.l),s)})},tt.HSLA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(Ot(en(en({},c),{a:Ln(c.a)}),s)):tn.HSLA(en(en({},On(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt),Rt=((rt={mix:function(t,u){var i,f,s,c,p,g,m,d,y,w,B,F,M,H,E,T=t.map(function(D){var N=Jn(D);return ut(D,N)}),C=u===qn.SUBTRACTIVE?T.map(function(D){var N,K,Z,gn,Wn,se,_e,ar,at,sr,lr,le,Gn,Tt,st=(N=D.r,K=D.g,Z=D.b,gn=Math.min(N,K,Z),Wn=Math.min(255-N,255-K,255-Z),se=N-gn,_e=K-gn,ar=Z-gn,at=Math.min(se,_e),sr=se-at,lr=(_e+at)/2,le=(ar+_e-at)/2,Gn=Math.max(sr,lr,le)/Math.max(se,_e,ar),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:sr/Tt+Wn,y:lr/Tt+Wn,b:le/Tt+Wn});return Bn(D,"a")&&(st.a=D.a),st}):null;function A(D){var N=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(K,Z){var gn=Bn(Z,"a")?Z.a:1,Wn={r:Math.min(K.r+Z.r*gn,255),b:Math.min(K.b+Z.b*gn,255),a:1-(1-gn)*(1-K.a)},se="g"in K?K.g:K.y,_e="g"in Z?Z.g:Z.y;return en(en({},Wn),u===qn.ADDITIVE?{g:Math.min(se+_e*gn,255)}:{y:Math.min(se+_e*gn,255)})},N)}if(u===qn.ADDITIVE)i=A(T);else{var L=A(C);f=L.r,s=L.y,c=L.b,p=Math.min(f,s,c),g=Math.min(255-f,255-s,255-c),m=f-p,d=s-p,y=c-p,w=Math.min(d,y),B=m+d-w,F=d+w,M=2*(y-w),H=Math.max(B,F,M)/Math.max(m,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(i={r:B/E+g,g:F/E+g,b:M/E+g}).a=L.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:ae(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?nn.HEX(f):tn.HEX(f)},rt.HEXA=function(t,u,i){var f=this.mix(t,u);return f.a=i?255*Ln(f.a):Ln(f.a),i?nn.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?nn.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?nn.RGB(s):tn.RGBA(s,f)},rt[z.HSL]=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b);return delete s.a,delete c.a,i?nn.HSL(c):tn.HSL(s,f)},rt.HSLA=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b,s.a);return i?nn.HSL(c):tn.HSLA(s,f)},rt),ot=function(t,u){return en({r:$(t.r,u),g:$(t.g,u),b:$(t.b,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},Ot=function(t,u){return en({h:$(t.h,u),s:$(t.s,u),l:$(t.l,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},bg=function(t,u){return{c:$(t.c,u),m:$(t.m,u),y:$(t.y,u),k:$(t.k,u)}},qe=function(t,u,i,f,s,c){var p=s(ut(t,u),f);return i?c(p):p},It=function(t,u,i,f,s,c,p){i<1&&(i=5);var g=function(m,d,y){var w=y-1,B=(d.r-m.r)/w,F=(d.g-m.g)/w,M=(d.b-m.b)/w,H=Ln(m.a),E=(Ln(d.a)-H)/w;return Array(y).fill(null).map(function(T,C){return C===0?m:C===w?d:{r:$(m.r+B*C),g:$(m.g+F*C),b:$(m.b+M*C),a:$(H+E*C)}})}(ut(t),ut(u),i);return g.map(function(m){var d=c(m,s);return f?p(d):d})},xg=function(){function t(u,i){i===void 0&&(i=6),this.rgb=ut(u),this._decimals=i,this.updateHSL(),this.updateCMYK()}return t.prototype.updateRGB=function(){this.rgb=en(en({},On(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},t.prototype.updateRGBFromCMYK=function(){this.rgb=en(en({},Qu(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},t.prototype.updateHSL=function(){this.hsl=At(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},t.prototype.updateCMYK=function(){this.cmyk=rs(this.rgb.r,this.rgb.g,this.rgb.b)},t.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},t.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},t.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},t.prototype.setDecimals=function(u){return this._decimals=u,this},t.prototype.setH=function(u){return this.hsl.h=ur(u),this.updateRGBAndCMYK()},t.prototype.setS=function(u){return this.hsl.s=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=ae(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=ae(u,0,100),this.updateRGBAndHSL()},Object.defineProperty(t.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"H",{get:function(){return $(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"S",{get:function(){return $(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"L",{get:function(){return $(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R",{get:function(){return $(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"G",{get:function(){return $(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"B",{get:function(){return $(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"A",{get:function(){return $(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"C",{get:function(){return $(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"M",{get:function(){return $(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Y",{get:function(){return $(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"K",{get:function(){return $(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXObject",{get:function(){return tn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXAObject",{get:function(){return tn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBAObject",{get:function(){return en(en({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLAObject",{get:function(){return en(en({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKAObject",{get:function(){return en(en({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEX",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGB",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSL",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYK",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKA",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),t.toHEX=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEX,nn.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEXA,nn.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGB,nn.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGBA,nn.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSL,nn.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSLA,nn.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYK,nn.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYKA,nn.CMYK)},t.getBlendHEX=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEX,nn.HEX)},t.getBlendHEXA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HEXA,nn.HEX)},t.getBlendRGB=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGB,nn.RGB)},t.getBlendRGBA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.RGBA,nn.RGB)},t.getBlendHSL=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSL,nn.HSL)},t.getBlendHSLA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),It(u,i,f,s,c,tn.HSLA,nn.HSL)},t.getMixHEX=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEX(u,i,f)},t.getMixHEXA=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEXA(u,i,f)},t.getMixRGB=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGB(u,i,f,s)},t.getMixRGBA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGBA(u,i,f,s)},t.getMixHSL=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSL(u,i,f,s)},t.getMixHSLA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSLA(u,i,f,s)},t.getShades=function(u,i,f){return f===void 0&&(f=6),us(u,i,!0,f)},t.getTints=function(u,i,f){return f===void 0&&(f=6),us(u,i,!1,f)},t.getHarmony=function(u,i,f,s){return i===void 0&&(i=Se.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,m){var d;return(d={},d[Se.ANALOGOUS]=Et.buildHarmony(p,hg,m,g),d[Se.COMPLEMENTARY]=Et.buildHarmony(p,pg,m,g),d[Se.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,m,g),d[Se.TRIADIC]=Et.buildHarmony(p,dg,m,g),d[Se.TETRADIC]=Et.buildHarmony(p,vg,m,g),d[Se.SQUARE]=Et.buildHarmony(p,mg,m,g),d)[c]}(i,u,s,f)},t}();const wg={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:In,PI:Ag}=Math,or=(t,u)=>new xg(t).setA(u??wg.alpha).RGBA,Sg=(t,u)=>or(t,u);function Ge(t,u){return{width:t.width*u.scale.x,height:t.height*u.scale.y,x:t.x*u.scale.x+u.x,y:t.y*u.scale.y+u.y}}const ju={text:{draw(t,u,i){if(t.text){const f=Ge(t,{x:t.textX,y:t.textY,scale:{x:1,y:1}}),s=Ge(f,i);u.font=`${t.fontSize*i.scale.x}px Arial`,u.fillStyle=or(t.fontColor,t.alpha),u.fillText(t.text,s.x,s.y)}},test(t){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},path:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.lineCap="round",u.lineJoin="round",u.strokeStyle=Sg(t.fill,t.alpha);const{x:c,y:p,width:g}=Ge({...f,width:t.lineWidth,height:0},i);u.lineWidth=In(g),u.moveTo(In(c),In(p));for(const m of s){const{x:d,y}=Ge({...m,width:0,height:0},i);u.lineTo(In(d),In(y))}u.stroke()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0+t.lineWidth??0}}},rect:{draw(t,u,i){const{x:f,y:s,width:c,height:p}=Ge(t,i);u.fillStyle=or(t.fill,t.alpha),u.fillRect(In(f),In(s),In(c)||1,In(p)||1)},test(t){return{left:t.x,right:t.x+t.width,top:t.y,bottom:t.y+t.height}}},polygon:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.fillStyle=or(t.fill,t.alpha);const{x:c,y:p}=Ge({...f,width:0,height:0},i);u.moveTo(In(c),In(p));for(const g of s){const{x:m,y:d}=Ge({...g,width:0,height:0},i);u.lineTo(In(m),In(d))}u.closePath(),u.fill()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0}}},circle:{draw(t,u,i){u.fillStyle=or(t.fill,t.alpha),u.beginPath();const f=Ge({...t,width:t.radius,height:t.radius},i);u.ellipse(In(f.x),In(f.y),In(f.width),In(f.height),0,0,2*Ag),u.fill()},test(t){return{left:t.x-t.radius,right:t.x+t.radius,top:t.y-t.radius,bottom:t.y+t.radius}}}},Eg=t=>new Error(`The component ${t.$} is not supported by this renderer.`);function os(t,u,i,f){if(t in ju)ju[t].draw(u,i,f);else throw Eg(u)}const Rg=(t,u,i)=>{os(t.$,t,u,i),t.text&&os("text",t,u,i)},Og=({x:t,y:u})=>{const i=Math.abs(t),f=Math.abs(u),s=Math.max(i,f),c=2*s,p=Math.pow(c-1,2);return t==s&&u>-s?p+u-(-s+1):u==s?p+s-t+c-1:t==-s?p+s-u+2*c-1:u==-s?p+t+s+3*c-1:0},fs=JSON.stringify,{log2:Ig,max:Cg}=Math,as=t=>hn.floor(Ig(t+1));function Fg({right:t,left:u,bottom:i,top:f},s){const c=Cg(as(t-u),as(i-f))-s,p=2**c,g={left:hn.floor(u/p),right:hn.ceil((t+1)/p),top:hn.floor(f/p),bottom:hn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:hn.shuffle(Uc({x:hn.range(g.left,g.right+1),y:hn.range(g.top,g.bottom+1)}).map(m=>{const d=m.x*p,y=m.y*p;return{tile:m,bounds:{left:d-p/2,right:d+p/2,top:y-p/2,bottom:y+p/2}}}))}}const Bg=200;class Tg extends og{constructor(){super(...arguments);fe(this,Jr);fe(this,ft);fe(this,Qr);fe(this,jr);fe(this,Qn,void 0);fe(this,Ct,void 0);fe(this,Ne,void 0);fe(this,Ye,void 0);fe(this,fr,void 0);fe(this,Ft,void 0);fe(this,Bt,void 0);me(this,Qn,rg),me(this,Ct,{bottom:256,top:0,left:0,right:256}),me(this,Ne,new tg(16)),me(this,Ye,{}),me(this,fr,0),me(this,Ft,{}),me(this,Bt,hn.once(()=>hn.debounce(()=>this.render(),yn(this,Qn).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=zp((i,f)=>Je(this,jr,Wc).call(this,i,f),{normalizer:JSON.stringify,max:Bg})}getView(){return{system:yn(this,Ne),world:yn(this,Ye)}}setFrustum(i){me(this,Ct,i),yn(this,Bt).call(this)()}setTileResolution(i){hn.isEqual(i,yn(this,Qn).tileResolution)||(Object.assign(yn(this,Qn),{tileResolution:i}),Je(this,ft,Mr).call(this))}add(i,f){const s=hn.map(i,({component:c,meta:p})=>({...ju[c.$].test(c),component:c,meta:hn.pick(p,"sourceLayerIndex","sourceLayerAlpha","sourceLayerDisplayMode"),index:Je(this,Jr,$c).call(this)}));yn(this,Ne).load(s),yn(this,Ye)[f]=s,Je(this,ft,Mr).call(this)}remove(i){for(const f of yn(this,Ye)[i])yn(this,Ne).remove(f);delete yn(this,Ye)[i],Je(this,ft,Mr).call(this)}setup(i){me(this,Qn,i),Je(this,ft,Mr).call(this)}async render(){for(const{tile:i,bounds:f}of Fg(yn(this,Ct),yn(this,Qn).tileSubdivision).tiles)if(Je(this,Qr,Xc).call(this,i)){const s=this.renderTile(f,yn(this,Qn).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}Qn=new WeakMap,Ct=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,fr=new WeakMap,Jr=new WeakSet,$c=function(){return Yc(this,fr)._++},Ft=new WeakMap,ft=new WeakSet,Mr=function(){this.renderTile.clear(),yn(this,Bt).call(this)()},Bt=new WeakMap,Qr=new WeakSet,Xc=function({x:i,y:f}){const{workerCount:s,workerIndex:c}=yn(this,Qn);return Og({x:i,y:f})%s===c},jr=new WeakSet,Wc=function(i,f){const{top:s,right:c,bottom:p,left:g}=i,m={x:f.width/(c-g),y:f.height/(p-s)},d=hn.sortBy(yn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=fs(hn.map(d,"index")),w=fs([s,c,p,g]),B=yn(this,Ft)[w];if(!B||y!==B.hash){const F=new OffscreenCanvas(f.width,f.height),M=F.getContext("2d",{alpha:!1});M.imageSmoothingEnabled=!1,M.fillStyle=yn(this,Qn).backgroundColor,M.fillRect(0,0,f.width,f.height);const H=f.width*.05,E=1;M.fillStyle="rgba(127,127,127,0.36)",M.fillRect((f.width-H)/2,(f.height-E)/2,H,E),M.fillRect((f.width-E)/2,(f.height-H)/2,E,H),hn.chain(d).sortBy(C=>{var A;return-(((A=C.meta)==null?void 0:A.sourceLayerIndex)??0)}).groupBy(C=>{var A;return((A=C.meta)==null?void 0:A.sourceLayerIndex)??0}).forEach(C=>{var K,Z,gn,Wn;const A=new OffscreenCanvas(f.width,f.height),L=A.getContext("2d");for(const{component:se}of C)Rg(se,L,{scale:m,x:-g*m.x,y:-s*m.y});const D=((Z=(K=hn.head(C))==null?void 0:K.meta)==null?void 0:Z.sourceLayerAlpha)??1,N=((Wn=(gn=hn.head(C))==null?void 0:gn.meta)==null?void 0:Wn.sourceLayerDisplayMode)??"source-over";M.globalCompositeOperation=N,M.globalAlpha=D,M.drawImage(A,0,0)}).value();const T=F.transferToImageBitmap();return yn(this,Ft)[w]={hash:y,tile:T},T}else return B.tile};const ss=new Tg;ss.on("message",(t,u)=>self.postMessage(t,u)),self.onmessage=t=>{const{action:u,payload:i}=t.data;ss[u](...i)}})(); diff --git a/assets/D2Renderer.worker-c5f0c7ab.js b/assets/D2Renderer.worker-c5f0c7ab.js deleted file mode 100644 index ce815870..00000000 --- a/assets/D2Renderer.worker-c5f0c7ab.js +++ /dev/null @@ -1,28 +0,0 @@ -var Ff=(cn,wn,Rn)=>{if(!wn.has(cn))throw TypeError("Cannot "+Rn)};var yn=(cn,wn,Rn)=>(Ff(cn,wn,"read from private field"),Rn?Rn.call(cn):wn.get(cn)),fe=(cn,wn,Rn)=>{if(wn.has(cn))throw TypeError("Cannot add the same private member more than once");wn instanceof WeakSet?wn.add(cn):wn.set(cn,Rn)},me=(cn,wn,Rn,Ae)=>(Ff(cn,wn,"write to private field"),Ae?Ae.call(cn,Rn):wn.set(cn,Rn),Rn);var Jc=(cn,wn,Rn,Ae)=>({set _(Ui){me(cn,wn,Ui,Rn)},get _(){return yn(cn,wn,Ae)}}),Je=(cn,wn,Rn)=>(Ff(cn,wn,"access private method"),Rn);(function(){var Qn,Ct,Ne,Ye,or,Zr,Qc,Ft,ft,Tr,Bt,Jr,jc,Qr,nh;"use strict";var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rn={},Ae=cn&&cn.__assign||function(){return Ae=Object.assign||function(t){for(var u,i=1,f=arguments.length;i - * 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 - */Mr.exports,function(t,u){(function(){var i,f="4.17.21",s=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",g="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",w=1,I=2,B=4,M=1,D=2,E=1,T=2,F=4,A=8,L=16,H=32,N=64,K=128,Z=256,gn=512,Wn=30,se="...",_e=800,fr=16,at=1,ar=2,sr=3,le=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,ye=4294967295,Mg=ye-1,Lg=ye>>>1,Pg=[["ary",K],["bind",E],["bindKey",T],["curry",A],["curryRight",L],["flip",gn],["partial",H],["partialRight",N],["rearg",Z]],Mt="[object Arguments]",jr="[object Array]",Dg="[object AsyncFunction]",lr="[object Boolean]",cr="[object Date]",Hg="[object DOMException]",ni="[object Error]",ei="[object Function]",bs="[object GeneratorFunction]",ce="[object Map]",hr="[object Number]",qg="[object Null]",Re="[object Object]",xs="[object Promise]",Gg="[object Proxy]",pr="[object RegExp]",he="[object Set]",gr="[object String]",ti="[object Symbol]",Ng="[object Undefined]",dr="[object WeakMap]",Yg="[object WeakSet]",vr="[object ArrayBuffer]",Lt="[object DataView]",fo="[object Float32Array]",ao="[object Float64Array]",so="[object Int8Array]",lo="[object Int16Array]",co="[object Int32Array]",ho="[object Uint8Array]",po="[object Uint8ClampedArray]",go="[object Uint16Array]",vo="[object Uint32Array]",$g=/\b__p \+= '';/g,Xg=/\b(__p \+=) '' \+/g,Wg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ws=/&(?:amp|lt|gt|quot|#39);/g,As=/[&<>"']/g,Ug=RegExp(ws.source),Kg=RegExp(As.source),zg=/<%-([\s\S]+?)%>/g,kg=/<%([\s\S]+?)%>/g,Ss=/<%=([\s\S]+?)%>/g,Vg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zg=/^\w*$/,Jg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mo=/[\\^$.*+?()[\]{}|]/g,Qg=RegExp(mo.source),_o=/^\s+/,jg=/\s/,nd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ed=/\{\n\/\* \[wrapped with (.+)\] \*/,td=/,? & /,rd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,id=/[()=,{}\[\]\/\s]/,ud=/\\(\\)?/g,od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Es=/\w*$/,fd=/^[-+]0x[0-9a-f]+$/i,ad=/^0b[01]+$/i,sd=/^\[object .+?Constructor\]$/,ld=/^0o[0-7]+$/i,cd=/^(?:0|[1-9]\d*)$/,hd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ri=/($^)/,pd=/['\n\r\u2028\u2029\\]/g,ii="\\ud800-\\udfff",gd="\\u0300-\\u036f",dd="\\ufe20-\\ufe2f",vd="\\u20d0-\\u20ff",Rs=gd+dd+vd,Is="\\u2700-\\u27bf",Os="a-z\\xdf-\\xf6\\xf8-\\xff",md="\\xac\\xb1\\xd7\\xf7",_d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\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",Cs="A-Z\\xc0-\\xd6\\xd8-\\xde",Fs="\\ufe0e\\ufe0f",Bs=md+_d+yd+bd,yo="['’]",xd="["+ii+"]",Ts="["+Bs+"]",ui="["+Rs+"]",Ms="\\d+",wd="["+Is+"]",Ls="["+Os+"]",Ps="[^"+ii+Bs+Ms+Is+Os+Cs+"]",bo="\\ud83c[\\udffb-\\udfff]",Ad="(?:"+ui+"|"+bo+")",Ds="[^"+ii+"]",xo="(?:\\ud83c[\\udde6-\\uddff]){2}",wo="[\\ud800-\\udbff][\\udc00-\\udfff]",Pt="["+Cs+"]",Hs="\\u200d",qs="(?:"+Ls+"|"+Ps+")",Sd="(?:"+Pt+"|"+Ps+")",Gs="(?:"+yo+"(?:d|ll|m|re|s|t|ve))?",Ns="(?:"+yo+"(?:D|LL|M|RE|S|T|VE))?",Ys=Ad+"?",$s="["+Fs+"]?",Ed="(?:"+Hs+"(?:"+[Ds,xo,wo].join("|")+")"+$s+Ys+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Id="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xs=$s+Ys+Ed,Od="(?:"+[wd,xo,wo].join("|")+")"+Xs,Cd="(?:"+[Ds+ui+"?",ui,xo,wo,xd].join("|")+")",Fd=RegExp(yo,"g"),Bd=RegExp(ui,"g"),Ao=RegExp(bo+"(?="+bo+")|"+Cd+Xs,"g"),Td=RegExp([Pt+"?"+Ls+"+"+Gs+"(?="+[Ts,Pt,"$"].join("|")+")",Sd+"+"+Ns+"(?="+[Ts,Pt+qs,"$"].join("|")+")",Pt+"?"+qs+"+"+Gs,Pt+"+"+Ns,Id,Rd,Ms,Od].join("|"),"g"),Md=RegExp("["+Hs+ii+Rs+Fs+"]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pd=["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"],Dd=-1,dn={};dn[fo]=dn[ao]=dn[so]=dn[lo]=dn[co]=dn[ho]=dn[po]=dn[go]=dn[vo]=!0,dn[Mt]=dn[jr]=dn[vr]=dn[lr]=dn[Lt]=dn[cr]=dn[ni]=dn[ei]=dn[ce]=dn[hr]=dn[Re]=dn[pr]=dn[he]=dn[gr]=dn[dr]=!1;var pn={};pn[Mt]=pn[jr]=pn[vr]=pn[Lt]=pn[lr]=pn[cr]=pn[fo]=pn[ao]=pn[so]=pn[lo]=pn[co]=pn[ce]=pn[hr]=pn[Re]=pn[pr]=pn[he]=pn[gr]=pn[ti]=pn[ho]=pn[po]=pn[go]=pn[vo]=!0,pn[ni]=pn[ei]=pn[dr]=!1;var Hd={À:"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"},qd={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yd=parseFloat,$d=parseInt,Ws=typeof cn=="object"&&cn&&cn.Object===Object&&cn,Xd=typeof self=="object"&&self&&self.Object===Object&&self,Cn=Ws||Xd||Function("return this")(),So=u&&!u.nodeType&&u,lt=So&&!0&&t&&!t.nodeType&&t,Us=lt&<.exports===So,Eo=Us&&Ws.process,jn=function(){try{var b=lt&<.require&<.require("util").types;return b||Eo&&Eo.binding&&Eo.binding("util")}catch{}}(),Ks=jn&&jn.isArrayBuffer,zs=jn&&jn.isDate,ks=jn&&jn.isMap,Vs=jn&&jn.isRegExp,Zs=jn&&jn.isSet,Js=jn&&jn.isTypedArray;function Un(b,R,S){switch(S.length){case 0:return b.call(R);case 1:return b.call(R,S[0]);case 2:return b.call(R,S[0],S[1]);case 3:return b.call(R,S[0],S[1],S[2])}return b.apply(R,S)}function Wd(b,R,S,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function Ro(b,R,S){for(var G=-1,k=b==null?0:b.length;++G-1;);return S}function ul(b,R){for(var S=b.length;S--&&Dt(R,b[S],0)>-1;);return S}function jd(b,R){for(var S=b.length,G=0;S--;)b[S]===R&&++G;return G}var n0=Fo(Hd),e0=Fo(qd);function t0(b){return"\\"+Nd[b]}function r0(b,R){return b==null?i:b[R]}function Ht(b){return Md.test(b)}function i0(b){return Ld.test(b)}function u0(b){for(var R,S=[];!(R=b.next()).done;)S.push(R.value);return S}function Lo(b){var R=-1,S=Array(b.size);return b.forEach(function(G,k){S[++R]=[k,G]}),S}function ol(b,R){return function(S){return b(R(S))}}function We(b,R){for(var S=-1,G=b.length,k=0,fn=[];++S-1}function K0(n,e){var r=this.__data__,o=Ai(r,n);return o<0?(++this.size,r.push([n,e])):r[o][1]=e,this}Ie.prototype.clear=$0,Ie.prototype.delete=X0,Ie.prototype.get=W0,Ie.prototype.has=U0,Ie.prototype.set=K0;function Oe(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function re(n,e,r,o,a,h){var m,_=e&w,x=e&I,O=e&B;if(r&&(m=a?r(n,o,a,h):r(n)),m!==i)return m;if(!mn(n))return n;var C=V(n);if(C){if(m=Zv(n),!_)return Nn(n,m)}else{var P=Mn(n),q=P==ei||P==bs;if(Ze(n))return $l(n,_);if(P==Re||P==Mt||q&&!a){if(m=x||q?{}:fc(n),!_)return x?Gv(n,av(m,n)):qv(n,_l(m,n))}else{if(!pn[P])return a?n:{};m=Jv(n,P,_)}}h||(h=new ge);var Y=h.get(n);if(Y)return Y;h.set(n,m),Dc(n)?n.forEach(function(U){m.add(re(U,e,r,U,n,h))}):Lc(n)&&n.forEach(function(U,rn){m.set(rn,re(U,e,r,rn,n,h))});var W=O?x?ff:of:x?$n:En,Q=C?i:W(n);return ne(Q||n,function(U,rn){Q&&(rn=U,U=n[rn]),Ar(m,rn,re(U,e,r,rn,n,h))}),m}function sv(n){var e=En(n);return function(r){return yl(r,n,e)}}function yl(n,e,r){var o=r.length;if(n==null)return!o;for(n=ln(n);o--;){var a=r[o],h=e[a],m=n[a];if(m===i&&!(a in n)||!h(m))return!1}return!0}function bl(n,e,r){if(typeof n!="function")throw new ee(p);return Fr(function(){n.apply(i,r)},e)}function Sr(n,e,r,o){var a=-1,h=oi,m=!0,_=n.length,x=[],O=e.length;if(!_)return x;r&&(e=vn(e,Kn(r))),o?(h=Ro,m=!1):e.length>=s&&(h=mr,m=!1,e=new pt(e));n:for(;++a<_;){var C=n[a],P=r==null?C:r(C);if(C=o||C!==0?C:0,m&&P===P){for(var q=O;q--;)if(e[q]===P)continue n;x.push(C)}else h(e,P,o)||x.push(C)}return x}var Ke=zl(be),xl=zl($o,!0);function lv(n,e){var r=!0;return Ke(n,function(o,a,h){return r=!!e(o,a,h),r}),r}function Si(n,e,r){for(var o=-1,a=n.length;++oa?0:a+r),o=o===i||o>a?a:J(o),o<0&&(o+=a),o=r>o?0:qc(o);r0&&r(_)?e>1?Fn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Yo=kl(),Al=kl(!0);function be(n,e){return n&&Yo(n,e,En)}function $o(n,e){return n&&Al(n,e,En)}function Ei(n,e){return $e(e,function(r){return Me(n[r])})}function dt(n,e){e=ke(e,n);for(var r=0,o=e.length;n!=null&&re}function hv(n,e){return n!=null&&sn.call(n,e)}function pv(n,e){return n!=null&&e in ln(n)}function gv(n,e,r){return n>=Tn(e,r)&&n=120&&C.length>=120)?new pt(m&&C):i}C=n[0];var P=-1,q=_[0];n:for(;++P-1;)_!==n&&vi.call(_,x,1),vi.call(n,x,1);return n}function Ll(n,e){for(var r=n?e.length:0,o=r-1;r--;){var a=e[r];if(r==o||a!==h){var h=a;Te(a)?vi.call(n,a,1):Qo(n,a)}}return n}function Vo(n,e){return n+yi(gl()*(e-n+1))}function Iv(n,e,r,o){for(var a=-1,h=Sn(_i((e-n)/(r||1)),0),m=S(h);h--;)m[o?h:++a]=n,n+=r;return m}function Zo(n,e){var r="";if(!n||e<1||e>Gn)return r;do e%2&&(r+=n),e=yi(e/2),e&&(n+=n);while(e);return r}function j(n,e){return gf(lc(n,e,Xn),n+"")}function Ov(n){return ml(kt(n))}function Cv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!mn(n))return n;e=ke(e,n);for(var a=-1,h=e.length,m=h-1,_=n;_!=null&&++aa?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var h=S(a);++o>>1,m=n[h];m!==null&&!kn(m)&&(r?m<=e:m=s){var O=e?null:Xv(n);if(O)return ai(O);m=!1,a=mr,x=new pt}else x=e?[]:_;n:for(;++o=o?n:ie(n,e,r)}var Yl=b0||function(n){return Cn.clearTimeout(n)};function $l(n,e){if(e)return n.slice();var r=n.length,o=sl?sl(r):new n.constructor(r);return n.copy(o),o}function tf(n){var e=new n.constructor(n.byteLength);return new gi(e).set(new gi(n)),e}function Lv(n,e){var r=e?tf(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,Es.exec(n));return e.lastIndex=n.lastIndex,e}function Dv(n){return wr?ln(wr.call(n)):{}}function Xl(n,e){var r=e?tf(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Wl(n,e){if(n!==e){var r=n!==i,o=n===null,a=n===n,h=kn(n),m=e!==i,_=e===null,x=e===e,O=kn(e);if(!_&&!O&&!h&&n>e||h&&m&&x&&!_&&!O||o&&m&&x||!r&&x||!a)return 1;if(!o&&!h&&!O&&n=_)return x;var O=r[o];return x*(O=="desc"?-1:1)}}return n.index-e.index}function Ul(n,e,r,o){for(var a=-1,h=n.length,m=r.length,_=-1,x=e.length,O=Sn(h-m,0),C=S(x+O),P=!o;++_1?r[a-1]:i,m=a>2?r[2]:i;for(h=n.length>3&&typeof h=="function"?(a--,h):i,m&&Dn(r[0],r[1],m)&&(h=a<3?i:h,a=1),e=ln(e);++o-1?a[h?e[m]:m]:i}}function Jl(n){return Be(function(e){var r=e.length,o=r,a=te.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new ee(p);if(a&&!m&&Li(h)=="wrapper")var m=new te([],!0)}for(o=m?o:r;++o1&&on.reverse(),C&&x_))return!1;var O=h.get(n),C=h.get(e);if(O&&C)return O==e&&C==n;var P=-1,q=!0,Y=r&D?new pt:i;for(h.set(n,e),h.set(e,n);++P<_;){var W=n[P],Q=e[P];if(o)var U=m?o(Q,W,P,e,n,h):o(W,Q,P,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(Y){if(!Oo(e,function(rn,on){if(!mr(Y,on)&&(W===rn||a(W,rn,r,o,h)))return Y.push(on)})){q=!1;break}}else if(!(W===Q||a(W,Q,r,o,h))){q=!1;break}}return h.delete(n),h.delete(e),q}function Uv(n,e,r,o,a,h,m){switch(r){case Lt:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case vr:return!(n.byteLength!=e.byteLength||!h(new gi(n),new gi(e)));case lr:case cr:case hr:return de(+n,+e);case ni:return n.name==e.name&&n.message==e.message;case pr:case gr:return n==e+"";case ce:var _=Lo;case he:var x=o&M;if(_||(_=ai),n.size!=e.size&&!x)return!1;var O=m.get(n);if(O)return O==e;o|=D,m.set(n,e);var C=ic(_(n),_(e),o,a,h,m);return m.delete(n),C;case ti:if(wr)return wr.call(n)==wr.call(e)}return!1}function Kv(n,e,r,o,a,h){var m=r&M,_=of(n),x=_.length,O=of(e),C=O.length;if(x!=C&&!m)return!1;for(var P=x;P--;){var q=_[P];if(!(m?q in e:sn.call(e,q)))return!1}var Y=h.get(n),W=h.get(e);if(Y&&W)return Y==e&&W==n;var Q=!0;h.set(n,e),h.set(e,n);for(var U=m;++P1?"& ":"")+e[o],e=e.join(r>2?", ":" "),n.replace(nd,`{ -/* [wrapped with `+e+`] */ -`)}function jv(n){return V(n)||_t(n)||!!(hl&&n&&n[hl])}function Te(n,e){var r=typeof n;return e=e??Gn,!!e&&(r=="number"||r!="symbol"&&cd.test(n))&&n>-1&&n%1==0&&n0){if(++e>=_e)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Di(n,e){var r=-1,o=n.length,a=o-1;for(e=e===i?o:e;++r1?n[e-1]:i;return r=typeof r=="function"?(n.pop(),r):i,wc(n,r)});function Ac(n){var e=l(n);return e.__chain__=!0,e}function lm(n,e){return e(n),n}function Hi(n,e){return e(n)}var cm=Be(function(n){var e=n.length,r=e?n[0]:0,o=this.__wrapped__,a=function(h){return No(h,n)};return e>1||this.__actions__.length||!(o instanceof un)||!Te(r)?this.thru(a):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:Hi,args:[a],thisArg:i}),new te(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return Ac(this)}function pm(){return new te(this.value(),this.__chain__)}function gm(){this.__values__===i&&(this.__values__=Hc(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function dm(){return this}function vm(n){for(var e,r=this;r instanceof wi;){var o=vc(r);o.__index__=0,o.__values__=i,e?a.__wrapped__=o:e=o;var a=o;r=r.__wrapped__}return a.__wrapped__=n,e}function mm(){var n=this.__wrapped__;if(n instanceof un){var e=n;return this.__actions__.length&&(e=new un(this)),e=e.reverse(),e.__actions__.push({func:Hi,args:[df],thisArg:i}),new te(e,this.__chain__)}return this.thru(df)}function _m(){return Gl(this.__wrapped__,this.__actions__)}var ym=Ci(function(n,e,r){sn.call(n,r)?++n[r]:Ce(n,r,1)});function bm(n,e,r){var o=V(n)?Qs:lv;return r&&Dn(n,e,r)&&(e=i),o(n,X(e,3))}function xm(n,e){var r=V(n)?$e:wl;return r(n,X(e,3))}var wm=Zl(mc),Am=Zl(_c);function Sm(n,e){return Fn(qi(n,e),1)}function Em(n,e){return Fn(qi(n,e),le)}function Rm(n,e,r){return r=r===i?1:J(r),Fn(qi(n,e),r)}function Sc(n,e){var r=V(n)?ne:Ke;return r(n,X(e,3))}function Ec(n,e){var r=V(n)?Ud:xl;return r(n,X(e,3))}var Im=Ci(function(n,e,r){sn.call(n,r)?n[r].push(e):Ce(n,r,[e])});function Om(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?J(r):0;var a=n.length;return r<0&&(r=Sn(a+r,0)),Xi(n)?r<=a&&n.indexOf(e,r)>-1:!!a&&Dt(n,e,r)>-1}var Cm=j(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?S(n.length):[];return Ke(n,function(m){h[++o]=a?Un(e,m,r):Er(m,e,r)}),h}),Fm=Ci(function(n,e,r){Ce(n,r,e)});function qi(n,e){var r=V(n)?vn:Ol;return r(n,X(e,3))}function Bm(n,e,r,o){return n==null?[]:(V(e)||(e=e==null?[]:[e]),r=o?i:r,V(r)||(r=r==null?[]:[r]),Tl(n,e,r))}var Tm=Ci(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Mm(n,e,r){var o=V(n)?Io:tl,a=arguments.length<3;return o(n,X(e,4),r,a,Ke)}function Lm(n,e,r){var o=V(n)?Kd:tl,a=arguments.length<3;return o(n,X(e,4),r,a,xl)}function Pm(n,e){var r=V(n)?$e:wl;return r(n,Yi(X(e,3)))}function Dm(n){var e=V(n)?ml:Ov;return e(n)}function Hm(n,e,r){(r?Dn(n,e,r):e===i)?e=1:e=J(e);var o=V(n)?uv:Cv;return o(n,e)}function qm(n){var e=V(n)?ov:Bv;return e(n)}function Gm(n){if(n==null)return 0;if(Yn(n))return Xi(n)?qt(n):n.length;var e=Mn(n);return e==ce||e==he?n.size:Ko(n).length}function Nm(n,e,r){var o=V(n)?Oo:Tv;return r&&Dn(n,e,r)&&(e=i),o(n,X(e,3))}var Ym=j(function(n,e){if(n==null)return[];var r=e.length;return r>1&&Dn(n,e[0],e[1])?e=[]:r>2&&Dn(e[0],e[1],e[2])&&(e=[e[0]]),Tl(n,Fn(e,1),[])}),Gi=x0||function(){return Cn.Date.now()};function $m(n,e){if(typeof e!="function")throw new ee(p);return n=J(n),function(){if(--n<1)return e.apply(this,arguments)}}function Rc(n,e,r){return e=r?i:e,e=n&&e==null?n.length:e,Fe(n,K,i,i,i,i,e)}function Ic(n,e){var r;if(typeof e!="function")throw new ee(p);return n=J(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var mf=j(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(mf));o|=H}return Fe(n,o,e,r,a)}),Oc=j(function(n,e,r){var o=E|T;if(r.length){var a=We(r,Kt(Oc));o|=H}return Fe(e,o,n,r,a)});function Cc(n,e,r){e=r?i:e;var o=Fe(n,A,i,i,i,i,i,e);return o.placeholder=Cc.placeholder,o}function Fc(n,e,r){e=r?i:e;var o=Fe(n,L,i,i,i,i,i,e);return o.placeholder=Fc.placeholder,o}function Bc(n,e,r){var o,a,h,m,_,x,O=0,C=!1,P=!1,q=!0;if(typeof n!="function")throw new ee(p);e=oe(e)||0,mn(r)&&(C=!!r.leading,P="maxWait"in r,h=P?Sn(oe(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function Y(xn){var ve=o,Pe=a;return o=a=i,O=xn,m=n.apply(Pe,ve),m}function W(xn){return O=xn,_=Fr(rn,e),C?Y(xn):m}function Q(xn){var ve=xn-x,Pe=xn-O,Zc=e-ve;return P?Tn(Zc,h-Pe):Zc}function U(xn){var ve=xn-x,Pe=xn-O;return x===i||ve>=e||ve<0||P&&Pe>=h}function rn(){var xn=Gi();if(U(xn))return on(xn);_=Fr(rn,Q(xn))}function on(xn){return _=i,q&&o?Y(xn):(o=a=i,m)}function Vn(){_!==i&&Yl(_),O=0,o=x=a=_=i}function Hn(){return _===i?m:on(Gi())}function Zn(){var xn=Gi(),ve=U(xn);if(o=arguments,a=this,x=xn,ve){if(_===i)return W(x);if(P)return Yl(_),_=Fr(rn,e),Y(x)}return _===i&&(_=Fr(rn,e)),m}return Zn.cancel=Vn,Zn.flush=Hn,Zn}var Xm=j(function(n,e){return bl(n,1,e)}),Wm=j(function(n,e,r){return bl(n,oe(e)||0,r)});function Um(n){return Fe(n,gn)}function Ni(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ee(p);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],h=r.cache;if(h.has(a))return h.get(a);var m=n.apply(this,o);return r.cache=h.set(a,m)||h,m};return r.cache=new(Ni.Cache||Oe),r}Ni.Cache=Oe;function Yi(n){if(typeof n!="function")throw new ee(p);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Km(n){return Ic(2,n)}var zm=Mv(function(n,e){e=e.length==1&&V(e[0])?vn(e[0],Kn(X())):vn(Fn(e,1),Kn(X()));var r=e.length;return j(function(o){for(var a=-1,h=Tn(o.length,r);++a=e}),_t=El(function(){return arguments}())?El:function(n){return _n(n)&&sn.call(n,"callee")&&!cl.call(n,"callee")},V=S.isArray,a_=Ks?Kn(Ks):vv;function Yn(n){return n!=null&&$i(n.length)&&!Me(n)}function bn(n){return _n(n)&&Yn(n)}function s_(n){return n===!0||n===!1||_n(n)&&Pn(n)==lr}var Ze=A0||Cf,l_=zs?Kn(zs):mv;function c_(n){return _n(n)&&n.nodeType===1&&!Br(n)}function h_(n){if(n==null)return!0;if(Yn(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||Ze(n)||zt(n)||_t(n)))return!n.length;var e=Mn(n);if(e==ce||e==he)return!n.size;if(Cr(n))return!Ko(n).length;for(var r in n)if(sn.call(n,r))return!1;return!0}function p_(n,e){return Rr(n,e)}function g_(n,e,r){r=typeof r=="function"?r:i;var o=r?r(n,e):i;return o===i?Rr(n,e,i,r):!!o}function yf(n){if(!_n(n))return!1;var e=Pn(n);return e==ni||e==Hg||typeof n.message=="string"&&typeof n.name=="string"&&!Br(n)}function d_(n){return typeof n=="number"&&pl(n)}function Me(n){if(!mn(n))return!1;var e=Pn(n);return e==ei||e==bs||e==Dg||e==Gg}function Mc(n){return typeof n=="number"&&n==J(n)}function $i(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function mn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Lc=ks?Kn(ks):yv;function v_(n,e){return n===e||Uo(n,e,sf(e))}function m_(n,e,r){return r=typeof r=="function"?r:i,Uo(n,e,sf(e),r)}function __(n){return Pc(n)&&n!=+n}function y_(n){if(t1(n))throw new k(c);return Rl(n)}function b_(n){return n===null}function x_(n){return n==null}function Pc(n){return typeof n=="number"||_n(n)&&Pn(n)==hr}function Br(n){if(!_n(n)||Pn(n)!=Re)return!1;var e=di(n);if(e===null)return!0;var r=sn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ci.call(r)==m0}var bf=Vs?Kn(Vs):bv;function w_(n){return Mc(n)&&n>=-Gn&&n<=Gn}var Dc=Zs?Kn(Zs):xv;function Xi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==gr}function kn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ti}var zt=Js?Kn(Js):wv;function A_(n){return n===i}function S_(n){return _n(n)&&Mn(n)==dr}function E_(n){return _n(n)&&Pn(n)==Yg}var R_=Mi(zo),I_=Mi(function(n,e){return n<=e});function Hc(n){if(!n)return[];if(Yn(n))return Xi(n)?pe(n):Nn(n);if(_r&&n[_r])return u0(n[_r]());var e=Mn(n),r=e==ce?Lo:e==he?ai:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=oe(n),n===le||n===-le){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function J(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function qc(n){return n?gt(J(n),0,ye):0}function oe(n){if(typeof n=="number")return n;if(kn(n))return st;if(mn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=mn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=rl(n);var r=ad.test(n);return r||ld.test(n)?$d(n.slice(2),r?2:8):fd.test(n)?st:+n}function Gc(n){return xe(n,$n(n))}function O_(n){return n?gt(J(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":zn(n)}var C_=Wt(function(n,e){if(Cr(e)||Yn(e)){xe(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Ar(n,r,e[r])}),Nc=Wt(function(n,e){xe(e,$n(e),n)}),Wi=Wt(function(n,e,r,o){xe(e,$n(e),n,o)}),F_=Wt(function(n,e,r,o){xe(e,En(e),n,o)}),B_=Be(No);function T_(n,e){var r=Xt(n);return e==null?r:_l(r,e)}var M_=j(function(n,e){n=ln(n);var r=-1,o=e.length,a=o>2?e[2]:i;for(a&&Dn(e[0],e[1],a)&&(o=1);++r1),h}),xe(n,ff(n),r),o&&(r=re(r,w|I|B,Wv));for(var a=e.length;a--;)Qo(r,e[a]);return r});function J_(n,e){return $c(n,Yi(X(e)))}var Q_=Be(function(n,e){return n==null?{}:Ev(n,e)});function $c(n,e){if(n==null)return{};var r=vn(ff(n),function(o){return[o]});return e=X(e),Ml(n,r,function(o,a){return e(o,a[0])})}function j_(n,e,r){e=ke(e,n);var o=-1,a=e.length;for(a||(a=1,n=i);++oe){var o=n;n=e,e=o}if(r||n%1||e%1){var a=gl();return Tn(n+a*(e-n+Yd("1e-"+((a+"").length-1))),e)}return Vo(n,e)}var ly=Ut(function(n,e,r){return e=e.toLowerCase(),n+(r?Uc(e):e)});function Uc(n){return Af(an(n).toLowerCase())}function Kc(n){return n=an(n),n&&n.replace(hd,n0).replace(Bd,"")}function cy(n,e,r){n=an(n),e=zn(e);var o=n.length;r=r===i?o:gt(J(r),0,o);var a=r;return r-=e.length,r>=0&&n.slice(r,a)==e}function hy(n){return n=an(n),n&&Kg.test(n)?n.replace(As,e0):n}function py(n){return n=an(n),n&&Qg.test(n)?n.replace(mo,"\\$&"):n}var gy=Ut(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),dy=Ut(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),vy=Vl("toLowerCase");function my(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;if(!e||o>=e)return n;var a=(e-o)/2;return Ti(yi(a),r)+n+Ti(_i(a),r)}function _y(n,e,r){n=an(n),e=J(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!bf(e))&&(e=zn(e),!e&&Ht(n))?Ve(pe(n),0,r):n.split(e,r)):[]}var Ey=Ut(function(n,e,r){return n+(r?" ":"")+Af(e)});function Ry(n,e,r){return n=an(n),r=r==null?0:gt(J(r),0,n.length),e=zn(e),n.slice(r,r+e.length)==e}function Iy(n,e,r){var o=l.templateSettings;r&&Dn(n,e,r)&&(e=i),n=an(n),e=Wi({},e,o,tc);var a=Wi({},e.imports,o.imports,tc),h=En(a),m=Mo(a,h),_,x,O=0,C=e.interpolate||ri,P="__p += '",q=Po((e.escape||ri).source+"|"+C.source+"|"+(C===Ss?od:ri).source+"|"+(e.evaluate||ri).source+"|$","g"),Y="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Dd+"]")+` -`;n.replace(q,function(U,rn,on,Vn,Hn,Zn){return on||(on=Vn),P+=n.slice(O,Zn).replace(pd,t0),rn&&(_=!0,P+=`' + -__e(`+rn+`) + -'`),Hn&&(x=!0,P+=`'; -`+Hn+`; -__p += '`),on&&(P+=`' + -((__t = (`+on+`)) == null ? '' : __t) + -'`),O=Zn+U.length,U}),P+=`'; -`;var W=sn.call(e,"variable")&&e.variable;if(!W)P=`with (obj) { -`+P+` -} -`;else if(id.test(W))throw new k(g);P=(x?P.replace($g,""):P).replace(Xg,"$1").replace(Wg,"$1;"),P="function("+(W||"obj")+`) { -`+(W?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(x?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+P+`return __p -}`;var Q=kc(function(){return fn(h,Y+"return "+P).apply(i,m)});if(Q.source=P,yf(Q))throw Q;return Q}function Oy(n){return an(n).toLowerCase()}function Cy(n){return an(n).toUpperCase()}function Fy(n,e,r){if(n=an(n),n&&(r||e===i))return rl(n);if(!n||!(e=zn(e)))return n;var o=pe(n),a=pe(e),h=il(o,a),m=ul(o,a)+1;return Ve(o,h,m).join("")}function By(n,e,r){if(n=an(n),n&&(r||e===i))return n.slice(0,fl(n)+1);if(!n||!(e=zn(e)))return n;var o=pe(n),a=ul(o,pe(e))+1;return Ve(o,0,a).join("")}function Ty(n,e,r){if(n=an(n),n&&(r||e===i))return n.replace(_o,"");if(!n||!(e=zn(e)))return n;var o=pe(n),a=il(o,pe(e));return Ve(o,a).join("")}function My(n,e){var r=Wn,o=se;if(mn(e)){var a="separator"in e?e.separator:a;r="length"in e?J(e.length):r,o="omission"in e?zn(e.omission):o}n=an(n);var h=n.length;if(Ht(n)){var m=pe(n);h=m.length}if(r>=h)return n;var _=r-qt(o);if(_<1)return o;var x=m?Ve(m,0,_).join(""):n.slice(0,_);if(a===i)return x+o;if(m&&(_+=x.length-_),bf(a)){if(n.slice(_).search(a)){var O,C=x;for(a.global||(a=Po(a.source,an(Es.exec(a))+"g")),a.lastIndex=0;O=a.exec(C);)var P=O.index;x=x.slice(0,P===i?_:P)}}else if(n.indexOf(zn(a),_)!=_){var q=x.lastIndexOf(a);q>-1&&(x=x.slice(0,q))}return x+o}function Ly(n){return n=an(n),n&&Ug.test(n)?n.replace(ws,s0):n}var Py=Ut(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),Af=Vl("toUpperCase");function zc(n,e,r){return n=an(n),e=r?i:e,e===i?i0(n)?h0(n):Vd(n):n.match(e)||[]}var kc=j(function(n,e){try{return Un(n,i,e)}catch(r){return yf(r)?r:new k(r)}}),Dy=Be(function(n,e){return ne(e,function(r){r=we(r),Ce(n,r,mf(n[r],n))}),n});function Hy(n){var e=n==null?0:n.length,r=X();return n=e?vn(n,function(o){if(typeof o[1]!="function")throw new ee(p);return[r(o[0]),o[1]]}):[],j(function(o){for(var a=-1;++aGn)return[];var r=ye,o=Tn(n,ye);e=X(e),n-=ye;for(var a=To(o,e);++r0||e<0)?new un(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==i&&(e=J(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},un.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},un.prototype.toArray=function(){return this.take(ye)},be(un.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),a=l[o?"take"+(e=="last"?"Right":""):e],h=o||/^find/.test(e);a&&(l.prototype[e]=function(){var m=this.__wrapped__,_=o?[1]:arguments,x=m instanceof un,O=_[0],C=x||V(m),P=function(rn){var on=a.apply(l,Xe([rn],_));return o&&q?on[0]:on};C&&r&&typeof O=="function"&&O.length!=1&&(x=C=!1);var q=this.__chain__,Y=!!this.__actions__.length,W=h&&!q,Q=x&&!Y;if(!h&&C){m=Q?m:new un(this);var U=n.apply(m,_);return U.__actions__.push({func:Hi,args:[P],thisArg:i}),new te(U,q)}return W&&Q?n.apply(this,_):(U=this.thru(P),W?o?U.value()[0]:U.value():U)})}),ne(["pop","push","shift","sort","splice","unshift"],function(n){var e=si[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",o=/^(?:pop|shift)$/.test(n);l.prototype[n]=function(){var a=arguments;if(o&&!this.__chain__){var h=this.value();return e.apply(V(h)?h:[],a)}return this[r](function(m){return e.apply(V(m)?m:[],a)})}}),be(un.prototype,function(n,e){var r=l[e];if(r){var o=r.name+"";sn.call($t,o)||($t[o]=[]),$t[o].push({name:e,func:r})}}),$t[Fi(i,T).name]=[{name:"wrapper",func:i}],un.prototype.clone=L0,un.prototype.reverse=P0,un.prototype.value=D0,l.prototype.at=cm,l.prototype.chain=hm,l.prototype.commit=pm,l.prototype.next=gm,l.prototype.plant=vm,l.prototype.reverse=mm,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=_m,l.prototype.first=l.prototype.head,_r&&(l.prototype[_r]=dm),l},Gt=p0();lt?((lt.exports=Gt)._=Gt,So._=Gt):Cn._=Gt}).call(cn)}(Mr,Mr.exports);var hn=Mr.exports,th=function(){},rh=th(),Qe=function(t){return t!==rh&&t!==null},ih=Qe,uh=Array.prototype.forEach,oh=Object.create,fh=function(t,u){var i;for(i in t)u[i]=t[i]},Bf=function(t){var u=oh(null);return uh.call(arguments,function(i){ih(i)&&fh(Object(i),u)}),u},ah=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},Ki,Tf;function sh(){return Tf||(Tf=1,Ki=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),Ki}var lh=ah()?Math.sign:sh(),ch=lh,hh=Math.abs,ph=Math.floor,gh=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:ch(t)*ph(hh(t)))},dh=gh,vh=Math.max,je=function(t){return vh(0,dh(t))},mh=je,Mf=function(t,u,i){var f;return isNaN(t)?(f=u,f>=0?i&&f?f-1:f:1):t===!1?!1:mh(t)},De=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},zi,Lf;function yt(){if(Lf)return zi;Lf=1;var t=Qe;return zi=function(u){if(!t(u))throw new TypeError("Cannot use null or undefined");return u},zi}var _h=De,yh=yt(),bh=Function.prototype.bind,Pf=Function.prototype.call,xh=Object.keys,wh=Object.prototype.propertyIsEnumerable,Ah=function(t,u){return function(i,f){var s,c=arguments[2],p=arguments[3];return i=Object(yh(i)),_h(f),s=xh(i),p&&s.sort(typeof p=="function"?bh.call(p,i):void 0),typeof t!="function"&&(t=s[t]),Pf.call(t,s,function(g,v){return wh.call(i,g)?Pf.call(f,c,i[g],g,i,v):u})}},Lr=Ah("forEach"),nt={},Df={exports:{}},ki,Hf;function Sh(){return Hf||(Hf=1,ki=function(){var t=Object.assign,u;return typeof t!="function"?!1:(u={foo:"raz"},t(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")}),ki}var Vi,qf;function Eh(){return qf||(qf=1,Vi=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Vi}var Zi,Gf;function Rh(){if(Gf)return Zi;Gf=1;var t=Qe,u=Object.keys;return Zi=function(i){return u(t(i)?Object(i):i)},Zi}var Ji,Nf;function Ih(){return Nf||(Nf=1,Ji=Eh()()?Object.keys:Rh()),Ji}var Qi,Yf;function Oh(){if(Yf)return Qi;Yf=1;var t=Ih(),u=yt(),i=Math.max;return Qi=function(f,s){var c,p,g=i(arguments.length,2),v;for(f=Object(u(f)),v=function(d){try{f[d]=s[d]}catch(y){c||(c=y)}},p=1;p-1},au}var su,ta;function Gh(){return ta||(ta=1,su=Hh()()?String.prototype.contains:qh()),su}var ra;function et(){if(ra)return eu.exports;ra=1;var t=Vf(),u=Dh(),i=Xf(),f=Bf,s=Gh(),c=eu.exports=function(p,g){var v,d,y,w,I;return arguments.length<2||typeof p!="string"?(w=g,g=p,p=null):w=arguments[2],t(p)?(v=s.call(p,"c"),d=s.call(p,"e"),y=s.call(p,"w")):(v=y=!0,d=!1),I={value:g,configurable:v,enumerable:d,writable:y},w?i(f(w),I):I};return c.gs=function(p,g,v){var d,y,w,I;return typeof p!="string"?(w=v,v=g,g=p,p=null):w=arguments[3],t(g)?u(g)?t(v)?u(v)||(w=v,v=void 0):v=void 0:(w=g,g=v=void 0):g=void 0,t(p)?(d=s.call(p,"c"),y=s.call(p,"e")):(d=!0,y=!1),I={get:g,set:v,configurable:d,enumerable:y},w?i(f(w),I):I},eu.exports}var lu={exports:{}};(function(t,u){var i=et(),f=De,s=Function.prototype.apply,c=Function.prototype.call,p=Object.create,g=Object.defineProperty,v=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},w,I,B,M,D,E,T;w=function(F,A){var L;return f(A),d.call(this,"__ee__")?L=this.__ee__:(L=y.value=p(null),g(this,"__ee__",y),y.value=null),L[F]?typeof L[F]=="object"?L[F].push(A):L[F]=[L[F],A]:L[F]=A,this},I=function(F,A){var L,H;return f(A),H=this,w.call(this,F,L=function(){B.call(H,F,L),s.call(A,this,arguments)}),L.__eeOnceListener__=A,this},B=function(F,A){var L,H,N,K;if(f(A),!d.call(this,"__ee__"))return this;if(L=this.__ee__,!L[F])return this;if(H=L[F],typeof H=="object")for(K=0;N=H[K];++K)(N===A||N.__eeOnceListener__===A)&&(H.length===2?L[F]=H[K?0:1]:H.splice(K,1));else(H===A||H.__eeOnceListener__===A)&&delete L[F];return this},M=function(F){var A,L,H,N,K;if(d.call(this,"__ee__")&&(N=this.__ee__[F],!!N))if(typeof N=="object"){for(L=arguments.length,K=new Array(L-1),A=1;A=55296&&L<=56319&&(Z+=I[++E])),Z=B?d.call(B,M,Z,T):Z,D?(y.value=Z,w(F,T,y)):F[T]=Z,++T;A=T}}if(A===void 0)for(A=f(I.length),D&&(F=new D(A)),E=0;E=0?y=p(y):y=u(this.length)-p(c(y)),v=y;v"}},ku}var Vu,za;function Lp(){if(za)return Vu;za=1;var t=Mp(),u=/[\n\r\u2028\u2029]/g;return Vu=function(i){var f=t(i);return f.length>100&&(f=f.slice(0,99)+"…"),f=f.replace(u,function(s){return JSON.stringify(s).slice(1,-1)}),f},Vu}var Nr={exports:{}},ka;function Va(){if(ka)return Nr.exports;ka=1,Nr.exports=t,Nr.exports.default=t;function t(u){return!!u&&(typeof u=="object"||typeof u=="function")&&typeof u.then=="function"}return Nr.exports}var Za;function Pp(){if(Za)return Na;Za=1;var t=Ha(),u=Fp(),i=Tp(),f=Lp(),s=Va(),c=Xu(),p=Object.create,g=u("then","then:finally","done","done:finally");return nt.promise=function(v,d){var y=p(null),w=p(null),I=p(null);if(v===!0)v=null;else if(v=i(v),!g[v])throw new TypeError("'"+f(v)+"' is not valid promise mode");d.on("set",function(B,M,D){var E=!1;if(!s(D)){w[B]=D,d.emit("setasync",B,1);return}y[B]=1,I[B]=D;var T=function(H){var N=y[B];if(E)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.`);N&&(delete y[B],w[B]=H,d.emit("setasync",B,N))},F=function(){E=!0,y[B]&&(delete y[B],delete I[B],d.delete(B))},A=v;if(A||(A="then"),A==="then"){var L=function(){c(F)};D=D.then(function(H){c(T.bind(this,H))},L),typeof D.finally=="function"&&D.finally(L)}else if(A==="done"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");D.done(T,F)}else if(A==="done:finally"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof D.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");D.done(T),D.finally(F)}}),d.on("get",function(B,M,D){var E;if(y[B]){++y[B];return}E=I[B];var T=function(){d.emit("getasync",B,M,D)};s(E)?typeof E.done=="function"?E.done(T):E.then(function(){c(T)}):T()}),d.on("delete",function(B){if(delete I[B],y[B]){delete y[B];return}if(hasOwnProperty.call(w,B)){var M=w[B];delete w[B],d.emit("deleteasync",B,[M])}}),d.on("clear",function(){var B=w;w=p(null),y=p(null),I=p(null),d.emit("clearasync",t(B,function(M){return[M]}))})},Na}var Ja={},Qa;function Dp(){if(Qa)return Ja;Qa=1;var t=De,u=Lr,i=nt,f=Function.prototype.apply;return i.dispose=function(s,c,p){var g;if(t(s),p.async&&i.async||p.promise&&i.promise){c.on("deleteasync",g=function(v,d){f.call(s,null,d)}),c.on("clearasync",function(v){u(v,function(d,y){g(y,d)})});return}c.on("delete",g=function(v,d){s(d)}),c.on("clear",function(v){u(v,function(d,y){g(y,d)})})},Ja}var ja={},Zu,ns;function Hp(){return ns||(ns=1,Zu=2147483647),Zu}var Ju,es;function qp(){if(es)return Ju;es=1;var t=je,u=Hp();return Ju=function(i){if(i=t(i),i>u)throw new TypeError(i+" exceeds maximum possible timeout");return i},Ju}var ts;function Gp(){if(ts)return ja;ts=1;var t=Ou(),u=Lr,i=Xu(),f=Va(),s=qp(),c=nt,p=Function.prototype,g=Math.max,v=Math.min,d=Object.create;return c.maxAge=function(y,w,I){var B,M,D,E;y=s(y),y&&(B=d(null),M=I.async&&c.async||I.promise&&c.promise?"async":"",w.on("set"+M,function(T){B[T]=setTimeout(function(){w.delete(T)},y),typeof B[T].unref=="function"&&B[T].unref(),E&&(E[T]&&E[T]!=="nextTick"&&clearTimeout(E[T]),E[T]=setTimeout(function(){delete E[T]},D),typeof E[T].unref=="function"&&E[T].unref())}),w.on("delete"+M,function(T){clearTimeout(B[T]),delete B[T],E&&(E[T]!=="nextTick"&&clearTimeout(E[T]),delete E[T])}),I.preFetch&&(I.preFetch===!0||isNaN(I.preFetch)?D=.333:D=g(v(Number(I.preFetch),1),0),D&&(E={},D=(1-D)*y,w.on("get"+M,function(T,F,A){E[T]||(E[T]="nextTick",i(function(){var L;E[T]==="nextTick"&&(delete E[T],w.delete(T),I.async&&(F=t(F),F.push(p)),L=w.memoized.apply(A,F),I.promise&&f(L)&&(typeof L.done=="function"?L.done(p,p):L.then(p,p)))}))}))),w.on("clear"+M,function(){u(B,function(T){clearTimeout(T)}),B={},E&&(u(E,function(T){T!=="nextTick"&&clearTimeout(T)}),E={})}))},ja}var rs={},Qu,is;function Np(){if(is)return Qu;is=1;var t=je,u=Object.create,i=Object.prototype.hasOwnProperty;return Qu=function(f){var s=0,c=1,p=u(null),g=u(null),v=0,d;return f=t(f),{hit:function(y){var w=g[y],I=++v;if(p[I]=y,g[y]=I,!w)return++s,s<=f?void 0:(y=p[c],d(y),y);if(delete p[w],c===w)for(;!i.call(p,++c););},delete:d=function(y){var w=g[y];if(w&&(delete p[w],delete g[y],--s,c===w)){if(!s){v=0,c=1;return}for(;!i.call(p,++c););}},clear:function(){s=0,c=1,p=u(null),g=u(null),v=0}}},Qu}var us;function Yp(){if(us)return rs;us=1;var t=je,u=Np(),i=nt;return i.max=function(f,s,c){var p,g,v;f=t(f),f&&(g=u(f),p=c.async&&i.async||c.promise&&i.promise?"async":"",s.on("set"+p,v=function(d){d=g.hit(d),d!==void 0&&s.delete(d)}),s.on("get"+p,v),s.on("delete"+p,g.delete),s.on("clear"+p,g.clear))},rs}var os={},fs;function $p(){if(fs)return os;fs=1;var t=et(),u=nt,i=Object.create,f=Object.defineProperties;return u.refCounter=function(s,c,p){var g,v;g=i(null),v=p.async&&u.async||p.promise&&u.promise?"async":"",c.on("set"+v,function(d,y){g[d]=y||1}),c.on("get"+v,function(d){++g[d]}),c.on("delete"+v,function(d){delete g[d]}),c.on("clear"+v,function(){g={}}),f(c.memoized,{deleteRef:t(function(){var d=c.get(arguments);return d===null||!g[d]?null:--g[d]?!1:(c.delete(d),!0)}),getRefCount:t(function(){var d=c.get(arguments);return d===null||!g[d]?0:g[d]})})},os}var Xp=Bf,Wp=Mf,Up=bp,Kp=function(t){var u=Xp(arguments[1]),i;return u.normalizer||(i=u.length=Wp(u.length,t.length,u.async),i!==0&&(u.primitive?i===!1?u.normalizer=xp():i>1&&(u.normalizer=wp()(i)):i===!1?u.normalizer=Rp()():i===1?u.normalizer=Ip()():u.normalizer=Op()(i))),u.async&&Cp(),u.promise&&Pp(),u.dispose&&Dp(),u.maxAge&&Gp(),u.max&&Yp(),u.refCounter&&$p(),Up(t,u)},zp=wn(Kp);function kp(t,u,i,f,s){as(t,u,i||0,f||t.length-1,s||Vp)}function as(t,u,i,f,s){for(;f>i;){if(f-i>600){var c=f-i+1,p=u-i+1,g=Math.log(c),v=.5*Math.exp(2*g/3),d=.5*Math.sqrt(g*v*(c-v)/c)*(p-c/2<0?-1:1),y=Math.max(i,Math.floor(u-p*v/c+d)),w=Math.min(f,Math.floor(u+(c-p)*v/c+d));as(t,u,y,w,s)}var I=t[u],B=i,M=f;for(Zt(t,i,u),s(t[f],I)>0&&Zt(t,i,f);B0;)M--}s(t[i],I)===0?Zt(t,i,M):(M++,Zt(t,M,f)),M<=u&&(i=M+1),u<=M&&(f=M-1)}}function Zt(t,u,i){var f=t[u];t[u]=t[i],t[i]=f}function Vp(t,u){return tu?1:0}class Zp{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let i=this.data;const f=[];if(!$r(u,i))return f;const s=this.toBBox,c=[];for(;i;){for(let p=0;p=0&&c[i].children.length>this._maxEntries;)this._split(c,i),i--;this._adjustParentBBoxes(s,c,i)}_split(u,i){const f=u[i],s=f.children.length,c=this._minEntries;this._chooseSplitAxis(f,c,s);const p=this._chooseSplitIndex(f,c,s),g=xt(f.children.splice(p,f.children.length-p));g.height=f.height,g.leaf=f.leaf,bt(f,this.toBBox),bt(g,this.toBBox),i?u[i-1].children.push(g):this._splitRoot(f,g)}_splitRoot(u,i){this.data=xt([u,i]),this.data.height=u.height+1,this.data.leaf=!1,bt(this.data,this.toBBox)}_chooseSplitIndex(u,i,f){let s,c=1/0,p=1/0;for(let g=i;g<=f-i;g++){const v=Jt(u,0,g,this.toBBox),d=Jt(u,g,f,this.toBBox),y=eg(v,d),w=ju(v)+ju(d);y=i;d--){const y=u.children[d];Qt(g,u.leaf?c(y):y),v+=Yr(g)}return v}_adjustParentBBoxes(u,i,f){for(let s=f;s>=0;s--)Qt(i[s],u)}_condense(u){for(let i=u.length-1,f;i>=0;i--)u[i].children.length===0?i>0?(f=u[i-1].children,f.splice(f.indexOf(u[i]),1)):this.clear():bt(u[i],this.toBBox)}}function Jp(t,u,i){if(!i)return u.indexOf(t);for(let f=0;f=t.minX&&u.maxY>=t.minY}function xt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ss(t,u,i,f,s){const c=[u,i];for(;c.length;){if(i=c.pop(),u=c.pop(),i-u<=f)continue;const p=u+Math.ceil((i-u)/f/2)*f;kp(t,p,u,i,s),c.push(u,p,p,i)}}class tg extends Zp{toBBox(u){return{minX:u.left,minY:u.top,maxX:u.right,maxY:u.bottom}}compareMinX(u,i){return u.left-i.left}compareMinY(u,i){return u.top-i.top}}const rg={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var ls={exports:{}};(function(t){var u=Object.prototype.hasOwnProperty,i="~";function f(){}Object.create&&(f.prototype=Object.create(null),new f().__proto__||(i=!1));function s(v,d,y){this.fn=v,this.context=d,this.once=y||!1}function c(v,d,y,w,I){if(typeof y!="function")throw new TypeError("The listener must be a function");var B=new s(y,w||v,I),M=i?i+d:d;return v._events[M]?v._events[M].fn?v._events[M]=[v._events[M],B]:v._events[M].push(B):(v._events[M]=B,v._eventsCount++),v}function p(v,d){--v._eventsCount===0?v._events=new f:delete v._events[d]}function g(){this._events=new f,this._eventsCount=0}g.prototype.eventNames=function(){var d=[],y,w;if(this._eventsCount===0)return d;for(w in y=this._events)u.call(y,w)&&d.push(i?w.slice(1):w);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},g.prototype.listeners=function(d){var y=i?i+d:d,w=this._events[y];if(!w)return[];if(w.fn)return[w.fn];for(var I=0,B=w.length,M=new Array(B);I=6&&(i-=6),$(i<1?255*((u-t)*i+t):i<3?255*u:i<4?255*((u-t)*(4-i)+t):255*t)},In=function(t,u,i){u/=100;var f=(i/=100)<=.5?i*(u+1):i+u-i*u,s=2*i-f;return{r:io(s,f,(t/=60)+2),g:io(s,f,t),b:io(s,f,t-2)}},uo=function(t,u,i,f){return{r:$(255*(1-t)*(f=1-f)),g:$(255*(1-u)*f),b:$(255*(1-i)*f)}},ps=function(t,u,i){t/=255,u/=255,i/=255;var f=1-Math.max(t,u,i),s=1-f,c=s&&(s-u)/s,p=s&&(s-i)/s;return{c:$(100*(s&&(s-t)/s)),m:$(100*c),y:$(100*p),k:$(100*f)}},At=function(t,u,i,f){f===void 0&&(f=1),t/=255,u/=255,i/=255,f=Math.min(f,1);var s=Math.max(t,u,i),c=Math.min(t,u,i),p=s-c,g=0,v=0,d=(s+c)/2;if(p!==0){switch(s){case t:g=(u-i)/p%6;break;case u:g=(i-t)/p+2;break;case i:g=(t-u)/p+4}(g=$(60*g))<0&&(g+=360),v=p/(1-Math.abs(2*d-1))}return{h:g,s:$(100*v),l:$(100*d),a:f}},gs=function(t,u){if(t<0&&(t+=360),t>360&&(t-=360),t===360||t===0)return t;var i=[[0,120],[120,180],[180,240],[240,360]],f=[[0,60],[60,120],[120,240],[240,360]],s=u?f:i,c=0,p=0,g=0,v=0;return(u?i:f).find(function(d,y){return t>=d[0]&&t360||t<0)&&(t-=360*Math.floor(t/360)),t},Ln=function(t){return typeof t=="string"&&(t=wt.test(t)?Wr(t)/100:+t),isNaN(+t)||t>1?1:$(t)},St=function(t,u,i){return u.reduce(function(f,s){return eo(eo([],f,!0),[en(en({},t),{h:i===qn.ADDITIVE?ir(t.h+s):ir(gs(gs(t.h,!1)+s,!0))})],!1)},[en({},t)])},hg=function(t,u){return St(t,[30,-30],u)},pg=function(t,u){return St(t,[180],u)},gg=function(t,u){return St(t,[150,-150],u)},dg=function(t,u){return St(t,[120,-120],u)},vg=function(t,u){return St(t,[60,-120,180],u)},mg=function(t,u){return St(t,[90,-90,180],u)},Jn=function(t){return typeof t=="string"?function(u){var i;if(Object.keys(z).some(function(f){if(rr[f].test(u))return i=f,!0}),!i&&~cs.indexOf(u)&&(i=z.HEX),!i)throw new Error(lg);return i}(t):function(u){var i,f=!1,s=hs(Object.keys(u));if(to[s]&&(i=to[s]),i&&i===z.RGB){var c=Object.entries(u).some(function(g){return!ro.test("".concat(g[1]))}),p=Object.entries(u).some(function(g){return!(wt.test("".concat(g[1]))||!ro.test("".concat(g[1]))&&!isNaN(+g[1])&&+g[1]<=255)});c&&p&&(f=!0),c||(i=z.HEX)}if(!i||f)throw new Error(cg);return i}(t)},_g=((er={})[z.HEX]=function(t){var u=(~cs.indexOf(t)?Xr[t]:t).match(rr.HEX),i={r:Kr(u[1]||u[5]),g:Kr(u[2]||u[6]),b:Kr(u[3]||u[7])},f=u[4]||u[8];return f!==void 0&&(i.a=Kr(f)/255),i},er[z.RGB]=function(t){var u=t.match(rr.RGB),i=it(u[1]||u[5]),f=it(u[2]||u[6]),s=it(u[3]||u[7]),c=u[4]||u[8],p={r:Math.min(i,255),g:Math.min(f,255),b:Math.min(s,255)};return c!==void 0&&(p.a=Ln(c)),p},er[z.HSL]=function(t){var u=t.match(rr.HSL),i=ir(u[1]||u[5]),f=Ur(u[2]||u[6]),s=Ur(u[3]||u[7]),c=u[4]||u[8],p=In(i,f,s);return c!==void 0&&(p.a=Ln(c)),p},er[z.CMYK]=function(t){var u=t.match(rr.CMYK),i=He(u[1]||u[6]),f=He(u[2]||u[7]),s=He(u[3]||u[8]),c=He(u[4]||u[9]),p=u[5]||u[10],g=uo(i,f,s,c);return p!==void 0&&(g.a=Ln(p)),g},er),yg=((tr={})[z.HEX]=function(t){var u={r:it("".concat(t.r)),g:it("".concat(t.g)),b:it("".concat(t.b))};return Bn(t,"a")&&(u.a=Math.min(it("".concat(t.a),!0),1)),u},tr[z.RGB]=function(t){return this.HEX(t)},tr[z.HSL]=function(t){var u=Ur("".concat(t.s)),i=Ur("".concat(t.l)),f=In(ir(t.h),u,i);return Bn(t,"a")&&(f.a=Ln(t.a)),f},tr[z.CMYK]=function(t){var u=He("".concat(t.c)),i=He("".concat(t.m)),f=He("".concat(t.y)),s=He("".concat(t.k)),c=uo(u,i,f,s);return Bn(t,"a")&&(c.a=Ln(t.a)),c},tr),ut=function(t,u){return u===void 0&&(u=Jn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Ee={})[z.HEX]=function(t){return{r:zr(t.r),g:zr(t.g),b:zr(t.b)}},Ee.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?zr(255*t.a):"0xFF",u},Ee[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Ee.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Ee[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,It(i,u)},Ee.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee[z.CMYK]=function(t,u){return bg(ps(t.r,t.g,t.b),u)},Ee.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Ee),ds=function(t,u,i,f){var s=Jn(t),c=typeof t=="string",p=ut(t,s),g=typeof t=="string"&&Bn(p,"a")||typeof t!="string"&&Bn(t,"a"),v=At(p.r,p.g,p.b,p.a);g||delete v.a;var d=i?v.l/(u+1):(100-v.l)/(u+1),y=Array(u).fill(null).map(function(w,I){return en(en({},v),{l:v.l+d*(I+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var I=In(w.h,w.s,w.l);return g&&(I.a=w.a),c?g?nn.HEX(ot(en(en({},I),{a:$(255*I.a)}),f)):nn.HEX(ot(I,f)):g?tn.HEXA(I):tn.HEX(I)});case z.RGB:return y.map(function(w){var I=In(w.h,w.s,w.l);return g&&(I.a=w.a),c?nn.RGB(ot(I,f)):g?tn.RGBA(I,f):tn.RGB(I,f)});case z.HSL:return y.map(function(w){return c?nn.HSL(It(w,f)):g?tn.HSLA(en(en({},In(w.h,w.s,w.l)),{a:w.a}),f):tn.HSL(In(w.h,w.s,w.l),f)})}},Et=((tt={buildHarmony:function(t,u,i,f){var s=Jn(t),c=ut(t,s),p=At(c.r,c.g,c.b,c.a),g=typeof t=="string"&&Bn(c,"a")||typeof t!="string"&&Bn(t,"a"),v=typeof t=="string";switch(s){case z.HEX:default:return g?this.HEXA(It(p,0),u,i,v):this.HEX(It(p,0),u,i,v);case z.HSL:return g?this.HSLA(p,u,i,v,f):this.HSL(p,u,i,v,f);case z.RGB:return g?this.RGBA(p,u,i,v,f):this.RGB(p,u,i,v,f)}}})[z.HEX]=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(In(s.h,s.s,s.l)):tn.HEX(In(s.h,s.s,s.l))})},tt.HEXA=function(t,u,i,f){return u(t,i).map(function(s){return f?nn.HEX(en(en({},In(s.h,s.s,s.l)),{a:255*Ln(s.a)})):tn.HEXA(en(en({},In(s.h,s.s,s.l)),{a:Ln(s.a)}))})},tt[z.RGB]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(In(c.h,c.s,c.l),s)):tn.RGB(In(c.h,c.s,c.l),s)})},tt.RGBA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.RGB(ot(en(en({},In(c.h,c.s,c.l)),{a:Ln(c.a)}),s)):tn.RGBA(en(en({},In(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt[z.HSL]=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(It({h:c.h,s:c.s,l:c.l},s)):tn.HSL(In(c.h,c.s,c.l),s)})},tt.HSLA=function(t,u,i,f,s){return u(t,i).map(function(c){return f?nn.HSL(It(en(en({},c),{a:Ln(c.a)}),s)):tn.HSLA(en(en({},In(c.h,c.s,c.l)),{a:Ln(c.a)}),s)})},tt),Rt=((rt={mix:function(t,u){var i,f,s,c,p,g,v,d,y,w,I,B,M,D,E,T=t.map(function(H){var N=Jn(H);return ut(H,N)}),F=u===qn.SUBTRACTIVE?T.map(function(H){var N,K,Z,gn,Wn,se,_e,fr,at,ar,sr,le,Gn,Tt,st=(N=H.r,K=H.g,Z=H.b,gn=Math.min(N,K,Z),Wn=Math.min(255-N,255-K,255-Z),se=N-gn,_e=K-gn,fr=Z-gn,at=Math.min(se,_e),ar=se-at,sr=(_e+at)/2,le=(fr+_e-at)/2,Gn=Math.max(ar,sr,le)/Math.max(se,_e,fr),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:ar/Tt+Wn,y:sr/Tt+Wn,b:le/Tt+Wn});return Bn(H,"a")&&(st.a=H.a),st}):null;function A(H){var N=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return H.reduce(function(K,Z){var gn=Bn(Z,"a")?Z.a:1,Wn={r:Math.min(K.r+Z.r*gn,255),b:Math.min(K.b+Z.b*gn,255),a:1-(1-gn)*(1-K.a)},se="g"in K?K.g:K.y,_e="g"in Z?Z.g:Z.y;return en(en({},Wn),u===qn.ADDITIVE?{g:Math.min(se+_e*gn,255)}:{y:Math.min(se+_e*gn,255)})},N)}if(u===qn.ADDITIVE)i=A(T);else{var L=A(F);f=L.r,s=L.y,c=L.b,p=Math.min(f,s,c),g=Math.min(255-f,255-s,255-c),v=f-p,d=s-p,y=c-p,w=Math.min(d,y),I=v+d-w,B=d+w,M=2*(y-w),D=Math.max(I,B,M)/Math.max(v,d,y),E=isNaN(D)||D===1/0||D<=0?1:D,(i={r:I/E+g,g:B/E+g,b:M/E+g}).a=L.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:ae(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?nn.HEX(f):tn.HEX(f)},rt.HEXA=function(t,u,i){var f=this.mix(t,u);return f.a=i?255*Ln(f.a):Ln(f.a),i?nn.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?nn.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?nn.RGB(s):tn.RGBA(s,f)},rt[z.HSL]=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b);return delete s.a,delete c.a,i?nn.HSL(c):tn.HSL(s,f)},rt.HSLA=function(t,u,i,f){var s=this.mix(t,u),c=At(s.r,s.g,s.b,s.a);return i?nn.HSL(c):tn.HSLA(s,f)},rt),ot=function(t,u){return en({r:$(t.r,u),g:$(t.g,u),b:$(t.b,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},It=function(t,u){return en({h:$(t.h,u),s:$(t.s,u),l:$(t.l,u)},Bn(t,"a")?{a:$(t.a,u)}:{})},bg=function(t,u){return{c:$(t.c,u),m:$(t.m,u),y:$(t.y,u),k:$(t.k,u)}},qe=function(t,u,i,f,s,c){var p=s(ut(t,u),f);return i?c(p):p},Ot=function(t,u,i,f,s,c,p){i<1&&(i=5);var g=function(v,d,y){var w=y-1,I=(d.r-v.r)/w,B=(d.g-v.g)/w,M=(d.b-v.b)/w,D=Ln(v.a),E=(Ln(d.a)-D)/w;return Array(y).fill(null).map(function(T,F){return F===0?v:F===w?d:{r:$(v.r+I*F),g:$(v.g+B*F),b:$(v.b+M*F),a:$(D+E*F)}})}(ut(t),ut(u),i);return g.map(function(v){var d=c(v,s);return f?p(d):d})},xg=function(){function t(u,i){i===void 0&&(i=6),this.rgb=ut(u),this._decimals=i,this.updateHSL(),this.updateCMYK()}return t.prototype.updateRGB=function(){this.rgb=en(en({},In(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},t.prototype.updateRGBFromCMYK=function(){this.rgb=en(en({},uo(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},t.prototype.updateHSL=function(){this.hsl=At(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},t.prototype.updateCMYK=function(){this.cmyk=ps(this.rgb.r,this.rgb.g,this.rgb.b)},t.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},t.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},t.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},t.prototype.setDecimals=function(u){return this._decimals=u,this},t.prototype.setH=function(u){return this.hsl.h=ir(u),this.updateRGBAndCMYK()},t.prototype.setS=function(u){return this.hsl.s=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=ae(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=ae(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=ae(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=ae(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=ae(u,0,100),this.updateRGBAndHSL()},Object.defineProperty(t.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"H",{get:function(){return $(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"S",{get:function(){return $(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"L",{get:function(){return $(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R",{get:function(){return $(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"G",{get:function(){return $(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"B",{get:function(){return $(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"A",{get:function(){return $(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"C",{get:function(){return $(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"M",{get:function(){return $(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Y",{get:function(){return $(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"K",{get:function(){return $(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXObject",{get:function(){return tn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXAObject",{get:function(){return tn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBAObject",{get:function(){return en(en({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLAObject",{get:function(){return en(en({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKAObject",{get:function(){return en(en({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEX",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGB",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSL",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYK",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKA",{get:function(){return nn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),t.toHEX=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEX,nn.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Jn(u);return qe(u,f,i,0,tn.HEXA,nn.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGB,nn.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.RGBA,nn.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSL,nn.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.HSLA,nn.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYK,nn.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Jn(u);return qe(u,s,i,f,tn.CMYKA,nn.CMYK)},t.getBlendHEX=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.HEX,nn.HEX)},t.getBlendHEXA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.HEXA,nn.HEX)},t.getBlendRGB=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.RGB,nn.RGB)},t.getBlendRGBA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.RGBA,nn.RGB)},t.getBlendHSL=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.HSL,nn.HSL)},t.getBlendHSLA=function(u,i,f,s,c){return f===void 0&&(f=5),s===void 0&&(s=!0),c===void 0&&(c=6),Ot(u,i,f,s,c,tn.HSLA,nn.HSL)},t.getMixHEX=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEX(u,i,f)},t.getMixHEXA=function(u,i,f){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),Rt.HEXA(u,i,f)},t.getMixRGB=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGB(u,i,f,s)},t.getMixRGBA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.RGBA(u,i,f,s)},t.getMixHSL=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSL(u,i,f,s)},t.getMixHSLA=function(u,i,f,s){return i===void 0&&(i=qn.ADDITIVE),f===void 0&&(f=!0),s===void 0&&(s=6),Rt.HSLA(u,i,f,s)},t.getShades=function(u,i,f){return f===void 0&&(f=6),ds(u,i,!0,f)},t.getTints=function(u,i,f){return f===void 0&&(f=6),ds(u,i,!1,f)},t.getHarmony=function(u,i,f,s){return i===void 0&&(i=Se.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,v){var d;return(d={},d[Se.ANALOGOUS]=Et.buildHarmony(p,hg,v,g),d[Se.COMPLEMENTARY]=Et.buildHarmony(p,pg,v,g),d[Se.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,v,g),d[Se.TRIADIC]=Et.buildHarmony(p,dg,v,g),d[Se.TETRADIC]=Et.buildHarmony(p,vg,v,g),d[Se.SQUARE]=Et.buildHarmony(p,mg,v,g),d)[c]}(i,u,s,f)},t}();const wg={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:On,PI:Ag}=Math,ur=(t,u)=>new xg(t).setA(u??wg.alpha).RGBA,Sg=(t,u)=>ur(t,u);function Ge(t,u){return{width:t.width*u.scale.x,height:t.height*u.scale.y,x:t.x*u.scale.x+u.x,y:t.y*u.scale.y+u.y}}const oo={text:{draw(t,u,i){if(t.text){const f=Ge(t,{x:t.textX,y:t.textY,scale:{x:1,y:1}}),s=Ge(f,i);u.font=`${t.fontSize*i.scale.x}px Arial`,u.fillStyle=ur(t.fontColor,t.alpha),u.fillText(t.text,s.x,s.y)}},test(t){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},path:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.lineCap="round",u.lineJoin="round",u.strokeStyle=Sg(t.fill,t.alpha);const{x:c,y:p,width:g}=Ge({...f,width:t.lineWidth,height:0},i);u.lineWidth=On(g),u.moveTo(On(c),On(p));for(const v of s){const{x:d,y}=Ge({...v,width:0,height:0},i);u.lineTo(On(d),On(y))}u.stroke()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0+t.lineWidth??0}}},rect:{draw(t,u,i){const{x:f,y:s,width:c,height:p}=Ge(t,i);u.fillStyle=ur(t.fill,t.alpha),u.fillRect(On(f),On(s),On(c)||1,On(p)||1)},test(t){return{left:t.x,right:t.x+t.width,top:t.y,bottom:t.y+t.height}}},polygon:{draw(t,u,i){const[f,...s]=t.points;u.beginPath(),u.fillStyle=ur(t.fill,t.alpha);const{x:c,y:p}=Ge({...f,width:0,height:0},i);u.moveTo(On(c),On(p));for(const g of s){const{x:v,y:d}=Ge({...g,width:0,height:0},i);u.lineTo(On(v),On(d))}u.closePath(),u.fill()},test(t){var u,i,f,s;return{left:((u=hn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=hn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=hn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=hn.maxBy(t.points,"y"))==null?void 0:s.y)??0}}},circle:{draw(t,u,i){u.fillStyle=ur(t.fill,t.alpha),u.beginPath();const f=Ge({...t,width:t.radius,height:t.radius},i);u.ellipse(On(f.x),On(f.y),On(f.width),On(f.height),0,0,2*Ag),u.fill()},test(t){return{left:t.x-t.radius,right:t.x+t.radius,top:t.y-t.radius,bottom:t.y+t.radius}}}},Eg=t=>new Error(`The component ${t.$} is not supported by this renderer.`);function vs(t,u,i,f){if(t in oo)oo[t].draw(u,i,f);else throw Eg(u)}const Rg=(t,u,i)=>{vs(t.$,t,u,i),t.text&&vs("text",t,u,i)},Ig=({x:t,y:u})=>{const i=Math.abs(t),f=Math.abs(u),s=Math.max(i,f),c=2*s,p=Math.pow(c-1,2);return t==s&&u>-s?p+u-(-s+1):u==s?p+s-t+c-1:t==-s?p+s-u+2*c-1:u==-s?p+t+s+3*c-1:0},ms=JSON.stringify,{log2:Og,max:Cg}=Math,_s=t=>hn.floor(Og(t+1));function Fg({right:t,left:u,bottom:i,top:f},s){const c=Cg(_s(t-u),_s(i-f))-s,p=2**c,g={left:hn.floor(u/p),right:hn.ceil((t+1)/p),top:hn.floor(f/p),bottom:hn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:hn.shuffle(eh({x:hn.range(g.left,g.right+1),y:hn.range(g.top,g.bottom+1)}).map(v=>{const d=v.x*p,y=v.y*p;return{tile:v,bounds:{left:d-p/2,right:d+p/2,top:y-p/2,bottom:y+p/2}}}))}}const Bg=200;class Tg extends og{constructor(){super(...arguments);fe(this,Zr);fe(this,ft);fe(this,Jr);fe(this,Qr);fe(this,Qn,void 0);fe(this,Ct,void 0);fe(this,Ne,void 0);fe(this,Ye,void 0);fe(this,or,void 0);fe(this,Ft,void 0);fe(this,Bt,void 0);me(this,Qn,rg),me(this,Ct,{bottom:256,top:0,left:0,right:256}),me(this,Ne,new tg(16)),me(this,Ye,{}),me(this,or,0),me(this,Ft,{}),me(this,Bt,hn.once(()=>hn.debounce(()=>this.render(),yn(this,Qn).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=zp((i,f)=>Je(this,Qr,nh).call(this,i,f),{normalizer:JSON.stringify,max:Bg})}getView(){return{system:yn(this,Ne),world:yn(this,Ye)}}setFrustum(i){me(this,Ct,i),yn(this,Bt).call(this)()}setTileResolution(i){hn.isEqual(i,yn(this,Qn).tileResolution)||(Object.assign(yn(this,Qn),{tileResolution:i}),Je(this,ft,Tr).call(this))}add(i,f){const s=hn.map(i,({component:c,meta:p})=>({...oo[c.$].test(c),component:c,meta:hn.pick(p,"sourceLayerIndex","sourceLayerAlpha","sourceLayerDisplayMode"),index:Je(this,Zr,Qc).call(this)}));yn(this,Ne).load(s),yn(this,Ye)[f]=s,Je(this,ft,Tr).call(this)}remove(i){for(const f of yn(this,Ye)[i])yn(this,Ne).remove(f);delete yn(this,Ye)[i],Je(this,ft,Tr).call(this)}setup(i){me(this,Qn,i),Je(this,ft,Tr).call(this)}async render(){for(const{tile:i,bounds:f}of Fg(yn(this,Ct),yn(this,Qn).tileSubdivision).tiles)if(Je(this,Jr,jc).call(this,i)){const s=this.renderTile(f,yn(this,Qn).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}Qn=new WeakMap,Ct=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,or=new WeakMap,Zr=new WeakSet,Qc=function(){return Jc(this,or)._++},Ft=new WeakMap,ft=new WeakSet,Tr=function(){this.renderTile.clear(),yn(this,Bt).call(this)()},Bt=new WeakMap,Jr=new WeakSet,jc=function({x:i,y:f}){const{workerCount:s,workerIndex:c}=yn(this,Qn);return Ig({x:i,y:f})%s===c},Qr=new WeakSet,nh=function(i,f){const{top:s,right:c,bottom:p,left:g}=i,v={x:f.width/(c-g),y:f.height/(p-s)},d=hn.sortBy(yn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=ms(hn.map(d,"index")),w=ms([s,c,p,g]),I=yn(this,Ft)[w];if(!I||y!==I.hash){const B=new OffscreenCanvas(f.width,f.height),M=B.getContext("2d",{alpha:!1});M.imageSmoothingEnabled=!1,M.fillStyle=yn(this,Qn).backgroundColor,M.fillRect(0,0,f.width,f.height);const D=f.width*.05,E=1;M.fillStyle="rgba(127,127,127,0.36)",M.fillRect((f.width-D)/2,(f.height-E)/2,D,E),M.fillRect((f.width-E)/2,(f.height-D)/2,E,D),hn.chain(d).sortBy(F=>{var A;return-(((A=F.meta)==null?void 0:A.sourceLayerIndex)??0)}).groupBy(F=>{var A;return((A=F.meta)==null?void 0:A.sourceLayerIndex)??0}).forEach(F=>{var K,Z,gn,Wn;const A=new OffscreenCanvas(f.width,f.height),L=A.getContext("2d");for(const{component:se}of F)Rg(se,L,{scale:v,x:-g*v.x,y:-s*v.y});const H=((Z=(K=hn.head(F))==null?void 0:K.meta)==null?void 0:Z.sourceLayerAlpha)??1,N=((Wn=(gn=hn.head(F))==null?void 0:gn.meta)==null?void 0:Wn.sourceLayerDisplayMode)??"source-over";M.globalCompositeOperation=N,M.globalAlpha=H,M.drawImage(A,0,0)}).value();const T=B.transferToImageBitmap();return yn(this,Ft)[w]={hash:y,tile:T},T}else return I.tile};const ys=new Tg;ys.on("message",(t,u)=>self.postMessage(t,u)),self.onmessage=t=>{const{action:u,payload:i}=t.data;ys[u](...i)}})(); diff --git a/assets/index-4b4f04ba.js b/assets/index-d21fd498.js similarity index 71% rename from assets/index-4b4f04ba.js rename to assets/index-d21fd498.js index 6c93d545..202b0bfe 100644 --- a/assets/index-4b4f04ba.js +++ b/assets/index-d21fd498.js @@ -1,4 +1,4 @@ -var wie=Object.defineProperty;var _ie=(e,t,n)=>t in e?wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vp=(e,t,n)=>(_ie(e,typeof t!="symbol"?t+"":t,n),n),mD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ze=(e,t,n)=>(mD(e,t,"read from private field"),n?n.call(e):t.get(e)),Zn=(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)},Jc=(e,t,n,r)=>(mD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Jj=(e,t,n,r)=>({set _(i){Jc(e,t,i,n)},get _(){return Ze(e,t,r)}}),Mi=(e,t,n)=>(mD(e,t,"access private method"),n);function Sie(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 Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sq(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 aq={exports:{}},YC={},lq={exports:{}},un={};/** +var _ie=Object.defineProperty;var Sie=(e,t,n)=>t in e?_ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vp=(e,t,n)=>(Sie(e,typeof t!="symbol"?t+"":t,n),n),pD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ze=(e,t,n)=>(pD(e,t,"read from private field"),n?n.call(e):t.get(e)),Zn=(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)},Jc=(e,t,n,r)=>(pD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Qj=(e,t,n,r)=>({set _(i){Jc(e,t,i,n)},get _(){return Ze(e,t,r)}}),Di=(e,t,n)=>(pD(e,t,"access private method"),n);function Eie(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 Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oq(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 sq={exports:{}},XC={},aq={exports:{}},un={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var wie=Object.defineProperty;var _ie=(e,t,n)=>t in e?wie(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 F1=Symbol.for("react.element"),Eie=Symbol.for("react.portal"),Cie=Symbol.for("react.fragment"),Tie=Symbol.for("react.strict_mode"),kie=Symbol.for("react.profiler"),Aie=Symbol.for("react.provider"),Rie=Symbol.for("react.context"),Iie=Symbol.for("react.forward_ref"),Pie=Symbol.for("react.suspense"),Oie=Symbol.for("react.memo"),Mie=Symbol.for("react.lazy"),Zj=Symbol.iterator;function Die(e){return e===null||typeof e!="object"?null:(e=Zj&&e[Zj]||e["@@iterator"],typeof e=="function"?e:null)}var cq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uq=Object.assign,dq={};function Vg(e,t,n){this.props=e,this.context=t,this.refs=dq,this.updater=n||cq}Vg.prototype.isReactComponent={};Vg.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")};Vg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fq(){}fq.prototype=Vg.prototype;function h5(e,t,n){this.props=e,this.context=t,this.refs=dq,this.updater=n||cq}var p5=h5.prototype=new fq;p5.constructor=h5;uq(p5,Vg.prototype);p5.isPureReactComponent=!0;var e6=Array.isArray,hq=Object.prototype.hasOwnProperty,m5={current:null},pq={key:!0,ref:!0,__self:!0,__source:!0};function mq(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)hq.call(t,r)&&!pq.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1t in e?wie(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 Fie=I,zie=Symbol.for("react.element"),jie=Symbol.for("react.fragment"),Uie=Object.prototype.hasOwnProperty,Hie=Fie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wie={key:!0,ref:!0,__self:!0,__source:!0};function gq(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)Uie.call(t,r)&&!Wie.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:zie,type:e,key:o,ref:s,props:i,_owner:Hie.current}}YC.Fragment=jie;YC.jsx=gq;YC.jsxs=gq;aq.exports=YC;var C=aq.exports;const Gie={black:"#000",white:"#fff"},dg=Gie,Vie={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"},Xu=Vie,qie={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"},vq=qie,Xie={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"},Ih=Xie,Yie={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"},yq=Yie,Kie={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"},Qie=Kie,Jie={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"},Yu=Jie,Zie={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"},Ph=Zie,eoe={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"},toe=eoe,noe={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"},roe=noe,ioe={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"},Ku=ioe,ooe={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"},soe=ooe,aoe={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"},loe=aoe,coe={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"},bq=coe,uoe={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"},doe=uoe,foe={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"},Hh=foe,hoe={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"},poe=hoe,moe={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"},goe=moe,voe={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"},v5=voe,yoe={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"},boe=yoe,xq=Object.freeze(Object.defineProperty({__proto__:null,amber:doe,blue:Yu,blueGrey:boe,brown:goe,common:dg,cyan:toe,deepOrange:poe,deepPurple:yq,green:Ku,grey:v5,indigo:Qie,lightBlue:Ph,lightGreen:soe,lime:loe,orange:Hh,pink:vq,purple:Ih,red:Xu,teal:roe,yellow:bq},Symbol.toStringTag,{value:"Module"}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=wq(e[n])}),t}function Ho(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return Wh(e)&&Wh(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Wh(t[i])&&i in e&&Wh(e[i])?r[i]=Ho(e[i],t[i],n):n.clone?r[i]=Wh(t[i])?wq(t[i]):t[i]:r[i]=t[i])}),r}var _q={exports:{}},xoe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",woe=xoe,_oe=woe;function Sq(){}function Eq(){}Eq.resetWarningCache=Sq;var Soe=function(){function e(r,i,o,s,l,c){if(c!==_oe){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Eq,resetWarningCache:Sq};return n.PropTypes=n,n};_q.exports=Soe();var qg=_q.exports;const Y0=js(qg);function Md(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 KC(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 I.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 Ar(e){return e&&e.ownerDocument||document}function bu(e){return Ar(e).defaultView||window}function n$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Eoe=typeof window<"u"?I.useLayoutEffect:I.useEffect,Io=Eoe;let r6=0;function Coe(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(r6+=1,n(`mui-${r6}`))},[t]),r}const i6=eE["useId".toString()];function y5(e){if(i6!==void 0){const t=i6();return e??t}return Coe(e)}function Ox({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=I.useRef(e!==void 0),[o,s]=I.useState(t),l=i?e:o,c=I.useCallback(d=>{i||s(d)},[]);return[l,c]}function eo(e){const t=I.useRef(e);return Io(()=>{t.current=e}),I.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return I.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{n$(n,t)})},e)}let QC=!0,r$=!1,o6;const Toe={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 koe(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Toe[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Aoe(e){e.metaKey||e.altKey||e.ctrlKey||(QC=!0)}function vD(){QC=!1}function Roe(){this.visibilityState==="hidden"&&r$&&(QC=!0)}function Ioe(e){e.addEventListener("keydown",Aoe,!0),e.addEventListener("mousedown",vD,!0),e.addEventListener("pointerdown",vD,!0),e.addEventListener("touchstart",vD,!0),e.addEventListener("visibilitychange",Roe,!0)}function Poe(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return QC||koe(t)}function b5(){const e=I.useCallback(i=>{i!=null&&Ioe(i.ownerDocument)},[]),t=I.useRef(!1);function n(){return t.current?(r$=!0,window.clearTimeout(o6),o6=window.setTimeout(()=>{r$=!1},100),t.current=!1,!0):!1}function r(i){return Poe(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Cq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let qp;function Tq(){if(qp)return qp;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),qp="reverse",e.scrollLeft>0?qp="default":(e.scrollLeft=1,e.scrollLeft===0&&(qp="negative")),document.body.removeChild(e),qp}function Ooe(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(Tq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Moe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Doe=Moe;function x5(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]=x5(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Et(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const s6=e=>e,Loe=()=>{let e=s6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=s6}}},Noe=Loe(),kq=Noe,Boe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=Boe[t];return r?`${n}-${r}`:`${kq.generate(e)}-${t}`}function Ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const dp="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Aq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $oe=/^((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)-.*))$/,Foe=Aq(function(e){return $oe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function zoe(e){if(e.sheet)return e.sheet;for(var t=0;t0?$i(Xg,--Yo):0,fg--,Vr===10&&(fg=1,ZC--),Vr}function Rs(){return Vr=Yo2||Dx(Vr)>3?"":" "}function Zoe(e,t){for(;--t&&Rs()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return z1(e,pS()+(t<6&&Bl()==32&&Rs()==32))}function o$(e){for(;Rs();)switch(Vr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&o$(Vr);break;case 40:e===41&&o$(e);break;case 92:Rs();break}return Yo}function ese(e,t){for(;Rs()&&e+Vr!==47+10;)if(e+Vr===42+42&&Bl()===47)break;return"/*"+z1(t,Yo-1)+"*"+JC(e===47?e:Rs())}function tse(e){for(;!Dx(Bl());)Rs();return z1(e,Yo)}function nse(e){return Dq(gS("",null,null,null,[""],e=Mq(e),0,[0],e))}function gS(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,A=o,R=r,k=x;S;)switch(v=b,b=Rs()){case 40:if(v!=108&&$i(k,h-1)==58){i$(k+=Rn(mS(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=mS(b);break;case 9:case 10:case 13:case 32:k+=Joe(v);break;case 92:k+=Zoe(pS()-1,7);continue;case 47:switch(Bl()){case 42:case 47:Aw(rse(ese(Rs(),pS()),t,n),c);break;default:k+="/"}break;case 123*y:l[d++]=Al(k)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(k=Rn(k,/\f/g,"")),g>0&&Al(k)-h&&Aw(g>32?l6(k+";",r,n,h-1):l6(Rn(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Aw(R=a6(k,t,n,d,f,i,l,x,E=[],A=[],h),o),b===123)if(f===0)gS(k,t,R,R,E,o,h,l,A);else switch(p===99&&$i(k,3)===110?100:p){case 100:case 108:case 109:case 115:gS(e,R,R,r&&Aw(a6(e,R,R,0,0,i,l,x,i,E=[],h),A),i,A,h,l,r?E:A);break;default:gS(k,R,R,R,[""],A,0,l,A)}}d=f=g=0,y=_=1,x=k="",h=s;break;case 58:h=1+Al(k),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Qoe()==125)continue}switch(k+=JC(b),b*y){case 38:_=f>0?1:(k+="\f",-1);break;case 44:l[d++]=(Al(k)-1)*_,_=1;break;case 64:Bl()===45&&(k+=mS(Rs())),p=Bl(),f=h=Al(x=k+=tse(pS())),b++;break;case 45:v===45&&Al(k)==2&&(y=0)}}return o}function a6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=S5(p),v=0,y=0,S=0;v0?p[_]+" "+b:Rn(b,/&\f/g,p[_])))&&(c[S++]=x);return eT(e,t,n,i===0?w5:l,c,d,f)}function rse(e,t,n){return eT(e,t,n,Rq,JC(Koe()),Mx(e,2,-2),0)}function l6(e,t,n,r){return eT(e,t,n,_5,Mx(e,0,r),Mx(e,r+1,-1),r)}function Hm(e,t){for(var n="",r=S5(e),i=0;i6)switch($i(e,t+1)){case 109:if($i(e,t+4)!==45)break;case 102:return Rn(e,/(.+:)(.+)-([^]+)/,"$1"+An+"$2-$3$1"+tE+($i(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i$(e,"stretch")?Lq(Rn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($i(e,t+1)!==115)break;case 6444:switch($i(e,Al(e)-3-(~i$(e,"!important")&&10))){case 107:return Rn(e,":",":"+An)+e;case 101:return Rn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+An+($i(e,14)===45?"inline-":"")+"box$3$1"+An+"$2$3$1"+Yi+"$2box$3")+e}break;case 5936:switch($i(e,t+11)){case 114:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return An+e+Yi+Rn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return An+e+Yi+e+e}return e}var fse=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case _5:t.return=Lq(t.value,t.length);break;case Iq:return Hm([K0(t,{value:Rn(t.value,"@","@"+An)})],i);case w5:if(t.length)return Yoe(t.props,function(o){switch(Xoe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hm([K0(t,{props:[Rn(o,/:(read-\w+)/,":"+tE+"$1")]})],i);case"::placeholder":return Hm([K0(t,{props:[Rn(o,/:(plac\w+)/,":"+An+"input-$1")]}),K0(t,{props:[Rn(o,/:(plac\w+)/,":"+tE+"$1")]}),K0(t,{props:[Rn(o,/:(plac\w+)/,Yi+"input-$1")]})],i)}return""})}},hse=[fse],pse=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||hse,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_{t[n]=xq(e[n])}),t}function Ho(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return Wh(e)&&Wh(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Wh(t[i])&&i in e&&Wh(e[i])?r[i]=Ho(e[i],t[i],n):n.clone?r[i]=Wh(t[i])?xq(t[i]):t[i]:r[i]=t[i])}),r}var wq={exports:{}},woe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_oe=woe,Soe=_oe;function _q(){}function Sq(){}Sq.resetWarningCache=_q;var Eoe=function(){function e(r,i,o,s,l,c){if(c!==Soe){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Sq,resetWarningCache:_q};return n.PropTypes=n,n};wq.exports=Eoe();var qg=wq.exports;const Y0=js(qg);function Md(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 YC(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 I.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 Ar(e){return e&&e.ownerDocument||document}function bu(e){return Ar(e).defaultView||window}function n$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Coe=typeof window<"u"?I.useLayoutEffect:I.useEffect,Io=Coe;let n6=0;function Toe(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(n6+=1,n(`mui-${n6}`))},[t]),r}const r6=ZS["useId".toString()];function v5(e){if(r6!==void 0){const t=r6();return e??t}return Toe(e)}function Ox({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=I.useRef(e!==void 0),[o,s]=I.useState(t),l=i?e:o,c=I.useCallback(d=>{i||s(d)},[]);return[l,c]}function eo(e){const t=I.useRef(e);return Io(()=>{t.current=e}),I.useCallback((...n)=>(0,t.current)(...n),[])}function mr(...e){return I.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{n$(n,t)})},e)}let KC=!0,r$=!1,i6;const koe={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 Aoe(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&koe[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Roe(e){e.metaKey||e.altKey||e.ctrlKey||(KC=!0)}function gD(){KC=!1}function Ioe(){this.visibilityState==="hidden"&&r$&&(KC=!0)}function Poe(e){e.addEventListener("keydown",Roe,!0),e.addEventListener("mousedown",gD,!0),e.addEventListener("pointerdown",gD,!0),e.addEventListener("touchstart",gD,!0),e.addEventListener("visibilitychange",Ioe,!0)}function Ooe(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return KC||Aoe(t)}function y5(){const e=I.useCallback(i=>{i!=null&&Poe(i.ownerDocument)},[]),t=I.useRef(!1);function n(){return t.current?(r$=!0,window.clearTimeout(i6),i6=window.setTimeout(()=>{r$=!1},100),t.current=!1,!0):!1}function r(i){return Ooe(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Eq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let qp;function Cq(){if(qp)return qp;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),qp="reverse",e.scrollLeft>0?qp="default":(e.scrollLeft=1,e.scrollLeft===0&&(qp="negative")),document.body.removeChild(e),qp}function Moe(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(Cq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Doe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Loe=Doe;function b5(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]=b5(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Et(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const o6=e=>e,Noe=()=>{let e=o6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=o6}}},Boe=Noe(),Tq=Boe,$oe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=$oe[t];return r?`${n}-${r}`:`${Tq.generate(e)}-${t}`}function Ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=_t(e,i,n)}),r}const dp="$$material";function Le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function kq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Foe=/^((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)-.*))$/,zoe=kq(function(e){return Foe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function joe(e){if(e.sheet)return e.sheet;for(var t=0;t0?Fi(Xg,--Yo):0,fg--,Vr===10&&(fg=1,JC--),Vr}function Rs(){return Vr=Yo2||Dx(Vr)>3?"":" "}function ese(e,t){for(;--t&&Rs()&&!(Vr<48||Vr>102||Vr>57&&Vr<65||Vr>70&&Vr<97););return z1(e,pS()+(t<6&&Fl()==32&&Rs()==32))}function o$(e){for(;Rs();)switch(Vr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&o$(Vr);break;case 40:e===41&&o$(e);break;case 92:Rs();break}return Yo}function tse(e,t){for(;Rs()&&e+Vr!==47+10;)if(e+Vr===42+42&&Fl()===47)break;return"/*"+z1(t,Yo-1)+"*"+QC(e===47?e:Rs())}function nse(e){for(;!Dx(Fl());)Rs();return z1(e,Yo)}function rse(e){return Mq(gS("",null,null,null,[""],e=Oq(e),0,[0],e))}function gS(e,t,n,r,i,o,s,l,c){for(var d=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,_=1,b=0,x="",E=i,A=o,R=r,k=x;S;)switch(v=b,b=Rs()){case 40:if(v!=108&&Fi(k,h-1)==58){i$(k+=In(mS(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=mS(b);break;case 9:case 10:case 13:case 32:k+=Zoe(v);break;case 92:k+=ese(pS()-1,7);continue;case 47:switch(Fl()){case 42:case 47:Aw(ise(tse(Rs(),pS()),t,n),c);break;default:k+="/"}break;case 123*y:l[d++]=Il(k)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(k=In(k,/\f/g,"")),g>0&&Il(k)-h&&Aw(g>32?a6(k+";",r,n,h-1):a6(In(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Aw(R=s6(k,t,n,d,f,i,l,x,E=[],A=[],h),o),b===123)if(f===0)gS(k,t,R,R,E,o,h,l,A);else switch(p===99&&Fi(k,3)===110?100:p){case 100:case 108:case 109:case 115:gS(e,R,R,r&&Aw(s6(e,R,R,0,0,i,l,x,i,E=[],h),A),i,A,h,l,r?E:A);break;default:gS(k,R,R,R,[""],A,0,l,A)}}d=f=g=0,y=_=1,x=k="",h=s;break;case 58:h=1+Il(k),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Joe()==125)continue}switch(k+=QC(b),b*y){case 38:_=f>0?1:(k+="\f",-1);break;case 44:l[d++]=(Il(k)-1)*_,_=1;break;case 64:Fl()===45&&(k+=mS(Rs())),p=Fl(),f=h=Il(x=k+=nse(pS())),b++;break;case 45:v===45&&Il(k)==2&&(y=0)}}return o}function s6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=_5(p),v=0,y=0,S=0;v0?p[_]+" "+b:In(b,/&\f/g,p[_])))&&(c[S++]=x);return ZC(e,t,n,i===0?x5:l,c,d,f)}function ise(e,t,n){return ZC(e,t,n,Aq,QC(Qoe()),Mx(e,2,-2),0)}function a6(e,t,n,r){return ZC(e,t,n,w5,Mx(e,0,r),Mx(e,r+1,-1),r)}function Hm(e,t){for(var n="",r=_5(e),i=0;i6)switch(Fi(e,t+1)){case 109:if(Fi(e,t+4)!==45)break;case 102:return In(e,/(.+:)(.+)-([^]+)/,"$1"+Rn+"$2-$3$1"+eE+(Fi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i$(e,"stretch")?Dq(In(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Fi(e,t+1)!==115)break;case 6444:switch(Fi(e,Il(e)-3-(~i$(e,"!important")&&10))){case 107:return In(e,":",":"+Rn)+e;case 101:return In(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Rn+(Fi(e,14)===45?"inline-":"")+"box$3$1"+Rn+"$2$3$1"+Yi+"$2box$3")+e}break;case 5936:switch(Fi(e,t+11)){case 114:return Rn+e+Yi+In(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Rn+e+Yi+In(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Rn+e+Yi+In(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Rn+e+Yi+e+e}return e}var hse=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case w5:t.return=Dq(t.value,t.length);break;case Rq:return Hm([K0(t,{value:In(t.value,"@","@"+Rn)})],i);case x5:if(t.length)return Koe(t.props,function(o){switch(Yoe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hm([K0(t,{props:[In(o,/:(read-\w+)/,":"+eE+"$1")]})],i);case"::placeholder":return Hm([K0(t,{props:[In(o,/:(plac\w+)/,":"+Rn+"input-$1")]}),K0(t,{props:[In(o,/:(plac\w+)/,":"+eE+"$1")]}),K0(t,{props:[In(o,/:(plac\w+)/,Yi+"input-$1")]})],i)}return""})}},pse=[hse],mse=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||pse,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),_=1;_=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ose={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},Mse=/[A-Z]|^ms/g,Dse=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Uq=function(t){return t.charCodeAt(1)===45},p6=function(t){return t!=null&&typeof t!="boolean"},yD=Aq(function(e){return Uq(e)?e:e.replace(Mse,"-$&").toLowerCase()}),m6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Dse,function(r,i,o){return Rl={name:i,styles:o,next:Rl},i})}return Ose[t]!==1&&!Uq(t)&&typeof n=="number"&&n!==0?n+"px":n};function Lx(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 Rl={name:n.name,styles:n.styles,next:Rl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Rl={name:r.name,styles:r.styles,next:Rl},r=r.next;var i=n.styles+";";return i}return Lse(e,t,n)}case"function":{if(e!==void 0){var o=Rl,s=n(e);return Rl=o,Lx(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function Lse(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Fse:zse},b6=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},jse=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return zq(n,r,i),Bse(function(){return jq(n,r,i)}),null},Use=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=b6(t,n,r),c=l||y6(i),d=!c("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var p=f.length,g=1;gt(Wse(i)?n:i):t;return C.jsx($se,{styles:r})}/** + */var Si=typeof Symbol=="function"&&Symbol.for,S5=Si?Symbol.for("react.element"):60103,E5=Si?Symbol.for("react.portal"):60106,eT=Si?Symbol.for("react.fragment"):60107,tT=Si?Symbol.for("react.strict_mode"):60108,nT=Si?Symbol.for("react.profiler"):60114,rT=Si?Symbol.for("react.provider"):60109,iT=Si?Symbol.for("react.context"):60110,C5=Si?Symbol.for("react.async_mode"):60111,oT=Si?Symbol.for("react.concurrent_mode"):60111,sT=Si?Symbol.for("react.forward_ref"):60112,aT=Si?Symbol.for("react.suspense"):60113,gse=Si?Symbol.for("react.suspense_list"):60120,lT=Si?Symbol.for("react.memo"):60115,cT=Si?Symbol.for("react.lazy"):60116,vse=Si?Symbol.for("react.block"):60121,yse=Si?Symbol.for("react.fundamental"):60117,bse=Si?Symbol.for("react.responder"):60118,xse=Si?Symbol.for("react.scope"):60119;function Us(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case S5:switch(e=e.type,e){case C5:case oT:case eT:case nT:case tT:case aT:return e;default:switch(e=e&&e.$$typeof,e){case iT:case sT:case cT:case lT:case rT:return e;default:return t}}case E5:return t}}}function Nq(e){return Us(e)===oT}Bn.AsyncMode=C5;Bn.ConcurrentMode=oT;Bn.ContextConsumer=iT;Bn.ContextProvider=rT;Bn.Element=S5;Bn.ForwardRef=sT;Bn.Fragment=eT;Bn.Lazy=cT;Bn.Memo=lT;Bn.Portal=E5;Bn.Profiler=nT;Bn.StrictMode=tT;Bn.Suspense=aT;Bn.isAsyncMode=function(e){return Nq(e)||Us(e)===C5};Bn.isConcurrentMode=Nq;Bn.isContextConsumer=function(e){return Us(e)===iT};Bn.isContextProvider=function(e){return Us(e)===rT};Bn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===S5};Bn.isForwardRef=function(e){return Us(e)===sT};Bn.isFragment=function(e){return Us(e)===eT};Bn.isLazy=function(e){return Us(e)===cT};Bn.isMemo=function(e){return Us(e)===lT};Bn.isPortal=function(e){return Us(e)===E5};Bn.isProfiler=function(e){return Us(e)===nT};Bn.isStrictMode=function(e){return Us(e)===tT};Bn.isSuspense=function(e){return Us(e)===aT};Bn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===eT||e===oT||e===nT||e===tT||e===aT||e===gse||typeof e=="object"&&e!==null&&(e.$$typeof===cT||e.$$typeof===lT||e.$$typeof===rT||e.$$typeof===iT||e.$$typeof===sT||e.$$typeof===yse||e.$$typeof===bse||e.$$typeof===xse||e.$$typeof===vse)};Bn.typeOf=Us;Lq.exports=Bn;var wse=Lq.exports,T5=wse,_se={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Sse={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ese={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bq={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},k5={};k5[T5.ForwardRef]=Ese;k5[T5.Memo]=Bq;function c6(e){return T5.isMemo(e)?Bq:k5[e.$$typeof]||_se}var Cse=Object.defineProperty,Tse=Object.getOwnPropertyNames,u6=Object.getOwnPropertySymbols,kse=Object.getOwnPropertyDescriptor,Ase=Object.getPrototypeOf,d6=Object.prototype;function $q(e,t,n){if(typeof t!="string"){if(d6){var r=Ase(t);r&&r!==d6&&$q(e,r,n)}var i=Tse(t);u6&&(i=i.concat(u6(t)));for(var o=c6(e),s=c6(t),l=0;l=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Mse={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},Dse=/[A-Z]|^ms/g,Lse=/_EMO_([^_]+?)_([^]*?)_EMO_/g,jq=function(t){return t.charCodeAt(1)===45},h6=function(t){return t!=null&&typeof t!="boolean"},vD=kq(function(e){return jq(e)?e:e.replace(Dse,"-$&").toLowerCase()}),p6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Lse,function(r,i,o){return Pl={name:i,styles:o,next:Pl},i})}return Mse[t]!==1&&!jq(t)&&typeof n=="number"&&n!==0?n+"px":n};function Lx(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 Pl={name:n.name,styles:n.styles,next:Pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Pl={name:r.name,styles:r.styles,next:Pl},r=r.next;var i=n.styles+";";return i}return Nse(e,t,n)}case"function":{if(e!==void 0){var o=Pl,s=n(e);return Pl=o,Lx(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function Nse(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?zse:jse},y6=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},Use=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Fq(n,r,i),$se(function(){return zq(n,r,i)}),null},Hse=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=y6(t,n,r),c=l||v6(i),d=!c("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var p=f.length,g=1;gt(Gse(i)?n:i):t;return C.jsx(Fse,{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 Vq(e,t){return s$(e,t)}const Vse=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},qse=["values","unit","step"],Xse=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 Yse(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,qse),o=Xse(t),s=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function d(p,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function f(p){return s.indexOf(p)+1`@media (min-width:${I5[e]}px)`};function dl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||x6;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||x6;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||I5).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function qq(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function Xq(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Jse(e,...t){const n=qq(e),r=[n,...t].reduce((i,o)=>Ho(i,o),{});return Xq(Object.keys(n),r)}function Zse(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 bD({values:e,breakpoints:t,base:n}){const r=n||Zse(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[o],o=l):s[l]=e,s),{})}function fT(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=fT(e,n)||r,t&&(i=t(i,r,e)),i}function Pn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,d=fT(c,r)||{};return dl(s,l,h=>{let p=nE(d,i,h);return h===p&&typeof h=="string"&&(p=nE(d,i,`${t}${h==="default"?"":Me(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function eae(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const tae={m:"margin",p:"padding"},nae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},w6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},rae=eae(e=>{if(e.length>2)if(w6[e])e=w6[e];else return[e];const[t,n]=e.split(""),r=tae[t],i=nae[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),P5=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],O5=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...P5,...O5];function j1(e,t,n,r){var i;const o=(i=fT(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 M5(e){return j1(e,"spacing",8)}function fp(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 iae(e,t){return n=>e.reduce((r,i)=>(r[i]=fp(t,n),r),{})}function oae(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=rae(n),o=iae(i,r),s=e[n];return dl(e,s,o)}function Yq(e,t){const n=M5(e.theme);return Object.keys(e).map(r=>oae(e,t,r,n)).reduce(tx,{})}function Dr(e){return Yq(e,P5)}Dr.propTypes={};Dr.filterProps=P5;function Lr(e){return Yq(e,O5)}Lr.propTypes={};Lr.filterProps=O5;function sae(e=8){if(e.mui)return e;const t=M5({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 hT(...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]?tx(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ol(e){return typeof e!="number"?e:`${e}px solid`}const aae=Pn({prop:"border",themeKey:"borders",transform:Ol}),lae=Pn({prop:"borderTop",themeKey:"borders",transform:Ol}),cae=Pn({prop:"borderRight",themeKey:"borders",transform:Ol}),uae=Pn({prop:"borderBottom",themeKey:"borders",transform:Ol}),dae=Pn({prop:"borderLeft",themeKey:"borders",transform:Ol}),fae=Pn({prop:"borderColor",themeKey:"palette"}),hae=Pn({prop:"borderTopColor",themeKey:"palette"}),pae=Pn({prop:"borderRightColor",themeKey:"palette"}),mae=Pn({prop:"borderBottomColor",themeKey:"palette"}),gae=Pn({prop:"borderLeftColor",themeKey:"palette"}),pT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=j1(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:fp(t,r)});return dl(e,e.borderRadius,n)}return null};pT.propTypes={};pT.filterProps=["borderRadius"];hT(aae,lae,cae,uae,dae,fae,hae,pae,mae,gae,pT);const mT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=j1(e.theme,"spacing",8),n=r=>({gap:fp(t,r)});return dl(e,e.gap,n)}return null};mT.propTypes={};mT.filterProps=["gap"];const gT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=j1(e.theme,"spacing",8),n=r=>({columnGap:fp(t,r)});return dl(e,e.columnGap,n)}return null};gT.propTypes={};gT.filterProps=["columnGap"];const vT=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=j1(e.theme,"spacing",8),n=r=>({rowGap:fp(t,r)});return dl(e,e.rowGap,n)}return null};vT.propTypes={};vT.filterProps=["rowGap"];const vae=Pn({prop:"gridColumn"}),yae=Pn({prop:"gridRow"}),bae=Pn({prop:"gridAutoFlow"}),xae=Pn({prop:"gridAutoColumns"}),wae=Pn({prop:"gridAutoRows"}),_ae=Pn({prop:"gridTemplateColumns"}),Sae=Pn({prop:"gridTemplateRows"}),Eae=Pn({prop:"gridTemplateAreas"}),Cae=Pn({prop:"gridArea"});hT(mT,gT,vT,vae,yae,bae,xae,wae,_ae,Sae,Eae,Cae);function Wm(e,t){return t==="grey"?t:e}const Tae=Pn({prop:"color",themeKey:"palette",transform:Wm}),kae=Pn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wm}),Aae=Pn({prop:"backgroundColor",themeKey:"palette",transform:Wm});hT(Tae,kae,Aae);function Ss(e){return e<=1&&e!==0?`${e*100}%`:e}const Rae=Pn({prop:"width",transform:Ss}),D5=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])||I5[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:Ss(n)}};return dl(e,e.maxWidth,t)}return null};D5.filterProps=["maxWidth"];const Iae=Pn({prop:"minWidth",transform:Ss}),Pae=Pn({prop:"height",transform:Ss}),Oae=Pn({prop:"maxHeight",transform:Ss}),Mae=Pn({prop:"minHeight",transform:Ss});Pn({prop:"size",cssProperty:"width",transform:Ss});Pn({prop:"size",cssProperty:"height",transform:Ss});const Dae=Pn({prop:"boxSizing"});hT(Rae,D5,Iae,Pae,Oae,Mae,Dae);const Lae={border:{themeKey:"borders",transform:Ol},borderTop:{themeKey:"borders",transform:Ol},borderRight:{themeKey:"borders",transform:Ol},borderBottom:{themeKey:"borders",transform:Ol},borderLeft:{themeKey:"borders",transform:Ol},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pT},color:{themeKey:"palette",transform:Wm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wm},backgroundColor:{themeKey:"palette",transform:Wm},p:{style:Lr},pt:{style:Lr},pr:{style:Lr},pb:{style:Lr},pl:{style:Lr},px:{style:Lr},py:{style:Lr},padding:{style:Lr},paddingTop:{style:Lr},paddingRight:{style:Lr},paddingBottom:{style:Lr},paddingLeft:{style:Lr},paddingX:{style:Lr},paddingY:{style:Lr},paddingInline:{style:Lr},paddingInlineStart:{style:Lr},paddingInlineEnd:{style:Lr},paddingBlock:{style:Lr},paddingBlockStart:{style:Lr},paddingBlockEnd:{style:Lr},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:mT},rowGap:{style:vT},columnGap:{style:gT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ss},maxWidth:{style:D5},minWidth:{transform:Ss},height:{transform:Ss},maxHeight:{transform:Ss},minHeight:{transform:Ss},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},yT=Lae;function Nae(...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 Bae(e,t){return typeof e=="function"?e(t):e}function $ae(){function e(n,r,i,o){const s={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:f,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const p=fT(i,d)||{};return h?h(s):dl(s,r,v=>{let y=nE(p,f,v);return v===y&&typeof v=="string"&&(y=nE(p,f,`${n}${v==="default"?"":Me(v)}`,v)),c===!1?y:{[c]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:yT;function l(c){let d=c;if(typeof c=="function")d=c(o);else if(typeof c!="object")return c;if(!d)return null;const f=qq(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(d).forEach(g=>{const v=Bae(d[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=tx(p,e(g,v,o,s));else{const y=dl({theme:o},v,S=>({[g]:S}));Nae(y,v)?p[g]=t({sx:v,theme:o}):p=tx(p,y)}else p=tx(p,e(g,v,o,s))}),Xq(h,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const Kq=$ae();Kq.filterProps=["sx"];const bT=Kq,Fae=["breakpoints","palette","spacing","shape"];function xT(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,Fae),l=Yse(n),c=sae(i);let d=Ho({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$({},Qse,o)},s);return d=t.reduce((f,h)=>Ho(f,h),d),d.unstable_sxConfig=$({},yT,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return bT({sx:h,theme:this})},d}function zae(e){return Object.keys(e).length===0}function wT(e=null){const t=I.useContext(dT);return!t||zae(t)?e:t}const jae=xT();function _T(e=jae){return wT(e)}function Uae({styles:e,themeId:t,defaultTheme:n={}}){const r=_T(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(Gse,{styles:i})}const Hae=["sx"],Wae=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:yT;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function L5(e){const{sx:t}=e,n=Le(e,Hae),{systemProps:r,otherProps:i}=Wae(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Wh(l)?$({},r,l):r}:o=$({},r,t),$({},i,{sx:o})}function Qq(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(bT);return I.forwardRef(function(c,d){const f=_T(n),h=L5(c),{className:p,component:g="div"}=h,v=Le(h,Gae);return C.jsx(o,$({as:g,ref:d,className:Fe(p,i?i(r):r),theme:t&&f[t]||f},v))})}const qae=["variant"];function _6(e){return e.length===0}function Jq(e){const{variant:t}=e,n=Le(e,qae);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=_6(r)?e[i]:Me(e[i]):r+=`${_6(r)?i:Me(i)}${Me(e[i].toString())}`}),r}const Xae=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Yae(e){return Object.keys(e).length===0}function Kae(e){return typeof e=="string"&&e.charCodeAt(0)>96}const Qae=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Jae=(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=Jq(i.props);r[o]=i.style}),r},Zae=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],l=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return l&&l.forEach(c=>{let d=!0;Object.keys(c.props).forEach(f=>{o[f]!==c.props[f]&&e[f]!==c.props[f]&&(d=!1)}),d&&s.push(t[Jq(c.props)])}),s};function nx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ele=xT(),tle=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Q0({defaultTheme:e,theme:t,themeId:n}){return Yae(t)?e:t[n]||t}function nle(e){return e?(t,n)=>n[e]:null}function Zq(e={}){const{themeId:t,defaultTheme:n=ele,rootShouldForwardProp:r=nx,slotShouldForwardProp:i=nx}=e,o=s=>bT($({},s,{theme:Q0($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{Vse(s,E=>E.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=nle(tle(d))}=l,g=Le(l,Xae),v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let S,_=nx;d==="Root"||d==="root"?_=r:d?_=i:Kae(s)&&(_=void 0);const b=Vq(s,$({shouldForwardProp:_,label:S},g)),x=(E,...A)=>{const R=A?A.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N($({},H,{theme:Q0($({},H,{defaultTheme:n,themeId:t}))})):N):[];let k=E;c&&p&&R.push(N=>{const H=Q0($({},N,{defaultTheme:n,themeId:t})),W=Qae(c,H);if(W){const z={};return Object.entries(W).forEach(([D,F])=>{z[D]=typeof F=="function"?F($({},N,{theme:H})):F}),p(N,z)}return null}),c&&!v&&R.push(N=>{const H=Q0($({},N,{defaultTheme:n,themeId:t}));return Zae(N,Jae(c,H),H,c)}),y||R.push(o);const O=R.length-A.length;if(Array.isArray(E)&&O>0){const N=new Array(O).fill("");k=[...E,...N],k.raw=[...E.raw,...N]}else typeof E=="function"&&E.__emotion_real!==E&&(k=N=>E($({},N,{theme:Q0($({},N,{defaultTheme:n,themeId:t}))})));const L=b(k,...R);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const rle=Zq(),ile=rle;function eX(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:x5(t.components[n].defaultProps,r)}function tX({props:e,name:t,defaultTheme:n,themeId:r}){let i=_T(n);return r&&(i=i[r]||i),eX({theme:i,name:t,props:e})}function N5(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function ole(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 hp(e){if(e.type)return e;if(e.charAt(0)==="#")return hp(ole(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Md(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(Md(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function ST(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 sle(e){e=hp(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(d,f=(d+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),ST({type:l,values:c})}function a$(e){e=hp(e);let t=e.type==="hsl"||e.type==="hsla"?hp(sle(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 l$(e,t){const n=a$(e),r=a$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wn(e,t){return e=hp(e),t=N5(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ST(e)}function Yg(e,t){if(e=hp(e),t=N5(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 ST(e)}function Kg(e,t){if(e=hp(e),t=N5(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 ST(e)}function ale(e,t=.15){return a$(e)>.5?Yg(e,t):Kg(e,t)}const lle=I.createContext(null),nX=lle;function rX(){return I.useContext(nX)}const cle=typeof Symbol=="function"&&Symbol.for,ule=cle?Symbol.for("mui.nested"):"__THEME_NESTED__";function dle(e,t){return typeof t=="function"?t(e):$({},e,t)}function fle(e){const{children:t,theme:n}=e,r=rX(),i=I.useMemo(()=>{const o=r===null?n:dle(r,n);return o!=null&&(o[ule]=r!==null),o},[n,r]);return C.jsx(nX.Provider,{value:i,children:t})}const S6={};function E6(e,t,n,r=!1){return I.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 hle(e){const{children:t,theme:n,themeId:r}=e,i=wT(S6),o=rX()||S6,s=E6(r,i,n),l=E6(r,o,n,!0);return C.jsx(fle,{theme:l,children:C.jsx(dT.Provider,{value:s,children:t})})}const ple=["component","direction","spacing","divider","children","className","useFlexGap"],mle=xT(),gle=ile("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function vle(e){return tX({props:e,name:"MuiStack",defaultTheme:mle})}function yle(e,t){const n=I.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],xle=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},dl({theme:t},bD({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=M5(t),i=Object.keys(t.breakpoints.values).reduce((c,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(c[d]=!0),c),{}),o=bD({values:e.direction,base:i}),s=bD({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,d,f)=>{if(!o[c]){const p=d>0?o[f[d-1]]:"column";o[c]=p}}),n=Ho(n,dl({theme:t},s,(c,d)=>e.useFlexGap?{gap:fp(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ble(d?o[d]:e.direction)}`]:fp(r,c)}}))}return n=Jse(t.breakpoints,n),n};function wle(e={}){const{createStyledComponent:t=gle,useThemeProps:n=vle,componentName:r="MuiStack"}=e,i=()=>Et({root:["root"]},c=>_t(r,c),{}),o=t(xle);return I.forwardRef(function(c,d){const f=n(c),h=L5(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:_,useFlexGap:b=!1}=h,x=Le(h,ple),E={direction:g,spacing:v,useFlexGap:b},A=i();return C.jsx(o,$({as:p,ownerState:E,ref:d,className:Fe(A.root,_)},x,{children:y?yle(S,y):S}))})}function _le(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Sle=["mode","contrastThreshold","tonalOffset"],C6={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:dg.white,default:dg.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}},xD={text:{primary:dg.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:dg.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 T6(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=Kg(e.main,i):t==="dark"&&(e.dark=Yg(e.main,o)))}function Ele(e="light"){return e==="dark"?{main:Yu[200],light:Yu[50],dark:Yu[400]}:{main:Yu[700],light:Yu[400],dark:Yu[800]}}function Cle(e="light"){return e==="dark"?{main:Ih[200],light:Ih[50],dark:Ih[400]}:{main:Ih[500],light:Ih[300],dark:Ih[700]}}function Tle(e="light"){return e==="dark"?{main:Xu[500],light:Xu[300],dark:Xu[700]}:{main:Xu[700],light:Xu[400],dark:Xu[800]}}function kle(e="light"){return e==="dark"?{main:Ph[400],light:Ph[300],dark:Ph[700]}:{main:Ph[700],light:Ph[500],dark:Ph[900]}}function Ale(e="light"){return e==="dark"?{main:Ku[400],light:Ku[300],dark:Ku[700]}:{main:Ku[800],light:Ku[500],dark:Ku[900]}}function Rle(e="light"){return e==="dark"?{main:Hh[400],light:Hh[300],dark:Hh[700]}:{main:"#ed6c02",light:Hh[500],dark:Hh[900]}}function Ile(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,Sle),o=e.primary||Ele(t),s=e.secondary||Cle(t),l=e.error||Tle(t),c=e.info||kle(t),d=e.success||Ale(t),f=e.warning||Rle(t);function h(y){return l$(y,xD.text.primary)>=n?xD.text.primary:C6.text.primary}const p=({color:y,name:S,mainShade:_=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[_]&&(y.main=y[_]),!y.hasOwnProperty("main"))throw new Error(Md(11,S?` (${S})`:"",_));if(typeof y.main!="string")throw new Error(Md(12,S?` (${S})`:"",JSON.stringify(y.main)));return T6(y,"light",b,r),T6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:xD,light:C6};return Ho($({common:$({},dg),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:v5,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const Ple=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ole(e){return Math.round(e*1e5)/1e5}const k6={textTransform:"uppercase"},A6='"Roboto", "Helvetica", "Arial", sans-serif';function Mle(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=A6,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,p=Le(n,Ple),g=i/14,v=h||(_=>`${_/d*g}rem`),y=(_,b,x,E,A)=>$({fontFamily:r,fontWeight:_,fontSize:v(b),lineHeight:x},r===A6?{letterSpacing:`${Ole(E/b)}em`}:{},A,f),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,k6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,k6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ho($({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},S),p,{clone:!1})}const Dle=.2,Lle=.14,Nle=.12;function dr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Dle})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Lle})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Nle})`].join(",")}const Ble=["none",dr(0,2,1,-1,0,1,1,0,0,1,3,0),dr(0,3,1,-2,0,2,2,0,0,1,5,0),dr(0,3,3,-2,0,3,4,0,0,1,8,0),dr(0,2,4,-1,0,4,5,0,0,1,10,0),dr(0,3,5,-1,0,5,8,0,0,1,14,0),dr(0,3,5,-1,0,6,10,0,0,1,18,0),dr(0,4,5,-2,0,7,10,1,0,2,16,1),dr(0,5,5,-3,0,8,10,1,0,3,14,2),dr(0,5,6,-3,0,9,12,1,0,3,16,2),dr(0,6,6,-3,0,10,14,1,0,4,18,3),dr(0,6,7,-4,0,11,15,1,0,4,20,3),dr(0,7,8,-4,0,12,17,2,0,5,22,4),dr(0,7,8,-4,0,13,19,2,0,5,24,4),dr(0,7,9,-4,0,14,21,2,0,5,26,4),dr(0,8,9,-5,0,15,22,2,0,6,28,5),dr(0,8,10,-5,0,16,24,2,0,6,30,5),dr(0,8,11,-5,0,17,26,2,0,6,32,5),dr(0,9,11,-5,0,18,28,2,0,7,34,6),dr(0,9,12,-6,0,19,29,2,0,7,36,6),dr(0,10,13,-6,0,20,31,3,0,8,38,7),dr(0,10,13,-6,0,21,33,3,0,8,40,7),dr(0,10,14,-6,0,22,35,3,0,8,42,7),dr(0,11,14,-7,0,23,36,3,0,9,44,8),dr(0,11,15,-7,0,24,38,3,0,9,46,8)],$le=Ble,Fle=["duration","easing","delay"],zle={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)"},iX={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function R6(e){return`${Math.round(e)}ms`}function jle(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Ule(e){const t=$({},zle,e.easing),n=$({},iX,e.duration);return $({getAutoHeightDuration:jle,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o;return Le(o,Fle),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:R6(s)} ${l} ${typeof c=="string"?c:R6(c)}`).join(",")}},e,{easing:t,duration:n})}const Hle={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Wle=Hle,Gle=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function B5(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,Gle);if(e.vars)throw new Error(Md(18));const l=Ile(r),c=xT(e);let d=Ho(c,{mixins:_le(c.breakpoints,n),palette:l,shadows:$le.slice(),typography:Mle(l,o),transitions:Ule(i),zIndex:$({},Wle)});return d=Ho(d,s),d=t.reduce((f,h)=>Ho(f,h),d),d.unstable_sxConfig=$({},yT,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return bT({sx:h,theme:this})},d}function Vle(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function qle(e){return parseFloat(e)}const Xle=B5(),ET=Xle;function In(){const e=_T(ET);return e[dp]||e}function Tt({props:e,name:t}){return tX({props:e,name:t,defaultTheme:ET,themeId:dp})}const va=e=>nx(e)&&e!=="classes",$5=nx,Yle=Zq({themeId:dp,defaultTheme:ET,rootShouldForwardProp:va}),Ee=Yle,Kle=["theme"];function Qle(e){let{theme:t}=e,n=Le(e,Kle);const r=t[dp];return C.jsx(hle,$({},n,{themeId:r?dp:void 0,theme:r||t}))}const Jle=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},I6=Jle;function Zle(e){return _t("MuiSvgIcon",e)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ece=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],tce=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Me(t)}`,`fontSize${Me(n)}`]};return Et(i,Zle,r)},nce=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Me(n.color)}`],t[`fontSize${Me(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,l,c,d,f,h,p,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?h:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),oX=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Le(r,ece),v=I.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const _=tce(y);return C.jsxs(nce,$({as:l,className:Fe(_.root,o),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,g,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});oX.muiName="SvgIcon";const P6=oX;function Dt(e,t){function n(r,i){return C.jsx(P6,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=P6.muiName,I.memo(I.forwardRef(n))}var Un={};/** + */function Gq(e,t){return s$(e,t)}const qse=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Xse=["values","unit","step"],Yse=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 Kse(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,Xse),o=Yse(t),s=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function d(p,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function f(p){return s.indexOf(p)+1`@media (min-width:${R5[e]}px)`};function fl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||b6;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||b6;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||R5).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function Vq(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function qq(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Zse(e,...t){const n=Vq(e),r=[n,...t].reduce((i,o)=>Ho(i,o),{});return qq(Object.keys(n),r)}function eae(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 yD({values:e,breakpoints:t,base:n}){const r=n||eae(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[o],o=l):s[l]=e,s),{})}function dT(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 tE(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=dT(e,n)||r,t&&(i=t(i,r,e)),i}function Pn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,d=dT(c,r)||{};return fl(s,l,h=>{let p=tE(d,i,h);return h===p&&typeof h=="string"&&(p=tE(d,i,`${t}${h==="default"?"":Me(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function tae(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const nae={m:"margin",p:"padding"},rae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},x6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},iae=tae(e=>{if(e.length>2)if(x6[e])e=x6[e];else return[e];const[t,n]=e.split(""),r=nae[t],i=rae[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),I5=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],P5=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...I5,...P5];function j1(e,t,n,r){var i;const o=(i=dT(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 O5(e){return j1(e,"spacing",8)}function fp(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 oae(e,t){return n=>e.reduce((r,i)=>(r[i]=fp(t,n),r),{})}function sae(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=iae(n),o=oae(i,r),s=e[n];return fl(e,s,o)}function Xq(e,t){const n=O5(e.theme);return Object.keys(e).map(r=>sae(e,t,r,n)).reduce(tx,{})}function Dr(e){return Xq(e,I5)}Dr.propTypes={};Dr.filterProps=I5;function Lr(e){return Xq(e,P5)}Lr.propTypes={};Lr.filterProps=P5;function aae(e=8){if(e.mui)return e;const t=O5({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 fT(...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]?tx(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Dl(e){return typeof e!="number"?e:`${e}px solid`}const lae=Pn({prop:"border",themeKey:"borders",transform:Dl}),cae=Pn({prop:"borderTop",themeKey:"borders",transform:Dl}),uae=Pn({prop:"borderRight",themeKey:"borders",transform:Dl}),dae=Pn({prop:"borderBottom",themeKey:"borders",transform:Dl}),fae=Pn({prop:"borderLeft",themeKey:"borders",transform:Dl}),hae=Pn({prop:"borderColor",themeKey:"palette"}),pae=Pn({prop:"borderTopColor",themeKey:"palette"}),mae=Pn({prop:"borderRightColor",themeKey:"palette"}),gae=Pn({prop:"borderBottomColor",themeKey:"palette"}),vae=Pn({prop:"borderLeftColor",themeKey:"palette"}),hT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=j1(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:fp(t,r)});return fl(e,e.borderRadius,n)}return null};hT.propTypes={};hT.filterProps=["borderRadius"];fT(lae,cae,uae,dae,fae,hae,pae,mae,gae,vae,hT);const pT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=j1(e.theme,"spacing",8),n=r=>({gap:fp(t,r)});return fl(e,e.gap,n)}return null};pT.propTypes={};pT.filterProps=["gap"];const mT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=j1(e.theme,"spacing",8),n=r=>({columnGap:fp(t,r)});return fl(e,e.columnGap,n)}return null};mT.propTypes={};mT.filterProps=["columnGap"];const gT=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=j1(e.theme,"spacing",8),n=r=>({rowGap:fp(t,r)});return fl(e,e.rowGap,n)}return null};gT.propTypes={};gT.filterProps=["rowGap"];const yae=Pn({prop:"gridColumn"}),bae=Pn({prop:"gridRow"}),xae=Pn({prop:"gridAutoFlow"}),wae=Pn({prop:"gridAutoColumns"}),_ae=Pn({prop:"gridAutoRows"}),Sae=Pn({prop:"gridTemplateColumns"}),Eae=Pn({prop:"gridTemplateRows"}),Cae=Pn({prop:"gridTemplateAreas"}),Tae=Pn({prop:"gridArea"});fT(pT,mT,gT,yae,bae,xae,wae,_ae,Sae,Eae,Cae,Tae);function Wm(e,t){return t==="grey"?t:e}const kae=Pn({prop:"color",themeKey:"palette",transform:Wm}),Aae=Pn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wm}),Rae=Pn({prop:"backgroundColor",themeKey:"palette",transform:Wm});fT(kae,Aae,Rae);function Ss(e){return e<=1&&e!==0?`${e*100}%`:e}const Iae=Pn({prop:"width",transform:Ss}),M5=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])||R5[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:Ss(n)}};return fl(e,e.maxWidth,t)}return null};M5.filterProps=["maxWidth"];const Pae=Pn({prop:"minWidth",transform:Ss}),Oae=Pn({prop:"height",transform:Ss}),Mae=Pn({prop:"maxHeight",transform:Ss}),Dae=Pn({prop:"minHeight",transform:Ss});Pn({prop:"size",cssProperty:"width",transform:Ss});Pn({prop:"size",cssProperty:"height",transform:Ss});const Lae=Pn({prop:"boxSizing"});fT(Iae,M5,Pae,Oae,Mae,Dae,Lae);const Nae={border:{themeKey:"borders",transform:Dl},borderTop:{themeKey:"borders",transform:Dl},borderRight:{themeKey:"borders",transform:Dl},borderBottom:{themeKey:"borders",transform:Dl},borderLeft:{themeKey:"borders",transform:Dl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:hT},color:{themeKey:"palette",transform:Wm},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wm},backgroundColor:{themeKey:"palette",transform:Wm},p:{style:Lr},pt:{style:Lr},pr:{style:Lr},pb:{style:Lr},pl:{style:Lr},px:{style:Lr},py:{style:Lr},padding:{style:Lr},paddingTop:{style:Lr},paddingRight:{style:Lr},paddingBottom:{style:Lr},paddingLeft:{style:Lr},paddingX:{style:Lr},paddingY:{style:Lr},paddingInline:{style:Lr},paddingInlineStart:{style:Lr},paddingInlineEnd:{style:Lr},paddingBlock:{style:Lr},paddingBlockStart:{style:Lr},paddingBlockEnd:{style:Lr},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pT},rowGap:{style:gT},columnGap:{style:mT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ss},maxWidth:{style:M5},minWidth:{transform:Ss},height:{transform:Ss},maxHeight:{transform:Ss},minHeight:{transform:Ss},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},vT=Nae;function Bae(...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 $ae(e,t){return typeof e=="function"?e(t):e}function Fae(){function e(n,r,i,o){const s={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:f,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const p=dT(i,d)||{};return h?h(s):fl(s,r,v=>{let y=tE(p,f,v);return v===y&&typeof v=="string"&&(y=tE(p,f,`${n}${v==="default"?"":Me(v)}`,v)),c===!1?y:{[c]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:vT;function l(c){let d=c;if(typeof c=="function")d=c(o);else if(typeof c!="object")return c;if(!d)return null;const f=Vq(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(d).forEach(g=>{const v=$ae(d[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=tx(p,e(g,v,o,s));else{const y=fl({theme:o},v,S=>({[g]:S}));Bae(y,v)?p[g]=t({sx:v,theme:o}):p=tx(p,y)}else p=tx(p,e(g,v,o,s))}),qq(h,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const Yq=Fae();Yq.filterProps=["sx"];const yT=Yq,zae=["breakpoints","palette","spacing","shape"];function bT(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,zae),l=Kse(n),c=aae(i);let d=Ho({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$({},Jse,o)},s);return d=t.reduce((f,h)=>Ho(f,h),d),d.unstable_sxConfig=$({},vT,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return yT({sx:h,theme:this})},d}function jae(e){return Object.keys(e).length===0}function xT(e=null){const t=I.useContext(uT);return!t||jae(t)?e:t}const Uae=bT();function wT(e=Uae){return xT(e)}function Hae({styles:e,themeId:t,defaultTheme:n={}}){const r=wT(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(Vse,{styles:i})}const Wae=["sx"],Gae=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:vT;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function D5(e){const{sx:t}=e,n=Le(e,Wae),{systemProps:r,otherProps:i}=Gae(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Wh(l)?$({},r,l):r}:o=$({},r,t),$({},i,{sx:o})}function Kq(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(yT);return I.forwardRef(function(c,d){const f=wT(n),h=D5(c),{className:p,component:g="div"}=h,v=Le(h,Vae);return C.jsx(o,$({as:g,ref:d,className:Fe(p,i?i(r):r),theme:t&&f[t]||f},v))})}const Xae=["variant"];function w6(e){return e.length===0}function Qq(e){const{variant:t}=e,n=Le(e,Xae);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=w6(r)?e[i]:Me(e[i]):r+=`${w6(r)?i:Me(i)}${Me(e[i].toString())}`}),r}const Yae=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Kae(e){return Object.keys(e).length===0}function Qae(e){return typeof e=="string"&&e.charCodeAt(0)>96}const Jae=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Zae=(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=Qq(i.props);r[o]=i.style}),r},ele=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],l=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return l&&l.forEach(c=>{let d=!0;Object.keys(c.props).forEach(f=>{o[f]!==c.props[f]&&e[f]!==c.props[f]&&(d=!1)}),d&&s.push(t[Qq(c.props)])}),s};function nx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const tle=bT(),nle=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Q0({defaultTheme:e,theme:t,themeId:n}){return Kae(t)?e:t[n]||t}function rle(e){return e?(t,n)=>n[e]:null}function Jq(e={}){const{themeId:t,defaultTheme:n=tle,rootShouldForwardProp:r=nx,slotShouldForwardProp:i=nx}=e,o=s=>yT($({},s,{theme:Q0($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{qse(s,E=>E.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=rle(nle(d))}=l,g=Le(l,Yae),v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let S,_=nx;d==="Root"||d==="root"?_=r:d?_=i:Qae(s)&&(_=void 0);const b=Gq(s,$({shouldForwardProp:_,label:S},g)),x=(E,...A)=>{const R=A?A.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N($({},H,{theme:Q0($({},H,{defaultTheme:n,themeId:t}))})):N):[];let k=E;c&&p&&R.push(N=>{const H=Q0($({},N,{defaultTheme:n,themeId:t})),W=Jae(c,H);if(W){const z={};return Object.entries(W).forEach(([D,F])=>{z[D]=typeof F=="function"?F($({},N,{theme:H})):F}),p(N,z)}return null}),c&&!v&&R.push(N=>{const H=Q0($({},N,{defaultTheme:n,themeId:t}));return ele(N,Zae(c,H),H,c)}),y||R.push(o);const O=R.length-A.length;if(Array.isArray(E)&&O>0){const N=new Array(O).fill("");k=[...E,...N],k.raw=[...E.raw,...N]}else typeof E=="function"&&E.__emotion_real!==E&&(k=N=>E($({},N,{theme:Q0($({},N,{defaultTheme:n,themeId:t}))})));const L=b(k,...R);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const ile=Jq(),ole=ile;function Zq(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:b5(t.components[n].defaultProps,r)}function eX({props:e,name:t,defaultTheme:n,themeId:r}){let i=wT(n);return r&&(i=i[r]||i),Zq({theme:i,name:t,props:e})}function L5(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function sle(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 hp(e){if(e.type)return e;if(e.charAt(0)==="#")return hp(sle(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Md(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(Md(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function _T(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 ale(e){e=hp(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(d,f=(d+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),_T({type:l,values:c})}function a$(e){e=hp(e);let t=e.type==="hsl"||e.type==="hsla"?hp(ale(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 l$(e,t){const n=a$(e),r=a$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function _n(e,t){return e=hp(e),t=L5(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_T(e)}function Yg(e,t){if(e=hp(e),t=L5(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 _T(e)}function Kg(e,t){if(e=hp(e),t=L5(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 _T(e)}function lle(e,t=.15){return a$(e)>.5?Yg(e,t):Kg(e,t)}const cle=I.createContext(null),tX=cle;function nX(){return I.useContext(tX)}const ule=typeof Symbol=="function"&&Symbol.for,dle=ule?Symbol.for("mui.nested"):"__THEME_NESTED__";function fle(e,t){return typeof t=="function"?t(e):$({},e,t)}function hle(e){const{children:t,theme:n}=e,r=nX(),i=I.useMemo(()=>{const o=r===null?n:fle(r,n);return o!=null&&(o[dle]=r!==null),o},[n,r]);return C.jsx(tX.Provider,{value:i,children:t})}const _6={};function S6(e,t,n,r=!1){return I.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 ple(e){const{children:t,theme:n,themeId:r}=e,i=xT(_6),o=nX()||_6,s=S6(r,i,n),l=S6(r,o,n,!0);return C.jsx(hle,{theme:l,children:C.jsx(uT.Provider,{value:s,children:t})})}const mle=["component","direction","spacing","divider","children","className","useFlexGap"],gle=bT(),vle=ole("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function yle(e){return eX({props:e,name:"MuiStack",defaultTheme:gle})}function ble(e,t){const n=I.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],wle=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},fl({theme:t},yD({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=O5(t),i=Object.keys(t.breakpoints.values).reduce((c,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(c[d]=!0),c),{}),o=yD({values:e.direction,base:i}),s=yD({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,d,f)=>{if(!o[c]){const p=d>0?o[f[d-1]]:"column";o[c]=p}}),n=Ho(n,fl({theme:t},s,(c,d)=>e.useFlexGap?{gap:fp(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xle(d?o[d]:e.direction)}`]:fp(r,c)}}))}return n=Zse(t.breakpoints,n),n};function _le(e={}){const{createStyledComponent:t=vle,useThemeProps:n=yle,componentName:r="MuiStack"}=e,i=()=>Et({root:["root"]},c=>_t(r,c),{}),o=t(wle);return I.forwardRef(function(c,d){const f=n(c),h=D5(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:_,useFlexGap:b=!1}=h,x=Le(h,mle),E={direction:g,spacing:v,useFlexGap:b},A=i();return C.jsx(o,$({as:p,ownerState:E,ref:d,className:Fe(A.root,_)},x,{children:y?ble(S,y):S}))})}function Sle(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Ele=["mode","contrastThreshold","tonalOffset"],E6={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:dg.white,default:dg.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}},bD={text:{primary:dg.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:dg.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 C6(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=Kg(e.main,i):t==="dark"&&(e.dark=Yg(e.main,o)))}function Cle(e="light"){return e==="dark"?{main:Yu[200],light:Yu[50],dark:Yu[400]}:{main:Yu[700],light:Yu[400],dark:Yu[800]}}function Tle(e="light"){return e==="dark"?{main:Ih[200],light:Ih[50],dark:Ih[400]}:{main:Ih[500],light:Ih[300],dark:Ih[700]}}function kle(e="light"){return e==="dark"?{main:Xu[500],light:Xu[300],dark:Xu[700]}:{main:Xu[700],light:Xu[400],dark:Xu[800]}}function Ale(e="light"){return e==="dark"?{main:Ph[400],light:Ph[300],dark:Ph[700]}:{main:Ph[700],light:Ph[500],dark:Ph[900]}}function Rle(e="light"){return e==="dark"?{main:Ku[400],light:Ku[300],dark:Ku[700]}:{main:Ku[800],light:Ku[500],dark:Ku[900]}}function Ile(e="light"){return e==="dark"?{main:Hh[400],light:Hh[300],dark:Hh[700]}:{main:"#ed6c02",light:Hh[500],dark:Hh[900]}}function Ple(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,Ele),o=e.primary||Cle(t),s=e.secondary||Tle(t),l=e.error||kle(t),c=e.info||Ale(t),d=e.success||Rle(t),f=e.warning||Ile(t);function h(y){return l$(y,bD.text.primary)>=n?bD.text.primary:E6.text.primary}const p=({color:y,name:S,mainShade:_=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[_]&&(y.main=y[_]),!y.hasOwnProperty("main"))throw new Error(Md(11,S?` (${S})`:"",_));if(typeof y.main!="string")throw new Error(Md(12,S?` (${S})`:"",JSON.stringify(y.main)));return C6(y,"light",b,r),C6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:bD,light:E6};return Ho($({common:$({},dg),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:g5,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const Ole=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Mle(e){return Math.round(e*1e5)/1e5}const T6={textTransform:"uppercase"},k6='"Roboto", "Helvetica", "Arial", sans-serif';function Dle(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=k6,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,p=Le(n,Ole),g=i/14,v=h||(_=>`${_/d*g}rem`),y=(_,b,x,E,A)=>$({fontFamily:r,fontWeight:_,fontSize:v(b),lineHeight:x},r===k6?{letterSpacing:`${Mle(E/b)}em`}:{},A,f),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,T6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,T6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ho($({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},S),p,{clone:!1})}const Lle=.2,Nle=.14,Ble=.12;function dr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Lle})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Nle})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ble})`].join(",")}const $le=["none",dr(0,2,1,-1,0,1,1,0,0,1,3,0),dr(0,3,1,-2,0,2,2,0,0,1,5,0),dr(0,3,3,-2,0,3,4,0,0,1,8,0),dr(0,2,4,-1,0,4,5,0,0,1,10,0),dr(0,3,5,-1,0,5,8,0,0,1,14,0),dr(0,3,5,-1,0,6,10,0,0,1,18,0),dr(0,4,5,-2,0,7,10,1,0,2,16,1),dr(0,5,5,-3,0,8,10,1,0,3,14,2),dr(0,5,6,-3,0,9,12,1,0,3,16,2),dr(0,6,6,-3,0,10,14,1,0,4,18,3),dr(0,6,7,-4,0,11,15,1,0,4,20,3),dr(0,7,8,-4,0,12,17,2,0,5,22,4),dr(0,7,8,-4,0,13,19,2,0,5,24,4),dr(0,7,9,-4,0,14,21,2,0,5,26,4),dr(0,8,9,-5,0,15,22,2,0,6,28,5),dr(0,8,10,-5,0,16,24,2,0,6,30,5),dr(0,8,11,-5,0,17,26,2,0,6,32,5),dr(0,9,11,-5,0,18,28,2,0,7,34,6),dr(0,9,12,-6,0,19,29,2,0,7,36,6),dr(0,10,13,-6,0,20,31,3,0,8,38,7),dr(0,10,13,-6,0,21,33,3,0,8,40,7),dr(0,10,14,-6,0,22,35,3,0,8,42,7),dr(0,11,14,-7,0,23,36,3,0,9,44,8),dr(0,11,15,-7,0,24,38,3,0,9,46,8)],Fle=$le,zle=["duration","easing","delay"],jle={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)"},rX={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function A6(e){return`${Math.round(e)}ms`}function Ule(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Hle(e){const t=$({},jle,e.easing),n=$({},rX,e.duration);return $({getAutoHeightDuration:Ule,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o;return Le(o,zle),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:A6(s)} ${l} ${typeof c=="string"?c:A6(c)}`).join(",")}},e,{easing:t,duration:n})}const Wle={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Gle=Wle,Vle=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function N5(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,Vle);if(e.vars)throw new Error(Md(18));const l=Ple(r),c=bT(e);let d=Ho(c,{mixins:Sle(c.breakpoints,n),palette:l,shadows:Fle.slice(),typography:Dle(l,o),transitions:Hle(i),zIndex:$({},Gle)});return d=Ho(d,s),d=t.reduce((f,h)=>Ho(f,h),d),d.unstable_sxConfig=$({},vT,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return yT({sx:h,theme:this})},d}function qle(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Xle(e){return parseFloat(e)}const Yle=N5(),ST=Yle;function Cn(){const e=wT(ST);return e[dp]||e}function Tt({props:e,name:t}){return eX({props:e,name:t,defaultTheme:ST,themeId:dp})}const va=e=>nx(e)&&e!=="classes",B5=nx,Kle=Jq({themeId:dp,defaultTheme:ST,rootShouldForwardProp:va}),Ee=Kle,Qle=["theme"];function Jle(e){let{theme:t}=e,n=Le(e,Qle);const r=t[dp];return C.jsx(ple,$({},n,{themeId:r?dp:void 0,theme:r||t}))}const Zle=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},R6=Zle;function ece(e){return _t("MuiSvgIcon",e)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const tce=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],nce=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Me(t)}`,`fontSize${Me(n)}`]};return Et(i,ece,r)},rce=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Me(n.color)}`],t[`fontSize${Me(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,l,c,d,f,h,p,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?h:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),iX=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Le(r,tce),v=I.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const _=nce(y);return C.jsxs(rce,$({as:l,className:Fe(_.root,o),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},S,g,v&&i.props,{ownerState:y,children:[v?i.props.children:i,h?C.jsx("title",{children:h}):null]}))});iX.muiName="SvgIcon";const I6=iX;function Mt(e,t){function n(r,i){return C.jsx(I6,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=I6.muiName,I.memo(I.forwardRef(n))}var Un={};/** * @license React * react-is.production.min.js * @@ -35,7 +35,7 @@ var wie=Object.defineProperty;var _ie=(e,t,n)=>t in e?wie(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 F5=Symbol.for("react.element"),z5=Symbol.for("react.portal"),CT=Symbol.for("react.fragment"),TT=Symbol.for("react.strict_mode"),kT=Symbol.for("react.profiler"),AT=Symbol.for("react.provider"),RT=Symbol.for("react.context"),rce=Symbol.for("react.server_context"),IT=Symbol.for("react.forward_ref"),PT=Symbol.for("react.suspense"),OT=Symbol.for("react.suspense_list"),MT=Symbol.for("react.memo"),DT=Symbol.for("react.lazy"),ice=Symbol.for("react.offscreen"),sX;sX=Symbol.for("react.module.reference");function ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case F5:switch(e=e.type,e){case CT:case kT:case TT:case PT:case OT:return e;default:switch(e=e&&e.$$typeof,e){case rce:case RT:case IT:case DT:case MT:case AT:return e;default:return t}}case z5:return t}}}Un.ContextConsumer=RT;Un.ContextProvider=AT;Un.Element=F5;Un.ForwardRef=IT;Un.Fragment=CT;Un.Lazy=DT;Un.Memo=MT;Un.Portal=z5;Un.Profiler=kT;Un.StrictMode=TT;Un.Suspense=PT;Un.SuspenseList=OT;Un.isAsyncMode=function(){return!1};Un.isConcurrentMode=function(){return!1};Un.isContextConsumer=function(e){return ya(e)===RT};Un.isContextProvider=function(e){return ya(e)===AT};Un.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===F5};Un.isForwardRef=function(e){return ya(e)===IT};Un.isFragment=function(e){return ya(e)===CT};Un.isLazy=function(e){return ya(e)===DT};Un.isMemo=function(e){return ya(e)===MT};Un.isPortal=function(e){return ya(e)===z5};Un.isProfiler=function(e){return ya(e)===kT};Un.isStrictMode=function(e){return ya(e)===TT};Un.isSuspense=function(e){return ya(e)===PT};Un.isSuspenseList=function(e){return ya(e)===OT};Un.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===CT||e===kT||e===TT||e===PT||e===OT||e===ice||typeof e=="object"&&e!==null&&(e.$$typeof===DT||e.$$typeof===MT||e.$$typeof===AT||e.$$typeof===RT||e.$$typeof===IT||e.$$typeof===sX||e.getModuleId!==void 0)};Un.typeOf=ya;function c$(e,t){return c$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},c$(e,t)}function LT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c$(e,t)}var aX={exports:{}},Hs={},lX={exports:{}},cX={};/** + */var $5=Symbol.for("react.element"),F5=Symbol.for("react.portal"),ET=Symbol.for("react.fragment"),CT=Symbol.for("react.strict_mode"),TT=Symbol.for("react.profiler"),kT=Symbol.for("react.provider"),AT=Symbol.for("react.context"),ice=Symbol.for("react.server_context"),RT=Symbol.for("react.forward_ref"),IT=Symbol.for("react.suspense"),PT=Symbol.for("react.suspense_list"),OT=Symbol.for("react.memo"),MT=Symbol.for("react.lazy"),oce=Symbol.for("react.offscreen"),oX;oX=Symbol.for("react.module.reference");function ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $5:switch(e=e.type,e){case ET:case TT:case CT:case IT:case PT:return e;default:switch(e=e&&e.$$typeof,e){case ice:case AT:case RT:case MT:case OT:case kT:return e;default:return t}}case F5:return t}}}Un.ContextConsumer=AT;Un.ContextProvider=kT;Un.Element=$5;Un.ForwardRef=RT;Un.Fragment=ET;Un.Lazy=MT;Un.Memo=OT;Un.Portal=F5;Un.Profiler=TT;Un.StrictMode=CT;Un.Suspense=IT;Un.SuspenseList=PT;Un.isAsyncMode=function(){return!1};Un.isConcurrentMode=function(){return!1};Un.isContextConsumer=function(e){return ya(e)===AT};Un.isContextProvider=function(e){return ya(e)===kT};Un.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$5};Un.isForwardRef=function(e){return ya(e)===RT};Un.isFragment=function(e){return ya(e)===ET};Un.isLazy=function(e){return ya(e)===MT};Un.isMemo=function(e){return ya(e)===OT};Un.isPortal=function(e){return ya(e)===F5};Un.isProfiler=function(e){return ya(e)===TT};Un.isStrictMode=function(e){return ya(e)===CT};Un.isSuspense=function(e){return ya(e)===IT};Un.isSuspenseList=function(e){return ya(e)===PT};Un.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ET||e===TT||e===CT||e===IT||e===PT||e===oce||typeof e=="object"&&e!==null&&(e.$$typeof===MT||e.$$typeof===OT||e.$$typeof===kT||e.$$typeof===AT||e.$$typeof===RT||e.$$typeof===oX||e.getModuleId!==void 0)};Un.typeOf=ya;function c$(e,t){return c$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},c$(e,t)}function DT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c$(e,t)}var sX={exports:{}},Hs={},aX={exports:{}},lX={};/** * @license React * scheduler.production.min.js * @@ -43,7 +43,7 @@ var wie=Object.defineProperty;var _ie=(e,t,n)=>t in e?wie(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(G,K){var Y=G.length;G.push(K);e:for(;0>>1,ie=G[J];if(0>>1;Ji(se,Y))Qi(ae,se)?(G[J]=ae,G[Q]=Y,J=Q):(G[J]=se,G[ue]=Y,J=ue);else if(Qi(ae,Y))G[J]=ae,G[Q]=Y,J=Q;else break e}}return K}function i(G,K){var Y=G.sortIndex-K.sortIndex;return Y!==0?Y:G.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,h=null,p=3,g=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(G){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=G)r(d),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(d)}}function E(G){if(y=!1,x(G),!v)if(n(c)!==null)v=!0,j(A);else{var K=n(d);K!==null&&V(E,K.startTime-G)}}function A(G,K){v=!1,y&&(y=!1,_(O),O=-1),g=!0;var Y=p;try{for(x(K),h=n(c);h!==null&&(!(h.expirationTime>K)||G&&!H());){var J=h.callback;if(typeof J=="function"){h.callback=null,p=h.priorityLevel;var ie=J(h.expirationTime<=K);K=e.unstable_now(),typeof ie=="function"?h.callback=ie:h===n(c)&&r(c),x(K)}else r(c);h=n(c)}if(h!==null)var ce=!0;else{var ue=n(d);ue!==null&&V(E,ue.startTime-K),ce=!1}return ce}finally{h=null,p=Y,g=!1}}var R=!1,k=null,O=-1,L=5,N=-1;function H(){return!(e.unstable_now()-NG||125J?(G.sortIndex=Y,t(d,G),n(c)===null&&G===n(d)&&(y?(_(O),O=-1):y=!0,V(E,Y-J))):(G.sortIndex=ie,t(c,G),v||g||(v=!0,j(A))),G},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(G){var K=p;return function(){var Y=p;p=K;try{return G.apply(this,arguments)}finally{p=Y}}}})(cX);lX.exports=cX;var oce=lX.exports;/** + */(function(e){function t(G,K){var Y=G.length;G.push(K);e:for(;0>>1,ie=G[J];if(0>>1;Ji(se,Y))Qi(ae,se)?(G[J]=ae,G[Q]=Y,J=Q):(G[J]=se,G[ue]=Y,J=ue);else if(Qi(ae,Y))G[J]=ae,G[Q]=Y,J=Q;else break e}}return K}function i(G,K){var Y=G.sortIndex-K.sortIndex;return Y!==0?Y:G.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,h=null,p=3,g=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(G){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=G)r(d),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(d)}}function E(G){if(y=!1,x(G),!v)if(n(c)!==null)v=!0,j(A);else{var K=n(d);K!==null&&V(E,K.startTime-G)}}function A(G,K){v=!1,y&&(y=!1,_(O),O=-1),g=!0;var Y=p;try{for(x(K),h=n(c);h!==null&&(!(h.expirationTime>K)||G&&!H());){var J=h.callback;if(typeof J=="function"){h.callback=null,p=h.priorityLevel;var ie=J(h.expirationTime<=K);K=e.unstable_now(),typeof ie=="function"?h.callback=ie:h===n(c)&&r(c),x(K)}else r(c);h=n(c)}if(h!==null)var ce=!0;else{var ue=n(d);ue!==null&&V(E,ue.startTime-K),ce=!1}return ce}finally{h=null,p=Y,g=!1}}var R=!1,k=null,O=-1,L=5,N=-1;function H(){return!(e.unstable_now()-NG||125J?(G.sortIndex=Y,t(d,G),n(c)===null&&G===n(d)&&(y?(_(O),O=-1):y=!0,V(E,Y-J))):(G.sortIndex=ie,t(c,G),v||g||(v=!0,j(A))),G},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(G){var K=p;return function(){var Y=p;p=K;try{return G.apply(this,arguments)}finally{p=Y}}}})(lX);aX.exports=lX;var sce=aX.exports;/** * @license React * react-dom.production.min.js * @@ -51,14 +51,14 @@ var wie=Object.defineProperty;var _ie=(e,t,n)=>t in e?wie(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 uX=I,Ns=oce;function Oe(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"),u$=Object.prototype.hasOwnProperty,sce=/^[: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]*$/,O6={},M6={};function ace(e){return u$.call(M6,e)?!0:u$.call(O6,e)?!1:sce.test(e)?M6[e]=!0:(O6[e]=!0,!1)}function lce(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 cce(e,t,n,r){if(t===null||typeof t>"u"||lce(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 Oo(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 Vi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vi[e]=new Oo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vi[t]=new Oo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vi[e]=new Oo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vi[e]=new Oo(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){Vi[e]=new Oo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vi[e]=new Oo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vi[e]=new Oo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vi[e]=new Oo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vi[e]=new Oo(e,5,!1,e.toLowerCase(),null,!1,!1)});var j5=/[\-:]([a-z])/g;function U5(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(j5,U5);Vi[t]=new Oo(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(j5,U5);Vi[t]=new Oo(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(j5,U5);Vi[t]=new Oo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!1,!1)});Vi.xlinkHref=new Oo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!0,!0)});function H5(e,t,n,r){var i=Vi.hasOwnProperty(t)?Vi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u$=Object.prototype.hasOwnProperty,ace=/^[: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]*$/,P6={},O6={};function lce(e){return u$.call(O6,e)?!0:u$.call(P6,e)?!1:ace.test(e)?O6[e]=!0:(P6[e]=!0,!1)}function cce(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 uce(e,t,n,r){if(t===null||typeof t>"u"||cce(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 Oo(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 Vi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vi[e]=new Oo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vi[t]=new Oo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vi[e]=new Oo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vi[e]=new Oo(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){Vi[e]=new Oo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vi[e]=new Oo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vi[e]=new Oo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vi[e]=new Oo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vi[e]=new Oo(e,5,!1,e.toLowerCase(),null,!1,!1)});var z5=/[\-:]([a-z])/g;function j5(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(z5,j5);Vi[t]=new Oo(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(z5,j5);Vi[t]=new Oo(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(z5,j5);Vi[t]=new Oo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!1,!1)});Vi.xlinkHref=new Oo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vi[e]=new Oo(e,1,!1,e.toLowerCase(),null,!0,!0)});function U5(e,t,n,r){var i=Vi.hasOwnProperty(t)?Vi[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` -`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{_D=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Db(e):""}function uce(e){switch(e.tag){case 5:return Db(e.type);case 16:return Db("Lazy");case 13:return Db("Suspense");case 19:return Db("SuspenseList");case 0:case 2:case 15:return e=SD(e.type,!1),e;case 11:return e=SD(e.type.render,!1),e;case 1:return e=SD(e.type,!0),e;default:return""}}function p$(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 _m:return"Fragment";case wm:return"Portal";case d$:return"Profiler";case W5:return"StrictMode";case f$:return"Suspense";case h$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hX:return(e.displayName||"Context")+".Consumer";case fX:return(e._context.displayName||"Context")+".Provider";case G5:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V5:return t=e.displayName||null,t!==null?t:p$(e.type)||"Memo";case Qu:t=e._payload,e=e._init;try{return p$(e(t))}catch{}}return null}function dce(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 p$(t);case 8:return t===W5?"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 Ld(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fce(e){var t=mX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Iw(e){e._valueTracker||(e._valueTracker=fce(e))}function gX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=mX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rE(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 m$(e,t){var n=t.checked;return Ir({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function L6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ld(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 vX(e,t){t=t.checked,t!=null&&H5(e,"checked",t,!1)}function g$(e,t){vX(e,t);var n=Ld(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")?v$(e,t.type,n):t.hasOwnProperty("defaultValue")&&v$(e,t.type,Ld(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function N6(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 v$(e,t,n){(t!=="number"||rE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Lb=Array.isArray;function Gm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Pw.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rx={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},hce=["Webkit","ms","Moz","O"];Object.keys(rx).forEach(function(e){hce.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rx[t]=rx[e]})});function wX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rx.hasOwnProperty(e)&&rx[e]?(""+t).trim():t+"px"}function _X(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=wX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pce=Ir({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 x$(e,t){if(t){if(pce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function w$(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 _$=null;function q5(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var S$=null,Vm=null,qm=null;function F6(e){if(e=W1(e)){if(typeof S$!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=zT(t),S$(e.stateNode,e.type,t))}}function SX(e){Vm?qm?qm.push(e):qm=[e]:Vm=e}function EX(){if(Vm){var e=Vm,t=qm;if(qm=Vm=null,F6(e),t)for(e=0;e>>=0,e===0?32:31-(Cce(e)/Tce|0)|0}var Ow=64,Mw=4194304;function Nb(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 aE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Nb(l):(o&=s,o!==0&&(r=Nb(o)))}else s=n&~i,s!==0?r=Nb(s):o!==0&&(r=Nb(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 U1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rl(t),e[t]=n}function Ice(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=ox),X6=String.fromCharCode(32),Y6=!1;function WX(e,t){switch(e){case"keyup":return iue.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sm=!1;function sue(e,t){switch(e){case"compositionend":return GX(t);case"keypress":return t.which!==32?null:(Y6=!0,X6);case"textInput":return e=t.data,e===X6&&Y6?null:e;default:return null}}function aue(e,t){if(Sm)return e==="compositionend"||!t4&&WX(e,t)?(e=UX(),yS=J5=ud=null,Sm=!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=Z6(n)}}function YX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function KX(){for(var e=window,t=rE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rE(e.document)}return t}function n4(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 gue(e){var t=KX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YX(n.ownerDocument.documentElement,n)){if(r!==null&&n4(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=eU(n,o);var s=eU(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,Em=null,R$=null,ax=null,I$=!1;function tU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I$||Em==null||Em!==rE(r)||(r=Em,"selectionStart"in r&&n4(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}),ax&&Hx(ax,r)||(ax=r,r=uE(R$,"onSelect"),0km||(e.current=N$[km],N$[km]=null,km--)}function er(e,t){km++,N$[km]=e.current,e.current=t}var Nd={},io=Xd(Nd),Wo=Xd(!1),pp=Nd;function pg(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 Go(e){return e=e.childContextTypes,e!=null}function fE(){ur(Wo),ur(io)}function lU(e,t,n){if(io.current!==Nd)throw Error(Oe(168));er(io,t),er(Wo,n)}function oY(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(Oe(108,dce(e)||"Unknown",i));return Ir({},n,r)}function hE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nd,pp=io.current,er(io,e),er(Wo,Wo.current),!0}function cU(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=oY(e,t,pp),r.__reactInternalMemoizedMergedChildContext=e,ur(Wo),ur(io),er(io,e)):ur(Wo),er(Wo,n)}var au=null,jT=!1,BD=!1;function sY(e){au===null?au=[e]:au.push(e)}function Aue(e){jT=!0,sY(e)}function Yd(){if(!BD&&au!==null){BD=!0;var e=0,t=Nn;try{var n=au;for(Nn=1;e>=s,i-=s,du=1<<32-rl(t)+i|n<O?(L=k,k=null):L=k.sibling;var N=p(_,k,x[O],E);if(N===null){k===null&&(k=L);break}e&&k&&N.alternate===null&&t(_,k),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N,k=L}if(O===x.length)return n(_,k),fr&&Oh(_,O),A;if(k===null){for(;OO?(L=k,k=null):L=k.sibling;var H=p(_,k,N.value,E);if(H===null){k===null&&(k=L);break}e&&k&&H.alternate===null&&t(_,k),b=o(H,b,O),R===null?A=H:R.sibling=H,R=H,k=L}if(N.done)return n(_,k),fr&&Oh(_,O),A;if(k===null){for(;!N.done;O++,N=x.next())N=h(_,N.value,E),N!==null&&(b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return fr&&Oh(_,O),A}for(k=r(_,k);!N.done;O++,N=x.next())N=g(k,_,O,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?O:N.key),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return e&&k.forEach(function(W){return t(_,W)}),fr&&Oh(_,O),A}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===_m&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Rw:e:{for(var A=x.key,R=b;R!==null;){if(R.key===A){if(A=x.type,A===_m){if(R.tag===7){n(_,R.sibling),b=i(R,x.props.children),b.return=_,_=b;break e}}else if(R.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qu&&gU(A)===R.type){n(_,R.sibling),b=i(R,x.props),b.ref=rb(_,R,x),b.return=_,_=b;break e}n(_,R);break}else t(_,R);R=R.sibling}x.type===_m?(b=np(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=TS(x.type,x.key,x.props,null,_.mode,E),E.ref=rb(_,b,x),E.return=_,_=E)}return s(_);case wm:e:{for(R=x.key;b!==null;){if(b.key===R)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=GD(x,_.mode,E),b.return=_,_=b}return s(_);case Qu:return R=x._init,S(_,b,R(x._payload),E)}if(Lb(x))return v(_,b,x,E);if(J0(x))return y(_,b,x,E);zw(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=WD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var gg=pY(!0),mY=pY(!1),G1={},Fl=Xd(G1),qx=Xd(G1),Xx=Xd(G1);function Yh(e){if(e===G1)throw Error(Oe(174));return e}function d4(e,t){switch(er(Xx,t),er(qx,e),er(Fl,G1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:b$(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=b$(t,e)}ur(Fl),er(Fl,t)}function vg(){ur(Fl),ur(qx),ur(Xx)}function gY(e){Yh(Xx.current);var t=Yh(Fl.current),n=b$(t,e.type);t!==n&&(er(qx,e),er(Fl,n))}function f4(e){qx.current===e&&(ur(Fl),ur(qx))}var Cr=Xd(0);function bE(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 $D=[];function h4(){for(var e=0;e<$D.length;e++)$D[e]._workInProgressVersionPrimary=null;$D.length=0}var wS=Iu.ReactCurrentDispatcher,FD=Iu.ReactCurrentBatchConfig,gp=0,Rr=null,li=null,mi=null,xE=!1,lx=!1,Yx=0,Iue=0;function qi(){throw Error(Oe(321))}function p4(e,t){if(t===null)return!1;for(var n=0;nn?n:4,e(!0);var r=FD.transition;FD.transition={};try{e(!1),t()}finally{Nn=n,FD.transition=r}}function OY(){return pa().memoizedState}function Oue(e,t,n){var r=Cd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MY(e))DY(t,n);else if(n=uY(e,t,n,r),n!==null){var i=Ao();il(n,e,r,i),LY(n,t,r)}}function Mue(e,t,n){var r=Cd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MY(e))DY(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,fl(l,s)){var c=t.interleaved;c===null?(i.next=i,c4(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=uY(e,t,i,r),n!==null&&(i=Ao(),il(n,e,r,i),LY(n,t,r))}}function MY(e){var t=e.alternate;return e===Rr||t!==null&&t===Rr}function DY(e,t){lx=xE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function LY(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y5(e,n)}}var wE={readContext:ha,useCallback:qi,useContext:qi,useEffect:qi,useImperativeHandle:qi,useInsertionEffect:qi,useLayoutEffect:qi,useMemo:qi,useReducer:qi,useRef:qi,useState:qi,useDebugValue:qi,useDeferredValue:qi,useTransition:qi,useMutableSource:qi,useSyncExternalStore:qi,useId:qi,unstable_isNewReconciler:!1},Due={readContext:ha,useCallback:function(e,t){return Tl().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:yU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_S(4194308,4,kY.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _S(4194308,4,e,t)},useInsertionEffect:function(e,t){return _S(4,2,e,t)},useMemo:function(e,t){var n=Tl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tl();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=Oue.bind(null,Rr,e),[r.memoizedState,e]},useRef:function(e){var t=Tl();return e={current:e},t.memoizedState=e},useState:vU,useDebugValue:y4,useDeferredValue:function(e){return Tl().memoizedState=e},useTransition:function(){var e=vU(!1),t=e[0];return e=Pue.bind(null,e[1]),Tl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rr,i=Tl();if(fr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),bi===null)throw Error(Oe(349));gp&30||bY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,yU(wY.bind(null,r,o,e),[e]),r.flags|=2048,Qx(9,xY.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Tl(),t=bi.identifierPrefix;if(fr){var n=fu,r=du;n=(r&~(1<<32-rl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yx++,0")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{wD=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Db(e):""}function dce(e){switch(e.tag){case 5:return Db(e.type);case 16:return Db("Lazy");case 13:return Db("Suspense");case 19:return Db("SuspenseList");case 0:case 2:case 15:return e=_D(e.type,!1),e;case 11:return e=_D(e.type.render,!1),e;case 1:return e=_D(e.type,!0),e;default:return""}}function p$(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 _m:return"Fragment";case wm:return"Portal";case d$:return"Profiler";case H5:return"StrictMode";case f$:return"Suspense";case h$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fX:return(e.displayName||"Context")+".Consumer";case dX:return(e._context.displayName||"Context")+".Provider";case W5:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G5:return t=e.displayName||null,t!==null?t:p$(e.type)||"Memo";case Qu:t=e._payload,e=e._init;try{return p$(e(t))}catch{}}return null}function fce(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 p$(t);case 8:return t===H5?"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 Ld(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hce(e){var t=pX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Iw(e){e._valueTracker||(e._valueTracker=hce(e))}function mX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nE(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 m$(e,t){var n=t.checked;return Ir({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function D6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ld(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 gX(e,t){t=t.checked,t!=null&&U5(e,"checked",t,!1)}function g$(e,t){gX(e,t);var n=Ld(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")?v$(e,t.type,n):t.hasOwnProperty("defaultValue")&&v$(e,t.type,Ld(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function L6(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 v$(e,t,n){(t!=="number"||nE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Lb=Array.isArray;function Gm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Pw.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bx(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rx={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},pce=["Webkit","ms","Moz","O"];Object.keys(rx).forEach(function(e){pce.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rx[t]=rx[e]})});function xX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rx.hasOwnProperty(e)&&rx[e]?(""+t).trim():t+"px"}function wX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mce=Ir({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 x$(e,t){if(t){if(mce[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function w$(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 _$=null;function V5(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var S$=null,Vm=null,qm=null;function $6(e){if(e=W1(e)){if(typeof S$!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=FT(t),S$(e.stateNode,e.type,t))}}function _X(e){Vm?qm?qm.push(e):qm=[e]:Vm=e}function SX(){if(Vm){var e=Vm,t=qm;if(qm=Vm=null,$6(e),t)for(e=0;e>>=0,e===0?32:31-(Tce(e)/kce|0)|0}var Ow=64,Mw=4194304;function Nb(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 sE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Nb(l):(o&=s,o!==0&&(r=Nb(o)))}else s=n&~i,s!==0?r=Nb(s):o!==0&&(r=Nb(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 U1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rl(t),e[t]=n}function Pce(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=ox),q6=String.fromCharCode(32),X6=!1;function HX(e,t){switch(e){case"keyup":return oue.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sm=!1;function aue(e,t){switch(e){case"compositionend":return WX(t);case"keypress":return t.which!==32?null:(X6=!0,q6);case"textInput":return e=t.data,e===q6&&X6?null:e;default:return null}}function lue(e,t){if(Sm)return e==="compositionend"||!e4&&HX(e,t)?(e=jX(),yS=Q5=ud=null,Sm=!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=J6(n)}}function XX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?XX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YX(){for(var e=window,t=nE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nE(e.document)}return t}function t4(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 vue(e){var t=YX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&XX(n.ownerDocument.documentElement,n)){if(r!==null&&t4(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=Z6(n,o);var s=Z6(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,Em=null,R$=null,ax=null,I$=!1;function eU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I$||Em==null||Em!==nE(r)||(r=Em,"selectionStart"in r&&t4(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}),ax&&Hx(ax,r)||(ax=r,r=cE(R$,"onSelect"),0km||(e.current=N$[km],N$[km]=null,km--)}function er(e,t){km++,N$[km]=e.current,e.current=t}var Nd={},io=Xd(Nd),Wo=Xd(!1),pp=Nd;function pg(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 Go(e){return e=e.childContextTypes,e!=null}function dE(){ur(Wo),ur(io)}function aU(e,t,n){if(io.current!==Nd)throw Error(Oe(168));er(io,t),er(Wo,n)}function iY(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(Oe(108,fce(e)||"Unknown",i));return Ir({},n,r)}function fE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nd,pp=io.current,er(io,e),er(Wo,Wo.current),!0}function lU(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=iY(e,t,pp),r.__reactInternalMemoizedMergedChildContext=e,ur(Wo),ur(io),er(io,e)):ur(Wo),er(Wo,n)}var au=null,zT=!1,ND=!1;function oY(e){au===null?au=[e]:au.push(e)}function Rue(e){zT=!0,oY(e)}function Yd(){if(!ND&&au!==null){ND=!0;var e=0,t=Nn;try{var n=au;for(Nn=1;e>=s,i-=s,du=1<<32-rl(t)+i|n<O?(L=k,k=null):L=k.sibling;var N=p(_,k,x[O],E);if(N===null){k===null&&(k=L);break}e&&k&&N.alternate===null&&t(_,k),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N,k=L}if(O===x.length)return n(_,k),fr&&Oh(_,O),A;if(k===null){for(;OO?(L=k,k=null):L=k.sibling;var H=p(_,k,N.value,E);if(H===null){k===null&&(k=L);break}e&&k&&H.alternate===null&&t(_,k),b=o(H,b,O),R===null?A=H:R.sibling=H,R=H,k=L}if(N.done)return n(_,k),fr&&Oh(_,O),A;if(k===null){for(;!N.done;O++,N=x.next())N=h(_,N.value,E),N!==null&&(b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return fr&&Oh(_,O),A}for(k=r(_,k);!N.done;O++,N=x.next())N=g(k,_,O,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?O:N.key),b=o(N,b,O),R===null?A=N:R.sibling=N,R=N);return e&&k.forEach(function(W){return t(_,W)}),fr&&Oh(_,O),A}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===_m&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Rw:e:{for(var A=x.key,R=b;R!==null;){if(R.key===A){if(A=x.type,A===_m){if(R.tag===7){n(_,R.sibling),b=i(R,x.props.children),b.return=_,_=b;break e}}else if(R.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qu&&mU(A)===R.type){n(_,R.sibling),b=i(R,x.props),b.ref=rb(_,R,x),b.return=_,_=b;break e}n(_,R);break}else t(_,R);R=R.sibling}x.type===_m?(b=np(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=TS(x.type,x.key,x.props,null,_.mode,E),E.ref=rb(_,b,x),E.return=_,_=E)}return s(_);case wm:e:{for(R=x.key;b!==null;){if(b.key===R)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=WD(x,_.mode,E),b.return=_,_=b}return s(_);case Qu:return R=x._init,S(_,b,R(x._payload),E)}if(Lb(x))return v(_,b,x,E);if(J0(x))return y(_,b,x,E);zw(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,x),b.return=_,_=b):(n(_,b),b=HD(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var gg=hY(!0),pY=hY(!1),G1={},jl=Xd(G1),qx=Xd(G1),Xx=Xd(G1);function Yh(e){if(e===G1)throw Error(Oe(174));return e}function u4(e,t){switch(er(Xx,t),er(qx,e),er(jl,G1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:b$(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=b$(t,e)}ur(jl),er(jl,t)}function vg(){ur(jl),ur(qx),ur(Xx)}function mY(e){Yh(Xx.current);var t=Yh(jl.current),n=b$(t,e.type);t!==n&&(er(qx,e),er(jl,n))}function d4(e){qx.current===e&&(ur(jl),ur(qx))}var Cr=Xd(0);function yE(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 BD=[];function f4(){for(var e=0;en?n:4,e(!0);var r=$D.transition;$D.transition={};try{e(!1),t()}finally{Nn=n,$D.transition=r}}function PY(){return pa().memoizedState}function Mue(e,t,n){var r=Cd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},OY(e))MY(t,n);else if(n=cY(e,t,n,r),n!==null){var i=Ao();il(n,e,r,i),DY(n,t,r)}}function Due(e,t,n){var r=Cd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(OY(e))MY(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,hl(l,s)){var c=t.interleaved;c===null?(i.next=i,l4(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=cY(e,t,i,r),n!==null&&(i=Ao(),il(n,e,r,i),DY(n,t,r))}}function OY(e){var t=e.alternate;return e===Rr||t!==null&&t===Rr}function MY(e,t){lx=bE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function DY(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,X5(e,n)}}var xE={readContext:ha,useCallback:qi,useContext:qi,useEffect:qi,useImperativeHandle:qi,useInsertionEffect:qi,useLayoutEffect:qi,useMemo:qi,useReducer:qi,useRef:qi,useState:qi,useDebugValue:qi,useDeferredValue:qi,useTransition:qi,useMutableSource:qi,useSyncExternalStore:qi,useId:qi,unstable_isNewReconciler:!1},Lue={readContext:ha,useCallback:function(e,t){return Al().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:vU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_S(4194308,4,TY.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _S(4194308,4,e,t)},useInsertionEffect:function(e,t){return _S(4,2,e,t)},useMemo:function(e,t){var n=Al();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Al();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=Mue.bind(null,Rr,e),[r.memoizedState,e]},useRef:function(e){var t=Al();return e={current:e},t.memoizedState=e},useState:gU,useDebugValue:v4,useDeferredValue:function(e){return Al().memoizedState=e},useTransition:function(){var e=gU(!1),t=e[0];return e=Oue.bind(null,e[1]),Al().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rr,i=Al();if(fr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),xi===null)throw Error(Oe(349));gp&30||yY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vU(xY.bind(null,r,o,e),[e]),r.flags|=2048,Qx(9,bY.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Al(),t=xi.identifierPrefix;if(fr){var n=fu,r=du;n=(r&~(1<<32-rl(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[Ml]=t,e[Vx]=r,WY(e,t,!1,!1),t.stateNode=e;e:{switch(s=w$(n,r),n){case"dialog":cr("cancel",e),cr("close",e),i=r;break;case"iframe":case"object":case"embed":cr("load",e),i=r;break;case"video":case"audio":for(i=0;ibg&&(t.flags|=128,r=!0,ib(o,!1),t.lanes=4194304)}else{if(!r)if(e=bE(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ib(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Xi(t),null}else 2*Hr()-o.renderingStartTime>bg&&n!==1073741824&&(t.flags|=128,r=!0,ib(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,er(Cr,r?n&1|2:n&1),t):(Xi(t),null);case 22:case 23:return E4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ws&1073741824&&(Xi(t),t.subtreeFlags&6&&(t.flags|=8192)):Xi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Uue(e,t){switch(i4(t),t.tag){case 1:return Go(t.type)&&fE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vg(),ur(Wo),ur(io),h4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return f4(t),null;case 13:if(ur(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));mg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ur(Cr),null;case 4:return vg(),null;case 10:return l4(t.type._context),null;case 22:case 23:return E4(),null;case 24:return null;default:return null}}var Uw=!1,Qi=!1,Hue=typeof WeakSet=="function"?WeakSet:Set,st=null;function Pm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Br(e,t,r)}else n.current=null}function Y$(e,t,n){try{n()}catch(r){Br(e,t,r)}}var kU=!1;function Wue(e,t){if(P$=lE,e=KX(),n4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(O$={focusedElem:e,selectionRange:n},lE=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Wa(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(E){Br(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=kU,kU=!1,v}function cx(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&&Y$(t,n,o)}i=i.next}while(i!==r)}}function WT(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 K$(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 qY(e){var t=e.alternate;t!==null&&(e.alternate=null,qY(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ml],delete t[Vx],delete t[L$],delete t[Tue],delete t[kue])),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 XY(e){return e.tag===5||e.tag===3||e.tag===4}function AU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XY(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 Q$(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=dE));else if(r!==4&&(e=e.child,e!==null))for(Q$(e,t,n),e=e.sibling;e!==null;)Q$(e,t,n),e=e.sibling}function J$(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(J$(e,t,n),e=e.sibling;e!==null;)J$(e,t,n),e=e.sibling}var Ni=null,Va=!1;function ju(e,t,n){for(n=n.child;n!==null;)YY(e,t,n),n=n.sibling}function YY(e,t,n){if($l&&typeof $l.onCommitFiberUnmount=="function")try{$l.onCommitFiberUnmount(NT,n)}catch{}switch(n.tag){case 5:Qi||Pm(n,t);case 6:var r=Ni,i=Va;Ni=null,ju(e,t,n),Ni=r,Va=i,Ni!==null&&(Va?(e=Ni,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ni.removeChild(n.stateNode));break;case 18:Ni!==null&&(Va?(e=Ni,n=n.stateNode,e.nodeType===8?ND(e.parentNode,n):e.nodeType===1&&ND(e,n),jx(e)):ND(Ni,n.stateNode));break;case 4:r=Ni,i=Va,Ni=n.stateNode.containerInfo,Va=!0,ju(e,t,n),Ni=r,Va=i;break;case 0:case 11:case 14:case 15:if(!Qi&&(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)&&Y$(n,t,s),i=i.next}while(i!==r)}ju(e,t,n);break;case 1:if(!Qi&&(Pm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Br(n,t,l)}ju(e,t,n);break;case 21:ju(e,t,n);break;case 22:n.mode&1?(Qi=(r=Qi)||n.memoizedState!==null,ju(e,t,n),Qi=r):ju(e,t,n);break;default:ju(e,t,n)}}function RU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hue),t.forEach(function(r){var i=Zue.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Na(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vue(r/1960))-r,10e?16:e,dd===null)var r=!1;else{if(e=dd,dd=null,EE=0,xn&6)throw Error(Oe(331));var i=xn;for(xn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-_4?tp(e,0):w4|=n),Vo(e,t)}function rK(e,t){t===0&&(e.mode&1?(t=Mw,Mw<<=1,!(Mw&130023424)&&(Mw=4194304)):t=1);var n=Ao();e=_u(e,t),e!==null&&(U1(e,t,n),Vo(e,n))}function Jue(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rK(e,n)}function Zue(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(Oe(314))}r!==null&&r.delete(t),rK(e,n)}var iK;iK=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wo.current)jo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jo=!1,zue(e,t,n);jo=!!(e.flags&131072)}else jo=!1,fr&&t.flags&1048576&&aY(t,mE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;SS(e,t),e=t.pendingProps;var i=pg(t,io.current);Ym(t,n),i=m4(null,t,r,e,i,n);var o=g4();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,Go(r)?(o=!0,hE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,u4(t),i.updater=UT,t.stateNode=i,i._reactInternals=t,U$(t,r,e,n),t=G$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&r4(t),So(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(SS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=tde(r),e=Wa(r,e),i){case 0:t=W$(null,t,r,e,n);break e;case 1:t=EU(null,t,r,e,n);break e;case 11:t=_U(null,t,r,e,n);break e;case 14:t=SU(null,t,r,Wa(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),W$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),EU(e,t,r,i,n);case 3:e:{if(jY(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,dY(e,t),yE(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=yg(Error(Oe(423)),t),t=CU(e,t,r,n,i);break e}else if(r!==i){i=yg(Error(Oe(424)),t),t=CU(e,t,r,n,i);break e}else for(Ts=_d(t.stateNode.containerInfo.firstChild),Is=t,fr=!0,Xa=null,n=mY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mg(),r===i){t=Su(e,t,n);break e}So(e,t,r,n)}t=t.child}return t;case 5:return gY(t),e===null&&F$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,M$(r,i)?s=null:o!==null&&M$(r,o)&&(t.flags|=32),zY(e,t),So(e,t,s,n),t.child;case 6:return e===null&&F$(t),null;case 13:return UY(e,t,n);case 4:return d4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gg(t,null,r,n):So(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),_U(e,t,r,i,n);case 7:return So(e,t,t.pendingProps,n),t.child;case 8:return So(e,t,t.pendingProps.children,n),t.child;case 12:return So(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,er(gE,r._currentValue),r._currentValue=s,o!==null)if(fl(o.value,s)){if(o.children===i.children&&!Wo.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=gu(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),z$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Oe(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),z$(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}So(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ym(t,n),i=ha(i),r=r(i),t.flags|=1,So(e,t,r,n),t.child;case 14:return r=t.type,i=Wa(r,t.pendingProps),i=Wa(r.type,i),SU(e,t,r,i,n);case 15:return $Y(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),SS(e,t),t.tag=1,Go(r)?(e=!0,hE(t)):e=!1,Ym(t,n),hY(t,r,i),U$(t,r,i,n),G$(null,t,r,!0,e,n);case 19:return HY(e,t,n);case 22:return FY(e,t,n)}throw Error(Oe(156,t.tag))};function oK(e,t){return PX(e,t)}function ede(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 na(e,t,n,r){return new ede(e,t,n,r)}function T4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tde(e){if(typeof e=="function")return T4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G5)return 11;if(e===V5)return 14}return 2}function Td(e,t){var n=e.alternate;return n===null?(n=na(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 TS(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")T4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _m:return np(n.children,i,o,t);case W5:s=8,i|=8;break;case d$:return e=na(12,n,t,i|2),e.elementType=d$,e.lanes=o,e;case f$:return e=na(13,n,t,i),e.elementType=f$,e.lanes=o,e;case h$:return e=na(19,n,t,i),e.elementType=h$,e.lanes=o,e;case pX:return VT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fX:s=10;break e;case hX:s=9;break e;case G5:s=11;break e;case V5:s=14;break e;case Qu:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=na(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function np(e,t,n,r){return e=na(7,e,r,t),e.lanes=n,e}function VT(e,t,n,r){return e=na(22,e,r,t),e.elementType=pX,e.lanes=n,e.stateNode={isHidden:!1},e}function WD(e,t,n){return e=na(6,e,null,t),e.lanes=n,e}function GD(e,t,n){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nde(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=CD(0),this.expirationTimes=CD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CD(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k4(e,t,n,r,i,o,s,l,c){return e=new nde(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},u4(o),e}function rde(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cK)}catch(e){console.error(e)}}cK(),aX.exports=Hs;var Zg=aX.exports;const Mm=js(Zg),BU={disabled:!1},kE=de.createContext(null);var lde=function(t){return t.scrollTop},$b="unmounted",Dh="exited",Lh="entering",am="entered",rF="exiting",Pu=function(e){LT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=Dh,o.appearStatus=Lh):c=am:r.unmountOnExit||r.mountOnEnter?c=$b:c=Dh,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===$b?{status:Dh}: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!==Lh&&s!==am&&(o=Lh):(s===Lh||s===am)&&(o=rF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Lh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Mm.findDOMNode(this);s&&lde(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Dh&&this.setState({status:$b})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Mm.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||BU.disabled){this.safeSetState({status:am},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:Lh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:am},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Mm.findDOMNode(this);if(!o||BU.disabled){this.safeSetState({status:Dh},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:rF},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Dh},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Mm.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===$b)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(kE.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);Pu.contextType=kE;Pu.propTypes={};function Yp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yp,onEntering:Yp,onEntered:Yp,onExit:Yp,onExiting:Yp,onExited:Yp};Pu.UNMOUNTED=$b;Pu.EXITED=Dh;Pu.ENTERING=Lh;Pu.ENTERED=am;Pu.EXITING=rF;const P4=Pu;function cde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O4(e,t){var n=function(o){return t&&I.isValidElement(o)?t(o):o},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function ude(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function xg(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 gde(e){return _t("MuiCollapse",e)}Ct("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const vde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],yde=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Et(r,gde,n)},bde=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),xde=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),wde=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),dK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=iX.standard,TransitionComponent:E=P4}=r,A=Le(r,vde),R=$({},r,{orientation:_,collapsedSize:l}),k=yde(R),O=In(),L=I.useRef(),N=I.useRef(null),H=I.useRef(),W=typeof l=="number"?`${l}px`:l,z=_==="horizontal",D=z?"width":"height";I.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=I.useRef(null),j=mr(n,F),V=Q=>ae=>{if(Q){const le=F.current;ae===void 0?Q(le):Q(le,ae)}},G=()=>N.current?N.current[z?"clientWidth":"clientHeight"]:0,K=V((Q,ae)=>{N.current&&z&&(N.current.style.position="absolute"),Q.style[D]=W,h&&h(Q,ae)}),Y=V((Q,ae)=>{const le=G();N.current&&z&&(N.current.style.position="");const{duration:he,easing:pe}=xg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=O.transitions.getAutoHeightDuration(le);Q.style.transitionDuration=`${ve}ms`,H.current=ve}else Q.style.transitionDuration=typeof he=="string"?he:`${he}ms`;Q.style[D]=`${le}px`,Q.style.transitionTimingFunction=pe,g&&g(Q,ae)}),J=V((Q,ae)=>{Q.style[D]="auto",p&&p(Q,ae)}),ie=V(Q=>{Q.style[D]=`${G()}px`,v&&v(Q)}),ce=V(y),ue=V(Q=>{const ae=G(),{duration:le,easing:he}=xg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=O.transitions.getAutoHeightDuration(ae);Q.style.transitionDuration=`${pe}ms`,H.current=pe}else Q.style.transitionDuration=typeof le=="string"?le:`${le}ms`;Q.style[D]=W,Q.style.transitionTimingFunction=he,S&&S(Q)}),se=Q=>{x==="auto"&&(L.current=setTimeout(Q,H.current||0)),i&&i(F.current,Q)};return C.jsx(E,$({in:f,onEnter:K,onEntered:J,onEntering:Y,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(Q,ae)=>C.jsx(bde,$({as:c,className:Fe(k.root,s,{entered:k.entered,exited:!f&&W==="0px"&&k.hidden}[Q]),style:$({[z?"minWidth":"minHeight"]:W},b),ownerState:$({},R,{state:Q}),ref:j},ae,{children:C.jsx(xde,{ownerState:$({},R,{state:Q}),className:k.wrapper,ref:N,children:C.jsx(wde,{ownerState:$({},R,{state:Q}),className:k.wrapperInner,children:o})})}))}))});dK.muiSupportAuto=!0;const VD=dK;function _de(e){return _t("MuiPaper",e)}Ct("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 Sde=["className","component","elevation","square","variant"],Ede=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Et(o,_de,i)},Cde=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${wn("#fff",I6(t.elevation))}, ${wn("#fff",I6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),Tde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,Sde),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=Ede(f);return C.jsx(Cde,$({as:o,ownerState:f,className:Fe(h.root,i),ref:n},d))}),ev=Tde;function kde(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=I.useState(!1),p=Fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Fe(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),I.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Ade=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ks=Ade,Rde=["center","classes","className"];let QT=e=>e,$U,FU,zU,jU;const iF=550,Ide=80,Pde=tc($U||($U=QT` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function jD(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function H$(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $ue=typeof WeakMap=="function"?WeakMap:Map;function LY(e,t,n){n=gu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_E||(_E=!0,Z$=r),H$(e,t)},n}function NY(e,t,n){n=gu(-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(){H$(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){H$(e,t),typeof r!="function"&&(Ed===null?Ed=new Set([this]):Ed.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function yU(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $ue;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=Jue.bind(null,e,t,n),t.then(e,e))}function bU(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 xU(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=gu(-1,1),t.tag=2,Sd(n,t,1))),n.lanes|=1),e)}var Fue=Iu.ReactCurrentOwner,jo=!1;function So(e,t,n,r){t.child=e===null?pY(t,null,n,r):gg(t,e.child,n,r)}function wU(e,t,n,r,i){n=n.render;var o=t.ref;return Ym(t,i),r=p4(e,t,n,r,o,i),n=m4(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(fr&&n&&n4(t),t.flags|=1,So(e,t,r,i),t.child)}function _U(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!C4(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,BY(e,t,o,r,i)):(e=TS(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:Hx,n(s,r)&&e.ref===t.ref)return Su(e,t,i)}return t.flags|=1,e=Td(o,r),e.ref=t.ref,e.return=t,t.child=e}function BY(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Hx(o,r)&&e.ref===t.ref)if(jo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(jo=!0);else return t.lanes=e.lanes,Su(e,t,i)}return W$(e,t,n,r,i)}function $Y(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},er(Om,ws),ws|=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,er(Om,ws),ws|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,er(Om,ws),ws|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,er(Om,ws),ws|=r;return So(e,t,i,n),t.child}function FY(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function W$(e,t,n,r,i){var o=Go(n)?pp:io.current;return o=pg(t,o),Ym(t,i),n=p4(e,t,n,r,o,i),r=m4(),e!==null&&!jo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(fr&&r&&n4(t),t.flags|=1,So(e,t,n,i),t.child)}function SU(e,t,n,r,i){if(Go(n)){var o=!0;fE(t)}else o=!1;if(Ym(t,i),t.stateNode===null)SS(e,t),fY(t,n,r),U$(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=ha(d):(d=Go(n)?pp:io.current,d=pg(t,d));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==d)&&pU(t,s,r,d),Ju=!1;var p=t.memoizedState;s.state=p,vE(t,r,s,i),c=t.memoizedState,l!==r||p!==c||Wo.current||Ju?(typeof f=="function"&&(j$(t,n,f,r),c=t.memoizedState),(l=Ju||hU(t,n,l,r,p,c,d))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=d,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,uY(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:Wa(t.type,l),s.props=d,h=t.pendingProps,p=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=ha(c):(c=Go(n)?pp:io.current,c=pg(t,c));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||p!==c)&&pU(t,s,r,c),Ju=!1,p=t.memoizedState,s.state=p,vE(t,r,s,i);var v=t.memoizedState;l!==h||p!==v||Wo.current||Ju?(typeof g=="function"&&(j$(t,n,g,r),v=t.memoizedState),(d=Ju||hU(t,n,d,r,p,v,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=c,r=d):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return G$(e,t,n,r,o,i)}function G$(e,t,n,r,i,o){FY(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&lU(t,n,!1),Su(e,t,o);r=t.stateNode,Fue.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=gg(t,e.child,null,o),t.child=gg(t,null,l,o)):So(e,t,l,o),t.memoizedState=r.state,i&&lU(t,n,!0),t.child}function zY(e){var t=e.stateNode;t.pendingContext?aU(e,t.pendingContext,t.pendingContext!==t.context):t.context&&aU(e,t.context,!1),u4(e,t.containerInfo)}function EU(e,t,n,r,i){return mg(),i4(i),t.flags|=256,So(e,t,n,r),t.child}var V$={dehydrated:null,treeContext:null,retryLane:0};function q$(e){return{baseLanes:e,cachePool:null,transitions:null}}function jY(e,t,n){var r=t.pendingProps,i=Cr.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),er(Cr,i&1),e===null)return F$(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=GT(s,r,0,null),e=np(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=q$(n),t.memoizedState=V$,e):y4(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return zue(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Td(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Td(l,o):(o=np(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?q$(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=V$,r}return o=e.child,e=o.sibling,r=Td(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 y4(e,t){return t=GT({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jw(e,t,n,r){return r!==null&&i4(r),gg(t,e.child,null,n),e=y4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zue(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=jD(Error(Oe(422))),jw(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=GT({mode:"visible",children:r.children},i,0,null),o=np(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&gg(t,e.child,null,s),t.child.memoizedState=q$(s),t.memoizedState=V$,o);if(!(t.mode&1))return jw(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(Oe(419)),r=jD(o,r,void 0),jw(e,t,s,r)}if(l=(s&e.childLanes)!==0,jo||l){if(r=xi,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,_u(e,i),il(r,e,i,-1))}return E4(),r=jD(Error(Oe(421))),jw(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Zue.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ts=_d(i.nextSibling),Is=t,fr=!0,Xa=null,e!==null&&(Qs[Js++]=du,Qs[Js++]=fu,Qs[Js++]=mp,du=e.id,fu=e.overflow,mp=t),t=y4(t,r.children),t.flags|=4096,t)}function CU(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),z$(e.return,t,n)}function UD(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 UY(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(So(e,t,r.children,n),r=Cr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&CU(e,n,t);else if(e.tag===19)CU(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(er(Cr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&yE(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),UD(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&&yE(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}UD(t,!0,n,null,o);break;case"together":UD(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function SS(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Su(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vp|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Td(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Td(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jue(e,t,n){switch(t.tag){case 3:zY(t),mg();break;case 5:mY(t);break;case 1:Go(t.type)&&fE(t);break;case 4:u4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;er(mE,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(er(Cr,Cr.current&1),t.flags|=128,null):n&t.child.childLanes?jY(e,t,n):(er(Cr,Cr.current&1),e=Su(e,t,n),e!==null?e.sibling:null);er(Cr,Cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return UY(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),er(Cr,Cr.current),r)break;return null;case 22:case 23:return t.lanes=0,$Y(e,t,n)}return Su(e,t,n)}var HY,X$,WY,GY;HY=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}};X$=function(){};WY=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yh(jl.current);var o=null;switch(n){case"input":i=m$(e,i),r=m$(e,r),o=[];break;case"select":i=Ir({},i,{value:void 0}),r=Ir({},r,{value:void 0}),o=[];break;case"textarea":i=y$(e,i),r=y$(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=uE)}x$(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var l=i[d];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Nx.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(l=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Nx.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&cr("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};GY=function(e,t,n,r){n!==r&&(t.flags|=4)};function ib(e,t){if(!fr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xi(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 Uue(e,t,n){var r=t.pendingProps;switch(r4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xi(t),null;case 1:return Go(t.type)&&dE(),Xi(t),null;case 3:return r=t.stateNode,vg(),ur(Wo),ur(io),f4(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fw(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xa!==null&&(nF(Xa),Xa=null))),X$(e,t),Xi(t),null;case 5:d4(t);var i=Yh(Xx.current);if(n=t.type,e!==null&&t.stateNode!=null)WY(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Xi(t),null}if(e=Yh(jl.current),Fw(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ll]=t,r[Vx]=o,e=(t.mode&1)!==0,n){case"dialog":cr("cancel",r),cr("close",r);break;case"iframe":case"object":case"embed":cr("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[Ll]=t,e[Vx]=r,HY(e,t,!1,!1),t.stateNode=e;e:{switch(s=w$(n,r),n){case"dialog":cr("cancel",e),cr("close",e),i=r;break;case"iframe":case"object":case"embed":cr("load",e),i=r;break;case"video":case"audio":for(i=0;ibg&&(t.flags|=128,r=!0,ib(o,!1),t.lanes=4194304)}else{if(!r)if(e=yE(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ib(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Xi(t),null}else 2*Hr()-o.renderingStartTime>bg&&n!==1073741824&&(t.flags|=128,r=!0,ib(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,n=Cr.current,er(Cr,r?n&1|2:n&1),t):(Xi(t),null);case 22:case 23:return S4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ws&1073741824&&(Xi(t),t.subtreeFlags&6&&(t.flags|=8192)):Xi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Hue(e,t){switch(r4(t),t.tag){case 1:return Go(t.type)&&dE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vg(),ur(Wo),ur(io),f4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return d4(t),null;case 13:if(ur(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));mg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ur(Cr),null;case 4:return vg(),null;case 10:return a4(t.type._context),null;case 22:case 23:return S4(),null;case 24:return null;default:return null}}var Uw=!1,Qi=!1,Wue=typeof WeakSet=="function"?WeakSet:Set,st=null;function Pm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Br(e,t,r)}else n.current=null}function Y$(e,t,n){try{n()}catch(r){Br(e,t,r)}}var TU=!1;function Gue(e,t){if(P$=aE,e=YX(),t4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++d===i&&(l=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(O$={focusedElem:e,selectionRange:n},aE=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:Wa(t.type,y),S);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(E){Br(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=TU,TU=!1,v}function cx(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&&Y$(t,n,o)}i=i.next}while(i!==r)}}function HT(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 K$(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 VY(e){var t=e.alternate;t!==null&&(e.alternate=null,VY(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ll],delete t[Vx],delete t[L$],delete t[kue],delete t[Aue])),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 qY(e){return e.tag===5||e.tag===3||e.tag===4}function kU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qY(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 Q$(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=uE));else if(r!==4&&(e=e.child,e!==null))for(Q$(e,t,n),e=e.sibling;e!==null;)Q$(e,t,n),e=e.sibling}function J$(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(J$(e,t,n),e=e.sibling;e!==null;)J$(e,t,n),e=e.sibling}var Bi=null,Va=!1;function ju(e,t,n){for(n=n.child;n!==null;)XY(e,t,n),n=n.sibling}function XY(e,t,n){if(zl&&typeof zl.onCommitFiberUnmount=="function")try{zl.onCommitFiberUnmount(LT,n)}catch{}switch(n.tag){case 5:Qi||Pm(n,t);case 6:var r=Bi,i=Va;Bi=null,ju(e,t,n),Bi=r,Va=i,Bi!==null&&(Va?(e=Bi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bi.removeChild(n.stateNode));break;case 18:Bi!==null&&(Va?(e=Bi,n=n.stateNode,e.nodeType===8?LD(e.parentNode,n):e.nodeType===1&&LD(e,n),jx(e)):LD(Bi,n.stateNode));break;case 4:r=Bi,i=Va,Bi=n.stateNode.containerInfo,Va=!0,ju(e,t,n),Bi=r,Va=i;break;case 0:case 11:case 14:case 15:if(!Qi&&(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)&&Y$(n,t,s),i=i.next}while(i!==r)}ju(e,t,n);break;case 1:if(!Qi&&(Pm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Br(n,t,l)}ju(e,t,n);break;case 21:ju(e,t,n);break;case 22:n.mode&1?(Qi=(r=Qi)||n.memoizedState!==null,ju(e,t,n),Qi=r):ju(e,t,n);break;default:ju(e,t,n)}}function AU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Wue),t.forEach(function(r){var i=ede.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Na(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Hr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*que(r/1960))-r,10e?16:e,dd===null)var r=!1;else{if(e=dd,dd=null,SE=0,wn&6)throw Error(Oe(331));var i=wn;for(wn|=4,st=e.current;st!==null;){var o=st,s=o.child;if(st.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cHr()-w4?tp(e,0):x4|=n),Vo(e,t)}function nK(e,t){t===0&&(e.mode&1?(t=Mw,Mw<<=1,!(Mw&130023424)&&(Mw=4194304)):t=1);var n=Ao();e=_u(e,t),e!==null&&(U1(e,t,n),Vo(e,n))}function Zue(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nK(e,n)}function ede(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(Oe(314))}r!==null&&r.delete(t),nK(e,n)}var rK;rK=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wo.current)jo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jo=!1,jue(e,t,n);jo=!!(e.flags&131072)}else jo=!1,fr&&t.flags&1048576&&sY(t,pE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;SS(e,t),e=t.pendingProps;var i=pg(t,io.current);Ym(t,n),i=p4(null,t,r,e,i,n);var o=m4();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,Go(r)?(o=!0,fE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c4(t),i.updater=jT,t.stateNode=i,i._reactInternals=t,U$(t,r,e,n),t=G$(null,t,r,!0,o,n)):(t.tag=0,fr&&o&&n4(t),So(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(SS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nde(r),e=Wa(r,e),i){case 0:t=W$(null,t,r,e,n);break e;case 1:t=SU(null,t,r,e,n);break e;case 11:t=wU(null,t,r,e,n);break e;case 14:t=_U(null,t,r,Wa(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),W$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),SU(e,t,r,i,n);case 3:e:{if(zY(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,uY(e,t),vE(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=yg(Error(Oe(423)),t),t=EU(e,t,r,n,i);break e}else if(r!==i){i=yg(Error(Oe(424)),t),t=EU(e,t,r,n,i);break e}else for(Ts=_d(t.stateNode.containerInfo.firstChild),Is=t,fr=!0,Xa=null,n=pY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mg(),r===i){t=Su(e,t,n);break e}So(e,t,r,n)}t=t.child}return t;case 5:return mY(t),e===null&&F$(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,M$(r,i)?s=null:o!==null&&M$(r,o)&&(t.flags|=32),FY(e,t),So(e,t,s,n),t.child;case 6:return e===null&&F$(t),null;case 13:return jY(e,t,n);case 4:return u4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gg(t,null,r,n):So(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),wU(e,t,r,i,n);case 7:return So(e,t,t.pendingProps,n),t.child;case 8:return So(e,t,t.pendingProps.children,n),t.child;case 12:return So(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,er(mE,r._currentValue),r._currentValue=s,o!==null)if(hl(o.value,s)){if(o.children===i.children&&!Wo.current){t=Su(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=gu(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),z$(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Oe(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),z$(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}So(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ym(t,n),i=ha(i),r=r(i),t.flags|=1,So(e,t,r,n),t.child;case 14:return r=t.type,i=Wa(r,t.pendingProps),i=Wa(r.type,i),_U(e,t,r,i,n);case 15:return BY(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wa(r,i),SS(e,t),t.tag=1,Go(r)?(e=!0,fE(t)):e=!1,Ym(t,n),fY(t,r,i),U$(t,r,i,n),G$(null,t,r,!0,e,n);case 19:return UY(e,t,n);case 22:return $Y(e,t,n)}throw Error(Oe(156,t.tag))};function iK(e,t){return IX(e,t)}function tde(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 na(e,t,n,r){return new tde(e,t,n,r)}function C4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nde(e){if(typeof e=="function")return C4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W5)return 11;if(e===G5)return 14}return 2}function Td(e,t){var n=e.alternate;return n===null?(n=na(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 TS(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")C4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _m:return np(n.children,i,o,t);case H5:s=8,i|=8;break;case d$:return e=na(12,n,t,i|2),e.elementType=d$,e.lanes=o,e;case f$:return e=na(13,n,t,i),e.elementType=f$,e.lanes=o,e;case h$:return e=na(19,n,t,i),e.elementType=h$,e.lanes=o,e;case hX:return GT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dX:s=10;break e;case fX:s=9;break e;case W5:s=11;break e;case G5:s=14;break e;case Qu:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=na(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function np(e,t,n,r){return e=na(7,e,r,t),e.lanes=n,e}function GT(e,t,n,r){return e=na(22,e,r,t),e.elementType=hX,e.lanes=n,e.stateNode={isHidden:!1},e}function HD(e,t,n){return e=na(6,e,null,t),e.lanes=n,e}function WD(e,t,n){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rde(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=ED(0),this.expirationTimes=ED(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ED(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function T4(e,t,n,r,i,o,s,l,c){return e=new rde(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},c4(o),e}function ide(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lK)}catch(e){console.error(e)}}lK(),sX.exports=Hs;var Zg=sX.exports;const Mm=js(Zg),NU={disabled:!1},TE=de.createContext(null);var cde=function(t){return t.scrollTop},$b="unmounted",Dh="exited",Lh="entering",am="entered",rF="exiting",Pu=function(e){DT(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=Dh,o.appearStatus=Lh):c=am:r.unmountOnExit||r.mountOnEnter?c=$b:c=Dh,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===$b?{status:Dh}: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!==Lh&&s!==am&&(o=Lh):(s===Lh||s===am)&&(o=rF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Lh){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Mm.findDOMNode(this);s&&cde(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Dh&&this.setState({status:$b})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Mm.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||NU.disabled){this.safeSetState({status:am},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:Lh},function(){o.props.onEntering(d,f),o.onTransitionEnd(p,function(){o.safeSetState({status:am},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Mm.findDOMNode(this);if(!o||NU.disabled){this.safeSetState({status:Dh},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:rF},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Dh},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Mm.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===$b)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=Le(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(TE.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);Pu.contextType=TE;Pu.propTypes={};function Yp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yp,onEntering:Yp,onEntered:Yp,onExit:Yp,onExiting:Yp,onExited:Yp};Pu.UNMOUNTED=$b;Pu.EXITED=Dh;Pu.ENTERING=Lh;Pu.ENTERED=am;Pu.EXITING=rF;const I4=Pu;function ude(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P4(e,t){var n=function(o){return t&&I.isValidElement(o)?t(o):o},r=Object.create(null);return e&&I.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function dde(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function xg(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 vde(e){return _t("MuiCollapse",e)}Ct("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const yde=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],bde=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Et(r,vde,n)},xde=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),wde=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),_de=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),uK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=rX.standard,TransitionComponent:E=I4}=r,A=Le(r,yde),R=$({},r,{orientation:_,collapsedSize:l}),k=bde(R),O=Cn(),L=I.useRef(),N=I.useRef(null),H=I.useRef(),W=typeof l=="number"?`${l}px`:l,z=_==="horizontal",D=z?"width":"height";I.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=I.useRef(null),j=mr(n,F),V=Q=>ae=>{if(Q){const le=F.current;ae===void 0?Q(le):Q(le,ae)}},G=()=>N.current?N.current[z?"clientWidth":"clientHeight"]:0,K=V((Q,ae)=>{N.current&&z&&(N.current.style.position="absolute"),Q.style[D]=W,h&&h(Q,ae)}),Y=V((Q,ae)=>{const le=G();N.current&&z&&(N.current.style.position="");const{duration:he,easing:pe}=xg({style:b,timeout:x,easing:d},{mode:"enter"});if(x==="auto"){const ve=O.transitions.getAutoHeightDuration(le);Q.style.transitionDuration=`${ve}ms`,H.current=ve}else Q.style.transitionDuration=typeof he=="string"?he:`${he}ms`;Q.style[D]=`${le}px`,Q.style.transitionTimingFunction=pe,g&&g(Q,ae)}),J=V((Q,ae)=>{Q.style[D]="auto",p&&p(Q,ae)}),ie=V(Q=>{Q.style[D]=`${G()}px`,v&&v(Q)}),ce=V(y),ue=V(Q=>{const ae=G(),{duration:le,easing:he}=xg({style:b,timeout:x,easing:d},{mode:"exit"});if(x==="auto"){const pe=O.transitions.getAutoHeightDuration(ae);Q.style.transitionDuration=`${pe}ms`,H.current=pe}else Q.style.transitionDuration=typeof le=="string"?le:`${le}ms`;Q.style[D]=W,Q.style.transitionTimingFunction=he,S&&S(Q)}),se=Q=>{x==="auto"&&(L.current=setTimeout(Q,H.current||0)),i&&i(F.current,Q)};return C.jsx(E,$({in:f,onEnter:K,onEntered:J,onEntering:Y,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},A,{children:(Q,ae)=>C.jsx(xde,$({as:c,className:Fe(k.root,s,{entered:k.entered,exited:!f&&W==="0px"&&k.hidden}[Q]),style:$({[z?"minWidth":"minHeight"]:W},b),ownerState:$({},R,{state:Q}),ref:j},ae,{children:C.jsx(wde,{ownerState:$({},R,{state:Q}),className:k.wrapper,ref:N,children:C.jsx(_de,{ownerState:$({},R,{state:Q}),className:k.wrapperInner,children:o})})}))}))});uK.muiSupportAuto=!0;const GD=uK;function Sde(e){return _t("MuiPaper",e)}Ct("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 Ede=["className","component","elevation","square","variant"],Cde=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Et(o,Sde,i)},Tde=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${_n("#fff",R6(t.elevation))}, ${_n("#fff",R6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),kde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,Ede),f=$({},r,{component:o,elevation:s,square:l,variant:c}),h=Cde(f);return C.jsx(Tde,$({as:o,ownerState:f,className:Fe(h.root,i),ref:n},d))}),ev=kde;function Ade(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=I.useState(!1),p=Fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Fe(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),I.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,l,d]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Rde=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ks=Rde,Ide=["center","classes","className"];let KT=e=>e,BU,$U,FU,zU;const iF=550,Pde=80,Ode=nc(BU||(BU=KT` 0% { transform: scale(0); opacity: 0.1; @@ -68,7 +68,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),Ode=tc(FU||(FU=QT` +`)),Mde=nc($U||($U=KT` 0% { opacity: 1; } @@ -76,7 +76,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),Mde=tc(zU||(zU=QT` +`)),Dde=nc(FU||(FU=KT` 0% { transform: scale(1); } @@ -88,7 +88,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),Dde=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Lde=Ee(kde,{name:"MuiTouchRipple",slot:"Ripple"})(jU||(jU=QT` +`)),Lde=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Nde=Ee(Ade,{name:"MuiTouchRipple",slot:"Ripple"})(zU||(zU=KT` opacity: 0; position: absolute; @@ -131,8 +131,8 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Ks.rippleVisible,Pde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ks.child,Ks.childLeaving,Ode,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.childPulsate,Mde,({theme:e})=>e.transitions.easing.easeInOut),Nde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,Rde),[c,d]=I.useState([]),f=I.useRef(0),h=I.useRef(null);I.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=I.useRef(!1),g=I.useRef(0),v=I.useRef(null),y=I.useRef(null);I.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=I.useCallback(E=>{const{pulsate:A,rippleX:R,rippleY:k,rippleSize:O,cb:L}=E;d(N=>[...N,C.jsx(Lde,{classes:{ripple:Fe(o.ripple,Ks.ripple),rippleVisible:Fe(o.rippleVisible,Ks.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,Ks.ripplePulsate),child:Fe(o.child,Ks.child),childLeaving:Fe(o.childLeaving,Ks.childLeaving),childPulsate:Fe(o.childPulsate,Ks.childPulsate)},timeout:iF,pulsate:A,rippleX:R,rippleY:k,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),_=I.useCallback((E={},A={},R=()=>{})=>{const{pulsate:k=!1,center:O=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 W,z,D;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)W=Math.round(H.width/2),z=Math.round(H.height/2);else{const{clientX:F,clientY:j}=E.touches&&E.touches.length>0?E.touches[0]:E;W=Math.round(F-H.left),z=Math.round(j-H.top)}if(O)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)-W),W)*2+2,j=Math.max(Math.abs((N?N.clientHeight:0)-z),z)*2+2;D=Math.sqrt(F**2+j**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},Ide)):S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},[i,S]),b=I.useCallback(()=>{_({},{pulsate:!0})},[_]),x=I.useCallback((E,A)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,A)});return}v.current=null,d(R=>R.length>0?R.slice(1):R),h.current=A},[]);return I.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Dde,$({className:Fe(Ks.root,o.root,s),ref:y},l,{children:C.jsx(mde,{component:null,exit:!0,children:c})}))}),Bde=Nde;function $de(e){return _t("MuiButtonBase",e)}const Fde=Ct("MuiButtonBase",["root","disabled","focusVisible"]),zde=Fde,jde=["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"],Ude=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Et({root:["root",t&&"disabled",n&&"focusVisible"]},$de,i);return n&&r&&(s.root+=` ${r}`),s},Hde=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zde.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Wde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:R,onMouseLeave:k,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:W=0,TouchRippleProps:z,touchRippleRef:D,type:F}=r,j=Le(r,jde),V=I.useRef(null),G=I.useRef(null),K=mr(G,D),{isFocusVisibleRef:Y,onFocus:J,onBlur:ie,ref:ce}=b5(),[ue,se]=I.useState(!1);d&&ue&&se(!1),I.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[Q,ae]=I.useState(!1);I.useEffect(()=>{ae(!0)},[]);const le=Q&&!f&&!d;I.useEffect(()=>{ue&&p&&!f&&Q&&G.current.pulsate()},[f,p,ue,Q]);function he(Ne,Rt,ct=h){return eo(Ae=>(Rt&&Rt(Ae),!ct&&G.current&&G.current[Ne](Ae),!0))}const pe=he("start",R),ve=he("stop",S),ye=he("stop",_),xe=he("stop",O),me=he("stop",Ne=>{ue&&Ne.preventDefault(),k&&k(Ne)}),be=he("start",H),Qe=he("stop",L),qe=he("stop",N),at=he("stop",Ne=>{ie(Ne),Y.current===!1&&se(!1),v&&v(Ne)},!1),Nt=eo(Ne=>{V.current||(V.current=Ne.currentTarget),J(Ne),Y.current===!0&&(se(!0),x&&x(Ne)),b&&b(Ne)}),Ie=()=>{const Ne=V.current;return c&&c!=="button"&&!(Ne.tagName==="A"&&Ne.href)},ze=I.useRef(!1),it=eo(Ne=>{p&&!ze.current&&ue&&G.current&&Ne.key===" "&&(ze.current=!0,G.current.stop(Ne,()=>{G.current.start(Ne)})),Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&Ne.preventDefault(),E&&E(Ne),Ne.target===Ne.currentTarget&&Ie()&&Ne.key==="Enter"&&!d&&(Ne.preventDefault(),y&&y(Ne))}),pt=eo(Ne=>{p&&Ne.key===" "&&G.current&&ue&&!Ne.defaultPrevented&&(ze.current=!1,G.current.stop(Ne,()=>{G.current.pulsate(Ne)})),A&&A(Ne),y&&Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&!Ne.defaultPrevented&&y(Ne)});let mt=c;mt==="button"&&(j.href||j.to)&&(mt=g);const _e={};mt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!j.href&&!j.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const je=mr(n,ce,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:W,focusVisible:ue}),$e=Ude(Ye);return C.jsxs(Hde,$({as:mt,className:Fe($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Nt,onKeyDown:it,onKeyUp:pt,onMouseDown:pe,onMouseLeave:me,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Qe,onTouchMove:qe,onTouchStart:be,ref:je,tabIndex:d?-1:W,type:F},_e,j,{children:[s,le?C.jsx(Bde,$({ref:K,center:o},z)):null]}))}),Ou=Wde;function Gde(e){return _t("MuiIconButton",e)}const Vde=Ct("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),qde=Vde,Xde=["edge","children","className","color","disabled","disableFocusRipple","size"],Yde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Me(r)}`,i&&`edge${Me(i)}`,`size${Me(o)}`]};return Et(s,Gde,t)},Kde=Ee(Ou,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(n.color)}`],n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(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})`:wn(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})`:wn(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)},{[`&.${qde.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Qde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,Xde),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=Yde(p);return C.jsx(Kde,$({className:Fe(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),Bd=Qde;function Jde(e){return _t("MuiTypography",e)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Zde=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],efe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Me(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Et(l,Jde,s)},tfe=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Me(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})),UU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nfe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rfe=e=>nfe[e]||e,ife=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTypography"}),i=rfe(r.color),o=L5($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=UU}=o,v=Le(o,Zde),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||UU[p])||"span",_=efe(y);return C.jsx(tfe,$({as:S,ref:n,ownerState:y,className:Fe(_.root,l)},v))}),zt=ife;function ofe(e){return _t("MuiAppBar",e)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const sfe=["className","color","enableColorOnDark","position"],afe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Me(t)}`,`position${Me(n)}`]};return Et(i,ofe,r)},Gw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,lfe=Ee(ev,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Me(n.position)}`],t[`color${Me(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:Gw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Gw(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:Gw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Gw(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"}))}),cfe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,sfe),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=afe(d);return C.jsx(lfe,$({square:!0,component:"header",ownerState:d,elevation:4,className:Fe(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),ufe=cfe;function zl(e){return typeof e=="string"}function Fb(e,t,n){return e===void 0||zl(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function dfe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const ffe={disableDefaultClasses:!1},hfe=I.createContext(ffe);function pfe(e){const{disableDefaultClasses:t}=I.useContext(hfe);return n=>t?"":e(n)}function AE(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 mfe(e,t,n){return typeof e=="function"?e(t,n):e}function HU(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 gfe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Fe(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=AE($({},i,r)),l=HU(r),c=HU(i),d=t(s),f=Fe(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const vfe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,vfe),l=o?{}:mfe(r,i),{props:c,internalRef:d}=gfe($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return Fb(n,$({},c,{ref:f}),i)}function WU(e){return e.substring(2).toLowerCase()}function yfe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=eo(v=>{const y=d.current;d.current=!1;const S=Ar(l.current);if(!c.current||!l.current||"clientX"in v&&yfe(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),I.useEffect(()=>{if(o!==!1){const v=WU(o),y=Ar(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),I.useEffect(()=>{if(r!==!1){const v=WU(r),y=Ar(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(I.Fragment,{children:I.cloneElement(t,g)})}const xfe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function wfe(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 _fe(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 Sfe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||_fe(e))}function Efe(e){const t=[],n=[];return Array.from(e.querySelectorAll(xfe)).forEach((r,i)=>{const o=wfe(r);o===-1||!Sfe(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 Cfe(){return!0}function Tfe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Efe,isEnabled:s=Cfe,open:l}=e,c=I.useRef(!1),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(null),g=I.useRef(!1),v=I.useRef(null),y=mr(t.ref,v),S=I.useRef(null);I.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current),E=k=>{S.current=k,!(r||!s()||k.key!=="Tab")&&x.activeElement===v.current&&k.shiftKey&&(c.current=!0,f.current&&f.current.focus())},A=()=>{const k=v.current;if(k===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let O=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(O=o(v.current)),O.length>0){var L,N;const H=!!((L=S.current)!=null&&L.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),W=O[0],z=O[O.length-1];typeof W!="string"&&typeof z!="string"&&(H?z.focus():W.focus())}else k.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const R=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(R),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(I.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var qo="top",ma="bottom",ga="right",Xo="left",D4="auto",V1=[qo,ma,ga,Xo],wg="start",Zx="end",kfe="clippingParents",fK="viewport",sb="popper",Afe="reference",GU=V1.reduce(function(e,t){return e.concat([t+"-"+wg,t+"-"+Zx])},[]),hK=[].concat(V1,[D4]).reduce(function(e,t){return e.concat([t,t+"-"+wg,t+"-"+Zx])},[]),Rfe="beforeRead",Ife="read",Pfe="afterRead",Ofe="beforeMain",Mfe="main",Dfe="afterMain",Lfe="beforeWrite",Nfe="write",Bfe="afterWrite",$fe=[Rfe,Ife,Pfe,Ofe,Mfe,Dfe,Lfe,Nfe,Bfe];function Yl(e){return e?(e.nodeName||"").toLowerCase():null}function Bs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bp(e){var t=Bs(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Bs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L4(e){if(typeof ShadowRoot>"u")return!1;var t=Bs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ffe(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];!ca(o)||!Yl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function zfe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ca(i)||!Yl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const jfe={name:"applyStyles",enabled:!0,phase:"write",fn:Ffe,effect:zfe,requires:["computeStyles"]};function jl(e){return e.split("-")[0]}var rp=Math.max,RE=Math.min,_g=Math.round;function oF(){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 pK(){return!/^((?!chrome|android).)*safari/i.test(oF())}function Sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&_g(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_g(r.height)/e.offsetHeight||1);var s=bp(e)?Bs(e):window,l=s.visualViewport,c=!pK()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function N4(e){var t=Sg(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 mK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Bs(e).getComputedStyle(e)}function Ufe(e){return["table","td","th"].indexOf(Yl(e))>=0}function Kd(e){return((bp(e)?e.ownerDocument:e.document)||window.document).documentElement}function JT(e){return Yl(e)==="html"?e:e.assignedSlot||e.parentNode||(L4(e)?e.host:null)||Kd(e)}function VU(e){return!ca(e)||Eu(e).position==="fixed"?null:e.offsetParent}function Hfe(e){var t=/firefox/i.test(oF()),n=/Trident/i.test(oF());if(n&&ca(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=JT(e);for(L4(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(Yl(i))<0;){var o=Eu(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 q1(e){for(var t=Bs(e),n=VU(e);n&&Ufe(n)&&Eu(n).position==="static";)n=VU(n);return n&&(Yl(n)==="html"||Yl(n)==="body"&&Eu(n).position==="static")?t:n||Hfe(e)||t}function B4(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fx(e,t,n){return rp(e,RE(t,n))}function Wfe(e,t,n){var r=fx(e,t,n);return r>n?n:r}function gK(){return{top:0,right:0,bottom:0,left:0}}function vK(e){return Object.assign({},gK(),e)}function yK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Gfe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,vK(typeof t!="number"?t:yK(t,V1))};function Vfe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=jl(n.placement),c=B4(l),d=[Xo,ga].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=Gfe(i.padding,n),p=N4(o),g=c==="y"?qo:Xo,v=c==="y"?ma:ga,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=q1(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],A=b-p[f]-h[v],R=b/2-p[f]/2+x,k=fx(E,R,A),O=c;n.modifiersData[r]=(t={},t[O]=k,t.centerOffset=k-R,t)}}function qfe(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)||mK(t.elements.popper,i)&&(t.elements.arrow=i))}const Xfe={name:"arrow",enabled:!0,phase:"main",fn:Vfe,effect:qfe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eg(e){return e.split("-")[1]}var Yfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Kfe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_g(n*i)/i||0,y:_g(r*i)/i||0}}function qU(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Xo,E=qo,A=window;if(d){var R=q1(n),k="clientHeight",O="clientWidth";if(R===Bs(n)&&(R=Kd(n),Eu(R).position!=="static"&&l==="absolute"&&(k="scrollHeight",O="scrollWidth")),R=R,i===qo||(i===Xo||i===ga)&&o===Zx){E=ma;var L=h&&R===A&&A.visualViewport?A.visualViewport.height:R[k];y-=L-r.height,y*=c?1:-1}if(i===Xo||(i===qo||i===ma)&&o===Zx){x=ga;var N=h&&R===A&&A.visualViewport?A.visualViewport.width:R[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&Yfe),W=f===!0?Kfe({x:g,y},Bs(n)):{x:g,y};if(g=W.x,y=W.y,c){var z;return Object.assign({},H,(z={},z[E]=b?"0":"",z[x]=_?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",z))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function Qfe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:jl(t.placement),variation:Eg(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,qU(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,qU(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Jfe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Qfe,data:{}};var Vw={passive:!0};function Zfe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Bs(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,Vw)}),l&&c.addEventListener("resize",n.update,Vw),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Vw)}),l&&c.removeEventListener("resize",n.update,Vw)}}const ehe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zfe,data:{}};var the={left:"right",right:"left",bottom:"top",top:"bottom"};function kS(e){return e.replace(/left|right|bottom|top/g,function(t){return the[t]})}var nhe={start:"end",end:"start"};function XU(e){return e.replace(/start|end/g,function(t){return nhe[t]})}function $4(e){var t=Bs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function F4(e){return Sg(Kd(e)).left+$4(e).scrollLeft}function rhe(e,t){var n=Bs(e),r=Kd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=pK();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+F4(e),y:c}}function ihe(e){var t,n=Kd(e),r=$4(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=rp(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=rp(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+F4(e),c=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(l+=rp(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function z4(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bK(e){return["html","body","#document"].indexOf(Yl(e))>=0?e.ownerDocument.body:ca(e)&&z4(e)?e:bK(JT(e))}function hx(e,t){var n;t===void 0&&(t=[]);var r=bK(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Bs(r),s=i?[o].concat(o.visualViewport||[],z4(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(hx(JT(s)))}function sF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ohe(e,t){var n=Sg(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 YU(e,t,n){return t===fK?sF(rhe(e,n)):bp(t)?ohe(t,n):sF(ihe(Kd(e)))}function she(e){var t=hx(JT(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&ca(e)?q1(e):e;return bp(r)?t.filter(function(i){return bp(i)&&mK(i,r)&&Yl(i)!=="body"}):[]}function ahe(e,t,n,r){var i=t==="clippingParents"?she(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=YU(e,d,r);return c.top=rp(f.top,c.top),c.right=RE(f.right,c.right),c.bottom=RE(f.bottom,c.bottom),c.left=rp(f.left,c.left),c},YU(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function xK(e){var t=e.reference,n=e.element,r=e.placement,i=r?jl(r):null,o=r?Eg(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case qo:c={x:s,y:t.y-n.height};break;case ma:c={x:s,y:t.y+t.height};break;case ga:c={x:t.x+t.width,y:l};break;case Xo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?B4(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case wg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case Zx:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function e1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?kfe:l,d=n.rootBoundary,f=d===void 0?fK:d,h=n.elementContext,p=h===void 0?sb:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=vK(typeof S!="number"?S:yK(S,V1)),b=p===sb?Afe:sb,x=e.rects.popper,E=e.elements[v?b:p],A=ahe(bp(E)?E:E.contextElement||Kd(e.elements.popper),c,f,s),R=Sg(e.elements.reference),k=xK({reference:R,element:x,strategy:"absolute",placement:i}),O=sF(Object.assign({},x,k)),L=p===sb?O:R,N={top:A.top-L.top+_.top,bottom:L.bottom-A.bottom+_.bottom,left:A.left-L.left+_.left,right:L.right-A.right+_.right},H=e.modifiersData.offset;if(p===sb&&H){var W=H[i];Object.keys(N).forEach(function(z){var D=[ga,ma].indexOf(z)>=0?1:-1,F=[qo,ma].indexOf(z)>=0?"y":"x";N[z]+=W[F]*D})}return N}function lhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?hK:c,f=Eg(r),h=f?l?GU:GU.filter(function(v){return Eg(v)===f}):V1,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=e1(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[jl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function che(e){if(jl(e)===D4)return[];var t=kS(e);return[XU(e),t,XU(t)]}function uhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=jl(S),b=_===S,x=c||(b||!v?[kS(S)]:che(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(jl(se)===D4?lhe(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,R=t.rects.popper,k=new Map,O=!0,L=E[0],N=0;N=0,F=D?"width":"height",j=e1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?z?ga:Xo:z?ma:qo;A[F]>R[F]&&(V=kS(V));var G=kS(V),K=[];if(o&&K.push(j[W]<=0),l&&K.push(j[V]<=0,j[G]<=0),K.every(function(ue){return ue})){L=H,O=!1;break}k.set(H,K)}if(O)for(var Y=v?3:1,J=function(se){var Q=E.find(function(ae){var le=k.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(Q)return L=Q,"break"},ie=Y;ie>0;ie--){var ce=J(ie);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const dhe={name:"flip",enabled:!0,phase:"main",fn:uhe,requiresIfExists:["offset"],data:{_skip:!1}};function KU(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 QU(e){return[qo,ga,ma,Xo].some(function(t){return e[t]>=0})}function fhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=e1(t,{elementContext:"reference"}),l=e1(t,{altBoundary:!0}),c=KU(s,r),d=KU(l,i,o),f=QU(c),h=QU(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const hhe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fhe};function phe(e,t,n){var r=jl(e),i=[Xo,qo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Xo,ga].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function mhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=hK.reduce(function(f,h){return f[h]=phe(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const ghe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mhe};function vhe(e){var t=e.state,n=e.name;t.modifiersData[n]=xK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const yhe={name:"popperOffsets",enabled:!0,phase:"read",fn:vhe,data:{}};function bhe(e){return e==="x"?"y":"x"}function xhe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=e1(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=jl(t.placement),b=Eg(t.placement),x=!b,E=B4(_),A=bhe(E),R=t.modifiersData.popperOffsets,k=t.rects.reference,O=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,W={x:0,y:0};if(R){if(o){var z,D=E==="y"?qo:Xo,F=E==="y"?ma:ga,j=E==="y"?"height":"width",V=R[E],G=V+S[D],K=V-S[F],Y=g?-O[j]/2:0,J=b===wg?k[j]:O[j],ie=b===wg?-O[j]:-k[j],ce=t.elements.arrow,ue=g&&ce?N4(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gK(),Q=se[D],ae=se[F],le=fx(0,k[j],ue[j]),he=x?k[j]/2-Y-le-Q-N.mainAxis:J-le-Q-N.mainAxis,pe=x?-k[j]/2+Y+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&q1(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(z=H==null?void 0:H[E])!=null?z:0,me=V+he-xe-ye,be=V+pe-xe,Qe=fx(g?RE(G,me):G,V,g?rp(K,be):K);R[E]=Qe,W[E]=Qe-V}if(l){var qe,at=E==="x"?qo:Xo,Nt=E==="x"?ma:ga,Ie=R[A],ze=A==="y"?"height":"width",it=Ie+S[at],pt=Ie-S[Nt],mt=[qo,Xo].indexOf(_)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,je=mt?it:Ie-k[ze]-O[ze]-_e+N.altAxis,Ye=mt?Ie+k[ze]+O[ze]-_e-N.altAxis:pt,$e=g&&mt?Wfe(je,Ie,Ye):fx(g?je:it,Ie,g?Ye:pt);R[A]=$e,W[A]=$e-Ie}t.modifiersData[r]=W}}const whe={name:"preventOverflow",enabled:!0,phase:"main",fn:xhe,requiresIfExists:["offset"]};function _he(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function She(e){return e===Bs(e)||!ca(e)?$4(e):_he(e)}function Ehe(e){var t=e.getBoundingClientRect(),n=_g(t.width)/e.offsetWidth||1,r=_g(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Che(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&Ehe(t),o=Kd(t),s=Sg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Yl(t)!=="body"||z4(o))&&(l=She(t)),ca(t)?(c=Sg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=F4(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function The(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function khe(e){var t=The(e);return $fe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ahe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Rhe(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 JU={placement:"bottom",modifiers:[],strategy:"absolute"};function ZU(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Mhe(i)||document.body)},[i,o]),Io(()=>{if(s&&!o)return n$(n,s),()=>{n$(n,null)}},[n,s,o]),o){if(I.isValidElement(r)){const d={ref:c};return I.cloneElement(r,d)}return C.jsx(I.Fragment,{children:r})}return C.jsx(I.Fragment,{children:s&&Zg.createPortal(r,s)})});function Dhe(e){return _t("MuiPopper",e)}Ct("MuiPopper",["root"]);const Lhe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Nhe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Bhe(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 aF(e){return typeof e=="function"?e():e}function $he(e){return e.nodeType!==void 0}const Fhe=()=>Et({root:["root"]},pfe(Dhe)),zhe={},jhe=I.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,Lhe),_=I.useRef(null),b=mr(_,n),x=I.useRef(null),E=mr(x,p),A=I.useRef(E);Io(()=>{A.current=E},[E]),I.useImperativeHandle(p,()=>x.current,[]);const R=Bhe(f,s),[k,O]=I.useState(R),[L,N]=I.useState(aF(i));I.useEffect(()=>{x.current&&x.current.forceUpdate()}),I.useEffect(()=>{i&&N(aF(i))},[i]),Io(()=>{if(!L||!d)return;const F=G=>{O(G.placement)};let j=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{F(G)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=Ohe(L,_.current,$({placement:R},h,{modifiers:j}));return A.current(V),()=>{V.destroy(),A.current(null)}},[L,l,c,d,h,R]);const H={placement:k};y!==null&&(H.TransitionProps=y);const W=Fhe(),z=(r=v.root)!=null?r:"div",D=Wr({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:W.root});return C.jsx(z,$({},D,{children:typeof o=="function"?o(H):o}))}),Uhe=I.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=zhe,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,Nhe),[x,E]=I.useState(!0),A=()=>{E(!1)},R=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let k;if(o)k=o;else if(r){const N=aF(r);k=N&&$he(N)?Ar(N).body:Ar(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:A,onExited:R}:void 0;return C.jsx(wK,{disablePortal:l,container:k,children:C.jsx(jhe,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function Hhe(e){const t=Ar(e);return t.body===e?bu(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function px(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function e8(e){return parseInt(bu(e).getComputedStyle(e).paddingRight,10)||0}function Whe(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 t8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Whe(s);l&&c&&px(s,i)})}function qD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function Ghe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Hhe(r)){const s=Cq(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${e8(r)+s}px`;const l=Ar(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${e8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ar(r).body;else{const s=r.parentElement,l=bu(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function Vhe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class qhe{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&&px(t.modalRef,!1);const i=Vhe(n);t8(n,t.mount,t.modalRef,i,!0);const o=qD(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=qD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=Ghe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=qD(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&&px(t.modalRef,n),t8(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&&px(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Xhe(e){return typeof e=="function"?e():e}function Yhe(e){return e?e.props.hasOwnProperty("in"):!1}const Khe=new qhe;function Qhe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Khe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=I.useRef({}),g=I.useRef(null),v=I.useRef(null),y=mr(v,h),[S,_]=I.useState(!f),b=Yhe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Ar(g.current),A=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),R=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=eo(()=>{const j=Xhe(t)||E().body;i.add(A(),j),v.current&&R()}),O=I.useCallback(()=>i.isTopModal(A()),[i]),L=eo(j=>{g.current=j,j&&(f&&O()?R():v.current&&px(v.current,x))}),N=I.useCallback(()=>{i.remove(A(),x)},[x,i]);I.useEffect(()=>()=>{N()},[N]),I.useEffect(()=>{f?k():(!b||!o)&&N()},[f,N,b,o,k]);const H=j=>V=>{var G;(G=j.onKeyDown)==null||G.call(j,V),!(V.key!=="Escape"||!O())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},W=j=>V=>{var G;(G=j.onClick)==null||G.call(j,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(j={})=>{const V=AE(e);delete V.onTransitionEnter,delete V.onTransitionExited;const G=$({},V,j);return $({role:"presentation"},G,{onKeyDown:H(G),ref:y})},getBackdropProps:(j={})=>{const V=j;return $({"aria-hidden":!0},V,{onClick:W(V),open:f})},getTransitionProps:()=>{const j=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&N()};return{onEnter:n6(j,c==null?void 0:c.props.onEnter),onExited:n6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const Jhe=2;function _K(e,t){return e-t}function ab(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function n8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},rpe=e=>e;let Kw;function XD(){return Kw===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Kw=CSS.supports("touch-action","none"):Kw=!0),Kw}function ipe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=rpe,step:y=1,tabIndex:S,value:_}=e,b=I.useRef(),[x,E]=I.useState(-1),[A,R]=I.useState(-1),[k,O]=I.useState(!1),L=I.useRef(0),[N,H]=Ox({controlled:_,default:n??c,name:"Slider"}),W=f&&((_e,je,Ye)=>{const $e=_e.nativeEvent||_e,Ne=new $e.constructor($e.type,$e);Object.defineProperty(Ne,"target",{writable:!0,value:{value:je,name:d}}),f(Ne,je,Ye)}),z=Array.isArray(N);let D=z?N.slice().sort(_K):[N];D=D.map(_e=>ab(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,je)=>({value:c+y*je})):s||[],j=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:G,onFocus:K,ref:Y}=b5(),[J,ie]=I.useState(-1),ce=I.useRef(),ue=mr(Y,ce),se=mr(g,ue),Q=_e=>je=>{var Ye;const $e=Number(je.currentTarget.getAttribute("data-index"));K(je),V.current===!0&&ie($e),R($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,je)},ae=_e=>je=>{var Ye;G(je),V.current===!1&&ie(-1),R(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,je)};Io(()=>{if(r&&ce.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&J!==-1&&ie(-1);const le=_e=>je=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index")),Ne=D[$e],Rt=j.indexOf(Ne);let ct=je.target.valueAsNumber;if(F&&y==null){const Ae=j[j.length-1];ct>Ae?ct=Ae:ct{const{current:Ye}=ce,{width:$e,height:Ne,bottom:Rt,left:ct}=Ye.getBoundingClientRect();let Ae;pe.indexOf("vertical")===0?Ae=(Rt-_e.y)/Ne:Ae=(_e.x-ct)/$e,pe.indexOf("-reverse")!==-1&&(Ae=1-Ae);let ot;if(ot=Zhe(Ae,c,l),y)ot=tpe(ot,y,c);else{const Re=n8(j,ot);ot=j[Re]}ot=ab(ot,c,l);let $t=0;if(z){je?$t=he.current:$t=n8(D,ot),i&&(ot=ab(ot,D[$t-1]||-1/0,D[$t+1]||1/0));const Re=ot;ot=r8({values:D,newValue:ot,index:$t}),i&&je||($t=ot.indexOf(Re),he.current=$t)}return{newValue:ot,activeIndex:$t}},ye=eo(_e=>{const je=qw(_e,b);if(!je)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:je,move:!0});Xw({sliderRef:ce,activeIndex:$e,setActive:E}),H(Ye),!k&&L.current>Jhe&&O(!0),W&&!Yw(Ye,N)&&W(_e,Ye,$e)}),xe=eo(_e=>{const je=qw(_e,b);if(O(!1),!je)return;const{newValue:Ye}=ve({finger:je,move:!0});E(-1),_e.type==="touchend"&&R(-1),h&&h(_e,Ye),b.current=void 0,be()}),me=eo(_e=>{if(r)return;XD()||_e.preventDefault();const je=_e.changedTouches[0];je!=null&&(b.current=je.identifier);const Ye=qw(_e,b);if(Ye!==!1){const{newValue:Ne,activeIndex:Rt}=ve({finger:Ye});Xw({sliderRef:ce,activeIndex:Rt,setActive:E}),H(Ne),W&&!Yw(Ne,N)&&W(_e,Ne,Rt)}L.current=0;const $e=Ar(ce.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",xe)}),be=I.useCallback(()=>{const _e=Ar(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);I.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:XD()}),()=>{_e.removeEventListener("touchstart",me,{passive:XD()}),be()}},[be,me]),I.useEffect(()=>{r&&be()},[r,be]);const Qe=_e=>je=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,je),r||je.defaultPrevented||je.button!==0)return;je.preventDefault();const $e=qw(je,b);if($e!==!1){const{newValue:Rt,activeIndex:ct}=ve({finger:$e});Xw({sliderRef:ce,activeIndex:ct,setActive:E}),H(Rt),W&&!Yw(Rt,N)&&W(je,Rt,ct)}L.current=0;const Ne=Ar(ce.current);Ne.addEventListener("mousemove",ye),Ne.addEventListener("mouseup",xe)},qe=IE(z?D[0]:c,c,l),at=IE(D[D.length-1],c,l)-qe,Nt=(_e={})=>{const je={onMouseDown:Qe(_e||{})},Ye=$({},_e,je);return $({ref:se},Ye)},Ie=_e=>je=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index"));R($e)},ze=_e=>je=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,je),R(-1)};return{active:x,axis:pe,axisProps:npe,dragging:k,focusedThumbIndex:J,getHiddenInputProps:(_e={})=>{var je;const Ye={onChange:le(_e||{}),onFocus:Q(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(je=e.step)!=null?je:void 0,disabled:r},$e,{style:$({},Doe,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Nt,getThumbProps:(_e={})=>{const je={onMouseOver:Ie(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,je)},marks:F,open:A,range:z,rootRef:se,trackLeap:at,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function ope(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=I.useRef();I.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=eo((_,b)=>{r==null||r(_,b)}),c=eo(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});I.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=I.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return I.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},AE(e),AE(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const spe=["onChange","maxRows","minRows","style","value"];function Qw(e){return parseInt(e,10)||0}const ape={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function i8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const lpe=I.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,spe),{current:d}=I.useRef(l!=null),f=I.useRef(null),h=mr(n,f),p=I.useRef(null),g=I.useRef(0),[v,y]=I.useState({outerHeightStyle:0}),S=I.useCallback(()=>{const E=f.current,R=bu(E).getComputedStyle(E);if(R.width==="0px")return{outerHeightStyle:0};const k=p.current;k.style.width=R.width,k.value=E.value||t.placeholder||"x",k.value.slice(-1)===` -`&&(k.value+=" ");const O=R.boxSizing,L=Qw(R.paddingBottom)+Qw(R.paddingTop),N=Qw(R.borderBottomWidth)+Qw(R.borderTopWidth),H=k.scrollHeight;k.value="x";const W=k.scrollHeight;let z=H;o&&(z=Math.max(Number(o)*W,z)),i&&(z=Math.min(Number(i)*W,z)),z=Math.max(z,W);const D=z+(O==="border-box"?L+N:0),F=Math.abs(z-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),_=(E,A)=>{const{outerHeightStyle:R,overflow:k}=A;return g.current<20&&(R>0&&Math.abs((E.outerHeightStyle||0)-R)>1||E.overflow!==k)?(g.current+=1,{overflow:k,outerHeightStyle:R}):E},b=I.useCallback(()=>{const E=S();i8(E)||y(A=>_(A,E))},[S]);Io(()=>{const E=()=>{const H=S();i8(H)||Zg.flushSync(()=>{y(W=>_(W,H))})},A=()=>{g.current=0,E()};let R;const k=KC(A),O=f.current,L=bu(O);L.addEventListener("resize",k);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(A),N.observe(O)),()=>{k.clear(),cancelAnimationFrame(R),L.removeEventListener("resize",k),N&&N.disconnect()}},[S]),Io(()=>{b()}),I.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(I.Fragment,{children:[C.jsx("textarea",$({value:l,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},c)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},ape.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),cpe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],upe=Ee(Uhe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dpe=I.forwardRef(function(t,n){var r;const i=wT(),o=Tt({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,A=Le(o,cpe),R=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,k=$({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},A);return C.jsx(upe,$({as:l,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:E??d},k,{ref:n}))}),SK=dpe;function fpe(e){return _t("MuiListSubheader",e)}Ct("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const hpe=["className","color","component","disableGutters","disableSticky","inset"],ppe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${Me(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Et(s,fpe,t)},mpe=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(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})),EK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,hpe),h=$({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=ppe(h);return C.jsx(mpe,$({as:s,className:Fe(p.root,i),ref:n,ownerState:h},f))});EK.muiSkipListHighlight=!0;const gpe=EK;function Mp({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 vpe=I.createContext(void 0),j4=vpe;function Qd(){return I.useContext(j4)}function CK(e){return C.jsx(Uae,$({},e,{defaultTheme:ET,themeId:dp}))}function o8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function PE(e,t=!1){return e&&(o8(e.value)&&e.value!==""||t&&o8(e.defaultValue)&&e.defaultValue!=="")}function ype(e){return e.startAdornment}function bpe(e){return _t("MuiInputBase",e)}const xpe=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Cg=xpe,wpe=["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"],ZT=(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${Me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ek=(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]},_pe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${Me(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${Me(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return Et(y,bpe,t)},tk=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ZT})(({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",[`&.${Cg.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%"})),nk=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ek})(({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] + .${Cg.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},[`&.${Cg.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"})}),Spe=C.jsx(CK,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Epe=I.forwardRef(function(t,n){var r;const i=Tt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:A,multiline:R=!1,name:k,onBlur:O,onChange:L,onClick:N,onFocus:H,onKeyDown:W,onKeyUp:z,placeholder:D,readOnly:F,renderSuffix:j,rows:V,slotProps:G={},slots:K={},startAdornment:Y,type:J="text",value:ie}=i,ce=Le(i,wpe),ue=b.value!=null?b.value:ie,{current:se}=I.useRef(ue!=null),Q=I.useRef(),ae=I.useCallback($e=>{},[]),le=mr(Q,x,b.ref,ae),[he,pe]=I.useState(!1),ve=Qd(),ye=Mp({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,I.useEffect(()=>{!ve&&p&&he&&(pe(!1),O&&O())},[ve,p,he,O]);const xe=ve&&ve.onFilled,me=ve&&ve.onEmpty,be=I.useCallback($e=>{PE($e)?xe&&xe():me&&me()},[xe,me]);Io(()=>{se&&be({value:ue})},[ue,be,se]);const Qe=$e=>{if(ye.disabled){$e.stopPropagation();return}H&&H($e),b.onFocus&&b.onFocus($e),ve&&ve.onFocus?ve.onFocus($e):pe(!0)},qe=$e=>{O&&O($e),b.onBlur&&b.onBlur($e),ve&&ve.onBlur?ve.onBlur($e):pe(!1)},at=($e,...Ne)=>{if(!se){const Rt=$e.target||Q.current;if(Rt==null)throw new Error(Md(1));be({value:Rt.value})}b.onChange&&b.onChange($e,...Ne),L&&L($e,...Ne)};I.useEffect(()=>{be(Q.current)},[]);const Nt=$e=>{Q.current&&$e.currentTarget===$e.target&&Q.current.focus(),N&&N($e)};let Ie=_,ze=b;R&&Ie==="input"&&(V?ze=$({type:void 0,minRows:V,maxRows:V},ze):ze=$({type:void 0,maxRows:E,minRows:A},ze),Ie=lpe);const it=$e=>{be($e.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};I.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const pt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:R,size:ye.size,startAdornment:Y,type:J}),mt=_pe(pt),_e=K.root||d.Root||tk,je=G.root||f.root||{},Ye=K.input||d.Input||nk;return ze=$({},ze,(r=G.input)!=null?r:f.input),C.jsxs(I.Fragment,{children:[!g&&Spe,C.jsxs(_e,$({},je,!zl(_e)&&{ownerState:$({},pt,je.ownerState)},{ref:n,onClick:Nt},ce,{className:Fe(mt.root,je.className,c,F&&"MuiInputBase-readOnly"),children:[Y,C.jsx(j4.Provider,{value:null,children:C.jsx(Ye,$({ownerState:pt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:k,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ue,onKeyDown:W,onKeyUp:z,type:J},ze,!zl(Ye)&&{as:Ie,ownerState:$({},pt,ze.ownerState)},{ref:le,className:Fe(mt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:qe,onChange:at,onFocus:Qe}))}),v,j?j($({},ye,{startAdornment:Y})):null]}))]})}),rk=Epe;function Cpe(e){return _t("MuiInput",e)}const Tpe=$({},Cg,Ct("MuiInput",["root","underline","input"])),lb=Tpe;function kpe(e){return _t("MuiOutlinedInput",e)}const Ape=$({},Cg,Ct("MuiOutlinedInput",["root","notchedOutline","input"])),Uu=Ape;function Rpe(e){return _t("MuiFilledInput",e)}const Ipe=$({},Cg,Ct("MuiFilledInput",["root","underline","input"])),_h=Ipe,Ppe=Dt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Ope=Dt(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 Mpe(e){return _t("MuiAvatar",e)}Ct("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Dpe=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Lpe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Et({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Mpe,t)},Npe=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Bpe=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),$pe=Ee(Ope,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Fpe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=I.useState(!1);return I.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const l=new Image;return l.onload=()=>{s&&o("loaded")},l.onerror=()=>{s&&o("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const zpe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,Dpe);let v=null;const y=Fpe($({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=$({},r,{colorDefault:!_,component:l,variant:p}),x=Lpe(b);return _?v=C.jsx(Bpe,$({alt:i,srcSet:h,src:f,sizes:d,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx($pe,{ownerState:b,className:x.fallback}),C.jsx(Npe,$({as:l,ownerState:b,className:Fe(x.root,s),ref:n},g,{children:v}))}),jpe=zpe,Upe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Hpe={entering:{opacity:1},entered:{opacity:1}},Wpe=I.forwardRef(function(t,n){const r=In(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=P4}=t,x=Le(t,Upe),E=I.useRef(null),A=mr(E,l.ref,n),R=D=>F=>{if(D){const j=E.current;F===void 0?D(j):D(j,F)}},k=R(p),O=R((D,F)=>{uK(D);const j=xg({style:S,timeout:_,easing:c},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",j),D.style.transition=r.transitions.create("opacity",j),f&&f(D,F)}),L=R(h),N=R(y),H=R(D=>{const F=xg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),W=R(v),z=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:d,nodeRef:E,onEnter:O,onEntered:L,onEntering:k,onExit:H,onExited:W,onExiting:N,addEndListener:z,timeout:_},x,{children:(D,F)=>I.cloneElement(l,$({style:$({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},Hpe[D],S,l.props.style),ref:A},F))}))}),xp=Wpe;function Gpe(e){return _t("MuiBackdrop",e)}Ct("MuiBackdrop",["root","invisible"]);const Vpe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],qpe=e=>{const{classes:t,invisible:n}=e;return Et({root:["root",n&&"invisible"]},Gpe,t)},Xpe=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Ype=I.forwardRef(function(t,n){var r,i,o;const s=Tt({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=xp,transitionDuration:_}=s,b=Le(s,Vpe),x=$({},s,{component:d,invisible:p}),E=qpe(x),A=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:_},b,{children:C.jsx(Xpe,$({"aria-hidden":!0},A,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:Fe(E.root,c,A==null?void 0:A.className),ownerState:$({},x,A==null?void 0:A.ownerState),classes:E,ref:n,children:l}))}))}),ik=Ype,Kpe=B5(),Qpe=Vae({themeId:dp,defaultTheme:Kpe,defaultClassName:"MuiBox-root",generateClassName:kq.generate}),dt=Qpe;function Jpe(e){return _t("MuiButton",e)}const Zpe=Ct("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"]),Jw=Zpe,eme=I.createContext({}),tme=eme,nme=I.createContext(void 0),rme=nme,ime=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ome=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,l={root:["root",o,`${o}${Me(t)}`,`size${Me(i)}`,`${o}Size${Me(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Me(i)}`],endIcon:["endIcon",`iconSize${Me(i)}`]},c=Et(l,Jpe,s);return $({},s,c)},TK=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}}),sme=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Me(n.color)}`],t[`size${Me(n.size)}`],t[`${n.variant}Size${Me(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})`:wn(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})`:wn(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})`:wn(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]}),[`&.${Jw.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Jw.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 ${wn(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"},[`&.${Jw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Jw.disabled}`]:{boxShadow:"none"}}),ame=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},TK(e))),lme=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},TK(e))),cme=I.forwardRef(function(t,n){const r=I.useContext(tme),i=I.useContext(rme),o=x5(r,t),s=Tt({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,A=Le(s,ime),R=$({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),k=ome(R),O=b&&C.jsx(ame,{className:k.startIcon,ownerState:R,children:b}),L=v&&C.jsx(lme,{className:k.endIcon,ownerState:R,children:v}),N=i||"";return C.jsxs(sme,$({ownerState:R,className:Fe(r.className,k.root,f,N),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Fe(k.focusVisible,y),ref:n,type:x},A,{classes:k,children:[O,l,L]}))}),kK=cme;function ume(e){return _t("MuiCard",e)}Ct("MuiCard",["root"]);const dme=["className","raised"],fme=e=>{const{classes:t}=e;return Et({root:["root"]},ume,t)},hme=Ee(ev,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),pme=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,dme),l=$({},r,{raised:o}),c=fme(l);return C.jsx(hme,$({className:Fe(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),mme=pme;function gme(e){return _t("PrivateSwitchBase",e)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const vme=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],yme=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${Me(i)}`],input:["input"]};return Et(o,gme,t)},bme=Ee(Ou)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),xme=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),wme=I.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:d=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:_,onFocus:b,readOnly:x,required:E=!1,tabIndex:A,type:R,value:k}=t,O=Le(t,vme),[L,N]=Ox({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),H=Qd(),W=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},z=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},D=K=>{if(K.nativeEvent.defaultPrevented)return;const Y=K.target.checked;N(Y),_&&_(K,Y)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const j=R==="checkbox"||R==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:d,edge:f}),G=yme(V);return C.jsxs(bme,$({component:"span",className:Fe(G.root,s),centerRipple:!0,focusRipple:!d,disabled:F,tabIndex:null,role:void 0,onFocus:W,onBlur:z,ownerState:V,ref:n},O,{children:[C.jsx(xme,$({autoFocus:r,checked:i,defaultChecked:l,className:G.input,disabled:F,id:j?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:A,type:R},R==="checkbox"&&k===void 0?{}:{value:k},g)),L?o:h]}))}),AK=wme,_me=Dt(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"),Sme=Dt(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"),Eme=Dt(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 Cme(e){return _t("MuiCheckbox",e)}const Tme=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),YD=Tme,kme=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Ame=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${Me(r)}`,`size${Me(i)}`]},s=Et(o,Cme,t);return $({},t,s)},Rme=Ee(AK,{shouldForwardProp:e=>va(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${Me(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})`:wn(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${YD.checked}, &.${YD.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${YD.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Ime=C.jsx(Sme,{}),Pme=C.jsx(_me,{}),Ome=C.jsx(Eme,{}),Mme=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=Ime,color:l="primary",icon:c=Pme,indeterminate:d=!1,indeterminateIcon:f=Ome,inputProps:h,size:p="medium",className:g}=o,v=Le(o,kme),y=d?f:c,S=d?f:s,_=$({},o,{color:l,indeterminate:d,size:p}),b=Ame(_);return C.jsx(Rme,$({type:"checkbox",inputProps:$({"data-indeterminate":d},h),icon:I.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:I.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:Fe(b.root,g)},v,{classes:b}))}),Dme=Mme;function Lme(e){return _t("MuiCircularProgress",e)}Ct("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Nme=["className","color","disableShrink","size","style","thickness","value","variant"];let ok=e=>e,s8,a8,l8,c8;const Hu=44,Bme=tc(s8||(s8=ok` +`),Ks.rippleVisible,Ode,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ks.child,Ks.childLeaving,Mde,iF,({theme:e})=>e.transitions.easing.easeInOut,Ks.childPulsate,Dde,({theme:e})=>e.transitions.easing.easeInOut),Bde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,Ide),[c,d]=I.useState([]),f=I.useRef(0),h=I.useRef(null);I.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=I.useRef(!1),g=I.useRef(0),v=I.useRef(null),y=I.useRef(null);I.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=I.useCallback(E=>{const{pulsate:A,rippleX:R,rippleY:k,rippleSize:O,cb:L}=E;d(N=>[...N,C.jsx(Nde,{classes:{ripple:Fe(o.ripple,Ks.ripple),rippleVisible:Fe(o.rippleVisible,Ks.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,Ks.ripplePulsate),child:Fe(o.child,Ks.child),childLeaving:Fe(o.childLeaving,Ks.childLeaving),childPulsate:Fe(o.childPulsate,Ks.childPulsate)},timeout:iF,pulsate:A,rippleX:R,rippleY:k,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),_=I.useCallback((E={},A={},R=()=>{})=>{const{pulsate:k=!1,center:O=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 W,z,D;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)W=Math.round(H.width/2),z=Math.round(H.height/2);else{const{clientX:F,clientY:j}=E.touches&&E.touches.length>0?E.touches[0]:E;W=Math.round(F-H.left),z=Math.round(j-H.top)}if(O)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)-W),W)*2+2,j=Math.max(Math.abs((N?N.clientHeight:0)-z),z)*2+2;D=Math.sqrt(F**2+j**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},Pde)):S({pulsate:k,rippleX:W,rippleY:z,rippleSize:D,cb:R})},[i,S]),b=I.useCallback(()=>{_({},{pulsate:!0})},[_]),x=I.useCallback((E,A)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,A)});return}v.current=null,d(R=>R.length>0?R.slice(1):R),h.current=A},[]);return I.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(Lde,$({className:Fe(Ks.root,o.root,s),ref:y},l,{children:C.jsx(gde,{component:null,exit:!0,children:c})}))}),$de=Bde;function Fde(e){return _t("MuiButtonBase",e)}const zde=Ct("MuiButtonBase",["root","disabled","focusVisible"]),jde=zde,Ude=["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"],Hde=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Et({root:["root",t&&"disabled",n&&"focusVisible"]},Fde,i);return n&&r&&(s.root+=` ${r}`),s},Wde=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${jde.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Gde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:A,onMouseDown:R,onMouseLeave:k,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:W=0,TouchRippleProps:z,touchRippleRef:D,type:F}=r,j=Le(r,Ude),V=I.useRef(null),G=I.useRef(null),K=mr(G,D),{isFocusVisibleRef:Y,onFocus:J,onBlur:ie,ref:ce}=y5(),[ue,se]=I.useState(!1);d&&ue&&se(!1),I.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[Q,ae]=I.useState(!1);I.useEffect(()=>{ae(!0)},[]);const le=Q&&!f&&!d;I.useEffect(()=>{ue&&p&&!f&&Q&&G.current.pulsate()},[f,p,ue,Q]);function he(Ne,Rt,ct=h){return eo(Ae=>(Rt&&Rt(Ae),!ct&&G.current&&G.current[Ne](Ae),!0))}const pe=he("start",R),ve=he("stop",S),ye=he("stop",_),xe=he("stop",O),me=he("stop",Ne=>{ue&&Ne.preventDefault(),k&&k(Ne)}),be=he("start",H),Qe=he("stop",L),qe=he("stop",N),at=he("stop",Ne=>{ie(Ne),Y.current===!1&&se(!1),v&&v(Ne)},!1),Nt=eo(Ne=>{V.current||(V.current=Ne.currentTarget),J(Ne),Y.current===!0&&(se(!0),x&&x(Ne)),b&&b(Ne)}),Ie=()=>{const Ne=V.current;return c&&c!=="button"&&!(Ne.tagName==="A"&&Ne.href)},ze=I.useRef(!1),it=eo(Ne=>{p&&!ze.current&&ue&&G.current&&Ne.key===" "&&(ze.current=!0,G.current.stop(Ne,()=>{G.current.start(Ne)})),Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&Ne.preventDefault(),E&&E(Ne),Ne.target===Ne.currentTarget&&Ie()&&Ne.key==="Enter"&&!d&&(Ne.preventDefault(),y&&y(Ne))}),pt=eo(Ne=>{p&&Ne.key===" "&&G.current&&ue&&!Ne.defaultPrevented&&(ze.current=!1,G.current.stop(Ne,()=>{G.current.pulsate(Ne)})),A&&A(Ne),y&&Ne.target===Ne.currentTarget&&Ie()&&Ne.key===" "&&!Ne.defaultPrevented&&y(Ne)});let mt=c;mt==="button"&&(j.href||j.to)&&(mt=g);const _e={};mt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=d):(!j.href&&!j.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const je=mr(n,ce,V),Ye=$({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:W,focusVisible:ue}),$e=Hde(Ye);return C.jsxs(Wde,$({as:mt,className:Fe($e.root,l),ownerState:Ye,onBlur:at,onClick:y,onContextMenu:ve,onFocus:Nt,onKeyDown:it,onKeyUp:pt,onMouseDown:pe,onMouseLeave:me,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Qe,onTouchMove:qe,onTouchStart:be,ref:je,tabIndex:d?-1:W,type:F},_e,j,{children:[s,le?C.jsx($de,$({ref:K,center:o},z)):null]}))}),Ou=Gde;function Vde(e){return _t("MuiIconButton",e)}const qde=Ct("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Xde=qde,Yde=["edge","children","className","color","disabled","disableFocusRipple","size"],Kde=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Me(r)}`,i&&`edge${Me(i)}`,`size${Me(o)}`]};return Et(s,Vde,t)},Qde=Ee(Ou,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(n.color)}`],n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(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})`:_n(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})`:_n(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)},{[`&.${Xde.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Jde=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,Yde),p=$({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=Kde(p);return C.jsx(Qde,$({className:Fe(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),Bd=Jde;function Zde(e){return _t("MuiTypography",e)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const efe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],tfe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Me(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Et(l,Zde,s)},nfe=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Me(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),jU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},rfe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ife=e=>rfe[e]||e,ofe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTypography"}),i=ife(r.color),o=D5($({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=jU}=o,v=Le(o,efe),y=$({},o,{align:s,color:i,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||jU[p])||"span",_=tfe(y);return C.jsx(nfe,$({as:S,ref:n,ownerState:y,className:Fe(_.root,l)},v))}),zt=ofe;function sfe(e){return _t("MuiAppBar",e)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const afe=["className","color","enableColorOnDark","position"],lfe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Me(t)}`,`position${Me(n)}`]};return Et(i,sfe,r)},Gw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,cfe=Ee(ev,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Me(n.position)}`],t[`color${Me(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:Gw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Gw(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:Gw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Gw(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"}))}),ufe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,afe),d=$({},r,{color:o,position:l,enableColorOnDark:s}),f=lfe(d);return C.jsx(cfe,$({square:!0,component:"header",ownerState:d,elevation:4,className:Fe(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),dfe=ufe;function Ul(e){return typeof e=="string"}function Fb(e,t,n){return e===void 0||Ul(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function ffe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const hfe={disableDefaultClasses:!1},pfe=I.createContext(hfe);function mfe(e){const{disableDefaultClasses:t}=I.useContext(pfe);return n=>t?"":e(n)}function kE(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 gfe(e,t,n){return typeof e=="function"?e(t,n):e}function UU(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 vfe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Fe(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=kE($({},i,r)),l=UU(r),c=UU(i),d=t(s),f=Fe(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},d,n,c,l);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:d.ref}}const yfe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,yfe),l=o?{}:gfe(r,i),{props:c,internalRef:d}=vfe($({},s,{externalSlotProps:l})),f=mr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return Fb(n,$({},c,{ref:f}),i)}function HU(e){return e.substring(2).toLowerCase()}function bfe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=mr(t.ref,l),h=eo(v=>{const y=d.current;d.current=!1;const S=Ar(l.current);if(!c.current||!l.current||"clientX"in v&&bfe(v,S))return;if(s.current){s.current=!1;return}let _;v.composedPath?_=v.composedPath().indexOf(l.current)>-1:_=!S.documentElement.contains(v.target)||l.current.contains(v.target),!_&&(n||!y)&&i(v)}),p=v=>y=>{d.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),I.useEffect(()=>{if(o!==!1){const v=HU(o),y=Ar(l.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),I.useEffect(()=>{if(r!==!1){const v=HU(r),y=Ar(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(I.Fragment,{children:I.cloneElement(t,g)})}const wfe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function _fe(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 Sfe(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 Efe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Sfe(e))}function Cfe(e){const t=[],n=[];return Array.from(e.querySelectorAll(wfe)).forEach((r,i)=>{const o=_fe(r);o===-1||!Efe(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 Tfe(){return!0}function kfe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Cfe,isEnabled:s=Tfe,open:l}=e,c=I.useRef(!1),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(null),g=I.useRef(!1),v=I.useRef(null),y=mr(t.ref,v),S=I.useRef(null);I.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[l]),I.useEffect(()=>{if(!l||!v.current)return;const x=Ar(v.current),E=k=>{S.current=k,!(r||!s()||k.key!=="Tab")&&x.activeElement===v.current&&k.shiftKey&&(c.current=!0,f.current&&f.current.focus())},A=()=>{const k=v.current;if(k===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==f.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!g.current)return;let O=[];if((x.activeElement===d.current||x.activeElement===f.current)&&(O=o(v.current)),O.length>0){var L,N;const H=!!((L=S.current)!=null&&L.shiftKey&&((N=S.current)==null?void 0:N.key)==="Tab"),W=O[0],z=O[O.length-1];typeof W!="string"&&typeof z!="string"&&(H?z.focus():W.focus())}else k.focus()};x.addEventListener("focusin",A),x.addEventListener("keydown",E,!0);const R=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(R),x.removeEventListener("focusin",A),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,l,o]);const _=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0,p.current=x.target;const E=t.props.onFocus;E&&E(x)},b=x=>{h.current===null&&(h.current=x.relatedTarget),g.current=!0};return C.jsxs(I.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var qo="top",ma="bottom",ga="right",Xo="left",M4="auto",V1=[qo,ma,ga,Xo],wg="start",Zx="end",Afe="clippingParents",dK="viewport",sb="popper",Rfe="reference",WU=V1.reduce(function(e,t){return e.concat([t+"-"+wg,t+"-"+Zx])},[]),fK=[].concat(V1,[M4]).reduce(function(e,t){return e.concat([t,t+"-"+wg,t+"-"+Zx])},[]),Ife="beforeRead",Pfe="read",Ofe="afterRead",Mfe="beforeMain",Dfe="main",Lfe="afterMain",Nfe="beforeWrite",Bfe="write",$fe="afterWrite",Ffe=[Ife,Pfe,Ofe,Mfe,Dfe,Lfe,Nfe,Bfe,$fe];function Kl(e){return e?(e.nodeName||"").toLowerCase():null}function Bs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bp(e){var t=Bs(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Bs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function D4(e){if(typeof ShadowRoot>"u")return!1;var t=Bs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zfe(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];!ca(o)||!Kl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function jfe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ca(i)||!Kl(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ufe={name:"applyStyles",enabled:!0,phase:"write",fn:zfe,effect:jfe,requires:["computeStyles"]};function Hl(e){return e.split("-")[0]}var rp=Math.max,AE=Math.min,_g=Math.round;function oF(){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 hK(){return!/^((?!chrome|android).)*safari/i.test(oF())}function Sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&_g(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_g(r.height)/e.offsetHeight||1);var s=bp(e)?Bs(e):window,l=s.visualViewport,c=!hK()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function L4(e){var t=Sg(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 pK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&D4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eu(e){return Bs(e).getComputedStyle(e)}function Hfe(e){return["table","td","th"].indexOf(Kl(e))>=0}function Kd(e){return((bp(e)?e.ownerDocument:e.document)||window.document).documentElement}function QT(e){return Kl(e)==="html"?e:e.assignedSlot||e.parentNode||(D4(e)?e.host:null)||Kd(e)}function GU(e){return!ca(e)||Eu(e).position==="fixed"?null:e.offsetParent}function Wfe(e){var t=/firefox/i.test(oF()),n=/Trident/i.test(oF());if(n&&ca(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=QT(e);for(D4(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(Kl(i))<0;){var o=Eu(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 q1(e){for(var t=Bs(e),n=GU(e);n&&Hfe(n)&&Eu(n).position==="static";)n=GU(n);return n&&(Kl(n)==="html"||Kl(n)==="body"&&Eu(n).position==="static")?t:n||Wfe(e)||t}function N4(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fx(e,t,n){return rp(e,AE(t,n))}function Gfe(e,t,n){var r=fx(e,t,n);return r>n?n:r}function mK(){return{top:0,right:0,bottom:0,left:0}}function gK(e){return Object.assign({},mK(),e)}function vK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Vfe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,gK(typeof t!="number"?t:vK(t,V1))};function qfe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Hl(n.placement),c=N4(l),d=[Xo,ga].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=Vfe(i.padding,n),p=L4(o),g=c==="y"?qo:Xo,v=c==="y"?ma:ga,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=q1(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],A=b-p[f]-h[v],R=b/2-p[f]/2+x,k=fx(E,R,A),O=c;n.modifiersData[r]=(t={},t[O]=k,t.centerOffset=k-R,t)}}function Xfe(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)||pK(t.elements.popper,i)&&(t.elements.arrow=i))}const Yfe={name:"arrow",enabled:!0,phase:"main",fn:qfe,effect:Xfe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eg(e){return e.split("-")[1]}var Kfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qfe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_g(n*i)/i||0,y:_g(r*i)/i||0}}function VU(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,y=v===void 0?0:v,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=Xo,E=qo,A=window;if(d){var R=q1(n),k="clientHeight",O="clientWidth";if(R===Bs(n)&&(R=Kd(n),Eu(R).position!=="static"&&l==="absolute"&&(k="scrollHeight",O="scrollWidth")),R=R,i===qo||(i===Xo||i===ga)&&o===Zx){E=ma;var L=h&&R===A&&A.visualViewport?A.visualViewport.height:R[k];y-=L-r.height,y*=c?1:-1}if(i===Xo||(i===qo||i===ma)&&o===Zx){x=ga;var N=h&&R===A&&A.visualViewport?A.visualViewport.width:R[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&Kfe),W=f===!0?Qfe({x:g,y},Bs(n)):{x:g,y};if(g=W.x,y=W.y,c){var z;return Object.assign({},H,(z={},z[E]=b?"0":"",z[x]=_?"0":"",z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",z))}return Object.assign({},H,(t={},t[E]=b?y+"px":"",t[x]=_?g+"px":"",t.transform="",t))}function Jfe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Hl(t.placement),variation:Eg(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,VU(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VU(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Zfe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jfe,data:{}};var Vw={passive:!0};function ehe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Bs(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,Vw)}),l&&c.addEventListener("resize",n.update,Vw),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Vw)}),l&&c.removeEventListener("resize",n.update,Vw)}}const the={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ehe,data:{}};var nhe={left:"right",right:"left",bottom:"top",top:"bottom"};function kS(e){return e.replace(/left|right|bottom|top/g,function(t){return nhe[t]})}var rhe={start:"end",end:"start"};function qU(e){return e.replace(/start|end/g,function(t){return rhe[t]})}function B4(e){var t=Bs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $4(e){return Sg(Kd(e)).left+B4(e).scrollLeft}function ihe(e,t){var n=Bs(e),r=Kd(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=hK();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+$4(e),y:c}}function ohe(e){var t,n=Kd(e),r=B4(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=rp(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=rp(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+$4(e),c=-r.scrollTop;return Eu(i||n).direction==="rtl"&&(l+=rp(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function F4(e){var t=Eu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function yK(e){return["html","body","#document"].indexOf(Kl(e))>=0?e.ownerDocument.body:ca(e)&&F4(e)?e:yK(QT(e))}function hx(e,t){var n;t===void 0&&(t=[]);var r=yK(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Bs(r),s=i?[o].concat(o.visualViewport||[],F4(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(hx(QT(s)))}function sF(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function she(e,t){var n=Sg(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 XU(e,t,n){return t===dK?sF(ihe(e,n)):bp(t)?she(t,n):sF(ohe(Kd(e)))}function ahe(e){var t=hx(QT(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&ca(e)?q1(e):e;return bp(r)?t.filter(function(i){return bp(i)&&pK(i,r)&&Kl(i)!=="body"}):[]}function lhe(e,t,n,r){var i=t==="clippingParents"?ahe(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=XU(e,d,r);return c.top=rp(f.top,c.top),c.right=AE(f.right,c.right),c.bottom=AE(f.bottom,c.bottom),c.left=rp(f.left,c.left),c},XU(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function bK(e){var t=e.reference,n=e.element,r=e.placement,i=r?Hl(r):null,o=r?Eg(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case qo:c={x:s,y:t.y-n.height};break;case ma:c={x:s,y:t.y+t.height};break;case ga:c={x:t.x+t.width,y:l};break;case Xo:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?N4(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case wg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case Zx:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function e1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?Afe:l,d=n.rootBoundary,f=d===void 0?dK:d,h=n.elementContext,p=h===void 0?sb:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,_=gK(typeof S!="number"?S:vK(S,V1)),b=p===sb?Rfe:sb,x=e.rects.popper,E=e.elements[v?b:p],A=lhe(bp(E)?E:E.contextElement||Kd(e.elements.popper),c,f,s),R=Sg(e.elements.reference),k=bK({reference:R,element:x,strategy:"absolute",placement:i}),O=sF(Object.assign({},x,k)),L=p===sb?O:R,N={top:A.top-L.top+_.top,bottom:L.bottom-A.bottom+_.bottom,left:A.left-L.left+_.left,right:L.right-A.right+_.right},H=e.modifiersData.offset;if(p===sb&&H){var W=H[i];Object.keys(N).forEach(function(z){var D=[ga,ma].indexOf(z)>=0?1:-1,F=[qo,ma].indexOf(z)>=0?"y":"x";N[z]+=W[F]*D})}return N}function che(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?fK:c,f=Eg(r),h=f?l?WU:WU.filter(function(v){return Eg(v)===f}):V1,p=h.filter(function(v){return d.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=e1(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[Hl(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function uhe(e){if(Hl(e)===M4)return[];var t=kS(e);return[qU(e),t,qU(t)]}function dhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,S=t.options.placement,_=Hl(S),b=_===S,x=c||(b||!v?[kS(S)]:uhe(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(Hl(se)===M4?che(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),A=t.rects.reference,R=t.rects.popper,k=new Map,O=!0,L=E[0],N=0;N=0,F=D?"width":"height",j=e1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?z?ga:Xo:z?ma:qo;A[F]>R[F]&&(V=kS(V));var G=kS(V),K=[];if(o&&K.push(j[W]<=0),l&&K.push(j[V]<=0,j[G]<=0),K.every(function(ue){return ue})){L=H,O=!1;break}k.set(H,K)}if(O)for(var Y=v?3:1,J=function(se){var Q=E.find(function(ae){var le=k.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(Q)return L=Q,"break"},ie=Y;ie>0;ie--){var ce=J(ie);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const fhe={name:"flip",enabled:!0,phase:"main",fn:dhe,requiresIfExists:["offset"],data:{_skip:!1}};function YU(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 KU(e){return[qo,ga,ma,Xo].some(function(t){return e[t]>=0})}function hhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=e1(t,{elementContext:"reference"}),l=e1(t,{altBoundary:!0}),c=YU(s,r),d=YU(l,i,o),f=KU(c),h=KU(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const phe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hhe};function mhe(e,t,n){var r=Hl(e),i=[Xo,qo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Xo,ga].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function ghe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=fK.reduce(function(f,h){return f[h]=mhe(h,t.rects,o),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const vhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ghe};function yhe(e){var t=e.state,n=e.name;t.modifiersData[n]=bK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const bhe={name:"popperOffsets",enabled:!0,phase:"read",fn:yhe,data:{}};function xhe(e){return e==="x"?"y":"x"}function whe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,S=e1(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=Hl(t.placement),b=Eg(t.placement),x=!b,E=N4(_),A=xhe(E),R=t.modifiersData.popperOffsets,k=t.rects.reference,O=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,W={x:0,y:0};if(R){if(o){var z,D=E==="y"?qo:Xo,F=E==="y"?ma:ga,j=E==="y"?"height":"width",V=R[E],G=V+S[D],K=V-S[F],Y=g?-O[j]/2:0,J=b===wg?k[j]:O[j],ie=b===wg?-O[j]:-k[j],ce=t.elements.arrow,ue=g&&ce?L4(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mK(),Q=se[D],ae=se[F],le=fx(0,k[j],ue[j]),he=x?k[j]/2-Y-le-Q-N.mainAxis:J-le-Q-N.mainAxis,pe=x?-k[j]/2+Y+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&q1(t.elements.arrow),ye=ve?E==="y"?ve.clientTop||0:ve.clientLeft||0:0,xe=(z=H==null?void 0:H[E])!=null?z:0,me=V+he-xe-ye,be=V+pe-xe,Qe=fx(g?AE(G,me):G,V,g?rp(K,be):K);R[E]=Qe,W[E]=Qe-V}if(l){var qe,at=E==="x"?qo:Xo,Nt=E==="x"?ma:ga,Ie=R[A],ze=A==="y"?"height":"width",it=Ie+S[at],pt=Ie-S[Nt],mt=[qo,Xo].indexOf(_)!==-1,_e=(qe=H==null?void 0:H[A])!=null?qe:0,je=mt?it:Ie-k[ze]-O[ze]-_e+N.altAxis,Ye=mt?Ie+k[ze]+O[ze]-_e-N.altAxis:pt,$e=g&&mt?Gfe(je,Ie,Ye):fx(g?je:it,Ie,g?Ye:pt);R[A]=$e,W[A]=$e-Ie}t.modifiersData[r]=W}}const _he={name:"preventOverflow",enabled:!0,phase:"main",fn:whe,requiresIfExists:["offset"]};function She(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ehe(e){return e===Bs(e)||!ca(e)?B4(e):She(e)}function Che(e){var t=e.getBoundingClientRect(),n=_g(t.width)/e.offsetWidth||1,r=_g(t.height)/e.offsetHeight||1;return n!==1||r!==1}function The(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&Che(t),o=Kd(t),s=Sg(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Kl(t)!=="body"||F4(o))&&(l=Ehe(t)),ca(t)?(c=Sg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=$4(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function khe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ahe(e){var t=khe(e);return Ffe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Rhe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ihe(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 QU={placement:"bottom",modifiers:[],strategy:"absolute"};function JU(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(Dhe(i)||document.body)},[i,o]),Io(()=>{if(s&&!o)return n$(n,s),()=>{n$(n,null)}},[n,s,o]),o){if(I.isValidElement(r)){const d={ref:c};return I.cloneElement(r,d)}return C.jsx(I.Fragment,{children:r})}return C.jsx(I.Fragment,{children:s&&Zg.createPortal(r,s)})});function Lhe(e){return _t("MuiPopper",e)}Ct("MuiPopper",["root"]);const Nhe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Bhe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function $he(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 aF(e){return typeof e=="function"?e():e}function Fhe(e){return e.nodeType!==void 0}const zhe=()=>Et({root:["root"]},mfe(Lhe)),jhe={},Uhe=I.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:l,modifiers:c,open:d,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Le(t,Nhe),_=I.useRef(null),b=mr(_,n),x=I.useRef(null),E=mr(x,p),A=I.useRef(E);Io(()=>{A.current=E},[E]),I.useImperativeHandle(p,()=>x.current,[]);const R=$he(f,s),[k,O]=I.useState(R),[L,N]=I.useState(aF(i));I.useEffect(()=>{x.current&&x.current.forceUpdate()}),I.useEffect(()=>{i&&N(aF(i))},[i]),Io(()=>{if(!L||!d)return;const F=G=>{O(G.placement)};let j=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{F(G)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=Mhe(L,_.current,$({placement:R},h,{modifiers:j}));return A.current(V),()=>{V.destroy(),A.current(null)}},[L,l,c,d,h,R]);const H={placement:k};y!==null&&(H.TransitionProps=y);const W=zhe(),z=(r=v.root)!=null?r:"div",D=Wr({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:W.root});return C.jsx(z,$({},D,{children:typeof o=="function"?o(H):o}))}),Hhe=I.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:f,placement:h="bottom",popperOptions:p=jhe,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,Bhe),[x,E]=I.useState(!0),A=()=>{E(!1)},R=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let k;if(o)k=o;else if(r){const N=aF(r);k=N&&Fhe(N)?Ar(N).body:Ar(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:A,onExited:R}:void 0;return C.jsx(xK,{disablePortal:l,container:k,children:C.jsx(Uhe,$({anchorEl:r,direction:s,disablePortal:l,modifiers:d,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:_},b,{style:$({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function Whe(e){const t=Ar(e);return t.body===e?bu(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function px(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ZU(e){return parseInt(bu(e).getComputedStyle(e).paddingRight,10)||0}function Ghe(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 e8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Ghe(s);l&&c&&px(s,i)})}function VD(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function Vhe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Whe(r)){const s=Eq(Ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ZU(r)+s}px`;const l=Ar(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${ZU(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ar(r).body;else{const s=r.parentElement,l=bu(r);o=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function qhe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Xhe{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&&px(t.modalRef,!1);const i=qhe(n);e8(n,t.mount,t.modalRef,i,!0);const o=VD(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=VD(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=Vhe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=VD(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&&px(t.modalRef,n),e8(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&&px(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Yhe(e){return typeof e=="function"?e():e}function Khe(e){return e?e.props.hasOwnProperty("in"):!1}const Qhe=new Xhe;function Jhe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Qhe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=I.useRef({}),g=I.useRef(null),v=I.useRef(null),y=mr(v,h),[S,_]=I.useState(!f),b=Khe(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Ar(g.current),A=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),R=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=eo(()=>{const j=Yhe(t)||E().body;i.add(A(),j),v.current&&R()}),O=I.useCallback(()=>i.isTopModal(A()),[i]),L=eo(j=>{g.current=j,j&&(f&&O()?R():v.current&&px(v.current,x))}),N=I.useCallback(()=>{i.remove(A(),x)},[x,i]);I.useEffect(()=>()=>{N()},[N]),I.useEffect(()=>{f?k():(!b||!o)&&N()},[f,N,b,o,k]);const H=j=>V=>{var G;(G=j.onKeyDown)==null||G.call(j,V),!(V.key!=="Escape"||!O())&&(n||(V.stopPropagation(),d&&d(V,"escapeKeyDown")))},W=j=>V=>{var G;(G=j.onClick)==null||G.call(j,V),V.target===V.currentTarget&&d&&d(V,"backdropClick")};return{getRootProps:(j={})=>{const V=kE(e);delete V.onTransitionEnter,delete V.onTransitionExited;const G=$({},V,j);return $({role:"presentation"},G,{onKeyDown:H(G),ref:y})},getBackdropProps:(j={})=>{const V=j;return $({"aria-hidden":!0},V,{onClick:W(V),open:f})},getTransitionProps:()=>{const j=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&N()};return{onEnter:t6(j,c==null?void 0:c.props.onEnter),onExited:t6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const Zhe=2;function wK(e,t){return e-t}function ab(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function t8(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const l=Math.abs(t-o);return i===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},ipe=e=>e;let Kw;function qD(){return Kw===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Kw=CSS.supports("touch-action","none"):Kw=!0),Kw}function ope(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:l=100,min:c=0,name:d,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=ipe,step:y=1,tabIndex:S,value:_}=e,b=I.useRef(),[x,E]=I.useState(-1),[A,R]=I.useState(-1),[k,O]=I.useState(!1),L=I.useRef(0),[N,H]=Ox({controlled:_,default:n??c,name:"Slider"}),W=f&&((_e,je,Ye)=>{const $e=_e.nativeEvent||_e,Ne=new $e.constructor($e.type,$e);Object.defineProperty(Ne,"target",{writable:!0,value:{value:je,name:d}}),f(Ne,je,Ye)}),z=Array.isArray(N);let D=z?N.slice().sort(wK):[N];D=D.map(_e=>ab(_e,c,l));const F=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,je)=>({value:c+y*je})):s||[],j=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:G,onFocus:K,ref:Y}=y5(),[J,ie]=I.useState(-1),ce=I.useRef(),ue=mr(Y,ce),se=mr(g,ue),Q=_e=>je=>{var Ye;const $e=Number(je.currentTarget.getAttribute("data-index"));K(je),V.current===!0&&ie($e),R($e),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,je)},ae=_e=>je=>{var Ye;G(je),V.current===!1&&ie(-1),R(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,je)};Io(()=>{if(r&&ce.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&J!==-1&&ie(-1);const le=_e=>je=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index")),Ne=D[$e],Rt=j.indexOf(Ne);let ct=je.target.valueAsNumber;if(F&&y==null){const Ae=j[j.length-1];ct>Ae?ct=Ae:ct{const{current:Ye}=ce,{width:$e,height:Ne,bottom:Rt,left:ct}=Ye.getBoundingClientRect();let Ae;pe.indexOf("vertical")===0?Ae=(Rt-_e.y)/Ne:Ae=(_e.x-ct)/$e,pe.indexOf("-reverse")!==-1&&(Ae=1-Ae);let ot;if(ot=epe(Ae,c,l),y)ot=npe(ot,y,c);else{const Re=t8(j,ot);ot=j[Re]}ot=ab(ot,c,l);let $t=0;if(z){je?$t=he.current:$t=t8(D,ot),i&&(ot=ab(ot,D[$t-1]||-1/0,D[$t+1]||1/0));const Re=ot;ot=n8({values:D,newValue:ot,index:$t}),i&&je||($t=ot.indexOf(Re),he.current=$t)}return{newValue:ot,activeIndex:$t}},ye=eo(_e=>{const je=qw(_e,b);if(!je)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ye,activeIndex:$e}=ve({finger:je,move:!0});Xw({sliderRef:ce,activeIndex:$e,setActive:E}),H(Ye),!k&&L.current>Zhe&&O(!0),W&&!Yw(Ye,N)&&W(_e,Ye,$e)}),xe=eo(_e=>{const je=qw(_e,b);if(O(!1),!je)return;const{newValue:Ye}=ve({finger:je,move:!0});E(-1),_e.type==="touchend"&&R(-1),h&&h(_e,Ye),b.current=void 0,be()}),me=eo(_e=>{if(r)return;qD()||_e.preventDefault();const je=_e.changedTouches[0];je!=null&&(b.current=je.identifier);const Ye=qw(_e,b);if(Ye!==!1){const{newValue:Ne,activeIndex:Rt}=ve({finger:Ye});Xw({sliderRef:ce,activeIndex:Rt,setActive:E}),H(Ne),W&&!Yw(Ne,N)&&W(_e,Ne,Rt)}L.current=0;const $e=Ar(ce.current);$e.addEventListener("touchmove",ye),$e.addEventListener("touchend",xe)}),be=I.useCallback(()=>{const _e=Ar(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);I.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:qD()}),()=>{_e.removeEventListener("touchstart",me,{passive:qD()}),be()}},[be,me]),I.useEffect(()=>{r&&be()},[r,be]);const Qe=_e=>je=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,je),r||je.defaultPrevented||je.button!==0)return;je.preventDefault();const $e=qw(je,b);if($e!==!1){const{newValue:Rt,activeIndex:ct}=ve({finger:$e});Xw({sliderRef:ce,activeIndex:ct,setActive:E}),H(Rt),W&&!Yw(Rt,N)&&W(je,Rt,ct)}L.current=0;const Ne=Ar(ce.current);Ne.addEventListener("mousemove",ye),Ne.addEventListener("mouseup",xe)},qe=RE(z?D[0]:c,c,l),at=RE(D[D.length-1],c,l)-qe,Nt=(_e={})=>{const je={onMouseDown:Qe(_e||{})},Ye=$({},_e,je);return $({ref:se},Ye)},Ie=_e=>je=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,je);const $e=Number(je.currentTarget.getAttribute("data-index"));R($e)},ze=_e=>je=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,je),R(-1)};return{active:x,axis:pe,axisProps:rpe,dragging:k,focusedThumbIndex:J,getHiddenInputProps:(_e={})=>{var je;const Ye={onChange:le(_e||{}),onFocus:Q(_e||{}),onBlur:ae(_e||{})},$e=$({},_e,Ye);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(je=e.step)!=null?je:void 0,disabled:r},$e,{style:$({},Loe,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Nt,getThumbProps:(_e={})=>{const je={onMouseOver:Ie(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,je)},marks:F,open:A,range:z,rootRef:se,trackLeap:at,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function spe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=I.useRef();I.useEffect(()=>{if(!i)return;function _(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[i,r]);const l=eo((_,b)=>{r==null||r(_,b)}),c=eo(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});I.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=I.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=_=>b=>{const x=_.onBlur;x==null||x(b),h()},g=_=>b=>{const x=_.onFocus;x==null||x(b),f()},v=_=>b=>{const x=_.onMouseEnter;x==null||x(b),f()},y=_=>b=>{const x=_.onMouseLeave;x==null||x(b),h()};return I.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",h),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",f)}},[n,h,i]),{getRootProps:(_={})=>{const b=$({},kE(e),kE(_));return $({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const ape=["onChange","maxRows","minRows","style","value"];function Qw(e){return parseInt(e,10)||0}const lpe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function r8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const cpe=I.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,ape),{current:d}=I.useRef(l!=null),f=I.useRef(null),h=mr(n,f),p=I.useRef(null),g=I.useRef(0),[v,y]=I.useState({outerHeightStyle:0}),S=I.useCallback(()=>{const E=f.current,R=bu(E).getComputedStyle(E);if(R.width==="0px")return{outerHeightStyle:0};const k=p.current;k.style.width=R.width,k.value=E.value||t.placeholder||"x",k.value.slice(-1)===` +`&&(k.value+=" ");const O=R.boxSizing,L=Qw(R.paddingBottom)+Qw(R.paddingTop),N=Qw(R.borderBottomWidth)+Qw(R.borderTopWidth),H=k.scrollHeight;k.value="x";const W=k.scrollHeight;let z=H;o&&(z=Math.max(Number(o)*W,z)),i&&(z=Math.min(Number(i)*W,z)),z=Math.max(z,W);const D=z+(O==="border-box"?L+N:0),F=Math.abs(z-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),_=(E,A)=>{const{outerHeightStyle:R,overflow:k}=A;return g.current<20&&(R>0&&Math.abs((E.outerHeightStyle||0)-R)>1||E.overflow!==k)?(g.current+=1,{overflow:k,outerHeightStyle:R}):E},b=I.useCallback(()=>{const E=S();r8(E)||y(A=>_(A,E))},[S]);Io(()=>{const E=()=>{const H=S();r8(H)||Zg.flushSync(()=>{y(W=>_(W,H))})},A=()=>{g.current=0,E()};let R;const k=YC(A),O=f.current,L=bu(O);L.addEventListener("resize",k);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(A),N.observe(O)),()=>{k.clear(),cancelAnimationFrame(R),L.removeEventListener("resize",k),N&&N.disconnect()}},[S]),Io(()=>{b()}),I.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(I.Fragment,{children:[C.jsx("textarea",$({value:l,onChange:x,ref:h,rows:o,style:$({height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0},s)},c)),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},lpe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),upe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],dpe=Ee(Hhe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fpe=I.forwardRef(function(t,n){var r;const i=xT(),o=Tt({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,A=Le(o,upe),R=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,k=$({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},A);return C.jsx(dpe,$({as:l,direction:i==null?void 0:i.direction,slots:{root:R},slotProps:E??d},k,{ref:n}))}),_K=fpe;function hpe(e){return _t("MuiListSubheader",e)}Ct("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const ppe=["className","color","component","disableGutters","disableSticky","inset"],mpe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${Me(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Et(s,hpe,t)},gpe=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Me(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})),SK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,ppe),h=$({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=mpe(h);return C.jsx(gpe,$({as:s,className:Fe(p.root,i),ref:n,ownerState:h},f))});SK.muiSkipListHighlight=!0;const vpe=SK;function Mp({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 ype=I.createContext(void 0),z4=ype;function Qd(){return I.useContext(z4)}function EK(e){return C.jsx(Hae,$({},e,{defaultTheme:ST,themeId:dp}))}function i8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function IE(e,t=!1){return e&&(i8(e.value)&&e.value!==""||t&&i8(e.defaultValue)&&e.defaultValue!=="")}function bpe(e){return e.startAdornment}function xpe(e){return _t("MuiInputBase",e)}const wpe=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Cg=wpe,_pe=["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"],JT=(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${Me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ZT=(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]},Spe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${Me(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&p!=="medium"&&`size${Me(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return Et(y,xpe,t)},ek=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:JT})(({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",[`&.${Cg.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%"})),tk=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ZT})(({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] + .${Cg.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},[`&.${Cg.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"})}),Epe=C.jsx(EK,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Cpe=I.forwardRef(function(t,n){var r;const i=Tt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:A,multiline:R=!1,name:k,onBlur:O,onChange:L,onClick:N,onFocus:H,onKeyDown:W,onKeyUp:z,placeholder:D,readOnly:F,renderSuffix:j,rows:V,slotProps:G={},slots:K={},startAdornment:Y,type:J="text",value:ie}=i,ce=Le(i,_pe),ue=b.value!=null?b.value:ie,{current:se}=I.useRef(ue!=null),Q=I.useRef(),ae=I.useCallback($e=>{},[]),le=mr(Q,x,b.ref,ae),[he,pe]=I.useState(!1),ve=Qd(),ye=Mp({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,I.useEffect(()=>{!ve&&p&&he&&(pe(!1),O&&O())},[ve,p,he,O]);const xe=ve&&ve.onFilled,me=ve&&ve.onEmpty,be=I.useCallback($e=>{IE($e)?xe&&xe():me&&me()},[xe,me]);Io(()=>{se&&be({value:ue})},[ue,be,se]);const Qe=$e=>{if(ye.disabled){$e.stopPropagation();return}H&&H($e),b.onFocus&&b.onFocus($e),ve&&ve.onFocus?ve.onFocus($e):pe(!0)},qe=$e=>{O&&O($e),b.onBlur&&b.onBlur($e),ve&&ve.onBlur?ve.onBlur($e):pe(!1)},at=($e,...Ne)=>{if(!se){const Rt=$e.target||Q.current;if(Rt==null)throw new Error(Md(1));be({value:Rt.value})}b.onChange&&b.onChange($e,...Ne),L&&L($e,...Ne)};I.useEffect(()=>{be(Q.current)},[]);const Nt=$e=>{Q.current&&$e.currentTarget===$e.target&&Q.current.focus(),N&&N($e)};let Ie=_,ze=b;R&&Ie==="input"&&(V?ze=$({type:void 0,minRows:V,maxRows:V},ze):ze=$({type:void 0,maxRows:E,minRows:A},ze),Ie=cpe);const it=$e=>{be($e.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};I.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const pt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:R,size:ye.size,startAdornment:Y,type:J}),mt=Spe(pt),_e=K.root||d.Root||ek,je=G.root||f.root||{},Ye=K.input||d.Input||tk;return ze=$({},ze,(r=G.input)!=null?r:f.input),C.jsxs(I.Fragment,{children:[!g&&Epe,C.jsxs(_e,$({},je,!Ul(_e)&&{ownerState:$({},pt,je.ownerState)},{ref:n,onClick:Nt},ce,{className:Fe(mt.root,je.className,c,F&&"MuiInputBase-readOnly"),children:[Y,C.jsx(z4.Provider,{value:null,children:C.jsx(Ye,$({ownerState:pt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:k,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ue,onKeyDown:W,onKeyUp:z,type:J},ze,!Ul(Ye)&&{as:Ie,ownerState:$({},pt,ze.ownerState)},{ref:le,className:Fe(mt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:qe,onChange:at,onFocus:Qe}))}),v,j?j($({},ye,{startAdornment:Y})):null]}))]})}),nk=Cpe;function Tpe(e){return _t("MuiInput",e)}const kpe=$({},Cg,Ct("MuiInput",["root","underline","input"])),lb=kpe;function Ape(e){return _t("MuiOutlinedInput",e)}const Rpe=$({},Cg,Ct("MuiOutlinedInput",["root","notchedOutline","input"])),Uu=Rpe;function Ipe(e){return _t("MuiFilledInput",e)}const Ppe=$({},Cg,Ct("MuiFilledInput",["root","underline","input"])),_h=Ppe,Ope=Mt(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Mpe=Mt(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 Dpe(e){return _t("MuiAvatar",e)}Ct("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Lpe=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Npe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Et({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Dpe,t)},Bpe=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),$pe=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Fpe=Ee(Mpe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function zpe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=I.useState(!1);return I.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const l=new Image;return l.onload=()=>{s&&o("loaded")},l.onerror=()=>{s&&o("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const jpe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,Lpe);let v=null;const y=zpe($({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=$({},r,{colorDefault:!_,component:l,variant:p}),x=Npe(b);return _?v=C.jsx($pe,$({alt:i,srcSet:h,src:f,sizes:d,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(Fpe,{ownerState:b,className:x.fallback}),C.jsx(Bpe,$({as:l,ownerState:b,className:Fe(x.root,s),ref:n},g,{children:v}))}),Upe=jpe,Hpe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Wpe={entering:{opacity:1},entered:{opacity:1}},Gpe=I.forwardRef(function(t,n){const r=Cn(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=I4}=t,x=Le(t,Hpe),E=I.useRef(null),A=mr(E,l.ref,n),R=D=>F=>{if(D){const j=E.current;F===void 0?D(j):D(j,F)}},k=R(p),O=R((D,F)=>{cK(D);const j=xg({style:S,timeout:_,easing:c},{mode:"enter"});D.style.webkitTransition=r.transitions.create("opacity",j),D.style.transition=r.transitions.create("opacity",j),f&&f(D,F)}),L=R(h),N=R(y),H=R(D=>{const F=xg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),W=R(v),z=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:d,nodeRef:E,onEnter:O,onEntered:L,onEntering:k,onExit:H,onExited:W,onExiting:N,addEndListener:z,timeout:_},x,{children:(D,F)=>I.cloneElement(l,$({style:$({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},Wpe[D],S,l.props.style),ref:A},F))}))}),xp=Gpe;function Vpe(e){return _t("MuiBackdrop",e)}Ct("MuiBackdrop",["root","invisible"]);const qpe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Xpe=e=>{const{classes:t,invisible:n}=e;return Et({root:["root",n&&"invisible"]},Vpe,t)},Ype=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Kpe=I.forwardRef(function(t,n){var r,i,o;const s=Tt({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=xp,transitionDuration:_}=s,b=Le(s,qpe),x=$({},s,{component:d,invisible:p}),E=Xpe(x),A=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:_},b,{children:C.jsx(Ype,$({"aria-hidden":!0},A,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:Fe(E.root,c,A==null?void 0:A.className),ownerState:$({},x,A==null?void 0:A.ownerState),classes:E,ref:n,children:l}))}))}),rk=Kpe,Qpe=N5(),Jpe=qae({themeId:dp,defaultTheme:Qpe,defaultClassName:"MuiBox-root",generateClassName:Tq.generate}),dt=Jpe;function Zpe(e){return _t("MuiButton",e)}const eme=Ct("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"]),Jw=eme,tme=I.createContext({}),nme=tme,rme=I.createContext(void 0),ime=rme,ome=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],sme=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,l={root:["root",o,`${o}${Me(t)}`,`size${Me(i)}`,`${o}Size${Me(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Me(i)}`],endIcon:["endIcon",`iconSize${Me(i)}`]},c=Et(l,Zpe,s);return $({},s,c)},CK=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}}),ame=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Me(n.color)}`],t[`size${Me(n.size)}`],t[`${n.variant}Size${Me(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})`:_n(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})`:_n(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})`:_n(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]}),[`&.${Jw.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Jw.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 ${_n(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"},[`&.${Jw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Jw.disabled}`]:{boxShadow:"none"}}),lme=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},CK(e))),cme=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},CK(e))),ume=I.forwardRef(function(t,n){const r=I.useContext(nme),i=I.useContext(ime),o=b5(r,t),s=Tt({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,A=Le(s,ome),R=$({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),k=sme(R),O=b&&C.jsx(lme,{className:k.startIcon,ownerState:R,children:b}),L=v&&C.jsx(cme,{className:k.endIcon,ownerState:R,children:v}),N=i||"";return C.jsxs(ame,$({ownerState:R,className:Fe(r.className,k.root,f,N),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Fe(k.focusVisible,y),ref:n,type:x},A,{classes:k,children:[O,l,L]}))}),TK=ume;function dme(e){return _t("MuiCard",e)}Ct("MuiCard",["root"]);const fme=["className","raised"],hme=e=>{const{classes:t}=e;return Et({root:["root"]},dme,t)},pme=Ee(ev,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),mme=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,fme),l=$({},r,{raised:o}),c=hme(l);return C.jsx(pme,$({className:Fe(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),gme=mme;function vme(e){return _t("PrivateSwitchBase",e)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const yme=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],bme=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${Me(i)}`],input:["input"]};return Et(o,vme,t)},xme=Ee(Ou)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),wme=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),_me=I.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:d=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:_,onFocus:b,readOnly:x,required:E=!1,tabIndex:A,type:R,value:k}=t,O=Le(t,yme),[L,N]=Ox({controlled:i,default:!!l,name:"SwitchBase",state:"checked"}),H=Qd(),W=K=>{b&&b(K),H&&H.onFocus&&H.onFocus(K)},z=K=>{S&&S(K),H&&H.onBlur&&H.onBlur(K)},D=K=>{if(K.nativeEvent.defaultPrevented)return;const Y=K.target.checked;N(Y),_&&_(K,Y)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const j=R==="checkbox"||R==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:d,edge:f}),G=bme(V);return C.jsxs(xme,$({component:"span",className:Fe(G.root,s),centerRipple:!0,focusRipple:!d,disabled:F,tabIndex:null,role:void 0,onFocus:W,onBlur:z,ownerState:V,ref:n},O,{children:[C.jsx(wme,$({autoFocus:r,checked:i,defaultChecked:l,className:G.input,disabled:F,id:j?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:A,type:R},R==="checkbox"&&k===void 0?{}:{value:k},g)),L?o:h]}))}),kK=_me,Sme=Mt(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"),Eme=Mt(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"),Cme=Mt(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 Tme(e){return _t("MuiCheckbox",e)}const kme=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),XD=kme,Ame=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Rme=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${Me(r)}`,`size${Me(i)}`]},s=Et(o,Tme,t);return $({},t,s)},Ime=Ee(kK,{shouldForwardProp:e=>va(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${Me(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})`:_n(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${XD.checked}, &.${XD.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${XD.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Pme=C.jsx(Eme,{}),Ome=C.jsx(Sme,{}),Mme=C.jsx(Cme,{}),Dme=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=Pme,color:l="primary",icon:c=Ome,indeterminate:d=!1,indeterminateIcon:f=Mme,inputProps:h,size:p="medium",className:g}=o,v=Le(o,Ame),y=d?f:c,S=d?f:s,_=$({},o,{color:l,indeterminate:d,size:p}),b=Rme(_);return C.jsx(Ime,$({type:"checkbox",inputProps:$({"data-indeterminate":d},h),icon:I.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:I.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:Fe(b.root,g)},v,{classes:b}))}),Lme=Dme;function Nme(e){return _t("MuiCircularProgress",e)}Ct("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Bme=["className","color","disableShrink","size","style","thickness","value","variant"];let ik=e=>e,o8,s8,a8,l8;const Hu=44,$me=nc(o8||(o8=ik` 0% { transform: rotate(0deg); } @@ -140,7 +140,7 @@ Error generating stack: `+o.message+` 100% { transform: rotate(360deg); } -`)),$me=tc(a8||(a8=ok` +`)),Fme=nc(s8||(s8=ik` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -155,11 +155,11 @@ Error generating stack: `+o.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),Fme=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${Me(r)}`],svg:["svg"],circle:["circle",`circle${Me(n)}`,i&&"circleDisableShrink"]};return Et(o,Lme,t)},zme=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Me(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"&&Dd(l8||(l8=ok` +`)),zme=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${Me(r)}`],svg:["svg"],circle:["circle",`circle${Me(n)}`,i&&"circleDisableShrink"]};return Et(o,Nme,t)},jme=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Me(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"&&Dd(a8||(a8=ik` animation: ${0} 1.4s linear infinite; - `),Bme)),jme=Ee("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Ume=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Me(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&&Dd(c8||(c8=ok` + `),$me)),Ume=Ee("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Hme=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Me(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&&Dd(l8||(l8=ik` animation: ${0} 1.4s ease-in-out infinite; - `),$me)),Hme=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:h="indeterminate"}=r,p=Le(r,Nme),g=$({},r,{color:o,disableShrink:s,size:l,thickness:d,value:f,variant:h}),v=Fme(g),y={},S={},_={};if(h==="determinate"){const b=2*Math.PI*((Hu-d)/2);y.strokeDasharray=b.toFixed(3),_["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(zme,$({className:Fe(v.root,i),style:$({width:l,height:l},S,c),ownerState:g,ref:n,role:"progressbar"},_,p,{children:C.jsx(jme,{className:v.svg,ownerState:g,viewBox:`${Hu/2} ${Hu/2} ${Hu} ${Hu}`,children:C.jsx(Ume,{className:v.circle,style:y,ownerState:g,cx:Hu,cy:Hu,r:(Hu-d)/2,fill:"none",strokeWidth:d})})}))}),X1=Hme,Wme=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),Gme=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}}),Vme=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,l])=>{var c;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(c=l.palette)==null?void 0:c.mode}});let i=$({html:Wme(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},Gme(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 qme(e){const t=Tt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(I.Fragment,{children:[C.jsx(CK,{styles:i=>Vme(i,r)}),n]})}function Xme(e){return _t("MuiModal",e)}Ct("MuiModal",["root","hidden","backdrop"]);const Yme=["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"],Kme=e=>{const{open:t,exited:n,classes:r}=e;return Et({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Xme,r)},Qme=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Jme=Ee(ik,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Zme=I.forwardRef(function(t,n){var r,i,o,s,l,c;const d=Tt({name:"MuiModal",props:t}),{BackdropComponent:f=Jme,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:_={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:A=!1,disablePortal:R=!1,disableRestoreFocus:k=!1,disableScrollLock:O=!1,hideBackdrop:L=!1,keepMounted:N=!1,onBackdropClick:H,open:W,slotProps:z,slots:D}=d,F=Le(d,Yme),j=$({},d,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:A,disablePortal:R,disableRestoreFocus:k,disableScrollLock:O,hideBackdrop:L,keepMounted:N}),{getRootProps:V,getBackdropProps:G,getTransitionProps:K,portalRef:Y,isTopModal:J,exited:ie,hasTransition:ce}=Qhe($({},j,{rootRef:n})),ue=$({},j,{exited:ie}),se=Kme(ue),Q={};if(v.props.tabIndex===void 0&&(Q.tabIndex="-1"),ce){const{onEnter:xe,onExited:me}=K();Q.onEnter=xe,Q.onExited=me}const ae=(r=(i=D==null?void 0:D.root)!=null?i:_.Root)!=null?r:Qme,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:_.Backdrop)!=null?o:f,he=(l=z==null?void 0:z.root)!=null?l:b.root,pe=(c=z==null?void 0:z.backdrop)!=null?c:b.backdrop,ve=Wr({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ue,className:Fe(p,he==null?void 0:he.className,se==null?void 0:se.root,!ue.open&&ue.exited&&(se==null?void 0:se.hidden))}),ye=Wr({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>G($({},xe,{onClick:me=>{H&&H(me),xe!=null&&xe.onClick&&xe.onClick(me)}})),className:Fe(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ue});return!N&&!W&&(!ce||ie)?null:C.jsx(wK,{ref:Y,container:y,disablePortal:R,children:C.jsxs(ae,$({},ve,{children:[!L&&f?C.jsx(le,$({},ye)):null,C.jsx(Tfe,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:J,open:W,children:I.cloneElement(v,Q)})]}))})}),RK=Zme;function ege(e){return _t("MuiDialog",e)}const tge=Ct("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),KD=tge,nge=I.createContext({}),rge=nge,ige=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],oge=Ee(ik,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),sge=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Me(n)}`],paper:["paper",`paperScroll${Me(n)}`,`paperWidth${Me(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Et(s,ege,t)},age=Ee(RK,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),lge=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Me(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"}})),cge=Ee(ev,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Me(n.scroll)}`],t[`paperWidth${Me(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)`,[`&.${KD.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}`,[`&.${KD.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,[`&.${KD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),uge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiDialog"}),i=In(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:_,open:b,PaperComponent:x=ev,PaperProps:E={},scroll:A="paper",TransitionComponent:R=xp,transitionDuration:k=o,TransitionProps:O}=r,L=Le(r,ige),N=$({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:A}),H=sge(N),W=I.useRef(),z=V=>{W.current=V.target===V.currentTarget},D=V=>{W.current&&(W.current=null,S&&S(V),_&&_(V,"backdropClick"))},F=y5(l),j=I.useMemo(()=>({titleId:F}),[F]);return C.jsx(age,$({className:Fe(H.root,h),closeAfterTransition:!0,components:{Backdrop:oge},componentsProps:{backdrop:$({transitionDuration:k,as:c},d)},disableEscapeKeyDown:p,onClose:_,open:b,ref:n,onClick:D,ownerState:N},L,{children:C.jsx(R,$({appear:!0,in:b,timeout:k,role:"presentation"},O,{children:C.jsx(lge,{className:Fe(H.container),onMouseDown:z,ownerState:N,children:C.jsx(cge,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:Fe(H.paper,E.className),ownerState:N,children:C.jsx(rge.Provider,{value:j,children:f})}))})}))}))}),dge=uge;function fge(e){return _t("MuiDivider",e)}const hge=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),u8=hge,pge=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],mge=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:l,variant:c}=e;return Et({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},fge,r)},gge=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:wn(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%"}})),vge=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),IK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:l=o?"div":"hr",flexItem:c=!1,light:d=!1,orientation:f="horizontal",role:h=l!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Le(r,pge),y=$({},r,{absolute:i,component:l,flexItem:c,light:d,orientation:f,role:h,textAlign:p,variant:g}),S=mge(y);return C.jsx(gge,$({as:l,className:Fe(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(vge,{className:S.wrapper,ownerState:y,children:o}):null}))});IK.muiSkipListHighlight=!0;const nc=IK,yge=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],bge=e=>{const{classes:t,disableUnderline:n}=e,i=Et({root:["root",!n&&"underline"],input:["input"]},Rpe,t);return $({},t,i)},xge=Ee(tk,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ZT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${_h.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${_h.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_h.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_h.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(.${_h.disabled}, .${_h.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${_h.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}))}),wge=Ee(nk,{name:"MuiFilledInput",slot:"Input",overridesResolver:ek})(({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})),PK=I.forwardRef(function(t,n){var r,i,o,s;const l=Tt({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=l,S=Le(l,yge),_=$({},l,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=bge(l),x={root:{ownerState:_},input:{ownerState:_}},E=g??d?Ho(g??d,x):x,A=(r=(i=v.root)!=null?i:c.Root)!=null?r:xge,R=(o=(s=v.input)!=null?s:c.Input)!=null?o:wge;return C.jsx(rk,$({slots:{root:A,input:R},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});PK.muiName="Input";const OK=PK;function _ge(e){return _t("MuiFormControl",e)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Sge=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Ege=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${Me(n)}`,r&&"fullWidth"]};return Et(i,_ge,t)},Cge=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${Me(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%"})),Tge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,_=Le(r,Sge),b=$({},r,{color:s,component:l,disabled:c,error:d,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=Ege(b),[E,A]=I.useState(()=>{let z=!1;return i&&I.Children.forEach(i,D=>{if(!hS(D,["Input","Select"]))return;const F=hS(D,["Select"])?D.props.input:D;F&&ype(F.props)&&(z=!0)}),z}),[R,k]=I.useState(()=>{let z=!1;return i&&I.Children.forEach(i,D=>{hS(D,["Input","Select"])&&(PE(D.props,!0)||PE(D.props.inputProps,!0))&&(z=!0)}),z}),[O,L]=I.useState(!1);c&&O&&L(!1);const N=f!==void 0&&!c?f:O;let H;const W=I.useMemo(()=>({adornedStart:E,setAdornedStart:A,color:s,disabled:c,error:d,filled:R,focused:N,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{L(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{L(!0)},registerEffect:H,required:v,variant:S}),[E,s,c,d,R,N,h,p,H,v,y,S]);return C.jsx(j4.Provider,{value:W,children:C.jsx(Cge,$({as:l,ownerState:b,className:Fe(x.root,o),ref:n},_,{children:i}))})}),kge=Tge,Age=wle({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Tt({props:e,name:"MuiStack"})}),$d=Age;function Rge(e){return _t("MuiFormControlLabel",e)}const Ige=Ct("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),zb=Ige,Pge=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Oge=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${Me(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Et(s,Rge,t)},Mge=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zb.label}`]:t.label},t.root,t[`labelPlacement${Me(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${zb.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},{[`& .${zb.label}`]:{[`&.${zb.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Dge=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${zb.error}`]:{color:(e.vars||e).palette.error.main}})),Lge=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:d,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Le(o,Pge),S=Qd(),_=(r=d??c.props.disabled)!=null?r:S==null?void 0:S.disabled,b=g??c.props.required,x={disabled:_,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof c.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=Mp({props:o,muiFormControl:S,states:["error"]}),A=$({},o,{disabled:_,labelPlacement:p,required:b,error:E.error}),R=Oge(A),k=(i=v.typography)!=null?i:l.typography;let O=h;return O!=null&&O.type!==zt&&!f&&(O=C.jsx(zt,$({component:"span"},k,{className:Fe(R.label,k==null?void 0:k.className),children:O}))),C.jsxs(Mge,$({className:Fe(R.root,s),ownerState:A,ref:n},y,{children:[I.cloneElement(c,x),b?C.jsxs($d,{direction:"row",alignItems:"center",children:[O,C.jsxs(Dge,{ownerState:A,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):O]}))}),Nge=Lge;function Bge(e){return _t("MuiFormHelperText",e)}const $ge=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),d8=$ge;var f8;const Fge=["children","className","component","disabled","error","filled","focused","margin","required","variant"],zge=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:l,required:c}=e,d={root:["root",i&&"disabled",o&&"error",r&&`size${Me(r)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Et(d,Bge,t)},jge=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Me(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,[`&.${d8.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${d8.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Uge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,l=Le(r,Fge),c=Qd(),d=Mp({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=$({},r,{component:s,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=zge(f);return C.jsx(jge,$({as:s,ownerState:f,className:Fe(h.root,o),ref:n},l,{children:i===" "?f8||(f8=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Hge=Uge;function Wge(e){return _t("MuiFormLabel",e)}const Gge=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mx=Gge,Vge=["children","className","color","component","disabled","error","filled","focused","required"],qge=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:l}=e,c={root:["root",`color${Me(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return Et(c,Wge,t)},Xge=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${mx.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${mx.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mx.error}`]:{color:(e.vars||e).palette.error.main}})),Yge=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${mx.error}`]:{color:(e.vars||e).palette.error.main}})),Kge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,l=Le(r,Vge),c=Qd(),d=Mp({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=$({},r,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=qge(f);return C.jsxs(Xge,$({as:s,ownerState:f,className:Fe(h.root,o),ref:n},l,{children:[i,d.required&&C.jsxs(Yge,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),Qge=Kge,Jge=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function lF(e){return`scale(${e}, ${e**2})`}const Zge={entering:{opacity:1,transform:lF(1)},entered:{opacity:1,transform:"none"}},QD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),MK=I.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:l,onEnter:c,onEntered:d,onEntering:f,onExit:h,onExited:p,onExiting:g,style:v,timeout:y="auto",TransitionComponent:S=P4}=t,_=Le(t,Jge),b=I.useRef(),x=I.useRef(),E=In(),A=I.useRef(null),R=mr(A,o.ref,n),k=F=>j=>{if(F){const V=A.current;j===void 0?F(V):F(V,j)}},O=k(f),L=k((F,j)=>{uK(F);const{duration:V,delay:G,easing:K}=xg({style:v,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=Y):Y=V,F.style.transition=[E.transitions.create("opacity",{duration:Y,delay:G}),E.transitions.create("transform",{duration:QD?Y:Y*.666,delay:G,easing:K})].join(","),c&&c(F,j)}),N=k(d),H=k(g),W=k(F=>{const{duration:j,delay:V,easing:G}=xg({style:v,timeout:y,easing:s},{mode:"exit"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=K):K=j,F.style.transition=[E.transitions.create("opacity",{duration:K,delay:V}),E.transitions.create("transform",{duration:QD?K:K*.666,delay:QD?V:V||K*.333,easing:G})].join(","),F.style.opacity=0,F.style.transform=lF(.75),h&&h(F)}),z=k(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(A.current,F)};return I.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:l,nodeRef:A,onEnter:L,onEntered:N,onEntering:O,onExit:W,onExited:z,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},_,{children:(F,j)=>I.cloneElement(o,$({style:$({opacity:0,transform:lF(.75),visibility:F==="exited"&&!l?"hidden":void 0},Zge[F],v,o.props.style),ref:R},j))}))});MK.muiSupportAuto=!0;const OE=MK;function eve(e,t,n,r,i){const[o,s]=I.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Io(()=>{let l=!0;if(!n)return;const c=n(e),d=()=>{l&&s(c.matches)};return d(),c.addListener(d),()=>{l=!1,c.removeListener(d)}},[e,n]),o}const DK=eE["useSyncExternalStore"];function tve(e,t,n,r,i){const o=I.useCallback(()=>t,[t]),s=I.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:f}=r(e);return()=>f}return o},[o,e,r,i,n]),[l,c]=I.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return DK(c,l,s)}function nve(e,t={}){const n=wT(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=eX({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(DK!==void 0?tve:eve)(c,i,o,s,l)}const rve=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],ive=e=>{const{classes:t,disableUnderline:n}=e,i=Et({root:["root",!n&&"underline"],input:["input"]},Cpe,t);return $({},t,i)},ove=Ee(tk,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ZT(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"},[`&.${lb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lb.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(.${lb.disabled}, .${lb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${lb.disabled}:before`]:{borderBottomStyle:"dotted"}})}),sve=Ee(nk,{name:"MuiInput",slot:"Input",overridesResolver:ek})({}),LK=I.forwardRef(function(t,n){var r,i,o,s;const l=Tt({props:t,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=l,_=Le(l,rve),b=ive(l),E={root:{ownerState:{disableUnderline:c}}},A=v??f?Ho(v??f,E):E,R=(r=(i=y.root)!=null?i:d.Root)!=null?r:ove,k=(o=(s=y.input)!=null?s:d.Input)!=null?o:sve;return C.jsx(rk,$({slots:{root:R,input:k},slotProps:A,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},_,{classes:b}))});LK.muiName="Input";const NK=LK;function ave(e){return _t("MuiInputLabel",e)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const lve=["disableAnimation","margin","shrink","variant","className"],cve=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:l}=e,c={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Me(r)}`,s],asterisk:[l&&"asterisk"]},d=Et(c,ave,t);return $({},t,d)},uve=Ee(Qge,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mx.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)"}))),dve=I.forwardRef(function(t,n){const r=Tt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,l=Le(r,lve),c=Qd();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=Mp({props:r,muiFormControl:c,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),p=cve(h);return C.jsx(uve,$({"data-shrink":d,ownerState:h,ref:n,className:Fe(p.root,s)},l,{classes:p}))}),fve=dve;function hve(e){return _t("MuiLinearProgress",e)}Ct("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const pve=["className","color","value","valueBuffer","variant"];let tv=e=>e,h8,p8,m8,g8,v8,y8;const cF=4,mve=tc(h8||(h8=tv` + `),Fme)),Wme=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:h="indeterminate"}=r,p=Le(r,Bme),g=$({},r,{color:o,disableShrink:s,size:l,thickness:d,value:f,variant:h}),v=zme(g),y={},S={},_={};if(h==="determinate"){const b=2*Math.PI*((Hu-d)/2);y.strokeDasharray=b.toFixed(3),_["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(jme,$({className:Fe(v.root,i),style:$({width:l,height:l},S,c),ownerState:g,ref:n,role:"progressbar"},_,p,{children:C.jsx(Ume,{className:v.svg,ownerState:g,viewBox:`${Hu/2} ${Hu/2} ${Hu} ${Hu}`,children:C.jsx(Hme,{className:v.circle,style:y,ownerState:g,cx:Hu,cy:Hu,r:(Hu-d)/2,fill:"none",strokeWidth:d})})}))}),X1=Wme,Gme=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),Vme=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}}),qme=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,l])=>{var c;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(c=l.palette)==null?void 0:c.mode}});let i=$({html:Gme(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},Vme(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 Xme(e){const t=Tt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(I.Fragment,{children:[C.jsx(EK,{styles:i=>qme(i,r)}),n]})}function Yme(e){return _t("MuiModal",e)}Ct("MuiModal",["root","hidden","backdrop"]);const Kme=["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"],Qme=e=>{const{open:t,exited:n,classes:r}=e;return Et({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Yme,r)},Jme=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Zme=Ee(rk,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ege=I.forwardRef(function(t,n){var r,i,o,s,l,c;const d=Tt({name:"MuiModal",props:t}),{BackdropComponent:f=Zme,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:_={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:A=!1,disablePortal:R=!1,disableRestoreFocus:k=!1,disableScrollLock:O=!1,hideBackdrop:L=!1,keepMounted:N=!1,onBackdropClick:H,open:W,slotProps:z,slots:D}=d,F=Le(d,Kme),j=$({},d,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:A,disablePortal:R,disableRestoreFocus:k,disableScrollLock:O,hideBackdrop:L,keepMounted:N}),{getRootProps:V,getBackdropProps:G,getTransitionProps:K,portalRef:Y,isTopModal:J,exited:ie,hasTransition:ce}=Jhe($({},j,{rootRef:n})),ue=$({},j,{exited:ie}),se=Qme(ue),Q={};if(v.props.tabIndex===void 0&&(Q.tabIndex="-1"),ce){const{onEnter:xe,onExited:me}=K();Q.onEnter=xe,Q.onExited=me}const ae=(r=(i=D==null?void 0:D.root)!=null?i:_.Root)!=null?r:Jme,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:_.Backdrop)!=null?o:f,he=(l=z==null?void 0:z.root)!=null?l:b.root,pe=(c=z==null?void 0:z.backdrop)!=null?c:b.backdrop,ve=Wr({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ue,className:Fe(p,he==null?void 0:he.className,se==null?void 0:se.root,!ue.open&&ue.exited&&(se==null?void 0:se.hidden))}),ye=Wr({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>G($({},xe,{onClick:me=>{H&&H(me),xe!=null&&xe.onClick&&xe.onClick(me)}})),className:Fe(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ue});return!N&&!W&&(!ce||ie)?null:C.jsx(xK,{ref:Y,container:y,disablePortal:R,children:C.jsxs(ae,$({},ve,{children:[!L&&f?C.jsx(le,$({},ye)):null,C.jsx(kfe,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:J,open:W,children:I.cloneElement(v,Q)})]}))})}),AK=ege;function tge(e){return _t("MuiDialog",e)}const nge=Ct("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),YD=nge,rge=I.createContext({}),ige=rge,oge=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],sge=Ee(rk,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),age=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Me(n)}`],paper:["paper",`paperScroll${Me(n)}`,`paperWidth${Me(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Et(s,tge,t)},lge=Ee(AK,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),cge=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Me(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"}})),uge=Ee(ev,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Me(n.scroll)}`],t[`paperWidth${Me(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)`,[`&.${YD.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}`,[`&.${YD.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,[`&.${YD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),dge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiDialog"}),i=Cn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:_,open:b,PaperComponent:x=ev,PaperProps:E={},scroll:A="paper",TransitionComponent:R=xp,transitionDuration:k=o,TransitionProps:O}=r,L=Le(r,oge),N=$({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:A}),H=age(N),W=I.useRef(),z=V=>{W.current=V.target===V.currentTarget},D=V=>{W.current&&(W.current=null,S&&S(V),_&&_(V,"backdropClick"))},F=v5(l),j=I.useMemo(()=>({titleId:F}),[F]);return C.jsx(lge,$({className:Fe(H.root,h),closeAfterTransition:!0,components:{Backdrop:sge},componentsProps:{backdrop:$({transitionDuration:k,as:c},d)},disableEscapeKeyDown:p,onClose:_,open:b,ref:n,onClick:D,ownerState:N},L,{children:C.jsx(R,$({appear:!0,in:b,timeout:k,role:"presentation"},O,{children:C.jsx(cge,{className:Fe(H.container),onMouseDown:z,ownerState:N,children:C.jsx(uge,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:Fe(H.paper,E.className),ownerState:N,children:C.jsx(ige.Provider,{value:j,children:f})}))})}))}))}),fge=dge;function hge(e){return _t("MuiDivider",e)}const pge=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),c8=pge,mge=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],gge=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:l,variant:c}=e;return Et({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},hge,r)},vge=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:_n(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%"}})),yge=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),RK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:l=o?"div":"hr",flexItem:c=!1,light:d=!1,orientation:f="horizontal",role:h=l!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Le(r,mge),y=$({},r,{absolute:i,component:l,flexItem:c,light:d,orientation:f,role:h,textAlign:p,variant:g}),S=gge(y);return C.jsx(vge,$({as:l,className:Fe(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(yge,{className:S.wrapper,ownerState:y,children:o}):null}))});RK.muiSkipListHighlight=!0;const gl=RK,bge=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],xge=e=>{const{classes:t,disableUnderline:n}=e,i=Et({root:["root",!n&&"underline"],input:["input"]},Ipe,t);return $({},t,i)},wge=Ee(ek,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JT(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${_h.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${_h.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_h.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_h.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(.${_h.disabled}, .${_h.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${_h.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}))}),_ge=Ee(tk,{name:"MuiFilledInput",slot:"Input",overridesResolver:ZT})(({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})),IK=I.forwardRef(function(t,n){var r,i,o,s;const l=Tt({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=l,S=Le(l,bge),_=$({},l,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=xge(l),x={root:{ownerState:_},input:{ownerState:_}},E=g??d?Ho(g??d,x):x,A=(r=(i=v.root)!=null?i:c.Root)!=null?r:wge,R=(o=(s=v.input)!=null?s:c.Input)!=null?o:_ge;return C.jsx(nk,$({slots:{root:A,input:R},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});IK.muiName="Input";const PK=IK;function Sge(e){return _t("MuiFormControl",e)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Ege=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Cge=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${Me(n)}`,r&&"fullWidth"]};return Et(i,Sge,t)},Tge=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${Me(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%"})),kge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,_=Le(r,Ege),b=$({},r,{color:s,component:l,disabled:c,error:d,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=Cge(b),[E,A]=I.useState(()=>{let z=!1;return i&&I.Children.forEach(i,D=>{if(!hS(D,["Input","Select"]))return;const F=hS(D,["Select"])?D.props.input:D;F&&bpe(F.props)&&(z=!0)}),z}),[R,k]=I.useState(()=>{let z=!1;return i&&I.Children.forEach(i,D=>{hS(D,["Input","Select"])&&(IE(D.props,!0)||IE(D.props.inputProps,!0))&&(z=!0)}),z}),[O,L]=I.useState(!1);c&&O&&L(!1);const N=f!==void 0&&!c?f:O;let H;const W=I.useMemo(()=>({adornedStart:E,setAdornedStart:A,color:s,disabled:c,error:d,filled:R,focused:N,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{L(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{L(!0)},registerEffect:H,required:v,variant:S}),[E,s,c,d,R,N,h,p,H,v,y,S]);return C.jsx(z4.Provider,{value:W,children:C.jsx(Tge,$({as:l,ownerState:b,className:Fe(x.root,o),ref:n},_,{children:i}))})}),Age=kge,Rge=_le({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Tt({props:e,name:"MuiStack"})}),$d=Rge;function Ige(e){return _t("MuiFormControlLabel",e)}const Pge=Ct("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),zb=Pge,Oge=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Mge=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${Me(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Et(s,Ige,t)},Dge=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zb.label}`]:t.label},t.root,t[`labelPlacement${Me(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${zb.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},{[`& .${zb.label}`]:{[`&.${zb.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Lge=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${zb.error}`]:{color:(e.vars||e).palette.error.main}})),Nge=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:d,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Le(o,Oge),S=Qd(),_=(r=d??c.props.disabled)!=null?r:S==null?void 0:S.disabled,b=g??c.props.required,x={disabled:_,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof c.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=Mp({props:o,muiFormControl:S,states:["error"]}),A=$({},o,{disabled:_,labelPlacement:p,required:b,error:E.error}),R=Mge(A),k=(i=v.typography)!=null?i:l.typography;let O=h;return O!=null&&O.type!==zt&&!f&&(O=C.jsx(zt,$({component:"span"},k,{className:Fe(R.label,k==null?void 0:k.className),children:O}))),C.jsxs(Dge,$({className:Fe(R.root,s),ownerState:A,ref:n},y,{children:[I.cloneElement(c,x),b?C.jsxs($d,{direction:"row",alignItems:"center",children:[O,C.jsxs(Lge,{ownerState:A,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):O]}))}),Bge=Nge;function $ge(e){return _t("MuiFormHelperText",e)}const Fge=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),u8=Fge;var d8;const zge=["children","className","component","disabled","error","filled","focused","margin","required","variant"],jge=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:l,required:c}=e,d={root:["root",i&&"disabled",o&&"error",r&&`size${Me(r)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Et(d,$ge,t)},Uge=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Me(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,[`&.${u8.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${u8.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Hge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,l=Le(r,zge),c=Qd(),d=Mp({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=$({},r,{component:s,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=jge(f);return C.jsx(Uge,$({as:s,ownerState:f,className:Fe(h.root,o),ref:n},l,{children:i===" "?d8||(d8=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Wge=Hge;function Gge(e){return _t("MuiFormLabel",e)}const Vge=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mx=Vge,qge=["children","className","color","component","disabled","error","filled","focused","required"],Xge=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:l}=e,c={root:["root",`color${Me(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return Et(c,Gge,t)},Yge=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${mx.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${mx.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mx.error}`]:{color:(e.vars||e).palette.error.main}})),Kge=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${mx.error}`]:{color:(e.vars||e).palette.error.main}})),Qge=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,l=Le(r,qge),c=Qd(),d=Mp({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=$({},r,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=Xge(f);return C.jsxs(Yge,$({as:s,ownerState:f,className:Fe(h.root,o),ref:n},l,{children:[i,d.required&&C.jsxs(Kge,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),Jge=Qge,Zge=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function lF(e){return`scale(${e}, ${e**2})`}const eve={entering:{opacity:1,transform:lF(1)},entered:{opacity:1,transform:"none"}},KD=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),OK=I.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:l,onEnter:c,onEntered:d,onEntering:f,onExit:h,onExited:p,onExiting:g,style:v,timeout:y="auto",TransitionComponent:S=I4}=t,_=Le(t,Zge),b=I.useRef(),x=I.useRef(),E=Cn(),A=I.useRef(null),R=mr(A,o.ref,n),k=F=>j=>{if(F){const V=A.current;j===void 0?F(V):F(V,j)}},O=k(f),L=k((F,j)=>{cK(F);const{duration:V,delay:G,easing:K}=xg({style:v,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=Y):Y=V,F.style.transition=[E.transitions.create("opacity",{duration:Y,delay:G}),E.transitions.create("transform",{duration:KD?Y:Y*.666,delay:G,easing:K})].join(","),c&&c(F,j)}),N=k(d),H=k(g),W=k(F=>{const{duration:j,delay:V,easing:G}=xg({style:v,timeout:y,easing:s},{mode:"exit"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=K):K=j,F.style.transition=[E.transitions.create("opacity",{duration:K,delay:V}),E.transitions.create("transform",{duration:KD?K:K*.666,delay:KD?V:V||K*.333,easing:G})].join(","),F.style.opacity=0,F.style.transform=lF(.75),h&&h(F)}),z=k(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(A.current,F)};return I.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:l,nodeRef:A,onEnter:L,onEntered:N,onEntering:O,onExit:W,onExited:z,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},_,{children:(F,j)=>I.cloneElement(o,$({style:$({opacity:0,transform:lF(.75),visibility:F==="exited"&&!l?"hidden":void 0},eve[F],v,o.props.style),ref:R},j))}))});OK.muiSupportAuto=!0;const PE=OK;function tve(e,t,n,r,i){const[o,s]=I.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Io(()=>{let l=!0;if(!n)return;const c=n(e),d=()=>{l&&s(c.matches)};return d(),c.addListener(d),()=>{l=!1,c.removeListener(d)}},[e,n]),o}const MK=ZS["useSyncExternalStore"];function nve(e,t,n,r,i){const o=I.useCallback(()=>t,[t]),s=I.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:f}=r(e);return()=>f}return o},[o,e,r,i,n]),[l,c]=I.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return MK(c,l,s)}function rve(e,t={}){const n=xT(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=Zq({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(MK!==void 0?nve:tve)(c,i,o,s,l)}const ive=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],ove=e=>{const{classes:t,disableUnderline:n}=e,i=Et({root:["root",!n&&"underline"],input:["input"]},Tpe,t);return $({},t,i)},sve=Ee(ek,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...JT(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"},[`&.${lb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${lb.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(.${lb.disabled}, .${lb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${lb.disabled}:before`]:{borderBottomStyle:"dotted"}})}),ave=Ee(tk,{name:"MuiInput",slot:"Input",overridesResolver:ZT})({}),DK=I.forwardRef(function(t,n){var r,i,o,s;const l=Tt({props:t,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=l,_=Le(l,ive),b=ove(l),E={root:{ownerState:{disableUnderline:c}}},A=v??f?Ho(v??f,E):E,R=(r=(i=y.root)!=null?i:d.Root)!=null?r:sve,k=(o=(s=y.input)!=null?s:d.Input)!=null?o:ave;return C.jsx(nk,$({slots:{root:R,input:k},slotProps:A,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},_,{classes:b}))});DK.muiName="Input";const LK=DK;function lve(e){return _t("MuiInputLabel",e)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const cve=["disableAnimation","margin","shrink","variant","className"],uve=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:l}=e,c={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Me(r)}`,s],asterisk:[l&&"asterisk"]},d=Et(c,lve,t);return $({},t,d)},dve=Ee(Jge,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mx.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)"}))),fve=I.forwardRef(function(t,n){const r=Tt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,l=Le(r,cve),c=Qd();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=Mp({props:r,muiFormControl:c,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),p=uve(h);return C.jsx(dve,$({"data-shrink":d,ownerState:h,ref:n,className:Fe(p.root,s)},l,{classes:p}))}),hve=fve;function pve(e){return _t("MuiLinearProgress",e)}Ct("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const mve=["className","color","value","valueBuffer","variant"];let tv=e=>e,f8,h8,p8,m8,g8,v8;const cF=4,gve=nc(f8||(f8=tv` 0% { left: -35%; right: 100%; @@ -174,7 +174,7 @@ Error generating stack: `+o.message+` left: 100%; right: -90%; } -`)),gve=tc(p8||(p8=tv` +`)),vve=nc(h8||(h8=tv` 0% { left: -200%; right: 100%; @@ -189,7 +189,7 @@ Error generating stack: `+o.message+` left: 107%; right: -8%; } -`)),vve=tc(m8||(m8=tv` +`)),yve=nc(p8||(p8=tv` 0% { opacity: 1; background-position: 0 -23px; @@ -204,15 +204,15 @@ Error generating stack: `+o.message+` opacity: 1; background-position: -200px -23px; } -`)),yve=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${Me(r)}`,n],dashed:["dashed",`dashedColor${Me(r)}`],bar1:["bar",`barColor${Me(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Me(r)}`,n==="buffer"&&`color${Me(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Et(i,hve,t)},U4=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Kg(e.palette[t].main,.62):Yg(e.palette[t].main,.5),bve=Ee("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:U4(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)"})),xve=Ee("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Me(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=U4(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"})},Dd(g8||(g8=tv` +`)),bve=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${Me(r)}`,n],dashed:["dashed",`dashedColor${Me(r)}`],bar1:["bar",`barColor${Me(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Me(r)}`,n==="buffer"&&`color${Me(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Et(i,pve,t)},j4=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Kg(e.palette[t].main,.62):Yg(e.palette[t].main,.5),xve=Ee("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:j4(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)"})),wve=Ee("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Me(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=j4(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"})},Dd(m8||(m8=tv` animation: ${0} 3s infinite linear; - `),vve)),wve=Ee("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Me(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 .${cF}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${cF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Dd(v8||(v8=tv` + `),yve)),_ve=Ee("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Me(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 .${cF}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${cF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Dd(g8||(g8=tv` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `),mve)),_ve=Ee("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Me(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:U4(t,e.color),transition:`transform .${cF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Dd(y8||(y8=tv` + `),gve)),Sve=Ee("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Me(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:j4(t,e.color),transition:`transform .${cF}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Dd(v8||(v8=tv` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `),gve)),Sve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,d=Le(r,pve),f=$({},r,{color:o,variant:c}),h=yve(f),p=In(),g={},v={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(bve,$({className:Fe(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},d,{children:[c==="buffer"?C.jsx(xve,{className:h.dashed,ownerState:f}):null,C.jsx(wve,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(_ve,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),Eve=Sve,Cve=I.createContext({}),ua=Cve;function Tve(e){return _t("MuiList",e)}Ct("MuiList",["root","padding","dense","subheader"]);const kve=["children","className","component","dense","disablePadding","subheader"],Ave=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Et({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Tve,t)},Rve=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Ive=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,f=Le(r,kve),h=I.useMemo(()=>({dense:l}),[l]),p=$({},r,{component:s,dense:l,disablePadding:c}),g=Ave(p);return C.jsx(ua.Provider,{value:h,children:C.jsxs(Rve,$({as:s,className:Fe(g.root,o),ref:n,ownerState:p},f,{children:[d,i]}))})}),wp=Ive;function Pve(e){return _t("MuiListItem",e)}const Ove=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),lm=Ove;function Mve(e){return _t("MuiListItemButton",e)}const Dve=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),cm=Dve,Lve=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Nve=(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]},Bve=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:l}=e,d=Et({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},Mve,n);return $({},n,d)},$ve=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Nve})(({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"}},[`&.${cm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:wn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:wn(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})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cm.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})),Fve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:l,dense:c=!1,disableGutters:d=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Le(r,Lve),y=I.useContext(ua),S=I.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:d}),[i,y.dense,c,d]),_=I.useRef(null);Io(()=>{o&&_.current&&_.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:d,divider:f,selected:p}),x=Bve(b),E=mr(_,n);return C.jsx(ua.Provider,{value:S,children:C.jsx($ve,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:Fe(x.focusVisible,h),ownerState:b,className:Fe(x.root,g)},v,{classes:x,children:l}))})}),ME=Fve;function zve(e){return _t("MuiListItemSecondaryAction",e)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const jve=["className"],Uve=e=>{const{disableGutters:t,classes:n}=e;return Et({root:["root",t&&"disableGutters"]},zve,n)},Hve=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),BK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,jve),s=I.useContext(ua),l=$({},r,{disableGutters:s.disableGutters}),c=Uve(l);return C.jsx(Hve,$({className:Fe(c.root,i),ownerState:l,ref:n},o))});BK.muiName="ListItemSecondaryAction";const Wve=BK,Gve=["className"],Vve=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],qve=(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]},Xve=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:d,selected:f}=e;return Et({root:["root",i&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",d&&"secondaryAction",f&&"selected"],container:["container"]},Pve,r)},Yve=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:qve})(({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&&{[`& > .${cm.root}`]:{paddingRight:48}},{[`&.${lm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:wn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lm.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"}},[`&.${lm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:wn(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})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Kve=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Qve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:l,className:c,component:d,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:_=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:A=!1,slotProps:R={},slots:k={}}=r,O=Le(r.ContainerProps,Gve),L=Le(r,Vve),N=I.useContext(ua),H=I.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),W=I.useRef(null);Io(()=>{o&&W.current&&W.current.focus()},[o]);const z=I.Children.toArray(l),D=z.length&&hS(z[z.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:_,divider:b,hasSecondaryAction:D,selected:A}),j=Xve(F),V=mr(W,n),G=k.root||f.Root||Yve,K=R.root||h.root||{},Y=$({className:Fe(j.root,K.className,c),disabled:y},L);let J=d||"li";return s&&(Y.component=d||"div",Y.focusVisibleClassName=Fe(lm.focusVisible,x),J=Ou),D?(J=!Y.component&&!d?"div":J,p==="li"&&(J==="li"?J="div":Y.component==="li"&&(Y.component="div")),C.jsx(ua.Provider,{value:H,children:C.jsxs(Kve,$({as:p,className:Fe(j.container,g),ref:V,ownerState:F},O,{children:[C.jsx(G,$({},K,!zl(G)&&{as:J,ownerState:$({},F,K.ownerState)},Y,{children:z})),z.pop()]}))})):C.jsx(ua.Provider,{value:H,children:C.jsxs(G,$({},K,{as:J,ref:V},!zl(G)&&{ownerState:$({},F,K.ownerState)},Y,{children:[z,E&&C.jsx(Wve,{children:E})]}))})}),Qm=Qve;function Jve(e){return _t("MuiListItemAvatar",e)}Ct("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Zve=["className"],eye=e=>{const{alignItems:t,classes:n}=e;return Et({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Jve,n)},tye=Ee("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>$({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),nye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Le(r,Zve),s=I.useContext(ua),l=$({},r,{alignItems:s.alignItems}),c=eye(l);return C.jsx(tye,$({className:Fe(c.root,i),ownerState:l,ref:n},o))}),rye=nye;function iye(e){return _t("MuiListItemIcon",e)}const oye=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]),b8=oye,sye=["className"],aye=e=>{const{alignItems:t,classes:n}=e;return Et({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},iye,n)},lye=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),cye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,sye),s=I.useContext(ua),l=$({},r,{alignItems:s.alignItems}),c=aye(l);return C.jsx(lye,$({className:Fe(c.root,i),ownerState:l,ref:n},o))}),Ul=cye;function uye(e){return _t("MuiListItemText",e)}const dye=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),DE=dye,fye=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],hye=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Et({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},uye,t)},pye=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${DE.primary}`]:t.primary},{[`& .${DE.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})),mye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:d,secondary:f,secondaryTypographyProps:h}=r,p=Le(r,fye),{dense:g}=I.useContext(ua);let v=c??i,y=f;const S=$({},r,{disableTypography:s,inset:l,primary:!!v,secondary:!!y,dense:g}),_=hye(S);return v!=null&&v.type!==zt&&!s&&(v=C.jsx(zt,$({variant:g?"body2":"body1",className:_.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:v}))),y!=null&&y.type!==zt&&!s&&(y=C.jsx(zt,$({variant:"body2",className:_.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(pye,$({className:Fe(_.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),ol=mye,gye=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function JD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function x8(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function $K(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 cb(e,t,n,r,i,o){let s=!1,l=i(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!$K(l,o)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const vye=I.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,p=Le(t,gye),g=I.useRef(null),v=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Io(()=>{i&&g.current.focus()},[i]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const A=!g.current.style.width;if(x.clientHeight{const E=g.current,A=x.key,R=Ar(E).activeElement;if(A==="ArrowDown")x.preventDefault(),cb(E,R,d,c,JD);else if(A==="ArrowUp")x.preventDefault(),cb(E,R,d,c,x8);else if(A==="Home")x.preventDefault(),cb(E,null,d,c,JD);else if(A==="End")x.preventDefault(),cb(E,null,d,c,x8);else if(A.length===1){const k=v.current,O=A.toLowerCase(),L=performance.now();k.keys.length>0&&(L-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&O!==k.keys[0]&&(k.repeating=!1)),k.lastTime=L,k.keys.push(O);const N=R&&!k.repeating&&$K(R,k);k.previousKeyMatched&&(N||cb(E,R,!1,c,JD,k))?x.preventDefault():k.previousKeyMatched=!1}f&&f(x)},S=mr(g,n);let _=-1;I.Children.forEach(s,(x,E)=>{if(!I.isValidElement(x)){_===E&&(_+=1,_>=s.length&&(_=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||_===-1)&&(_=E),_===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(_+=1,_>=s.length&&(_=-1))});const b=I.Children.map(s,(x,E)=>{if(E===_){const A={};return o&&(A.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(A.tabIndex=0),I.cloneElement(x,A)}return x});return C.jsx(wp,$({role:"menu",ref:S,className:l,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),Y1=vye;function yye(e){return _t("MuiPopover",e)}Ct("MuiPopover",["root","paper"]);const bye=["onEntering"],xye=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],wye=["slotProps"];function w8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function _8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function S8(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 _ye=e=>{const{classes:t}=e;return Et({root:["root"],paper:["paper"]},yye,t)},Sye=Ee(RK,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),FK=Ee(ev,{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}),Eye=I.forwardRef(function(t,n){var r,i,o;const s=Tt({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:_,PaperProps:b={},slots:x,slotProps:E,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:R=OE,transitionDuration:k="auto",TransitionProps:{onEntering:O}={},disableScrollLock:L=!1}=s,N=Le(s.TransitionProps,bye),H=Le(s,xye),W=(r=E==null?void 0:E.paper)!=null?r:b,z=I.useRef(),D=mr(z,W.ref),F=$({},s,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:W,transformOrigin:A,TransitionComponent:R,transitionDuration:k,TransitionProps:N}),j=_ye(F),V=I.useCallback(()=>{if(h==="anchorPosition")return f;const xe=ZD(c),be=(xe&&xe.nodeType===1?xe:Ar(z.current).body).getBoundingClientRect();return{top:be.top+w8(be,d.vertical),left:be.left+_8(be,d.horizontal)}},[c,d.horizontal,d.vertical,f,h]),G=I.useCallback(xe=>({vertical:w8(xe,A.vertical),horizontal:_8(xe,A.horizontal)}),[A.horizontal,A.vertical]),K=I.useCallback(xe=>{const me={width:xe.offsetWidth,height:xe.offsetHeight},be=G(me);if(h==="none")return{top:null,left:null,transformOrigin:S8(be)};const Qe=V();let qe=Qe.top-be.vertical,at=Qe.left-be.horizontal;const Nt=qe+me.height,Ie=at+me.width,ze=bu(ZD(c)),it=ze.innerHeight-S,pt=ze.innerWidth-S;if(S!==null&&qeit){const mt=Nt-it;qe-=mt,be.vertical+=mt}if(S!==null&&atpt){const mt=Ie-pt;at-=mt,be.horizontal+=mt}return{top:`${Math.round(qe)}px`,left:`${Math.round(at)}px`,transformOrigin:S8(be)}},[c,h,V,G,S]),[Y,J]=I.useState(_),ie=I.useCallback(()=>{const xe=z.current;if(!xe)return;const me=K(xe);me.top!==null&&(xe.style.top=me.top),me.left!==null&&(xe.style.left=me.left),xe.style.transformOrigin=me.transformOrigin,J(!0)},[K]);I.useEffect(()=>(L&&window.addEventListener("scroll",ie),()=>window.removeEventListener("scroll",ie)),[c,L,ie]);const ce=(xe,me)=>{O&&O(xe,me),ie()},ue=()=>{J(!1)};I.useEffect(()=>{_&&ie()}),I.useImperativeHandle(l,()=>_?{updatePosition:()=>{ie()}}:null,[_,ie]),I.useEffect(()=>{if(!_)return;const xe=KC(()=>{ie()}),me=bu(c);return me.addEventListener("resize",xe),()=>{xe.clear(),me.removeEventListener("resize",xe)}},[c,_,ie]);let se=k;k==="auto"&&!R.muiSupportAuto&&(se=void 0);const Q=v||(c?Ar(ZD(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:Sye,le=(o=x==null?void 0:x.paper)!=null?o:FK,he=Wr({elementType:le,externalSlotProps:$({},W,{style:Y?W.style:$({},W.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:Fe(j.paper,W==null?void 0:W.className)}),pe=Wr({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Q,open:_},ownerState:F,className:Fe(j.root,g)}),{slotProps:ve}=pe,ye=Le(pe,wye);return C.jsx(ae,$({},ye,!zl(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(R,$({appear:!0,in:_,onEntering:ce,onExited:ue,timeout:se},N,{children:C.jsx(le,$({},he,{children:p}))}))}))}),Cye=Eye;function Tye(e){return _t("MuiMenu",e)}Ct("MuiMenu",["root","paper","list"]);const kye=["onEntering"],Aye=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Rye={vertical:"top",horizontal:"right"},Iye={vertical:"top",horizontal:"left"},Pye=e=>{const{classes:t}=e;return Et({root:["root"],paper:["paper"],list:["list"]},Tye,t)},Oye=Ee(Cye,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Mye=Ee(FK,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Dye=Ee(Y1,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Lye=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:_="selectedMenu",slots:b={},slotProps:x={}}=o,E=Le(o.TransitionProps,kye),A=Le(o,Aye),R=In(),k=R.direction==="rtl",O=$({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:_}),L=Pye(O),N=s&&!d&&p,H=I.useRef(null),W=(K,Y)=>{H.current&&H.current.adjustStyleForScrollbar(K,R),S&&S(K,Y)},z=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;I.Children.map(l,(K,Y)=>{I.isValidElement(K)&&(K.props.disabled||(_==="selectedMenu"&&K.props.selected||D===-1)&&(D=Y))});const F=(r=b.paper)!=null?r:Mye,j=(i=x.paper)!=null?i:g,V=Wr({elementType:b.root,externalSlotProps:x.root,ownerState:O,className:[L.root,c]}),G=Wr({elementType:F,externalSlotProps:j,ownerState:O,className:L.paper});return C.jsx(Oye,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?Rye:Iye,slots:{paper:F,root:b.root},slotProps:{root:V,paper:G},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:W},E),ownerState:O},A,{classes:v,children:C.jsx(Dye,$({onKeyDown:z,actions:H,autoFocus:s&&(D===-1||d),autoFocusItem:N,variant:_},f,{className:Fe(L.list,f.className),children:l}))}))}),Jd=Lye;function Nye(e){return _t("MuiMenuItem",e)}const Bye=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ub=Bye,$ye=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Fye=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},zye=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=Et({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Nye,s);return $({},s,c)},jye=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Fye})(({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"}},[`&.${ub.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ub.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:wn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ub.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:wn(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})`:wn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ub.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ub.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${u8.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${u8.inset}`]:{marginLeft:52},[`& .${DE.root}`]:{marginTop:0,marginBottom:0},[`& .${DE.inset}`]:{paddingLeft:36},[`& .${b8.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${b8.root} svg`]:{fontSize:"1.25rem"}}))),Uye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:p}=r,g=Le(r,$ye),v=I.useContext(ua),y=I.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=I.useRef(null);Io(()=>{i&&S.current&&S.current.focus()},[i]);const _=$({},r,{dense:y.dense,divider:l,disableGutters:c}),b=zye(r),x=mr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(ua.Provider,{value:y,children:C.jsx(jye,$({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:Fe(b.focusVisible,d),className:Fe(b.root,p)},g,{ownerState:_,classes:b}))})}),Hl=Uye;function Hye(e){return _t("MuiNativeSelect",e)}const Wye=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),H4=Wye,Gye=["className","disabled","error","IconComponent","inputRef","variant"],Vye=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Me(n)}`,o&&"iconOpen",r&&"disabled"]};return Et(l,Hye,t)},zK=({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"},[`&.${H4.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}}),qye=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:va,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${H4.multiple}`]:t.multiple}]}})(zK),jK=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${H4.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Xye=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Me(n.variant)}`],n.open&&t.iconOpen]}})(jK),Yye=I.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:l,variant:c="standard"}=t,d=Le(t,Gye),f=$({},t,{disabled:i,variant:c,error:o}),h=Vye(f);return C.jsxs(I.Fragment,{children:[C.jsx(qye,$({ownerState:f,className:Fe(h.select,r),disabled:i,ref:l||n},d)),t.multiple?null:C.jsx(Xye,{as:s,ownerState:f,className:h.icon})]})}),Kye=Yye;var E8;const Qye=["children","classes","className","label","notched"],Jye=Ee("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Zye=Ee("legend")(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function e0e(e){const{className:t,label:n,notched:r}=e,i=Le(e,Qye),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(Jye,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(Zye,{ownerState:s,children:o?C.jsx("span",{children:n}):E8||(E8=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const t0e=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],n0e=e=>{const{classes:t}=e,r=Et({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},kpe,t);return $({},t,r)},r0e=Ee(tk,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ZT})(({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 .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Uu.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Uu.focused} .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Uu.error} .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Uu.disabled} .${Uu.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"}))}),i0e=Ee(e0e,{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}}),o0e=Ee(nk,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ek})(({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})),UK=I.forwardRef(function(t,n){var r,i,o,s,l;const c=Tt({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,_=Le(c,t0e),b=n0e(c),x=Qd(),E=Mp({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:g,size:E.size,type:S}),R=(r=(i=y.root)!=null?i:d.Root)!=null?r:r0e,k=(o=(s=y.input)!=null?s:d.Input)!=null?o:o0e;return C.jsx(rk,$({slots:{root:R,input:k},renderSuffix:O=>C.jsx(i0e,{ownerState:A,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?l||(l=C.jsxs(I.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(O.startAdornment||O.filled||O.focused)}),fullWidth:f,inputComponent:h,multiline:g,ref:n,type:S},_,{classes:$({},b,{notchedOutline:null})}))});UK.muiName="Input";const HK=UK;function s0e(e){return _t("MuiSelect",e)}const a0e=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),db=a0e;var C8;const l0e=["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"],c0e=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${db.select}`]:t.select},{[`&.${db.select}`]:t[n.variant]},{[`&.${db.error}`]:t.error},{[`&.${db.multiple}`]:t.multiple}]}})(zK,{[`&.${db.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),u0e=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Me(n.variant)}`],n.open&&t.iconOpen]}})(jK),d0e=Ee("input",{shouldForwardProp:e=>$5(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 T8(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function f0e(e){return e==null||typeof e=="string"&&!e.trim()}const h0e=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Me(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Et(l,s0e,t)},p0e=I.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:l,children:c,className:d,defaultOpen:f,defaultValue:h,disabled:p,displayEmpty:g,error:v=!1,IconComponent:y,inputRef:S,labelId:_,MenuProps:b={},multiple:x,name:E,onBlur:A,onChange:R,onClose:k,onFocus:O,onOpen:L,open:N,readOnly:H,renderValue:W,SelectDisplayProps:z={},tabIndex:D,value:F,variant:j="standard"}=t,V=Le(t,l0e),[G,K]=Ox({controlled:F,default:h,name:"Select"}),[Y,J]=Ox({controlled:N,default:f,name:"Select"}),ie=I.useRef(null),ce=I.useRef(null),[ue,se]=I.useState(null),{current:Q}=I.useRef(N!=null),[ae,le]=I.useState(),he=mr(n,S),pe=I.useCallback(Ae=>{ce.current=Ae,Ae&&se(Ae)},[]),ve=ue==null?void 0:ue.parentNode;I.useImperativeHandle(he,()=>({focus:()=>{ce.current.focus()},node:ie.current,value:G}),[G]),I.useEffect(()=>{f&&Y&&ue&&!Q&&(le(l?null:ve.clientWidth),ce.current.focus())},[ue,l]),I.useEffect(()=>{s&&ce.current.focus()},[s]),I.useEffect(()=>{if(!_)return;const Ae=Ar(ce.current).getElementById(_);if(Ae){const ot=()=>{getSelection().isCollapsed&&ce.current.focus()};return Ae.addEventListener("click",ot),()=>{Ae.removeEventListener("click",ot)}}},[_]);const ye=(Ae,ot)=>{Ae?L&&L(ot):k&&k(ot),Q||(le(l?null:ve.clientWidth),J(Ae))},xe=Ae=>{Ae.button===0&&(Ae.preventDefault(),ce.current.focus(),ye(!0,Ae))},me=Ae=>{ye(!1,Ae)},be=I.Children.toArray(c),Qe=Ae=>{const ot=be.find($t=>$t.props.value===Ae.target.value);ot!==void 0&&(K(ot.props.value),R&&R(Ae,ot))},qe=Ae=>ot=>{let $t;if(ot.currentTarget.hasAttribute("tabindex")){if(x){$t=Array.isArray(G)?G.slice():[];const Re=G.indexOf(Ae.props.value);Re===-1?$t.push(Ae.props.value):$t.splice(Re,1)}else $t=Ae.props.value;if(Ae.props.onClick&&Ae.props.onClick(ot),G!==$t&&(K($t),R)){const Re=ot.nativeEvent||ot,Ue=new Re.constructor(Re.type,Re);Object.defineProperty(Ue,"target",{writable:!0,value:{value:$t,name:E}}),R(Ue,Ae)}x||ye(!1,ot)}},at=Ae=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ae.key)!==-1&&(Ae.preventDefault(),ye(!0,Ae))},Nt=ue!==null&&Y,Ie=Ae=>{!Nt&&A&&(Object.defineProperty(Ae,"target",{writable:!0,value:{value:G,name:E}}),A(Ae))};delete V["aria-invalid"];let ze,it;const pt=[];let mt=!1;(PE({value:G})||g)&&(W?ze=W(G):mt=!0);const _e=be.map(Ae=>{if(!I.isValidElement(Ae))return null;let ot;if(x){if(!Array.isArray(G))throw new Error(Md(2));ot=G.some($t=>T8($t,Ae.props.value)),ot&&mt&&pt.push(Ae.props.children)}else ot=T8(G,Ae.props.value),ot&&mt&&(it=Ae.props.children);return I.cloneElement(Ae,{"aria-selected":ot?"true":"false",onClick:qe(Ae),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),Ae.props.onKeyUp&&Ae.props.onKeyUp($t)},role:"option",selected:ot,value:void 0,"data-value":Ae.props.value})});mt&&(x?pt.length===0?ze=null:ze=pt.reduce((Ae,ot,$t)=>(Ae.push(ot),$t{const{classes:t}=e;return t},W4={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>va(e)&&e!=="variant",slot:"Root"},b0e=Ee(NK,W4)(""),x0e=Ee(HK,W4)(""),w0e=Ee(OK,W4)(""),WK=I.forwardRef(function(t,n){const r=Tt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=Ppe,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:_=!1,native:b=!1,onClose:x,onOpen:E,open:A,renderValue:R,SelectDisplayProps:k,variant:O="outlined"}=r,L=Le(r,g0e),N=b?Kye:m0e,H=Qd(),W=Mp({props:r,muiFormControl:H,states:["variant","error"]}),z=W.variant||O,D=$({},r,{variant:z,classes:s}),F=y0e(D),j=Le(F,v0e),V=p||{standard:C.jsx(b0e,{ownerState:D}),outlined:C.jsx(x0e,{label:v,ownerState:D}),filled:C.jsx(w0e,{ownerState:D})}[z],G=mr(n,V.ref);return C.jsx(I.Fragment,{children:I.cloneElement(V,$({inputComponent:N,inputProps:$({children:o,error:W.error,IconComponent:f,variant:z,type:void 0,multiple:_},b?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:d,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:A,renderValue:R,SelectDisplayProps:$({id:h},k)},g,{classes:g?Ho(j,g.classes):j},p?p.props.inputProps:{})},_&&b&&z==="outlined"?{notched:!0}:{},{ref:G,className:Fe(V.props.className,l,F.root)},!p&&{variant:z},L))})});WK.muiName="Select";const _0e=WK;function S0e(e){return _t("MuiSkeleton",e)}Ct("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const E0e=["animation","className","component","height","style","variant","width"];let LE=e=>e,k8,A8,R8,I8;const C0e=e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:s}=e;return Et({root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!s&&"heightAuto"]},S0e,t)},T0e=tc(k8||(k8=LE` + `),vve)),Eve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,d=Le(r,mve),f=$({},r,{color:o,variant:c}),h=bve(f),p=Cn(),g={},v={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(xve,$({className:Fe(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},d,{children:[c==="buffer"?C.jsx(wve,{className:h.dashed,ownerState:f}):null,C.jsx(_ve,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(Sve,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),Cve=Eve,Tve=I.createContext({}),ua=Tve;function kve(e){return _t("MuiList",e)}Ct("MuiList",["root","padding","dense","subheader"]);const Ave=["children","className","component","dense","disablePadding","subheader"],Rve=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Et({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},kve,t)},Ive=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Pve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,f=Le(r,Ave),h=I.useMemo(()=>({dense:l}),[l]),p=$({},r,{component:s,dense:l,disablePadding:c}),g=Rve(p);return C.jsx(ua.Provider,{value:h,children:C.jsxs(Ive,$({as:s,className:Fe(g.root,o),ref:n,ownerState:p},f,{children:[d,i]}))})}),wp=Pve;function Ove(e){return _t("MuiListItem",e)}const Mve=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),lm=Mve;function Dve(e){return _t("MuiListItemButton",e)}const Lve=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),cm=Lve,Nve=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Bve=(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]},$ve=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:l}=e,d=Et({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},Dve,n);return $({},n,d)},Fve=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Bve})(({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"}},[`&.${cm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:_n(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:_n(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})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cm.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})),zve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:l,dense:c=!1,disableGutters:d=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Le(r,Nve),y=I.useContext(ua),S=I.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:d}),[i,y.dense,c,d]),_=I.useRef(null);Io(()=>{o&&_.current&&_.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:d,divider:f,selected:p}),x=$ve(b),E=mr(_,n);return C.jsx(ua.Provider,{value:S,children:C.jsx(Fve,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:Fe(x.focusVisible,h),ownerState:b,className:Fe(x.root,g)},v,{classes:x,children:l}))})}),OE=zve;function jve(e){return _t("MuiListItemSecondaryAction",e)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const Uve=["className"],Hve=e=>{const{disableGutters:t,classes:n}=e;return Et({root:["root",t&&"disableGutters"]},jve,n)},Wve=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),NK=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,Uve),s=I.useContext(ua),l=$({},r,{disableGutters:s.disableGutters}),c=Hve(l);return C.jsx(Wve,$({className:Fe(c.root,i),ownerState:l,ref:n},o))});NK.muiName="ListItemSecondaryAction";const Gve=NK,Vve=["className"],qve=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Xve=(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]},Yve=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:d,selected:f}=e;return Et({root:["root",i&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",d&&"secondaryAction",f&&"selected"],container:["container"]},Ove,r)},Kve=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:Xve})(({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&&{[`& > .${cm.root}`]:{paddingRight:48}},{[`&.${lm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:_n(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lm.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"}},[`&.${lm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:_n(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})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Qve=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Jve=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:l,className:c,component:d,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:_=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:A=!1,slotProps:R={},slots:k={}}=r,O=Le(r.ContainerProps,Vve),L=Le(r,qve),N=I.useContext(ua),H=I.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),W=I.useRef(null);Io(()=>{o&&W.current&&W.current.focus()},[o]);const z=I.Children.toArray(l),D=z.length&&hS(z[z.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:_,divider:b,hasSecondaryAction:D,selected:A}),j=Yve(F),V=mr(W,n),G=k.root||f.Root||Kve,K=R.root||h.root||{},Y=$({className:Fe(j.root,K.className,c),disabled:y},L);let J=d||"li";return s&&(Y.component=d||"div",Y.focusVisibleClassName=Fe(lm.focusVisible,x),J=Ou),D?(J=!Y.component&&!d?"div":J,p==="li"&&(J==="li"?J="div":Y.component==="li"&&(Y.component="div")),C.jsx(ua.Provider,{value:H,children:C.jsxs(Qve,$({as:p,className:Fe(j.container,g),ref:V,ownerState:F},O,{children:[C.jsx(G,$({},K,!Ul(G)&&{as:J,ownerState:$({},F,K.ownerState)},Y,{children:z})),z.pop()]}))})):C.jsx(ua.Provider,{value:H,children:C.jsxs(G,$({},K,{as:J,ref:V},!Ul(G)&&{ownerState:$({},F,K.ownerState)},Y,{children:[z,E&&C.jsx(Gve,{children:E})]}))})}),Qm=Jve;function Zve(e){return _t("MuiListItemAvatar",e)}Ct("MuiListItemAvatar",["root","alignItemsFlexStart"]);const eye=["className"],tye=e=>{const{alignItems:t,classes:n}=e;return Et({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Zve,n)},nye=Ee("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>$({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),rye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Le(r,eye),s=I.useContext(ua),l=$({},r,{alignItems:s.alignItems}),c=tye(l);return C.jsx(nye,$({className:Fe(c.root,i),ownerState:l,ref:n},o))}),iye=rye;function oye(e){return _t("MuiListItemIcon",e)}const sye=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]),y8=sye,aye=["className"],lye=e=>{const{alignItems:t,classes:n}=e;return Et({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},oye,n)},cye=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),uye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,aye),s=I.useContext(ua),l=$({},r,{alignItems:s.alignItems}),c=lye(l);return C.jsx(cye,$({className:Fe(c.root,i),ownerState:l,ref:n},o))}),ol=uye;function dye(e){return _t("MuiListItemText",e)}const fye=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),ME=fye,hye=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],pye=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Et({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},dye,t)},mye=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ME.primary}`]:t.primary},{[`& .${ME.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})),gye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:d,secondary:f,secondaryTypographyProps:h}=r,p=Le(r,hye),{dense:g}=I.useContext(ua);let v=c??i,y=f;const S=$({},r,{disableTypography:s,inset:l,primary:!!v,secondary:!!y,dense:g}),_=pye(S);return v!=null&&v.type!==zt&&!s&&(v=C.jsx(zt,$({variant:g?"body2":"body1",className:_.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:v}))),y!=null&&y.type!==zt&&!s&&(y=C.jsx(zt,$({variant:"body2",className:_.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(mye,$({className:Fe(_.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),sl=gye,vye=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function QD(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function b8(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function BK(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 cb(e,t,n,r,i,o){let s=!1,l=i(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!BK(l,o)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const yye=I.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,p=Le(t,vye),g=I.useRef(null),v=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Io(()=>{i&&g.current.focus()},[i]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const A=!g.current.style.width;if(x.clientHeight{const E=g.current,A=x.key,R=Ar(E).activeElement;if(A==="ArrowDown")x.preventDefault(),cb(E,R,d,c,QD);else if(A==="ArrowUp")x.preventDefault(),cb(E,R,d,c,b8);else if(A==="Home")x.preventDefault(),cb(E,null,d,c,QD);else if(A==="End")x.preventDefault(),cb(E,null,d,c,b8);else if(A.length===1){const k=v.current,O=A.toLowerCase(),L=performance.now();k.keys.length>0&&(L-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&O!==k.keys[0]&&(k.repeating=!1)),k.lastTime=L,k.keys.push(O);const N=R&&!k.repeating&&BK(R,k);k.previousKeyMatched&&(N||cb(E,R,!1,c,QD,k))?x.preventDefault():k.previousKeyMatched=!1}f&&f(x)},S=mr(g,n);let _=-1;I.Children.forEach(s,(x,E)=>{if(!I.isValidElement(x)){_===E&&(_+=1,_>=s.length&&(_=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||_===-1)&&(_=E),_===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(_+=1,_>=s.length&&(_=-1))});const b=I.Children.map(s,(x,E)=>{if(E===_){const A={};return o&&(A.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(A.tabIndex=0),I.cloneElement(x,A)}return x});return C.jsx(wp,$({role:"menu",ref:S,className:l,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),Y1=yye;function bye(e){return _t("MuiPopover",e)}Ct("MuiPopover",["root","paper"]);const xye=["onEntering"],wye=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_ye=["slotProps"];function x8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function w8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function _8(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function JD(e){return typeof e=="function"?e():e}const Sye=e=>{const{classes:t}=e;return Et({root:["root"],paper:["paper"]},bye,t)},Eye=Ee(AK,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$K=Ee(ev,{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}),Cye=I.forwardRef(function(t,n){var r,i,o;const s=Tt({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:_,PaperProps:b={},slots:x,slotProps:E,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:R=PE,transitionDuration:k="auto",TransitionProps:{onEntering:O}={},disableScrollLock:L=!1}=s,N=Le(s.TransitionProps,xye),H=Le(s,wye),W=(r=E==null?void 0:E.paper)!=null?r:b,z=I.useRef(),D=mr(z,W.ref),F=$({},s,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:W,transformOrigin:A,TransitionComponent:R,transitionDuration:k,TransitionProps:N}),j=Sye(F),V=I.useCallback(()=>{if(h==="anchorPosition")return f;const xe=JD(c),be=(xe&&xe.nodeType===1?xe:Ar(z.current).body).getBoundingClientRect();return{top:be.top+x8(be,d.vertical),left:be.left+w8(be,d.horizontal)}},[c,d.horizontal,d.vertical,f,h]),G=I.useCallback(xe=>({vertical:x8(xe,A.vertical),horizontal:w8(xe,A.horizontal)}),[A.horizontal,A.vertical]),K=I.useCallback(xe=>{const me={width:xe.offsetWidth,height:xe.offsetHeight},be=G(me);if(h==="none")return{top:null,left:null,transformOrigin:_8(be)};const Qe=V();let qe=Qe.top-be.vertical,at=Qe.left-be.horizontal;const Nt=qe+me.height,Ie=at+me.width,ze=bu(JD(c)),it=ze.innerHeight-S,pt=ze.innerWidth-S;if(S!==null&&qeit){const mt=Nt-it;qe-=mt,be.vertical+=mt}if(S!==null&&atpt){const mt=Ie-pt;at-=mt,be.horizontal+=mt}return{top:`${Math.round(qe)}px`,left:`${Math.round(at)}px`,transformOrigin:_8(be)}},[c,h,V,G,S]),[Y,J]=I.useState(_),ie=I.useCallback(()=>{const xe=z.current;if(!xe)return;const me=K(xe);me.top!==null&&(xe.style.top=me.top),me.left!==null&&(xe.style.left=me.left),xe.style.transformOrigin=me.transformOrigin,J(!0)},[K]);I.useEffect(()=>(L&&window.addEventListener("scroll",ie),()=>window.removeEventListener("scroll",ie)),[c,L,ie]);const ce=(xe,me)=>{O&&O(xe,me),ie()},ue=()=>{J(!1)};I.useEffect(()=>{_&&ie()}),I.useImperativeHandle(l,()=>_?{updatePosition:()=>{ie()}}:null,[_,ie]),I.useEffect(()=>{if(!_)return;const xe=YC(()=>{ie()}),me=bu(c);return me.addEventListener("resize",xe),()=>{xe.clear(),me.removeEventListener("resize",xe)}},[c,_,ie]);let se=k;k==="auto"&&!R.muiSupportAuto&&(se=void 0);const Q=v||(c?Ar(JD(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:Eye,le=(o=x==null?void 0:x.paper)!=null?o:$K,he=Wr({elementType:le,externalSlotProps:$({},W,{style:Y?W.style:$({},W.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:Fe(j.paper,W==null?void 0:W.className)}),pe=Wr({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Q,open:_},ownerState:F,className:Fe(j.root,g)}),{slotProps:ve}=pe,ye=Le(pe,_ye);return C.jsx(ae,$({},ye,!Ul(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(R,$({appear:!0,in:_,onEntering:ce,onExited:ue,timeout:se},N,{children:C.jsx(le,$({},he,{children:p}))}))}))}),Tye=Cye;function kye(e){return _t("MuiMenu",e)}Ct("MuiMenu",["root","paper","list"]);const Aye=["onEntering"],Rye=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Iye={vertical:"top",horizontal:"right"},Pye={vertical:"top",horizontal:"left"},Oye=e=>{const{classes:t}=e;return Et({root:["root"],paper:["paper"],list:["list"]},kye,t)},Mye=Ee(Tye,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Dye=Ee($K,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Lye=Ee(Y1,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Nye=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:_="selectedMenu",slots:b={},slotProps:x={}}=o,E=Le(o.TransitionProps,Aye),A=Le(o,Rye),R=Cn(),k=R.direction==="rtl",O=$({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:_}),L=Oye(O),N=s&&!d&&p,H=I.useRef(null),W=(K,Y)=>{H.current&&H.current.adjustStyleForScrollbar(K,R),S&&S(K,Y)},z=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;I.Children.map(l,(K,Y)=>{I.isValidElement(K)&&(K.props.disabled||(_==="selectedMenu"&&K.props.selected||D===-1)&&(D=Y))});const F=(r=b.paper)!=null?r:Dye,j=(i=x.paper)!=null?i:g,V=Wr({elementType:b.root,externalSlotProps:x.root,ownerState:O,className:[L.root,c]}),G=Wr({elementType:F,externalSlotProps:j,ownerState:O,className:L.paper});return C.jsx(Mye,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?Iye:Pye,slots:{paper:F,root:b.root},slotProps:{root:V,paper:G},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:W},E),ownerState:O},A,{classes:v,children:C.jsx(Lye,$({onKeyDown:z,actions:H,autoFocus:s&&(D===-1||d),autoFocusItem:N,variant:_},f,{className:Fe(L.list,f.className),children:l}))}))}),Jd=Nye;function Bye(e){return _t("MuiMenuItem",e)}const $ye=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ub=$ye,Fye=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],zye=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},jye=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=Et({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Bye,s);return $({},s,c)},Uye=Ee(Ou,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:zye})(({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"}},[`&.${ub.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ub.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:_n(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ub.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:_n(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})`:_n(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ub.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ub.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${c8.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${c8.inset}`]:{marginLeft:52},[`& .${ME.root}`]:{marginTop:0,marginBottom:0},[`& .${ME.inset}`]:{paddingLeft:36},[`& .${y8.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${y8.root} svg`]:{fontSize:"1.25rem"}}))),Hye=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:p}=r,g=Le(r,Fye),v=I.useContext(ua),y=I.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=I.useRef(null);Io(()=>{i&&S.current&&S.current.focus()},[i]);const _=$({},r,{dense:y.dense,divider:l,disableGutters:c}),b=jye(r),x=mr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(ua.Provider,{value:y,children:C.jsx(Uye,$({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:Fe(b.focusVisible,d),className:Fe(b.root,p)},g,{ownerState:_,classes:b}))})}),Wl=Hye;function Wye(e){return _t("MuiNativeSelect",e)}const Gye=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),U4=Gye,Vye=["className","disabled","error","IconComponent","inputRef","variant"],qye=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Me(n)}`,o&&"iconOpen",r&&"disabled"]};return Et(l,Wye,t)},FK=({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"},[`&.${U4.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}}),Xye=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:va,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${U4.multiple}`]:t.multiple}]}})(FK),zK=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${U4.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Yye=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Me(n.variant)}`],n.open&&t.iconOpen]}})(zK),Kye=I.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:l,variant:c="standard"}=t,d=Le(t,Vye),f=$({},t,{disabled:i,variant:c,error:o}),h=qye(f);return C.jsxs(I.Fragment,{children:[C.jsx(Xye,$({ownerState:f,className:Fe(h.select,r),disabled:i,ref:l||n},d)),t.multiple?null:C.jsx(Yye,{as:s,ownerState:f,className:h.icon})]})}),Qye=Kye;var S8;const Jye=["children","classes","className","label","notched"],Zye=Ee("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),e0e=Ee("legend")(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function t0e(e){const{className:t,label:n,notched:r}=e,i=Le(e,Jye),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(Zye,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(e0e,{ownerState:s,children:o?C.jsx("span",{children:n}):S8||(S8=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const n0e=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],r0e=e=>{const{classes:t}=e,r=Et({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ape,t);return $({},t,r)},i0e=Ee(ek,{shouldForwardProp:e=>va(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:JT})(({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 .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Uu.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Uu.focused} .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Uu.error} .${Uu.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Uu.disabled} .${Uu.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"}))}),o0e=Ee(t0e,{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}}),s0e=Ee(tk,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ZT})(({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})),jK=I.forwardRef(function(t,n){var r,i,o,s,l;const c=Tt({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,_=Le(c,n0e),b=r0e(c),x=Qd(),E=Mp({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:g,size:E.size,type:S}),R=(r=(i=y.root)!=null?i:d.Root)!=null?r:i0e,k=(o=(s=y.input)!=null?s:d.Input)!=null?o:s0e;return C.jsx(nk,$({slots:{root:R,input:k},renderSuffix:O=>C.jsx(o0e,{ownerState:A,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?l||(l=C.jsxs(I.Fragment,{children:[p," ","*"]})):p,notched:typeof v<"u"?v:!!(O.startAdornment||O.filled||O.focused)}),fullWidth:f,inputComponent:h,multiline:g,ref:n,type:S},_,{classes:$({},b,{notchedOutline:null})}))});jK.muiName="Input";const UK=jK;function a0e(e){return _t("MuiSelect",e)}const l0e=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),db=l0e;var E8;const c0e=["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"],u0e=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${db.select}`]:t.select},{[`&.${db.select}`]:t[n.variant]},{[`&.${db.error}`]:t.error},{[`&.${db.multiple}`]:t.multiple}]}})(FK,{[`&.${db.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),d0e=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Me(n.variant)}`],n.open&&t.iconOpen]}})(zK),f0e=Ee("input",{shouldForwardProp:e=>B5(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 C8(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function h0e(e){return e==null||typeof e=="string"&&!e.trim()}const p0e=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,l={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Me(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Et(l,a0e,t)},m0e=I.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:l,children:c,className:d,defaultOpen:f,defaultValue:h,disabled:p,displayEmpty:g,error:v=!1,IconComponent:y,inputRef:S,labelId:_,MenuProps:b={},multiple:x,name:E,onBlur:A,onChange:R,onClose:k,onFocus:O,onOpen:L,open:N,readOnly:H,renderValue:W,SelectDisplayProps:z={},tabIndex:D,value:F,variant:j="standard"}=t,V=Le(t,c0e),[G,K]=Ox({controlled:F,default:h,name:"Select"}),[Y,J]=Ox({controlled:N,default:f,name:"Select"}),ie=I.useRef(null),ce=I.useRef(null),[ue,se]=I.useState(null),{current:Q}=I.useRef(N!=null),[ae,le]=I.useState(),he=mr(n,S),pe=I.useCallback(Ae=>{ce.current=Ae,Ae&&se(Ae)},[]),ve=ue==null?void 0:ue.parentNode;I.useImperativeHandle(he,()=>({focus:()=>{ce.current.focus()},node:ie.current,value:G}),[G]),I.useEffect(()=>{f&&Y&&ue&&!Q&&(le(l?null:ve.clientWidth),ce.current.focus())},[ue,l]),I.useEffect(()=>{s&&ce.current.focus()},[s]),I.useEffect(()=>{if(!_)return;const Ae=Ar(ce.current).getElementById(_);if(Ae){const ot=()=>{getSelection().isCollapsed&&ce.current.focus()};return Ae.addEventListener("click",ot),()=>{Ae.removeEventListener("click",ot)}}},[_]);const ye=(Ae,ot)=>{Ae?L&&L(ot):k&&k(ot),Q||(le(l?null:ve.clientWidth),J(Ae))},xe=Ae=>{Ae.button===0&&(Ae.preventDefault(),ce.current.focus(),ye(!0,Ae))},me=Ae=>{ye(!1,Ae)},be=I.Children.toArray(c),Qe=Ae=>{const ot=be.find($t=>$t.props.value===Ae.target.value);ot!==void 0&&(K(ot.props.value),R&&R(Ae,ot))},qe=Ae=>ot=>{let $t;if(ot.currentTarget.hasAttribute("tabindex")){if(x){$t=Array.isArray(G)?G.slice():[];const Re=G.indexOf(Ae.props.value);Re===-1?$t.push(Ae.props.value):$t.splice(Re,1)}else $t=Ae.props.value;if(Ae.props.onClick&&Ae.props.onClick(ot),G!==$t&&(K($t),R)){const Re=ot.nativeEvent||ot,Ue=new Re.constructor(Re.type,Re);Object.defineProperty(Ue,"target",{writable:!0,value:{value:$t,name:E}}),R(Ue,Ae)}x||ye(!1,ot)}},at=Ae=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ae.key)!==-1&&(Ae.preventDefault(),ye(!0,Ae))},Nt=ue!==null&&Y,Ie=Ae=>{!Nt&&A&&(Object.defineProperty(Ae,"target",{writable:!0,value:{value:G,name:E}}),A(Ae))};delete V["aria-invalid"];let ze,it;const pt=[];let mt=!1;(IE({value:G})||g)&&(W?ze=W(G):mt=!0);const _e=be.map(Ae=>{if(!I.isValidElement(Ae))return null;let ot;if(x){if(!Array.isArray(G))throw new Error(Md(2));ot=G.some($t=>C8($t,Ae.props.value)),ot&&mt&&pt.push(Ae.props.children)}else ot=C8(G,Ae.props.value),ot&&mt&&(it=Ae.props.children);return I.cloneElement(Ae,{"aria-selected":ot?"true":"false",onClick:qe(Ae),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),Ae.props.onKeyUp&&Ae.props.onKeyUp($t)},role:"option",selected:ot,value:void 0,"data-value":Ae.props.value})});mt&&(x?pt.length===0?ze=null:ze=pt.reduce((Ae,ot,$t)=>(Ae.push(ot),$t{const{classes:t}=e;return t},H4={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>va(e)&&e!=="variant",slot:"Root"},x0e=Ee(LK,H4)(""),w0e=Ee(UK,H4)(""),_0e=Ee(PK,H4)(""),HK=I.forwardRef(function(t,n){const r=Tt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=Ope,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:_=!1,native:b=!1,onClose:x,onOpen:E,open:A,renderValue:R,SelectDisplayProps:k,variant:O="outlined"}=r,L=Le(r,v0e),N=b?Qye:g0e,H=Qd(),W=Mp({props:r,muiFormControl:H,states:["variant","error"]}),z=W.variant||O,D=$({},r,{variant:z,classes:s}),F=b0e(D),j=Le(F,y0e),V=p||{standard:C.jsx(x0e,{ownerState:D}),outlined:C.jsx(w0e,{label:v,ownerState:D}),filled:C.jsx(_0e,{ownerState:D})}[z],G=mr(n,V.ref);return C.jsx(I.Fragment,{children:I.cloneElement(V,$({inputComponent:N,inputProps:$({children:o,error:W.error,IconComponent:f,variant:z,type:void 0,multiple:_},b?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:d,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:A,renderValue:R,SelectDisplayProps:$({id:h},k)},g,{classes:g?Ho(j,g.classes):j},p?p.props.inputProps:{})},_&&b&&z==="outlined"?{notched:!0}:{},{ref:G,className:Fe(V.props.className,l,F.root)},!p&&{variant:z},L))})});HK.muiName="Select";const S0e=HK;function E0e(e){return _t("MuiSkeleton",e)}Ct("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const C0e=["animation","className","component","height","style","variant","width"];let DE=e=>e,T8,k8,A8,R8;const T0e=e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:s}=e;return Et({root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!s&&"heightAuto"]},E0e,t)},k0e=nc(T8||(T8=DE` 0% { opacity: 1; } @@ -224,7 +224,7 @@ Error generating stack: `+o.message+` 100% { opacity: 1; } -`)),k0e=tc(A8||(A8=LE` +`)),A0e=nc(k8||(k8=DE` 0% { transform: translateX(-100%); } @@ -237,9 +237,9 @@ Error generating stack: `+o.message+` 100% { transform: translateX(100%); } -`)),A0e=Ee("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const n=Vle(e.shape.borderRadius)||"px",r=qle(e.shape.borderRadius);return $({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:wn(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&Dd(R8||(R8=LE` +`)),R0e=Ee("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const n=qle(e.shape.borderRadius)||"px",r=Xle(e.shape.borderRadius);return $({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:_n(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&Dd(A8||(A8=DE` animation: ${0} 2s ease-in-out 0.5s infinite; - `),T0e),({ownerState:e,theme:t})=>e.animation==="wave"&&Dd(I8||(I8=LE` + `),k0e),({ownerState:e,theme:t})=>e.animation==="wave"&&Dd(R8||(R8=DE` position: relative; overflow: hidden; @@ -262,20 +262,20 @@ Error generating stack: `+o.message+` right: 0; top: 0; } - `),k0e,(t.vars||t).palette.action.hover)),R0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSkeleton"}),{animation:i="pulse",className:o,component:s="span",height:l,style:c,variant:d="text",width:f}=r,h=Le(r,E0e),p=$({},r,{animation:i,component:s,variant:d,hasChildren:!!h.children}),g=C0e(p);return C.jsx(A0e,$({as:s,ref:n,className:Fe(g.root,o),ownerState:p},h,{style:$({width:f,height:l},c)}))}),I0e=R0e,P0e=e=>!e||!zl(e),O0e=P0e;function M0e(e){return _t("MuiSlider",e)}const D0e=Ct("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"]),el=D0e,L0e=e=>{const{open:t}=e;return{offset:Fe(t&&el.valueLabelOpen),circle:el.valueLabelCircle,label:el.valueLabelLabel}};function N0e(e){const{children:t,className:n,value:r}=e,i=L0e(e);return t?I.cloneElement(t,{className:Fe(t.props.className)},C.jsxs(I.Fragment,{children:[t.props.children,C.jsx("span",{className:Fe(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const B0e=["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 P8(e){return e}const $0e=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],n.size!=="medium"&&t[`size${Me(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"},[`&.${el.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${el.dragging}`]:{[`& .${el.thumb}, & .${el.track}`]:{transition:"none"}}})),F0e=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),z0e=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Kg(e.palette[t.color].main,.62):Yg(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})}),j0e=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Me(n.color)}`],n.size!=="medium"&&t[`thumbSize${Me(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, &.${el.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:wn(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${el.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:wn(e.palette[t.color].main,.16)}`},[`&.${el.disabled}`]:{"&:hover":{boxShadow:"none"}}})),U0e=Ee(N0e,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${el.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"})),H0e=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>$5(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})),W0e=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>$5(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})),G0e=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Me(l)}`,c&&`size${Me(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${Me(c)}`,l&&`thumbColor${Me(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Et(d,M0e,s)},V0e=({children:e})=>e,q0e=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A,R,k,O,L,N;const H=Tt({props:t,name:"MuiSlider"}),z=In().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":j,component:V="span",components:G={},componentsProps:K={},color:Y="primary",classes:J,className:ie,disableSwap:ce=!1,disabled:ue=!1,getAriaLabel:se,getAriaValueText:Q,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:xe=P8,slotProps:me,slots:be,track:Qe="normal",valueLabelDisplay:qe="off",valueLabelFormat:at=P8}=H,Nt=Le(H,B0e),Ie=$({},H,{isRtl:z,max:le,min:he,classes:J,disabled:ue,disableSwap:ce,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:xe,track:Qe,valueLabelDisplay:qe,valueLabelFormat:at}),{axisProps:ze,getRootProps:it,getHiddenInputProps:pt,getThumbProps:mt,open:_e,active:je,axis:Ye,focusedThumbIndex:$e,range:Ne,dragging:Rt,marks:ct,values:Ae,trackOffset:ot,trackLeap:$t,getThumbStyle:Re}=ipe($({},Ie,{rootRef:n}));Ie.marked=ct.length>0&&ct.some(Hn=>Hn.label),Ie.dragging=Rt,Ie.focusedThumbIndex=$e;const Ue=G0e(Ie),yt=(r=(i=be==null?void 0:be.root)!=null?i:G.Root)!=null?r:$0e,Wt=(o=(s=be==null?void 0:be.rail)!=null?s:G.Rail)!=null?o:F0e,pn=(l=(c=be==null?void 0:be.track)!=null?c:G.Track)!=null?l:z0e,$r=(d=(f=be==null?void 0:be.thumb)!=null?f:G.Thumb)!=null?d:j0e,Or=(h=(p=be==null?void 0:be.valueLabel)!=null?p:G.ValueLabel)!=null?h:U0e,Mr=(g=(v=be==null?void 0:be.mark)!=null?v:G.Mark)!=null?g:H0e,Fr=(y=(S=be==null?void 0:be.markLabel)!=null?S:G.MarkLabel)!=null?y:W0e,Qr=(_=(b=be==null?void 0:be.input)!=null?b:G.Input)!=null?_:"input",Zo=(x=me==null?void 0:me.root)!=null?x:K.root,Fu=(E=me==null?void 0:me.rail)!=null?E:K.rail,Gs=(A=me==null?void 0:me.track)!=null?A:K.track,lc=(R=me==null?void 0:me.thumb)!=null?R:K.thumb,cc=(k=me==null?void 0:me.valueLabel)!=null?k:K.valueLabel,cf=(O=me==null?void 0:me.mark)!=null?O:K.mark,es=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,uf=(N=me==null?void 0:me.input)!=null?N:K.input,ao=Wr({elementType:yt,getSlotProps:it,externalSlotProps:Zo,externalForwardedProps:Nt,additionalProps:$({},O0e(yt)&&{as:V}),ownerState:$({},Ie,Zo==null?void 0:Zo.ownerState),className:[Ue.root,ie]}),uc=Wr({elementType:Wt,externalSlotProps:Fu,ownerState:Ie,className:Ue.rail}),Si=Wr({elementType:pn,externalSlotProps:Gs,additionalProps:{style:$({},ze[Ye].offset(ot),ze[Ye].leap($t))},ownerState:$({},Ie,Gs==null?void 0:Gs.ownerState),className:Ue.track}),ts=Wr({elementType:$r,getSlotProps:mt,externalSlotProps:lc,ownerState:$({},Ie,lc==null?void 0:lc.ownerState),className:Ue.thumb}),df=Wr({elementType:Or,externalSlotProps:cc,ownerState:$({},Ie,cc==null?void 0:cc.ownerState),className:Ue.valueLabel}),ns=Wr({elementType:Mr,externalSlotProps:cf,ownerState:Ie,className:Ue.mark}),xa=Wr({elementType:Fr,externalSlotProps:es,ownerState:Ie,className:Ue.markLabel}),zu=Wr({elementType:Qr,getSlotProps:pt,externalSlotProps:uf,ownerState:Ie});return C.jsxs(yt,$({},ao,{children:[C.jsx(Wt,$({},uc)),C.jsx(pn,$({},Si)),ct.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Jn)=>{const bl=IE(Hn.value,he,le),xl=ze[Ye].offset(bl);let lo;return Qe===!1?lo=Ae.indexOf(Hn.value)!==-1:lo=Qe==="normal"&&(Ne?Hn.value>=Ae[0]&&Hn.value<=Ae[Ae.length-1]:Hn.value<=Ae[0])||Qe==="inverted"&&(Ne?Hn.value<=Ae[0]||Hn.value>=Ae[Ae.length-1]:Hn.value>=Ae[0]),C.jsxs(I.Fragment,{children:[C.jsx(Mr,$({"data-index":Jn},ns,!zl(Mr)&&{markActive:lo},{style:$({},xl,ns.style),className:Fe(ns.className,lo&&Ue.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Jn},xa,!zl(Fr)&&{markLabelActive:lo},{style:$({},xl,xa.style),className:Fe(Ue.markLabel,xa.className,lo&&Ue.markLabelActive),children:Hn.label})):null]},Jn)}),Ae.map((Hn,Jn)=>{const bl=IE(Hn,he,le),xl=ze[Ye].offset(bl),lo=qe==="off"?V0e:Or;return C.jsx(lo,$({},!zl(lo)&&{valueLabelFormat:at,valueLabelDisplay:qe,value:typeof at=="function"?at(xe(Hn),Jn):at,index:Jn,open:_e===Jn||je===Jn||qe==="on",disabled:ue},df,{children:C.jsx($r,$({"data-index":Jn},ts,{className:Fe(Ue.thumb,ts.className,je===Jn&&Ue.active,$e===Jn&&Ue.focusVisible),style:$({},xl,Re(Jn),ts.style),children:C.jsx(Qr,$({"data-index":Jn,"aria-label":se?se(Jn):D,"aria-valuenow":xe(Hn),"aria-labelledby":j,"aria-valuetext":Q?Q(xe(Hn),Jn):F,value:Ae[Jn]},zu))}))}),Jn)})]}))}),X0e=q0e;function Y0e(e){return _t("MuiSnackbarContent",e)}Ct("MuiSnackbarContent",["root","message","action"]);const K0e=["action","className","message","role"],Q0e=e=>{const{classes:t}=e;return Et({root:["root"],action:["action"],message:["message"]},Y0e,t)},J0e=Ee(ev,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=ale(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}})}),Z0e=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),ebe=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),tbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,K0e),d=r,f=Q0e(d);return C.jsxs(J0e,$({role:l,square:!0,elevation:6,className:Fe(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(Z0e,{className:f.message,ownerState:d,children:s}),i?C.jsx(ebe,{className:f.action,ownerState:d,children:i}):null]}))}),nbe=tbe;function rbe(e){return _t("MuiSnackbar",e)}Ct("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const ibe=["onEnter","onExited"],obe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],sbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Me(n.vertical)}${Me(n.horizontal)}`]};return Et(r,rbe,t)},O8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Me(n.anchorOrigin.vertical)}${Me(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"})})}),abe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbar"}),i=In(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=OE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Le(r.TransitionProps,ibe),R=Le(r,obe),k=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),O=sbe(k),{getRootProps:L,onClickAway:N}=ope($({},k)),[H,W]=I.useState(!0),z=Wr({elementType:O8,getSlotProps:L,externalForwardedProps:R,ownerState:k,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{W(!0),E&&E(j)},F=(j,V)=>{W(!1),x&&x(j,V)};return!S&&H?null:C.jsx(bfe,$({onClickAway:N},p,{children:C.jsx(O8,$({},z,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},A,{children:f||C.jsx(nbe,$({message:y,action:s},g))}))}))}))}),lbe=abe;function cbe(e){return _t("MuiTooltip",e)}const ube=Ct("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),fd=ube,dbe=["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 fbe(e){return Math.round(e*1e5)/1e5}const hbe=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${Me(o.split("-")[0])}`],arrow:["arrow"]};return Et(s,cbe,t)},pbe=Ee(SK,{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"] .${fd.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${fd.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${fd.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"] .${fd.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),mbe=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Me(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:wn(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:`${fbe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${fd.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${fd.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${fd.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${fd.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),gbe=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:wn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Zw=!1,eL=null,fb={x:0,y:0};function e_(e,t){return n=>{t&&t(n),e(n)}}const vbe=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A;const R=Tt({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:W=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:V=0,enterTouchDelay:G=700,followCursor:K=!1,id:Y,leaveDelay:J=0,leaveTouchDelay:ie=1500,onClose:ce,onOpen:ue,open:se,placement:Q="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=OE,TransitionProps:xe}=R,me=Le(R,dbe),be=I.isValidElement(O)?O:C.jsx("span",{children:O}),Qe=In(),qe=Qe.direction==="rtl",[at,Nt]=I.useState(),[Ie,ze]=I.useState(null),it=I.useRef(!1),pt=D||K,mt=I.useRef(),_e=I.useRef(),je=I.useRef(),Ye=I.useRef(),[$e,Ne]=Ox({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ct=y5(Y),Ae=I.useRef(),ot=I.useCallback(()=>{Ae.current!==void 0&&(document.body.style.WebkitUserSelect=Ae.current,Ae.current=void 0),clearTimeout(Ye.current)},[]);I.useEffect(()=>()=>{clearTimeout(mt.current),clearTimeout(_e.current),clearTimeout(je.current),ot()},[ot]);const $t=Qt=>{clearTimeout(eL),Zw=!0,Ne(!0),ue&&!Rt&&ue(Qt)},Re=eo(Qt=>{clearTimeout(eL),eL=setTimeout(()=>{Zw=!1},800+J),Ne(!1),ce&&Rt&&ce(Qt),clearTimeout(mt.current),mt.current=setTimeout(()=>{it.current=!1},Qe.transitions.duration.shortest)}),Ue=Qt=>{it.current&&Qt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(je.current),j||Zw&&V?_e.current=setTimeout(()=>{$t(Qt)},Zw?V:j):$t(Qt))},yt=Qt=>{clearTimeout(_e.current),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},J)},{isFocusVisibleRef:Wt,onBlur:pn,onFocus:$r,ref:Or}=b5(),[,Mr]=I.useState(!1),Fr=Qt=>{pn(Qt),Wt.current===!1&&(Mr(!1),yt(Qt))},Qr=Qt=>{at||Nt(Qt.currentTarget),$r(Qt),Wt.current===!0&&(Mr(!0),Ue(Qt))},Zo=Qt=>{it.current=!0;const vr=be.props;vr.onTouchStart&&vr.onTouchStart(Qt)},Fu=Ue,Gs=yt,lc=Qt=>{Zo(Qt),clearTimeout(je.current),clearTimeout(mt.current),ot(),Ae.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ae.current,Ue(Qt)},G)},cc=Qt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Qt),ot(),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},ie)};I.useEffect(()=>{if(!Rt)return;function Qt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Re(vr)}return document.addEventListener("keydown",Qt),()=>{document.removeEventListener("keydown",Qt)}},[Re,Rt]);const cf=mr(be.ref,Or,Nt,n);!ve&&ve!==0&&(Rt=!1);const es=I.useRef(),uf=Qt=>{const vr=be.props;vr.onMouseMove&&vr.onMouseMove(Qt),fb={x:Qt.clientX,y:Qt.clientY},es.current&&es.current.update()},ao={},uc=typeof ve=="string";H?(ao.title=!Rt&&uc&&!z?ve:null,ao["aria-describedby"]=Rt?ct:null):(ao["aria-label"]=uc?ve:null,ao["aria-labelledby"]=Rt&&!uc?ct:null);const Si=$({},ao,me,be.props,{className:Fe(me.className,be.props.className),onTouchStart:Zo,ref:cf},K?{onMouseMove:uf}:{}),ts={};F||(Si.onTouchStart=lc,Si.onTouchEnd=cc),z||(Si.onMouseOver=e_(Fu,Si.onMouseOver),Si.onMouseLeave=e_(Gs,Si.onMouseLeave),pt||(ts.onMouseOver=Fu,ts.onMouseLeave=Gs)),W||(Si.onFocus=e_(Qr,Si.onFocus),Si.onBlur=e_(Fr,Si.onBlur),pt||(ts.onFocus=Qr,ts.onBlur=Fr));const df=I.useMemo(()=>{var Qt;let vr=[{name:"arrow",enabled:!!Ie,options:{element:Ie,padding:4}}];return(Qt=le.popperOptions)!=null&&Qt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Ie,le]),ns=$({},R,{isRtl:qe,arrow:k,disableInteractive:pt,placement:Q,PopperComponentProp:ae,touch:it.current}),xa=hbe(ns),zu=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:pbe,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:OE,Jn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:mbe,bl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:gbe,xl=Fb(zu,$({},le,(p=he.popper)!=null?p:N.popper,{className:Fe(xa.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),ns),lo=Fb(Hn,$({},xe,(y=he.transition)!=null?y:N.transition),ns),_v=Fb(Jn,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:Fe(xa.tooltip,(_=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:_.className)}),ns),Sv=Fb(bl,$({},(x=he.arrow)!=null?x:N.arrow,{className:Fe(xa.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),ns);return C.jsxs(I.Fragment,{children:[I.cloneElement(be,Si),C.jsx(zu,$({as:ae??SK,placement:Q,anchorEl:K?{getBoundingClientRect:()=>({top:fb.y,left:fb.x,right:fb.x,bottom:fb.y,width:0,height:0})}:at,popperRef:es,open:at?Rt:!1,id:ct,transition:!0},ts,xl,{popperOptions:df,children:({TransitionProps:Qt})=>C.jsx(Hn,$({timeout:Qe.transitions.duration.shorter},Qt,lo,{children:C.jsxs(Jn,$({},_v,{children:[ve,k?C.jsx(bl,$({},Sv,{ref:ze})):null]}))}))}))]})}),Mu=vbe;function ybe(e){return _t("MuiSwitch",e)}const bbe=Ct("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),_o=bbe,xbe=["className","color","edge","size","sx"],wbe=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${Me(n)}`,`size${Me(r)}`],switchBase:["switchBase",`color${Me(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Et(l,ybe,t);return $({},t,c)},_be=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(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,[`& .${_o.thumb}`]:{width:16,height:16},[`& .${_o.switchBase}`]:{padding:4,[`&.${_o.checked}`]:{transform:"translateX(16px)"}}})),Sbe=Ee(AK,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${_o.input}`]:t.input},n.color!=="default"&&t[`color${Me(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}),[`&.${_o.checked}`]:{transform:"translateX(20px)"},[`&.${_o.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${_o.checked} + .${_o.track}`]:{opacity:.5},[`&.${_o.disabled} + .${_o.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${_o.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:wn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${_o.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})`:wn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_o.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Kg(e.palette[t.color].main,.62):Yg(e.palette[t.color].main,.55)}`}},[`&.${_o.checked} + .${_o.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),Ebe=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),Cbe=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Tbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,xbe),f=$({},r,{color:o,edge:s,size:l}),h=wbe(f),p=C.jsx(Cbe,{className:h.thumb,ownerState:f});return C.jsxs(_be,{className:Fe(h.root,i),sx:c,ownerState:f,children:[C.jsx(Sbe,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(Ebe,{className:h.track,ownerState:f})]})}),Tg=Tbe;function kbe(e){return _t("MuiTab",e)}const Abe=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Sh=Abe,Rbe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Ibe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${Me(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Et(d,kbe,t)},Pbe=Ee(Ou,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Me(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,[`& > .${Sh.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,[`&.${Sh.selected}`]:{opacity:1},[`&.${Sh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Sh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Sh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Sh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Sh.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)})),Obe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,Rbe),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),R=Ibe(A),k=c&&h&&I.isValidElement(c)?I.cloneElement(c,{className:Fe(R.iconWrapper,c.props.className)}):c,O=N=>{!y&&p&&p(N,b),g&&g(N)},L=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(Pbe,$({focusRipple:!s,className:Fe(R.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:A,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(I.Fragment,{children:[k,h]}):C.jsxs(I.Fragment,{children:[h,k]}),f]}))}),Dm=Obe;function Mbe(e){return _t("MuiToolbar",e)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const Dbe=["className","component","disableGutters","variant"],Lbe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Et({root:["root",!n&&"gutters",r]},Mbe,t)},Nbe=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),Bbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,Dbe),d=$({},r,{component:o,disableGutters:s,variant:l}),f=Lbe(d);return C.jsx(Nbe,$({as:o,className:Fe(f.root,i),ref:n,ownerState:d},c))}),$be=Bbe,Fbe=Dt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),zbe=Dt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function jbe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Ube(e,t,n,r={},i=()=>{}){const{ease:o=jbe,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const Hbe=["onChange"],Wbe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Gbe(e){const{onChange:t}=e,n=Le(e,Hbe),r=I.useRef(),i=I.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Io(()=>{const s=KC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=bu(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),I.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:Wbe,ref:i},n))}function Vbe(e){return _t("MuiTabScrollButton",e)}const qbe=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Xbe=qbe,Ybe=["className","slots","slotProps","direction","orientation","disabled"],Kbe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Et({root:["root",n,r&&"disabled"]},Vbe,t)},Qbe=Ee(Ou,{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,[`&.${Xbe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Jbe=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Ybe),p=In().direction==="rtl",g=$({isRtl:p},o),v=Kbe(g),y=(r=l.StartScrollButtonIcon)!=null?r:Fbe,S=(i=l.EndScrollButtonIcon)!=null?i:zbe,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Qbe,$({component:"div",className:Fe(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),Zbe=Jbe;function exe(e){return _t("MuiTabs",e)}const txe=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tL=txe,nxe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],M8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,D8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,t_=(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}}},rxe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Et({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},exe,c)},ixe=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tL.scrollButtons}`]:t.scrollButtons},{[`& .${tL.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&&{[`& .${tL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),oxe=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),sxe=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),axe=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),lxe=Ee(Gbe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),L8={},cxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabs"}),i=In(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=Zbe,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:R={},TabScrollButtonProps:k={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,W=Le(r,nxe),z=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",G=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:O,variant:N,visibleScrollbar:H,fixed:!z,hideScrollbar:z&&!H,scrollableX:z&&!D,scrollableY:z&&D,centered:d&&!z,scrollButtonsHideMobile:!g}),J=rxe(Y),ie=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:Y}),ce=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:Y}),[ue,se]=I.useState(!1),[Q,ae]=I.useState(L8),[le,he]=I.useState(!1),[pe,ve]=I.useState(!1),[ye,xe]=I.useState(!1),[me,be]=I.useState({overflow:"hidden",scrollbarWidth:0}),Qe=new Map,qe=I.useRef(null),at=I.useRef(null),Nt=()=>{const Re=qe.current;let Ue;if(Re){const Wt=Re.getBoundingClientRect();Ue={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollLeftNormalized:Ooe(Re,i.direction),scrollWidth:Re.scrollWidth,top:Wt.top,bottom:Wt.bottom,left:Wt.left,right:Wt.right}}let yt;if(Re&&L!==!1){const Wt=at.current.children;if(Wt.length>0){const pn=Wt[Qe.get(L)];yt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:Ue,tabMeta:yt}},Ie=eo(()=>{const{tabsMeta:Re,tabMeta:Ue}=Nt();let yt=0,Wt;if(D)Wt="top",Ue&&Re&&(yt=Ue.top-Re.top+Re.scrollTop);else if(Wt=o?"right":"left",Ue&&Re){const $r=o?Re.scrollLeftNormalized+Re.clientWidth-Re.scrollWidth:Re.scrollLeft;yt=(o?-1:1)*(Ue[Wt]-Re[Wt]+$r)}const pn={[Wt]:yt,[K]:Ue?Ue[K]:0};if(isNaN(Q[Wt])||isNaN(Q[K]))ae(pn);else{const $r=Math.abs(Q[Wt]-pn[Wt]),Or=Math.abs(Q[K]-pn[K]);($r>=1||Or>=1)&&ae(pn)}}),ze=(Re,{animation:Ue=!0}={})=>{Ue?Ube(F,qe.current,Re,{duration:i.transitions.duration.standard}):qe.current[F]=Re},it=Re=>{let Ue=qe.current[F];D?Ue+=Re:(Ue+=Re*(o?-1:1),Ue*=o&&Tq()==="reverse"?-1:1),ze(Ue)},pt=()=>{const Re=qe.current[G];let Ue=0;const yt=Array.from(at.current.children);for(let Wt=0;WtRe){Wt===0&&(Ue=Re);break}Ue+=pn[G]}return Ue},mt=()=>{it(-1*pt())},_e=()=>{it(pt())},je=I.useCallback(Re=>{be({overflow:null,scrollbarWidth:Re})},[]),Ye=()=>{const Re={};Re.scrollbarSizeListener=z?C.jsx(lxe,{onChange:je,className:Fe(J.scrollableX,J.hideScrollbar)}):null;const yt=z&&(b==="auto"&&(le||pe)||b===!0);return Re.scrollButtonStart=yt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:mt,disabled:!le},k,{className:Fe(J.scrollButtons,k.className)})):null,Re.scrollButtonEnd=yt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},k,{className:Fe(J.scrollButtons,k.className)})):null,Re},$e=eo(Re=>{const{tabsMeta:Ue,tabMeta:yt}=Nt();if(!(!yt||!Ue)){if(yt[j]Ue[V]){const Wt=Ue[F]+(yt[V]-Ue[V]);ze(Wt,{animation:Re})}}}),Ne=eo(()=>{z&&b!==!1&&xe(!ye)});I.useEffect(()=>{const Re=KC(()=>{qe.current&&Ie()}),Ue=bu(qe.current);Ue.addEventListener("resize",Re);let yt;return typeof ResizeObserver<"u"&&(yt=new ResizeObserver(Re),Array.from(at.current.children).forEach(Wt=>{yt.observe(Wt)})),()=>{Re.clear(),Ue.removeEventListener("resize",Re),yt&&yt.disconnect()}},[Ie]),I.useEffect(()=>{const Re=Array.from(at.current.children),Ue=Re.length;if(typeof IntersectionObserver<"u"&&Ue>0&&z&&b!==!1){const yt=Re[0],Wt=Re[Ue-1],pn={root:qe.current,threshold:.99},$r=Qr=>{he(!Qr[0].isIntersecting)},Or=new IntersectionObserver($r,pn);Or.observe(yt);const Mr=Qr=>{ve(!Qr[0].isIntersecting)},Fr=new IntersectionObserver(Mr,pn);return Fr.observe(Wt),()=>{Or.disconnect(),Fr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),I.useEffect(()=>{se(!0)},[]),I.useEffect(()=>{Ie()}),I.useEffect(()=>{$e(L8!==Q)},[$e,Q]),I.useImperativeHandle(c,()=>({updateIndicator:Ie,updateScrollButtons:Ne}),[Ie,Ne]);const Rt=C.jsx(axe,$({},R,{className:Fe(J.indicator,R.className),ownerState:Y,style:$({},Q,R.style)}));let ct=0;const Ae=I.Children.map(f,Re=>{if(!I.isValidElement(Re))return null;const Ue=Re.props.value===void 0?ct:Re.props.value;Qe.set(Ue,ct);const yt=Ue===L;return ct+=1,I.cloneElement(Re,$({fullWidth:N==="fullWidth",indicator:yt&&!ue&&Rt,selected:yt,selectionFollowsFocus:x,onChange:y,textColor:O,value:Ue},ct===1&&L===!1&&!Re.props.tabIndex?{tabIndex:0}:{}))}),ot=Re=>{const Ue=at.current,yt=Ar(Ue).activeElement;if(yt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Re.key){case pn:Re.preventDefault(),t_(Ue,yt,D8);break;case $r:Re.preventDefault(),t_(Ue,yt,M8);break;case"Home":Re.preventDefault(),t_(Ue,null,M8);break;case"End":Re.preventDefault(),t_(Ue,null,D8);break}},$t=Ye();return C.jsxs(ixe,$({className:Fe(J.root,h),ownerState:Y,ref:n,as:p},W,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(oxe,{className:J.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:qe,children:[C.jsx(sxe,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:J.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Ae}),ue&&Rt]}),$t.scrollButtonEnd]}))}),uxe=cxe;function dxe(e){return _t("MuiTextField",e)}Ct("MuiTextField",["root"]);const fxe=["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"],hxe={standard:NK,filled:OK,outlined:HK},pxe=e=>{const{classes:t}=e;return Et({root:["root"]},dxe,t)},mxe=Ee(kge,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),gxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:R,multiline:k=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:W,required:z=!1,rows:D,select:F=!1,SelectProps:j,type:V,value:G,variant:K="outlined"}=r,Y=Le(r,fxe),J=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:k,required:z,select:F,variant:K}),ie=pxe(J),ce={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ce.notched=S.shrink),ce.label=E),F&&((!j||!j.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const ue=y5(y),se=v&&ue?`${ue}-helper-text`:void 0,Q=E&&ue?`${ue}-label`:void 0,ae=hxe[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:k,name:O,rows:D,maxRows:A,minRows:R,type:V,value:G,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:W,inputProps:_},ce,b));return C.jsxs(mxe,$({className:Fe(ie.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:z,color:c,variant:K,ownerState:J},Y,{children:[E!=null&&E!==""&&C.jsx(fve,$({htmlFor:ue,id:Q},S,{children:E})),F?C.jsx(_0e,$({"aria-describedby":se,id:ue,labelId:Q,value:G,input:le},j,{children:s})):le,v&&C.jsx(Hge,$({id:se},p,{children:v}))]}))}),K1=gxe;function _n({vertical:e,...t}){return C.jsx(dt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const GK=Dt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),vxe=Dt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),yxe=Dt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),bxe=Dt(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"),xxe=Dt(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"),wxe=Dt(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"),_xe=Dt(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=Dt(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"),Exe=Dt(C.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}),"ChevronLeftOutlined"),VK=Dt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),Cxe=Dt(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"),qK=Dt(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"),Txe=Dt(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"),kxe=Dt(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"),Axe=Dt(C.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7zm17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4h-1z"}),"DataObjectOutlined"),Rxe=Dt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),sk=Dt(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"),XK=Dt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),YK=Dt(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"),Ixe=Dt([C.jsx("path",{d:"M9 12c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3zm4 0c0 .55-.45 1-1 1s-1-.45-1-1 .45-1 1-1 1 .45 1 1z"},"0"),C.jsx("path",{d:"M8 10V8H5.09C6.47 5.61 9.05 4 12 4c3.72 0 6.85 2.56 7.74 6h2.06c-.93-4.56-4.96-8-9.8-8-3.27 0-6.18 1.58-8 4.01V4H2v6h6zm8 4v2h2.91c-1.38 2.39-3.96 4-6.91 4-3.72 0-6.85-2.56-7.74-6H2.2c.93 4.56 4.96 8 9.8 8 3.27 0 6.18-1.58 8-4.01V20h2v-6h-6z"},"1")],"FlipCameraAndroidOutlined"),Pxe=Dt(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"),Oxe=Dt(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"),Mxe=Dt(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"),Dxe=Dt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),Lxe=Dt(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"),nv=Dt(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"),KK=Dt(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"),QK=Dt(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"),Nxe=Dt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),Bxe=Dt(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"),$xe=Dt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),JK=Dt(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"),Fxe=Dt(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"),zxe=Dt(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"),jxe=Dt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),AS=Dt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),Uxe=Dt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Hxe=Dt(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"),N8=Dt(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"),ZK=Dt(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"),Wxe=Dt(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"),Gxe=Dt(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"),G4=Dt(C.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"}),"WorkspacesOutlined");var NE={exports:{}};/** + `),A0e,(t.vars||t).palette.action.hover)),I0e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSkeleton"}),{animation:i="pulse",className:o,component:s="span",height:l,style:c,variant:d="text",width:f}=r,h=Le(r,C0e),p=$({},r,{animation:i,component:s,variant:d,hasChildren:!!h.children}),g=T0e(p);return C.jsx(R0e,$({as:s,ref:n,className:Fe(g.root,o),ownerState:p},h,{style:$({width:f,height:l},c)}))}),P0e=I0e,O0e=e=>!e||!Ul(e),M0e=O0e;function D0e(e){return _t("MuiSlider",e)}const L0e=Ct("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"]),el=L0e,N0e=e=>{const{open:t}=e;return{offset:Fe(t&&el.valueLabelOpen),circle:el.valueLabelCircle,label:el.valueLabelLabel}};function B0e(e){const{children:t,className:n,value:r}=e,i=N0e(e);return t?I.cloneElement(t,{className:Fe(t.props.className)},C.jsxs(I.Fragment,{children:[t.props.children,C.jsx("span",{className:Fe(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const $0e=["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 I8(e){return e}const F0e=Ee("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Me(n.color)}`],n.size!=="medium"&&t[`size${Me(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"},[`&.${el.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${el.dragging}`]:{[`& .${el.thumb}, & .${el.track}`]:{transition:"none"}}})),z0e=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),j0e=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?Kg(e.palette[t.color].main,.62):Yg(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})}),U0e=Ee("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Me(n.color)}`],n.size!=="medium"&&t[`thumbSize${Me(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, &.${el.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${el.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:_n(e.palette[t.color].main,.16)}`},[`&.${el.disabled}`]:{"&:hover":{boxShadow:"none"}}})),H0e=Ee(B0e,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${el.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"})),W0e=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>B5(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})),G0e=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>B5(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})),V0e=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:l,size:c}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Me(l)}`,c&&`size${Me(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${Me(c)}`,l&&`thumbColor${Me(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Et(d,D0e,s)},q0e=({children:e})=>e,X0e=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A,R,k,O,L,N;const H=Tt({props:t,name:"MuiSlider"}),z=Cn().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":j,component:V="span",components:G={},componentsProps:K={},color:Y="primary",classes:J,className:ie,disableSwap:ce=!1,disabled:ue=!1,getAriaLabel:se,getAriaValueText:Q,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:xe=I8,slotProps:me,slots:be,track:Qe="normal",valueLabelDisplay:qe="off",valueLabelFormat:at=I8}=H,Nt=Le(H,$0e),Ie=$({},H,{isRtl:z,max:le,min:he,classes:J,disabled:ue,disableSwap:ce,orientation:pe,marks:ae,color:Y,size:ve,step:ye,scale:xe,track:Qe,valueLabelDisplay:qe,valueLabelFormat:at}),{axisProps:ze,getRootProps:it,getHiddenInputProps:pt,getThumbProps:mt,open:_e,active:je,axis:Ye,focusedThumbIndex:$e,range:Ne,dragging:Rt,marks:ct,values:Ae,trackOffset:ot,trackLeap:$t,getThumbStyle:Re}=ope($({},Ie,{rootRef:n}));Ie.marked=ct.length>0&&ct.some(Hn=>Hn.label),Ie.dragging=Rt,Ie.focusedThumbIndex=$e;const Ue=V0e(Ie),yt=(r=(i=be==null?void 0:be.root)!=null?i:G.Root)!=null?r:F0e,Wt=(o=(s=be==null?void 0:be.rail)!=null?s:G.Rail)!=null?o:z0e,pn=(l=(c=be==null?void 0:be.track)!=null?c:G.Track)!=null?l:j0e,$r=(d=(f=be==null?void 0:be.thumb)!=null?f:G.Thumb)!=null?d:U0e,Or=(h=(p=be==null?void 0:be.valueLabel)!=null?p:G.ValueLabel)!=null?h:H0e,Mr=(g=(v=be==null?void 0:be.mark)!=null?v:G.Mark)!=null?g:W0e,Fr=(y=(S=be==null?void 0:be.markLabel)!=null?S:G.MarkLabel)!=null?y:G0e,Qr=(_=(b=be==null?void 0:be.input)!=null?b:G.Input)!=null?_:"input",Zo=(x=me==null?void 0:me.root)!=null?x:K.root,Fu=(E=me==null?void 0:me.rail)!=null?E:K.rail,Gs=(A=me==null?void 0:me.track)!=null?A:K.track,lc=(R=me==null?void 0:me.thumb)!=null?R:K.thumb,cc=(k=me==null?void 0:me.valueLabel)!=null?k:K.valueLabel,cf=(O=me==null?void 0:me.mark)!=null?O:K.mark,es=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,uf=(N=me==null?void 0:me.input)!=null?N:K.input,ao=Wr({elementType:yt,getSlotProps:it,externalSlotProps:Zo,externalForwardedProps:Nt,additionalProps:$({},M0e(yt)&&{as:V}),ownerState:$({},Ie,Zo==null?void 0:Zo.ownerState),className:[Ue.root,ie]}),uc=Wr({elementType:Wt,externalSlotProps:Fu,ownerState:Ie,className:Ue.rail}),Ei=Wr({elementType:pn,externalSlotProps:Gs,additionalProps:{style:$({},ze[Ye].offset(ot),ze[Ye].leap($t))},ownerState:$({},Ie,Gs==null?void 0:Gs.ownerState),className:Ue.track}),ts=Wr({elementType:$r,getSlotProps:mt,externalSlotProps:lc,ownerState:$({},Ie,lc==null?void 0:lc.ownerState),className:Ue.thumb}),df=Wr({elementType:Or,externalSlotProps:cc,ownerState:$({},Ie,cc==null?void 0:cc.ownerState),className:Ue.valueLabel}),ns=Wr({elementType:Mr,externalSlotProps:cf,ownerState:Ie,className:Ue.mark}),xa=Wr({elementType:Fr,externalSlotProps:es,ownerState:Ie,className:Ue.markLabel}),zu=Wr({elementType:Qr,getSlotProps:pt,externalSlotProps:uf,ownerState:Ie});return C.jsxs(yt,$({},ao,{children:[C.jsx(Wt,$({},uc)),C.jsx(pn,$({},Ei)),ct.filter(Hn=>Hn.value>=he&&Hn.value<=le).map((Hn,Jn)=>{const wl=RE(Hn.value,he,le),_l=ze[Ye].offset(wl);let lo;return Qe===!1?lo=Ae.indexOf(Hn.value)!==-1:lo=Qe==="normal"&&(Ne?Hn.value>=Ae[0]&&Hn.value<=Ae[Ae.length-1]:Hn.value<=Ae[0])||Qe==="inverted"&&(Ne?Hn.value<=Ae[0]||Hn.value>=Ae[Ae.length-1]:Hn.value>=Ae[0]),C.jsxs(I.Fragment,{children:[C.jsx(Mr,$({"data-index":Jn},ns,!Ul(Mr)&&{markActive:lo},{style:$({},_l,ns.style),className:Fe(ns.className,lo&&Ue.markActive)})),Hn.label!=null?C.jsx(Fr,$({"aria-hidden":!0,"data-index":Jn},xa,!Ul(Fr)&&{markLabelActive:lo},{style:$({},_l,xa.style),className:Fe(Ue.markLabel,xa.className,lo&&Ue.markLabelActive),children:Hn.label})):null]},Jn)}),Ae.map((Hn,Jn)=>{const wl=RE(Hn,he,le),_l=ze[Ye].offset(wl),lo=qe==="off"?q0e:Or;return C.jsx(lo,$({},!Ul(lo)&&{valueLabelFormat:at,valueLabelDisplay:qe,value:typeof at=="function"?at(xe(Hn),Jn):at,index:Jn,open:_e===Jn||je===Jn||qe==="on",disabled:ue},df,{children:C.jsx($r,$({"data-index":Jn},ts,{className:Fe(Ue.thumb,ts.className,je===Jn&&Ue.active,$e===Jn&&Ue.focusVisible),style:$({},_l,Re(Jn),ts.style),children:C.jsx(Qr,$({"data-index":Jn,"aria-label":se?se(Jn):D,"aria-valuenow":xe(Hn),"aria-labelledby":j,"aria-valuetext":Q?Q(xe(Hn),Jn):F,value:Ae[Jn]},zu))}))}),Jn)})]}))}),Y0e=X0e;function K0e(e){return _t("MuiSnackbarContent",e)}Ct("MuiSnackbarContent",["root","message","action"]);const Q0e=["action","className","message","role"],J0e=e=>{const{classes:t}=e;return Et({root:["root"],action:["action"],message:["message"]},K0e,t)},Z0e=Ee(ev,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=lle(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}})}),ebe=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),tbe=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),nbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,Q0e),d=r,f=J0e(d);return C.jsxs(Z0e,$({role:l,square:!0,elevation:6,className:Fe(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(ebe,{className:f.message,ownerState:d,children:s}),i?C.jsx(tbe,{className:f.action,ownerState:d,children:i}):null]}))}),rbe=nbe;function ibe(e){return _t("MuiSnackbar",e)}Ct("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const obe=["onEnter","onExited"],sbe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],abe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Me(n.vertical)}${Me(n.horizontal)}`]};return Et(r,ibe,t)},P8=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Me(n.anchorOrigin.vertical)}${Me(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"})})}),lbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSnackbar"}),i=Cn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=PE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,A=Le(r.TransitionProps,obe),R=Le(r,sbe),k=$({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),O=abe(k),{getRootProps:L,onClickAway:N}=spe($({},k)),[H,W]=I.useState(!0),z=Wr({elementType:P8,getSlotProps:L,externalForwardedProps:R,ownerState:k,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{W(!0),E&&E(j)},F=(j,V)=>{W(!1),x&&x(j,V)};return!S&&H?null:C.jsx(xfe,$({onClickAway:N},p,{children:C.jsx(P8,$({},z,{children:C.jsx(_,$({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:F,onExited:D},A,{children:f||C.jsx(rbe,$({message:y,action:s},g))}))}))}))}),cbe=lbe;function ube(e){return _t("MuiTooltip",e)}const dbe=Ct("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),fd=dbe,fbe=["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 hbe(e){return Math.round(e*1e5)/1e5}const pbe=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${Me(o.split("-")[0])}`],arrow:["arrow"]};return Et(s,ube,t)},mbe=Ee(_K,{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"] .${fd.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${fd.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${fd.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"] .${fd.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),gbe=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Me(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:_n(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:`${hbe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${fd.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${fd.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${fd.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${fd.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),vbe=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:_n(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Zw=!1,ZD=null,fb={x:0,y:0};function e_(e,t){return n=>{t&&t(n),e(n)}}const ybe=I.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,A;const R=Tt({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:W=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:V=0,enterTouchDelay:G=700,followCursor:K=!1,id:Y,leaveDelay:J=0,leaveTouchDelay:ie=1500,onClose:ce,onOpen:ue,open:se,placement:Q="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=PE,TransitionProps:xe}=R,me=Le(R,fbe),be=I.isValidElement(O)?O:C.jsx("span",{children:O}),Qe=Cn(),qe=Qe.direction==="rtl",[at,Nt]=I.useState(),[Ie,ze]=I.useState(null),it=I.useRef(!1),pt=D||K,mt=I.useRef(),_e=I.useRef(),je=I.useRef(),Ye=I.useRef(),[$e,Ne]=Ox({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=$e;const ct=v5(Y),Ae=I.useRef(),ot=I.useCallback(()=>{Ae.current!==void 0&&(document.body.style.WebkitUserSelect=Ae.current,Ae.current=void 0),clearTimeout(Ye.current)},[]);I.useEffect(()=>()=>{clearTimeout(mt.current),clearTimeout(_e.current),clearTimeout(je.current),ot()},[ot]);const $t=Qt=>{clearTimeout(ZD),Zw=!0,Ne(!0),ue&&!Rt&&ue(Qt)},Re=eo(Qt=>{clearTimeout(ZD),ZD=setTimeout(()=>{Zw=!1},800+J),Ne(!1),ce&&Rt&&ce(Qt),clearTimeout(mt.current),mt.current=setTimeout(()=>{it.current=!1},Qe.transitions.duration.shortest)}),Ue=Qt=>{it.current&&Qt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(je.current),j||Zw&&V?_e.current=setTimeout(()=>{$t(Qt)},Zw?V:j):$t(Qt))},yt=Qt=>{clearTimeout(_e.current),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},J)},{isFocusVisibleRef:Wt,onBlur:pn,onFocus:$r,ref:Or}=y5(),[,Mr]=I.useState(!1),Fr=Qt=>{pn(Qt),Wt.current===!1&&(Mr(!1),yt(Qt))},Qr=Qt=>{at||Nt(Qt.currentTarget),$r(Qt),Wt.current===!0&&(Mr(!0),Ue(Qt))},Zo=Qt=>{it.current=!0;const vr=be.props;vr.onTouchStart&&vr.onTouchStart(Qt)},Fu=Ue,Gs=yt,lc=Qt=>{Zo(Qt),clearTimeout(je.current),clearTimeout(mt.current),ot(),Ae.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ae.current,Ue(Qt)},G)},cc=Qt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Qt),ot(),clearTimeout(je.current),je.current=setTimeout(()=>{Re(Qt)},ie)};I.useEffect(()=>{if(!Rt)return;function Qt(vr){(vr.key==="Escape"||vr.key==="Esc")&&Re(vr)}return document.addEventListener("keydown",Qt),()=>{document.removeEventListener("keydown",Qt)}},[Re,Rt]);const cf=mr(be.ref,Or,Nt,n);!ve&&ve!==0&&(Rt=!1);const es=I.useRef(),uf=Qt=>{const vr=be.props;vr.onMouseMove&&vr.onMouseMove(Qt),fb={x:Qt.clientX,y:Qt.clientY},es.current&&es.current.update()},ao={},uc=typeof ve=="string";H?(ao.title=!Rt&&uc&&!z?ve:null,ao["aria-describedby"]=Rt?ct:null):(ao["aria-label"]=uc?ve:null,ao["aria-labelledby"]=Rt&&!uc?ct:null);const Ei=$({},ao,me,be.props,{className:Fe(me.className,be.props.className),onTouchStart:Zo,ref:cf},K?{onMouseMove:uf}:{}),ts={};F||(Ei.onTouchStart=lc,Ei.onTouchEnd=cc),z||(Ei.onMouseOver=e_(Fu,Ei.onMouseOver),Ei.onMouseLeave=e_(Gs,Ei.onMouseLeave),pt||(ts.onMouseOver=Fu,ts.onMouseLeave=Gs)),W||(Ei.onFocus=e_(Qr,Ei.onFocus),Ei.onBlur=e_(Fr,Ei.onBlur),pt||(ts.onFocus=Qr,ts.onBlur=Fr));const df=I.useMemo(()=>{var Qt;let vr=[{name:"arrow",enabled:!!Ie,options:{element:Ie,padding:4}}];return(Qt=le.popperOptions)!=null&&Qt.modifiers&&(vr=vr.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:vr})},[Ie,le]),ns=$({},R,{isRtl:qe,arrow:k,disableInteractive:pt,placement:Q,PopperComponentProp:ae,touch:it.current}),xa=pbe(ns),zu=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:mbe,Hn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:PE,Jn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:gbe,wl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:vbe,_l=Fb(zu,$({},le,(p=he.popper)!=null?p:N.popper,{className:Fe(xa.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),ns),lo=Fb(Hn,$({},xe,(y=he.transition)!=null?y:N.transition),ns),_v=Fb(Jn,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:Fe(xa.tooltip,(_=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:_.className)}),ns),Sv=Fb(wl,$({},(x=he.arrow)!=null?x:N.arrow,{className:Fe(xa.arrow,(E=(A=he.arrow)!=null?A:N.arrow)==null?void 0:E.className)}),ns);return C.jsxs(I.Fragment,{children:[I.cloneElement(be,Ei),C.jsx(zu,$({as:ae??_K,placement:Q,anchorEl:K?{getBoundingClientRect:()=>({top:fb.y,left:fb.x,right:fb.x,bottom:fb.y,width:0,height:0})}:at,popperRef:es,open:at?Rt:!1,id:ct,transition:!0},ts,_l,{popperOptions:df,children:({TransitionProps:Qt})=>C.jsx(Hn,$({timeout:Qe.transitions.duration.shorter},Qt,lo,{children:C.jsxs(Jn,$({},_v,{children:[ve,k?C.jsx(wl,$({},Sv,{ref:ze})):null]}))}))}))]})}),Mu=ybe;function bbe(e){return _t("MuiSwitch",e)}const xbe=Ct("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),_o=xbe,wbe=["className","color","edge","size","sx"],_be=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,l={root:["root",n&&`edge${Me(n)}`,`size${Me(r)}`],switchBase:["switchBase",`color${Me(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Et(l,bbe,t);return $({},t,c)},Sbe=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Me(n.edge)}`],t[`size${Me(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,[`& .${_o.thumb}`]:{width:16,height:16},[`& .${_o.switchBase}`]:{padding:4,[`&.${_o.checked}`]:{transform:"translateX(16px)"}}})),Ebe=Ee(kK,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${_o.input}`]:t.input},n.color!=="default"&&t[`color${Me(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}),[`&.${_o.checked}`]:{transform:"translateX(20px)"},[`&.${_o.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${_o.checked} + .${_o.track}`]:{opacity:.5},[`&.${_o.disabled} + .${_o.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${_o.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${_o.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})`:_n(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_o.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Kg(e.palette[t.color].main,.62):Yg(e.palette[t.color].main,.55)}`}},[`&.${_o.checked} + .${_o.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),Cbe=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),Tbe=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),kbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,wbe),f=$({},r,{color:o,edge:s,size:l}),h=_be(f),p=C.jsx(Tbe,{className:h.thumb,ownerState:f});return C.jsxs(Sbe,{className:Fe(h.root,i),sx:c,ownerState:f,children:[C.jsx(Ebe,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:$({},h,{root:h.switchBase})})),C.jsx(Cbe,{className:h.track,ownerState:f})]})}),Tg=kbe;function Abe(e){return _t("MuiTab",e)}const Rbe=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Sh=Rbe,Ibe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Pbe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:l,disabled:c}=e,d={root:["root",o&&s&&"labelIcon",`textColor${Me(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Et(d,Abe,t)},Obe=Ee(Ou,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Me(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,[`& > .${Sh.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,[`&.${Sh.selected}`]:{opacity:1},[`&.${Sh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Sh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Sh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Sh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Sh.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)})),Mbe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,Ibe),A=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),R=Pbe(A),k=c&&h&&I.isValidElement(c)?I.cloneElement(c,{className:Fe(R.iconWrapper,c.props.className)}):c,O=N=>{!y&&p&&p(N,b),g&&g(N)},L=N=>{S&&!y&&p&&p(N,b),v&&v(N)};return C.jsxs(Obe,$({focusRipple:!s,className:Fe(R.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:A,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(I.Fragment,{children:[k,h]}):C.jsxs(I.Fragment,{children:[h,k]}),f]}))}),Dm=Mbe;function Dbe(e){return _t("MuiToolbar",e)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const Lbe=["className","component","disableGutters","variant"],Nbe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Et({root:["root",!n&&"gutters",r]},Dbe,t)},Bbe=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),$be=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,Lbe),d=$({},r,{component:o,disableGutters:s,variant:l}),f=Nbe(d);return C.jsx(Bbe,$({as:o,className:Fe(f.root,i),ref:n,ownerState:d},c))}),Fbe=$be,zbe=Mt(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),jbe=Mt(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Ube(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Hbe(e,t,n,r={},i=()=>{}){const{ease:o=Ube,duration:s=300}=r;let l=null;const c=t[e];let d=!1;const f=()=>{d=!0},h=p=>{if(d){i(new Error("Animation cancelled"));return}l===null&&(l=p);const g=Math.min(1,(p-l)/s);if(t[e]=o(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const Wbe=["onChange"],Gbe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Vbe(e){const{onChange:t}=e,n=Le(e,Wbe),r=I.useRef(),i=I.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Io(()=>{const s=YC(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),l=bu(i.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),I.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:Gbe,ref:i},n))}function qbe(e){return _t("MuiTabScrollButton",e)}const Xbe=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ybe=Xbe,Kbe=["className","slots","slotProps","direction","orientation","disabled"],Qbe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Et({root:["root",n,r&&"disabled"]},qbe,t)},Jbe=Ee(Ou,{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,[`&.${Ybe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Zbe=I.forwardRef(function(t,n){var r,i;const o=Tt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Kbe),p=Cn().direction==="rtl",g=$({isRtl:p},o),v=Qbe(g),y=(r=l.StartScrollButtonIcon)!=null?r:zbe,S=(i=l.EndScrollButtonIcon)!=null?i:jbe,_=Wr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Wr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Jbe,$({component:"div",className:Fe(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,$({},_)):C.jsx(S,$({},b))}))}),exe=Zbe;function txe(e){return _t("MuiTabs",e)}const nxe=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),eL=nxe,rxe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],O8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,M8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,t_=(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}}},ixe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Et({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},txe,c)},oxe=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${eL.scrollButtons}`]:t.scrollButtons},{[`& .${eL.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&&{[`& .${eL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),sxe=Ee("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),axe=Ee("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),lxe=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),cxe=Ee(Vbe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),D8={},uxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabs"}),i=Cn(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=exe,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:A={},TabIndicatorProps:R={},TabScrollButtonProps:k={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,W=Le(r,rxe),z=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",G=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=$({},r,{component:p,allowScrollButtonsMobile:g,indicatorColor:v,orientation:S,vertical:D,scrollButtons:b,textColor:O,variant:N,visibleScrollbar:H,fixed:!z,hideScrollbar:z&&!H,scrollableX:z&&!D,scrollableY:z&&D,centered:d&&!z,scrollButtonsHideMobile:!g}),J=ixe(Y),ie=Wr({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:Y}),ce=Wr({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:Y}),[ue,se]=I.useState(!1),[Q,ae]=I.useState(D8),[le,he]=I.useState(!1),[pe,ve]=I.useState(!1),[ye,xe]=I.useState(!1),[me,be]=I.useState({overflow:"hidden",scrollbarWidth:0}),Qe=new Map,qe=I.useRef(null),at=I.useRef(null),Nt=()=>{const Re=qe.current;let Ue;if(Re){const Wt=Re.getBoundingClientRect();Ue={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollLeftNormalized:Moe(Re,i.direction),scrollWidth:Re.scrollWidth,top:Wt.top,bottom:Wt.bottom,left:Wt.left,right:Wt.right}}let yt;if(Re&&L!==!1){const Wt=at.current.children;if(Wt.length>0){const pn=Wt[Qe.get(L)];yt=pn?pn.getBoundingClientRect():null}}return{tabsMeta:Ue,tabMeta:yt}},Ie=eo(()=>{const{tabsMeta:Re,tabMeta:Ue}=Nt();let yt=0,Wt;if(D)Wt="top",Ue&&Re&&(yt=Ue.top-Re.top+Re.scrollTop);else if(Wt=o?"right":"left",Ue&&Re){const $r=o?Re.scrollLeftNormalized+Re.clientWidth-Re.scrollWidth:Re.scrollLeft;yt=(o?-1:1)*(Ue[Wt]-Re[Wt]+$r)}const pn={[Wt]:yt,[K]:Ue?Ue[K]:0};if(isNaN(Q[Wt])||isNaN(Q[K]))ae(pn);else{const $r=Math.abs(Q[Wt]-pn[Wt]),Or=Math.abs(Q[K]-pn[K]);($r>=1||Or>=1)&&ae(pn)}}),ze=(Re,{animation:Ue=!0}={})=>{Ue?Hbe(F,qe.current,Re,{duration:i.transitions.duration.standard}):qe.current[F]=Re},it=Re=>{let Ue=qe.current[F];D?Ue+=Re:(Ue+=Re*(o?-1:1),Ue*=o&&Cq()==="reverse"?-1:1),ze(Ue)},pt=()=>{const Re=qe.current[G];let Ue=0;const yt=Array.from(at.current.children);for(let Wt=0;WtRe){Wt===0&&(Ue=Re);break}Ue+=pn[G]}return Ue},mt=()=>{it(-1*pt())},_e=()=>{it(pt())},je=I.useCallback(Re=>{be({overflow:null,scrollbarWidth:Re})},[]),Ye=()=>{const Re={};Re.scrollbarSizeListener=z?C.jsx(cxe,{onChange:je,className:Fe(J.scrollableX,J.hideScrollbar)}):null;const yt=z&&(b==="auto"&&(le||pe)||b===!0);return Re.scrollButtonStart=yt?C.jsx(_,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:mt,disabled:!le},k,{className:Fe(J.scrollButtons,k.className)})):null,Re.scrollButtonEnd=yt?C.jsx(_,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},k,{className:Fe(J.scrollButtons,k.className)})):null,Re},$e=eo(Re=>{const{tabsMeta:Ue,tabMeta:yt}=Nt();if(!(!yt||!Ue)){if(yt[j]Ue[V]){const Wt=Ue[F]+(yt[V]-Ue[V]);ze(Wt,{animation:Re})}}}),Ne=eo(()=>{z&&b!==!1&&xe(!ye)});I.useEffect(()=>{const Re=YC(()=>{qe.current&&Ie()}),Ue=bu(qe.current);Ue.addEventListener("resize",Re);let yt;return typeof ResizeObserver<"u"&&(yt=new ResizeObserver(Re),Array.from(at.current.children).forEach(Wt=>{yt.observe(Wt)})),()=>{Re.clear(),Ue.removeEventListener("resize",Re),yt&&yt.disconnect()}},[Ie]),I.useEffect(()=>{const Re=Array.from(at.current.children),Ue=Re.length;if(typeof IntersectionObserver<"u"&&Ue>0&&z&&b!==!1){const yt=Re[0],Wt=Re[Ue-1],pn={root:qe.current,threshold:.99},$r=Qr=>{he(!Qr[0].isIntersecting)},Or=new IntersectionObserver($r,pn);Or.observe(yt);const Mr=Qr=>{ve(!Qr[0].isIntersecting)},Fr=new IntersectionObserver(Mr,pn);return Fr.observe(Wt),()=>{Or.disconnect(),Fr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),I.useEffect(()=>{se(!0)},[]),I.useEffect(()=>{Ie()}),I.useEffect(()=>{$e(D8!==Q)},[$e,Q]),I.useImperativeHandle(c,()=>({updateIndicator:Ie,updateScrollButtons:Ne}),[Ie,Ne]);const Rt=C.jsx(lxe,$({},R,{className:Fe(J.indicator,R.className),ownerState:Y,style:$({},Q,R.style)}));let ct=0;const Ae=I.Children.map(f,Re=>{if(!I.isValidElement(Re))return null;const Ue=Re.props.value===void 0?ct:Re.props.value;Qe.set(Ue,ct);const yt=Ue===L;return ct+=1,I.cloneElement(Re,$({fullWidth:N==="fullWidth",indicator:yt&&!ue&&Rt,selected:yt,selectionFollowsFocus:x,onChange:y,textColor:O,value:Ue},ct===1&&L===!1&&!Re.props.tabIndex?{tabIndex:0}:{}))}),ot=Re=>{const Ue=at.current,yt=Ar(Ue).activeElement;if(yt.getAttribute("role")!=="tab")return;let pn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(pn="ArrowRight",$r="ArrowLeft"),Re.key){case pn:Re.preventDefault(),t_(Ue,yt,M8);break;case $r:Re.preventDefault(),t_(Ue,yt,O8);break;case"Home":Re.preventDefault(),t_(Ue,null,O8);break;case"End":Re.preventDefault(),t_(Ue,null,M8);break}},$t=Ye();return C.jsxs(oxe,$({className:Fe(J.root,h),ownerState:Y,ref:n,as:p},W,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(sxe,{className:J.scroller,ownerState:Y,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:qe,children:[C.jsx(axe,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:J.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:Ae}),ue&&Rt]}),$t.scrollButtonEnd]}))}),dxe=uxe;function fxe(e){return _t("MuiTextField",e)}Ct("MuiTextField",["root"]);const hxe=["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"],pxe={standard:LK,filled:PK,outlined:UK},mxe=e=>{const{classes:t}=e;return Et({root:["root"]},fxe,t)},gxe=Ee(Age,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vxe=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:A,minRows:R,multiline:k=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:W,required:z=!1,rows:D,select:F=!1,SelectProps:j,type:V,value:G,variant:K="outlined"}=r,Y=Le(r,hxe),J=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:k,required:z,select:F,variant:K}),ie=mxe(J),ce={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ce.notched=S.shrink),ce.label=E),F&&((!j||!j.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const ue=v5(y),se=v&&ue?`${ue}-helper-text`:void 0,Q=E&&ue?`${ue}-label`:void 0,ae=pxe[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:k,name:O,rows:D,maxRows:A,minRows:R,type:V,value:G,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:W,inputProps:_},ce,b));return C.jsxs(gxe,$({className:Fe(ie.root,l),disabled:f,error:h,fullWidth:g,ref:n,required:z,color:c,variant:K,ownerState:J},Y,{children:[E!=null&&E!==""&&C.jsx(hve,$({htmlFor:ue,id:Q},S,{children:E})),F?C.jsx(S0e,$({"aria-describedby":se,id:ue,labelId:Q,value:G,input:le},j,{children:s})):le,v&&C.jsx(Wge,$({id:se},p,{children:v}))]}))}),K1=vxe;function bn({vertical:e,...t}){return C.jsx(dt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const WK=Mt(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),yxe=Mt(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),bxe=Mt(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),xxe=Mt(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"),wxe=Mt(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"),_xe=Mt(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"),Sxe=Mt(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"),Exe=Mt(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"),Cxe=Mt(C.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}),"ChevronLeftOutlined"),GK=Mt(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),Txe=Mt(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"),VK=Mt(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"),kxe=Mt(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"),Axe=Mt(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"),Rxe=Mt(C.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7zm17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4h-1z"}),"DataObjectOutlined"),Ixe=Mt(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),ok=Mt(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"),qK=Mt(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),XK=Mt(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"),Pxe=Mt([C.jsx("path",{d:"M9 12c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3zm4 0c0 .55-.45 1-1 1s-1-.45-1-1 .45-1 1-1 1 .45 1 1z"},"0"),C.jsx("path",{d:"M8 10V8H5.09C6.47 5.61 9.05 4 12 4c3.72 0 6.85 2.56 7.74 6h2.06c-.93-4.56-4.96-8-9.8-8-3.27 0-6.18 1.58-8 4.01V4H2v6h6zm8 4v2h2.91c-1.38 2.39-3.96 4-6.91 4-3.72 0-6.85-2.56-7.74-6H2.2c.93 4.56 4.96 8 9.8 8 3.27 0 6.18-1.58 8-4.01V20h2v-6h-6z"},"1")],"FlipCameraAndroidOutlined"),Oxe=Mt(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"),Mxe=Mt(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"),Dxe=Mt(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"),Lxe=Mt(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),Nxe=Mt(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"),nv=Mt(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"),YK=Mt(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"),KK=Mt(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=Mt(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),$xe=Mt(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"),Fxe=Mt(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),QK=Mt(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"),zxe=Mt(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"),jxe=Mt(C.jsx("path",{d:"M9 18h12v-2H9v2zM3 6v2h18V6H3zm6 7h12v-2H9v2z"}),"SegmentOutlined"),Uxe=Mt(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"),Hxe=Mt(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),tL=Mt(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),Wxe=Mt(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Gxe=Mt(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"),L8=Mt(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"),JK=Mt(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"),Vxe=Mt(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"),qxe=Mt(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"),W4=Mt(C.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"}),"WorkspacesOutlined");var LE={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 - */NE.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",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Nt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Qr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,Fu=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(es.source),ao=/^\s+/,uc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xa=/[()=,{}\[\]\/\s]/,zu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,dc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",Ev=lA+cA+uA,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\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",kv="A-Z\\xc0-\\xd6\\xd8-\\xde",Av="\\ufe0e\\ufe0f",Rv=dA+fA+hA+pA,ff="['’]",mA="["+dc+"]",Iv="["+Rv+"]",fc="["+Ev+"]",Pv="\\d+",gA="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+dc+Rv+Pv+Cv+Tv+kv+"]",hf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+fc+"|"+hf+")",Dv="[^"+dc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+kv+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",yA="(?:"+rs+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",$v="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",Fv=vA+"?",zv="["+Av+"]?",bA="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+Fv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+Fv+bA,_A="(?:"+[gA,pf,mf].join("|")+")"+jv,SA="(?:"+[Dv+fc+"?",fc,pf,mf,mA].join("|")+")",EA=RegExp(ff,"g"),CA=RegExp(fc,"g"),gf=RegExp(hf+"(?="+hf+")|"+SA+jv,"g"),TA=RegExp([rs+"?"+Ov+"+"+Bv+"(?="+[Iv,rs,"$"].join("|")+")",yA+"+"+$v+"(?="+[Iv,rs+Nv,"$"].join("|")+")",rs+"?"+Nv+"+"+Bv,rs+"+"+$v,wA,xA,Pv,_A].join("|"),"g"),kA=RegExp("["+Lv+dc+Ev+Av+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["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"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"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"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=Uv||BA||Function("return this")(),vf=t&&!t.nodeType&&t,co=vf&&!0&&e&&!e.nodeType&&e,Hv=co&&co.exports===vf,yf=Hv&&Uv.process,tr=function(){try{var q=co&&co.require&&co.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=tr&&tr.isArrayBuffer,Gv=tr&&tr.isDate,Vv=tr&&tr.isMap,qv=tr&&tr.isRegExp,Xv=tr&&tr.isSet,Yv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=Sf(PA),YA=Sf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function kf(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function iy(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Jr.prototype.clear=NR,Jr.prototype.delete=BR,Jr.prototype.get=$R,Jr.prototype.has=FR,Jr.prototype.set=zR;function Zr(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?MI(a,nI(B,a)):OI(a,gy(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):O0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),ka(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return vy(m,a,u)}}function vy(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function yy(a,u,m){if(typeof a!="function")throw new rr(s);return Da(function(){a.apply(n,m)},u)}function Aa(a,u,m,w){var T=-1,M=hc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Gn(m))),w?(M=bf,B=!1):u.length>=i&&(M=wa,B=!1,u=new ho(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:N0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function zr(a,u){return a&&Df(a,u,nn)}function Lf(a,u){return a&&wy(a,u,nn)}function Oc(a,u){return Ei(u,function(m){return ii(a[m])})}function mo(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new ho(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&Sc.call(U,X,1),Sc.call(a,X,1);return a}function Oy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ri(T)?Sc.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Tc(fy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Cc((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function Hf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Tc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function _I(a){return my(gs(a))}function SI(a,u){var m=gs(a);return Hc(m,po(u,0,m.length))}function Pa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return mc(ne);B=!1,T=wa,X=new ho}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var Fy=pR||function(a){return dn.clearTimeout(a)};function zy(a,u){if(u)return a.slice();var m=a.length,w=ay?ay(m):new a.constructor(m);return a.copy(w),w}function Yf(a){var u=new a.constructor(a.byteLength);return new wc(u).set(new wc(a)),u}function AI(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return Ta?wt(Ta.call(a)):{}}function jy(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function Uy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function Hy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return ni(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&jc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new ho:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ + */LE.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",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Nt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Qr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,Fu=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(es.source),ao=/^\s+/,uc=/\s/,Ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xa=/[()=,{}\[\]\/\s]/,zu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,_l=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,sA=/['\n\r\u2028\u2029\\]/g,dc="\\ud800-\\udfff",aA="\\u0300-\\u036f",lA="\\ufe20-\\ufe2f",cA="\\u20d0-\\u20ff",Ev=aA+lA+cA,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",uA="\\xac\\xb1\\xd7\\xf7",dA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fA="\\u2000-\\u206f",hA=" \\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",kv="A-Z\\xc0-\\xd6\\xd8-\\xde",Av="\\ufe0e\\ufe0f",Rv=uA+dA+fA+hA,ff="['’]",pA="["+dc+"]",Iv="["+Rv+"]",fc="["+Ev+"]",Pv="\\d+",mA="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+dc+Rv+Pv+Cv+Tv+kv+"]",hf="\\ud83c[\\udffb-\\udfff]",gA="(?:"+fc+"|"+hf+")",Dv="[^"+dc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+kv+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",vA="(?:"+rs+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",$v="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",Fv=gA+"?",zv="["+Av+"]?",yA="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+Fv+")*",bA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+Fv+yA,wA="(?:"+[mA,pf,mf].join("|")+")"+jv,_A="(?:"+[Dv+fc+"?",fc,pf,mf,pA].join("|")+")",SA=RegExp(ff,"g"),EA=RegExp(fc,"g"),gf=RegExp(hf+"(?="+hf+")|"+_A+jv,"g"),CA=RegExp([rs+"?"+Ov+"+"+Bv+"(?="+[Iv,rs,"$"].join("|")+")",vA+"+"+$v+"(?="+[Iv,rs+Nv,"$"].join("|")+")",rs+"?"+Nv+"+"+Bv,rs+"+"+$v,xA,bA,Pv,wA].join("|"),"g"),TA=RegExp("["+Lv+dc+Ev+Av+"]"),kA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,AA=["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"],RA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var IA={À:"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"},PA={"&":"&","<":"<",">":">",'"':""","'":"'"},OA={"&":"&","<":"<",">":">",""":'"',"'":"'"},MA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},DA=parseFloat,LA=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,NA=typeof self=="object"&&self&&self.Object===Object&&self,dn=Uv||NA||Function("return this")(),vf=t&&!t.nodeType&&t,co=vf&&!0&&e&&!e.nodeType&&e,Hv=co&&co.exports===vf,yf=Hv&&Uv.process,tr=function(){try{var q=co&&co.require&&co.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=tr&&tr.isArrayBuffer,Gv=tr&&tr.isDate,Vv=tr&&tr.isMap,qv=tr&&tr.isRegExp,Xv=tr&&tr.isSet,Yv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function BA(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function VA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var qA=Sf(IA),XA=Sf(PA);function YA(q){return"\\"+MA[q]}function KA(q,te){return q==null?n:q[te]}function os(q){return TA.test(q)}function QA(q){return kA.test(q)}function JA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function kf(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function iy(q,te){return function(Z){return q(te(Z))}}function ki(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function FR(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Jr.prototype.clear=LR,Jr.prototype.delete=NR,Jr.prototype.get=BR,Jr.prototype.has=$R,Jr.prototype.set=FR;function Zr(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=HI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Mi(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?OI(a,tI(B,a)):PI(a,gy(B,a))}else{if(!kt[oe])return T?a:{};B=WI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):O0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),ka(B,Ke,or(ke,u,m,Ke,a,M))}),B}function nI(a){var u=nn(a);return function(m){return vy(m,a,u)}}function vy(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function yy(a,u,m){if(typeof a!="function")throw new rr(s);return Da(function(){a.apply(n,m)},u)}function Aa(a,u,m,w){var T=-1,M=hc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Gn(m))),w?(M=bf,B=!1):u.length>=i&&(M=wa,B=!1,u=new ho(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:N0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ti(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function zr(a,u){return a&&Df(a,u,nn)}function Lf(a,u){return a&&wy(a,u,nn)}function Oc(a,u){return Ci(u,function(m){return ii(a[m])})}function mo(a,u){u=Pi(u,a);for(var m=0,w=u.length;a!=null&&mu}function oI(a,u){return a!=null&&vt.call(a,u)}function sI(a,u){return a!=null&&u in wt(a)}function aI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new ho(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&Sc.call(U,X,1),Sc.call(a,X,1);return a}function Oy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ri(T)?Sc.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Tc(fy()*(u-a+1))}function xI(a,u,m,w){for(var T=-1,M=Zt(Cc((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function Hf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Tc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function wI(a){return my(gs(a))}function _I(a,u){var m=gs(a);return Hc(m,po(u,0,m.length))}function Pa(a,u,m,w){if(!Ft(a))return a;u=Pi(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:NI(a);if(ne)return mc(ne);B=!1,T=wa,X=new ho}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var Fy=hR||function(a){return dn.clearTimeout(a)};function zy(a,u){if(u)return a.slice();var m=a.length,w=ay?ay(m):new a.constructor(m);return a.copy(w),w}function Yf(a){var u=new a.constructor(a.byteLength);return new wc(u).set(new wc(a)),u}function kI(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function AI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function RI(a){return Ta?wt(Ta.call(a)):{}}function jy(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function Uy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function Hy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&kn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return ni(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&jc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new ho:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Ei,`{ /* [wrapped with `+u+`] */ -`)}function qI(a){return Be(a)||yo(a)||!!(uy&&a&&a[uy])}function ri(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&Sv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Hc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,x0(a,m)});function w0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Wc(a,u){return u(a)}var o2=ni(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return Mf(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ri(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Wc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return w0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=L0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Rc;){var w=p0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Wc,args:[ah],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ah)}function f2(){return By(this.__wrapped__,this.__actions__)}var h2=Nc(function(a,u,m){vt.call(a,m)?++a[m]:ei(a,m,1)});function p2(a,u,m){var w=Be(a)?Kv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:xy;return m(a,Ce(u,3))}var g2=Xy(m0),v2=Xy(g0);function y2(a,u){return fn(Gc(a,u),1)}function b2(a,u){return fn(Gc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Gc(a,u),m)}function _0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?FA:by;return m(a,Ce(u,3))}var w2=Nc(function(a,u,m){vt.call(a,m)?a[m].push(u):ei(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Kc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ra(B,u,m)}),M}),E2=Nc(function(a,u,m){ei(a,m,u)});function Gc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Iy(a,u,m))}var T2=Nc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function R2(a,u){var m=Be(a)?Ei:xy;return m(a,Xc(Ce(u,3)))}function I2(a){var u=Be(a)?my:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Kc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Ff(a).length}function D2(a,u,m){var w=Be(a)?wf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Iy(a,fn(u,1),[])}),Vc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function E0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ti(a,k,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var ch=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(ch));w|=A}return ti(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(T0));w|=A}return ti(u,w,a,m,T)});function k0(a,u,m){u=m?n:u;var w=ti(a,x,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function A0(a,u,m){u=m?n:u;var w=ti(a,E,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function R0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,si=T;return w=T=n,ne=Yt,B=a.apply(si,wr),B}function Te(Yt){return ne=Yt,U=Da(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,si=Yt-ne,X0=u-wr;return oe?gn(X0,M-si):X0}function ke(Yt){var wr=Yt-X,si=Yt-ne;return X===n||wr>=u||wr<0||oe&&si>=M}function Ke(){var Yt=Vc();if(ke(Yt))return nt(Yt);U=Da(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&Fy(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Vc())}function Yn(){var Yt=Vc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return Fy(U),U=Da(Ke,u),we(X)}return U===n&&(U=Da(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return yy(a,1,u)}),$2=Xe(function(a,u,m){return yy(a,lr(u)||0,m)});function F2(a){return ti(a,L)}function qc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(qc.Cache||Zr),m}qc.Cache=Zr;function Xc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return C0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Gn(Ce())):Lt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),yo=Sy(function(){return arguments}())?Sy:function(a){return jt(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,nO=Wv?Gn(Wv):uI;function Mn(a){return a!=null&&Yc(a.length)&&!ii(a)}function Xt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||wh,iO=Gv?Gn(Gv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!La(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||yo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Ma(a))return!Ff(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Ia(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ia(a,u,n,m):!!w}function dh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!La(a)}function cO(a){return typeof a=="number"&&dy(a)}function ii(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Nt}function P0(a){return typeof a=="number"&&a==We(a)}function Yc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var O0=Vv?Gn(Vv):hI;function uO(a,u){return a===u||$f(a,u,th(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,$f(a,u,th(u),m)}function fO(a){return M0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return Ey(a)}function pO(a){return a===null}function mO(a){return a==null}function M0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function La(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=_c(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&yc.call(m)==dR}var fh=qv?Gn(qv):pI;function gO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Gn(Xv):mI;function Kc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=Yv?Gn(Yv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=zc(zf),wO=zc(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Kc(a)?yr(a):On(a);if(_a&&a[_a])return ZA(a[_a]());var u=vn(a),m=u==me?kf:u==ze?mc:gs;return m(a)}function oi(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=oi(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?po(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=ty(a);var m=xl.test(a);return m||_v.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function B0(a){return jr(a,Dn(a))}function _O(a){return a?po(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Ma(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&ka(a,m,u[m])}),$0=fs(function(a,u){jr(u,Dn(u),a)}),Qc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ni(Mf);function TO(a,u){var m=ds(a);return u==null?m:gy(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Zf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Gf(m,u[T]);return m});function GO(a,u){return z0(a,Xc(Ce(u)))}var VO=ni(function(a,u){return a==null?{}:bI(a,u)});function z0(a,u){if(a==null)return{};var m=Lt(Zf(a),function(w){return[w]});return u=Ce(u),Py(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=fy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?H0(u):u)});function H0(a){return mh(ft(a).toLowerCase())}function W0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:po(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Qr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&uf.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=qy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Tc(T),m)+a+Fc(Cc(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+mh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:po(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Qc({},u,w,e0);var T=Qc({},u.imports,w.imports,e0),M=nn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Af((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` -`;a.replace(fe,function(ke,Ke,nt,Xn,kn,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(aA,KA),Ke&&(U=!0,oe+=`' + +`)}function VI(a){return Be(a)||yo(a)||!!(uy&&a&&a[uy])}function ri(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&Sv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Hc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,x0(a,m)});function w0(a){var u=P(a);return u.__chain__=!0,u}function r2(a,u){return u(a),a}function Wc(a,u){return u(a)}var i2=ni(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return Mf(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ri(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Wc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function o2(){return w0(this)}function s2(){return new ir(this.value(),this.__chain__)}function a2(){this.__values__===n&&(this.__values__=L0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function l2(){return this}function c2(a){for(var u,m=this;m instanceof Rc;){var w=p0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function u2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Wc,args:[ah],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ah)}function d2(){return By(this.__wrapped__,this.__actions__)}var f2=Nc(function(a,u,m){vt.call(a,m)?++a[m]:ei(a,m,1)});function h2(a,u,m){var w=Be(a)?Kv:rI;return m&&kn(a,u,m)&&(u=n),w(a,Ce(u,3))}function p2(a,u){var m=Be(a)?Ci:xy;return m(a,Ce(u,3))}var m2=Xy(m0),g2=Xy(g0);function v2(a,u){return fn(Gc(a,u),1)}function y2(a,u){return fn(Gc(a,u),V)}function b2(a,u,m){return m=m===n?1:We(m),fn(Gc(a,u),m)}function _0(a,u){var m=Be(a)?nr:Ri;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?$A:by;return m(a,Ce(u,3))}var x2=Nc(function(a,u,m){vt.call(a,m)?a[m].push(u):ei(a,m,[u])});function w2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Kc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var _2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ri(a,function(B){M[++w]=T?Wn(u,B,m):Ra(B,u,m)}),M}),S2=Nc(function(a,u,m){ei(a,m,u)});function Gc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function E2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Iy(a,u,m))}var C2=Nc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function T2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ri)}function k2(a,u,m){var w=Be(a)?FA:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function A2(a,u){var m=Be(a)?Ci:xy;return m(a,Xc(Ce(u,3)))}function R2(a){var u=Be(a)?my:wI;return u(a)}function I2(a,u,m){(m?kn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?JR:_I;return w(a,u)}function P2(a){var u=Be(a)?ZR:EI;return u(a)}function O2(a){if(a==null)return 0;if(Mn(a))return Kc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Ff(a).length}function M2(a,u,m){var w=Be(a)?wf:CI;return m&&kn(a,u,m)&&(u=n),w(a,Ce(u,3))}var D2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&kn(a,u[0],u[1])?u=[]:m>2&&kn(u[0],u[1],u[2])&&(u=[u[0]]),Iy(a,fn(u,1),[])}),Vc=pR||function(){return dn.Date.now()};function L2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function E0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ti(a,k,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var ch=Xe(function(a,u,m){var w=S;if(m.length){var T=ki(m,ps(ch));w|=A}return ti(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=ki(m,ps(T0));w|=A}return ti(u,w,a,m,T)});function k0(a,u,m){u=m?n:u;var w=ti(a,x,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function A0(a,u,m){u=m?n:u;var w=ti(a,E,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function R0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,si=T;return w=T=n,ne=Yt,B=a.apply(si,wr),B}function Te(Yt){return ne=Yt,U=Da(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,si=Yt-ne,X0=u-wr;return oe?gn(X0,M-si):X0}function ke(Yt){var wr=Yt-X,si=Yt-ne;return X===n||wr>=u||wr<0||oe&&si>=M}function Ke(){var Yt=Vc();if(ke(Yt))return nt(Yt);U=Da(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&Fy(U),ne=0,w=X=T=U=n}function An(){return U===n?B:nt(Vc())}function Yn(){var Yt=Vc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return Fy(U),U=Da(Ke,u),we(X)}return U===n&&(U=Da(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=An,Yn}var N2=Xe(function(a,u){return yy(a,1,u)}),B2=Xe(function(a,u,m){return yy(a,lr(u)||0,m)});function $2(a){return ti(a,L)}function qc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(qc.Cache||Zr),m}qc.Cache=Zr;function Xc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function F2(a){return C0(2,a)}var z2=TI(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Gn(Ce())):Lt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),yo=Sy(function(){return arguments}())?Sy:function(a){return jt(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,tO=Wv?Gn(Wv):cI;function Mn(a){return a!=null&&Yc(a.length)&&!ii(a)}function Xt(a){return jt(a)&&Mn(a)}function nO(a){return a===!0||a===!1||jt(a)&&Tn(a)==le}var Mi=gR||wh,rO=Gv?Gn(Gv):uI;function iO(a){return jt(a)&&a.nodeType===1&&!La(a)}function oO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Mi(a)||ms(a)||yo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Ma(a))return!Ff(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function sO(a,u){return Ia(a,u)}function aO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ia(a,u,n,m):!!w}function dh(a){if(!jt(a))return!1;var u=Tn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!La(a)}function lO(a){return typeof a=="number"&&dy(a)}function ii(a){if(!Ft(a))return!1;var u=Tn(a);return u==ye||u==xe||u==ae||u==Nt}function P0(a){return typeof a=="number"&&a==We(a)}function Yc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var O0=Vv?Gn(Vv):fI;function cO(a,u){return a===u||$f(a,u,th(u))}function uO(a,u,m){return m=typeof m=="function"?m:n,$f(a,u,th(u),m)}function dO(a){return M0(a)&&a!=+a}function fO(a){if(YI(a))throw new De(o);return Ey(a)}function hO(a){return a===null}function pO(a){return a==null}function M0(a){return typeof a=="number"||jt(a)&&Tn(a)==be}function La(a){if(!jt(a)||Tn(a)!=qe)return!1;var u=_c(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&yc.call(m)==uR}var fh=qv?Gn(qv):hI;function mO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Gn(Xv):pI;function Kc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Tn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Tn(a)==pt}var ms=Yv?Gn(Yv):mI;function gO(a){return a===n}function vO(a){return jt(a)&&vn(a)==_e}function yO(a){return jt(a)&&Tn(a)==je}var bO=zc(zf),xO=zc(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Kc(a)?yr(a):On(a);if(_a&&a[_a])return JA(a[_a]());var u=vn(a),m=u==me?kf:u==ze?mc:gs;return m(a)}function oi(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=oi(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?po(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=ty(a);var m=_l.test(a);return m||_v.test(a)?LA(a.slice(2),m?2:8):wl.test(a)?Y:+a}function B0(a){return jr(a,Dn(a))}function wO(a){return a?po(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var _O=fs(function(a,u){if(Ma(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&ka(a,m,u[m])}),$0=fs(function(a,u){jr(u,Dn(u),a)}),Qc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),SO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),EO=ni(Mf);function CO(a,u){var m=ds(a);return u==null?m:gy(m,u)}var TO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&kn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Zf(a),m),w&&(m=or(m,h|p|g,BI));for(var T=u.length;T--;)Gf(m,u[T]);return m});function WO(a,u){return z0(a,Xc(Ce(u)))}var GO=ni(function(a,u){return a==null?{}:yI(a,u)});function z0(a,u){if(a==null)return{};var m=Lt(Zf(a),function(w){return[w]});return u=Ce(u),Py(a,m,function(w,T){return u(w,T[0])})}function VO(a,u,m){u=Pi(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=fy();return gn(a+T*(u-a+DA("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var rM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?H0(u):u)});function H0(a){return mh(ft(a).toLowerCase())}function W0(a){return a=ft(a),a&&a.replace(Qt,qA).replace(EA,"")}function iM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:po(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function oM(a){return a=ft(a),a&&Qr.test(a)?a.replace(Mr,XA):a}function sM(a){return a=ft(a),a&&uf.test(a)?a.replace(es,"\\$&"):a}var aM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),lM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),cM=qy("toLowerCase");function uM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Tc(T),m)+a+Fc(Cc(T),m)}function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=Vn(u),!u&&os(a))?Oi(yr(a),0,m):a.split(u,m)):[]}var yM=hs(function(a,u,m){return a+(m?" ":"")+mh(u)});function bM(a,u,m){return a=ft(a),m=m==null?0:po(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function xM(a,u,m){var w=P.templateSettings;m&&kn(a,u,m)&&(u=n),a=ft(a),u=Qc({},u,w,e0);var T=Qc({},u.imports,w.imports,e0),M=nn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Af((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RA+"]")+` +`;a.replace(fe,function(ke,Ke,nt,Xn,An,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(sA,YA),Ke&&(U=!0,oe+=`' + __e(`+Ke+`) + -'`),kn&&(X=!0,oe+=`'; -`+kn+`; +'`),An&&(X=!0,oe+=`'; +`+An+`; __p += '`),nt&&(oe+=`' + ((__t = (`+nt+`)) == null ? '' : __t) + '`),ne=Yn+ke.length,ke}),oe+=`'; @@ -288,7 +288,7 @@ __p += '`),nt&&(oe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Ve=V0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,dh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ny(w,T),B=ry(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ry(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(ao,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ny(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),fh(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Af(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),mh=qy("toUpperCase");function G0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),IM=ni(function(a,u){return nr(u,function(m){m=Ur(m),ei(a,m,ch(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=Cf(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Wc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=gc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Bc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,_a&&(P.prototype[_a]=c2),P},as=aR();co?((co.exports=as)._=as,vf._=as):dn._=as}).call(Bt)})(NE,NE.exports);var ee=NE.exports;function vi(e){return C.jsx(dt,{px:.5,display:"inline-block",...e})}function eQ({primary:e,secondary:t}){return C.jsxs(_n,{children:[C.jsx(dt,{children:e}),C.jsx(vi,{}),C.jsx(dt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** +}`;var Ve=V0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,dh(Ve))throw Ve;return Ve}function wM(a){return ft(a).toLowerCase()}function _M(a){return ft(a).toUpperCase()}function SM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ny(w,T),B=ry(w,T)+1;return Oi(w,M,B).join("")}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ry(w,yr(u))+1;return Oi(w,0,T).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(ao,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ny(w,yr(u));return Oi(w,T).join("")}function TM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Oi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),fh(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Af(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function kM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,nR):a}var AM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),mh=qy("toUpperCase");function G0(a,u,m){return a=ft(a),u=m?n:u,u===n?QA(a)?oR(a):UA(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),RM=ni(function(a,u){return nr(u,function(m){m=Ur(m),ei(a,m,ch(a[m],a))}),a});function IM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=Cf(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ti([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Wc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=gc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Bc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=kR,Je.prototype.reverse=AR,Je.prototype.value=RR,P.prototype.at=i2,P.prototype.chain=o2,P.prototype.commit=s2,P.prototype.next=a2,P.prototype.plant=c2,P.prototype.reverse=u2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=d2,P.prototype.first=P.prototype.head,_a&&(P.prototype[_a]=l2),P},as=sR();co?((co.exports=as)._=as,vf._=as):dn._=as}).call(Bt)})(LE,LE.exports);var ee=LE.exports;function yi(e){return C.jsx(dt,{px:.5,display:"inline-block",...e})}function ZK({primary:e,secondary:t}){return C.jsxs(bn,{children:[C.jsx(dt,{children:e}),C.jsx(yi,{}),C.jsx(dt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -301,7 +301,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 BE=function(){return BE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},t1e=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(Zxe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return e1e(r.stringify(i))},selector:function(i,o){return i+(o[0]===":"?"":" ")+o},putRaw:function(i){r.raw+=i}},e);return r.client&&(r.sh||document.head.appendChild(r.sh=document.createElement("style")),r.putRaw=function(i){{var o=r.sh.sheet;try{o.insertRule(i,o.cssRules.length)}catch{}}}),r.put=function(i,o,s){var l="",c,d,f=[];for(c in o)d=o[c],d instanceof Object&&!(d instanceof Array)?f.push(c):l+=r.decl(c,d,i,s);l&&(l=i+"{"+l+"}",r.putRaw(s?s+"{"+l+"}":l));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}tQ.removeRule=r1e;var i1e=tQ.removeRule,o1e=function(e){if(!e.client)return;var t=e.kebab;function n(i,o){this.rule=e.createRule(i,o),this.decl={}}n.prototype.diff=function(i){var o=this.decl,s=this.rule.style,l;for(l in o)i[l]===void 0&&s.removeProperty(l);for(l in i)i[l]!==o[l]&&s.setProperty(t(l),i[l]);this.decl=i},n.prototype.del=function(){i1e(this.rule)};function r(){this.tree={}}r.prototype.diff=function(i){var o=this.tree;for(var s in o)if(i[s]===void 0){var l=o[s];for(var c in l)l[c].del()}for(var s in i)if(o[s]===void 0)for(var c in i[s]){var d=new n(c,s);d.diff(i[s][c]),i[s][c]=d}else{var f=o[s],h=i[s];for(var c in f)h[c]||f[c].del();for(var c in h){var d=f[c];d?(d.diff(h[c]),h[c]=d):(d=new n(c,s),d.diff(h[c]),h[c]=d)}}this.tree=i},e.VRule=n,e.VSheet=r};function uF(e,t,n,r){var i={},o=!1,s,l;for(s in t)l=t[s],typeof l!="object"&&(o=!0,i[s]=l);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(l=t[s],typeof l=="object")if(s[0]==="@")uF(e,l,n,s);else{var c=s.indexOf("&")>-1,d=n.split(",");if(c)for(var f=0;ft,ak=(e,t)=>({...e,...t});function rc(e,{init:t,effect:n,reduce:r=ak}={}){const i=I.createContext([e,ee.noop]);return[()=>I.useContext(i),({children:o})=>{const[s,l]=Jxe(e),c=I.useCallback(f=>{const h=r(s(),f(s()));n==null||n({prev:s(),next:h}),l(h)},[s]),d=I.useMemo(()=>[s(),c],[s(),c]);return Xxe(async()=>{const f=await(t==null?void 0:t());f&&c(()=>f)}),C.jsx(i.Provider,{value:d,children:o})}]}function y1e(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[iQ,b1e]=rc([],{reduce:(e,t)=>[t,...e]}),oQ=I.createContext(()=>ee.noop);function ml(){return I.useContext(oQ)}function x1e({children:e}){const[t,n]=I.useState([]),[r,i]=I.useState(!1),[o,s]=I.useState(void 0),[,l]=iQ();I.useEffect(()=>{t.length&&!o?(s({...t[0]}),n(h=>h.slice(1)),i(!0)):t.length&&o&&r&&i(!1)},[t,o,r]);const c=I.useCallback((h,p,g={})=>(n(v=>[...v,{message:C.jsx(eQ,{primary:h,secondary:p}),key:new Date().getTime()}]),l(()=>({content:ee.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`})),g.error&&console.error(`${h}, ${p}`),()=>d()),[n]),d=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(oQ.Provider,{value:c,children:e}),C.jsx(lbe,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:d,TransitionProps:{onExited:f},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx(Bd,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:d,children:C.jsx(qK,{})})})},o==null?void 0:o.key)]})}/*! +***************************************************************************** */var NE=function(){return NE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},r1e=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(t1e,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return n1e(r.stringify(i))},selector:function(i,o){return i+(o[0]===":"?"":" ")+o},putRaw:function(i){r.raw+=i}},e);return r.client&&(r.sh||document.head.appendChild(r.sh=document.createElement("style")),r.putRaw=function(i){{var o=r.sh.sheet;try{o.insertRule(i,o.cssRules.length)}catch{}}}),r.put=function(i,o,s){var l="",c,d,f=[];for(c in o)d=o[c],d instanceof Object&&!(d instanceof Array)?f.push(c):l+=r.decl(c,d,i,s);l&&(l=i+"{"+l+"}",r.putRaw(s?s+"{"+l+"}":l));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}eQ.removeRule=o1e;var s1e=eQ.removeRule,a1e=function(e){if(!e.client)return;var t=e.kebab;function n(i,o){this.rule=e.createRule(i,o),this.decl={}}n.prototype.diff=function(i){var o=this.decl,s=this.rule.style,l;for(l in o)i[l]===void 0&&s.removeProperty(l);for(l in i)i[l]!==o[l]&&s.setProperty(t(l),i[l]);this.decl=i},n.prototype.del=function(){s1e(this.rule)};function r(){this.tree={}}r.prototype.diff=function(i){var o=this.tree;for(var s in o)if(i[s]===void 0){var l=o[s];for(var c in l)l[c].del()}for(var s in i)if(o[s]===void 0)for(var c in i[s]){var d=new n(c,s);d.diff(i[s][c]),i[s][c]=d}else{var f=o[s],h=i[s];for(var c in f)h[c]||f[c].del();for(var c in h){var d=f[c];d?(d.diff(h[c]),h[c]=d):(d=new n(c,s),d.diff(h[c]),h[c]=d)}}this.tree=i},e.VRule=n,e.VSheet=r};function uF(e,t,n,r){var i={},o=!1,s,l;for(s in t)l=t[s],typeof l!="object"&&(o=!0,i[s]=l);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(l=t[s],typeof l=="object")if(s[0]==="@")uF(e,l,n,s);else{var c=s.indexOf("&")>-1,d=n.split(",");if(c)for(var f=0;ft,sk=(e,t)=>({...e,...t});function rc(e,{init:t,effect:n,reduce:r=sk}={}){const i=I.createContext([e,ee.noop]);return[()=>I.useContext(i),({children:o})=>{const[s,l]=e1e(e),c=I.useCallback(f=>{const h=r(s(),f(s()));n==null||n({prev:s(),next:h}),l(h)},[s]),d=I.useMemo(()=>[s(),c],[s(),c]);return Kxe(async()=>{const f=await(t==null?void 0:t());f&&c(()=>f)}),C.jsx(i.Provider,{value:d,children:o})}]}function x1e(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[rQ,w1e]=rc([],{reduce:(e,t)=>[t,...e]}),iQ=I.createContext(()=>ee.noop);function vl(){return I.useContext(iQ)}function _1e({children:e}){const[t,n]=I.useState([]),[r,i]=I.useState(!1),[o,s]=I.useState(void 0),[,l]=rQ();I.useEffect(()=>{t.length&&!o?(s({...t[0]}),n(h=>h.slice(1)),i(!0)):t.length&&o&&r&&i(!1)},[t,o,r]);const c=I.useCallback((h,p,g={})=>(n(v=>[...v,{message:C.jsx(ZK,{primary:h,secondary:p}),key:new Date().getTime()}]),l(()=>({content:ee.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`})),g.error&&console.error(`${h}, ${p}`),()=>d()),[n]),d=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(iQ.Provider,{value:c,children:e}),C.jsx(cbe,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:d,TransitionProps:{onExited:f},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx(Bd,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:d,children:C.jsx(VK,{})})})},o==null?void 0:o.key)]})}/*! * OverlayScrollbars * Version: 2.3.2 * @@ -309,14 +309,14 @@ PERFORMANCE OF THIS SOFTWARE. * https://github.com/KingSora * * Released under the MIT license. - */function En(e,t){if(ck(e))for(let n=0;nt(e[n],n,e));return e}function Ji(e,t){const n=Zd(t);if($s(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?j8(e,o,t):t.reduce((s,l)=>(s[l]=j8(e,o,l),s),i)}return i}e&&En(Fs(t),i=>N1e(e,i,t[i]))}const Qa=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Q1=()=>typeof window<"u",sQ=Q1()&&Node.ELEMENT_NODE,{toString:w1e,hasOwnProperty:nL}=Object.prototype,Du=e=>e===void 0,lk=e=>e===null,_1e=e=>Du(e)||lk(e)?`${e}`:w1e.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),kd=e=>typeof e=="number",Zd=e=>typeof e=="string",q4=e=>typeof e=="boolean",hl=e=>typeof e=="function",$s=e=>Array.isArray(e),t1=e=>typeof e=="object"&&!$s(e)&&!lk(e),ck=e=>{const t=!!e&&e.length,n=kd(t)&&t>-1&&t%1==0;return $s(e)||!hl(e)&&n?t>0&&t1(e)?t-1 in e:!0:!1},dF=e=>{if(!e||!t1(e)||_1e(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=nL.call(e,n),s=i&&nL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Du(t)||nL.call(e,t)},gx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===sQ:!1},uk=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===sQ:!1},dk=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Zd(t)&&ck(t)?Array.prototype.push.apply(e,t):e.push(t),e),_p=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):En(e,r=>{Fn(n,r)}),n)},X4=e=>!!e&&e.length===0,ic=(e,t,n)=>{En(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},fk=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Fs=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||lk(e))&&!hl(e)&&(e={}),En(l,c=>{En(Fs(c),d=>{const f=c[d];if(e===f)return!0;const h=$s(f);if(f&&dF(f)){const p=e[d];let g=p;h&&!$s(p)?g=[]:!h&&!dF(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},Y4=e=>{for(const t in e)return!1;return!0},aQ=(e,t,n,r)=>{if(Du(r))return n?n[e]:t;n&&(Zd(r)||kd(r))&&(n[e]=r)},Eo=(e,t,n)=>{if(Du(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},lQ=(e,t)=>new Set((Eo(e,t)||"").split(" ")),Do=(e,t)=>{e&&e.removeAttribute(t)},ip=(e,t,n,r)=>{if(n){const i=lQ(e,t);i[r?"add":"delete"](n);const o=_p(i).join(" ").trim();Eo(e,t,o)}},S1e=(e,t,n)=>lQ(e,t).has(n),sl=(e,t)=>aQ("scrollLeft",0,e,t),vu=(e,t)=>aQ("scrollTop",0,e,t),fF=Q1()&&Element.prototype,cQ=(e,t)=>{const n=[],r=t?uk(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},E1e=(e,t)=>{const n=t?uk(t)&&t:document;return n?n.querySelector(e):null},$E=(e,t)=>uk(e)?(fF.matches||fF.msMatchesSelector).call(e,t):!1,K4=e=>e?_p(e.childNodes):[],Cu=e=>e&&e.parentElement,Lm=(e,t)=>{if(uk(e)){const n=fF.closest;if(n)return n.call(e,t);do{if($E(e,t))return e;e=Cu(e)}while(e)}},C1e=(e,t,n)=>{const r=Lm(e,t),i=e&&E1e(n,r),o=Lm(i,t)===r;return r&&i?r===e||i===e||o&&Lm(Lm(e,n),t)!==r:!1},Q4=(e,t,n)=>{if(n&&e){let r=t,i;ck(n)?(i=document.createDocumentFragment(),En(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)}},ra=(e,t)=>{Q4(e,null,t)},T1e=(e,t)=>{Q4(Cu(e),e,t)},$8=(e,t)=>{Q4(Cu(e),e&&e.nextSibling,t)},Kl=e=>{if(ck(e))En(_p(e),t=>Kl(t));else if(e){const t=Cu(e);t&&t.removeChild(e)}},op=e=>{const t=document.createElement("div");return e&&Eo(t,"class",e),t},uQ=e=>{const t=op();return t.innerHTML=e.trim(),En(K4(t),n=>Kl(n))},hF=e=>e.charAt(0).toUpperCase()+e.slice(1),k1e=()=>op().style,A1e=["-webkit-","-moz-","-o-","-ms-"],R1e=["WebKit","Moz","O","MS","webkit","moz","o","ms"],rL={},iL={},I1e=e=>{let t=iL[e];if(fk(iL,e))return t;const n=hF(e),r=k1e();return En(A1e,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,hF(o)+n].find(l=>r[l]!==void 0))}),iL[e]=t||""},rv=e=>{if(Q1()){let t=rL[e]||window[e];return fk(rL,e)||(En(R1e,n=>(t=t||window[n+hF(e)],!t)),rL[e]=t),t}},P1e=rv("MutationObserver"),F8=rv("IntersectionObserver"),Nm=rv("ResizeObserver"),dQ=rv("cancelAnimationFrame"),fQ=rv("requestAnimationFrame"),pF=rv("ScrollTimeline"),FE=Q1()&&window.setTimeout,mF=Q1()&&window.clearTimeout,O1e=/[^\x20\t\r\n\f]+/g,hQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Zd(t)){const l=t.match(O1e)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},J4=(e,t)=>{hQ(e,t,(n,r)=>n.remove(r))},Fd=(e,t)=>(hQ(e,t,(n,r)=>n.add(r)),J4.bind(0,e,t)),hk=(e,t,n,r)=>{if(e&&t){let i=!0;return En(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},pQ=(e,t)=>hk(e,t,["w","h"]),mQ=(e,t)=>hk(e,t,["x","y"]),M1e=(e,t)=>hk(e,t,["t","r","b","l"]),z8=(e,t,n)=>hk(e,t,["width","height"],n&&(r=>Math.round(r))),Es=()=>{},Nh=e=>{let t;const n=e?FE:fQ,r=e?mF:dQ;return[i=>{r(t),t=n(i,hl(e)?e():e)},()=>r(t)]},Z4=(e,t)=>{let n,r,i,o=Es;const{g:s,v:l,p:c}=t||{},d=function(v){o(),mF(n),n=r=void 0,o=Es,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Es&&d(f(i)||i)},p=function(){const v=_p(arguments),y=hl(s)?s():s;if(kd(y)&&y>=0){const _=hl(l)?l():l,b=kd(_)&&_>=0,x=y>0?FE:fQ,E=y>0?mF:dQ,R=f(v)||v,k=d.bind(0,R);o();const O=x(k,y);o=()=>E(O),b&&!n&&(n=FE(h,_)),r=i=R}else d(v)};return p.m=h,p},D1e={opacity:1,zIndex:1},n_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},L1e=(e,t)=>!D1e[e]&&kd(t)?`${t}px`:t,j8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),N1e=(e,t,n)=>{try{const{style:r}=e;Du(r[t])?r.setProperty(t,n):r[t]=L1e(t,n)}catch{}},Ag=e=>Ji(e,"direction")==="rtl",U8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Ji(e,[o,s,l,c]);return{t:n_(d[o],!0),r:n_(d[s],!0),b:n_(d[l],!0),l:n_(d[c],!0)}},Rg=(e,t)=>`translate${$s(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:H8}=Math,ez={w:0,h:0},n1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:ez,RS=e=>e?{w:e.clientWidth,h:e.clientHeight}:ez,zE=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:ez,jE=e=>{const t=parseFloat(Ji(e,"height"))||0,n=parseFloat(Ji(e,"width"))||0;return{w:n-H8(n),h:t-H8(t)}},Dl=e=>e.getBoundingClientRect(),Bm=e=>!!(e&&(e.height||e.width));let r_;const B1e=()=>{if(Du(r_)){r_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){r_=!0}}))}catch{}}return r_},gQ=e=>e.split(" "),$1e=(e,t,n,r)=>{En(gQ(t),i=>{e.removeEventListener(i,n,r)})},qr=(e,t,n,r)=>{var i;const o=B1e(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return En(gQ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,$1e.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),ic.bind(0,d)},vQ=e=>e.stopPropagation(),yQ=e=>e.preventDefault(),F1e={x:0,y:0},oL=e=>{const t=e?Dl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:F1e},W8=(e,t)=>{En($s(t)?t:[t],e)},tz=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);W8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Zd(o)){const d=t.get(o)||new Set;return t.set(o,d),W8(f=>{hl(f)&&d.add(f)},s),n.bind(0,o,s)}q4(s)&&s&&n();const l=Fs(o),c=[];return En(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),ic.bind(0,c)},i=(o,s)=>{const l=t.get(o);En(_p(l),c=>{s&&!X4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},G8=e=>JSON.stringify(e,(t,n)=>{if(hl(n))throw new Error;return n}),z1e={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"]}},bQ=(e,t)=>{const n={},r=Fs(t).concat(Fs(e));return En(r,i=>{const o=e[i],s=t[i];if(t1(o)&&t1(s))Tr(n[i]={},bQ(o,s)),Y4(n[i])&&delete n[i];else if(fk(t,i)&&s!==o){let l=!0;if($s(o)||$s(s))try{G8(o)===G8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},J1="data-overlayscrollbars",xQ="os-environment",wQ=`${xQ}-flexbox-glue`,j1e=`${wQ}-max`,_Q="os-scrollbar-hidden",sL=`${J1}-initialize`,Ja=J1,SQ=`${Ja}-overflow-x`,EQ=`${Ja}-overflow-y`,Jm="overflowVisible",U1e="scrollbarHidden",V8="scrollbarPressed",UE="updating",Zu=`${J1}-viewport`,aL="arrange",CQ="scrollbarHidden",Zm=Jm,gF=`${J1}-padding`,H1e=Zm,q8=`${J1}-content`,nz="os-size-observer",W1e=`${nz}-appear`,G1e=`${nz}-listener`,V1e="os-trinsic-observer",q1e="os-no-css-vars",X1e="os-theme-none",Qo="os-scrollbar",Y1e=`${Qo}-rtl`,K1e=`${Qo}-horizontal`,Q1e=`${Qo}-vertical`,TQ=`${Qo}-track`,rz=`${Qo}-handle`,J1e=`${Qo}-visible`,Z1e=`${Qo}-cornerless`,X8=`${Qo}-transitionless`,Y8=`${Qo}-interaction`,K8=`${Qo}-unusable`,vF=`${Qo}-auto-hide`,Q8=`${vF}-hidden`,J8=`${Qo}-wheel`,ewe=`${TQ}-interactive`,twe=`${rz}-interactive`,kQ={},Sp=()=>kQ,nwe=e=>{const t=[];return En($s(e)?e:[e],n=>{const r=Fs(n);En(r,i=>{Fn(t,kQ[i]=n[i])})}),t},rwe="__osOptionsValidationPlugin",iwe="__osSizeObserverPlugin",iz="__osScrollbarsHidingPlugin",owe="__osClickScrollPlugin";let lL;const Z8=(e,t,n,r)=>{ra(e,t);const i=RS(t),o=n1(t),s=jE(n);return r&&Kl(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},swe=e=>{let t=!1;const n=Fd(e,_Q);try{t=Ji(e,I1e("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},awe=(e,t)=>{const n="hidden";Ji(e,{overflowX:n,overflowY:n,direction:"rtl"}),sl(e,0);const r=oL(e),i=oL(t);sl(e,-999);const o=oL(t);return{i:r.x===i.x,n:i.x!==o.x}},lwe=(e,t)=>{const n=Fd(e,wQ),r=Dl(e),i=Dl(t),o=z8(i,r,!0),s=Fd(e,j1e),l=Dl(e),c=Dl(t),d=z8(c,l,!0);return n(),s(),o&&d},cwe=()=>{const{body:e}=document,n=uQ(`
`)[0],r=n.firstChild,[i,,o]=tz(),[s,l]=Qa({o:Z8(e,n,r),u:mQ},Z8.bind(0,e,n,r,!0)),[c]=l(),d=swe(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},z1e),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Ji(n,"zIndex")==="-1",B:!!pF,V:awe(n,r),Y:lwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=Z4(b=>o(b?"z":"r"),{g:33,v:99});if(Do(n,"style"),Kl(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=Sp()[iz];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Jo=()=>(lL||(lL=cwe()),lL),oz=(e,t)=>hl(t)?t.apply(0,e):t,uwe=(e,t,n,r)=>{const i=Du(r)?n:r;return oz(e,i)||t.apply(0,e)},AQ=(e,t,n,r)=>{const i=Du(r)?n:r,o=oz(e,i);return!!o&&(gx(o)?o:t.apply(0,e))},dwe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Jo(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Du(i)?c:i,h=(o.x||o.y)&&d,p=e&&(lk(f)?!s:f);return!!h||!!p},sz=new WeakMap,fwe=(e,t)=>{sz.set(e,t)},hwe=e=>{sz.delete(e)},RQ=e=>sz.get(e),eH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&fk(n,r)?n[r]:void 0,e):void 0,yF=(e,t,n)=>r=>[eH(e,r),n||eH(t,r)!==void 0],IQ=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},i_="tabindex",o_=op.bind(0,""),cL=e=>{ra(Cu(e),K4(e)),Kl(e)},pwe=e=>{const t=Jo(),{q:n,A:r}=t,i=Sp()[iz],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=gx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=$E(b,"textarea"),E=b.ownerDocument,A=E.documentElement,R=b===E.body,k=E.defaultView,O=uwe.bind(0,[b]),L=AQ.bind(0,[b]),N=oz.bind(0,[b]),H=O.bind(0,o_,d),W=L.bind(0,o_,f),z=H(S),D=z===b,F=D&&R,j=!D&&W(_),V=!D&&gx(z)&&z===j,G=V&&!!N(f),K=G?H():z,Y=G?j:W(),ie=F?A:V?K:z,ce=x?O(o_,l,v):b,ue=F?ie:ce,se=V?Y:j,Q=E.activeElement,ae=!D&&k.top===k&&Q===b,le={Z:b,J:ue,K:ie,tt:!D&&L(o_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?A:ie,et:F?E:ie,ct:k,rt:E,lt:x,it:R,ut:h,ft:D,dt:V,_t:(it,pt)=>S1e(ie,D?Ja:Zu,D?pt:it),ht:(it,pt,mt)=>ip(ie,D?Ja:Zu,D?pt:it,mt)},he=Fs(le).reduce((it,pt)=>{const mt=le[pt];return Fn(it,mt&&gx(mt)&&!Cu(mt)?mt:!1)},[]),pe=it=>it?dk(he,it)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Qe}=le,qe=[()=>{Do(ye,Ja),Do(ye,sL),Do(ve,sL),R&&(Do(A,Ja),Do(A,sL))}],at=x&&pe(ye);let Nt=x?ve:K4([be,me,xe,ye,ve].find(it=>pe(it)===!1));const Ie=F?ve:be||me;return[le,()=>{Eo(ye,Ja,D?"viewport":"host"),Eo(xe,gF,""),Eo(be,q8,""),D||Eo(me,Zu,"");const it=R&&!D?Fd(Cu(b),_Q):Es;if(at&&($8(ve,ye),Fn(qe,()=>{$8(ye,ve),Kl(ye)})),ra(Ie,Nt),ra(ye,xe),ra(xe||ye,!D&&me),ra(me,be),Fn(qe,()=>{it(),Do(xe,gF),Do(be,q8),Do(me,SQ),Do(me,EQ),Do(me,Zu),pe(be)&&cL(be),pe(me)&&cL(me),pe(xe)&&cL(xe)}),r&&!D&&(ip(me,Zu,CQ,!0),Fn(qe,Do.bind(0,me,Zu))),Qe&&(T1e(me,Qe),Fn(qe,Kl.bind(0,Qe))),ae){const pt=Eo(me,i_);Eo(me,i_,"-1"),me.focus();const mt=()=>pt?Eo(me,i_,pt):Do(me,i_),_e=qr(E,"pointerdown keydown",()=>{mt(),_e()});Fn(qe,[mt,_e])}else Q&&Q.focus&&Q.focus();Nt=0},ic.bind(0,qe)]},mwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Jo(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Ji(n,{height:s?"":"100%"}),{wt:c,bt:c}}},gwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Qa({u:M1e,o:U8()},U8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Jo(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[A,R]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!l&&(R||E||v);if(O){const L=!A||!o&&!y,N=g.r+g.l,H=g.t+g.b,W={marginRight:L&&!_?-N:0,marginBottom:L?-H:0,marginLeft:L&&_?-N:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${N}px)`:""},z={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Ji(o||s,W),Ji(s,z),r({tt:g,$t:!L,P:o?z:Tr({},W,z)})}return{xt:O}}},{max:bF}=Math,ed=bF.bind(0,0),PQ="visible",tH="hidden",vwe=42,s_={u:pQ,o:{w:0,h:0}},ywe={u:mQ,o:{x:tH,y:tH}},bwe=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:ed(e.w-t.w),h:ed(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},a_=e=>e.indexOf(PQ)===0,xwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Jo(),S=Sp()[iz],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Qa(s_,jE.bind(0,s)),[A,R]=Qa(s_,zE.bind(0,s)),[k,O]=Qa(s_),[L,N]=Qa(s_),[H]=Qa(ywe),W=(G,K)=>{if(Ji(s,{height:""}),K){const{$t:Y,tt:J}=n(),{Ct:ie,M:ce}=G,ue=jE(i),se=RS(i),Q=Ji(s,"boxSizing")==="content-box",ae=Y||Q?J.b+J.t:0,le=!(y.x&&Q);Ji(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(G,K)=>{const Y=!v&&!G?vwe:0,J=(pe,ve,ye)=>{const xe=Ji(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?Y:ye:0,ve&&!!Y]},[ie,ce,ue,se]=J("overflowX",y.x,p.x),[Q,ae,le,he]=J("overflowY",y.y,p.y);return{Ot:{x:ie,y:Q},Ct:{x:ce,y:ae},M:{x:ue,y:le},D:{x:se,y:he}}},D=(G,K,Y,J)=>{const ie=(ae,le)=>{const he=a_(ae),pe=le&&he&&ae.replace(`${PQ}-`,"")||"";return[le&&!he?ae:"",a_(pe)?"hidden":pe]},[ce,ue]=ie(Y.x,K.x),[se,Q]=ie(Y.y,K.y);return J.overflowX=ue&&se?ue:ce,J.overflowY=Q&&ce?Q:se,z(G,J)},F=(G,K,Y,J)=>{const{M:ie,D:ce}=G,{x:ue,y:se}=ce,{x:Q,y:ae}=ie,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,xe=le[pe],me=le.paddingBottom;J.width=`calc(100% + ${ae+ve*-1}px)`,J[he]=-ae+ve,J.marginBottom=-Q+ye,Y&&(J[pe]=xe+(se?ae:0),J.paddingBottom=me+(ue?Q:0))},[j,V]=S?S.L(_,g,s,l,n,z,F):[()=>_,()=>[Es]];return(G,K,Y)=>{const{wt:J,Tt:ie,bt:ce,xt:ue,vt:se,St:Q}=G,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),xe=he&&y.x&&y.y,me=!c&&!g&&(J||ce||ie||pe||se),be=a_(ve.x),Qe=a_(ve.y),qe=be||Qe;let at=E(Y),Nt=R(Y),Ie=O(Y),ze=N(Y),it;if(pe&&v&&d(CQ,U1e,!xe),me&&(it=z(xe),W(it,ae)),J||ue||ce||Q||pe){qe&&d(Zm,Jm,!1);const[Re,Ue]=V(xe,le,it),[yt,Wt]=at=x(Y),[pn,$r]=Nt=A(Y),Or=RS(s);let Mr=pn,Fr=Or;Re(),($r||Wt||pe)&&Ue&&!xe&&j(Ue,pn,yt,le)&&(Fr=RS(s),Mr=zE(s));const Qr={w:ed(bF(pn.w,Mr.w)+yt.w),h:ed(bF(pn.h,Mr.h)+yt.h)},Zo={w:ed((b?h.innerWidth:Fr.w+ed(Or.w-pn.w))+yt.w),h:ed((b?h.innerHeight+yt.h:Fr.h+ed(Or.h-pn.h))+yt.h)};ze=L(Zo),Ie=k(bwe(Qr,Zo),Y)}const[pt,mt]=ze,[_e,je]=Ie,[Ye,$e]=Nt,[Ne,Rt]=at,ct={x:_e.w>0,y:_e.h>0},Ae=be&&Qe&&(ct.x||ct.y)||be&&ct.x&&!ct.y||Qe&&ct.y&&!ct.x;if(ue||Q||Rt||$e||mt||je||ye||pe||me){const Re={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ue=D(xe,ct,ve,Re),yt=j(Ue,Ye,Ne,le);c||F(Ue,le,yt,Re),me&&W(Ue,ae),c?(Eo(i,SQ,Re.overflowX),Eo(i,EQ,Re.overflowY)):Ji(s,Re)}ip(i,Ja,Jm,Ae),ip(o,gF,H1e,Ae),c||ip(s,Zu,Zm,qe);const[ot,$t]=H(z(xe).Ot);return r({Ot:ot,zt:{x:pt.w,y:pt.h},Et:{x:_e.w,y:_e.h},At:ct}),{It:$t,Ht:mt,Lt:je}}},nH=(e,t,n)=>{const r={},i=t||{},o=Fs(e).concat(Fs(i));return En(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},wwe=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Jo(),d=!s&&(l.x||l.y),f=[mwe(e,t),gwe(e,t),xwe(e,t)];return(h,p,g)=>{const v=nH(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&sl(r),_=y&&vu(r);i("",UE,!0);let b=v;return En(f,x=>{b=nH(b,x(b,h,!!g)||{},g)}),sl(r,S),vu(r,_),i("",UE),o||(sl(n,0),vu(n,0)),b}},_we=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):cQ(h,e));g&&g.length&&p&&Zd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);En(c,d=>En(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=qr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else ic(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},rH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=Z4(()=>i&&n(!0),{g:33,v:99}),[p,g]=_we(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const A=d||Es,R=f||Es,k=new Set,O=new Set;let L=!1,N=!1;if(En(x,H=>{const{attributeName:W,target:z,type:D,oldValue:F,addedNodes:j,removedNodes:V}=H,G=D==="attributes",K=D==="childList",Y=e===z,J=G&&Zd(W)?Eo(z,W):0,ie=J!==0&&F!==J,ce=dk(y,W)>-1&&ie;if(t&&(K||!Y)){const ue=!G,se=G&&ie,Q=se&&c&&$E(z,c),le=(Q?!A(z,W,F,J):ue||se)&&!R(H,!!Q,e,r);En(j,he=>k.add(he)),En(V,he=>k.add(he)),N=N||le}!t&&Y&&ie&&!A(z,W,F,J)&&(O.add(W),L=L||ce)}),k.size>0&&g(H=>_p(k).reduce((W,z)=>(Fn(W,cQ(H,z)),$E(z,H)?Fn(W,z):W),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[_p(O),L];return!E&&n.apply(0,H),H}},b=new P1e(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!X4(x)&&_(x,!0)}}]},l_=3333333,OQ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=Sp()[iwe],{V:s}=Jo(),c=uQ(`
`)[0],d=c.firstChild,f=Ag.bind(0,e),[h]=Qa({o:!1,_:!0,u:(v,y)=>!(!v||!Bm(v)&&Bm(y))}),p=v=>{const y=$s(v)&&v.length>0&&t1(v[0]),S=!y&&q4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),R=Bm(E),k=Bm(A);_=!A&&!!k||!R,b=!k&&R,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Ag(c);sl(c,E?s.n?-l_:s.i?0:l_:l_),vu(c,l_)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{ic(g),Kl(c)},()=>{let v=i&&p;if(Nm){const y=new Nm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Qa({o:void 0},f);Fn(g,qr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(J4(d,"ltr rtl"),Fd(d,b?"rtl":"ltr"),p([!!b,x,E])),vQ(S)}))}v&&(Fd(c,W1e),Fn(g,qr(c,"animationstart",v,{C:!!Nm}))),(Nm||o)&&ra(e,c)}]},Swe=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,Ewe=(e,t)=>{let n;const r=op(V1e),i=[],[o]=Qa({o:!1}),s=(c,d)=>{if(c){const f=o(Swe(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{ic(i),Kl(r)},()=>{if(F8)n=new F8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=n1(r);s(h)},[d,f]=OQ(r,c);Fn(i,d),f(),c()}ra(e,r)},()=>n&&l(n.takeRecords(),!0)]},iH=`[${Ja}]`,Cwe=`[${Zu}]`,uL=["tabindex"],oH=["wrap","cols","rows"],dL=["id","class","style","open"],Twe=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Jo(),[v]=Qa({u:pQ,o:{w:0,h:0}},()=>{const F=h(Zm,Jm),j=h(aL,""),V=j&&sl(l),G=j&&vu(l);p(Zm,Jm),p(aL,""),p("",UE,!0);const K=zE(c),Y=zE(l),J=jE(l);return p(Zm,Jm,F),p(aL,"",j),p("",UE),sl(l,V),vu(l,G),{w:Y.w+K.w+J.w,h:Y.h+K.h+J.h}}),y=d?oH:dL.concat(oH),S=Z4(n,{g:()=>r,v:()=>i,p(F,j){const[V]=F,[G]=j;return[Fs(V).concat(Fs(G)).reduce((K,Y)=>(K[Y]=V[Y]||G[Y],K),{})]}}),_=F=>{En(F||uL,j=>{if(dk(uL,j)>-1){const V=Eo(s,j);Zd(V)?Eo(l,j,V):Do(l,j)}})},b=(F,j)=>{const[V,G]=F,K={vt:G};return t({gt:V}),!j&&n(K),K},x=({wt:F,jt:j,Pt:V})=>{const G=!F||V?n:S;let K=!1;if(j){const[Y,J]=j;K=J,t({yt:Y})}G({wt:F,Pt:V,St:K})},E=(F,j)=>{const[,V]=v(),G={bt:V};return V&&!j&&(F?n:S)(G),G},A=(F,j,V)=>{const G={Tt:j};return j?!V&&S(G):f||_(F),G},[R,k,O]=c||!g?Ewe(s,b):[Es,Es,Es],[L,N]=f?[Es,Es]:OQ(s,x,{Pt:!0,Yt:!0}),[H,W]=rH(s,!1,A,{Dt:dL,Mt:dL.concat(uL)});let z;const D=f&&Nm&&new Nm(F=>{const j=F[F.length-1].contentRect,V=Bm(j),K=!Bm(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{R(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),N(),k()},()=>{const F={},j=W(),V=O(),G=o&&o[1]();return j&&Tr(F,A.apply(0,Fn(j,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),G&&Tr(F,E.apply(0,Fn(G,!0))),F},F=>{const[j]=F("update.ignoreMutation"),[V,G]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[J,ie]=F("update.debounce"),ce=Y||G,ue=se=>hl(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=rH(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:iH,Vt:(se,Q)=>{const{target:ae,attributeName:le}=se;return(!Q&&le&&!f?C1e(ae,iH,Cwe):!1)||!!Lm(ae,`.${Qo}`)||!!ue(se)}})),ie)if(S.m(),$s(J)){const se=J[0],Q=J[1];r=kd(se)&&se,i=kd(Q)&&Q}else kd(J)?(r=J,i=!1):(r=!1,i=!1)}]},sH={x:0,y:0},kwe=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:sH,Et:sH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Ag(e.J)}),Awe=(e,t)=>{const n=yF(t,{}),[r,i,o]=tz(),[s,l,c]=pwe(e),d=IQ(kwe(s)),[f,h]=d,p=wwe(s,d),g=(x,E,A)=>{const k=Fs(x).some(O=>!!x[O])||!Y4(E)||A;return k&&o("u",[x,E,A]),k},[v,y,S,_]=Twe(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:R}=s,k=R?A.documentElement:x,O=sl(k),L=vu(k);y(),l(),sl(E,O),vu(E,L)},b.Ft=s,[(x,E)=>{const A=yF(t,x,E);return _(A),g(p(A,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:aH}=Math,Rwe=e=>{const{width:t,height:n}=Dl(e),{w:r,h:i}=n1(e);return{x:aH(t)/r||1,y:aH(n)/i||1}},Iwe=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},lH="pointerup pointerleave pointercancel lostpointercapture",Pwe=(e,t)=>qr(e,"mousedown",qr.bind(0,t,"click",vQ,{C:!0,$:!0}),{$:!0}),Owe=(e,t,n,r,i,o,s)=>{const{V:l}=Jo(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:A}=o(),R=n1(d)[y]-n1(c)[y],O=x*E/R*A[S],N=Ag(f)&&s?l.n||l.i?1:-1:1;i[h]=b+O*N};return qr(d,"pointerdown",b=>{const x=Lm(b.target,`.${rz}`)===c,E=x?c:d;if(ip(t,Ja,V8,!0),Iwe(b,e,x)){const A=!x&&b.shiftKey,R=()=>Dl(c),k=()=>Dl(d),O=(K,Y)=>(K||R())[v]-(Y||k())[v],L=_(i[h]||0,1/Rwe(i)[S]),N=b[p],H=R(),W=k(),z=H[g],D=O(H,W)+z/2,F=N-W[v],j=x?0:F-D,V=K=>{ic(G),E.releasePointerCapture(K.pointerId)},G=[ip.bind(0,t,Ja,V8),qr(n,lH,V),qr(n,"selectstart",K=>yQ(K),{S:!1}),qr(d,lH,V),qr(d,"pointermove",K=>{const Y=K[p]-N;(x||A)&&L(j+Y)})];if(A)L(j);else if(!x){const K=Sp()[owe];K&&Fn(G,K.O(L,O,j,z,F))}E.setPointerCapture(b.pointerId)}})},Mwe=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=Nh(333),p=!!s.scrollBy;let g=!0;return ic.bind(0,[qr(d,"pointerenter",()=>{r(Y8,!0)}),qr(d,"pointerleave pointercancel",()=>{r(Y8)}),qr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&Cu(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(J8,!0),f(()=>{g=!0,r(J8)}),yQ(v)},{S:!1,$:!0}),Pwe(d,i),Owe(e,o,i,n,s,t,c),h])},{min:HE,max:xF,round:Dwe}=Math,MQ=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return xF(0,HE(1,f/(f+h)))}const i=n?"width":"height",o=Dl(e)[i],s=Dl(t)[i];return xF(0,HE(1,o/s))},Lwe=(e,t,n,r,i,o)=>{const{V:s}=Jo(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=Dwe(d[l]),h=HE(f,xF(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=HE(1,(p?g:h)/f),S=MQ(e,t,o);return 1/S*(1-S)*y},DQ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),Nwe=(e,t)=>({transform:[Rg("0%",t),Rg(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),Bwe=e=>`${Math.max(0,e-.5)}px`,cH=(e,t,n,r)=>DQ(e,t,{transform:[Rg("0px",r),Rg(Bwe(n),r)]},"add"),uH=(e,t)=>pF?new pF({source:e,axis:t}):null,$we=(e,t,n)=>{const{q:r,H:i}=Jo(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=uH(p,"x"),x=uH(p,"y"),E=AQ([c,d,f],()=>v&&g?c:d,s,S),A=se=>v&&!g&&Cu(se)===f,R=se=>{_.forEach((Q,ae)=>{(se?dk($s(se)?se:[se],ae)>-1:!0)&&((Q||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},k=(se,Q,ae)=>{const le=ae?Fd:J4;En(se,he=>{le(he.Ut,Q)})},O=(se,Q)=>{En(se,ae=>{const[le,he]=Q(ae);Ji(le,he)})},L=(se,Q,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(MQ(he,pe,ae,Q)*100).toFixed(3)}%`}]})},N=(se,Q,ae)=>{!x&&!x&&O(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=Lwe(he,pe,p,Q,Ag(ve),ae);return[he,{transform:ye===ye?Rg(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:Q}=se,ae=A(Q)&&Q;return[ae,{transform:ae?Rg([`${sl(p)}px`,`${vu(p)}px`]):""}]},W=[],z=[],D=[],F=(se,Q,ae)=>{const le=q4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&k(z,se,Q),pe&&k(D,se,Q)},j=se=>{L(z,se,!0),L(D,se)},V=se=>{N(z,se,!0),N(D,se)},G=()=>{const se=(Q,{Ut:ae,Gt:le})=>{R(le),_.set(le,[DQ(le,Q?b:x,Nwe(Q&&Ag(ae),Q))])};z.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&O(z,H),v&&O(D,H))},Y=({Et:se})=>{D.concat(z).forEach(({Ut:Q})=>{R(Q),A(Q)&&_.set(Q,[cH(Q,b,se.x,!0),cH(Q,x,se.y)])})},J=se=>{const Q=se?K1e:Q1e,ae=se?z:D,le=X4(ae)?X8:"",he=op(`${Qo} ${Q} ${le}`),pe=op(TQ),ve=op(rz),ye={Ut:he,Xt:pe,Gt:ve};return i||Fd(he,q1e),ra(he,pe),ra(pe,ve),Fn(ae,ye),Fn(W,[Kl.bind(0,he),R,n(ye,F,l,d,p,se?b:x,se)]),ye},ie=J.bind(0,!0),ce=J.bind(0,!1),ue=()=>{ra(E,z[0].Ut),ra(E,D[0].Ut),FE(()=>{F(X8)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:G,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:z,en:ie,cn:O.bind(0,z)},rn:{B:x,sn:D,en:ce,cn:O.bind(0,D)}},ue,ic.bind(0,W)]},fL=e=>e.pointerType==="mouse",Fwe=(e,t,n,r)=>{let i,o,s,l,c,d=Es,f=0;const h=IQ({}),[p]=h,[g,v]=Nh(),[y,S]=Nh(),[_,b]=Nh(100),[x,E]=Nh(100),[A,R]=Nh(100),[k,O]=Nh(()=>f),[L,N,H]=$we(e,n.Ft,Mwe(t,n)),{J:W,et:z,it:D}=n.Ft,{tn:F,Wt:j,Zt:V,Jt:G,Kt:K,Qt:Y}=L,J=Q=>{F(vF,Q,!0),F(vF,Q,!1)},ie=(Q,ae)=>{if(O(),Q)F(Q8);else{const le=()=>F(Q8,!0);f>0&&!ae?k(le):le()}},ce=Q=>{fL(Q)&&(l=o,l&&ie(!0))},ue=[b,O,E,R,S,v,H,qr(W,"pointerover",ce,{C:!0}),qr(W,"pointerenter",ce),qr(W,"pointerleave",Q=>{fL(Q)&&(l=!1,o&&ie(!1))}),qr(W,"pointermove",Q=>{fL(Q)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),qr(z,"scroll",Q=>{y(()=>{V(n()),s&&ie(!0),_(()=>{s&&!l&&ie(!1)})}),r(Q),Y()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(Q,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:me}=Jo(),be=yF(t,Q,ae),Qe=n(),{Et:qe,Ot:at,yt:Nt,At:Ie}=Qe,[ze,it]=be("showNativeOverlaidScrollbars"),[pt,mt]=be("scrollbars.theme"),[_e,je]=be("scrollbars.visibility"),[Ye,$e]=be("scrollbars.autoHide"),[Ne,Rt]=be("scrollbars.autoHideSuspend"),[ct]=be("scrollbars.autoHideDelay"),[Ae,ot]=be("scrollbars.dragScroll"),[$t,Re]=be("scrollbars.clickScroll"),Ue=xe&&!ae,yt=Ie.x||Ie.y,Wt=he||pe||ye,pn=ve||je,$r=ze&&me.x&&me.y,Or=(Mr,Fr)=>{const Qr=_e==="visible"||_e==="auto"&&Mr==="scroll";return F(J1e,Qr,Fr),Qr};if(f=ct,Ue&&(Ne&&yt?(J(!1),d(),A(()=>{d=qr(z,"scroll",J.bind(0,!0),{C:!0})})):J(!0)),it&&F(X1e,$r),mt&&(F(c),F(pt,!0),c=pt),Rt&&!Ne&&J(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",ie(!s,!0)),ot&&F(twe,Ae),Re&&F(ewe,$t),pn){const Mr=Or(at.x,!0),Fr=Or(at.y,!1);F(Z1e,!(Mr&&Fr))}Wt&&(j(Qe),V(Qe),G(Qe),K(Qe),Y(),F(K8,!qe.x,!0),F(K8,!qe.y,!1),F(Y1e,Nt&&!D))},se,()=>{ic(ue),d()}]},LQ=(e,t,n)=>{hl(e)&&e(t||void 0,n||void 0)},hd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Jo(),l=Sp(),c=gx(e),d=c?e:e.target,f=RQ(d);if(t&&!f){let h=!1;const p=z=>{const D=Sp()[rwe],F=D&&D.O;return F?F(z,!0):z},g=Tr({},r(),p(t)),[v,y,S]=tz(n),[_,b,x]=Awe(e,g),[E,A,R]=Fwe(e,g,b,z=>S("scroll",[W,z])),k=(z,D)=>_(z,!!D),O=k.bind(0,{},!0),L=o(O),N=s(O),H=z=>{hwe(d),L(),N(),R(),x(),h=!0,S("destroyed",[W,!!z]),y()},W={options(z,D){if(z){const F=D?r():{},j=bQ(g,Tr(F,p(z)));Y4(j)||(Tr(g,j),k(j))}return Tr({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:F,At:j,tt:V,$t:G,yt:K}=b();return Tr({},{overflowEdge:z,overflowAmount:D,overflowStyle:F,hasOverflow:j,padding:V,paddingAbsolute:G,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:F,K:j,nt:V,st:G,et:K}=b.Ft,{nn:Y,rn:J}=A.Ft,ie=ue=>{const{Gt:se,Xt:Q,Ut:ae}=ue;return{scrollbar:ae,track:Q,handle:se}},ce=ue=>{const{sn:se,en:Q}=ue,ae=ie(se[0]);return Tr({},ae,{clone:()=>{const le=ie(Q());return E({},!0,{}),le}})};return Tr({},{target:z,host:D,padding:F||j,viewport:j,content:V||j,scrollOffsetElement:G,scrollEventElement:K,scrollbarHorizontal:ce(Y),scrollbarVertical:ce(J)})},update:z=>k({},z),destroy:H.bind(0)};return b.Nt((z,D,F)=>{E(D,F,z)}),fwe(d,W),En(Fs(l),z=>LQ(l[z],0,W)),dwe(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),W):(b.qt(),A.qt(),S("initialized",[W]),b.Nt((z,D,F)=>{const{wt:j,St:V,vt:G,Ht:K,Lt:Y,It:J,bt:ie,Tt:ce}=z;S("updated",[W,{updateHints:{sizeChanged:j,directionChanged:V,heightIntrinsicChanged:G,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:J,contentMutation:ie,hostMutation:ce},changedOptions:D,force:F}])}),W.update(!0),W)}return f};hd.plugin=e=>{En(nwe(e),t=>LQ(t,hd))};hd.valid=e=>{const t=e&&e.elements,n=hl(t)&&t();return dF(n)&&!!RQ(n.target)};hd.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Jo();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const zwe=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},NQ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=I.useMemo(zwe,[]),s=I.useRef(null),l=I.useRef(r),c=I.useRef(t),d=I.useRef(n);return I.useEffect(()=>{l.current=r},[r]),I.useEffect(()=>{const{current:f}=s;c.current=t,hd.valid(f)&&f.options(t||{},!0)},[t]),I.useEffect(()=>{const{current:f}=s;d.current=n,hd.valid(f)&&f.on(n||{},!0)},[n]),I.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),I.useMemo(()=>[f=>{const h=s.current;if(hd.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=hd(f,g,v);p?i(y,p):y()},()=>s.current],[])},jwe=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=I.useRef(null),f=I.useRef(null),[h,p]=I.useState(!1),[g,v]=NQ({options:r,events:i,defer:o});return I.useEffect(()=>{p(!0)},[]),I.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),I.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},Uwe=I.forwardRef(jwe),iv=I.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=In(),c=kg({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=I.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(Uwe,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var BQ={exports:{}},Qn={};/** @license React v17.0.2 + */function En(e,t){if(lk(e))for(let n=0;nt(e[n],n,e));return e}function Ji(e,t){const n=Zd(t);if($s(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?z8(e,o,t):t.reduce((s,l)=>(s[l]=z8(e,o,l),s),i)}return i}e&&En(Fs(t),i=>$1e(e,i,t[i]))}const Qa=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const l=(f,h)=>{const p=o,g=f,v=h||(r?!r(p,g):p!==g);return(v||i)&&(o=g,s=p),[o,v,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},Q1=()=>typeof window<"u",oQ=Q1()&&Node.ELEMENT_NODE,{toString:S1e,hasOwnProperty:nL}=Object.prototype,Du=e=>e===void 0,ak=e=>e===null,E1e=e=>Du(e)||ak(e)?`${e}`:S1e.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),kd=e=>typeof e=="number",Zd=e=>typeof e=="string",V4=e=>typeof e=="boolean",pl=e=>typeof e=="function",$s=e=>Array.isArray(e),t1=e=>typeof e=="object"&&!$s(e)&&!ak(e),lk=e=>{const t=!!e&&e.length,n=kd(t)&&t>-1&&t%1==0;return $s(e)||!pl(e)&&n?t>0&&t1(e)?t-1 in e:!0:!1},dF=e=>{if(!e||!t1(e)||E1e(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=nL.call(e,n),s=i&&nL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Du(t)||nL.call(e,t)},gx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===oQ:!1},ck=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===oQ:!1},uk=(e,t,n)=>e.indexOf(t,n),Fn=(e,t,n)=>(!n&&!Zd(t)&&lk(t)?Array.prototype.push.apply(e,t):e.push(t),e),_p=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Fn(n,r)}):En(e,r=>{Fn(n,r)}),n)},q4=e=>!!e&&e.length===0,ic=(e,t,n)=>{En(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},dk=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Fs=e=>e?Object.keys(e):[],Tr=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||ak(e))&&!pl(e)&&(e={}),En(l,c=>{En(Fs(c),d=>{const f=c[d];if(e===f)return!0;const h=$s(f);if(f&&dF(f)){const p=e[d];let g=p;h&&!$s(p)?g=[]:!h&&!dF(p)&&(g={}),e[d]=Tr(g,f)}else e[d]=h?f.slice():f})}),e},X4=e=>{for(const t in e)return!1;return!0},sQ=(e,t,n,r)=>{if(Du(r))return n?n[e]:t;n&&(Zd(r)||kd(r))&&(n[e]=r)},Eo=(e,t,n)=>{if(Du(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},aQ=(e,t)=>new Set((Eo(e,t)||"").split(" ")),Do=(e,t)=>{e&&e.removeAttribute(t)},ip=(e,t,n,r)=>{if(n){const i=aQ(e,t);i[r?"add":"delete"](n);const o=_p(i).join(" ").trim();Eo(e,t,o)}},C1e=(e,t,n)=>aQ(e,t).has(n),al=(e,t)=>sQ("scrollLeft",0,e,t),vu=(e,t)=>sQ("scrollTop",0,e,t),fF=Q1()&&Element.prototype,lQ=(e,t)=>{const n=[],r=t?ck(t)&&t:document;return r?Fn(n,r.querySelectorAll(e)):n},T1e=(e,t)=>{const n=t?ck(t)&&t:document;return n?n.querySelector(e):null},BE=(e,t)=>ck(e)?(fF.matches||fF.msMatchesSelector).call(e,t):!1,Y4=e=>e?_p(e.childNodes):[],Cu=e=>e&&e.parentElement,Lm=(e,t)=>{if(ck(e)){const n=fF.closest;if(n)return n.call(e,t);do{if(BE(e,t))return e;e=Cu(e)}while(e)}},k1e=(e,t,n)=>{const r=Lm(e,t),i=e&&T1e(n,r),o=Lm(i,t)===r;return r&&i?r===e||i===e||o&&Lm(Lm(e,n),t)!==r:!1},K4=(e,t,n)=>{if(n&&e){let r=t,i;lk(n)?(i=document.createDocumentFragment(),En(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)}},ra=(e,t)=>{K4(e,null,t)},A1e=(e,t)=>{K4(Cu(e),e,t)},B8=(e,t)=>{K4(Cu(e),e&&e.nextSibling,t)},Ql=e=>{if(lk(e))En(_p(e),t=>Ql(t));else if(e){const t=Cu(e);t&&t.removeChild(e)}},op=e=>{const t=document.createElement("div");return e&&Eo(t,"class",e),t},cQ=e=>{const t=op();return t.innerHTML=e.trim(),En(Y4(t),n=>Ql(n))},hF=e=>e.charAt(0).toUpperCase()+e.slice(1),R1e=()=>op().style,I1e=["-webkit-","-moz-","-o-","-ms-"],P1e=["WebKit","Moz","O","MS","webkit","moz","o","ms"],rL={},iL={},O1e=e=>{let t=iL[e];if(dk(iL,e))return t;const n=hF(e),r=R1e();return En(I1e,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,hF(o)+n].find(l=>r[l]!==void 0))}),iL[e]=t||""},rv=e=>{if(Q1()){let t=rL[e]||window[e];return dk(rL,e)||(En(P1e,n=>(t=t||window[n+hF(e)],!t)),rL[e]=t),t}},M1e=rv("MutationObserver"),$8=rv("IntersectionObserver"),Nm=rv("ResizeObserver"),uQ=rv("cancelAnimationFrame"),dQ=rv("requestAnimationFrame"),pF=rv("ScrollTimeline"),$E=Q1()&&window.setTimeout,mF=Q1()&&window.clearTimeout,D1e=/[^\x20\t\r\n\f]+/g,fQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Zd(t)){const l=t.match(D1e)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},Q4=(e,t)=>{fQ(e,t,(n,r)=>n.remove(r))},Fd=(e,t)=>(fQ(e,t,(n,r)=>n.add(r)),Q4.bind(0,e,t)),fk=(e,t,n,r)=>{if(e&&t){let i=!0;return En(n,o=>{const s=r?r(e[o]):e[o],l=r?r(t[o]):t[o];s!==l&&(i=!1)}),i}return!1},hQ=(e,t)=>fk(e,t,["w","h"]),pQ=(e,t)=>fk(e,t,["x","y"]),L1e=(e,t)=>fk(e,t,["t","r","b","l"]),F8=(e,t,n)=>fk(e,t,["width","height"],n&&(r=>Math.round(r))),Es=()=>{},Nh=e=>{let t;const n=e?$E:dQ,r=e?mF:uQ;return[i=>{r(t),t=n(i,pl(e)?e():e)},()=>r(t)]},J4=(e,t)=>{let n,r,i,o=Es;const{g:s,v:l,p:c}=t||{},d=function(v){o(),mF(n),n=r=void 0,o=Es,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Es&&d(f(i)||i)},p=function(){const v=_p(arguments),y=pl(s)?s():s;if(kd(y)&&y>=0){const _=pl(l)?l():l,b=kd(_)&&_>=0,x=y>0?$E:dQ,E=y>0?mF:uQ,R=f(v)||v,k=d.bind(0,R);o();const O=x(k,y);o=()=>E(O),b&&!n&&(n=$E(h,_)),r=i=R}else d(v)};return p.m=h,p},N1e={opacity:1,zIndex:1},n_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},B1e=(e,t)=>!N1e[e]&&kd(t)?`${t}px`:t,z8=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),$1e=(e,t,n)=>{try{const{style:r}=e;Du(r[t])?r.setProperty(t,n):r[t]=B1e(t,n)}catch{}},Ag=e=>Ji(e,"direction")==="rtl",j8=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Ji(e,[o,s,l,c]);return{t:n_(d[o],!0),r:n_(d[s],!0),b:n_(d[l],!0),l:n_(d[c],!0)}},Rg=(e,t)=>`translate${$s(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:U8}=Math,Z4={w:0,h:0},n1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:Z4,AS=e=>e?{w:e.clientWidth,h:e.clientHeight}:Z4,FE=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:Z4,zE=e=>{const t=parseFloat(Ji(e,"height"))||0,n=parseFloat(Ji(e,"width"))||0;return{w:n-U8(n),h:t-U8(t)}},Nl=e=>e.getBoundingClientRect(),Bm=e=>!!(e&&(e.height||e.width));let r_;const F1e=()=>{if(Du(r_)){r_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){r_=!0}}))}catch{}}return r_},mQ=e=>e.split(" "),z1e=(e,t,n,r)=>{En(mQ(t),i=>{e.removeEventListener(i,n,r)})},qr=(e,t,n,r)=>{var i;const o=F1e(),s=(i=o&&r&&r.S)!=null?i:o,l=r&&r.$||!1,c=r&&r.C||!1,d=[],f=o?{passive:s,capture:l}:l;return En(mQ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;Fn(d,z1e.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),ic.bind(0,d)},gQ=e=>e.stopPropagation(),vQ=e=>e.preventDefault(),j1e={x:0,y:0},oL=e=>{const t=e?Nl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:j1e},H8=(e,t)=>{En($s(t)?t:[t],e)},ez=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);H8(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(o,s)=>{if(Zd(o)){const d=t.get(o)||new Set;return t.set(o,d),H8(f=>{pl(f)&&d.add(f)},s),n.bind(0,o,s)}V4(s)&&s&&n();const l=Fs(o),c=[];return En(l,d=>{const f=o[d];f&&Fn(c,r(d,f))}),ic.bind(0,c)},i=(o,s)=>{const l=t.get(o);En(_p(l),c=>{s&&!q4(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},W8=e=>JSON.stringify(e,(t,n)=>{if(pl(n))throw new Error;return n}),U1e={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"]}},yQ=(e,t)=>{const n={},r=Fs(t).concat(Fs(e));return En(r,i=>{const o=e[i],s=t[i];if(t1(o)&&t1(s))Tr(n[i]={},yQ(o,s)),X4(n[i])&&delete n[i];else if(dk(t,i)&&s!==o){let l=!0;if($s(o)||$s(s))try{W8(o)===W8(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},J1="data-overlayscrollbars",bQ="os-environment",xQ=`${bQ}-flexbox-glue`,H1e=`${xQ}-max`,wQ="os-scrollbar-hidden",sL=`${J1}-initialize`,Ja=J1,_Q=`${Ja}-overflow-x`,SQ=`${Ja}-overflow-y`,Jm="overflowVisible",W1e="scrollbarHidden",G8="scrollbarPressed",jE="updating",Zu=`${J1}-viewport`,aL="arrange",EQ="scrollbarHidden",Zm=Jm,gF=`${J1}-padding`,G1e=Zm,V8=`${J1}-content`,tz="os-size-observer",V1e=`${tz}-appear`,q1e=`${tz}-listener`,X1e="os-trinsic-observer",Y1e="os-no-css-vars",K1e="os-theme-none",Qo="os-scrollbar",Q1e=`${Qo}-rtl`,J1e=`${Qo}-horizontal`,Z1e=`${Qo}-vertical`,CQ=`${Qo}-track`,nz=`${Qo}-handle`,ewe=`${Qo}-visible`,twe=`${Qo}-cornerless`,q8=`${Qo}-transitionless`,X8=`${Qo}-interaction`,Y8=`${Qo}-unusable`,vF=`${Qo}-auto-hide`,K8=`${vF}-hidden`,Q8=`${Qo}-wheel`,nwe=`${CQ}-interactive`,rwe=`${nz}-interactive`,TQ={},Sp=()=>TQ,iwe=e=>{const t=[];return En($s(e)?e:[e],n=>{const r=Fs(n);En(r,i=>{Fn(t,TQ[i]=n[i])})}),t},owe="__osOptionsValidationPlugin",swe="__osSizeObserverPlugin",rz="__osScrollbarsHidingPlugin",awe="__osClickScrollPlugin";let lL;const J8=(e,t,n,r)=>{ra(e,t);const i=AS(t),o=n1(t),s=zE(n);return r&&Ql(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},lwe=e=>{let t=!1;const n=Fd(e,wQ);try{t=Ji(e,O1e("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},cwe=(e,t)=>{const n="hidden";Ji(e,{overflowX:n,overflowY:n,direction:"rtl"}),al(e,0);const r=oL(e),i=oL(t);al(e,-999);const o=oL(t);return{i:r.x===i.x,n:i.x!==o.x}},uwe=(e,t)=>{const n=Fd(e,xQ),r=Nl(e),i=Nl(t),o=F8(i,r,!0),s=Fd(e,H1e),l=Nl(e),c=Nl(t),d=F8(c,l,!0);return n(),s(),o&&d},dwe=()=>{const{body:e}=document,n=cQ(`
`)[0],r=n.firstChild,[i,,o]=ez(),[s,l]=Qa({o:J8(e,n,r),u:pQ},J8.bind(0,e,n,r,!0)),[c]=l(),d=lwe(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!d,viewport:b=>d&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Tr({},U1e),g=Tr.bind(0,{},p),v=Tr.bind(0,{},h),y={k:c,I:f,A:d,H:Ji(n,"zIndex")==="-1",B:!!pF,V:cwe(n,r),Y:uwe(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Tr(h,b)&&v(),G:g,X:b=>Tr(p,b)&&g(),U:Tr({},h),W:Tr({},p)},S=window.addEventListener,_=J4(b=>o(b?"z":"r"),{g:33,v:99});if(Do(n,"style"),Ql(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=Sp()[rz];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},Jo=()=>(lL||(lL=dwe()),lL),iz=(e,t)=>pl(t)?t.apply(0,e):t,fwe=(e,t,n,r)=>{const i=Du(r)?n:r;return iz(e,i)||t.apply(0,e)},kQ=(e,t,n,r)=>{const i=Du(r)?n:r,o=iz(e,i);return!!o&&(gx(o)?o:t.apply(0,e))},hwe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=Jo(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Du(i)?c:i,h=(o.x||o.y)&&d,p=e&&(ak(f)?!s:f);return!!h||!!p},oz=new WeakMap,pwe=(e,t)=>{oz.set(e,t)},mwe=e=>{oz.delete(e)},AQ=e=>oz.get(e),Z8=(e,t)=>e?t.split(".").reduce((n,r)=>n&&dk(n,r)?n[r]:void 0,e):void 0,yF=(e,t,n)=>r=>[Z8(e,r),n||Z8(t,r)!==void 0],RQ=e=>{let t=e;return[()=>t,n=>{t=Tr({},t,n)}]},i_="tabindex",o_=op.bind(0,""),cL=e=>{ra(Cu(e),Y4(e)),Ql(e)},gwe=e=>{const t=Jo(),{q:n,A:r}=t,i=Sp()[rz],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=gx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=BE(b,"textarea"),E=b.ownerDocument,A=E.documentElement,R=b===E.body,k=E.defaultView,O=fwe.bind(0,[b]),L=kQ.bind(0,[b]),N=iz.bind(0,[b]),H=O.bind(0,o_,d),W=L.bind(0,o_,f),z=H(S),D=z===b,F=D&&R,j=!D&&W(_),V=!D&&gx(z)&&z===j,G=V&&!!N(f),K=G?H():z,Y=G?j:W(),ie=F?A:V?K:z,ce=x?O(o_,l,v):b,ue=F?ie:ce,se=V?Y:j,Q=E.activeElement,ae=!D&&k.top===k&&Q===b,le={Z:b,J:ue,K:ie,tt:!D&&L(o_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?A:ie,et:F?E:ie,ct:k,rt:E,lt:x,it:R,ut:h,ft:D,dt:V,_t:(it,pt)=>C1e(ie,D?Ja:Zu,D?pt:it),ht:(it,pt,mt)=>ip(ie,D?Ja:Zu,D?pt:it,mt)},he=Fs(le).reduce((it,pt)=>{const mt=le[pt];return Fn(it,mt&&gx(mt)&&!Cu(mt)?mt:!1)},[]),pe=it=>it?uk(he,it)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Qe}=le,qe=[()=>{Do(ye,Ja),Do(ye,sL),Do(ve,sL),R&&(Do(A,Ja),Do(A,sL))}],at=x&&pe(ye);let Nt=x?ve:Y4([be,me,xe,ye,ve].find(it=>pe(it)===!1));const Ie=F?ve:be||me;return[le,()=>{Eo(ye,Ja,D?"viewport":"host"),Eo(xe,gF,""),Eo(be,V8,""),D||Eo(me,Zu,"");const it=R&&!D?Fd(Cu(b),wQ):Es;if(at&&(B8(ve,ye),Fn(qe,()=>{B8(ye,ve),Ql(ye)})),ra(Ie,Nt),ra(ye,xe),ra(xe||ye,!D&&me),ra(me,be),Fn(qe,()=>{it(),Do(xe,gF),Do(be,V8),Do(me,_Q),Do(me,SQ),Do(me,Zu),pe(be)&&cL(be),pe(me)&&cL(me),pe(xe)&&cL(xe)}),r&&!D&&(ip(me,Zu,EQ,!0),Fn(qe,Do.bind(0,me,Zu))),Qe&&(A1e(me,Qe),Fn(qe,Ql.bind(0,Qe))),ae){const pt=Eo(me,i_);Eo(me,i_,"-1"),me.focus();const mt=()=>pt?Eo(me,i_,pt):Do(me,i_),_e=qr(E,"pointerdown keydown",()=>{mt(),_e()});Fn(qe,[mt,_e])}else Q&&Q.focus&&Q.focus();Nt=0},ic.bind(0,qe)]},vwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=Jo(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&Ji(n,{height:s?"":"100%"}),{wt:c,bt:c}}},ywe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=Qa({u:L1e,o:j8()},j8.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=Jo(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[A,R]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!l&&(R||E||v);if(O){const L=!A||!o&&!y,N=g.r+g.l,H=g.t+g.b,W={marginRight:L&&!_?-N:0,marginBottom:L?-H:0,marginLeft:L&&_?-N:0,top:L?-g.t:0,right:L?_?-g.r:"auto":0,left:L?_?"auto":-g.l:0,width:L?`calc(100% + ${N}px)`:""},z={paddingTop:L?g.t:0,paddingRight:L?g.r:0,paddingBottom:L?g.b:0,paddingLeft:L?g.l:0};Ji(o||s,W),Ji(s,z),r({tt:g,$t:!L,P:o?z:Tr({},W,z)})}return{xt:O}}},{max:bF}=Math,ed=bF.bind(0,0),IQ="visible",eH="hidden",bwe=42,s_={u:hQ,o:{w:0,h:0}},xwe={u:pQ,o:{x:eH,y:eH}},wwe=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:ed(e.w-t.w),h:ed(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},a_=e=>e.indexOf(IQ)===0,_we=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:l,ft:c,ht:d,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=Jo(),S=Sp()[rz],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=Qa(s_,zE.bind(0,s)),[A,R]=Qa(s_,FE.bind(0,s)),[k,O]=Qa(s_),[L,N]=Qa(s_),[H]=Qa(xwe),W=(G,K)=>{if(Ji(s,{height:""}),K){const{$t:Y,tt:J}=n(),{Ct:ie,M:ce}=G,ue=zE(i),se=AS(i),Q=Ji(s,"boxSizing")==="content-box",ae=Y||Q?J.b+J.t:0,le=!(y.x&&Q);Ji(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(G,K)=>{const Y=!v&&!G?bwe:0,J=(pe,ve,ye)=>{const xe=Ji(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?Y:ye:0,ve&&!!Y]},[ie,ce,ue,se]=J("overflowX",y.x,p.x),[Q,ae,le,he]=J("overflowY",y.y,p.y);return{Ot:{x:ie,y:Q},Ct:{x:ce,y:ae},M:{x:ue,y:le},D:{x:se,y:he}}},D=(G,K,Y,J)=>{const ie=(ae,le)=>{const he=a_(ae),pe=le&&he&&ae.replace(`${IQ}-`,"")||"";return[le&&!he?ae:"",a_(pe)?"hidden":pe]},[ce,ue]=ie(Y.x,K.x),[se,Q]=ie(Y.y,K.y);return J.overflowX=ue&&se?ue:ce,J.overflowY=Q&&ce?Q:se,z(G,J)},F=(G,K,Y,J)=>{const{M:ie,D:ce}=G,{x:ue,y:se}=ce,{x:Q,y:ae}=ie,{P:le}=n(),he=K?"marginLeft":"marginRight",pe=K?"paddingLeft":"paddingRight",ve=le[he],ye=le.marginBottom,xe=le[pe],me=le.paddingBottom;J.width=`calc(100% + ${ae+ve*-1}px)`,J[he]=-ae+ve,J.marginBottom=-Q+ye,Y&&(J[pe]=xe+(se?ae:0),J.paddingBottom=me+(ue?Q:0))},[j,V]=S?S.L(_,g,s,l,n,z,F):[()=>_,()=>[Es]];return(G,K,Y)=>{const{wt:J,Tt:ie,bt:ce,xt:ue,vt:se,St:Q}=G,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),xe=he&&y.x&&y.y,me=!c&&!g&&(J||ce||ie||pe||se),be=a_(ve.x),Qe=a_(ve.y),qe=be||Qe;let at=E(Y),Nt=R(Y),Ie=O(Y),ze=N(Y),it;if(pe&&v&&d(EQ,W1e,!xe),me&&(it=z(xe),W(it,ae)),J||ue||ce||Q||pe){qe&&d(Zm,Jm,!1);const[Re,Ue]=V(xe,le,it),[yt,Wt]=at=x(Y),[pn,$r]=Nt=A(Y),Or=AS(s);let Mr=pn,Fr=Or;Re(),($r||Wt||pe)&&Ue&&!xe&&j(Ue,pn,yt,le)&&(Fr=AS(s),Mr=FE(s));const Qr={w:ed(bF(pn.w,Mr.w)+yt.w),h:ed(bF(pn.h,Mr.h)+yt.h)},Zo={w:ed((b?h.innerWidth:Fr.w+ed(Or.w-pn.w))+yt.w),h:ed((b?h.innerHeight+yt.h:Fr.h+ed(Or.h-pn.h))+yt.h)};ze=L(Zo),Ie=k(wwe(Qr,Zo),Y)}const[pt,mt]=ze,[_e,je]=Ie,[Ye,$e]=Nt,[Ne,Rt]=at,ct={x:_e.w>0,y:_e.h>0},Ae=be&&Qe&&(ct.x||ct.y)||be&&ct.x&&!ct.y||Qe&&ct.y&&!ct.x;if(ue||Q||Rt||$e||mt||je||ye||pe||me){const Re={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ue=D(xe,ct,ve,Re),yt=j(Ue,Ye,Ne,le);c||F(Ue,le,yt,Re),me&&W(Ue,ae),c?(Eo(i,_Q,Re.overflowX),Eo(i,SQ,Re.overflowY)):Ji(s,Re)}ip(i,Ja,Jm,Ae),ip(o,gF,G1e,Ae),c||ip(s,Zu,Zm,qe);const[ot,$t]=H(z(xe).Ot);return r({Ot:ot,zt:{x:pt.w,y:pt.h},Et:{x:_e.w,y:_e.h},At:ct}),{It:$t,Ht:mt,Lt:je}}},tH=(e,t,n)=>{const r={},i=t||{},o=Fs(e).concat(Fs(i));return En(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},Swe=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=Jo(),d=!s&&(l.x||l.y),f=[vwe(e,t),ywe(e,t),_we(e,t)];return(h,p,g)=>{const v=tH(Tr({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=d||!c,S=y&&al(r),_=y&&vu(r);i("",jE,!0);let b=v;return En(f,x=>{b=tH(b,x(b,h,!!g)||{},g)}),al(r,S),vu(r,_),i("",jE),o||(al(n,0),vu(n,0)),b}},Ewe=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=l=>{if(n){const c=n.reduce((d,f)=>{if(f){const[h,p]=f,g=p&&h&&(l?l(h):lQ(h,e));g&&g.length&&p&&Zd(p)&&Fn(d,[g,p.trim()],!0)}return d},[]);En(c,d=>En(d[0],f=>{const h=d[1],p=r.get(f)||[];if(e.contains(f)){const v=qr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Fn(p,v))}else ic(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},nH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=J4(()=>i&&n(!0),{g:33,v:99}),[p,g]=Ewe(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const A=d||Es,R=f||Es,k=new Set,O=new Set;let L=!1,N=!1;if(En(x,H=>{const{attributeName:W,target:z,type:D,oldValue:F,addedNodes:j,removedNodes:V}=H,G=D==="attributes",K=D==="childList",Y=e===z,J=G&&Zd(W)?Eo(z,W):0,ie=J!==0&&F!==J,ce=uk(y,W)>-1&&ie;if(t&&(K||!Y)){const ue=!G,se=G&&ie,Q=se&&c&&BE(z,c),le=(Q?!A(z,W,F,J):ue||se)&&!R(H,!!Q,e,r);En(j,he=>k.add(he)),En(V,he=>k.add(he)),N=N||le}!t&&Y&&ie&&!A(z,W,F,J)&&(O.add(W),L=L||ce)}),k.size>0&&g(H=>_p(k).reduce((W,z)=>(Fn(W,lQ(H,z)),BE(z,H)?Fn(W,z):W),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[_p(O),L];return!E&&n.apply(0,H),H}},b=new M1e(x=>_(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!q4(x)&&_(x,!0)}}]},l_=3333333,PQ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=Sp()[swe],{V:s}=Jo(),c=cQ(`
`)[0],d=c.firstChild,f=Ag.bind(0,e),[h]=Qa({o:!1,_:!0,u:(v,y)=>!(!v||!Bm(v)&&Bm(y))}),p=v=>{const y=$s(v)&&v.length>0&&t1(v[0]),S=!y&&V4(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,A]=h(v.pop().contentRect),R=Bm(E),k=Bm(A);_=!A&&!!k||!R,b=!k&&R,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Ag(c);al(c,E?s.n?-l_:s.i?0:l_:l_),vu(c,l_)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{ic(g),Ql(c)},()=>{let v=i&&p;if(Nm){const y=new Nm(p);y.observe(d),Fn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,Fn(g,S)}if(r){const[y]=Qa({o:void 0},f);Fn(g,qr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(Q4(d,"ltr rtl"),Fd(d,b?"rtl":"ltr"),p([!!b,x,E])),gQ(S)}))}v&&(Fd(c,V1e),Fn(g,qr(c,"animationstart",v,{C:!!Nm}))),(Nm||o)&&ra(e,c)}]},Cwe=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,Twe=(e,t)=>{let n;const r=op(X1e),i=[],[o]=Qa({o:!1}),s=(c,d)=>{if(c){const f=o(Cwe(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{ic(i),Ql(r)},()=>{if($8)n=new $8(c=>l(c),{root:e}),n.observe(r),Fn(i,()=>{n.disconnect()});else{const c=()=>{const h=n1(r);s(h)},[d,f]=PQ(r,c);Fn(i,d),f(),c()}ra(e,r)},()=>n&&l(n.takeRecords(),!0)]},rH=`[${Ja}]`,kwe=`[${Zu}]`,uL=["tabindex"],iH=["wrap","cols","rows"],dL=["id","class","style","open"],Awe=(e,t,n)=>{let r,i,o;const{J:s,K:l,nt:c,lt:d,ft:f,_t:h,ht:p}=e,{Y:g}=Jo(),[v]=Qa({u:hQ,o:{w:0,h:0}},()=>{const F=h(Zm,Jm),j=h(aL,""),V=j&&al(l),G=j&&vu(l);p(Zm,Jm),p(aL,""),p("",jE,!0);const K=FE(c),Y=FE(l),J=zE(l);return p(Zm,Jm,F),p(aL,"",j),p("",jE),al(l,V),vu(l,G),{w:Y.w+K.w+J.w,h:Y.h+K.h+J.h}}),y=d?iH:dL.concat(iH),S=J4(n,{g:()=>r,v:()=>i,p(F,j){const[V]=F,[G]=j;return[Fs(V).concat(Fs(G)).reduce((K,Y)=>(K[Y]=V[Y]||G[Y],K),{})]}}),_=F=>{En(F||uL,j=>{if(uk(uL,j)>-1){const V=Eo(s,j);Zd(V)?Eo(l,j,V):Do(l,j)}})},b=(F,j)=>{const[V,G]=F,K={vt:G};return t({gt:V}),!j&&n(K),K},x=({wt:F,jt:j,Pt:V})=>{const G=!F||V?n:S;let K=!1;if(j){const[Y,J]=j;K=J,t({yt:Y})}G({wt:F,Pt:V,St:K})},E=(F,j)=>{const[,V]=v(),G={bt:V};return V&&!j&&(F?n:S)(G),G},A=(F,j,V)=>{const G={Tt:j};return j?!V&&S(G):f||_(F),G},[R,k,O]=c||!g?Twe(s,b):[Es,Es,Es],[L,N]=f?[Es,Es]:PQ(s,x,{Pt:!0,Yt:!0}),[H,W]=nH(s,!1,A,{Dt:dL,Mt:dL.concat(uL)});let z;const D=f&&Nm&&new Nm(F=>{const j=F[F.length-1].contentRect,V=Bm(j),K=!Bm(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{R(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),N(),k()},()=>{const F={},j=W(),V=O(),G=o&&o[1]();return j&&Tr(F,A.apply(0,Fn(j,!0))),V&&Tr(F,b.apply(0,Fn(V,!0))),G&&Tr(F,E.apply(0,Fn(G,!0))),F},F=>{const[j]=F("update.ignoreMutation"),[V,G]=F("update.attributes"),[K,Y]=F("update.elementEvents"),[J,ie]=F("update.debounce"),ce=Y||G,ue=se=>pl(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=nH(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:rH,Vt:(se,Q)=>{const{target:ae,attributeName:le}=se;return(!Q&&le&&!f?k1e(ae,rH,kwe):!1)||!!Lm(ae,`.${Qo}`)||!!ue(se)}})),ie)if(S.m(),$s(J)){const se=J[0],Q=J[1];r=kd(se)&&se,i=kd(Q)&&Q}else kd(J)?(r=J,i=!1):(r=!1,i=!1)}]},oH={x:0,y:0},Rwe=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:oH,Et:oH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Ag(e.J)}),Iwe=(e,t)=>{const n=yF(t,{}),[r,i,o]=ez(),[s,l,c]=gwe(e),d=RQ(Rwe(s)),[f,h]=d,p=Swe(s,d),g=(x,E,A)=>{const k=Fs(x).some(O=>!!x[O])||!X4(E)||A;return k&&o("u",[x,E,A]),k},[v,y,S,_]=Awe(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:A,it:R}=s,k=R?A.documentElement:x,O=al(k),L=vu(k);y(),l(),al(E,O),vu(E,L)},b.Ft=s,[(x,E)=>{const A=yF(t,x,E);return _(A),g(p(A,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:sH}=Math,Pwe=e=>{const{width:t,height:n}=Nl(e),{w:r,h:i}=n1(e);return{x:sH(t)/r||1,y:sH(n)/i||1}},Owe=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:l}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(l||[]).includes(s)},aH="pointerup pointerleave pointercancel lostpointercapture",Mwe=(e,t)=>qr(e,"mousedown",qr.bind(0,t,"click",gQ,{C:!0,$:!0}),{$:!0}),Dwe=(e,t,n,r,i,o,s)=>{const{V:l}=Jo(),{Gt:c,Xt:d,Ut:f}=r,h=`scroll${s?"Left":"Top"}`,p=`client${s?"X":"Y"}`,g=s?"width":"height",v=s?"left":"top",y=s?"w":"h",S=s?"x":"y",_=(b,x)=>E=>{const{Et:A}=o(),R=n1(d)[y]-n1(c)[y],O=x*E/R*A[S],N=Ag(f)&&s?l.n||l.i?1:-1:1;i[h]=b+O*N};return qr(d,"pointerdown",b=>{const x=Lm(b.target,`.${nz}`)===c,E=x?c:d;if(ip(t,Ja,G8,!0),Owe(b,e,x)){const A=!x&&b.shiftKey,R=()=>Nl(c),k=()=>Nl(d),O=(K,Y)=>(K||R())[v]-(Y||k())[v],L=_(i[h]||0,1/Pwe(i)[S]),N=b[p],H=R(),W=k(),z=H[g],D=O(H,W)+z/2,F=N-W[v],j=x?0:F-D,V=K=>{ic(G),E.releasePointerCapture(K.pointerId)},G=[ip.bind(0,t,Ja,G8),qr(n,aH,V),qr(n,"selectstart",K=>vQ(K),{S:!1}),qr(d,aH,V),qr(d,"pointermove",K=>{const Y=K[p]-N;(x||A)&&L(j+Y)})];if(A)L(j);else if(!x){const K=Sp()[awe];K&&Fn(G,K.O(L,O,j,z,F))}E.setPointerCapture(b.pointerId)}})},Lwe=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=Nh(333),p=!!s.scrollBy;let g=!0;return ic.bind(0,[qr(d,"pointerenter",()=>{r(X8,!0)}),qr(d,"pointerleave pointercancel",()=>{r(X8)}),qr(d,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:_}=v;p&&g&&_===0&&Cu(d)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(Q8,!0),f(()=>{g=!0,r(Q8)}),vQ(v)},{S:!1,$:!0}),Mwe(d,i),Dwe(e,o,i,n,s,t,c),h])},{min:UE,max:xF,round:Nwe}=Math,OQ=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return xF(0,UE(1,f/(f+h)))}const i=n?"width":"height",o=Nl(e)[i],s=Nl(t)[i];return xF(0,UE(1,o/s))},Bwe=(e,t,n,r,i,o)=>{const{V:s}=Jo(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=Nwe(d[l]),h=UE(f,xF(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=UE(1,(p?g:h)/f),S=OQ(e,t,o);return 1/S*(1-S)*y},MQ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),$we=(e,t)=>({transform:[Rg("0%",t),Rg(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),Fwe=e=>`${Math.max(0,e-.5)}px`,lH=(e,t,n,r)=>MQ(e,t,{transform:[Rg("0px",r),Rg(Fwe(n),r)]},"add"),cH=(e,t)=>pF?new pF({source:e,axis:t}):null,zwe=(e,t,n)=>{const{q:r,H:i}=Jo(),{scrollbars:o}=r(),{slot:s}=o,{rt:l,Z:c,J:d,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},_=new Map,b=cH(p,"x"),x=cH(p,"y"),E=kQ([c,d,f],()=>v&&g?c:d,s,S),A=se=>v&&!g&&Cu(se)===f,R=se=>{_.forEach((Q,ae)=>{(se?uk($s(se)?se:[se],ae)>-1:!0)&&((Q||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},k=(se,Q,ae)=>{const le=ae?Fd:Q4;En(se,he=>{le(he.Ut,Q)})},O=(se,Q)=>{En(se,ae=>{const[le,he]=Q(ae);Ji(le,he)})},L=(se,Q,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(OQ(he,pe,ae,Q)*100).toFixed(3)}%`}]})},N=(se,Q,ae)=>{!x&&!x&&O(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=Bwe(he,pe,p,Q,Ag(ve),ae);return[he,{transform:ye===ye?Rg(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:Q}=se,ae=A(Q)&&Q;return[ae,{transform:ae?Rg([`${al(p)}px`,`${vu(p)}px`]):""}]},W=[],z=[],D=[],F=(se,Q,ae)=>{const le=V4(ae),he=le?ae:!0,pe=le?!ae:!0;he&&k(z,se,Q),pe&&k(D,se,Q)},j=se=>{L(z,se,!0),L(D,se)},V=se=>{N(z,se,!0),N(D,se)},G=()=>{const se=(Q,{Ut:ae,Gt:le})=>{R(le),_.set(le,[MQ(le,Q?b:x,$we(Q&&Ag(ae),Q))])};z.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&O(z,H),v&&O(D,H))},Y=({Et:se})=>{D.concat(z).forEach(({Ut:Q})=>{R(Q),A(Q)&&_.set(Q,[lH(Q,b,se.x,!0),lH(Q,x,se.y)])})},J=se=>{const Q=se?J1e:Z1e,ae=se?z:D,le=q4(ae)?q8:"",he=op(`${Qo} ${Q} ${le}`),pe=op(CQ),ve=op(nz),ye={Ut:he,Xt:pe,Gt:ve};return i||Fd(he,Y1e),ra(he,pe),ra(pe,ve),Fn(ae,ye),Fn(W,[Ql.bind(0,he),R,n(ye,F,l,d,p,se?b:x,se)]),ye},ie=J.bind(0,!0),ce=J.bind(0,!1),ue=()=>{ra(E,z[0].Ut),ra(E,D[0].Ut),$E(()=>{F(q8)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:G,Kt:Y,Qt:K,tn:F,nn:{B:b,sn:z,en:ie,cn:O.bind(0,z)},rn:{B:x,sn:D,en:ce,cn:O.bind(0,D)}},ue,ic.bind(0,W)]},fL=e=>e.pointerType==="mouse",jwe=(e,t,n,r)=>{let i,o,s,l,c,d=Es,f=0;const h=RQ({}),[p]=h,[g,v]=Nh(),[y,S]=Nh(),[_,b]=Nh(100),[x,E]=Nh(100),[A,R]=Nh(100),[k,O]=Nh(()=>f),[L,N,H]=zwe(e,n.Ft,Lwe(t,n)),{J:W,et:z,it:D}=n.Ft,{tn:F,Wt:j,Zt:V,Jt:G,Kt:K,Qt:Y}=L,J=Q=>{F(vF,Q,!0),F(vF,Q,!1)},ie=(Q,ae)=>{if(O(),Q)F(K8);else{const le=()=>F(K8,!0);f>0&&!ae?k(le):le()}},ce=Q=>{fL(Q)&&(l=o,l&&ie(!0))},ue=[b,O,E,R,S,v,H,qr(W,"pointerover",ce,{C:!0}),qr(W,"pointerenter",ce),qr(W,"pointerleave",Q=>{fL(Q)&&(l=!1,o&&ie(!1))}),qr(W,"pointermove",Q=>{fL(Q)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),qr(z,"scroll",Q=>{y(()=>{V(n()),s&&ie(!0),_(()=>{s&&!l&&ie(!1)})}),r(Q),Y()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(Q,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:me}=Jo(),be=yF(t,Q,ae),Qe=n(),{Et:qe,Ot:at,yt:Nt,At:Ie}=Qe,[ze,it]=be("showNativeOverlaidScrollbars"),[pt,mt]=be("scrollbars.theme"),[_e,je]=be("scrollbars.visibility"),[Ye,$e]=be("scrollbars.autoHide"),[Ne,Rt]=be("scrollbars.autoHideSuspend"),[ct]=be("scrollbars.autoHideDelay"),[Ae,ot]=be("scrollbars.dragScroll"),[$t,Re]=be("scrollbars.clickScroll"),Ue=xe&&!ae,yt=Ie.x||Ie.y,Wt=he||pe||ye,pn=ve||je,$r=ze&&me.x&&me.y,Or=(Mr,Fr)=>{const Qr=_e==="visible"||_e==="auto"&&Mr==="scroll";return F(ewe,Qr,Fr),Qr};if(f=ct,Ue&&(Ne&&yt?(J(!1),d(),A(()=>{d=qr(z,"scroll",J.bind(0,!0),{C:!0})})):J(!0)),it&&F(K1e,$r),mt&&(F(c),F(pt,!0),c=pt),Rt&&!Ne&&J(!0),$e&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",ie(!s,!0)),ot&&F(rwe,Ae),Re&&F(nwe,$t),pn){const Mr=Or(at.x,!0),Fr=Or(at.y,!1);F(twe,!(Mr&&Fr))}Wt&&(j(Qe),V(Qe),G(Qe),K(Qe),Y(),F(Y8,!qe.x,!0),F(Y8,!qe.y,!1),F(Q1e,Nt&&!D))},se,()=>{ic(ue),d()}]},DQ=(e,t,n)=>{pl(e)&&e(t||void 0,n||void 0)},hd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=Jo(),l=Sp(),c=gx(e),d=c?e:e.target,f=AQ(d);if(t&&!f){let h=!1;const p=z=>{const D=Sp()[owe],F=D&&D.O;return F?F(z,!0):z},g=Tr({},r(),p(t)),[v,y,S]=ez(n),[_,b,x]=Iwe(e,g),[E,A,R]=jwe(e,g,b,z=>S("scroll",[W,z])),k=(z,D)=>_(z,!!D),O=k.bind(0,{},!0),L=o(O),N=s(O),H=z=>{mwe(d),L(),N(),R(),x(),h=!0,S("destroyed",[W,!!z]),y()},W={options(z,D){if(z){const F=D?r():{},j=yQ(g,Tr(F,p(z)));X4(j)||(Tr(g,j),k(j))}return Tr({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:F,At:j,tt:V,$t:G,yt:K}=b();return Tr({},{overflowEdge:z,overflowAmount:D,overflowStyle:F,hasOverflow:j,padding:V,paddingAbsolute:G,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:F,K:j,nt:V,st:G,et:K}=b.Ft,{nn:Y,rn:J}=A.Ft,ie=ue=>{const{Gt:se,Xt:Q,Ut:ae}=ue;return{scrollbar:ae,track:Q,handle:se}},ce=ue=>{const{sn:se,en:Q}=ue,ae=ie(se[0]);return Tr({},ae,{clone:()=>{const le=ie(Q());return E({},!0,{}),le}})};return Tr({},{target:z,host:D,padding:F||j,viewport:j,content:V||j,scrollOffsetElement:G,scrollEventElement:K,scrollbarHorizontal:ce(Y),scrollbarVertical:ce(J)})},update:z=>k({},z),destroy:H.bind(0)};return b.Nt((z,D,F)=>{E(D,F,z)}),pwe(d,W),En(Fs(l),z=>DQ(l[z],0,W)),hwe(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),W):(b.qt(),A.qt(),S("initialized",[W]),b.Nt((z,D,F)=>{const{wt:j,St:V,vt:G,Ht:K,Lt:Y,It:J,bt:ie,Tt:ce}=z;S("updated",[W,{updateHints:{sizeChanged:j,directionChanged:V,heightIntrinsicChanged:G,overflowEdgeChanged:K,overflowAmountChanged:Y,overflowStyleChanged:J,contentMutation:ie,hostMutation:ce},changedOptions:D,force:F}])}),W.update(!0),W)}return f};hd.plugin=e=>{En(iwe(e),t=>DQ(t,hd))};hd.valid=e=>{const t=e&&e.elements,n=pl(t)&&t();return dF(n)&&!!AQ(n.target)};hd.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:l,W:c,q:d,F:f,G:h,X:p}=Jo();return Tr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:l,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const Uwe=()=>{if(typeof window>"u"){const d=()=>{};return[d,d]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,l=r?n.cancelIdleCallback:o,c=()=>{l(e),o(t)};return[(d,f)=>{c(),e=s(r?()=>{c(),t=i(d)}:d,typeof f=="object"?f:{timeout:2233})},c]},LQ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=I.useMemo(Uwe,[]),s=I.useRef(null),l=I.useRef(r),c=I.useRef(t),d=I.useRef(n);return I.useEffect(()=>{l.current=r},[r]),I.useEffect(()=>{const{current:f}=s;c.current=t,hd.valid(f)&&f.options(t||{},!0)},[t]),I.useEffect(()=>{const{current:f}=s;d.current=n,hd.valid(f)&&f.on(n||{},!0)},[n]),I.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),I.useMemo(()=>[f=>{const h=s.current;if(hd.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=hd(f,g,v);p?i(y,p):y()},()=>s.current],[])},Hwe=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=I.useRef(null),f=I.useRef(null),[h,p]=I.useState(!1),[g,v]=LQ({options:r,events:i,defer:o});return I.useEffect(()=>{p(!0)},[]),I.useEffect(()=>{const{current:y}=d,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var _;return(_=v())==null?void 0:_.destroy()}},[h,g,n]),I.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>d.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:d,...l},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},Wwe=I.forwardRef(Hwe),iv=I.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=Cn(),c=kg({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=I.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(Wwe,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var NQ={exports:{}},Qn={};/** @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 pk=60103,mk=60106,Z1=60107,ew=60108,tw=60114,nw=60109,rw=60110,iw=60112,ow=60113,az=60120,sw=60115,aw=60116,$Q=60121,FQ=60122,zQ=60117,jQ=60129,UQ=60131;if(typeof Symbol=="function"&&Symbol.for){var Di=Symbol.for;pk=Di("react.element"),mk=Di("react.portal"),Z1=Di("react.fragment"),ew=Di("react.strict_mode"),tw=Di("react.profiler"),nw=Di("react.provider"),rw=Di("react.context"),iw=Di("react.forward_ref"),ow=Di("react.suspense"),az=Di("react.suspense_list"),sw=Di("react.memo"),aw=Di("react.lazy"),$Q=Di("react.block"),FQ=Di("react.server.block"),zQ=Di("react.fundamental"),jQ=Di("react.debug_trace_mode"),UQ=Di("react.legacy_hidden")}function gl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pk:switch(e=e.type,e){case Z1:case tw:case ew:case ow:case az:return e;default:switch(e=e&&e.$$typeof,e){case rw:case iw:case aw:case sw:case nw:return e;default:return t}}case mk:return t}}}var Hwe=nw,Wwe=pk,Gwe=iw,Vwe=Z1,qwe=aw,Xwe=sw,Ywe=mk,Kwe=tw,Qwe=ew,Jwe=ow;Qn.ContextConsumer=rw;Qn.ContextProvider=Hwe;Qn.Element=Wwe;Qn.ForwardRef=Gwe;Qn.Fragment=Vwe;Qn.Lazy=qwe;Qn.Memo=Xwe;Qn.Portal=Ywe;Qn.Profiler=Kwe;Qn.StrictMode=Qwe;Qn.Suspense=Jwe;Qn.isAsyncMode=function(){return!1};Qn.isConcurrentMode=function(){return!1};Qn.isContextConsumer=function(e){return gl(e)===rw};Qn.isContextProvider=function(e){return gl(e)===nw};Qn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pk};Qn.isForwardRef=function(e){return gl(e)===iw};Qn.isFragment=function(e){return gl(e)===Z1};Qn.isLazy=function(e){return gl(e)===aw};Qn.isMemo=function(e){return gl(e)===sw};Qn.isPortal=function(e){return gl(e)===mk};Qn.isProfiler=function(e){return gl(e)===tw};Qn.isStrictMode=function(e){return gl(e)===ew};Qn.isSuspense=function(e){return gl(e)===ow};Qn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z1||e===tw||e===jQ||e===ew||e===ow||e===az||e===UQ||typeof e=="object"&&e!==null&&(e.$$typeof===aw||e.$$typeof===sw||e.$$typeof===nw||e.$$typeof===rw||e.$$typeof===iw||e.$$typeof===zQ||e.$$typeof===$Q||e[0]===FQ)};Qn.typeOf=gl;BQ.exports=Qn;var HQ=BQ.exports;function WE(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Er.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Er.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** + */var hk=60103,pk=60106,Z1=60107,ew=60108,tw=60114,nw=60109,rw=60110,iw=60112,ow=60113,sz=60120,sw=60115,aw=60116,BQ=60121,$Q=60122,FQ=60117,zQ=60129,jQ=60131;if(typeof Symbol=="function"&&Symbol.for){var Li=Symbol.for;hk=Li("react.element"),pk=Li("react.portal"),Z1=Li("react.fragment"),ew=Li("react.strict_mode"),tw=Li("react.profiler"),nw=Li("react.provider"),rw=Li("react.context"),iw=Li("react.forward_ref"),ow=Li("react.suspense"),sz=Li("react.suspense_list"),sw=Li("react.memo"),aw=Li("react.lazy"),BQ=Li("react.block"),$Q=Li("react.server.block"),FQ=Li("react.fundamental"),zQ=Li("react.debug_trace_mode"),jQ=Li("react.legacy_hidden")}function yl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hk:switch(e=e.type,e){case Z1:case tw:case ew:case ow:case sz:return e;default:switch(e=e&&e.$$typeof,e){case rw:case iw:case aw:case sw:case nw:return e;default:return t}}case pk:return t}}}var Gwe=nw,Vwe=hk,qwe=iw,Xwe=Z1,Ywe=aw,Kwe=sw,Qwe=pk,Jwe=tw,Zwe=ew,e_e=ow;Qn.ContextConsumer=rw;Qn.ContextProvider=Gwe;Qn.Element=Vwe;Qn.ForwardRef=qwe;Qn.Fragment=Xwe;Qn.Lazy=Ywe;Qn.Memo=Kwe;Qn.Portal=Qwe;Qn.Profiler=Jwe;Qn.StrictMode=Zwe;Qn.Suspense=e_e;Qn.isAsyncMode=function(){return!1};Qn.isConcurrentMode=function(){return!1};Qn.isContextConsumer=function(e){return yl(e)===rw};Qn.isContextProvider=function(e){return yl(e)===nw};Qn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hk};Qn.isForwardRef=function(e){return yl(e)===iw};Qn.isFragment=function(e){return yl(e)===Z1};Qn.isLazy=function(e){return yl(e)===aw};Qn.isMemo=function(e){return yl(e)===sw};Qn.isPortal=function(e){return yl(e)===pk};Qn.isProfiler=function(e){return yl(e)===tw};Qn.isStrictMode=function(e){return yl(e)===ew};Qn.isSuspense=function(e){return yl(e)===ow};Qn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z1||e===tw||e===zQ||e===ew||e===ow||e===sz||e===jQ||typeof e=="object"&&e!==null&&(e.$$typeof===aw||e.$$typeof===sw||e.$$typeof===nw||e.$$typeof===rw||e.$$typeof===iw||e.$$typeof===FQ||e.$$typeof===BQ||e[0]===$Q)};Qn.typeOf=yl;NQ.exports=Qn;var UQ=NQ.exports;function HE(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Er.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Er.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -418,13 +418,13 @@ PERFORMANCE OF THIS SOFTWARE. .__dbk__dragger.Dark { background: #434252; } -/* ====== */`);const Zwe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:IS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var ea;function wF(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 e_e(e,t){switch(t.type){case ea.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case ea.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=WE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case ea.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case ea.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case ea.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=WE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=wF(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function WQ(e,t=0,n=[]){return I.Children.toArray(e).reduce((r,i,o)=>(HQ.isFragment(i)?r.push.apply(r,WQ(i.props.children,t+1,n.concat(i.key||o))):I.isValidElement(i)?r.push(I.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"})(ea||(ea={}));const dH=e=>"changedTouches"in e;var Er,_F;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(_F||(_F={}));const IS=typeof window<"u"&&"ontouchstart"in window;function hL(e){return e===Er.Horizontal?"col-resize":"row-resize"}const t_e={isReady:!1,isDragging:!1,pairs:[]};function n_e({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=_F.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=WQ(l),[p,g]=I.useReducer(e_e,t_e),v=I.useRef(null),y=I.useRef([]),S=I.useRef([]);y.current=[],S.current=[];const _=de.useCallback(W=>{g({type:ea.SetIsReadyToCompute,payload:{isReady:W}})},[]),b=de.useCallback((W,z)=>{g({type:ea.StartDragging,payload:{gutterIdx:z}});const D=p.pairs[z];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=hL(W),D.parent.style.cursor=hL(W),document.body.style.cursor=hL(W)},[p.pairs]),x=de.useCallback(()=>{g({type:ea.StopDragging});const W=[];for(let D=0;D{g({type:ea.CalculateSizes,payload:{direction:W,gutterIdx:z}})},[]),A=de.useCallback((W,z,D)=>{g({type:ea.CreatePairs,payload:{direction:W,children:z,gutters:D}})},[]),R=de.useCallback((W,z,D,F)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(WE(W,j)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");z.forEach((V,G)=>{const K=G===0,Y=G===z.length-1;let J,ie=0;z.length>1&&(ie=D[Y?G-1:G].getBoundingClientRect()[W===Er.Horizontal?"width":"height"],ie=K||Y?ie/2:ie),J=F&&G{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,j=z/D.size*F,V=F-z/D.size*F,G=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:J}=wF(D.gutterSize,G,K),ie=`calc(${j}% - ${Y}px)`,ce=`calc(${V}% - ${J}px)`;W===Er.Horizontal?(D.a.style.width=ie,D.b.style.width=ce):(D.a.style.height=ie,D.b.style.height=ce)},[p.draggingIdx,p.pairs,e]),O=de.useCallback((W,z,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 j=function(K,Y){const J=dH(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?J.clientX:J.clientY}(z,W)-F.start,V=16,G=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(G=D[p.draggingIdx+1]),j=F.size-(F.gutterSize+G)&&(j=F.size-(F.gutterSize+G)),k(z,j)},[p.isDragging,p.draggingIdx,p.pairs,k]),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=W=>{p.isDragging&&(dH(W)&&W.preventDefault(),O(W,e,e===Er.Horizontal?t:n))};function H(W,z){if(!W.current)throw new Error("Can't add element to ref object - ref isn't initialized");z&&!W.current.includes(z)&&W.current.push(z)}return c_("mouseup",L,[p.isDragging,x]),c_("mousemove",N,[e,p.isDragging,O,t,n]),c_("touchend",L,[p.isDragging,x],{condition:IS}),c_("touchmove",N,[e,p.isDragging,O,t,n],{condition:IS,passive:!IS}),I.useEffect(function(){if(!v.current)return;const W=v.current.parentElement;if(!W)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(W),F=e===Er.Horizontal?W.clientWidth:W.clientHeight;_(!!D&&!!F)});return z.observe(W),()=>{z.disconnect()}},[v.current,e]),I.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?R(e,y.current,S.current,r):(R(e,y.current,S.current,r),A(e,y.current,S.current))}},[l,p.isReady,e,R,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((W,z)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(zH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=z),void b(e,D);var D}},void 0)]},z))}),void 0)}let Fi=(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 hb(e){if(typeof window>"u")return e;const t=I.useRef(null);return I.useLayoutEffect(()=>{t.current=e}),I.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const fH={};function r_e(e,t){fH[e]||(fH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const i_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function o_e({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=I.useRef(!0);I.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=I.useState(i_e),l=I.useCallback(b=>{i.current&&s(b)},[]),c=I.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=hb(b=>(o.isOpen?p(b):f(b),o)),f=hb(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,R=x==null?void 0:x.clientY,k=typeof A=="number"&&typeof R=="number"?{left:A,top:R}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&r_e("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const N={...L,isOpen:!0,anchorPosition:k,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};l(L=>L._deferNextOpen?(setTimeout(()=>l(O),0),{...L,_deferNextOpen:!1}):O(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=hb(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=I.useCallback((b,x)=>{b?f(x):p(x)},[]),v=hb(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&SF(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=hb(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&SF(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=I.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function s_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 lw(e){return{...s_e(e),onClick:e.open,onTouchStart:e.open}}function ov({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function a_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 SF(e,t){const{anchorEl:n,_childPopupState:r}=t;return hH(n,e)||hH(a_e(e,t),e)||r!=null&&SF(e,r)}function hH(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function ef({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=o_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}ef.propTypes={children:Y0.func.isRequired,popupId:Y0.string,variant:Y0.oneOf(["popover","popper"]).isRequired,parentPopupState:Y0.object,disableAutoFocus:Y0.bool};function l_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(ef,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx($d,{sx:{m:1},children:C.jsx(Mu,{title:"Panel Options",children:C.jsx(Bd,{size:"small",...lw(s),children:C.jsx(QK,{fontSize:"small"})})})}),C.jsxs(Jd,{...ov(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(Hl,{onClick:n,disabled:o,children:[C.jsx(Ul,{children:C.jsx(N8,{fontSize:"small"})}),C.jsx(ol,{children:"Split Vertical"})]}),C.jsxs(Hl,{onClick:e,disabled:i,children:[C.jsx(Ul,{children:C.jsx(N8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(ol,{children:"Split Horizontal"})]}),C.jsx(nc,{}),C.jsxs(Hl,{onClick:t,disabled:r,children:[C.jsx(Ul,{children:C.jsx(qK,{fontSize:"small"})}),C.jsx(ol,{children:"Close Panel"})]})]})]})})}function to(e,t){const n=ee.clone(e);return t(n),n}function pH(e,t){return t(ee.clone(e))}function Ig(e){return t=>I.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>to(i,n))}})}const GQ=I.createContext({});function Lu(){return I.useContext(GQ)}function VQ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=In(),c=kg({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),d=kg({"div&":{background:o.background.default,[`&:hover .${c}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ee.sumBy(g,"size"),y=ee.filter(g,S=>!S.size).length;return y?v/y:0}const p=I.useMemo(()=>{const g=v=>n==null?void 0:n(pH(e,y=>({key:Fi(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:Fi()},{...structuredClone(y),size:50,key:Fi()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(l_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(to(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(_n,{children:C.jsx(_n,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(GQ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(n_e,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(to(e,y=>{ee.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ee.map(e.children,()=>f(6)-8),minWidths:ee.map(e.children,()=>f(32)),initialSizes:ee.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ee.map(e.children,(g,v)=>C.jsx(VQ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(to(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(pH(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:Fi(),content:y.children[0].content}:y.children[0]:(ee.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function r1(){return r1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var u_e=["PropTypes"],d_e=function(t,n){return I.Children.toArray(t).reduce(function(r,i){if(I.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},f_e=function(t,n){var r=I.Children.toArray(t).filter(function(i){if(I.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},h_e=function(t){return typeof t=="string"&&!u_e.includes(t)&&t.match(/^[A-Z0-9]/)},p_e=function(t){var n=I.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=c_e(r,["children","propagateSlotProps","slotKeys"]),d=I.useMemo(function(){return d_e(i,l)},[l,i]),f=I.useMemo(function(){return f_e(i,l)},[l,i]),h=I.useMemo(function(){return r1({},c,{slotProps:r1({},o,d)})},[c,d,o]);return I.createElement(t,h,f)});return n},m_e=function(t){var n=I.memo(p_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!h_e(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",r1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function lz(){const e=In();return nve(e.breakpoints.down("sm"))}const g_e=e=>e?48:36,v_e=8;function y_e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=lz(),s=ee.max([ee.findIndex(t,{value:n}),0])??0;return C.jsx(ef,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:i,children:C.jsx("span",{children:e==null?void 0:e(lw(l))})}),C.jsx(Jd,{...ov(l),anchorOrigin:{horizontal:"center",vertical:-g_e(o)*s-v_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:c,label:d,disabled:f})=>C.jsx(Hl,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function vx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(K1,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ee.map(r,o=>C.jsx(Hl,{value:o.value,children:o.label},o.value))})}function zd({children:e,icon:t,showArrow:n,...r}){return C.jsx(kK,{...r,startIcon:t,endIcon:n&&C.jsx(Dxe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(dt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Ro({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l}){const c=ee.find(r,{id:t});return C.jsx(y_e,{placeholder:ee.startCase(e),trigger:d=>C.jsx(zd,{...d,...l,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(c==null?void 0:c.name)??e}),items:ee.map(r,({id:d,name:f,description:h,hidden:p})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:f}),C.jsx(vi,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const qQ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],XQ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],um=1,b_e={renderer:XQ,remote:qQ,playbackRate:um,theme:"dark",acrylic:!0,accentColor:"blue"},[Nu,x_e]=rc({},y1e("settings",b_e)),{common:cVe,...w_e}=xq,__e=` +/* ====== */`);const t_e=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Er.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,l=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:RS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var ea;function wF(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 ea.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case ea.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,o=r[0].parentNode;if(!o)throw new Error("Cannot create pairs - parent is undefined.");const s=HE(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const l=[];return r.forEach((c,d)=>{if(d>0){const f=r[d-1],h=r[d],p=i[d-1],g=n===Er.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Er.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Er.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Er.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,_={idx:d-1,a:f,b:h,gutter:p,parent:o,start:g,end:v,size:y,gutterSize:S,aSizePct:100/r.length,bSizePct:100/r.length};l.push(_)}}),Object.assign(Object.assign({},e),{pairs:l})}case ea.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case ea.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case ea.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=HE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Er.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=wF(s,l,c);let h,p,g,v,y;return n===Er.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+d)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+d+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+d)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+d+f+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:g,aSizePct:v,bSizePct:y,gutterSize:s}),Object.assign({},e)}default:return e}}function HQ(e,t=0,n=[]){return I.Children.toArray(e).reduce((r,i,o)=>(UQ.isFragment(i)?r.push.apply(r,HQ(i.props.children,t+1,n.concat(i.key||o))):I.isValidElement(i)?r.push(I.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"})(ea||(ea={}));const uH=e=>"changedTouches"in e;var Er,_F;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Er||(Er={})),function(e){e.Light="Light",e.Dark="Dark"}(_F||(_F={}));const RS=typeof window<"u"&&"ontouchstart"in window;function hL(e){return e===Er.Horizontal?"col-resize":"row-resize"}const r_e={isReady:!1,isDragging:!1,pairs:[]};function i_e({direction:e=Er.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=_F.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=HQ(l),[p,g]=I.useReducer(n_e,r_e),v=I.useRef(null),y=I.useRef([]),S=I.useRef([]);y.current=[],S.current=[];const _=de.useCallback(W=>{g({type:ea.SetIsReadyToCompute,payload:{isReady:W}})},[]),b=de.useCallback((W,z)=>{g({type:ea.StartDragging,payload:{gutterIdx:z}});const D=p.pairs[z];c==null||c(D.idx),D.a.style.userSelect="none",D.b.style.userSelect="none",D.gutter.style.cursor=hL(W),D.parent.style.cursor=hL(W),document.body.style.cursor=hL(W)},[p.pairs]),x=de.useCallback(()=>{g({type:ea.StopDragging});const W=[];for(let D=0;D{g({type:ea.CalculateSizes,payload:{direction:W,gutterIdx:z}})},[]),A=de.useCallback((W,z,D)=>{g({type:ea.CreatePairs,payload:{direction:W,children:z,gutters:D}})},[]),R=de.useCallback((W,z,D,F)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(HE(W,j)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");z.forEach((V,G)=>{const K=G===0,Y=G===z.length-1;let J,ie=0;z.length>1&&(ie=D[Y?G-1:G].getBoundingClientRect()[W===Er.Horizontal?"width":"height"],ie=K||Y?ie/2:ie),J=F&&G{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,j=z/D.size*F,V=F-z/D.size*F,G=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:J}=wF(D.gutterSize,G,K),ie=`calc(${j}% - ${Y}px)`,ce=`calc(${V}% - ${J}px)`;W===Er.Horizontal?(D.a.style.width=ie,D.b.style.width=ce):(D.a.style.height=ie,D.b.style.height=ce)},[p.draggingIdx,p.pairs,e]),O=de.useCallback((W,z,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 j=function(K,Y){const J=uH(Y)?Y.changedTouches[0]:Y;return K===Er.Horizontal?J.clientX:J.clientY}(z,W)-F.start,V=16,G=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(G=D[p.draggingIdx+1]),j=F.size-(F.gutterSize+G)&&(j=F.size-(F.gutterSize+G)),k(z,j)},[p.isDragging,p.draggingIdx,p.pairs,k]),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=W=>{p.isDragging&&(uH(W)&&W.preventDefault(),O(W,e,e===Er.Horizontal?t:n))};function H(W,z){if(!W.current)throw new Error("Can't add element to ref object - ref isn't initialized");z&&!W.current.includes(z)&&W.current.push(z)}return c_("mouseup",L,[p.isDragging,x]),c_("mousemove",N,[e,p.isDragging,O,t,n]),c_("touchend",L,[p.isDragging,x],{condition:RS}),c_("touchmove",N,[e,p.isDragging,O,t,n],{condition:RS,passive:!RS}),I.useEffect(function(){if(!v.current)return;const W=v.current.parentElement;if(!W)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(W),F=e===Er.Horizontal?W.clientWidth:W.clientHeight;_(!!D&&!!F)});return z.observe(W),()=>{z.disconnect()}},[v.current,e]),I.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?R(e,y.current,S.current,r):(R(e,y.current,S.current,r),A(e,y.current,S.current))}},[l,p.isReady,e,R,A,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((W,z)=>C.jsxs(de.Fragment,{children:[C.jsx("div",Object.assign({ref:D=>H(y,D),className:"__dbk__child-wrapper "+(zH(S,D),className:o,theme:i,draggerClassName:s,direction:e,onDragging:()=>{return E(e,D=z),void b(e,D);var D}},void 0)]},z))}),void 0)}let li=(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 hb(e){if(typeof window>"u")return e;const t=I.useRef(null);return I.useLayoutEffect(()=>{t.current=e}),I.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const dH={};function o_e(e,t){dH[e]||(dH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const s_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function a_e({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=I.useRef(!0);I.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=I.useState(s_e),l=I.useCallback(b=>{i.current&&s(b)},[]),c=I.useCallback(b=>l(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),d=hb(b=>(o.isOpen?p(b):f(b),o)),f=hb(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){l(L=>({...L,_deferNextOpen:!0}));return}const A=x==null?void 0:x.clientX,R=x==null?void 0:x.clientY,k=typeof A=="number"&&typeof R=="number"?{left:A,top:R}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&o_e("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(_))}const N={...L,isOpen:!0,anchorPosition:k,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};l(L=>L._deferNextOpen?(setTimeout(()=>l(O),0),{...L,_deferNextOpen:!1}):O(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=hb(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){l(E=>({...E,_deferNextClose:!0}));return}l(E=>E._deferNextClose?(setTimeout(()=>l(h),0),{...E,_deferNextClose:!1}):h(E))}),g=I.useCallback((b,x)=>{b?f(x):p(x)},[]),v=hb(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&SF(x,_))?E.focused?{...E,hovered:!1}:h(E):E)}),y=hb(b=>{if(!b)return;const{relatedTarget:x}=b;l(E=>E.focused&&!(x instanceof Element&&SF(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=I.useCallback(b=>l(x=>({...x,_childPopupState:b})),[]),_={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:d,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return _}function l_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 lw(e){return{...l_e(e),onClick:e.open,onTouchStart:e.open}}function ov({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:l}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:l==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function c_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 SF(e,t){const{anchorEl:n,_childPopupState:r}=t;return fH(n,e)||fH(c_e(e,t),e)||r!=null&&SF(e,r)}function fH(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function ef({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=a_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}ef.propTypes={children:Y0.func.isRequired,popupId:Y0.string,variant:Y0.oneOf(["popover","popper"]).isRequired,parentPopupState:Y0.object,disableAutoFocus:Y0.bool};function u_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(ef,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx($d,{sx:{m:1},children:C.jsx(Mu,{title:"Panel Options",children:C.jsx(Bd,{size:"small",...lw(s),children:C.jsx(KK,{fontSize:"small"})})})}),C.jsxs(Jd,{...ov(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(Wl,{onClick:n,disabled:o,children:[C.jsx(ol,{children:C.jsx(L8,{fontSize:"small"})}),C.jsx(sl,{children:"Split Vertical"})]}),C.jsxs(Wl,{onClick:e,disabled:i,children:[C.jsx(ol,{children:C.jsx(L8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(sl,{children:"Split Horizontal"})]}),C.jsx(gl,{}),C.jsxs(Wl,{onClick:t,disabled:r,children:[C.jsx(ol,{children:C.jsx(VK,{fontSize:"small"})}),C.jsx(sl,{children:"Close Panel"})]})]})]})})}function to(e,t){const n=ee.clone(e);return t(n),n}function hH(e,t){return t(ee.clone(e))}function Ig(e){return t=>I.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>to(i,n))}})}const WQ=I.createContext({});function Lu(){return I.useContext(WQ)}function GQ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=Cn(),c=kg({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),d=kg({"div&":{background:o.background.default,[`&:hover .${c}`]:{opacity:1},"&.Horizontal":{padding:0},"&.Vertical":{padding:0}}}),f=g=>Number(s(g).slice(0,-2));function h(g){const v=100-ee.sumBy(g,"size"),y=ee.filter(g,S=>!S.size).length;return y?v/y:0}const p=I.useMemo(()=>{const g=v=>n==null?void 0:n(hH(e,y=>({key:li(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:li()},{...structuredClone(y),size:50,key:li()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(u_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(to(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(bn,{children:C.jsx(bn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(WQ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(i_e,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(to(e,y=>{ee.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:ee.map(e.children,()=>f(6)-8),minWidths:ee.map(e.children,()=>f(32)),initialSizes:ee.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Er.Vertical,horizontal:Er.Horizontal}[e.orientation],children:ee.map(e.children,(g,v)=>C.jsx(GQ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(to(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(hH(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:li(),content:y.children[0].content}:y.children[0]:(ee.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function r1(){return r1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var f_e=["PropTypes"],h_e=function(t,n){return I.Children.toArray(t).reduce(function(r,i){if(I.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},p_e=function(t,n){var r=I.Children.toArray(t).filter(function(i){if(I.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},m_e=function(t){return typeof t=="string"&&!f_e.includes(t)&&t.match(/^[A-Z0-9]/)},g_e=function(t){var n=I.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=d_e(r,["children","propagateSlotProps","slotKeys"]),d=I.useMemo(function(){return h_e(i,l)},[l,i]),f=I.useMemo(function(){return p_e(i,l)},[l,i]),h=I.useMemo(function(){return r1({},c,{slotProps:r1({},o,d)})},[c,d,o]);return I.createElement(t,h,f)});return n},v_e=function(t){var n=I.memo(g_e(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,l){var c;if(s in o||typeof s=="symbol"||!m_e(s))return Reflect.get(o,s,l);var d=((c=Reflect.get(o,"defaultProps"))==null?void 0:c.slotKeys)||[],f=Reflect.get(o,s);if(!f){var h=function(){return null};h.displayName=s,Reflect.set(o,s,h)}return Reflect.set(o,"defaultProps",r1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function az(){const e=Cn();return rve(e.breakpoints.down("sm"))}const y_e=e=>e?48:36,b_e=8;function x_e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=az(),s=ee.max([ee.findIndex(t,{value:n}),0])??0;return C.jsx(ef,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:i,children:C.jsx("span",{children:e==null?void 0:e(lw(l))})}),C.jsx(Jd,{...ov(l),anchorOrigin:{horizontal:"center",vertical:-y_e(o)*s-b_e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:c,label:d,disabled:f,icon:h})=>C.jsxs(Wl,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:[h&&C.jsx(ol,{sx:{transform:"scale(0.8)"},children:h}),d]},c))})]})})}function vx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(K1,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:ee.map(r,o=>C.jsx(Wl,{value:o.value,children:o.label},o.value))})}const VQ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],qQ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],um=1,w_e={renderer:qQ,remote:VQ,playbackRate:um,theme:"dark",acrylic:!0,accentColor:"blue"},[Nu,__e]=rc({},x1e("settings",w_e)),{common:fVe,...S_e}=bq,E_e=` 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%) -`,mH=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", - "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,S_e=(e,t)=>B5({palette:{primary:{main:xq[t][e==="dark"?"A100":"A700"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:mH},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))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily:mH}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ee.times(24,ee.constant(__e))]});function cz(){const[{acrylic:e}]=Nu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>wn(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const E_e=C.jsx(nc,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Sn=m_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=cz();return C.jsxs(_n,{vertical:!0,children:[C.jsx(_n,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(xp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(_n,{sx:{height:c=>c.spacing(6)},children:[C.jsx(_n,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(iv,{x:!0,children:C.jsxs(_n,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Ro,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=f5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:ee.values(f5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[E_e,e.Options.children]})]})})}),C.jsx(vi,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),YQ=""+new URL("logo512-23eace97.png",import.meta.url).href,EF="Visualiser",C_e="1.1.2",T_e="1.1.2; mid December 2023",k_e="https://github.com/path-visualiser/app",A_e="https://github.com/path-visualiser/app/blob/master/docs",R_e=[{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 I_e(){const{controls:e,onChange:t,state:n}=Lu();function r(i,o){return C.jsxs(dt,{sx:{pt:2},children:[C.jsx(zt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(zt,{variant:"body2",children:o})]})}return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsxs(_n,{children:[" ",C.jsx(iv,{y:!0,children:C.jsxs(dt,{sx:{p:2},children:[C.jsx(dt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:YQ,height:"64"})}),C.jsx(zt,{variant:"h6",children:EF}),r("Build Info",C.jsx(C.Fragment,{children:T_e})),r("About this App",C.jsxs(C.Fragment,{children:[EF," 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(wp,{sx:{mx:-2},children:R_e.map(({name:i,email:o},s)=>C.jsxs(ME,{href:`mailto:${o}`,children:[C.jsx(rye,{children:C.jsx(jpe,{children:ee.head(i)})}),C.jsx(ol,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(wp,{sx:{mx:-2},children:C.jsxs(ME,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Ul,{children:C.jsx(Pxe,{})}),C.jsx(ol,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Sn.Extras,{children:e})]})}const KQ=I.createContext(null);function P_e(){const[e,t]=I.useState(null);return I.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function QQ(e){const{children:t,value:n}=e,r=P_e(),i=I.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(KQ.Provider,{value:i,children:t})}function JQ(){return I.useContext(KQ)}function ZQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function eJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const O_e=["children"],M_e=I.forwardRef(function(t,n){const{children:r}=t,i=Le(t,O_e),o=JQ();if(o===null)throw new TypeError("No TabContext provided");const s=I.Children.map(r,l=>I.isValidElement(l)?I.cloneElement(l,{"aria-controls":ZQ(o,l.props.value),id:eJ(o,l.props.value)}):null);return C.jsx(uxe,$({},i,{ref:n,value:o.value,children:s}))}),tJ=M_e;function D_e(e){return _t("MuiTabPanel",e)}Ct("MuiTabPanel",["root"]);const L_e=["children","className","value"],N_e=e=>{const{classes:t}=e;return Et({root:["root"]},D_e,t)},B_e=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),$_e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,L_e),c=$({},r),d=N_e(c),f=JQ();if(f===null)throw new TypeError("No TabContext provided");const h=ZQ(f,s),p=eJ(f,s);return C.jsx(B_e,$({"aria-labelledby":p,className:Fe(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),$m=$_e;var nJ={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})(nJ);var uz=nJ.exports;function F_e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gH(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 vH(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function j_e(e,t){if(e==null)return{};var n=z_e(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 U_e(e,t){return H_e(e)||W_e(e,t)||G_e(e,t)||V_e()}function H_e(e){if(Array.isArray(e))return e}function W_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function G_e(e,t){if(e){if(typeof e=="string")return yH(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 yH(e,t)}}function yH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};u_.initial(e),u_.handler(t);var n={current:e},r=jb(sSe)(n,t),i=jb(oSe)(n),o=jb(u_.changes)(e),s=jb(iSe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return u_.selector(d),d(n.current)}function c(d){X_e(r,i,o,s)(d)}return[l,c]}function iSe(e,t){return i1(t)?t(e.current):t}function oSe(e,t){return e.current=xH(xH({},e.current),t),t}function sSe(e,t,n){return i1(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 aSe={create:rSe},lSe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function cSe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;cbq[e][n??(t==="dark"?"A100":"A700")],pH=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", + "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,C_e=(e,t)=>N5({palette:{primary:{main:XQ(t,e)},mode:e,background:e==="dark"?{default:"#09090b",paper:"#0f1114"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:pH},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))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily:pH}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...ee.times(24,ee.constant(E_e))]});function lz(){const[{acrylic:e}]=Nu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>_n(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}function zd({children:e,icon:t,showArrow:n,...r}){return C.jsx(TK,{...r,startIcon:t,endIcon:n&&C.jsx(Lxe,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(dt,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Ro({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l,itemOrientation:c="horizontal"}){const{palette:d}=Cn(),f=(p,g)=>p&&I.cloneElement(p,{sx:{color:g?XQ(g,d.mode):"primary.main"}}),h=ee.find(r,{id:t});return C.jsx(x_e,{placeholder:ee.startCase(e),trigger:p=>C.jsx(zd,{...p,...l,disabled:!(r!=null&&r.length)||s,icon:h!=null&&h.icon?f(h.icon,h.color):i,showArrow:o,children:(h==null?void 0:h.name)??e}),items:ee.map(r,({id:p,name:g,description:v,hidden:y,icon:S,color:_})=>({value:p,label:C.jsxs(bn,{vertical:c==="vertical",children:[C.jsxs(zt,{children:[g,C.jsx(yi,{})]}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]}),icon:f(S,_),disabled:y})),value:h==null?void 0:h.id,onChange:n})}const T_e=C.jsx(gl,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Sn=v_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s;const r=lz();return C.jsxs(bn,{vertical:!0,children:[C.jsx(bn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(xp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(bn,{sx:{height:l=>l.spacing(6)},children:[C.jsx(bn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(iv,{x:!0,children:C.jsxs(bn,{sx:{width:"max-content",height:l=>l.spacing(6),alignItems:"center",p:1},children:[C.jsx(Ro,{showArrow:!0,label:"Page",onChange:l=>t==null?void 0:t({...n,type:l}),value:n==null?void 0:n.type,items:ee.values(vie),itemOrientation:"vertical"}),((o=e.Options)==null?void 0:o.children)&&C.jsxs(C.Fragment,{children:[T_e,e.Options.children]})]})})}),C.jsx(yi,{sx:{mx:"auto"}}),(s=e.Extras)==null?void 0:s.children]})]})}),YQ=""+new URL("logo512-23eace97.png",import.meta.url).href,EF="Visualiser",k_e="1.1.2",A_e="1.1.2; mid December 2023",R_e="https://github.com/path-visualiser/app",I_e="https://github.com/path-visualiser/app/blob/master/docs",P_e=[{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 O_e(){const{controls:e,onChange:t,state:n}=Lu();function r(i,o){return C.jsxs(dt,{sx:{pt:2},children:[C.jsx(zt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(zt,{variant:"body2",children:o})]})}return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsxs(bn,{children:[" ",C.jsx(iv,{y:!0,children:C.jsxs(dt,{sx:{p:2},children:[C.jsx(dt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:YQ,height:"64"})}),C.jsx(zt,{variant:"h6",children:EF}),r("Build Info",C.jsx(C.Fragment,{children:A_e})),r("About this App",C.jsxs(C.Fragment,{children:[EF," 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(wp,{sx:{mx:-2},children:P_e.map(({name:i,email:o},s)=>C.jsxs(OE,{href:`mailto:${o}`,children:[C.jsx(iye,{children:C.jsx(Upe,{children:ee.head(i)})}),C.jsx(sl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(wp,{sx:{mx:-2},children:C.jsxs(OE,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(ol,{children:C.jsx(Oxe,{})}),C.jsx(sl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Sn.Extras,{children:e})]})}const KQ=I.createContext(null);function M_e(){const[e,t]=I.useState(null);return I.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function QQ(e){const{children:t,value:n}=e,r=M_e(),i=I.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(KQ.Provider,{value:i,children:t})}function JQ(){return I.useContext(KQ)}function ZQ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function eJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const D_e=["children"],L_e=I.forwardRef(function(t,n){const{children:r}=t,i=Le(t,D_e),o=JQ();if(o===null)throw new TypeError("No TabContext provided");const s=I.Children.map(r,l=>I.isValidElement(l)?I.cloneElement(l,{"aria-controls":ZQ(o,l.props.value),id:eJ(o,l.props.value)}):null);return C.jsx(dxe,$({},i,{ref:n,value:o.value,children:s}))}),tJ=L_e;function N_e(e){return _t("MuiTabPanel",e)}Ct("MuiTabPanel",["root"]);const B_e=["children","className","value"],$_e=e=>{const{classes:t}=e;return Et({root:["root"]},N_e,t)},F_e=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),z_e=I.forwardRef(function(t,n){const r=Tt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,B_e),c=$({},r),d=$_e(c),f=JQ();if(f===null)throw new TypeError("No TabContext provided");const h=ZQ(f,s),p=eJ(f,s);return C.jsx(F_e,$({"aria-labelledby":p,className:Fe(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),$m=z_e;var nJ={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})(nJ);var cz=nJ.exports;function j_e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mH(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 gH(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function H_e(e,t){if(e==null)return{};var n=U_e(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 W_e(e,t){return G_e(e)||V_e(e,t)||q_e(e,t)||X_e()}function G_e(e){if(Array.isArray(e))return e}function V_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function q_e(e,t){if(e){if(typeof e=="string")return vH(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 vH(e,t)}}function vH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};u_.initial(e),u_.handler(t);var n={current:e},r=jb(lSe)(n,t),i=jb(aSe)(n),o=jb(u_.changes)(e),s=jb(sSe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return u_.selector(d),d(n.current)}function c(d){K_e(r,i,o,s)(d)}return[l,c]}function sSe(e,t){return i1(t)?t(e.current):t}function aSe(e,t){return e.current=bH(bH({},e.current),t),t}function lSe(e,t,n){return i1(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 cSe={create:oSe},uSe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function dSe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,l=new Array(s),c=0;c{r.current=!1}:e,t)}var _s=DSe;function yx(){}function Fm(e,t,n,r){return LSe(e,r)||NSe(e,t,n,r)}function LSe(e,t){return e.editor.getModel(uJ(e,t))}function NSe(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 BSe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:d="light",loading:f="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:y={},beforeMount:S=yx,onMount:_=yx}){let[b,x]=I.useState(!1),[E,A]=I.useState(!0),R=I.useRef(null),k=I.useRef(null),O=I.useRef(null),L=I.useRef(_),N=I.useRef(S),H=I.useRef(!1);cJ(()=>{let F=aJ.init();return F.then(j=>(k.current=j)&&A(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>R.current?D():F.cancel()}),_s(()=>{if(R.current&&k.current){let F=R.current.getOriginalEditor(),j=Fm(k.current,e||"",r||n||"text",o||"");j!==F.getModel()&&F.setModel(j)}},[o],b),_s(()=>{if(R.current&&k.current){let F=R.current.getModifiedEditor(),j=Fm(k.current,t||"",i||n||"text",s||"");j!==F.getModel()&&F.setModel(j)}},[s],b),_s(()=>{let F=R.current.getModifiedEditor();F.getOption(k.current.editor.EditorOption.readOnly)?F.setValue(t||""):t!==F.getValue()&&(F.executeEdits("",[{range:F.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),F.pushUndoStop())},[t],b),_s(()=>{var F,j;(j=(F=R.current)==null?void 0:F.getModel())==null||j.original.setValue(e||"")},[e],b),_s(()=>{let{original:F,modified:j}=R.current.getModel();k.current.editor.setModelLanguage(F,r||n||"text"),k.current.editor.setModelLanguage(j,i||n||"text")},[n,r,i],b),_s(()=>{var F;(F=k.current)==null||F.editor.setTheme(d)},[d],b),_s(()=>{var F;(F=R.current)==null||F.updateOptions(h)},[h],b);let W=I.useCallback(()=>{var V;if(!k.current)return;N.current(k.current);let F=Fm(k.current,e||"",r||n||"text",o||""),j=Fm(k.current,t||"",i||n||"text",s||"");(V=R.current)==null||V.setModel({original:F,modified:j})},[n,t,i,e,r,o,s]),z=I.useCallback(()=>{var F;!H.current&&O.current&&(R.current=k.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...h}),W(),(F=k.current)==null||F.editor.setTheme(d),x(!0),H.current=!0)},[h,d,W]);I.useEffect(()=>{b&&L.current(R.current,k.current)},[b]),I.useEffect(()=>{!E&&!b&&z()},[E,b,z]);function D(){var j,V,G,K;let F=(j=R.current)==null?void 0:j.getModel();l||((V=F==null?void 0:F.original)==null||V.dispose()),c||((G=F==null?void 0:F.modified)==null||G.dispose()),(K=R.current)==null||K.dispose()}return de.createElement(lJ,{width:g,height:p,isEditorReady:b,loading:f,_ref:O,className:v,wrapperProps:y})}var $Se=BSe;I.memo($Se);function FSe(e){let t=I.useRef();return I.useEffect(()=>{t.current=e},[e]),t.current}var zSe=FSe,d_=new Map;function jSe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:l,loading:c="Loading...",options:d={},overrideServices:f={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:_=yx,onMount:b=yx,onChange:x,onValidate:E=yx}){let[A,R]=I.useState(!1),[k,O]=I.useState(!0),L=I.useRef(null),N=I.useRef(null),H=I.useRef(null),W=I.useRef(b),z=I.useRef(_),D=I.useRef(),F=I.useRef(r),j=zSe(o),V=I.useRef(!1),G=I.useRef(!1);cJ(()=>{let J=aJ.init();return J.then(ie=>(L.current=ie)&&O(!1)).catch(ie=>(ie==null?void 0:ie.type)!=="cancelation"&&console.error("Monaco initialization: error:",ie)),()=>N.current?Y():J.cancel()}),_s(()=>{var ie,ce,ue,se;let J=Fm(L.current,e||r||"",t||i||"",o||n||"");J!==((ie=N.current)==null?void 0:ie.getModel())&&(h&&d_.set(j,(ce=N.current)==null?void 0:ce.saveViewState()),(ue=N.current)==null||ue.setModel(J),h&&((se=N.current)==null||se.restoreViewState(d_.get(o))))},[o],A),_s(()=>{var J;(J=N.current)==null||J.updateOptions(d)},[d],A),_s(()=>{!N.current||r===void 0||(N.current.getOption(L.current.editor.EditorOption.readOnly)?N.current.setValue(r):r!==N.current.getValue()&&(G.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),N.current.pushUndoStop(),G.current=!1))},[r],A),_s(()=>{var ie,ce;let J=(ie=N.current)==null?void 0:ie.getModel();J&&i&&((ce=L.current)==null||ce.editor.setModelLanguage(J,i))},[i],A),_s(()=>{var J;l!==void 0&&((J=N.current)==null||J.revealLine(l))},[l],A),_s(()=>{var J;(J=L.current)==null||J.editor.setTheme(s)},[s],A);let K=I.useCallback(()=>{var J;if(!(!H.current||!L.current)&&!V.current){z.current(L.current);let ie=o||n,ce=Fm(L.current,r||e||"",t||i||"",ie||"");N.current=(J=L.current)==null?void 0:J.editor.create(H.current,{model:ce,automaticLayout:!0,...d},f),h&&N.current.restoreViewState(d_.get(ie)),L.current.editor.setTheme(s),R(!0),V.current=!0}},[e,t,n,r,i,o,d,f,h,s]);I.useEffect(()=>{A&&W.current(N.current,L.current)},[A]),I.useEffect(()=>{!k&&!A&&K()},[k,A,K]),F.current=r,I.useEffect(()=>{var J,ie;A&&x&&((J=D.current)==null||J.dispose(),D.current=(ie=N.current)==null?void 0:ie.onDidChangeModelContent(ce=>{G.current||x(N.current.getValue(),ce)}))},[A,x]),I.useEffect(()=>{if(A){let J=L.current.editor.onDidChangeMarkers(ie=>{var ue;let ce=(ue=N.current.getModel())==null?void 0:ue.uri;if(ce&&ie.find(se=>se.path===ce.path)){let se=L.current.editor.getModelMarkers({resource:ce});E==null||E(se)}});return()=>{J==null||J.dispose()}}return()=>{}},[A,E]);function Y(){var J,ie;(J=D.current)==null||J.dispose(),p?h&&d_.set(o,N.current.saveViewState()):(ie=N.current.getModel())==null||ie.dispose(),N.current.dispose()}return de.createElement(lJ,{width:g,height:v,isEditorReady:A,loading:c,_ref:H,className:y,wrapperProps:S})}var USe=jSe,HSe=I.memo(USe),dJ=HSe;let da;typeof window<"u"?da=window:typeof self<"u"?da=self:da=global;let CF=null,TF=null;const _H=20,vL=da.clearTimeout,SH=da.setTimeout,yL=da.cancelAnimationFrame||da.mozCancelAnimationFrame||da.webkitCancelAnimationFrame,EH=da.requestAnimationFrame||da.mozRequestAnimationFrame||da.webkitRequestAnimationFrame;yL==null||EH==null?(CF=vL,TF=function(t){return SH(t,_H)}):(CF=function([t,n]){yL(t),vL(n)},TF=function(t){const n=EH(function(){vL(r),t()}),r=SH(function(){yL(n),t()},_H);return[n,r]});function WSe(e){let t,n,r,i,o,s,l;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(_){const b=_.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,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(_){return _.offsetWidth!==_.__resizeLast__.width||_.offsetHeight!==_.__resizeLast__.height},l=function(_){if(_.target.className&&typeof _.target.className.indexOf=="function"&&_.target.className.indexOf("contract-trigger")<0&&_.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&CF(this.__resizeRAF__),this.__resizeRAF__=TF(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(A){A.call(b,_)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const _=document.createElement("fakeelement");if(_.style.animationName!==void 0&&(p=!0),p===!1){for(let b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=g:y.appendChild(p.createTextNode(g)),v.appendChild(y)}};return{addResizeListener:function(p,g){if(c)p.attachEvent("onresize",g);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=da.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),d(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const S=v.createElement("div");S.className="expand-trigger",S.appendChild(v.createElement("div"));const _=v.createElement("div");_.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(_),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",l,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(g)}},removeResizeListener:function(p,g){if(c)p.detachEvent("onresize",g);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",l,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class vk extends I.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,s,l,c;const d=window.getComputedStyle(this._parentNode)||{},f=parseFloat((o=d.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=d.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((l=d.paddingTop)!==null&&l!==void 0?l:"0"),g=parseFloat((c=d.paddingBottom)!==null&&c!==void 0?c:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-g,S=v.width-f-h,_=this._parentNode.offsetHeight-p-g,b=this._parentNode.offsetWidth-f-h;(!n&&(this.state.height!==_||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:_,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:_,scaledHeight:y,scaledWidth:S,width:b}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=WSe(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:s,onResize:l,style:c={},tagName:d="div",...f}=this.props,{height:h,scaledHeight:p,scaledWidth:g,width:v}=this.state,y={overflow:"visible"},S={};let _=!1;return i||(h===0&&(_=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(_=!0),y.width=0,S.width=v,S.scaledWidth=g),I.createElement(d,{ref:this._setRef,style:{...y,...c},...f},!_&&t(S))}}const GSe=2500;function VSe({code:e,onChange:t}){const n=In();return C.jsx(_n,{height:"100%",overflow:"hidden",children:C.jsx(vk,{children:({width:r,height:i})=>C.jsx(dJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(X1,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ee.debounce(o=>t==null?void 0:t(o),GSe),options:{minimap:{enabled:!1}}})})})}function qSe(e){const t=In();return C.jsx(_n,{height:"100%",overflow:"hidden",children:C.jsx(vk,{children:({width:n,height:r})=>C.jsx(dJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(X1,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function XSe({returnType:e,params:t}){return`@type {(${ee.join(ee.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function YSe(e){const[t,n,r]=["/**"," * "," */"],i=ee.map(ee.chunk(ee.split(e.description," "),9),o=>ee.join(o," "));return ee.join([t,...ee.map(i,o=>`${n}${o}`),`${n}${XSe(e)}`,r],` -`)}function KSe({name:e,params:t,defaultReturnValue:n}){return ee.join([`function ${e}(${ee.join(ee.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` -`)}function QSe(e){return ee.join(ee.map(e,t=>ee.join([YSe(t),KSe(t)],` + `},xH=dSe(mSe)(rJ),gSe={config:hSe},vSe=function(){for(var t=arguments.length,n=new Array(t),r=0;r{r.current=!1}:e,t)}var _s=NSe;function yx(){}function Fm(e,t,n,r){return BSe(e,r)||$Se(e,t,n,r)}function BSe(e,t){return e.editor.getModel(uJ(e,t))}function $Se(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 FSe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:d="light",loading:f="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:y={},beforeMount:S=yx,onMount:_=yx}){let[b,x]=I.useState(!1),[E,A]=I.useState(!0),R=I.useRef(null),k=I.useRef(null),O=I.useRef(null),L=I.useRef(_),N=I.useRef(S),H=I.useRef(!1);cJ(()=>{let F=aJ.init();return F.then(j=>(k.current=j)&&A(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>R.current?D():F.cancel()}),_s(()=>{if(R.current&&k.current){let F=R.current.getOriginalEditor(),j=Fm(k.current,e||"",r||n||"text",o||"");j!==F.getModel()&&F.setModel(j)}},[o],b),_s(()=>{if(R.current&&k.current){let F=R.current.getModifiedEditor(),j=Fm(k.current,t||"",i||n||"text",s||"");j!==F.getModel()&&F.setModel(j)}},[s],b),_s(()=>{let F=R.current.getModifiedEditor();F.getOption(k.current.editor.EditorOption.readOnly)?F.setValue(t||""):t!==F.getValue()&&(F.executeEdits("",[{range:F.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),F.pushUndoStop())},[t],b),_s(()=>{var F,j;(j=(F=R.current)==null?void 0:F.getModel())==null||j.original.setValue(e||"")},[e],b),_s(()=>{let{original:F,modified:j}=R.current.getModel();k.current.editor.setModelLanguage(F,r||n||"text"),k.current.editor.setModelLanguage(j,i||n||"text")},[n,r,i],b),_s(()=>{var F;(F=k.current)==null||F.editor.setTheme(d)},[d],b),_s(()=>{var F;(F=R.current)==null||F.updateOptions(h)},[h],b);let W=I.useCallback(()=>{var V;if(!k.current)return;N.current(k.current);let F=Fm(k.current,e||"",r||n||"text",o||""),j=Fm(k.current,t||"",i||n||"text",s||"");(V=R.current)==null||V.setModel({original:F,modified:j})},[n,t,i,e,r,o,s]),z=I.useCallback(()=>{var F;!H.current&&O.current&&(R.current=k.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...h}),W(),(F=k.current)==null||F.editor.setTheme(d),x(!0),H.current=!0)},[h,d,W]);I.useEffect(()=>{b&&L.current(R.current,k.current)},[b]),I.useEffect(()=>{!E&&!b&&z()},[E,b,z]);function D(){var j,V,G,K;let F=(j=R.current)==null?void 0:j.getModel();l||((V=F==null?void 0:F.original)==null||V.dispose()),c||((G=F==null?void 0:F.modified)==null||G.dispose()),(K=R.current)==null||K.dispose()}return de.createElement(lJ,{width:g,height:p,isEditorReady:b,loading:f,_ref:O,className:v,wrapperProps:y})}var zSe=FSe;I.memo(zSe);function jSe(e){let t=I.useRef();return I.useEffect(()=>{t.current=e},[e]),t.current}var USe=jSe,d_=new Map;function HSe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:l,loading:c="Loading...",options:d={},overrideServices:f={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:_=yx,onMount:b=yx,onChange:x,onValidate:E=yx}){let[A,R]=I.useState(!1),[k,O]=I.useState(!0),L=I.useRef(null),N=I.useRef(null),H=I.useRef(null),W=I.useRef(b),z=I.useRef(_),D=I.useRef(),F=I.useRef(r),j=USe(o),V=I.useRef(!1),G=I.useRef(!1);cJ(()=>{let J=aJ.init();return J.then(ie=>(L.current=ie)&&O(!1)).catch(ie=>(ie==null?void 0:ie.type)!=="cancelation"&&console.error("Monaco initialization: error:",ie)),()=>N.current?Y():J.cancel()}),_s(()=>{var ie,ce,ue,se;let J=Fm(L.current,e||r||"",t||i||"",o||n||"");J!==((ie=N.current)==null?void 0:ie.getModel())&&(h&&d_.set(j,(ce=N.current)==null?void 0:ce.saveViewState()),(ue=N.current)==null||ue.setModel(J),h&&((se=N.current)==null||se.restoreViewState(d_.get(o))))},[o],A),_s(()=>{var J;(J=N.current)==null||J.updateOptions(d)},[d],A),_s(()=>{!N.current||r===void 0||(N.current.getOption(L.current.editor.EditorOption.readOnly)?N.current.setValue(r):r!==N.current.getValue()&&(G.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),N.current.pushUndoStop(),G.current=!1))},[r],A),_s(()=>{var ie,ce;let J=(ie=N.current)==null?void 0:ie.getModel();J&&i&&((ce=L.current)==null||ce.editor.setModelLanguage(J,i))},[i],A),_s(()=>{var J;l!==void 0&&((J=N.current)==null||J.revealLine(l))},[l],A),_s(()=>{var J;(J=L.current)==null||J.editor.setTheme(s)},[s],A);let K=I.useCallback(()=>{var J;if(!(!H.current||!L.current)&&!V.current){z.current(L.current);let ie=o||n,ce=Fm(L.current,r||e||"",t||i||"",ie||"");N.current=(J=L.current)==null?void 0:J.editor.create(H.current,{model:ce,automaticLayout:!0,...d},f),h&&N.current.restoreViewState(d_.get(ie)),L.current.editor.setTheme(s),R(!0),V.current=!0}},[e,t,n,r,i,o,d,f,h,s]);I.useEffect(()=>{A&&W.current(N.current,L.current)},[A]),I.useEffect(()=>{!k&&!A&&K()},[k,A,K]),F.current=r,I.useEffect(()=>{var J,ie;A&&x&&((J=D.current)==null||J.dispose(),D.current=(ie=N.current)==null?void 0:ie.onDidChangeModelContent(ce=>{G.current||x(N.current.getValue(),ce)}))},[A,x]),I.useEffect(()=>{if(A){let J=L.current.editor.onDidChangeMarkers(ie=>{var ue;let ce=(ue=N.current.getModel())==null?void 0:ue.uri;if(ce&&ie.find(se=>se.path===ce.path)){let se=L.current.editor.getModelMarkers({resource:ce});E==null||E(se)}});return()=>{J==null||J.dispose()}}return()=>{}},[A,E]);function Y(){var J,ie;(J=D.current)==null||J.dispose(),p?h&&d_.set(o,N.current.saveViewState()):(ie=N.current.getModel())==null||ie.dispose(),N.current.dispose()}return de.createElement(lJ,{width:g,height:v,isEditorReady:A,loading:c,_ref:H,className:y,wrapperProps:S})}var WSe=HSe,GSe=I.memo(WSe),dJ=GSe;let da;typeof window<"u"?da=window:typeof self<"u"?da=self:da=global;let CF=null,TF=null;const wH=20,vL=da.clearTimeout,_H=da.setTimeout,yL=da.cancelAnimationFrame||da.mozCancelAnimationFrame||da.webkitCancelAnimationFrame,SH=da.requestAnimationFrame||da.mozRequestAnimationFrame||da.webkitRequestAnimationFrame;yL==null||SH==null?(CF=vL,TF=function(t){return _H(t,wH)}):(CF=function([t,n]){yL(t),vL(n)},TF=function(t){const n=SH(function(){vL(r),t()}),r=_H(function(){yL(n),t()},wH);return[n,r]});function VSe(e){let t,n,r,i,o,s,l;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(_){const b=_.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,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(_){return _.offsetWidth!==_.__resizeLast__.width||_.offsetHeight!==_.__resizeLast__.height},l=function(_){if(_.target.className&&typeof _.target.className.indexOf=="function"&&_.target.className.indexOf("contract-trigger")<0&&_.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&CF(this.__resizeRAF__),this.__resizeRAF__=TF(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(A){A.call(b,_)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const _=document.createElement("fakeelement");if(_.style.animationName!==void 0&&(p=!0),p===!1){for(let b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=g:y.appendChild(p.createTextNode(g)),v.appendChild(y)}};return{addResizeListener:function(p,g){if(c)p.attachEvent("onresize",g);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=da.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),d(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const S=v.createElement("div");S.className="expand-trigger",S.appendChild(v.createElement("div"));const _=v.createElement("div");_.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(_),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",l,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(g)}},removeResizeListener:function(p,g){if(c)p.detachEvent("onresize",g);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",l,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class gk extends I.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,s,l,c;const d=window.getComputedStyle(this._parentNode)||{},f=parseFloat((o=d.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=d.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((l=d.paddingTop)!==null&&l!==void 0?l:"0"),g=parseFloat((c=d.paddingBottom)!==null&&c!==void 0?c:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-g,S=v.width-f-h,_=this._parentNode.offsetHeight-p-g,b=this._parentNode.offsetWidth-f-h;(!n&&(this.state.height!==_||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:_,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:_,scaledHeight:y,scaledWidth:S,width:b}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=VSe(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:s,onResize:l,style:c={},tagName:d="div",...f}=this.props,{height:h,scaledHeight:p,scaledWidth:g,width:v}=this.state,y={overflow:"visible"},S={};let _=!1;return i||(h===0&&(_=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(_=!0),y.width=0,S.width=v,S.scaledWidth=g),I.createElement(d,{ref:this._setRef,style:{...y,...c},...f},!_&&t(S))}}const qSe=2500;function XSe({code:e,onChange:t}){const n=Cn();return C.jsx(bn,{height:"100%",overflow:"hidden",children:C.jsx(gk,{children:({width:r,height:i})=>C.jsx(dJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(X1,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:ee.debounce(o=>t==null?void 0:t(o),qSe),options:{minimap:{enabled:!1}}})})})}function YSe(e){const t=Cn();return C.jsx(bn,{height:"100%",overflow:"hidden",children:C.jsx(gk,{children:({width:n,height:r})=>C.jsx(dJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(X1,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function KSe({returnType:e,params:t}){return`@type {(${ee.join(ee.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function QSe(e){const[t,n,r]=["/**"," * "," */"],i=ee.map(ee.chunk(ee.split(e.description," "),9),o=>ee.join(o," "));return ee.join([t,...ee.map(i,o=>`${n}${o}`),`${n}${KSe(e)}`,r],` +`)}function JSe({name:e,params:t,defaultReturnValue:n}){return ee.join([`function ${e}(${ee.join(ee.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` +`)}function ZSe(e){return ee.join(ee.map(e,t=>ee.join([QSe(t),JSe(t)],` `)),` -`)}const JSe={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"},{name:"parent",type:"any"},{name:"children",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},fJ={shouldBreak:JSe},[Pg,ZSe]=rc([],{reduce:rQ}),[VE,eEe]=rc({algorithms:[],maps:[],formats:[]}),[yk,tEe]=rc({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(e,{action:t,key:n})=>to(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function nEe(){const[e]=yk();return ee.some(ee.values(e))}function tf(e="general"){const[,t]=yk();return I.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let hJ=class extends Error{},rEe=class extends hJ{},iEe=class extends hJ{};const oEe=(e,t=",")=>e.join(t),sEe={accept:"*",multiple:!1,strict:!1},dz=e=>{const{accept:t,multiple:n,strict:r}={...sEe,...e},i=cEe({multiple:n,accept:Array.isArray(t)?oEe(t):t});return new Promise(o=>{i.onchange=()=>{o(aEe(i.files,n,r)),i.remove()},i.click()})},aEe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new rEe);const o=lEe(e,t,n);if(!o)return i(new iEe);r(o)}),lEe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,cEe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},uEe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,dEe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,fEe=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,hEe=""+new URL("compressBinary.worker-0e5dbf65.js",import.meta.url).href,pEe=""+new URL("decompressBinary.worker-e2ab768a.js",import.meta.url).href,mEe=""+new URL("parseYaml.worker-858dc2e2.js",import.meta.url).href;class gEe extends Worker{constructor(){super(uEe,{type:"module"})}}class vEe extends Worker{constructor(){super(fEe,{type:"module"})}}class yEe extends Worker{constructor(){super(hEe,{type:"module"})}}class bEe extends Worker{constructor(){super(pEe,{type:"module"})}}class xEe extends Worker{constructor(){super(dEe,{type:"module"})}}class wEe extends Worker{constructor(){super(mEe,{type:"module"})}}var _Ee=function(){},SEe=_Ee(),Dp=function(e){return e!==SEe&&e!==null},EEe=Dp,CEe=Array.prototype.forEach,TEe=Object.create,kEe=function(e,t){var n;for(n in e)t[n]=e[n]},pJ=function(e){var t=TEe(null);return CEe.call(arguments,function(n){EEe(n)&&kEe(Object(n),t)}),t},AEe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},bL,CH;function REe(){return CH||(CH=1,bL=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),bL}var IEe=AEe()?Math.sign:REe(),PEe=IEe,OEe=Math.abs,MEe=Math.floor,DEe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:PEe(e)*MEe(OEe(e)))},LEe=DEe,NEe=Math.max,Lp=function(e){return NEe(0,LEe(e))},BEe=Lp,mJ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:BEe(e)},nf=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},$Ee=Dp,sv=function(e){if(!$Ee(e))throw new TypeError("Cannot use null or undefined");return e},FEe=nf,zEe=sv,jEe=Function.prototype.bind,TH=Function.prototype.call,UEe=Object.keys,HEe=Object.prototype.propertyIsEnumerable,WEe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(zEe(n)),FEe(r),i=UEe(n),s&&i.sort(typeof s=="function"?jEe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),TH.call(e,i,function(l,c){return HEe.call(n,l)?TH.call(r,o,n[l],l,n,c):t})}},bk=WEe("forEach"),Np={},gJ={exports:{}},GEe=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")},xL,kH;function VEe(){return kH||(kH=1,xL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),xL}var wL,AH;function qEe(){if(AH)return wL;AH=1;var e=Dp,t=Object.keys;return wL=function(n){return t(e(n)?Object(n):n)},wL}var _L,RH;function XEe(){return RH||(RH=1,_L=VEe()()?Object.keys:qEe()),_L}var SL,IH;function YEe(){if(IH)return SL;IH=1;var e=XEe(),t=sv,n=Math.max;return SL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},kL}var pCe=fCe()?String.prototype.contains:hCe(),PS=_J,BH=dCe,SJ=vJ,EJ=pJ,bx=pCe,mCe=wJ.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],PS(e)?(n=bx.call(e,"c"),r=bx.call(e,"e"),i=bx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?SJ(EJ(o),s):s};mCe.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],PS(t)?BH(t)?PS(n)?BH(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,PS(e)?(r=bx.call(e,"c"),i=bx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?SJ(EJ(o),s):s};var Bp=wJ.exports,AF={exports:{}};(function(e,t){var n=Bp,r=nf,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},lN}var cN,_W;function uTe(){if(_W)return cN;_W=1;var e=cTe(),t=/[\n\r\u2028\u2029]/g;return cN=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},cN}var m_={exports:{}},SW;function IJ(){if(SW)return m_.exports;SW=1,m_.exports=e,m_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return m_.exports}var EW;function dTe(){if(EW)return gW;EW=1;var e=AJ(),t=sTe(),n=lTe(),r=uTe(),i=IJ(),o=pz(),s=Object.create,l=t("then","then:finally","done","done:finally");return Np.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(A){var R=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);R&&(delete f[g],h[g]=A,d.emit("setasync",g,R))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(_.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(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},gW}var CW={},TW;function fTe(){if(TW)return CW;TW=1;var e=nf,t=bk,n=Np,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},CW}var kW={},uN,AW;function hTe(){return AW||(AW=1,uN=2147483647),uN}var dN,RW;function pTe(){if(RW)return dN;RW=1;var e=Lp,t=hTe();return dN=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},dN}var IW;function mTe(){if(IW)return kW;IW=1;var e=fz(),t=bk,n=pz(),r=IJ(),i=pTe(),o=Np,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},kW}var PW={},fN,OW;function gTe(){if(OW)return fN;OW=1;var e=Lp,t=Object.create,n=Object.prototype.hasOwnProperty;return fN=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},fN}var MW;function vTe(){if(MW)return PW;MW=1;var e=Lp,t=gTe(),n=Np;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},PW}var DW={},LW;function yTe(){if(LW)return DW;LW=1;var e=Bp,t=Np,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},DW}var bTe=pJ,xTe=mJ,wTe=KCe,_Te=function(e){var t=bTe(arguments[1]),n;return t.normalizer||(n=t.length=xTe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=QCe():n>1&&(t.normalizer=JCe()(n)):n===!1?t.normalizer=nTe()():n===1?t.normalizer=rTe()():t.normalizer=iTe()(n))),t.async&&oTe(),t.promise&&dTe(),t.dispose&&fTe(),t.maxAge&&mTe(),t.max&&vTe(),t.refCounter&&yTe(),wTe(e,t)};const Bu=js(_Te),STe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},av=e=>t=>STe(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),lv=(e,t={async:!0,length:1})=>Bu(av(e),t);ee.memoize(av(gEe));ee.memoize(av(vEe));const ETe=ee.memoize(av(yEe)),CTe=ee.memoize(av(bEe)),PJ=ee.memoize(av(wEe));function xx(e){return e.split(".").pop()}function OJ(e){return e.split(".").shift()}const NW="internal/custom",RF="json",IF=e=>({name:(e==null?void 0:e.id)===NW?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:NW}),TTe=e=>({name:(e==null?void 0:e.type)===RF?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:RF}),BW=["json","yaml"];async function kTe(){const e=await dz({accept:BW.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(BW.includes(xx(e.name))){const t=await e.text(),n=await PJ(t);return{...TTe(),format:n==null?void 0:n.format,content:n,name:ee.startCase(OJ(e.name)),type:RF}}else throw new Error(`The format (${xx(e.name)}) is unsupported.`)}}}async function ATe(e){const t=await dz({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(ee.find(e,{id:xx(t.name)}))return{...IF(),format:xx(t.name),content:await t.text(),name:ee.startCase(OJ(t.name))};throw new Error(`The format (${xx(t.name)}) is unsupported.`)}}}const MJ=20*1024*1024,[DJ,RTe]=rc({},{reduce:(e,t)=>ee.omitBy(ak(e,t),ee.isUndefined)});function ITe(e){return new Promise(t=>ee.delay(t,e))}function mz(e){const[,t]=DJ();return I.useCallback(async(n,r)=>{t(()=>({[e]:r})),ITe(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function gz(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function PTe({onChange:e,value:t}){const n=ml(),r=tf("map"),i=mz("map"),[o]=Pg(),[{maps:s,formats:l}]=VE();return C.jsx(Ro,{showArrow:!0,icon:C.jsx(YK,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[IF(t),...s.map(c=>{var d;return{...c,description:(d=ee.find(o,{url:c.source}))==null?void 0:d.name}})],onChange:async c=>{switch(c){case IF().id:try{const d=await ATe(l);d&&r(async()=>{n("Opening map...");const f=d.file.size>MJ?await i(d.read,`Opening map (${gz(d.file.size)})`):await d.read();f&&(e==null||e(f))})}catch(d){n(`${d}`)}break;default:e==null||e(ee.find(s,{id:c}));break}}})}function OTe({onChange:e,value:t}){const n=ml(),r=tf("specimen"),i=mz("specimen");return C.jsx(zd,{icon:C.jsx(YK,{}),onClick:async()=>{try{const o=await kTe();o&&r(async()=>{n("Opening trace...");const s=o.file.size>MJ?await i(o.read,`Opening trace (${gz(o.file.size)})`):await o.read();s&&(e==null||e(s))})}catch(o){n(`${o}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Choose File"})}const LJ=({label:e})=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),MTe=({label:e})=>C.jsx(zt,{variant:"body1",children:e}),o1=({label:e,content:t})=>C.jsxs(_n,{alignItems:"center",children:[C.jsx(MTe,{label:e}),C.jsx(vi,{flex:1}),t]}),wk=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,DTe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class LTe extends Worker{constructor(){super(DTe,{type:"module"})}}const NTe=lv(LTe),{floor:$W}=Math;function FW(e,t,n){return e>=t&&e({...await NTe({map:e,options:t})}),{normalizer:JSON.stringify}),$Te=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[$W(r+o/2),$W(i+o/2)];if(FW(s,0,t)&&FW(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wk}},FTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:$Te,parse:BTe},Symbol.toStringTag,{value:"Module"})),zTe=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class jTe extends Worker{constructor(){super(zTe,{type:"module"})}}const UTe=lv(jTe),HTe=Bu(async(e="",t)=>await UTe({map:e,options:t}),{normalizer:JSON.stringify}),WTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),GTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:WTe,parse:HTe},Symbol.toStringTag,{value:"Module"})),VTe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class qTe extends Worker{constructor(){super(VTe,{type:"module"})}}const XTe=lv(qTe),YTe=Bu(async(e="",t)=>await XTe({map:e,options:t}),{normalizer:JSON.stringify}),KTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),QTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:KTe,parse:YTe},Symbol.toStringTag,{value:"Module"})),JTe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class ZTe extends Worker{constructor(){super(JTe,{type:"module"})}}const eke=lv(ZTe),tke=Bu(async(e="",t)=>await eke({map:e,options:t}),{normalizer:JSON.stringify}),nke=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:wk}),rke=Object.freeze(Object.defineProperty({__proto__:null,hydrate:nke,parse:tke},Symbol.toStringTag,{value:"Module"})),vz={grid:FTe,xy:QTe,mesh:GTe,poly:rke},[ike,oke]=rc({busy:{}});function yz(e=""){return vz[e]}function eg({label:e,icon:t=C.jsx(Gxe,{}),...n}){return C.jsxs(_n,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[I.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(zt,{children:e})]})}const Ub="500";function ske(e){return parseInt(e.replace("#","0x"))}const bz={source:Ku.A400,destination:Xu.A400,updating:Hh[Ub],expanding:yq[Ub],generating:bq[Ub],closing:vq[Ub],end:Yu.A400};ee.mapValues(bz,ske);function Og(e){return(e&&bz[e])??v5[Ub]}function ake(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 lke(){return this.eachAfter(ake)}function cke(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 dke(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 hke(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function pke(e){for(var t=this,n=mke(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 mke(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 gke(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function vke(){var e=[];return this.each(function(t){e.push(t)}),e}function yke(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function bke(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function xz(e,t){var n=new s1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=wke);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new s1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(Ske)}function xke(){return xz(this).eachBefore(_ke)}function wke(e){return e.children}function _ke(e){e.data=e.data.data}function Ske(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function s1(e){this.data=e,this.depth=this.height=0,this.parent=null}s1.prototype=xz.prototype={constructor:s1,count:lke,each:cke,eachAfter:dke,eachBefore:uke,sum:fke,sort:hke,path:pke,ancestors:gke,descendants:vke,leaves:yke,links:bke,copy:xke};function Eke(e,t){return e.parent===t.parent?1:2}function hN(e){var t=e.children;return t?t[0]:e.t}function pN(e){var t=e.children;return t?t[t.length-1]:e.t}function Cke(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 Tke(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 kke(e,t,n){return e.a.parent===t.parent?e.a:n}function OS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}OS.prototype=Object.create(s1.prototype);function Ake(e){for(var t=new OS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new OS(o[s],s)),i.parent=n;return(t.parent=new OS(null,0)).children=[t],t}function Rke(){var e=Eke,t=1,n=1,r=null;function i(d){var f=Ake(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){Tke(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=pN(v),p=hN(p),v&&p;)y=hN(y),g=pN(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(Cke(kke(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!pN(g)&&(g.t=v,g.m+=b-_),p&&!hN(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var PF="http://www.w3.org/1999/xhtml";const zW={svg:"http://www.w3.org/2000/svg",xhtml:PF,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _k(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),zW.hasOwnProperty(t)?{space:zW[t],local:e}:e}function Ike(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===PF&&t.documentElement.namespaceURI===PF?t.createElement(e):t.createElementNS(n,e)}}function Pke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function NJ(e){var t=_k(e);return(t.local?Pke:Ike)(t)}function Oke(){}function wz(e){return e==null?Oke:function(){return this.querySelector(e)}}function Mke(e){typeof e!="function"&&(e=wz(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 iAe(e){e||(e=oAe);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 sAe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function aAe(){return Array.from(this)}function lAe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?bAe:typeof t=="function"?wAe:xAe)(e,t,n??"")):Mg(this.node(),e)}function Mg(e,t){return e.style.getPropertyValue(t)||jJ(e).getComputedStyle(e,null).getPropertyValue(t)}function SAe(e){return function(){delete this[e]}}function EAe(e,t){return function(){this[e]=t}}function CAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function TAe(e,t){return arguments.length>1?this.each((t==null?SAe:typeof t=="function"?CAe:EAe)(e,t)):this.node()[e]}function UJ(e){return e.trim().split(/^|\s+/)}function _z(e){return e.classList||new HJ(e)}function HJ(e){this._node=e,this._names=UJ(e.getAttribute("class")||"")}HJ.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 WJ(e,t){for(var n=_z(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function eRe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function Sz(){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}})}MS.prototype=Sz.prototype={constructor:MS,on:function(e,t){var n=this._,r=uRe(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?g_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?g_(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=mRe.exec(e))?new Uo(t[1],t[2],t[3],1):(t=gRe.exec(e))?new Uo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=vRe.exec(e))?g_(t[1],t[2],t[3],t[4]):(t=yRe.exec(e))?g_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bRe.exec(e))?XW(t[1],t[2]/100,t[3]/100,1):(t=xRe.exec(e))?XW(t[1],t[2]/100,t[3]/100,t[4]):UW.hasOwnProperty(e)?GW(UW[e]):e==="transparent"?new Uo(NaN,NaN,NaN,0):null}function GW(e){return new Uo(e>>16&255,e>>8&255,e&255,1)}function g_(e,t,n,r){return r<=0&&(e=t=n=NaN),new Uo(e,t,n,r)}function SRe(e){return e instanceof dw||(e=c1(e)),e?(e=e.rgb(),new Uo(e.r,e.g,e.b,e.opacity)):new Uo}function DF(e,t,n,r){return arguments.length===1?SRe(e):new Uo(e,t,n,r??1)}function Uo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ez(Uo,DF,XJ(dw,{brighter(e){return e=e==null?XE:Math.pow(XE,e),new Uo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?a1:Math.pow(a1,e),new Uo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Uo(sp(this.r),sp(this.g),sp(this.b),YE(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:VW,formatHex:VW,formatHex8:ERe,formatRgb:qW,toString:qW}));function VW(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}`}function ERe(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}${Qh((isNaN(this.opacity)?1:this.opacity)*255)}`}function qW(){const e=YE(this.opacity);return`${e===1?"rgb(":"rgba("}${sp(this.r)}, ${sp(this.g)}, ${sp(this.b)}${e===1?")":`, ${e})`}`}function YE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qh(e){return e=sp(e),(e<16?"0":"")+e.toString(16)}function XW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Za(e,t,n,r)}function YJ(e){if(e instanceof Za)return new Za(e.h,e.s,e.l,e.opacity);if(e instanceof dw||(e=c1(e)),!e)return new Za;if(e instanceof Za)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new Za(s,l,c,e.opacity)}function CRe(e,t,n,r){return arguments.length===1?YJ(e):new Za(e,t,n,r??1)}function Za(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ez(Za,CRe,XJ(dw,{brighter(e){return e=e==null?XE:Math.pow(XE,e),new Za(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?a1:Math.pow(a1,e),new Za(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 Uo(mN(e>=240?e-240:e+120,i,r),mN(e,i,r),mN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Za(YW(this.h),v_(this.s),v_(this.l),YE(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=YE(this.opacity);return`${e===1?"hsl(":"hsla("}${YW(this.h)}, ${v_(this.s)*100}%, ${v_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function YW(e){return e=(e||0)%360,e<0?e+360:e}function v_(e){return Math.max(0,Math.min(1,e||0))}function mN(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 KJ=e=>()=>e;function TRe(e,t){return function(n){return e+n*t}}function kRe(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 ARe(e){return(e=+e)==1?QJ:function(t,n){return n-t?kRe(t,n,e):KJ(isNaN(t)?n:t)}}function QJ(e,t){var n=t-e;return n?TRe(e,n):KJ(isNaN(e)?t:e)}const KW=function e(t){var n=ARe(t);function r(i,o){var s=n((i=DF(i)).r,(o=DF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=QJ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function td(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var LF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gN=new RegExp(LF.source,"g");function RRe(e){return function(){return e}}function IRe(e){return function(t){return e(t)+""}}function PRe(e,t){var n=LF.lastIndex=gN.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=LF.exec(e))&&(i=gN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:td(r,i)})),n=gN.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:td(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:td(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:td(d,h)},{i:y-2,x:td(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Dg}function ZW(){Ep=(QE=u1.now())+Sk,Dg=Hb=0;try{jRe()}finally{Dg=0,HRe(),Ep=0}}function URe(){var e=u1.now(),t=e-QE;t>eZ&&(Sk-=t,QE=e)}function HRe(){for(var e,t=KE,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:KE=n);Wb=e,BF(r)}function BF(e){if(!Dg){Hb&&(Hb=clearTimeout(Hb));var t=e-Ep;t>24?(e<1/0&&(Hb=setTimeout(ZW,e-u1.now()-Sk)),mb&&(mb=clearInterval(mb))):(mb||(QE=u1.now(),mb=setInterval(URe,eZ)),Dg=1,tZ(ZW))}}function eG(e,t,n){var r=new JE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var WRe=Sz("start","end","cancel","interrupt"),GRe=[],rZ=0,tG=1,$F=2,DS=3,nG=4,FF=5,LS=6;function Ek(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;VRe(e,n,{name:t,index:r,group:i,on:WRe,tween:GRe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rZ})}function Tz(e,t){var n=vl(e,t);if(n.state>rZ)throw new Error("too late; already scheduled");return n}function oc(e,t){var n=vl(e,t);if(n.state>DS)throw new Error("too late; already running");return n}function vl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function VRe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=nZ(o,0,n.time);function o(d){n.state=tG,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==tG)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===DS)return eG(s);g.state===nG?(g.state=LS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+f$F&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function _Ie(e,t,n){var r,i,o=wIe(t)?Tz:oc;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function SIe(e,t){var n=this._id;return arguments.length<2?vl(this.node(),n).on.on(e):this.each(_Ie(n,e,t))}function EIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function CIe(){return this.on("end.remove",EIe(this._id))}function TIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function QIe(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 hu(e,t,n){this.k=e,this.x=t,this.y=n}hu.prototype={constructor:hu,scale:function(e){return e===1?this:new hu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new hu(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 ZE=new hu(1,0,0);hu.prototype;function vN(e){e.stopImmediatePropagation()}function gb(e){e.preventDefault(),e.stopImmediatePropagation()}function JIe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ZIe(){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 rG(){return this.__zoom||ZE}function ePe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function tPe(){return navigator.maxTouchPoints||"ontouchstart"in this}function nPe(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 yN(){var e=JIe,t=ZIe,n=nPe,r=ePe,i=tPe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=FRe,d=Sz("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",rG).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,j,V){var G=D.selection?D.selection():D;G.property("__zoom",rG),D!==G?A(D,F,j,V):G.interrupt().each(function(){R(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,j,V){_.scaleTo(D,function(){var G=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return G*K},j,V)},_.scaleTo=function(D,F,j,V){_.transform(D,function(){var G=t.apply(this,arguments),K=this.__zoom,Y=j==null?E(G):typeof j=="function"?j.apply(this,arguments):j,J=K.invert(Y),ie=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,ie),Y,J),G,s)},j,V)},_.translateBy=function(D,F,j,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,j,V,G){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,J=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(ZE.translate(J[0],J[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,G)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new hu(F,D.x,D.y)}function x(D,F,j){var V=F[0]-j[0]*D.k,G=F[1]-j[1]*D.k;return V===D.x&&G===D.y?D:new hu(D.k,V,G)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function A(D,F,j,V){D.on("start.zoom",function(){R(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,K=arguments,Y=R(G,K).event(V),J=t.apply(G,K),ie=j==null?E(J):typeof j=="function"?j.apply(G,K):j,ce=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),ue=G.__zoom,se=typeof F=="function"?F.apply(G,K):F,Q=c(ue.invert(ie).concat(ce/ue.k),se.invert(ie).concat(ce/se.k));return function(ae){if(ae===1)ae=se;else{var le=Q(ae),he=ce/le[2];ae=new hu(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}Y.zoom(null,ae)}})}function R(D,F,j){return!j&&D.__zooming||new k(D,F)}function k(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}k.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=To(this.that).datum();d.call(D,this.that,new QIe(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function O(D,...F){if(!e.apply(this,arguments))return;var j=R(this,F).event(D),V=this.__zoom,G=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=Eh(D);if(j.wheel)(j.mouse[0][0]!==K[0]||j.mouse[0][1]!==K[1])&&(j.mouse[1]=V.invert(j.mouse[0]=K)),clearTimeout(j.wheel);else{if(V.k===G)return;j.mouse=[K,V.invert(K)],NS(this),j.start()}gb(D),j.wheel=setTimeout(Y,v),j.zoom("mouse",n(x(b(V,G),j.mouse[0],j.mouse[1]),j.extent,s));function Y(){j.wheel=null,j.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=R(this,F,!0).event(D),G=To(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=Eh(D,j),Y=D.clientX,J=D.clientY;fRe(D.view),vN(D),V.mouse=[K,this.__zoom.invert(K)],NS(this),V.start();function ie(ue){if(gb(ue),!V.moved){var se=ue.clientX-Y,Q=ue.clientY-J;V.moved=se*se+Q*Q>y}V.event(ue).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=Eh(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){G.on("mousemove.zoom mouseup.zoom",null),hRe(ue.view,V.moved),gb(ue),V.event(ue).end()}}function N(D,...F){if(e.apply(this,arguments)){var j=this.__zoom,V=Eh(D.changedTouches?D.changedTouches[0]:D,this),G=j.invert(V),K=j.k*(D.shiftKey?.5:2),Y=n(x(b(j,K),V,G),t.apply(this,F),s);gb(D),l>0?To(this).transition().duration(l).call(A,Y,V,D):To(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var j=D.touches,V=j.length,G=R(this,F,D.changedTouches.length===V).event(D),K,Y,J,ie;for(vN(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(A,R){if(A===null)return null;if(R===0)return A;var k,O;if(typeof A!="object")return A;if(n(A,r))k=new r;else if(n(A,i))k=new i;else if(n(A,o))k=new o(function(V,G){A.then(function(K){V(E(K,R-1))},function(K){G(E(K,R-1))})});else if(s.__isArray(A))k=[];else if(s.__isRegExp(A))k=new RegExp(A.source,h(A)),A.lastIndex&&(k.lastIndex=A.lastIndex);else if(s.__isDate(A))k=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(A.length):k=new Buffer(A.length),A.copy(k),k;n(A,Error)?k=Object.create(A):typeof y>"u"?(O=Object.getPrototypeOf(A),k=Object.create(O)):(k=Object.create(y),O=y)}if(g){var L=_.indexOf(A);if(L!=-1)return b[L];_.push(A),b.push(k)}n(A,r)&&A.forEach(function(V,G){var K=E(G,R-1),Y=E(V,R-1);k.set(K,Y)}),n(A,i)&&A.forEach(function(V){var G=E(V,R-1);k.add(G)});for(var N in A){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(k[N]=E(A[N],R-1))}if(Object.getOwnPropertySymbols)for(var W=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Li[e[t+0]]+Li[e[t+1]]+Li[e[t+2]]+Li[e[t+3]]+"-"+Li[e[t+4]]+Li[e[t+5]]+"-"+Li[e[t+6]]+Li[e[t+7]]+"-"+Li[e[t+8]]+Li[e[t+9]]+"-"+Li[e[t+10]]+Li[e[t+11]]+Li[e[t+12]]+Li[e[t+13]]+Li[e[t+14]]+Li[e[t+15]]).toLowerCase();if(!aPe(n))throw TypeError("Stringified UUID is invalid");return n}function xN(e,t,n){e=e||{};var r=e.random||(e.rng||oPe)();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 lPe(r)}var zF={exports:{}},jF={exports:{}},cPe=function(){for(var t=arguments.length,n=[],r=0;rto(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function iEe(){const[e]=vk();return ee.some(ee.values(e))}function tf(e="general"){const[,t]=vk();return I.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let hJ=class extends Error{},oEe=class extends hJ{},sEe=class extends hJ{};const aEe=(e,t=",")=>e.join(t),lEe={accept:"*",multiple:!1,strict:!1},uz=e=>{const{accept:t,multiple:n,strict:r}={...lEe,...e},i=dEe({multiple:n,accept:Array.isArray(t)?aEe(t):t});return new Promise(o=>{i.onchange=()=>{o(cEe(i.files,n,r)),i.remove()},i.click()})},cEe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new oEe);const o=uEe(e,t,n);if(!o)return i(new sEe);r(o)}),uEe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,dEe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},fEe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,hEe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,pEe=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,mEe=""+new URL("compressBinary.worker-0e5dbf65.js",import.meta.url).href,gEe=""+new URL("decompressBinary.worker-e2ab768a.js",import.meta.url).href,vEe=""+new URL("parseYaml.worker-858dc2e2.js",import.meta.url).href;class yEe extends Worker{constructor(){super(fEe,{type:"module"})}}class bEe extends Worker{constructor(){super(pEe,{type:"module"})}}class xEe extends Worker{constructor(){super(mEe,{type:"module"})}}class wEe extends Worker{constructor(){super(gEe,{type:"module"})}}class _Ee extends Worker{constructor(){super(hEe,{type:"module"})}}class SEe extends Worker{constructor(){super(vEe,{type:"module"})}}var EEe=function(){},CEe=EEe(),Dp=function(e){return e!==CEe&&e!==null},TEe=Dp,kEe=Array.prototype.forEach,AEe=Object.create,REe=function(e,t){var n;for(n in e)t[n]=e[n]},pJ=function(e){var t=AEe(null);return kEe.call(arguments,function(n){TEe(n)&&REe(Object(n),t)}),t},IEe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},bL,EH;function PEe(){return EH||(EH=1,bL=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),bL}var OEe=IEe()?Math.sign:PEe(),MEe=OEe,DEe=Math.abs,LEe=Math.floor,NEe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:MEe(e)*LEe(DEe(e)))},BEe=NEe,$Ee=Math.max,Lp=function(e){return $Ee(0,BEe(e))},FEe=Lp,mJ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:FEe(e)},nf=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},zEe=Dp,sv=function(e){if(!zEe(e))throw new TypeError("Cannot use null or undefined");return e},jEe=nf,UEe=sv,HEe=Function.prototype.bind,CH=Function.prototype.call,WEe=Object.keys,GEe=Object.prototype.propertyIsEnumerable,VEe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(UEe(n)),jEe(r),i=WEe(n),s&&i.sort(typeof s=="function"?HEe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),CH.call(e,i,function(l,c){return GEe.call(n,l)?CH.call(r,o,n[l],l,n,c):t})}},yk=VEe("forEach"),Np={},gJ={exports:{}},qEe=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")},xL,TH;function XEe(){return TH||(TH=1,xL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),xL}var wL,kH;function YEe(){if(kH)return wL;kH=1;var e=Dp,t=Object.keys;return wL=function(n){return t(e(n)?Object(n):n)},wL}var _L,AH;function KEe(){return AH||(AH=1,_L=XEe()()?Object.keys:YEe()),_L}var SL,RH;function QEe(){if(RH)return SL;RH=1;var e=KEe(),t=sv,n=Math.max;return SL=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},kL}var gCe=pCe()?String.prototype.contains:mCe(),IS=_J,NH=hCe,SJ=vJ,EJ=pJ,bx=gCe,vCe=wJ.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],IS(e)?(n=bx.call(e,"c"),r=bx.call(e,"e"),i=bx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?SJ(EJ(o),s):s};vCe.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],IS(t)?NH(t)?IS(n)?NH(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,IS(e)?(r=bx.call(e,"c"),i=bx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?SJ(EJ(o),s):s};var Bp=wJ.exports,AF={exports:{}};(function(e,t){var n=Bp,r=nf,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=0?f=s(f):f=t(this.length)-s(o(f)),c=f;c"}},lN}var cN,wW;function fTe(){if(wW)return cN;wW=1;var e=dTe(),t=/[\n\r\u2028\u2029]/g;return cN=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},cN}var m_={exports:{}},_W;function IJ(){if(_W)return m_.exports;_W=1,m_.exports=e,m_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return m_.exports}var SW;function hTe(){if(SW)return mW;SW=1;var e=AJ(),t=lTe(),n=uTe(),r=fTe(),i=IJ(),o=hz(),s=Object.create,l=t("then","then:finally","done","done:finally");return Np.promise=function(c,d){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!l[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");d.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,d.emit("setasync",g,1);return}f[g]=1,p[g]=y;var _=function(A){var R=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);R&&(delete f[g],h[g]=A,d.emit("setasync",g,R))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],d.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(A){o(_.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(_,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(_),y.finally(b)}}),d.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var _=function(){d.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(_):S.then(function(){o(_)}):_()}),d.on("delete",function(g){if(delete p[g],f[g]){delete f[g];return}if(hasOwnProperty.call(h,g)){var v=h[g];delete h[g],d.emit("deleteasync",g,[v])}}),d.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),d.emit("clearasync",e(g,function(v){return[v]}))})},mW}var EW={},CW;function pTe(){if(CW)return EW;CW=1;var e=nf,t=yk,n=Np,r=Function.prototype.apply;return n.dispose=function(i,o,s){var l;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",l=function(c,d){r.call(i,null,d)}),o.on("clearasync",function(c){t(c,function(d,f){l(f,d)})});return}o.on("delete",l=function(c,d){i(d)}),o.on("clear",function(c){t(c,function(d,f){l(f,d)})})},EW}var TW={},uN,kW;function mTe(){return kW||(kW=1,uN=2147483647),uN}var dN,AW;function gTe(){if(AW)return dN;AW=1;var e=Lp,t=mTe();return dN=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},dN}var RW;function vTe(){if(RW)return TW;RW=1;var e=dz(),t=yk,n=hz(),r=IJ(),i=gTe(),o=Np,s=Function.prototype,l=Math.max,c=Math.min,d=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=d(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(_){g[_]=setTimeout(function(){h.delete(_)},f),typeof g[_].unref=="function"&&g[_].unref(),S&&(S[_]&&S[_]!=="nextTick"&&clearTimeout(S[_]),S[_]=setTimeout(function(){delete S[_]},y),typeof S[_].unref=="function"&&S[_].unref())}),h.on("delete"+v,function(_){clearTimeout(g[_]),delete g[_],S&&(S[_]!=="nextTick"&&clearTimeout(S[_]),delete S[_])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=l(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(_,b,x){S[_]||(S[_]="nextTick",n(function(){var E;S[_]==="nextTick"&&(delete S[_],h.delete(_),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(_){clearTimeout(_)}),g={},S&&(t(S,function(_){_!=="nextTick"&&clearTimeout(_)}),S={})}))},TW}var IW={},fN,PW;function yTe(){if(PW)return fN;PW=1;var e=Lp,t=Object.create,n=Object.prototype.hasOwnProperty;return fN=function(r){var i=0,o=1,s=t(null),l=t(null),c=0,d;return r=e(r),{hit:function(f){var h=l[f],p=++c;if(s[p]=f,l[f]=p,!h)return++i,i<=r?void 0:(f=s[o],d(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:d=function(f){var h=l[f];if(h&&(delete s[h],delete l[f],--i,o===h)){if(!i){c=0,o=1;return}for(;!n.call(s,++o););}},clear:function(){i=0,o=1,s=t(null),l=t(null),c=0}}},fN}var OW;function bTe(){if(OW)return IW;OW=1;var e=Lp,t=yTe(),n=Np;return n.max=function(r,i,o){var s,l,c;r=e(r),r&&(l=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(d){d=l.hit(d),d!==void 0&&i.delete(d)}),i.on("get"+s,c),i.on("delete"+s,l.delete),i.on("clear"+s,l.clear))},IW}var MW={},DW;function xTe(){if(DW)return MW;DW=1;var e=Bp,t=Np,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var l,c;l=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(d,f){l[d]=f||1}),o.on("get"+c,function(d){++l[d]}),o.on("delete"+c,function(d){delete l[d]}),o.on("clear"+c,function(){l={}}),r(o.memoized,{deleteRef:e(function(){var d=o.get(arguments);return d===null||!l[d]?null:--l[d]?!1:(o.delete(d),!0)}),getRefCount:e(function(){var d=o.get(arguments);return d===null||!l[d]?0:l[d]})})},MW}var wTe=pJ,_Te=mJ,STe=JCe,ETe=function(e){var t=wTe(arguments[1]),n;return t.normalizer||(n=t.length=_Te(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=ZCe():n>1&&(t.normalizer=eTe()(n)):n===!1?t.normalizer=iTe()():n===1?t.normalizer=oTe()():t.normalizer=sTe()(n))),t.async&&aTe(),t.promise&&hTe(),t.dispose&&pTe(),t.maxAge&&vTe(),t.max&&bTe(),t.refCounter&&xTe(),STe(e,t)};const Bu=js(ETe),CTe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},av=e=>t=>CTe(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),lv=(e,t={async:!0,length:1})=>Bu(av(e),t);ee.memoize(av(yEe));ee.memoize(av(bEe));const TTe=ee.memoize(av(xEe)),kTe=ee.memoize(av(wEe)),PJ=ee.memoize(av(SEe));function xx(e){return e.split(".").pop()}function OJ(e){return e.split(".").shift()}const LW="internal/custom",RF="json",IF=e=>({name:(e==null?void 0:e.id)===LW?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:LW}),ATe=e=>({name:(e==null?void 0:e.type)===RF?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:RF}),NW=["json","yaml"];async function RTe(){const e=await uz({accept:NW.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(NW.includes(xx(e.name))){const t=await e.text(),n=await PJ(t);return{...ATe(),format:n==null?void 0:n.format,content:n,name:ee.startCase(OJ(e.name)),type:RF}}else throw new Error(`The format (${xx(e.name)}) is unsupported.`)}}}async function ITe(e){const t=await uz({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(ee.find(e,{id:xx(t.name)}))return{...IF(),format:xx(t.name),content:await t.text(),name:ee.startCase(OJ(t.name))};throw new Error(`The format (${xx(t.name)}) is unsupported.`)}}}const MJ=20*1024*1024,[DJ,PTe]=rc({},{reduce:(e,t)=>ee.omitBy(sk(e,t),ee.isUndefined)});function OTe(e){return new Promise(t=>ee.delay(t,e))}function pz(e){const[,t]=DJ();return I.useCallback(async(n,r)=>{t(()=>({[e]:r})),OTe(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function mz(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function MTe({onChange:e,value:t}){const n=vl(),r=tf("map"),i=pz("map"),[o]=Pg(),[{maps:s,formats:l}]=GE();return C.jsx(Ro,{showArrow:!0,icon:C.jsx(XK,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[IF(t),...s.map(c=>{var d;return{...c,description:(d=ee.find(o,{url:c.source}))==null?void 0:d.name}})],onChange:async c=>{switch(c){case IF().id:try{const d=await ITe(l);d&&r(async()=>{n("Opening map...");const f=d.file.size>MJ?await i(d.read,`Opening map (${mz(d.file.size)})`):await d.read();f&&(e==null||e(f))})}catch(d){n(`${d}`)}break;default:e==null||e(ee.find(s,{id:c}));break}}})}function DTe({onChange:e,value:t}){const n=vl(),r=tf("specimen"),i=pz("specimen");return C.jsx(zd,{icon:C.jsx(XK,{}),onClick:async()=>{try{const o=await RTe();o&&r(async()=>{n("Opening trace...");const s=o.file.size>MJ?await i(o.read,`Opening trace (${mz(o.file.size)})`):await o.read();s&&(e==null||e(s))})}catch(o){n(`${o}`)}},children:t!=null&&t.id?`Uploaded Trace - ${t.name}`:"Choose File"})}const LJ=({label:e})=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),LTe=({label:e})=>C.jsx(zt,{variant:"body1",children:e}),o1=({label:e,content:t})=>C.jsxs(bn,{alignItems:"center",children:[C.jsx(LTe,{label:e}),C.jsx(yi,{flex:1}),t]}),xk=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,NTe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class BTe extends Worker{constructor(){super(NTe,{type:"module"})}}const $Te=lv(BTe),{floor:BW}=Math;function $W(e,t,n){return e>=t&&e({...await $Te({map:e,options:t})}),{normalizer:JSON.stringify}),zTe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[BW(r+o/2),BW(i+o/2)];if($W(s,0,t)&&$W(l,0,n))return{x:s,y:l}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:xk}},jTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:zTe,parse:FTe},Symbol.toStringTag,{value:"Module"})),UTe=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class HTe extends Worker{constructor(){super(UTe,{type:"module"})}}const WTe=lv(HTe),GTe=Bu(async(e="",t)=>await WTe({map:e,options:t}),{normalizer:JSON.stringify}),VTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:xk}),qTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:VTe,parse:GTe},Symbol.toStringTag,{value:"Module"})),XTe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class YTe extends Worker{constructor(){super(XTe,{type:"module"})}}const KTe=lv(YTe),QTe=Bu(async(e="",t)=>await KTe({map:e,options:t}),{normalizer:JSON.stringify}),JTe=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:xk}),ZTe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:JTe,parse:QTe},Symbol.toStringTag,{value:"Module"})),eke=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class tke extends Worker{constructor(){super(eke,{type:"module"})}}const nke=lv(tke),rke=Bu(async(e="",t)=>await nke({map:e,options:t}),{normalizer:JSON.stringify}),ike=e=>({...e,snap:ee.identity,nodeAt:ee.constant(0),pointOf:ee.constant({x:0,y:0}),matchNode:xk}),oke=Object.freeze(Object.defineProperty({__proto__:null,hydrate:ike,parse:rke},Symbol.toStringTag,{value:"Module"})),gz={grid:jTe,xy:ZTe,mesh:qTe,poly:oke},[ske,ake]=rc({busy:{}});function vz(e=""){return gz[e]}function eg({label:e,icon:t=C.jsx(qxe,{}),...n}){return C.jsxs(bn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[I.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(zt,{children:e})]})}const Ub="500";function lke(e){return parseInt(e.replace("#","0x"))}const yz={source:Ku.A400,destination:Xu.A400,updating:Hh[Ub],expanding:vq[Ub],generating:yq[Ub],closing:gq[Ub],end:Yu.A400};ee.mapValues(yz,lke);function Og(e){return(e&&yz[e])??g5[Ub]}function cke(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 uke(){return this.eachAfter(cke)}function dke(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 hke(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 mke(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function gke(e){for(var t=this,n=vke(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 vke(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 yke(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bke(){var e=[];return this.each(function(t){e.push(t)}),e}function xke(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function wke(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function bz(e,t){var n=new s1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=Ske);i=o.pop();)if(r&&(i.value=+i.data.value),(l=t(i.data))&&(d=l.length))for(i.children=new Array(d),c=d-1;c>=0;--c)o.push(s=i.children[c]=new s1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(Cke)}function _ke(){return bz(this).eachBefore(Eke)}function Ske(e){return e.children}function Eke(e){e.data=e.data.data}function Cke(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function s1(e){this.data=e,this.depth=this.height=0,this.parent=null}s1.prototype=bz.prototype={constructor:s1,count:uke,each:dke,eachAfter:hke,eachBefore:fke,sum:pke,sort:mke,path:gke,ancestors:yke,descendants:bke,leaves:xke,links:wke,copy:_ke};function Tke(e,t){return e.parent===t.parent?1:2}function hN(e){var t=e.children;return t?t[0]:e.t}function pN(e){var t=e.children;return t?t[t.length-1]:e.t}function kke(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 Ake(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 Rke(e,t,n){return e.a.parent===t.parent?e.a:n}function PS(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}PS.prototype=Object.create(s1.prototype);function Ike(e){for(var t=new PS(e,0),n,r=[t],i,o,s,l;n=r.pop();)if(o=n._.children)for(n.children=new Array(l=o.length),s=l-1;s>=0;--s)r.push(i=n.children[s]=new PS(o[s],s)),i.parent=n;return(t.parent=new PS(null,0)).children=[t],t}function Pke(){var e=Tke,t=1,n=1,r=null;function i(d){var f=Ike(d);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)d.eachBefore(c);else{var h=d,p=d,g=d;d.eachBefore(function(b){b.xp.x&&(p=b),b.depth>g.depth&&(g=b)});var v=h===p?1:e(h,p)/2,y=v-h.x,S=t/(p.x+v+y),_=n/(g.depth||1);d.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*_})}return d}function o(d){var f=d.children,h=d.parent.children,p=d.i?h[d.i-1]:null;if(f){Ake(d);var g=(f[0].z+f[f.length-1].z)/2;p?(d.z=p.z+e(d._,p._),d.m=d.z-g):d.z=g}else p&&(d.z=p.z+e(d._,p._));d.parent.A=l(d,p,d.parent.A||h[0])}function s(d){d._.x=d.z+d.parent.m,d.m+=d.parent.m}function l(d,f,h){if(f){for(var p=d,g=d,v=f,y=p.parent.children[0],S=p.m,_=g.m,b=v.m,x=y.m,E;v=pN(v),p=hN(p),v&&p;)y=hN(y),g=pN(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(kke(Rke(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!pN(g)&&(g.t=v,g.m+=b-_),p&&!hN(y)&&(y.t=p,y.m+=S-x,h=d)}return h}function c(d){d.x*=t,d.y=d.depth*n}return i.separation=function(d){return arguments.length?(e=d,i):e},i.size=function(d){return arguments.length?(r=!1,t=+d[0],n=+d[1],i):r?null:[t,n]},i.nodeSize=function(d){return arguments.length?(r=!0,t=+d[0],n=+d[1],i):r?[t,n]:null},i}var PF="http://www.w3.org/1999/xhtml";const FW={svg:"http://www.w3.org/2000/svg",xhtml:PF,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wk(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),FW.hasOwnProperty(t)?{space:FW[t],local:e}:e}function Oke(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===PF&&t.documentElement.namespaceURI===PF?t.createElement(e):t.createElementNS(n,e)}}function Mke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function NJ(e){var t=wk(e);return(t.local?Mke:Oke)(t)}function Dke(){}function xz(e){return e==null?Dke:function(){return this.querySelector(e)}}function Lke(e){typeof e!="function"&&(e=xz(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 sAe(e){e||(e=aAe);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 lAe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cAe(){return Array.from(this)}function uAe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?wAe:typeof t=="function"?SAe:_Ae)(e,t,n??"")):Mg(this.node(),e)}function Mg(e,t){return e.style.getPropertyValue(t)||jJ(e).getComputedStyle(e,null).getPropertyValue(t)}function CAe(e){return function(){delete this[e]}}function TAe(e,t){return function(){this[e]=t}}function kAe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function AAe(e,t){return arguments.length>1?this.each((t==null?CAe:typeof t=="function"?kAe:TAe)(e,t)):this.node()[e]}function UJ(e){return e.trim().split(/^|\s+/)}function wz(e){return e.classList||new HJ(e)}function HJ(e){this._node=e,this._names=UJ(e.getAttribute("class")||"")}HJ.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 WJ(e,t){for(var n=wz(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function nRe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function _z(){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}})}OS.prototype=_z.prototype={constructor:OS,on:function(e,t){var n=this._,r=fRe(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?g_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?g_(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=vRe.exec(e))?new Uo(t[1],t[2],t[3],1):(t=yRe.exec(e))?new Uo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bRe.exec(e))?g_(t[1],t[2],t[3],t[4]):(t=xRe.exec(e))?g_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wRe.exec(e))?qW(t[1],t[2]/100,t[3]/100,1):(t=_Re.exec(e))?qW(t[1],t[2]/100,t[3]/100,t[4]):jW.hasOwnProperty(e)?WW(jW[e]):e==="transparent"?new Uo(NaN,NaN,NaN,0):null}function WW(e){return new Uo(e>>16&255,e>>8&255,e&255,1)}function g_(e,t,n,r){return r<=0&&(e=t=n=NaN),new Uo(e,t,n,r)}function CRe(e){return e instanceof dw||(e=c1(e)),e?(e=e.rgb(),new Uo(e.r,e.g,e.b,e.opacity)):new Uo}function DF(e,t,n,r){return arguments.length===1?CRe(e):new Uo(e,t,n,r??1)}function Uo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Sz(Uo,DF,XJ(dw,{brighter(e){return e=e==null?qE:Math.pow(qE,e),new Uo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?a1:Math.pow(a1,e),new Uo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Uo(sp(this.r),sp(this.g),sp(this.b),XE(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:GW,formatHex:GW,formatHex8:TRe,formatRgb:VW,toString:VW}));function GW(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}`}function TRe(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}${Qh((isNaN(this.opacity)?1:this.opacity)*255)}`}function VW(){const e=XE(this.opacity);return`${e===1?"rgb(":"rgba("}${sp(this.r)}, ${sp(this.g)}, ${sp(this.b)}${e===1?")":`, ${e})`}`}function XE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qh(e){return e=sp(e),(e<16?"0":"")+e.toString(16)}function qW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Za(e,t,n,r)}function YJ(e){if(e instanceof Za)return new Za(e.h,e.s,e.l,e.opacity);if(e instanceof dw||(e=c1(e)),!e)return new Za;if(e instanceof Za)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new Za(s,l,c,e.opacity)}function kRe(e,t,n,r){return arguments.length===1?YJ(e):new Za(e,t,n,r??1)}function Za(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Sz(Za,kRe,XJ(dw,{brighter(e){return e=e==null?qE:Math.pow(qE,e),new Za(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?a1:Math.pow(a1,e),new Za(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 Uo(mN(e>=240?e-240:e+120,i,r),mN(e,i,r),mN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Za(XW(this.h),v_(this.s),v_(this.l),XE(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=XE(this.opacity);return`${e===1?"hsl(":"hsla("}${XW(this.h)}, ${v_(this.s)*100}%, ${v_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XW(e){return e=(e||0)%360,e<0?e+360:e}function v_(e){return Math.max(0,Math.min(1,e||0))}function mN(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 KJ=e=>()=>e;function ARe(e,t){return function(n){return e+n*t}}function RRe(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 IRe(e){return(e=+e)==1?QJ:function(t,n){return n-t?RRe(t,n,e):KJ(isNaN(t)?n:t)}}function QJ(e,t){var n=t-e;return n?ARe(e,n):KJ(isNaN(e)?t:e)}const YW=function e(t){var n=IRe(t);function r(i,o){var s=n((i=DF(i)).r,(o=DF(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=QJ(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=d(f),i+""}}return r.gamma=e,r}(1);function td(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var LF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gN=new RegExp(LF.source,"g");function PRe(e){return function(){return e}}function ORe(e){return function(t){return e(t)+""}}function MRe(e,t){var n=LF.lastIndex=gN.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=LF.exec(e))&&(i=gN.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:td(r,i)})),n=gN.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:td(d,f)})):f&&h.push(i(h)+"rotate("+f+r)}function l(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:td(d,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(d,f,h,p,g,v){if(d!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:td(d,h)},{i:y-2,x:td(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),s(d.rotate,f.rotate,h,p),l(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Dg}function JW(){Ep=(KE=u1.now())+_k,Dg=Hb=0;try{HRe()}finally{Dg=0,GRe(),Ep=0}}function WRe(){var e=u1.now(),t=e-KE;t>eZ&&(_k-=t,KE=e)}function GRe(){for(var e,t=YE,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:YE=n);Wb=e,BF(r)}function BF(e){if(!Dg){Hb&&(Hb=clearTimeout(Hb));var t=e-Ep;t>24?(e<1/0&&(Hb=setTimeout(JW,e-u1.now()-_k)),mb&&(mb=clearInterval(mb))):(mb||(KE=u1.now(),mb=setInterval(WRe,eZ)),Dg=1,tZ(JW))}}function ZW(e,t,n){var r=new QE;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var VRe=_z("start","end","cancel","interrupt"),qRe=[],rZ=0,eG=1,$F=2,MS=3,tG=4,FF=5,DS=6;function Sk(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;XRe(e,n,{name:t,index:r,group:i,on:VRe,tween:qRe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rZ})}function Cz(e,t){var n=bl(e,t);if(n.state>rZ)throw new Error("too late; already scheduled");return n}function oc(e,t){var n=bl(e,t);if(n.state>MS)throw new Error("too late; already running");return n}function bl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function XRe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=nZ(o,0,n.time);function o(d){n.state=eG,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var f,h,p,g;if(n.state!==eG)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===MS)return ZW(s);g.state===tG?(g.state=DS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+f$F&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function EIe(e,t,n){var r,i,o=SIe(t)?Cz:oc;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function CIe(e,t){var n=this._id;return arguments.length<2?bl(this.node(),n).on.on(e):this.each(EIe(n,e,t))}function TIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function kIe(){return this.on("end.remove",TIe(this._id))}function AIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xz(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function ZIe(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 hu(e,t,n){this.k=e,this.x=t,this.y=n}hu.prototype={constructor:hu,scale:function(e){return e===1?this:new hu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new hu(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 JE=new hu(1,0,0);hu.prototype;function vN(e){e.stopImmediatePropagation()}function gb(e){e.preventDefault(),e.stopImmediatePropagation()}function ePe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tPe(){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 nG(){return this.__zoom||JE}function nPe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rPe(){return navigator.maxTouchPoints||"ontouchstart"in this}function iPe(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 yN(){var e=ePe,t=tPe,n=iPe,r=nPe,i=rPe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=jRe,d=_z("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",nG).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,F,j,V){var G=D.selection?D.selection():D;G.property("__zoom",nG),D!==G?A(D,F,j,V):G.interrupt().each(function(){R(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(D,F,j,V){_.scaleTo(D,function(){var G=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return G*K},j,V)},_.scaleTo=function(D,F,j,V){_.transform(D,function(){var G=t.apply(this,arguments),K=this.__zoom,Y=j==null?E(G):typeof j=="function"?j.apply(this,arguments):j,J=K.invert(Y),ie=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,ie),Y,J),G,s)},j,V)},_.translateBy=function(D,F,j,V){_.transform(D,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,F,j,V,G){_.transform(D,function(){var K=t.apply(this,arguments),Y=this.__zoom,J=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(JE.translate(J[0],J[1]).scale(Y.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,G)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new hu(F,D.x,D.y)}function x(D,F,j){var V=F[0]-j[0]*D.k,G=F[1]-j[1]*D.k;return V===D.x&&G===D.y?D:new hu(D.k,V,G)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function A(D,F,j,V){D.on("start.zoom",function(){R(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,K=arguments,Y=R(G,K).event(V),J=t.apply(G,K),ie=j==null?E(J):typeof j=="function"?j.apply(G,K):j,ce=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),ue=G.__zoom,se=typeof F=="function"?F.apply(G,K):F,Q=c(ue.invert(ie).concat(ce/ue.k),se.invert(ie).concat(ce/se.k));return function(ae){if(ae===1)ae=se;else{var le=Q(ae),he=ce/le[2];ae=new hu(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}Y.zoom(null,ae)}})}function R(D,F,j){return!j&&D.__zooming||new k(D,F)}function k(D,F){this.that=D,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,F),this.taps=0}k.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=To(this.that).datum();d.call(D,this.that,new ZIe(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),F)}};function O(D,...F){if(!e.apply(this,arguments))return;var j=R(this,F).event(D),V=this.__zoom,G=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=Eh(D);if(j.wheel)(j.mouse[0][0]!==K[0]||j.mouse[0][1]!==K[1])&&(j.mouse[1]=V.invert(j.mouse[0]=K)),clearTimeout(j.wheel);else{if(V.k===G)return;j.mouse=[K,V.invert(K)],LS(this),j.start()}gb(D),j.wheel=setTimeout(Y,v),j.zoom("mouse",n(x(b(V,G),j.mouse[0],j.mouse[1]),j.extent,s));function Y(){j.wheel=null,j.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=R(this,F,!0).event(D),G=To(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=Eh(D,j),Y=D.clientX,J=D.clientY;pRe(D.view),vN(D),V.mouse=[K,this.__zoom.invert(K)],LS(this),V.start();function ie(ue){if(gb(ue),!V.moved){var se=ue.clientX-Y,Q=ue.clientY-J;V.moved=se*se+Q*Q>y}V.event(ue).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=Eh(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){G.on("mousemove.zoom mouseup.zoom",null),mRe(ue.view,V.moved),gb(ue),V.event(ue).end()}}function N(D,...F){if(e.apply(this,arguments)){var j=this.__zoom,V=Eh(D.changedTouches?D.changedTouches[0]:D,this),G=j.invert(V),K=j.k*(D.shiftKey?.5:2),Y=n(x(b(j,K),V,G),t.apply(this,F),s);gb(D),l>0?To(this).transition().duration(l).call(A,Y,V,D):To(this).call(_.transform,Y,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var j=D.touches,V=j.length,G=R(this,F,D.changedTouches.length===V).event(D),K,Y,J,ie;for(vN(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(A,R){if(A===null)return null;if(R===0)return A;var k,O;if(typeof A!="object")return A;if(n(A,r))k=new r;else if(n(A,i))k=new i;else if(n(A,o))k=new o(function(V,G){A.then(function(K){V(E(K,R-1))},function(K){G(E(K,R-1))})});else if(s.__isArray(A))k=[];else if(s.__isRegExp(A))k=new RegExp(A.source,h(A)),A.lastIndex&&(k.lastIndex=A.lastIndex);else if(s.__isDate(A))k=new Date(A.getTime());else{if(x&&Buffer.isBuffer(A))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(A.length):k=new Buffer(A.length),A.copy(k),k;n(A,Error)?k=Object.create(A):typeof y>"u"?(O=Object.getPrototypeOf(A),k=Object.create(O)):(k=Object.create(y),O=y)}if(g){var L=_.indexOf(A);if(L!=-1)return b[L];_.push(A),b.push(k)}n(A,r)&&A.forEach(function(V,G){var K=E(G,R-1),Y=E(V,R-1);k.set(K,Y)}),n(A,i)&&A.forEach(function(V){var G=E(V,R-1);k.add(G)});for(var N in A){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(k[N]=E(A[N],R-1))}if(Object.getOwnPropertySymbols)for(var W=Object.getOwnPropertySymbols(A),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Ni[e[t+0]]+Ni[e[t+1]]+Ni[e[t+2]]+Ni[e[t+3]]+"-"+Ni[e[t+4]]+Ni[e[t+5]]+"-"+Ni[e[t+6]]+Ni[e[t+7]]+"-"+Ni[e[t+8]]+Ni[e[t+9]]+"-"+Ni[e[t+10]]+Ni[e[t+11]]+Ni[e[t+12]]+Ni[e[t+13]]+Ni[e[t+14]]+Ni[e[t+15]]).toLowerCase();if(!cPe(n))throw TypeError("Stringified UUID is invalid");return n}function xN(e,t,n){e=e||{};var r=e.random||(e.rng||aPe)();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 uPe(r)}var zF={exports:{}},jF={exports:{}},dPe=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?de.createElement(LPe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),BPe=15,lG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},$Pe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:BPe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},lG.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},lG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let FPe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:$Pe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?To(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(To(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var GF=Math.PI,VF=2*GF,Bh=1e-6,zPe=VF-Bh;function qF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function xZ(){return new qF}qF.prototype=xZ.prototype={constructor:qF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Bh)if(!(Math.abs(f*l-c*d)>Bh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((GF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Bh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Bh||Math.abs(this._y1-d)>Bh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%VF+VF),h>zPe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Bh&&(this._+="A"+n+","+n+",0,"+ +(h>=GF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function cG(e){return function(){return e}}function jPe(e){return e[0]}function UPe(e){return e[1]}var HPe=Array.prototype.slice;function WPe(e){return e.source}function GPe(e){return e.target}function wZ(e){var t=WPe,n=GPe,r=jPe,i=UPe,o=null;function s(){var l,c=HPe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=xZ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:cG(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:cG(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function VPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function qPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function XPe(){return wZ(VPe)}function YPe(){return wZ(qPe)}class KPe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?To(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(To(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"?XPe()({source:[r.y,r.x],target:[i.y,i.x]}):YPe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const QPe=` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=lZ,t.componentWillReceiveProps=cZ),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=uZ;var l=t.componentDidUpdate;t.componentDidUpdate=function(d,f,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;l.call(this,d,f,p)}}return e}const mPe=Object.freeze(Object.defineProperty({__proto__:null,polyfill:pPe},Symbol.toStringTag,{value:"Module"})),gPe=oq(mPe);var Ek={};Ek.__esModule=!0;Ek.getChildMapping=yPe;Ek.mergeChildMappings=bPe;var vPe=I;function yPe(e){if(!e)return e;var t={};return vPe.Children.map(e,function(n){return n}).forEach(function(n){t[n.key]=n}),t}function bPe(e,t){e=e||{},t=t||{};function n(f){return t.hasOwnProperty(f)?t[f]:e[f]}var r={},i=[];for(var o in e)t.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var s=void 0,l={};for(var c in t){if(r.hasOwnProperty(c))for(s=0;se.enableLegacyTransitions?de.createElement(BPe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),FPe=15,aG={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},zPe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:FPe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},aG.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],l)=>de.createElement("tspan",Object.assign({key:`${o}-${l}`},aG.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let jPe=class extends de.Component{constructor(){super(...arguments),this.nodeRef=null,this.state={transform:this.setTransform(this.props.position,this.props.parent,this.props.orientation,!0),initialStyle:{opacity:0},wasClicked:!1},this.shouldNodeTransform=(t,n,r,i)=>n.subscriptions!==t.subscriptions||n.position.x!==t.position.x||n.position.y!==t.position.y||n.orientation!==t.orientation||i.wasClicked!==r.wasClicked,this.renderNodeElement=()=>{const{data:t,hierarchyPointNode:n,renderCustomNodeElement:r}=this.props,i=typeof r=="function"?r:zPe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,l=o?n.y:0;return r==="horizontal"?`translate(${l},${s})`:`translate(${s},${l})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?To(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(To(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return de.createElement("g",{id:t.__rd3t.id,ref:r=>{this.nodeRef=r},style:this.state.initialStyle,className:[t.children&&t.children.length>0?"rd3t-node":"rd3t-leaf-node",n].join(" ").trim(),transform:this.state.transform},this.renderNodeElement())}};var GF=Math.PI,VF=2*GF,Bh=1e-6,UPe=VF-Bh;function qF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function xZ(){return new qF}qF.prototype=xZ.prototype={constructor:qF,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,l=n-e,c=r-t,d=o-e,f=s-t,h=d*d+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Bh)if(!(Math.abs(f*l-c*d)>Bh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=l*l+c*c,y=p*p+g*g,S=Math.sqrt(v),_=Math.sqrt(h),b=i*Math.tan((GF-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Bh&&(this._+="L"+(e+x*d)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>d*g)+","+(this._x1=e+E*l)+","+(this._y1=t+E*c)}},arc:function(e,t,n,r,i,o){e=+e,t=+t,n=+n,o=!!o;var s=n*Math.cos(r),l=n*Math.sin(r),c=e+s,d=t+l,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+d:(Math.abs(this._x1-c)>Bh||Math.abs(this._y1-d)>Bh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%VF+VF),h>UPe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Bh&&(this._+="A"+n+","+n+",0,"+ +(h>=GF)+","+f+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function lG(e){return function(){return e}}function HPe(e){return e[0]}function WPe(e){return e[1]}var GPe=Array.prototype.slice;function VPe(e){return e.source}function qPe(e){return e.target}function wZ(e){var t=VPe,n=qPe,r=HPe,i=WPe,o=null;function s(){var l,c=GPe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=xZ()),e(o,+r.apply(this,(c[0]=d,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),l)return o=null,l+""||null}return s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(n=l,s):n},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:lG(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:lG(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function XPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function YPe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function KPe(){return wZ(XPe)}function QPe(){return wZ(YPe)}class JPe extends de.PureComponent{constructor(){super(...arguments),this.linkRef=null,this.state={initialStyle:{opacity:0}},this.handleOnClick=t=>{this.props.onClick(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOver=t=>{this.props.onMouseOver(this.props.linkData.source,this.props.linkData.target,t)},this.handleOnMouseOut=t=>{this.props.onMouseOut(this.props.linkData.source,this.props.linkData.target,t)}}componentDidMount(){this.applyOpacity(1,this.props.transitionDuration)}componentWillLeave(t){this.applyOpacity(0,this.props.transitionDuration,t)}applyOpacity(t,n,r=()=>{}){this.props.enableLegacyTransitions?To(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(To(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"?KPe()({source:[r.y,r.x],target:[i.y,i.x]}):QPe()({source:[r.x,r.y],target:[i.x,i.y]})}drawStraightPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?`M${r.y},${r.x}L${i.y},${i.x}`:`M${r.x},${r.y}L${i.x},${i.y}`}drawElbowPath(t,n){return n==="horizontal"?`M${t.source.y},${t.source.x}V${t.target.x}H${t.target.y}`:`M${t.source.x},${t.source.y}V${t.target.y}H${t.target.x}`}drawPath(){const{linkData:t,orientation:n,pathFunc:r}=this.props;return typeof r=="function"?r(t,n):r==="elbow"?this.drawElbowPath(t,n):r==="straight"?this.drawStraightPath(t,n):r==="step"?this.drawStepPath(t,n):this.drawDiagonalPath(t,n)}getClassNames(){const{linkData:t,orientation:n,pathClassFunc:r}=this.props,i=["rd3t-link"];return typeof r=="function"&&i.push(r(t,n)),i.join(" ").trim()}render(){const{linkData:t}=this.props;return de.createElement("path",{ref:n=>{this.linkRef=n},style:Object.assign({},this.state.initialStyle),className:this.getClassNames(),d:this.drawPath(),onClick:this.handleOnClick,onMouseOver:this.handleOnMouseOver,onMouseOut:this.handleOnMouseOut,"data-source-id":t.source.id,"data-target-id":t.target.id})}}const ZPe=` /* Tree */ .rd3t-tree-container { width: 100%; @@ -499,39 +499,39 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat fill: none; stroke: #000; } -`;let _Z=class Fa extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:Fa.assignInternalProperties(bo(this.props.data)),d3:Fa.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${xN()}`,this.gInstanceRef=`rd3t-g-${xN()}`,this.handleNodeToggle=t=>{const n=bo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(Fa.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):Fa.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=bo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=bo(n).map(c=>Fa.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=To(`.${this.gInstanceRef}`),l=To(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(yN().transform,ZE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:Fa.assignInternalProperties(bo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=Fa.calculateD3Geometry(t);return wx(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}),(!wx(this.props.translate,t.translate)||!wx(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?bo(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=To(`.${this.svgInstanceRef}`),d=To(`.${this.gInstanceRef}`);c.call(yN().transform,ZE.translate(i.x,i.y).scale(o)),c.call(yN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=xN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=Fa.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=>{Fa.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=>Fa.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=Rke().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)(xz(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(KPe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:A,parent:R}=_;return de.createElement(FPe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:_,parent:R,nodeClassName:this.getNodeClassName(R,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};_Z.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 JPe=ee.constant(!0),[$p,ZPe]=rc({layers:[]});function Ql(e,t=JPe){const[n,r]=I.useState(e),[{layers:i},o]=$p(),s=ee.filter(i,t),l=n?ee.find(s,{key:n}):ee.head(s);return I.useEffect(()=>{r(e)},[e]),I.useEffect(()=>{l&&l.key!==n&&r(l.key)},[l,n,r]),I.useMemo(()=>({key:l==null?void 0:l.key,setKey:r,layer:l,setLayer:c=>{const d={...l,...c};o(({layers:f})=>({layers:ee.map(f,h=>h.key===d.key?d:h)}))},layers:s}),[l,o,s])}function d1(){return d1=Object.assign||function(e){for(var t=1;tawait m2e(e),[e])}function CZ(e,t){const n=I.useMemo(()=>e,t);return g2e(n)}const dG=C.jsx(nc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),v2e=_Z;function TZ(e,t=!1){const[n,r]=I.useState();return I.useEffect(()=>{t||e&&r(e)},[e,t]),n}const fG={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"}},y2e={horizontal:{value:"horizontal"},vertical:{value:"vertical"}};function b2e(){var x,E,A,R,k;const{palette:e}=In(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=Ql(),s=nQ(((x=r==null?void 0:r.source)==null?void 0:x.step)??0,600),{controls:l,onChange:c,state:d}=Lu(),[f,h]=I.useState("small"),[p,g]=I.useState("horizontal"),v=kg({"&.rd3t-link":{stroke:wn(e.text.primary,e.action.disabledOpacity)}}),{result:y,loading:S}=CZ({trace:(A=(E=r==null?void 0:r.source)==null?void 0:E.trace)==null?void 0:A.content,step:s,radius:fG[f].value},[s,r,f]),_=TZ(y,S),b=I.useCallback(()=>v,[v]);return C.jsxs(Sn,{onChange:c,stack:d,children:[C.jsx(Sn.Content,{children:C.jsx(_n,{children:(k=(R=r==null?void 0:r.source)==null?void 0:R.trace)!=null&&k.content&&(_!=null&&_.tree)?C.jsx(vk,{children:({width:O,height:L})=>C.jsx(dt,{width:O,height:L,children:C.jsx(v2e,{scaleExtent:{max:10,min:.01},orientation:p,translate:{x:O/2,y:O/2},data:_.tree,dimensions:{width:O,height:L},separation:{siblings:1,nonSiblings:1},pathClassFunc:b,renderCustomNodeElement:({nodeDatum:N,onNodeClick:H})=>{var W;return C.jsx(x2e,{node:N,onClick:()=>H==null?void 0:H({}),step:(W=r==null?void 0:r.source)==null?void 0:W.step,onStep:z=>i(to(r,D=>{ee.set(D,"source.step",z)}))})}})})}):C.jsx(eg,{icon:C.jsx(GK,{}),label:"Tree"})})})," ",C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:t,items:ee.map(o,O=>({id:O.key,name:Fo(O)})),onChange:n,showArrow:!0}),dG,C.jsx(Ro,{icon:C.jsx(Wxe,{}),label:"Radius",value:f,onChange:O=>h(O),items:ee.map(ee.entries(fG),([O,L])=>({id:O,...L})),showArrow:!0}),dG,C.jsx(Ro,{icon:C.jsx(Ixe,{}),label:"Orientation",value:p,onChange:O=>g(O),items:ee.entries(y2e).map(([O,L])=>({id:O,name:ee.startCase(L.value)})),showArrow:!0})]}),C.jsx(Sn.Extras,{children:l})]})}const vb=16,eu=4;function x2e({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=In(),l=ee.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!ee.find(t==null?void 0:t.events,h=>h.step===n),d=Og((f=l==null?void 0:l.data)==null?void 0:f.type);return C.jsx(ef,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:`f: ${((p=l==null?void 0:l.data)==null?void 0:p.f)??"unknown"}, g: ${((g=l==null?void 0:l.data)==null?void 0:g.g)??"unknown"}`,children:C.jsxs("g",{onClick:v=>{h.open(v)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,width:o(vb),height:o(eu),rx:s.borderRadius})}),C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(vb),height:o(eu),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,fill:wn(i.primary.main,i.action.selectedOpacity),width:o(vb),height:o(eu),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-eu/2),height:o(eu),width:o(.5),fill:d,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:o(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:o(4),fill:i.text.secondary,y:0,x:o(vb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(VK,{width:o(2),height:o(2),x:o(vb-2-1),y:o(-eu/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(Jd,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...ov(h),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:ee.map(t==null?void 0:t.events,v=>C.jsx(Hl,{selected:v.step===n,sx:{borderLeft:`4px solid ${Og(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),ee.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(eQ,{primary:ee.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function w2e({selection:e,onClose:t}){const n=_2e(),r=TZ(e),{client:i}=e??{};return C.jsx(Jd,{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(Y1,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ee.entries(o);return s.length?ee.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(nc,{sx:{my:1,mx:2}}),c&&C.jsx(Qm,{sx:{py:0},children:C.jsx(zt,{color:"text.secondary",variant:"overline",children:c})}),ee.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(Hl,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Ul,{children:p}),C.jsx(ol,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Qm,{children:[p&&C.jsx(Ul,{children:p}),C.jsx(ol,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Qm,{children:C.jsx(zt,{children:"No info to show."})})})}})})})}const hG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function _2e(){const[{layers:e}]=$p();return I.useMemo(()=>ee.chain(e).reduce((t,n)=>{var i;const r=((i=KZ(n))==null?void 0:i.getSelectionInfo)??hG;return({children:o,event:s})=>C.jsx(r,{layer:n.key,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ee.merge(l,c))})})},hG).value(),[e])}const[Tk,S2e]=rc([],{reduce:rQ}),E2e={tileSubdivision:1,workerCount:8,tileResolution:{width:ee.round(256*devicePixelRatio),height:ee.round(256*devicePixelRatio)}},kZ=I.createContext({});function C2e(){return I.useContext(kZ)}function T2e(e,{width:t,height:n}={}){const r=In(),[i]=Tk(),o=I.useRef(null),[s,l]=I.useState(""),[c,d]=I.useState();return I.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ee.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...E2e,screenSize:{width:t,height:n},backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ee.map,e,i,r,l,d]),f1e(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function k2e(){const[{map:e,specimen:t}]=yk();return!!(e||t)&&C.jsx(X1,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function A2e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=T2e(n,{width:e,height:t}),[c,d]=I.useState();I.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=I.useMemo(()=>({renderer:o}),[o]);return I.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(k2e,{}),C.jsx(kZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(dt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(wxe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(dt,{ref:l,children:i.map((h,p)=>C.jsx(cDe,{index:p,layer:h},h.key))})}):C.jsx(eg,{icon:C.jsx(ZK,{}),label:"No layers to render",width:e,height:t})}),C.jsx(w2e,{selection:c,onClose:()=>d(void 0)})]})}function f1({nodes:e}){const{renderer:t}=C2e();return I.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function R2e({nodes:e,step:t}){const r=ee.floor((t??0)/200)*200,i=I.useMemo(()=>ee.slice(e,0,r),[e,r]),o=I.useMemo(()=>ee.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(f1,{nodes:i}),C.jsx(f1,{nodes:o})]})}const AZ=(e,t,n)=>{const r=I.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return I.useEffect(o?()=>void e():()=>{},o?t:s)};function I2e(e,t){return ee.zip(e,t).every(([n,r])=>n===r)}const P2e=(e,t=[],n=[])=>{const[r,i]=I.useState(t),[o,s]=I.useState(n);return I.useEffect(()=>{I2e(o,n)||(i(t),s(n))},[t,n,o]),EZ(e,[...r,...o])};function Mz(){const[e]=Pg();return I.useCallback(t=>ee.find(e,t),[e])}function O2e(e){return Mz()({url:e})}function M2e(e){const t=ml(),n=tf("map"),r=Mz(),i=I.useMemo(()=>Bu(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return uv(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function D2e(e){const t=ml(),n=In(),r=tf("map"),{format:i,content:o}=e??{};return uv(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Kg:Yg;if(i&&o){t("Processing map...");const d=await((c=(l=yz(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const L2e={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ee.startCase(e.source.map.format)})`:"Untitled Map"},editor:Ig(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(o1,{label:"Source",content:C.jsx(PTe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ee.set(i,"source.map",r))})})})}),renderer:({layer:e,index:t})=>{var i;const{nodes:n}=((i=e==null?void 0:e.source)==null?void 0:i.parsedMap)??{},r=I.useMemo(()=>[ee.map(n,o=>({...o,meta:{...o.meta,sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))],[n,t,e==null?void 0:e.transparency,e==null?void 0:e.displayMode]);return C.jsx(f1,{nodes:r})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Ig(({value:e,produce:t})=>{var i;const{result:n}=M2e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=D2e(n);return AZ(()=>void t(o=>{ee.set(o,"source.parsedMap",r),ee.set(o,"viewKey",Fi())}),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Ql(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:l,node:c}=I.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=yz((h=(f=r==null?void 0:r.source)==null?void 0:f.map)==null?void 0:h.format))==null?void 0:p.hydrate)==null?void 0:g.call(p,s);if(v){const y=(t==null?void 0:t.world)&&v.snap(t.world);if(y){const S=(t==null?void 0:t.world)&&v.nodeAt(y);return{point:y,node:S}}}}return{}},[s,t]),d=I.useMemo(()=>({...r&&l&&!ee.isUndefined(c)&&{[r.key]:{primary:Fo(r),items:{point:{primary:"Point",secondary:`(${ee.round(l.x,2)}, ${ee.round(l.y,2)})`}}}}}),[l,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(d)})}};var _N=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,wo,BS,N2e={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},qu;function SN(e){return _N.lastIndex=0,_N.test(e)?'"'+e.replace(_N,function(t){var n=N2e[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function $S(e,t,n){var r,i,o,s,l=wo,c,d=t[e];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(e)),typeof qu=="function"&&(d=qu.call(t,e,d)),typeof d){case"string":return SN(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(wo+=BS,c=[],Object.prototype.toString.apply(d)==="[object Array]"){for(s=d.length,r=0;rn?`[ +`;let _Z=class Fa extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:Fa.assignInternalProperties(bo(this.props.data)),d3:Fa.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${xN()}`,this.gInstanceRef=`rd3t-g-${xN()}`,this.handleNodeToggle=t=>{const n=bo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(Fa.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):Fa.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=bo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=bo(n).map(c=>Fa.assignInternalProperties([c],s+1));o.children.push(...l.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(bo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(bo(t),bo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=To(`.${this.gInstanceRef}`),l=To(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let d,f;r==="horizontal"?(f=-t.x*c+n.height/2,d=-t.y*c+n.width/2):(d=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+d+","+f+")scale("+c+")"),l.call(yN().transform,JE.translate(d,f).scale(i))}},this.getNodeClassName=(t,n)=>{const{rootNodeClassName:r,branchNodeClassName:i,leafNodeClassName:o}=this.props;return t!=null?n.children?i:o:r}}static getDerivedStateFromProps(t,n){let r=null;const i=!t.dataKey||n.dataKey!==t.dataKey;t.data!==n.dataRef&&i&&(r={dataRef:t.data,data:Fa.assignInternalProperties(bo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=Fa.calculateD3Geometry(t);return wx(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}),(!wx(this.props.translate,t.translate)||!wx(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?bo(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:l}=t,c=To(`.${this.svgInstanceRef}`),d=To(`.${this.gInstanceRef}`);c.call(yN().transform,JE.translate(i.x,i.y).scale(o)),c.call(yN().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>l?f.target.classList.contains(this.svgInstanceRef)||f.target.classList.contains(this.gInstanceRef)||f.shiftKey:!0).on("zoom",f=>{!this.props.draggable&&["mousemove","touchmove","dblclick"].includes(f.sourceEvent.type)||(d.attr("transform",f.transform),typeof s=="function"&&(s({node:null,zoom:f.transform.k,translate:{x:f.transform.x,y:f.transform.y}}),this.state.d3.scale=f.transform.k,this.state.d3.translate={x:f.transform.x,y:f.transform.y}))}))}static assignInternalProperties(t,n=0){return(Array.isArray(t)?t:[t]).map(i=>{const o=i;return o.__rd3t={id:null,depth:null,collapsed:!1},o.__rd3t.id=xN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=Fa.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=>{Fa.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=>Fa.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=Pke().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)(bz(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let d=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(d,t),n&&d.forEach(h=>{h.y=h.depth*n}),{nodes:d,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(JPe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:_,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((_,b)=>{const{data:x,x:E,y:A,parent:R}=_;return de.createElement(jPe,{key:"node-"+b,data:x,position:{x:E,y:A},hierarchyPointNode:_,parent:R,nodeClassName:this.getNodeClassName(R,x),renderCustomNodeElement:r,nodeSize:l,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};_Z.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 e2e=ee.constant(!0),[$p,t2e]=rc({layers:[]});function Jl(e,t=e2e){const[n,r]=I.useState(e),[{layers:i},o]=$p(),s=ee.filter(i,t),l=n?ee.find(s,{key:n}):ee.head(s);return I.useEffect(()=>{r(e)},[e]),I.useEffect(()=>{l&&l.key!==n&&r(l.key)},[l,n,r]),I.useMemo(()=>({key:l==null?void 0:l.key,setKey:r,layer:l,setLayer:c=>{const d={...l,...c};o(({layers:f})=>({layers:ee.map(f,h=>h.key===d.key?d:h)}))},layers:s}),[l,o,s])}function d1(){return d1=Object.assign||function(e){for(var t=1;tawait v2e(e),[e])}function CZ(e,t){const n=I.useMemo(()=>e,t);return y2e(n)}const uG=C.jsx(gl,{orientation:"vertical",flexItem:!0,sx:{m:1}}),b2e=_Z;function TZ(e,t=!1){const[n,r]=I.useState();return I.useEffect(()=>{t||e&&r(e)},[e,t]),n}const dG={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"}},x2e={horizontal:{value:"horizontal"},vertical:{value:"vertical"}};function w2e(){var x,E,A,R,k;const{palette:e}=Cn(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=Jl(),s=tQ(((x=r==null?void 0:r.source)==null?void 0:x.step)??0,600),{controls:l,onChange:c,state:d}=Lu(),[f,h]=I.useState("small"),[p,g]=I.useState("horizontal"),v=kg({"&.rd3t-link":{stroke:_n(e.text.primary,e.action.disabledOpacity)}}),{result:y,loading:S}=CZ({trace:(A=(E=r==null?void 0:r.source)==null?void 0:E.trace)==null?void 0:A.content,step:s,radius:dG[f].value},[s,r,f]),_=TZ(y,S),b=I.useCallback(()=>v,[v]);return C.jsxs(Sn,{onChange:c,stack:d,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:(k=(R=r==null?void 0:r.source)==null?void 0:R.trace)!=null&&k.content&&(_!=null&&_.tree)?C.jsx(gk,{children:({width:O,height:L})=>C.jsx(dt,{width:O,height:L,children:C.jsx(b2e,{scaleExtent:{max:10,min:.01},orientation:p,translate:{x:O/2,y:O/2},data:_.tree,dimensions:{width:O,height:L},separation:{siblings:1,nonSiblings:1},pathClassFunc:b,renderCustomNodeElement:({nodeDatum:N,onNodeClick:H})=>{var W;return C.jsx(_2e,{node:N,onClick:()=>H==null?void 0:H({}),step:(W=r==null?void 0:r.source)==null?void 0:W.step,onStep:z=>i(to(r,D=>{ee.set(D,"source.step",z)}))})}})})}):C.jsx(eg,{icon:C.jsx(WK,{}),label:"Tree"})})})," ",C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:t,items:ee.map(o,O=>({id:O.key,name:Fo(O)})),onChange:n,showArrow:!0}),uG,C.jsx(Ro,{icon:C.jsx(Vxe,{}),label:"Radius",value:f,onChange:O=>h(O),items:ee.map(ee.entries(dG),([O,L])=>({id:O,...L})),showArrow:!0}),uG,C.jsx(Ro,{icon:C.jsx(Pxe,{}),label:"Orientation",value:p,onChange:O=>g(O),items:ee.entries(x2e).map(([O,L])=>({id:O,name:ee.startCase(L.value)})),showArrow:!0})]}),C.jsx(Sn.Extras,{children:l})]})}const vb=16,eu=4;function _2e({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=Cn(),l=ee.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!ee.find(t==null?void 0:t.events,h=>h.step===n),d=Og((f=l==null?void 0:l.data)==null?void 0:f.type);return C.jsx(ef,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:`f: ${((p=l==null?void 0:l.data)==null?void 0:p.f)??"unknown"}, g: ${((g=l==null?void 0:l.data)==null?void 0:g.g)??"unknown"}`,children:C.jsxs("g",{onClick:v=>{h.open(v)},children:[C.jsx("clipPath",{id:"clipPath",children:C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,width:o(vb),height:o(eu),rx:s.borderRadius})}),C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(vb),height:o(eu),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-eu/2),x:o(-.25),strokeWidth:0,fill:_n(i.primary.main,i.action.selectedOpacity),width:o(vb),height:o(eu),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-eu/2),height:o(eu),width:o(.5),fill:d,strokeWidth:0,clipPath:"url(#clipPath)"}),C.jsx("text",{strokeWidth:0,height:o(4),fill:i.text.primary,y:0,fontWeight:500,fontSize:"0.875rem",x:o(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:o(4),fill:i.text.secondary,y:0,x:o(vb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(GK,{width:o(2),height:o(2),x:o(vb-2-1),y:o(-eu/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(Jd,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...ov(h),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:ee.map(t==null?void 0:t.events,v=>C.jsx(Wl,{selected:v.step===n,sx:{borderLeft:`4px solid ${Og(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),ee.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(ZK,{primary:ee.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function S2e({selection:e,onClose:t}){const n=E2e(),r=TZ(e),{client:i}=e??{};return C.jsx(Jd,{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(Y1,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=ee.entries(o);return s.length?ee.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(gl,{sx:{my:1,mx:2}}),c&&C.jsx(Qm,{sx:{py:0},children:C.jsx(zt,{color:"text.secondary",variant:"overline",children:c})}),ee.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(Wl,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(ol,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Qm,{children:[p&&C.jsx(ol,{children:p}),C.jsx(sl,{primary:g,sx:{mr:4}}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Qm,{children:C.jsx(zt,{children:"No info to show."})})})}})})})}const fG=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function E2e(){const[{layers:e}]=$p();return I.useMemo(()=>ee.chain(e).reduce((t,n)=>{var i;const r=((i=KZ(n))==null?void 0:i.getSelectionInfo)??fG;return({children:o,event:s})=>C.jsx(r,{layer:n.key,event:s,children:l=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(ee.merge(l,c))})})},fG).value(),[e])}const[Ck,C2e]=rc([],{reduce:nQ}),T2e={tileSubdivision:1,workerCount:8,tileResolution:{width:ee.round(256*devicePixelRatio),height:ee.round(256*devicePixelRatio)}},kZ=I.createContext({});function k2e(){return I.useContext(kZ)}function A2e(e,{width:t,height:n}={}){const r=Cn(),[i]=Ck(),o=I.useRef(null),[s,l]=I.useState(""),[c,d]=I.useState();return I.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=ee.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...T2e,screenSize:{width:t,height:n},backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),d(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),d(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,ee.map,e,i,r,l,d]),p1e(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function R2e(){const[{map:e,specimen:t}]=vk();return!!(e||t)&&C.jsx(X1,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function I2e({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=A2e(n,{width:e,height:t}),[c,d]=I.useState();I.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;d({client:{x:v.clientX,y:v.clientY},world:g.world,info:{point:g.world,components:g.components}})};return o.on("click",h),()=>void o.off("click",h)}},[o]);const f=I.useMemo(()=>({renderer:o}),[o]);return I.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(R2e,{}),C.jsx(kZ.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(dt,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(_xe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(dt,{ref:l,children:i.map((h,p)=>C.jsx(dDe,{index:p,layer:h},h.key))})}):C.jsx(eg,{icon:C.jsx(JK,{}),label:"No layers to render",width:e,height:t})}),C.jsx(S2e,{selection:c,onClose:()=>d(void 0)})]})}function f1({nodes:e}){const{renderer:t}=k2e();return I.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function P2e({nodes:e,step:t}){const r=ee.floor((t??0)/200)*200,i=I.useMemo(()=>ee.slice(e,0,r),[e,r]),o=I.useMemo(()=>ee.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(f1,{nodes:i}),C.jsx(f1,{nodes:o})]})}const AZ=(e,t,n)=>{const r=I.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return I.useEffect(o?()=>void e():()=>{},o?t:s)};function O2e(e,t){return ee.zip(e,t).every(([n,r])=>n===r)}const M2e=(e,t=[],n=[])=>{const[r,i]=I.useState(t),[o,s]=I.useState(n);return I.useEffect(()=>{O2e(o,n)||(i(t),s(n))},[t,n,o]),EZ(e,[...r,...o])};function Oz(){const[e]=Pg();return I.useCallback(t=>ee.find(e,t),[e])}function D2e(e){return Oz()({url:e})}function L2e(e){const t=vl(),n=tf("map"),r=Oz(),i=I.useMemo(()=>Bu(async({source:c,id:d}={})=>{if(c&&d){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:d});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:l}=e??{};return uv(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function N2e(e){const t=vl(),n=Cn(),r=tf("map"),{format:i,content:o}=e??{};return uv(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?Kg:Yg;if(i&&o){t("Processing map...");const d=await((c=(l=vz(i))==null?void 0:l.parse)==null?void 0:c.call(l,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${d.nodes.length} elements, ${d.log.join(", ")}`),d}}),[i,o,n])}const B2e={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${ee.startCase(e.source.map.format)})`:"Untitled Map"},editor:Ig(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(o1,{label:"Source",content:C.jsx(MTe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>ee.set(i,"source.map",r))})})})}),renderer:({layer:e,index:t})=>{var i;const{nodes:n}=((i=e==null?void 0:e.source)==null?void 0:i.parsedMap)??{},r=I.useMemo(()=>[ee.map(n,o=>({...o,meta:{...o.meta,sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))],[n,t,e==null?void 0:e.transparency,e==null?void 0:e.displayMode]);return C.jsx(f1,{nodes:r})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Ig(({value:e,produce:t})=>{var i;const{result:n}=L2e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=N2e(n);return AZ(()=>void t(o=>{ee.set(o,"source.parsedMap",r),ee.set(o,"viewKey",li())}),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Jl(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:l,node:c}=I.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=vz((h=(f=r==null?void 0:r.source)==null?void 0:f.map)==null?void 0:h.format))==null?void 0:p.hydrate)==null?void 0:g.call(p,s);if(v){const y=(t==null?void 0:t.world)&&v.snap(t.world);if(y){const S=(t==null?void 0:t.world)&&v.nodeAt(y);return{point:y,node:S}}}}return{}},[s,t]),d=I.useMemo(()=>({...r&&l&&!ee.isUndefined(c)&&{[r.key]:{primary:Fo(r),items:{point:{primary:"Point",secondary:`(${ee.round(l.x,2)}, ${ee.round(l.y,2)})`}}}}}),[l,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(d)})}};var _N=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,wo,NS,$2e={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},qu;function SN(e){return _N.lastIndex=0,_N.test(e)?'"'+e.replace(_N,function(t){var n=$2e[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function BS(e,t,n){var r,i,o,s,l=wo,c,d=t[e];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(e)),typeof qu=="function"&&(d=qu.call(t,e,d)),typeof d){case"string":return SN(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(wo+=NS,c=[],Object.prototype.toString.apply(d)==="[object Array]"){for(s=d.length,r=0;rn?`[ `+wo+c.join(`, `+wo)+` -`+l+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",wo=l,o}if(qu&&typeof qu=="object")for(s=qu.length,r=0;rn?`{ +`+l+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",wo=l,o}if(qu&&typeof qu=="object")for(s=qu.length,r=0;rn?`{ `+wo+c.join(`, `+wo)+` -`+l+"}":"{ "+c.join(", ")+" }":"{"+c.join(",")+"}",wo=l,o}}function B2e(e,t,n,r){var i;if(wo="",BS="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;inew Function("params",`${e}; return ${t}.apply(null, params);`));function j2e(e,t,n){try{return z2e(e,t)(n)}catch{return fJ[t].defaultReturnValue}}function IZ(e){var d;const{layer:t}=Ql(e),{monotonicF:n,monotonicG:r,breakpoints:i,code:o,trace:s}=(t==null?void 0:t.source)??{},l=s==null?void 0:s.content,{result:c}=CZ({trace:l,step:(d=l==null?void 0:l.events)==null?void 0:d.length,radius:void 0},[l]);return I.useMemo(()=>{const f=(l==null?void 0:l.events)??[],h=PZ((c==null?void 0:c.tree)??[]);return Bu(p=>{var v,y;const g=f[p];if(g)try{for(const{active:S,condition:_,type:b,property:x="",reference:E=0}of i??[]){const A=!b||b===g.type;if(S&&A&&(()=>{var k;return(k=_==null?void 0:_.apply)==null?void 0:k.call(_,{type:b,event:g,property:x,value:ee.get(g,x),reference:E,step:p,events:f,node:h[p]})})())return _!=null&&_.needsReference?{result:`${x} ${ee.toLower(ee.startCase(_==null?void 0:_.key))} ${E}`}:{result:`${x} ${ee.toLower(ee.startCase(_==null?void 0:_.key))}`}}if(j2e(o??"","shouldBreak",[p,g,f,(v=h[p])==null?void 0:v.parent,(y=h[p])==null?void 0:y.children]))return{result:"Script editor"}}catch(S){return{error:`${S}`}}return{result:""}})},[o,l,i,n,r,c])}function PZ(e=[],t={}){for(const n of e){for(const r of n.events)t[r.step]=n;PZ(n.children,t)}return t}function U2e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function Dz(e){const{layer:t,setLayer:n}=Ql(e),r=ml(),i=IZ(e),{playback:o,playbackTo:s,step:l=0}=(t==null?void 0:t.source)??{},c=ee.min([s,l])??0,d=!!s,f=o==="playing",[h,p]=[0,(s??1)-1];return I.useMemo(()=>{function g(E){n(to(t,A=>ee.set(A,"source",{...A==null?void 0:A.source,...E})))}const v={start:h,end:p,step:c,canPlay:d&&!f&&c0},y=(E=0)=>{g({playback:"paused",step:b(E)})},S=(E=1)=>g({playback:"playing",step:b(E)}),_=(E,A=0)=>U2e(async()=>{for(const R of ee.range(A,E)){const k=i(c+R);if(k.result||k.error)return{...k,offset:R}}return{result:"",offset:0,error:void 0}},({result:R,offset:k,error:O})=>{O?(r(`${ee.trimEnd(O,".")}`,`Step ${c+k}`),y()):R?(r(`Breakpoint hit: ${R}`,`Step ${c+k}`),y(k)):S(E)}),b=E=>ee.clamp(c+E,h,p);return{playing:o==="playing",...v,...{play:()=>{g({playback:"playing",step:b(1)})},pause:y,stepTo:(E=0)=>g({step:E}),stop:()=>g({step:h,playback:"paused"}),stepForward:()=>g({step:b(1)}),stepBackward:()=>g({step:b(-1)}),tick:S,stepWithBreakpointCheck:_}}},[p,o,f,d,h,c,n])}function H2e({children:e,value:t}){const{step:n,end:r,playing:i,pause:o,stepWithBreakpointCheck:s}=Dz(t==null?void 0:t.key),[{playbackRate:l=1}]=Nu();return I.useEffect(()=>{if(i){let c=ee.noop;const d=setInterval(()=>{n{c(),clearInterval(d)}}},[s,i,r,n,o,l]),C.jsx(C.Fragment,{children:e})}function W2e({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:l,play:c,stepBackward:d,stepForward:f,stop:h,stepWithBreakpointCheck:p,step:g,end:v}=Dz(e==null?void 0:e.key);return C.jsxs(C.Fragment,{children:[C.jsx(Gh,{label:"step-backward",icon:C.jsx(Exe,{}),onClick:d,disabled:!i}),C.jsx(Gh,{...t?{label:"pause",icon:C.jsx(Nxe,{}),onClick:()=>l(),disabled:!n}:{label:"play",icon:C.jsx($xe,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(Gh,{label:"step-forward",icon:C.jsx(VK,{}),onClick:f,disabled:!o}),C.jsx(Gh,{label:"step-to-next-breakpoint",icon:C.jsx(jxe,{}),onClick:()=>{p(v-g,1)},disabled:!o}),C.jsx(Gh,{label:"stop",icon:C.jsx(Uxe,{}),onClick:h,disabled:!s})]})}function pG(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:ee.truncate(JSON.stringify(e).replace(` -`,", "),{length:30})})}}function mG({label:e,value:t,type:n}){return C.jsxs(_n,{width:"auto",mr:3,mb:.5,children:[C.jsx(zt,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(vi,{}),C.jsx(zt,{component:"div",variant:"body2",...n,children:pG(t)??"none"})]},`${e}::${pG(t)}`)}function tC({event:e,variant:t="body2",max:n=10,...r}){const i=ee.filter(ee.entries(e),([,o])=>o!==void 0);return C.jsxs(_n,{...r,children:[ee.map(ee.slice(i,0,n),([o,s],l)=>C.jsx(mG,{label:o,value:s,type:{variant:t}},l)),i.length>n&&C.jsx(mG,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var OZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,l){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(l){var c=l===void 0?{}:l,d=c.ESCAPE,f=d===void 0?/^\\/:d,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,_=c.PIPE_PARAMETER_START,b=_===void 0?/^\s*:\s*/:_,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,A=c.QUOTED_STRING_TEST,R=A===void 0?null:A,k=c.QUOTED_STRING_GET_AND_ADVANCE,O=k===void 0?null:k,L=c.QUOTED_STRING_IN_PARAMETER_TEST,N=L===void 0?null:L,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,W=H===void 0?null:H,z=R||function(V){return E.test(V)},D=O||s(E),F=N||function(V){return E.test(V)},j=W||s(E);return function(V){function G(Ie){Ie===void 0&&(Ie=1),pe=pe.substr(Ie)}function K(Ie){Ie===void 0&&(Ie=/^/),G(pe.match(Ie)[0].length)}function Y(){var Ie;return K(f),Ie=pe.length>0?pe[0]:"",G(),Ie}function J(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;me={name:"",pipes:[]},qe=!it}function ie(){ve.variables.push(me),J({isNull:!0})}function ce(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;be={name:"",parameters:[]},at=!it}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;Qe="",Nt=!it}function Q(){be.parameters.push(Qe),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&Q(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Qe="",qe=!1,at=!1,Nt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=Y();continue}if(p.test(pe)){ye=1,J(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],G();break;case 1:if(f.test(pe)){me.name+=Y();continue}if(ae()||le())continue;if(z(pe)){me.name+=D(pe,G);continue}me.name+=pe[0],G();break;case 2:if(f.test(pe)){be.name+=Y();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=D(pe,G);continue}be.name+=pe[0],G();break;case 3:if(f.test(pe)){Qe+=Y();continue}if(ae()||he()||le())continue;if(F(pe)){Qe+=j(pe,G);continue}Qe+=pe[0],G()}return Nt&&be.parameters.push(Qe),at&&me.pipes.push(be),qe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(l){return function(c,d){var f=c.match(l);return d(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var l in s)r.hasOwnProperty(l)||(r[l]=s[l])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function l(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return l(d.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var d=i(0);r.evaluateParsedString=l,r.evaluateStringTemplate=c}])})})(OZ);var MZ=OZ.exports;function G2e(e={},t){const n={};for(const r of Object.keys(e))n[r]=r==="$"?e[r]:t(e[r],r,e);return Object.setPrototypeOf(n,e)}function XF(e){switch(e==null?void 0:e.constructor){case Array:{const t=ee.map(e,XF);return n=>ee.map(t,r=>r(n))}case Object:{const t=ee.mapValues(e,XF);return n=>ee.mapValues(t,r=>r(n))}case String:return YF(e);default:return()=>e}}function V2e(e={}){return G2e(e,t=>ee.isFunction(t)?t:XF(t))}const gG=e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(V2e(n),{get(r,i){return typeof(r==null?void 0:r[i])=="function"?r[i]({}):r==null?void 0:r[i]}}))},q2e=/^\{\{\s*/,X2e=/^\s*\}\}/,EN=/\b\B/,Y2e=MZ.parseStringTemplateGenerator({VARIABLE_START:q2e,VARIABLE_END:X2e,PIPE_START:EN,PIPE_PARAMETER_START:EN,QUOTED_STRING:EN}),YF=Bu(e=>{const t=Y2e(e);return ee.join(t.literals,"")?n=>MZ.evaluateParsedString(t,{},{},r=>gG(r)(n)):gG(t.variables[0].name)},{primitive:!0});function K2e(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 DZ={exports:{}};(function(e,t){(function(n,r){typeof K2e=="function"?e.exports=r():n.pluralize=r()})(Bt,function(){var n=[],r=[],i={},o={},s={};function l(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function d(y,S){return y.replace(/\$(\d{1,2})/g,function(_,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(_,b){var x=d(S[1],arguments);return c(_===""?y[b-1]:_,x)})}function h(y,S,_){if(!y.length||i.hasOwnProperty(y))return S;for(var b=_.length;b--;){var x=_[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,_){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,_)}}function g(y,S,_,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,_)===E}}function v(y,S,_){var b=S===1?v.singular(y):v.plural(y);return(_?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([l(y),S])},v.addSingularRule=function(y,S){r.push([l(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(DZ);var Q2e=DZ.exports;const J2e=js(Q2e),Z2e=""+new URL("parseTrace.worker-413a1f44.js",import.meta.url).href;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function LZ(e){return typeof e>"u"||e===null}function eOe(e){return typeof e=="object"&&e!==null}function tOe(e){return Array.isArray(e)?e:LZ(e)?[]:[e]}function nOe(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;nnew Function("params",`${e}; return ${t}.apply(null, params);`));function H2e(e,t,n){try{return U2e(e,t)(n)}catch{return fJ[t].defaultReturnValue}}function IZ(e){var d;const{layer:t}=Jl(e),{monotonicF:n,monotonicG:r,breakpoints:i,code:o,trace:s}=(t==null?void 0:t.source)??{},l=s==null?void 0:s.content,{result:c}=CZ({trace:l,step:(d=l==null?void 0:l.events)==null?void 0:d.length,radius:void 0},[l]);return I.useMemo(()=>{const f=(l==null?void 0:l.events)??[],h=PZ((c==null?void 0:c.tree)??[]);return Bu(p=>{var v,y;const g=f[p];if(g)try{for(const{active:S,condition:_,type:b,property:x="",reference:E=0}of i??[]){const A=!b||b===g.type;if(S&&A&&(()=>{var k;return(k=_==null?void 0:_.apply)==null?void 0:k.call(_,{type:b,event:g,property:x,value:ee.get(g,x),reference:E,step:p,events:f,node:h[p]})})())return _!=null&&_.needsReference?{result:`${x} ${ee.toLower(ee.startCase(_==null?void 0:_.key))} ${E}`}:{result:`${x} ${ee.toLower(ee.startCase(_==null?void 0:_.key))}`}}if(H2e(o??"","shouldBreak",[p,g,f,(v=h[p])==null?void 0:v.parent,(y=h[p])==null?void 0:y.children]))return{result:"Script editor"}}catch(S){return{error:`${S}`}}return{result:""}})},[o,l,i,n,r,c])}function PZ(e=[],t={}){for(const n of e){for(const r of n.events)t[r.step]=n;PZ(n.children,t)}return t}function W2e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function Mz(e){const{layer:t,setLayer:n}=Jl(e),r=vl(),i=IZ(e),{playback:o,playbackTo:s,step:l=0}=(t==null?void 0:t.source)??{},c=ee.min([s,l])??0,d=!!s,f=o==="playing",[h,p]=[0,(s??1)-1];return I.useMemo(()=>{function g(E){n(to(t,A=>ee.set(A,"source",{...A==null?void 0:A.source,...E})))}const v={start:h,end:p,step:c,canPlay:d&&!f&&c0},y=(E=0)=>{g({playback:"paused",step:b(E)})},S=(E=1)=>g({playback:"playing",step:b(E)}),_=(E,A=0)=>W2e(async()=>{for(const R of ee.range(A,E)){const k=i(c+R);if(k.result||k.error)return{...k,offset:R}}return{result:"",offset:0,error:void 0}},({result:R,offset:k,error:O})=>{O?(r(`${ee.trimEnd(O,".")}`,`Step ${c+k}`),y()):R?(r(`Breakpoint hit: ${R}`,`Step ${c+k}`),y(k)):S(E)}),b=E=>ee.clamp(c+E,h,p);return{playing:o==="playing",...v,...{play:()=>{g({playback:"playing",step:b(1)})},pause:y,stepTo:(E=0)=>g({step:E}),stop:()=>g({step:h,playback:"paused"}),stepForward:()=>g({step:b(1)}),stepBackward:()=>g({step:b(-1)}),tick:S,stepWithBreakpointCheck:_}}},[p,o,f,d,h,c,n])}function G2e({children:e,value:t}){const{step:n,end:r,playing:i,pause:o,stepWithBreakpointCheck:s}=Mz(t==null?void 0:t.key),[{playbackRate:l=1}]=Nu();return I.useEffect(()=>{if(i){let c=ee.noop;const d=setInterval(()=>{n{c(),clearInterval(d)}}},[s,i,r,n,o,l]),C.jsx(C.Fragment,{children:e})}function V2e({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:l,play:c,stepBackward:d,stepForward:f,stop:h,stepWithBreakpointCheck:p,step:g,end:v}=Mz(e==null?void 0:e.key);return C.jsxs(C.Fragment,{children:[C.jsx(Gh,{label:"step-backward",icon:C.jsx(Cxe,{}),onClick:d,disabled:!i}),C.jsx(Gh,{...t?{label:"pause",icon:C.jsx(Bxe,{}),onClick:()=>l(),disabled:!n}:{label:"play",icon:C.jsx(Fxe,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(Gh,{label:"step-forward",icon:C.jsx(GK,{}),onClick:f,disabled:!o}),C.jsx(Gh,{label:"step-to-next-breakpoint",icon:C.jsx(Hxe,{}),onClick:()=>{p(v-g,1)},disabled:!o}),C.jsx(Gh,{label:"stop",icon:C.jsx(Wxe,{}),onClick:h,disabled:!s})]})}function hG(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:ee.truncate(JSON.stringify(e).replace(` +`,", "),{length:30})})}}function pG({label:e,value:t,type:n}){return C.jsxs(bn,{width:"auto",mr:3,mb:.5,children:[C.jsx(zt,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(yi,{}),C.jsx(zt,{component:"div",variant:"body2",...n,children:hG(t)??"none"})]},`${e}::${hG(t)}`)}function eC({event:e,variant:t="body2",max:n=10,...r}){const i=ee.filter(ee.entries(e),([,o])=>o!==void 0);return C.jsxs(bn,{...r,children:[ee.map(ee.slice(i,0,n),([o,s],l)=>C.jsx(pG,{label:o,value:s,type:{variant:t}},l)),i.length>n&&C.jsx(pG,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var OZ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,l){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:l})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(l){var c=l===void 0?{}:l,d=c.ESCAPE,f=d===void 0?/^\\/:d,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,_=c.PIPE_PARAMETER_START,b=_===void 0?/^\s*:\s*/:_,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,A=c.QUOTED_STRING_TEST,R=A===void 0?null:A,k=c.QUOTED_STRING_GET_AND_ADVANCE,O=k===void 0?null:k,L=c.QUOTED_STRING_IN_PARAMETER_TEST,N=L===void 0?null:L,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,W=H===void 0?null:H,z=R||function(V){return E.test(V)},D=O||s(E),F=N||function(V){return E.test(V)},j=W||s(E);return function(V){function G(Ie){Ie===void 0&&(Ie=1),pe=pe.substr(Ie)}function K(Ie){Ie===void 0&&(Ie=/^/),G(pe.match(Ie)[0].length)}function Y(){var Ie;return K(f),Ie=pe.length>0?pe[0]:"",G(),Ie}function J(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;me={name:"",pipes:[]},qe=!it}function ie(){ve.variables.push(me),J({isNull:!0})}function ce(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;be={name:"",parameters:[]},at=!it}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Ie){var ze=(Ie===void 0?{}:Ie).isNull,it=ze!==void 0&&ze;Qe="",Nt=!it}function Q(){be.parameters.push(Qe),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&Q(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&Q(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Qe="",qe=!1,at=!1,Nt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=Y();continue}if(p.test(pe)){ye=1,J(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],G();break;case 1:if(f.test(pe)){me.name+=Y();continue}if(ae()||le())continue;if(z(pe)){me.name+=D(pe,G);continue}me.name+=pe[0],G();break;case 2:if(f.test(pe)){be.name+=Y();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=D(pe,G);continue}be.name+=pe[0],G();break;case 3:if(f.test(pe)){Qe+=Y();continue}if(ae()||he()||le())continue;if(F(pe)){Qe+=j(pe,G);continue}Qe+=pe[0],G()}return Nt&&be.parameters.push(Qe),at&&me.pipes.push(be),qe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(l){return function(c,d){var f=c.match(l);return d(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var l in s)r.hasOwnProperty(l)||(r[l]=s[l])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function l(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return l(d.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var d=i(0);r.evaluateParsedString=l,r.evaluateStringTemplate=c}])})})(OZ);var MZ=OZ.exports;function q2e(e={},t){const n={};for(const r of Object.keys(e))n[r]=r==="$"?e[r]:t(e[r],r,e);return Object.setPrototypeOf(n,e)}function XF(e){switch(e==null?void 0:e.constructor){case Array:{const t=ee.map(e,XF);return n=>ee.map(t,r=>r(n))}case Object:{const t=ee.mapValues(e,XF);return n=>ee.mapValues(t,r=>r(n))}case String:return YF(e);default:return()=>e}}function X2e(e={}){return q2e(e,t=>ee.isFunction(t)?t:XF(t))}const mG=e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(X2e(n),{get(r,i){return typeof(r==null?void 0:r[i])=="function"?r[i]({}):r==null?void 0:r[i]}}))},Y2e=/^\{\{\s*/,K2e=/^\s*\}\}/,EN=/\b\B/,Q2e=MZ.parseStringTemplateGenerator({VARIABLE_START:Y2e,VARIABLE_END:K2e,PIPE_START:EN,PIPE_PARAMETER_START:EN,QUOTED_STRING:EN}),YF=Bu(e=>{const t=Q2e(e);return ee.join(t.literals,"")?n=>MZ.evaluateParsedString(t,{},{},r=>mG(r)(n)):mG(t.variables[0].name)},{primitive:!0});function J2e(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 DZ={exports:{}};(function(e,t){(function(n,r){typeof J2e=="function"?e.exports=r():n.pluralize=r()})(Bt,function(){var n=[],r=[],i={},o={},s={};function l(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function d(y,S){return y.replace(/\$(\d{1,2})/g,function(_,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(_,b){var x=d(S[1],arguments);return c(_===""?y[b-1]:_,x)})}function h(y,S,_){if(!y.length||i.hasOwnProperty(y))return S;for(var b=_.length;b--;){var x=_[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,_){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,_)}}function g(y,S,_,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,_)===E}}function v(y,S,_){var b=S===1?v.singular(y):v.plural(y);return(_?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([l(y),S])},v.addSingularRule=function(y,S){r.push([l(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(DZ);var Z2e=DZ.exports;const eOe=js(Z2e),tOe=""+new URL("parseTrace.worker-413a1f44.js",import.meta.url).href;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function LZ(e){return typeof e>"u"||e===null}function nOe(e){return typeof e=="object"&&e!==null}function rOe(e){return Array.isArray(e)?e:LZ(e)?[]:[e]}function iOe(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),NOe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function BOe(e){return!(e===null||!NOe.test(e)||e[e.length-1]==="_")}function $Oe(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var FOe=/^[-+]?[0-9]+e/;function zOe(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fp.isNegativeZero(e))return"-0.0";return n=e.toString(10),FOe.test(n)?n.replace("e",".e"):n}function jOe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Fp.isNegativeZero(e))}var UOe=new no("tag:yaml.org,2002:float",{kind:"scalar",resolve:BOe,construct:$Oe,predicate:jOe,represent:zOe,defaultStyle:"lowercase"}),HOe=xOe.extend({implicit:[EOe,AOe,LOe,UOe]}),WOe=HOe,BZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function GOe(e){return e===null?!1:BZ.exec(e)!==null||$Z.exec(e)!==null}function VOe(e){var t,n,r,i,o,s,l,c=0,d=null,f,h,p;if(t=BZ.exec(e),t===null&&(t=$Z.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],h=+(t[11]||0),d=(f*60+h)*6e4,t[9]==="-"&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&p.setTime(p.getTime()-d),p}function qOe(e){return e.toISOString()}var XOe=new no("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:GOe,construct:VOe,instanceOf:Date,represent:qOe});function YOe(e){return e==="<<"||e===null}var KOe=new no("tag:yaml.org,2002:merge",{kind:"scalar",resolve:YOe}),Lz=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function QOe(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Lz;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function JOe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Lz,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function ZOe(e){var t="",n=0,r,i,o=e.length,s=Lz;for(r=0;r>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function eMe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var tMe=new no("tag:yaml.org,2002:binary",{kind:"scalar",resolve:QOe,construct:JOe,predicate:eMe,represent:ZOe}),nMe=Object.prototype.hasOwnProperty,rMe=Object.prototype.toString;function iMe(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$Oe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function FOe(e){return!(e===null||!$Oe.test(e)||e[e.length-1]==="_")}function zOe(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var jOe=/^[-+]?[0-9]+e/;function UOe(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fp.isNegativeZero(e))return"-0.0";return n=e.toString(10),jOe.test(n)?n.replace("e",".e"):n}function HOe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Fp.isNegativeZero(e))}var WOe=new no("tag:yaml.org,2002:float",{kind:"scalar",resolve:FOe,construct:zOe,predicate:HOe,represent:UOe,defaultStyle:"lowercase"}),GOe=_Oe.extend({implicit:[TOe,IOe,BOe,WOe]}),VOe=GOe,BZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qOe(e){return e===null?!1:BZ.exec(e)!==null||$Z.exec(e)!==null}function XOe(e){var t,n,r,i,o,s,l,c=0,d=null,f,h,p;if(t=BZ.exec(e),t===null&&(t=$Z.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],h=+(t[11]||0),d=(f*60+h)*6e4,t[9]==="-"&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&p.setTime(p.getTime()-d),p}function YOe(e){return e.toISOString()}var KOe=new no("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qOe,construct:XOe,instanceOf:Date,represent:YOe});function QOe(e){return e==="<<"||e===null}var JOe=new no("tag:yaml.org,2002:merge",{kind:"scalar",resolve:QOe}),Dz=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function ZOe(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Dz;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function eMe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Dz,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function tMe(e){var t="",n=0,r,i,o=e.length,s=Dz;for(r=0;r>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function nMe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var rMe=new no("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ZOe,construct:eMe,predicate:nMe,represent:tMe}),iMe=Object.prototype.hasOwnProperty,oMe=Object.prototype.toString;function sMe(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function VZ(e){var t=/^\n* /;return t.test(e)}var qZ=1,ZF=2,XZ=3,YZ=4,dm=5;function HMe(e,t,n,r,i,o,s,l){var c,d=0,f=null,h=!1,p=!1,g=r!==-1,v=-1,y=jMe(Gb(e,0))&&UMe(Gb(e,e.length-1));if(t||s)for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),!g1(d))return dm;y=y&&wG(d,f,l),f=d}else{for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),d===p1)h=!0,g&&(p=p||c-v-1>r&&e[v+1]!==" ",v=c);else if(!g1(d))return dm;y=y&&wG(d,f,l),f=d}p=p||g&&c-v-1>r&&e[v+1]!==" "}return!h&&!p?y&&!s&&!i(e)?qZ:o===m1?dm:ZF:n>9&&VZ(e)?dm:s?o===m1?dm:ZF:p?YZ:XZ}function WMe(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===m1?'""':"''";if(!e.noCompatMode&&(DMe.indexOf(t)!==-1||LMe.test(t)))return e.quotingType===m1?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=r||e.flowLevel>-1&&n>=e.flowLevel;function c(d){return zMe(e,d)}switch(HMe(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case qZ:return t;case ZF:return"'"+t.replace(/'/g,"''")+"'";case XZ:return"|"+_G(t,e.indent)+SG(bG(t,o));case YZ:return">"+_G(t,e.indent)+SG(bG(GMe(t,s),o));case dm:return'"'+VMe(t)+'"';default:throw new ta("impossible error: invalid scalar style")}}()}function _G(e,t){var n=VZ(e)?String(t):"",r=e[e.length-1]===` +`+Fp.repeat(" ",e.indent*t)}function UMe(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function VZ(e){var t=/^\n* /;return t.test(e)}var qZ=1,ZF=2,XZ=3,YZ=4,dm=5;function GMe(e,t,n,r,i,o,s,l){var c,d=0,f=null,h=!1,p=!1,g=r!==-1,v=-1,y=HMe(Gb(e,0))&&WMe(Gb(e,e.length-1));if(t||s)for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),!g1(d))return dm;y=y&&xG(d,f,l),f=d}else{for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),d===p1)h=!0,g&&(p=p||c-v-1>r&&e[v+1]!==" ",v=c);else if(!g1(d))return dm;y=y&&xG(d,f,l),f=d}p=p||g&&c-v-1>r&&e[v+1]!==" "}return!h&&!p?y&&!s&&!i(e)?qZ:o===m1?dm:ZF:n>9&&VZ(e)?dm:s?o===m1?dm:ZF:p?YZ:XZ}function VMe(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===m1?'""':"''";if(!e.noCompatMode&&(NMe.indexOf(t)!==-1||BMe.test(t)))return e.quotingType===m1?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=r||e.flowLevel>-1&&n>=e.flowLevel;function c(d){return UMe(e,d)}switch(GMe(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case qZ:return t;case ZF:return"'"+t.replace(/'/g,"''")+"'";case XZ:return"|"+wG(t,e.indent)+_G(yG(t,o));case YZ:return">"+wG(t,e.indent)+_G(yG(qMe(t,s),o));case dm:return'"'+XMe(t)+'"';default:throw new ta("impossible error: invalid scalar style")}}()}function wG(e,t){var n=VZ(e)?String(t):"",r=e[e.length-1]===` `,i=r&&(e[e.length-2]===` `||e===` `),o=i?"+":r?"":"-";return n+o+` -`}function SG(e){return e[e.length-1]===` -`?e.slice(0,-1):e}function GMe(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(` -`);return d=d!==-1?d:e.length,n.lastIndex=d,EG(e.slice(0,d),t)}(),i=e[0]===` +`}function _G(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function qMe(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(` +`);return d=d!==-1?d:e.length,n.lastIndex=d,SG(e.slice(0,d),t)}(),i=e[0]===` `||e[0]===" ",o,s;s=n.exec(e);){var l=s[1],c=s[2];o=c[0]===" ",r+=l+(!i&&!o&&c!==""?` -`:"")+EG(c,t),i=o}return r}function EG(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,l=0,c="";r=n.exec(e);)l=r.index,l-i>t&&(o=s>i?s:l,c+=` +`:"")+SG(c,t),i=o}return r}function SG(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,l=0,c="";r=n.exec(e);)l=r.index,l-i>t&&(o=s>i?s:l,c+=` `+e.slice(i,o),i=o+1),s=l;return c+=` `,e.length-i>t&&s>i?c+=e.slice(i,s)+` -`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function VMe(e){for(var t="",n=0,r,i=0;i=65536?i+=2:i++)n=Gb(e,i),r=so[n],!r&&g1(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||BMe(n);return t}function qMe(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o"u"&&ku(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function CG(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s"u"&&ku(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=JF(e,t)),e.dump&&p1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function XMe(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,f;for(s=0,l=o.length;s1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ku(e,t,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=i,e.dump="{"+r+"}"}function YMe(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,f,h,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ta("sortKeys must be a boolean or a function");for(l=0,c=s.length;l1024,h&&(e.dump&&p1===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=JF(e,t)),ku(e,t+1,f,!0,h)&&(e.dump&&p1===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function TG(e,t,n){var r,i,o,s,l,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function ku(e,t,n,r,i,o,s){e.tag=null,e.dump=n,TG(e,n,!1)||TG(e,n,!0);var l=FZ.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",h,p;if(f&&(h=e.duplicates.indexOf(n),p=h!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(f&&p&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(YMe(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(XMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?CG(e,t-1,e.dump,i):CG(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(qMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&WMe(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ta("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function KMe(e,t){var n=[],r=[],i,o;for(e3(e,n,r),i=0,o=r.length;in(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await nDe(e);return t("Trace loaded",J2e("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){console.error(i),t("Error parsing",`${eDe(i)}`)}}}),[e])}const iDe=e=>e==null;function oDe(e){const t=[],n={},r={},i=ee.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ee.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!iDe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ee.last(t)}),n[l]=c),r[d]=ee.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ee.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const FS={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:Ig(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(o1,{label:"Trace",content:C.jsx(OTe,{onChange:s=>t(l=>ee.set(l,"source.trace",{...s,key:Fi()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(o1,{label:"Onion Skinning",content:C.jsx(Ro,{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:ee.startCase(s)})),onChange:s=>t(l=>ee.set(l,"source.onion",s))})}),C.jsx(LJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(RZ,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Ig(({value:e,produce:t})=>{var i,o,s,l,c,d,f,h;const{palette:n}=In(),r=rDe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:bz,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return I.useEffect(()=>{t(p=>{var g,v,y,S;return ee.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(d=(c=(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events)==null?void 0:d.length]),AZ(async()=>{const p=await r();t(g=>{ee.set(g,"source.parsedTrace",p),ee.set(g,"viewKey",Fi())})},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(H2e,{value:e})})}),renderer:({layer:e,index:t})=>{var c,d;const n=(c=e==null?void 0:e.source)==null?void 0:c.parsedTrace,r=nQ(((d=e==null?void 0:e.source)==null?void 0:d.step)??0,1e3/60),i=sDe(e,t,r),o=I.useMemo(()=>ee.map(n==null?void 0:n.stepsPersistent,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsPersistent,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),s=I.useMemo(()=>ee.map(n==null?void 0:n.stepsTransient,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsTransient,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),l=I.useMemo(()=>[s[r]??[]],[s,r]);return C.jsxs(C.Fragment,{children:[C.jsx(R2e,{step:r,nodes:o}),C.jsx(f1,{nodes:l}),i]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Ql(e),o=I.useMemo(()=>{var d,f,h,p,g;const s=((h=(f=(d=r==null?void 0:r.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events)??[],l=ee.chain((p=t==null?void 0:t.info)==null?void 0:p.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).map(v=>{var y;return(y=v.meta)==null?void 0:y.step}).filter(ee.negate(ee.isUndefined)).sort((v,y)=>v-y).value(),c=ee.chain((g=t==null?void 0:t.info)==null?void 0:g.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).filter(v=>{var y;return(y=v.meta)==null?void 0:y.info}).value();if(l.length&&r){const v=ee.last(l),y=s[v];if(y)return{...ee.keyBy(ee.map(c,(S,_)=>({key:`${r.key}.${_}`,primary:`Selection in ${Fo(r)}`,items:{info:{index:-1,primary:C.jsx(tC,{event:S.meta.info,vertical:!0})}}})),"key"),[r.key]:{primary:Fo(r),items:{properties:{index:-2,primary:C.jsx(tC,{event:y,vertical:!0})},[`${y}`]:{primary:`Go to Step ${v}`,secondary:`${ee.startCase(y.type)}`,action:()=>i(to(r,S=>{ee.set(S,"source.step",v)})),icon:C.jsx(bxe,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function sDe(e,t=0,n=0){var s,l;const{palette:r}=In(),{getPath:i}=I.useMemo(()=>{var c,d;return(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)!=null&&d.content?oDe(e.source.trace.content):{getParent:ee.constant(void 0),getPath:ee.constant([])}},[(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content]);return I.useMemo(()=>{var c,d,f,h;if((h=(f=(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content)==null?void 0:f.render)!=null&&h.path){const{pivot:p={},scale:g=1}=e.source.trace.content.render.path,{x:v,y}=p,S=v?YF(v):x=>x.event.x,_=y?YF(y):x=>x.event.y,b=ee.map(i(n),x=>{var E,A,R,k;return(k=(R=(A=(E=e==null?void 0:e.source)==null?void 0:E.trace)==null?void 0:A.content)==null?void 0:R.events)==null?void 0:k[x]});if(b.length){const x=[{$:"rect",x:S({event:{x:0,y:0,...ee.head(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.head(b)}})-2*g/2,fill:Og("destination"),width:2*g,height:2*g},{$:"rect",x:S({event:{x:0,y:0,...ee.last(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.last(b)}})-2*g/2,fill:Og("source"),width:2*g,height:2*g},{$:"path",points:b.map(E=>({x:S({event:{x:0,y:0,...E}}),y:_({event:{x:0,y:0,...E}})})),fill:r.primary.main,alpha:1,lineWidth:1*g}];return C.jsx(f1,{nodes:[ee.map(x,E=>({component:E,meta:{source:"path",sourceLayerIndex:-99999+t}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r,i])}async function aDe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ee.find(i,{id:t})&&ee.find(o,{id:n}))return r}}const lDe={...FS,key:"query",editor:Ig(({value:e,produce:t})=>{var c,d;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Ql(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=VE(),[l]=Pg();return C.jsxs(C.Fragment,{children:[C.jsx(o1,{label:"Algorithm",content:C.jsx(Ro,{showArrow:!0,icon:C.jsx(Txe,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=ee.find(l,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>ee.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(zt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(o1,{label:"Map",content:C.jsx(Ro,{showArrow:!0,icon:C.jsx(nv,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:Fo(f)})),onChange:async f=>t(h=>ee.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(zt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",Fo(i)]}),C.jsx(LJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(RZ,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Ig(({value:e,produce:t,onChange:n})=>{const r=FS.service,i=ml(),{algorithm:o,mapLayerKey:s,start:l,end:c}=(e==null?void 0:e.source)??{},[{layers:d}]=$p(),[f]=Pg(),[{algorithms:h}]=VE(),p=I.useMemo(()=>{if(s&&o)return ee.find(d,{key:s})},[s,o,d]);return P2e(async g=>{var v;if(p&&o){const{format:y,content:S}=((v=p==null?void 0:p.source)==null?void 0:v.map)??{};if(y&&S){const _=await aDe(f,o,y),b=ee.find(h,{id:o});if(_){i(`Executing ${Fo(e)} using ${_.name}...`);const x=await _.call("solve/pathfinding",{format:y,instances:[{start:l??0,end:c??0}],mapURI:`map:${encodeURIComponent(S)}`,algorithm:o});g.aborted?i("Canceled"):t(E=>ee.set(E,"source.trace",{name:`${b==null?void 0:b.name}`,content:x,key:Fi()}))}}}},[p,f,o,l,c,t,i,e,h],[p,f,o,l,c]),C.jsx(C.Fragment,{children:C.jsx(r,{value:e,onChange:n})})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},getSelectionInfo:({children:e,event:t,layer:n})=>{const r=FS.getSelectionInfo,{layer:i,setLayer:o,layers:s}=Ql(n),l=I.useMemo(()=>{const d=ee.filter(s,{source:{type:"map"}});return ee.filter(ee.map(d,f=>{var p,g,v,y;const{parsedMap:h}=(f==null?void 0:f.source)??{};if(h&&t){const S=(y=(v=yz((g=(p=f==null?void 0:f.source)==null?void 0:p.map)==null?void 0:g.format))==null?void 0:v.hydrate)==null?void 0:y.call(v,h);if(S){const _=(t==null?void 0:t.world)&&S.snap(t.world);if(_){const b=(t==null?void 0:t.world)&&S.nodeAt(_);return{point:_,node:b,key:f.key,name:Fo(f)}}}}}))},[s]),c=I.useMemo(()=>!!i&&!!l.length&&{[i.key]:{primary:Fo(i),items:{...ee.reduce(l,(d,f)=>({...d,[`${n}-${f==null?void 0:f.key}-source`]:{primary:"Set as source",secondary:f==null?void 0:f.name,action:()=>o(to(i,h=>{ee.set(h,"source.start",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Hxe,{sx:{transform:"scale(0.5)"}})},[`${n}-${f==null?void 0:f.key}-destination`]:{primary:"Set as destination",secondary:f==null?void 0:f.name,action:()=>o(to(i,h=>{ee.set(h,"source.end",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Bxe,{})}}),{})}}},[l,i,s,o]);return C.jsx(r,{event:t,layer:n,children:d=>e==null?void 0:e(ee.merge(d,c))})}};function cDe({layer:e,index:t}){var n,r;return C.jsx(C.Fragment,{children:e&&I.createElement((r=fw[((n=e==null?void 0:e.source)==null?void 0:n.type)??""])==null?void 0:r.renderer,{layer:e,index:t})})}function Fo(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?fw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function KZ(e){var t;return fw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const fw={map:L2e,trace:FS,query:lDe};function v1(e){"@babel/helpers - typeof";return v1=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},v1(e)}function uDe(e,t){if(v1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(v1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dDe(e){var t=uDe(e,"string");return v1(t)==="symbol"?t:String(t)}function fDe(e,t,n){return t=dDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kG(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 AG(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Lo(1));return n(QZ)(e,t)}if(typeof e!="function")throw new Error(Lo(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Lo(3));return o}function h(y){if(typeof y!="function")throw new Error(Lo(4));if(c)throw new Error(Lo(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Lo(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!hDe(y))throw new Error(Lo(7));if(typeof y.type>"u")throw new Error(Lo(8));if(c)throw new Error(Lo(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function qDe(e,t){return e===t}function XDe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?ADe:n,i=t.mapStateToPropsFactories,o=i===void 0?NDe:i,s=t.mapDispatchToPropsFactories,l=s===void 0?MDe:s,c=t.mergePropsFactories,d=c===void 0?jDe:c,f=t.selectorFactory,h=f===void 0?GDe:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,A=E===void 0?qDe:E,R=_.areOwnPropsEqual,k=R===void 0?TN:R,O=_.areStatePropsEqual,L=O===void 0?TN:O,N=_.areMergedPropsEqual,H=N===void 0?TN:N,W=Le(_,VDe),z=kN(g,o,"mapStateToProps"),D=kN(v,l,"mapDispatchToProps"),F=kN(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:k,areStatePropsEqual:L,areMergedPropsEqual:H},W))}}const iee=XDe();gDe(Zg.unstable_batchedUpdates);function YDe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ia(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof sC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),aLe=` +`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function XMe(e){for(var t="",n=0,r,i=0;i=65536?i+=2:i++)n=Gb(e,i),r=so[n],!r&&g1(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||FMe(n);return t}function YMe(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o"u"&&ku(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function EG(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s"u"&&ku(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=JF(e,t)),e.dump&&p1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function KMe(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,f;for(s=0,l=o.length;s1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ku(e,t,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=i,e.dump="{"+r+"}"}function QMe(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,f,h,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ta("sortKeys must be a boolean or a function");for(l=0,c=s.length;l1024,h&&(e.dump&&p1===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=JF(e,t)),ku(e,t+1,f,!0,h)&&(e.dump&&p1===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function CG(e,t,n){var r,i,o,s,l,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function ku(e,t,n,r,i,o,s){e.tag=null,e.dump=n,CG(e,n,!1)||CG(e,n,!0);var l=FZ.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",h,p;if(f&&(h=e.duplicates.indexOf(n),p=h!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(f&&p&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(QMe(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(KMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?EG(e,t-1,e.dump,i):EG(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(YMe(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&VMe(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ta("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function JMe(e,t){var n=[],r=[],i,o;for(e3(e,n,r),i=0,o=r.length;in(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await iDe(e);return t("Trace loaded",eOe("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){console.error(i),t("Error parsing",`${nDe(i)}`)}}}),[e])}const sDe=e=>e==null;function aDe(e){const t=[],n={},r={},i=ee.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();ee.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!sDe(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:ee.last(t)}),n[l]=c),r[d]=ee.last(t)});const o=(l,c=(d=>(d=e==null?void 0:e.events)==null?void 0:d.length)()??0)=>{let f=r[c];for(;f;){if(f.id===l)return f.pId;f=f.prev}};return{getParent:o,getPath:l=>{const c=[l];let d={...(e.events??[])[l],step:l};for(;d;){const f=o(d.id,d.step);if(f){const h=ee.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const $S={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:Ig(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(o1,{label:"Trace",content:C.jsx(DTe,{onChange:s=>t(l=>ee.set(l,"source.trace",{...s,key:li()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(o1,{label:"Onion Skinning",content:C.jsx(Ro,{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:ee.startCase(s)})),onChange:s=>t(l=>ee.set(l,"source.onion",s))})}),C.jsx(LJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(RZ,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Ig(({value:e,produce:t})=>{var i,o,s,l,c,d,f,h;const{palette:n}=Cn(),r=oDe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:yz,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return I.useEffect(()=>{t(p=>{var g,v,y,S;return ee.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(d=(c=(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events)==null?void 0:d.length]),AZ(async()=>{const p=await r();t(g=>{ee.set(g,"source.parsedTrace",p),ee.set(g,"viewKey",li())})},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(G2e,{value:e})})}),renderer:({layer:e,index:t})=>{var c,d;const n=(c=e==null?void 0:e.source)==null?void 0:c.parsedTrace,r=tQ(((d=e==null?void 0:e.source)==null?void 0:d.step)??0,1e3/60),i=lDe(e,t,r),o=I.useMemo(()=>ee.map(n==null?void 0:n.stepsPersistent,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsPersistent,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),s=I.useMemo(()=>ee.map(n==null?void 0:n.stepsTransient,f=>ee.map(f,h=>ee.merge(h,{meta:{sourceLayer:e==null?void 0:e.key,sourceLayerIndex:t,sourceLayerAlpha:1-.01*+((e==null?void 0:e.transparency)??0),sourceLayerDisplayMode:(e==null?void 0:e.displayMode)??"source-over"}}))),[n==null?void 0:n.stepsTransient,e==null?void 0:e.key,e==null?void 0:e.transparency,e==null?void 0:e.displayMode,t]),l=I.useMemo(()=>[s[r]??[]],[s,r]);return C.jsxs(C.Fragment,{children:[C.jsx(P2e,{step:r,nodes:o}),C.jsx(f1,{nodes:l}),i]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Jl(e),o=I.useMemo(()=>{var d,f,h,p,g;const s=((h=(f=(d=r==null?void 0:r.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events)??[],l=ee.chain((p=t==null?void 0:t.info)==null?void 0:p.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).map(v=>{var y;return(y=v.meta)==null?void 0:y.step}).filter(ee.negate(ee.isUndefined)).sort((v,y)=>v-y).value(),c=ee.chain((g=t==null?void 0:t.info)==null?void 0:g.components).filter(v=>{var y;return((y=v.meta)==null?void 0:y.sourceLayer)===(r==null?void 0:r.key)}).filter(v=>{var y;return(y=v.meta)==null?void 0:y.info}).value();if(l.length&&r){const v=ee.last(l),y=s[v];if(y)return{...ee.keyBy(ee.map(c,(S,_)=>({key:`${r.key}.${_}`,primary:`Selection in ${Fo(r)}`,items:{info:{index:-1,primary:C.jsx(eC,{event:S.meta.info,vertical:!0})}}})),"key"),[r.key]:{primary:Fo(r),items:{properties:{index:-2,primary:C.jsx(eC,{event:y,vertical:!0})},[`${y}`]:{primary:`Go to Step ${v}`,secondary:`${ee.startCase(y.type)}`,action:()=>i(to(r,S=>{ee.set(S,"source.step",v)})),icon:C.jsx(xxe,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function lDe(e,t=0,n=0){var s,l;const{palette:r}=Cn(),{getPath:i}=I.useMemo(()=>{var c,d;return(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)!=null&&d.content?aDe(e.source.trace.content):{getParent:ee.constant(void 0),getPath:ee.constant([])}},[(l=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:l.content]);return I.useMemo(()=>{var c,d,f,h;if((h=(f=(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content)==null?void 0:f.render)!=null&&h.path){const{pivot:p={},scale:g=1}=e.source.trace.content.render.path,{x:v,y}=p,S=v?YF(v):x=>x.event.x,_=y?YF(y):x=>x.event.y,b=ee.map(i(n),x=>{var E,A,R,k;return(k=(R=(A=(E=e==null?void 0:e.source)==null?void 0:E.trace)==null?void 0:A.content)==null?void 0:R.events)==null?void 0:k[x]});if(b.length){const x=[{$:"rect",x:S({event:{x:0,y:0,...ee.head(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.head(b)}})-2*g/2,fill:Og("destination"),width:2*g,height:2*g},{$:"rect",x:S({event:{x:0,y:0,...ee.last(b)}})-2*g/2,y:_({event:{x:0,y:0,...ee.last(b)}})-2*g/2,fill:Og("source"),width:2*g,height:2*g},{$:"path",points:b.map(E=>({x:S({event:{x:0,y:0,...E}}),y:_({event:{x:0,y:0,...E}})})),fill:r.primary.main,alpha:1,lineWidth:1*g}];return C.jsx(f1,{nodes:[ee.map(x,E=>({component:E,meta:{source:"path",sourceLayerIndex:-99999+t}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r,i])}async function cDe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(ee.find(i,{id:t})&&ee.find(o,{id:n}))return r}}const uDe={...$S,key:"query",editor:Ig(({value:e,produce:t})=>{var c,d;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Jl(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=GE(),[l]=Pg();return C.jsxs(C.Fragment,{children:[C.jsx(o1,{label:"Algorithm",content:C.jsx(Ro,{showArrow:!0,icon:C.jsx(kxe,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=ee.find(l,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>ee.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(zt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(o1,{label:"Map",content:C.jsx(Ro,{showArrow:!0,icon:C.jsx(nv,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:Fo(f)})),onChange:async f=>t(h=>ee.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(zt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",Fo(i)]}),C.jsx(LJ,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(RZ,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Ig(({value:e,produce:t,onChange:n})=>{const r=$S.service,i=vl(),{algorithm:o,mapLayerKey:s,start:l,end:c}=(e==null?void 0:e.source)??{},[{layers:d}]=$p(),[f]=Pg(),[{algorithms:h}]=GE(),p=I.useMemo(()=>{if(s&&o)return ee.find(d,{key:s})},[s,o,d]);return M2e(async g=>{var v;if(p&&o){const{format:y,content:S}=((v=p==null?void 0:p.source)==null?void 0:v.map)??{};if(y&&S){const _=await cDe(f,o,y),b=ee.find(h,{id:o});if(_){i(`Executing ${Fo(e)} using ${_.name}...`);const x=await _.call("solve/pathfinding",{format:y,instances:[{start:l??0,end:c??0}],mapURI:`map:${encodeURIComponent(S)}`,algorithm:o});g.aborted?i("Canceled"):t(E=>ee.set(E,"source.trace",{name:`${b==null?void 0:b.name}`,content:x,key:li()}))}}}},[p,f,o,l,c,t,i,e,h],[p,f,o,l,c]),C.jsx(C.Fragment,{children:C.jsx(r,{value:e,onChange:n})})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},getSelectionInfo:({children:e,event:t,layer:n})=>{const r=$S.getSelectionInfo,{layer:i,setLayer:o,layers:s}=Jl(n),l=I.useMemo(()=>{const d=ee.filter(s,{source:{type:"map"}});return ee.filter(ee.map(d,f=>{var p,g,v,y;const{parsedMap:h}=(f==null?void 0:f.source)??{};if(h&&t){const S=(y=(v=vz((g=(p=f==null?void 0:f.source)==null?void 0:p.map)==null?void 0:g.format))==null?void 0:v.hydrate)==null?void 0:y.call(v,h);if(S){const _=(t==null?void 0:t.world)&&S.snap(t.world);if(_){const b=(t==null?void 0:t.world)&&S.nodeAt(_);return{point:_,node:b,key:f.key,name:Fo(f)}}}}}))},[s]),c=I.useMemo(()=>!!i&&!!l.length&&{[i.key]:{primary:Fo(i),items:{...ee.reduce(l,(d,f)=>({...d,[`${n}-${f==null?void 0:f.key}-source`]:{primary:"Set as source",secondary:f==null?void 0:f.name,action:()=>o(to(i,h=>{ee.set(h,"source.start",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx(Gxe,{sx:{transform:"scale(0.5)"}})},[`${n}-${f==null?void 0:f.key}-destination`]:{primary:"Set as destination",secondary:f==null?void 0:f.name,action:()=>o(to(i,h=>{ee.set(h,"source.end",f==null?void 0:f.node),ee.set(h,"source.query",void 0),ee.set(h,"source.mapLayerKey",f==null?void 0:f.key),ee.set(h,"source.trace",void 0)})),icon:C.jsx($xe,{})}}),{})}}},[l,i,s,o]);return C.jsx(r,{event:t,layer:n,children:d=>e==null?void 0:e(ee.merge(d,c))})}};function dDe({layer:e,index:t}){var n,r;return C.jsx(C.Fragment,{children:e&&I.createElement((r=fw[((n=e==null?void 0:e.source)==null?void 0:n.type)??""])==null?void 0:r.renderer,{layer:e,index:t})})}function Fo(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?fw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function KZ(e){var t;return fw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const fw={map:B2e,trace:$S,query:uDe};function v1(e){"@babel/helpers - typeof";return v1=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},v1(e)}function fDe(e,t){if(v1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(v1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hDe(e){var t=fDe(e,"string");return v1(t)==="symbol"?t:String(t)}function pDe(e,t,n){return t=hDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TG(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 kG(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Lo(1));return n(QZ)(e,t)}if(typeof e!="function")throw new Error(Lo(2));var i=e,o=t,s=[],l=s,c=!1;function d(){l===s&&(l=s.slice())}function f(){if(c)throw new Error(Lo(3));return o}function h(y){if(typeof y!="function")throw new Error(Lo(4));if(c)throw new Error(Lo(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(Lo(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!mDe(y))throw new Error(Lo(7));if(typeof y.type>"u")throw new Error(Lo(8));if(c)throw new Error(Lo(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=l,_=0;_=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function YDe(e,t){return e===t}function KDe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?IDe:n,i=t.mapStateToPropsFactories,o=i===void 0?$De:i,s=t.mapDispatchToPropsFactories,l=s===void 0?LDe:s,c=t.mergePropsFactories,d=c===void 0?HDe:c,f=t.selectorFactory,h=f===void 0?qDe:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,A=E===void 0?YDe:E,R=_.areOwnPropsEqual,k=R===void 0?TN:R,O=_.areStatePropsEqual,L=O===void 0?TN:O,N=_.areMergedPropsEqual,H=N===void 0?TN:N,W=Le(_,XDe),z=kN(g,o,"mapStateToProps"),D=kN(v,l,"mapDispatchToProps"),F=kN(y,d,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:A,areOwnPropsEqual:k,areStatePropsEqual:L,areMergedPropsEqual:H},W))}}const iee=KDe();yDe(Zg.unstable_batchedUpdates);function QDe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ia(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof oC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),cLe=` 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 -`,aC=function(t){return t+1},lLe=function(t){return` - You have lifted an item in position `+aC(t.source.index)+` -`},cee=function(t,n){var r=t.droppableId===n.droppableId,i=aC(t.index),o=aC(n.index);return r?` +`,sC=function(t){return t+1},uLe=function(t){return` + You have lifted an item in position `+sC(t.source.index)+` +`},cee=function(t,n){var r=t.droppableId===n.droppableId,i=sC(t.index),o=sC(n.index);return r?` You have moved the item from position `+i+` to position `+o+` `:` @@ -546,12 +546,12 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat in list `+n.droppableId+` has been combined with `+r.draggableId+` in list `+r.droppableId+` - `},cLe=function(t){var n=t.destination;if(n)return cee(t.source,n);var r=t.combine;return r?uee(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},FG=function(t){return` + `},dLe=function(t){var n=t.destination;if(n)return cee(t.source,n);var r=t.combine;return r?uee(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},$G=function(t){return` The item has returned to its starting position - of `+aC(t.index)+` -`},uLe=function(t){if(t.reason==="CANCEL")return` + of `+sC(t.index)+` +`},fLe=function(t){if(t.reason==="CANCEL")return` Movement cancelled. - `+FG(t.source)+` + `+$G(t.source)+` `;var n=t.destination,r=t.combine;return n?` You have dropped the item. `+cee(t.source,n)+` @@ -560,17 +560,17 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat `+uee(t.draggableId,t.source,r)+` `:` The item has been dropped while not over a drop area. - `+FG(t.source)+` - `},zS={dragHandleUsageInstructions:aLe,onDragStart:lLe,onDragUpdate:cLe,onDragEnd:uLe},wi={x:0,y:0},Hi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},ks=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Id=function(t,n){return t.x===n.x&&t.y===n.y},dv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Cp=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},b1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},zG=function(t,n){return Math.min.apply(Math,n.map(function(r){return b1(t,r)}))},dee=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},dLe=function(e,t){var n=tl({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},hw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},jG=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}]},fLe={top:0,right:0,bottom:0,left:0},hLe=function(t,n){return n?hw(t,n.scroll.diff.displacement):t},pLe=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},mLe=function(t,n){return n&&n.shouldClipSubject?dLe(n.pageMarginBox,t):tl(t)},Lg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=hLe(t.marginBox,i),s=pLe(o,r,n),l=mLe(s,i);return{page:t,withPlaceholder:n,active:l}},zz=function(e,t){e.frame||He(!1);var n=e.frame,r=ks(t,n.scroll.initial),i=dv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Lg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function lC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function jz(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},bLe=function(e){var t=fa(e.top,e.bottom),n=fa(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Hz={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},vee={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},xLe=function(e){return function(t){var n=fa(t.top,t.bottom),r=fa(t.left,t.right);return function(i){return e===Hz?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},wLe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:wi;return hw(t,r)},_Le=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},SLe=function(t,n,r){return r(n)(t)},Wz=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?wLe(n,r):n;return _Le(l,r,s)&&SLe(l,i,s)},ELe=function(t){return Wz($({},t,{isVisibleThroughFrameFn:gee}))},yee=function(t){return Wz($({},t,{isVisibleThroughFrameFn:bLe}))},CLe=function(t){return Wz($({},t,{isVisibleThroughFrameFn:xLe(t.destination.axis)}))},TLe=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 kLe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return tl($z(n,r))}function w1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=kLe(d,r),h=d.descriptor.id;c.all.push(h);var p=ELe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=TLe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function ALe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function UG(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=ALe(t,{inHomeList:n});return{displaced:x1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function cC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=hv(t,r);if(l==null)return UG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=rf(n,function(y){return y.descriptor.index===l});if(!f)return UG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=Rk(t,n),p=n.indexOf(f),g=h.slice(p),v=w1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function jd(e,t){return!!t.effected[e]}var RLe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=jd(s,o);return d?t?c:c-1:t?c+1:c},ILe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},PLe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=ILe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:cC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=RLe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:cC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},OLe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return jd(r,n)?o?wi:dv(i.point):o?i.point:wi},MLe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Ak(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=OLe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Hi(s,l)},bee=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},DLe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Gz=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},HG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.end]+bee(n,i),Gz(n,r.marginBox,i))},WG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.start]-DLe(n,i),Gz(n,r.marginBox,i))},LLe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Cp(n.line,r.contentBox[n.start]+bee(n,i),Gz(n,r.contentBox,i))},NLe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=fv(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return LLe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(jd(h,o))return WG({axis:c,moveRelativeTo:p.page,isMoving:l});var g=iC(p.page,f.point);return WG({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(jd(v.descriptor.id,o)){var y=iC(v.page,dv(o.displacedBy.point));return HG({axis:c,moveRelativeTo:y,isMoving:l})}return HG({axis:c,moveRelativeTo:v.page,isMoving:l})},t3=function(e,t){var n=e.frame;return n?Hi(t,n.scroll.diff.displacement):t},BLe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?NLe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):MLe({impact:n,draggables:o,afterCritical:s})},Ik=function(e){var t=BLe(e),n=e.droppable,r=n?t3(n,t):t;return r},xee=function(e,t){var n=ks(t,e.scroll.initial),r=dv(n),i=tl({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 GG(e,t){return e.map(function(n){return t[n]})}function $Le(e,t){for(var n=0;n1?f.sort(function(h,p){return xo(h)[l.start]-xo(p)[l.start]})[0]:d.sort(function(h,p){var g=zG(n,jG(xo(h))),v=zG(n,jG(xo(p)));return g!==v?g-v:xo(h)[l.start]-xo(p)[l.start]})[0]},VG=function(t,n){var r=t.page.borderBox.center;return jd(t.descriptor.id,n)?ks(r,n.displacedBy.point):r},HLe=function(t,n){var r=t.page.borderBox;return jd(t.descriptor.id,n)?hw(r,dv(n.displacedBy.point)):r},WLe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return yee({target:HLe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=b1(t,t3(r,VG(l,o))),f=b1(t,t3(r,VG(c,o)));return dt.left&&e.topt.top}function JLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=Cp(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:b1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function ZLe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=kk(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!QLe(t,s))return!1;if(Eee(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=fa(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:JLe({pageBorderBox:t,draggable:n,candidates:i}):null}var Cee=function(t,n){return tl(hw(t,n))},eNe=function(e,t){var n=e.frame;return n?Cee(t,n.scroll.diff.value):t};function Tee(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function tNe(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 nNe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=pw(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=Rk(n,i),v=rf(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=jd(_,l),E=Tee({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:A?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},kee=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=Cee(n.page.borderBox,t),d=ZLe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return yLe;var f=i[d],h=fv(f.descriptor.id,r),p=eNe(f,c);return iNe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||nNe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},qz=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},oNe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Ps(n),s=Ps(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=VLe(l);return qz(i,c)},sNe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=oNe({previousImpact:i,impact:o,droppables:r}),l=Ps(o);if(!l)return s;var c=r[l];if(hv(t,c)||c.subject.withPlaceholder)return s;var d=See(c,t,n);return qz(s,d)},_x=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=ks(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:Hi(t.initial.client.borderBoxCenter,f)},p={selection:Hi(h.selection,l.scroll.current),borderBoxCenter:Hi(h.borderBoxCenter,l.scroll.current),offset:Hi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||kee({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=sNe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function aNe(e,t){return e.map(function(n){return t[n]})}var Aee=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=aNe(s.all,r),c=w1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},Ree=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=Ik({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Vz({pageBorderBoxCenter:l,draggable:n,viewport:o})},Iee=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Ps(i);f||He(!1);var h=c[f],p=Aee({impact:i,viewport:o,destination:h,draggables:l}),g=Ree({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return _x({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},lNe=function(e){return{index:e.index,droppableId:e.droppableId}},Pee=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=pw(n.axis,t.displaceBy),s=fv(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=w1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:lNe(t.descriptor)}};return{impact:p,afterCritical:f}},cNe=function(e,t){return{draggables:e.draggables,droppables:qz(e.droppables,t)}},uNe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=iC(t.client,n),o=oC(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},dNe=function(e){var t=e.frame;return t||He(!1),t},fNe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=dNe(l),d=c.scroll.diff.value,f=Hi(i,d),h=uNe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},hNe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],A=zz(E,x.scroll);return A}),i=$({},t.dimensions.droppables,{},hee(r)),o=pee(fNe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Ps(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=Pee({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=kee({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},n3=function(t){return t.movementMode==="SNAP"},IN=function(t,n,r){var i=cNe(t.dimensions,n);return!n3(t)||r?_x({state:t,dimensions:i}):Iee({state:t,dimensions:i})};function PN(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var qG={phase:"IDLE",completed:null,shouldFlush:!1},pNe=function(e,t){if(e===void 0&&(e=qG),t.type==="FLUSH")return $({},qG,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:wi},h={client:f,page:{selection:Hi(f.selection,o.scroll.initial),borderBoxCenter:Hi(f.selection,o.scroll.initial),offset:Hi(f.selection,o.scroll.diff.value)}},p=kk(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=Pee({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),hNe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var b=t.payload.client;return Id(b,e.current.client.selection)?e:_x({state:e,clientSelection:b,impact:n3(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return PN(e);$h(e)||He(!1);var x=t.payload,E=x.id,A=x.newScroll,R=e.dimensions.droppables[E];if(!R)return e;var k=zz(R,A);return IN(e,k,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var O=t.payload,L=O.id,N=O.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===N&&He(!1);var W=$({},H,{isEnabled:N});return IN(e,W,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var z=t.payload,D=z.id,F=z.isCombineEnabled,j=e.dimensions.droppables[D];j||He(!1),j.isCombineEnabled===F&&He(!1);var V=$({},j,{isCombineEnabled:F});return IN(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;$h(e)||He(!1),e.isWindowScrollAllowed||He(!1);var G=t.payload.newScroll;if(Id(e.viewport.scroll.current,G))return PN(e);var K=xee(e.viewport,G);return n3(e)?Iee({state:e,viewport:K}):_x({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!$h(e))return e;var Y=t.payload.maxScroll;if(Id(Y,e.viewport.scroll.max))return e;var J=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:J})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var ie=KLe({state:e,type:t.type});return ie?_x({state:e,impact:ie.impact,clientSelection:ie.clientSelection,scrollJumpRequest:ie.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ce=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ue=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ce});return ue}if(t.type==="DROP_ANIMATE"){var se=t.payload,Q=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:Q,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},mNe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},gNe=function(t){return{type:"LIFT",payload:t}},vNe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},yNe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},bNe=function(){return{type:"COLLECTION_STARTING",payload:null}},xNe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},wNe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},_Ne=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},Oee=function(t){return{type:"MOVE",payload:t}},SNe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},ENe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},CNe=function(){return{type:"MOVE_UP",payload:null}},TNe=function(){return{type:"MOVE_DOWN",payload:null}},kNe=function(){return{type:"MOVE_RIGHT",payload:null}},ANe=function(){return{type:"MOVE_LEFT",payload:null}},Xz=function(){return{type:"FLUSH",payload:null}},RNe=function(t){return{type:"DROP_ANIMATE",payload:t}},Yz=function(t){return{type:"DROP_COMPLETE",payload:t}},Mee=function(t){return{type:"DROP",payload:t}},INe=function(t){return{type:"DROP_PENDING",payload:t}},Dee=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},PNe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Yz({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(Xz()),r(mNe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(vNe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},ONe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Kz={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},_1={opacity:{drop:0,combining:.7},scale:{drop:.75}},Qz={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Ch=Qz.outOfTheWay+"s "+Kz.outOfTheWay,Sx={fluid:"opacity "+Ch,snap:"transform "+Ch+", opacity "+Ch,drop:function(t){var n=t+"s "+Kz.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Ch,placeholder:"height "+Ch+", width "+Ch+", margin "+Ch},XG=function(t){return Id(t,wi)?null:"translate("+t.x+"px, "+t.y+"px)"},r3={moveTo:XG,drop:function(t,n){var r=XG(t);return r?n?r+" scale("+_1.scale.drop+")":r:null}},i3=Qz.minDropTime,Lee=Qz.maxDropTime,MNe=Lee-i3,YG=1500,DNe=.6,LNe=function(e){var t=e.current,n=e.destination,r=e.reason,i=b1(t,n);if(i<=0)return i3;if(i>=YG)return Lee;var o=i/YG,s=i3+MNe*o,l=r==="CANCEL"?s*DNe:s;return Number(l.toFixed(2))},NNe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Ps(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=Ree({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=ks(h,n.client.borderBox.center);return p},BNe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=Aee({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:x1});return{impact:c,didDropInsideDroppable:!0}},$Ne=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(INe({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=BNe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?Uz(p):null,y=g?Ak(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=NNe({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!Id(o.current.client.offset,b)||!!_.combine;if(!E){n(Yz({completed:x}));return}var A=LNe({current:o.current.client.offset,destination:b,reason:s}),R={newHomeClientOffset:b,dropDuration:A,completed:x};n(RNe(R))}}}},Nee=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function FNe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function zNe(e){var t=e.onWindowScroll;function n(){t(Nee())}var r=y1(n),i=FNe(r),o=Rd;function s(){return o!==Rd}function l(){s()&&He(!1),o=ia(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=Rd}return{start:l,stop:c,isActive:s}}var jNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},UNe=function(e){var t=zNe({onWindowScroll:function(r){e.dispatch(SNe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&jNe(r)&&t.stop(),n(r)}}},HNe=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},WNe=function(){var e=[],t=function(o){var s=jz(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},GNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},VNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},qNe=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},yb=function(t,n){n()},S_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},ON=function(t,n,r,i){if(!t){r(i(n));return}var o=HNe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},XNe=function(e,t){var n=WNe(),r=null,i=function(p,g){r&&He(!1),yb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),yb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(S_(p,g))})},s=function(p,g){r&&He(!1);var v=S_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){yb("onDragStart",function(){return ON(e().onDragStart,v,t,zS.onDragStart)})})},l=function(p,g){var v=Uz(g),y=Ak(g);r||He(!1);var S=!qNe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!GNe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!VNe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},S_(p,r.mode),{combine:y,destination:v});n.add(function(){yb("onDragUpdate",function(){return ON(e().onDragUpdate,x,t,zS.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,yb("onDragEnd",function(){return ON(e().onDragEnd,p,t,zS.onDragEnd)})},f=function(){if(r){var p=$({},S_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},YNe=function(e,t){var n=XNe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},KNe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(Yz({completed:r.completed}))}}},QNe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(Dee())}};n=requestAnimationFrame(function(){n=null,t=ia(window,[s])})}}}},JNe=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)}}}},ZNe=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()}}}}}},eBe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},tBe=function(e){return function(t){return function(n){return function(r){if(eBe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},nBe=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(Mee({reason:r.reason})))}}}},rBe=JZ,iBe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return QZ(pNe,rBe(pDe(ONe(r),JNe(t),PNe(t),$Ne,KNe,QNe,nBe,tBe(s),UNe,ZNe(n),YNe(i,o))))},MN=function(){return{additions:{},removals:{},modified:{}}};function oBe(e){var t=e.registry,n=e.callbacks,r=MN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(wi)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=MN(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=MN())};return{add:s,remove:l,stop:c}}var Bee=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=ks({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},$ee=function(){var e=document.documentElement;return e||He(!1),e},Fee=function(){var e=$ee(),t=Bee({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},sBe=function(){var e=Nee(),t=Fee(),n=e.y,r=e.x,i=$ee(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=tl({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:wi,displacement:wi}}};return f},aBe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=sBe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:pee(c),droppables:hee(l)},f={dimensions:d,critical:t,viewport:i};return f};function KG(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 lBe=function(e,t){var n=null,r=oBe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&KG(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&KG(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},aBe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},zee=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},cBe=function(e){window.scrollBy(e.x,e.y)},uBe=xi(function(e){return kk(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),dBe=function(t,n){var r=rf(uBe(n),function(i){return i.frame||He(!1),Eee(i.frame.pageMarginBox)(t)});return r},fBe=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=dBe(t,r);return o},Pd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},hBe=function(e,t){var n=e[t.size]*Pd.startFromPercentage,r=e[t.size]*Pd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},jee=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},Jz=1,pBe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Pd.maxPixelScroll;if(e===t.startScrollingFrom)return Jz;var n=jee({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Pd.maxPixelScroll*Pd.ease(r);return Math.ceil(i)},QG=Pd.durationDampening.accelerateAt,JG=Pd.durationDampening.stopDampeningAt,mBe=function(e,t){var n=t,r=JG,i=Date.now(),o=i-n;if(o>=JG)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}},vBe=dee(function(e){return e===0?0:e}),Uee=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=e9({container:n,distanceToEdges:s,dragStartTime:t,axis:Hz,shouldUseTimeDampening:o}),c=e9({container:n,distanceToEdges:s,dragStartTime:t,axis:vee,shouldUseTimeDampening:o}),d=vBe({x:c,y:l});if(Id(d,wi))return null;var f=gBe({container:n,subject:r,proposedScroll:d});return f?Id(f,wi)?null:f:null},yBe=dee(function(e){return e===0?0:e>0?1:-1}),Zz=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=Hi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Id(s,wi)?null:s}}(),Hee=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=yBe(i),l=Zz({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},ej=function(t,n){return Hee({current:t.scroll.current,max:t.scroll.max,change:n})},bBe=function(t,n){if(!ej(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Zz({current:i,max:r,change:n})},tj=function(t,n){var r=t.frame;return r?Hee({current:r.scroll.current,max:r.scroll.max,change:n}):!1},xBe=function(t,n){var r=t.frame;return!r||!tj(t,n)?null:Zz({current:r.scroll.current,max:r.scroll.max,change:n})},wBe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=Uee({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&ej(t,s)?s:null},_Be=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=Uee({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&tj(t,l)?l:null},t9=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=wBe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=fBe({center:s,destination:Ps(t.impact),droppables:t.dimensions.droppables});if(h){var p=_Be({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},SBe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=y1(t),i=y1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;t9({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};t9({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},EBe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=Hi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!tj(d,f))return f;var h=xBe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=ks(f,h);n(d.descriptor.id,p);var g=ks(f,p);return g},s=function(d,f,h){if(!d||!ej(f,h))return h;var p=bBe(f,h);if(!p)return r(h),null;var g=ks(h,p);r(g);var v=ks(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Ps(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},CBe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=SBe({scrollWindow:n,scrollDroppable:t}),o=EBe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},Ng="data-rbd",Bg=function(){var e=Ng+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),o3=function(){var e=Ng+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),TBe=function(){var e=Ng+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),n9={contextId:Ng+"-scroll-container-context-id"},kBe=function(t){return function(n){return"["+n+'="'+t+'"]'}},bb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},ABe="pointer-events: none;",RBe=function(e){var t=kBe(e),n=function(){var l=` + `+$G(t.source)+` + `},FS={dragHandleUsageInstructions:cLe,onDragStart:uLe,onDragUpdate:dLe,onDragEnd:fLe},_i={x:0,y:0},Hi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},ks=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Id=function(t,n){return t.x===n.x&&t.y===n.y},dv=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Cp=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},b1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},FG=function(t,n){return Math.min.apply(Math,n.map(function(r){return b1(t,r)}))},dee=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},hLe=function(e,t){var n=tl({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},hw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},zG=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}]},pLe={top:0,right:0,bottom:0,left:0},mLe=function(t,n){return n?hw(t,n.scroll.diff.displacement):t},gLe=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},vLe=function(t,n){return n&&n.shouldClipSubject?hLe(n.pageMarginBox,t):tl(t)},Lg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=mLe(t.marginBox,i),s=gLe(o,r,n),l=vLe(s,i);return{page:t,withPlaceholder:n,active:l}},Fz=function(e,t){e.frame||He(!1);var n=e.frame,r=ks(t,n.scroll.initial),i=dv(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Lg({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=$({},e,{frame:o,subject:s});return l};function aC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function zz(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,d=r.lefte.right,f=c&&d;if(f)return!0;var h=c&&s||d&&o;return h}},wLe=function(e){var t=fa(e.top,e.bottom),n=fa(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Uz={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},vee={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},_Le=function(e){return function(t){var n=fa(t.top,t.bottom),r=fa(t.left,t.right);return function(i){return e===Uz?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},SLe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:_i;return hw(t,r)},ELe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},CLe=function(t,n,r){return r(n)(t)},Hz=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?SLe(n,r):n;return ELe(l,r,s)&&CLe(l,i,s)},TLe=function(t){return Hz($({},t,{isVisibleThroughFrameFn:gee}))},yee=function(t){return Hz($({},t,{isVisibleThroughFrameFn:wLe}))},kLe=function(t){return Hz($({},t,{isVisibleThroughFrameFn:_Le(t.destination.axis)}))},ALe=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 RLe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return tl(Bz(n,r))}function w1(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,d){var f=RLe(d,r),h=d.descriptor.id;c.all.push(h);var p=TLe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=ALe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function ILe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function jG(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=ILe(t,{inHomeList:n});return{displaced:x1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function lC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,l=e.index,c=e.forceShouldAnimate,d=hv(t,r);if(l==null)return jG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=rf(n,function(y){return y.descriptor.index===l});if(!f)return jG({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=Ak(t,n),p=n.indexOf(f),g=h.slice(p),v=w1({afterDragging:g,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function jd(e,t){return!!t.effected[e]}var PLe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,l=r[s],c=l.descriptor.index,d=jd(s,o);return d?t?c:c-1:t?c+1:c},OLe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,d=n?c:c+1;return sd?null:s},MLe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,l=e.previousImpact,c=e.viewport,d=e.afterCritical,f=l.at;if(f||He(!1),f.type==="REORDER"){var h=OLe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:lC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=PLe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:lC({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},DLe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return jd(r,n)?o?_i:dv(i.point):o?i.point:_i},LLe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=kk(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=DLe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Hi(s,l)},bee=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},NLe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Wz=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},UG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.end]+bee(n,i),Wz(n,r.marginBox,i))},HG=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.start]-NLe(n,i),Wz(n,r.marginBox,i))},BLe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Cp(n.line,r.contentBox[n.start]+bee(n,i),Wz(n,r.contentBox,i))},$Le=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=fv(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return BLe({axis:c,moveInto:i.page,isMoving:l});var d=t.displaced,f=t.displacedBy,h=d.all[0];if(h){var p=r[h];if(jd(h,o))return HG({axis:c,moveRelativeTo:p.page,isMoving:l});var g=rC(p.page,f.point);return HG({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if(jd(v.descriptor.id,o)){var y=rC(v.page,dv(o.displacedBy.point));return UG({axis:c,moveRelativeTo:y,isMoving:l})}return UG({axis:c,moveRelativeTo:v.page,isMoving:l})},t3=function(e,t){var n=e.frame;return n?Hi(t,n.scroll.diff.displacement):t},FLe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,l=r.page.borderBox.center,c=n.at;return!i||!c?l:c.type==="REORDER"?$Le({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):LLe({impact:n,draggables:o,afterCritical:s})},Rk=function(e){var t=FLe(e),n=e.droppable,r=n?t3(n,t):t;return r},xee=function(e,t){var n=ks(t,e.scroll.initial),r=dv(n),i=tl({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 WG(e,t){return e.map(function(n){return t[n]})}function zLe(e,t){for(var n=0;n1?f.sort(function(h,p){return xo(h)[l.start]-xo(p)[l.start]})[0]:d.sort(function(h,p){var g=FG(n,zG(xo(h))),v=FG(n,zG(xo(p)));return g!==v?g-v:xo(h)[l.start]-xo(p)[l.start]})[0]},GG=function(t,n){var r=t.page.borderBox.center;return jd(t.descriptor.id,n)?ks(r,n.displacedBy.point):r},GLe=function(t,n){var r=t.page.borderBox;return jd(t.descriptor.id,n)?hw(r,dv(n.displacedBy.point)):r},VLe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return yee({target:GLe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=b1(t,t3(r,GG(l,o))),f=b1(t,t3(r,GG(c,o)));return dt.left&&e.topt.top}function eNe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var l=s.axis,c=Cp(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:b1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function tNe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=Tk(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!ZLe(t,s))return!1;if(Eee(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=fa(s[l.crossAxisStart],s[l.crossAxisEnd]),p=h(d),g=h(f);return!p&&!g?!0:p?dc});return i.length?i.length===1?i[0].descriptor.id:eNe({pageBorderBox:t,draggable:n,candidates:i}):null}var Cee=function(t,n){return tl(hw(t,n))},nNe=function(e,t){var n=e.frame;return n?Cee(t,n.scroll.diff.value):t};function Tee(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function rNe(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 iNe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,l=e.afterCritical,c=r.axis,d=pw(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=Ak(n,i),v=rf(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=jd(_,l),E=Tee({displaced:o,id:_});return x?E?p<=b:h_[l.start]+x&&h<_[l.end]-x:f>_[l.start]-d+x&&f<_[l.end]-d-x:A?h>_[l.start]+d+x&&h<_[l.end]+d-x:f>_[l.start]+x&&f<_[l.end]-x});if(!g)return null;var v={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:i.descriptor.id}}};return v},kee=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,l=e.afterCritical,c=Cee(n.page.borderBox,t),d=tNe({pageBorderBox:c,draggable:n,droppables:i});if(!d)return xLe;var f=i[d],h=fv(f.descriptor.id,r),p=nNe(f,c);return sNe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||iNe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},Vz=function(e,t){var n;return $({},e,(n={},n[t.descriptor.id]=t,n))},aNe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Ps(n),s=Ps(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=XLe(l);return Vz(i,c)},lNe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=aNe({previousImpact:i,impact:o,droppables:r}),l=Ps(o);if(!l)return s;var c=r[l];if(hv(t,c)||c.subject.withPlaceholder)return s;var d=See(c,t,n);return Vz(s,d)},_x=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,d=n||t.current.client.selection,f=ks(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:Hi(t.initial.client.borderBoxCenter,f)},p={selection:Hi(h.selection,l.scroll.current),borderBoxCenter:Hi(h.borderBoxCenter,l.scroll.current),offset:Hi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return $({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||kee({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=lNe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=$({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function cNe(e,t){return e.map(function(n){return t[n]})}var Aee=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=cNe(s.all,r),c=w1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return $({},t,{displaced:c})},Ree=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=Rk({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Gz({pageBorderBoxCenter:l,draggable:n,viewport:o})},Iee=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&He(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,l=s.draggables,c=s.droppables,d=l[t.critical.draggable.id],f=Ps(i);f||He(!1);var h=c[f],p=Aee({impact:i,viewport:o,destination:h,draggables:l}),g=Ree({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return _x({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},uNe=function(e){return{index:e.index,droppableId:e.droppableId}},Pee=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=pw(n.axis,t.displaceBy),s=fv(n.descriptor.id,r),l=s.indexOf(t);l===-1&&He(!1);var c=s.slice(l+1),d=c.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:d},h=w1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:uNe(t.descriptor)}};return{impact:p,afterCritical:f}},dNe=function(e,t){return{draggables:e.draggables,droppables:Vz(e.droppables,t)}},fNe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=rC(t.client,n),o=iC(i,r),s=$({},t,{placeholder:$({},t.placeholder,{client:i}),client:i,page:o});return s},hNe=function(e){var t=e.frame;return t||He(!1),t},pNe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,l=n[s],c=hNe(l),d=c.scroll.diff.value,f=Hi(i,d),h=fNe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},mNe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],A=Fz(E,x.scroll);return A}),i=$({},t.dimensions.droppables,{},hee(r)),o=pee(pNe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=$({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Ps(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=Pee({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=kee({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:y,viewport:t.viewport,afterCritical:v}),_=$({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=$({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},n3=function(t){return t.movementMode==="SNAP"},IN=function(t,n,r){var i=dNe(t.dimensions,n);return!n3(t)||r?_x({state:t,dimensions:i}):Iee({state:t,dimensions:i})};function PN(e){return e.isDragging&&e.movementMode==="SNAP"?$({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var VG={phase:"IDLE",completed:null,shouldFlush:!1},gNe=function(e,t){if(e===void 0&&(e=VG),t.type==="FLUSH")return $({},VG,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&He(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],d=s.droppables[r.droppable.id],f={selection:i,borderBoxCenter:c.client.borderBox.center,offset:_i},h={client:f,page:{selection:Hi(f.selection,o.scroll.initial),borderBoxCenter:Hi(f.selection,o.scroll.initial),offset:Hi(f.selection,o.scroll.diff.value)}},p=Tk(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=Pee({draggable:c,home:d,draggables:s.draggables,viewport:o}),v=g.impact,y=g.afterCritical,S={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:p,impact:v,afterCritical:y,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return S}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var _=$({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),mNe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var b=t.payload.client;return Id(b,e.current.client.selection)?e:_x({state:e,clientSelection:b,impact:n3(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return PN(e);$h(e)||He(!1);var x=t.payload,E=x.id,A=x.newScroll,R=e.dimensions.droppables[E];if(!R)return e;var k=Fz(R,A);return IN(e,k,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var O=t.payload,L=O.id,N=O.isEnabled,H=e.dimensions.droppables[L];H||He(!1),H.isEnabled===N&&He(!1);var W=$({},H,{isEnabled:N});return IN(e,W,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;$h(e)||He(!1);var z=t.payload,D=z.id,F=z.isCombineEnabled,j=e.dimensions.droppables[D];j||He(!1),j.isCombineEnabled===F&&He(!1);var V=$({},j,{isCombineEnabled:F});return IN(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;$h(e)||He(!1),e.isWindowScrollAllowed||He(!1);var G=t.payload.newScroll;if(Id(e.viewport.scroll.current,G))return PN(e);var K=xee(e.viewport,G);return n3(e)?Iee({state:e,viewport:K}):_x({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!$h(e))return e;var Y=t.payload.maxScroll;if(Id(Y,e.viewport.scroll.max))return e;var J=$({},e.viewport,{scroll:$({},e.viewport.scroll,{max:Y})});return $({phase:"DRAGGING"},e,{viewport:J})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&He(!1);var ie=JLe({state:e,type:t.type});return ie?_x({state:e,impact:ie.impact,clientSelection:ie.clientSelection,scrollJumpRequest:ie.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ce=t.payload.reason;e.phase!=="COLLECTING"&&He(!1);var ue=$({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ce});return ue}if(t.type==="DROP_ANIMATE"){var se=t.payload,Q=se.completed,ae=se.dropDuration,le=se.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||He(!1);var he={phase:"DROP_ANIMATING",completed:Q,dropDuration:ae,newHomeClientOffset:le,dimensions:e.dimensions};return he}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},vNe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},yNe=function(t){return{type:"LIFT",payload:t}},bNe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},xNe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},wNe=function(){return{type:"COLLECTION_STARTING",payload:null}},_Ne=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},SNe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},ENe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},Oee=function(t){return{type:"MOVE",payload:t}},CNe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},TNe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},kNe=function(){return{type:"MOVE_UP",payload:null}},ANe=function(){return{type:"MOVE_DOWN",payload:null}},RNe=function(){return{type:"MOVE_RIGHT",payload:null}},INe=function(){return{type:"MOVE_LEFT",payload:null}},qz=function(){return{type:"FLUSH",payload:null}},PNe=function(t){return{type:"DROP_ANIMATE",payload:t}},Xz=function(t){return{type:"DROP_COMPLETE",payload:t}},Mee=function(t){return{type:"DROP",payload:t}},ONe=function(t){return{type:"DROP_PENDING",payload:t}},Dee=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},MNe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,l=s.id,c=s.clientSelection,d=s.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Xz({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(qz()),r(vNe({draggableId:l,movementMode:d}));var h={shouldPublishImmediately:d==="SNAP"},p={draggableId:l,scrollOptions:h},g=e.startPublishing(p),v=g.critical,y=g.dimensions,S=g.viewport;r(bNe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},DNe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Yz={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},_1={opacity:{drop:0,combining:.7},scale:{drop:.75}},Kz={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Ch=Kz.outOfTheWay+"s "+Yz.outOfTheWay,Sx={fluid:"opacity "+Ch,snap:"transform "+Ch+", opacity "+Ch,drop:function(t){var n=t+"s "+Yz.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Ch,placeholder:"height "+Ch+", width "+Ch+", margin "+Ch},qG=function(t){return Id(t,_i)?null:"translate("+t.x+"px, "+t.y+"px)"},r3={moveTo:qG,drop:function(t,n){var r=qG(t);return r?n?r+" scale("+_1.scale.drop+")":r:null}},i3=Kz.minDropTime,Lee=Kz.maxDropTime,LNe=Lee-i3,XG=1500,NNe=.6,BNe=function(e){var t=e.current,n=e.destination,r=e.reason,i=b1(t,n);if(i<=0)return i3;if(i>=XG)return Lee;var o=i/XG,s=i3+LNe*o,l=r==="CANCEL"?s*NNe:s;return Number(l.toFixed(2))},$Ne=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,l=r.droppables,c=Ps(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=Ree({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=ks(h,n.client.borderBox.center);return p},FNe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=Aee({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:x1});return{impact:c,didDropInsideDroppable:!0}},zNe=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(ONe({reason:s}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&He(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||He(!1);var c=o.critical,d=o.dimensions,f=d.draggables[o.critical.draggable.id],h=FNe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=h.impact,g=h.didDropInsideDroppable,v=g?jz(p):null,y=g?kk(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},_={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=$Ne({impact:p,draggable:f,dimensions:d,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:_,impact:p},E=!Id(o.current.client.offset,b)||!!_.combine;if(!E){n(Xz({completed:x}));return}var A=BNe({current:o.current.client.offset,destination:b,reason:s}),R={newHomeClientOffset:b,dropDuration:A,completed:x};n(PNe(R))}}}},Nee=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function jNe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function UNe(e){var t=e.onWindowScroll;function n(){t(Nee())}var r=y1(n),i=jNe(r),o=Rd;function s(){return o!==Rd}function l(){s()&&He(!1),o=ia(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=Rd}return{start:l,stop:c,isActive:s}}var HNe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},WNe=function(e){var t=UNe({onWindowScroll:function(r){e.dispatch(CNe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&HNe(r)&&t.stop(),n(r)}}},GNe=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},VNe=function(){var e=[],t=function(o){var s=zz(e,function(d){return d.timerId===o});s===-1&&He(!1);var l=e.splice(s,1),c=l[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),l={timerId:s,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},qNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},XNe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},YNe=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},yb=function(t,n){n()},S_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},ON=function(t,n,r,i){if(!t){r(i(n));return}var o=GNe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},KNe=function(e,t){var n=VNe(),r=null,i=function(p,g){r&&He(!1),yb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),yb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(S_(p,g))})},s=function(p,g){r&&He(!1);var v=S_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){yb("onDragStart",function(){return ON(e().onDragStart,v,t,FS.onDragStart)})})},l=function(p,g){var v=jz(g),y=kk(g);r||He(!1);var S=!YNe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!qNe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!XNe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=$({},S_(p,r.mode),{combine:y,destination:v});n.add(function(){yb("onDragUpdate",function(){return ON(e().onDragUpdate,x,t,FS.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,yb("onDragEnd",function(){return ON(e().onDragEnd,p,t,FS.onDragEnd)})},f=function(){if(r){var p=$({},S_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});d(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:l,flush:c,drop:d,abort:f}},QNe=function(e,t){var n=KNe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},JNe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&He(!1),e.dispatch(Xz({completed:r.completed}))}}},ZNe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(Dee())}};n=requestAnimationFrame(function(){n=null,t=ia(window,[s])})}}}},eBe=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)}}}},tBe=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()}}}}}},nBe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},rBe=function(e){return function(t){return function(n){return function(r){if(nBe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&He(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},iBe=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(Mee({reason:r.reason})))}}}},oBe=JZ,sBe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return QZ(gNe,oBe(gDe(DNe(r),eBe(t),MNe(t),zNe,JNe,ZNe,iBe,rBe(s),WNe,tBe(n),QNe(i,o))))},MN=function(){return{additions:{},removals:{},modified:{}}};function aBe(e){var t=e.registry,n=e.callbacks,r=MN(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=r,h=f.additions,p=f.removals,g=f.modified,v=Object.keys(h).map(function(_){return t.draggable.getById(_).getDimension(_i)}).sort(function(_,b){return _.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(_){var b=t.droppable.getById(_),x=b.callbacks.getScrollWhileDragging();return{droppableId:_,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=MN(),n.publish(S)}))},s=function(f){var h=f.descriptor.id;r.additions[h]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[h]&&delete r.removals[h],o()},l=function(f){var h=f.descriptor;r.removals[h.id]=!0,r.modified[h.droppableId]=!0,r.additions[h.id]&&delete r.additions[h.id],o()},c=function(){i&&(cancelAnimationFrame(i),i=null,r=MN())};return{add:s,remove:l,stop:c}}var Bee=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=ks({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},$ee=function(){var e=document.documentElement;return e||He(!1),e},Fee=function(){var e=$ee(),t=Bee({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},lBe=function(){var e=Nee(),t=Fee(),n=e.y,r=e.x,i=$ee(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=tl({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:_i,displacement:_i}}};return f},cBe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=lBe(),o=i.scroll.current,s=t.droppable,l=r.droppable.getAllByType(s.type).map(function(h){return h.callbacks.getDimensionAndWatchScroll(o,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(h){return h.getDimension(o)}),d={draggables:pee(c),droppables:hee(l)},f={dimensions:d,critical:t,viewport:i};return f};function YG(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 uBe=function(e,t){var n=null,r=aBe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||He(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||He(!1),t.updateDroppableScroll({id:g,newScroll:v}))},l=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},c=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},d=function(g){n||He(!1);var v=n.critical.draggable;g.type==="ADDITION"&&YG(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&YG(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&He(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},_=e.subscribe(d);return n={critical:S,unsubscribe:_},cBe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},zee=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},dBe=function(e){window.scrollBy(e.x,e.y)},fBe=wi(function(e){return Tk(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),hBe=function(t,n){var r=rf(fBe(n),function(i){return i.frame||He(!1),Eee(i.frame.pageMarginBox)(t)});return r},pBe=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=hBe(t,r);return o},Pd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},mBe=function(e,t){var n=e[t.size]*Pd.startFromPercentage,r=e[t.size]*Pd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},jee=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},Qz=1,gBe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Pd.maxPixelScroll;if(e===t.startScrollingFrom)return Qz;var n=jee({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Pd.maxPixelScroll*Pd.ease(r);return Math.ceil(i)},KG=Pd.durationDampening.accelerateAt,QG=Pd.durationDampening.stopDampeningAt,vBe=function(e,t){var n=t,r=QG,i=Date.now(),o=i-n;if(o>=QG)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}},bBe=dee(function(e){return e===0?0:e}),Uee=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=ZG({container:n,distanceToEdges:s,dragStartTime:t,axis:Uz,shouldUseTimeDampening:o}),c=ZG({container:n,distanceToEdges:s,dragStartTime:t,axis:vee,shouldUseTimeDampening:o}),d=bBe({x:c,y:l});if(Id(d,_i))return null;var f=yBe({container:n,subject:r,proposedScroll:d});return f?Id(f,_i)?null:f:null},xBe=dee(function(e){return e===0?0:e>0?1:-1}),Jz=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=Hi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Id(s,_i)?null:s}}(),Hee=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=xBe(i),l=Jz({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},Zz=function(t,n){return Hee({current:t.scroll.current,max:t.scroll.max,change:n})},wBe=function(t,n){if(!Zz(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Jz({current:i,max:r,change:n})},ej=function(t,n){var r=t.frame;return r?Hee({current:r.scroll.current,max:r.scroll.max,change:n}):!1},_Be=function(t,n){var r=t.frame;return!r||!ej(t,n)?null:Jz({current:r.scroll.current,max:r.scroll.max,change:n})},SBe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=Uee({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&Zz(t,s)?s:null},EBe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var l=Uee({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&ej(t,l)?l:null},e9=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],c=l.page.marginBox;if(t.isWindowScrollAllowed){var d=t.viewport,f=SBe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=pBe({center:s,destination:Ps(t.impact),droppables:t.dimensions.droppables});if(h){var p=EBe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},CBe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=y1(t),i=y1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;e9({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},l=function(f){o&&He(!1);var h=Date.now(),p=!1,g=function(){p=!0};e9({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),o={dragStartTime:h,shouldUseTimeDampening:p},p&&s(f)},c=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:c,scroll:s}},TBe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=Hi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!ej(d,f))return f;var h=_Be(d,f);if(!h)return n(d.descriptor.id,f),null;var p=ks(f,h);n(d.descriptor.id,p);var g=ks(f,p);return g},s=function(d,f,h){if(!d||!Zz(f,h))return h;var p=wBe(f,h);if(!p)return r(h),null;var g=ks(h,p);r(g);var v=ks(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Ps(d.impact);h||He(!1);var p=o(d.dimensions.droppables[h],f);if(p){var g=d.viewport,v=s(d.isWindowScrollAllowed,g,p);v&&i(d,v)}}};return l},kBe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=CBe({scrollWindow:n,scrollDroppable:t}),o=TBe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(d){if(d.phase==="DRAGGING"){if(d.movementMode==="FLUID"){i.scroll(d);return}d.scrollJumpRequest&&o(d)}},l={scroll:s,start:i.start,stop:i.stop};return l},Ng="data-rbd",Bg=function(){var e=Ng+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),o3=function(){var e=Ng+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),ABe=function(){var e=Ng+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),t9={contextId:Ng+"-scroll-container-context-id"},RBe=function(t){return function(n){return"["+n+'="'+t+'"]'}},bb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},IBe="pointer-events: none;",PBe=function(e){var t=RBe(e),n=function(){var l=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(Bg.contextId),styles:{always:` -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); touch-action: manipulation; - `,resting:l,dragging:ABe,dropAnimating:l}}}(),r=function(){var l=` + `,resting:l,dragging:IBe,dropAnimating:l}}}(),r=function(){var l=` transition: `+Sx.outOfTheWay+`; - `;return{selector:t(o3.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}}(),i={selector:t(TBe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` + `;return{selector:t(o3.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}}(),i={selector:t(ABe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` cursor: grabbing; cursor: -webkit-grabbing; user-select: none; @@ -578,23 +578,25 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}},s=[r,n,i,o];return{always:bb(s,"always"),resting:bb(s,"resting"),dragging:bb(s,"dragging"),dropAnimating:bb(s,"dropAnimating"),userCancel:bb(s,"userCancel")}},Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect,DN=function(){var t=document.querySelector("head");return t||He(!1),t},r9=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function IBe(e,t){var n=bn(function(){return RBe(e)},[e]),r=I.useRef(null),i=I.useRef(null),o=xt(xi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Os(function(){!r.current&&!i.current||He(!1);var h=r9(t),p=r9(t);return r.current=h,i.current=p,h.setAttribute(Ng+"-always",e),p.setAttribute(Ng+"-dynamic",e),DN().appendChild(h),DN().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),DN().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=bn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var Wee=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Pk(e){return e instanceof Wee(e).HTMLElement}function PBe(e,t){var n="["+Bg.contextId+'="'+e+'"]',r=fee(document.querySelectorAll(n));if(!r.length)return null;var i=rf(r,function(o){return o.getAttribute(Bg.draggableId)===t});return!i||!Pk(i)?null:i}function OBe(e){var t=I.useRef({}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=PBe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(Bg.draggableId)===p&&(n.current=p)},[]);Os(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=bn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function MBe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return lC(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return lC(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function DBe(){var e=bn(MBe,[]);return I.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var nj=de.createContext(null),uC=function(){var e=document.body;return e||He(!1),e},LBe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},NBe=function(t){return"rbd-announcement-"+t};function BBe(e){var t=bn(function(){return NBe(e)},[e]),n=I.useRef(null);I.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,LBe),uC().appendChild(o),function(){setTimeout(function(){var c=uC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var $Be=0,FBe={separator:"::"};function rj(e,t){return t===void 0&&(t=FBe),bn(function(){return""+e+t.separator+$Be++},[t.separator,e])}function zBe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function jBe(e){var t=e.contextId,n=e.text,r=rj("hidden-text",{separator:"-"}),i=bn(function(){return zBe({contextId:t,uniqueId:r})},[r,t]);return I.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",uC().appendChild(s),function(){var c=uC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var Ok=de.createContext(null);function Gee(e){var t=I.useRef(e);return I.useEffect(function(){t.current=e}),t}function UBe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var HBe=9,WBe=13,ij=27,Vee=32,GBe=33,VBe=34,qBe=35,XBe=36,YBe=37,KBe=38,QBe=39,JBe=40,E_,ZBe=(E_={},E_[WBe]=!0,E_[HBe]=!0,E_),qee=function(e){ZBe[e.keyCode]&&e.preventDefault()},Mk=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=rf(t,function(r){return"on"+r in document});return n||e}(),Xee=0,i9=5;function e$e(e,t){return Math.abs(t.x-e.x)>=i9||Math.abs(t.y-e.y)>=i9}var o9={type:"IDLE"};function t$e(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===Xee){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(e$e(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===ij){s.preventDefault(),t();return}qee(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:Mk,fn:t}]}function n$e(e){var t=I.useRef(o9),n=I.useRef(Rd),r=bn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===Xee&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=bn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=ia(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=o9,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=t$e({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=ia(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Os(function(){return o(),function(){n.current()}},[o])}var Qp;function r$e(){}var i$e=(Qp={},Qp[VBe]=!0,Qp[GBe]=!0,Qp[XBe]=!0,Qp[qBe]=!0,Qp);function o$e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===ij){o.preventDefault(),n();return}if(o.keyCode===Vee){o.preventDefault(),r();return}if(o.keyCode===JBe){o.preventDefault(),e.moveDown();return}if(o.keyCode===KBe){o.preventDefault(),e.moveUp();return}if(o.keyCode===QBe){o.preventDefault(),e.moveRight();return}if(o.keyCode===YBe){o.preventDefault(),e.moveLeft();return}if(i$e[o.keyCode]){o.preventDefault();return}qee(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:Mk,fn:n}]}function s$e(e){var t=I.useRef(r$e),n=bn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Vee)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=ia(window,o$e(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=ia(window,[n],o)},[n]);Os(function(){return r(),function(){t.current()}},[r])}var LN={type:"IDLE"},a$e=120,l$e=.15;function c$e(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===ij&&i.preventDefault(),t()}},{eventName:Mk,fn:t}]}function u$e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=l$e;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Mk,fn:t}]}function d$e(e){var t=I.useRef(LN),n=I.useRef(Rd),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=bn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=ia(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(LN),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=ia(window,u$e(v),g),S=ia(window,c$e(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,a$e);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Os(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(LN))}},[r,s,i]),Os(function(){var g=ia(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var f$e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Yee(e,t){if(t==null)return!1;var n=!!f$e[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Yee(e,t.parentElement)}function h$e(e,t){var n=t.target;return Pk(n)?Yee(e,n):!1}var p$e=function(e){return tl(e.getBoundingClientRect()).center};function m$e(e){return e instanceof Wee(e).Element}var g$e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=rf(t,function(r){return r in Element.prototype});return n||e}();function Kee(e,t){return e==null?null:e[g$e](t)?e:Kee(e.parentElement,t)}function v$e(e,t){return e.closest?e.closest(t):Kee(e,t)}function y$e(e){return"["+Bg.contextId+'="'+e+'"]'}function b$e(e,t){var n=t.target;if(!m$e(n))return null;var r=y$e(e),i=v$e(n,r);return!i||!Pk(i)?null:i}function x$e(e,t){var n=b$e(e,t);return n?n.getAttribute(Bg.draggableId):null}function w$e(e,t){var n="["+o3.contextId+'="'+e+'"]',r=fee(document.querySelectorAll(n)),i=rf(r,function(o){return o.getAttribute(o3.id)===t});return!i||!Pk(i)?null:i}function _$e(e){e.preventDefault()}function C_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function Qee(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||!zee(n.getState(),i))}function S$e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=Qee({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=w$e(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&h$e(f,l))return null;var h=t.claim(s||Rd),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(R,k){C_({expected:R,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(k())}var S=y.bind(null,"DRAGGING");function _(R){function k(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(k(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(gNe(R.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),R.cleanup(),N.shouldBlockNextClick){var H=ia(window,[{eventName:"click",fn:_$e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}k(),r.dispatch(Mee({reason:L}))}return $({isActive:function(){return C_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},R.actions)}function b(R){var k=y1(function(L){S(function(){return Oee({client:L})})}),O=_({liftActionArgs:{id:o,clientSelection:R,movementMode:"FLUID"},cleanup:function(){return k.cancel()},actions:{move:k}});return $({},O,{move:k})}function x(){var R={moveUp:function(){return S(CNe)},moveRight:function(){return S(kNe)},moveDown:function(){return S(TNe)},moveLeft:function(){return S(ANe)}};return _({liftActionArgs:{id:o,clientSelection:p$e(f),movementMode:"SNAP"},cleanup:Rd,actions:R})}function E(){var R=C_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});R&&t.release()}var A={isActive:function(){return C_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return A}var E$e=[n$e,s$e,d$e];function C$e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?E$e:[],i||[]),l=I.useState(function(){return UBe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Os(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Os(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return Qee({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return S$e({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return x$e(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Xz()))},[l,n]),v=xt(l.isClaimed,[l]),y=bn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},extras:s,enabled:l=!1,element:c=C.jsx(bFe,{}),value:d,id:f,i:h=0,variant:p="default",UNSAFE_extrasPlacement:g="center",autoFocus:v,cardStyle:y,sortable:S}){const[_,b]=I.useState(null),x=In(),E=A=>C.jsxs(dt,{display:"flex",alignItems:g,children:[S&&C.jsx("div",{...A,children:C.jsx(dt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Rxe,{})})}),e!==null&&I.cloneElement(e,{style:{marginRight:x.spacing(1),marginTop:x.spacing(.5),marginBottom:x.spacing(.5)},color:"action"}),C.jsx(dt,{flexGrow:1,sx:{ml:e===null?2:0},children:I.cloneElement(c,{onDelete:()=>o(f??h),autoFocus:v,value:d,key:f??h,onValueChange:R=>i(f??h,R,l),onChange:R=>i(f??h,R.target.value,l),ref:R=>b(R)})}),C.jsxs(dt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Tg,{color:"primary",edge:"end",onChange:(R,k)=>i(f??h,d,k),checked:l}),r&&C.jsx(Bd,{edge:"end",onClick:()=>{_!=null&&_.focus&&_.focus()},children:C.jsx(sk,{})}),n&&C.jsx(Bd,{onClick:()=>o(f??h),children:C.jsx(Cxe,{})}),s&&s(d)]})]});return C.jsx(hFe,{index:h,draggableId:`${f}`,children:A=>C.jsx("div",{ref:A.innerRef,...A.draggableProps,children:C.jsx(dt,{sx:{pb:1,ml:2},children:p==="outlined"?C.jsx(mme,{variant:"outlined",style:{borderColor:"transparent",paddingRight:x.spacing(2),transition:x.transitions.create(["box-shadow","border-color"]),...y},children:E(A.dragHandleProps)}):E(A.dragHandleProps)})})})}function _Fe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function SFe(e){const{addItemLabel:t="Add Item",UNSAFE_label:n,UNSAFE_text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholder:l,autoFocus:c,category:d,order:f,onChange:h,addItemExtras:p}=e,g=xFe(),v=In(),[y,S]=I.useState(s),[_,b]=I.useState(-1);I.useEffect(()=>{const R=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(R)}},[s,S,v.transitions.duration.standard]);const x=ee.uniqBy([...y,...s],R=>R.id).map(R=>s.find(k=>R.id===k.id)??R).map((R,k)=>{const{enabled:O,element:L,value:N,id:H}=R??{};return{value:N,render:W=>C.jsx(VD,{in:!!s.find(z=>z.id===R.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(wFe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:k,autoFocus:c||k===_,...W})}),key:H,in:!!s.find(W=>W.id===R.id)}}),E=ee.sortBy(x,R=>d==null?void 0:d(R.value),R=>f==null?void 0:f(R.value)).map(R=>({...R,render:k=>C.jsx(dt,{children:R.render(k)},R.key)}));return C.jsx(I$e,{onDragEnd:R=>{if(!R.destination)return;const k=_Fe(s,R.source.index,R.destination.index);h==null||h(k),S(k)},children:C.jsxs(wp,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(gpe,{disableSticky:!0,children:[n&&C.jsx(zt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(zt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(dt,{mt:d?-1:0,children:C.jsx(rte,{droppableId:"list",children:R=>C.jsxs("div",{...R.droppableProps,ref:R.innerRef,children:[(()=>{const k=[];return E.forEach((O,L)=>{d&&A(E,L,O)&&k.push(C.jsx(VD,{in:s.some(N=>d(N.value)===d(O.value)),appear:!0,children:C.jsx(dt,{pl:2,pb:2,pt:1,children:C.jsx(zt,{variant:"overline",color:"text.secondary",children:d(O.value)})})},d(O.value))),k.push(O.render())}),k})(),R.placeholder]})})}),C.jsx(VD,{in:!(s!=null&&s.length),children:C.jsx(dt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(zt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(dt,{p:2,pt:1,mb:-3,children:[C.jsx(kK,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(vxe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:R=>wn(R.palette.text.primary,R.palette.action.activatedOpacity)},children:C.jsx(dt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(R,k,O){return!!(d&&(R[k-1]===void 0||d(R[k-1].value)!==d(O.value)))}}function Dk({onChange:e,value:t,editor:n,create:r,...i}){const[o,s]=I.useState(t??[]);function l(c){s(c),e==null||e(c)}return I.useEffect(()=>{s(t??[])},[t]),C.jsx(dt,{sx:{ml:-2},children:C.jsx(SFe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),deletable:!0,editable:!1,onAddItem:()=>l==null?void 0:l([...o,{key:Fi(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ee.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ee.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ee.map(c,d=>d.value))})})}const od=[{key:"equal",apply:({value:e,reference:t})=>e===t,needsReference:!0},{key:"less-than",apply:({value:e,reference:t})=>ee>t,needsReference:!0},{key:"changed",apply:({value:e,property:t,step:n,node:r})=>{if(r.parent){const i=ee.findLast(r.parent.events,o=>o.step({value:l,label:ee.startCase(l)})),onChange:l=>r({type:l==="any"?void 0:l}),value:e.type??"any"}),C.jsx(nc,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(vx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ee.map(n,l=>({value:l,label:C.jsxs(C.Fragment,{children:[ee.last(l.split(".")),C.jsx(vi,{}),C.jsx(zt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${l}`})]})})),onChange:l=>r({property:l}),value:e.property}),C.jsx(vi,{}),C.jsx(vx,{placeholder:"Condition",items:od.map(l=>({value:l.key,label:ee.startCase(l.key)})),value:((i=e.condition)==null?void 0:i.key)??((o=od==null?void 0:od[0])==null?void 0:o.key),onChange:l=>r({condition:ee.find(od,{key:l})})}),C.jsx(vi,{}),C.jsx(K1,{label:"Reference",fullWidth:!0,defaultValue:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:l=>r({reference:+l.target.value}),type:"number",disabled:!((s=e.condition)!=null&&s.needsReference)}),C.jsx(vi,{sx:{px:2}}),C.jsx(CFe,{checked:!!e.active,onChange:(l,c)=>r({active:c}),sx:{mr:-2}})]})}function kFe({layer:e}){var s,l,c;const{layer:t,setLayer:n}=Ql(e),{breakpoints:r}=(t==null?void 0:t.source)??{};function i(d){t&&n(to(t,f=>ee.set(f,"source.breakpoints",d)))}const o=I.useMemo(()=>{var d,f,h;return ee.chain((h=(f=(d=t==null?void 0:t.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events).flatMap(ee.keys).uniq().filter(p=>p!=="type").value()},[(c=(l=(s=t==null?void 0:t.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events]);return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{minWidth:720,mb:2},children:C.jsx(Dk,{icon:null,value:r,deletable:!0,editable:!1,editor:d=>C.jsx(TFe,{value:d,properties:o}),create:()=>({active:!0,property:o==null?void 0:o[0],condition:od==null?void 0:od[0],type:void 0,reference:0}),onChange:d=>i(d),addItemLabel:"Breakpoint",placeholder:"Click the button below to add a breakpoint."})})})}function AFe(){const{controls:e,onChange:t,state:n}=Lu(),[r,i]=I.useState("standard"),{key:o,setKey:s,layers:l,layer:c,setLayer:d}=Ql(),{code:f}=(c==null?void 0:c.source)??{};function h(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}return C.jsx(QQ,{value:r,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:o,items:ee.map(l,p=>({id:p.key,name:Fo(p)})),onChange:s,showArrow:!0}),C.jsxs(tJ,{onChange:(p,g)=>i(g),children:[C.jsx(Dm,{label:"Standard",value:"standard"}),C.jsx(Dm,{label:"Advanced",value:"advanced"})]})]}),C.jsxs(Sn.Content,{children:[C.jsx(dt,{overflow:"auto",height:"100%",children:C.jsxs(dt,{pt:6,height:"100%",children:[C.jsx($m,{value:"standard",children:C.jsxs(dt,{children:[h("Breakpoints"),C.jsx(kFe,{layer:c==null?void 0:c.key})]})}),C.jsx($m,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(VSe,{code:f??QSe(ee.values(fJ)),onChange:p=>c&&d(to(c,g=>ee.set(g,"source.code",p)))})})]})})," "]}),C.jsx(Sn.Extras,{children:e})]})})}function RFe(){const{controls:e,onChange:t,state:n}=Lu(),[r]=iQ();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(_n,{vertical:!0,children:r.length?C.jsx(iv,{y:!0,children:C.jsx(wp,{sx:{pt:6},children:ee.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Qm,{children:C.jsx(ol,{primary:i.content,secondary:i.timestamp})}),C.jsx(nc,{})]},o))})}):C.jsx(eg,{pt:6,label:"Logs",icon:C.jsx(KK,{})})})}),C.jsx(Sn.Extras,{children:e})]})}var ite={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Bt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=W&&(F+=N.value),N.mode==="max"&&z<=W&&(F+=N.value),D[j]||(D[j]=""),F&&(" "+D[j]+" ").indexOf(" "+F+" ")===-1&&(D[j]+=" "+F));for(var G in V)V.hasOwnProperty(G)&&(D[V[G]]?this.element.setAttribute(V[G],D[V[G]].substr(1)):this.element.removeAttribute(V[G]))}}function p(k,O){k.elementQueriesSetupInformation||(k.elementQueriesSetupInformation=new h(k,O)),k.elementQueriesSensor||(k.elementQueriesSensor=new n(k,function(){k.elementQueriesSetupInformation.call()}))}function g(k,O,L,N){if(typeof s[k]>"u"){s[k]=[];var H=l.length;o.innerHTML+=` + `}},s=[r,n,i,o];return{always:bb(s,"always"),resting:bb(s,"resting"),dragging:bb(s,"dragging"),dropAnimating:bb(s,"dropAnimating"),userCancel:bb(s,"userCancel")}},Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect,DN=function(){var t=document.querySelector("head");return t||He(!1),t},n9=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function OBe(e,t){var n=xn(function(){return PBe(e)},[e]),r=I.useRef(null),i=I.useRef(null),o=xt(wi(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=xt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Os(function(){!r.current&&!i.current||He(!1);var h=n9(t),p=n9(t);return r.current=h,i.current=p,h.setAttribute(Ng+"-always",e),p.setAttribute(Ng+"-dynamic",e),DN().appendChild(h),DN().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),DN().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=xt(function(){return o(n.dragging)},[o,n.dragging]),c=xt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=xt(function(){i.current&&o(n.resting)},[o,n.resting]),f=xn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var Wee=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Ik(e){return e instanceof Wee(e).HTMLElement}function MBe(e,t){var n="["+Bg.contextId+'="'+e+'"]',r=fee(document.querySelectorAll(n));if(!r.length)return null;var i=rf(r,function(o){return o.getAttribute(Bg.draggableId)===t});return!i||!Ik(i)?null:i}function DBe(e){var t=I.useRef({}),n=I.useRef(null),r=I.useRef(null),i=I.useRef(!1),o=xt(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,_=S[p];_!==v&&delete S[p]}},[]),s=xt(function(p){var g=MBe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=xt(function(p,g){n.current===p&&(n.current=g)},[]),c=xt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=xt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(Bg.draggableId)===p&&(n.current=p)},[]);Os(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=xn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function LBe(){var e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){var g=t.indexOf(h);g!==-1&&t.splice(g,1)}}function r(h){t.length&&t.forEach(function(p){return p(h)})}function i(h){return e.draggables[h]||null}function o(h){var p=i(h);return p||He(!1),p}var s={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var g=p.descriptor.id,v=i(g);v&&p.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:function(p){return!!i(p)},getAllByType:function(p){return aC(e.draggables).filter(function(g){return g.descriptor.type===p})}};function l(h){return e.droppables[h]||null}function c(h){var p=l(h);return p||He(!1),p}var d={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=l(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return aC(e.droppables).filter(function(g){return g.descriptor.type===p})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:d,subscribe:n,clean:f}}function NBe(){var e=xn(LBe,[]);return I.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var tj=de.createContext(null),cC=function(){var e=document.body;return e||He(!1),e},BBe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},$Be=function(t){return"rbd-announcement-"+t};function FBe(e){var t=xn(function(){return $Be(e)},[e]),n=I.useRef(null);I.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,BBe),cC().appendChild(o),function(){setTimeout(function(){var c=cC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=xt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var zBe=0,jBe={separator:"::"};function nj(e,t){return t===void 0&&(t=jBe),xn(function(){return""+e+t.separator+zBe++},[t.separator,e])}function UBe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function HBe(e){var t=e.contextId,n=e.text,r=nj("hidden-text",{separator:"-"}),i=xn(function(){return UBe({contextId:t,uniqueId:r})},[r,t]);return I.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",cC().appendChild(s),function(){var c=cC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var Pk=de.createContext(null);function Gee(e){var t=I.useRef(e);return I.useEffect(function(){t.current=e}),t}function WBe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&He(!1);var l={abandon:s};return e=l,l}function i(){e||He(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var GBe=9,VBe=13,rj=27,Vee=32,qBe=33,XBe=34,YBe=35,KBe=36,QBe=37,JBe=38,ZBe=39,e$e=40,E_,t$e=(E_={},E_[VBe]=!0,E_[GBe]=!0,E_),qee=function(e){t$e[e.keyCode]&&e.preventDefault()},Ok=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=rf(t,function(r){return"on"+r in document});return n||e}(),Xee=0,r9=5;function n$e(e,t){return Math.abs(t.x-e.x)>=r9||Math.abs(t.y-e.y)>=r9}var i9={type:"IDLE"};function r$e(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var l=s.button,c=s.clientX,d=s.clientY;if(l===Xee){var f={x:c,y:d},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&He(!1);var p=h.point;if(n$e(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var l=r();if(l.type==="PENDING"){t();return}if(s.keyCode===rj){s.preventDefault(),t();return}qee(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var l=r();if(l.type==="IDLE"&&He(!1),l.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:Ok,fn:t}]}function i$e(e){var t=I.useRef(i9),n=I.useRef(Rd),r=xn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===Xee&&!(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey)){var p=e.findClosestDraggableId(h);if(p){var g=e.tryGetLock(p,s,{sourceEvent:h});if(g){h.preventDefault();var v={x:h.clientX,y:h.clientY};n.current(),d(g,v)}}}}}},[e]),i=xn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(h){if(!h.defaultPrevented){var p=e.findClosestDraggableId(h);if(p){var g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&h.preventDefault())}}}}},[e]),o=xt(function(){var h={passive:!1,capture:!0};n.current=ia(window,[i,r],h)},[i,r]),s=xt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=i9,n.current(),o())},[o]),l=xt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=xt(function(){var h={capture:!0,passive:!1},p=r$e({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=ia(window,p,h)},[l,s]),d=xt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Os(function(){return o(),function(){n.current()}},[o])}var Qp;function o$e(){}var s$e=(Qp={},Qp[XBe]=!0,Qp[qBe]=!0,Qp[KBe]=!0,Qp[YBe]=!0,Qp);function a$e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===rj){o.preventDefault(),n();return}if(o.keyCode===Vee){o.preventDefault(),r();return}if(o.keyCode===e$e){o.preventDefault(),e.moveDown();return}if(o.keyCode===JBe){o.preventDefault(),e.moveUp();return}if(o.keyCode===ZBe){o.preventDefault(),e.moveRight();return}if(o.keyCode===QBe){o.preventDefault(),e.moveLeft();return}if(s$e[o.keyCode]){o.preventDefault();return}qee(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:Ok,fn:n}]}function l$e(e){var t=I.useRef(o$e),n=xn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Vee)return;var s=e.findClosestDraggableId(o);if(!s)return;var l=e.tryGetLock(s,f,{sourceEvent:o});if(!l)return;o.preventDefault();var c=!0,d=l.snapLift();t.current();function f(){c||He(!1),c=!1,t.current(),r()}t.current=ia(window,a$e(d,f),{capture:!0,passive:!1})}}},[e]),r=xt(function(){var o={passive:!1,capture:!0};t.current=ia(window,[n],o)},[n]);Os(function(){return r(),function(){t.current()}},[r])}var LN={type:"IDLE"},c$e=120,u$e=.15;function d$e(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===rj&&i.preventDefault(),t()}},{eventName:Ok,fn:t}]}function f$e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var l=o.touches[0],c=l.clientX,d=l.clientY,f={x:c,y:d};o.preventDefault(),s.actions.move(f)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&He(!1);var l=o.touches[0];if(l){var c=l.force>=u$e;if(c){var d=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){d&&t();return}if(d){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Ok,fn:t}]}function h$e(e){var t=I.useRef(LN),n=I.useRef(Rd),r=xt(function(){return t.current},[]),i=xt(function(g){t.current=g},[]),o=xn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,l,{sourceEvent:g});if(y){var S=g.touches[0],_=S.clientX,b=S.clientY,x={x:_,y:b};n.current(),h(y,x)}}}}}},[e]),s=xt(function(){var g={capture:!0,passive:!1};n.current=ia(window,[o],g)},[o]),l=xt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(LN),n.current(),s())},[s,i]),c=xt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=xt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=ia(window,f$e(v),g),S=ia(window,d$e(v),g);n.current=function(){y(),S()}},[c,r,l]),f=xt(function(){var g=r();g.type!=="PENDING"&&He(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=xt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,c$e);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Os(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(LN))}},[r,s,i]),Os(function(){var g=ia(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var p$e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Yee(e,t){if(t==null)return!1;var n=!!p$e[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Yee(e,t.parentElement)}function m$e(e,t){var n=t.target;return Ik(n)?Yee(e,n):!1}var g$e=function(e){return tl(e.getBoundingClientRect()).center};function v$e(e){return e instanceof Wee(e).Element}var y$e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=rf(t,function(r){return r in Element.prototype});return n||e}();function Kee(e,t){return e==null?null:e[y$e](t)?e:Kee(e.parentElement,t)}function b$e(e,t){return e.closest?e.closest(t):Kee(e,t)}function x$e(e){return"["+Bg.contextId+'="'+e+'"]'}function w$e(e,t){var n=t.target;if(!v$e(n))return null;var r=x$e(e),i=b$e(n,r);return!i||!Ik(i)?null:i}function _$e(e,t){var n=w$e(e,t);return n?n.getAttribute(Bg.draggableId):null}function S$e(e,t){var n="["+o3.contextId+'="'+e+'"]',r=fee(document.querySelectorAll(n)),i=rf(r,function(o){return o.getAttribute(o3.id)===t});return!i||!Ik(i)?null:i}function E$e(e){e.preventDefault()}function C_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function Qee(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||!zee(n.getState(),i))}function C$e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=Qee({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=S$e(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&m$e(f,l))return null;var h=t.claim(s||Rd),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(R,k){C_({expected:R,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(k())}var S=y.bind(null,"DRAGGING");function _(R){function k(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(k(),p!=="PRE_DRAG"&&He(!1)),r.dispatch(yNe(R.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),R.cleanup(),N.shouldBlockNextClick){var H=ia(window,[{eventName:"click",fn:E$e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}k(),r.dispatch(Mee({reason:L}))}return $({isActive:function(){return C_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},R.actions)}function b(R){var k=y1(function(L){S(function(){return Oee({client:L})})}),O=_({liftActionArgs:{id:o,clientSelection:R,movementMode:"FLUID"},cleanup:function(){return k.cancel()},actions:{move:k}});return $({},O,{move:k})}function x(){var R={moveUp:function(){return S(kNe)},moveRight:function(){return S(RNe)},moveDown:function(){return S(ANe)},moveLeft:function(){return S(INe)}};return _({liftActionArgs:{id:o,clientSelection:g$e(f),movementMode:"SNAP"},cleanup:Rd,actions:R})}function E(){var R=C_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});R&&t.release()}var A={isActive:function(){return C_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return A}var T$e=[i$e,l$e,h$e];function k$e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?T$e:[],i||[]),l=I.useState(function(){return WBe()})[0],c=xt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Os(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Os(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=xt(function(_){return Qee({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=xt(function(_,b,x){return C$e({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=xt(function(_){return _$e(t,_)},[t]),p=xt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=xt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(qz()))},[l,n]),v=xt(l.isClaimed,[l]),y=xn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},extras:s,enabled:l=!1,element:c=C.jsx(wFe,{}),value:d,id:f,i:h=0,variant:p="default",UNSAFE_extrasPlacement:g="center",autoFocus:v,cardStyle:y,sortable:S}){const[_,b]=I.useState(null),x=Cn(),E=A=>C.jsxs(dt,{display:"flex",alignItems:g,children:[S&&C.jsx("div",{...A,children:C.jsx(dt,{color:"text.secondary",sx:{pr:2},children:C.jsx(Ixe,{})})}),e!==null&&I.cloneElement(e,{style:{marginRight:x.spacing(1),marginTop:x.spacing(.5),marginBottom:x.spacing(.5)},color:"action"}),C.jsx(dt,{flexGrow:1,sx:{ml:e===null?2:0},children:I.cloneElement(c,{onDelete:()=>o(f??h),autoFocus:v,value:d,key:f??h,onValueChange:R=>i(f??h,R,l),onChange:R=>i(f??h,R.target.value,l),ref:R=>b(R)})}),C.jsxs(dt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Tg,{color:"primary",edge:"end",onChange:(R,k)=>i(f??h,d,k),checked:l}),r&&C.jsx(Bd,{edge:"end",onClick:()=>{_!=null&&_.focus&&_.focus()},children:C.jsx(ok,{})}),n&&C.jsx(Bd,{onClick:()=>o(f??h),children:C.jsx(Txe,{})}),s&&s(d)]})]});return C.jsx(mFe,{index:h,draggableId:`${f}`,children:A=>C.jsx("div",{ref:A.innerRef,...A.draggableProps,children:C.jsx(dt,{sx:{pb:1,ml:2},children:p==="outlined"?C.jsx(gme,{variant:"outlined",style:{borderColor:"transparent",paddingRight:x.spacing(2),transition:x.transitions.create(["box-shadow","border-color"]),...y},children:E(A.dragHandleProps)}):E(A.dragHandleProps)})})})}function EFe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function CFe(e){const{addItemLabel:t="Add Item",UNSAFE_label:n,UNSAFE_text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholder:l,autoFocus:c,category:d,order:f,onChange:h,addItemExtras:p}=e,g=_Fe(),v=Cn(),[y,S]=I.useState(s),[_,b]=I.useState(-1);I.useEffect(()=>{const R=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(R)}},[s,S,v.transitions.duration.standard]);const x=ee.uniqBy([...y,...s],R=>R.id).map(R=>s.find(k=>R.id===k.id)??R).map((R,k)=>{const{enabled:O,element:L,value:N,id:H}=R??{};return{value:N,render:W=>C.jsx(GD,{in:!!s.find(z=>z.id===R.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(SFe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:k,autoFocus:c||k===_,...W})}),key:H,in:!!s.find(W=>W.id===R.id)}}),E=ee.sortBy(x,R=>d==null?void 0:d(R.value),R=>f==null?void 0:f(R.value)).map(R=>({...R,render:k=>C.jsx(dt,{children:R.render(k)},R.key)}));return C.jsx(O$e,{onDragEnd:R=>{if(!R.destination)return;const k=EFe(s,R.source.index,R.destination.index);h==null||h(k),S(k)},children:C.jsxs(wp,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(vpe,{disableSticky:!0,children:[n&&C.jsx(zt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(zt,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(dt,{mt:d?-1:0,children:C.jsx(rte,{droppableId:"list",children:R=>C.jsxs("div",{...R.droppableProps,ref:R.innerRef,children:[(()=>{const k=[];return E.forEach((O,L)=>{d&&A(E,L,O)&&k.push(C.jsx(GD,{in:s.some(N=>d(N.value)===d(O.value)),appear:!0,children:C.jsx(dt,{pl:2,pb:2,pt:1,children:C.jsx(zt,{variant:"overline",color:"text.secondary",children:d(O.value)})})},d(O.value))),k.push(O.render())}),k})(),R.placeholder]})})}),C.jsx(GD,{in:!(s!=null&&s.length),children:C.jsx(dt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(zt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(dt,{p:2,pt:1,mb:-3,children:[C.jsx(TK,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(yxe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:R=>_n(R.palette.text.primary,R.palette.action.activatedOpacity)},children:C.jsx(dt,{sx:{color:"text.primary"},children:t})}),p]})]})});function A(R,k,O){return!!(d&&(R[k-1]===void 0||d(R[k-1].value)!==d(O.value)))}}function Mk({onChange:e,value:t,editor:n,create:r,...i}){const[o,s]=I.useState(t??[]);function l(c){s(c),e==null||e(c)}return I.useEffect(()=>{s(t??[])},[t]),C.jsx(dt,{sx:{ml:-2},children:C.jsx(CFe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),deletable:!0,editable:!1,onAddItem:()=>l==null?void 0:l([...o,{key:li(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(ee.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(ee.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(ee.map(c,d=>d.value))})})}const od=[{key:"equal",apply:({value:e,reference:t})=>e===t,needsReference:!0},{key:"less-than",apply:({value:e,reference:t})=>ee>t,needsReference:!0},{key:"changed",apply:({value:e,property:t,step:n,node:r})=>{if(r.parent){const i=ee.findLast(r.parent.events,o=>o.step({value:l,label:ee.startCase(l)})),onChange:l=>r({type:l==="any"?void 0:l}),value:e.type??"any"}),C.jsx(gl,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(vx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:ee.map(n,l=>({value:l,label:C.jsxs(C.Fragment,{children:[ee.last(l.split(".")),C.jsx(yi,{}),C.jsx(zt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${l}`})]})})),onChange:l=>r({property:l}),value:e.property}),C.jsx(yi,{}),C.jsx(vx,{placeholder:"Condition",items:od.map(l=>({value:l.key,label:ee.startCase(l.key)})),value:((i=e.condition)==null?void 0:i.key)??((o=od==null?void 0:od[0])==null?void 0:o.key),onChange:l=>r({condition:ee.find(od,{key:l})})}),C.jsx(yi,{}),C.jsx(K1,{label:"Reference",fullWidth:!0,defaultValue:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:l=>r({reference:+l.target.value}),type:"number",disabled:!((s=e.condition)!=null&&s.needsReference)}),C.jsx(yi,{sx:{px:2}}),C.jsx(kFe,{checked:!!e.active,onChange:(l,c)=>r({active:c}),sx:{mr:-2}})]})}function RFe({layer:e}){var s,l,c;const{layer:t,setLayer:n}=Jl(e),{breakpoints:r}=(t==null?void 0:t.source)??{};function i(d){t&&n(to(t,f=>ee.set(f,"source.breakpoints",d)))}const o=I.useMemo(()=>{var d,f,h;return ee.chain((h=(f=(d=t==null?void 0:t.source)==null?void 0:d.trace)==null?void 0:f.content)==null?void 0:h.events).flatMap(ee.keys).uniq().filter(p=>p!=="type").value()},[(c=(l=(s=t==null?void 0:t.source)==null?void 0:s.trace)==null?void 0:l.content)==null?void 0:c.events]);return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{minWidth:720,mb:2},children:C.jsx(Mk,{icon:null,value:r,deletable:!0,editable:!1,editor:d=>C.jsx(AFe,{value:d,properties:o}),create:()=>({active:!0,property:o==null?void 0:o[0],condition:od==null?void 0:od[0],type:void 0,reference:0}),onChange:d=>i(d),addItemLabel:"Breakpoint",placeholder:"Click the button below to add a breakpoint."})})})}const IFe=C.jsx(gl,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}});function PFe(){const{controls:e,onChange:t,state:n}=Lu(),[r,i]=I.useState("standard"),{key:o,setKey:s,layers:l,layer:c,setLayer:d}=Jl(),{code:f}=(c==null?void 0:c.source)??{};function h(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}return C.jsx(QQ,{value:r,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:o,items:ee.map(l,p=>({id:p.key,name:Fo(p)})),onChange:s,showArrow:!0}),IFe,C.jsxs(tJ,{onChange:(p,g)=>i(g),children:[C.jsx(Dm,{label:"Standard",value:"standard"}),C.jsx(Dm,{label:"Advanced",value:"advanced"})]})]}),C.jsxs(Sn.Content,{children:[C.jsx(dt,{overflow:"auto",height:"100%",children:C.jsxs(dt,{pt:6,height:"100%",children:[C.jsx($m,{value:"standard",children:C.jsxs(dt,{children:[h("Breakpoints"),C.jsx(RFe,{layer:c==null?void 0:c.key})]})}),C.jsx($m,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(XSe,{code:f??ZSe(ee.values(fJ)),onChange:p=>c&&d(to(c,g=>ee.set(g,"source.code",p)))})})]})})," "]}),C.jsx(Sn.Extras,{children:e})]})})}function OFe(){const{controls:e,onChange:t,state:n}=Lu(),[r]=rQ();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:r.length?C.jsx(iv,{y:!0,children:C.jsx(wp,{sx:{pt:6},children:ee.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Qm,{children:C.jsx(sl,{primary:i.content,secondary:i.timestamp})}),C.jsx(gl,{})]},o))})}):C.jsx(eg,{pt:6,label:"Logs",icon:C.jsx(YK,{})})})}),C.jsx(Sn.Extras,{children:e})]})}var ite={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:Bt,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=W&&(F+=N.value),N.mode==="max"&&z<=W&&(F+=N.value),D[j]||(D[j]=""),F&&(" "+D[j]+" ").indexOf(" "+F+" ")===-1&&(D[j]+=" "+F));for(var G in V)V.hasOwnProperty(G)&&(D[V[G]]?this.element.setAttribute(V[G],D[V[G]].substr(1)):this.element.removeAttribute(V[G]))}}function p(k,O){k.elementQueriesSetupInformation||(k.elementQueriesSetupInformation=new h(k,O)),k.elementQueriesSensor||(k.elementQueriesSensor=new n(k,function(){k.elementQueriesSetupInformation.call()}))}function g(k,O,L,N){if(typeof s[k]>"u"){s[k]=[];var H=l.length;o.innerHTML+=` `+k+" {animation: 0.1s element-queries;}",o.innerHTML+=` `+k+" > .resize-sensor {min-width: "+H+"px;}",l.push(k)}s[k].push({mode:O,property:L,value:N})}function v(k){var O;if(document.querySelectorAll&&(O=k?k.querySelectorAll.bind(k):document.querySelectorAll.bind(document)),!O&&typeof $$<"u"&&(O=$$),!O&&typeof jQuery<"u"&&(O=jQuery),!O)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return O}function y(k){var O=v(k);for(var L in s)if(s.hasOwnProperty(L))for(var N=O(L,k),H=0,W=N.length;HL[Y].minWidth&&(K=Y);if(K||(K=H),W!==K)if(z[K])O[W].style.display="none",O[K].style.display="block",W=K;else{var J=new Image;J.onload=function(){O[K].src=N[K],O[W].style.display="none",O[K].style.display="block",z[K]=!0,W=K},J.src=N[K]}else O[K].src=N[K]}k.resizeSensorInstance=new n(k,G),G()}function _(){for(var k=v(),O=k("[data-responsive-image],[responsive-image]"),L=0,N=O.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),R=!0);for(var O=0,L=document.styleSheets.length;O{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(ate.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const ate=I.createContext(null);function MFe(){return I.useContext(ate)}function DFe(e=128){const[t,n]=I.useState(!0),[r,i]=I.useState(!0),[o,s]=I.useState(!0),[l,c]=I.useState(null),d=I.useRef(0);return I.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function sj({children:e}){return C.jsx(zt,{variant:"h6",children:e})}function LFe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=MFe(),d=In(),[,,f,,h]=DFe();I.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(ufe,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs($be,{children:[C.jsx(Bd,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(yxe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(xp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(xp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:o})})})]})})}function NFe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var A;const[c,d]=I.useState(void 0);I.useEffect(()=>{e&&d(e)},[e]);const f=In(),h=lz(),[p,g]=I.useState(null),[v,y]=I.useState(null),[S,_]=I.useState(!1),[b,x]=I.useState(0);I.useEffect(()=>{if(p&&v&&!h&&!r){const R=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",R),k.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(dge,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:R=>g(R),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=l.PaperProps)==null?void 0:A.style},...l.PaperProps},children:[C.jsx(OFe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:R=>y(R),style:{width:"100%",height:"100%"},children:c})}),t]})}function aj({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(ef,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[I.cloneElement(n(i)),C.jsxs(NFe,{open:s,onClose:o,...e,children:[C.jsx(LFe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const BFe=["color","color-burn","color-dodge","copy","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"];function $Fe(e,t,n=600){const[r,i]=I.useState(e);I.useEffect(()=>void i(e),[i,e]);const o=I.useMemo(()=>ee.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function FFe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=$Fe(e,t),o=g=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(zt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(_n,{alignItems:"center",children:[s(g),C.jsx(vi,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ee.startCase(v)})),d=r.name||Fo(e);return C.jsx(C.Fragment,{children:C.jsxs($d,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(dt,{py:1,ml:-1,children:[C.jsx(zt,{children:d}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:ee.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(vi,{flex:1}),C.jsx($d,{alignItems:"center",direction:"row",children:C.jsx(aj,{appBar:{children:C.jsx(sj,{children:"Edit Layer"})},trigger:g=>C.jsx(Bd,{size:"small",onClick:g,children:C.jsx(sk,{})}),children:C.jsxs(dt,{p:2,children:[C.jsx(dt,{pb:2,children:C.jsx(K1,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Ro,{label:"Transparency",items:["0","25","50","75"].map(g=>({id:g,name:`${g}%`})),value:r.transparency??"0",showArrow:!0,onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"transparency",g)))})),l("Display Mode",C.jsx(Ro,{label:"Display Mode",value:r.displayMode??"source-over",items:c(BFe),showArrow:!0,onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"displayMode",g)))})),o("Source Options"),l("Type",C.jsx(Ro,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ee.startCase(g)})),onChange:g=>i==null?void 0:i(to(r,v=>{ee.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&I.createElement(fw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const zFe=I.forwardRef(FFe);function jFe(){const[{layers:e=[]},t]=$p();return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{mb:2},children:C.jsx(Dk,{sortable:!0,icon:null,value:e,deletable:!0,orderable:!0,extras:n=>C.jsx(ef,{variant:"popover",children:r=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{...ov(r),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:[{name:"Fit Layer",key:"fit-layer",action:()=>t(({layers:i})=>({layers:ee.map(i,o=>({...o,viewKey:o.key===(n==null?void 0:n.key)?Fi():void 0}))}))}].map(({name:i,key:o,action:s})=>C.jsx(Hl,{onClick:()=>{s==null||s(),r.close()},children:i},o))})}),C.jsx(Bd,{...lw(r),children:C.jsx(QK,{})})]})}),editor:n=>C.jsx(zFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholder:C.jsx(dt,{pt:2,children:"Click the button below to add a layer."})})})})}function UFe(){const{controls:e,onChange:t,state:n}=Lu();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(dt,{p:2,pr:1,pt:6,children:C.jsx(jFe,{})})}),C.jsx(Sn.Extras,{children:e})]})}function lte(e){return C.jsx(XK,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function HFe({children:e}){return C.jsx(zt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var fC={exports:{}};/** +@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(o),R=!0);for(var O=0,L=document.styleSheets.length;O{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(ate.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const ate=I.createContext(null);function NFe(){return I.useContext(ate)}function BFe(e=128){const[t,n]=I.useState(!0),[r,i]=I.useState(!0),[o,s]=I.useState(!0),[l,c]=I.useState(null),d=I.useRef(0);return I.useEffect(()=>{if(l){const f=()=>{{const h=l.scrollTop<=e;h!==o&&s(h)}{const h=l.scrollTop<=1;h!==r&&i(h)}d.current-l.scrollTop&&(Math.abs(d.current-l.scrollTop)>2&&d.current>=0&&n(d.current>l.scrollTop),d.current=l.scrollTop)};return l.addEventListener("scroll",f,{passive:!0}),()=>{l.removeEventListener("scroll",f)}}},[l,o,r,d,e]),[t||o,o,r,l,c]}function oj({children:e}){return C.jsx(zt,{variant:"h6",children:e})}function $Fe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=NFe(),d=Cn(),[,,f,,h]=BFe();I.useEffect(()=>{h(c)},[c,h]);const p=f?{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[0]},...t}:{background:d.palette.background.paper,...!s&&{boxShadow:d.shadows[4]},...n};return C.jsx(dfe,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(Fbe,{children:[C.jsx(Bd,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(bxe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(xp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(xp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:o})})})]})})}function FFe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var A;const[c,d]=I.useState(void 0);I.useEffect(()=>{e&&d(e)},[e]);const f=Cn(),h=az(),[p,g]=I.useState(null),[v,y]=I.useState(null),[S,_]=I.useState(!1),[b,x]=I.useState(0);I.useEffect(()=>{if(p&&v&&!h&&!r){const R=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",R),k.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(fge,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:R=>g(R),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(A=l.PaperProps)==null?void 0:A.style},...l.PaperProps},children:[C.jsx(LFe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:R=>y(R),style:{width:"100%",height:"100%"},children:c})}),t]})}function sj({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(ef,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[I.cloneElement(n(i)),C.jsxs(FFe,{open:s,onClose:o,...e,children:[C.jsx($Fe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const zFe=["color","color-burn","color-dodge","copy","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"];function jFe(e,t,n=600){const[r,i]=I.useState(e);I.useEffect(()=>void i(e),[i,e]);const o=I.useMemo(()=>ee.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function UFe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=jFe(e,t),o=g=>C.jsx(zt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(zt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(bn,{alignItems:"center",children:[s(g),C.jsx(yi,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:ee.startCase(v)})),d=r.name||Fo(e);return C.jsx(C.Fragment,{children:C.jsxs($d,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(dt,{py:1,ml:-1,children:[C.jsx(zt,{children:d}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:ee.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(yi,{flex:1}),C.jsx($d,{alignItems:"center",direction:"row",children:C.jsx(sj,{appBar:{children:C.jsx(oj,{children:"Edit Layer"})},trigger:g=>C.jsx(Bd,{size:"small",onClick:g,children:C.jsx(ok,{})}),children:C.jsxs(dt,{p:2,children:[C.jsx(dt,{pb:2,children:C.jsx(K1,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Ro,{label:"Transparency",items:["0","25","50","75"].map(g=>({id:g,name:`${g}%`})),value:r.transparency??"0",showArrow:!0,onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"transparency",g)))})),l("Display Mode",C.jsx(Ro,{label:"Display Mode",value:r.displayMode??"source-over",items:c(zFe),showArrow:!0,onChange:g=>i==null?void 0:i(to(r,v=>ee.set(v,"displayMode",g)))})),o("Source Options"),l("Type",C.jsx(Ro,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:ee.startCase(g)})),onChange:g=>i==null?void 0:i(to(r,v=>{ee.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&I.createElement(fw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const HFe=I.forwardRef(UFe);function WFe(){const[{layers:e=[]},t]=$p();return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{mb:2},children:C.jsx(Mk,{sortable:!0,icon:null,value:e,deletable:!0,orderable:!0,extras:n=>C.jsx(ef,{variant:"popover",children:r=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{...ov(r),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:[{name:"Fit Layer",key:"fit-layer",action:()=>t(({layers:i})=>({layers:ee.map(i,o=>({...o,viewKey:o.key===(n==null?void 0:n.key)?li():void 0}))}))}].map(({name:i,key:o,action:s})=>C.jsx(Wl,{onClick:()=>{s==null||s(),r.close()},children:i},o))})}),C.jsx(Bd,{...lw(r),children:C.jsx(KK,{})})]})}),editor:n=>C.jsx(HFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholder:C.jsx(dt,{pt:2,children:"Click the button below to add a layer."})})})})}function GFe(){const{controls:e,onChange:t,state:n}=Lu();return C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(dt,{p:2,pr:1,pt:6,children:C.jsx(WFe,{})})}),C.jsx(Sn.Extras,{children:e})]})}const VFe="modulepreload",qFe=function(e,t){return new URL(e,t).href},u9={},qs=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=qFe(o,r),o in u9)return;u9[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const h=i[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":VFe,s||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),s)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var lte={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){return function n(r,i,o){var s=window,l="application/octet-stream",c=o||l,d=r,f=!i&&!o&&d,h=document.createElement("a"),p=function(k){return String(k)},g=s.Blob||s.MozBlob||s.WebKitBlob||p,v=i||"download",y,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,c],c=d[0],d=d[1]),f&&f.length<2048&&(v=f.split("/").pop().split("?")[0],h.href=f,h.href.indexOf(f)!==-1)){var _=new XMLHttpRequest;return _.open("GET",f,!0),_.responseType="blob",_.onload=function(k){n(k.target.response,v,l)},setTimeout(function(){_.send()},0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==p)d=A(d),c=d.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(A(d),v):R(d);else if(/([\x80-\xff])/.test(d)){var b=0,x=new Uint8Array(d.length),E=x.length;for(b;b{const p=(0,n.randomBytes)(4).readUInt32BE(0);return d+p%(f-d+1)},i=d=>{let f;switch(d){case 1:f=Math.floor(r(1,9)).toString();break;case 2:f=Math.floor(r(10,90)).toString();break;case 3:f=Math.floor(r(100,900)).toString();break;case 4:f=Math.floor(r(1e3,9e3)).toString();break;case 5:f=Math.floor(r(1e4,9e4)).toString();break;case 6:f=Math.floor(r(1e5,9e5)).toString();break;default:f="";break}return f};function o(d,f){return d.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+i(f)}e.generateFromEmail=o;function s(d,f,h){const p=t.nouns[Math.floor(Math.random()*t.nouns.length)],g=t.adjectives[Math.floor(Math.random()*t.adjectives.length)];let v;return d?v=g+d+p+i(f):v=g+p+i(f),h?v.substring(0,h):v}e.generateUsername=s;function l(d){if(d.dictionaries){const f=d.dictionaries.length;let h="";for(let g=0;g{const l=s??await uz({accept:ute,strict:!0});l&&(e3e(l)?await o(async()=>{const c=ZFe(l)?await kTe(new Uint8Array(await l.arrayBuffer())):await l.text(),d=await PJ(c);d&&(n(()=>d.layers),i(()=>d.UIState))},`Opening workspace (${mz(l.size)})`):e(`${l==null?void 0:l.name} is not a workspace file`))},save:async s=>{e("Saving workspace...");const l=JSON.stringify({layers:t,UIState:r});if(s){const c=`${a3.generateUsername("-")}.workspace.json`;d9(l,c,"application/json"),e("Workspace saved",c)}else{const c=`${a3.generateUsername("-")}.workspace`;d9(await TTe(l),c,"application/octet-stream"),e("Workspace saved",c)}}}}function ZFe(e){return e.name.endsWith(".workspace")}function e3e(e){return ee.find(ute,t=>e.name.endsWith(t))}function t3e(e){return e.split(".")[0]}function fm(e){return e.split("/").pop()}function n3e(){const e=vl(),{controls:t,onChange:n,state:r}=Lu(),{load:i}=cj(),o=tf(),{result:s,loading:l}=uv(async()=>{const d=Object.assign({"/public/recipes/astar-jps-small-maze.workspace":()=>qs(()=>import("./astar-jps-small-maze-9a90ce2a.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/aurora-polyanya.workspace":()=>qs(()=>import("./aurora-polyanya-ceb55900.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/dynamic-starcraft.workspace":()=>qs(()=>import("./dynamic-starcraft-4ceed441.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/frozen-sea-astar.workspace":()=>qs(()=>import("./frozen-sea-astar-d8dfa04c.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/jps-vs-jps-prune2.workspace":()=>qs(()=>import("./jps-vs-jps-prune2-defbda61.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/lacam-random-32-32-20.workspace":()=>qs(()=>import("./lacam-random-32-32-20-2163bf6f.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-large.workspace":()=>qs(()=>import("./mapf-large-867abdea.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-sortation.workspace":()=>qs(()=>import("./mapf-sortation-4ea4dd13.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/melbourne-routing.workspace":()=>qs(()=>import("./melbourne-routing-b5c14300.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/new-york-astar.workspace":()=>qs(()=>import("./new-york-astar-03f71297.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/nine-tile.workspace":()=>qs(()=>import("./nine-tile-6376158b.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/rayscan-arena2.workspace":()=>qs(()=>import("./rayscan-arena2-f6f7b81d.js"),[],import.meta.url).then(f=>f.default)});return await Promise.all(ee.entries(d).map(f=>r3e(...f)))},[]),c=d=>o(async()=>{try{e(`Loading ${fm(d)}...`);const f=await fetch(d);f.ok||e(`Couldn't load ${fm(d)}`,"Network error",{error:!0});const h=await f.blob(),p=new File([h],fm(d),{type:h.type});i(p)}catch(f){e(`Couldn't load ${fm(d)}`,`${f}`,{error:!0})}});return C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(iv,{y:!0,children:C.jsx(dt,{sx:{pt:6},children:l?C.jsx(X1,{sx:{m:2}}):C.jsx(wp,{children:ee.map(s,({name:d,path:f},h)=>C.jsxs(OE,{onClick:()=>c(f),children:[C.jsx(ol,{children:C.jsx(W4,{})}),C.jsx(sl,{primary:d,secondary:fm(f)})]},h))})})})})}),C.jsx(Sn.Extras,{children:t})]})}async function r3e(e,t){return{name:ee.chain(e).thru(fm).thru(t3e).startCase().value(),path:await t()}}function dte(e){return C.jsx(qK,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function i3e({children:e}){return C.jsx(zt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var dC={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 - */fC.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",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Nt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Qr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,Fu=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(es.source),ao=/^\s+/,uc=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xa=/[()=,{}\[\]\/\s]/,zu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,bl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,aA=/['\n\r\u2028\u2029\\]/g,dc="\\ud800-\\udfff",lA="\\u0300-\\u036f",cA="\\ufe20-\\ufe2f",uA="\\u20d0-\\u20ff",Ev=lA+cA+uA,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",dA="\\xac\\xb1\\xd7\\xf7",fA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hA="\\u2000-\\u206f",pA=" \\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",kv="A-Z\\xc0-\\xd6\\xd8-\\xde",Av="\\ufe0e\\ufe0f",Rv=dA+fA+hA+pA,ff="['’]",mA="["+dc+"]",Iv="["+Rv+"]",fc="["+Ev+"]",Pv="\\d+",gA="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+dc+Rv+Pv+Cv+Tv+kv+"]",hf="\\ud83c[\\udffb-\\udfff]",vA="(?:"+fc+"|"+hf+")",Dv="[^"+dc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+kv+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",yA="(?:"+rs+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",$v="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",Fv=vA+"?",zv="["+Av+"]?",bA="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+Fv+")*",xA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+Fv+bA,_A="(?:"+[gA,pf,mf].join("|")+")"+jv,SA="(?:"+[Dv+fc+"?",fc,pf,mf,mA].join("|")+")",EA=RegExp(ff,"g"),CA=RegExp(fc,"g"),gf=RegExp(hf+"(?="+hf+")|"+SA+jv,"g"),TA=RegExp([rs+"?"+Ov+"+"+Bv+"(?="+[Iv,rs,"$"].join("|")+")",yA+"+"+$v+"(?="+[Iv,rs+Nv,"$"].join("|")+")",rs+"?"+Nv+"+"+Bv,rs+"+"+$v,wA,xA,Pv,_A].join("|"),"g"),kA=RegExp("["+Lv+dc+Ev+Av+"]"),AA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RA=["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"],IA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var PA={À:"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"},OA={"&":"&","<":"<",">":">",'"':""","'":"'"},MA={"&":"&","<":"<",">":">",""":'"',"'":"'"},DA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LA=parseFloat,NA=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,BA=typeof self=="object"&&self&&self.Object===Object&&self,dn=Uv||BA||Function("return this")(),vf=t&&!t.nodeType&&t,co=vf&&!0&&e&&!e.nodeType&&e,Hv=co&&co.exports===vf,yf=Hv&&Uv.process,tr=function(){try{var q=co&&co.require&&co.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=tr&&tr.isArrayBuffer,Gv=tr&&tr.isDate,Vv=tr&&tr.isMap,qv=tr&&tr.isRegExp,Xv=tr&&tr.isSet,Yv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function $A(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function qA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var XA=Sf(PA),YA=Sf(OA);function KA(q){return"\\"+DA[q]}function QA(q,te){return q==null?n:q[te]}function os(q){return kA.test(q)}function JA(q){return AA.test(q)}function ZA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function kf(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function iy(q,te){return function(Z){return q(te(Z))}}function Ti(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function zR(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Jr.prototype.clear=NR,Jr.prototype.delete=BR,Jr.prototype.get=$R,Jr.prototype.has=FR,Jr.prototype.set=zR;function Zr(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=WI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Oi(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?MI(a,nI(B,a)):OI(a,gy(B,a))}else{if(!kt[oe])return T?a:{};B=GI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):O0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),ka(B,Ke,or(ke,u,m,Ke,a,M))}),B}function rI(a){var u=nn(a);return function(m){return vy(m,a,u)}}function vy(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function yy(a,u,m){if(typeof a!="function")throw new rr(s);return Da(function(){a.apply(n,m)},u)}function Aa(a,u,m,w){var T=-1,M=hc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Gn(m))),w?(M=bf,B=!1):u.length>=i&&(M=wa,B=!1,u=new ho(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:N0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ci(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function zr(a,u){return a&&Df(a,u,nn)}function Lf(a,u){return a&&wy(a,u,nn)}function Oc(a,u){return Ei(u,function(m){return ii(a[m])})}function mo(a,u){u=Ii(u,a);for(var m=0,w=u.length;a!=null&&mu}function sI(a,u){return a!=null&&vt.call(a,u)}function aI(a,u){return a!=null&&u in wt(a)}function lI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new ho(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&Sc.call(U,X,1),Sc.call(a,X,1);return a}function Oy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ri(T)?Sc.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Tc(fy()*(u-a+1))}function wI(a,u,m,w){for(var T=-1,M=Zt(Cc((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function Hf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Tc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function _I(a){return my(gs(a))}function SI(a,u){var m=gs(a);return Hc(m,po(u,0,m.length))}function Pa(a,u,m,w){if(!Ft(a))return a;u=Ii(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:BI(a);if(ne)return mc(ne);B=!1,T=wa,X=new ho}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var Fy=pR||function(a){return dn.clearTimeout(a)};function zy(a,u){if(u)return a.slice();var m=a.length,w=ay?ay(m):new a.constructor(m);return a.copy(w),w}function Yf(a){var u=new a.constructor(a.byteLength);return new wc(u).set(new wc(a)),u}function AI(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function RI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function II(a){return Ta?wt(Ta.call(a)):{}}function jy(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function Uy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function Hy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&Tn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return ni(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&jc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new ho:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Si,`{ + */dC.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",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,_=2,b=4,x=8,E=16,A=32,R=64,k=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,F=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",k],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",A],["partialRight",R],["rearg",O]],se="[object Arguments]",Q="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Qe="[object Null]",qe="[object Object]",at="[object Promise]",Nt="[object Proxy]",Ie="[object RegExp]",ze="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",Ae="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Wt=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Or=/&(?:amp|lt|gt|quot|#39);/g,Mr=/[&<>"']/g,Fr=RegExp(Or.source),Qr=RegExp(Mr.source),Zo=/<%-([\s\S]+?)%>/g,Fu=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,es=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(es.source),ao=/^\s+/,uc=/\s/,Ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ts=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xa=/[()=,{}\[\]\/\s]/,zu=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,_l=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,sA=/['\n\r\u2028\u2029\\]/g,dc="\\ud800-\\udfff",aA="\\u0300-\\u036f",lA="\\ufe20-\\ufe2f",cA="\\u20d0-\\u20ff",Ev=aA+lA+cA,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",uA="\\xac\\xb1\\xd7\\xf7",dA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fA="\\u2000-\\u206f",hA=" \\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",kv="A-Z\\xc0-\\xd6\\xd8-\\xde",Av="\\ufe0e\\ufe0f",Rv=uA+dA+fA+hA,ff="['’]",pA="["+dc+"]",Iv="["+Rv+"]",fc="["+Ev+"]",Pv="\\d+",mA="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+dc+Rv+Pv+Cv+Tv+kv+"]",hf="\\ud83c[\\udffb-\\udfff]",gA="(?:"+fc+"|"+hf+")",Dv="[^"+dc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+kv+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",vA="(?:"+rs+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",$v="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",Fv=gA+"?",zv="["+Av+"]?",yA="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+Fv+")*",bA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+Fv+yA,wA="(?:"+[mA,pf,mf].join("|")+")"+jv,_A="(?:"+[Dv+fc+"?",fc,pf,mf,pA].join("|")+")",SA=RegExp(ff,"g"),EA=RegExp(fc,"g"),gf=RegExp(hf+"(?="+hf+")|"+_A+jv,"g"),CA=RegExp([rs+"?"+Ov+"+"+Bv+"(?="+[Iv,rs,"$"].join("|")+")",vA+"+"+$v+"(?="+[Iv,rs+Nv,"$"].join("|")+")",rs+"?"+Nv+"+"+Bv,rs+"+"+$v,xA,bA,Pv,wA].join("|"),"g"),TA=RegExp("["+Lv+dc+Ev+Av+"]"),kA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,AA=["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"],RA=-1,Pt={};Pt[Ne]=Pt[Rt]=Pt[ct]=Pt[Ae]=Pt[ot]=Pt[$t]=Pt[Re]=Pt[Ue]=Pt[yt]=!0,Pt[se]=Pt[Q]=Pt[Ye]=Pt[le]=Pt[$e]=Pt[he]=Pt[ve]=Pt[ye]=Pt[me]=Pt[be]=Pt[qe]=Pt[Ie]=Pt[ze]=Pt[it]=Pt[_e]=!1;var kt={};kt[se]=kt[Q]=kt[Ye]=kt[$e]=kt[le]=kt[he]=kt[Ne]=kt[Rt]=kt[ct]=kt[Ae]=kt[ot]=kt[me]=kt[be]=kt[qe]=kt[Ie]=kt[ze]=kt[it]=kt[pt]=kt[$t]=kt[Re]=kt[Ue]=kt[yt]=!0,kt[ve]=kt[ye]=kt[_e]=!1;var IA={À:"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"},PA={"&":"&","<":"<",">":">",'"':""","'":"'"},OA={"&":"&","<":"<",">":">",""":'"',"'":"'"},MA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},DA=parseFloat,LA=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,NA=typeof self=="object"&&self&&self.Object===Object&&self,dn=Uv||NA||Function("return this")(),vf=t&&!t.nodeType&&t,co=vf&&!0&&e&&!e.nodeType&&e,Hv=co&&co.exports===vf,yf=Hv&&Uv.process,tr=function(){try{var q=co&&co.require&&co.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=tr&&tr.isArrayBuffer,Gv=tr&&tr.isDate,Vv=tr&&tr.isMap,qv=tr&&tr.isRegExp,Xv=tr&&tr.isSet,Yv=tr&&tr.isTypedArray;function Wn(q,te,Z){switch(Z.length){case 0:return q.call(te);case 1:return q.call(te,Z[0]);case 2:return q.call(te,Z[0],Z[1]);case 3:return q.call(te,Z[0],Z[1],Z[2])}return q.apply(te,Z)}function BA(q,te,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,te,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,te){for(var Z=q.length;Z--&&is(te,q[Z],0)>-1;);return Z}function VA(q,te){for(var Z=q.length,ge=0;Z--;)q[Z]===te&&++ge;return ge}var qA=Sf(IA),XA=Sf(PA);function YA(q){return"\\"+MA[q]}function KA(q,te){return q==null?n:q[te]}function os(q){return TA.test(q)}function QA(q){return kA.test(q)}function JA(q){for(var te,Z=[];!(te=q.next()).done;)Z.push(te.value);return Z}function kf(q){var te=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++te]=[De,ge]}),Z}function iy(q,te){return function(Z){return q(te(Z))}}function ki(q,te){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function FR(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}Jr.prototype.clear=LR,Jr.prototype.delete=NR,Jr.prototype.get=BR,Jr.prototype.has=$R,Jr.prototype.set=FR;function Zr(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function or(a,u,m,w,T,M){var B,U=u&h,X=u&p,ne=u&g;if(m&&(B=T?m(a,w,T,M):m(a)),B!==n)return B;if(!Ft(a))return a;var re=Be(a);if(re){if(B=HI(a),!U)return On(a,B)}else{var oe=vn(a),fe=oe==ye||oe==xe;if(Mi(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?OI(a,tI(B,a)):PI(a,gy(B,a))}else{if(!kt[oe])return T?a:{};B=WI(a,oe,U)}}M||(M=new br);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(ke){B.add(or(ke,u,m,ke,a,M))}):O0(a)&&a.forEach(function(ke,Ke){B.set(Ke,or(ke,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:nn,Ve=re?n:Te(a);return nr(Ve||a,function(ke,Ke){Ve&&(Ke=ke,ke=a[Ke]),ka(B,Ke,or(ke,u,m,Ke,a,M))}),B}function nI(a){var u=nn(a);return function(m){return vy(m,a,u)}}function vy(a,u,m){var w=m.length;if(a==null)return!w;for(a=wt(a);w--;){var T=m[w],M=u[T],B=a[T];if(B===n&&!(T in a)||!M(B))return!1}return!0}function yy(a,u,m){if(typeof a!="function")throw new rr(s);return Da(function(){a.apply(n,m)},u)}function Aa(a,u,m,w){var T=-1,M=hc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Gn(m))),w?(M=bf,B=!1):u.length>=i&&(M=wa,B=!1,u=new ho(u));e:for(;++TT?0:T+m),w=w===n||w>T?T:We(w),w<0&&(w+=T),w=m>w?0:N0(w);m0&&m(U)?u>1?fn(U,u-1,m,w,T):Ti(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function zr(a,u){return a&&Df(a,u,nn)}function Lf(a,u){return a&&wy(a,u,nn)}function Oc(a,u){return Ci(u,function(m){return ii(a[m])})}function mo(a,u){u=Pi(u,a);for(var m=0,w=u.length;a!=null&&mu}function oI(a,u){return a!=null&&vt.call(a,u)}function sI(a,u){return a!=null&&u in wt(a)}function aI(a,u,m){return a>=gn(u,m)&&a=120&&re.length>=120)?new ho(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&Sc.call(U,X,1),Sc.call(a,X,1);return a}function Oy(a,u){for(var m=a?u.length:0,w=m-1;m--;){var T=u[m];if(m==w||T!==M){var M=T;ri(T)?Sc.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Tc(fy()*(u-a+1))}function xI(a,u,m,w){for(var T=-1,M=Zt(Cc((u-a)/(m||1)),0),B=Z(M);M--;)B[w?M:++T]=a,a+=m;return B}function Hf(a,u){var m="";if(!a||u<1||u>G)return m;do u%2&&(m+=a),u=Tc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function wI(a){return my(gs(a))}function _I(a,u){var m=gs(a);return Hc(m,po(u,0,m.length))}function Pa(a,u,m,w){if(!Ft(a))return a;u=Pi(u,a);for(var T=-1,M=u.length,B=M-1,U=a;U!=null&&++TT?0:T+u),m=m>T?T:m,m<0&&(m+=T),T=u>m?0:m-u>>>0,u>>>=0;for(var M=Z(T);++w>>1,B=a[M];B!==null&&!qn(B)&&(m?B<=u:B=i){var ne=u?null:NI(a);if(ne)return mc(ne);B=!1,T=wa,X=new ho}else X=u?[]:U;e:for(;++w=w?a:sr(a,u,m)}var Fy=hR||function(a){return dn.clearTimeout(a)};function zy(a,u){if(u)return a.slice();var m=a.length,w=ay?ay(m):new a.constructor(m);return a.copy(w),w}function Yf(a){var u=new a.constructor(a.byteLength);return new wc(u).set(new wc(a)),u}function kI(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function AI(a){var u=new a.constructor(a.source,Jn.exec(a));return u.lastIndex=a.lastIndex,u}function RI(a){return Ta?wt(Ta.call(a)):{}}function jy(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}function Uy(a,u){if(a!==u){var m=a!==n,w=a===null,T=a===a,M=qn(a),B=u!==n,U=u===null,X=u===u,ne=qn(u);if(!U&&!ne&&!M&&a>u||M&&B&&X&&!U&&!ne||w&&B&&X||!m&&X||!T)return 1;if(!w&&!M&&!ne&&a=U)return X;var ne=m[w];return X*(ne=="desc"?-1:1)}}return a.index-u.index}function Hy(a,u,m,w){for(var T=-1,M=a.length,B=m.length,U=-1,X=u.length,ne=Zt(M-B,0),re=Z(X+ne),oe=!w;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=a.length>3&&typeof M=="function"?(T--,M):n,B&&kn(m[0],m[1],B)&&(M=T<3?n:M,T=1),u=wt(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return ni(function(u){var m=u.length,w=m,T=ir.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new rr(s);if(T&&!B&&jc(M)=="wrapper")var B=new ir([],!0)}for(w=B?w:m;++w1&&nt.reverse(),re&&XU))return!1;var ne=M.get(a),re=M.get(u);if(ne&&re)return ne==u&&re==a;var oe=-1,fe=!0,we=m&y?new ho:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Ei,`{ /* [wrapped with `+u+`] */ -`)}function qI(a){return Be(a)||yo(a)||!!(uy&&a&&a[uy])}function ri(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&Sv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Hc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,x0(a,m)});function w0(a){var u=P(a);return u.__chain__=!0,u}function i2(a,u){return u(a),a}function Wc(a,u){return u(a)}var o2=ni(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return Mf(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ri(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Wc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function s2(){return w0(this)}function a2(){return new ir(this.value(),this.__chain__)}function l2(){this.__values__===n&&(this.__values__=L0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function c2(){return this}function u2(a){for(var u,m=this;m instanceof Rc;){var w=p0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function d2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Wc,args:[ah],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ah)}function f2(){return By(this.__wrapped__,this.__actions__)}var h2=Nc(function(a,u,m){vt.call(a,m)?++a[m]:ei(a,m,1)});function p2(a,u,m){var w=Be(a)?Kv:iI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function m2(a,u){var m=Be(a)?Ei:xy;return m(a,Ce(u,3))}var g2=Xy(m0),v2=Xy(g0);function y2(a,u){return fn(Gc(a,u),1)}function b2(a,u){return fn(Gc(a,u),V)}function x2(a,u,m){return m=m===n?1:We(m),fn(Gc(a,u),m)}function _0(a,u){var m=Be(a)?nr:Ai;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?FA:by;return m(a,Ce(u,3))}var w2=Nc(function(a,u,m){vt.call(a,m)?a[m].push(u):ei(a,m,[u])});function _2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Kc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var S2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ai(a,function(B){M[++w]=T?Wn(u,B,m):Ra(B,u,m)}),M}),E2=Nc(function(a,u,m){ei(a,m,u)});function Gc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function C2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Iy(a,u,m))}var T2=Nc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function k2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ai)}function A2(a,u,m){var w=Be(a)?zA:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function R2(a,u){var m=Be(a)?Ei:xy;return m(a,Xc(Ce(u,3)))}function I2(a){var u=Be(a)?my:_I;return u(a)}function P2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?ZR:SI;return w(a,u)}function O2(a){var u=Be(a)?eI:CI;return u(a)}function M2(a){if(a==null)return 0;if(Mn(a))return Kc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Ff(a).length}function D2(a,u,m){var w=Be(a)?wf:TI;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var L2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&Tn(a,u[0],u[1])?u=[]:m>2&&Tn(u[0],u[1],u[2])&&(u=[u[0]]),Iy(a,fn(u,1),[])}),Vc=mR||function(){return dn.Date.now()};function N2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function E0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ti(a,k,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var ch=Xe(function(a,u,m){var w=S;if(m.length){var T=Ti(m,ps(ch));w|=A}return ti(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ti(m,ps(T0));w|=A}return ti(u,w,a,m,T)});function k0(a,u,m){u=m?n:u;var w=ti(a,x,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function A0(a,u,m){u=m?n:u;var w=ti(a,E,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function R0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,si=T;return w=T=n,ne=Yt,B=a.apply(si,wr),B}function Te(Yt){return ne=Yt,U=Da(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,si=Yt-ne,X0=u-wr;return oe?gn(X0,M-si):X0}function ke(Yt){var wr=Yt-X,si=Yt-ne;return X===n||wr>=u||wr<0||oe&&si>=M}function Ke(){var Yt=Vc();if(ke(Yt))return nt(Yt);U=Da(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&Fy(U),ne=0,w=X=T=U=n}function kn(){return U===n?B:nt(Vc())}function Yn(){var Yt=Vc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return Fy(U),U=Da(Ke,u),we(X)}return U===n&&(U=Da(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=kn,Yn}var B2=Xe(function(a,u){return yy(a,1,u)}),$2=Xe(function(a,u,m){return yy(a,lr(u)||0,m)});function F2(a){return ti(a,L)}function qc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(qc.Cache||Zr),m}qc.Cache=Zr;function Xc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function z2(a){return C0(2,a)}var j2=kI(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Gn(Ce())):Lt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),yo=Sy(function(){return arguments}())?Sy:function(a){return jt(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,nO=Wv?Gn(Wv):uI;function Mn(a){return a!=null&&Yc(a.length)&&!ii(a)}function Xt(a){return jt(a)&&Mn(a)}function rO(a){return a===!0||a===!1||jt(a)&&Cn(a)==le}var Oi=vR||wh,iO=Gv?Gn(Gv):dI;function oO(a){return jt(a)&&a.nodeType===1&&!La(a)}function sO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Oi(a)||ms(a)||yo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Ma(a))return!Ff(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function aO(a,u){return Ia(a,u)}function lO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ia(a,u,n,m):!!w}function dh(a){if(!jt(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!La(a)}function cO(a){return typeof a=="number"&&dy(a)}function ii(a){if(!Ft(a))return!1;var u=Cn(a);return u==ye||u==xe||u==ae||u==Nt}function P0(a){return typeof a=="number"&&a==We(a)}function Yc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var O0=Vv?Gn(Vv):hI;function uO(a,u){return a===u||$f(a,u,th(u))}function dO(a,u,m){return m=typeof m=="function"?m:n,$f(a,u,th(u),m)}function fO(a){return M0(a)&&a!=+a}function hO(a){if(KI(a))throw new De(o);return Ey(a)}function pO(a){return a===null}function mO(a){return a==null}function M0(a){return typeof a=="number"||jt(a)&&Cn(a)==be}function La(a){if(!jt(a)||Cn(a)!=qe)return!1;var u=_c(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&yc.call(m)==dR}var fh=qv?Gn(qv):pI;function gO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Gn(Xv):mI;function Kc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Cn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Cn(a)==pt}var ms=Yv?Gn(Yv):gI;function vO(a){return a===n}function yO(a){return jt(a)&&vn(a)==_e}function bO(a){return jt(a)&&Cn(a)==je}var xO=zc(zf),wO=zc(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Kc(a)?yr(a):On(a);if(_a&&a[_a])return ZA(a[_a]());var u=vn(a),m=u==me?kf:u==ze?mc:gs;return m(a)}function oi(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=oi(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?po(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=ty(a);var m=xl.test(a);return m||_v.test(a)?NA(a.slice(2),m?2:8):bl.test(a)?Y:+a}function B0(a){return jr(a,Dn(a))}function _O(a){return a?po(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var SO=fs(function(a,u){if(Ma(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&ka(a,m,u[m])}),$0=fs(function(a,u){jr(u,Dn(u),a)}),Qc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),EO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),CO=ni(Mf);function TO(a,u){var m=ds(a);return u==null?m:gy(m,u)}var kO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&Tn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Zf(a),m),w&&(m=or(m,h|p|g,$I));for(var T=u.length;T--;)Gf(m,u[T]);return m});function GO(a,u){return z0(a,Xc(Ce(u)))}var VO=ni(function(a,u){return a==null?{}:bI(a,u)});function z0(a,u){if(a==null)return{};var m=Lt(Zf(a),function(w){return[w]});return u=Ce(u),Py(a,m,function(w,T){return u(w,T[0])})}function qO(a,u,m){u=Ii(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=fy();return gn(a+T*(u-a+LA("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var iM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?H0(u):u)});function H0(a){return mh(ft(a).toLowerCase())}function W0(a){return a=ft(a),a&&a.replace(Qt,XA).replace(CA,"")}function oM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:po(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function sM(a){return a=ft(a),a&&Qr.test(a)?a.replace(Mr,YA):a}function aM(a){return a=ft(a),a&&uf.test(a)?a.replace(es,"\\$&"):a}var lM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),cM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),uM=qy("toLowerCase");function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Tc(T),m)+a+Fc(Cc(T),m)}function fM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=Vn(u),!u&&os(a))?Pi(yr(a),0,m):a.split(u,m)):[]}var bM=hs(function(a,u,m){return a+(m?" ":"")+mh(u)});function xM(a,u,m){return a=ft(a),m=m==null?0:po(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function wM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Qc({},u,w,e0);var T=Qc({},u.imports,w.imports,e0),M=nn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Af((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IA+"]")+` -`;a.replace(fe,function(ke,Ke,nt,Xn,kn,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(aA,KA),Ke&&(U=!0,oe+=`' + +`)}function VI(a){return Be(a)||yo(a)||!!(uy&&a&&a[uy])}function ri(a,u){var m=typeof a;return u=u??G,!!u&&(m=="number"||m!="symbol"&&Sv.test(a))&&a>-1&&a%1==0&&a0){if(++u>=W)return arguments[0]}else u=0;return a.apply(n,arguments)}}function Hc(a,u){var m=-1,w=a.length,T=w-1;for(u=u===n?w:u;++m1?a[u-1]:n;return m=typeof m=="function"?(a.pop(),m):n,x0(a,m)});function w0(a){var u=P(a);return u.__chain__=!0,u}function r2(a,u){return u(a),a}function Wc(a,u){return u(a)}var i2=ni(function(a){var u=a.length,m=u?a[0]:0,w=this.__wrapped__,T=function(M){return Mf(M,a)};return u>1||this.__actions__.length||!(w instanceof Je)||!ri(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Wc,args:[T],thisArg:n}),new ir(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function o2(){return w0(this)}function s2(){return new ir(this.value(),this.__chain__)}function a2(){this.__values__===n&&(this.__values__=L0(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function l2(){return this}function c2(a){for(var u,m=this;m instanceof Rc;){var w=p0(m);w.__index__=0,w.__values__=n,u?T.__wrapped__=w:u=w;var T=w;m=m.__wrapped__}return T.__wrapped__=a,u}function u2(){var a=this.__wrapped__;if(a instanceof Je){var u=a;return this.__actions__.length&&(u=new Je(this)),u=u.reverse(),u.__actions__.push({func:Wc,args:[ah],thisArg:n}),new ir(u,this.__chain__)}return this.thru(ah)}function d2(){return By(this.__wrapped__,this.__actions__)}var f2=Nc(function(a,u,m){vt.call(a,m)?++a[m]:ei(a,m,1)});function h2(a,u,m){var w=Be(a)?Kv:rI;return m&&kn(a,u,m)&&(u=n),w(a,Ce(u,3))}function p2(a,u){var m=Be(a)?Ci:xy;return m(a,Ce(u,3))}var m2=Xy(m0),g2=Xy(g0);function v2(a,u){return fn(Gc(a,u),1)}function y2(a,u){return fn(Gc(a,u),V)}function b2(a,u,m){return m=m===n?1:We(m),fn(Gc(a,u),m)}function _0(a,u){var m=Be(a)?nr:Ri;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?$A:by;return m(a,Ce(u,3))}var x2=Nc(function(a,u,m){vt.call(a,m)?a[m].push(u):ei(a,m,[u])});function w2(a,u,m,w){a=Mn(a)?a:gs(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=Zt(T+m,0)),Kc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&is(a,u,m)>-1}var _2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Ri(a,function(B){M[++w]=T?Wn(u,B,m):Ra(B,u,m)}),M}),S2=Nc(function(a,u,m){ei(a,m,u)});function Gc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function E2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Iy(a,u,m))}var C2=Nc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function T2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Ri)}function k2(a,u,m){var w=Be(a)?FA:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function A2(a,u){var m=Be(a)?Ci:xy;return m(a,Xc(Ce(u,3)))}function R2(a){var u=Be(a)?my:wI;return u(a)}function I2(a,u,m){(m?kn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?JR:_I;return w(a,u)}function P2(a){var u=Be(a)?ZR:EI;return u(a)}function O2(a){if(a==null)return 0;if(Mn(a))return Kc(a)?ss(a):a.length;var u=vn(a);return u==me||u==ze?a.size:Ff(a).length}function M2(a,u,m){var w=Be(a)?wf:CI;return m&&kn(a,u,m)&&(u=n),w(a,Ce(u,3))}var D2=Xe(function(a,u){if(a==null)return[];var m=u.length;return m>1&&kn(a,u[0],u[1])?u=[]:m>2&&kn(u[0],u[1],u[2])&&(u=[u[0]]),Iy(a,fn(u,1),[])}),Vc=pR||function(){return dn.Date.now()};function L2(a,u){if(typeof u!="function")throw new rr(s);return a=We(a),function(){if(--a<1)return u.apply(this,arguments)}}function E0(a,u,m){return u=m?n:u,u=a&&u==null?a.length:u,ti(a,k,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new rr(s);return a=We(a),function(){return--a>0&&(m=u.apply(this,arguments)),a<=1&&(u=n),m}}var ch=Xe(function(a,u,m){var w=S;if(m.length){var T=ki(m,ps(ch));w|=A}return ti(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=ki(m,ps(T0));w|=A}return ti(u,w,a,m,T)});function k0(a,u,m){u=m?n:u;var w=ti(a,x,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function A0(a,u,m){u=m?n:u;var w=ti(a,E,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function R0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new rr(s);u=lr(u)||0,Ft(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?Zt(lr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Yt){var wr=w,si=T;return w=T=n,ne=Yt,B=a.apply(si,wr),B}function Te(Yt){return ne=Yt,U=Da(Ke,u),re?we(Yt):B}function Ve(Yt){var wr=Yt-X,si=Yt-ne,X0=u-wr;return oe?gn(X0,M-si):X0}function ke(Yt){var wr=Yt-X,si=Yt-ne;return X===n||wr>=u||wr<0||oe&&si>=M}function Ke(){var Yt=Vc();if(ke(Yt))return nt(Yt);U=Da(Ke,Ve(Yt))}function nt(Yt){return U=n,fe&&w?we(Yt):(w=T=n,B)}function Xn(){U!==n&&Fy(U),ne=0,w=X=T=U=n}function An(){return U===n?B:nt(Vc())}function Yn(){var Yt=Vc(),wr=ke(Yt);if(w=arguments,T=this,X=Yt,wr){if(U===n)return Te(X);if(oe)return Fy(U),U=Da(Ke,u),we(X)}return U===n&&(U=Da(Ke,u)),B}return Yn.cancel=Xn,Yn.flush=An,Yn}var N2=Xe(function(a,u){return yy(a,1,u)}),B2=Xe(function(a,u,m){return yy(a,lr(u)||0,m)});function $2(a){return ti(a,L)}function qc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new rr(s);var m=function(){var w=arguments,T=u?u.apply(this,w):w[0],M=m.cache;if(M.has(T))return M.get(T);var B=a.apply(this,w);return m.cache=M.set(T,B)||M,B};return m.cache=new(qc.Cache||Zr),m}qc.Cache=Zr;function Xc(a){if(typeof a!="function")throw new rr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function F2(a){return C0(2,a)}var z2=TI(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Gn(Ce())):Lt(fn(u,1),Gn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=gn(w.length,m);++T=u}),yo=Sy(function(){return arguments}())?Sy:function(a){return jt(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,tO=Wv?Gn(Wv):cI;function Mn(a){return a!=null&&Yc(a.length)&&!ii(a)}function Xt(a){return jt(a)&&Mn(a)}function nO(a){return a===!0||a===!1||jt(a)&&Tn(a)==le}var Mi=gR||wh,rO=Gv?Gn(Gv):uI;function iO(a){return jt(a)&&a.nodeType===1&&!La(a)}function oO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Mi(a)||ms(a)||yo(a)))return!a.length;var u=vn(a);if(u==me||u==ze)return!a.size;if(Ma(a))return!Ff(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function sO(a,u){return Ia(a,u)}function aO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ia(a,u,n,m):!!w}function dh(a){if(!jt(a))return!1;var u=Tn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!La(a)}function lO(a){return typeof a=="number"&&dy(a)}function ii(a){if(!Ft(a))return!1;var u=Tn(a);return u==ye||u==xe||u==ae||u==Nt}function P0(a){return typeof a=="number"&&a==We(a)}function Yc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function Ft(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function jt(a){return a!=null&&typeof a=="object"}var O0=Vv?Gn(Vv):fI;function cO(a,u){return a===u||$f(a,u,th(u))}function uO(a,u,m){return m=typeof m=="function"?m:n,$f(a,u,th(u),m)}function dO(a){return M0(a)&&a!=+a}function fO(a){if(YI(a))throw new De(o);return Ey(a)}function hO(a){return a===null}function pO(a){return a==null}function M0(a){return typeof a=="number"||jt(a)&&Tn(a)==be}function La(a){if(!jt(a)||Tn(a)!=qe)return!1;var u=_c(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&yc.call(m)==uR}var fh=qv?Gn(qv):hI;function mO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Gn(Xv):pI;function Kc(a){return typeof a=="string"||!Be(a)&&jt(a)&&Tn(a)==it}function qn(a){return typeof a=="symbol"||jt(a)&&Tn(a)==pt}var ms=Yv?Gn(Yv):mI;function gO(a){return a===n}function vO(a){return jt(a)&&vn(a)==_e}function yO(a){return jt(a)&&Tn(a)==je}var bO=zc(zf),xO=zc(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Kc(a)?yr(a):On(a);if(_a&&a[_a])return JA(a[_a]());var u=vn(a),m=u==me?kf:u==ze?mc:gs;return m(a)}function oi(a){if(!a)return a===0?a:0;if(a=lr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=oi(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?po(We(a),0,J):0}function lr(a){if(typeof a=="number")return a;if(qn(a))return Y;if(Ft(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=ty(a);var m=_l.test(a);return m||_v.test(a)?LA(a.slice(2),m?2:8):wl.test(a)?Y:+a}function B0(a){return jr(a,Dn(a))}function wO(a){return a?po(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":Vn(a)}var _O=fs(function(a,u){if(Ma(u)||Mn(u)){jr(u,nn(u),a);return}for(var m in u)vt.call(u,m)&&ka(a,m,u[m])}),$0=fs(function(a,u){jr(u,Dn(u),a)}),Qc=fs(function(a,u,m,w){jr(u,Dn(u),a,w)}),SO=fs(function(a,u,m,w){jr(u,nn(u),a,w)}),EO=ni(Mf);function CO(a,u){var m=ds(a);return u==null?m:gy(m,u)}var TO=Xe(function(a,u){a=wt(a);var m=-1,w=u.length,T=w>2?u[2]:n;for(T&&kn(u[0],u[1],T)&&(w=1);++m1),M}),jr(a,Zf(a),m),w&&(m=or(m,h|p|g,BI));for(var T=u.length;T--;)Gf(m,u[T]);return m});function WO(a,u){return z0(a,Xc(Ce(u)))}var GO=ni(function(a,u){return a==null?{}:yI(a,u)});function z0(a,u){if(a==null)return{};var m=Lt(Zf(a),function(w){return[w]});return u=Ce(u),Py(a,m,function(w,T){return u(w,T[0])})}function VO(a,u,m){u=Pi(u,a);var w=-1,T=u.length;for(T||(T=1,a=n);++wu){var w=a;a=u,u=w}if(m||a%1||u%1){var T=fy();return gn(a+T*(u-a+DA("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var rM=hs(function(a,u,m){return u=u.toLowerCase(),a+(m?H0(u):u)});function H0(a){return mh(ft(a).toLowerCase())}function W0(a){return a=ft(a),a&&a.replace(Qt,qA).replace(EA,"")}function iM(a,u,m){a=ft(a),u=Vn(u);var w=a.length;m=m===n?w:po(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function oM(a){return a=ft(a),a&&Qr.test(a)?a.replace(Mr,XA):a}function sM(a){return a=ft(a),a&&uf.test(a)?a.replace(es,"\\$&"):a}var aM=hs(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),lM=hs(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),cM=qy("toLowerCase");function uM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Tc(T),m)+a+Fc(Cc(T),m)}function dM(a,u,m){a=ft(a),u=We(u);var w=u?ss(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=Vn(u),!u&&os(a))?Oi(yr(a),0,m):a.split(u,m)):[]}var yM=hs(function(a,u,m){return a+(m?" ":"")+mh(u)});function bM(a,u,m){return a=ft(a),m=m==null?0:po(We(m),0,a.length),u=Vn(u),a.slice(m,m+u.length)==u}function xM(a,u,m){var w=P.templateSettings;m&&kn(a,u,m)&&(u=n),a=ft(a),u=Qc({},u,w,e0);var T=Qc({},u.imports,w.imports,e0),M=nn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||vr,oe="__p += '",fe=Af((u.escape||vr).source+"|"+re.source+"|"+(re===Gs?Hn:vr).source+"|"+(u.evaluate||vr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RA+"]")+` +`;a.replace(fe,function(ke,Ke,nt,Xn,An,Yn){return nt||(nt=Xn),oe+=a.slice(ne,Yn).replace(sA,YA),Ke&&(U=!0,oe+=`' + __e(`+Ke+`) + -'`),kn&&(X=!0,oe+=`'; -`+kn+`; +'`),An&&(X=!0,oe+=`'; +`+An+`; __p += '`),nt&&(oe+=`' + ((__t = (`+nt+`)) == null ? '' : __t) + '`),ne=Yn+ke.length,ke}),oe+=`'; @@ -607,24 +609,24 @@ __p += '`),nt&&(oe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p -}`;var Ve=V0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,dh(Ve))throw Ve;return Ve}function _M(a){return ft(a).toLowerCase()}function SM(a){return ft(a).toUpperCase()}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ny(w,T),B=ry(w,T)+1;return Pi(w,M,B).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ry(w,yr(u))+1;return Pi(w,0,T).join("")}function TM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(ao,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ny(w,yr(u));return Pi(w,T).join("")}function kM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Pi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),fh(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Af(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function AM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,rR):a}var RM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),mh=qy("toUpperCase");function G0(a,u,m){return a=ft(a),u=m?n:u,u===n?JA(a)?sR(a):HA(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),IM=ni(function(a,u){return nr(u,function(m){m=Ur(m),ei(a,m,ch(a[m],a))}),a});function PM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=Cf(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ci([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Wc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=gc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Bc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=AR,Je.prototype.reverse=RR,Je.prototype.value=IR,P.prototype.at=o2,P.prototype.chain=s2,P.prototype.commit=a2,P.prototype.next=l2,P.prototype.plant=u2,P.prototype.reverse=d2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=f2,P.prototype.first=P.prototype.head,_a&&(P.prototype[_a]=c2),P},as=aR();co?((co.exports=as)._=as,vf._=as):dn._=as}).call(Bt)})(fC,fC.exports);var Gt=fC.exports;let WFe=(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 zp=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(zp||{}),cte=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(cte||{}),a3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(a3||{}),Mt=(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))(Mt||{}),Ll=(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))(Ll||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),ng=(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))(ng||{}),It=(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))(It||{}),l3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(l3||{}),pu=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(pu||{}),Od=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Od||{}),Jl=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Jl||{}),yl=(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))(yl||{}),Il=(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))(Il||{}),lj=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(lj||{}),oa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(oa||{}),ai=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(ai||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Gl=(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))(Gl||{});const GFe={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")},tt={ADAPTER:GFe,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $N=/iPhone/i,d9=/iPod/i,f9=/iPad/i,h9=/\biOS-universal(?:.+)Mac\b/i,FN=/\bAndroid(?:.+)Mobile\b/i,p9=/Android/i,Jp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,k_=/Silk/i,tu=/Windows Phone/i,m9=/\bWindows(?:.+)ARM\b/i,g9=/BlackBerry/i,v9=/BB10/i,y9=/Opera Mini/i,b9=/\b(CriOS|Chrome)(?:.+)Mobile/i,x9=/Mobile(?:.+)Firefox\b/i,w9=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function VFe(e){return function(t){return t.test(e)}}function _9(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=VFe(n),o={apple:{phone:i($N)&&!i(tu),ipod:i(d9),tablet:!i($N)&&(i(f9)||w9(t))&&!i(tu),universal:i(h9),device:(i($N)||i(d9)||i(f9)||i(h9)||w9(t))&&!i(tu)},amazon:{phone:i(Jp),tablet:!i(Jp)&&i(k_),device:i(Jp)||i(k_)},android:{phone:!i(tu)&&i(Jp)||!i(tu)&&i(FN),tablet:!i(tu)&&!i(Jp)&&!i(FN)&&(i(k_)||i(p9)),device:!i(tu)&&(i(Jp)||i(k_)||i(FN)||i(p9))||i(/\bokhttp\b/i)},windows:{phone:i(tu),tablet:i(m9),device:i(tu)||i(m9)},other:{blackberry:i(g9),blackberry10:i(v9),opera:i(y9),firefox:i(x9),chrome:i(b9),device:i(g9)||i(v9)||i(y9)||i(x9)||i(b9)},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 qFe=_9.default??_9,mu=qFe(globalThis.navigator);tt.RETINA_PREFIX=/@([0-9\.]+)x/;tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ute={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return S1(o,s,n,l,c,g,0),s}function dte(e,t,n,r,i){var o,s;if(i===d3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=S9(o,e[o],e[o+1],s);return s&&Nk(s,s.next)&&(C1(s),s=s.next),s}function Tp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(Nk(n,n.next)||kr(n.prev,n,n.next)===0)){if(C1(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function S1(e,t,n,r,i,o,s){if(e){!s&&o&&i3e(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?KFe(e,r,i,o):YFe(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),C1(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=QFe(Tp(e),t,n),S1(e,t,n,r,i,o,2)):s===2&&JFe(e,t,n,r,i,o):S1(Tp(e),t,n,r,i,o,1);break}}}}function YFe(e){var t=e.prev,n=e,r=e.next;if(kr(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&zm(i,l,o,c,s,d,v.x,v.y)&&kr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function KFe(e,t,n,r){var i=e.prev,o=e,s=e.next;if(kr(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=c3(g,v,t,n,r),b=c3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function QFe(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Nk(i,o)&&fte(i,r,r.next,o)&&E1(i,o)&&E1(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),C1(r),C1(r.next),r=e=o),r=r.next}while(r!==e);return Tp(r)}function JFe(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&a3e(s,l)){var c=hte(s,l);s=Tp(s,s.next),c=Tp(c,c.next),S1(s,t,n,r,i,o,0),S1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function ZFe(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&zm(is.x||n.x===s.x&&r3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function r3e(e,t){return kr(e.prev,e,t.prev)<0&&kr(t.next,e,e.next)<0}function i3e(e,t,n,r){var i=e;do i.z===0&&(i.z=c3(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,o3e(i)}function o3e(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function c3(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 s3e(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function a3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!l3e(e,t)&&(E1(e,t)&&E1(t,e)&&c3e(e,t)&&(kr(e.prev,e,t.prev)||kr(e,t.prev,t))||Nk(e,t)&&kr(e.prev,e,e.next)>0&&kr(t.prev,t,t.next)>0)}function kr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Nk(e,t){return e.x===t.x&&e.y===t.y}function fte(e,t,n,r){var i=R_(kr(e,t,n)),o=R_(kr(e,t,r)),s=R_(kr(n,r,e)),l=R_(kr(n,r,t));return!!(i!==o&&s!==l||i===0&&A_(e,n,t)||o===0&&A_(e,r,t)||s===0&&A_(n,e,r)||l===0&&A_(n,t,r))}function A_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function R_(e){return e>0?1:e<0?-1:0}function l3e(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&&fte(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function E1(e,t){return kr(e.prev,e,e.next)<0?kr(e,t,e.next)>=0&&kr(e,e.prev,t)>=0:kr(e,t,e.prev)<0||kr(e,e.next,t)<0}function c3e(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 hte(e,t){var n=new u3(e.i,e.x,e.y),r=new u3(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 S9(e,t,n,r){var i=new u3(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 C1(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 u3(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}Lk.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(d3(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var u3e=cj.exports;const d3e=js(u3e);var hC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */hC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Bt=="object"&&Bt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,A=Math.floor,R=String.fromCharCode,k;function O(Y){throw new RangeError(x[Y])}function L(Y,J){for(var ie=Y.length,ce=[];ie--;)ce[ie]=J(Y[ie]);return ce}function N(Y,J){var ie=Y.split("@"),ce="";ie.length>1&&(ce=ie[0]+"@",Y=ie[1]),Y=Y.replace(b,".");var ue=Y.split("."),se=L(ue,J).join(".");return ce+se}function H(Y){for(var J=[],ie=0,ce=Y.length,ue,se;ie=55296&&ue<=56319&&ie65535&&(J-=65536,ie+=R(J>>>10&1023|55296),J=56320|J&1023),ie+=R(J),ie}).join("")}function z(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,J){return Y+22+75*(Y<26)-((J!=0)<<5)}function F(Y,J,ie){var ce=0;for(Y=ie?A(Y/p):Y>>1,Y+=A(Y/J);Y>E*f>>1;ce+=c)Y=A(Y/E);return A(ce+(E+1)*Y/(Y+h))}function j(Y){var J=[],ie=Y.length,ce,ue=0,se=v,Q=g,ae,le,he,pe,ve,ye,xe,me,be;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&O("not-basic"),J.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=ie&&O("invalid-input"),xe=z(Y.charCodeAt(he++)),(xe>=c||xe>A((l-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=Q?d:ye>=Q+f?f:ye-Q,!(xeA(l/be)&&O("overflow"),ve*=be;ce=J.length+1,Q=F(ue-pe,ce,pe==0),A(ue/ce)>l-se&&O("overflow"),se+=A(ue/ce),ue%=ce,J.splice(ue++,0,se)}return W(J)}function V(Y){var J,ie,ce,ue,se,Q,ae,le,he,pe,ve,ye=[],xe,me,be,Qe;for(Y=H(Y),xe=Y.length,J=v,ie=0,se=g,Q=0;Q=J&&veA((l-ie)/me)&&O("overflow"),ie+=(ae-J)*me,J=ae,Q=0;Ql&&O("overflow"),ve==J){for(le=ie,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!pi?ln:pi(Uint8Array),lp={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Zp&&pi?pi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":fm,"%AsyncGenerator%":fm,"%AsyncGeneratorFunction%":fm,"%AsyncIteratorPrototype%":fm,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":pte,"%GeneratorFunction%":fm,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Zp&&pi?pi(pi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Zp||!pi?ln:pi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Zp||!pi?ln:pi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Zp&&pi?pi(""[Symbol.iterator]()):ln,"%Symbol%":Zp?Symbol:ln,"%SyntaxError%":$g,"%ThrowTypeError%":C3e,"%TypedArray%":k3e,"%TypeError%":rg,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(pi)try{null.error}catch(e){var A3e=pi(pi(e));lp["%Error.prototype%"]=A3e}var R3e=function e(t){var n;if(t==="%AsyncFunction%")n=jN("async function () {}");else if(t==="%GeneratorFunction%")n=jN("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jN("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&pi&&(n=pi(i.prototype))}return lp[t]=n,n},T9={"%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"]},gw=uj,pC=E3e,I3e=gw.call(Function.call,Array.prototype.concat),P3e=gw.call(Function.apply,Array.prototype.splice),k9=gw.call(Function.call,String.prototype.replace),mC=gw.call(Function.call,String.prototype.slice),O3e=gw.call(Function.call,RegExp.prototype.exec),M3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D3e=/\\(\\)?/g,L3e=function(t){var n=mC(t,0,1),r=mC(t,-1);if(n==="%"&&r!=="%")throw new $g("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new $g("invalid intrinsic syntax, expected opening `%`");var i=[];return k9(t,M3e,function(o,s,l,c){i[i.length]=l?k9(c,D3e,"$1"):s||o}),i},N3e=function(t,n){var r=t,i;if(pC(T9,r)&&(i=T9[r],r="%"+i[0]+"%"),pC(lp,r)){var o=lp[r];if(o===fm&&(o=R3e(r)),typeof o>"u"&&!n)throw new rg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new $g("intrinsic "+t+" does not exist!")},dj=function(t,n){if(typeof t!="string"||t.length===0)throw new rg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new rg('"allowMissing" argument must be a boolean');if(O3e(/^%?[^%]*%?$/,t)===null)throw new $g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=L3e(t),i=r.length>0?r[0]:"",o=N3e("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],P3e(r,I3e([0,1],d)));for(var f=1,h=!0;f=r.length){var y=ap(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=pC(l,p),l=l[p];h&&!c&&(lp[s]=l)}}return l},mte={exports:{}};(function(e){var t=uj,n=dj,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(mte);var B3e=mte.exports,gte=dj,vte=B3e,$3e=vte(gte("String.prototype.indexOf")),F3e=function(t,n){var r=gte(t,!!n);return typeof r=="function"&&$3e(t,".prototype.")>-1?vte(r):r};const z3e={},j3e=Object.freeze(Object.defineProperty({__proto__:null,default:z3e},Symbol.toStringTag,{value:"Module"})),yte=sq(j3e);var fj=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&fj?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,gC=fj&&HN&&typeof HN.get=="function"?HN.get:null,A9=fj&&Map.prototype.forEach,hj=typeof Set=="function"&&Set.prototype,WN=Object.getOwnPropertyDescriptor&&hj?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,vC=hj&&WN&&typeof WN.get=="function"?WN.get:null,R9=hj&&Set.prototype.forEach,U3e=typeof WeakMap=="function"&&WeakMap.prototype,Ex=U3e?WeakMap.prototype.has:null,H3e=typeof WeakSet=="function"&&WeakSet.prototype,Cx=H3e?WeakSet.prototype.has:null,W3e=typeof WeakRef=="function"&&WeakRef.prototype,I9=W3e?WeakRef.prototype.deref:null,G3e=Boolean.prototype.valueOf,V3e=Object.prototype.toString,q3e=Function.prototype.toString,X3e=String.prototype.match,pj=String.prototype.slice,pd=String.prototype.replace,Y3e=String.prototype.toUpperCase,P9=String.prototype.toLowerCase,bte=RegExp.prototype.test,O9=Array.prototype.concat,Pl=Array.prototype.join,K3e=Array.prototype.slice,M9=Math.floor,f3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,GN=Object.getOwnPropertySymbols,h3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",oo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Fg||"symbol")?Symbol.toStringTag:null,xte=Object.prototype.propertyIsEnumerable,D9=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L9(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||bte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-M9(-e):M9(e);if(r!==e){var i=String(r),o=pj.call(t,i.length+1);return pd.call(i,n,"$&_")+"."+pd.call(pd.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return pd.call(t,n,"$&_")}var p3=yte,N9=p3.custom,B9=_te(N9)?N9:null,Q3e=function e(t,n,r,i){var o=n||{};if(nd(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nd(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=nd(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(nd(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(nd(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ete(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?L9(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?L9(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return m3(t)?"[Array]":"[Object]";var h=m5e(o,r);if(typeof i>"u")i=[];else if(Ste(i,t)>=0)return"[Circular]";function p(z,D,F){if(D&&(i=K3e.call(i),i.push(D)),F){var j={depth:o.depth};return nd(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!$9(t)){var g=s5e(t),v=I_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Pl.call(v,", ")+" }":"")}if(_te(t)){var y=Fg?pd.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):h3.call(t);return typeof t=="object"&&!Fg?wb(y):y}if(f5e(t)){for(var S="<"+P9.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+wte(J3e(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(m3(t)){if(t.length===0)return"[]";var x=I_(t,p);return h&&!p5e(x)?"["+g3(x,h)+"]":"[ "+Pl.call(x,", ")+" ]"}if(e5e(t)){var E=I_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!xte.call(t,"cause")?"{ ["+String(t)+"] "+Pl.call(O9.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pl.call(E,", ")+" }"}if(typeof t=="object"&&s){if(B9&&typeof t[B9]=="function"&&p3)return p3(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(a5e(t)){var A=[];return A9&&A9.call(t,function(z,D){A.push(p(D,t,!0)+" => "+p(z,t))}),F9("Map",gC.call(t),A,h)}if(u5e(t)){var R=[];return R9&&R9.call(t,function(z){R.push(p(z,t))}),F9("Set",vC.call(t),R,h)}if(l5e(t))return VN("WeakMap");if(d5e(t))return VN("WeakSet");if(c5e(t))return VN("WeakRef");if(n5e(t))return wb(p(Number(t)));if(i5e(t))return wb(p(f3.call(t)));if(r5e(t))return wb(G3e.call(t));if(t5e(t))return wb(p(String(t)));if(!Z3e(t)&&!$9(t)){var k=I_(t,p),O=D9?D9(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&oo&&Object(t)===t&&oo in t?pj.call(of(t),8,-1):L?"Object":"",H=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=H+(N||L?"["+Pl.call(O9.call([],N||[],L||[]),": ")+"] ":"");return k.length===0?W+"{}":h?W+"{"+g3(k,h)+"}":W+"{ "+Pl.call(k,", ")+" }"}return String(t)};function wte(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function J3e(e){return pd.call(String(e),/"/g,""")}function m3(e){return of(e)==="[object Array]"&&(!oo||!(typeof e=="object"&&oo in e))}function Z3e(e){return of(e)==="[object Date]"&&(!oo||!(typeof e=="object"&&oo in e))}function $9(e){return of(e)==="[object RegExp]"&&(!oo||!(typeof e=="object"&&oo in e))}function e5e(e){return of(e)==="[object Error]"&&(!oo||!(typeof e=="object"&&oo in e))}function t5e(e){return of(e)==="[object String]"&&(!oo||!(typeof e=="object"&&oo in e))}function n5e(e){return of(e)==="[object Number]"&&(!oo||!(typeof e=="object"&&oo in e))}function r5e(e){return of(e)==="[object Boolean]"&&(!oo||!(typeof e=="object"&&oo in e))}function _te(e){if(Fg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!h3)return!1;try{return h3.call(e),!0}catch{}return!1}function i5e(e){if(!e||typeof e!="object"||!f3)return!1;try{return f3.call(e),!0}catch{}return!1}var o5e=Object.prototype.hasOwnProperty||function(e){return e in this};function nd(e,t){return o5e.call(e,t)}function of(e){return V3e.call(e)}function s5e(e){if(e.name)return e.name;var t=X3e.call(q3e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Ste(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 Ete(pj.call(e,0,t.maxStringLength),t)+r}var i=pd.call(pd.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,h5e);return wte(i,"single",t)}function h5e(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":"")+Y3e.call(t.toString(16))}function wb(e){return"Object("+e+")"}function VN(e){return e+" { ? }"}function F9(e,t,n,r){var i=r?g3(n,r):Pl.call(n,", ");return e+" ("+t+") {"+i+"}"}function p5e(e){for(var t=0;t=0)return!1;return!0}function m5e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Pl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Pl.call(Array(t+1),n)}}function g3(e,t){if(e.length===0)return"";var n=` -`+t.prev+t.base;return n+Pl.call(e,","+n)+` -`+t.prev}function I_(e,t){var n=m3(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Vh(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===I5e.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+Sl[d];continue}if(d<2048){l=l+(Sl[192|d>>6]+Sl[128|d&63]);continue}if(d<55296||d>=57344){l=l+(Sl[224|d>>12]+Sl[128|d>>6&63]+Sl[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=Sl[240|d>>18]+Sl[128|d>>12&63]+Sl[128|d>>6&63]+Sl[128|d&63]}return l},N5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&lu(_)&&(_=jS.maybeMap(_,function(j){return j instanceof Date?h(j):j})),_===null){if(o)return l&&!v?l(n,Ki.encoder,y,"key",p):n;_=""}if(W5e(_)||jS.isBuffer(_)){if(l){var R=v?n:l(n,Ki.encoder,y,"key",p);return[g(R)+"="+g(l(_,Ki.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var k=[];if(typeof _>"u")return k;var O;if(r==="comma"&&lu(_))v&&l&&(_=jS.maybeMap(_,l)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(lu(c))O=c;else{var L=Object.keys(_);O=d?L.sort(d):L}for(var N=i&&lu(_)&&_.length===1?n+"[]":n,H=0;H"u"?Ki.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ki.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ki.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ki.encode,encoder:typeof t.encoder=="function"?t.encoder:Ki.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ki.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ki.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ki.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ki.strictNullHandling}},q5e=function(e,t){var n=e,r=V5e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):lu(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in z9?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=z9[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=kte(),h=0;h0?v+g:""},zg=Tte,v3=Object.prototype.hasOwnProperty,X5e=Array.isArray,fi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:zg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Y5e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Rte=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},K5e="utf8=%26%2310003%3B",Q5e="utf8=%E2%9C%93",J5e=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=X5e(v)?[v]:v),v3.call(r,g)?r[g]=zg.combine(r[g],v):r[g]=v}return r},Z5e=function(e,t,n,r){for(var i=r?t:Rte(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},e4e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&v3.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?fi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?fi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:fi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:fi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:fi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:fi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:fi.comma,decoder:typeof t.decoder=="function"?t.decoder:fi.decoder,delimiter:typeof t.delimiter=="string"||zg.isRegExp(t.delimiter)?t.delimiter:fi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:fi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:fi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:fi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:fi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:fi.strictNullHandling}},n4e=function(e,t){var n=t4e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?J5e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` -`," "],f4e=["{","}","|","\\","^","`"].concat(d4e),y3=["'"].concat(f4e),U9=["%","/","?",";","#"].concat(y3),H9=["/","?","#"],h4e=255,W9=/^[+a-z0-9A-Z_-]{0,63}$/,p4e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m4e={javascript:!0,"javascript:":!0},b3={javascript:!0,"javascript:":!0},ig={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x3=s4e;function Bk(e,t,n){if(e&&typeof e=="object"&&e instanceof al)return e;var r=new al;return r.parse(e,t,n),r}al.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[R];if(!A.match(W9)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(p4e);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>h4e?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=a4e.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!m4e[f])for(var g=0,x=y3.length;g0?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 R=b.slice(-1)[0],k=(n.host||e.host||b.length>1)&&(R==="."||R==="..")||R==="",O=0,L=b.length;L>=0;L--)R=b[L],R==="."?b.splice(L,1):R===".."?(b.splice(L,1),O++):O&&(b.splice(L,1),O--);if(!S&&!_)for(;O--;O)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),k&&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};al.prototype.parseHost=function(){var e=this.host,t=c4e.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 y4e=Bk,b4e=v4e,x4e=g4e;const w4e={parse:y4e,format:x4e,resolve:b4e};function Ba(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function _b(e){return e.split("?")[0].split("#")[0]}function _4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function S4e(e,t,n){return e.replace(new RegExp(_4e(t),"g"),n)}function E4e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let l=0;l<=e.length;++l){if(l2){const c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=l,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,l)}`:n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o!==-1?++o:o=-1}return n}const ro={toPosix(e){return S4e(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){Ba(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=_b(this.toPosix(t??tt.ADAPTER.getBaseUrl())),i=_b(this.toPosix(n??this.rootname(r)));return Ba(e),e=this.toPosix(e),e.startsWith("/")?ro.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),Ba(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=E4e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return Ba(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(Ba(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!i){r=l;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){Ba(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){Ba(e),t&&Ba(t),e=_b(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else l===-1&&(i=!1,l=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){Ba(e),e=_b(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const l=e.charCodeAt(s);if(l===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),l===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){Ba(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=_b(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,l=-1,c=!0,d=e.length-1,f=0;for(;d>=i;--d){if(n=e.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(s,l)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},G9={};function cn(e,t,n=3){if(G9[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} +}`;var Ve=V0(function(){return ut(M,we+"return "+oe).apply(n,B)});if(Ve.source=oe,dh(Ve))throw Ve;return Ve}function wM(a){return ft(a).toLowerCase()}function _M(a){return ft(a).toUpperCase()}function SM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=yr(u),M=ny(w,T),B=ry(w,T)+1;return Oi(w,M,B).join("")}function EM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ry(w,yr(u))+1;return Oi(w,0,T).join("")}function CM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(ao,"");if(!a||!(u=Vn(u)))return a;var w=yr(a),T=ny(w,yr(u));return Oi(w,T).join("")}function TM(a,u){var m=N,w=H;if(Ft(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?Vn(u.omission):w}a=ft(a);var M=a.length;if(os(a)){var B=yr(a);M=B.length}if(m>=M)return a;var U=m-ss(w);if(U<1)return w;var X=B?Oi(B,0,U).join(""):a.slice(0,U);if(T===n)return X+w;if(B&&(U+=X.length-U),fh(T)){if(a.slice(U).search(T)){var ne,re=X;for(T.global||(T=Af(T.source,ft(Jn.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;X=X.slice(0,oe===n?U:oe)}}else if(a.indexOf(Vn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function kM(a){return a=ft(a),a&&Fr.test(a)?a.replace(Or,nR):a}var AM=hs(function(a,u,m){return a+(m?" ":"")+u.toUpperCase()}),mh=qy("toUpperCase");function G0(a,u,m){return a=ft(a),u=m?n:u,u===n?QA(a)?oR(a):UA(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Wn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),RM=ni(function(a,u){return nr(u,function(m){m=Ur(m),ei(a,m,ch(a[m],a))}),a});function IM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new rr(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=gn(a,J);u=Ce(u),a-=J;for(var T=Cf(w,u);++m0||u<0)?new Je(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),u!==n&&(u=We(u),m=u<0?m.dropRight(-u):m.take(u-a)),m)},Je.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Je.prototype.toArray=function(){return this.take(J)},zr(Je.prototype,function(a,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),w=/^(?:head|last)$/.test(u),T=P[w?"take"+(u=="last"?"Right":""):u],M=w||/^find/.test(u);T&&(P.prototype[u]=function(){var B=this.__wrapped__,U=w?[1]:arguments,X=B instanceof Je,ne=U[0],re=X||Be(B),oe=function(Ke){var nt=T.apply(P,Ti([Ke],U));return w&&fe?nt[0]:nt};re&&m&&typeof ne=="function"&&ne.length!=1&&(X=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,Te=M&&!fe,Ve=X&&!we;if(!M&&re){B=Ve?B:new Je(this);var ke=a.apply(B,U);return ke.__actions__.push({func:Wc,args:[oe],thisArg:n}),new ir(ke,fe)}return Te&&Ve?a.apply(this,U):(ke=this.thru(oe),Te?w?ke.value()[0]:ke.value():ke)})}),nr(["pop","push","shift","sort","splice","unshift"],function(a){var u=gc[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var T=arguments;if(w&&!this.__chain__){var M=this.value();return u.apply(Be(M)?M:[],T)}return this[m](function(B){return u.apply(Be(B)?B:[],T)})}}),zr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(us,w)||(us[w]=[]),us[w].push({name:u,func:m})}}),us[Bc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=kR,Je.prototype.reverse=AR,Je.prototype.value=RR,P.prototype.at=i2,P.prototype.chain=o2,P.prototype.commit=s2,P.prototype.next=a2,P.prototype.plant=c2,P.prototype.reverse=u2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=d2,P.prototype.first=P.prototype.head,_a&&(P.prototype[_a]=l2),P},as=sR();co?((co.exports=as)._=as,vf._=as):dn._=as}).call(Bt)})(dC,dC.exports);var Gt=dC.exports;let o3e=(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 zp=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(zp||{}),fte=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(fte||{}),l3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(l3||{}),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||{}),Bl=(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))(Bl||{}),Ge=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ge||{}),ng=(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))(ng||{}),It=(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))(It||{}),c3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(c3||{}),pu=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(pu||{}),Od=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Od||{}),Zl=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Zl||{}),xl=(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))(xl||{}),Ol=(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))(Ol||{}),uj=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(uj||{}),oa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(oa||{}),ai=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(ai||{}),Gr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Gr||{}),Vl=(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))(Vl||{});const s3e={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")},tt={ADAPTER:s3e,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $N=/iPhone/i,f9=/iPod/i,h9=/iPad/i,p9=/\biOS-universal(?:.+)Mac\b/i,FN=/\bAndroid(?:.+)Mobile\b/i,m9=/Android/i,Jp=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,k_=/Silk/i,tu=/Windows Phone/i,g9=/\bWindows(?:.+)ARM\b/i,v9=/BlackBerry/i,y9=/BB10/i,b9=/Opera Mini/i,x9=/\b(CriOS|Chrome)(?:.+)Mobile/i,w9=/Mobile(?:.+)Firefox\b/i,_9=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function a3e(e){return function(t){return t.test(e)}}function S9(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=a3e(n),o={apple:{phone:i($N)&&!i(tu),ipod:i(f9),tablet:!i($N)&&(i(h9)||_9(t))&&!i(tu),universal:i(p9),device:(i($N)||i(f9)||i(h9)||i(p9)||_9(t))&&!i(tu)},amazon:{phone:i(Jp),tablet:!i(Jp)&&i(k_),device:i(Jp)||i(k_)},android:{phone:!i(tu)&&i(Jp)||!i(tu)&&i(FN),tablet:!i(tu)&&!i(Jp)&&!i(FN)&&(i(k_)||i(m9)),device:!i(tu)&&(i(Jp)||i(k_)||i(FN)||i(m9))||i(/\bokhttp\b/i)},windows:{phone:i(tu),tablet:i(g9),device:i(tu)||i(g9)},other:{blackberry:i(v9),blackberry10:i(y9),opera:i(b9),firefox:i(w9),chrome:i(x9),device:i(v9)||i(y9)||i(b9)||i(w9)||i(x9)},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 l3e=S9.default??S9,mu=l3e(globalThis.navigator);tt.RETINA_PREFIX=/@([0-9\.]+)x/;tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var hte={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,f){this.fn=c,this.context=d,this.once=f||!1}function o(c,d,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var g=new i(f,h||c,p),v=n?n+d:d;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)t.call(f,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},l.prototype.listeners=function(d){var f=n?n+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,g=h.length,v=new Array(g);p80*n){l=d=e[0],c=f=e[1];for(var v=n;vd&&(d=h),p>f&&(f=p);g=Math.max(d-l,f-c),g=g!==0?32767/g:0}return S1(o,s,n,l,c,g,0),s}function pte(e,t,n,r,i){var o,s;if(i===f3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=E9(o,e[o],e[o+1],s);return s&&Lk(s,s.next)&&(C1(s),s=s.next),s}function kp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(Lk(n,n.next)||kr(n.prev,n,n.next)===0)){if(C1(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function S1(e,t,n,r,i,o,s){if(e){!s&&o&&b3e(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?d3e(e,r,i,o):u3e(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),C1(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=f3e(kp(e),t,n),S1(e,t,n,r,i,o,2)):s===2&&h3e(e,t,n,r,i,o):S1(kp(e),t,n,r,i,o,1);break}}}}function u3e(e){var t=e.prev,n=e,r=e.next;if(kr(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,l=t.y,c=n.y,d=r.y,f=io?i>s?i:s:o>s?o:s,g=l>c?l>d?l:d:c>d?c:d,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&zm(i,l,o,c,s,d,v.x,v.y)&&kr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function d3e(e,t,n,r){var i=e.prev,o=e,s=e.next;if(kr(i,o,s)>=0)return!1;for(var l=i.x,c=o.x,d=s.x,f=i.y,h=o.y,p=s.y,g=lc?l>d?l:d:c>d?c:d,S=f>h?f>p?f:p:h>p?h:p,_=u3(g,v,t,n,r),b=u3(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=_&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0||(x=x.prevZ,E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&zm(l,f,c,h,d,p,x.x,x.y)&&kr(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&zm(l,f,c,h,d,p,E.x,E.y)&&kr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function f3e(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Lk(i,o)&&mte(i,r,r.next,o)&&E1(i,o)&&E1(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),C1(r),C1(r.next),r=e=o),r=r.next}while(r!==e);return kp(r)}function h3e(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&_3e(s,l)){var c=gte(s,l);s=kp(s,s.next),c=kp(c,c.next),S1(s,t,n,r,i,o,0),S1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function p3e(e,t,n,r){var i=[],o,s,l,c,d;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var l=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(l<=r&&l>o&&(o=l,s=n.x=n.x&&n.x>=d&&r!==n.x&&zm(is.x||n.x===s.x&&y3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function y3e(e,t){return kr(e.prev,e,t.prev)<0&&kr(t.next,e,e.next)<0}function b3e(e,t,n,r){var i=e;do i.z===0&&(i.z=u3(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,x3e(i)}function x3e(e){var t,n,r,i,o,s,l,c,d=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,l=0,t=0;t0||c>0&&r;)l!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,d*=2}while(s>1);return e}function u3(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 w3e(e){var t=e,n=e;do(t.x=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function _3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!S3e(e,t)&&(E1(e,t)&&E1(t,e)&&E3e(e,t)&&(kr(e.prev,e,t.prev)||kr(e,t.prev,t))||Lk(e,t)&&kr(e.prev,e,e.next)>0&&kr(t.prev,t,t.next)>0)}function kr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Lk(e,t){return e.x===t.x&&e.y===t.y}function mte(e,t,n,r){var i=R_(kr(e,t,n)),o=R_(kr(e,t,r)),s=R_(kr(n,r,e)),l=R_(kr(n,r,t));return!!(i!==o&&s!==l||i===0&&A_(e,n,t)||o===0&&A_(e,r,t)||s===0&&A_(n,e,r)||l===0&&A_(n,t,r))}function A_(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function R_(e){return e>0?1:e<0?-1:0}function S3e(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&&mte(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function E1(e,t){return kr(e.prev,e,e.next)<0?kr(e,t,e.next)>=0&&kr(e,e.prev,t)>=0:kr(e,t,e.prev)<0||kr(e,e.next,t)<0}function E3e(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 gte(e,t){var n=new d3(e.i,e.x,e.y),r=new d3(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 E9(e,t,n,r){var i=new d3(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 C1(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 d3(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}Dk.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(f3(e,0,o,n));if(i)for(var l=0,c=t.length;l0&&(r+=e[i-1].length,n.holes.push(r))}return n};var C3e=dj.exports;const T3e=js(C3e);var fC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */fC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Bt=="object"&&Bt;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,l=2147483647,c=36,d=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-d,A=Math.floor,R=String.fromCharCode,k;function O(Y){throw new RangeError(x[Y])}function L(Y,J){for(var ie=Y.length,ce=[];ie--;)ce[ie]=J(Y[ie]);return ce}function N(Y,J){var ie=Y.split("@"),ce="";ie.length>1&&(ce=ie[0]+"@",Y=ie[1]),Y=Y.replace(b,".");var ue=Y.split("."),se=L(ue,J).join(".");return ce+se}function H(Y){for(var J=[],ie=0,ce=Y.length,ue,se;ie=55296&&ue<=56319&&ie65535&&(J-=65536,ie+=R(J>>>10&1023|55296),J=56320|J&1023),ie+=R(J),ie}).join("")}function z(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:c}function D(Y,J){return Y+22+75*(Y<26)-((J!=0)<<5)}function F(Y,J,ie){var ce=0;for(Y=ie?A(Y/p):Y>>1,Y+=A(Y/J);Y>E*f>>1;ce+=c)Y=A(Y/E);return A(ce+(E+1)*Y/(Y+h))}function j(Y){var J=[],ie=Y.length,ce,ue=0,se=v,Q=g,ae,le,he,pe,ve,ye,xe,me,be;for(ae=Y.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&O("not-basic"),J.push(Y.charCodeAt(le));for(he=ae>0?ae+1:0;he=ie&&O("invalid-input"),xe=z(Y.charCodeAt(he++)),(xe>=c||xe>A((l-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=Q?d:ye>=Q+f?f:ye-Q,!(xeA(l/be)&&O("overflow"),ve*=be;ce=J.length+1,Q=F(ue-pe,ce,pe==0),A(ue/ce)>l-se&&O("overflow"),se+=A(ue/ce),ue%=ce,J.splice(ue++,0,se)}return W(J)}function V(Y){var J,ie,ce,ue,se,Q,ae,le,he,pe,ve,ye=[],xe,me,be,Qe;for(Y=H(Y),xe=Y.length,J=v,ie=0,se=g,Q=0;Q=J&&veA((l-ie)/me)&&O("overflow"),ie+=(ae-J)*me,J=ae,Q=0;Ql&&O("overflow"),ve==J){for(le=ie,he=c;pe=he<=se?d:he>=se+f?f:he-se,!(le"u"||!mi?ln:mi(Uint8Array),lp={"%AggregateError%":typeof AggregateError>"u"?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Zp&&mi?mi([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":hm,"%AsyncGenerator%":hm,"%AsyncGeneratorFunction%":hm,"%AsyncIteratorPrototype%":hm,"%Atomics%":typeof Atomics>"u"?ln:Atomics,"%BigInt%":typeof BigInt>"u"?ln:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ln:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ln:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ln:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ln:FinalizationRegistry,"%Function%":vte,"%GeneratorFunction%":hm,"%Int8Array%":typeof Int8Array>"u"?ln:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ln:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ln:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Zp&&mi?mi(mi([][Symbol.iterator]())):ln,"%JSON%":typeof JSON=="object"?JSON:ln,"%Map%":typeof Map>"u"?ln:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Zp||!mi?ln:mi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ln:Promise,"%Proxy%":typeof Proxy>"u"?ln:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ln:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ln:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Zp||!mi?ln:mi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ln:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Zp&&mi?mi(""[Symbol.iterator]()):ln,"%Symbol%":Zp?Symbol:ln,"%SyntaxError%":$g,"%ThrowTypeError%":z3e,"%TypedArray%":U3e,"%TypeError%":rg,"%Uint8Array%":typeof Uint8Array>"u"?ln:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ln:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ln:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ln:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ln:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ln:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ln:WeakSet};if(mi)try{null.error}catch(e){var H3e=mi(mi(e));lp["%Error.prototype%"]=H3e}var W3e=function e(t){var n;if(t==="%AsyncFunction%")n=jN("async function () {}");else if(t==="%GeneratorFunction%")n=jN("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jN("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&mi&&(n=mi(i.prototype))}return lp[t]=n,n},k9={"%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"]},gw=fj,hC=F3e,G3e=gw.call(Function.call,Array.prototype.concat),V3e=gw.call(Function.apply,Array.prototype.splice),A9=gw.call(Function.call,String.prototype.replace),pC=gw.call(Function.call,String.prototype.slice),q3e=gw.call(Function.call,RegExp.prototype.exec),X3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y3e=/\\(\\)?/g,K3e=function(t){var n=pC(t,0,1),r=pC(t,-1);if(n==="%"&&r!=="%")throw new $g("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new $g("invalid intrinsic syntax, expected opening `%`");var i=[];return A9(t,X3e,function(o,s,l,c){i[i.length]=l?A9(c,Y3e,"$1"):s||o}),i},Q3e=function(t,n){var r=t,i;if(hC(k9,r)&&(i=k9[r],r="%"+i[0]+"%"),hC(lp,r)){var o=lp[r];if(o===hm&&(o=W3e(r)),typeof o>"u"&&!n)throw new rg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new $g("intrinsic "+t+" does not exist!")},hj=function(t,n){if(typeof t!="string"||t.length===0)throw new rg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new rg('"allowMissing" argument must be a boolean');if(q3e(/^%?[^%]*%?$/,t)===null)throw new $g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=K3e(t),i=r.length>0?r[0]:"",o=Q3e("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],V3e(r,G3e([0,1],d)));for(var f=1,h=!0;f=r.length){var y=ap(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=hC(l,p),l=l[p];h&&!c&&(lp[s]=l)}}return l},yte={exports:{}};(function(e){var t=fj,n=hj,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&l){var g=s(p,"length");g.configurable&&l(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var d=function(){return o(t,r,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(yte);var J3e=yte.exports,bte=hj,xte=J3e,Z3e=xte(bte("String.prototype.indexOf")),e5e=function(t,n){var r=bte(t,!!n);return typeof r=="function"&&Z3e(t,".prototype.")>-1?xte(r):r},pj=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&pj?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mC=pj&&HN&&typeof HN.get=="function"?HN.get:null,R9=pj&&Map.prototype.forEach,mj=typeof Set=="function"&&Set.prototype,WN=Object.getOwnPropertyDescriptor&&mj?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gC=mj&&WN&&typeof WN.get=="function"?WN.get:null,I9=mj&&Set.prototype.forEach,t5e=typeof WeakMap=="function"&&WeakMap.prototype,Ex=t5e?WeakMap.prototype.has:null,n5e=typeof WeakSet=="function"&&WeakSet.prototype,Cx=n5e?WeakSet.prototype.has:null,r5e=typeof WeakRef=="function"&&WeakRef.prototype,P9=r5e?WeakRef.prototype.deref:null,i5e=Boolean.prototype.valueOf,o5e=Object.prototype.toString,s5e=Function.prototype.toString,a5e=String.prototype.match,gj=String.prototype.slice,pd=String.prototype.replace,l5e=String.prototype.toUpperCase,O9=String.prototype.toLowerCase,wte=RegExp.prototype.test,M9=Array.prototype.concat,Ml=Array.prototype.join,c5e=Array.prototype.slice,D9=Math.floor,h3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,GN=Object.getOwnPropertySymbols,p3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",oo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Fg||"symbol")?Symbol.toStringTag:null,_te=Object.prototype.propertyIsEnumerable,L9=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N9(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||wte.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-D9(-e):D9(e);if(r!==e){var i=String(r),o=gj.call(t,i.length+1);return pd.call(i,n,"$&_")+"."+pd.call(pd.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return pd.call(t,n,"$&_")}var m3=cte,B9=m3.custom,$9=Ete(B9)?B9:null,u5e=function e(t,n,r,i){var o=n||{};if(nd(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nd(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=nd(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(nd(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(nd(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Tte(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?N9(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?N9(t,d):d}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return g3(t)?"[Array]":"[Object]";var h=A5e(o,r);if(typeof i>"u")i=[];else if(Cte(i,t)>=0)return"[Circular]";function p(z,D,F){if(D&&(i=c5e.call(i),i.push(D)),F){var j={depth:o.depth};return nd(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!F9(t)){var g=b5e(t),v=I_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Ml.call(v,", ")+" }":"")}if(Ete(t)){var y=Fg?pd.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):p3.call(t);return typeof t=="object"&&!Fg?wb(y):y}if(C5e(t)){for(var S="<"+O9.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+Ste(d5e(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(g3(t)){if(t.length===0)return"[]";var x=I_(t,p);return h&&!k5e(x)?"["+v3(x,h)+"]":"[ "+Ml.call(x,", ")+" ]"}if(h5e(t)){var E=I_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!_te.call(t,"cause")?"{ ["+String(t)+"] "+Ml.call(M9.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ml.call(E,", ")+" }"}if(typeof t=="object"&&s){if($9&&typeof t[$9]=="function"&&m3)return m3(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(x5e(t)){var A=[];return R9&&R9.call(t,function(z,D){A.push(p(D,t,!0)+" => "+p(z,t))}),z9("Map",mC.call(t),A,h)}if(S5e(t)){var R=[];return I9&&I9.call(t,function(z){R.push(p(z,t))}),z9("Set",gC.call(t),R,h)}if(w5e(t))return VN("WeakMap");if(E5e(t))return VN("WeakSet");if(_5e(t))return VN("WeakRef");if(m5e(t))return wb(p(Number(t)));if(v5e(t))return wb(p(h3.call(t)));if(g5e(t))return wb(i5e.call(t));if(p5e(t))return wb(p(String(t)));if(!f5e(t)&&!F9(t)){var k=I_(t,p),O=L9?L9(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&oo&&Object(t)===t&&oo in t?gj.call(of(t),8,-1):L?"Object":"",H=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=H+(N||L?"["+Ml.call(M9.call([],N||[],L||[]),": ")+"] ":"");return k.length===0?W+"{}":h?W+"{"+v3(k,h)+"}":W+"{ "+Ml.call(k,", ")+" }"}return String(t)};function Ste(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function d5e(e){return pd.call(String(e),/"/g,""")}function g3(e){return of(e)==="[object Array]"&&(!oo||!(typeof e=="object"&&oo in e))}function f5e(e){return of(e)==="[object Date]"&&(!oo||!(typeof e=="object"&&oo in e))}function F9(e){return of(e)==="[object RegExp]"&&(!oo||!(typeof e=="object"&&oo in e))}function h5e(e){return of(e)==="[object Error]"&&(!oo||!(typeof e=="object"&&oo in e))}function p5e(e){return of(e)==="[object String]"&&(!oo||!(typeof e=="object"&&oo in e))}function m5e(e){return of(e)==="[object Number]"&&(!oo||!(typeof e=="object"&&oo in e))}function g5e(e){return of(e)==="[object Boolean]"&&(!oo||!(typeof e=="object"&&oo in e))}function Ete(e){if(Fg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!p3)return!1;try{return p3.call(e),!0}catch{}return!1}function v5e(e){if(!e||typeof e!="object"||!h3)return!1;try{return h3.call(e),!0}catch{}return!1}var y5e=Object.prototype.hasOwnProperty||function(e){return e in this};function nd(e,t){return y5e.call(e,t)}function of(e){return o5e.call(e)}function b5e(e){if(e.name)return e.name;var t=a5e.call(s5e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Cte(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 Tte(gj.call(e,0,t.maxStringLength),t)+r}var i=pd.call(pd.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,T5e);return Ste(i,"single",t)}function T5e(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":"")+l5e.call(t.toString(16))}function wb(e){return"Object("+e+")"}function VN(e){return e+" { ? }"}function z9(e,t,n,r){var i=r?v3(n,r):Ml.call(n,", ");return e+" ("+t+") {"+i+"}"}function k5e(e){for(var t=0;t=0)return!1;return!0}function A5e(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ml.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ml.call(Array(t+1),n)}}function v3(e,t){if(e.length===0)return"";var n=` +`+t.prev+t.base;return n+Ml.call(e,","+n)+` +`+t.prev}function I_(e,t){var n=g3(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Vh(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===H5e.RFC1738&&(d===40||d===41)){l+=s.charAt(c);continue}if(d<128){l=l+Cl[d];continue}if(d<2048){l=l+(Cl[192|d>>6]+Cl[128|d&63]);continue}if(d<55296||d>=57344){l=l+(Cl[224|d>>12]+Cl[128|d>>6&63]+Cl[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|s.charCodeAt(c)&1023),l+=Cl[240|d>>18]+Cl[128|d>>12&63]+Cl[128|d>>6&63]+Cl[128|d&63]}return l},Y5e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?_=c(n,_):_ instanceof Date?_=h(_):r==="comma"&&lu(_)&&(_=zS.maybeMap(_,function(j){return j instanceof Date?h(j):j})),_===null){if(o)return l&&!v?l(n,Ki.encoder,y,"key",p):n;_=""}if(r4e(_)||zS.isBuffer(_)){if(l){var R=v?n:l(n,Ki.encoder,y,"key",p);return[g(R)+"="+g(l(_,Ki.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var k=[];if(typeof _>"u")return k;var O;if(r==="comma"&&lu(_))v&&l&&(_=zS.maybeMap(_,l)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(lu(c))O=c;else{var L=Object.keys(_);O=d?L.sort(d):L}for(var N=i&&lu(_)&&_.length===1?n+"[]":n,H=0;H"u"?Ki.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ki.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ki.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ki.encode,encoder:typeof t.encoder=="function"?t.encoder:Ki.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ki.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ki.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ki.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ki.strictNullHandling}},s4e=function(e,t){var n=e,r=o4e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):lu(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in j9?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=j9[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=Rte(),h=0;h0?v+g:""},zg=Ate,y3=Object.prototype.hasOwnProperty,a4e=Array.isArray,hi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:zg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l4e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Pte=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c4e="utf8=%26%2310003%3B",u4e="utf8=%E2%9C%93",d4e=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),l=-1,c,d=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=a4e(v)?[v]:v),y3.call(r,g)?r[g]=zg.combine(r[g],v):r[g]=v}return r},f4e=function(e,t,n,r){for(var i=r?t:Pte(t,n),o=e.length-1;o>=0;--o){var s,l=e[o];if(l==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},h4e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),d=c?o.slice(0,c.index):o,f=[];if(d){if(!r.plainObjects&&y3.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?hi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hi.comma,decoder:typeof t.decoder=="function"?t.decoder:hi.decoder,delimiter:typeof t.delimiter=="string"||zg.isRegExp(t.delimiter)?t.delimiter:hi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hi.strictNullHandling}},m4e=function(e,t){var n=p4e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?d4e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` +`," "],C4e=["{","}","|","\\","^","`"].concat(E4e),b3=["'"].concat(C4e),H9=["%","/","?",";","#"].concat(b3),W9=["/","?","#"],T4e=255,G9=/^[+a-z0-9A-Z_-]{0,63}$/,k4e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,A4e={javascript:!0,"javascript:":!0},x3={javascript:!0,"javascript:":!0},ig={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w3=b4e;function Nk(e,t,n){if(e&&typeof e=="object"&&e instanceof ll)return e;var r=new ll;return r.parse(e,t,n),r}ll.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[R];if(!A.match(G9)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(k4e);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>T4e?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=x4e.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!A4e[f])for(var g=0,x=b3.length;g0?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 R=b.slice(-1)[0],k=(n.host||e.host||b.length>1)&&(R==="."||R==="..")||R==="",O=0,L=b.length;L>=0;L--)R=b[L],R==="."?b.splice(L,1):R===".."?(b.splice(L,1),O++):O&&(b.splice(L,1),O--);if(!S&&!_)for(;O--;O)b.unshift("..");S&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),k&&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};ll.prototype.parseHost=function(){var e=this.host,t=_4e.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 P4e=Nk,O4e=I4e,M4e=R4e;const D4e={parse:P4e,format:M4e,resolve:O4e};function Ba(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function _b(e){return e.split("?")[0].split("#")[0]}function L4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N4e(e,t,n){return e.replace(new RegExp(L4e(t),"g"),n)}function B4e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let l=0;l<=e.length;++l){if(l2){const c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=l,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,l)}`:n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o!==-1?++o:o=-1}return n}const ro={toPosix(e){return N4e(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){Ba(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=_b(this.toPosix(t??tt.ADAPTER.getBaseUrl())),i=_b(this.toPosix(n??this.rootname(r)));return Ba(e),e=this.toPosix(e),e.startsWith("/")?ro.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),Ba(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=B4e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return Ba(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(Ba(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let l=e.length-1;l>=1;--l)if(t=e.charCodeAt(l),t===47){if(!i){r=l;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){Ba(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){Ba(e),t&&Ba(t),e=_b(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else l===-1&&(i=!1,l=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){Ba(e),e=_b(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const l=e.charCodeAt(s);if(l===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),l===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){Ba(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=_b(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,l=-1,c=!0,d=e.length-1,f=0;for(;d>=i;--d){if(n=e.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&r?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(s,l)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(s,o),t.base=e.slice(s,l)),t.ext=e.slice(o,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},V9={};function cn(e,t,n=3){if(V9[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))),G9[t]=!0}let KN;function C4e(){return typeof KN>"u"&&(KN=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!tt.ADAPTER.getWebGLRenderingContext())return!1;const r=tt.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}}()),KN}var T4e={grad:.9,turn:360,rad:360/(2*Math.PI)},nu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},gi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},sa=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Ite=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},V9=function(e){return{r:sa(e.r,0,255),g:sa(e.g,0,255),b:sa(e.b,0,255),a:sa(e.a)}},QN=function(e){return{r:gi(e.r),g:gi(e.g),b:gi(e.b),a:gi(e.a,3)}},k4e=/^#([0-9a-f]{3,8})$/i,M_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pte=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},Ote=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},q9=function(e){return{h:Ite(e.h),s:sa(e.s,0,100),l:sa(e.l,0,100),a:sa(e.a)}},X9=function(e){return{h:gi(e.h),s:gi(e.s),l:gi(e.l),a:gi(e.a,3)}},Y9=function(e){return Ote((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},kx=function(e){return{h:(t=Pte(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},A4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,I4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,P4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w3={string:[[function(e){var t=k4e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?gi(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?gi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=I4e.exec(e)||P4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:V9({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=A4e.exec(e)||R4e.exec(e);if(!t)return null;var n,r,i=q9({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 Y9(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 nu(t)&&nu(n)&&nu(r)?V9({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(!nu(t)||!nu(n)||!nu(r))return null;var s=q9({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return Y9(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!nu(t)||!nu(n)||!nu(r))return null;var s=function(l){return{h:Ite(l.h),s:sa(l.s,0,100),v:sa(l.v,0,100),a:sa(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Ote(s)},"hsv"]]},K9=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?M_(gi(255*o)):"","#"+M_(n)+M_(r)+M_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return QN(this.rgba)},e.prototype.toRgbString=function(){return t=QN(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 X9(kx(this.rgba))},e.prototype.toHslString=function(){return t=X9(kx(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=Pte(this.rgba),{h:gi(t.h),s:gi(t.s),v:gi(t.v),a:gi(t.a,3)};var t},e.prototype.invert=function(){return El({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),El(JN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),El(JN(this.rgba,-t))},e.prototype.grayscale=function(){return El(JN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),El(Q9(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),El(Q9(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"?El({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):gi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=kx(this.rgba);return typeof t=="number"?El({h:t,s:n.s,l:n.l,a:n.a}):gi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===El(t).toHex()},e}(),El=function(e){return e instanceof _3?e:new _3(e)},J9=[],M4e=function(e){e.forEach(function(t){J9.indexOf(t)<0&&(t(_3,w3),J9.push(t))})};function D4e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=og.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=og.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=El(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=og;zn.shared=new og;zn.temp=new og;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function L4e(e){return cn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function N4e(e){return cn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function B4e(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Mt.NORMAL_NPM]=Mt.NORMAL,e[Mt.ADD_NPM]=Mt.ADD,e[Mt.SCREEN_NPM]=Mt.SCREEN,t[Mt.NORMAL]=Mt.NORMAL_NPM,t[Mt.ADD]=Mt.ADD_NPM,t[Mt.SCREEN]=Mt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const Mte=B4e();function Dte(e,t){return Mte[t?1:0][e]}function $4e(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 Z9(e){return!(e&e-1)&&!!e}function e7(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 sg(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))(rt||{});const E3=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},i7=(e,t)=>E3(e).priority??t,bt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(E3).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(E3).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)=>i7(o,n)-i7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class C3{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 W4e=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function G4e(e){let t="";for(let n=0;n0&&(t+=` -else `),n=0;--r){const i=T3[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class ll{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(ll.prototype,{dispatch:{value:ll.prototype.emit},run:{value:ll.prototype.emit}});class T1{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new ll("setRealSize"),this.onUpdate=new ll("update"),this.onError=new ll("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 vw extends T1{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===yl.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 q4e={scaleMode:pu.NEAREST,format:Ge.RGBA,alphaMode:yl.NPM},hm=class extends mw{constructor(e=null,t=null){super(),t=Object.assign({},hm.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof T1)&&(e=Bte(e,g),e.internal=!0),this.resolution=p||tt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=kp(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Z9(this.realWidth)&&Z9(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 Wu[this.cacheId],delete Cl[this.cacheId],this.cacheId=null),this.dispose(),hm.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=tt.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}_${kp()}`}i=e._pixiId}let o=Wu[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new hm(e,t),o.cacheId=i,hm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new vw(e,{width:t,height:n}),o=e instanceof Float32Array?It.FLOAT:It.UNSIGNED_BYTE;return new hm(i,Object.assign({},q4e,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Wu[t]&&Wu[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Wu[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Wu[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Wu[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))(ji||{});class Ot{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Ot(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 L_=[new Ot,new Ot,new Ot,new Ot];class Kt{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=ji.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 Kt(0,0,0,0)}clone(){return new Kt(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)<=O)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 l=L_[0].set(t.left,t.top),c=L_[1].set(t.left,t.bottom),d=L_[2].set(t.right,t.top),f=L_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,A=b*i+x*o,R=b*r+x*s,k=b*i+x*s;return!(Math.max(E,A,R,k)<=b*l.x+x*l.y||Math.min(E,A,R,k)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class yj{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=ji.CIRC}clone(){return new yj(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 Kt(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 bj{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=ji.ELIP}clone(){return new bj(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 Kt(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 ag{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class xj{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=ji.RREC}clone(){return new xj(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Ot;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 Ot;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(xC-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new pr;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Fh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],zh=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],jh=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Uh=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],A3=[],zte=[],N_=Math.sign;function tze(){for(let e=0;e<16;e++){const t=[];A3.push(t);for(let n=0;n<16;n++){const r=N_(Fh[e]*Fh[n]+jh[e]*zh[n]),i=N_(zh[e]*Fh[n]+Uh[e]*zh[n]),o=N_(Fh[e]*jh[n]+jh[e]*Uh[n]),s=N_(zh[e]*jh[n]+Uh[e]*Uh[n]);for(let l=0;l<16;l++)if(Fh[l]===r&&zh[l]===i&&jh[l]===o&&Uh[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Fh[e],zh[e],jh[e],Uh[e],0,0),zte.push(t)}}tze();const _r={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Fh[e],uY:e=>zh[e],vX:e=>jh[e],vY:e=>Uh[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>A3[e][t],sub:(e,t)=>A3[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=zte[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class gd{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 gd(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 jte=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new gd(this.onChange,this,0,0),this.scale=new gd(this.onChange,this,1,1),this.pivot=new gd(this.onChange,this,0,0),this.skew=new gd(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 wj=jte;wj.IDENTITY=new jte;var nze=`varying vec2 vTextureCoord; +Deprecated since v${e}`),console.warn(r))),V9[t]=!0}let KN;function $4e(){return typeof KN>"u"&&(KN=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!tt.ADAPTER.getWebGLRenderingContext())return!1;const r=tt.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}}()),KN}var F4e={grad:.9,turn:360,rad:360/(2*Math.PI)},nu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},vi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},sa=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},Ote=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},q9=function(e){return{r:sa(e.r,0,255),g:sa(e.g,0,255),b:sa(e.b,0,255),a:sa(e.a)}},QN=function(e){return{r:vi(e.r),g:vi(e.g),b:vi(e.b),a:vi(e.a,3)}},z4e=/^#([0-9a-f]{3,8})$/i,M_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Mte=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:o?s/o*100:0,v:o/255*100,a:i}},Dte=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),d=o%6;return{r:255*[r,l,s,s,c,r][d],g:255*[c,r,r,l,s,s][d],b:255*[s,s,c,r,r,l][d],a:i}},X9=function(e){return{h:Ote(e.h),s:sa(e.s,0,100),l:sa(e.l,0,100),a:sa(e.a)}},Y9=function(e){return{h:vi(e.h),s:vi(e.s),l:vi(e.l),a:vi(e.a,3)}},K9=function(e){return Dte((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},kx=function(e){return{h:(t=Mte(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},j4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,U4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,H4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,W4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_3={string:[[function(e){var t=z4e.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?vi(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?vi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=H4e.exec(e)||W4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:q9({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=j4e.exec(e)||U4e.exec(e);if(!t)return null;var n,r,i=X9({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(F4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return K9(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 nu(t)&&nu(n)&&nu(r)?q9({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(!nu(t)||!nu(n)||!nu(r))return null;var s=X9({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return K9(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!nu(t)||!nu(n)||!nu(r))return null;var s=function(l){return{h:Ote(l.h),s:sa(l.s,0,100),v:sa(l.v,0,100),a:sa(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Dte(s)},"hsv"]]},Q9=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=QN(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?M_(vi(255*o)):"","#"+M_(n)+M_(r)+M_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return QN(this.rgba)},e.prototype.toRgbString=function(){return t=QN(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 Y9(kx(this.rgba))},e.prototype.toHslString=function(){return t=Y9(kx(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=Mte(this.rgba),{h:vi(t.h),s:vi(t.s),v:vi(t.v),a:vi(t.a,3)};var t},e.prototype.invert=function(){return Tl({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),Tl(JN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tl(JN(this.rgba,-t))},e.prototype.grayscale=function(){return Tl(JN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tl(J9(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tl(J9(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"?Tl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):vi(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=kx(this.rgba);return typeof t=="number"?Tl({h:t,s:n.s,l:n.l,a:n.a}):vi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tl(t).toHex()},e}(),Tl=function(e){return e instanceof S3?e:new S3(e)},Z9=[],V4e=function(e){e.forEach(function(t){Z9.indexOf(t)<0&&(t(S3,_3),Z9.push(t))})};function q4e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var f=this.toRgb(),h=1/0,p="black";if(!o.length)for(var g in n)o[g]=new e(n[g]).toRgb();for(var v in n){var y=(l=f,c=o[v],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));yi===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(s=>e[s]===t[s])}return e===t}toRgba(){const[e,t,n,r]=this._components;return{r:e,g:t,b:n,a:r}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,r]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(r*255),e}toRgbArray(e){e=e??[];const[t,n,r]=this._components;return e[0]=t,e[1]=n,e[2]=r,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,r,i]=og.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=og.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=Tl(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let zn=og;zn.shared=new og;zn.temp=new og;zn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function X4e(e){return cn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),zn.shared.setValue(e).toHex()}function Y4e(e){return cn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),zn.shared.setValue(e).toNumber()}function K4e(){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 Lte=K4e();function Nte(e,t){return Lte[t?1:0][e]}function Q4e(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 e7(e){return!(e&e-1)&&!!e}function t7(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 sg(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))(rt||{});const C3=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},o7=(e,t)=>C3(e).priority??t,bt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(C3).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(C3).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)=>o7(o,n)-o7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class T3{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 rze=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function ize(e){let t="";for(let n=0;n0&&(t+=` +else `),n=0;--r){const i=k3[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class cl{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,n,r,i,o,s,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:d,items:f}=this;this._aliasCount++;for(let h=0,p=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(cl.prototype,{dispatch:{value:cl.prototype.emit},run:{value:cl.prototype.emit}});class T1{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new cl("setRealSize"),this.onUpdate=new cl("update"),this.onError=new cl("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 vw extends T1{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===xl.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 sze={scaleMode:pu.NEAREST,format:Ge.RGBA,alphaMode:xl.NPM},pm=class extends mw{constructor(e=null,t=null){super(),t=Object.assign({},pm.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:l,wrapMode:c,format:d,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof T1)&&(e=Fte(e,g),e.internal=!0),this.resolution=p||tt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=d,this.type=f,this.target=h,this.alphaMode=n,this.uid=Ap(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=s>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=e7(this.realWidth)&&e7(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 Wu[this.cacheId],delete kl[this.cacheId],this.cacheId=null),this.dispose(),pm.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=tt.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}_${Ap()}`}i=e._pixiId}let o=Wu[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new pm(e,t),o.cacheId=i,pm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new vw(e,{width:t,height:n}),o=e instanceof Float32Array?It.FLOAT:It.UNSIGNED_BYTE;return new pm(i,Object.assign({},sze,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Wu[t]&&Wu[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Wu[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Wu[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Wu[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))(ji||{});class Ot{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Ot(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 L_=[new Ot,new Ot,new Ot,new Ot];class Kt{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=ji.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 Kt(0,0,0,0)}clone(){return new Kt(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)<=O)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 l=L_[0].set(t.left,t.top),c=L_[1].set(t.left,t.bottom),d=L_[2].set(t.right,t.top),f=L_[3].set(t.right,t.bottom);if(d.x<=l.x||c.y<=l.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(l,l),n.apply(c,c),n.apply(d,d),n.apply(f,f),Math.max(l.x,c.x,d.x,f.x)<=r||Math.min(l.x,c.x,d.x,f.x)>=i||Math.max(l.y,c.y,d.y,f.y)<=o||Math.min(l.y,c.y,d.y,f.y)>=s))return!1;const p=h*(c.y-l.y),g=h*(l.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,_=p*i+g*s;if(Math.max(v,y,S,_)<=p*l.x+g*l.y||Math.min(v,y,S,_)>=p*f.x+g*f.y)return!1;const b=h*(l.y-d.y),x=h*(d.x-l.x),E=b*r+x*o,A=b*i+x*o,R=b*r+x*s,k=b*i+x*s;return!(Math.max(E,A,R,k)<=b*l.x+x*l.y||Math.min(E,A,R,k)>=b*f.x+x*f.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,n=.001){const r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){const n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class xj{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=ji.CIRC}clone(){return new xj(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 Kt(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 wj{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=ji.ELIP}clone(){return new wj(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 Kt(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 ag{constructor(...t){let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const r=[];for(let i=0,o=n.length;in!=f>n&&t<(d-l)*((n-c)/(f-c))+l&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class _j{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=ji.RREC}clone(){return new _j(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class pr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Ot;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 Ot;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(bC-d)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*n+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t}invert(){const t=this.a,n=this.b,r=this.c,i=this.d,o=this.tx,s=t*i-n*r;return this.a=i/s,this.b=-n/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*o)/s,this.ty=-(t*this.ty-n*o)/s,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new pr;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new pr}static get TEMP_MATRIX(){return new pr}}const Fh=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],zh=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],jh=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Uh=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],R3=[],Ute=[],N_=Math.sign;function pze(){for(let e=0;e<16;e++){const t=[];R3.push(t);for(let n=0;n<16;n++){const r=N_(Fh[e]*Fh[n]+jh[e]*zh[n]),i=N_(zh[e]*Fh[n]+Uh[e]*zh[n]),o=N_(Fh[e]*jh[n]+jh[e]*Uh[n]),s=N_(zh[e]*jh[n]+Uh[e]*Uh[n]);for(let l=0;l<16;l++)if(Fh[l]===r&&zh[l]===i&&jh[l]===o&&Uh[l]===s){t.push(l);break}}}for(let e=0;e<16;e++){const t=new pr;t.set(Fh[e],zh[e],jh[e],Uh[e],0,0),Ute.push(t)}}pze();const _r={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Fh[e],uY:e=>zh[e],vX:e=>jh[e],vY:e=>Uh[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>R3[e][t],sub:(e,t)=>R3[e][_r.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?_r.S:_r.N:Math.abs(t)*2<=Math.abs(e)?e>0?_r.E:_r.W:t>0?e>0?_r.SE:_r.SW:e>0?_r.NE:_r.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=Ute[_r.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class gd{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 gd(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 Hte=class{constructor(){this.worldTransform=new pr,this.localTransform=new pr,this.position=new gd(this.onChange,this,0,0),this.scale=new gd(this.onChange,this,1,1),this.pivot=new gd(this.onChange,this,0,0),this.skew=new gd(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 Sj=Hte;Sj.IDENTITY=new Hte;var mze=`varying vec2 vTextureCoord; uniform sampler2D uSampler; void main(void){ gl_FragColor *= texture2D(uSampler, vTextureCoord); -}`,rze=`attribute vec2 aVertexPosition; +}`,gze=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -635,7 +637,7 @@ void main(void){ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; } -`;function s7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function sB(e){const t=new Array(e);for(let n=0;ne.type==="float"&&e.size===1&&!e.isArray,code:e=>` +`;function a7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function sB(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}"] @@ -755,7 +757,7 @@ void main(void){ cv[3] = v[3]; gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3]) - }`}],ize={float:` + }`}],vze={float:` if (cv !== v) { cu.value = v; @@ -891,7 +893,7 @@ void main(void){ cu.value = v; gl.uniform1i(location, v); - }`},oze={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 sze(e,t){var r;const n=[` + }`},yze={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 bze(e,t){var r;const n=[` var v = null; var cv = null; var cu = null; @@ -901,18 +903,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 l=!1;for(let c=0;c=zp.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),em=t}return em}let B_;function lze(){if(!B_){B_=oa.MEDIUM;const e=aze();e&&e.getShaderPrecisionFormat&&(B_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?oa.HIGH:oa.MEDIUM)}return B_}function a7(e,t){const n=e.getShaderSource(t).split(` +`))}const Gte={};let em=Gte;function xze(){if(em===Gte||em!=null&&em.isContextLost()){const e=tt.ADAPTER.createCanvas();let t;tt.PREFER_ENV>=zp.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),em=t}return em}let B_;function wze(){if(!B_){B_=oa.MEDIUM;const e=xze();e&&e.getShaderPrecisionFormat&&(B_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?oa.HIGH:oa.MEDIUM)}return B_}function l7(e,t){const n=e.getShaderSource(t).split(` `).map((d,f)=>`${f}: ${d}`),r=e.getShaderInfoLog(t),i=r.split(` `),o={},s=i.map(d=>parseFloat(d.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(d=>d&&!o[d]?(o[d]=!0,!0):!1),l=[""];s.forEach(d=>{n[d-1]=`%c${n[d-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=n.join(` -`);l[0]=c,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function cze(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||a7(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||a7(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const uze={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 Wte(e){return uze[e]}let $_=null;const l7={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 Gte(e,t){if(!$_){const n=Object.keys(l7);$_={};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=za._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Vt._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;vthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,n=za._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++Vt._globalBatch,l=0,c=n[0],d=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,f),d=f,c=n[++l],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,d,this._bufferSize),++l,++s);for(let f=0;f0);for(let v=0;v=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=zp.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")}}zk.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};zk.extension={type:rt.RendererSystem,name:"context"};bt.add(zk);class wze extends vw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===yl.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 I3{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 ll("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Vt(null,{scaleMode:pu.NEAREST,resolution:1,mipmap:Jl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Vt(new wze(null,{width:this.width,height:this.height}),{scaleMode:pu.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Jl.OFF,format:Ge.DEPTH_COMPONENT,type:It.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===yl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Yte{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const d7=new Yte;function z_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ht extends mw{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Kt(0,0,1,1)),t instanceof ht&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=d7,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 Ot(s.x,s.y):new Ot(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&Cl[n.url]&&ht.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,ht.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ht(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===d7&&(this._uvs=new Yte),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=tt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Vt){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${kp()}`,Vt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${kp()}`}o=t._pixiId}let s=Cl[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=Ud(t)),s=new ht(new Vt(t,n)),s.baseTexture.cacheId=o,Vt.addToCache(s.baseTexture,o),ht.addToCache(s,o)):!s&&t instanceof Vt&&(s=new ht(t),ht.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ht.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 ht(Vt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Vt(t,Object.assign({scaleMode:Vt.defaultOptions.scaleMode,resolution:Ud(n)},i)),{resource:s}=o;s instanceof Xte&&(s.url=n);const l=new ht(o);return r||(r=n),Vt.addToCache(l.baseTexture,r),ht.addToCache(l,r),r!==n&&(Vt.addToCache(l.baseTexture,n),ht.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),Cl[n]&&Cl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),Cl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=Cl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete Cl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ht._EMPTY||(ht._EMPTY=new ht(new Vt),z_(ht._EMPTY),z_(ht._EMPTY.baseTexture)),ht._EMPTY}static get WHITE(){if(!ht._WHITE){const t=tt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ht._WHITE=new ht(Vt.from(t)),z_(ht._WHITE),z_(ht._WHITE.baseTexture)}return ht._WHITE}}class jp extends ht{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 jp(new qte(t))}}class Kte{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new qte(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new jp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=yC(t),n=yC(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,Il.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,Il.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Il.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===Il.CLEAR||n===Il.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(Ll.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Ll.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=j_[0],i=j_[1],o=j_[2],s=j_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?aB.copyFrom(o):aB.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)}}}Jte.extension={type:rt.RendererSystem,name:"filter"};bt.add(Jte);class Eze{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Cze=new Kt;class Zte{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new I3(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 Kt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;tt.PREFER_ENV===zp.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=a3.COLOR|a3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Eze(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,n,r,i){const{elements:o,ids:s,count:l}=t;let c=0;for(let d=0;d=0&&h=zp.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")}}Fk.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};Fk.extension={type:rt.RendererSystem,name:"context"};bt.add(Fk);class Dze extends vw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===xl.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 P3{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 cl("disposeFramebuffer"),this.multisample=Gr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new Vt(null,{scaleMode:pu.NEAREST,resolution:1,mipmap:Zl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Vt(new Dze(null,{width:this.width,height:this.height}),{scaleMode:pu.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Zl.OFF,format:Ge.DEPTH_COMPONENT,type:It.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===xl.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const l=o[s];if(l!==r&&l.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Qte{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,l=t.height/2/o,c=t.x/i+s,d=t.y/o+l;r=_r.add(r,_r.NW),this.x0=c+s*_r.uX(r),this.y0=d+l*_r.uY(r),r=_r.add(r,2),this.x1=c+s*_r.uX(r),this.y1=d+l*_r.uY(r),r=_r.add(r,2),this.x2=c+s*_r.uX(r),this.y2=d+l*_r.uY(r),r=_r.add(r,2),this.x3=c+s*_r.uX(r),this.y3=d+l*_r.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const f7=new Qte;function z_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ht extends mw{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Kt(0,0,1,1)),t instanceof ht&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=f7,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 Ot(s.x,s.y):new Ot(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&kl[n.url]&&ht.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,ht.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new ht(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===f7&&(this._uvs=new Qte),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=tt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Vt){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${Ap()}`,Vt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${Ap()}`}o=t._pixiId}let s=kl[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=Ud(t)),s=new ht(new Vt(t,n)),s.baseTexture.cacheId=o,Vt.addToCache(s.baseTexture,o),ht.addToCache(s,o)):!s&&t instanceof Vt&&(s=new ht(t),ht.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=ht.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 ht(Vt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new Vt(t,Object.assign({scaleMode:Vt.defaultOptions.scaleMode,resolution:Ud(n)},i)),{resource:s}=o;s instanceof Kte&&(s.url=n);const l=new ht(o);return r||(r=n),Vt.addToCache(l.baseTexture,r),ht.addToCache(l,r),r!==n&&(Vt.addToCache(l.baseTexture,n),ht.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),kl[n]&&kl[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),kl[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=kl[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete kl[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,l=r+o>this.baseTexture.height;if(s||l){const c=s&&l?"and":"or",d=`X: ${n} + ${i} = ${n+i} > ${this.baseTexture.width}`,f=`Y: ${r} + ${o} = ${r+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${d} ${c} ${f}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ht._EMPTY||(ht._EMPTY=new ht(new Vt),z_(ht._EMPTY),z_(ht._EMPTY.baseTexture)),ht._EMPTY}static get WHITE(){if(!ht._WHITE){const t=tt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),ht._WHITE=new ht(Vt.from(t)),z_(ht._WHITE),z_(ht._WHITE.baseTexture)}return ht._WHITE}}class jp extends ht{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 jp(new Yte(t))}}class Jte{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Gr.NONE){const i=new Yte(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new jp(i)}getOptimalTexture(t,n,r=1,i=Gr.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=vC(t),n=vC(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(d.width,d.height,n.resolution),f.filterFrame=d.filterFrame),r[h].apply(this,d,f,Ol.CLEAR,n);const p=d;d=f,f=p}r[h].apply(this,d,c.renderTexture,Ol.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(d),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=Ol.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===Ol.CLEAR||n===Ol.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(Bl.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Bl.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),l=n.worldTransform.copyTo(pr.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=Gr.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||Gr.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=j_[0],i=j_[1],o=j_[2],s=j_[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const l=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),d=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=l,n.y=c,n.width=d-l,n.height=f-c}roundFrame(t,n,r,i,o){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(o){const{a:s,b:l,c,d}=o;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(d)>1e-4))return}o=o?aB.copyFrom(o):aB.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)}}}ene.extension={type:rt.RendererSystem,name:"filter"};bt.add(ene);class Bze{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Gr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const $ze=new Kt;class tne{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new P3(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 Kt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;tt.PREFER_ENV===zp.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,l=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,l)}else{const s=t.width>>r,l=t.height>>r;this.setViewport(0,0,s,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=l3.COLOR|l3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Bze(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let c=0;c1&&r.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=Gr.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,l,c)=>r.drawElementsInstancedANGLE(i,o,s,l,c),t.drawArraysInstanced=(i,o,s,l)=>r.drawArraysInstancedANGLE(i,o,s,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}nne.extension={type:rt.RendererSystem,name:"mask"};bt.add(nne);class rne{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 h7=new pr,p7=[],US=class extends rne{constructor(e){super(e),this.glConst=tt.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,p7.pop()??new Kt);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()||US.isMatrixRotated(t.worldTransform)||US.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){US.isMatrixRotated(i)||(i=i?h7.copyFrom(i):h7.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&&p7.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 ine=US;ine.extension={type:rt.RendererSystem,name:"scissor"};bt.add(ine);class one extends rne{constructor(t){super(t),this.glConst=tt.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)}}one.extension={type:rt.RendererSystem,name:"stencil"};bt.add(one);class sne{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return cn("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}}sne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"_plugin"};bt.add(sne);class ane{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}ane.extension={type:rt.RendererSystem,name:"projection"};bt.add(ane);const Ize=new wj;class lne{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=jp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=Ize,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}lne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"textureGenerator"};bt.add(lne);const Th=new Kt,Eb=new Kt;class cne{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Kt,this.destinationFrame=new Kt,this.viewportFrame=new Kt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(Th.width=t.frame.width,Th.height=t.frame.height,n=Th),r||(Eb.x=t.frame.x,Eb.y=t.frame.y,Eb.width=n.width,Eb.height=n.height,r=Eb),s=o.framebuffer):(l=i.resolution,n||(Th.width=i._view.screen.width,Th.height=i._view.screen.height,n=Th),r||(r=Th,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}cne.extension={type:rt.RendererSystem,name:"renderTexture"};bt.add(cne);class Pze{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 Oze(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}ine.extension={type:rt.RendererSystem,name:"mask"};bt.add(ine);class one{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 p7=new pr,m7=[],jS=class extends one{constructor(e){super(e),this.glConst=tt.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,m7.pop()??new Kt);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()||jS.isMatrixRotated(t.worldTransform)||jS.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){jS.isMatrixRotated(i)||(i=i?p7.copyFrom(i):p7.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&&m7.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 sne=jS;sne.extension={type:rt.RendererSystem,name:"scissor"};bt.add(sne);class ane extends one{constructor(t){super(t),this.glConst=tt.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)}}ane.extension={type:rt.RendererSystem,name:"stencil"};bt.add(ane);class lne{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return cn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return cn("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}}lne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"_plugin"};bt.add(lne);class cne{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new pr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}cne.extension={type:rt.RendererSystem,name:"projection"};bt.add(cne);const Hze=new Sj;class une{constructor(t){this.renderer=t,this._tempMatrix=new pr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=jp.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const l=t.transform;return t.transform=Hze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}une.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"textureGenerator"};bt.add(une);const Th=new Kt,Eb=new Kt;class dne{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Kt,this.destinationFrame=new Kt,this.viewportFrame=new Kt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,l;t?(o=t.baseTexture,l=o.resolution,n||(Th.width=t.frame.width,Th.height=t.frame.height,n=Th),r||(Eb.x=t.frame.x,Eb.y=t.frame.y,Eb.width=n.width,Eb.height=n.height,r=Eb),s=o.framebuffer):(l=i.resolution,n||(Th.width=i._view.screen.width,Th.height=i._view.screen.height,n=Th),r||(r=Th,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*l,c.y=r.y*l,c.width=r.width*l,c.height=r.height*l,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,l,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=zn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,l=o.width!==s.width||o.height!==s.height;if(l){let{x:c,y:d,width:f,height:h}=this.viewportFrame;c=Math.round(c),d=Math.round(d),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,d,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}dne.extension={type:rt.RendererSystem,name:"renderTexture"};bt.add(dne);class Wze{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 Gze(e,t){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;if>h?1:-1);for(let f=0;f({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function $ze(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 Fze(e,t){if(!e.autoManage)return{size:0,syncFunc:Lze};const n=$ze(e.uniforms,t),{uboElements:r,size:i}=Bze(n),o=[` + `},fne={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 Kze(e){const t=e.map(o=>({data:o,offset:0,dataLen:0,dirty:0}));let n=0,r=0,i=0;for(let o=0;o1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!==0&&r<16){const l=r%n%16;r+=l,i+=l}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Qze(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 Jze(e,t){if(!e.autoManage)return{size:0,syncFunc:Xze};const n=Qze(e.uniforms,t),{uboElements:r,size:i}=Kze(n),o=[` var v = null; var v2 = null; var cv = null; @@ -1071,7 +1073,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `];for(let s=0;s1){const h=Wte(l.data.type),p=Math.max(une[l.data.type]/16,1),g=h/p,v=(4-g%4)%4;o.push(` + `];for(let s=0;s1){const h=Vte(l.data.type),p=Math.max(fne[l.data.type]/16,1),g=h/p,v=(4-g%4)%4;o.push(` cv = ud.${d}.value; v = uv.${d}; offset = ${l.offset/4}; @@ -1087,7 +1089,7 @@ void main(void) offset += ${v}; } - `)}else{const h=Nze[l.data.type];o.push(` + `)}else{const h=Yze[l.data.type];o.push(` cv = ud.${d}.value; v = uv.${d}; offset = ${l.offset/4}; @@ -1095,7 +1097,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}let zze=0;const U_={textureCount:0,uboCount:0};class dne{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=zze++}systemCheck(){if(!dze())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||(U_.textureCount=0,U_.uboCount=0,this.syncUniformGroup(t.uniformGroup,U_)),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]=sze(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,U_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=Fze(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=Dze(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}}dne.extension={type:rt.RendererSystem,name:"shader"};bt.add(dne);class jk{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(){}}jk.defaultOptions={hello:!1};jk.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"startup"};bt.add(jk);function jze(e,t=[]){return t[Mt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD]=[e.ONE,e.ONE],t[Mt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.NONE]=[0,0],t[Mt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Mt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Mt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Mt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Mt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Mt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Mt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Mt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Mt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Mt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const Uze=0,Hze=1,Wze=2,Gze=3,Vze=4,qze=5,P3=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Mt.NONE,this._blendEq=!1,this.map=[],this.map[Uze]=this.setBlend,this.map[Hze]=this.setOffset,this.map[Wze]=this.setCullFace,this.map[Gze]=this.setDepthTest,this.map[Vze]=this.setFrontFace,this.map[qze]=this.setDepthMask,this.checks=[],this.defaultState=new $u,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=jze(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 ll(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 HS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=HS.defaultMaxIdle,this.checkCountMax=HS.defaultCheckCountMax,this.mode=HS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==lj.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 Ka=HS;Ka.defaultMode=lj.AUTO;Ka.defaultMaxIdle=60*60;Ka.defaultCheckCountMax=60*10;Ka.extension={type:rt.RendererSystem,name:"textureGC"};bt.add(Ka);class cB{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=It.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function Yze(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[It.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[It.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[It.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[It.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[It.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[It.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[It.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[It.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[It.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[It.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[It.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class hne{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=Yze(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!==l3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new cB(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===It.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!==l3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&sg(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===Jl.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Od.CLAMP:n.wrapMode=t.wrapMode,(r=t.resource)!=null&&r.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)}setStyle(t,n){const r=this.gl;if(n.mipmap&&t.mipmap!==Jl.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===pu.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===pu.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===pu.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===pu.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}hne.extension={type:rt.RendererSystem,name:"texture"};bt.add(hne);class pne{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))(Ap||{});class uB{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 ys=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 uB(null,null,1/0),this.deltaMS=1/ys.targetFPMS,this.elapsedMS=1/ys.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=Ap.NORMAL){return this._addListener(new uB(e,t,n))}addOnce(e,t,n=Ap.NORMAL){return this._addListener(new uB(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?Xr.shared:new Xr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}mne.extension=rt.Application;bt.add(mne);const gne=[];bt.handleByList(rt.Renderer,gne);function Kze(e){for(const t of gne)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Qze=`attribute vec2 aVertexPosition; +`))}}let Zze=0;const U_={textureCount:0,uboCount:0};class hne{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=Zze++}systemCheck(){if(!Eze())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||(U_.textureCount=0,U_.uboCount=0,this.syncUniformGroup(t.uniformGroup,U_)),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]=bze(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,U_,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[s];if(l||(l=this._uboCache[s]=Jze(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=l.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=qze(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}}hne.extension={type:rt.RendererSystem,name:"shader"};bt.add(hne);class zk{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(){}}zk.defaultOptions={hello:!1};zk.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"startup"};bt.add(zk);function eje(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 tje=0,nje=1,rje=2,ije=3,oje=4,sje=5,O3=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Dt.NONE,this._blendEq=!1,this.map=[],this.map[tje]=this.setBlend,this.map[nje]=this.setOffset,this.map[rje]=this.setCullFace,this.map[ije]=this.setDepthTest,this.map[oje]=this.setFrontFace,this.map[sje]=this.setDepthMask,this.checks=[],this.defaultState=new $u,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=eje(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 cl(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 US=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=US.defaultMaxIdle,this.checkCountMax=US.defaultCheckCountMax,this.mode=US.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==uj.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 Ka=US;Ka.defaultMode=uj.AUTO;Ka.defaultMaxIdle=60*60;Ka.defaultCheckCountMax=60*10;Ka.extension={type:rt.RendererSystem,name:"textureGC"};bt.add(Ka);class cB{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=It.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function lje(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA8,[Ge.RGB]:e.RGB8,[Ge.RG]:e.RG8,[Ge.RED]:e.R8,[Ge.RGBA_INTEGER]:e.RGBA8UI,[Ge.RGB_INTEGER]:e.RGB8UI,[Ge.RG_INTEGER]:e.RG8UI,[Ge.RED_INTEGER]:e.R8UI,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.BYTE]:{[Ge.RGBA]:e.RGBA8_SNORM,[Ge.RGB]:e.RGB8_SNORM,[Ge.RG]:e.RG8_SNORM,[Ge.RED]:e.R8_SNORM,[Ge.RGBA_INTEGER]:e.RGBA8I,[Ge.RGB_INTEGER]:e.RGB8I,[Ge.RG_INTEGER]:e.RG8I,[Ge.RED_INTEGER]:e.R8I},[It.UNSIGNED_SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16UI,[Ge.RGB_INTEGER]:e.RGB16UI,[Ge.RG_INTEGER]:e.RG16UI,[Ge.RED_INTEGER]:e.R16UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[It.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[It.UNSIGNED_INT]:{[Ge.RGBA_INTEGER]:e.RGBA32UI,[Ge.RGB_INTEGER]:e.RGB32UI,[Ge.RG_INTEGER]:e.RG32UI,[Ge.RED_INTEGER]:e.R32UI,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[It.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[It.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[It.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[It.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[It.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[It.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[It.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[It.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[It.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[It.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[It.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[It.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class mne{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=lje(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!==c3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new cB(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===It.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!==c3.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,l=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,l.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&sg(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===Zl.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Od.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!==Zl.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===pu.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===pu.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===pu.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===pu.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}mne.extension={type:rt.RendererSystem,name:"texture"};bt.add(mne);class gne{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))(Rp||{});class uB{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 ys=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 uB(null,null,1/0),this.deltaMS=1/ys.targetFPMS,this.elapsedMS=1/ys.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=Rp.NORMAL){return this._addListener(new uB(e,t,n))}addOnce(e,t,n=Rp.NORMAL){return this._addListener(new uB(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?Xr.shared:new Xr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}vne.extension=rt.Application;bt.add(vne);const yne=[];bt.handleByList(rt.Renderer,yne);function cje(e){for(const t of yne)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var uje=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -1106,7 +1108,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Jze=`attribute vec2 aVertexPosition; +}`,dje=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1132,7 +1134,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const Zze=Qze,vne=Jze;class yne{constructor(t){this.renderer=t}contextChange(t){let n;if(this.renderer.context.webGLVersion===1){const r=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,r)}else{const r=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r)}n>=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}yne.extension={type:rt.RendererSystem,name:"_multisample"};bt.add(yne);class eje{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class bne{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 tje extends wne{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=ng.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ng.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 tt.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===yl.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 jm._EMPTY=jm._EMPTY??tt.ADAPTER.createCanvas(0,0),jm._EMPTY}}const WS=class extends Wd{constructor(e,t){t=t||{},super(tt.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)},WS.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;Wd.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_${kp()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=WS.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"&&WS.SVG_XML.test(e)}};let k1=WS;k1.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const M3=class extends Wd{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];Wd.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&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Xr.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&&(Xr.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?(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Xr.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||M3.TYPES.includes(t)}};let _j=M3;_j.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];_j.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};T3.push(jm,Xte,nje,_j,k1,vw,_ne,tje);class wC{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?Kt.EMPTY:(t=t||new Kt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Pr extends mw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new wj,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 wC,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);sg(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(oje),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!==D3.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=ije.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?sje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(aje(e,typeof t!="symbol"?t+"":t,n),n);let ba=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var lje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sne={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Ot(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const dje={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let fje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},dje,n),this.ease=Hk(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 Ot(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Ot(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 Ot(0,0),bottomRight:new Ot(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const mje={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let gje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},mje,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 vje={friction:.98,bounce:.8,minSpeed:.01},Gu=16;let yje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},vje,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*Gu/s*(Math.pow(o,i/Gu)-Math.pow(o,r/Gu)),this.x*=Math.pow(this.percentChangeX,t/Gu)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Gu/s*(Math.pow(o,i/Gu)-Math.pow(o,r/Gu)),this.y*=Math.pow(this.percentChangeY,t/Gu)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Ot(this.last.x,this.last.y),world:this.parent.toWorld(new Ot(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 Ot(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 wje={speed:0,acceleration:null,radius:null};let _je=class extends ba{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},wje,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const Sje={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Eje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},Sje,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 Cje={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let Tje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},Cje,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Ot(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const kje={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let Aje=class extends ba{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},kje,i),this.ease=Hk(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const Rje={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let Ije=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},Rje,n),this.ease=Hk(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const Pje={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let Oje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},Pje,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},Mje=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Kt(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 Ot;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 Cb)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 Lje={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Xr.shared,allowPreserveDragOutside:!1};class Nje extends Ko{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...Lje,...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 Mje(this),this.plugins=new Dje(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 Kt(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 Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Ot(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Ot(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 Ot(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 Ot(-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 Ot(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 Kt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new xje(this,t)),this}clamp(t){return this.plugins.add("clamp",new pje(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new yje(this,t)),this}bounce(t){return this.plugins.add("bounce",new fje(this,t)),this}pinch(t){return this.plugins.add("pinch",new Tje(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new Aje(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new _je(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new Oje(this,t)),this}animate(t){return this.plugins.add("animate",new uje(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new gje(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Eje(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 Tb=new Ot,Bje=new Uint16Array([0,1,2,0,2,3]);class Up extends Ko{constructor(t){super(),this._anchor=new gd(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Mt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ht.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Bje,this.pluginName="batch",this.isSprite=!0,this._roundPixels=tt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=md(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=md(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=tt.RESOLUTION;for(let b=0;b=i&&Tb.x=o&&Tb.y=Gr.HIGH?this.multisample=Gr.HIGH:n>=Gr.MEDIUM?this.multisample=Gr.MEDIUM:n>=Gr.LOW?this.multisample=Gr.LOW:this.multisample=Gr.NONE}destroy(){}}xne.extension={type:rt.RendererSystem,name:"_multisample"};bt.add(xne);class hje{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class wne{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 pje extends Sne{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=ng.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:l}=t;r.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let c=0;c0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ng.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 tt.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===xl.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 jm._EMPTY=jm._EMPTY??tt.ADAPTER.createCanvas(0,0),jm._EMPTY}}const HS=class extends Wd{constructor(e,t){t=t||{},super(tt.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)},HS.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;Wd.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_${Ap()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=HS.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"&&HS.SVG_XML.test(e)}};let k1=HS;k1.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const D3=class extends Wd{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];Wd.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&&(Xr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Xr.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&&(Xr.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?(Xr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Xr.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||D3.TYPES.includes(t)}};let Ej=D3;Ej.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Ej.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};k3.push(jm,Kte,mje,Ej,k1,vw,Ene,pje);class xC{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?Kt.EMPTY:(t=t||new Kt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Pr extends mw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Sj,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 xC,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);sg(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(yje),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!==L3.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=vje.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?bje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(xje(e,typeof t!="symbol"?t+"":t,n),n);let ba=class{constructor(t){Se(this,"parent"),Se(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var wje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cne={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Ot(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const Eje={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let Cje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"underflowX"),Se(this,"underflowY"),Se(this,"ease"),Se(this,"toX"),Se(this,"toY"),this.options=Object.assign({},Eje,n),this.ease=Uk(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 Ot(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Ot(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 Ot(0,0),bottomRight:new Ot(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const Aje={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let Rje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},Aje,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 Ije={friction:.98,bounce:.8,minSpeed:.01},Gu=16;let Pje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"x"),Se(this,"y"),Se(this,"percentChangeX"),Se(this,"percentChangeY"),Se(this,"saved"),Se(this,"timeSinceRelease"),this.options=Object.assign({},Ije,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*Gu/s*(Math.pow(o,i/Gu)-Math.pow(o,r/Gu)),this.x*=Math.pow(this.percentChangeX,t/Gu)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Gu/s*(Math.pow(o,i/Gu)-Math.pow(o,r/Gu)),this.y*=Math.pow(this.percentChangeY,t/Gu)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Ot(this.last.x,this.last.y),world:this.parent.toWorld(new Ot(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 Ot(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 Dje={speed:0,acceleration:null,radius:null};let Lje=class extends ba{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},Dje,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const l=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(l)*this.options.radius,i=this.target.y-Math.sin(l)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const l=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const d=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>d?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const f=Math.cos(l)*this.velocity.x,h=Math.sin(l)*this.velocity.y,p=Math.abs(f)>Math.abs(o)?r:n.x+f,g=Math.abs(h)>Math.abs(s)?i:n.y+h;this.parent.moveCenter(p,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const l=Math.atan2(i-n.y,r-n.x),c=Math.cos(l)*this.options.speed,d=Math.sin(l)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(d)>Math.abs(s)?i:n.y+d;this.parent.moveCenter(f,h),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,i),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}};const Nje={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Bje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"reverse"),Se(this,"radiusSquared"),Se(this,"left"),Se(this,"top"),Se(this,"right"),Se(this,"bottom"),Se(this,"horizontal"),Se(this,"vertical"),this.options=Object.assign({},Nje,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 $je={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let Fje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"active",!1),Se(this,"pinching",!1),Se(this,"moved",!1),Se(this,"lastCenter"),this.options=Object.assign({},$je,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Ot(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const zje={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let jje=class extends ba{constructor(t,n,r,i={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"x"),Se(this,"y"),Se(this,"percent"),Se(this,"snapping"),Se(this,"deltaX"),Se(this,"deltaY"),Se(this,"startX"),Se(this,"startY"),this.options=Object.assign({},zje,i),this.ease=Uk(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,l=this.startY,c=this.deltaX,d=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=l+d;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=l+d*f}this.options.topLeft?this.parent.moveCorner(i,o):this.parent.moveCenter(i,o),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const n=this.options.topLeft?this.parent.corner:this.parent.center;(n.x!==this.x||n.y!==this.y)&&this.snapStart()}}};const Uje={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let Hje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"ease"),Se(this,"xScale"),Se(this,"yScale"),Se(this,"xIndependent"),Se(this,"yIndependent"),Se(this,"snapping"),this.options=Object.assign({},Uje,n),this.ease=Uk(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),l=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/l}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const Wje={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let Gje=class extends ba{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},Wje,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const l=this.parent.toGlobal(o);this.parent.x+=n.x-l.x,this.parent.y+=n.y-l.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},Vje=class{constructor(t){Se(this,"viewport"),Se(this,"clickedAvailable"),Se(this,"isMouseDown"),Se(this,"last"),Se(this,"wheelFunction"),Se(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Kt(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 Ot;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 Cb)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 Xje={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Xr.shared,allowPreserveDragOutside:!1};class Yje extends Ko{constructor(t){super(),Se(this,"moving"),Se(this,"screenWidth"),Se(this,"screenHeight"),Se(this,"threshold"),Se(this,"input"),Se(this,"plugins"),Se(this,"zooming"),Se(this,"lastViewport"),Se(this,"options"),Se(this,"_dirty"),Se(this,"_forceHitArea"),Se(this,"_hitAreaDefault"),Se(this,"_pause"),Se(this,"tickerFunction"),Se(this,"_worldWidth"),Se(this,"_worldHeight"),Se(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...Xje,...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 Vje(this),this.plugins=new qje(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 Kt(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 Kt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Ot(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Ot(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 Ot(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 Ot(-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 Ot(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 Kt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new Mje(this,t)),this}clamp(t){return this.plugins.add("clamp",new kje(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new Pje(this,t)),this}bounce(t){return this.plugins.add("bounce",new Cje(this,t)),this}pinch(t){return this.plugins.add("pinch",new Fje(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new jje(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new Lje(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new Gje(this,t)),this}animate(t){return this.plugins.add("animate",new Sje(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new Rje(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Bje(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 Tb=new Ot,Kje=new Uint16Array([0,1,2,0,2,3]);class Up extends Ko{constructor(t){super(),this._anchor=new gd(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new zn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Dt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||ht.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Kje,this.pluginName="batch",this.isSprite=!0,this._roundPixels=tt.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=md(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=md(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const n=this.transform.worldTransform,r=n.a,i=n.b,o=n.c,s=n.d,l=n.tx,c=n.ty,d=this.vertexData,f=t.trim,h=t.orig,p=this._anchor;let g=0,v=0,y=0,S=0;if(f?(v=f.x-p._x*h.width,g=v+f.width,S=f.y-p._y*h.height,y=S+f.height):(v=-p._x*h.width,g=v+h.width,S=-p._y*h.height,y=S+h.height),d[0]=r*v+o*S+l,d[1]=s*S+i*v+c,d[2]=r*g+o*S+l,d[3]=s*S+i*g+c,d[4]=r*g+o*y+l,d[5]=s*y+i*g+c,d[6]=r*v+o*y+l,d[7]=s*y+i*v+c,this._roundPixels){const _=tt.RESOLUTION;for(let b=0;b=i&&Tb.x=o&&Tb.y=n&&(s=e-l-1),c=c.replace("%value%",t[s].toString()),i+=c,i+=` -`}return r=r.replace("%blur%",i),r=r.replace("%size%",e.toString()),r}const Wje=` +`;class Zje extends Wi{constructor(t=1){super(fje,Jje,{uAlpha:1}),this.alpha=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}const e6e={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},t6e=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(` +`);function n6e(e){const t=e6e[e],n=t.length;let r=t6e,i="";const o="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let s;for(let l=0;l=n&&(s=e-l-1),c=c.replace("%value%",t[s].toString()),i+=c,i+=` +`}return r=r.replace("%blur%",i),r=r.replace("%size%",e.toString()),r}const r6e=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1173,8 +1175,8 @@ void main(void) vec2 textureCoord = filterTextureCoord(); %blur% - }`;function Gje(e,t){const n=Math.ceil(e/2);let r=Wje,i="",o;t?o="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":o="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let s=0;s{Object.defineProperty(g7,e,{get(){return cn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class n6e{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||(Xr.system.add(this.tickerUpdate,this,Ap.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Xr.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(sd.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,dB),!t.hitArea.contains(dB.x,dB.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 ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof ja)){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 ja)){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 ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof ja)){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 jg)){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,B3._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=s6e),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=a6e[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 A1=B3;A1.extension={name:"events",type:[rt.RendererSystem,rt.CanvasRendererSystem]};A1.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};bt.add(A1);function v7(e){return e==="dynamic"||e==="static"}const l6e={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??v7(A1.defaultEventMode)},set interactive(e){cn("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??A1.defaultEventMode},set eventMode(e){this._internalInteractive=v7(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 yw))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}};Pr.mixin(l6e);const c6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Pr.mixin(c6e);const u6e=9,H_=100,d6e=0,f6e=0,y7=2,b7=1,h6e=-1e3,p6e=-1e3,m6e=2;class Cne{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,(mu.tablet||mu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${H_}px`,n.style.height=`${H_}px`,n.style.position="absolute",n.style.top=`${d6e}px`,n.style.left=`${f6e}px`,n.style.zIndex=y7.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=`${b7}px`,t.style.height=`${b7}px`,t.style.position="absolute",t.style.top=`${h6e}px`,t.style.left=`${p6e}px`,t.style.zIndex=m6e.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=`${H_}px`,n.style.height=`${H_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=y7.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 yw(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===u6e&&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}}Cne.extension={name:"accessibility",type:[rt.RendererPlugin,rt.CanvasRendererPlugin]};bt.add(Cne);const $3=class{constructor(e){this.stage=new Ko,e=Object.assign({forceCanvas:!1},e),this.renderer=Kze(e),$3._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=$3._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 Sj=$3;Sj._plugins=[];bt.handleByList(rt.Application,Sj._plugins);class Tne{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}}Tne.extension=rt.Application;bt.add(Tne);const x7={loader:rt.LoadParser,resolver:rt.ResolveParser,cache:rt.CacheParser,detection:rt.DetectionParser};bt.handle(rt.Asset,e=>{const t=e.ref;Object.entries(x7).filter(([n])=>!!t[n]).forEach(([n,r])=>bt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(x7).filter(n=>!!t[n]).forEach(n=>bt.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),F3=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function kne(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)}),kne(e,i,0,n,r)}else r.push(e);return r}const SC=e=>!Array.isArray(e);class y6e{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=yu(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ht){const l=n;r.forEach(c=>{l.baseTexture!==ht.EMPTY.baseTexture&&Vt.addToCache(l.baseTexture,c),ht.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const kb=new y6e;class b6e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=ro.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. -${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu(t,i=>({src:i})).map(async i=>{var l,c;const o=ro.toAbsolute(i.src),s=this.promiseCache[o];if(s){const d=await s.promise;(c=(l=s.parser)==null?void 0:l.unload)==null||c.call(l,d,i,this),delete this.promiseCache[o]}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,n)=>(t[n.name]&&console.warn(`[Assets] loadParser name conflict "${n.name}"`),{...t,[n.name]:n}),{})}}var sc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(sc||{});const x6e=".json",w6e="application/json",_6e={extension:{type:rt.LoadParser,priority:sc.Low},name:"loadJson",test(e){return bw(e,w6e)||Hp(e,x6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).json()}};bt.add(_6e);const S6e=".txt",E6e="text/plain",C6e={name:"loadTxt",extension:{type:rt.LoadParser,priority:sc.Low},test(e){return bw(e,E6e)||Hp(e,S6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).text()}};bt.add(C6e);const T6e=["normal","bold","100","200","300","400","500","600","700","800","900"],k6e=[".ttf",".otf",".woff",".woff2"],A6e=["font/ttf","font/otf","font/woff","font/woff2"],R6e=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function I6e(e){const t=ro.extname(e),i=ro.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1));let o=i.length>0;for(const l of i)if(!l.match(R6e)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const P6e={extension:{type:rt.LoadParser,priority:sc.Low},name:"loadWebFont",test(e){return bw(e,A6e)||Hp(e,k6e)},async load(e,t){var r,i,o;const n=tt.ADAPTER.getFontFaceSet();if(n){const s=[],l=((r=t.data)==null?void 0:r.family)??I6e(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>T6e.includes(f)))??["normal"],d=t.data??{};for(let f=0;ftt.ADAPTER.getFontFaceSet().delete(t))}};bt.add(P6e);let w7=0,fB;const O6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",M6e={id:"checkImageBitmap",code:` +`;class p6e extends Wi{constructor(t=.5,n=Math.random()){super(bne,h6e,{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 v7={AlphaFilter:Zje,BlurFilter:o6e,BlurFilterPass:N3,ColorMatrixFilter:B3,DisplacementFilter:c6e,FXAAFilter:f6e,NoiseFilter:p6e};Object.entries(v7).forEach(([e,t])=>{Object.defineProperty(v7,e,{get(){return cn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class m6e{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||(Xr.system.add(this.tickerUpdate,this,Rp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Xr.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=f[h],g=this.hitTestMoveRecursive(p,this._isInteractive(n)?n:p.eventMode,r,i,o,s||o(t,r));if(g){if(g.length>0&&!g[g.length-1].parent)continue;const v=t.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(t),g.push(t)),this._hitElements.length===0&&(this._hitElements=g),l=!0}}}const c=this._isInteractive(n),d=t.isInteractive();return d&&d&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:l?this._hitElements:c&&!o(t,r)&&i(t,r)?d?[t]:[]:null}hitTestRecursive(t,n,r,i,o){if(this._interactivePrune(t)||o(t,r))return null;if((t.eventMode==="dynamic"||n==="dynamic")&&(sd.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let d=c.length-1;d>=0;d--){const f=c[d],h=this.hitTestRecursive(f,this._isInteractive(n)?n:f.eventMode,r,i,o);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const p=t.isInteractive();return(h.length>0||p)&&h.push(t),h}}}const s=this._isInteractive(n),l=t.isInteractive();return s&&i(t,r)?l?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,dB),!t.hitArea.contains(dB.x,dB.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 ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=this.createPointerEvent(t);if(this.dispatchEvent(n,"pointerdown"),n.pointerType==="touch")this.dispatchEvent(n,"touchstart");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const i=n.button===2;this.dispatchEvent(n,i?"rightdown":"mousedown")}const r=this.trackingData(t.pointerId);r.pressTargetsByButton[t.button]=n.composedPath(),this.freeEvent(n)}mapPointerMove(t){var c,d;if(!(t instanceof ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const n=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const r=n.pointerType==="mouse"||n.pointerType==="pen",i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.overTargets);if(((c=i.overTargets)==null?void 0:c.length)>0&&o!==n.target){const f=t.type==="mousemove"?"mouseout":"pointerout",h=this.createPointerEvent(t,f,o);if(this.dispatchEvent(h,"pointerout"),r&&this.dispatchEvent(h,"mouseout"),!n.composedPath().includes(o)){const p=this.createPointerEvent(t,"pointerleave",o);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),r&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(h)}if(o!==n.target){const f=t.type==="mousemove"?"mouseover":"pointerover",h=this.clonePointerEvent(n,f);this.dispatchEvent(h,"pointerover"),r&&this.dispatchEvent(h,"mouseover");let p=o==null?void 0:o.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(n,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==o&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),r&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(h)}const s=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),l&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),l&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),l&&s.push("globalmousemove"),this.cursor=(d=n.target)==null?void 0:d.cursor),s.length>0&&this.all(n,s),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var s;if(!(t instanceof ja)){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 ja)){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 ja)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const l=r.button===2;this.dispatchEvent(r,l?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let l=o;for(;l&&!r.composedPath().includes(l);){if(r.currentTarget=l,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[t.button],s=l}if(s){const l=this.clonePointerEvent(r,"click");l.target=s,l.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:l.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===l.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=l.target,c.timeStamp=n,l.detail=c.clickCount,l.pointerType==="mouse"){const d=l.button===2;this.dispatchEvent(l,d?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof ja)){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 jg)){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,$3._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=b6e),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=x6e[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 A1=$3;A1.extension={name:"events",type:[rt.RendererSystem,rt.CanvasRendererSystem]};A1.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};bt.add(A1);function y7(e){return e==="dynamic"||e==="static"}const w6e={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??y7(A1.defaultEventMode)},set interactive(e){cn("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??A1.defaultEventMode},set eventMode(e){this._internalInteractive=y7(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 yw))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}};Pr.mixin(w6e);const _6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Pr.mixin(_6e);const S6e=9,H_=100,E6e=0,C6e=0,b7=2,x7=1,T6e=-1e3,k6e=-1e3,A6e=2;class kne{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,(mu.tablet||mu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${H_}px`,n.style.height=`${H_}px`,n.style.position="absolute",n.style.top=`${E6e}px`,n.style.left=`${C6e}px`,n.style.zIndex=b7.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=`${x7}px`,t.style.height=`${x7}px`,t.style.position="absolute",t.style.top=`${T6e}px`,t.style.left=`${k6e}px`,t.style.zIndex=A6e.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=`${H_}px`,n.style.height=`${H_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=b7.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 yw(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===S6e&&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}}kne.extension={name:"accessibility",type:[rt.RendererPlugin,rt.CanvasRendererPlugin]};bt.add(kne);const F3=class{constructor(e){this.stage=new Ko,e=Object.assign({forceCanvas:!1},e),this.renderer=cje(e),F3._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=F3._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 Cj=F3;Cj._plugins=[];bt.handleByList(rt.Application,Cj._plugins);class Ane{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}}Ane.extension=rt.Application;bt.add(Ane);const w7={loader:rt.LoadParser,resolver:rt.ResolveParser,cache:rt.CacheParser,detection:rt.DetectionParser};bt.handle(rt.Asset,e=>{const t=e.ref;Object.entries(w7).filter(([n])=>!!t[n]).forEach(([n,r])=>bt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(w7).filter(n=>!!t[n]).forEach(n=>bt.remove(t[n]))});class R6e{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),z3=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Rne(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)}),Rne(e,i,0,n,r)}else r.push(e);return r}const _C=e=>!Array.isArray(e);class P6e{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=yu(t);let i;for(let l=0;l{i[l]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(l=>{this._cacheMap.set(l,s)}),o.forEach(l=>{this._cache.has(l)&&this._cache.get(l)!==n&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),n instanceof ht){const l=n;r.forEach(c=>{l.baseTexture!==ht.EMPTY.baseTexture&&Vt.addToCache(l.baseTexture,c),ht.addToCache(l,c)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(i=>{this._cache.delete(i)}),n.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const kb=new P6e;class O6e{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,l;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:d})),l=s.length,c=s.map(async d=>{const f=ro.toAbsolute(d.src);if(!i[d.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,d)),i[d.src]=await this.promiseCache[f].promise,n&&n(++r/l)}catch(h){throw delete this.promiseCache[f],delete i[d.src],new Error(`[Loader.load] Failed to load ${f}. +${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu(t,i=>({src:i})).map(async i=>{var l,c;const o=ro.toAbsolute(i.src),s=this.promiseCache[o];if(s){const d=await s.promise;(c=(l=s.parser)==null?void 0:l.unload)==null||c.call(l,d,i,this),delete this.promiseCache[o]}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,n)=>(t[n.name]&&console.warn(`[Assets] loadParser name conflict "${n.name}"`),{...t,[n.name]:n}),{})}}var sc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(sc||{});const M6e=".json",D6e="application/json",L6e={extension:{type:rt.LoadParser,priority:sc.Low},name:"loadJson",test(e){return bw(e,D6e)||Hp(e,M6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).json()}};bt.add(L6e);const N6e=".txt",B6e="text/plain",$6e={name:"loadTxt",extension:{type:rt.LoadParser,priority:sc.Low},test(e){return bw(e,B6e)||Hp(e,N6e)},async load(e){return await(await tt.ADAPTER.fetch(e)).text()}};bt.add($6e);const F6e=["normal","bold","100","200","300","400","500","600","700","800","900"],z6e=[".ttf",".otf",".woff",".woff2"],j6e=["font/ttf","font/otf","font/woff","font/woff2"],U6e=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function H6e(e){const t=ro.extname(e),i=ro.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1));let o=i.length>0;for(const l of i)if(!l.match(U6e)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const W6e={extension:{type:rt.LoadParser,priority:sc.Low},name:"loadWebFont",test(e){return bw(e,j6e)||Hp(e,z6e)},async load(e,t){var r,i,o;const n=tt.ADAPTER.getFontFaceSet();if(n){const s=[],l=((r=t.data)==null?void 0:r.family)??H6e(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>F6e.includes(f)))??["normal"],d=t.data??{};for(let f=0;ftt.ADAPTER.getFontFaceSet().delete(t))}};bt.add(W6e);let _7=0,fB;const G6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",V6e={id:"checkImageBitmap",code:` async function checkImageBitmap() { try { if (typeof createImageBitmap !== 'function') return false; - const response = await fetch('${O6e}'); + const response = await fetch('${G6e}'); const imageBlob = await response.blob(); const imageBitmap = await createImageBitmap(imageBlob); @@ -1492,7 +1494,7 @@ ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu } } checkImageBitmap().then((result) => { self.postMessage(result); }); - `},D6e={id:"loadImageBitmap",code:` + `},q6e={id:"loadImageBitmap",code:` async function loadImageBitmap(url) { const response = await fetch(url); @@ -1528,7 +1530,7 @@ ${h}`)}});return await Promise.all(c),o?i[s[0].src]:i}async unload(t){const r=yu id: event.data.id, }); } - };`};let hB;class L6e{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([M6e.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(){fB===void 0&&(fB=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[w7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:w7++,id:r})}}const _7=new L6e;function Wk(e,t,n){const r=new ht(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const N6e=[".jpeg",".jpg",".png",".webp",".avif"],B6e=["image/jpeg","image/png","image/webp","image/avif"];async function $6e(e){const t=await tt.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 Gk={name:"loadTextures",extension:{type:rt.LoadParser,priority:sc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return bw(e,B6e)||Hp(e,N6e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await _7.isImageBitmapSupported()?r=await _7.loadImageBitmap(e):r=await $6e(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:Ud(e),...t.data});return i.resource.src=e,Wk(i,n,e)},unload(e){e.destroy(!0)}};bt.add(Gk);const F6e=".svg",z6e="image/svg+xml",j6e={extension:{type:rt.LoadParser,priority:sc.High},name:"loadSVG",test(e){return bw(e,z6e)||Hp(e,F6e)},async testParse(e){return k1.test(e)},async parse(e,t,n){var s;const r=new k1(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Vt(r,{resolution:Ud(e),...t==null?void 0:t.data});return i.resource.src=e,Wk(i,n,e)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload:Gk.unload};bt.add(j6e);class U6e{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=yu(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 l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=SC(t);t=yu(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=SC(t);t=yu(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=ro.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 H6e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new U6e,this.loader=new b6e,this.cache=kb,this._backgroundLoader=new g6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=SC(t),i=yu(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return kb.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,kb.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=yu(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=yu(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=>{kb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return Gk.config.preferWorkers}set preferWorkers(t){cn("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 W_=new H6e;bt.handleByList(rt.LoadParser,W_.loader.parsers).handleByList(rt.ResolveParser,W_.resolver.parsers).handleByList(rt.CacheParser,W_.cache.parsers).handleByList(rt.DetectionParser,W_.detections);const W6e={extension:rt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ht),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};bt.add(W6e);const G6e={extension:{type:rt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await tt.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")};bt.add(G6e);const V6e={extension:{type:rt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await tt.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")};bt.add(V6e);const S7=["png","jpg","jpeg"],q6e={extension:{type:rt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...S7],remove:async e=>e.filter(t=>!S7.includes(t))};bt.add(q6e);const X6e={extension:rt.ResolveParser,test:Gk.test,parse:e=>{var t;return{resolution:parseFloat(((t=tt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(X6e);var xs=(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))(xs||{});const EC={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 iu,mm;function E7(){mm={s3tc:iu.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:iu.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:iu.getExtension("WEBGL_compressed_texture_etc"),etc1:iu.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:iu.getExtension("WEBGL_compressed_texture_pvrtc")||iu.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:iu.getExtension("WEBGL_compressed_texture_atc"),astc:iu.getExtension("WEBGL_compressed_texture_astc")}}const Y6e={extension:{type:rt.DetectionParser,priority:2},test:async()=>{const t=tt.ADAPTER.createCanvas().getContext("webgl");return t?(iu=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{mm||E7();const t=[];for(const n in mm)mm[n]&&t.push(n);return[...t,...e]},remove:async e=>(mm||E7(),e.filter(t=>!(t in mm)))};bt.add(Y6e);class K6e extends vw{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 C3(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 C3(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class cp extends K6e{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=cp._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||cp._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*EC[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*EC[n];return c}}const pB=4,G_=124,Q6e=32,C7=20,J6e=542327876,V_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},Z6e={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},q_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},eUe=1,tUe=2,nUe=4,rUe=64,iUe=512,oUe=131072,sUe=827611204,aUe=861165636,lUe=894720068,cUe=808540228,uUe=4,dUe={[sUe]:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[aUe]:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[lUe]:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT},fUe={70:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function hUe(e){const t=new Uint32Array(e);if(t[0]!==J6e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,G_/Uint32Array.BYTES_PER_ELEMENT),i=r[V_.HEIGHT],o=r[V_.WIDTH],s=r[V_.MIPMAP_COUNT],l=new Uint32Array(e,V_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Q6e/Uint32Array.BYTES_PER_ELEMENT),c=l[eUe];if(c&nUe){const d=l[Z6e.FOURCC];if(d!==cUe){const x=dUe[d],E=pB+G_,A=new Uint8Array(e,E);return[new cp(A,{format:x,width:o,height:i,levels:s})]}const f=pB+G_,h=new Uint32Array(t.buffer,f,C7/Uint32Array.BYTES_PER_ELEMENT),p=h[q_.DXGI_FORMAT],g=h[q_.RESOURCE_DIMENSION],v=h[q_.MISC_FLAG],y=h[q_.ARRAY_SIZE],S=fUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===uUe)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=pB+G_+C7;if(y===1)_.push(new Uint8Array(e,b));else{const x=EC[S];let E=0,A=o,R=i;for(let O=0;O>>1,R=R>>>1}let k=b;for(let O=0;Onew cp(x,{format:S,width:o,height:i,levels:s}))}throw c&rUe?new Error("DDSParser does not support uncompressed texture data."):c&iUe?new Error("DDSParser does not supported YUV uncompressed texture data."):c&oUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&tUe?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 T7=[171,75,84,88,32,49,49,187,13,10,26,10],pUe=67305985,$a={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},z3=64,k7={[It.UNSIGNED_BYTE]:1,[It.UNSIGNED_SHORT]:2,[It.INT]:4,[It.UNSIGNED_INT]:4,[It.FLOAT]:4,[It.HALF_FLOAT]:8},mUe={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},gUe={[It.UNSIGNED_SHORT_4_4_4_4]:2,[It.UNSIGNED_SHORT_5_5_5_1]:2,[It.UNSIGNED_SHORT_5_6_5]:2};function vUe(e,t,n=!1){const r=new DataView(t);if(!yUe(e,r))return null;const i=r.getUint32($a.ENDIANNESS,!0)===pUe,o=r.getUint32($a.GL_TYPE,i),s=r.getUint32($a.GL_FORMAT,i),l=r.getUint32($a.GL_INTERNAL_FORMAT,i),c=r.getUint32($a.PIXEL_WIDTH,i),d=r.getUint32($a.PIXEL_HEIGHT,i)||1,f=r.getUint32($a.PIXEL_DEPTH,i)||1,h=r.getUint32($a.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32($a.NUMBER_OF_FACES,i),g=r.getUint32($a.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32($a.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let A;if(o!==0?k7[o]?A=k7[o]*mUe[s]:A=gUe[o]:A=EC[l],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const R=n?xUe(r,v,i):null;let O=E*A,L=c,N=d,H=_,W=b,z=z3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?N:W,levelBuffer:new Uint8Array(t,j,O)},j+=O}z+=F+4,z=z%4!==0?z+4-z%4:z,L=L>>1||1,N=N>>1||1,H=L+y-1&~(y-1),W=N+S-1&~(S-1),O=H*W*A}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,j=!1;return o===It.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===It.UNSIGNED_INT?(j=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===It.INT&&(j=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new vw(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?bUe(s):s}}),kvData:R}:{compressed:x.map(D=>new cp(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:R}}function yUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Vt(l,{mipmap:Jl.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:Ud(e),...t.data});return Wk(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(wUe);const _Ue={extension:{type:rt.LoadParser,priority:sc.High},name:"loadKTX",test(e){return Hp(e,".ktx")},async load(e,t,n){const i=await(await tt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=vUe(e,i),c=o??s,d={mipmap:Jl.OFF,alphaMode:yl.NO_PREMULTIPLIED_ALPHA,resolution:Ud(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Vt(h,d);return p.ktxKeyValueData=l,Wk(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(_Ue);const SUe={extension:rt.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=tt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=tt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(SUe);const EUe=new Kt,CUe=4,Xb=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Xb._flipY(n,r,i),Xb._unpremultiplyAlpha(n);const s=new z4e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Xb._flipY(n,r,i),Xb._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 jp?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=EUe,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array(CUe*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){A7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},kUe={build(e){CC.build(e)},triangulate(e,t){CC.triangulate(e,t)}};var Ga=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Ga||{}),Jh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Jh||{});const Ug={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 R7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,A=_*p+b*f,R=_*h+b*d,k=f*(b+x),O=d*(b+x),L=p*(_+E),N=h*(_+E),H=Math.atan2(O-R,k-A),W=Math.atan2(N-R,L-A);return{cx:A+t,cy:R+n,radius:o,startAngle:H,endAngle:W,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=Ug._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/xC)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,A=Math.cos(E),R=-Math.sin(E);d.push((v*A+y*R)*o+r,(v*-R+y*A)*o+i)}}}class AUe{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 Ej{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,A=t,R=n;for(let k=1;k<=10;++k)h=k/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=A-_,E=R-b,A=_,R=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=Ug._segmentsCount(Ej.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function I7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function kh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===Ga.ROUND?p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4:p+=2,f.push(x-L*D,E-N*D,x+L*z,E+N*z));continue}const se=(-k+_)*(-O+E)-(-k+x)*(-O+b),Q=(-L+A)*(-N+E)-(-L+x)*(-N+R),ae=(G*Q-Y*se)/ce,le=(J*se-K*Q)/ce,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*z,ve=E+(le-E)*z,ye=x-(ae-x)*D,xe=E-(le-E)*D,me=Math.min(G*G+K*K,Y*Y+J*J),be=ue?z:D,Qe=me+be*be*y,qe=he<=Qe;let at=o.join;if(at===Ga.MITER&&he/y>S&&(at=Ga.BEVEL),qe)switch(at){case Ga.MITER:{f.push(pe,ve,ye,xe);break}case Ga.BEVEL:{ue?f.push(pe,ve,x+k*D,E+O*D,pe,ve,x+L*D,E+N*D):f.push(x-k*z,E-O*z,ye,xe,x-L*z,E-N*z,ye,xe),p+=2;break}case Ga.ROUND:{ue?(f.push(pe,ve,x+k*D,E+O*D),p+=kh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+4,f.push(pe,ve,x+L*D,E+N*D)):(f.push(x-k*z,E-O*z,ye,xe),p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4,f.push(x-L*z,E-N*z,ye,xe));break}}else{switch(f.push(x-k*z,E-O*z,x+k*D,E+O*D),at){case Ga.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case Ga.ROUND:{ue?p+=kh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+2;break}}f.push(x-L*z,E-N*z,x+L*D,E+N*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],k=-(b-E),O=_-x,H=Math.sqrt(k*k+O*O),k/=H,O/=H,k*=v,O*=v,f.push(x-k*z,E-O*z,x+k*D,E+O*D),c||(o.cap===Jh.ROUND?p+=kh(x-k*(z-D)*.5,E-O*(z-D)*.5,x-k*z,E-O*z,x+k*D,E+O*D,f,!1)+2:o.cap===Jh.SQUARE&&(p+=I7(x,E,k,O,z,D,!1,f)));const F=t.indices,j=Ug.epsilon*Ug.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new TC(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 TC(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=X_.pop(),r||(r=new k3,r.texArray=new R3),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Od.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}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 l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ag,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ag,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),Cj.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Ej.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=R7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=xC:o&&r<=i&&(r+=xC),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Kt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new xj(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new yj(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new bj(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 ag(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===ji.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([V6e.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(){fB===void 0&&(fB=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[_7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:_7++,id:r})}}const S7=new X6e;function Hk(e,t,n){const r=new ht(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const Y6e=[".jpeg",".jpg",".png",".webp",".avif"],K6e=["image/jpeg","image/png","image/webp","image/avif"];async function Q6e(e){const t=await tt.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 Wk={name:"loadTextures",extension:{type:rt.LoadParser,priority:sc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return bw(e,K6e)||Hp(e,Y6e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await S7.isImageBitmapSupported()?r=await S7.loadImageBitmap(e):r=await Q6e(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:Ud(e),...t.data});return i.resource.src=e,Hk(i,n,e)},unload(e){e.destroy(!0)}};bt.add(Wk);const J6e=".svg",Z6e="image/svg+xml",eUe={extension:{type:rt.LoadParser,priority:sc.High},name:"loadSVG",test(e){return bw(e,Z6e)||Hp(e,J6e)},async testParse(e){return k1.test(e)},async parse(e,t,n){var s;const r=new k1(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new Vt(r,{resolution:Ud(e),...t==null?void 0:t.data});return i.resource.src=e,Hk(i,n,e)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload:Wk.unload};bt.add(eUe);class tUe{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=yu(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=I6e(n):n=[n]);const o=n.map(s=>{let l=s;if(typeof s=="string"){let c=!1;for(let d=0;d{this._assetMap[s]=o})}resolveBundle(t){const n=_C(t);t=yu(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),l={};for(const c in s){const d=s[c];l[this._extractAssetIdFromBundle(i,c)]=d}r[i]=l}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=_C(t);t=yu(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),l=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(d=>{const f=o.filter(h=>h[c]?h[c]===d:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??l}else{let o=i;(this._basePath||this._rootPath)&&(o=ro.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 nUe{constructor(){this._detections=[],this._initialized=!1,this.resolver=new tUe,this.loader=new O6e,this.cache=kb,this._backgroundLoader=new R6e(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,l;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let c=t.manifest;typeof c=="string"&&(c=await this.load(c)),this.resolver.addManifest(c)}const n=((o=t.texturePreference)==null?void 0:o.resolution)??1,r=typeof n=="number"?[n]:n;let i=[];if((s=t.texturePreference)!=null&&s.format){const c=(l=t.texturePreference)==null?void 0:l.format;i=typeof c=="string"?[c]:c;for(const d of this._detections)await d.test()||(i=await d.remove(i))}else for(const c of this._detections)await c.test()&&(i=await c.add(i));this.resolver.prefer({params:{format:i,resolution:r}}),t.preferences&&this.setPreferences(t.preferences)}add(t,n,r){this.resolver.add(t,n,r)}async load(t,n){this._initialized||await this.init();const r=_C(t),i=yu(t).map(l=>typeof l!="string"?(this.resolver.add(l.src,l),l.src):(this.resolver.hasKey(l)||this.resolver.add(l,l),l)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let l=0,c=0;const d=()=>{n==null||n(++l/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,d).then(g=>{o[h]=g})});return await Promise.all(f),r?o[t[0]]:o}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(n))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const n=this.resolver.resolveBundle(t);Object.values(n).forEach(r=>{this._backgroundLoader.add(Object.values(r))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return kb.get(t);const n={};for(let r=0;r{const d=o[l.src],f=[l.src];l.alias&&f.push(...l.alias),s[i[c]]=d,kb.set(f,d)}),s}async unload(t){this._initialized||await this.init();const n=yu(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=yu(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=>{kb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return Wk.config.preferWorkers}set preferWorkers(t){cn("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 W_=new nUe;bt.handleByList(rt.LoadParser,W_.loader.parsers).handleByList(rt.ResolveParser,W_.resolver.parsers).handleByList(rt.CacheParser,W_.cache.parsers).handleByList(rt.DetectionParser,W_.detections);const rUe={extension:rt.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof ht),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};bt.add(rUe);const iUe={extension:{type:rt.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await tt.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")};bt.add(iUe);const oUe={extension:{type:rt.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await tt.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")};bt.add(oUe);const E7=["png","jpg","jpeg"],sUe={extension:{type:rt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...E7],remove:async e=>e.filter(t=>!E7.includes(t))};bt.add(sUe);const aUe={extension:rt.ResolveParser,test:Wk.test,parse:e=>{var t;return{resolution:parseFloat(((t=tt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(aUe);var xs=(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))(xs||{});const SC={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 iu,gm;function C7(){gm={s3tc:iu.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:iu.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:iu.getExtension("WEBGL_compressed_texture_etc"),etc1:iu.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:iu.getExtension("WEBGL_compressed_texture_pvrtc")||iu.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:iu.getExtension("WEBGL_compressed_texture_atc"),astc:iu.getExtension("WEBGL_compressed_texture_astc")}}const lUe={extension:{type:rt.DetectionParser,priority:2},test:async()=>{const t=tt.ADAPTER.createCanvas().getContext("webgl");return t?(iu=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{gm||C7();const t=[];for(const n in gm)gm[n]&&t.push(n);return[...t,...e]},remove:async e=>(gm||C7(),e.filter(t=>!(t in gm)))};bt.add(lUe);class cUe extends vw{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 T3(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 T3(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class cp 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=cp._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||cp._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,l=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,l){const c=new Array(r);let d=t.byteOffset,f=s,h=l,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*SC[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,d,v)},d+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*SC[n];return c}}const pB=4,G_=124,uUe=32,T7=20,dUe=542327876,V_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},fUe={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},q_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},hUe=1,pUe=2,mUe=4,gUe=64,vUe=512,yUe=131072,bUe=827611204,xUe=861165636,wUe=894720068,_Ue=808540228,SUe=4,EUe={[bUe]:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,[xUe]:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,[wUe]:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT},CUe={70:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:xs.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:xs.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:xs.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:xs.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function TUe(e){const t=new Uint32Array(e);if(t[0]!==dUe)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,G_/Uint32Array.BYTES_PER_ELEMENT),i=r[V_.HEIGHT],o=r[V_.WIDTH],s=r[V_.MIPMAP_COUNT],l=new Uint32Array(e,V_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,uUe/Uint32Array.BYTES_PER_ELEMENT),c=l[hUe];if(c&mUe){const d=l[fUe.FOURCC];if(d!==_Ue){const x=EUe[d],E=pB+G_,A=new Uint8Array(e,E);return[new cp(A,{format:x,width:o,height:i,levels:s})]}const f=pB+G_,h=new Uint32Array(t.buffer,f,T7/Uint32Array.BYTES_PER_ELEMENT),p=h[q_.DXGI_FORMAT],g=h[q_.RESOURCE_DIMENSION],v=h[q_.MISC_FLAG],y=h[q_.ARRAY_SIZE],S=CUe[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===SUe)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const _=new Array,b=pB+G_+T7;if(y===1)_.push(new Uint8Array(e,b));else{const x=SC[S];let E=0,A=o,R=i;for(let O=0;O>>1,R=R>>>1}let k=b;for(let O=0;Onew cp(x,{format:S,width:o,height:i,levels:s}))}throw c&gUe?new Error("DDSParser does not support uncompressed texture data."):c&vUe?new Error("DDSParser does not supported YUV uncompressed texture data."):c&yUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&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 k7=[171,75,84,88,32,49,49,187,13,10,26,10],kUe=67305985,$a={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},j3=64,A7={[It.UNSIGNED_BYTE]:1,[It.UNSIGNED_SHORT]:2,[It.INT]:4,[It.UNSIGNED_INT]:4,[It.FLOAT]:4,[It.HALF_FLOAT]:8},AUe={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},RUe={[It.UNSIGNED_SHORT_4_4_4_4]:2,[It.UNSIGNED_SHORT_5_5_5_1]:2,[It.UNSIGNED_SHORT_5_6_5]:2};function IUe(e,t,n=!1){const r=new DataView(t);if(!PUe(e,r))return null;const i=r.getUint32($a.ENDIANNESS,!0)===kUe,o=r.getUint32($a.GL_TYPE,i),s=r.getUint32($a.GL_FORMAT,i),l=r.getUint32($a.GL_INTERNAL_FORMAT,i),c=r.getUint32($a.PIXEL_WIDTH,i),d=r.getUint32($a.PIXEL_HEIGHT,i)||1,f=r.getUint32($a.PIXEL_DEPTH,i)||1,h=r.getUint32($a.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32($a.NUMBER_OF_FACES,i),g=r.getUint32($a.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32($a.BYTES_OF_KEY_VALUE_DATA,i);if(d===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const y=4,S=4,_=c+3&-4,b=d+3&-4,x=new Array(h);let E=c*d;o===0&&(E=_*b);let A;if(o!==0?A7[o]?A=A7[o]*AUe[s]:A=RUe[o]:A=SC[l],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const R=n?MUe(r,v,i):null;let O=E*A,L=c,N=d,H=_,W=b,z=j3+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?N:W,levelBuffer:new Uint8Array(t,j,O)},j+=O}z+=F+4,z=z%4!==0?z+4-z%4:z,L=L>>1||1,N=N>>1||1,H=L+y-1&~(y-1),W=N+S-1&~(S-1),O=H*W*A}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,j=!1;return o===It.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===It.UNSIGNED_INT?(j=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===It.INT&&(j=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new vw(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?OUe(s):s}}),kvData:R}:{compressed:x.map(D=>new cp(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:R}}function PUe(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new Vt(l,{mipmap:Zl.OFF,alphaMode:xl.NO_PREMULTIPLIED_ALPHA,resolution:Ud(e),...t.data});return Hk(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(DUe);const LUe={extension:{type:rt.LoadParser,priority:sc.High},name:"loadKTX",test(e){return Hp(e,".ktx")},async load(e,t,n){const i=await(await tt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=IUe(e,i),c=o??s,d={mipmap:Zl.OFF,alphaMode:xl.NO_PREMULTIPLIED_ALPHA,resolution:Ud(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new Vt(h,d);return p.ktxKeyValueData=l,Hk(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};bt.add(LUe);const NUe={extension:rt.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=tt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=tt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};bt.add(NUe);const BUe=new Kt,$Ue=4,Xb=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>i(l.result),l.onerror=o,l.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=s,l.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&Xb._flipY(n,r,i),Xb._unpremultiplyAlpha(n);const s=new Z4e(r,i,1),l=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(l,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&Xb._flipY(n,r,i),Xb._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 jp?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=BUe,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const l=Math.round(t.width*r),c=Math.round(t.height*r),d=new Uint8Array($Ue*l*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),l,c,f.RGBA,f.UNSIGNED_BYTE,d),s&&(o==null||o.destroy(!0)),{pixels:d,width:l,height:c,flipY:i}}destroy(){this.renderer=null}static _flipY(e,t,n){const r=t<<2,i=n>>1,o=new Uint8Array(r);for(let s=0;s=0&&l>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+l)),d=c*8+(i?4:0)+(o?4:0);if(t.length=d,d===0)return;if(c===0){t.length=8,t[0]=t[6]=n+i,t[1]=t[3]=r+o,t[2]=t[4]=n-i,t[5]=t[7]=r-o;return}let f=0,h=c*4+(i?2:0)+2,p=h,g=d;{const v=i+s,y=o,S=n+v,_=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=_,o){const x=r-y;t[p++]=_,t[p++]=x,t[--g]=x,t[--g]=S}}for(let v=1;v0||t&&r<=0){const i=n/2;for(let o=i+i%2;o=6){R7(n,!1);const s=[];for(let d=0;d=0&&o>=0&&s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate(e,t){const n=e.points,r=t.points;if(n.length===0)return;const i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},zUe={build(e){EC.build(e)},triangulate(e,t){EC.triangulate(e,t)}};var Ga=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Ga||{}),Jh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Jh||{});const Ug={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 I7{static curveTo(t,n,r,i,o,s){const l=s[s.length-2],d=s[s.length-1]-n,f=l-t,h=i-n,p=r-t,g=Math.abs(d*p-f*h);if(g<1e-8||o===0)return(s[s.length-2]!==t||s[s.length-1]!==n)&&s.push(t,n),null;const v=d*d+f*f,y=h*h+p*p,S=d*h+f*p,_=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=_*S/v,E=b*S/y,A=_*p+b*f,R=_*h+b*d,k=f*(b+x),O=d*(b+x),L=p*(_+E),N=h*(_+E),H=Math.atan2(O-R,k-A),W=Math.atan2(N-R,L-A);return{cx:A+t,cy:R+n,radius:o,startAngle:H,endAngle:W,anticlockwise:f*h>p*d}}static arc(t,n,r,i,o,s,l,c,d){const f=l-s,h=Ug._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/bC)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,_=S%1/S;for(let b=0;b<=S;++b){const x=b+_*b,E=p+s+g*x,A=Math.cos(E),R=-Math.sin(E);d.push((v*A+y*R)*o+r,(v*-R+y*A)*o+i)}}}class jUe{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 Tj{static curveLength(t,n,r,i,o,s,l,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,_=0,b=0,x=0,E=0,A=t,R=n;for(let k=1;k<=10;++k)h=k/10,p=h*h,g=p*h,v=1-h,y=v*v,S=y*v,_=S*t+3*y*h*r+3*v*p*o+g*l,b=S*n+3*y*h*i+3*v*p*s+g*c,x=A-_,E=R-b,A=_,R=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,l){const c=l[l.length-2],d=l[l.length-1];l.length-=2;const f=Ug._segmentsCount(Tj.curveLength(c,d,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;l.push(c,d);for(let S=1,_=0;S<=f;++S)_=S/f,h=1-_,p=h*h,g=p*h,v=_*_,y=v*_,l.push(g*c+3*p*_*t+3*h*v*r+y*o,g*d+3*p*_*n+3*h*v*i+y*s)}}function P7(e,t,n,r,i,o,s,l){const c=e-n*i,d=t-r*i,f=e+n*o,h=t+r*o;let p,g;s?(p=r,g=-n):(p=-r,g=n);const v=c+p,y=d+g,S=f+p,_=h+g;return l.push(v,y,S,_),2}function kh(e,t,n,r,i,o,s,l){const c=n-e,d=r-t;let f=Math.atan2(c,d),h=Math.atan2(i-e,o-t);l&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+d*d),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,_=g/S;if(p+=_,l){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===Ga.ROUND?p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4:p+=2,f.push(x-L*D,E-N*D,x+L*z,E+N*z));continue}const se=(-k+_)*(-O+E)-(-k+x)*(-O+b),Q=(-L+A)*(-N+E)-(-L+x)*(-N+R),ae=(G*Q-Y*se)/ce,le=(J*se-K*Q)/ce,he=(ae-x)*(ae-x)+(le-E)*(le-E),pe=x+(ae-x)*z,ve=E+(le-E)*z,ye=x-(ae-x)*D,xe=E-(le-E)*D,me=Math.min(G*G+K*K,Y*Y+J*J),be=ue?z:D,Qe=me+be*be*y,qe=he<=Qe;let at=o.join;if(at===Ga.MITER&&he/y>S&&(at=Ga.BEVEL),qe)switch(at){case Ga.MITER:{f.push(pe,ve,ye,xe);break}case Ga.BEVEL:{ue?f.push(pe,ve,x+k*D,E+O*D,pe,ve,x+L*D,E+N*D):f.push(x-k*z,E-O*z,ye,xe,x-L*z,E-N*z,ye,xe),p+=2;break}case Ga.ROUND:{ue?(f.push(pe,ve,x+k*D,E+O*D),p+=kh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+4,f.push(pe,ve,x+L*D,E+N*D)):(f.push(x-k*z,E-O*z,ye,xe),p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+4,f.push(x-L*z,E-N*z,ye,xe));break}}else{switch(f.push(x-k*z,E-O*z,x+k*D,E+O*D),at){case Ga.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case Ga.ROUND:{ue?p+=kh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=kh(x,E,x-k*z,E-O*z,x-L*z,E-N*z,f,!1)+2;break}}f.push(x-L*z,E-N*z,x+L*D,E+N*D),p+=2}}_=r[(h-2)*2],b=r[(h-2)*2+1],x=r[(h-1)*2],E=r[(h-1)*2+1],k=-(b-E),O=_-x,H=Math.sqrt(k*k+O*O),k/=H,O/=H,k*=v,O*=v,f.push(x-k*z,E-O*z,x+k*D,E+O*D),c||(o.cap===Jh.ROUND?p+=kh(x-k*(z-D)*.5,E-O*(z-D)*.5,x-k*z,E-O*z,x+k*D,E+O*D,f,!1)+2:o.cap===Jh.SQUARE&&(p+=P7(x,E,k,O,z,D,!1,f)));const F=t.indices,j=Ug.epsilon*Ug.epsilon;for(let V=g;V0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,r=null){const i=new CC(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 CC(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=X_.pop(),r||(r=new A3,r.texArray=new I3),this.drawCalls.push(r)),r.start=d,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Od.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,d+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}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 l=0;for(let c=0;c0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new ag,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new ag,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),kj.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Tj.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=I7.curveTo(e,t,n,r,i,o);if(s){const{cx:l,cy:c,radius:d,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(l,c,d,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=bC:o&&r<=i&&(r+=bC),i-r===0)return this;const l=e+Math.cos(r)*n,c=t+Math.sin(r)*n,d=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-c);h0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,r){return this.drawShape(new Kt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new _j(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new xj(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new wj(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 ag(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===ji.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let r=0;rr&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=Dte(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Mne.extension={name:"particle",type:rt.RendererPlugin};bt.add(Mne);var qk=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(qk||{});const Y_={willReadFrequently:!0},gt=class{static get experimentalLetterSpacingSupported(){let e=gt._experimentalLetterSpacingSupported;if(e!==void 0){const t=tt.ADAPTER.getCanvasRenderingContext2D().prototype;e=gt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=gt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=gt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",Y_);s.font=i;const c=(n?gt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(gt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=gt._canvas){const r=n.getContext("2d",Y_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=gt.collapseSpaces(d),h=gt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=gt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=gt.addLine(o),o="",i=0),gt.canBreakWords(S,t.breakWords)){const b=gt.wordWrapSplit(S);for(let x=0;xg&&(s+=gt.addLine(o),p=!1,o="",i=0),o+=E,i+=k}}else{o.length>0&&(s+=gt.addLine(o),o="",i=0);const b=y===v.length-1;s+=gt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=gt.addLine(o),o="",i=0),(o.length>0||!gt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=gt.addLine(o,!1),s}static addLine(e,t=!0){return e=gt.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=gt._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(!gt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:gt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:gt._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]})();zi.experimentalLetterSpacing=!1;zi._fonts={};zi._newlines=[10,13];zi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const BUe=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Yb=class{constructor(e){this.styleID=0,this.reset(),bB(this,e,e)}clone(){const e={};return bB(e,this,Yb.defaultStyle),new Yb(e)}reset(){bB(this,Yb.defaultStyle,Yb.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=yB(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=yB(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){$Ue(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=yB(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)&&!BUe.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Au=Yb;Au.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:qk.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 yB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function $Ue(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function jUe(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(VUe),this.registerFindHook(qUe),this.registerFindHook(jUe),this.registerFindHook(UUe),this.registerFindHook(HUe),this.registerUploadHook(WUe),this.registerUploadHook(GUe)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Xr.system.addOnce(this.tick,this,Ap.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&&Xr.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 kC=Dne;kC.uploadsPerFrame=4;Object.defineProperties(tt,{UPLOADS_PER_FRAME:{get(){return kC.uploadsPerFrame},set(e){cn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),kC.uploadsPerFrame=e}}});function Lne(e,t){return t instanceof Vt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function XUe(e,t){if(!(t instanceof Hg))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;ir&&!t.autoResize&&(s=r);let l=t._buffers;l||(l=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,d=c.alphaMode>0;this.state.blendMode=Nte(t.blendMode,d),o.state.set(this.state);const f=o.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=zn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,d).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;gi&&(y=i),v>=l.length&&l.push(this._generateOneMoreBuffer(t));const S=l[v];S.uploadDynamic(n,g,y);const _=t._bufferUpdateIDs[v]||0;p=p||S._updateID<_,p&&(S._updateID=t._updateID,S.uploadStatic(n,g,y)),o.geometry.bind(S.geometry),f.drawElements(f.TRIANGLES,y*6,f.UNSIGNED_SHORT,0)}}generateBuffers(t){const n=[],r=t._maxSize,i=t._batchSize,o=t._properties;for(let s=0;s0);i[s]=d,i[s+o]=d,i[s+o*2]=d,i[s+o*3]=d,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Lne.extension={name:"particle",type:rt.RendererPlugin};bt.add(Lne);var Vk=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(Vk||{});const Y_={willReadFrequently:!0},gt=class{static get experimentalLetterSpacingSupported(){let e=gt._experimentalLetterSpacingSupported;if(e!==void 0){const t=tt.ADAPTER.getCanvasRenderingContext2D().prototype;e=gt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,l,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,n,r=gt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=gt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",Y_);s.font=i;const c=(n?gt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(gt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=gt._canvas){const r=n.getContext("2d",Y_);let i=0,o="",s="";const l=Object.create(null),{letterSpacing:c,whiteSpace:d}=t,f=gt.collapseSpaces(d),h=gt.collapseNewlines(d);let p=!f;const g=t.wordWrapWidth+c,v=gt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=gt.addLine(o),o="",i=0),gt.canBreakWords(S,t.breakWords)){const b=gt.wordWrapSplit(S);for(let x=0;xg&&(s+=gt.addLine(o),p=!1,o="",i=0),o+=E,i+=k}}else{o.length>0&&(s+=gt.addLine(o),o="",i=0);const b=y===v.length-1;s+=gt.addLine(S,!b),p=!1,o="",i=0}else _+i>g&&(p=!1,s+=gt.addLine(o),o="",i=0),(o.length>0||!gt.isBreakingSpace(S)||p)&&(o+=S,i+=_)}return s+=gt.addLine(o,!1),s}static addLine(e,t=!0){return e=gt.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=gt._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(!gt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:gt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:gt._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]})();zi.experimentalLetterSpacing=!1;zi._fonts={};zi._newlines=[10,13];zi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const KUe=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Yb=class{constructor(e){this.styleID=0,this.reset(),bB(this,e,e)}clone(){const e={};return bB(e,this,Yb.defaultStyle),new Yb(e)}reset(){bB(this,Yb.defaultStyle,Yb.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=yB(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=yB(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){QUe(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=yB(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)&&!KUe.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Au=Yb;Au.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Vk.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 yB(e){const t=zn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function QUe(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n0&&g>v&&(y=(v+g)/2);const S=v+h,_=n.lineHeight*(p+1);let b=S;p+10}}function e8e(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(o8e),this.registerFindHook(s8e),this.registerFindHook(e8e),this.registerFindHook(t8e),this.registerFindHook(n8e),this.registerUploadHook(r8e),this.registerUploadHook(i8e)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Xr.system.addOnce(this.tick,this,Rp.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&&Xr.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 TC=Nne;TC.uploadsPerFrame=4;Object.defineProperties(tt,{UPLOADS_PER_FRAME:{get(){return TC.uploadsPerFrame},set(e){cn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),TC.uploadsPerFrame=e}}});function Bne(e,t){return t instanceof Vt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function a8e(e,t){if(!(t instanceof Hg))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?Vl.from(QUe,KUe,n):Vl.from(N7,JUe,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==Od.CLAMP:c.wrapMode===Od.CLAMP&&(c.wrapMode=Od.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;K_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),K_.invert(),p?K_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=K_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=Dte(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Bne.extension={name:"tilingSprite",type:rt.RendererPlugin};bt.add(Bne);const Kb=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ht?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=Ud(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<=Kb.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Kb.BATCH_SIZE;for(;t-e{this._batchIndex*Kb.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=ro.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=$ne([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const t8e={extension:rt.Asset,cache:{test:e=>e instanceof H3,getCacheableAssets:(e,t)=>$ne(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&e8e.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=tt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:rt.LoadParser,priority:sc.Normal},async testParse(e,t){return ro.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=ro.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=F3(i,t.src);const s=(await n.load([i]))[i],l=new H3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=F3(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};bt.add(t8e);class AC{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class VS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new AC;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 W3{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 AC,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?W3.test(tt.ADAPTER.parseXML(t)):!1}static parse(t){return W3.parse(tt.ADAPTER.parseXML(t))}}const xB=[VS,W3,G3];function n8e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+k.fontProperties.descent,b),N*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}i8e(y,S,k,g,v,o,f);const H=qS(k.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:N,height:L,xoffset:0,yoffset:0,xadvance:O-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(N+2*i)*o,g=Math.ceil(g)}for(let A=0,R=d.length;A1?ql.from(u8e,c8e,n):ql.from(B7,d8e,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const l=t._texture,c=l.baseTexture,d=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&l.frame.width===c.width&&l.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==Od.CLAMP:c.wrapMode===Od.CLAMP&&(c.wrapMode=Od.REPEAT));const g=p?this.simpleShader:this.shader,v=l.width,y=l.height,S=t._width,_=t._height;K_.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),K_.invert(),p?K_.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=K_.toArray(!0),g.uniforms.uColor=zn.shared.setValue(t.tint).premultiply(t.worldAlpha,d).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=l,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=Nte(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Fne.extension={name:"tilingSprite",type:rt.RendererPlugin};bt.add(Fne);const Kb=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ht?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=Ud(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<=Kb.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Kb.BATCH_SIZE;for(;t-e{this._batchIndex*Kb.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=ro.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=zne([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const p8e={extension:rt.Asset,cache:{test:e=>e instanceof W3,getCacheableAssets:(e,t)=>zne(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&h8e.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=tt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:rt.LoadParser,priority:sc.Normal},async testParse(e,t){return ro.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=ro.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=z3(i,t.src);const s=(await n.load([i]))[i],l=new W3(s.baseTexture,e,t.src);await l.parse();const c=(d=e==null?void 0:e.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(c)){const h=[];for(const g of c){if(typeof g!="string")continue;let v=r+g;(f=t.data)!=null&&f.ignoreMultiPack||(v=z3(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);l.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[l].concat(l.linkedSheets.filter(v=>v!==g))})}return l},unload(e){e.destroy(!0)}}};bt.add(p8e);class kC{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class GS{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],l=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const d in l){const f=l[d].split("="),h=f[0],p=f[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;c[h]=v}r[s].push(c)}const i=new kC;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 G3{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 kC,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),l=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let d=0;d")?G3.test(tt.ADAPTER.parseXML(t)):!1}static parse(t){return G3.parse(tt.ADAPTER.parseXML(t))}}const xB=[GS,G3,V3];function m8e(e){for(let t=0;t=l-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+k.fontProperties.descent,b),N*o+g>=h){if(g===0)throw new Error(`[BitmapFont] textureWidth ${s}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${R}')`);--A,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}v8e(y,S,k,g,v,o,f);const H=VS(k.text);p.char.push({id:H,page:x.length-1,x:g/o,y:v/o,width:N,height:L,xoffset:0,yoffset:0,xadvance:O-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0)}),g+=(N+2*i)*o,g=Math.ceil(g)}for(let A=0,R=d.length;A{this.dirty=!0},this,0,0),this._roundPixels=tt.ROUND_PIXELS,this.dirty=!0,this._resolution=tt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=No.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Ot,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",c=Fne(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?B7:$7;let h=null,p=0,g=0,v=0,y=-1,S=0,_=0,b=0,x=0;for(let H=0;H0&&r.x>d&&(++_,sg(i,1+y-_,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),g=Math.max(g,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=c[c.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let W=0;this._align==="right"?W=g-o[H]:this._align==="center"?W=(g-o[H])/2:this._align==="justify"&&(W=s[H]<0?0:(g-o[H])/s[H]),A.push(W)}const R=i.length,k={},O=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*z)||W.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ht.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 l8e=zne;l8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const c8e=[".xml",".fnt"],u8e={extension:{type:rt.LoadParser,priority:sc.Normal},name:"loadBitmapFont",test(e){return c8e.includes(ro.extname(e).toLowerCase())},async testParse(e){return VS.test(e)||G3.test(e)},async parse(e,t,n){const r=VS.test(e)?VS.parse(e):G3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return No.install(r,c,!0)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};bt.add(u8e);const gm=class extends Au{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new gm(Object.keys(gm.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 gm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=gm;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return tt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:ro.basename(e,ro.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 $7=[],F7=[],z7=[],Une=class extends Ko{constructor(e,t={}){super();const{align:n,tint:r,maxWidth:i,letterSpacing:o,fontName:s,fontSize:l}=Object.assign({},Une.styleDefaults,t);if(!No.available[s])throw new Error(`Missing BitmapFont "${s}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new zn(r),this._font=void 0,this._fontName=s,this._fontSize=l,this.text=e,this._maxWidth=i,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new gd(()=>{this.dirty=!0},this,0,0),this._roundPixels=tt.ROUND_PIXELS,this.dirty=!0,this._resolution=tt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=No.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Ot,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",c=jne(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?$7:F7;let h=null,p=0,g=0,v=0,y=-1,S=0,_=0,b=0,x=0;for(let H=0;H0&&r.x>d&&(++_,sg(i,1+y-_,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),g=Math.max(g,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=c[c.length-1];E!=="\r"&&E!==` +`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const A=[];for(let H=0;H<=v;H++){let W=0;this._align==="right"?W=g-o[H]:this._align==="center"?W=(g-o[H])/2:this._align==="justify"&&(W=s[H]<0?0:(g-o[H])/s[H]),A.push(W)}const R=i.length,k={},O=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*z)||W.vertices.lengtht[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=ht.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 w8e=Une;w8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const _8e=[".xml",".fnt"],S8e={extension:{type:rt.LoadParser,priority:sc.Normal},name:"loadBitmapFont",test(e){return _8e.includes(ro.extname(e).toLowerCase())},async testParse(e){return GS.test(e)||V3.test(e)},async parse(e,t,n){const r=GS.test(e)?GS.parse(e):V3.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return No.install(r,c,!0)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};bt.add(S8e);const vm=class extends Au{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new vm(Object.keys(vm.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 vm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=vm;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return tt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),l=new FileReader;l.onload=()=>i([s,l.result]),l.onerror=o,l.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:ro.basename(e,ro.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=N4e(e)),typeof e=="number"?L4e(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,gm.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}=tt.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 Ax=gm;Ax.availableFonts={};Ax.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 vm=class extends Up{constructor(e="",t={}){super(ht.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=ht.from(n,{scaleMode:tt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Kt,r.trim=new Kt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=vm.defaultMaxWidth,this.maxHeight=vm.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=vm.defaultAutoResolution,this._resolution=vm.defaultResolution??tt.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},vm.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=md(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=md(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 Ax?(this.ownsStyle=!1,this._style=e):e instanceof Au?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Ax.from(e)):(this.ownsStyle=!0,this._style=new Ax(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 Xk=vm;Xk.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};Xk.defaultMaxWidth=2024;Xk.defaultMaxHeight=2024;Xk.defaultAutoResolution=!0;function d8e(e,t){return{constructor:e,meta:t}}function f8e(e,t,n,r,i){jne(e,t,n||0,r||e.length-1,i||h8e)}function jne(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));jne(e,t,f,h,i)}var p=e[t],g=n,v=r;for(Ab(e,n,t),i(e[r],p)>0&&Ab(e,n,r);g0;)v--}i(e[n],p)===0?Ab(e,n,v):(v++,Ab(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Ab(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function h8e(e,t){return et?1:0}class p8e{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(!J_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=ym(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,nm(r,this.toBBox),nm(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=ym([t,n]),this.data.height=t.height+1,this.data.leaf=!1,nm(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Qb(t,0,l,this.toBBox),d=Qb(t,l,r,this.toBBox),f=b8e(c,d),h=wB(c)+wB(d);f=n;d--){const f=t.children[d];Jb(l,t.leaf?o(f):f),c+=Q_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Jb(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():nm(t[n],this.toBBox)}}function m8e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function ym(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function z7(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;f8e(e,s,t,n,i),o.push(t,s,s,n)}}class x8e extends p8e{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 j7={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var Une={},RC=Bt&&Bt.__assign||function(){return RC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),SB}var O8e=I8e()?Math.sign:P8e(),M8e=O8e,D8e=Math.abs,L8e=Math.floor,N8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:M8e(e)*L8e(D8e(e)))},B8e=N8e,$8e=Math.max,F8e=function(e){return $8e(0,B8e(e))},Hne=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},z8e=gv,Wne=function(e){if(!z8e(e))throw new TypeError("Cannot use null or undefined");return e},j8e={exports:{}},U8e=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")},EB,H7;function H8e(){return H7||(H7=1,EB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),EB}var CB,W7;function W8e(){if(W7)return CB;W7=1;var e=gv,t=Object.keys;return CB=function(n){return t(e(n)?Object(n):n)},CB}var TB,G7;function G8e(){return G7||(G7=1,TB=H8e()()?Object.keys:W8e()),TB}var kB,V7;function V8e(){if(V7)return kB;V7=1;var e=G8e(),t=Wne,n=Math.max;return kB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},RB}var uHe=lHe()?String.prototype.contains:cHe(),XS=Xne,X7=aHe,Yne=Gne,Kne=R8e,Rx=uHe,dHe=qne.exports=function(e,t){var n,r,i,o,s;return arguments.length<2||typeof e!="string"?(o=t,t=e,e=null):o=arguments[2],XS(e)?(n=Rx.call(e,"c"),r=Rx.call(e,"e"),i=Rx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Yne(Kne(o),s):s};dHe.gs=function(e,t,n){var r,i,o,s;return typeof e!="string"?(o=n,n=t,t=e,e=null):o=arguments[3],XS(t)?X7(t)?XS(n)?X7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,XS(e)?(r=Rx.call(e,"c"),i=Rx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Yne(Kne(o),s):s};var xw=qne.exports,V3={exports:{}};(function(e,t){var n=xw,r=Hne,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}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)},Bi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:qB(i,r,(e/=60)+2),g:qB(i,r,e),b:qB(i,r,e-2)}},Aj=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)}},nre=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)}},Wg=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=At(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:At(100*c),l:At(100*d),a:r}},fV=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Co=function(e){return typeof e=="string"&&(e=vv.test(e)?Kk(e)/100:+e),isNaN(+e)||e>1?1:At(e)},yv=function(e,t,n){return t.reduce(function(r,i){return q3(q3([],r,!0),[sn(sn({},e),{h:n===Bo.ADDITIVE?R1(e.h+i):R1(fV(fV(e.h,!1)+i,!0))})],!1)},[sn({},e)])},NHe=function(e,t){return yv(e,[30,-30],t)},BHe=function(e,t){return yv(e,[180],t)},$He=function(e,t){return yv(e,[150,-150],t)},FHe=function(e,t){return yv(e,[120,-120],t)},zHe=function(e,t){return yv(e,[60,-120,180],t)},jHe=function(e,t){return yv(e,[90,-90,180],t)},Ys=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(qt).some(function(r){if(Zb[r].test(t))return n=r,!0}),!n&&~ere.indexOf(t)&&(n=qt.HEX),!n)throw new Error(DHe);return n}(e):function(t){var n,r=!1,i=tre(Object.keys(t));if(X3[i]&&(n=X3[i]),n&&n===qt.RGB){var o=Object.entries(t).some(function(l){return!Y3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(vv.test("".concat(l[1]))||!Y3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=qt.HEX)}if(!n||r)throw new Error(LHe);return n}(e)},UHe=((Pb={})[qt.HEX]=function(e){var t=(~ere.indexOf(e)?IC[e]:e).match(Zb.HEX),n={r:Z_(t[1]||t[5]),g:Z_(t[2]||t[6]),b:Z_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=Z_(r)/255),n},Pb[qt.RGB]=function(e){var t=e.match(Zb.RGB),n=Zh(t[1]||t[5]),r=Zh(t[2]||t[6]),i=Zh(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=Co(o)),s},Pb[qt.HSL]=function(e){var t=e.match(Zb.HSL),n=R1(t[1]||t[5]),r=PC(t[2]||t[6]),i=PC(t[3]||t[7]),o=t[4]||t[8],s=Bi(n,r,i);return o!==void 0&&(s.a=Co(o)),s},Pb[qt.CMYK]=function(e){var t=e.match(Zb.CMYK),n=vd(t[1]||t[6]),r=vd(t[2]||t[7]),i=vd(t[3]||t[8]),o=vd(t[4]||t[9]),s=t[5]||t[10],l=Aj(n,r,i,o);return s!==void 0&&(l.a=Co(s)),l},Pb),HHe=((Ob={})[qt.HEX]=function(e){var t={r:Zh("".concat(e.r)),g:Zh("".concat(e.g)),b:Zh("".concat(e.b))};return Zi(e,"a")&&(t.a=Math.min(Zh("".concat(e.a),!0),1)),t},Ob[qt.RGB]=function(e){return this.HEX(e)},Ob[qt.HSL]=function(e){var t=PC("".concat(e.s)),n=PC("".concat(e.l)),r=Bi(R1(e.h),t,n);return Zi(e,"a")&&(r.a=Co(e.a)),r},Ob[qt.CMYK]=function(e){var t=vd("".concat(e.c)),n=vd("".concat(e.m)),r=vd("".concat(e.y)),i=vd("".concat(e.k)),o=Aj(t,n,r,i);return Zi(e,"a")&&(o.a=Co(e.a)),o},Ob),Rp=function(e,t){return t===void 0&&(t=Ys(e)),typeof e=="string"?UHe[t](e):HHe[t](e)},rn=((ru={})[qt.HEX]=function(e){return{r:eS(e.r),g:eS(e.g),b:eS(e.b)}},ru.HEXA=function(e){var t=rn.HEX(e);return t.a=Zi(e,"a")?eS(255*e.a):"0xFF",t},ru[qt.RGB]=function(e,t){return Zi(e,"a")&&delete e.a,up(e,t)},ru.RGBA=function(e,t){return e.a=Zi(e,"a")?At(e.a):1,up(e,t)},ru[qt.HSL]=function(e,t){var n=Wg(e.r,e.g,e.b);return delete n.a,Um(n,t)},ru.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},ru[qt.CMYK]=function(e,t){return WHe(nre(e.r,e.g,e.b),t)},ru.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},ru),hV=function(e,t,n,r){var i=Ys(e),o=typeof e=="string",s=Rp(e,i),l=typeof e=="string"&&Zi(s,"a")||typeof e!="string"&&Zi(e,"a"),c=Wg(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case qt.HEX:default:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(up(sn(sn({},p),{a:At(255*p.a)}),r)):tn.HEX(up(p,r)):l?rn.HEXA(p):rn.HEX(p)});case qt.RGB:return f.map(function(h){var p=Bi(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(up(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case qt.HSL:return f.map(function(h){return o?tn.HSL(Um(h,r)):l?rn.HSLA(sn(sn({},Bi(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL(Bi(h.h,h.s,h.l),r)})}},rm=((Ah={buildHarmony:function(e,t,n,r){var i=Ys(e),o=Rp(e,i),s=Wg(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Zi(o,"a")||typeof e!="string"&&Zi(e,"a"),c=typeof e=="string";switch(i){case qt.HEX:default:return l?this.HEXA(Um(s,0),t,n,c):this.HEX(Um(s,0),t,n,c);case qt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case qt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[qt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(Bi(i.h,i.s,i.l)):rn.HEX(Bi(i.h,i.s,i.l))})},Ah.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},Bi(i.h,i.s,i.l)),{a:255*Co(i.a)})):rn.HEXA(sn(sn({},Bi(i.h,i.s,i.l)),{a:Co(i.a)}))})},Ah[qt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(up(Bi(o.h,o.s,o.l),i)):rn.RGB(Bi(o.h,o.s,o.l),i)})},Ah.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(up(sn(sn({},Bi(o.h,o.s,o.l)),{a:Co(o.a)}),i)):rn.RGBA(sn(sn({},Bi(o.h,o.s,o.l)),{a:Co(o.a)}),i)})},Ah[qt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um({h:o.h,s:o.s,l:o.l},i)):rn.HSL(Bi(o.h,o.s,o.l),i)})},Ah.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um(sn(sn({},o),{a:Co(o.a)}),i)):rn.HSLA(sn(sn({},Bi(o.h,o.s,o.l)),{a:Co(o.a)}),i)})},Ah),im=((Rh={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(A){var R=Ys(A);return Rp(A,R)}),b=t===Bo.SUBTRACTIVE?_.map(function(A){var R,k,O,L,N,H,W,z,D,F,j,V,G,K,Y=(R=A.r,k=A.g,O=A.b,L=Math.min(R,k,O),N=Math.min(255-R,255-k,255-O),H=R-L,W=k-L,z=O-L,D=Math.min(H,W),F=H-D,j=(W+D)/2,V=(z+W-D)/2,G=Math.max(F,j,V)/Math.max(H,W,z),K=isNaN(G)||G===1/0||G<=0?1:G,{r:F/K+N,y:j/K+N,b:V/K+N});return Zi(A,"a")&&(Y.a=A.a),Y}):null;function x(A){var R=t===Bo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(k,O){var L=Zi(O,"a")?O.a:1,N={r:Math.min(k.r+O.r*L,255),b:Math.min(k.b+O.b*L,255),a:1-(1-L)*(1-k.a)},H="g"in k?k.g:k.y,W="g"in O?O.g:O.y;return sn(sn({},N),t===Bo.ADDITIVE?{g:Math.min(H+W*L,255)}:{y:Math.min(H+W*L,255)})},R)}if(t===Bo.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:Ua(n.a,0,1)}}})[qt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},Rh.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Co(r.a):Co(r.a),n?tn.HEX(r):rn.HEXA(r)},Rh[qt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},Rh.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},Rh[qt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=Wg(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},Rh.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=Wg(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},Rh),up=function(e,t){return sn({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},Um=function(e,t){return sn({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},WHe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},Vu=function(e,t,n,r,i,o){var s=i(Rp(e,t),r);return n?o(s):s},om=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=Co(c.a),S=(Co(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:At(c.r+p*b),g:At(c.g+g*b),b:At(c.b+v*b),a:At(y+S*b)}})}(Rp(e),Rp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},GHe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Rp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},Bi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},Aj(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=Wg(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=nre(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=R1(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=Ua(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=Ua(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=Ua(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=Ua(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 rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Vu(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Vu(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),im.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),im.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),hV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),hV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=su.COMPLEMENTARY),r===void 0&&(r=Bo.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[su.ANALOGOUS]=rm.buildHarmony(s,NHe,c,l),d[su.COMPLEMENTARY]=rm.buildHarmony(s,BHe,c,l),d[su.SPLIT_COMPLEMENTARY]=rm.buildHarmony(s,$He,c,l),d[su.TRIADIC]=rm.buildHarmony(s,FHe,c,l),d[su.TETRADIC]=rm.buildHarmony(s,zHe,c,l),d[su.SQUARE]=rm.buildHarmony(s,jHe,c,l),d)[o]}(n,t,i,r)},e}();const VHe={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:Ui,PI:qHe}=Math,ww=(e,t)=>new GHe(e).setA(t??VHe.alpha).RGBA,XHe=(e,t)=>ww(e,t);function Gd(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 YHe={draw(e,t,n){if(e.text){const r=Gd(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Gd(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=ww(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},KHe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Gd(e,n);t.fillStyle=ww(e.fill,e.alpha),t.fillRect(Ui(r),Ui(i),Ui(o)||1,Ui(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},QHe={draw(e,t,n){t.fillStyle=ww(e.fill,e.alpha),t.beginPath();const r=Gd({...e,width:e.radius,height:e.radius},n);t.ellipse(Ui(r.x),Ui(r.y),Ui(r.width),Ui(r.height),0,0,2*qHe),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}}},JHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=ww(e.fill,e.alpha);const{x:o,y:s}=Gd({...r,width:0,height:0},n);t.moveTo(Ui(o),Ui(s));for(const l of i){const{x:c,y:d}=Gd({...l,width:0,height:0},n);t.lineTo(Ui(c),Ui(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},ZHe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=XHe(e.fill,e.alpha);const{x:o,y:s,width:l}=Gd({...r,width:e.lineWidth,height:0},n);t.lineWidth=Ui(l),t.moveTo(Ui(o),Ui(s));for(const c of i){const{x:d,y:f}=Gd({...c,width:0,height:0},n);t.lineTo(Ui(d),Ui(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},eWe={text:YHe,path:ZHe,rect:KHe,polygon:JHe,circle:QHe},{log2:tWe,max:nWe}=Math,pV=e=>Gt.floor(tWe(e+1));function mV({right:e,left:t,bottom:n,top:r},i){const o=nWe(pV(e-t),pV(n-r))-i,s=2**o,l={left:Gt.floor(t/s),right:Gt.ceil((e+1)/s),top:Gt.floor(r/s),bottom:Gt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Gt.shuffle(_8e({x:Gt.range(l.left,l.right+1),y:Gt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}}))}}const rWe=""+new URL("D2Renderer.worker-c5f0c7ab.js",import.meta.url).href;class iWe extends Worker{constructor(){super(rWe,{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 oWe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:gV,min:vV}=Math,rre=class ire extends Up{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=ire.age++}};rre.age=0;let sWe=rre;function rS(e,t){return Gt.isNaN(e)?t:e}var bs,Nr,ad,uu,hi,kl,ld,cd,BC,$C,ore,FC,sre,ug,L1,zC,jC,are,UC,lre,HC,cre,WC,ure,N1,K3,B1,Q3,GC,dre,$1,J3,VC,fre,qC,hre,XC,pre;class aWe extends IHe{constructor(){super(...arguments);Zn(this,$C);Zn(this,FC);Zn(this,jC);Zn(this,UC);Zn(this,HC);Zn(this,WC);Zn(this,N1);Zn(this,B1);Zn(this,GC);Zn(this,$1);Zn(this,VC);Zn(this,qC);Zn(this,XC);Zn(this,bs,void 0);Zn(this,Nr,void 0);Zn(this,ad,void 0);Zn(this,uu,void 0);Zn(this,hi,j7);Zn(this,kl,[]);Zn(this,ld,new x8e(16));Zn(this,cd,void 0);Zn(this,BC,0);Zn(this,ug,Gt.once(()=>Gt.debounce(()=>Mi(this,N1,K3).call(this),Ze(this,hi).debounceInterval)));Zn(this,L1,Gt.once(()=>Gt.throttle(()=>Mi(this,B1,Q3).call(this),Ze(this,hi).refreshInterval)));Zn(this,zC,Gt.once(()=>Gt.throttle(n=>Mi(this,GC,dre).call(this,n),Ze(this,hi).refreshInterval)))}getInstance(){return{app:Ze(this,bs),viewport:Ze(this,Nr)}}fitCamera(n=Gt.constant(!0)){var i,o,s,l;const r=Gt.values(Ze(this,ld).all()).flat().filter(n);if(r.length){const c=Gt.reduce(r,(d,f)=>({top:rS(vV(d.top,f.top),d.top),left:rS(vV(d.left,f.left),d.left),bottom:rS(gV(d.bottom,f.bottom),d.bottom),right:rS(gV(d.right,f.right),d.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(l=(i=Ze(this,Nr))==null?void 0:i.animate)==null||l.call(i,{position:new Ot((c.left+c.right)/2,(c.top+c.bottom)/2),scale:((s=(o=Ze(this,Nr))==null?void 0:o.findFit)==null?void 0:s.call(o,c.right-c.left,c.bottom-c.top))*.8,ease:"easeOutExpo",time:Ze(this,hi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}}initialCamera(){var n,r;(r=(n=Ze(this,Nr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:Ze(this,hi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}getView(){var n;return(n=Ze(this,bs))==null?void 0:n.view}setup(n){const r={...j7,...n};Mi(this,FC,sre).call(this,r),this.setOptions(r),Mi(this,UC,lre).call(this,r)}destroy(){Gt.map(Ze(this,kl),n=>n.terminate()),Ze(this,bs).destroy()}add(n){const r=WFe();Gt.map(Ze(this,kl),o=>o.call("add",[n,r]));const i=Gt.map(n,({component:o,meta:s})=>({...eWe[o.$].test(o),component:o,meta:s,index:Mi(this,$C,ore).call(this)}));return Ze(this,ld).load(i),()=>Gt.defer(()=>{for(const o of i)Ze(this,ld).remove(o);Gt.map(Ze(this,kl),o=>o.call("remove",[r]))})}setOptions(n){const r={...Ze(this,hi),...n};Mi(this,HC,cre).call(this,r),Jc(this,hi,r),Mi(this,N1,K3).call(this),Mi(this,B1,Q3).call(this)}}bs=new WeakMap,Nr=new WeakMap,ad=new WeakMap,uu=new WeakMap,hi=new WeakMap,kl=new WeakMap,ld=new WeakMap,cd=new WeakMap,BC=new WeakMap,$C=new WeakSet,ore=function(){return Jj(this,BC)._++},FC=new WeakSet,sre=function(n){Jc(this,bs,new Sj({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),Jc(this,Nr,new Nje({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:Ze(this,bs).renderer.events,passiveWheel:!1})),Ze(this,Nr).on("clicked",r=>{const{x:i,y:o}=r.world,s=Ze(this,ld).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})}),Ze(this,bs).stage.addChild(Ze(this,Nr)),Ze(this,Nr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Ze(this,Nr).on("moved",()=>{Ze(this,ug).call(this)(),Ze(this,L1).call(this)()}),Ze(this,Nr).on("mousemove",r=>Ze(this,zC).call(this)(r)),Jc(this,ad,new Ko),Ze(this,Nr).addChild(Ze(this,ad)),Jc(this,uu,new Hg),Ze(this,Nr).addChild(Ze(this,uu)),Jc(this,cd,new Hg),Ze(this,Nr).addChild(Ze(this,cd)),Mi(this,jC,are).call(this)},ug=new WeakMap,L1=new WeakMap,zC=new WeakMap,jC=new WeakSet,are=function(){const{dynamicResolution:n}=Ze(this,hi),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:l,minScale:c}=n,d=Gt.floor(Xr.targetFPMS*s);let f=0,h=0,p=1;Ze(this,bs).ticker.add(g=>{const{tileResolution:v}=Ze(this,hi);if(!(f%d)){const y=h/d;p=Gt.clamp(y>=r?p+o:y<=i?p-o:p,c,l),Gt.map(Ze(this,kl),S=>{S.call("setTileResolution",[{width:Gt.ceil(v.width/p),height:Gt.ceil(v.height/p)}])}),h=0}h+=g,f++})},UC=new WeakSet,lre=function(n){Gt.map(Ze(this,kl),r=>r.terminate()),Jc(this,kl,Gt.times(n.workerCount,r=>{const i=new iWe;return i.on("update",o=>Mi(this,WC,ure).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},HC=new WeakSet,cre=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=Ze(this,bs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=Ze(this,Nr))==null||c.resize(r,i)},WC=new WeakSet,ure=function({bounds:n,bitmap:r}){const i=ht.from(r);Mi(this,VC,fre).call(this,i,n)},N1=new WeakSet,K3=function(){const{top:n,bottom:r,left:i,right:o}=Ze(this,Nr);Gt.map(Ze(this,kl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},B1=new WeakSet,Q3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=Ze(this,hi),{tiles:i}=mV(Ze(this,Nr),n),o=Mi(this,$1,J3).call(this);(s=Ze(this,uu))==null||s.clear(),(l=Ze(this,uu))==null||l.lineStyle(1*o,r,.5),(c=Ze(this,uu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Gt.find((d=Ze(this,ad))==null?void 0:d.children,g=>Gt.isEqual(g.bounds,h))||(f=Ze(this,uu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},GC=new WeakSet,dre=function(n){var c;const{accentColor:r}=Ze(this,hi),i=Mi(this,$1,J3).call(this),{x:o,y:s}=Ze(this,Nr).toWorld(n.globalX,n.globalY),l=Ze(this,ld).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});Ze(this,cd).clear(),Ze(this,cd).lineStyle(2*i,r,1);for(const d of l)(c=Ze(this,cd))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},$1=new WeakSet,J3=function(){const{right:n,left:r}=Ze(this,Nr),{width:i}=Ze(this,hi).screenSize;return(n-r)/i},VC=new WeakSet,fre=async function(n,r){var s,l;const{tileSubdivision:i}=Ze(this,hi),{tiles:o}=mV(Ze(this,Nr),i);if(Gt.find(o,c=>Gt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},d=new sWe(n,r);(s=Ze(this,ad))==null||s.addChild(d).setTransform(r.left,r.top,c.x,c.y),Ze(this,L1).call(this)(),await Mi(this,qC,hre).call(this,d),Gt.forEach((l=Ze(this,ad))==null?void 0:l.children,async f=>{oWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/Xr.targetFPMS/Ze(this,hi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},XC=new WeakSet,pre=function(n){const r=Ze(this,bs).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/Xr.targetFPMS/Ze(this,hi).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const lWe=d8e(aWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),cWe={"d2-renderer":lWe};var uWe=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},Rj={},dWe=Object.prototype.hasOwnProperty,fWe;function yV(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function bV(e){try{return encodeURIComponent(e)}catch{return null}}function hWe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=yV(r[1]),o=yV(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function pWe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(dWe.call(e,i)){if(r=e[i],!r&&(r===null||r===fWe||isNaN(r))&&(r=""),i=bV(i),r=bV(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Rj.stringify=pWe;Rj.parse=hWe;var mre=uWe,Qk=Rj,mWe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,gre=/[\n\r\t]/g,gWe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,vre=/:\d+$/,vWe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,yWe=/^[a-zA-Z]:/;function Ij(e){return(e||"").toString().replace(mWe,"")}var Z3=[["#","hash"],["?","query"],function(t,n){return ql(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]],xV={hash:1,query:1};function yre(e){var t;typeof window<"u"?t=window:typeof Bt<"u"?t=Bt: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 Zl(unescape(e.pathname),{});else if(i==="string"){r=new Zl(e,{});for(o in xV)delete r[o]}else if(i==="object"){for(o in e)o in xV||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=gWe.test(e.href))}return r}function ql(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function bre(e,t){e=Ij(e),e=e.replace(gre,""),t=t||{};var n=vWe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):ql(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&ql(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||ql(r),slashesCount:s,rest:l}}function bWe(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 Zl(e,t,n){if(e=Ij(e),e=e.replace(gre,""),!(this instanceof Zl))return new Zl(e,t,n);var r,i,o,s,l,c,d=Z3.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Qk.parse),t=yre(t),i=bre(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||yWe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!ql(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new wre[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const CWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function TWe({value:e,onValueChange:t}){const[n]=Tk(),r=ee.find(n,{key:e.key});function i(s){t==null||t(ak(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(_n,{alignItems:"center",py:.5,children:[C.jsx(lte,{sx:{color:CWe[o]}}),C.jsx(vi,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ee.startCase(o)}),C.jsx(zt,{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: ",ee.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(Mu,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(aj,{trigger:s=>C.jsx(Gh,{icon:C.jsx(sk,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(sj,{children:"Edit Renderer"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(K1,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(vx,{placeholder:"Renderer Type",items:ee.entries(wre).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Pj={},Jk={},_w={};(function(e){var t=Bt&&Bt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(_w);var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});Sw.DefaultErrorCode=void 0;Sw.DefaultErrorCode=0;var wV=Bt&&Bt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},_V=Bt&&Bt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const HWe={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){Vp(this,"handler");this.options=t;const{hostname:n}=xre(t.url);this.handler=HWe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const ec=Object.create(null);ec.open="0";ec.close="1";ec.ping="2";ec.pong="3";ec.message="4";ec.upgrade="5";ec.noop="6";const YS=Object.create(null);Object.keys(ec).forEach(e=>{YS[ec[e]]=e});const e5={type:"error",data:"parser error"},Sre=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ere=typeof ArrayBuffer=="function",Cre=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Oj=({type:e,data:t},n,r)=>Sre&&t instanceof Blob?n?r(t):TV(t,r):Ere&&(t instanceof ArrayBuffer||Cre(t))?n?r(t):TV(new Blob([t]),r):r(ec[e]+(t||"")),TV=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function kV(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let YB;function GWe(e,t){if(Sre&&e.data instanceof Blob)return e.data.arrayBuffer().then(kV).then(t);if(Ere&&(e.data instanceof ArrayBuffer||Cre(e.data)))return t(kV(e.data));Oj(e,!1,n=>{YB||(YB=new TextEncoder),t(YB.encode(n))})}const AV="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ex=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},qWe=typeof ArrayBuffer=="function",Mj=(e,t)=>{if(typeof e!="string")return{type:"message",data:Tre(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:XWe(e.substring(1),t)}:YS[n]?e.length>1?{type:YS[n],data:e.substring(1)}:{type:YS[n]}:e5},XWe=(e,t)=>{if(qWe){const n=VWe(e);return Tre(n,t)}else return{base64:!0,data:e}},Tre=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},kre=String.fromCharCode(30),YWe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Oj(o,!1,l=>{r[s]=l,++i===n&&t(r.join(kre))})})},KWe=(e,t)=>{const n=e.split(kre),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 KB;function oS(e){return e.reduce((t,n)=>t+n.length,0)}function sS(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(e5);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(oS(n)e){l.enqueue(e5);break}}}})}const Are=4;function Kr(e){if(e)return ZWe(e)}function ZWe(e){for(var t in Kr.prototype)e[t]=Kr.prototype[t];return e}Kr.prototype.on=Kr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Kr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Kr.prototype.off=Kr.prototype.removeListener=Kr.prototype.removeAllListeners=Kr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Rre(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const eGe=Zs.setTimeout,tGe=Zs.clearTimeout;function tA(e,t){t.useNativeTimers?(e.setTimeoutFn=eGe.bind(Zs),e.clearTimeoutFn=tGe.bind(Zs)):(e.setTimeoutFn=Zs.setTimeout.bind(Zs),e.clearTimeoutFn=Zs.clearTimeout.bind(Zs))}const nGe=1.33;function rGe(e){return typeof e=="string"?iGe(e):Math.ceil((e.byteLength||e.size)*nGe)}function iGe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function oGe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function sGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Pre(){const e=PV(+new Date);return e!==IV?(RV=0,IV=e):e+"."+PV(RV++)}for(;aS{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)};KWe(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,YWe(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]=Pre()),!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 Xl(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 Xl extends Kr{constructor(t,n){super(),tA(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=Rre(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Mre(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=Xl.requestsCount++,Xl.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=uGe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Xl.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()}}Xl.requestsCount=0;Xl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",OV);else if(typeof addEventListener=="function"){const e="onpagehide"in Zs?"pagehide":"unload";addEventListener(e,OV,!1)}}function OV(){for(let e in Xl.requests)Xl.requests.hasOwnProperty(e)&&Xl.requests[e].abort()}const Lj=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),lS=Zs.WebSocket||Zs.MozWebSocket,MV=!0,hGe="arraybuffer",DV=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pGe extends Dj{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=DV?{}:Rre(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=MV&&!DV?n?new lS(t,n):new lS(t):new lS(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{MV&&this.ws.send(o)}catch{}i&&Lj(()=>{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]=Pre()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!lS}}class mGe extends Dj{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=JWe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=QWe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Lj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const gGe={websocket:pGe,webtransport:mGe,polling:fGe},vGe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,yGe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function n5(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=vGe.exec(e||""),o={},s=14;for(;s--;)o[yGe[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=bGe(o,o.path),o.queryKey=xGe(o,o.query),o}function bGe(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 xGe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Dre=class bm extends Kr{constructor(t,n={}){super(),this.binaryType=hGe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=n5(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=n5(n.host).host),tA(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=sGe(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=Are,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 gGe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&bm.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;bm.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;bm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",bm.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){bm.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,Lre=Object.prototype.toString,EGe=typeof Blob=="function"||typeof Blob<"u"&&Lre.call(Blob)==="[object BlobConstructor]",CGe=typeof File=="function"||typeof File<"u"&&Lre.call(File)==="[object FileConstructor]";function Nj(e){return _Ge&&(e instanceof ArrayBuffer||SGe(e))||EGe&&e instanceof Blob||CGe&&e instanceof File}function KS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}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 o5 extends Kr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,tA(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||OGe;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 Dre(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=qa(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=qa(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qa(t,"ping",this.onping.bind(this)),qa(t,"data",this.ondata.bind(this)),qa(t,"error",this.onerror.bind(this)),qa(t,"close",this.onclose.bind(this)),qa(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){Lj(()=>{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 Nre(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 Mb={};function QS(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=wGe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Mb[i]&&o in Mb[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new o5(r,t):(Mb[i]||(Mb[i]=new o5(r,t)),c=Mb[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(QS,{Manager:o5,Socket:Nre,io:QS,connect:QS});class DGe{constructor(t){Vp(this,"rpc");Vp(this,"socket");this.options=t,this.socket=QS(t.url),this.rpc=new Pj.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 $j={socketio:{name:"socket.io",constructor:DGe},ipc:{name:"Web Worker",constructor:UWe},native:{name:"Internal",constructor:WWe}};function LGe(e){return $j[e].constructor}const Bre=ee.first(ee.keys($j));function NGe(){const[{renderer:e},t]=Nu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx(TWe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:Bre,url:"",disabled:!0}),addItemExtras:C.jsx(zd,{icon:C.jsx(JK,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:XQ})),children:"Reset to Defaults"})})})}function BGe(e){const[{connections:t}]=yk(),n=Mz(),[{remote:r}]=Nu(),i=ee.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const $Ge={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function FGe({value:e,onValueChange:t}){const n=O2e(e.url),r=BGe(e.url);function i(o){t==null||t(ak(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(_n,{alignItems:"center",py:.5,children:[C.jsx(lte,{sx:{color:$Ge[r]}}),C.jsx(vi,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:n?`${n.name} ${n.version}`:ee.startCase(r)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(Mu,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(aj,{trigger:o=>C.jsx(Gh,{icon:C.jsx(sk,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(sj,{children:"Edit Connection"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(K1,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(vx,{placeholder:"Connection Type",items:ee.entries($j).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function zGe(){const[{remote:e},t]=Nu();return C.jsx(C.Fragment,{children:C.jsx(Dk,{editor:n=>C.jsx(FGe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:Bre,url:"",disabled:!0}),addItemExtras:C.jsx(zd,{icon:C.jsx(JK,{}),sx:{ml:2},onClick:()=>t(()=>({remote:qQ})),children:"Reset to Defaults"})})})}const NV=e=>`${e}x`;function jGe(){const{controls:e,onChange:t,state:n}=Lu(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Nu(),[c,d]=I.useState("general");function f(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(zt,{variant:"body1",children:p})}return C.jsx(QQ,{value:c,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Options,{children:C.jsxs(tJ,{onChange:(p,g)=>d(g),children:[C.jsx(Dm,{label:"General",value:"general"}),C.jsx(Dm,{label:"Connections",value:"connections"}),C.jsx(Dm,{label:"Renderers",value:"renderers"}),C.jsx(Dm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Sn.Content,{children:C.jsx(_n,{vertical:!0,children:C.jsx(iv,{y:!0,children:C.jsxs(_n,{vertical:!0,pt:6,children:[C.jsx($m,{value:"general",children:C.jsxs(dt,{children:[f("Playback"),C.jsxs(_n,{alignItems:"center",children:[h("Playback Rate"),C.jsx(vi,{flex:1}),C.jsx(X0e,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(p=>({value:p*um,label:NV(p)})),step:1*um,min:1*um,max:10*um,valueLabelFormat:p=>NV(p/um),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(_n,{alignItems:"center",children:[h("Acrylic"),C.jsx(vi,{flex:1}),C.jsx(Tg,{defaultChecked:!!i,onChange:(p,g)=>l(()=>({acrylic:g}))})]}),C.jsxs(_n,{alignItems:"center",children:[h("Dark Mode"),C.jsx(vi,{flex:1}),C.jsx(Tg,{defaultChecked:o==="dark",onChange:(p,g)=>l(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(_n,{alignItems:"center",children:[h("Accent"),C.jsx(vi,{flex:1}),C.jsx(Ro,{value:s,items:ee.map(ee.keys(w_e),p=>({id:p,name:ee.startCase(p)})),showArrow:!0,onChange:p=>l(()=>({accentColor:p}))})]})]})}),C.jsx($m,{value:"connections",children:C.jsxs(dt,{children:[f("Solvers"),C.jsx(zGe,{})]})}),C.jsx($m,{value:"renderers",children:C.jsxs(dt,{children:[f("Renderers"),C.jsx(NGe,{})]})}),C.jsx($m,{value:"map-parsers",children:C.jsxs(dt,{children:[f("Map Parsers"),C.jsx(UGe,{})]})})]})})})}),C.jsx(Sn.Extras,{children:e})]})})}function UGe(){return C.jsx(wp,{children:ee.keys(vz).map(e=>C.jsx(Qm,{children:C.jsx(ol,{primary:e,secondary:"Internal"})},e))})}const nA=0,sf=1,xv=2,$re=4;function Fre(e,t){return n=>e(t(n))}function HGe(e,t){return t(e)}function zre(e,t){return n=>e(t,n)}function BV(e,t){return()=>e(t)}function rA(e,t){return t(e),e}function gr(...e){return e}function WGe(e){e()}function $V(e){return()=>e}function GGe(...e){return()=>{e.map(WGe)}}function Fj(e){return e!==void 0}function wv(){}function jn(e,t){return e(sf,t)}function en(e,t){e(nA,t)}function zj(e){e(xv)}function As(e){return e($re)}function St(e,t){return jn(e,zre(t,nA))}function Ru(e,t){const n=e(sf,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case xv:e.splice(0,e.length);return;case sf:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case nA:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function et(e){let t=e;const n=yn();return(r,i)=>{switch(r){case sf:i(t);break;case nA:t=i;break;case $re:return t}return n(r,i)}}function VGe(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case sf:return o?n===o?void 0:(r(),n=o,t=jn(e,o),t):(r(),wv);case xv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Ds(e){return rA(yn(),t=>St(e,t))}function ko(e,t){return rA(et(t),n=>St(e,n))}function qGe(...e){return t=>e.reduceRight(HGe,t)}function Pe(e,...t){const n=qGe(...t);return(r,i)=>{switch(r){case sf:return jn(e,n(i));case xv:zj(e);return}}}function jre(e,t){return e===t}function hr(e=jre){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>Fre(t,e)}function cu(e){return t=>()=>t(e)}function Nl(e,t){return n=>r=>n(t=e(t,r))}function Gg(e){return t=>n=>{e>0?e--:t(n)}}function yd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function FV(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function zV(...e){return function(t,n){switch(t){case sf:return GGe(...e.map(r=>jn(r,n)));case xv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Ut(e,t=jre){return Pe(e,hr(t))}function yi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case sf:return r===i&&s(n),jn(t,s);case xv:return zj(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:XGe(),constructor:e,dependencies:t,singleton:n}}const XGe=()=>Symbol();function YGe(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function KGe(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=VGe(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>rA(YGe(e),A=>c(A,b))),[E]=de.useState(BV(f,x));return cS(()=>{for(const A of s)A in b&&jn(E[A],b[A]);return()=>{Object.values(E).map(zj)}},[b,E,x]),cS(()=>{c(x,b)}),de.useImperativeHandle(S,$V(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,KGe([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(zre(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState(BV(As,_));return cS(()=>jn(_,E=>{E!==b&&x($V(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];cS(()=>jn(b,S),[S,b])}}}const QGe=typeof document<"u"?de.useLayoutEffect:de.useEffect,JGe=QGe;var Ls=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ls||{});const ZGe={0:"debug",1:"log",2:"warn",3:"error"},e9e=()=>typeof globalThis>"u"?window:globalThis,af=$n(()=>{const e=et(3);return{log:et((n,r,i=1)=>{var o;const s=(o=e9e().VIRTUOSO_LOG_LEVEL)!=null?o:As(e);i>=s&&console[ZGe[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function jj(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Wp(e,t=!0){return jj(e,t).callbackRef}function t9e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=n9e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(r9e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return jj(l,n)}function n9e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():Mm.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Vd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Vd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),Hre(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Mo=$n(()=>{const e=yn(),t=yn(),n=et(0),r=yn(),i=et(0),o=yn(),s=yn(),l=et(0),c=et(0),d=et(0),f=et(0),h=yn(),p=yn(),g=et(!1);return St(Pe(e,lt(({scrollTop:v})=>v)),t),St(Pe(e,lt(({scrollHeight:v})=>v)),s),St(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),I1={lvl:0};function Gre(e,t,n,r=I1,i=I1){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===I1}function cg(){return I1}function s5(e,t){if(Kn(e))return I1;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=Vre(r);return JS(ci(e,{k:o,v:s,l:qre(r)}))}}else return tt&&(l=l.concat(a5(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(a5(s,t,n))),l}function ep(e){return Kn(e)?[]:[...ep(e.l),{k:e.k,v:e.v},...ep(e.r)]}function Vre(e){return Kn(e.r)?[e.k,e.v]:Vre(e.r)}function qre(e){return Kn(e.r)?e.l:JS(ci(e,{r:qre(e.r)}))}function ci(e,t){return Gre(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 QB(e){return Kn(e)||e.lvl>e.r.lvl}function jV(e){return l5(Yre(e))}function JS(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(QB(t))return Yre(ci(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ci(t.r,{l:ci(t,{r:t.r.l}),r:ci(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(QB(e))return l5(ci(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=QB(i)?n.lvl-1:n.lvl;return ci(i,{l:ci(e,{r:i.l,lvl:r-1}),r:l5(ci(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function iA(e,t,n){if(Kn(e))return[];const r=pl(e,t)[0];return i9e(a5(e,r,n))}function Xre(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 l5(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ci(t,{l:ci(e,{r:t.l}),lvl:n+1}):e}function Yre(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ci(t,{r:ci(e,{l:t.r})}):e}function MC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Kre(e,t,n){return e[MC(e,t,n)]}function o9e(e,t,n,r){const i=MC(e,t,r),o=MC(e,n,r,i);return e.slice(i,o+1)}const Uj=$n(()=>({recalcInProgress:et(!1)}),[],{singleton:!0});function s9e(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 UV(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=s5(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=Cs(e,s+1,p));d&&(e=Cs(e,o,i))}return[e,n]}function l9e(){return{offsetTree:[],sizeTree:cg(),groupOffsetTree:cg(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Hj({index:e},t){return t===e?0:t0&&(t=Math.max(t,Kre(e,r,Hj).offset)),Xre(o9e(e,t,n,c9e),u9e)}function c5(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=MC(i,t-1,Hj),l=i[c].offset;const f=pl(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===pl(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of iA(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function f9e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ls.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>Cs(Cs(v,y,p),y+1,g),s)}else[s,l]=a9e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=c5(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>Cs(p,g,O1(g,c,i)),cg()),groupIndices:n}}function O1(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Kre(t,e,Hj),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function h9e(e){return typeof e.groupIndex<"u"}function Qre(e,t,n){if(h9e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=Jre(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function Jre(e,t){if(!oA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function oA(e){return!Kn(e.groupOffsetTree)}function p9e(e){return ep(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 m9e={offsetHeight:"height",offsetWidth:"width"},ac=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=ko(r,0),o=yn(),s=yn(),l=et(0),c=et([]),d=et(void 0),f=et(void 0),h=et((A,R)=>Vd(A,m9e[R])),p=et(void 0),g=et(0),v=l9e(),y=ko(Pe(n,an(c,e,g),Nl(f9e,v),hr()),v),S=ko(Pe(c,hr(),Nl((A,R)=>({prev:A.current,current:R}),{prev:[],current:[]}),lt(({prev:A})=>A)),[]);St(Pe(c,Ht(A=>A.length>0),an(y,g),lt(([A,R,k])=>{const O=A.reduce((L,N,H)=>Cs(L,N,O1(N,R.offsetTree,k)||H),cg());return{...R,groupIndices:A,groupOffsetTree:O}})),y),St(Pe(r,an(y),Ht(([A,{lastIndex:R}])=>A[{startIndex:A,endIndex:R,size:k}])),n),St(d,f);const _=ko(Pe(d,lt(A=>A===void 0)),!0);St(Pe(f,Ht(A=>A!==void 0&&Kn(As(y).sizeTree)),lt(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=Ds(Pe(n,an(y),Nl(({sizes:A},[R,k])=>({changed:k!==A,sizes:k}),{changed:!1,sizes:v}),lt(A=>A.changed)));jn(Pe(l,Nl((A,R)=>({diff:A.prev-R,prev:R}),{diff:0,prev:0}),lt(A=>A.diff)),A=>{const{groupIndices:R}=As(y);if(A>0)en(t,!0),en(o,A+UV(A,R));else if(A<0){const k=As(S);k.length>0&&(A-=UV(-A,k)),en(s,A)}}),jn(Pe(l,an(e)),([A,R])=>{A<0&&R("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Ls.ERROR)});const x=Ds(o);St(Pe(o,an(y),lt(([A,R])=>{const k=R.groupIndices.length>0,O=[],L=R.lastSize;if(k){const N=P1(R.sizeTree,0);let H=0,W=0;for(;H{let G=F.ranges;return F.prevSize!==0&&(G=[...F.ranges,{startIndex:F.prevIndex,endIndex:j+A-1,size:F.prevSize}]),{ranges:G,prevIndex:j+A,prevSize:V}},{ranges:O,prevIndex:A,prevSize:0}).ranges}return ep(R.sizeTree).reduce((N,{k:H,v:W})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:W}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Ds(Pe(s,an(y,g),lt(([A,{offsetTree:R},k])=>{const O=-A;return O1(O,R,k)})));return St(Pe(s,an(y,g),lt(([A,R,k])=>{if(R.groupIndices.length>0){if(Kn(R.sizeTree))return R;let L=cg();const N=As(S);let H=0,W=0,z=0;for(;H<-A;){z=N[W];const F=N[W+1]-z-1;W++,H+=F+1}if(L=ep(R.sizeTree).reduce((F,{k:j,v:V})=>Cs(F,Math.max(0,j+A),V),L),H!==-A){const F=P1(R.sizeTree,z);L=Cs(L,0,F);const j=pl(R.sizeTree,-A+1)[1];L=Cs(L,1,j)}return{...R,sizeTree:L,...c5(R.offsetTree,0,L,k)}}else{const L=ep(R.sizeTree).reduce((N,{k:H,v:W})=>Cs(N,Math.max(0,H+A),W),cg());return{...R,sizeTree:L,...c5(R.offsetTree,0,L,k)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(af,Uj),{singleton:!0}),g9e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Zre(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!g9e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ew=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=et(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return St(Pe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,A,R,k,O,L,N],H,W,z])=>{const D=Zre(x),{align:F,behavior:j,offset:V}=D,G=R-1,K=Qre(D,E,G);let Y=O1(K,E.offsetTree,H)+O;F==="end"?(Y+=W+pl(E.sizeTree,K)[1]-A+z,K===G&&(Y+=L)):F==="center"?Y+=(W+pl(E.sizeTree,K)[1]-A+z)/2:Y-=k,V&&(Y+=V);const J=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Ls.DEBUG),en(g,x)):N("list did not change, scroll successful",{},Ls.DEBUG)};if(b(),j==="smooth"){let ie=!1;_=jn(n,ce=>{ie=ie||ce}),y=Ru(l,()=>{J(ie)})}else y=Ru(Pe(n,v9e(150)),J);return S=setTimeout(()=>{b()},1200),en(i,!0),N("scrolling from index to",{index:K,top:Y,behavior:j},Ls.DEBUG),{top:Y,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},gr(ac,Mo,af),{singleton:!0});function v9e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const M1="up",Ix="down",y9e="none",b9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},x9e=0,Cw=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=et(!1),l=et(!0),c=yn(),d=yn(),f=et(4),h=et(x9e),p=ko(Pe(zV(Pe(Ut(t),Gg(1),cu(!0)),Pe(Ut(t),Gg(1),cu(!1),FV(100))),hr()),!1),g=ko(Pe(zV(Pe(o,cu(!0)),Pe(o,cu(!1),FV(200))),hr()),!1);St(Pe(yi(Ut(t),Ut(h)),lt(([b,x])=>b<=x),hr()),l),St(Pe(l,yd(50)),d);const v=Ds(Pe(yi(e,Ut(n),Ut(r),Ut(i),Ut(f)),Nl((b,[{scrollTop:x,scrollHeight:E},A,R,k,O])=>{const L=x+A-E>-O,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(L){let W,z;return x>b.state.scrollTop?(W="SCROLLED_DOWN",z=b.state.scrollTop-x):(W="SIZE_DECREASED",z=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:W,scrollTopDelta:z}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=ko(Pe(e,Nl((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if(Hre(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const R=E-(x+A)<1;return b.scrollTop!==x&&R?{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),lt(b=>b.jump)),0);St(Pe(v,lt(b=>b.atBottom)),s),St(Pe(s,yd(50)),c);const S=et(Ix);St(Pe(e,lt(({scrollTop:b})=>b),hr(),Nl((b,x)=>As(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),St(Pe(e,yd(50),cu(y9e)),S);const _=et(0);return St(Pe(p,Ht(b=>!b),cu(0)),_),St(Pe(t,yd(100),an(p),Ht(([b,x])=>!!x),Nl(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Mo)),lf=$n(([{log:e}])=>{const t=et(!1),n=Ds(Pe(t,Ht(r=>r),hr()));return jn(t,r=>{r&&As(e)("props updated",{},Ls.DEBUG)}),{propsReady:t,didMount:n}},gr(af),{singleton:!0});function Wj(e,t){e==0?t():requestAnimationFrame(()=>Wj(e-1,t))}function Gj(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Tw=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=et(!0),l=et(0),c=et(!1);return St(Pe(o,an(l),Ht(([d,f])=>!!f),cu(!1)),s),jn(Pe(yi(t,o),an(s,e,n,c),Ht(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||Fj(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),Wj(3,()=>{Ru(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(ac,Mo,Ew,lf),{singleton:!0});function HV(e){return e?e==="smooth"?"smooth":"auto":!1}const w9e=(e,t)=>typeof e=="function"?HV(e(t)):t&&HV(e),_9e=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=et(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}jn(Pe(yi(Pe(Ut(e),Gg(1)),l),an(Ut(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let A=S&&x,R="auto";return A&&(R=w9e(_,b||E),A=A&&!!R),{totalCount:y,shouldFollow:A,followOutputBehavior:R}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Ru(t,()=>{As(c)("following output to ",{totalCount:y},Ls.DEBUG),g(S),p=null})});function v(y){const S=Ru(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(As(c)("scrolling to bottom due to increased size",{},Ls.DEBUG),g("auto"))});setTimeout(S,100)}return jn(Pe(yi(Ut(f),e,s),Ht(([y,,S])=>y&&S),Nl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),jn(h,()=>{v(As(f)!==!1)}),jn(yi(Ut(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(ac,Cw,Ew,Tw,lf,af,Mo));function S9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const eie=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Ds(Pe(o,lt(S9e)));return St(Pe(l,lt(c=>c.totalCount)),e),St(Pe(l,lt(c=>c.groupIndices)),t),St(Pe(yi(r,n,i),Ht(([c,d])=>oA(d)),lt(([c,d,f])=>pl(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(ac,Mo));function D1(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function tie(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const DC="top",LC="bottom",WV="none";function GV(e,t,n){return typeof e=="number"?n===M1&&t===DC||n===Ix&&t===LC?e:0:n===M1?t===DC?e.main:e.reverse:t===LC?e.main:e.reverse}function VV(e,t){return typeof e=="number"?e:e[t]||0}const Vj=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=et(0),l=et(0),c=et(0),d=ko(Pe(yi(Ut(e),Ut(t),Ut(r),Ut(o,D1),Ut(c),Ut(s),Ut(i),Ut(n),Ut(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,A=S+_,R=Math.max(p-E,0);let k=WV;const O=VV(x,DC),L=VV(x,LC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+A-O&&(k=M1),vf!=null),hr(D1)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Mo),{singleton:!0});function E9e(e,t,n){if(oA(t)){const r=Jre(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 JB={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function qV(e,t,n){if(e.length===0)return[];if(!oA(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=iA(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:qV(e,i,o),topItems:qV(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function nie(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=Gj(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return ZS(d,[],l,i,n,r)}const Gp=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=et([]),S=et(0),_=yn();St(o.topItemsIndexes,y);const b=ko(Pe(yi(g,v,Ut(s,D1),Ut(t),Ut(e),Ut(f),d,Ut(y),Ut(r),Ut(i),n),Ht(([R,k,,O,,,,,,,L])=>{const N=L&&L.length!==O;return R&&!k&&!N}),lt(([,,[R,k],O,L,N,H,W,z,D,F])=>{const j=L,{sizeTree:V,offsetTree:G}=j,K=As(S);if(O===0)return{...JB,totalCount:O};if(R===0&&k===0)return K===0?{...JB,totalCount:O}:nie(K,N,L,z,D,F||[]);if(Kn(V))return K>0?null:ZS(E9e(Gj(N,O),j,F),[],O,D,j,z);const Y=[];if(W.length>0){const se=W[0],Q=W[W.length-1];let ae=0;for(const le of iA(V,se,Q)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,Q);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return ZS([],Y,O,D,j,z);const J=W.length>0?W[W.length-1]+1:0,ie=d9e(G,R,k,J);if(ie.length===0)return null;const ce=O-1,ue=rA([],se=>{for(const Q of ie){const ae=Q.value;let le=ae.offset,he=Q.start;const pe=ae.size;if(ae.offset=k);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return ZS(ue,Y,O,D,j,z)}),Ht(R=>R!==null),hr()),JB);St(Pe(n,Ht(Fj),lt(R=>R==null?void 0:R.length)),t),St(Pe(b,lt(R=>R.topListHeight)),h),St(h,c),St(Pe(b,lt(R=>[R.top,R.bottom])),l),St(Pe(b,lt(R=>R.items)),_);const x=Ds(Pe(b,Ht(({items:R})=>R.length>0),an(t,n),Ht(([{items:R},k])=>R[R.length-1].originalIndex===k-1),lt(([,R,k])=>[R-1,k]),hr(D1),lt(([R])=>R))),E=Ds(Pe(b,yd(200),Ht(({items:R,topItems:k})=>R.length>0&&R[0].originalIndex===k.length),lt(({items:R})=>R[0].index),hr())),A=Ds(Pe(b,Ht(({items:R})=>R.length>0),lt(({items:R})=>{let k=0,O=R.length-1;for(;R[k].type==="group"&&kk;)O--;return{startIndex:R[k].index,endIndex:R[O].index}}),hr(tie)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:_,initialItemCount:S,...p}},gr(ac,eie,Vj,Tw,Ew,Cw,lf,Uj),{singleton:!0}),C9e=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(St(Pe(l,an(o),Ht(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>nie(c,d,f,h,p,g))),s),{}),gr(ac,Tw,Gp,lf),{singleton:!0}),rie=$n(([{scrollVelocity:e}])=>{const t=et(!1),n=yn(),r=et(!1);return St(Pe(e,an(r,t,n),Ht(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),jn(Pe(yi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Cw),{singleton:!0}),T9e=$n(([{topItemsIndexes:e}])=>{const t=et(0);return St(Pe(t,Ht(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Gp)),iie=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=ko(Pe(yi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return St(Ut(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Mo,Gp),{singleton:!0});function oie(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const k9e=oie(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),A9e=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Ds(Pe(c,an(l),Nl(([,_,b,x],[{items:E,totalCount:A,bottom:R,offsetBottom:k},O])=>{const L=R+k;let N=0;return b===A&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,A,L]},[0,[],0,0]),Ht(([_])=>_!==0),an(t,s,r,o,g,v),Ht(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===M1),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Ls.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return jn(Pe(y,an(n,i)),([_,b,x])=>{x&&k9e()?en(n,b-_):S(-_)}),jn(Pe(yi(ko(i,!1),n,v),Ht(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),yd(1)),S),St(Pe(f,lt(_=>({top:-_}))),e),jn(Pe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function R(k){return k*(b+A)}if(x.length===0)return R(_);{let k=0;const O=P1(E,0);let L=0,N=0;for(;L<_;){L++,k+=O;let H=x.length===N+1?1/0:x[N+1]-x[N]-1;L+H>_&&(k-=O,H=_-L+1),L+=H,k+=R(H),N++}return k}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Mo,Cw,Gp,ac,af,Uj)),R9e=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=et(0);return jn(Pe(e,an(r),Ht(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{Ru(Pe(n,Gg(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(lf,Mo,Gp),{singleton:!0}),I9e=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=et(!1),r=ko(Pe(yi(n,e,t),Ht(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),yd(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Mo,iie),{singleton:!0}),qj=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=et(!1),s=et(void 0);return St(Pe(yi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),St(Pe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Mo)),P9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,O9e=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return St(Pe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:A,align:R,calculateViewLocation:k=P9e,...O}=h,L=Qre(h,p,v-1),N=O1(L,p.offsetTree,x)+y+S,H=N+pl(p.sizeTree,L)[1],W=b+S,z=b+g-_,D=k({itemTop:N,itemBottom:H,viewportTop:W,viewportBottom:z,locationParams:{behavior:A,align:R,...O}});return D?E&&Ru(Pe(c,Ht(F=>F===!1),Gg(As(c)?1:2)),E):E&&E(),D}),Ht(h=>h!==null)),d),{scrollIntoView:f}},gr(ac,Mo,Ew,Gp,af),{singleton:!0}),M9e=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=et(void 0),f=et(null),h=et(null);return St(s,f),St(l,h),jn(Pe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=p9e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),St(Pe(d,Ht(Fj),lt(D9e)),r),St(Pe(i,an(d),Ht(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(ac,Mo,Tw,lf,qj));function D9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const L9e=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(Vj,C9e,lf,rie,iie,R9e,I9e,qj,O9e,af)),N9e=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:R},{groupCounts:k},O])=>(St(x.rangeChanged,O.scrollSeekRangeChanged),St(Pe(O.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:R,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),gr(ac,Tw,Mo,M9e,_9e,Gp,Ew,A9e,T9e,eie,L9e)),ZB="-webkit-sticky",XV="sticky",sie=oie(()=>{if(typeof document>"u")return XV;const e=document.createElement("div");return e.style.position=ZB,e.style.position===ZB?ZB:XV});function aie(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=jj(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const lie=de.createContext(void 0),cie=de.createContext(void 0);function uie(e){return e}const B9e=$n(()=>{const e=et(c=>`Item ${c}`),t=et(null),n=et(c=>`Group ${c}`),r=et({}),i=et(uie),o=et("div"),s=et(wv),l=(c,d=null)=>ko(Pe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),$9e=$n(([e,t])=>({...e,...t}),gr(N9e,B9e)),F9e=({height:e})=>de.createElement("div",{style:{height:e}}),z9e={position:sie(),zIndex:1,overflowAnchor:"none"},j9e={overflowAnchor:"none"},YV=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=aa("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=aa("windowScrollContainerState"),l=aa("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=aa("gap"),{callbackRef:S}=t9e(r,g,p,t?wv:c,v,y,o),[_,b]=de.useState(0);Xj("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||F9e,A=mn("ListComponent"),R=mn("ItemComponent"),k=mn("GroupComponent"),O=mn("computeItemKey"),L=mn("isSeeking"),N=mn("groupIndices").length>0,H=mn("paddingTopAddition"),W=mn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...W?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,zo(x,f)):de.createElement(A,{...zo(A,f),ref:S,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,j=O(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...zo(E,f),key:j,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(k,{...zo(k,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:z9e},h(D.index,f)):de.createElement(R,{...zo(R,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:j9e},N?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),U9e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},sA={width:"100%",height:"100%",position:"absolute",top:0},H9e={width:"100%",position:sie(),top:0,zIndex:1};function zo(e,t){if(typeof e!="string")return{context:t}}const W9e=de.memo(function(){const t=mn("HeaderComponent"),n=aa("headerHeight"),r=mn("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),G9e=de.memo(function(){const t=mn("FooterComponent"),n=aa("footerHeight"),r=mn("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null});function die({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=Wre(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...U9e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...zo(d,p)},s)})}function fie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=Wre(c,f,d,wv,g);return JGe(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...zo(d,v)},s)})}const V9e=({children:e})=>{const t=de.useContext(lie),n=aa("viewportHeight"),r=aa("fixedItemHeight"),i=Wp(Fre(n,o=>Vd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:sA,ref:i,"data-viewport-type":"element"},e)},q9e=({children:e})=>{const t=de.useContext(lie),n=aa("windowViewportRect"),r=aa("fixedItemHeight"),i=mn("customScrollParent"),o=aie(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:sA,"data-viewport-type":"window"},e)},X9e=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...H9e,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},Y9e=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?J9e:Q9e,s=i||n?q9e:V9e;return de.createElement(o,{...t},r&&de.createElement(X9e,null,de.createElement(YV,{showTopList:!0})),de.createElement(s,null,de.createElement(W9e,null),de.createElement(YV,null),de.createElement(G9e,null)))}),{Component:K9e,usePublisher:aa,useEmitterValue:mn,useEmitter:Xj}=Ure($9e,{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"}},Y9e),Q9e=die({usePublisher:aa,useEmitterValue:mn,useEmitter:Xj}),J9e=fie({usePublisher:aa,useEmitterValue:mn,useEmitter:Xj}),Z9e=K9e,KV={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},e7e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:QV,ceil:JV,floor:NC,min:e$,max:Px}=Math;function t7e(e){return{...e7e,items:e}}function ZV(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 n7e(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 r7e=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=et(0),R=et(0),k=et(KV),O=et({height:0,width:0}),L=et({height:0,width:0}),N=yn(),H=yn(),W=et(0),z=et(null),D=et({row:0,column:0}),F=yn(),j=yn(),V=et(!1),G=et(0),K=et(!0),Y=et(!1);jn(Pe(v,an(G),Ht(([Q,ae])=>!!ae)),()=>{en(K,!1),en(R,0)}),jn(Pe(yi(v,K,L,O,G,Y),Ht(([Q,ae,le,he,,pe])=>Q&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,Q])=>{en(Y,!0),Wj(1,()=>{en(N,Q)}),Ru(Pe(r),()=>{en(n,[0,0]),en(K,!0)})}),St(Pe(j,Ht(Q=>Q!=null&&Q.scrollTop>0),cu(0)),R),jn(Pe(v,an(j),Ht(([,Q])=>Q!=null)),([,Q])=>{Q&&(en(O,Q.viewport),en(L,Q==null?void 0:Q.item),en(D,Q.gap),Q.scrollTop>0&&(en(V,!0),Ru(Pe(r,Gg(1)),ae=>{en(V,!1)}),en(s,{top:Q.scrollTop})))}),St(Pe(O,lt(({height:Q})=>Q)),i),St(Pe(yi(Ut(O,uS),Ut(L,uS),Ut(D,(Q,ae)=>Q&&Q.column===ae.column&&Q.row===ae.row),Ut(r)),lt(([Q,ae,le,he])=>({viewport:Q,item:ae,gap:le,scrollTop:he}))),F),St(Pe(yi(Ut(A),t,Ut(D,n7e),Ut(L,uS),Ut(O,uS),Ut(z),Ut(R),Ut(V),Ut(K),Ut(G)),Ht(([,,,,,,,Q])=>!Q),lt(([Q,[ae,le],he,pe,ve,ye,xe,,me,be])=>{const{row:Qe,column:qe}=he,{height:at,width:Nt}=pe,{width:Ie}=ve;if(xe===0&&(Q===0||Ie===0))return KV;if(Nt===0){const Rt=Gj(be,Q),ct=Rt===0?Math.max(xe-1,0):Rt;return t7e(ZV(Rt,ct,ye))}const ze=hie(Ie,Nt,qe);let it,pt;me?ae===0&&le===0&&xe>0?(it=0,pt=xe-1):(it=ze*NC((ae+Qe)/(at+Qe)),pt=ze*JV((le+Qe)/(at+Qe))-1,pt=e$(Q-1,Px(pt,ze-1)),it=e$(pt,Px(0,it))):(it=0,pt=-1);const mt=ZV(it,pt,ye),{top:_e,bottom:je}=eq(ve,he,pe,mt),Ye=JV(Q/ze),Ne=Ye*at+(Ye-1)*Qe-je;return{items:mt,offsetTop:_e,offsetBottom:Ne,top:_e,bottom:je,itemHeight:at,itemWidth:Nt}})),k),St(Pe(z,Ht(Q=>Q!==null),lt(Q=>Q.length)),A),St(Pe(yi(O,L,k,D),Ht(([Q,ae,{items:le}])=>le.length>0&&ae.height!==0&&Q.height!==0),lt(([Q,ae,{items:le},he])=>{const{top:pe,bottom:ve}=eq(Q,he,ae,le);return[pe,ve]}),hr(D1)),n);const J=et(!1);St(Pe(r,an(J),lt(([Q,ae])=>ae||Q!==0)),J);const ie=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0),an(A,J),Ht(([{items:Q},ae,le])=>le&&Q[Q.length-1].index===ae-1),lt(([,Q])=>Q-1),hr())),ce=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0&&Q[0].index===0),cu(0),hr())),ue=Ds(Pe(Ut(k),an(V),Ht(([{items:Q},ae])=>Q.length>0&&!ae),lt(([{items:Q}])=>({startIndex:Q[0].index,endIndex:Q[Q.length-1].index})),hr(tie),yd(0)));St(ue,p.scrollSeekRangeChanged),St(Pe(N,an(O,L,A,D),lt(([Q,ae,le,he,pe])=>{const ve=Zre(Q),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=Px(0,be,e$(he-1,be));let Qe=u5(ae,pe,le,be);return ye==="end"?Qe=QV(Qe-ae.height+le.height):ye==="center"&&(Qe=QV(Qe-ae.height/2+le.height/2)),me&&(Qe+=me),{top:Qe,behavior:xe}})),s);const se=ko(Pe(k,lt(Q=>Q.offsetBottom+Q.bottom)),0);return St(Pe(y,lt(Q=>({width:Q.visibleWidth,height:Q.visibleHeight}))),O),{data:z,totalCount:A,viewportDimensions:O,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:W,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:R,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:G,gridState:k,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(Vj,Mo,Cw,rie,lf,qj,af));function eq(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=u5(e,t,n,r[0].index),s=u5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function u5(e,t,n,r){const i=hie(e.width,n.width,t.column),o=NC(r/i),s=o*n.height+Px(0,o-1)*t.row;return s>0?s+t.row:s}function hie(e,t,n){return Px(1,NC((e+n)/(NC(t)+n)))}const i7e=$n(()=>{const e=et(d=>`Item ${d}`),t=et({}),n=et(null),r=et("virtuoso-grid-item"),i=et("virtuoso-grid-list"),o=et(uie),s=et("div"),l=et(wv),c=(d,f=null)=>ko(Pe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),o7e=$n(([e,t])=>({...e,...t}),gr(r7e,i7e)),s7e=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=ul("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=ul("itemDimensions"),g=ul("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Wp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}g({row:tq("row-gap",getComputedStyle(_).rowGap,v),column:tq("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...zo(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...zo(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...zo(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),a7e=de.memo(function(){const t=Sr("HeaderComponent"),n=ul("headerHeight"),r=Sr("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),l7e=de.memo(function(){const t=Sr("FooterComponent"),n=ul("footerHeight"),r=Sr("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),c7e=({children:e})=>{const t=de.useContext(cie),n=ul("itemDimensions"),r=ul("viewportDimensions"),i=Wp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:sA,ref:i},e)},u7e=({children:e})=>{const t=de.useContext(cie),n=ul("windowViewportRect"),r=ul("itemDimensions"),i=Sr("customScrollParent"),o=aie(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:sA},e)},d7e=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?h7e:f7e,o=r||n?u7e:c7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(a7e,null),de.createElement(s7e,null),de.createElement(l7e,null)))}),{Component:RVe,usePublisher:ul,useEmitterValue:Sr,useEmitter:pie}=Ure(o7e,{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"}},d7e),f7e=die({usePublisher:ul,useEmitterValue:Sr,useEmitter:pie}),h7e=fie({usePublisher:ul,useEmitterValue:Sr,useEmitter:pie});function tq(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ls.WARN),t==="normal"?0:parseInt(t??"0",10)}const p7e=I.forwardRef(({style:e,children:t,...n},r)=>{const i=I.useRef(null),{palette:o,spacing:s}=In(),l=kg({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=NQ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});I.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=I.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function m7e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(dt,{...i,children:C.jsx(Z9e,{components:{Scroller:p7e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function g7e({event:e,hidden:t}){return C.jsxs(HFe,{children:[ee.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Oxe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function v7e({label:e}){return C.jsx(Mu,{title:e,children:C.jsx(XK,{sx:{color:"error.main",transform:"scale(0.5)",pl:.5},fontSize:"small"})})}function y7e({event:e,index:t,selected:n,label:r,...i}){const{spacing:o}=In(),s=kg({"& .info-button":{opacity:0},"&:hover .info-button":{opacity:1}});return C.jsxs(ME,{selected:n,...i,className:s,sx:{borderLeft:`${o(.5)} solid ${Og(e==null?void 0:e.type)}`,...i.sx},children:[C.jsxs(Ul,{sx:{alignItems:"center"},children:[C.jsx(zt,{variant:"body2",children:t}),r&&C.jsx(v7e,{label:r})]}),C.jsx(ol,{sx:{overflow:"hidden"},primary:C.jsx(g7e,{event:e,hidden:!1}),secondary:C.jsx(tC,{event:ee.pick(e,"f","g","pId")})}),C.jsx(Mu,{title:C.jsx(dt,{p:1,children:C.jsx(tC,{event:e,flexDirection:"column"})}),children:C.jsx(dt,{className:"info-button",sx:{pl:2,color:"text.secondary"},children:C.jsx(Axe,{fontSize:"small"})})})]})}function b7e({event:e}){const{spacing:t}=In();return C.jsxs(C.Fragment,{children:[C.jsx(Qm,{sx:{height:80,borderLeft:`${t(.5)} solid ${Og(e==null?void 0:e.type)}`},children:C.jsx(Ul,{children:C.jsx(I0e,{animation:!1,width:t(4)})})}),C.jsx(nc,{variant:"inset"})]})}const x7e=C.jsx(nc,{orientation:"vertical",flexItem:!0,sx:{m:1}}),w7e=e=>Number(e.replace(/px$/,""));function _7e(){const{spacing:e}=In(),{controls:t,onChange:n,state:r}=Lu(),i=I.useRef(null),{key:o,setKey:s,layers:l,layer:c}=Ql(),{step:d,playing:f,stepTo:h}=Dz(o),p=I.useMemo(()=>{var y;if(c)return I.createElement(fw[((y=c==null?void 0:c.source)==null?void 0:y.type)??""].steps,{layer:c})},[c]),g=IZ(o),v=I.useCallback(ee.throttle(y=>{var S,_;return(_=(S=i==null?void 0:i.current)==null?void 0:S.scrollToIndex)==null?void 0:_.call(S,{index:y,align:"start",behavior:"smooth",offset:-w7e(e(6+2))})},1e3/30),[i]);return I.useEffect(()=>{ee.defer(()=>v(d))},[v,d]),C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(_n,{vertical:!0,alignItems:"center",children:p?I.cloneElement(p,{children:y=>c?y.length?C.jsx(m7e,{sx:{width:"100%",height:"100%"},items:y,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(S,_)=>{var b;return f?C.jsx(b7e,{event:S}):C.jsxs(dt,{sx:{height:e(_?10:16),pt:_?0:e(6)},children:[C.jsx(y7e,{event:S,index:_,selected:_===d,sx:{height:"100%"},label:(b=g(_))==null?void 0:b.result,onClick:()=>h(_)}),C.jsx(nc,{variant:"inset"})]})}}):C.jsx(eg,{icon:C.jsx(AS,{}),label:`${Fo(c)} has no steps to display`}):C.jsx(eg,{icon:C.jsx(AS,{}),label:"Steps"})}):C.jsx(eg,{icon:C.jsx(AS,{}),label:"Steps"})})}),C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:o,items:ee.map(l,y=>({id:y.key,name:Fo(y)})),onChange:s,showArrow:!0}),x7e,C.jsx(W2e,{layer:c})]}),C.jsx(Sn.Extras,{children:t})]})}const S7e=e=>e?48:36,E7e=8;function C7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=lz(),l=ee.max([ee.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(ef,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:i,children:C.jsx("span",{children:e==null?void 0:e(lw(c))})}),C.jsx(Jd,{...ov(c),anchorOrigin:{horizontal:"center",vertical:-S7e(s)*l-E7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:d,label:f,disabled:h})=>C.jsxs(Hl,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(Ul,{children:C.jsx(Dme,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function T7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ee.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ee.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(C7e,{defaultChecked:!0,placeholder:ee.startCase(e),trigger:f=>C.jsx(zd,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:ee.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:h}),C.jsx(vi,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const nq=C.jsx(nc,{orientation:"vertical",flexItem:!0,sx:{m:1}});function k7e(){var p,g,v,y;const{controls:e,onChange:t,state:n}=Lu(),[r]=Tk(),[{layers:i}]=$p(),[o,s]=I.useState({}),l=I.useMemo(()=>ee.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=I.useState(),f=I.useMemo(()=>ee.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return I.useEffect(()=>{ee.delay(()=>{var S;(S=c==null?void 0:c.fitCamera)==null||S.call(c,_=>{var b;return ee.chain(l).filter("viewKey").map("key").includes(((b=_.meta)==null?void 0:b.sourceLayer)??"").value()})},150)},[c,ee.chain(l).map("viewKey").sort().join(".").value()]),C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(_n,{children:C.jsx(vk,{children:S=>C.jsx(dt,{children:C.jsx(A2e,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Sn.Options,{children:C.jsxs($d,{direction:"row",children:[C.jsx(Ro,{label:"Renderer",icon:C.jsx(xxe,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ee.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),nq,C.jsx(T7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(nv,{}),value:o,onChange:s,items:ee.map(i,S=>({id:S.key,name:Fo(S)})),showArrow:!0}),nq,C.jsx(zd,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(Sxe,{}),children:"Fit"}),C.jsx(zd,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(kxe,{}),children:"1:1"})]})}),C.jsx(Sn.Extras,{children:e})]})}const A7e="modulepreload",R7e=function(e,t){return new URL(e,t).href},rq={},qs=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=R7e(o,r),o in rq)return;rq[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const h=i[f];if(h.href===o&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":A7e,s||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),s)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};var mie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){return function n(r,i,o){var s=window,l="application/octet-stream",c=o||l,d=r,f=!i&&!o&&d,h=document.createElement("a"),p=function(k){return String(k)},g=s.Blob||s.MozBlob||s.WebKitBlob||p,v=i||"download",y,S;if(g=g.call?g.bind(s):Blob,String(this)==="true"&&(d=[d,c],c=d[0],d=d[1]),f&&f.length<2048&&(v=f.split("/").pop().split("?")[0],h.href=f,h.href.indexOf(f)!==-1)){var _=new XMLHttpRequest;return _.open("GET",f,!0),_.responseType="blob",_.onload=function(k){n(k.target.response,v,l)},setTimeout(function(){_.send()},0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==p)d=A(d),c=d.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(A(d),v):R(d);else if(/([\x80-\xff])/.test(d)){var b=0,x=new Uint8Array(d.length),E=x.length;for(b;b{const p=(0,n.randomBytes)(4).readUInt32BE(0);return d+p%(f-d+1)},i=d=>{let f;switch(d){case 1:f=Math.floor(r(1,9)).toString();break;case 2:f=Math.floor(r(10,90)).toString();break;case 3:f=Math.floor(r(100,900)).toString();break;case 4:f=Math.floor(r(1e3,9e3)).toString();break;case 5:f=Math.floor(r(1e4,9e4)).toString();break;case 6:f=Math.floor(r(1e5,9e5)).toString();break;default:f="";break}return f};function o(d,f){return d.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+i(f)}e.generateFromEmail=o;function s(d,f,h){const p=t.nouns[Math.floor(Math.random()*t.nouns.length)],g=t.adjectives[Math.floor(Math.random()*t.adjectives.length)];let v;return d?v=g+d+p+i(f):v=g+p+i(f),h?v.substring(0,h):v}e.generateUsername=s;function l(d){if(d.dictionaries){const f=d.dictionaries.length;let h="";for(let g=0;g{const l=s??await dz({accept:gie,strict:!0});l&&(D7e(l)?await o(async()=>{const c=M7e(l)?await CTe(new Uint8Array(await l.arrayBuffer())):await l.text(),d=await PJ(c);d&&(n(()=>d.layers),i(()=>d.UIState))},`Opening workspace (${gz(l.size)})`):e(`${l==null?void 0:l.name} is not a workspace file`))},save:async s=>{e("Saving workspace...");const l=JSON.stringify({layers:t,UIState:r});if(s){const c=`${d5.generateUsername("-")}.workspace.json`;iq(l,c,"application/json"),e("Workspace saved",c)}else{const c=`${d5.generateUsername("-")}.workspace`;iq(await ETe(l),c,"application/octet-stream"),e("Workspace saved",c)}}}}function M7e(e){return e.name.endsWith(".workspace")}function D7e(e){return ee.find(gie,t=>e.name.endsWith(t))}function L7e(e){return e.split(".")[0]}function xm(e){return e.split("/").pop()}function N7e(){const e=ml(),{controls:t,onChange:n,state:r}=Lu(),{load:i}=Qj(),o=tf(),{result:s,loading:l}=uv(async()=>{const d=Object.assign({"/public/recipes/astar-jps-small-maze.workspace":()=>qs(()=>import("./astar-jps-small-maze-9a90ce2a.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/aurora-polyanya.workspace":()=>qs(()=>import("./aurora-polyanya-ceb55900.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/dynamic-starcraft.workspace":()=>qs(()=>import("./dynamic-starcraft-4ceed441.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/frozen-sea-astar.workspace":()=>qs(()=>import("./frozen-sea-astar-d8dfa04c.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/jps-vs-jps-prune2.workspace":()=>qs(()=>import("./jps-vs-jps-prune2-defbda61.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/lacam-random-32-32-20.workspace":()=>qs(()=>import("./lacam-random-32-32-20-2163bf6f.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-large.workspace":()=>qs(()=>import("./mapf-large-867abdea.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/mapf-sortation.workspace":()=>qs(()=>import("./mapf-sortation-4ea4dd13.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/melbourne-routing.workspace":()=>qs(()=>import("./melbourne-routing-b5c14300.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/new-york-astar.workspace":()=>qs(()=>import("./new-york-astar-03f71297.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/nine-tile.workspace":()=>qs(()=>import("./nine-tile-6376158b.js"),[],import.meta.url).then(f=>f.default),"/public/recipes/rayscan-arena2.workspace":()=>qs(()=>import("./rayscan-arena2-f6f7b81d.js"),[],import.meta.url).then(f=>f.default)});return await Promise.all(ee.entries(d).map(f=>B7e(...f)))},[]),c=d=>o(async()=>{try{e(`Loading ${xm(d)}...`);const f=await fetch(d);f.ok||e(`Couldn't load ${xm(d)}`,"Network error",{error:!0});const h=await f.blob(),p=new File([h],xm(d),{type:h.type});i(p)}catch(f){e(`Couldn't load ${xm(d)}`,`${f}`,{error:!0})}});return C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(_n,{vertical:!0,children:C.jsx(iv,{y:!0,children:C.jsx(dt,{sx:{pt:6},children:l?C.jsx(X1,{sx:{m:2}}):C.jsx(wp,{children:ee.map(s,({name:d,path:f},h)=>C.jsxs(ME,{onClick:()=>c(f),children:[C.jsx(Ul,{children:C.jsx(G4,{})}),C.jsx(ol,{primary:d,secondary:xm(f)})]},h))})})})})}),C.jsx(Sn.Extras,{children:t})]})}async function B7e(e,t){return{name:ee.chain(e).thru(xm).thru(L7e).startCase().value(),path:await t()}}const f5={recipes:{id:"recipes",name:"Recipes",icon:C.jsx(G4,{}),content:N7e},viewport:{id:"viewport",name:"Viewport",icon:C.jsx(ZK,{}),content:k7e},tree:{id:"tree",name:"Tree",icon:C.jsx(GK,{}),content:b2e},steps:{id:"steps",name:"Steps",icon:C.jsx(AS,{}),content:_7e},info:{id:"info",name:"Logs",icon:C.jsx(KK,{}),content:RFe},layers:{id:"layers",name:"Layers",icon:C.jsx(nv,{}),content:UFe},debug:{id:"debug",name:"Debugger",icon:C.jsx(_xe,{}),content:AFe},settings:{id:"settings",name:"Settings",icon:C.jsx(zxe,{}),content:jGe},about:{id:"about",name:"About",icon:C.jsx(Mxe,{}),content:I_e}},[$7e,F7e]=rc({view:{type:"branch",key:Fi(),orientation:"horizontal",children:[{size:75,type:"branch",key:Fi(),orientation:"horizontal",children:[{type:"leaf",size:25,key:Fi(),content:{type:"layers"}},{size:75,type:"branch",key:Fi(),orientation:"vertical",children:[{type:"leaf",size:75,key:Fi(),content:{type:"viewport"}},{type:"leaf",size:25,key:Fi(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:Fi(),content:{type:"steps"}}]}});function z7e(){const[e]=DJ(),t=cz(),n=ee.values(e);return C.jsx(ik,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs($d,{alignItems:"center",spacing:4,children:[C.jsx(X1,{}),n.map((r,i)=>C.jsx(zt,{variant:"body2",color:"textSecondary",children:r},i))]})})}var vie={},j7e=Bt&&Bt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yie=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vie,"__esModule",{value:!0});var Xs=yie(qg),t$=yie(I),U7e=function(e){j7e(t,e);function t(n){var r=e.call(this,n)||this;return r.resetDragging=function(){r.frameDragCounter=0,r.setState({draggingOverFrame:!1,draggingOverTarget:!1})},r.handleWindowDragOverOrDrop=function(i){i.preventDefault()},r.handleFrameDrag=function(i){if(t.eventHasFiles(i)){if(r.frameDragCounter+=i.type==="dragenter"?1:-1,r.frameDragCounter===1){r.setState({draggingOverFrame:!0}),r.props.onFrameDragEnter&&r.props.onFrameDragEnter(i);return}if(r.frameDragCounter===0){r.setState({draggingOverFrame:!1}),r.props.onFrameDragLeave&&r.props.onFrameDragLeave(i);return}}},r.handleFrameDrop=function(i){r.state.draggingOverTarget||(r.resetDragging(),r.props.onFrameDrop&&r.props.onFrameDrop(i))},r.handleDragOver=function(i){t.eventHasFiles(i)&&(r.setState({draggingOverTarget:!0}),!t.isIE()&&r.props.dropEffect&&(i.dataTransfer.dropEffect=r.props.dropEffect),r.props.onDragOver&&r.props.onDragOver(i))},r.handleDragLeave=function(i){r.setState({draggingOverTarget:!1}),r.props.onDragLeave&&r.props.onDragLeave(i)},r.handleDrop=function(i){if(r.props.onDrop&&t.eventHasFiles(i)){var o=i.dataTransfer?i.dataTransfer.files:null;r.props.onDrop(o,i)}r.resetDragging()},r.handleTargetClick=function(i){r.props.onTargetClick&&r.props.onTargetClick(i),r.resetDragging()},r.stopFrameListeners=function(i){i&&(i.removeEventListener("dragenter",r.handleFrameDrag),i.removeEventListener("dragleave",r.handleFrameDrag),i.removeEventListener("drop",r.handleFrameDrop))},r.startFrameListeners=function(i){i&&(i.addEventListener("dragenter",r.handleFrameDrag),i.addEventListener("dragleave",r.handleFrameDrag),i.addEventListener("drop",r.handleFrameDrop))},r.frameDragCounter=0,r.state={draggingOverFrame:!1,draggingOverTarget:!1},r}return t.prototype.componentDidMount=function(){this.startFrameListeners(this.props.frame),this.resetDragging(),window.addEventListener("dragover",this.handleWindowDragOverOrDrop),window.addEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.componentDidUpdate=function(n){n.frame!==this.props.frame&&(this.resetDragging(),this.stopFrameListeners(n.frame),this.startFrameListeners(this.props.frame))},t.prototype.componentWillUnmount=function(){this.stopFrameListeners(this.props.frame),window.removeEventListener("dragover",this.handleWindowDragOverOrDrop),window.removeEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.render=function(){var n=this.props,r=n.children,i=n.className,o=n.targetClassName,s=n.draggingOverFrameClassName,l=n.draggingOverTargetClassName,c=this.state,d=c.draggingOverTarget,f=c.draggingOverFrame,h=o;return f&&(h+=" "+s),d&&(h+=" "+l),t$.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},t$.default.createElement("div",{className:h,onClick:this.handleTargetClick},r))},t.isIE=function(){return typeof window<"u"&&(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>0)},t.eventHasFiles=function(n){var r=!1;if(n.dataTransfer){var i=n.dataTransfer.types;for(var o in i)if(i[o]==="Files"){r=!0;break}}return r},t.propTypes={className:Xs.default.string,targetClassName:Xs.default.string,draggingOverFrameClassName:Xs.default.string,draggingOverTargetClassName:Xs.default.string,onDragOver:Xs.default.func,onDragLeave:Xs.default.func,onDrop:Xs.default.func,onTargetClick:Xs.default.func,dropEffect:Xs.default.oneOf(["copy","move","link","none"]),frame:function(n,r,i){var o=n[r];if(o==null)return new Error("Warning: Required prop `"+r+"` was not specified in `"+i+"`");if(o!==document&&!(o instanceof HTMLElement))return new Error("Warning: Prop `"+r+"` must be one of the following: document, HTMLElement!")},onFrameDragEnter:Xs.default.func,onFrameDragLeave:Xs.default.func,onFrameDrop:Xs.default.func},t.defaultProps={dropEffect:"copy",frame:typeof window>"u"?void 0:window.document,className:"file-drop",targetClassName:"file-drop-target",draggingOverFrameClassName:"file-drop-dragging-over-frame",draggingOverTargetClassName:"file-drop-dragging-over-target"},t}(t$.default.PureComponent),H7e=vie.FileDrop=U7e;function W7e(){const e=cz(),{load:t}=Qj(),[n,r]=I.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(H7e,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(ee.head(i)),children:C.jsx(ik,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs($d,{alignItems:"center",spacing:4,children:[C.jsx(G4,{}),C.jsx(zt,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function G7e(e){const t=nEe(),[{view:n},r]=$7e();return C.jsxs(C.Fragment,{children:[C.jsx(_n,{...e,children:C.jsx(VQ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(xp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%"},children:I.createElement((o=f5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(xp,{in:t,children:C.jsx(Eve,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx(z7e,{}),C.jsx(W7e,{})]})}const V7e=e=>l$(e,"#ffffff")>l$(e,"#000000")?"#ffffff":"#000000";function q7e(e){I.useEffect(()=>{ee.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=EF,"electron"in window&&window.electron.invoke("title-bar","#00000000",V7e(e))},[e])}function X7e(e){return new Promise(t=>ee.delay(t,e))}async function Y7e(e,t=2500){const n=ee.now();return{result:await Promise.any([e(),X7e(t)]),delta:ee.now()-n}}function K7e(){const e=ml(),[{remote:t}]=Nu(),[,n]=Pg(),r=tf("connections");return I.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(LGe(s))({url:l});await d.connect();const{result:f,delta:h}=await Y7e(()=>d.call("about"));f?(e(`Connected to ${f.name}`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(()=>o)}i||e(`Connected to ${o.length} of ${t.length} solvers`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const Q7e=e=>t=>({...t,source:e});function J7e(){const[e]=Pg(),[,t]=VE(),n=tf("features");return EZ(r=>n(async()=>{const i={algorithms:[],formats:ee.keys(vz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ee.uniqBy([...i[l],...ee.map(await o(`features/${l}`),Q7e(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function Z7e(){const[{layers:e},t]=$p();return I.useMemo(()=>ee.map(e,n=>{const r=KZ(n).service;if(r)return I.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:ee.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function eVe(){const e=Z7e();return C.jsx(C.Fragment,{children:e})}function bie({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ee.reduce(ee.map(e,r=>I.createElement(r)),(r,i)=>I.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ee.map(n,(r,i)=>I.createElement(r,{key:i}))]}))})}const tVe=()=>{const{save:e,load:t}=Qj(),[n,r]=I.useState(!1);return I.useEffect(()=>{if("windowControlsOverlay"in navigator){const i=()=>{r(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",i),i(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",i)}},[r]),C.jsx(dt,{sx:{mt:-.5,minHeight:36,height:n?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:C.jsx(iv,{x:!0,style:{height:"100%"},children:C.jsx(dt,{sx:{height:"100%"},children:C.jsxs($d,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(dt,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:YQ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e},{name:"Save workspace (JSON)",key:"workspace-save",action:()=>e(!0)}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open(k_e,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${A_e}/changelog-${C_e}.md`,"_blank")},{name:"Open documentation",key:"documentation",action:()=>open("https://path-visualiser.github.io/docs/overview/","_blank")}]}].map(({key:i,items:o})=>C.jsx(ef,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{...ov(s),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:o.map(({name:l,key:c,action:d})=>C.jsx(Hl,{onClick:()=>{d==null||d(),s.close()},children:l},c))})}),C.jsx(zd,{...lw(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:ee.startCase(i)})]})},i)),C.jsx(dt,{sx:{p:.75,height:"100%"},children:C.jsx(nVe,{})})]})})})})};function nVe(){const e=ml();return C.jsxs(Ou,{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(Fxe,{fontSize:"small",color:"disabled"})," ",C.jsx(zt,{sx:{mt:0},children:"Commands"})]})}const rVe=[K7e,J7e,EWe,eVe];function iVe(){const t=In().palette.background.default;return q7e(t),C.jsxs(_n,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(tVe,{}),C.jsx(G7e,{flex:1})]})}function oVe(){const[{theme:e="light",accentColor:t="teal"}]=Nu(),n=I.useMemo(()=>S_e(e,t),[e,t]);return C.jsx(Qle,{theme:n,children:C.jsx(x1e,{children:C.jsx(bie,{services:rVe,children:C.jsx(iVe,{})})})})}var xie,oq=Zg;xie=oq.createRoot,oq.hydrateRoot;const sVe=xie(document.getElementById("root")),aVe=[RTe,x_e,ZSe,eEe,oke,tEe,S2e,b1e,F7e,ZPe];sVe.render(C.jsx(qme,{children:C.jsx(bie,{slices:aVe,children:C.jsx(oVe,{})})})); + }`,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=Y4e(e)),typeof e=="number"?X4e(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,vm.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}=tt.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 Ax=vm;Ax.availableFonts={};Ax.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 ym=class extends Up{constructor(e="",t={}){super(ht.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=ht.from(n,{scaleMode:tt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Kt,r.trim=new Kt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),l=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),d=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",s.appendChild(l),this.maxWidth=ym.defaultMaxWidth,this.maxHeight=ym.defaultMaxHeight,this._domElement=c,this._styleElement=d,this._svgRoot=s,this._foreignObject=l,this._foreignObject.appendChild(d),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=ym.defaultAutoResolution,this._resolution=ym.defaultResolution??tt.RESOLUTION,this.text=e,this.style=t}measureText(e){var l,c;const{text:t,style:n,resolution:r}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(r)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const i=this._domElement.getBoundingClientRect();this._svgRoot.remove();const o=Math.min(this.maxWidth,Math.ceil(i.width)),s=Math.min(this.maxHeight,Math.ceil(i.height));return this._svgRoot.setAttribute("width",o.toString()),this._svgRoot.setAttribute("height",s.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(l=this._style)==null?void 0:l.toCSS(r)}),this._styleElement.textContent=(c=this._style)==null?void 0:c.toGlobalCSS()),{width:o+n.padding*2,height:s+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:r}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:i,height:o}=this.measureText();n.width=r.width=Math.ceil(Math.max(1,i)),n.height=r.height=Math.ceil(Math.max(1,o)),this._loading||(this._loading=!0,await new Promise(s=>{r.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,n.src=r.src,r.onload=null,r.src="",this.updateTexture(),s()};const l=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},ym.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=md(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=md(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 Ax?(this.ownsStyle=!1,this._style=e):e instanceof Au?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Ax.from(e)):(this.ownsStyle=!0,this._style=new Ax(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 qk=ym;qk.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};qk.defaultMaxWidth=2024;qk.defaultMaxHeight=2024;qk.defaultAutoResolution=!0;function E8e(e,t){return{constructor:e,meta:t}}function C8e(e,t,n,r,i){Hne(e,t,n||0,r||e.length-1,i||T8e)}function Hne(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+d)),h=Math.min(r,Math.floor(t+(o-s)*c/o+d));Hne(e,t,f,h,i)}var p=e[t],g=n,v=r;for(Ab(e,n,t),i(e[r],p)>0&&Ab(e,n,r);g0;)v--}i(e[n],p)===0?Ab(e,n,v):(v++,Ab(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Ab(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function T8e(e,t){return et?1:0}class k8e{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(!J_(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=bm(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,nm(r,this.toBBox),nm(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=bm([t,n]),this.data.height=t.height+1,this.data.leaf=!1,nm(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let l=n;l<=r-n;l++){const c=Qb(t,0,l,this.toBBox),d=Qb(t,l,r,this.toBBox),f=O8e(c,d),h=wB(c)+wB(d);f=n;d--){const f=t.children[d];Jb(l,t.leaf?o(f):f),c+=Q_(l)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)Jb(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():nm(t[n],this.toBBox)}}function A8e(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function bm(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function j7(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;C8e(e,s,t,n,i),o.push(t,s,s,n)}}class M8e extends k8e{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 U7={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var Wne={},AC=Bt&&Bt.__assign||function(){return AC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),SB}var G8e=H8e()?Math.sign:W8e(),V8e=G8e,q8e=Math.abs,X8e=Math.floor,Y8e=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:V8e(e)*X8e(q8e(e)))},K8e=Y8e,Q8e=Math.max,J8e=function(e){return Q8e(0,K8e(e))},Gne=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},Z8e=gv,Vne=function(e){if(!Z8e(e))throw new TypeError("Cannot use null or undefined");return e},eHe={exports:{}},tHe=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")},EB,W7;function nHe(){return W7||(W7=1,EB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),EB}var CB,G7;function rHe(){if(G7)return CB;G7=1;var e=gv,t=Object.keys;return CB=function(n){return t(e(n)?Object(n):n)},CB}var TB,V7;function iHe(){return V7||(V7=1,TB=nHe()()?Object.keys:rHe()),TB}var kB,q7;function oHe(){if(q7)return kB;q7=1;var e=iHe(),t=Vne,n=Math.max;return kB=function(r,i){var o,s,l=n(arguments.length,2),c;for(r=Object(t(r)),c=function(d){try{r[d]=i[d]}catch(f){o||(o=f)}},s=1;s-1},RB}var SHe=wHe()?String.prototype.contains:_He(),qS=Kne,Y7=xHe,Qne=qne,Jne=U8e,Rx=SHe,EHe=Yne.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],qS(e)?(n=Rx.call(e,"c"),r=Rx.call(e,"e"),i=Rx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Qne(Jne(o),s):s};EHe.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],qS(t)?Y7(t)?qS(n)?Y7(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,qS(e)?(r=Rx.call(e,"c"),i=Rx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Qne(Jne(o),s):s};var xw=Yne.exports,q3={exports:{}};(function(e,t){var n=xw,r=Gne,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,l=Object.defineProperty,c=Object.defineProperties,d=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,_;h=function(b,x){var E;return r(x),d.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),l(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,A;return r(x),A=this,h.call(this,b,E=function(){g.call(A,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,A,R,k;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(A=E[b],typeof A=="object")for(k=0;R=A[k];++k)(R===x||R.__eeOnceListener__===x)&&(A.length===2?E[b]=A[k?0:1]:A.splice(k,1));else(A===x||A.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,A,R,k;if(d.call(this,"__ee__")&&(R=this.__ee__[b],!!R))if(typeof R=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?d.call(g,v,O,_):O,y?(f.value=O,h(b,_,f)):b[_]=O,++_;x=_}}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)},$i=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:qB(i,r,(e/=60)+2),g:qB(i,r,e),b:qB(i,r,e-2)}},Ij=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)}},ire=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)}},Wg=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,l=0,c=0,d=(i+o)/2;if(s!==0){switch(i){case e:l=(t-n)/s%6;break;case t:l=(n-e)/s+2;break;case n:l=(e-t)/s+4}(l=At(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:At(100*c),l:At(100*d),a:r}},hV=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,l=0,c=0;return(t?n:r).find(function(d,f){return e>=d[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Co=function(e){return typeof e=="string"&&(e=vv.test(e)?Yk(e)/100:+e),isNaN(+e)||e>1?1:At(e)},yv=function(e,t,n){return t.reduce(function(r,i){return X3(X3([],r,!0),[sn(sn({},e),{h:n===Bo.ADDITIVE?R1(e.h+i):R1(hV(hV(e.h,!1)+i,!0))})],!1)},[sn({},e)])},YHe=function(e,t){return yv(e,[30,-30],t)},KHe=function(e,t){return yv(e,[180],t)},QHe=function(e,t){return yv(e,[150,-150],t)},JHe=function(e,t){return yv(e,[120,-120],t)},ZHe=function(e,t){return yv(e,[60,-120,180],t)},eWe=function(e,t){return yv(e,[90,-90,180],t)},Ys=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(qt).some(function(r){if(Zb[r].test(t))return n=r,!0}),!n&&~nre.indexOf(t)&&(n=qt.HEX),!n)throw new Error(qHe);return n}(e):function(t){var n,r=!1,i=rre(Object.keys(t));if(Y3[i]&&(n=Y3[i]),n&&n===qt.RGB){var o=Object.entries(t).some(function(l){return!K3.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(vv.test("".concat(l[1]))||!K3.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=qt.HEX)}if(!n||r)throw new Error(XHe);return n}(e)},tWe=((Pb={})[qt.HEX]=function(e){var t=(~nre.indexOf(e)?RC[e]:e).match(Zb.HEX),n={r:Z_(t[1]||t[5]),g:Z_(t[2]||t[6]),b:Z_(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=Z_(r)/255),n},Pb[qt.RGB]=function(e){var t=e.match(Zb.RGB),n=Zh(t[1]||t[5]),r=Zh(t[2]||t[6]),i=Zh(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=Co(o)),s},Pb[qt.HSL]=function(e){var t=e.match(Zb.HSL),n=R1(t[1]||t[5]),r=IC(t[2]||t[6]),i=IC(t[3]||t[7]),o=t[4]||t[8],s=$i(n,r,i);return o!==void 0&&(s.a=Co(o)),s},Pb[qt.CMYK]=function(e){var t=e.match(Zb.CMYK),n=vd(t[1]||t[6]),r=vd(t[2]||t[7]),i=vd(t[3]||t[8]),o=vd(t[4]||t[9]),s=t[5]||t[10],l=Ij(n,r,i,o);return s!==void 0&&(l.a=Co(s)),l},Pb),nWe=((Ob={})[qt.HEX]=function(e){var t={r:Zh("".concat(e.r)),g:Zh("".concat(e.g)),b:Zh("".concat(e.b))};return Zi(e,"a")&&(t.a=Math.min(Zh("".concat(e.a),!0),1)),t},Ob[qt.RGB]=function(e){return this.HEX(e)},Ob[qt.HSL]=function(e){var t=IC("".concat(e.s)),n=IC("".concat(e.l)),r=$i(R1(e.h),t,n);return Zi(e,"a")&&(r.a=Co(e.a)),r},Ob[qt.CMYK]=function(e){var t=vd("".concat(e.c)),n=vd("".concat(e.m)),r=vd("".concat(e.y)),i=vd("".concat(e.k)),o=Ij(t,n,r,i);return Zi(e,"a")&&(o.a=Co(e.a)),o},Ob),Ip=function(e,t){return t===void 0&&(t=Ys(e)),typeof e=="string"?tWe[t](e):nWe[t](e)},rn=((ru={})[qt.HEX]=function(e){return{r:eS(e.r),g:eS(e.g),b:eS(e.b)}},ru.HEXA=function(e){var t=rn.HEX(e);return t.a=Zi(e,"a")?eS(255*e.a):"0xFF",t},ru[qt.RGB]=function(e,t){return Zi(e,"a")&&delete e.a,up(e,t)},ru.RGBA=function(e,t){return e.a=Zi(e,"a")?At(e.a):1,up(e,t)},ru[qt.HSL]=function(e,t){var n=Wg(e.r,e.g,e.b);return delete n.a,Um(n,t)},ru.HSLA=function(e,t){var n=rn.HSL(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},ru[qt.CMYK]=function(e,t){return rWe(ire(e.r,e.g,e.b),t)},ru.CMYKA=function(e,t){var n=rn.CMYK(e,t);return n.a=Zi(e,"a")?At(e.a,t):1,n},ru),pV=function(e,t,n,r){var i=Ys(e),o=typeof e=="string",s=Ip(e,i),l=typeof e=="string"&&Zi(s,"a")||typeof e!="string"&&Zi(e,"a"),c=Wg(s.r,s.g,s.b,s.a);l||delete c.a;var d=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return sn(sn({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case qt.HEX:default:return f.map(function(h){var p=$i(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?tn.HEX(up(sn(sn({},p),{a:At(255*p.a)}),r)):tn.HEX(up(p,r)):l?rn.HEXA(p):rn.HEX(p)});case qt.RGB:return f.map(function(h){var p=$i(h.h,h.s,h.l);return l&&(p.a=h.a),o?tn.RGB(up(p,r)):l?rn.RGBA(p,r):rn.RGB(p,r)});case qt.HSL:return f.map(function(h){return o?tn.HSL(Um(h,r)):l?rn.HSLA(sn(sn({},$i(h.h,h.s,h.l)),{a:h.a}),r):rn.HSL($i(h.h,h.s,h.l),r)})}},rm=((Ah={buildHarmony:function(e,t,n,r){var i=Ys(e),o=Ip(e,i),s=Wg(o.r,o.g,o.b,o.a),l=typeof e=="string"&&Zi(o,"a")||typeof e!="string"&&Zi(e,"a"),c=typeof e=="string";switch(i){case qt.HEX:default:return l?this.HEXA(Um(s,0),t,n,c):this.HEX(Um(s,0),t,n,c);case qt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case qt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[qt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX($i(i.h,i.s,i.l)):rn.HEX($i(i.h,i.s,i.l))})},Ah.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?tn.HEX(sn(sn({},$i(i.h,i.s,i.l)),{a:255*Co(i.a)})):rn.HEXA(sn(sn({},$i(i.h,i.s,i.l)),{a:Co(i.a)}))})},Ah[qt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(up($i(o.h,o.s,o.l),i)):rn.RGB($i(o.h,o.s,o.l),i)})},Ah.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.RGB(up(sn(sn({},$i(o.h,o.s,o.l)),{a:Co(o.a)}),i)):rn.RGBA(sn(sn({},$i(o.h,o.s,o.l)),{a:Co(o.a)}),i)})},Ah[qt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um({h:o.h,s:o.s,l:o.l},i)):rn.HSL($i(o.h,o.s,o.l),i)})},Ah.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?tn.HSL(Um(sn(sn({},o),{a:Co(o.a)}),i)):rn.HSLA(sn(sn({},$i(o.h,o.s,o.l)),{a:Co(o.a)}),i)})},Ah),im=((Rh={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(A){var R=Ys(A);return Ip(A,R)}),b=t===Bo.SUBTRACTIVE?_.map(function(A){var R,k,O,L,N,H,W,z,D,F,j,V,G,K,Y=(R=A.r,k=A.g,O=A.b,L=Math.min(R,k,O),N=Math.min(255-R,255-k,255-O),H=R-L,W=k-L,z=O-L,D=Math.min(H,W),F=H-D,j=(W+D)/2,V=(z+W-D)/2,G=Math.max(F,j,V)/Math.max(H,W,z),K=isNaN(G)||G===1/0||G<=0?1:G,{r:F/K+N,y:j/K+N,b:V/K+N});return Zi(A,"a")&&(Y.a=A.a),Y}):null;function x(A){var R=t===Bo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return A.reduce(function(k,O){var L=Zi(O,"a")?O.a:1,N={r:Math.min(k.r+O.r*L,255),b:Math.min(k.b+O.b*L,255),a:1-(1-L)*(1-k.a)},H="g"in k?k.g:k.y,W="g"in O?O.g:O.y;return sn(sn({},N),t===Bo.ADDITIVE?{g:Math.min(H+W*L,255)}:{y:Math.min(H+W*L,255)})},R)}if(t===Bo.ADDITIVE)n=x(_);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),l=Math.min(255-r,255-i,255-o),c=r-s,d=i-s,f=o-s,h=Math.min(d,f),p=c+d-h,g=d+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,d,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+l,g:g/S+l,b:v/S+l}).a=E.a}return{r:At(n.r),g:At(n.g),b:At(n.b),a:Ua(n.a,0,1)}}})[qt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?tn.HEX(r):rn.HEX(r)},Rh.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Co(r.a):Co(r.a),n?tn.HEX(r):rn.HEXA(r)},Rh[qt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?tn.RGB(i):rn.RGB(i,r)},Rh.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?tn.RGB(i):rn.RGBA(i,r)},Rh[qt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=Wg(i.r,i.g,i.b);return delete i.a,delete o.a,n?tn.HSL(o):rn.HSL(i,r)},Rh.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=Wg(i.r,i.g,i.b,i.a);return n?tn.HSL(o):rn.HSLA(i,r)},Rh),up=function(e,t){return sn({r:At(e.r,t),g:At(e.g,t),b:At(e.b,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},Um=function(e,t){return sn({h:At(e.h,t),s:At(e.s,t),l:At(e.l,t)},Zi(e,"a")?{a:At(e.a,t)}:{})},rWe=function(e,t){return{c:At(e.c,t),m:At(e.m,t),y:At(e.y,t),k:At(e.k,t)}},Vu=function(e,t,n,r,i,o){var s=i(Ip(e,t),r);return n?o(s):s},om=function(e,t,n,r,i,o,s){n<1&&(n=5);var l=function(c,d,f){var h=f-1,p=(d.r-c.r)/h,g=(d.g-c.g)/h,v=(d.b-c.b)/h,y=Co(c.a),S=(Co(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:At(c.r+p*b),g:At(c.g+g*b),b:At(c.b+v*b),a:At(y+S*b)}})}(Ip(e),Ip(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},iWe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Ip(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=sn(sn({},$i(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=sn(sn({},Ij(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=Wg(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=ire(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=R1(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=Ua(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=Ua(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=Ua(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=Ua(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=Ua(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=Ua(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 rn.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return rn.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return sn(sn({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLAObject",{get:function(){return sn(sn({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKAObject",{get:function(){return sn(sn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return tn.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return tn.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return tn.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return tn.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Vu(t,r,n,0,rn.HEX,tn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=Ys(t);return Vu(t,r,n,0,rn.HEXA,tn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.RGB,tn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.RGBA,tn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.HSL,tn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.HSLA,tn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.CMYK,tn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Ys(t);return Vu(t,i,n,r,rn.CMYKA,tn.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HEX,tn.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HEXA,tn.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.RGB,tn.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.RGBA,tn.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HSL,tn.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),om(t,n,r,i,o,rn.HSLA,tn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),im.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),im.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=Bo.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),im.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),pV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=su.COMPLEMENTARY),r===void 0&&(r=Bo.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[su.ANALOGOUS]=rm.buildHarmony(s,YHe,c,l),d[su.COMPLEMENTARY]=rm.buildHarmony(s,KHe,c,l),d[su.SPLIT_COMPLEMENTARY]=rm.buildHarmony(s,QHe,c,l),d[su.TRIADIC]=rm.buildHarmony(s,JHe,c,l),d[su.TETRADIC]=rm.buildHarmony(s,ZHe,c,l),d[su.SQUARE]=rm.buildHarmony(s,eWe,c,l),d)[o]}(n,t,i,r)},e}();const oWe={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:Ui,PI:sWe}=Math,ww=(e,t)=>new iWe(e).setA(t??oWe.alpha).RGBA,aWe=(e,t)=>ww(e,t);function Gd(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 lWe={draw(e,t,n){if(e.text){const r=Gd(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Gd(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=ww(e.fontColor,e.alpha),t.fillText(e.text,i.x,i.y)}},test(e){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}}},cWe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Gd(e,n);t.fillStyle=ww(e.fill,e.alpha),t.fillRect(Ui(r),Ui(i),Ui(o)||1,Ui(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},uWe={draw(e,t,n){t.fillStyle=ww(e.fill,e.alpha),t.beginPath();const r=Gd({...e,width:e.radius,height:e.radius},n);t.ellipse(Ui(r.x),Ui(r.y),Ui(r.width),Ui(r.height),0,0,2*sWe),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}}},dWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=ww(e.fill,e.alpha);const{x:o,y:s}=Gd({...r,width:0,height:0},n);t.moveTo(Ui(o),Ui(s));for(const l of i){const{x:c,y:d}=Gd({...l,width:0,height:0},n);t.lineTo(Ui(c),Ui(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},fWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=aWe(e.fill,e.alpha);const{x:o,y:s,width:l}=Gd({...r,width:e.lineWidth,height:0},n);t.lineWidth=Ui(l),t.moveTo(Ui(o),Ui(s));for(const c of i){const{x:d,y:f}=Gd({...c,width:0,height:0},n);t.lineTo(Ui(d),Ui(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Gt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Gt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Gt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Gt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},hWe={text:lWe,path:fWe,rect:cWe,polygon:dWe,circle:uWe},{log2:pWe,max:mWe}=Math,mV=e=>Gt.floor(pWe(e+1));function gV({right:e,left:t,bottom:n,top:r},i){const o=mWe(mV(e-t),mV(n-r))-i,s=2**o,l={left:Gt.floor(t/s),right:Gt.ceil((e+1)/s),top:Gt.floor(r/s),bottom:Gt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Gt.shuffle(L8e({x:Gt.range(l.left,l.right+1),y:Gt.range(l.top,l.bottom+1)}).map(c=>{const d=c.x*s,f=c.y*s;return{tile:c,bounds:{left:d-s/2,right:d+s/2,top:f-s/2,bottom:f+s/2}}}))}}const gWe=""+new URL("D2Renderer.worker-19d00eda.js",import.meta.url).href;class vWe extends Worker{constructor(){super(gWe,{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 yWe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:vV,min:yV}=Math,ore=class sre extends Up{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=sre.age++}};ore.age=0;let bWe=ore;function rS(e,t){return Gt.isNaN(e)?t:e}var bs,Nr,ad,uu,pi,Rl,ld,cd,NC,BC,are,$C,lre,ug,L1,FC,zC,cre,jC,ure,UC,dre,HC,fre,N1,Q3,B1,J3,WC,hre,$1,Z3,GC,pre,VC,mre,qC,gre;class xWe extends HHe{constructor(){super(...arguments);Zn(this,BC);Zn(this,$C);Zn(this,zC);Zn(this,jC);Zn(this,UC);Zn(this,HC);Zn(this,N1);Zn(this,B1);Zn(this,WC);Zn(this,$1);Zn(this,GC);Zn(this,VC);Zn(this,qC);Zn(this,bs,void 0);Zn(this,Nr,void 0);Zn(this,ad,void 0);Zn(this,uu,void 0);Zn(this,pi,U7);Zn(this,Rl,[]);Zn(this,ld,new M8e(16));Zn(this,cd,void 0);Zn(this,NC,0);Zn(this,ug,Gt.once(()=>Gt.debounce(()=>Di(this,N1,Q3).call(this),Ze(this,pi).debounceInterval)));Zn(this,L1,Gt.once(()=>Gt.throttle(()=>Di(this,B1,J3).call(this),Ze(this,pi).refreshInterval)));Zn(this,FC,Gt.once(()=>Gt.throttle(n=>Di(this,WC,hre).call(this,n),Ze(this,pi).refreshInterval)))}getInstance(){return{app:Ze(this,bs),viewport:Ze(this,Nr)}}fitCamera(n=Gt.constant(!0)){var i,o,s,l;const r=Gt.values(Ze(this,ld).all()).flat().filter(n);if(r.length){const c=Gt.reduce(r,(d,f)=>({top:rS(yV(d.top,f.top),d.top),left:rS(yV(d.left,f.left),d.left),bottom:rS(vV(d.bottom,f.bottom),d.bottom),right:rS(vV(d.right,f.right),d.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(l=(i=Ze(this,Nr))==null?void 0:i.animate)==null||l.call(i,{position:new Ot((c.left+c.right)/2,(c.top+c.bottom)/2),scale:((s=(o=Ze(this,Nr))==null?void 0:o.findFit)==null?void 0:s.call(o,c.right-c.left,c.bottom-c.top))*.8,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}}initialCamera(){var n,r;(r=(n=Ze(this,Nr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:Ze(this,pi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,ug).call(this)()})}getView(){var n;return(n=Ze(this,bs))==null?void 0:n.view}setup(n){const r={...U7,...n};Di(this,$C,lre).call(this,r),this.setOptions(r),Di(this,jC,ure).call(this,r)}destroy(){Gt.map(Ze(this,Rl),n=>n.terminate()),Ze(this,bs).destroy()}add(n){const r=o3e();Gt.map(Ze(this,Rl),o=>o.call("add",[n,r]));const i=Gt.map(n,({component:o,meta:s})=>({...hWe[o.$].test(o),component:o,meta:s,index:Di(this,BC,are).call(this)}));return Ze(this,ld).load(i),()=>Gt.defer(()=>{for(const o of i)Ze(this,ld).remove(o);Gt.map(Ze(this,Rl),o=>o.call("remove",[r]))})}setOptions(n){const r={...Ze(this,pi),...n};Di(this,UC,dre).call(this,r),Jc(this,pi,r),Di(this,N1,Q3).call(this),Di(this,B1,J3).call(this)}}bs=new WeakMap,Nr=new WeakMap,ad=new WeakMap,uu=new WeakMap,pi=new WeakMap,Rl=new WeakMap,ld=new WeakMap,cd=new WeakMap,NC=new WeakMap,BC=new WeakSet,are=function(){return Qj(this,NC)._++},$C=new WeakSet,lre=function(n){Jc(this,bs,new Cj({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),Jc(this,Nr,new Yje({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:Ze(this,bs).renderer.events,passiveWheel:!1})),Ze(this,Nr).on("clicked",r=>{const{x:i,y:o}=r.world,s=Ze(this,ld).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})}),Ze(this,bs).stage.addChild(Ze(this,Nr)),Ze(this,Nr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Ze(this,Nr).on("moved",()=>{Ze(this,ug).call(this)(),Ze(this,L1).call(this)()}),Ze(this,Nr).on("mousemove",r=>Ze(this,FC).call(this)(r)),Jc(this,ad,new Ko),Ze(this,Nr).addChild(Ze(this,ad)),Jc(this,uu,new Hg),Ze(this,Nr).addChild(Ze(this,uu)),Jc(this,cd,new Hg),Ze(this,Nr).addChild(Ze(this,cd)),Di(this,zC,cre).call(this)},ug=new WeakMap,L1=new WeakMap,FC=new WeakMap,zC=new WeakSet,cre=function(){const{dynamicResolution:n}=Ze(this,pi),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:l,minScale:c}=n,d=Gt.floor(Xr.targetFPMS*s);let f=0,h=0,p=1;Ze(this,bs).ticker.add(g=>{const{tileResolution:v}=Ze(this,pi);if(!(f%d)){const y=h/d;p=Gt.clamp(y>=r?p+o:y<=i?p-o:p,c,l),Gt.map(Ze(this,Rl),S=>{S.call("setTileResolution",[{width:Gt.ceil(v.width/p),height:Gt.ceil(v.height/p)}])}),h=0}h+=g,f++})},jC=new WeakSet,ure=function(n){Gt.map(Ze(this,Rl),r=>r.terminate()),Jc(this,Rl,Gt.times(n.workerCount,r=>{const i=new vWe;return i.on("update",o=>Di(this,HC,fre).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},UC=new WeakSet,dre=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=Ze(this,bs))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=Ze(this,Nr))==null||c.resize(r,i)},HC=new WeakSet,fre=function({bounds:n,bitmap:r}){const i=ht.from(r);Di(this,GC,pre).call(this,i,n)},N1=new WeakSet,Q3=function(){const{top:n,bottom:r,left:i,right:o}=Ze(this,Nr);Gt.map(Ze(this,Rl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},B1=new WeakSet,J3=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=Ze(this,pi),{tiles:i}=gV(Ze(this,Nr),n),o=Di(this,$1,Z3).call(this);(s=Ze(this,uu))==null||s.clear(),(l=Ze(this,uu))==null||l.lineStyle(1*o,r,.5),(c=Ze(this,uu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Gt.find((d=Ze(this,ad))==null?void 0:d.children,g=>Gt.isEqual(g.bounds,h))||(f=Ze(this,uu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},WC=new WeakSet,hre=function(n){var c;const{accentColor:r}=Ze(this,pi),i=Di(this,$1,Z3).call(this),{x:o,y:s}=Ze(this,Nr).toWorld(n.globalX,n.globalY),l=Ze(this,ld).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});Ze(this,cd).clear(),Ze(this,cd).lineStyle(2*i,r,1);for(const d of l)(c=Ze(this,cd))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},$1=new WeakSet,Z3=function(){const{right:n,left:r}=Ze(this,Nr),{width:i}=Ze(this,pi).screenSize;return(n-r)/i},GC=new WeakSet,pre=async function(n,r){var s,l;const{tileSubdivision:i}=Ze(this,pi),{tiles:o}=gV(Ze(this,Nr),i);if(Gt.find(o,c=>Gt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},d=new bWe(n,r);(s=Ze(this,ad))==null||s.addChild(d).setTransform(r.left,r.top,c.x,c.y),Ze(this,L1).call(this)(),await Di(this,VC,mre).call(this,d),Gt.forEach((l=Ze(this,ad))==null?void 0:l.children,async f=>{yWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},qC=new WeakSet,gre=function(n){const r=Ze(this,bs).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/Xr.targetFPMS/Ze(this,pi).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const wWe=E8e(xWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),_We={"d2-renderer":wWe};var SWe=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},Pj={},EWe=Object.prototype.hasOwnProperty,CWe;function bV(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function xV(e){try{return encodeURIComponent(e)}catch{return null}}function TWe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=bV(r[1]),o=bV(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function kWe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(EWe.call(e,i)){if(r=e[i],!r&&(r===null||r===CWe||isNaN(r))&&(r=""),i=xV(i),r=xV(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Pj.stringify=kWe;Pj.parse=TWe;var vre=SWe,Kk=Pj,AWe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,yre=/[\n\r\t]/g,RWe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,bre=/:\d+$/,IWe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,PWe=/^[a-zA-Z]:/;function Oj(e){return(e||"").toString().replace(AWe,"")}var e5=[["#","hash"],["?","query"],function(t,n){return Xl(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]],wV={hash:1,query:1};function xre(e){var t;typeof window<"u"?t=window:typeof Bt<"u"?t=Bt: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 ec(unescape(e.pathname),{});else if(i==="string"){r=new ec(e,{});for(o in wV)delete r[o]}else if(i==="object"){for(o in e)o in wV||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=RWe.test(e.href))}return r}function Xl(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function wre(e,t){e=Oj(e),e=e.replace(yre,""),t=t||{};var n=IWe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,l;return i?o?(l=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(l=n[2]+n[4],s=n[2].length):o?(l=n[3]+n[4],s=n[3].length):l=n[4],r==="file:"?s>=2&&(l=l.slice(2)):Xl(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&Xl(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||Xl(r),slashesCount:s,rest:l}}function OWe(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 ec(e,t,n){if(e=Oj(e),e=e.replace(yre,""),!(this instanceof ec))return new ec(e,t,n);var r,i,o,s,l,c,d=e5.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Kk.parse),t=xre(t),i=wre(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||PWe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Xl(h.protocol)))&&(d[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const l=new Sre[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const $We={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function FWe({value:e,onValueChange:t}){const[n]=Ck(),r=ee.find(n,{key:e.key});function i(s){t==null||t(sk(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(dte,{sx:{color:$We[o]}}),C.jsx(yi,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:ee.startCase(o)}),C.jsx(zt,{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: ",ee.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(Mu,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(sj,{trigger:s=>C.jsx(Gh,{icon:C.jsx(ok,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(oj,{children:"Edit Renderer"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(K1,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(vx,{placeholder:"Renderer Type",items:ee.entries(Sre).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Mj={},Qk={},_w={};(function(e){var t=Bt&&Bt.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(S[b]=_[b])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function S(){this.constructor=v}v.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createJSONRPCNotification=e.createJSONRPCRequest=e.createJSONRPCSuccessResponse=e.createJSONRPCErrorResponse=e.JSONRPCErrorCode=e.JSONRPCErrorException=e.isJSONRPCResponses=e.isJSONRPCResponse=e.isJSONRPCRequests=e.isJSONRPCRequest=e.isJSONRPCID=e.JSONRPC=void 0,e.JSONRPC="2.0";var n=function(g){return typeof g=="string"||typeof g=="number"||g===null};e.isJSONRPCID=n;var r=function(g){return g.jsonrpc===e.JSONRPC&&g.method!==void 0&&g.result===void 0&&g.error===void 0};e.isJSONRPCRequest=r;var i=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCRequest)};e.isJSONRPCRequests=i;var o=function(g){return g.jsonrpc===e.JSONRPC&&g.id!==void 0&&(g.result!==void 0||g.error!==void 0)};e.isJSONRPCResponse=o;var s=function(g){return Array.isArray(g)&&g.every(e.isJSONRPCResponse)};e.isJSONRPCResponses=s;var l=function(g,v,y){var S={code:g,message:v};return y!=null&&(S.data=y),S},c=function(g){t(v,g);function v(y,S,_){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=_,b}return v.prototype.toObject=function(){return l(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=c,function(g){g[g.ParseError=-32700]="ParseError",g[g.InvalidRequest=-32600]="InvalidRequest",g[g.MethodNotFound=-32601]="MethodNotFound",g[g.InvalidParams=-32602]="InvalidParams",g[g.InternalError=-32603]="InternalError"}(e.JSONRPCErrorCode||(e.JSONRPCErrorCode={}));var d=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:l(v,y,S)}};e.createJSONRPCErrorResponse=d;var f=function(g,v){return{jsonrpc:e.JSONRPC,id:g,result:v??null}};e.createJSONRPCSuccessResponse=f;var h=function(g,v,y){return{jsonrpc:e.JSONRPC,id:g,method:v,params:y}};e.createJSONRPCRequest=h;var p=function(g,v){return{jsonrpc:e.JSONRPC,method:g,params:v}};e.createJSONRPCNotification=p})(_w);var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});Sw.DefaultErrorCode=void 0;Sw.DefaultErrorCode=0;var _V=Bt&&Bt.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(f){try{d(r.next(f))}catch(h){s(h)}}function c(f){try{d(r.throw(f))}catch(h){s(h)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})},SV=Bt&&Bt.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{const r=({data:i})=>{i.id===n.id&&(this.rpc.receive(i),this.worker.removeEventListener("message",r))};this.worker.postMessage(n),this.worker.addEventListener("message",r)})}connect(){return this.worker.postMessage(this.options.url),new Promise(t=>{const n=()=>{t(),this.worker.removeEventListener("message",n)};this.worker.addEventListener("message",n)})}async disconnect(){this.worker.terminate()}async call(t,n){return await this.rpc.request(t,n)}}const nGe={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 rGe{constructor(t){Vp(this,"handler");this.options=t;const{hostname:n}=_re(t.url);this.handler=nGe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const tc=Object.create(null);tc.open="0";tc.close="1";tc.ping="2";tc.pong="3";tc.message="4";tc.upgrade="5";tc.noop="6";const XS=Object.create(null);Object.keys(tc).forEach(e=>{XS[tc[e]]=e});const t5={type:"error",data:"parser error"},Cre=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Tre=typeof ArrayBuffer=="function",kre=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dj=({type:e,data:t},n,r)=>Cre&&t instanceof Blob?n?r(t):kV(t,r):Tre&&(t instanceof ArrayBuffer||kre(t))?n?r(t):kV(new Blob([t]),r):r(tc[e]+(t||"")),kV=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function AV(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let YB;function iGe(e,t){if(Cre&&e.data instanceof Blob)return e.data.arrayBuffer().then(AV).then(t);if(Tre&&(e.data instanceof ArrayBuffer||kre(e.data)))return t(AV(e.data));Dj(e,!1,n=>{YB||(YB=new TextEncoder),t(YB.encode(n))})}const RV="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ex=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return d},sGe=typeof ArrayBuffer=="function",Lj=(e,t)=>{if(typeof e!="string")return{type:"message",data:Are(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:aGe(e.substring(1),t)}:XS[n]?e.length>1?{type:XS[n],data:e.substring(1)}:{type:XS[n]}:t5},aGe=(e,t)=>{if(sGe){const n=oGe(e);return Are(n,t)}else return{base64:!0,data:e}},Are=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Rre=String.fromCharCode(30),lGe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Dj(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Rre))})})},cGe=(e,t)=>{const n=e.split(Rre),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 KB;function oS(e){return e.reduce((t,n)=>t+n.length,0)}function sS(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){l.enqueue(t5);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(oS(n)e){l.enqueue(t5);break}}}})}const Ire=4;function Kr(e){if(e)return fGe(e)}function fGe(e){for(var t in Kr.prototype)e[t]=Kr.prototype[t];return e}Kr.prototype.on=Kr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Kr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Kr.prototype.off=Kr.prototype.removeListener=Kr.prototype.removeAllListeners=Kr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Pre(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const hGe=Zs.setTimeout,pGe=Zs.clearTimeout;function eA(e,t){t.useNativeTimers?(e.setTimeoutFn=hGe.bind(Zs),e.clearTimeoutFn=pGe.bind(Zs)):(e.setTimeoutFn=Zs.setTimeout.bind(Zs),e.clearTimeoutFn=Zs.clearTimeout.bind(Zs))}const mGe=1.33;function gGe(e){return typeof e=="string"?vGe(e):Math.ceil((e.byteLength||e.size)*mGe)}function vGe(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function yGe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function bGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Mre(){const e=OV(+new Date);return e!==PV?(IV=0,PV=e):e+"."+OV(IV++)}for(;aS{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)};cGe(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,lGe(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]=Mre()),!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 Yl(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 Yl extends Kr{constructor(t,n){super(),eA(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=Pre(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Lre(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=Yl.requestsCount++,Yl.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=SGe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Yl.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()}}Yl.requestsCount=0;Yl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MV);else if(typeof addEventListener=="function"){const e="onpagehide"in Zs?"pagehide":"unload";addEventListener(e,MV,!1)}}function MV(){for(let e in Yl.requests)Yl.requests.hasOwnProperty(e)&&Yl.requests[e].abort()}const Bj=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),lS=Zs.WebSocket||Zs.MozWebSocket,DV=!0,TGe="arraybuffer",LV=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kGe extends Nj{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=LV?{}:Pre(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=DV&&!LV?n?new lS(t,n):new lS(t):new lS(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{DV&&this.ws.send(o)}catch{}i&&Bj(()=>{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]=Mre()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!lS}}class AGe extends Nj{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=dGe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=uGe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Bj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const RGe={websocket:kGe,webtransport:AGe,polling:CGe},IGe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PGe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r5(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=IGe.exec(e||""),o={},s=14;for(;s--;)o[PGe[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=OGe(o,o.path),o.queryKey=MGe(o,o.query),o}function OGe(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 MGe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Nre=class xm extends Kr{constructor(t,n={}){super(),this.binaryType=TGe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=r5(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=r5(n.host).host),eA(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=bGe(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=Ire,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 RGe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&xm.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;xm.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;xm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=h=>{const p=new Error("probe error: "+h);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function c(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",xm.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){xm.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,Bre=Object.prototype.toString,BGe=typeof Blob=="function"||typeof Blob<"u"&&Bre.call(Blob)==="[object BlobConstructor]",$Ge=typeof File=="function"||typeof File<"u"&&Bre.call(File)==="[object FileConstructor]";function $j(e){return LGe&&(e instanceof ArrayBuffer||NGe(e))||BGe&&e instanceof Blob||$Ge&&e instanceof File}function YS(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,l)=>r?s?o(s):i(l):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:hn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case hn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case hn.EVENT:case hn.BINARY_EVENT:this.onevent(t);break;case hn.ACK:case hn.BINARY_ACK:this.onack(t);break;case hn.DISCONNECT:this.ondisconnect();break;case hn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:hn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:hn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}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 s5 extends Kr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,eA(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||GGe;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 Nre(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=qa(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=qa(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qa(t,"ping",this.onping.bind(this)),qa(t,"data",this.ondata.bind(this)),qa(t,"error",this.onerror.bind(this)),qa(t,"close",this.onclose.bind(this)),qa(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){Bj(()=>{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 $re(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 Mb={};function KS(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DGe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Mb[i]&&o in Mb[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new s5(r,t):(Mb[i]||(Mb[i]=new s5(r,t)),c=Mb[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(KS,{Manager:s5,Socket:$re,io:KS,connect:KS});class qGe{constructor(t){Vp(this,"rpc");Vp(this,"socket");this.options=t,this.socket=KS(t.url),this.rpc=new Mj.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 zj={socketio:{name:"socket.io",constructor:qGe},ipc:{name:"Web Worker",constructor:tGe},native:{name:"Internal",constructor:rGe}};function XGe(e){return zj[e].constructor}const Fre=ee.first(ee.keys(zj));function YGe(){const[{renderer:e},t]=Nu();return C.jsx(C.Fragment,{children:C.jsx(Mk,{editor:n=>C.jsx(FWe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:Fre,url:"",disabled:!0}),addItemExtras:C.jsx(zd,{icon:C.jsx(QK,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:qQ})),children:"Reset to Defaults"})})})}function KGe(e){const[{connections:t}]=vk(),n=Oz(),[{remote:r}]=Nu(),i=ee.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const QGe={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function JGe({value:e,onValueChange:t}){const n=D2e(e.url),r=KGe(e.url);function i(o){t==null||t(sk(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(bn,{alignItems:"center",py:.5,children:[C.jsx(dte,{sx:{color:QGe[r]}}),C.jsx(yi,{}),C.jsxs(dt,{flex:1,children:[C.jsx(zt,{children:n?`${n.name} ${n.version}`:ee.startCase(r)}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(Mu,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(dt,{children:C.jsx(Tg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(sj,{trigger:o=>C.jsx(Gh,{icon:C.jsx(ok,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(oj,{children:"Edit Connection"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(K1,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(vx,{placeholder:"Connection Type",items:ee.entries(zj).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function ZGe(){const[{remote:e},t]=Nu();return C.jsx(C.Fragment,{children:C.jsx(Mk,{editor:n=>C.jsx(JGe,{value:n}),icon:null,value:e,onChange:ee.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:Fre,url:"",disabled:!0}),addItemExtras:C.jsx(zd,{icon:C.jsx(QK,{}),sx:{ml:2},onClick:()=>t(()=>({remote:VQ})),children:"Reset to Defaults"})})})}const BV=e=>`${e}x`;function e9e(){const{controls:e,onChange:t,state:n}=Lu(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Nu(),[c,d]=I.useState("general");function f(p){return C.jsx(zt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(zt,{variant:"body1",children:p})}return C.jsx(QQ,{value:c,children:C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Options,{children:C.jsxs(tJ,{onChange:(p,g)=>d(g),children:[C.jsx(Dm,{label:"General",value:"general"}),C.jsx(Dm,{label:"Connections",value:"connections"}),C.jsx(Dm,{label:"Renderers",value:"renderers"}),C.jsx(Dm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,children:C.jsx(iv,{y:!0,children:C.jsxs(bn,{vertical:!0,pt:6,children:[C.jsx($m,{value:"general",children:C.jsxs(dt,{children:[f("Playback"),C.jsxs(bn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(yi,{flex:1}),C.jsx(Y0e,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(p=>({value:p*um,label:BV(p)})),step:1*um,min:1*um,max:10*um,valueLabelFormat:p=>BV(p/um),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(bn,{alignItems:"center",children:[h("Acrylic"),C.jsx(yi,{flex:1}),C.jsx(Tg,{defaultChecked:!!i,onChange:(p,g)=>l(()=>({acrylic:g}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(yi,{flex:1}),C.jsx(Tg,{defaultChecked:o==="dark",onChange:(p,g)=>l(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(bn,{alignItems:"center",children:[h("Accent"),C.jsx(yi,{flex:1}),C.jsx(Ro,{value:s,items:ee.map(ee.keys(S_e),p=>({id:p,name:ee.startCase(p)})),showArrow:!0,onChange:p=>l(()=>({accentColor:p}))})]})]})}),C.jsx($m,{value:"connections",children:C.jsxs(dt,{children:[f("Solvers"),C.jsx(ZGe,{})]})}),C.jsx($m,{value:"renderers",children:C.jsxs(dt,{children:[f("Renderers"),C.jsx(YGe,{})]})}),C.jsx($m,{value:"map-parsers",children:C.jsxs(dt,{children:[f("Map Parsers"),C.jsx(t9e,{})]})})]})})})}),C.jsx(Sn.Extras,{children:e})]})})}function t9e(){return C.jsx(wp,{children:ee.keys(gz).map(e=>C.jsx(Qm,{children:C.jsx(sl,{primary:e,secondary:"Internal"})},e))})}const tA=0,sf=1,xv=2,zre=4;function jre(e,t){return n=>e(t(n))}function n9e(e,t){return t(e)}function Ure(e,t){return n=>e(t,n)}function $V(e,t){return()=>e(t)}function nA(e,t){return t(e),e}function gr(...e){return e}function r9e(e){e()}function FV(e){return()=>e}function i9e(...e){return()=>{e.map(r9e)}}function jj(e){return e!==void 0}function wv(){}function jn(e,t){return e(sf,t)}function en(e,t){e(tA,t)}function Uj(e){e(xv)}function As(e){return e(zre)}function St(e,t){return jn(e,Ure(t,tA))}function Ru(e,t){const n=e(sf,r=>{n(),t(r)});return n}function yn(){const e=[];return(t,n)=>{switch(t){case xv:e.splice(0,e.length);return;case sf:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case tA:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function et(e){let t=e;const n=yn();return(r,i)=>{switch(r){case sf:i(t);break;case tA:t=i;break;case zre:return t}return n(r,i)}}function o9e(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case sf:return o?n===o?void 0:(r(),n=o,t=jn(e,o),t):(r(),wv);case xv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Ds(e){return nA(yn(),t=>St(e,t))}function ko(e,t){return nA(et(t),n=>St(e,n))}function s9e(...e){return t=>e.reduceRight(n9e,t)}function Pe(e,...t){const n=s9e(...t);return(r,i)=>{switch(r){case sf:return jn(e,n(i));case xv:Uj(e);return}}}function Hre(e,t){return e===t}function hr(e=Hre){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ht(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>jre(t,e)}function cu(e){return t=>()=>t(e)}function $l(e,t){return n=>r=>n(t=e(t,r))}function Gg(e){return t=>n=>{e>0?e--:t(n)}}function yd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function zV(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function an(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function jV(...e){return function(t,n){switch(t){case sf:return i9e(...e.map(r=>jn(r,n)));case xv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Ut(e,t=Hre){return Pe(e,hr(t))}function bi(...e){const t=yn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);jn(o,c=>{n[s]=c,r=r|l,r===i&&en(t,n)})}),function(o,s){switch(o){case sf:return r===i&&s(n),jn(t,s);case xv:return Uj(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:a9e(),constructor:e,dependencies:t,singleton:n}}const a9e=()=>Symbol();function l9e(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const l=i(o.map(c=>n(c)));return s&&t.set(r,l),l};return n(e)}function c9e(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];en(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=o9e(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>nA(l9e(e),A=>c(A,b))),[E]=de.useState($V(f,x));return cS(()=>{for(const A of s)A in b&&jn(E[A],b[A]);return()=>{Object.values(E).map(Uj)}},[b,E,x]),cS(()=>{c(x,b)}),de.useImperativeHandle(S,FV(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,c9e([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(Ure(en,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState($V(As,_));return cS(()=>jn(_,E=>{E!==b&&x(FV(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];cS(()=>jn(b,S),[S,b])}}}const u9e=typeof document<"u"?de.useLayoutEffect:de.useEffect,d9e=u9e;var Ls=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ls||{});const f9e={0:"debug",1:"log",2:"warn",3:"error"},h9e=()=>typeof globalThis>"u"?window:globalThis,af=$n(()=>{const e=et(3);return{log:et((n,r,i=1)=>{var o;const s=(o=h9e().VIRTUOSO_LOG_LEVEL)!=null?o:As(e);i>=s&&console[f9e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Hj(e,t=!0){const n=de.useRef(null);let r=i=>{};if(typeof ResizeObserver<"u"){const i=de.useMemo(()=>new ResizeObserver(o=>{const s=o[0].target;s.offsetParent!==null&&e(s)}),[e]);r=o=>{o&&t?(i.observe(o),n.current=o):(n.current&&i.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Wp(e,t=!0){return Hj(e,t).callbackRef}function p9e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=m9e(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window",p=s?s.scrollTop:h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=s?s.scrollHeight:h?document.documentElement.scrollHeight:f.scrollHeight,v=s?s.offsetHeight:h?window.innerHeight:f.offsetHeight;r({scrollTop:Math.max(p,0),scrollHeight:g,viewportHeight:v}),o==null||o(g9e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return Hj(l,n)}function m9e(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s{const p=h.target,g=p===window||p===document,v=g?window.pageYOffset||document.documentElement.scrollTop:p.scrollTop,y=g?document.documentElement.scrollHeight:p.scrollHeight,S=g?window.innerHeight:p.offsetHeight,_=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?_():Mm.flushSync(_),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);de.useEffect(()=>{const h=i||o.current;return r(i||o.current),c({target:h,suppressFlushSync:!0}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[o,c,n,r,i]);function d(h){const p=o.current;if(!p||"offsetHeight"in p&&p.offsetHeight===0)return;const g=h.behavior==="smooth";let v,y,S;p===window?(y=Math.max(Vd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Vd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),Gre(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Mo=$n(()=>{const e=yn(),t=yn(),n=et(0),r=yn(),i=et(0),o=yn(),s=yn(),l=et(0),c=et(0),d=et(0),f=et(0),h=yn(),p=yn(),g=et(!1);return St(Pe(e,lt(({scrollTop:v})=>v)),t),St(Pe(e,lt(({scrollHeight:v})=>v)),s),St(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),I1={lvl:0};function qre(e,t,n,r=I1,i=I1){return{k:e,v:t,lvl:n,l:r,r:i}}function Kn(e){return e===I1}function cg(){return I1}function a5(e,t){if(Kn(e))return I1;const{k:n,l:r,r:i}=e;if(t===n){if(Kn(r))return i;if(Kn(i))return r;{const[o,s]=Xre(r);return QS(ui(e,{k:o,v:s,l:Yre(r)}))}}else return tt&&(l=l.concat(l5(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(l5(s,t,n))),l}function ep(e){return Kn(e)?[]:[...ep(e.l),{k:e.k,v:e.v},...ep(e.r)]}function Xre(e){return Kn(e.r)?[e.k,e.v]:Xre(e.r)}function Yre(e){return Kn(e.r)?e.l:QS(ui(e,{r:Yre(e.r)}))}function ui(e,t){return qre(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 QB(e){return Kn(e)||e.lvl>e.r.lvl}function UV(e){return c5(Qre(e))}function QS(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(QB(t))return Qre(ui(e,{lvl:r-1}));if(!Kn(t)&&!Kn(t.r))return ui(t.r,{l:ui(t,{r:t.r.l}),r:ui(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(QB(e))return c5(ui(e,{lvl:r-1}));if(!Kn(n)&&!Kn(n.l)){const i=n.l,o=QB(i)?n.lvl-1:n.lvl;return ui(i,{l:ui(e,{r:i.l,lvl:r-1}),r:c5(ui(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function rA(e,t,n){if(Kn(e))return[];const r=ml(e,t)[0];return v9e(l5(e,r,n))}function Kre(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 c5(e){const{r:t,lvl:n}=e;return!Kn(t)&&!Kn(t.r)&&t.lvl===n&&t.r.lvl===n?ui(t,{l:ui(e,{r:t.l}),lvl:n+1}):e}function Qre(e){const{l:t}=e;return!Kn(t)&&t.lvl===e.lvl?ui(t,{r:ui(e,{l:t.r})}):e}function OC(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],l=n(s,t);if(l===0)return o;if(l===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Jre(e,t,n){return e[OC(e,t,n)]}function y9e(e,t,n,r){const i=OC(e,t,r),o=OC(e,n,r,i);return e.slice(i,o+1)}const Wj=$n(()=>({recalcInProgress:et(!1)}),[],{singleton:!0});function b9e(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 HV(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=a5(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=Cs(e,s+1,p));d&&(e=Cs(e,o,i))}return[e,n]}function w9e(){return{offsetTree:[],sizeTree:cg(),groupOffsetTree:cg(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Gj({index:e},t){return t===e?0:t0&&(t=Math.max(t,Jre(e,r,Gj).offset)),Kre(y9e(e,t,n,_9e),S9e)}function u5(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=OC(i,t-1,Gj),l=i[c].offset;const f=ml(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===ml(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of rA(n,t,1/0)){const h=d-o,p=h*s+l+h*r;i.push({offset:p,size:f,index:d}),o=d,l=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function C9e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Ls.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Kn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>Cs(Cs(v,y,p),y+1,g),s)}else[s,l]=x9e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:h}=u5(e.offsetTree,l,s,i);return{sizeTree:s,offsetTree:c,lastIndex:d,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>Cs(p,g,O1(g,c,i)),cg()),groupIndices:n}}function O1(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Jre(t,e,Gj),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function T9e(e){return typeof e.groupIndex<"u"}function Zre(e,t,n){if(T9e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=eie(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function eie(e,t){if(!iA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function iA(e){return!Kn(e.groupOffsetTree)}function k9e(e){return ep(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 A9e={offsetHeight:"height",offsetWidth:"width"},ac=$n(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),i=ko(r,0),o=yn(),s=yn(),l=et(0),c=et([]),d=et(void 0),f=et(void 0),h=et((A,R)=>Vd(A,A9e[R])),p=et(void 0),g=et(0),v=w9e(),y=ko(Pe(n,an(c,e,g),$l(C9e,v),hr()),v),S=ko(Pe(c,hr(),$l((A,R)=>({prev:A.current,current:R}),{prev:[],current:[]}),lt(({prev:A})=>A)),[]);St(Pe(c,Ht(A=>A.length>0),an(y,g),lt(([A,R,k])=>{const O=A.reduce((L,N,H)=>Cs(L,N,O1(N,R.offsetTree,k)||H),cg());return{...R,groupIndices:A,groupOffsetTree:O}})),y),St(Pe(r,an(y),Ht(([A,{lastIndex:R}])=>A[{startIndex:A,endIndex:R,size:k}])),n),St(d,f);const _=ko(Pe(d,lt(A=>A===void 0)),!0);St(Pe(f,Ht(A=>A!==void 0&&Kn(As(y).sizeTree)),lt(A=>[{startIndex:0,endIndex:0,size:A}])),n);const b=Ds(Pe(n,an(y),$l(({sizes:A},[R,k])=>({changed:k!==A,sizes:k}),{changed:!1,sizes:v}),lt(A=>A.changed)));jn(Pe(l,$l((A,R)=>({diff:A.prev-R,prev:R}),{diff:0,prev:0}),lt(A=>A.diff)),A=>{const{groupIndices:R}=As(y);if(A>0)en(t,!0),en(o,A+HV(A,R));else if(A<0){const k=As(S);k.length>0&&(A-=HV(-A,k)),en(s,A)}}),jn(Pe(l,an(e)),([A,R])=>{A<0&&R("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Ls.ERROR)});const x=Ds(o);St(Pe(o,an(y),lt(([A,R])=>{const k=R.groupIndices.length>0,O=[],L=R.lastSize;if(k){const N=P1(R.sizeTree,0);let H=0,W=0;for(;H{let G=F.ranges;return F.prevSize!==0&&(G=[...F.ranges,{startIndex:F.prevIndex,endIndex:j+A-1,size:F.prevSize}]),{ranges:G,prevIndex:j+A,prevSize:V}},{ranges:O,prevIndex:A,prevSize:0}).ranges}return ep(R.sizeTree).reduce((N,{k:H,v:W})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+A-1,size:N.prevSize}],prevIndex:H+A,prevSize:W}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Ds(Pe(s,an(y,g),lt(([A,{offsetTree:R},k])=>{const O=-A;return O1(O,R,k)})));return St(Pe(s,an(y,g),lt(([A,R,k])=>{if(R.groupIndices.length>0){if(Kn(R.sizeTree))return R;let L=cg();const N=As(S);let H=0,W=0,z=0;for(;H<-A;){z=N[W];const F=N[W+1]-z-1;W++,H+=F+1}if(L=ep(R.sizeTree).reduce((F,{k:j,v:V})=>Cs(F,Math.max(0,j+A),V),L),H!==-A){const F=P1(R.sizeTree,z);L=Cs(L,0,F);const j=ml(R.sizeTree,-A+1)[1];L=Cs(L,1,j)}return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}else{const L=ep(R.sizeTree).reduce((N,{k:H,v:W})=>Cs(N,Math.max(0,H+A),W),cg());return{...R,sizeTree:L,...u5(R.offsetTree,0,L,k)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:l,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:_,itemSize:h}},gr(af,Wj),{singleton:!0}),R9e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function tie(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!R9e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ew=$n(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=yn(),v=et(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),en(i,!1)}return St(Pe(g,an(e,o,t,v,c,d,p),an(r,f,h),lt(([[x,E,A,R,k,O,L,N],H,W,z])=>{const D=tie(x),{align:F,behavior:j,offset:V}=D,G=R-1,K=Zre(D,E,G);let Y=O1(K,E.offsetTree,H)+O;F==="end"?(Y+=W+ml(E.sizeTree,K)[1]-A+z,K===G&&(Y+=L)):F==="center"?Y+=(W+ml(E.sizeTree,K)[1]-A+z)/2:Y-=k,V&&(Y+=V);const J=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Ls.DEBUG),en(g,x)):N("list did not change, scroll successful",{},Ls.DEBUG)};if(b(),j==="smooth"){let ie=!1;_=jn(n,ce=>{ie=ie||ce}),y=Ru(l,()=>{J(ie)})}else y=Ru(Pe(n,I9e(150)),J);return S=setTimeout(()=>{b()},1200),en(i,!0),N("scrolling from index to",{index:K,top:Y,behavior:j},Ls.DEBUG),{top:Y,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},gr(ac,Mo,af),{singleton:!0});function I9e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const M1="up",Ix="down",P9e="none",O9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},M9e=0,Cw=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=et(!1),l=et(!0),c=yn(),d=yn(),f=et(4),h=et(M9e),p=ko(Pe(jV(Pe(Ut(t),Gg(1),cu(!0)),Pe(Ut(t),Gg(1),cu(!1),zV(100))),hr()),!1),g=ko(Pe(jV(Pe(o,cu(!0)),Pe(o,cu(!1),zV(200))),hr()),!1);St(Pe(bi(Ut(t),Ut(h)),lt(([b,x])=>b<=x),hr()),l),St(Pe(l,yd(50)),d);const v=Ds(Pe(bi(e,Ut(n),Ut(r),Ut(i),Ut(f)),$l((b,[{scrollTop:x,scrollHeight:E},A,R,k,O])=>{const L=x+A-E>-O,N={viewportHeight:A,scrollTop:x,scrollHeight:E};if(L){let W,z;return x>b.state.scrollTop?(W="SCROLLED_DOWN",z=b.state.scrollTop-x):(W="SIZE_DECREASED",z=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:W,scrollTopDelta:z}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ab&&b.atBottom===x.atBottom))),y=ko(Pe(e,$l((b,{scrollTop:x,scrollHeight:E,viewportHeight:A})=>{if(Gre(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const R=E-(x+A)<1;return b.scrollTop!==x&&R?{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),lt(b=>b.jump)),0);St(Pe(v,lt(b=>b.atBottom)),s),St(Pe(s,yd(50)),c);const S=et(Ix);St(Pe(e,lt(({scrollTop:b})=>b),hr(),$l((b,x)=>As(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),St(Pe(e,yd(50),cu(P9e)),S);const _=et(0);return St(Pe(p,Ht(b=>!b),cu(0)),_),St(Pe(t,yd(100),an(p),Ht(([b,x])=>!!x),$l(([b,x],[E])=>[x,E],[0,0]),lt(([b,x])=>x-b)),_),{isScrolling:p,isAtTop:l,isAtBottom:s,atBottomState:v,atTopStateChange:d,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:_,lastJumpDueToItemResize:y}},gr(Mo)),lf=$n(([{log:e}])=>{const t=et(!1),n=Ds(Pe(t,Ht(r=>r),hr()));return jn(t,r=>{r&&As(e)("props updated",{},Ls.DEBUG)}),{propsReady:t,didMount:n}},gr(af),{singleton:!0});function Vj(e,t){e==0?t():requestAnimationFrame(()=>Vj(e-1,t))}function qj(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Tw=$n(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=et(!0),l=et(0),c=et(!1);return St(Pe(o,an(l),Ht(([d,f])=>!!f),cu(!1)),s),jn(Pe(bi(t,o),an(s,e,n,c),Ht(([[,d],f,{sizeTree:h},p,g])=>d&&(!Kn(h)||jj(p))&&!f&&!g),an(l)),([,d])=>{en(c,!0),Vj(3,()=>{Ru(r,()=>en(s,!0)),en(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},gr(ac,Mo,Ew,lf),{singleton:!0});function WV(e){return e?e==="smooth"?"smooth":"auto":!1}const D9e=(e,t)=>typeof e=="function"?WV(e(t)):t&&WV(e),L9e=$n(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=et(!1),h=yn();let p=null;function g(y){en(i,{index:"LAST",align:"end",behavior:y})}jn(Pe(bi(Pe(Ut(e),Gg(1)),l),an(Ut(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let A=S&&x,R="auto";return A&&(R=D9e(_,b||E),A=A&&!!R),{totalCount:y,shouldFollow:A,followOutputBehavior:R}}),Ht(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Ru(t,()=>{As(c)("following output to ",{totalCount:y},Ls.DEBUG),g(S),p=null})});function v(y){const S=Ru(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(As(c)("scrolling to bottom due to increased size",{},Ls.DEBUG),g("auto"))});setTimeout(S,100)}return jn(Pe(bi(Ut(f),e,s),Ht(([y,,S])=>y&&S),$l(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Ht(({refreshed:y})=>y),an(f,e)),([,y])=>{v(y!==!1)}),jn(h,()=>{v(As(f)!==!1)}),jn(bi(Ut(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},gr(ac,Cw,Ew,Tw,lf,af,Mo));function N9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const nie=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=yn(),s=yn(),l=Ds(Pe(o,lt(N9e)));return St(Pe(l,lt(c=>c.totalCount)),e),St(Pe(l,lt(c=>c.groupIndices)),t),St(Pe(bi(r,n,i),Ht(([c,d])=>iA(d)),lt(([c,d,f])=>ml(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),hr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},gr(ac,Mo));function D1(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function rie(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const MC="top",DC="bottom",GV="none";function VV(e,t,n){return typeof e=="number"?n===M1&&t===MC||n===Ix&&t===DC?e:0:n===M1?t===MC?e.main:e.reverse:t===DC?e.main:e.reverse}function qV(e,t){return typeof e=="number"?e:e[t]||0}const Xj=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=yn(),s=et(0),l=et(0),c=et(0),d=ko(Pe(bi(Ut(e),Ut(t),Ut(r),Ut(o,D1),Ut(c),Ut(s),Ut(i),Ut(n),Ut(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,A=S+_,R=Math.max(p-E,0);let k=GV;const O=qV(x,MC),L=qV(x,DC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+A-O&&(k=M1),vf!=null),hr(D1)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},gr(Mo),{singleton:!0});function B9e(e,t,n){if(iA(t)){const r=eie(e,t);return[{index:ml(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 JB={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function XV(e,t,n){if(e.length===0)return[];if(!iA(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=rA(t.groupOffsetTree,r,i);let l,c=0;for(const d of e){(!l||l.end0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=l+h*s+(h-1)*r,g=d,v=p-f;return{items:XV(e,i,o),topItems:XV(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:d,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function iie(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const l=e+s,c=qj(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return JS(d,[],l,i,n,r)}const Gp=$n(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=et([]),S=et(0),_=yn();St(o.topItemsIndexes,y);const b=ko(Pe(bi(g,v,Ut(s,D1),Ut(t),Ut(e),Ut(f),d,Ut(y),Ut(r),Ut(i),n),Ht(([R,k,,O,,,,,,,L])=>{const N=L&&L.length!==O;return R&&!k&&!N}),lt(([,,[R,k],O,L,N,H,W,z,D,F])=>{const j=L,{sizeTree:V,offsetTree:G}=j,K=As(S);if(O===0)return{...JB,totalCount:O};if(R===0&&k===0)return K===0?{...JB,totalCount:O}:iie(K,N,L,z,D,F||[]);if(Kn(V))return K>0?null:JS(B9e(qj(N,O),j,F),[],O,D,j,z);const Y=[];if(W.length>0){const se=W[0],Q=W[W.length-1];let ae=0;for(const le of rA(V,se,Q)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,Q);for(let ye=pe;ye<=ve;ye++)Y.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return JS([],Y,O,D,j,z);const J=W.length>0?W[W.length-1]+1:0,ie=E9e(G,R,k,J);if(ie.length===0)return null;const ce=O-1,ue=nA([],se=>{for(const Q of ie){const ae=Q.value;let le=ae.offset,he=Q.start;const pe=ae.size;if(ae.offset=k);ye++)se.push({index:ye,size:pe,offset:le,data:F&&F[ye]}),le+=pe+D}});return JS(ue,Y,O,D,j,z)}),Ht(R=>R!==null),hr()),JB);St(Pe(n,Ht(jj),lt(R=>R==null?void 0:R.length)),t),St(Pe(b,lt(R=>R.topListHeight)),h),St(h,c),St(Pe(b,lt(R=>[R.top,R.bottom])),l),St(Pe(b,lt(R=>R.items)),_);const x=Ds(Pe(b,Ht(({items:R})=>R.length>0),an(t,n),Ht(([{items:R},k])=>R[R.length-1].originalIndex===k-1),lt(([,R,k])=>[R-1,k]),hr(D1),lt(([R])=>R))),E=Ds(Pe(b,yd(200),Ht(({items:R,topItems:k})=>R.length>0&&R[0].originalIndex===k.length),lt(({items:R})=>R[0].index),hr())),A=Ds(Pe(b,Ht(({items:R})=>R.length>0),lt(({items:R})=>{let k=0,O=R.length-1;for(;R[k].type==="group"&&kk;)O--;return{startIndex:R[k].index,endIndex:R[O].index}}),hr(rie)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:A,itemsRendered:_,initialItemCount:S,...p}},gr(ac,nie,Xj,Tw,Ew,Cw,lf,Wj),{singleton:!0}),$9e=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(St(Pe(l,an(o),Ht(([,c])=>c!==0),an(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>iie(c,d,f,h,p,g))),s),{}),gr(ac,Tw,Gp,lf),{singleton:!0}),oie=$n(([{scrollVelocity:e}])=>{const t=et(!1),n=yn(),r=et(!1);return St(Pe(e,an(r,t,n),Ht(([i,o])=>!!o),lt(([i,o,s,l])=>{const{exit:c,enter:d}=o;if(s){if(c(i,l))return!1}else if(d(i,l))return!0;return s}),hr()),t),jn(Pe(bi(t,e,n),an(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},gr(Cw),{singleton:!0}),F9e=$n(([{topItemsIndexes:e}])=>{const t=et(0);return St(Pe(t,Ht(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gr(Gp)),sie=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=yn(),s=ko(Pe(bi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return St(Ut(s),o),{totalListHeight:s,totalListHeightChanged:o}},gr(Mo,Gp),{singleton:!0});function aie(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const z9e=aie(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),j9e=$n(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Ds(Pe(c,an(l),$l(([,_,b,x],[{items:E,totalCount:A,bottom:R,offsetBottom:k},O])=>{const L=R+k;let N=0;return b===A&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,A,L]},[0,[],0,0]),Ht(([_])=>_!==0),an(t,s,r,o,g,v),Ht(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===M1),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Ls.DEBUG),_))));function S(_){_>0?(en(e,{top:-_,behavior:"auto"}),en(n,0)):(en(n,0),en(e,{top:-_,behavior:"auto"}))}return jn(Pe(y,an(n,i)),([_,b,x])=>{x&&z9e()?en(n,b-_):S(-_)}),jn(Pe(bi(ko(i,!1),n,v),Ht(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),yd(1)),S),St(Pe(f,lt(_=>({top:-_}))),e),jn(Pe(d,an(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},A])=>{function R(k){return k*(b+A)}if(x.length===0)return R(_);{let k=0;const O=P1(E,0);let L=0,N=0;for(;L<_;){L++,k+=O;let H=x.length===N+1?1/0:x[N+1]-x[N]-1;L+H>_&&(k-=O,H=_-L+1),L+=H,k+=R(H),N++}return k}})),_=>{en(n,_),requestAnimationFrame(()=>{en(e,{top:_}),requestAnimationFrame(()=>{en(n,0),en(v,!1)})})}),{deviation:n}},gr(Mo,Cw,Gp,ac,af,Wj)),U9e=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=et(0);return jn(Pe(e,an(r),Ht(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{Ru(Pe(n,Gg(1),Ht(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{en(t,i)})})}),{initialScrollTop:r}},gr(lf,Mo,Gp),{singleton:!0}),H9e=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=et(!1),r=ko(Pe(bi(n,e,t),Ht(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),yd(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},gr(Mo,sie),{singleton:!0}),Yj=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=yn(),r=yn(),i=yn(),o=et(!1),s=et(void 0);return St(Pe(bi(n,r),lt(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),St(Pe(e,an(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},gr(Mo)),W9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,G9e=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=yn();return St(Pe(f,an(e,i,t,o,s,l,r),an(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:A,align:R,calculateViewLocation:k=W9e,...O}=h,L=Zre(h,p,v-1),N=O1(L,p.offsetTree,x)+y+S,H=N+ml(p.sizeTree,L)[1],W=b+S,z=b+g-_,D=k({itemTop:N,itemBottom:H,viewportTop:W,viewportBottom:z,locationParams:{behavior:A,align:R,...O}});return D?E&&Ru(Pe(c,Ht(F=>F===!1),Gg(As(c)?1:2)),E):E&&E(),D}),Ht(h=>h!==null)),d),{scrollIntoView:f}},gr(ac,Mo,Ew,Gp,af),{singleton:!0}),V9e=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=yn(),d=et(void 0),f=et(null),h=et(null);return St(s,f),St(l,h),jn(Pe(c,an(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=k9e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),St(Pe(d,Ht(jj),lt(q9e)),r),St(Pe(i,an(d),Ht(([,p])=>p!==void 0),hr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},gr(ac,Mo,Tw,lf,Yj));function q9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const X9e=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),gr(Xj,$9e,lf,oie,sie,U9e,H9e,Yj,G9e,af)),Y9e=$n(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:_,topItemsIndexes:b,...x},{scrollToIndex:E},A,{topItemCount:R},{groupCounts:k},O])=>(St(x.rangeChanged,O.scrollSeekRangeChanged),St(Pe(O.windowViewportRect,lt(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:R,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),gr(ac,Tw,Mo,V9e,L9e,Gp,Ew,j9e,F9e,nie,X9e)),ZB="-webkit-sticky",YV="sticky",lie=aie(()=>{if(typeof document>"u")return YV;const e=document.createElement("div");return e.style.position=ZB,e.style.position===ZB?ZB:YV});function cie(e,t){const n=de.useRef(null),r=de.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,h;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),h=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),h=c.top+window.pageYOffset;n.current={offsetTop:h,visibleHeight:f,visibleWidth:d},e(n.current)},[e,t]),{callbackRef:i,ref:o}=Hj(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(s);return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const uie=de.createContext(void 0),die=de.createContext(void 0);function fie(e){return e}const K9e=$n(()=>{const e=et(c=>`Item ${c}`),t=et(null),n=et(c=>`Group ${c}`),r=et({}),i=et(fie),o=et("div"),s=et(wv),l=(c,d=null)=>ko(Pe(r,lt(f=>f[c]),hr()),d);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),Q9e=$n(([e,t])=>({...e,...t}),gr(Y9e,K9e)),J9e=({height:e})=>de.createElement("div",{style:{height:e}}),Z9e={position:lie(),zIndex:1,overflowAnchor:"none"},e7e={overflowAnchor:"none"},KV=de.memo(function({showTopList:t=!1}){const n=mn("listState"),r=aa("sizeRanges"),i=mn("useWindowScroll"),o=mn("customScrollParent"),s=aa("windowScrollContainerState"),l=aa("scrollContainerState"),c=o||i?s:l,d=mn("itemContent"),f=mn("context"),h=mn("groupContent"),p=mn("trackItemSizes"),g=mn("itemSize"),v=mn("log"),y=aa("gap"),{callbackRef:S}=p9e(r,g,p,t?wv:c,v,y,o),[_,b]=de.useState(0);Kj("deviation",D=>{_!==D&&b(D)});const x=mn("EmptyPlaceholder"),E=mn("ScrollSeekPlaceholder")||J9e,A=mn("ListComponent"),R=mn("ItemComponent"),k=mn("GroupComponent"),O=mn("computeItemKey"),L=mn("isSeeking"),N=mn("groupIndices").length>0,H=mn("paddingTopAddition"),W=mn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:_,...W?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,zo(x,f)):de.createElement(A,{...zo(A,f),ref:S,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const F=D.originalIndex,j=O(F+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...zo(E,f),key:j,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?de.createElement(k,{...zo(k,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,style:Z9e},h(D.index,f)):de.createElement(R,{...zo(R,f),key:j,"data-index":F,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:e7e},N?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),t7e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},oA={width:"100%",height:"100%",position:"absolute",top:0},n7e={width:"100%",position:lie(),top:0,zIndex:1};function zo(e,t){if(typeof e!="string")return{context:t}}const r7e=de.memo(function(){const t=mn("HeaderComponent"),n=aa("headerHeight"),r=mn("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),i7e=de.memo(function(){const t=mn("FooterComponent"),n=aa("footerHeight"),r=mn("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=mn("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null});function hie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("scrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=Vre(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...t7e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...zo(d,p)},s)})}function pie({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...l}){const c=e("windowScrollContainerState"),d=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:_}=Vre(c,f,d,wv,g);return d9e(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",S),de.createElement(d,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...l,...zo(d,v)},s)})}const o7e=({children:e})=>{const t=de.useContext(uie),n=aa("viewportHeight"),r=aa("fixedItemHeight"),i=Wp(jre(n,o=>Vd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:oA,ref:i,"data-viewport-type":"element"},e)},s7e=({children:e})=>{const t=de.useContext(uie),n=aa("windowViewportRect"),r=aa("fixedItemHeight"),i=mn("customScrollParent"),o=cie(n,i);return de.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),de.createElement("div",{ref:o,style:oA,"data-viewport-type":"window"},e)},a7e=({children:e})=>{const t=mn("TopItemListComponent"),n=mn("headerHeight"),r={...n7e,marginTop:`${n}px`},i=mn("context");return de.createElement(t||"div",{style:r,context:i},e)},l7e=de.memo(function(t){const n=mn("useWindowScroll"),r=mn("topItemsIndexes").length>0,i=mn("customScrollParent"),o=i||n?d7e:u7e,s=i||n?s7e:o7e;return de.createElement(o,{...t},r&&de.createElement(a7e,null,de.createElement(KV,{showTopList:!0})),de.createElement(s,null,de.createElement(r7e,null),de.createElement(KV,null),de.createElement(i7e,null)))}),{Component:c7e,usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}=Wre(Q9e,{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"}},l7e),u7e=hie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),d7e=pie({usePublisher:aa,useEmitterValue:mn,useEmitter:Kj}),f7e=c7e,QV={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},h7e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:JV,ceil:ZV,floor:LC,min:e$,max:Px}=Math;function p7e(e){return{...h7e,items:e}}function eq(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 m7e(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 g7e=$n(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,windowScrollTo:x},E])=>{const A=et(0),R=et(0),k=et(QV),O=et({height:0,width:0}),L=et({height:0,width:0}),N=yn(),H=yn(),W=et(0),z=et(null),D=et({row:0,column:0}),F=yn(),j=yn(),V=et(!1),G=et(0),K=et(!0),Y=et(!1);jn(Pe(v,an(G),Ht(([Q,ae])=>!!ae)),()=>{en(K,!1),en(R,0)}),jn(Pe(bi(v,K,L,O,G,Y),Ht(([Q,ae,le,he,,pe])=>Q&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,Q])=>{en(Y,!0),Vj(1,()=>{en(N,Q)}),Ru(Pe(r),()=>{en(n,[0,0]),en(K,!0)})}),St(Pe(j,Ht(Q=>Q!=null&&Q.scrollTop>0),cu(0)),R),jn(Pe(v,an(j),Ht(([,Q])=>Q!=null)),([,Q])=>{Q&&(en(O,Q.viewport),en(L,Q==null?void 0:Q.item),en(D,Q.gap),Q.scrollTop>0&&(en(V,!0),Ru(Pe(r,Gg(1)),ae=>{en(V,!1)}),en(s,{top:Q.scrollTop})))}),St(Pe(O,lt(({height:Q})=>Q)),i),St(Pe(bi(Ut(O,uS),Ut(L,uS),Ut(D,(Q,ae)=>Q&&Q.column===ae.column&&Q.row===ae.row),Ut(r)),lt(([Q,ae,le,he])=>({viewport:Q,item:ae,gap:le,scrollTop:he}))),F),St(Pe(bi(Ut(A),t,Ut(D,m7e),Ut(L,uS),Ut(O,uS),Ut(z),Ut(R),Ut(V),Ut(K),Ut(G)),Ht(([,,,,,,,Q])=>!Q),lt(([Q,[ae,le],he,pe,ve,ye,xe,,me,be])=>{const{row:Qe,column:qe}=he,{height:at,width:Nt}=pe,{width:Ie}=ve;if(xe===0&&(Q===0||Ie===0))return QV;if(Nt===0){const Rt=qj(be,Q),ct=Rt===0?Math.max(xe-1,0):Rt;return p7e(eq(Rt,ct,ye))}const ze=mie(Ie,Nt,qe);let it,pt;me?ae===0&&le===0&&xe>0?(it=0,pt=xe-1):(it=ze*LC((ae+Qe)/(at+Qe)),pt=ze*ZV((le+Qe)/(at+Qe))-1,pt=e$(Q-1,Px(pt,ze-1)),it=e$(pt,Px(0,it))):(it=0,pt=-1);const mt=eq(it,pt,ye),{top:_e,bottom:je}=tq(ve,he,pe,mt),Ye=ZV(Q/ze),Ne=Ye*at+(Ye-1)*Qe-je;return{items:mt,offsetTop:_e,offsetBottom:Ne,top:_e,bottom:je,itemHeight:at,itemWidth:Nt}})),k),St(Pe(z,Ht(Q=>Q!==null),lt(Q=>Q.length)),A),St(Pe(bi(O,L,k,D),Ht(([Q,ae,{items:le}])=>le.length>0&&ae.height!==0&&Q.height!==0),lt(([Q,ae,{items:le},he])=>{const{top:pe,bottom:ve}=tq(Q,he,ae,le);return[pe,ve]}),hr(D1)),n);const J=et(!1);St(Pe(r,an(J),lt(([Q,ae])=>ae||Q!==0)),J);const ie=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0),an(A,J),Ht(([{items:Q},ae,le])=>le&&Q[Q.length-1].index===ae-1),lt(([,Q])=>Q-1),hr())),ce=Ds(Pe(Ut(k),Ht(({items:Q})=>Q.length>0&&Q[0].index===0),cu(0),hr())),ue=Ds(Pe(Ut(k),an(V),Ht(([{items:Q},ae])=>Q.length>0&&!ae),lt(([{items:Q}])=>({startIndex:Q[0].index,endIndex:Q[Q.length-1].index})),hr(rie),yd(0)));St(ue,p.scrollSeekRangeChanged),St(Pe(N,an(O,L,A,D),lt(([Q,ae,le,he,pe])=>{const ve=tie(Q),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=Px(0,be,e$(he-1,be));let Qe=d5(ae,pe,le,be);return ye==="end"?Qe=JV(Qe-ae.height+le.height):ye==="center"&&(Qe=JV(Qe-ae.height/2+le.height/2)),me&&(Qe+=me),{top:Qe,behavior:xe}})),s);const se=ko(Pe(k,lt(Q=>Q.offsetBottom+Q.bottom)),0);return St(Pe(y,lt(Q=>({width:Q.visibleWidth,height:Q.visibleHeight}))),O),{data:z,totalCount:A,viewportDimensions:O,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:_,windowScrollContainerState:b,deviation:W,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:R,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:G,gridState:k,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},gr(Xj,Mo,Cw,oie,lf,Yj,af));function tq(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=d5(e,t,n,r[0].index),s=d5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function d5(e,t,n,r){const i=mie(e.width,n.width,t.column),o=LC(r/i),s=o*n.height+Px(0,o-1)*t.row;return s>0?s+t.row:s}function mie(e,t,n){return Px(1,LC((e+n)/(LC(t)+n)))}const v7e=$n(()=>{const e=et(d=>`Item ${d}`),t=et({}),n=et(null),r=et("virtuoso-grid-item"),i=et("virtuoso-grid-list"),o=et(fie),s=et("div"),l=et(wv),c=(d,f=null)=>ko(Pe(t,lt(h=>h[d]),hr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),y7e=$n(([e,t])=>({...e,...t}),gr(g7e,v7e)),b7e=de.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),i=Sr("itemContent"),o=Sr("computeItemKey"),s=Sr("isSeeking"),l=dl("scrollHeight"),c=Sr("ItemComponent"),d=Sr("ListComponent"),f=Sr("ScrollSeekPlaceholder"),h=Sr("context"),p=dl("itemDimensions"),g=dl("gap"),v=Sr("log"),y=Sr("stateRestoreInProgress"),S=Wp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:A}=x.getBoundingClientRect();p({width:E,height:A})}g({row:nq("row-gap",getComputedStyle(_).rowGap,v),column:nq("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...zo(d,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(_=>{const b=o(_.index,_.data,h);return s?de.createElement(f,{key:b,...zo(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...zo(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),x7e=de.memo(function(){const t=Sr("HeaderComponent"),n=dl("headerHeight"),r=Sr("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),w7e=de.memo(function(){const t=Sr("FooterComponent"),n=dl("footerHeight"),r=Sr("headerFooterTag"),i=Wp(s=>n(Vd(s,"height"))),o=Sr("context");return t?de.createElement(r,{ref:i},de.createElement(t,zo(t,o))):null}),_7e=({children:e})=>{const t=de.useContext(die),n=dl("itemDimensions"),r=dl("viewportDimensions"),i=Wp(o=>{r(o.getBoundingClientRect())});return de.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),de.createElement("div",{style:oA,ref:i},e)},S7e=({children:e})=>{const t=de.useContext(die),n=dl("windowViewportRect"),r=dl("itemDimensions"),i=Sr("customScrollParent"),o=cie(n,i);return de.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),de.createElement("div",{ref:o,style:oA},e)},E7e=de.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),i=r||n?T7e:C7e,o=r||n?S7e:_7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(x7e,null),de.createElement(b7e,null),de.createElement(w7e,null)))}),{Component:OVe,usePublisher:dl,useEmitterValue:Sr,useEmitter:gie}=Wre(y7e,{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"}},E7e),C7e=hie({usePublisher:dl,useEmitterValue:Sr,useEmitter:gie}),T7e=pie({usePublisher:dl,useEmitterValue:Sr,useEmitter:gie});function nq(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ls.WARN),t==="normal"?0:parseInt(t??"0",10)}const k7e=I.forwardRef(({style:e,children:t,...n},r)=>{const i=I.useRef(null),{palette:o,spacing:s}=Cn(),l=kg({".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":s(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${s(6)})`,marginTop:s(6)}}),[c]=LQ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});I.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=I.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:l,children:C.jsx("div",{ref:d,...n,children:t})})});function A7e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(dt,{...i,children:C.jsx(f7e,{components:{Scroller:k7e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function R7e({event:e,hidden:t}){return C.jsxs(i3e,{children:[ee.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(Mxe,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function I7e({label:e}){return C.jsx(Mu,{title:e,children:C.jsx(qK,{sx:{color:"error.main",transform:"scale(0.5)",pl:.5,mr:2},fontSize:"small"})})}function P7e({event:e,index:t,selected:n,label:r,...i}){const{spacing:o}=Cn(),s=kg({"& .info-button":{opacity:0},"&:hover .info-button":{opacity:1}});return C.jsxs(OE,{selected:n,...i,className:s,sx:{borderLeft:`${o(.5)} solid ${Og(e==null?void 0:e.type)}`,...i.sx},children:[C.jsxs(ol,{sx:{alignItems:"center"},children:[C.jsx(zt,{variant:"body2",children:t}),r&&C.jsx(I7e,{label:r})]}),C.jsx(sl,{sx:{overflow:"hidden"},primary:C.jsx(R7e,{event:e,hidden:!1}),secondary:C.jsx(eC,{event:ee.pick(e,"f","g","pId")})}),C.jsx(Mu,{title:C.jsx(dt,{p:1,children:C.jsx(eC,{event:e,flexDirection:"column"})}),children:C.jsx(dt,{className:"info-button",sx:{pl:2,color:"text.secondary"},children:C.jsx(Rxe,{fontSize:"small"})})})]})}function O7e({event:e}){const{spacing:t}=Cn();return C.jsxs(C.Fragment,{children:[C.jsx(Qm,{sx:{height:80,borderLeft:`${t(.5)} solid ${Og(e==null?void 0:e.type)}`},children:C.jsx(ol,{children:C.jsx(P0e,{animation:!1,width:t(4)})})}),C.jsx(gl,{variant:"inset"})]})}const M7e=C.jsx(gl,{orientation:"vertical",flexItem:!0,sx:{m:1}}),D7e=e=>Number(e.replace(/px$/,""));function L7e(){const{spacing:e}=Cn(),{controls:t,onChange:n,state:r}=Lu(),i=I.useRef(null),{key:o,setKey:s,layers:l,layer:c}=Jl(),{step:d,playing:f,stepTo:h}=Mz(o),p=I.useMemo(()=>{var y;if(c)return I.createElement(fw[((y=c==null?void 0:c.source)==null?void 0:y.type)??""].steps,{layer:c})},[c]),g=IZ(o),v=I.useCallback(ee.throttle(y=>{var S,_;return(_=(S=i==null?void 0:i.current)==null?void 0:S.scrollToIndex)==null?void 0:_.call(S,{index:y,align:"start",behavior:"smooth",offset:-D7e(e(6+2))})},1e3/30),[i]);return I.useEffect(()=>{ee.defer(()=>v(d))},[v,d]),C.jsxs(Sn,{onChange:n,stack:r,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{vertical:!0,alignItems:"center",children:p?I.cloneElement(p,{children:y=>c?y.length?C.jsx(A7e,{sx:{width:"100%",height:"100%"},items:y,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(S,_)=>{var b;return f?C.jsx(O7e,{event:S}):C.jsxs(dt,{sx:{height:e(_?10:16),pt:_?0:e(6)},children:[C.jsx(P7e,{event:S,index:_,selected:_===d,sx:{height:"100%"},label:(b=g(_))==null?void 0:b.result,onClick:()=>h(_)}),C.jsx(gl,{variant:"inset"})]})}}):C.jsx(eg,{icon:C.jsx(tL,{}),label:`${Fo(c)} has no steps to display`}):C.jsx(eg,{icon:C.jsx(tL,{}),label:"Steps"})}):C.jsx(eg,{icon:C.jsx(tL,{}),label:"Steps"})})}),C.jsxs(Sn.Options,{children:[C.jsx(Ro,{icon:C.jsx(nv,{}),label:"Layer",value:o,items:ee.map(l,y=>({id:y.key,name:Fo(y)})),onChange:s,showArrow:!0}),M7e,C.jsx(V2e,{layer:c})]}),C.jsx(Sn.Extras,{children:t})]})}const N7e=e=>e?48:36,B7e=8;function $7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=az(),l=ee.max([ee.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(ef,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(Mu,{title:i,children:C.jsx("span",{children:e==null?void 0:e(lw(c))})}),C.jsx(Jd,{...ov(c),anchorOrigin:{horizontal:"center",vertical:-N7e(s)*l-B7e},transformOrigin:{vertical:"top",horizontal:"center"},children:ee.map(t,({value:d,label:f,disabled:h})=>C.jsxs(Wl,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(ol,{children:C.jsx(Lme,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function F7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=ee.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=ee.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx($7e,{defaultChecked:!0,placeholder:ee.startCase(e),trigger:f=>C.jsx(zd,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:ee.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(zt,{children:h}),C.jsx(yi,{}),C.jsx(zt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const rq=C.jsx(gl,{orientation:"vertical",flexItem:!0,sx:{m:1}});function z7e(){var p,g,v,y;const{controls:e,onChange:t,state:n}=Lu(),[r]=Ck(),[{layers:i}]=$p(),[o,s]=I.useState({}),l=I.useMemo(()=>ee.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=I.useState(),f=I.useMemo(()=>ee.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return I.useEffect(()=>{ee.delay(()=>{var S;(S=c==null?void 0:c.fitCamera)==null||S.call(c,_=>{var b;return ee.chain(l).filter("viewKey").map("key").includes(((b=_.meta)==null?void 0:b.sourceLayer)??"").value()})},150)},[c,ee.chain(l).map("viewKey").sort().join(".").value()]),C.jsxs(Sn,{onChange:t,stack:n,children:[C.jsx(Sn.Content,{children:C.jsx(bn,{children:C.jsx(gk,{children:S=>C.jsx(dt,{children:C.jsx(I2e,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Sn.Options,{children:C.jsxs($d,{direction:"row",children:[C.jsx(Ro,{label:"Renderer",icon:C.jsx(wxe,{}),value:(n==null?void 0:n.renderer)??"internal:auto",onChange:S=>t==null?void 0:t({renderer:S}),items:[{id:"internal:auto",name:`Auto (${((y=(v=f==null?void 0:f.renderer)==null?void 0:v.meta)==null?void 0:y.name)??"None"})`},...ee.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),rq,C.jsx(F7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(nv,{}),value:o,onChange:s,items:ee.map(i,S=>({id:S.key,name:Fo(S)})),showArrow:!0}),rq,C.jsx(zd,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(Exe,{}),children:"Fit"}),C.jsx(zd,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(Axe,{}),children:"1:1"})]})}),C.jsx(Sn.Extras,{children:e})]})}const vie={recipes:{id:"recipes",name:"Recipes",description:"Browse a library of included examples",color:"pink",icon:C.jsx(W4,{}),content:n3e},layers:{id:"layers",name:"Layers",description:"",color:"deepPurple",icon:C.jsx(nv,{}),content:GFe},steps:{id:"steps",name:"Steps",description:"",color:"deepPurple",icon:C.jsx(jxe,{}),content:L7e},viewport:{id:"viewport",name:"Viewport",description:"",color:"indigo",icon:C.jsx(JK,{}),content:z7e},tree:{id:"tree",name:"Tree",description:"",color:"indigo",icon:C.jsx(WK,{}),content:w2e},debug:{id:"debug",name:"Debugger",description:"",color:"lightBlue",icon:C.jsx(Sxe,{}),content:PFe},info:{id:"info",name:"Logs",description:"",color:"blueGrey",icon:C.jsx(YK,{}),content:OFe},settings:{id:"settings",name:"Settings",description:"",color:"blueGrey",icon:C.jsx(Uxe,{}),content:e9e},about:{id:"about",name:"About",description:"",color:"blueGrey",icon:C.jsx(Dxe,{}),content:O_e}},[j7e,U7e]=rc({view:{type:"branch",key:li(),orientation:"horizontal",children:[{size:75,type:"branch",key:li(),orientation:"horizontal",children:[{type:"branch",key:li(),orientation:"vertical",size:25,children:[{type:"leaf",size:40,key:li(),content:{type:"recipes"}},{type:"leaf",size:60,key:li(),content:{type:"layers"}}]},{size:75,type:"branch",key:li(),orientation:"vertical",children:[{type:"leaf",size:75,key:li(),content:{type:"viewport"}},{type:"leaf",size:25,key:li(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:li(),content:{type:"steps"}}]}});function H7e(){const[e]=DJ(),t=lz(),n=ee.values(e);return C.jsx(rk,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs($d,{alignItems:"center",spacing:4,children:[C.jsx(X1,{}),n.map((r,i)=>C.jsx(zt,{variant:"body2",color:"textSecondary",children:r},i))]})})}var yie={},W7e=Bt&&Bt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bie=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yie,"__esModule",{value:!0});var Xs=bie(qg),t$=bie(I),G7e=function(e){W7e(t,e);function t(n){var r=e.call(this,n)||this;return r.resetDragging=function(){r.frameDragCounter=0,r.setState({draggingOverFrame:!1,draggingOverTarget:!1})},r.handleWindowDragOverOrDrop=function(i){i.preventDefault()},r.handleFrameDrag=function(i){if(t.eventHasFiles(i)){if(r.frameDragCounter+=i.type==="dragenter"?1:-1,r.frameDragCounter===1){r.setState({draggingOverFrame:!0}),r.props.onFrameDragEnter&&r.props.onFrameDragEnter(i);return}if(r.frameDragCounter===0){r.setState({draggingOverFrame:!1}),r.props.onFrameDragLeave&&r.props.onFrameDragLeave(i);return}}},r.handleFrameDrop=function(i){r.state.draggingOverTarget||(r.resetDragging(),r.props.onFrameDrop&&r.props.onFrameDrop(i))},r.handleDragOver=function(i){t.eventHasFiles(i)&&(r.setState({draggingOverTarget:!0}),!t.isIE()&&r.props.dropEffect&&(i.dataTransfer.dropEffect=r.props.dropEffect),r.props.onDragOver&&r.props.onDragOver(i))},r.handleDragLeave=function(i){r.setState({draggingOverTarget:!1}),r.props.onDragLeave&&r.props.onDragLeave(i)},r.handleDrop=function(i){if(r.props.onDrop&&t.eventHasFiles(i)){var o=i.dataTransfer?i.dataTransfer.files:null;r.props.onDrop(o,i)}r.resetDragging()},r.handleTargetClick=function(i){r.props.onTargetClick&&r.props.onTargetClick(i),r.resetDragging()},r.stopFrameListeners=function(i){i&&(i.removeEventListener("dragenter",r.handleFrameDrag),i.removeEventListener("dragleave",r.handleFrameDrag),i.removeEventListener("drop",r.handleFrameDrop))},r.startFrameListeners=function(i){i&&(i.addEventListener("dragenter",r.handleFrameDrag),i.addEventListener("dragleave",r.handleFrameDrag),i.addEventListener("drop",r.handleFrameDrop))},r.frameDragCounter=0,r.state={draggingOverFrame:!1,draggingOverTarget:!1},r}return t.prototype.componentDidMount=function(){this.startFrameListeners(this.props.frame),this.resetDragging(),window.addEventListener("dragover",this.handleWindowDragOverOrDrop),window.addEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.componentDidUpdate=function(n){n.frame!==this.props.frame&&(this.resetDragging(),this.stopFrameListeners(n.frame),this.startFrameListeners(this.props.frame))},t.prototype.componentWillUnmount=function(){this.stopFrameListeners(this.props.frame),window.removeEventListener("dragover",this.handleWindowDragOverOrDrop),window.removeEventListener("drop",this.handleWindowDragOverOrDrop)},t.prototype.render=function(){var n=this.props,r=n.children,i=n.className,o=n.targetClassName,s=n.draggingOverFrameClassName,l=n.draggingOverTargetClassName,c=this.state,d=c.draggingOverTarget,f=c.draggingOverFrame,h=o;return f&&(h+=" "+s),d&&(h+=" "+l),t$.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},t$.default.createElement("div",{className:h,onClick:this.handleTargetClick},r))},t.isIE=function(){return typeof window<"u"&&(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>0)},t.eventHasFiles=function(n){var r=!1;if(n.dataTransfer){var i=n.dataTransfer.types;for(var o in i)if(i[o]==="Files"){r=!0;break}}return r},t.propTypes={className:Xs.default.string,targetClassName:Xs.default.string,draggingOverFrameClassName:Xs.default.string,draggingOverTargetClassName:Xs.default.string,onDragOver:Xs.default.func,onDragLeave:Xs.default.func,onDrop:Xs.default.func,onTargetClick:Xs.default.func,dropEffect:Xs.default.oneOf(["copy","move","link","none"]),frame:function(n,r,i){var o=n[r];if(o==null)return new Error("Warning: Required prop `"+r+"` was not specified in `"+i+"`");if(o!==document&&!(o instanceof HTMLElement))return new Error("Warning: Prop `"+r+"` must be one of the following: document, HTMLElement!")},onFrameDragEnter:Xs.default.func,onFrameDragLeave:Xs.default.func,onFrameDrop:Xs.default.func},t.defaultProps={dropEffect:"copy",frame:typeof window>"u"?void 0:window.document,className:"file-drop",targetClassName:"file-drop-target",draggingOverFrameClassName:"file-drop-dragging-over-frame",draggingOverTargetClassName:"file-drop-dragging-over-target"},t}(t$.default.PureComponent),V7e=yie.FileDrop=G7e;function q7e(){const e=lz(),{load:t}=cj(),[n,r]=I.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(V7e,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(ee.head(i)),children:C.jsx(rk,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs($d,{alignItems:"center",spacing:4,children:[C.jsx(W4,{}),C.jsx(zt,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function X7e(e){const t=iEe(),[{view:n},r]=j7e();return C.jsxs(C.Fragment,{children:[C.jsx(bn,{...e,children:C.jsx(GQ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(xp,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%"},children:I.createElement((o=vie[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(xp,{in:t,children:C.jsx(Cve,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx(H7e,{}),C.jsx(q7e,{})]})}const Y7e=e=>l$(e,"#ffffff")>l$(e,"#000000")?"#ffffff":"#000000";function K7e(e){I.useEffect(()=>{ee.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=EF,"electron"in window&&window.electron.invoke("title-bar","#00000000",Y7e(e))},[e])}function Q7e(e){return new Promise(t=>ee.delay(t,e))}async function J7e(e,t=2500){const n=ee.now();return{result:await Promise.any([e(),Q7e(t)]),delta:ee.now()-n}}function Z7e(){const e=vl(),[{remote:t}]=Nu(),[,n]=Pg(),r=tf("connections");return I.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:l,disabled:c}of t){if(c!==!0){e(`Connecting to ${l}...`);const d=new(XGe(s))({url:l});await d.connect();const{result:f,delta:h}=await J7e(()=>d.call("about"));f?(e(`Connected to ${f.name}`),o=[...o,{...f,url:l,ping:h,call:d.call.bind(d),disconnect:d.disconnect.bind(d)}]):await d.disconnect()}i||n(()=>o)}i||e(`Connected to ${o.length} of ${t.length} solvers`)}}),()=>{i=!0,o.map(s=>s.disconnect())}},[t,n,e,r]),C.jsx(C.Fragment,{})}const eVe=e=>t=>({...t,source:e});function tVe(){const[e]=Pg(),[,t]=GE(),n=tf("features");return EZ(r=>n(async()=>{const i={algorithms:[],formats:ee.keys(gz).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=ee.uniqBy([...i[l],...ee.map(await o(`features/${l}`),eVe(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function nVe(){const[{layers:e},t]=$p();return I.useMemo(()=>ee.map(e,n=>{const r=KZ(n).service;if(r)return I.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:ee.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function rVe(){const e=nVe();return C.jsx(C.Fragment,{children:e})}function xie({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:ee.reduce(ee.map(e,r=>I.createElement(r)),(r,i)=>I.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,ee.map(n,(r,i)=>I.createElement(r,{key:i}))]}))})}const iVe=()=>{const{save:e,load:t}=cj(),[n,r]=I.useState(!1);return I.useEffect(()=>{if("windowControlsOverlay"in navigator){const i=()=>{r(!!navigator.windowControlsOverlay.visible)};return navigator.windowControlsOverlay.addEventListener("geometrychange",i),i(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",i)}},[r]),C.jsx(dt,{sx:{mt:-.5,minHeight:36,height:n?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:C.jsx(iv,{x:!0,style:{height:"100%"},children:C.jsx(dt,{sx:{height:"100%"},children:C.jsxs($d,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(dt,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:YQ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e},{name:"Save workspace (JSON)",key:"workspace-save",action:()=>e(!0)}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open(R_e,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${I_e}/changelog-${k_e}.md`,"_blank")},{name:"Open documentation",key:"documentation",action:()=>open("https://path-visualiser.github.io/docs/overview/","_blank")}]}].map(({key:i,items:o})=>C.jsx(ef,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{...ov(s),children:C.jsx(Y1,{dense:!0,sx:{p:0},children:o.map(({name:l,key:c,action:d})=>C.jsx(Wl,{onClick:()=>{d==null||d(),s.close()},children:l},c))})}),C.jsx(zd,{...lw(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:ee.startCase(i)})]})},i)),C.jsx(dt,{sx:{p:.75,height:"100%"},children:C.jsx(oVe,{})})]})})})})};function oVe(){const e=vl();return C.jsxs(Ou,{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(zxe,{fontSize:"small",color:"disabled"})," ",C.jsx(zt,{sx:{mt:0},children:"Commands"})]})}const sVe=[Z7e,tVe,BWe,rVe];function aVe(){const t=Cn().palette.background.default;return K7e(t),C.jsxs(bn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(iVe,{}),C.jsx(X7e,{flex:1})]})}function lVe(){const[{theme:e="light",accentColor:t="teal"}]=Nu(),n=I.useMemo(()=>C_e(e,t),[e,t]);return C.jsx(Jle,{theme:n,children:C.jsx(_1e,{children:C.jsx(xie,{services:sVe,children:C.jsx(aVe,{})})})})}var wie,iq=Zg;wie=iq.createRoot,iq.hydrateRoot;const cVe=wie(document.getElementById("root")),uVe=[PTe,__e,tEe,nEe,ake,rEe,C2e,w1e,U7e,t2e];cVe.render(C.jsx(Xme,{children:C.jsx(xie,{slices:uVe,children:C.jsx(lVe,{})})})); diff --git a/index.html b/index.html index 69bca519..5457dab4 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +