From a361792cb1f7210ba3a9770f3c7497cd2ec41f16 Mon Sep 17 00:00:00 2001 From: Spaaaacccee Date: Fri, 10 Nov 2023 19:52:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20path-vis?= =?UTF-8?q?ualiser/app@0880d8fb089af6edfb6a02516495ca5f43a693c6=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...c7b8d.js => D2Renderer.worker-603ea83e.js} | 26 +- assets/index-369f6183.js | 1847 ----------------- assets/index-3eab0860.js | 1730 +++++++++++++++ ...9fcf6.js => parseTrace.worker-49d162fd.js} | 8 +- assets/parseYaml.worker-25aef2ce.js | 149 -- assets/parseYaml.worker-858dc2e2.js | 17 + index.html | 2 +- 7 files changed, 1765 insertions(+), 2014 deletions(-) rename assets/{D2Renderer.worker-157c7b8d.js => D2Renderer.worker-603ea83e.js} (87%) delete mode 100644 assets/index-369f6183.js create mode 100644 assets/index-3eab0860.js rename assets/{parseTrace.worker-0a89fcf6.js => parseTrace.worker-49d162fd.js} (84%) delete mode 100644 assets/parseYaml.worker-25aef2ce.js create mode 100644 assets/parseYaml.worker-858dc2e2.js diff --git a/assets/D2Renderer.worker-157c7b8d.js b/assets/D2Renderer.worker-603ea83e.js similarity index 87% rename from assets/D2Renderer.worker-157c7b8d.js rename to assets/D2Renderer.worker-603ea83e.js index 16c43a9e..4be4faba 100644 --- a/assets/D2Renderer.worker-157c7b8d.js +++ b/assets/D2Renderer.worker-603ea83e.js @@ -1,28 +1,28 @@ -var Af=(cn,wn,Rn)=>{if(!wn.has(cn))throw TypeError("Cannot "+Rn)};var xn=(cn,wn,Rn)=>(Af(cn,wn,"read from private field"),Rn?Rn.call(cn):wn.get(cn)),ue=(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)},de=(cn,wn,Rn,we)=>(Af(cn,wn,"write to private field"),we?we.call(cn,Rn):wn.set(cn,Rn),Rn);var Yc=(cn,wn,Rn,we)=>({set _(Ki){de(cn,wn,Ki,Rn)},get _(){return xn(cn,wn,we)}}),Je=(cn,wn,Rn)=>(Af(cn,wn,"access private method"),Rn);(function(){var fe,Ft,Ne,Ye,fr,Jr,$c,Ct,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={},we=cn&&cn.__assign||function(){return we=Object.assign||function(t){for(var u,i=1,f=arguments.length;i{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)),oe=(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)},de=(cn,wn,Rn,we)=>(Af(cn,wn,"write to private field"),we?we.call(cn,Rn):wn.set(cn,Rn),Rn);var Yc=(cn,wn,Rn,we)=>({set _(Ki){de(cn,wn,Ki,Rn)},get _(){return yn(cn,wn,we)}}),Je=(cn,wn,Rn)=>(Af(cn,wn,"access private method"),Rn);(function(){var Jn,Ft,Ne,Ye,fr,Jr,$c,Ct,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={},we=cn&&cn.__assign||function(){return we=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,C=2,F=4,L=1,H=2,E=1,B=2,T=4,S=8,P=16,D=32,Y=64,K=128,nn=256,mn=512,ve=30,Ee="...",me=800,ar=16,at=1,sr=2,lr=3,ae=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,_e=4294967295,Mg=_e-1,Lg=_e>>>1,Pg=[["ary",K],["bind",E],["bindKey",B],["curry",S],["curryRight",P],["flip",mn],["partial",D],["partialRight",Y],["rearg",nn]],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]",se="[object Map]",pr="[object Number]",qg="[object Null]",Re="[object Object]",cs="[object Promise]",Gg="[object Proxy]",gr="[object RegExp]",le="[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+")",Fs="(?:"+co+"(?:d|ll|m|re|s|t|ve))?",Cs="(?:"+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,Fd="(?:"+[Rs+oi+"?",oi,po,go,xd].join("|")+")",Cd=RegExp(co,"g"),Bd=RegExp(oi,"g"),vo=RegExp(ho+"(?="+ho+")|"+Fd+Ms,"g"),Td=RegExp([Pt+"?"+Ss+"+"+Fs+"(?="+[ws,Pt,"$"].join("|")+")",Sd+"+"+Cs+"(?="+[ws,Pt+Is,"$"].join("|")+")",Pt+"?"+Is+"+"+Fs,Pt+"+"+Cs,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,pn={};pn[no]=pn[eo]=pn[to]=pn[ro]=pn[io]=pn[uo]=pn[oo]=pn[fo]=pn[ao]=!0,pn[Mt]=pn[ni]=pn[mr]=pn[cr]=pn[Lt]=pn[hr]=pn[ei]=pn[ti]=pn[se]=pn[pr]=pn[Re]=pn[gr]=pn[le]=pn[dr]=pn[vr]=!1;var hn={};hn[Mt]=hn[ni]=hn[mr]=hn[Lt]=hn[cr]=hn[hr]=hn[no]=hn[eo]=hn[to]=hn[ro]=hn[io]=hn[se]=hn[pr]=hn[Re]=hn[gr]=hn[le]=hn[dr]=hn[ri]=hn[uo]=hn[oo]=hn[fo]=hn[ao]=!0,hn[ei]=hn[ti]=hn[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,Fn=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 Wn(b,R,A){switch(A.length){case 0:return b.call(R);case 1:return b.call(R,A[0]);case 2:return b.call(R,A[0],A[1]);case 3:return b.call(R,A[0],A[1],A[2])}return b.apply(R,A)}function Wd(b,R,A,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function yo(b,R,A){for(var G=-1,k=b==null?0:b.length;++G-1;);return A}function Vs(b,R){for(var A=b.length;A--&&Ht(R,b[A],0)>-1;);return A}function jd(b,R){for(var A=b.length,G=0;A--;)b[A]===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,A=[];!(R=b.next()).done;)A.push(R.value);return A}function Oo(b){var R=-1,A=Array(b.size);return b.forEach(function(G,k){A[++R]=[k,G]}),A}function Zs(b,R){return function(A){return b(R(A))}}function We(b,R){for(var A=-1,G=b.length,k=0,fn=[];++A-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 ee(n,e,r,o,a,h){var v,_=e&w,x=e&C,O=e&F;if(r&&(v=a?r(n,o,a,h):r(n)),v!==i)return v;if(!dn(n))return n;var I=V(n);if(I){if(v=Zv(n),!_)return Nn(n,v)}else{var M=Mn(n),q=M==ti||M==ls;if(Ze(n))return Tl(n,_);if(M==Re||M==Mt||q&&!a){if(v=x||q?{}:Jl(n),!_)return x?Gv(n,av(v,n)):qv(n,al(v,n))}else{if(!hn[M])return a?n:{};v=Jv(n,M,_)}}h||(h=new he);var N=h.get(n);if(N)return N;h.set(n,v),Rc(n)?n.forEach(function(U){v.add(ee(U,e,r,U,n,h))}):Sc(n)&&n.forEach(function(U,rn){v.set(rn,ee(U,e,r,rn,n,h))});var W=O?x?jo:Qo:x?$n:En,J=I?i:W(n);return Qn(J||n,function(U,rn){J&&(rn=U,U=n[rn]),Sr(v,rn,ee(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 jn(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=gn(e,Un(r))),o?(h=yo,v=!1):e.length>=s&&(h=_r,v=!1,e=new pt(e));n:for(;++a<_;){var I=n[a],M=r==null?I:r(I);if(I=o||I!==0?I:0,v&&M===M){for(var q=O;q--;)if(e[q]===M)continue n;x.push(I)}else h(e,M,o)||x.push(I)}return x}var Ke=Dl(ye),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:Z(o),o<0&&(o+=a),o=r>o?0:Ic(o);r0&&r(_)?e>1?Cn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Lo=ql(),pl=ql(!0);function ye(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 M=-1,q=_[0];n:for(;++M-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=A(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 Q(n,e){return ff(nc(n,e,Xn),n+"")}function Iv(n){return fl(kt(n))}function Fv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!dn(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=A(a);++o>>1,v=n[h];v!==null&&!zn(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:te(n,e,r)}var Bl=b0||function(n){return Fn.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=zn(n),v=e!==i,_=e===null,x=e===e,O=zn(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=A(x+O),M=!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=ne.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new jn(p);if(a&&!v&&Pi(h)=="wrapper")var v=new ne([],!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 M=-1,q=!0,N=r&H?new pt:i;for(h.set(n,e),h.set(e,n);++M<_;){var W=n[M],J=e[M];if(o)var U=v?o(J,W,M,e,n,h):o(W,J,M,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(N){if(!xo(e,function(rn,on){if(!_r(N,on)&&(W===rn||a(W,rn,r,o,h)))return N.push(on)})){q=!1;break}}else if(!(W===J||a(W,J,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 pe(+n,+e);case ei:return n.name==e.name&&n.message==e.message;case gr:case dr:return n==e+"";case se:var _=Oo;case le:var x=o&L;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&L,_=Qo(n),x=_.length,O=Qo(e),I=O.length;if(x!=I&&!v)return!1;for(var M=x;M--;){var q=_[M];if(!(v?q in e:sn.call(e,q)))return!1}var N=h.get(n),W=h.get(e);if(N&&W)return N==e&&W==n;var J=!0;h.set(n,e),h.set(e,n);for(var U=v;++M1?"& ":"")+e[o],e=e.join(r>2?", ":" "),n.replace(nd,`{ + */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,C=2,F=4,M=1,H=2,E=1,B=2,T=4,S=8,P=16,D=32,Y=64,K=128,nn=256,mn=512,ve=30,Ee="...",me=800,ar=16,at=1,sr=2,lr=3,ae=1/0,Gn=9007199254740991,Tt=17976931348623157e292,st=0/0,_e=4294967295,Mg=_e-1,Lg=_e>>>1,Pg=[["ary",K],["bind",E],["bindKey",B],["curry",S],["curryRight",P],["flip",mn],["partial",D],["partialRight",Y],["rearg",nn]],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]",se="[object Map]",pr="[object Number]",qg="[object Null]",Re="[object Object]",cs="[object Promise]",Gg="[object Proxy]",gr="[object RegExp]",le="[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+")",Fs="(?:"+co+"(?:d|ll|m|re|s|t|ve))?",Cs="(?:"+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,Fd="(?:"+[Rs+oi+"?",oi,po,go,xd].join("|")+")",Cd=RegExp(co,"g"),Bd=RegExp(oi,"g"),vo=RegExp(ho+"(?="+ho+")|"+Fd+Ms,"g"),Td=RegExp([Pt+"?"+Ss+"+"+Fs+"(?="+[ws,Pt,"$"].join("|")+")",Sd+"+"+Cs+"(?="+[ws,Pt+Is,"$"].join("|")+")",Pt+"?"+Is+"+"+Fs,Pt+"+"+Cs,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,pn={};pn[no]=pn[eo]=pn[to]=pn[ro]=pn[io]=pn[uo]=pn[oo]=pn[fo]=pn[ao]=!0,pn[Mt]=pn[ni]=pn[mr]=pn[cr]=pn[Lt]=pn[hr]=pn[ei]=pn[ti]=pn[se]=pn[pr]=pn[Re]=pn[gr]=pn[le]=pn[dr]=pn[vr]=!1;var hn={};hn[Mt]=hn[ni]=hn[mr]=hn[Lt]=hn[cr]=hn[hr]=hn[no]=hn[eo]=hn[to]=hn[ro]=hn[io]=hn[se]=hn[pr]=hn[Re]=hn[gr]=hn[le]=hn[dr]=hn[ri]=hn[uo]=hn[oo]=hn[fo]=hn[ao]=!0,hn[ei]=hn[ti]=hn[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,Fn=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,Qn=function(){try{var b=lt&<.require&<.require("util").types;return b||_o&&_o.binding&&_o.binding("util")}catch{}}(),Hs=Qn&&Qn.isArrayBuffer,Ds=Qn&&Qn.isDate,qs=Qn&&Qn.isMap,Gs=Qn&&Qn.isRegExp,Ns=Qn&&Qn.isSet,Ys=Qn&&Qn.isTypedArray;function Wn(b,R,A){switch(A.length){case 0:return b.call(R);case 1:return b.call(R,A[0]);case 2:return b.call(R,A[0],A[1]);case 3:return b.call(R,A[0],A[1],A[2])}return b.apply(R,A)}function Wd(b,R,A,G){for(var k=-1,fn=b==null?0:b.length;++k-1}function yo(b,R,A){for(var G=-1,k=b==null?0:b.length;++G-1;);return A}function Vs(b,R){for(var A=b.length;A--&&Ht(R,b[A],0)>-1;);return A}function jd(b,R){for(var A=b.length,G=0;A--;)b[A]===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,A=[];!(R=b.next()).done;)A.push(R.value);return A}function Oo(b){var R=-1,A=Array(b.size);return b.forEach(function(G,k){A[++R]=[k,G]}),A}function Zs(b,R){return function(A){return b(R(A))}}function We(b,R){for(var A=-1,G=b.length,k=0,fn=[];++A-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 te(n,e,r,o,a,h){var v,_=e&w,x=e&C,O=e&F;if(r&&(v=a?r(n,o,a,h):r(n)),v!==i)return v;if(!dn(n))return n;var I=V(n);if(I){if(v=Zv(n),!_)return Nn(n,v)}else{var L=Mn(n),q=L==ti||L==ls;if(Ze(n))return Tl(n,_);if(L==Re||L==Mt||q&&!a){if(v=x||q?{}:Jl(n),!_)return x?Gv(n,av(v,n)):qv(n,al(v,n))}else{if(!hn[L])return a?n:{};v=Jv(n,L,_)}}h||(h=new he);var N=h.get(n);if(N)return N;h.set(n,v),Rc(n)?n.forEach(function(U){v.add(te(U,e,r,U,n,h))}):Sc(n)&&n.forEach(function(U,rn){v.set(rn,te(U,e,r,rn,n,h))});var W=O?x?jo:Qo:x?$n:En,J=I?i:W(n);return jn(J||n,function(U,rn){J&&(rn=U,U=n[rn]),Sr(v,rn,te(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 ne(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=gn(e,Un(r))),o?(h=yo,v=!1):e.length>=s&&(h=_r,v=!1,e=new pt(e));n:for(;++a<_;){var I=n[a],L=r==null?I:r(I);if(I=o||I!==0?I:0,v&&L===L){for(var q=O;q--;)if(e[q]===L)continue n;x.push(I)}else h(e,L,o)||x.push(I)}return x}var Ke=Dl(ye),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:Z(o),o<0&&(o+=a),o=r>o?0:Ic(o);r0&&r(_)?e>1?Cn(_,e-1,r,o,a):Xe(a,_):o||(a[a.length]=_)}return a}var Lo=ql(),pl=ql(!0);function ye(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 L=-1,q=_[0];n:for(;++L-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=A(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 Q(n,e){return ff(nc(n,e,Xn),n+"")}function Iv(n){return fl(kt(n))}function Fv(n,e){var r=kt(n);return Di(r,gt(e,0,r.length))}function Ir(n,e,r,o){if(!dn(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=A(a);++o>>1,v=n[h];v!==null&&!zn(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:re(n,e,r)}var Bl=b0||function(n){return Fn.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=zn(n),v=e!==i,_=e===null,x=e===e,O=zn(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=A(x+O),L=!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=ee.prototype.thru;for(n&&e.reverse();o--;){var h=e[o];if(typeof h!="function")throw new ne(p);if(a&&!v&&Pi(h)=="wrapper")var v=new ee([],!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 L=-1,q=!0,N=r&H?new pt:i;for(h.set(n,e),h.set(e,n);++L<_;){var W=n[L],J=e[L];if(o)var U=v?o(J,W,L,e,n,h):o(W,J,L,n,e,h);if(U!==i){if(U)continue;q=!1;break}if(N){if(!xo(e,function(rn,on){if(!_r(N,on)&&(W===rn||a(W,rn,r,o,h)))return N.push(on)})){q=!1;break}}else if(!(W===J||a(W,J,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 pe(+n,+e);case ei:return n.name==e.name&&n.message==e.message;case gr:case dr:return n==e+"";case se:var _=Oo;case le: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 L=x;L--;){var q=_[L];if(!(v?q in e:sn.call(e,q)))return!1}var N=h.get(n),W=h.get(e);if(N&&W)return N==e&&W==n;var J=!0;h.set(n,e),h.set(e,n);for(var U=v;++L1?"& ":"")+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>=me)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 ne(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return pc(this)}function pm(){return new ne(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 ne(e,this.__chain__)}return this.thru(af)}function _m(){return Fl(this.__wrapped__,this.__actions__)}var ym=Ci(function(n,e,r){sn.call(n,r)?++n[r]:Fe(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 Cn(Gi(n,e),1)}function Em(n,e){return Cn(Gi(n,e),ae)}function Rm(n,e,r){return r=r===i?1:Z(r),Cn(Gi(n,e),r)}function gc(n,e){var r=V(n)?Qn: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=Ci(function(n,e,r){sn.call(n,r)?n[r].push(e):Fe(n,r,[e])});function Im(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?Z(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 Fm=Q(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?A(n.length):[];return Ke(n,function(v){h[++o]=a?Wn(e,v,r):Rr(v,e,r)}),h}),Cm=Ci(function(n,e,r){Fe(n,r,e)});function Gi(n,e){var r=V(n)?gn:_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=Ci(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=Z(e);var o=V(n)?uv:Fv;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==se||e==le?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=Q(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,Cn(e,1),[])}),Ni=x0||function(){return Fn.Date.now()};function $m(n,e){if(typeof e!="function")throw new jn(p);return n=Z(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,Ce(n,K,i,i,i,i,e)}function mc(n,e){var r;if(typeof e!="function")throw new jn(p);return n=Z(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var lf=Q(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(lf));o|=D}return Ce(n,o,e,r,a)}),_c=Q(function(n,e,r){var o=E|B;if(r.length){var a=We(r,Kt(_c));o|=D}return Ce(e,o,n,r,a)});function yc(n,e,r){e=r?i:e;var o=Ce(n,S,i,i,i,i,i,e);return o.placeholder=yc.placeholder,o}function bc(n,e,r){e=r?i:e;var o=Ce(n,P,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,M=!1,q=!0;if(typeof n!="function")throw new jn(p);e=ie(e)||0,dn(r)&&(I=!!r.leading,M="maxWait"in r,h=M?Sn(ie(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function N(bn){var ge=o,Pe=a;return o=a=i,O=bn,v=n.apply(Pe,ge),v}function W(bn){return O=bn,_=Br(rn,e),I?N(bn):v}function J(bn){var ge=bn-x,Pe=bn-O,Nc=e-ge;return M?Tn(Nc,h-Pe):Nc}function U(bn){var ge=bn-x,Pe=bn-O;return x===i||ge>=e||ge<0||M&&Pe>=h}function rn(){var bn=Ni();if(U(bn))return on(bn);_=Br(rn,J(bn))}function on(bn){return _=i,q&&o?N(bn):(o=a=i,v)}function kn(){_!==i&&Bl(_),O=0,o=x=a=_=i}function Dn(){return _===i?v:on(Ni())}function Vn(){var bn=Ni(),ge=U(bn);if(o=arguments,a=this,x=bn,ge){if(_===i)return W(x);if(M)return Bl(_),_=Br(rn,e),N(x)}return _===i&&(_=Br(rn,e)),v}return Vn.cancel=kn,Vn.flush=Dn,Vn}var Xm=Q(function(n,e){return ll(n,1,e)}),Wm=Q(function(n,e,r){return ll(n,ie(e)||0,r)});function Um(n){return Ce(n,mn)}function Yi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new jn(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 jn(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])?gn(e[0],Un(X())):gn(Cn(e,1),Un(X()));var r=e.length;return Q(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=A.isArray,a_=Hs?Un(Hs):vv;function Yn(n){return n!=null&&Xi(n.length)&&!Me(n)}function yn(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?Un(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==se||e==le)return!n.size;if(Cr(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(!dn(n))return!1;var e=Pn(n);return e==ti||e==ls||e==Hg||e==Gg}function Ac(n){return typeof n=="number"&&n==Z(n)}function Xi(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function dn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Sc=qs?Un(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?Un(Gs):bv;function w_(n){return Ac(n)&&n>=-Gn&&n<=Gn}var Rc=Ns?Un(Ns):xv;function Wi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==dr}function zn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ri}var zt=Ys?Un(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)?ce(n):Nn(n);if(yr&&n[yr])return u0(n[yr]());var e=Mn(n),r=e==se?Oo:e==le?si:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=ie(n),n===ae||n===-ae){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function Z(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function Ic(n){return n?gt(Z(n),0,_e):0}function ie(n){if(typeof n=="number")return n;if(zn(n))return st;if(dn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=dn(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 Fc(n){return be(n,$n(n))}function I_(n){return n?gt(Z(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":Kn(n)}var F_=Wt(function(n,e){if(Cr(e)||Yn(e)){be(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Sr(n,r,e[r])}),Cc=Wt(function(n,e){be(e,$n(e),n)}),Ui=Wt(function(n,e,r,o){be(e,$n(e),n,o)}),C_=Wt(function(n,e,r,o){be(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_=Q(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}),be(n,jo(n),r),o&&(r=ee(r,w|C|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=gn(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=Kn(e);var o=n.length;r=r===i?o:gt(Z(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=Z(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=Z(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!pf(e))&&(e=Kn(e),!e&&Dt(n))?Ve(ce(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(Z(r),0,n.length),e=Kn(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,M="__p += '",q=Io((e.escape||ii).source+"|"+I.source+"|"+(I===gs?od:ii).source+"|"+(e.evaluate||ii).source+"|$","g"),N="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hd+"]")+` -`;n.replace(q,function(U,rn,on,kn,Dn,Vn){return on||(on=kn),M+=n.slice(O,Vn).replace(pd,t0),rn&&(_=!0,M+=`' + +`)}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>=me)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 ee(o,this.__chain__).thru(function(h){return e&&!h.length&&h.push(i),h}))});function hm(){return pc(this)}function pm(){return new ee(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 ee(e,this.__chain__)}return this.thru(af)}function _m(){return Fl(this.__wrapped__,this.__actions__)}var ym=Ci(function(n,e,r){sn.call(n,r)?++n[r]:Fe(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 Cn(Gi(n,e),1)}function Em(n,e){return Cn(Gi(n,e),ae)}function Rm(n,e,r){return r=r===i?1:Z(r),Cn(Gi(n,e),r)}function gc(n,e){var r=V(n)?jn: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=Ci(function(n,e,r){sn.call(n,r)?n[r].push(e):Fe(n,r,[e])});function Im(n,e,r,o){n=Yn(n)?n:kt(n),r=r&&!o?Z(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 Fm=Q(function(n,e,r){var o=-1,a=typeof e=="function",h=Yn(n)?A(n.length):[];return Ke(n,function(v){h[++o]=a?Wn(e,v,r):Rr(v,e,r)}),h}),Cm=Ci(function(n,e,r){Fe(n,r,e)});function Gi(n,e){var r=V(n)?gn:_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=Ci(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=Z(e);var o=V(n)?uv:Fv;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==se||e==le?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=Q(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,Cn(e,1),[])}),Ni=x0||function(){return Fn.Date.now()};function $m(n,e){if(typeof e!="function")throw new ne(p);return n=Z(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,Ce(n,K,i,i,i,i,e)}function mc(n,e){var r;if(typeof e!="function")throw new ne(p);return n=Z(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var lf=Q(function(n,e,r){var o=E;if(r.length){var a=We(r,Kt(lf));o|=D}return Ce(n,o,e,r,a)}),_c=Q(function(n,e,r){var o=E|B;if(r.length){var a=We(r,Kt(_c));o|=D}return Ce(e,o,n,r,a)});function yc(n,e,r){e=r?i:e;var o=Ce(n,S,i,i,i,i,i,e);return o.placeholder=yc.placeholder,o}function bc(n,e,r){e=r?i:e;var o=Ce(n,P,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,L=!1,q=!0;if(typeof n!="function")throw new ne(p);e=ue(e)||0,dn(r)&&(I=!!r.leading,L="maxWait"in r,h=L?Sn(ue(r.maxWait)||0,e):h,q="trailing"in r?!!r.trailing:q);function N(xn){var ge=o,Pe=a;return o=a=i,O=xn,v=n.apply(Pe,ge),v}function W(xn){return O=xn,_=Br(rn,e),I?N(xn):v}function J(xn){var ge=xn-x,Pe=xn-O,Nc=e-ge;return L?Tn(Nc,h-Pe):Nc}function U(xn){var ge=xn-x,Pe=xn-O;return x===i||ge>=e||ge<0||L&&Pe>=h}function rn(){var xn=Ni();if(U(xn))return on(xn);_=Br(rn,J(xn))}function on(xn){return _=i,q&&o?N(xn):(o=a=i,v)}function kn(){_!==i&&Bl(_),O=0,o=x=a=_=i}function Dn(){return _===i?v:on(Ni())}function Vn(){var xn=Ni(),ge=U(xn);if(o=arguments,a=this,x=xn,ge){if(_===i)return W(x);if(L)return Bl(_),_=Br(rn,e),N(x)}return _===i&&(_=Br(rn,e)),v}return Vn.cancel=kn,Vn.flush=Dn,Vn}var Xm=Q(function(n,e){return ll(n,1,e)}),Wm=Q(function(n,e,r){return ll(n,ue(e)||0,r)});function Um(n){return Ce(n,mn)}function Yi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ne(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 ne(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])?gn(e[0],Un(X())):gn(Cn(e,1),Un(X()));var r=e.length;return Q(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=A.isArray,a_=Hs?Un(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?Un(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==se||e==le)return!n.size;if(Cr(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(!dn(n))return!1;var e=Pn(n);return e==ti||e==ls||e==Hg||e==Gg}function Ac(n){return typeof n=="number"&&n==Z(n)}function Xi(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Gn}function dn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function _n(n){return n!=null&&typeof n=="object"}var Sc=qs?Un(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?Un(Gs):bv;function w_(n){return Ac(n)&&n>=-Gn&&n<=Gn}var Rc=Ns?Un(Ns):xv;function Wi(n){return typeof n=="string"||!V(n)&&_n(n)&&Pn(n)==dr}function zn(n){return typeof n=="symbol"||_n(n)&&Pn(n)==ri}var zt=Ys?Un(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)?ce(n):Nn(n);if(yr&&n[yr])return u0(n[yr]());var e=Mn(n),r=e==se?Oo:e==le?si:kt;return r(n)}function Le(n){if(!n)return n===0?n:0;if(n=ue(n),n===ae||n===-ae){var e=n<0?-1:1;return e*Tt}return n===n?n:0}function Z(n){var e=Le(n),r=e%1;return e===e?r?e-r:e:0}function Ic(n){return n?gt(Z(n),0,_e):0}function ue(n){if(typeof n=="number")return n;if(zn(n))return st;if(dn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=dn(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 Fc(n){return be(n,$n(n))}function I_(n){return n?gt(Z(n),-Gn,Gn):n===0?n:0}function an(n){return n==null?"":Kn(n)}var F_=Wt(function(n,e){if(Cr(e)||Yn(e)){be(e,En(e),n);return}for(var r in e)sn.call(e,r)&&Sr(n,r,e[r])}),Cc=Wt(function(n,e){be(e,$n(e),n)}),Ui=Wt(function(n,e,r,o){be(e,$n(e),n,o)}),C_=Wt(function(n,e,r,o){be(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_=Q(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}),be(n,jo(n),r),o&&(r=te(r,w|C|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=gn(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=Kn(e);var o=n.length;r=r===i?o:gt(Z(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=Z(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=Z(e);var o=e?qt(n):0;return e&&o>>0,r?(n=an(n),n&&(typeof e=="string"||e!=null&&!pf(e))&&(e=Kn(e),!e&&Dt(n))?Ve(ce(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(Z(r),0,n.length),e=Kn(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,L="__p += '",q=Io((e.escape||ii).source+"|"+I.source+"|"+(I===gs?od:ii).source+"|"+(e.evaluate||ii).source+"|$","g"),N="//# sourceURL="+(sn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hd+"]")+` +`;n.replace(q,function(U,rn,on,kn,Dn,Vn){return on||(on=kn),L+=n.slice(O,Vn).replace(pd,t0),rn&&(_=!0,L+=`' + __e(`+rn+`) + -'`),Dn&&(x=!0,M+=`'; +'`),Dn&&(x=!0,L+=`'; `+Dn+`; -__p += '`),on&&(M+=`' + +__p += '`),on&&(L+=`' + ((__t = (`+on+`)) == null ? '' : __t) + -'`),O=Vn+U.length,U}),M+=`'; -`;var W=sn.call(e,"variable")&&e.variable;if(!W)M=`with (obj) { -`+M+` +'`),O=Vn+U.length,U}),L+=`'; +`;var W=sn.call(e,"variable")&&e.variable;if(!W)L=`with (obj) { +`+L+` } -`;else if(id.test(W))throw new k(g);M=(x?M.replace($g,""):M).replace(Xg,"$1").replace(Wg,"$1;"),M="function("+(W||"obj")+`) { +`;else if(id.test(W))throw new k(g);L=(x?L.replace($g,""):L).replace(Xg,"$1").replace(Wg,"$1;"),L="function("+(W||"obj")+`) { `+(W?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(x?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+M+`return __p -}`;var J=qc(function(){return fn(h,N+"return "+M).apply(i,v)});if(J.source=M,hf(J))throw J;return J}function Iy(n){return an(n).toLowerCase()}function Fy(n){return an(n).toUpperCase()}function Cy(n,e,r){if(n=an(n),n&&(r||e===i))return zs(n);if(!n||!(e=Kn(e)))return n;var o=ce(n),a=ce(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=Kn(e)))return n;var o=ce(n),a=Vs(o,ce(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=Kn(e)))return n;var o=ce(n),a=ks(o,ce(e));return Ve(o,a).join("")}function My(n,e){var r=ve,o=Ee;if(dn(e)){var a="separator"in e?e.separator:a;r="length"in e?Z(e.length):r,o="omission"in e?Kn(e.omission):o}n=an(n);var h=n.length;if(Dt(n)){var v=ce(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 M=O.index;x=x.slice(0,M===i?_:M)}}else if(n.indexOf(Kn(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=Q(function(n,e){try{return Wn(n,i,e)}catch(r){return hf(r)?r:new k(r)}}),Hy=Be(function(n,e){return Qn(e,function(r){r=xe(r),Fe(n,r,lf(n[r],n))}),n});function Dy(n){var e=n==null?0:n.length,r=X();return n=e?gn(n,function(o){if(typeof o[1]!="function")throw new jn(p);return[r(o[0]),o[1]]}):[],Q(function(o){for(var a=-1;++aGn)return[];var r=_e,o=Tn(n,_e);e=X(e),n-=_e;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=Z(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(_e)},ye(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),M=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__,N=!!this.__actions__.length,W=h&&!q,J=x&&!N;if(!h&&I){v=J?v:new un(this);var U=n.apply(v,_);return U.__actions__.push({func:qi,args:[M],thisArg:i}),new ne(U,q)}return W&&J?n.apply(this,_):(U=this.thru(M),W?o?U.value()[0]:U.value():U)})}),Qn(["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)})}}),ye(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,B).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):Fn._=Gt}).call(cn)}(Lr,Lr.exports);var vn=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,Ff;function vh(){return Ff||(Ff=1,ki=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ki}var Vi,Cf;function mh(){if(Cf)return Vi;Cf=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,C,F,L,H,E,B;w=function(T,S){var P;return f(S),d.call(this,"__ee__")?P=this.__ee__:(P=y.value=p(null),g(this,"__ee__",y),y.value=null),P[T]?typeof P[T]=="object"?P[T].push(S):P[T]=[P[T],S]:P[T]=S,this},C=function(T,S){var P,D;return f(S),D=this,w.call(this,T,P=function(){F.call(D,T,P),s.call(S,this,arguments)}),P.__eeOnceListener__=S,this},F=function(T,S){var P,D,Y,K;if(f(S),!d.call(this,"__ee__"))return this;if(P=this.__ee__,!P[T])return this;if(D=P[T],typeof D=="object")for(K=0;Y=D[K];++K)(Y===S||Y.__eeOnceListener__===S)&&(D.length===2?P[T]=D[K?0:1]:D.splice(K,1));else(D===S||D.__eeOnceListener__===S)&&delete P[T];return this},L=function(T){var S,P,D,Y,K;if(d.call(this,"__ee__")&&(Y=this.__ee__[T],!!Y))if(typeof Y=="object"){for(P=arguments.length,K=new Array(P-1),S=1;S=55296&&P<=56319&&(nn+=C[++E])),nn=F?d.call(F,L,nn,B):nn,H?(y.value=nn,w(T,B,y)):T[B]=nn,++B;S=B}}if(S===void 0)for(S=f(C.length),H&&(T=new H(S)),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 Ca;Na=1;var t=Oa(),u=Cp(),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),C=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,L,H){var E=!1;if(!s(H)){w[F]=H,d.emit("setasync",F,1);return}y[F]=1,C[F]=H;var B=function(D){var Y=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.`);Y&&(delete y[F],w[F]=D,d.emit("setasync",F,Y))},T=function(){E=!0,y[F]&&(delete y[F],delete C[F],d.delete(F))},S=m;if(S||(S="then"),S==="then"){var P=function(){c(T)};H=H.then(function(D){c(B.bind(this,D))},P),typeof H.finally=="function"&&H.finally(P)}else if(S==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(B,T)}else if(S==="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(B),H.finally(T)}}),d.on("get",function(F,L,H){var E;if(y[F]){++y[F];return}E=C[F];var B=function(){d.emit("getasync",F,L,H)};s(E)?typeof E.done=="function"?E.done(B):E.then(function(){c(B)}):B()}),d.on("delete",function(F){if(delete C[F],y[F]){delete y[F];return}if(hasOwnProperty.call(w,F)){var L=w[F];delete w[F],d.emit("deleteasync",F,[L])}}),d.on("clear",function(){var F=w;w=p(null),y=p(null),C=p(null),d.emit("clearasync",t(F,function(L){return[L]}))})},Ca}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,C){var F,L,H,E;y=s(y),y&&(F=d(null),L=C.async&&c.async||C.promise&&c.promise?"async":"",w.on("set"+L,function(B){F[B]=setTimeout(function(){w.delete(B)},y),typeof F[B].unref=="function"&&F[B].unref(),E&&(E[B]&&E[B]!=="nextTick"&&clearTimeout(E[B]),E[B]=setTimeout(function(){delete E[B]},H),typeof E[B].unref=="function"&&E[B].unref())}),w.on("delete"+L,function(B){clearTimeout(F[B]),delete F[B],E&&(E[B]!=="nextTick"&&clearTimeout(E[B]),delete E[B])}),C.preFetch&&(C.preFetch===!0||isNaN(C.preFetch)?H=.333:H=g(m(Number(C.preFetch),1),0),H&&(E={},H=(1-H)*y,w.on("get"+L,function(B,T,S){E[B]||(E[B]="nextTick",i(function(){var P;E[B]==="nextTick"&&(delete E[B],w.delete(B),C.async&&(T=t(T),T.push(p)),P=w.memoized.apply(S,T),C.promise&&f(P)&&(typeof P.done=="function"?P.done(p,p):P.then(p,p)))}))}))),w.on("clear"+L,function(){u(F,function(B){clearTimeout(B)}),F={},E&&(u(E,function(B){B!=="nextTick"&&clearTimeout(B)}),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],C=++m;if(p[C]=y,g[y]=C,!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&&Fp(),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 C=t[u],F=i,L=f;for(Jt(t,i,u),s(t[f],C)>0&&Jt(t,i,f);F0;)L--}s(t[i],C)===0?Jt(t,i,L):(L++,Jt(t,L,f)),L<=u&&(i=L+1),u<=L&&(f=L-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/30,animationDuration:150,debounceInterval:75,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,C){if(typeof y!="function")throw new TypeError("The listener must be a function");var F=new s(y,w||m,C),L=i?i+d:d;return m._events[L]?m._events[L].fn?m._events[L]=[m._events[L],F]:m._events[L].push(F):(m._events[L]=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 C=0,F=w.length,L=new Array(F);C=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)},Zn=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=Zn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Se={})[z.HEX]=function(t){return{r:kr(t.r),g:kr(t.g),b:kr(t.b)}},Se.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?kr(255*t.a):"0xFF",u},Se[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Se.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Se[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,Ot(i,u)},Se.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se[z.CMYK]=function(t,u){return bg(rs(t.r,t.g,t.b),u)},Se.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se),us=function(t,u,i,f){var s=Zn(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,C){return en(en({},m),{l:m.l+d*(C+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?g?j.HEX(ot(en(en({},C),{a:$(255*C.a)}),f)):j.HEX(ot(C,f)):g?tn.HEXA(C):tn.HEX(C)});case z.RGB:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?j.RGB(ot(C,f)):g?tn.RGBA(C,f):tn.RGB(C,f)});case z.HSL:return y.map(function(w){return c?j.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=Zn(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?j.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?j.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?j.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?j.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?j.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?j.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,C,F,L,H,E,B=t.map(function(D){var Y=Zn(D);return ut(D,Y)}),T=u===qn.SUBTRACTIVE?B.map(function(D){var Y,K,nn,mn,ve,Ee,me,ar,at,sr,lr,ae,Gn,Tt,st=(Y=D.r,K=D.g,nn=D.b,mn=Math.min(Y,K,nn),ve=Math.min(255-Y,255-K,255-nn),Ee=Y-mn,me=K-mn,ar=nn-mn,at=Math.min(Ee,me),sr=Ee-at,lr=(me+at)/2,ae=(ar+me-at)/2,Gn=Math.max(sr,lr,ae)/Math.max(Ee,me,ar),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:sr/Tt+ve,y:lr/Tt+ve,b:ae/Tt+ve});return Bn(D,"a")&&(st.a=D.a),st}):null;function S(D){var Y=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(K,nn){var mn=Bn(nn,"a")?nn.a:1,ve={r:Math.min(K.r+nn.r*mn,255),b:Math.min(K.b+nn.b*mn,255),a:1-(1-mn)*(1-K.a)},Ee="g"in K?K.g:K.y,me="g"in nn?nn.g:nn.y;return en(en({},ve),u===qn.ADDITIVE?{g:Math.min(Ee+me*mn,255)}:{y:Math.min(Ee+me*mn,255)})},Y)}if(u===qn.ADDITIVE)i=S(B);else{var P=S(T);f=P.r,s=P.y,c=P.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),C=m+d-w,F=d+w,L=2*(y-w),H=Math.max(C,F,L)/Math.max(m,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(i={r:C/E+g,g:F/E+g,b:L/E+g}).a=P.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:oe(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?j.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?j.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?j.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?j.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?j.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?j.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,C=(d.r-m.r)/w,F=(d.g-m.g)/w,L=(d.b-m.b)/w,H=Ln(m.a),E=(Ln(d.a)-H)/w;return Array(y).fill(null).map(function(B,T){return T===0?m:T===w?d:{r:$(m.r+C*T),g:$(m.g+F*T),b:$(m.b+L*T),a:$(H+E*T)}})}(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=oe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=oe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=oe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=oe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=oe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=oe(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=oe(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=oe(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=oe(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=oe(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 j.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return j.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 j.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return j.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 j.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return j.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 j.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 j.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=Zn(u);return qe(u,f,i,0,tn.HEX,j.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Zn(u);return qe(u,f,i,0,tn.HEXA,j.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGB,j.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGBA,j.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSL,j.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSLA,j.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYK,j.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYKA,j.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,j.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,j.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,j.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,j.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,j.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,j.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=Ae.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,m){var d;return(d={},d[Ae.ANALOGOUS]=Et.buildHarmony(p,hg,m,g),d[Ae.COMPLEMENTARY]=Et.buildHarmony(p,pg,m,g),d[Ae.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,m,g),d[Ae.TRIADIC]=Et.buildHarmony(p,dg,m,g),d[Ae.TETRADIC]=Et.buildHarmony(p,vg,m,g),d[Ae.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=vn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=vn.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=vn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=vn.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:Fg}=Math,as=t=>vn.floor(Ig(t+1));function Cg({right:t,left:u,bottom:i,top:f},s){const c=Fg(as(t-u),as(i-f))-s,p=2**c,g={left:vn.floor(u/p),right:vn.ceil((t+1)/p),top:vn.floor(f/p),bottom:vn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:vn.shuffle(Uc({x:vn.range(g.left,g.right+1),y:vn.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);ue(this,Jr);ue(this,ft);ue(this,Qr);ue(this,jr);ue(this,fe,void 0);ue(this,Ft,void 0);ue(this,Ne,void 0);ue(this,Ye,void 0);ue(this,fr,void 0);ue(this,Ct,void 0);ue(this,Bt,void 0);de(this,fe,rg),de(this,Ft,{bottom:256,top:0,left:0,right:256}),de(this,Ne,new tg(16)),de(this,Ye,{}),de(this,fr,0),de(this,Ct,{}),de(this,Bt,vn.once(()=>vn.debounce(()=>this.render(),xn(this,fe).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:xn(this,Ne),world:xn(this,Ye)}}setFrustum(i){de(this,Ft,i),xn(this,Bt).call(this)()}setTileResolution(i){vn.isEqual(i,xn(this,fe).tileResolution)||(Object.assign(xn(this,fe),{tileResolution:i}),Je(this,ft,Mr).call(this))}add(i,f){const s=vn.map(i,c=>({...ju[c.$].test(c),component:c,index:Je(this,Jr,$c).call(this)}));xn(this,Ne).load(s),xn(this,Ye)[f]=s,Je(this,ft,Mr).call(this)}remove(i){for(const f of xn(this,Ye)[i])xn(this,Ne).remove(f);delete xn(this,Ye)[i],Je(this,ft,Mr).call(this)}setup(i){de(this,fe,i),Je(this,ft,Mr).call(this)}async render(){for(const{tile:i,bounds:f}of Cg(xn(this,Ft),xn(this,fe).tileSubdivision).tiles)if(Je(this,Qr,Xc).call(this,i)){const s=this.renderTile(f,xn(this,fe).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}fe=new WeakMap,Ft=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,fr=new WeakMap,Jr=new WeakSet,$c=function(){return Yc(this,fr)._++},Ct=new WeakMap,ft=new WeakSet,Mr=function(){this.renderTile.clear(),xn(this,Bt).call(this)()},Bt=new WeakMap,Qr=new WeakSet,Xc=function({x:i,y:f}){const{workerCount:s,workerIndex:c}=xn(this,fe);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=vn.sortBy(xn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=fs(vn.map(d,"index")),w=fs([s,c,p,g]),C=xn(this,Ct)[w];if(!C||y!==C.hash){const F=new OffscreenCanvas(f.width,f.height),L=F.getContext("2d");L.imageSmoothingEnabled=!1;const H=f.width*.05,E=1;L.fillStyle="rgba(127,127,127,0.36)",L.fillRect((f.width-H)/2,(f.height-E)/2,H,E),L.fillRect((f.width-E)/2,(f.height-H)/2,E,H);for(const{component:T}of d)Rg(T,L,{scale:m,x:-g*m.x,y:-s*m.y});const B=F.transferToImageBitmap();return xn(this,Ct)[w]={hash:y,tile:B},B}else return C.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)}})(); +`)+L+`return __p +}`;var J=qc(function(){return fn(h,N+"return "+L).apply(i,v)});if(J.source=L,hf(J))throw J;return J}function Iy(n){return an(n).toLowerCase()}function Fy(n){return an(n).toUpperCase()}function Cy(n,e,r){if(n=an(n),n&&(r||e===i))return zs(n);if(!n||!(e=Kn(e)))return n;var o=ce(n),a=ce(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=Kn(e)))return n;var o=ce(n),a=Vs(o,ce(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=Kn(e)))return n;var o=ce(n),a=ks(o,ce(e));return Ve(o,a).join("")}function My(n,e){var r=ve,o=Ee;if(dn(e)){var a="separator"in e?e.separator:a;r="length"in e?Z(e.length):r,o="omission"in e?Kn(e.omission):o}n=an(n);var h=n.length;if(Dt(n)){var v=ce(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 L=O.index;x=x.slice(0,L===i?_:L)}}else if(n.indexOf(Kn(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=Q(function(n,e){try{return Wn(n,i,e)}catch(r){return hf(r)?r:new k(r)}}),Hy=Be(function(n,e){return jn(e,function(r){r=xe(r),Fe(n,r,lf(n[r],n))}),n});function Dy(n){var e=n==null?0:n.length,r=X();return n=e?gn(n,function(o){if(typeof o[1]!="function")throw new ne(p);return[r(o[0]),o[1]]}):[],Q(function(o){for(var a=-1;++aGn)return[];var r=_e,o=Tn(n,_e);e=X(e),n-=_e;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=Z(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(_e)},ye(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),L=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__,N=!!this.__actions__.length,W=h&&!q,J=x&&!N;if(!h&&I){v=J?v:new un(this);var U=n.apply(v,_);return U.__actions__.push({func:qi,args:[L],thisArg:i}),new ee(U,q)}return W&&J?n.apply(this,_):(U=this.thru(L),W?o?U.value()[0]:U.value():U)})}),jn(["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)})}}),ye(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,B).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):Fn._=Gt}).call(cn)}(Lr,Lr.exports);var vn=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,Ff;function vh(){return Ff||(Ff=1,ki=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ki}var Vi,Cf;function mh(){if(Cf)return Vi;Cf=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,C,F,M,H,E,B;w=function(T,S){var P;return f(S),d.call(this,"__ee__")?P=this.__ee__:(P=y.value=p(null),g(this,"__ee__",y),y.value=null),P[T]?typeof P[T]=="object"?P[T].push(S):P[T]=[P[T],S]:P[T]=S,this},C=function(T,S){var P,D;return f(S),D=this,w.call(this,T,P=function(){F.call(D,T,P),s.call(S,this,arguments)}),P.__eeOnceListener__=S,this},F=function(T,S){var P,D,Y,K;if(f(S),!d.call(this,"__ee__"))return this;if(P=this.__ee__,!P[T])return this;if(D=P[T],typeof D=="object")for(K=0;Y=D[K];++K)(Y===S||Y.__eeOnceListener__===S)&&(D.length===2?P[T]=D[K?0:1]:D.splice(K,1));else(D===S||D.__eeOnceListener__===S)&&delete P[T];return this},M=function(T){var S,P,D,Y,K;if(d.call(this,"__ee__")&&(Y=this.__ee__[T],!!Y))if(typeof Y=="object"){for(P=arguments.length,K=new Array(P-1),S=1;S=55296&&P<=56319&&(nn+=C[++E])),nn=F?d.call(F,M,nn,B):nn,H?(y.value=nn,w(T,B,y)):T[B]=nn,++B;S=B}}if(S===void 0)for(S=f(C.length),H&&(T=new H(S)),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 Ca;Na=1;var t=Oa(),u=Cp(),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),C=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,C[F]=H;var B=function(D){var Y=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.`);Y&&(delete y[F],w[F]=D,d.emit("setasync",F,Y))},T=function(){E=!0,y[F]&&(delete y[F],delete C[F],d.delete(F))},S=m;if(S||(S="then"),S==="then"){var P=function(){c(T)};H=H.then(function(D){c(B.bind(this,D))},P),typeof H.finally=="function"&&H.finally(P)}else if(S==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(B,T)}else if(S==="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(B),H.finally(T)}}),d.on("get",function(F,M,H){var E;if(y[F]){++y[F];return}E=C[F];var B=function(){d.emit("getasync",F,M,H)};s(E)?typeof E.done=="function"?E.done(B):E.then(function(){c(B)}):B()}),d.on("delete",function(F){if(delete C[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),C=p(null),d.emit("clearasync",t(F,function(M){return[M]}))})},Ca}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,C){var F,M,H,E;y=s(y),y&&(F=d(null),M=C.async&&c.async||C.promise&&c.promise?"async":"",w.on("set"+M,function(B){F[B]=setTimeout(function(){w.delete(B)},y),typeof F[B].unref=="function"&&F[B].unref(),E&&(E[B]&&E[B]!=="nextTick"&&clearTimeout(E[B]),E[B]=setTimeout(function(){delete E[B]},H),typeof E[B].unref=="function"&&E[B].unref())}),w.on("delete"+M,function(B){clearTimeout(F[B]),delete F[B],E&&(E[B]!=="nextTick"&&clearTimeout(E[B]),delete E[B])}),C.preFetch&&(C.preFetch===!0||isNaN(C.preFetch)?H=.333:H=g(m(Number(C.preFetch),1),0),H&&(E={},H=(1-H)*y,w.on("get"+M,function(B,T,S){E[B]||(E[B]="nextTick",i(function(){var P;E[B]==="nextTick"&&(delete E[B],w.delete(B),C.async&&(T=t(T),T.push(p)),P=w.memoized.apply(S,T),C.promise&&f(P)&&(typeof P.done=="function"?P.done(p,p):P.then(p,p)))}))}))),w.on("clear"+M,function(){u(F,function(B){clearTimeout(B)}),F={},E&&(u(E,function(B){B!=="nextTick"&&clearTimeout(B)}),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],C=++m;if(p[C]=y,g[y]=C,!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&&Fp(),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 C=t[u],F=i,M=f;for(Jt(t,i,u),s(t[f],C)>0&&Jt(t,i,f);F0;)M--}s(t[i],C)===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/30,animationDuration:150,debounceInterval:75,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,C){if(typeof y!="function")throw new TypeError("The listener must be a function");var F=new s(y,w||m,C),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 C=0,F=w.length,M=new Array(F);C=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)},Zn=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=Zn(t)),typeof t=="string"?_g[u](t):yg[u](t)},tn=((Se={})[z.HEX]=function(t){return{r:kr(t.r),g:kr(t.g),b:kr(t.b)}},Se.HEXA=function(t){var u=tn.HEX(t);return u.a=Bn(t,"a")?kr(255*t.a):"0xFF",u},Se[z.RGB]=function(t,u){return Bn(t,"a")&&delete t.a,ot(t,u)},Se.RGBA=function(t,u){return t.a=Bn(t,"a")?$(t.a):1,ot(t,u)},Se[z.HSL]=function(t,u){var i=At(t.r,t.g,t.b);return delete i.a,Ot(i,u)},Se.HSLA=function(t,u){var i=tn.HSL(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se[z.CMYK]=function(t,u){return bg(rs(t.r,t.g,t.b),u)},Se.CMYKA=function(t,u){var i=tn.CMYK(t,u);return i.a=Bn(t,"a")?$(t.a,u):1,i},Se),us=function(t,u,i,f){var s=Zn(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,C){return en(en({},m),{l:m.l+d*(C+1)*(1-2*+i)})});switch(s){case z.HEX:default:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?g?j.HEX(ot(en(en({},C),{a:$(255*C.a)}),f)):j.HEX(ot(C,f)):g?tn.HEXA(C):tn.HEX(C)});case z.RGB:return y.map(function(w){var C=On(w.h,w.s,w.l);return g&&(C.a=w.a),c?j.RGB(ot(C,f)):g?tn.RGBA(C,f):tn.RGB(C,f)});case z.HSL:return y.map(function(w){return c?j.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=Zn(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?j.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?j.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?j.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?j.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?j.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?j.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,C,F,M,H,E,B=t.map(function(D){var Y=Zn(D);return ut(D,Y)}),T=u===qn.SUBTRACTIVE?B.map(function(D){var Y,K,nn,mn,ve,Ee,me,ar,at,sr,lr,ae,Gn,Tt,st=(Y=D.r,K=D.g,nn=D.b,mn=Math.min(Y,K,nn),ve=Math.min(255-Y,255-K,255-nn),Ee=Y-mn,me=K-mn,ar=nn-mn,at=Math.min(Ee,me),sr=Ee-at,lr=(me+at)/2,ae=(ar+me-at)/2,Gn=Math.max(sr,lr,ae)/Math.max(Ee,me,ar),Tt=isNaN(Gn)||Gn===1/0||Gn<=0?1:Gn,{r:sr/Tt+ve,y:lr/Tt+ve,b:ae/Tt+ve});return Bn(D,"a")&&(st.a=D.a),st}):null;function S(D){var Y=u===qn.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(K,nn){var mn=Bn(nn,"a")?nn.a:1,ve={r:Math.min(K.r+nn.r*mn,255),b:Math.min(K.b+nn.b*mn,255),a:1-(1-mn)*(1-K.a)},Ee="g"in K?K.g:K.y,me="g"in nn?nn.g:nn.y;return en(en({},ve),u===qn.ADDITIVE?{g:Math.min(Ee+me*mn,255)}:{y:Math.min(Ee+me*mn,255)})},Y)}if(u===qn.ADDITIVE)i=S(B);else{var P=S(T);f=P.r,s=P.y,c=P.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),C=m+d-w,F=d+w,M=2*(y-w),H=Math.max(C,F,M)/Math.max(m,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(i={r:C/E+g,g:F/E+g,b:M/E+g}).a=P.a}return{r:$(i.r),g:$(i.g),b:$(i.b),a:fe(i.a,0,1)}}})[z.HEX]=function(t,u,i){var f=this.mix(t,u);return delete f.a,i?j.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?j.HEX(f):tn.HEXA(f)},rt[z.RGB]=function(t,u,i,f){var s=this.mix(t,u);return delete s.a,i?j.RGB(s):tn.RGB(s,f)},rt.RGBA=function(t,u,i,f){var s=this.mix(t,u);return i?j.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?j.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?j.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,C=(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(B,T){return T===0?m:T===w?d:{r:$(m.r+C*T),g:$(m.g+F*T),b:$(m.b+M*T),a:$(H+E*T)}})}(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=fe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=fe(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=fe(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=fe(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=fe(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=fe(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 j.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return j.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 j.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return j.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 j.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return j.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 j.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 j.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=Zn(u);return qe(u,f,i,0,tn.HEX,j.HEX)},t.toHEXA=function(u,i){i===void 0&&(i=!0);var f=Zn(u);return qe(u,f,i,0,tn.HEXA,j.HEX)},t.toRGB=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGB,j.RGB)},t.toRGBA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.RGBA,j.RGB)},t.toHSL=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSL,j.HSL)},t.toHSLA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.HSLA,j.HSL)},t.toCMYK=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYK,j.CMYK)},t.toCMYKA=function(u,i,f){i===void 0&&(i=!0),f===void 0&&(f=6);var s=Zn(u);return qe(u,s,i,f,tn.CMYKA,j.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,j.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,j.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,j.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,j.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,j.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,j.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=Ae.COMPLEMENTARY),f===void 0&&(f=qn.ADDITIVE),s===void 0&&(s=6),function(c,p,g,m){var d;return(d={},d[Ae.ANALOGOUS]=Et.buildHarmony(p,hg,m,g),d[Ae.COMPLEMENTARY]=Et.buildHarmony(p,pg,m,g),d[Ae.SPLIT_COMPLEMENTARY]=Et.buildHarmony(p,gg,m,g),d[Ae.TRIADIC]=Et.buildHarmony(p,dg,m,g),d[Ae.TETRADIC]=Et.buildHarmony(p,vg,m,g),d[Ae.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=vn.minBy(t.points,"x"))==null?void 0:u.x)??0-t.lineWidth??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0+t.lineWidth??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0-t.lineWidth??0,bottom:((s=vn.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=vn.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((i=vn.maxBy(t.points,"x"))==null?void 0:i.x)??0,top:((f=vn.minBy(t.points,"y"))==null?void 0:f.y)??0,bottom:((s=vn.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:Fg}=Math,as=t=>vn.floor(Ig(t+1));function Cg({right:t,left:u,bottom:i,top:f},s){const c=Fg(as(t-u),as(i-f))-s,p=2**c,g={left:vn.floor(u/p),right:vn.ceil((t+1)/p),top:vn.floor(f/p),bottom:vn.ceil((i+1)/p)};return{zoom:c,order:p,tiles:vn.shuffle(Uc({x:vn.range(g.left,g.right+1),y:vn.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);oe(this,Jr);oe(this,ft);oe(this,Qr);oe(this,jr);oe(this,Jn,void 0);oe(this,Ft,void 0);oe(this,Ne,void 0);oe(this,Ye,void 0);oe(this,fr,void 0);oe(this,Ct,void 0);oe(this,Bt,void 0);de(this,Jn,rg),de(this,Ft,{bottom:256,top:0,left:0,right:256}),de(this,Ne,new tg(16)),de(this,Ye,{}),de(this,fr,0),de(this,Ct,{}),de(this,Bt,vn.once(()=>vn.debounce(()=>this.render(),yn(this,Jn).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){de(this,Ft,i),yn(this,Bt).call(this)()}setTileResolution(i){vn.isEqual(i,yn(this,Jn).tileResolution)||(Object.assign(yn(this,Jn),{tileResolution:i}),Je(this,ft,Mr).call(this))}add(i,f){const s=vn.map(i,c=>({...ju[c.$].test(c),component:c,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){de(this,Jn,i),Je(this,ft,Mr).call(this)}async render(){for(const{tile:i,bounds:f}of Cg(yn(this,Ft),yn(this,Jn).tileSubdivision).tiles)if(Je(this,Qr,Xc).call(this,i)){const s=this.renderTile(f,yn(this,Jn).tileResolution);s&&this.emit("message",{action:"update",payload:{bounds:f,bitmap:s}},[])}}}Jn=new WeakMap,Ft=new WeakMap,Ne=new WeakMap,Ye=new WeakMap,fr=new WeakMap,Jr=new WeakSet,$c=function(){return Yc(this,fr)._++},Ct=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,Jn);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=vn.sortBy(yn(this,Ne).search({minX:g,maxX:c,maxY:p,minY:s}),"index"),y=fs(vn.map(d,"index")),w=fs([s,c,p,g]),C=yn(this,Ct)[w];if(!C||y!==C.hash){const F=new OffscreenCanvas(f.width,f.height),M=F.getContext("2d",{alpha:!1});M.imageSmoothingEnabled=!1,M.fillStyle=yn(this,Jn).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);for(const{component:T}of d)Rg(T,M,{scale:m,x:-g*m.x,y:-s*m.y});const B=F.transferToImageBitmap();return yn(this,Ct)[w]={hash:y,tile:B},B}else return C.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/index-369f6183.js b/assets/index-369f6183.js deleted file mode 100644 index df5621b4..00000000 --- a/assets/index-369f6183.js +++ /dev/null @@ -1,1847 +0,0 @@ -var zoe=Object.defineProperty;var joe=(e,t,n)=>t in e?zoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var vm=(e,t,n)=>(joe(e,typeof t!="symbol"?t+"":t,n),n),cL=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var tt=(e,t,n)=>(cL(e,t,"read from private field"),n?n.call(e):t.get(e)),cr=(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)},fu=(e,t,n,r)=>(cL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var r6=(e,t,n,r)=>({set _(i){fu(e,t,i,n)},get _(){return tt(e,t,r)}}),Gi=(e,t,n)=>(cL(e,t,"access private method"),n);function Uoe(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 $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c4(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 oX={exports:{}},OT={},sX={exports:{}},hn={};/** - * @license React - * react.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 mw=Symbol.for("react.element"),Hoe=Symbol.for("react.portal"),Woe=Symbol.for("react.fragment"),Goe=Symbol.for("react.strict_mode"),Voe=Symbol.for("react.profiler"),qoe=Symbol.for("react.provider"),Xoe=Symbol.for("react.context"),Yoe=Symbol.for("react.forward_ref"),Koe=Symbol.for("react.suspense"),Qoe=Symbol.for("react.memo"),Joe=Symbol.for("react.lazy"),i6=Symbol.iterator;function Zoe(e){return e===null||typeof e!="object"?null:(e=i6&&e[i6]||e["@@iterator"],typeof e=="function"?e:null)}var aX={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lX=Object.assign,cX={};function gv(e,t,n){this.props=e,this.context=t,this.refs=cX,this.updater=n||aX}gv.prototype.isReactComponent={};gv.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")};gv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uX(){}uX.prototype=gv.prototype;function u4(e,t,n){this.props=e,this.context=t,this.refs=cX,this.updater=n||aX}var d4=u4.prototype=new uX;d4.constructor=u4;lX(d4,gv.prototype);d4.isPureReactComponent=!0;var o6=Array.isArray,dX=Object.prototype.hasOwnProperty,f4={current:null},fX={key:!0,ref:!0,__self:!0,__source:!0};function hX(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)dX.call(t,r)&&!fX.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1{t[n]=bX(e[n])}),t}function ns(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return up(e)&&up(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(up(t[i])&&i in e&&up(e[i])?r[i]=ns(e[i],t[i],n):n.clone?r[i]=up(t[i])?bX(t[i]):t[i]:r[i]=t[i])}),r}var xX={exports:{}},Fse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",zse=Fse,jse=zse;function wX(){}function _X(){}_X.resetWarningCache=wX;var Use=function(){function e(r,i,o,s,a,c){if(c!==jse){var u=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 u.name="Invariant Violation",u}}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:_X,resetWarningCache:wX};return n.PropTypes=n,n};xX.exports=Use();var vv=xX.exports;const gb=ds(vv);function Zd(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 MT(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 QS(e,t){var n,r;return R.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Fr(e){return e&&e.ownerDocument||document}function Nu(e){return Fr(e).defaultView||window}function J$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Hse=typeof window<"u"?R.useLayoutEffect:R.useEffect,jo=Hse;let l6=0;function Wse(e){const[t,n]=R.useState(e),r=e||t;return R.useEffect(()=>{t==null&&(l6+=1,n(`mui-${l6}`))},[t]),r}const c6=jE["useId".toString()];function m4(e){if(c6!==void 0){const t=c6();return e??t}return Wse(e)}function o1({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=R.useRef(e!==void 0),[o,s]=R.useState(t),a=i?e:o,c=R.useCallback(u=>{i||s(u)},[]);return[a,c]}function mo(e){const t=R.useRef(e);return jo(()=>{t.current=e}),R.useCallback((...n)=>(0,t.current)(...n),[])}function Tr(...e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{J$(n,t)})},e)}let DT=!0,Z$=!1,u6;const Gse={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 Vse(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Gse[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function qse(e){e.metaKey||e.altKey||e.ctrlKey||(DT=!0)}function dL(){DT=!1}function Xse(){this.visibilityState==="hidden"&&Z$&&(DT=!0)}function Yse(e){e.addEventListener("keydown",qse,!0),e.addEventListener("mousedown",dL,!0),e.addEventListener("pointerdown",dL,!0),e.addEventListener("touchstart",dL,!0),e.addEventListener("visibilitychange",Xse,!0)}function Kse(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return DT||Vse(t)}function g4(){const e=R.useCallback(i=>{i!=null&&Yse(i.ownerDocument)},[]),t=R.useRef(!1);function n(){return t.current?(Z$=!0,window.clearTimeout(u6),u6=window.setTimeout(()=>{Z$=!1},100),t.current=!1,!0):!1}function r(i){return Kse(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function SX(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let ym;function EX(){if(ym)return ym;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),ym="reverse",e.scrollLeft>0?ym="default":(e.scrollLeft=1,e.scrollLeft===0&&(ym="negative")),document.body.removeChild(e),ym}function Qse(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(EX()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const Jse={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Zse=Jse;function v4(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]=v4(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function At(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const d6=e=>e,eae=()=>{let e=d6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=d6}}},tae=eae(),CX=tae,nae={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ct(e,t,n="Mui"){const r=nae[t];return r?`${n}-${r}`:`${CX.generate(e)}-${t}`}function It(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Ct(e,i,n)}),r}const Mp="$$material";function Ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function TX(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rae=/^((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)-.*))$/,iae=TX(function(e){return rae.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function oae(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ki(yv,--cs):0,Lg--,ii===10&&(Lg=1,NT--),ii}function Ws(){return ii=cs2||a1(ii)>3?"":" "}function yae(e,t){for(;--t&&Ws()&&!(ii<48||ii>102||ii>57&&ii<65||ii>70&&ii<97););return gw(e,JS()+(t<6&&ec()==32&&Ws()==32))}function tF(e){for(;Ws();)switch(ii){case e:return cs;case 34:case 39:e!==34&&e!==39&&tF(ii);break;case 40:e===41&&tF(e);break;case 92:Ws();break}return cs}function bae(e,t){for(;Ws()&&e+ii!==47+10;)if(e+ii===42+42&&ec()===47)break;return"/*"+gw(t,cs-1)+"*"+LT(e===47?e:Ws())}function xae(e){for(;!a1(ec());)Ws();return gw(e,cs)}function wae(e){return OX(eE("",null,null,null,[""],e=PX(e),0,[0],e))}function eE(e,t,n,r,i,o,s,a,c){for(var u=0,f=0,h=s,p=0,g=0,v=0,y=1,S=1,w=1,b=0,x="",E=i,I=o,A=r,k=x;S;)switch(v=b,b=Ws()){case 40:if(v!=108&&Ki(k,h-1)==58){eF(k+=Mn(ZS(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:k+=ZS(b);break;case 9:case 10:case 13:case 32:k+=vae(v);break;case 92:k+=yae(JS()-1,7);continue;case 47:switch(ec()){case 42:case 47:l_(_ae(bae(Ws(),JS()),t,n),c);break;default:k+="/"}break;case 123*y:a[u++]=Gl(k)*w;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:w==-1&&(k=Mn(k,/\f/g,"")),g>0&&Gl(k)-h&&l_(g>32?h6(k+";",r,n,h-1):h6(Mn(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(l_(A=f6(k,t,n,u,f,i,a,x,E=[],I=[],h),o),b===123)if(f===0)eE(k,t,A,A,E,o,h,a,I);else switch(p===99&&Ki(k,3)===110?100:p){case 100:case 108:case 109:case 115:eE(e,A,A,r&&l_(f6(e,A,A,0,0,i,a,x,i,E=[],h),I),i,I,h,a,r?E:I);break;default:eE(k,A,A,A,[""],I,0,a,I)}}u=f=g=0,y=w=1,x=k="",h=s;break;case 58:h=1+Gl(k),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&gae()==125)continue}switch(k+=LT(b),b*y){case 38:w=f>0?1:(k+="\f",-1);break;case 44:a[u++]=(Gl(k)-1)*w,w=1;break;case 64:ec()===45&&(k+=ZS(Ws())),p=ec(),f=h=Gl(x=k+=xae(JS())),b++;break;case 45:v===45&&Gl(k)==2&&(y=0)}}return o}function f6(e,t,n,r,i,o,s,a,c,u,f){for(var h=i-1,p=i===0?o:[""],g=x4(p),v=0,y=0,S=0;v0?p[w]+" "+b:Mn(b,/&\f/g,p[w])))&&(c[S++]=x);return BT(e,t,n,i===0?y4:a,c,u,f)}function _ae(e,t,n){return BT(e,t,n,kX,LT(mae()),s1(e,2,-2),0)}function h6(e,t,n,r){return BT(e,t,n,b4,s1(e,0,r),s1(e,r+1,-1),r)}function pg(e,t){for(var n="",r=x4(e),i=0;i6)switch(Ki(e,t+1)){case 109:if(Ki(e,t+4)!==45)break;case 102:return Mn(e,/(.+:)(.+)-([^]+)/,"$1"+On+"$2-$3$1"+UE+(Ki(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~eF(e,"stretch")?MX(Mn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ki(e,t+1)!==115)break;case 6444:switch(Ki(e,Gl(e)-3-(~eF(e,"!important")&&10))){case 107:return Mn(e,":",":"+On)+e;case 101:return Mn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+On+(Ki(e,14)===45?"inline-":"")+"box$3$1"+On+"$2$3$1"+lo+"$2box$3")+e}break;case 5936:switch(Ki(e,t+11)){case 114:return On+e+lo+Mn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return On+e+lo+Mn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return On+e+lo+Mn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return On+e+lo+e+e}return e}var Pae=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case b4:t.return=MX(t.value,t.length);break;case AX:return pg([vb(t,{value:Mn(t.value,"@","@"+On)})],i);case y4:if(t.length)return pae(t.props,function(o){switch(hae(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pg([vb(t,{props:[Mn(o,/:(read-\w+)/,":"+UE+"$1")]})],i);case"::placeholder":return pg([vb(t,{props:[Mn(o,/:(plac\w+)/,":"+On+"input-$1")]}),vb(t,{props:[Mn(o,/:(plac\w+)/,":"+UE+"$1")]}),vb(t,{props:[Mn(o,/:(plac\w+)/,lo+"input-$1")]})],i)}return""})}},Oae=[Pae],Mae=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Oae,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),w=1;w=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 Qae={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},Jae=/[A-Z]|^ms/g,Zae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zX=function(t){return t.charCodeAt(1)===45},b6=function(t){return t!=null&&typeof t!="boolean"},fL=TX(function(e){return zX(e)?e:e.replace(Jae,"-$&").toLowerCase()}),x6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Zae,function(r,i,o){return Vl={name:i,styles:o,next:Vl},i})}return Qae[t]!==1&&!zX(t)&&typeof n=="number"&&n!==0?n+"px":n};function l1(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 Vl={name:n.name,styles:n.styles,next:Vl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Vl={name:r.name,styles:r.styles,next:Vl},r=r.next;var i=n.styles+";";return i}return ele(e,t,n)}case"function":{if(e!==void 0){var o=Vl,s=n(e);return Vl=o,l1(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function ele(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?ile:ole},E6=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},sle=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return $X(n,r,i),nle(function(){return FX(n,r,i)}),null},ale=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=E6(t,n,r),c=a||S6(i),u=!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(cle(i)?n:i):t;return C.jsx(rle,{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 WX(e,t){return nF(e,t)}const dle=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},fle=["values","unit","step"],hle=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 ple(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ne(e,fle),o=hle(t),s=Object.keys(o);function a(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 u(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:${k4[e]}px)`};function Al(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||C6;return t.reduce((s,a,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||C6;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||k4).indexOf(a)!==-1){const c=o.up(a);s[c]=n(t[a],a)}else{const c=a;s[c]=t[c]}return s},{})}return n(t)}function GX(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function VX(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function vle(e,...t){const n=GX(e),r=[n,...t].reduce((i,o)=>ns(i,o),{});return VX(Object.keys(n),r)}function yle(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 hL({values:e,breakpoints:t,base:n}){const r=n||yle(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,c)=>(Array.isArray(e)?(s[a]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function YT(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 HE(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=YT(e,n)||r,t&&(i=t(i,r,e)),i}function Dn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],c=s.theme,u=YT(c,r)||{};return Al(s,a,h=>{let p=HE(u,i,h);return h===p&&typeof h=="string"&&(p=HE(u,i,`${t}${h==="default"?"":De(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function ble(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const xle={m:"margin",p:"padding"},wle={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},T6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_le=ble(e=>{if(e.length>2)if(T6[e])e=T6[e];else return[e];const[t,n]=e.split(""),r=xle[t],i=wle[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),A4=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],I4=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...A4,...I4];function vw(e,t,n,r){var i;const o=(i=YT(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 R4(e){return vw(e,"spacing",8)}function Dp(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 Sle(e,t){return n=>e.reduce((r,i)=>(r[i]=Dp(t,n),r),{})}function Ele(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=_le(n),o=Sle(i,r),s=e[n];return Al(e,s,o)}function qX(e,t){const n=R4(e.theme);return Object.keys(e).map(r=>Ele(e,t,r,n)).reduce(Ex,{})}function Gr(e){return qX(e,A4)}Gr.propTypes={};Gr.filterProps=A4;function Vr(e){return qX(e,I4)}Vr.propTypes={};Vr.filterProps=I4;function Cle(e=8){if(e.mui)return e;const t=R4({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 KT(...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]?Ex(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Yl(e){return typeof e!="number"?e:`${e}px solid`}const Tle=Dn({prop:"border",themeKey:"borders",transform:Yl}),kle=Dn({prop:"borderTop",themeKey:"borders",transform:Yl}),Ale=Dn({prop:"borderRight",themeKey:"borders",transform:Yl}),Ile=Dn({prop:"borderBottom",themeKey:"borders",transform:Yl}),Rle=Dn({prop:"borderLeft",themeKey:"borders",transform:Yl}),Ple=Dn({prop:"borderColor",themeKey:"palette"}),Ole=Dn({prop:"borderTopColor",themeKey:"palette"}),Mle=Dn({prop:"borderRightColor",themeKey:"palette"}),Dle=Dn({prop:"borderBottomColor",themeKey:"palette"}),Lle=Dn({prop:"borderLeftColor",themeKey:"palette"}),QT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=vw(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Dp(t,r)});return Al(e,e.borderRadius,n)}return null};QT.propTypes={};QT.filterProps=["borderRadius"];KT(Tle,kle,Ale,Ile,Rle,Ple,Ole,Mle,Dle,Lle,QT);const JT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=vw(e.theme,"spacing",8),n=r=>({gap:Dp(t,r)});return Al(e,e.gap,n)}return null};JT.propTypes={};JT.filterProps=["gap"];const ZT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=vw(e.theme,"spacing",8),n=r=>({columnGap:Dp(t,r)});return Al(e,e.columnGap,n)}return null};ZT.propTypes={};ZT.filterProps=["columnGap"];const ek=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=vw(e.theme,"spacing",8),n=r=>({rowGap:Dp(t,r)});return Al(e,e.rowGap,n)}return null};ek.propTypes={};ek.filterProps=["rowGap"];const Nle=Dn({prop:"gridColumn"}),Ble=Dn({prop:"gridRow"}),$le=Dn({prop:"gridAutoFlow"}),Fle=Dn({prop:"gridAutoColumns"}),zle=Dn({prop:"gridAutoRows"}),jle=Dn({prop:"gridTemplateColumns"}),Ule=Dn({prop:"gridTemplateRows"}),Hle=Dn({prop:"gridTemplateAreas"}),Wle=Dn({prop:"gridArea"});KT(JT,ZT,ek,Nle,Ble,$le,Fle,zle,jle,Ule,Hle,Wle);function mg(e,t){return t==="grey"?t:e}const Gle=Dn({prop:"color",themeKey:"palette",transform:mg}),Vle=Dn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mg}),qle=Dn({prop:"backgroundColor",themeKey:"palette",transform:mg});KT(Gle,Vle,qle);function $s(e){return e<=1&&e!==0?`${e*100}%`:e}const Xle=Dn({prop:"width",transform:$s}),P4=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])||k4[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:$s(n)}};return Al(e,e.maxWidth,t)}return null};P4.filterProps=["maxWidth"];const Yle=Dn({prop:"minWidth",transform:$s}),Kle=Dn({prop:"height",transform:$s}),Qle=Dn({prop:"maxHeight",transform:$s}),Jle=Dn({prop:"minHeight",transform:$s});Dn({prop:"size",cssProperty:"width",transform:$s});Dn({prop:"size",cssProperty:"height",transform:$s});const Zle=Dn({prop:"boxSizing"});KT(Xle,P4,Yle,Kle,Qle,Jle,Zle);const ece={border:{themeKey:"borders",transform:Yl},borderTop:{themeKey:"borders",transform:Yl},borderRight:{themeKey:"borders",transform:Yl},borderBottom:{themeKey:"borders",transform:Yl},borderLeft:{themeKey:"borders",transform:Yl},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:QT},color:{themeKey:"palette",transform:mg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mg},backgroundColor:{themeKey:"palette",transform:mg},p:{style:Vr},pt:{style:Vr},pr:{style:Vr},pb:{style:Vr},pl:{style:Vr},px:{style:Vr},py:{style:Vr},padding:{style:Vr},paddingTop:{style:Vr},paddingRight:{style:Vr},paddingBottom:{style:Vr},paddingLeft:{style:Vr},paddingX:{style:Vr},paddingY:{style:Vr},paddingInline:{style:Vr},paddingInlineStart:{style:Vr},paddingInlineEnd:{style:Vr},paddingBlock:{style:Vr},paddingBlockStart:{style:Vr},paddingBlockEnd:{style:Vr},m:{style:Gr},mt:{style:Gr},mr:{style:Gr},mb:{style:Gr},ml:{style:Gr},mx:{style:Gr},my:{style:Gr},margin:{style:Gr},marginTop:{style:Gr},marginRight:{style:Gr},marginBottom:{style:Gr},marginLeft:{style:Gr},marginX:{style:Gr},marginY:{style:Gr},marginInline:{style:Gr},marginInlineStart:{style:Gr},marginInlineEnd:{style:Gr},marginBlock:{style:Gr},marginBlockStart:{style:Gr},marginBlockEnd:{style:Gr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:JT},rowGap:{style:ek},columnGap:{style:ZT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:$s},maxWidth:{style:P4},minWidth:{transform:$s},height:{transform:$s},maxHeight:{transform:$s},minHeight:{transform:$s},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},tk=ece;function tce(...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 nce(e,t){return typeof e=="function"?e(t):e}function rce(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:h}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=YT(i,u)||{};return h?h(s):Al(s,r,v=>{let y=HE(p,f,v);return v===y&&typeof v=="string"&&(y=HE(p,f,`${n}${v==="default"?"":De(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:tk;function a(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=GX(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(u).forEach(g=>{const v=nce(u[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=Ex(p,e(g,v,o,s));else{const y=Al({theme:o},v,S=>({[g]:S}));tce(y,v)?p[g]=t({sx:v,theme:o}):p=Ex(p,y)}else p=Ex(p,e(g,v,o,s))}),VX(h,p)}return Array.isArray(i)?i.map(a):a(i)}return t}const XX=rce();XX.filterProps=["sx"];const nk=XX,ice=["breakpoints","palette","spacing","shape"];function rk(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ne(e,ice),a=ple(n),c=Cle(i);let u=ns({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$({},gle,o)},s);return u=t.reduce((f,h)=>ns(f,h),u),u.unstable_sxConfig=$({},tk,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return nk({sx:h,theme:this})},u}function oce(e){return Object.keys(e).length===0}function ik(e=null){const t=R.useContext(XT);return!t||oce(t)?e:t}const sce=rk();function ok(e=sce){return ik(e)}function ace({styles:e,themeId:t,defaultTheme:n={}}){const r=ok(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(ule,{styles:i})}const lce=["sx"],cce=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:tk;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function O4(e){const{sx:t}=e,n=Ne(e,lce),{systemProps:r,otherProps:i}=cce(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return up(a)?$({},r,a):r}:o=$({},r,t),$({},i,{sx:o})}function YX(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ta!=="theme"&&a!=="sx"&&a!=="as"})(nk);return R.forwardRef(function(c,u){const f=ok(n),h=O4(c),{className:p,component:g="div"}=h,v=Ne(h,uce);return C.jsx(o,$({as:g,ref:u,className:Ue(p,i?i(r):r),theme:t&&f[t]||f},v))})}const fce=["variant"];function k6(e){return e.length===0}function KX(e){const{variant:t}=e,n=Ne(e,fce);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=k6(r)?e[i]:De(e[i]):r+=`${k6(r)?i:De(i)}${De(e[i].toString())}`}),r}const hce=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function pce(e){return Object.keys(e).length===0}function mce(e){return typeof e=="string"&&e.charCodeAt(0)>96}const gce=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,vce=(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=KX(i.props);r[o]=i.style}),r},yce=(e,t,n,r)=>{var i;const{ownerState:o={}}=e,s=[],a=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return a&&a.forEach(c=>{let u=!0;Object.keys(c.props).forEach(f=>{o[f]!==c.props[f]&&e[f]!==c.props[f]&&(u=!1)}),u&&s.push(t[KX(c.props)])}),s};function Cx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const bce=rk(),xce=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function yb({defaultTheme:e,theme:t,themeId:n}){return pce(t)?e:t[n]||t}function wce(e){return e?(t,n)=>n[e]:null}function QX(e={}){const{themeId:t,defaultTheme:n=bce,rootShouldForwardProp:r=Cx,slotShouldForwardProp:i=Cx}=e,o=s=>nk($({},s,{theme:yb($({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{dle(s,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:f,skipSx:h,overridesResolver:p=wce(xce(u))}=a,g=Ne(a,hce),v=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let S,w=Cx;u==="Root"||u==="root"?w=r:u?w=i:mce(s)&&(w=void 0);const b=WX(s,$({shouldForwardProp:w,label:S},g)),x=(E,...I)=>{const A=I?I.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N($({},H,{theme:yb($({},H,{defaultTheme:n,themeId:t}))})):N):[];let k=E;c&&p&&A.push(N=>{const H=yb($({},N,{defaultTheme:n,themeId:t})),G=gce(c,H);if(G){const z={};return Object.entries(G).forEach(([D,F])=>{z[D]=typeof F=="function"?F($({},N,{theme:H})):F}),p(N,z)}return null}),c&&!v&&A.push(N=>{const H=yb($({},N,{defaultTheme:n,themeId:t}));return yce(N,vce(c,H),H,c)}),y||A.push(o);const O=A.length-I.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:yb($({},N,{defaultTheme:n,themeId:t}))})));const L=b(k,...A);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const _ce=QX(),Sce=_ce;function JX(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:v4(t.components[n].defaultProps,r)}function ZX({props:e,name:t,defaultTheme:n,themeId:r}){let i=ok(n);return r&&(i=i[r]||i),JX({theme:i,name:t,props:e})}function M4(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function Ece(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 Lp(e){if(e.type)return e;if(e.charAt(0)==="#")return Lp(Ece(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zd(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(Zd(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function sk(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 Cce(e){e=Lp(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(u,f=(u+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),sk({type:a,values:c})}function rF(e){e=Lp(e);let t=e.type==="hsl"||e.type==="hsla"?Lp(Cce(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 iF(e,t){const n=rF(e),r=rF(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kn(e,t){return e=Lp(e),t=M4(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,sk(e)}function xv(e,t){if(e=Lp(e),t=M4(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 sk(e)}function wv(e,t){if(e=Lp(e),t=M4(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 sk(e)}function Tce(e,t=.15){return rF(e)>.5?xv(e,t):wv(e,t)}const kce=R.createContext(null),eY=kce;function tY(){return R.useContext(eY)}const Ace=typeof Symbol=="function"&&Symbol.for,Ice=Ace?Symbol.for("mui.nested"):"__THEME_NESTED__";function Rce(e,t){return typeof t=="function"?t(e):$({},e,t)}function Pce(e){const{children:t,theme:n}=e,r=tY(),i=R.useMemo(()=>{const o=r===null?n:Rce(r,n);return o!=null&&(o[Ice]=r!==null),o},[n,r]);return C.jsx(eY.Provider,{value:i,children:t})}const A6={};function I6(e,t,n,r=!1){return R.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 Oce(e){const{children:t,theme:n,themeId:r}=e,i=ik(A6),o=tY()||A6,s=I6(r,i,n),a=I6(r,o,n,!0);return C.jsx(Pce,{theme:a,children:C.jsx(XT.Provider,{value:s,children:t})})}const Mce=["component","direction","spacing","divider","children","className","useFlexGap"],Dce=rk(),Lce=Sce("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Nce(e){return ZX({props:e,name:"MuiStack",defaultTheme:Dce})}function Bce(e,t){const n=R.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],Fce=({ownerState:e,theme:t})=>{let n=$({display:"flex",flexDirection:"column"},Al({theme:t},hL({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=R4(t),i=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),o=hL({values:e.direction,base:i}),s=hL({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,u,f)=>{if(!o[c]){const p=u>0?o[f[u-1]]:"column";o[c]=p}}),n=ns(n,Al({theme:t},s,(c,u)=>e.useFlexGap?{gap:Dp(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${$ce(u?o[u]:e.direction)}`]:Dp(r,c)}}))}return n=vle(t.breakpoints,n),n};function zce(e={}){const{createStyledComponent:t=Lce,useThemeProps:n=Nce,componentName:r="MuiStack"}=e,i=()=>At({root:["root"]},c=>Ct(r,c),{}),o=t(Fce);return R.forwardRef(function(c,u){const f=n(c),h=O4(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:w,useFlexGap:b=!1}=h,x=Ne(h,Mce),E={direction:g,spacing:v,useFlexGap:b},I=i();return C.jsx(o,$({as:p,ownerState:E,ref:u,className:Ue(I.root,w)},x,{children:y?Bce(S,y):S}))})}function jce(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Uce=["mode","contrastThreshold","tonalOffset"],R6={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}},pL={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 P6(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=wv(e.main,i):t==="dark"&&(e.dark=xv(e.main,o)))}function Hce(e="light"){return e==="dark"?{main:fd[200],light:fd[50],dark:fd[400]}:{main:fd[700],light:fd[400],dark:fd[800]}}function Wce(e="light"){return e==="dark"?{main:Kh[200],light:Kh[50],dark:Kh[400]}:{main:Kh[500],light:Kh[300],dark:Kh[700]}}function Gce(e="light"){return e==="dark"?{main:dd[500],light:dd[300],dark:dd[700]}:{main:dd[700],light:dd[400],dark:dd[800]}}function Vce(e="light"){return e==="dark"?{main:Qh[400],light:Qh[300],dark:Qh[700]}:{main:Qh[700],light:Qh[500],dark:Qh[900]}}function qce(e="light"){return e==="dark"?{main:hd[400],light:hd[300],dark:hd[700]}:{main:hd[800],light:hd[500],dark:hd[900]}}function Xce(e="light"){return e==="dark"?{main:cp[400],light:cp[300],dark:cp[700]}:{main:"#ed6c02",light:cp[500],dark:cp[900]}}function Yce(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ne(e,Uce),o=e.primary||Hce(t),s=e.secondary||Wce(t),a=e.error||Gce(t),c=e.info||Vce(t),u=e.success||qce(t),f=e.warning||Xce(t);function h(y){return iF(y,pL.text.primary)>=n?pL.text.primary:R6.text.primary}const p=({color:y,name:S,mainShade:w=500,lightShade:b=300,darkShade:x=700})=>{if(y=$({},y),!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(Zd(11,S?` (${S})`:"",w));if(typeof y.main!="string")throw new Error(Zd(12,S?` (${S})`:"",JSON.stringify(y.main)));return P6(y,"light",b,r),P6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:pL,light:R6};return ns($({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:a,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:p4,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const Kce=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Qce(e){return Math.round(e*1e5)/1e5}const O6={textTransform:"uppercase"},M6='"Roboto", "Helvetica", "Arial", sans-serif';function Jce(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=M6,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:f,pxToRem:h}=n,p=Ne(n,Kce),g=i/14,v=h||(w=>`${w/u*g}rem`),y=(w,b,x,E,I)=>$({fontFamily:r,fontWeight:w,fontSize:v(b),lineHeight:x},r===M6?{letterSpacing:`${Qce(E/b)}em`}:{},I,f),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,O6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,O6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ns($({htmlFontSize:u,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:c},S),p,{clone:!1})}const Zce=.2,eue=.14,tue=.12;function wr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Zce})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${eue})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${tue})`].join(",")}const nue=["none",wr(0,2,1,-1,0,1,1,0,0,1,3,0),wr(0,3,1,-2,0,2,2,0,0,1,5,0),wr(0,3,3,-2,0,3,4,0,0,1,8,0),wr(0,2,4,-1,0,4,5,0,0,1,10,0),wr(0,3,5,-1,0,5,8,0,0,1,14,0),wr(0,3,5,-1,0,6,10,0,0,1,18,0),wr(0,4,5,-2,0,7,10,1,0,2,16,1),wr(0,5,5,-3,0,8,10,1,0,3,14,2),wr(0,5,6,-3,0,9,12,1,0,3,16,2),wr(0,6,6,-3,0,10,14,1,0,4,18,3),wr(0,6,7,-4,0,11,15,1,0,4,20,3),wr(0,7,8,-4,0,12,17,2,0,5,22,4),wr(0,7,8,-4,0,13,19,2,0,5,24,4),wr(0,7,9,-4,0,14,21,2,0,5,26,4),wr(0,8,9,-5,0,15,22,2,0,6,28,5),wr(0,8,10,-5,0,16,24,2,0,6,30,5),wr(0,8,11,-5,0,17,26,2,0,6,32,5),wr(0,9,11,-5,0,18,28,2,0,7,34,6),wr(0,9,12,-6,0,19,29,2,0,7,36,6),wr(0,10,13,-6,0,20,31,3,0,8,38,7),wr(0,10,13,-6,0,21,33,3,0,8,40,7),wr(0,10,14,-6,0,22,35,3,0,8,42,7),wr(0,11,14,-7,0,23,36,3,0,9,44,8),wr(0,11,15,-7,0,24,38,3,0,9,46,8)],rue=nue,iue=["duration","easing","delay"],oue={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)"},nY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function D6(e){return`${Math.round(e)}ms`}function sue(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function aue(e){const t=$({},oue,e.easing),n=$({},nY,e.duration);return $({getAutoHeightDuration:sue,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:c=0}=o;return Ne(o,iue),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:D6(s)} ${a} ${typeof c=="string"?c:D6(c)}`).join(",")}},e,{easing:t,duration:n})}const lue={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},cue=lue,uue=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function D4(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ne(e,uue);if(e.vars)throw new Error(Zd(18));const a=Yce(r),c=rk(e);let u=ns(c,{mixins:jce(c.breakpoints,n),palette:a,shadows:rue.slice(),typography:Jce(a,o),transitions:aue(i),zIndex:$({},cue)});return u=ns(u,s),u=t.reduce((f,h)=>ns(f,h),u),u.unstable_sxConfig=$({},tk,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return nk({sx:h,theme:this})},u}const due=D4(),ak=due;function Ln(){const e=ok(ak);return e[Mp]||e}function Rt({props:e,name:t}){return ZX({props:e,name:t,defaultTheme:ak,themeId:Mp})}const Da=e=>Cx(e)&&e!=="classes",L4=Cx,fue=QX({themeId:Mp,defaultTheme:ak,rootShouldForwardProp:Da}),Ce=fue,hue=["theme"];function pue(e){let{theme:t}=e,n=Ne(e,hue);const r=t[Mp];return C.jsx(Oce,$({},n,{themeId:r?Mp:void 0,theme:r||t}))}const mue=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},L6=mue;function gue(e){return Ct("MuiSvgIcon",e)}It("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const vue=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],yue=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return At(i,gue,r)},bue=Ce("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,c,u,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:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((u=e.typography)==null||(f=u.pxToRem)==null?void 0:f.call(u,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]}}),rY=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Ne(r,vue),v=R.isValidElement(i)&&i.type==="svg",y=$({},r,{color:s,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const w=yue(y);return C.jsxs(bue,$({as:a,className:Ue(w.root,o),focusable:"false",color:u,"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]}))});rY.muiName="SvgIcon";const N6=rY;function Ft(e,t){function n(r,i){return C.jsx(N6,$({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=N6.muiName,R.memo(R.forwardRef(n))}var Xn={};/** - * @license React - * 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 N4=Symbol.for("react.element"),B4=Symbol.for("react.portal"),lk=Symbol.for("react.fragment"),ck=Symbol.for("react.strict_mode"),uk=Symbol.for("react.profiler"),dk=Symbol.for("react.provider"),fk=Symbol.for("react.context"),xue=Symbol.for("react.server_context"),hk=Symbol.for("react.forward_ref"),pk=Symbol.for("react.suspense"),mk=Symbol.for("react.suspense_list"),gk=Symbol.for("react.memo"),vk=Symbol.for("react.lazy"),wue=Symbol.for("react.offscreen"),iY;iY=Symbol.for("react.module.reference");function La(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case N4:switch(e=e.type,e){case lk:case uk:case ck:case pk:case mk:return e;default:switch(e=e&&e.$$typeof,e){case xue:case fk:case hk:case vk:case gk:case dk:return e;default:return t}}case B4:return t}}}Xn.ContextConsumer=fk;Xn.ContextProvider=dk;Xn.Element=N4;Xn.ForwardRef=hk;Xn.Fragment=lk;Xn.Lazy=vk;Xn.Memo=gk;Xn.Portal=B4;Xn.Profiler=uk;Xn.StrictMode=ck;Xn.Suspense=pk;Xn.SuspenseList=mk;Xn.isAsyncMode=function(){return!1};Xn.isConcurrentMode=function(){return!1};Xn.isContextConsumer=function(e){return La(e)===fk};Xn.isContextProvider=function(e){return La(e)===dk};Xn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===N4};Xn.isForwardRef=function(e){return La(e)===hk};Xn.isFragment=function(e){return La(e)===lk};Xn.isLazy=function(e){return La(e)===vk};Xn.isMemo=function(e){return La(e)===gk};Xn.isPortal=function(e){return La(e)===B4};Xn.isProfiler=function(e){return La(e)===uk};Xn.isStrictMode=function(e){return La(e)===ck};Xn.isSuspense=function(e){return La(e)===pk};Xn.isSuspenseList=function(e){return La(e)===mk};Xn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lk||e===uk||e===ck||e===pk||e===mk||e===wue||typeof e=="object"&&e!==null&&(e.$$typeof===vk||e.$$typeof===gk||e.$$typeof===dk||e.$$typeof===fk||e.$$typeof===hk||e.$$typeof===iY||e.getModuleId!==void 0)};Xn.typeOf=La;function oF(e,t){return oF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oF(e,t)}function yk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oF(e,t)}var oY={exports:{}},oa={},sY={exports:{}},aY={};/** - * @license React - * scheduler.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. - */(function(e){function t(W,K){var X=W.length;W.push(K);e:for(;0>>1,ie=W[Q];if(0>>1;Qi(se,X))Ji(ae,se)?(W[Q]=ae,W[J]=X,Q=J):(W[Q]=se,W[ue]=X,Q=ue);else if(Ji(ae,X))W[Q]=ae,W[J]=X,Q=J;else break e}}return K}function i(W,K){var X=W.sortIndex-K.sortIndex;return X!==0?X:W.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],f=1,h=null,p=3,g=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(W){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=W)r(u),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(u)}}function E(W){if(y=!1,x(W),!v)if(n(c)!==null)v=!0,j(I);else{var K=n(u);K!==null&&V(E,K.startTime-W)}}function I(W,K){v=!1,y&&(y=!1,w(O),O=-1),g=!0;var X=p;try{for(x(K),h=n(c);h!==null&&(!(h.expirationTime>K)||W&&!H());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,p=h.priorityLevel;var ie=Q(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(u);ue!==null&&V(E,ue.startTime-K),ce=!1}return ce}finally{h=null,p=X,g=!1}}var A=!1,k=null,O=-1,L=5,N=-1;function H(){return!(e.unstable_now()-NW||125Q?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(y?(w(O),O=-1):y=!0,V(E,X-Q))):(W.sortIndex=ie,t(c,W),v||g||(v=!0,j(I))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var K=p;return function(){var X=p;p=K;try{return W.apply(this,arguments)}finally{p=X}}}})(aY);sY.exports=aY;var _ue=sY.exports;/** - * @license React - * react-dom.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 lY=R,Zs=_ue;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sF=Object.prototype.hasOwnProperty,Sue=/^[: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]*$/,B6={},$6={};function Eue(e){return sF.call($6,e)?!0:sF.call(B6,e)?!1:Sue.test(e)?$6[e]=!0:(B6[e]=!0,!1)}function Cue(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 Tue(e,t,n,r){if(t===null||typeof t>"u"||Cue(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ho(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var io={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){io[e]=new Ho(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];io[t]=new Ho(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){io[e]=new Ho(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){io[e]=new Ho(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){io[e]=new Ho(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){io[e]=new Ho(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){io[e]=new Ho(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){io[e]=new Ho(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){io[e]=new Ho(e,5,!1,e.toLowerCase(),null,!1,!1)});var $4=/[\-:]([a-z])/g;function F4(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($4,F4);io[t]=new Ho(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($4,F4);io[t]=new Ho(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($4,F4);io[t]=new Ho(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){io[e]=new Ho(e,1,!1,e.toLowerCase(),null,!1,!1)});io.xlinkHref=new Ho("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){io[e]=new Ho(e,1,!1,e.toLowerCase(),null,!0,!0)});function z4(e,t,n,r){var i=io.hasOwnProperty(t)?io[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var c=` -`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{gL=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nx(e):""}function kue(e){switch(e.tag){case 5:return nx(e.type);case 16:return nx("Lazy");case 13:return nx("Suspense");case 19:return nx("SuspenseList");case 0:case 2:case 15:return e=vL(e.type,!1),e;case 11:return e=vL(e.type.render,!1),e;case 1:return e=vL(e.type,!0),e;default:return""}}function uF(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 Gm:return"Fragment";case Wm:return"Portal";case aF:return"Profiler";case j4:return"StrictMode";case lF:return"Suspense";case cF:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dY:return(e.displayName||"Context")+".Consumer";case uY:return(e._context.displayName||"Context")+".Provider";case U4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H4:return t=e.displayName||null,t!==null?t:uF(e.type)||"Memo";case pd:t=e._payload,e=e._init;try{return uF(e(t))}catch{}}return null}function Aue(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 uF(t);case 8:return t===j4?"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 ef(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hY(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Iue(e){var t=hY(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 u_(e){e._valueTracker||(e._valueTracker=Iue(e))}function pY(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hY(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function WE(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 dF(e,t){var n=t.checked;return jr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function z6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ef(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 mY(e,t){t=t.checked,t!=null&&z4(e,"checked",t,!1)}function fF(e,t){mY(e,t);var n=ef(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")?hF(e,t.type,n):t.hasOwnProperty("defaultValue")&&hF(e,t.type,ef(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function j6(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 hF(e,t,n){(t!=="number"||WE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rx=Array.isArray;function gg(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=d_.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function u1(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tx={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},Rue=["Webkit","ms","Moz","O"];Object.keys(Tx).forEach(function(e){Rue.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tx[t]=Tx[e]})});function bY(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tx.hasOwnProperty(e)&&Tx[e]?(""+t).trim():t+"px"}function xY(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bY(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Pue=jr({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 gF(e,t){if(t){if(Pue[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function vF(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 yF=null;function W4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bF=null,vg=null,yg=null;function W6(e){if(e=xw(e)){if(typeof bF!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=Sk(t),bF(e.stateNode,e.type,t))}}function wY(e){vg?yg?yg.push(e):yg=[e]:vg=e}function _Y(){if(vg){var e=vg,t=yg;if(yg=vg=null,W6(e),t)for(e=0;e>>=0,e===0?32:31-(Uue(e)/Hue|0)|0}var f_=64,h_=4194304;function ix(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 XE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=ix(a):(o&=s,o!==0&&(r=ix(o)))}else s=n&~i,s!==0?r=ix(s):o!==0&&(r=ix(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 yw(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xl(t),e[t]=n}function que(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=Ax),Z6=String.fromCharCode(32),e8=!1;function UY(e,t){switch(e){case"keyup":return wde.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vm=!1;function Sde(e,t){switch(e){case"compositionend":return HY(t);case"keypress":return t.which!==32?null:(e8=!0,Z6);case"textInput":return e=t.data,e===Z6&&e8?null:e;default:return null}}function Ede(e,t){if(Vm)return e==="compositionend"||!J4&&UY(e,t)?(e=zY(),nE=Y4=kd=null,Vm=!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=i8(n)}}function qY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function XY(){for(var e=window,t=WE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=WE(e.document)}return t}function Z4(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 Mde(e){var t=XY(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qY(n.ownerDocument.documentElement,n)){if(r!==null&&Z4(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=o8(n,o);var s=o8(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,qm=null,CF=null,Rx=null,TF=!1;function s8(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;TF||qm==null||qm!==WE(r)||(r=qm,"selectionStart"in r&&Z4(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}),Rx&&g1(Rx,r)||(Rx=r,r=QE(CF,"onSelect"),0Km||(e.current=OF[Km],OF[Km]=null,Km--)}function ur(e,t){Km++,OF[Km]=e.current,e.current=t}var tf={},yo=mf(tf),rs=mf(!1),Np=tf;function Bg(e,t){var n=e.type.contextTypes;if(!n)return tf;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 is(e){return e=e.childContextTypes,e!=null}function ZE(){xr(rs),xr(yo)}function h8(e,t,n){if(yo.current!==tf)throw Error(Me(168));ur(yo,t),ur(rs,n)}function rK(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Me(108,Aue(e)||"Unknown",i));return jr({},n,r)}function eC(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tf,Np=yo.current,ur(yo,e),ur(rs,rs.current),!0}function p8(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=rK(e,t,Np),r.__reactInternalMemoizedMergedChildContext=e,xr(rs),xr(yo),ur(yo,e)):xr(rs),ur(rs,n)}var wu=null,Ek=!1,PL=!1;function iK(e){wu===null?wu=[e]:wu.push(e)}function Gde(e){Ek=!0,iK(e)}function gf(){if(!PL&&wu!==null){PL=!0;var e=0,t=jn;try{var n=wu;for(jn=1;e>=s,i-=s,Cu=1<<32-xl(t)+i|n<O?(L=k,k=null):L=k.sibling;var N=p(w,k,x[O],E);if(N===null){k===null&&(k=L);break}e&&k&&N.alternate===null&&t(w,k),b=o(N,b,O),A===null?I=N:A.sibling=N,A=N,k=L}if(O===x.length)return n(w,k),_r&&Jh(w,O),I;if(k===null){for(;OO?(L=k,k=null):L=k.sibling;var H=p(w,k,N.value,E);if(H===null){k===null&&(k=L);break}e&&k&&H.alternate===null&&t(w,k),b=o(H,b,O),A===null?I=H:A.sibling=H,A=H,k=L}if(N.done)return n(w,k),_r&&Jh(w,O),I;if(k===null){for(;!N.done;O++,N=x.next())N=h(w,N.value,E),N!==null&&(b=o(N,b,O),A===null?I=N:A.sibling=N,A=N);return _r&&Jh(w,O),I}for(k=r(w,k);!N.done;O++,N=x.next())N=g(k,w,O,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?O:N.key),b=o(N,b,O),A===null?I=N:A.sibling=N,A=N);return e&&k.forEach(function(G){return t(w,G)}),_r&&Jh(w,O),I}function S(w,b,x,E){if(typeof x=="object"&&x!==null&&x.type===Gm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case c_:e:{for(var I=x.key,A=b;A!==null;){if(A.key===I){if(I=x.type,I===Gm){if(A.tag===7){n(w,A.sibling),b=i(A,x.props.children),b.return=w,w=b;break e}}else if(A.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===pd&&w8(I)===A.type){n(w,A.sibling),b=i(A,x.props),b.ref=Eb(w,A,x),b.return=w,w=b;break e}n(w,A);break}else t(w,A);A=A.sibling}x.type===Gm?(b=Sp(x.props.children,w.mode,E,x.key),b.return=w,w=b):(E=uE(x.type,x.key,x.props,null,w.mode,E),E.ref=Eb(w,b,x),E.return=w,w=E)}return s(w);case Wm:e:{for(A=x.key;b!==null;){if(b.key===A)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(w,b.sibling),b=i(b,x.children||[]),b.return=w,w=b;break e}else{n(w,b);break}else t(w,b);b=b.sibling}b=FL(x,w.mode,E),b.return=w,w=b}return s(w);case pd:return A=x._init,S(w,b,A(x._payload),E)}if(rx(x))return v(w,b,x,E);if(bb(x))return y(w,b,x,E);x_(w,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(w,b.sibling),b=i(b,x),b.return=w,w=b):(n(w,b),b=$L(x,w.mode,E),b.return=w,w=b),s(w)):n(w,b)}return S}var Fg=fK(!0),hK=fK(!1),ww={},nc=mf(ww),x1=mf(ww),w1=mf(ww);function pp(e){if(e===ww)throw Error(Me(174));return e}function lz(e,t){switch(ur(w1,t),ur(x1,e),ur(nc,ww),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mF(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mF(t,e)}xr(nc),ur(nc,t)}function zg(){xr(nc),xr(x1),xr(w1)}function pK(e){pp(w1.current);var t=pp(nc.current),n=mF(t,e.type);t!==n&&(ur(x1,e),ur(nc,n))}function cz(e){x1.current===e&&(xr(nc),xr(x1))}var Nr=mf(0);function sC(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 OL=[];function uz(){for(var e=0;en?n:4,e(!0);var r=ML.transition;ML.transition={};try{e(!1),t()}finally{jn=n,ML.transition=r}}function RK(){return Pa().memoizedState}function Yde(e,t,n){var r=Hd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},PK(e))OK(t,n);else if(n=lK(e,t,n,r),n!==null){var i=zo();wl(n,e,r,i),MK(n,t,r)}}function Kde(e,t,n){var r=Hd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(PK(e))OK(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Il(a,s)){var c=t.interleaved;c===null?(i.next=i,sz(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=lK(e,t,i,r),n!==null&&(i=zo(),wl(n,e,r,i),MK(n,t,r))}}function PK(e){var t=e.alternate;return e===zr||t!==null&&t===zr}function OK(e,t){Px=aC=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function MK(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,V4(e,n)}}var lC={readContext:Ra,useCallback:so,useContext:so,useEffect:so,useImperativeHandle:so,useInsertionEffect:so,useLayoutEffect:so,useMemo:so,useReducer:so,useRef:so,useState:so,useDebugValue:so,useDeferredValue:so,useTransition:so,useMutableSource:so,useSyncExternalStore:so,useId:so,unstable_isNewReconciler:!1},Qde={readContext:Ra,useCallback:function(e,t){return Hl().memoizedState=[e,t===void 0?null:t],e},useContext:Ra,useEffect:S8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sE(4194308,4,CK.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sE(4194308,4,e,t)},useInsertionEffect:function(e,t){return sE(4,2,e,t)},useMemo:function(e,t){var n=Hl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hl();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=Yde.bind(null,zr,e),[r.memoizedState,e]},useRef:function(e){var t=Hl();return e={current:e},t.memoizedState=e},useState:_8,useDebugValue:mz,useDeferredValue:function(e){return Hl().memoizedState=e},useTransition:function(){var e=_8(!1),t=e[0];return e=Xde.bind(null,e[1]),Hl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=zr,i=Hl();if(_r){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),Pi===null)throw Error(Me(349));$p&30||vK(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,S8(bK.bind(null,r,o,e),[e]),r.flags|=2048,E1(9,yK.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Hl(),t=Pi.identifierPrefix;if(_r){var n=Tu,r=Cu;n=(r&~(1<<32-xl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_1++,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[Kl]=t,e[b1]=r,UK(e,t,!1,!1),t.stateNode=e;e:{switch(s=vF(n,r),n){case"dialog":br("cancel",e),br("close",e),i=r;break;case"iframe":case"object":case"embed":br("load",e),i=r;break;case"video":case"audio":for(i=0;iUg&&(t.flags|=128,r=!0,Cb(o,!1),t.lanes=4194304)}else{if(!r)if(e=sC(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cb(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!_r)return ao(t),null}else 2*ei()-o.renderingStartTime>Ug&&n!==1073741824&&(t.flags|=128,r=!0,Cb(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ei(),t.sibling=null,n=Nr.current,ur(Nr,r?n&1|2:n&1),t):(ao(t),null);case 22:case 23:return wz(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ns&1073741824&&(ao(t),t.subtreeFlags&6&&(t.flags|=8192)):ao(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function ofe(e,t){switch(tz(t),t.tag){case 1:return is(t.type)&&ZE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zg(),xr(rs),xr(yo),uz(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cz(t),null;case 13:if(xr(Nr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));$g()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xr(Nr),null;case 4:return zg(),null;case 10:return oz(t.type._context),null;case 22:case 23:return wz(),null;case 24:return null;default:return null}}var __=!1,uo=!1,sfe=typeof WeakSet=="function"?WeakSet:Set,lt=null;function eg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xr(e,t,r)}else n.current=null}function WF(e,t,n){try{n()}catch(r){Xr(e,t,r)}}var O8=!1;function afe(e,t){if(kF=YE,e=XY(),Z4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,f=0,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(a=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&&++u===i&&(a=s),p===o&&++f===r&&(c=s),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(AF={focusedElem:e,selectionRange:n},YE=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){t=lt;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?y:al(t.type,y),S);w.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(E){Xr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}return v=O8,O8=!1,v}function Ox(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&&WF(t,n,o)}i=i.next}while(i!==r)}}function kk(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 GF(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 GK(e){var t=e.alternate;t!==null&&(e.alternate=null,GK(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kl],delete t[b1],delete t[PF],delete t[Hde],delete t[Wde])),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 VK(e){return e.tag===5||e.tag===3||e.tag===4}function M8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VK(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 VF(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=JE));else if(r!==4&&(e=e.child,e!==null))for(VF(e,t,n),e=e.sibling;e!==null;)VF(e,t,n),e=e.sibling}function qF(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(qF(e,t,n),e=e.sibling;e!==null;)qF(e,t,n),e=e.sibling}var Xi=null,cl=!1;function rd(e,t,n){for(n=n.child;n!==null;)qK(e,t,n),n=n.sibling}function qK(e,t,n){if(tc&&typeof tc.onCommitFiberUnmount=="function")try{tc.onCommitFiberUnmount(bk,n)}catch{}switch(n.tag){case 5:uo||eg(n,t);case 6:var r=Xi,i=cl;Xi=null,rd(e,t,n),Xi=r,cl=i,Xi!==null&&(cl?(e=Xi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Xi.removeChild(n.stateNode));break;case 18:Xi!==null&&(cl?(e=Xi,n=n.stateNode,e.nodeType===8?RL(e.parentNode,n):e.nodeType===1&&RL(e,n),p1(e)):RL(Xi,n.stateNode));break;case 4:r=Xi,i=cl,Xi=n.stateNode.containerInfo,cl=!0,rd(e,t,n),Xi=r,cl=i;break;case 0:case 11:case 14:case 15:if(!uo&&(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)&&WF(n,t,s),i=i.next}while(i!==r)}rd(e,t,n);break;case 1:if(!uo&&(eg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Xr(n,t,a)}rd(e,t,n);break;case 21:rd(e,t,n);break;case 22:n.mode&1?(uo=(r=uo)||n.memoizedState!==null,rd(e,t,n),uo=r):rd(e,t,n);break;default:rd(e,t,n)}}function D8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sfe),t.forEach(function(r){var i=gfe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Za(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ei()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cfe(r/1960))-r,10e?16:e,Ad===null)var r=!1;else{if(e=Ad,Ad=null,dC=0,Tn&6)throw Error(Me(331));var i=Tn;for(Tn|=4,lt=e.current;lt!==null;){var o=lt,s=o.child;if(lt.flags&16){var a=o.deletions;if(a!==null){for(var c=0;cei()-bz?_p(e,0):yz|=n),os(e,t)}function tQ(e,t){t===0&&(e.mode&1?(t=h_,h_<<=1,!(h_&130023424)&&(h_=4194304)):t=1);var n=zo();e=Fu(e,t),e!==null&&(yw(e,t,n),os(e,n))}function mfe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tQ(e,n)}function gfe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),tQ(e,n)}var nQ;nQ=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rs.current)es=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return es=!1,rfe(e,t,n);es=!!(e.flags&131072)}else es=!1,_r&&t.flags&1048576&&oK(t,nC,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;aE(e,t),e=t.pendingProps;var i=Bg(t,yo.current);xg(t,n),i=fz(null,t,r,e,i,n);var o=hz();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,is(r)?(o=!0,eC(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,az(t),i.updater=Ck,t.stateNode=i,i._reactInternals=t,BF(t,r,e,n),t=zF(null,t,r,!0,o,n)):(t.tag=0,_r&&o&&ez(t),Lo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(aE(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=yfe(r),e=al(r,e),i){case 0:t=FF(null,t,r,e,n);break e;case 1:t=I8(null,t,r,e,n);break e;case 11:t=k8(null,t,r,e,n);break e;case 14:t=A8(null,t,r,al(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:al(r,i),FF(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:al(r,i),I8(e,t,r,i,n);case 3:e:{if(FK(t),e===null)throw Error(Me(387));r=t.pendingProps,o=t.memoizedState,i=o.element,cK(e,t),oC(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=jg(Error(Me(423)),t),t=R8(e,t,r,n,i);break e}else if(r!==i){i=jg(Error(Me(424)),t),t=R8(e,t,r,n,i);break e}else for(js=zd(t.stateNode.containerInfo.firstChild),Gs=t,_r=!0,dl=null,n=hK(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($g(),r===i){t=zu(e,t,n);break e}Lo(e,t,r,n)}t=t.child}return t;case 5:return pK(t),e===null&&DF(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,IF(r,i)?s=null:o!==null&&IF(r,o)&&(t.flags|=32),$K(e,t),Lo(e,t,s,n),t.child;case 6:return e===null&&DF(t),null;case 13:return zK(e,t,n);case 4:return lz(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fg(t,null,r,n):Lo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:al(r,i),k8(e,t,r,i,n);case 7:return Lo(e,t,t.pendingProps,n),t.child;case 8:return Lo(e,t,t.pendingProps.children,n),t.child;case 12:return Lo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,ur(rC,r._currentValue),r._currentValue=s,o!==null)if(Il(o.value,s)){if(o.children===i.children&&!rs.current){t=zu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ru(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),LF(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Me(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),LF(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Lo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xg(t,n),i=Ra(i),r=r(i),t.flags|=1,Lo(e,t,r,n),t.child;case 14:return r=t.type,i=al(r,t.pendingProps),i=al(r.type,i),A8(e,t,r,i,n);case 15:return NK(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:al(r,i),aE(e,t),t.tag=1,is(r)?(e=!0,eC(t)):e=!1,xg(t,n),dK(t,r,i),BF(t,r,i,n),zF(null,t,r,!0,e,n);case 19:return jK(e,t,n);case 22:return BK(e,t,n)}throw Error(Me(156,t.tag))};function rQ(e,t){return IY(e,t)}function vfe(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 ya(e,t,n,r){return new vfe(e,t,n,r)}function Sz(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yfe(e){if(typeof e=="function")return Sz(e)?1:0;if(e!=null){if(e=e.$$typeof,e===U4)return 11;if(e===H4)return 14}return 2}function Wd(e,t){var n=e.alternate;return n===null?(n=ya(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 uE(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Sz(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gm:return Sp(n.children,i,o,t);case j4:s=8,i|=8;break;case aF:return e=ya(12,n,t,i|2),e.elementType=aF,e.lanes=o,e;case lF:return e=ya(13,n,t,i),e.elementType=lF,e.lanes=o,e;case cF:return e=ya(19,n,t,i),e.elementType=cF,e.lanes=o,e;case fY:return Ik(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uY:s=10;break e;case dY:s=9;break e;case U4:s=11;break e;case H4:s=14;break e;case pd:s=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=ya(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Sp(e,t,n,r){return e=ya(7,e,r,t),e.lanes=n,e}function Ik(e,t,n,r){return e=ya(22,e,r,t),e.elementType=fY,e.lanes=n,e.stateNode={isHidden:!1},e}function $L(e,t,n){return e=ya(6,e,null,t),e.lanes=n,e}function FL(e,t,n){return t=ya(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bfe(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=bL(0),this.expirationTimes=bL(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bL(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ez(e,t,n,r,i,o,s,a,c){return e=new bfe(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ya(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},az(o),e}function xfe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aQ)}catch(e){console.error(e)}}aQ(),oY.exports=oa;var Ev=oY.exports;const ng=ds(Ev),U8={disabled:!1},pC=de.createContext(null);var Cfe=function(t){return t.scrollTop},sx="unmounted",ep="exited",tp="entering",Om="entered",JF="exiting",Yu=function(e){yk(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?a?(c=ep,o.appearStatus=tp):c=Om:r.unmountOnExit||r.mountOnEnter?c=sx:c=ep,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===sx?{status:ep}: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!==tp&&s!==Om&&(o=tp):(s===tp||s===Om)&&(o=JF)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===tp){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ng.findDOMNode(this);s&&Cfe(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ep&&this.setState({status:sx})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,c=this.props.nodeRef?[a]:[ng.findDOMNode(this),a],u=c[0],f=c[1],h=this.getTimeouts(),p=a?h.appear:h.enter;if(!i&&!s||U8.disabled){this.safeSetState({status:Om},function(){o.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:tp},function(){o.props.onEntering(u,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Om},function(){o.props.onEntered(u,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:ng.findDOMNode(this);if(!o||U8.disabled){this.safeSetState({status:ep},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:JF},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ep},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:ng.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],f=c[1];this.props.addEndListener(u,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sx)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ne(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return de.createElement(pC.Provider,{value:null},typeof s=="function"?s(i,a):de.cloneElement(de.Children.only(s),a))},t}(de.Component);Yu.contextType=pC;Yu.propTypes={};function xm(){}Yu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xm,onEntering:xm,onEntered:xm,onExit:xm,onExiting:xm,onExited:xm};Yu.UNMOUNTED=sx;Yu.EXITED=ep;Yu.ENTERING=tp;Yu.ENTERED=Om;Yu.EXITING=JF;const Az=Yu;function Tfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iz(e,t){var n=function(o){return t&&R.isValidElement(o)?t(o):o},r=Object.create(null);return e&&R.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function kfe(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,a={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function Hg(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 Mfe(e){return Ct("MuiCollapse",e)}It("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Dfe=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Lfe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return At(r,Mfe,n)},Nfe=Ce("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>$({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&$({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),Bfe=Ce("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>$({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),$fe=Ce("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>$({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),cQ=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:c,easing:u,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:w="vertical",style:b,timeout:x=nY.standard,TransitionComponent:E=Az}=r,I=Ne(r,Dfe),A=$({},r,{orientation:w,collapsedSize:a}),k=Lfe(A),O=Ln(),L=R.useRef(),N=R.useRef(null),H=R.useRef(),G=typeof a=="number"?`${a}px`:a,z=w==="horizontal",D=z?"width":"height";R.useEffect(()=>()=>{clearTimeout(L.current)},[]);const F=R.useRef(null),j=Tr(n,F),V=J=>ae=>{if(J){const le=F.current;ae===void 0?J(le):J(le,ae)}},W=()=>N.current?N.current[z?"clientWidth":"clientHeight"]:0,K=V((J,ae)=>{N.current&&z&&(N.current.style.position="absolute"),J.style[D]=G,h&&h(J,ae)}),X=V((J,ae)=>{const le=W();N.current&&z&&(N.current.style.position="");const{duration:he,easing:pe}=Hg({style:b,timeout:x,easing:u},{mode:"enter"});if(x==="auto"){const ve=O.transitions.getAutoHeightDuration(le);J.style.transitionDuration=`${ve}ms`,H.current=ve}else J.style.transitionDuration=typeof he=="string"?he:`${he}ms`;J.style[D]=`${le}px`,J.style.transitionTimingFunction=pe,g&&g(J,ae)}),Q=V((J,ae)=>{J.style[D]="auto",p&&p(J,ae)}),ie=V(J=>{J.style[D]=`${W()}px`,v&&v(J)}),ce=V(y),ue=V(J=>{const ae=W(),{duration:le,easing:he}=Hg({style:b,timeout:x,easing:u},{mode:"exit"});if(x==="auto"){const pe=O.transitions.getAutoHeightDuration(ae);J.style.transitionDuration=`${pe}ms`,H.current=pe}else J.style.transitionDuration=typeof le=="string"?le:`${le}ms`;J.style[D]=G,J.style.transitionTimingFunction=he,S&&S(J)}),se=J=>{x==="auto"&&(L.current=setTimeout(J,H.current||0)),i&&i(F.current,J)};return C.jsx(E,$({in:f,onEnter:K,onEntered:Q,onEntering:X,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:F,timeout:x==="auto"?null:x},I,{children:(J,ae)=>C.jsx(Nfe,$({as:c,className:Ue(k.root,s,{entered:k.entered,exited:!f&&G==="0px"&&k.hidden}[J]),style:$({[z?"minWidth":"minHeight"]:G},b),ownerState:$({},A,{state:J}),ref:j},ae,{children:C.jsx(Bfe,{ownerState:$({},A,{state:J}),className:k.wrapper,ref:N,children:C.jsx($fe,{ownerState:$({},A,{state:J}),className:k.wrapperInner,children:o})})}))}))});cQ.muiSupportAuto=!0;const zL=cQ;function Ffe(e){return Ct("MuiPaper",e)}It("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 zfe=["className","component","elevation","square","variant"],jfe=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return At(o,Ffe,i)},Ufe=Ce("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return $({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&$({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${kn("#fff",L6(t.elevation))}, ${kn("#fff",L6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),Hfe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:c="elevation"}=r,u=Ne(r,zfe),f=$({},r,{component:o,elevation:s,square:a,variant:c}),h=jfe(f);return C.jsx(Ufe,$({as:o,ownerState:f,className:Ue(h.root,i),ref:n},u))}),Cv=Hfe;function Wfe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:c,timeout:u}=e,[f,h]=R.useState(!1),p=Ue(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=Ue(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&h(!0),R.useEffect(()=>{if(!a&&c!=null){const y=setTimeout(c,u);return()=>{clearTimeout(y)}}},[c,a,u]),C.jsx("span",{className:p,style:g,children:C.jsx("span",{className:v})})}const Gfe=It("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fa=Gfe,Vfe=["center","classes","className"];let Dk=e=>e,H8,W8,G8,V8;const ZF=550,qfe=80,Xfe=hf(H8||(H8=Dk` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),Yfe=hf(W8||(W8=Dk` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),Kfe=hf(G8||(G8=Dk` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),Qfe=Ce("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Jfe=Ce(Wfe,{name:"MuiTouchRipple",slot:"Ripple"})(V8||(V8=Dk` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),fa.rippleVisible,Xfe,ZF,({theme:e})=>e.transitions.easing.easeInOut,fa.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,fa.child,fa.childLeaving,Yfe,ZF,({theme:e})=>e.transitions.easing.easeInOut,fa.childPulsate,Kfe,({theme:e})=>e.transitions.easing.easeInOut),Zfe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ne(r,Vfe),[c,u]=R.useState([]),f=R.useRef(0),h=R.useRef(null);R.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=R.useRef(!1),g=R.useRef(0),v=R.useRef(null),y=R.useRef(null);R.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=R.useCallback(E=>{const{pulsate:I,rippleX:A,rippleY:k,rippleSize:O,cb:L}=E;u(N=>[...N,C.jsx(Jfe,{classes:{ripple:Ue(o.ripple,fa.ripple),rippleVisible:Ue(o.rippleVisible,fa.rippleVisible),ripplePulsate:Ue(o.ripplePulsate,fa.ripplePulsate),child:Ue(o.child,fa.child),childLeaving:Ue(o.childLeaving,fa.childLeaving),childPulsate:Ue(o.childPulsate,fa.childPulsate)},timeout:ZF,pulsate:I,rippleX:A,rippleY:k,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),w=R.useCallback((E={},I={},A=()=>{})=>{const{pulsate:k=!1,center:O=i||I.pulsate,fakeElement:L=!1}=I;if((E==null?void 0:E.type)==="mousedown"&&p.current){p.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(p.current=!0);const N=L?null:y.current,H=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let G,z,D;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)G=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;G=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)-G),G)*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:G,rippleY:z,rippleSize:D,cb:A})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},qfe)):S({pulsate:k,rippleX:G,rippleY:z,rippleSize:D,cb:A})},[i,S]),b=R.useCallback(()=>{w({},{pulsate:!0})},[w]),x=R.useCallback((E,I)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,I)});return}v.current=null,u(A=>A.length>0?A.slice(1):A),h.current=I},[]);return R.useImperativeHandle(n,()=>({pulsate:b,start:w,stop:x}),[b,w,x]),C.jsx(Qfe,$({className:Ue(fa.root,o.root,s),ref:y},a,{children:C.jsx(Ofe,{component:null,exit:!0,children:c})}))}),ehe=Zfe;function the(e){return Ct("MuiButtonBase",e)}const nhe=It("MuiButtonBase",["root","disabled","focusVisible"]),rhe=nhe,ihe=["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"],ohe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=At({root:["root",t&&"disabled",n&&"focusVisible"]},the,i);return n&&r&&(s.root+=` ${r}`),s},she=Ce("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${rhe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ahe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:c="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:w,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:I,onMouseDown:A,onMouseLeave:k,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:G=0,TouchRippleProps:z,touchRippleRef:D,type:F}=r,j=Ne(r,ihe),V=R.useRef(null),W=R.useRef(null),K=Tr(W,D),{isFocusVisibleRef:X,onFocus:Q,onBlur:ie,ref:ce}=g4(),[ue,se]=R.useState(!1);u&&ue&&se(!1),R.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[J,ae]=R.useState(!1);R.useEffect(()=>{ae(!0)},[]);const le=J&&!f&&!u;R.useEffect(()=>{ue&&p&&!f&&J&&W.current.pulsate()},[f,p,ue,J]);function he(Be,Pt,dt=h){return mo(Ie=>(Pt&&Pt(Ie),!dt&&W.current&&W.current[Be](Ie),!0))}const pe=he("start",A),ve=he("stop",S),ye=he("stop",w),xe=he("stop",O),me=he("stop",Be=>{ue&&Be.preventDefault(),k&&k(Be)}),be=he("start",H),Ze=he("stop",L),Xe=he("stop",N),ct=he("stop",Be=>{ie(Be),X.current===!1&&se(!1),v&&v(Be)},!1),Bt=mo(Be=>{V.current||(V.current=Be.currentTarget),Q(Be),X.current===!0&&(se(!0),x&&x(Be)),b&&b(Be)}),Pe=()=>{const Be=V.current;return c&&c!=="button"&&!(Be.tagName==="A"&&Be.href)},ze=R.useRef(!1),st=mo(Be=>{p&&!ze.current&&ue&&W.current&&Be.key===" "&&(ze.current=!0,W.current.stop(Be,()=>{W.current.start(Be)})),Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&Be.preventDefault(),E&&E(Be),Be.target===Be.currentTarget&&Pe()&&Be.key==="Enter"&&!u&&(Be.preventDefault(),y&&y(Be))}),gt=mo(Be=>{p&&Be.key===" "&&W.current&&ue&&!Be.defaultPrevented&&(ze.current=!1,W.current.stop(Be,()=>{W.current.pulsate(Be)})),I&&I(Be),y&&Be.target===Be.currentTarget&&Pe()&&Be.key===" "&&!Be.defaultPrevented&&y(Be)});let vt=c;vt==="button"&&(j.href||j.to)&&(vt=g);const _e={};vt==="button"?(_e.type=F===void 0?"button":F,_e.disabled=u):(!j.href&&!j.to&&(_e.role="button"),u&&(_e["aria-disabled"]=u));const je=Tr(n,ce,V),Ke=$({},r,{centerRipple:o,component:c,disabled:u,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:G,focusVisible:ue}),Fe=ohe(Ke);return C.jsxs(she,$({as:vt,className:Ue(Fe.root,a),ownerState:Ke,onBlur:ct,onClick:y,onContextMenu:ve,onFocus:Bt,onKeyDown:st,onKeyUp:gt,onMouseDown:pe,onMouseLeave:me,onMouseUp:xe,onDragLeave:ye,onTouchEnd:Ze,onTouchMove:Xe,onTouchStart:be,ref:je,tabIndex:u?-1:G,type:F},_e,j,{children:[s,le?C.jsx(ehe,$({ref:K,center:o},z)):null]}))}),Ku=ahe;function lhe(e){return Ct("MuiIconButton",e)}const che=It("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),uhe=che,dhe=["edge","children","className","color","disabled","disableFocusRipple","size"],fhe=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${De(r)}`,i&&`edge${De(i)}`,`size${De(o)}`]};return At(s,lhe,t)},hhe=Ce(Ku,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(({theme:e,ownerState:t})=>$({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:kn(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})`:kn(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)},{[`&.${uhe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),phe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:c=!1,disableFocusRipple:u=!1,size:f="medium"}=r,h=Ne(r,dhe),p=$({},r,{edge:i,color:a,disabled:c,disableFocusRipple:u,size:f}),g=fhe(p);return C.jsx(hhe,$({className:Ue(g.root,s),centerRipple:!0,focusRipple:!u,disabled:c,ref:n,ownerState:p},h,{children:o}))}),jp=phe;function mhe(e){return Ct("MuiTypography",e)}It("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ghe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],vhe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${De(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return At(a,mhe,s)},yhe=Ce("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${De(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>$({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),q8={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},bhe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},xhe=e=>bhe[e]||e,whe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTypography"}),i=xhe(r.color),o=O4($({},r,{color:i})),{align:s="inherit",className:a,component:c,gutterBottom:u=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=q8}=o,v=Ne(o,ghe),y=$({},o,{align:s,color:i,className:a,component:c,gutterBottom:u,noWrap:f,paragraph:h,variant:p,variantMapping:g}),S=c||(h?"p":g[p]||q8[p])||"span",w=vhe(y);return C.jsx(yhe,$({as:S,ref:n,ownerState:y,className:Ue(w.root,a)},v))}),Ut=whe;function _he(e){return Ct("MuiAppBar",e)}It("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const She=["className","color","enableColorOnDark","position"],Ehe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${De(t)}`,`position${De(n)}`]};return At(i,_he,r)},C_=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Che=Ce(Cv,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${De(n.position)}`],t[`color${De(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&$({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:C_(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:C_(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:C_(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:C_(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"}))}),The=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,c=Ne(r,She),u=$({},r,{color:o,position:a,enableColorOnDark:s}),f=Ehe(u);return C.jsx(Che,$({square:!0,component:"header",ownerState:u,elevation:4,className:Ue(f.root,i,a==="fixed"&&"mui-fixed"),ref:n},c))}),khe=The;function rc(e){return typeof e=="string"}function ax(e,t,n){return e===void 0||rc(e)?t:$({},t,{ownerState:$({},t.ownerState,n)})}function Ahe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const Ihe={disableDefaultClasses:!1},Rhe=R.createContext(Ihe);function Phe(e){const{disableDefaultClasses:t}=R.useContext(Rhe);return n=>t?"":e(n)}function mC(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 Ohe(e,t,n){return typeof e=="function"?e(t,n):e}function X8(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 Mhe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=Ue(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=$({},n,i,r);return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=mC($({},i,r)),a=X8(r),c=X8(i),u=t(s),f=Ue(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=$({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),p=$({},u,n,c,a);return f.length>0&&(p.className=f),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:u.ref}}const Dhe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ti(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ne(e,Dhe),a=o?{}:Ohe(r,i),{props:c,internalRef:u}=Mhe($({},s,{externalSlotProps:a})),f=Tr(u,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return ax(n,$({},c,{ref:f}),i)}function Y8(e){return e.substring(2).toLowerCase()}function Lhe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=Tr(t.ref,a),h=mo(v=>{const y=u.current;u.current=!1;const S=Fr(a.current);if(!c.current||!a.current||"clientX"in v&&Lhe(v,S))return;if(s.current){s.current=!1;return}let w;v.composedPath?w=v.composedPath().indexOf(a.current)>-1:w=!S.documentElement.contains(v.target)||a.current.contains(v.target),!w&&(n||!y)&&i(v)}),p=v=>y=>{u.current=!0;const S=t.props[v];S&&S(y)},g={ref:f};return o!==!1&&(g[o]=p(o)),R.useEffect(()=>{if(o!==!1){const v=Y8(o),y=Fr(a.current),S=()=>{s.current=!0};return y.addEventListener(v,h),y.addEventListener("touchmove",S),()=>{y.removeEventListener(v,h),y.removeEventListener("touchmove",S)}}},[h,o]),r!==!1&&(g[r]=p(r)),R.useEffect(()=>{if(r!==!1){const v=Y8(r),y=Fr(a.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(R.Fragment,{children:R.cloneElement(t,g)})}const Bhe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function $he(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 Fhe(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 zhe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Fhe(e))}function jhe(e){const t=[],n=[];return Array.from(e.querySelectorAll(Bhe)).forEach((r,i)=>{const o=$he(r);o===-1||!zhe(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 Uhe(){return!0}function Hhe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=jhe,isEnabled:s=Uhe,open:a}=e,c=R.useRef(!1),u=R.useRef(null),f=R.useRef(null),h=R.useRef(null),p=R.useRef(null),g=R.useRef(!1),v=R.useRef(null),y=Tr(t.ref,v),S=R.useRef(null);R.useEffect(()=>{!a||!v.current||(g.current=!n)},[n,a]),R.useEffect(()=>{if(!a||!v.current)return;const x=Fr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),g.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[a]),R.useEffect(()=>{if(!a||!v.current)return;const x=Fr(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())},I=()=>{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!==u.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===u.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"),G=O[0],z=O[O.length-1];typeof G!="string"&&typeof z!="string"&&(H?z.focus():G.focus())}else k.focus()};x.addEventListener("focusin",I),x.addEventListener("keydown",E,!0);const A=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&I()},50);return()=>{clearInterval(A),x.removeEventListener("focusin",I),x.removeEventListener("keydown",E,!0)}},[n,r,i,s,a,o]);const w=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(R.Fragment,{children:[C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),R.cloneElement(t,{ref:y,onFocus:w}),C.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var ss="top",Oa="bottom",Ma="right",as="left",Pz="auto",_w=[ss,Oa,Ma,as],Wg="start",T1="end",Whe="clippingParents",uQ="viewport",kb="popper",Ghe="reference",K8=_w.reduce(function(e,t){return e.concat([t+"-"+Wg,t+"-"+T1])},[]),dQ=[].concat(_w,[Pz]).reduce(function(e,t){return e.concat([t,t+"-"+Wg,t+"-"+T1])},[]),Vhe="beforeRead",qhe="read",Xhe="afterRead",Yhe="beforeMain",Khe="main",Qhe="afterMain",Jhe="beforeWrite",Zhe="write",epe="afterWrite",tpe=[Vhe,qhe,Xhe,Yhe,Khe,Qhe,Jhe,Zhe,epe];function fc(e){return e?(e.nodeName||"").toLowerCase():null}function ea(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Up(e){var t=ea(e).Element;return e instanceof t||e instanceof Element}function Ca(e){var t=ea(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Oz(e){if(typeof ShadowRoot>"u")return!1;var t=ea(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function npe(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)||!fc(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function rpe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(c,u){return c[u]="",c},{});!Ca(i)||!fc(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const ipe={name:"applyStyles",enabled:!0,phase:"write",fn:npe,effect:rpe,requires:["computeStyles"]};function ic(e){return e.split("-")[0]}var Ep=Math.max,gC=Math.min,Gg=Math.round;function e3(){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 fQ(){return!/^((?!chrome|android).)*safari/i.test(e3())}function Vg(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&&Gg(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Gg(r.height)/e.offsetHeight||1);var s=Up(e)?ea(e):window,a=s.visualViewport,c=!fQ()&&n,u=(r.left+(c&&a?a.offsetLeft:0))/i,f=(r.top+(c&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:u+h,bottom:f+p,left:u,x:u,y:f}}function Mz(e){var t=Vg(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 hQ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Oz(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ju(e){return ea(e).getComputedStyle(e)}function ope(e){return["table","td","th"].indexOf(fc(e))>=0}function vf(e){return((Up(e)?e.ownerDocument:e.document)||window.document).documentElement}function Lk(e){return fc(e)==="html"?e:e.assignedSlot||e.parentNode||(Oz(e)?e.host:null)||vf(e)}function Q8(e){return!Ca(e)||ju(e).position==="fixed"?null:e.offsetParent}function spe(e){var t=/firefox/i.test(e3()),n=/Trident/i.test(e3());if(n&&Ca(e)){var r=ju(e);if(r.position==="fixed")return null}var i=Lk(e);for(Oz(i)&&(i=i.host);Ca(i)&&["html","body"].indexOf(fc(i))<0;){var o=ju(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 Sw(e){for(var t=ea(e),n=Q8(e);n&&ope(n)&&ju(n).position==="static";)n=Q8(n);return n&&(fc(n)==="html"||fc(n)==="body"&&ju(n).position==="static")?t:n||spe(e)||t}function Dz(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lx(e,t,n){return Ep(e,gC(t,n))}function ape(e,t,n){var r=Lx(e,t,n);return r>n?n:r}function pQ(){return{top:0,right:0,bottom:0,left:0}}function mQ(e){return Object.assign({},pQ(),e)}function gQ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var lpe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,mQ(typeof t!="number"?t:gQ(t,_w))};function cpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ic(n.placement),c=Dz(a),u=[as,Ma].indexOf(a)>=0,f=u?"height":"width";if(!(!o||!s)){var h=lpe(i.padding,n),p=Mz(o),g=c==="y"?ss:as,v=c==="y"?Oa:Ma,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],w=Sw(o),b=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,x=y/2-S/2,E=h[g],I=b-p[f]-h[v],A=b/2-p[f]/2+x,k=Lx(E,A,I),O=c;n.modifiersData[r]=(t={},t[O]=k,t.centerOffset=k-A,t)}}function upe(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)||hQ(t.elements.popper,i)&&(t.elements.arrow=i))}const dpe={name:"arrow",enabled:!0,phase:"main",fn:cpe,effect:upe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qg(e){return e.split("-")[1]}var fpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hpe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Gg(n*i)/i||0,y:Gg(r*i)/i||0}}function J8(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,c=e.gpuAcceleration,u=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 w=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),x=as,E=ss,I=window;if(u){var A=Sw(n),k="clientHeight",O="clientWidth";if(A===ea(n)&&(A=vf(n),ju(A).position!=="static"&&a==="absolute"&&(k="scrollHeight",O="scrollWidth")),A=A,i===ss||(i===as||i===Ma)&&o===T1){E=Oa;var L=h&&A===I&&I.visualViewport?I.visualViewport.height:A[k];y-=L-r.height,y*=c?1:-1}if(i===as||(i===ss||i===Oa)&&o===T1){x=Ma;var N=h&&A===I&&I.visualViewport?I.visualViewport.width:A[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:a},u&&fpe),G=f===!0?hpe({x:g,y},ea(n)):{x:g,y};if(g=G.x,y=G.y,c){var z;return Object.assign({},H,(z={},z[E]=b?"0":"",z[x]=w?"0":"",z.transform=(I.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]=w?g+"px":"",t.transform="",t))}function ppe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,c=a===void 0?!0:a,u={placement:ic(t.placement),variation:qg(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,J8(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,J8(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const mpe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ppe,data:{}};var T_={passive:!0};function gpe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,c=ea(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,T_)}),a&&c.addEventListener("resize",n.update,T_),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,T_)}),a&&c.removeEventListener("resize",n.update,T_)}}const vpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:gpe,data:{}};var ype={left:"right",right:"left",bottom:"top",top:"bottom"};function dE(e){return e.replace(/left|right|bottom|top/g,function(t){return ype[t]})}var bpe={start:"end",end:"start"};function Z8(e){return e.replace(/start|end/g,function(t){return bpe[t]})}function Lz(e){var t=ea(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Nz(e){return Vg(vf(e)).left+Lz(e).scrollLeft}function xpe(e,t){var n=ea(e),r=vf(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;var u=fQ();(u||!u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a+Nz(e),y:c}}function wpe(e){var t,n=vf(e),r=Lz(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ep(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ep(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Nz(e),c=-r.scrollTop;return ju(i||n).direction==="rtl"&&(a+=Ep(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}function Bz(e){var t=ju(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vQ(e){return["html","body","#document"].indexOf(fc(e))>=0?e.ownerDocument.body:Ca(e)&&Bz(e)?e:vQ(Lk(e))}function Nx(e,t){var n;t===void 0&&(t=[]);var r=vQ(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ea(r),s=i?[o].concat(o.visualViewport||[],Bz(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Nx(Lk(s)))}function t3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _pe(e,t){var n=Vg(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 eH(e,t,n){return t===uQ?t3(xpe(e,n)):Up(t)?_pe(t,n):t3(wpe(vf(e)))}function Spe(e){var t=Nx(Lk(e)),n=["absolute","fixed"].indexOf(ju(e).position)>=0,r=n&&Ca(e)?Sw(e):e;return Up(r)?t.filter(function(i){return Up(i)&&hQ(i,r)&&fc(i)!=="body"}):[]}function Epe(e,t,n,r){var i=t==="clippingParents"?Spe(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(c,u){var f=eH(e,u,r);return c.top=Ep(f.top,c.top),c.right=gC(f.right,c.right),c.bottom=gC(f.bottom,c.bottom),c.left=Ep(f.left,c.left),c},eH(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function yQ(e){var t=e.reference,n=e.element,r=e.placement,i=r?ic(r):null,o=r?qg(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,c;switch(i){case ss:c={x:s,y:t.y-n.height};break;case Oa:c={x:s,y:t.y+t.height};break;case Ma:c={x:t.x+t.width,y:a};break;case as:c={x:t.x-n.width,y:a};break;default:c={x:t.x,y:t.y}}var u=i?Dz(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case Wg:c[u]=c[u]-(t[f]/2-n[f]/2);break;case T1:c[u]=c[u]+(t[f]/2-n[f]/2);break}}return c}function k1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,c=a===void 0?Whe:a,u=n.rootBoundary,f=u===void 0?uQ:u,h=n.elementContext,p=h===void 0?kb:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,w=mQ(typeof S!="number"?S:gQ(S,_w)),b=p===kb?Ghe:kb,x=e.rects.popper,E=e.elements[v?b:p],I=Epe(Up(E)?E:E.contextElement||vf(e.elements.popper),c,f,s),A=Vg(e.elements.reference),k=yQ({reference:A,element:x,strategy:"absolute",placement:i}),O=t3(Object.assign({},x,k)),L=p===kb?O:A,N={top:I.top-L.top+w.top,bottom:L.bottom-I.bottom+w.bottom,left:I.left-L.left+w.left,right:L.right-I.right+w.right},H=e.modifiersData.offset;if(p===kb&&H){var G=H[i];Object.keys(N).forEach(function(z){var D=[Ma,Oa].indexOf(z)>=0?1:-1,F=[ss,Oa].indexOf(z)>=0?"y":"x";N[z]+=G[F]*D})}return N}function Cpe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?dQ:c,f=qg(r),h=f?a?K8:K8.filter(function(v){return qg(v)===f}):_w,p=h.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=k1(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[ic(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function Tpe(e){if(ic(e)===Pz)return[];var t=dE(e);return[Z8(e),t,Z8(t)]}function kpe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,c=n.fallbackPlacements,u=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,w=ic(S),b=w===S,x=c||(b||!v?[dE(S)]:Tpe(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(ic(se)===Pz?Cpe(t,{placement:se,boundary:f,rootBoundary:h,padding:u,flipVariations:v,allowedAutoPlacements:y}):se)},[]),I=t.rects.reference,A=t.rects.popper,k=new Map,O=!0,L=E[0],N=0;N=0,F=D?"width":"height",j=k1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:u}),V=D?z?Ma:as:z?Oa:ss;I[F]>A[F]&&(V=dE(V));var W=dE(V),K=[];if(o&&K.push(j[G]<=0),a&&K.push(j[V]<=0,j[W]<=0),K.every(function(ue){return ue})){L=H,O=!1;break}k.set(H,K)}if(O)for(var X=v?3:1,Q=function(se){var J=E.find(function(ae){var le=k.get(ae);if(le)return le.slice(0,se).every(function(he){return he})});if(J)return L=J,"break"},ie=X;ie>0;ie--){var ce=Q(ie);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const Ape={name:"flip",enabled:!0,phase:"main",fn:kpe,requiresIfExists:["offset"],data:{_skip:!1}};function tH(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 nH(e){return[ss,Ma,Oa,as].some(function(t){return e[t]>=0})}function Ipe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=k1(t,{elementContext:"reference"}),a=k1(t,{altBoundary:!0}),c=tH(s,r),u=tH(a,i,o),f=nH(c),h=nH(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Rpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ipe};function Ppe(e,t,n){var r=ic(e),i=[as,ss].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[as,Ma].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Ope(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=dQ.reduce(function(f,h){return f[h]=Ppe(h,t.rects,o),f},{}),a=s[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const Mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ope};function Dpe(e){var t=e.state,n=e.name;t.modifiersData[n]=yQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Lpe={name:"popperOffsets",enabled:!0,phase:"read",fn:Dpe,data:{}};function Npe(e){return e==="x"?"y":"x"}function Bpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,c=n.boundary,u=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=k1(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:f}),w=ic(t.placement),b=qg(t.placement),x=!b,E=Dz(w),I=Npe(E),A=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,G={x:0,y:0};if(A){if(o){var z,D=E==="y"?ss:as,F=E==="y"?Oa:Ma,j=E==="y"?"height":"width",V=A[E],W=V+S[D],K=V-S[F],X=g?-O[j]/2:0,Q=b===Wg?k[j]:O[j],ie=b===Wg?-O[j]:-k[j],ce=t.elements.arrow,ue=g&&ce?Mz(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pQ(),J=se[D],ae=se[F],le=Lx(0,k[j],ue[j]),he=x?k[j]/2-X-le-J-N.mainAxis:Q-le-J-N.mainAxis,pe=x?-k[j]/2+X+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&Sw(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,Ze=Lx(g?gC(W,me):W,V,g?Ep(K,be):K);A[E]=Ze,G[E]=Ze-V}if(a){var Xe,ct=E==="x"?ss:as,Bt=E==="x"?Oa:Ma,Pe=A[I],ze=I==="y"?"height":"width",st=Pe+S[ct],gt=Pe-S[Bt],vt=[ss,as].indexOf(w)!==-1,_e=(Xe=H==null?void 0:H[I])!=null?Xe:0,je=vt?st:Pe-k[ze]-O[ze]-_e+N.altAxis,Ke=vt?Pe+k[ze]+O[ze]-_e-N.altAxis:gt,Fe=g&&vt?ape(je,Pe,Ke):Lx(g?je:st,Pe,g?Ke:gt);A[I]=Fe,G[I]=Fe-Pe}t.modifiersData[r]=G}}const $pe={name:"preventOverflow",enabled:!0,phase:"main",fn:Bpe,requiresIfExists:["offset"]};function Fpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zpe(e){return e===ea(e)||!Ca(e)?Lz(e):Fpe(e)}function jpe(e){var t=e.getBoundingClientRect(),n=Gg(t.width)/e.offsetWidth||1,r=Gg(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Upe(e,t,n){n===void 0&&(n=!1);var r=Ca(t),i=Ca(t)&&jpe(t),o=vf(t),s=Vg(e,i,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((fc(t)!=="body"||Bz(o))&&(a=zpe(t)),Ca(t)?(c=Vg(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Nz(o))),{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Hpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var c=t.get(a);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Wpe(e){var t=Hpe(e);return tpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Gpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Vpe(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 rH={placement:"bottom",modifiers:[],strategy:"absolute"};function iH(){for(var e=arguments.length,t=new Array(e),n=0;n{o||a(Kpe(i)||document.body)},[i,o]),jo(()=>{if(s&&!o)return J$(n,s),()=>{J$(n,null)}},[n,s,o]),o){if(R.isValidElement(r)){const u={ref:c};return R.cloneElement(r,u)}return C.jsx(R.Fragment,{children:r})}return C.jsx(R.Fragment,{children:s&&Ev.createPortal(r,s)})});function Qpe(e){return Ct("MuiPopper",e)}It("MuiPopper",["root"]);const Jpe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Zpe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function eme(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 n3(e){return typeof e=="function"?e():e}function tme(e){return e.nodeType!==void 0}const nme=()=>At({root:["root"]},Phe(Qpe)),rme={},ime=R.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:c,open:u,placement:f,popperOptions:h,popperRef:p,slotProps:g={},slots:v={},TransitionProps:y}=t,S=Ne(t,Jpe),w=R.useRef(null),b=Tr(w,n),x=R.useRef(null),E=Tr(x,p),I=R.useRef(E);jo(()=>{I.current=E},[E]),R.useImperativeHandle(p,()=>x.current,[]);const A=eme(f,s),[k,O]=R.useState(A),[L,N]=R.useState(n3(i));R.useEffect(()=>{x.current&&x.current.forceUpdate()}),R.useEffect(()=>{i&&N(n3(i))},[i]),jo(()=>{if(!L||!u)return;const F=W=>{O(W.placement)};let j=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{F(W)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=Ype(L,w.current,$({placement:A},h,{modifiers:j}));return I.current(V),()=>{V.destroy(),I.current(null)}},[L,a,c,u,h,A]);const H={placement:k};y!==null&&(H.TransitionProps=y);const G=nme(),z=(r=v.root)!=null?r:"div",D=ti({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:G.root});return C.jsx(z,$({},D,{children:typeof o=="function"?o(H):o}))}),ome=R.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:c=!1,modifiers:u,open:f,placement:h="bottom",popperOptions:p=rme,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:w={}}=t,b=Ne(t,Zpe),[x,E]=R.useState(!0),I=()=>{E(!1)},A=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let k;if(o)k=o;else if(r){const N=n3(r);k=N&&tme(N)?Fr(N).body:Fr(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:I,onExited:A}:void 0;return C.jsx(bQ,{disablePortal:a,container:k,children:C.jsx(ime,$({anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:y?!x:f,placement:h,popperOptions:p,popperRef:g,slotProps:S,slots:w},b,{style:$({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function sme(e){const t=Fr(e);return t.body===e?Nu(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Bx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function oH(e){return parseInt(Nu(e).getComputedStyle(e).paddingRight,10)||0}function ame(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 sH(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,c=!ame(s);a&&c&&Bx(s,i)})}function jL(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function lme(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(sme(r)){const s=SX(Fr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${oH(r)+s}px`;const a=Fr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${oH(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Fr(r).body;else{const s=r.parentElement,a=Nu(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function cme(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class ume{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&&Bx(t.modalRef,!1);const i=cme(n);sH(n,t.mount,t.modalRef,i,!0);const o=jL(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=jL(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=lme(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=jL(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&&Bx(t.modalRef,n),sH(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&&Bx(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function dme(e){return typeof e=="function"?e():e}function fme(e){return e?e.props.hasOwnProperty("in"):!1}const hme=new ume;function pme(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=hme,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:c,onClose:u,open:f,rootRef:h}=e,p=R.useRef({}),g=R.useRef(null),v=R.useRef(null),y=Tr(v,h),[S,w]=R.useState(!f),b=fme(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Fr(g.current),I=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),A=()=>{i.mount(I(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=mo(()=>{const j=dme(t)||E().body;i.add(I(),j),v.current&&A()}),O=R.useCallback(()=>i.isTopModal(I()),[i]),L=mo(j=>{g.current=j,j&&(f&&O()?A():v.current&&Bx(v.current,x))}),N=R.useCallback(()=>{i.remove(I(),x)},[x,i]);R.useEffect(()=>()=>{N()},[N]),R.useEffect(()=>{f?k():(!b||!o)&&N()},[f,N,b,o,k]);const H=j=>V=>{var W;(W=j.onKeyDown)==null||W.call(j,V),!(V.key!=="Escape"||!O())&&(n||(V.stopPropagation(),u&&u(V,"escapeKeyDown")))},G=j=>V=>{var W;(W=j.onClick)==null||W.call(j,V),V.target===V.currentTarget&&u&&u(V,"backdropClick")};return{getRootProps:(j={})=>{const V=mC(e);delete V.onTransitionEnter,delete V.onTransitionExited;const W=$({},V,j);return $({role:"presentation"},W,{onKeyDown:H(W),ref:y})},getBackdropProps:(j={})=>{const V=j;return $({"aria-hidden":!0},V,{onClick:G(V),open:f})},getTransitionProps:()=>{const j=()=>{w(!1),s&&s()},V=()=>{w(!0),a&&a(),o&&N()};return{onEnter:a6(j,c==null?void 0:c.props.onEnter),onExited:a6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const mme=2;function xQ(e,t){return e-t}function Ab(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function aH(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const a=Math.abs(t-o);return i===null||a({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},xme=e=>e;let R_;function UL(){return R_===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?R_=CSS.supports("touch-action","none"):R_=!0),R_}function wme(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:c=0,name:u,onChange:f,onChangeCommitted:h,orientation:p="horizontal",rootRef:g,scale:v=xme,step:y=1,tabIndex:S,value:w}=e,b=R.useRef(),[x,E]=R.useState(-1),[I,A]=R.useState(-1),[k,O]=R.useState(!1),L=R.useRef(0),[N,H]=o1({controlled:w,default:n??c,name:"Slider"}),G=f&&((_e,je,Ke)=>{const Fe=_e.nativeEvent||_e,Be=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Be,"target",{writable:!0,value:{value:je,name:u}}),f(Be,je,Ke)}),z=Array.isArray(N);let D=z?N.slice().sort(xQ):[N];D=D.map(_e=>Ab(_e,c,a));const F=s===!0&&y!==null?[...Array(Math.floor((a-c)/y)+1)].map((_e,je)=>({value:c+y*je})):s||[],j=F.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:W,onFocus:K,ref:X}=g4(),[Q,ie]=R.useState(-1),ce=R.useRef(),ue=Tr(X,ce),se=Tr(g,ue),J=_e=>je=>{var Ke;const Fe=Number(je.currentTarget.getAttribute("data-index"));K(je),V.current===!0&&ie(Fe),A(Fe),_e==null||(Ke=_e.onFocus)==null||Ke.call(_e,je)},ae=_e=>je=>{var Ke;W(je),V.current===!1&&ie(-1),A(-1),_e==null||(Ke=_e.onBlur)==null||Ke.call(_e,je)};jo(()=>{if(r&&ce.current.contains(document.activeElement)){var _e;(_e=document.activeElement)==null||_e.blur()}},[r]),r&&x!==-1&&E(-1),r&&Q!==-1&&ie(-1);const le=_e=>je=>{var Ke;(Ke=_e.onChange)==null||Ke.call(_e,je);const Fe=Number(je.currentTarget.getAttribute("data-index")),Be=D[Fe],Pt=j.indexOf(Be);let dt=je.target.valueAsNumber;if(F&&y==null){const Ie=j[j.length-1];dt>Ie?dt=Ie:dt{const{current:Ke}=ce,{width:Fe,height:Be,bottom:Pt,left:dt}=Ke.getBoundingClientRect();let Ie;pe.indexOf("vertical")===0?Ie=(Pt-_e.y)/Be:Ie=(_e.x-dt)/Fe,pe.indexOf("-reverse")!==-1&&(Ie=1-Ie);let at;if(at=gme(Ie,c,a),y)at=yme(at,y,c);else{const Re=aH(j,at);at=j[Re]}at=Ab(at,c,a);let zt=0;if(z){je?zt=he.current:zt=aH(D,at),i&&(at=Ab(at,D[zt-1]||-1/0,D[zt+1]||1/0));const Re=at;at=lH({values:D,newValue:at,index:zt}),i&&je||(zt=at.indexOf(Re),he.current=zt)}return{newValue:at,activeIndex:zt}},ye=mo(_e=>{const je=k_(_e,b);if(!je)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ke,activeIndex:Fe}=ve({finger:je,move:!0});A_({sliderRef:ce,activeIndex:Fe,setActive:E}),H(Ke),!k&&L.current>mme&&O(!0),G&&!I_(Ke,N)&&G(_e,Ke,Fe)}),xe=mo(_e=>{const je=k_(_e,b);if(O(!1),!je)return;const{newValue:Ke}=ve({finger:je,move:!0});E(-1),_e.type==="touchend"&&A(-1),h&&h(_e,Ke),b.current=void 0,be()}),me=mo(_e=>{if(r)return;UL()||_e.preventDefault();const je=_e.changedTouches[0];je!=null&&(b.current=je.identifier);const Ke=k_(_e,b);if(Ke!==!1){const{newValue:Be,activeIndex:Pt}=ve({finger:Ke});A_({sliderRef:ce,activeIndex:Pt,setActive:E}),H(Be),G&&!I_(Be,N)&&G(_e,Be,Pt)}L.current=0;const Fe=Fr(ce.current);Fe.addEventListener("touchmove",ye),Fe.addEventListener("touchend",xe)}),be=R.useCallback(()=>{const _e=Fr(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);R.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:UL()}),()=>{_e.removeEventListener("touchstart",me,{passive:UL()}),be()}},[be,me]),R.useEffect(()=>{r&&be()},[r,be]);const Ze=_e=>je=>{var Ke;if((Ke=_e.onMouseDown)==null||Ke.call(_e,je),r||je.defaultPrevented||je.button!==0)return;je.preventDefault();const Fe=k_(je,b);if(Fe!==!1){const{newValue:Pt,activeIndex:dt}=ve({finger:Fe});A_({sliderRef:ce,activeIndex:dt,setActive:E}),H(Pt),G&&!I_(Pt,N)&&G(je,Pt,dt)}L.current=0;const Be=Fr(ce.current);Be.addEventListener("mousemove",ye),Be.addEventListener("mouseup",xe)},Xe=vC(z?D[0]:c,c,a),ct=vC(D[D.length-1],c,a)-Xe,Bt=(_e={})=>{const je={onMouseDown:Ze(_e||{})},Ke=$({},_e,je);return $({ref:se},Ke)},Pe=_e=>je=>{var Ke;(Ke=_e.onMouseOver)==null||Ke.call(_e,je);const Fe=Number(je.currentTarget.getAttribute("data-index"));A(Fe)},ze=_e=>je=>{var Ke;(Ke=_e.onMouseLeave)==null||Ke.call(_e,je),A(-1)};return{active:x,axis:pe,axisProps:bme,dragging:k,focusedThumbIndex:Q,getHiddenInputProps:(_e={})=>{var je;const Ke={onChange:le(_e||{}),onFocus:J(_e||{}),onBlur:ae(_e||{})},Fe=$({},_e,Ke);return $({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(a),"aria-valuemin":v(c),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(je=e.step)!=null?je:void 0,disabled:r},Fe,{style:$({},Zse,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Bt,getThumbProps:(_e={})=>{const je={onMouseOver:Pe(_e||{}),onMouseLeave:ze(_e||{})};return $({},_e,je)},marks:F,open:I,range:z,rootRef:se,trackLeap:ct,trackOffset:Xe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function _me(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=R.useRef();R.useEffect(()=>{if(!i)return;function w(b){b.defaultPrevented||(b.key==="Escape"||b.key==="Esc")&&(r==null||r(b,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[i,r]);const a=mo((w,b)=>{r==null||r(w,b)}),c=mo(w=>{!r||w==null||(clearTimeout(s.current),s.current=setTimeout(()=>{a(null,"timeout")},w))});R.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const u=w=>{r==null||r(w,"clickaway")},f=()=>{clearTimeout(s.current)},h=R.useCallback(()=>{t!=null&&c(o??t*.5)},[t,o,c]),p=w=>b=>{const x=w.onBlur;x==null||x(b),h()},g=w=>b=>{const x=w.onFocus;x==null||x(b),f()},v=w=>b=>{const x=w.onMouseEnter;x==null||x(b),f()},y=w=>b=>{const x=w.onMouseLeave;x==null||x(b),h()};return R.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:(w={})=>{const b=$({},mC(e),mC(w));return $({role:"presentation"},w,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:u}}const Sme=["onChange","maxRows","minRows","style","value"];function P_(e){return parseInt(e,10)||0}const Eme={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function cH(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const Cme=R.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,c=Ne(t,Sme),{current:u}=R.useRef(a!=null),f=R.useRef(null),h=Tr(n,f),p=R.useRef(null),g=R.useRef(0),[v,y]=R.useState({outerHeightStyle:0}),S=R.useCallback(()=>{const E=f.current,A=Nu(E).getComputedStyle(E);if(A.width==="0px")return{outerHeightStyle:0};const k=p.current;k.style.width=A.width,k.value=E.value||t.placeholder||"x",k.value.slice(-1)===` -`&&(k.value+=" ");const O=A.boxSizing,L=P_(A.paddingBottom)+P_(A.paddingTop),N=P_(A.borderBottomWidth)+P_(A.borderTopWidth),H=k.scrollHeight;k.value="x";const G=k.scrollHeight;let z=H;o&&(z=Math.max(Number(o)*G,z)),i&&(z=Math.min(Number(i)*G,z)),z=Math.max(z,G);const D=z+(O==="border-box"?L+N:0),F=Math.abs(z-H)<=1;return{outerHeightStyle:D,overflow:F}},[i,o,t.placeholder]),w=(E,I)=>{const{outerHeightStyle:A,overflow:k}=I;return g.current<20&&(A>0&&Math.abs((E.outerHeightStyle||0)-A)>1||E.overflow!==k)?(g.current+=1,{overflow:k,outerHeightStyle:A}):E},b=R.useCallback(()=>{const E=S();cH(E)||y(I=>w(I,E))},[S]);jo(()=>{const E=()=>{const H=S();cH(H)||Ev.flushSync(()=>{y(G=>w(G,H))})},I=()=>{g.current=0,E()};let A;const k=MT(I),O=f.current,L=Nu(O);L.addEventListener("resize",k);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(I),N.observe(O)),()=>{k.clear(),cancelAnimationFrame(A),L.removeEventListener("resize",k),N&&N.disconnect()}},[S]),jo(()=>{b()}),R.useEffect(()=>{g.current=0},[a]);const x=E=>{g.current=0,u||b(),r&&r(E)};return C.jsxs(R.Fragment,{children:[C.jsx("textarea",$({value:a,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:$({},Eme.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),Tme=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],kme=Ce(ome,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ame=R.forwardRef(function(t,n){var r;const i=ik(),o=Rt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:c,componentsProps:u,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:w,transition:b,slots:x,slotProps:E}=o,I=Ne(o,Tme),A=(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:w,transition:b},I);return C.jsx(kme,$({as:a,direction:i==null?void 0:i.direction,slots:{root:A},slotProps:E??u},k,{ref:n}))}),wQ=Ame;function Ime(e){return Ct("MuiListSubheader",e)}It("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Rme=["className","color","component","disableGutters","disableSticky","inset"],Pme=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${De(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return At(s,Ime,t)},Ome=Ce("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>$({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),_Q=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:c=!1,inset:u=!1}=r,f=Ne(r,Rme),h=$({},r,{color:o,component:s,disableGutters:a,disableSticky:c,inset:u}),p=Pme(h);return C.jsx(Ome,$({as:s,className:Ue(p.root,i),ref:n,ownerState:h},f))});_Q.muiSkipListHighlight=!0;const Mme=_Q;function nm({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 Dme=R.createContext(void 0),$z=Dme;function yf(){return R.useContext($z)}function SQ(e){return C.jsx(ace,$({},e,{defaultTheme:ak,themeId:Mp}))}function uH(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function yC(e,t=!1){return e&&(uH(e.value)&&e.value!==""||t&&uH(e.defaultValue)&&e.defaultValue!=="")}function Lme(e){return e.startAdornment}function Nme(e){return Ct("MuiInputBase",e)}const Bme=It("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Xg=Bme,$me=["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"],Nk=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${De(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Bk=(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]},Fme=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:c,hiddenLabel:u,multiline:f,readOnly:h,size:p,startAdornment:g,type:v}=e,y={root:["root",`color${De(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",s&&"focused",a&&"formControl",p&&p!=="medium"&&`size${De(p)}`,f&&"multiline",g&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",f&&"inputMultiline",p==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",g&&"inputAdornedStart",o&&"inputAdornedEnd",h&&"readOnly"]};return At(y,Nme,t)},$k=Ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Nk})(({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",[`&.${Xg.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%"})),Fk=Ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Bk})(({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] + .${Xg.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},[`&.${Xg.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"})}),zme=C.jsx(SQ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),jme=R.forwardRef(function(t,n){var r;const i=Rt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:c,components:u={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:w="input",inputProps:b={},inputRef:x,maxRows:E,minRows:I,multiline:A=!1,name:k,onBlur:O,onChange:L,onClick:N,onFocus:H,onKeyDown:G,onKeyUp:z,placeholder:D,readOnly:F,renderSuffix:j,rows:V,slotProps:W={},slots:K={},startAdornment:X,type:Q="text",value:ie}=i,ce=Ne(i,$me),ue=b.value!=null?b.value:ie,{current:se}=R.useRef(ue!=null),J=R.useRef(),ae=R.useCallback(Fe=>{},[]),le=Tr(J,x,b.ref,ae),[he,pe]=R.useState(!1),ve=yf(),ye=nm({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,R.useEffect(()=>{!ve&&p&&he&&(pe(!1),O&&O())},[ve,p,he,O]);const xe=ve&&ve.onFilled,me=ve&&ve.onEmpty,be=R.useCallback(Fe=>{yC(Fe)?xe&&xe():me&&me()},[xe,me]);jo(()=>{se&&be({value:ue})},[ue,be,se]);const Ze=Fe=>{if(ye.disabled){Fe.stopPropagation();return}H&&H(Fe),b.onFocus&&b.onFocus(Fe),ve&&ve.onFocus?ve.onFocus(Fe):pe(!0)},Xe=Fe=>{O&&O(Fe),b.onBlur&&b.onBlur(Fe),ve&&ve.onBlur?ve.onBlur(Fe):pe(!1)},ct=(Fe,...Be)=>{if(!se){const Pt=Fe.target||J.current;if(Pt==null)throw new Error(Zd(1));be({value:Pt.value})}b.onChange&&b.onChange(Fe,...Be),L&&L(Fe,...Be)};R.useEffect(()=>{be(J.current)},[]);const Bt=Fe=>{J.current&&Fe.currentTarget===Fe.target&&J.current.focus(),N&&N(Fe)};let Pe=w,ze=b;A&&Pe==="input"&&(V?ze=$({type:void 0,minRows:V,maxRows:V},ze):ze=$({type:void 0,maxRows:E,minRows:I},ze),Pe=Cme);const st=Fe=>{be(Fe.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};R.useEffect(()=>{ve&&ve.setAdornedStart(!!X)},[ve,X]);const gt=$({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:A,size:ye.size,startAdornment:X,type:Q}),vt=Fme(gt),_e=K.root||u.Root||$k,je=W.root||f.root||{},Ke=K.input||u.Input||Fk;return ze=$({},ze,(r=W.input)!=null?r:f.input),C.jsxs(R.Fragment,{children:[!g&&zme,C.jsxs(_e,$({},je,!rc(_e)&&{ownerState:$({},gt,je.ownerState)},{ref:n,onClick:Bt},ce,{className:Ue(vt.root,je.className,c,F&&"MuiInputBase-readOnly"),children:[X,C.jsx($z.Provider,{value:null,children:C.jsx(Ke,$({ownerState:gt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:st,name:k,placeholder:D,readOnly:F,required:ye.required,rows:V,value:ue,onKeyDown:G,onKeyUp:z,type:Q},ze,!rc(Ke)&&{as:Pe,ownerState:$({},gt,ze.ownerState)},{ref:le,className:Ue(vt.input,ze.className,F&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:ct,onFocus:Ze}))}),v,j?j($({},ye,{startAdornment:X})):null]}))]})}),zk=jme;function Ume(e){return Ct("MuiInput",e)}const Hme=$({},Xg,It("MuiInput",["root","underline","input"])),Ib=Hme;function Wme(e){return Ct("MuiOutlinedInput",e)}const Gme=$({},Xg,It("MuiOutlinedInput",["root","notchedOutline","input"])),id=Gme;function Vme(e){return Ct("MuiFilledInput",e)}const qme=$({},Xg,It("MuiFilledInput",["root","underline","input"])),Uh=qme,Xme=Ft(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Yme=Ft(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 Kme(e){return Ct("MuiAvatar",e)}It("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Qme=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Jme=e=>{const{classes:t,variant:n,colorDefault:r}=e;return At({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Kme,t)},Zme=Ce("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&$({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),ege=Ce("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),tge=Ce(Yme,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function nge({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=R.useState(!1);return R.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const a=new Image;return a.onload=()=>{s&&o("loaded")},a.onerror=()=>{s&&o("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const rge=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:a="div",imgProps:c,sizes:u,src:f,srcSet:h,variant:p="circular"}=r,g=Ne(r,Qme);let v=null;const y=nge($({},c,{src:f,srcSet:h})),S=f||h,w=S&&y!=="error",b=$({},r,{colorDefault:!w,component:a,variant:p}),x=Jme(b);return w?v=C.jsx(ege,$({alt:i,srcSet:h,src:f,sizes:u,ownerState:b,className:x.img},c)):o!=null?v=o:S&&i?v=i[0]:v=C.jsx(tge,{ownerState:b,className:x.fallback}),C.jsx(Zme,$({as:a,ownerState:b,className:Ue(x.root,s),ref:n},g,{children:v}))}),ige=rge,oge=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],sge={entering:{opacity:1},entered:{opacity:1}},age=R.forwardRef(function(t,n){const r=Ln(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:c,in:u,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:w=i,TransitionComponent:b=Az}=t,x=Ne(t,oge),E=R.useRef(null),I=Tr(E,a.ref,n),A=D=>F=>{if(D){const j=E.current;F===void 0?D(j):D(j,F)}},k=A(p),O=A((D,F)=>{lQ(D);const j=Hg({style:S,timeout:w,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=A(h),N=A(y),H=A(D=>{const F=Hg({style:S,timeout:w,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",F),D.style.transition=r.transitions.create("opacity",F),g&&g(D)}),G=A(v),z=D=>{o&&o(E.current,D)};return C.jsx(b,$({appear:s,in:u,nodeRef:E,onEnter:O,onEntered:L,onEntering:k,onExit:H,onExited:G,onExiting:N,addEndListener:z,timeout:w},x,{children:(D,F)=>R.cloneElement(a,$({style:$({opacity:0,visibility:D==="exited"&&!u?"hidden":void 0},sge[D],S,a.props.style),ref:I},F))}))}),Hp=age;function lge(e){return Ct("MuiBackdrop",e)}It("MuiBackdrop",["root","invisible"]);const cge=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],uge=e=>{const{classes:t,invisible:n}=e;return At({root:["root",n&&"invisible"]},lge,t)},dge=Ce("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),fge=R.forwardRef(function(t,n){var r,i,o;const s=Rt({props:t,name:"MuiBackdrop"}),{children:a,className:c,component:u="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=Hp,transitionDuration:w}=s,b=Ne(s,cge),x=$({},s,{component:u,invisible:p}),E=uge(x),I=(r=v.root)!=null?r:h.root;return C.jsx(S,$({in:g,timeout:w},b,{children:C.jsx(dge,$({"aria-hidden":!0},I,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:u,className:Ue(E.root,c,I==null?void 0:I.className),ownerState:$({},x,I==null?void 0:I.ownerState),classes:E,ref:n,children:a}))}))}),jk=fge,hge=D4(),pge=dce({themeId:Mp,defaultTheme:hge,defaultClassName:"MuiBox-root",generateClassName:CX.generate}),ht=pge;function mge(e){return Ct("MuiButton",e)}const gge=It("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"]),O_=gge,vge=R.createContext({}),yge=vge,bge=R.createContext(void 0),xge=bge,wge=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_ge=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${De(t)}`,`size${De(i)}`,`${o}Size${De(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${De(i)}`],endIcon:["endIcon",`iconSize${De(i)}`]},c=At(a,mge,s);return $({},s,c)},EQ=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}}),Sge=Ce(Ku,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${De(n.color)}`],t[`size${De(n.size)}`],t[`${n.variant}Size${De(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:kn(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})`:kn(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})`:kn(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]}),[`&.${O_.focusVisible}`]:$({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${O_.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 ${kn(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"},[`&.${O_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${O_.disabled}`]:{boxShadow:"none"}}),Ege=Ce("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${De(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},EQ(e))),Cge=Ce("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${De(n.size)}`]]}})(({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},EQ(e))),Tge=R.forwardRef(function(t,n){const r=R.useContext(yge),i=R.useContext(xge),o=v4(r,t),s=Rt({props:o,name:"MuiButton"}),{children:a,color:c="primary",component:u="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:w="medium",startIcon:b,type:x,variant:E="text"}=s,I=Ne(s,wge),A=$({},s,{color:c,component:u,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:w,type:x,variant:E}),k=_ge(A),O=b&&C.jsx(Ege,{className:k.startIcon,ownerState:A,children:b}),L=v&&C.jsx(Cge,{className:k.endIcon,ownerState:A,children:v}),N=i||"";return C.jsxs(Sge,$({ownerState:A,className:Ue(r.className,k.root,f,N),component:u,disabled:h,focusRipple:!g,focusVisibleClassName:Ue(k.focusVisible,y),ref:n,type:x},I,{classes:k,children:[O,a,L]}))}),Fz=Tge;function kge(e){return Ct("MuiCard",e)}It("MuiCard",["root"]);const Age=["className","raised"],Ige=e=>{const{classes:t}=e;return At({root:["root"]},kge,t)},Rge=Ce(Cv,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Pge=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ne(r,Age),a=$({},r,{raised:o}),c=Ige(a);return C.jsx(Rge,$({className:Ue(c.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),Oge=Pge;function Mge(e){return Ct("PrivateSwitchBase",e)}It("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Dge=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Lge=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${De(i)}`],input:["input"]};return At(o,Mge,t)},Nge=Ce(Ku)(({ownerState:e})=>$({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Bge=Ce("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),$ge=R.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:c,disableFocusRipple:u=!1,edge:f=!1,icon:h,id:p,inputProps:g,inputRef:v,name:y,onBlur:S,onChange:w,onFocus:b,readOnly:x,required:E=!1,tabIndex:I,type:A,value:k}=t,O=Ne(t,Dge),[L,N]=o1({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),H=yf(),G=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 X=K.target.checked;N(X),w&&w(K,X)};let F=c;H&&typeof F>"u"&&(F=H.disabled);const j=A==="checkbox"||A==="radio",V=$({},t,{checked:L,disabled:F,disableFocusRipple:u,edge:f}),W=Lge(V);return C.jsxs(Nge,$({component:"span",className:Ue(W.root,s),centerRipple:!0,focusRipple:!u,disabled:F,tabIndex:null,role:void 0,onFocus:G,onBlur:z,ownerState:V,ref:n},O,{children:[C.jsx(Bge,$({autoFocus:r,checked:i,defaultChecked:a,className:W.input,disabled:F,id:j?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:I,type:A},A==="checkbox"&&k===void 0?{}:{value:k},g)),L?o:h]}))}),CQ=$ge,Fge=Ft(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"),zge=Ft(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"),jge=Ft(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 Uge(e){return Ct("MuiCheckbox",e)}const Hge=It("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),HL=Hge,Wge=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Gge=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${De(r)}`,`size${De(i)}`]},s=At(o,Uge,t);return $({},t,s)},Vge=Ce(CQ,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,n.color!=="default"&&t[`color${De(n.color)}`]]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:kn(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${HL.checked}, &.${HL.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${HL.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),qge=C.jsx(zge,{}),Xge=C.jsx(Fge,{}),Yge=C.jsx(jge,{}),Kge=R.forwardRef(function(t,n){var r,i;const o=Rt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=qge,color:a="primary",icon:c=Xge,indeterminate:u=!1,indeterminateIcon:f=Yge,inputProps:h,size:p="medium",className:g}=o,v=Ne(o,Wge),y=u?f:c,S=u?f:s,w=$({},o,{color:a,indeterminate:u,size:p}),b=Gge(w);return C.jsx(Vge,$({type:"checkbox",inputProps:$({"data-indeterminate":u},h),icon:R.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:R.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:w,ref:n,className:Ue(b.root,g)},v,{classes:b}))}),Qge=Kge;function Jge(e){return Ct("MuiCircularProgress",e)}It("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zge=["className","color","disableShrink","size","style","thickness","value","variant"];let Uk=e=>e,dH,fH,hH,pH;const od=44,eve=hf(dH||(dH=Uk` - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -`)),tve=hf(fH||(fH=Uk` - 0% { - stroke-dasharray: 1px, 200px; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -15px; - } - - 100% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -125px; - } -`)),nve=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${De(r)}`],svg:["svg"],circle:["circle",`circle${De(n)}`,i&&"circleDisableShrink"]};return At(o,Jge,t)},rve=Ce("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(n.color)}`]]}})(({ownerState:e,theme:t})=>$({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&bv(hH||(hH=Uk` - animation: ${0} 1.4s linear infinite; - `),eve)),ive=Ce("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),ove=Ce("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${De(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>$({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&bv(pH||(pH=Uk` - animation: ${0} 1.4s ease-in-out infinite; - `),tve)),sve=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:c,thickness:u=3.6,value:f=0,variant:h="indeterminate"}=r,p=Ne(r,Zge),g=$({},r,{color:o,disableShrink:s,size:a,thickness:u,value:f,variant:h}),v=nve(g),y={},S={},w={};if(h==="determinate"){const b=2*Math.PI*((od-u)/2);y.strokeDasharray=b.toFixed(3),w["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*b).toFixed(3)}px`,S.transform="rotate(-90deg)"}return C.jsx(rve,$({className:Ue(v.root,i),style:$({width:a,height:a},S,c),ownerState:g,ref:n,role:"progressbar"},w,p,{children:C.jsx(ive,{className:v.svg,ownerState:g,viewBox:`${od/2} ${od/2} ${od} ${od}`,children:C.jsx(ove,{className:v.circle,style:y,ownerState:g,cx:od,cy:od,r:(od-u)/2,fill:"none",strokeWidth:u})})}))}),Ew=sve,ave=(e,t)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),lve=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}}),cve=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var c;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(c=a.palette)==null?void 0:c.mode}});let i=$({html:ave(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:$({margin:0},lve(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 uve(e){const t=Rt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(R.Fragment,{children:[C.jsx(SQ,{styles:i=>cve(i,r)}),n]})}function dve(e){return Ct("MuiModal",e)}It("MuiModal",["root","hidden","backdrop"]);const fve=["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"],hve=e=>{const{open:t,exited:n,classes:r}=e;return At({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},dve,r)},pve=Ce("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),mve=Ce(jk,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),gve=R.forwardRef(function(t,n){var r,i,o,s,a,c;const u=Rt({name:"MuiModal",props:t}),{BackdropComponent:f=mve,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:w={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:I=!1,disablePortal:A=!1,disableRestoreFocus:k=!1,disableScrollLock:O=!1,hideBackdrop:L=!1,keepMounted:N=!1,onBackdropClick:H,open:G,slotProps:z,slots:D}=u,F=Ne(u,fve),j=$({},u,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:I,disablePortal:A,disableRestoreFocus:k,disableScrollLock:O,hideBackdrop:L,keepMounted:N}),{getRootProps:V,getBackdropProps:W,getTransitionProps:K,portalRef:X,isTopModal:Q,exited:ie,hasTransition:ce}=pme($({},j,{rootRef:n})),ue=$({},j,{exited:ie}),se=hve(ue),J={};if(v.props.tabIndex===void 0&&(J.tabIndex="-1"),ce){const{onEnter:xe,onExited:me}=K();J.onEnter=xe,J.onExited=me}const ae=(r=(i=D==null?void 0:D.root)!=null?i:w.Root)!=null?r:pve,le=(o=(s=D==null?void 0:D.backdrop)!=null?s:w.Backdrop)!=null?o:f,he=(a=z==null?void 0:z.root)!=null?a:b.root,pe=(c=z==null?void 0:z.backdrop)!=null?c:b.backdrop,ve=ti({elementType:ae,externalSlotProps:he,externalForwardedProps:F,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ue,className:Ue(p,he==null?void 0:he.className,se==null?void 0:se.root,!ue.open&&ue.exited&&(se==null?void 0:se.hidden))}),ye=ti({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>W($({},xe,{onClick:me=>{H&&H(me),xe!=null&&xe.onClick&&xe.onClick(me)}})),className:Ue(pe==null?void 0:pe.className,h==null?void 0:h.className,se==null?void 0:se.backdrop),ownerState:ue});return!N&&!G&&(!ce||ie)?null:C.jsx(bQ,{ref:X,container:y,disablePortal:A,children:C.jsxs(ae,$({},ve,{children:[!L&&f?C.jsx(le,$({},ye)):null,C.jsx(Hhe,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:Q,open:G,children:R.cloneElement(v,J)})]}))})}),TQ=gve;function vve(e){return Ct("MuiDialog",e)}const yve=It("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),WL=yve,bve=R.createContext({}),xve=bve,wve=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],_ve=Ce(jk,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Sve=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${De(n)}`],paper:["paper",`paperScroll${De(n)}`,`paperWidth${De(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return At(s,vve,t)},Eve=Ce(TQ,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Cve=Ce("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${De(n.scroll)}`]]}})(({ownerState:e})=>$({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Tve=Ce(Cv,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${De(n.scroll)}`],t[`paperWidth${De(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>$({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${WL.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}`,[`&.${WL.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,[`&.${WL.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),kve=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiDialog"}),i=Ln(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:c,BackdropProps:u,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:w,open:b,PaperComponent:x=Cv,PaperProps:E={},scroll:I="paper",TransitionComponent:A=Hp,transitionDuration:k=o,TransitionProps:O}=r,L=Ne(r,wve),N=$({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:I}),H=Sve(N),G=R.useRef(),z=V=>{G.current=V.target===V.currentTarget},D=V=>{G.current&&(G.current=null,S&&S(V),w&&w(V,"backdropClick"))},F=m4(a),j=R.useMemo(()=>({titleId:F}),[F]);return C.jsx(Eve,$({className:Ue(H.root,h),closeAfterTransition:!0,components:{Backdrop:_ve},componentsProps:{backdrop:$({transitionDuration:k,as:c},u)},disableEscapeKeyDown:p,onClose:w,open:b,ref:n,onClick:D,ownerState:N},L,{children:C.jsx(A,$({appear:!0,in:b,timeout:k,role:"presentation"},O,{children:C.jsx(Cve,{className:Ue(H.container),onMouseDown:z,ownerState:N,children:C.jsx(Tve,$({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":F},E,{className:Ue(H.paper,E.className),ownerState:N,children:C.jsx(xve.Provider,{value:j,children:f})}))})}))}))}),Ave=kve;function Ive(e){return Ct("MuiDivider",e)}const Rve=It("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),mH=Rve,Pve=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Ove=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:c}=e;return At({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Ive,r)},Mve=Ce("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:kn(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%"}})),Dve=Ce("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),kQ=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:c=!1,light:u=!1,orientation:f="horizontal",role:h=a!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Ne(r,Pve),y=$({},r,{absolute:i,component:a,flexItem:c,light:u,orientation:f,role:h,textAlign:p,variant:g}),S=Ove(y);return C.jsx(Mve,$({as:a,className:Ue(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(Dve,{className:S.wrapper,ownerState:y,children:o}):null}))});kQ.muiSkipListHighlight=!0;const Qu=kQ,Lve=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Nve=e=>{const{classes:t,disableUnderline:n}=e,i=At({root:["root",!n&&"underline"],input:["input"]},Vme,t);return $({},t,i)},Bve=Ce($k,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nk(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Uh.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Uh.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Uh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Uh.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(.${Uh.disabled}, .${Uh.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Uh.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}))}),$ve=Ce(Fk,{name:"MuiFilledInput",slot:"Input",overridesResolver:Bk})(({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})),AQ=R.forwardRef(function(t,n){var r,i,o,s;const a=Rt({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=a,S=Ne(a,Lve),w=$({},a,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=Nve(a),x={root:{ownerState:w},input:{ownerState:w}},E=g??u?ns(g??u,x):x,I=(r=(i=v.root)!=null?i:c.Root)!=null?r:Bve,A=(o=(s=v.input)!=null?s:c.Input)!=null?o:$ve;return C.jsx(zk,$({slots:{root:I,input:A},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});AQ.muiName="Input";const IQ=AQ;function Fve(e){return Ct("MuiFormControl",e)}It("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const zve=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],jve=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${De(n)}`,r&&"fullWidth"]};return At(i,Fve,t)},Uve=Ce("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,t[`margin${De(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Hve=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:c=!1,error:u=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,w=Ne(r,zve),b=$({},r,{color:s,component:a,disabled:c,error:u,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=jve(b),[E,I]=R.useState(()=>{let z=!1;return i&&R.Children.forEach(i,D=>{if(!QS(D,["Input","Select"]))return;const F=QS(D,["Select"])?D.props.input:D;F&&Lme(F.props)&&(z=!0)}),z}),[A,k]=R.useState(()=>{let z=!1;return i&&R.Children.forEach(i,D=>{QS(D,["Input","Select"])&&(yC(D.props,!0)||yC(D.props.inputProps,!0))&&(z=!0)}),z}),[O,L]=R.useState(!1);c&&O&&L(!1);const N=f!==void 0&&!c?f:O;let H;const G=R.useMemo(()=>({adornedStart:E,setAdornedStart:I,color:s,disabled:c,error:u,filled:A,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,u,A,N,h,p,H,v,y,S]);return C.jsx($z.Provider,{value:G,children:C.jsx(Uve,$({as:a,ownerState:b,className:Ue(x.root,o),ref:n},w,{children:i}))})}),Wve=Hve,Gve=zce({createStyledComponent:Ce("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Rt({props:e,name:"MuiStack"})}),nf=Gve;function Vve(e){return Ct("MuiFormControlLabel",e)}const qve=It("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),lx=qve,Xve=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Yve=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${De(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return At(s,Vve,t)},Kve=Ce("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${lx.label}`]:t.label},t.root,t[`labelPlacement${De(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>$({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${lx.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},{[`& .${lx.label}`]:{[`&.${lx.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Qve=Ce("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${lx.error}`]:{color:(e.vars||e).palette.error.main}})),Jve=R.forwardRef(function(t,n){var r,i;const o=Rt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:c,disabled:u,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Ne(o,Xve),S=yf(),w=(r=u??c.props.disabled)!=null?r:S==null?void 0:S.disabled,b=g??c.props.required,x={disabled:w,required:b};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof c.props[L]>"u"&&typeof o[L]<"u"&&(x[L]=o[L])});const E=nm({props:o,muiFormControl:S,states:["error"]}),I=$({},o,{disabled:w,labelPlacement:p,required:b,error:E.error}),A=Yve(I),k=(i=v.typography)!=null?i:a.typography;let O=h;return O!=null&&O.type!==Ut&&!f&&(O=C.jsx(Ut,$({component:"span"},k,{className:Ue(A.label,k==null?void 0:k.className),children:O}))),C.jsxs(Kve,$({className:Ue(A.root,s),ownerState:I,ref:n},y,{children:[R.cloneElement(c,x),b?C.jsxs(nf,{direction:"row",alignItems:"center",children:[O,C.jsxs(Qve,{ownerState:I,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}):O]}))}),Zve=Jve;function eye(e){return Ct("MuiFormHelperText",e)}const tye=It("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),gH=tye;var vH;const nye=["children","className","component","disabled","error","filled","focused","margin","required","variant"],rye=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:c}=e,u={root:["root",i&&"disabled",o&&"error",r&&`size${De(r)}`,n&&"contained",a&&"focused",s&&"filled",c&&"required"]};return At(u,eye,t)},iye=Ce("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${De(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${gH.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${gH.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),oye=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ne(r,nye),c=yf(),u=nm({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=$({},r,{component:s,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),h=rye(f);return C.jsx(iye,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},a,{children:i===" "?vH||(vH=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),sye=oye;function aye(e){return Ct("MuiFormLabel",e)}const lye=It("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),$x=lye,cye=["children","className","color","component","disabled","error","filled","focused","required"],uye=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,c={root:["root",`color${De(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return At(c,aye,t)},dye=Ce("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>$({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>$({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${$x.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${$x.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$x.error}`]:{color:(e.vars||e).palette.error.main}})),fye=Ce("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${$x.error}`]:{color:(e.vars||e).palette.error.main}})),hye=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ne(r,cye),c=yf(),u=nm({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=$({},r,{color:u.color||"primary",component:s,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),h=uye(f);return C.jsxs(dye,$({as:s,ownerState:f,className:Ue(h.root,o),ref:n},a,{children:[i,u.required&&C.jsxs(fye,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),pye=hye,mye=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function r3(e){return`scale(${e}, ${e**2})`}const gye={entering:{opacity:1,transform:r3(1)},entered:{opacity:1,transform:"none"}},GL=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),RQ=R.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:c,onEntered:u,onEntering:f,onExit:h,onExited:p,onExiting:g,style:v,timeout:y="auto",TransitionComponent:S=Az}=t,w=Ne(t,mye),b=R.useRef(),x=R.useRef(),E=Ln(),I=R.useRef(null),A=Tr(I,o.ref,n),k=F=>j=>{if(F){const V=I.current;j===void 0?F(V):F(V,j)}},O=k(f),L=k((F,j)=>{lQ(F);const{duration:V,delay:W,easing:K}=Hg({style:v,timeout:y,easing:s},{mode:"enter"});let X;y==="auto"?(X=E.transitions.getAutoHeightDuration(F.clientHeight),x.current=X):X=V,F.style.transition=[E.transitions.create("opacity",{duration:X,delay:W}),E.transitions.create("transform",{duration:GL?X:X*.666,delay:W,easing:K})].join(","),c&&c(F,j)}),N=k(u),H=k(g),G=k(F=>{const{duration:j,delay:V,easing:W}=Hg({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:GL?K:K*.666,delay:GL?V:V||K*.333,easing:W})].join(","),F.style.opacity=0,F.style.transform=r3(.75),h&&h(F)}),z=k(p),D=F=>{y==="auto"&&(b.current=setTimeout(F,x.current||0)),r&&r(I.current,F)};return R.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,$({appear:i,in:a,nodeRef:I,onEnter:L,onEntered:N,onEntering:O,onExit:G,onExited:z,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},w,{children:(F,j)=>R.cloneElement(o,$({style:$({opacity:0,transform:r3(.75),visibility:F==="exited"&&!a?"hidden":void 0},gye[F],v,o.props.style),ref:A},j))}))});RQ.muiSupportAuto=!0;const bC=RQ;function vye(e,t,n,r,i){const[o,s]=R.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return jo(()=>{let a=!0;if(!n)return;const c=n(e),u=()=>{a&&s(c.matches)};return u(),c.addListener(u),()=>{a=!1,c.removeListener(u)}},[e,n]),o}const PQ=jE["useSyncExternalStore"];function yye(e,t,n,r,i){const o=R.useCallback(()=>t,[t]),s=R.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]),[a,c]=R.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return PQ(c,a,s)}function bye(e,t={}){const n=ik(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=JX({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(PQ!==void 0?yye:vye)(c,i,o,s,a)}const xye=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],wye=e=>{const{classes:t,disableUnderline:n}=e,i=At({root:["root",!n&&"underline"],input:["input"]},Ume,t);return $({},t,i)},_ye=Ce($k,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nk(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"},[`&.${Ib.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ib.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(.${Ib.disabled}, .${Ib.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Ib.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Sye=Ce(Fk,{name:"MuiInput",slot:"Input",overridesResolver:Bk})({}),OQ=R.forwardRef(function(t,n){var r,i,o,s;const a=Rt({props:t,name:"MuiInput"}),{disableUnderline:c,components:u={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=a,w=Ne(a,xye),b=wye(a),E={root:{ownerState:{disableUnderline:c}}},I=v??f?ns(v??f,E):E,A=(r=(i=y.root)!=null?i:u.Root)!=null?r:_ye,k=(o=(s=y.input)!=null?s:u.Input)!=null?o:Sye;return C.jsx(zk,$({slots:{root:A,input:k},slotProps:I,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},w,{classes:b}))});OQ.muiName="Input";const MQ=OQ;function Eye(e){return Ct("MuiInputLabel",e)}It("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Cye=["disableAnimation","margin","shrink","variant","className"],Tye=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,c={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${De(r)}`,s],asterisk:[a&&"asterisk"]},u=At(c,Eye,t);return $({},t,u)},kye=Ce(pye,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$x.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)"}))),Aye=R.forwardRef(function(t,n){const r=Rt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ne(r,Cye),c=yf();let u=o;typeof u>"u"&&c&&(u=c.filled||c.focused||c.adornedStart);const f=nm({props:r,muiFormControl:c,states:["size","variant","required"]}),h=$({},r,{disableAnimation:i,formControl:c,shrink:u,size:f.size,variant:f.variant,required:f.required}),p=Tye(h);return C.jsx(kye,$({"data-shrink":u,ownerState:h,ref:n,className:Ue(p.root,s)},a,{classes:p}))}),Iye=Aye;function Rye(e){return Ct("MuiLinearProgress",e)}It("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Pye=["className","color","value","valueBuffer","variant"];let Tv=e=>e,yH,bH,xH,wH,_H,SH;const i3=4,Oye=hf(yH||(yH=Tv` - 0% { - left: -35%; - right: 100%; - } - - 60% { - left: 100%; - right: -90%; - } - - 100% { - left: 100%; - right: -90%; - } -`)),Mye=hf(bH||(bH=Tv` - 0% { - left: -200%; - right: 100%; - } - - 60% { - left: 107%; - right: -8%; - } - - 100% { - left: 107%; - right: -8%; - } -`)),Dye=hf(xH||(xH=Tv` - 0% { - opacity: 1; - background-position: 0 -23px; - } - - 60% { - opacity: 0; - background-position: 0 -23px; - } - - 100% { - opacity: 1; - background-position: -200px -23px; - } -`)),Lye=e=>{const{classes:t,variant:n,color:r}=e,i={root:["root",`color${De(r)}`,n],dashed:["dashed",`dashedColor${De(r)}`],bar1:["bar",`barColor${De(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${De(r)}`,n==="buffer"&&`color${De(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return At(i,Rye,t)},zz=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?wv(e.palette[t].main,.62):xv(e.palette[t].main,.5),Nye=Ce("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>$({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:zz(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)"})),Bye=Ce("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${De(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=zz(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"})},bv(wH||(wH=Tv` - animation: ${0} 3s infinite linear; - `),Dye)),$ye=Ce("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${De(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.variant==="determinate"&&{transition:`transform .${i3}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${i3}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&bv(_H||(_H=Tv` - width: auto; - animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `),Oye)),Fye=Ce("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${De(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>$({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:zz(t,e.color),transition:`transform .${i3}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&bv(SH||(SH=Tv` - width: auto; - animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `),Mye)),zye=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:a,variant:c="indeterminate"}=r,u=Ne(r,Pye),f=$({},r,{color:o,variant:c}),h=Lye(f),p=Ln(),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"&&a!==void 0){let y=(a||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(Nye,$({className:Ue(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},u,{children:[c==="buffer"?C.jsx(Bye,{className:h.dashed,ownerState:f}):null,C.jsx($ye,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(Fye,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),jye=zye,Uye=R.createContext({}),Ta=Uye;function Hye(e){return Ct("MuiList",e)}It("MuiList",["root","padding","dense","subheader"]);const Wye=["children","className","component","dense","disablePadding","subheader"],Gye=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return At({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Hye,t)},Vye=Ce("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),qye=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:c=!1,subheader:u}=r,f=Ne(r,Wye),h=R.useMemo(()=>({dense:a}),[a]),p=$({},r,{component:s,dense:a,disablePadding:c}),g=Gye(p);return C.jsx(Ta.Provider,{value:h,children:C.jsxs(Vye,$({as:s,className:Ue(g.root,o),ref:n,ownerState:p},f,{children:[u,i]}))})}),Yg=qye;function Xye(e){return Ct("MuiListItem",e)}const Yye=It("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Mm=Yye;function Kye(e){return Ct("MuiListItemButton",e)}const Qye=It("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Dm=Qye,Jye=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Zye=(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]},e0e=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,u=At({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Kye,n);return $({},n,u)},t0e=Ce(Ku,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Zye})(({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"}},[`&.${Dm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Dm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:kn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Dm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:kn(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})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Dm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Dm.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})),n0e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:c=!1,disableGutters:u=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Ne(r,Jye),y=R.useContext(Ta),S=R.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:u}),[i,y.dense,c,u]),w=R.useRef(null);jo(()=>{o&&w.current&&w.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:S.dense,disableGutters:u,divider:f,selected:p}),x=e0e(b),E=Tr(w,n);return C.jsx(Ta.Provider,{value:S,children:C.jsx(t0e,$({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:Ue(x.focusVisible,h),ownerState:b,className:Ue(x.root,g)},v,{classes:x,children:a}))})}),o3=n0e;function r0e(e){return Ct("MuiListItemSecondaryAction",e)}It("MuiListItemSecondaryAction",["root","disableGutters"]);const i0e=["className"],o0e=e=>{const{disableGutters:t,classes:n}=e;return At({root:["root",t&&"disableGutters"]},r0e,n)},s0e=Ce("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),DQ=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ne(r,i0e),s=R.useContext(Ta),a=$({},r,{disableGutters:s.disableGutters}),c=o0e(a);return C.jsx(s0e,$({className:Ue(c.root,i),ownerState:a,ref:n},o))});DQ.muiName="ListItemSecondaryAction";const a0e=DQ,l0e=["className"],c0e=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],u0e=(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]},d0e=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:c,hasSecondaryAction:u,selected:f}=e;return At({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",f&&"selected"],container:["container"]},Xye,r)},f0e=Ce("div",{name:"MuiListItem",slot:"Root",overridesResolver:u0e})(({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&&{[`& > .${Dm.root}`]:{paddingRight:48}},{[`&.${Mm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:kn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mm.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"}},[`&.${Mm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:kn(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})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),h0e=Ce("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),p0e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:c,component:u,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:w=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:I=!1,slotProps:A={},slots:k={}}=r,O=Ne(r.ContainerProps,l0e),L=Ne(r,c0e),N=R.useContext(Ta),H=R.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),G=R.useRef(null);jo(()=>{o&&G.current&&G.current.focus()},[o]);const z=R.Children.toArray(a),D=z.length&&QS(z[z.length-1],["ListItemSecondaryAction"]),F=$({},r,{alignItems:i,autoFocus:o,button:s,dense:H.dense,disabled:y,disableGutters:S,disablePadding:w,divider:b,hasSecondaryAction:D,selected:I}),j=d0e(F),V=Tr(G,n),W=k.root||f.Root||f0e,K=A.root||h.root||{},X=$({className:Ue(j.root,K.className,c),disabled:y},L);let Q=u||"li";return s&&(X.component=u||"div",X.focusVisibleClassName=Ue(Mm.focusVisible,x),Q=Ku),D?(Q=!X.component&&!u?"div":Q,p==="li"&&(Q==="li"?Q="div":X.component==="li"&&(X.component="div")),C.jsx(Ta.Provider,{value:H,children:C.jsxs(h0e,$({as:p,className:Ue(j.container,g),ref:V,ownerState:F},O,{children:[C.jsx(W,$({},K,!rc(W)&&{as:Q,ownerState:$({},F,K.ownerState)},X,{children:z})),z.pop()]}))})):C.jsx(Ta.Provider,{value:H,children:C.jsxs(W,$({},K,{as:Q,ref:V},!rc(W)&&{ownerState:$({},F,K.ownerState)},X,{children:[z,E&&C.jsx(a0e,{children:E})]}))})}),Fx=p0e;function m0e(e){return Ct("MuiListItemAvatar",e)}It("MuiListItemAvatar",["root","alignItemsFlexStart"]);const g0e=["className"],v0e=e=>{const{alignItems:t,classes:n}=e;return At({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},m0e,n)},y0e=Ce("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>$({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),b0e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Ne(r,g0e),s=R.useContext(Ta),a=$({},r,{alignItems:s.alignItems}),c=v0e(a);return C.jsx(y0e,$({className:Ue(c.root,i),ownerState:a,ref:n},o))}),x0e=b0e;function w0e(e){return Ct("MuiListItemIcon",e)}const _0e=It("MuiListItemIcon",["root","alignItemsFlexStart"]),EH=_0e,S0e=["className"],E0e=e=>{const{alignItems:t,classes:n}=e;return At({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},w0e,n)},C0e=Ce("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),T0e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ne(r,S0e),s=R.useContext(Ta),a=$({},r,{alignItems:s.alignItems}),c=E0e(a);return C.jsx(C0e,$({className:Ue(c.root,i),ownerState:a,ref:n},o))}),Gd=T0e;function k0e(e){return Ct("MuiListItemText",e)}const A0e=It("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),xC=A0e,I0e=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],R0e=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return At({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},k0e,t)},P0e=Ce("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${xC.primary}`]:t.primary},{[`& .${xC.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})),O0e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:c,primaryTypographyProps:u,secondary:f,secondaryTypographyProps:h}=r,p=Ne(r,I0e),{dense:g}=R.useContext(Ta);let v=c??i,y=f;const S=$({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!y,dense:g}),w=R0e(S);return v!=null&&v.type!==Ut&&!s&&(v=C.jsx(Ut,$({variant:g?"body2":"body1",className:w.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:v}))),y!=null&&y.type!==Ut&&!s&&(y=C.jsx(Ut,$({variant:"body2",className:w.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(P0e,$({className:Ue(w.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),oc=O0e,M0e=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function VL(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function CH(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function LQ(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 Rb(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const c=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!LQ(a,o)||c)a=i(e,a,n);else return a.focus(),!0}return!1}const D0e=R.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:f,variant:h="selectedMenu"}=t,p=Ne(t,M0e),g=R.useRef(null),v=R.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});jo(()=>{i&&g.current.focus()},[i]),R.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const I=!g.current.style.width;if(x.clientHeight{const E=g.current,I=x.key,A=Fr(E).activeElement;if(I==="ArrowDown")x.preventDefault(),Rb(E,A,u,c,VL);else if(I==="ArrowUp")x.preventDefault(),Rb(E,A,u,c,CH);else if(I==="Home")x.preventDefault(),Rb(E,null,u,c,VL);else if(I==="End")x.preventDefault(),Rb(E,null,u,c,CH);else if(I.length===1){const k=v.current,O=I.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=A&&!k.repeating&&LQ(A,k);k.previousKeyMatched&&(N||Rb(E,A,!1,c,VL,k))?x.preventDefault():k.previousKeyMatched=!1}f&&f(x)},S=Tr(g,n);let w=-1;R.Children.forEach(s,(x,E)=>{if(!R.isValidElement(x)){w===E&&(w+=1,w>=s.length&&(w=-1));return}x.props.disabled||(h==="selectedMenu"&&x.props.selected||w===-1)&&(w=E),w===E&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(w+=1,w>=s.length&&(w=-1))});const b=R.Children.map(s,(x,E)=>{if(E===w){const I={};return o&&(I.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(I.tabIndex=0),R.cloneElement(x,I)}return x});return C.jsx(Yg,$({role:"menu",ref:S,className:a,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),Hk=D0e;function L0e(e){return Ct("MuiPopover",e)}It("MuiPopover",["root","paper"]);const N0e=["onEntering"],B0e=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],$0e=["slotProps"];function TH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function kH(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function AH(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function qL(e){return typeof e=="function"?e():e}const F0e=e=>{const{classes:t}=e;return At({root:["root"],paper:["paper"]},L0e,t)},z0e=Ce(TQ,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),NQ=Ce(Cv,{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}),j0e=R.forwardRef(function(t,n){var r,i,o;const s=Rt({props:t,name:"MuiPopover"}),{action:a,anchorEl:c,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:w,PaperProps:b={},slots:x,slotProps:E,transformOrigin:I={vertical:"top",horizontal:"left"},TransitionComponent:A=bC,transitionDuration:k="auto",TransitionProps:{onEntering:O}={},disableScrollLock:L=!1}=s,N=Ne(s.TransitionProps,N0e),H=Ne(s,B0e),G=(r=E==null?void 0:E.paper)!=null?r:b,z=R.useRef(),D=Tr(z,G.ref),F=$({},s,{anchorOrigin:u,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:G,transformOrigin:I,TransitionComponent:A,transitionDuration:k,TransitionProps:N}),j=F0e(F),V=R.useCallback(()=>{if(h==="anchorPosition")return f;const xe=qL(c),be=(xe&&xe.nodeType===1?xe:Fr(z.current).body).getBoundingClientRect();return{top:be.top+TH(be,u.vertical),left:be.left+kH(be,u.horizontal)}},[c,u.horizontal,u.vertical,f,h]),W=R.useCallback(xe=>({vertical:TH(xe,I.vertical),horizontal:kH(xe,I.horizontal)}),[I.horizontal,I.vertical]),K=R.useCallback(xe=>{const me={width:xe.offsetWidth,height:xe.offsetHeight},be=W(me);if(h==="none")return{top:null,left:null,transformOrigin:AH(be)};const Ze=V();let Xe=Ze.top-be.vertical,ct=Ze.left-be.horizontal;const Bt=Xe+me.height,Pe=ct+me.width,ze=Nu(qL(c)),st=ze.innerHeight-S,gt=ze.innerWidth-S;if(S!==null&&Xest){const vt=Bt-st;Xe-=vt,be.vertical+=vt}if(S!==null&&ctgt){const vt=Pe-gt;ct-=vt,be.horizontal+=vt}return{top:`${Math.round(Xe)}px`,left:`${Math.round(ct)}px`,transformOrigin:AH(be)}},[c,h,V,W,S]),[X,Q]=R.useState(w),ie=R.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,Q(!0)},[K]);R.useEffect(()=>(L&&window.addEventListener("scroll",ie),()=>window.removeEventListener("scroll",ie)),[c,L,ie]);const ce=(xe,me)=>{O&&O(xe,me),ie()},ue=()=>{Q(!1)};R.useEffect(()=>{w&&ie()}),R.useImperativeHandle(a,()=>w?{updatePosition:()=>{ie()}}:null,[w,ie]),R.useEffect(()=>{if(!w)return;const xe=MT(()=>{ie()}),me=Nu(c);return me.addEventListener("resize",xe),()=>{xe.clear(),me.removeEventListener("resize",xe)}},[c,w,ie]);let se=k;k==="auto"&&!A.muiSupportAuto&&(se=void 0);const J=v||(c?Fr(qL(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:z0e,le=(o=x==null?void 0:x.paper)!=null?o:NQ,he=ti({elementType:le,externalSlotProps:$({},G,{style:X?G.style:$({},G.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:F,className:Ue(j.paper,G==null?void 0:G.className)}),pe=ti({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:J,open:w},ownerState:F,className:Ue(j.root,g)}),{slotProps:ve}=pe,ye=Ne(pe,$0e);return C.jsx(ae,$({},ye,!rc(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(A,$({appear:!0,in:w,onEntering:ce,onExited:ue,timeout:se},N,{children:C.jsx(le,$({},he,{children:p}))}))}))}),U0e=j0e;function H0e(e){return Ct("MuiMenu",e)}It("MuiMenu",["root","paper","list"]);const W0e=["onEntering"],G0e=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],V0e={vertical:"top",horizontal:"right"},q0e={vertical:"top",horizontal:"left"},X0e=e=>{const{classes:t}=e;return At({root:["root"],paper:["paper"],list:["list"]},H0e,t)},Y0e=Ce(U0e,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),K0e=Ce(NQ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Q0e=Ce(Hk,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),J0e=R.forwardRef(function(t,n){var r,i;const o=Rt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:c,disableAutoFocusItem:u=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:w="selectedMenu",slots:b={},slotProps:x={}}=o,E=Ne(o.TransitionProps,W0e),I=Ne(o,G0e),A=Ln(),k=A.direction==="rtl",O=$({},o,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:w}),L=X0e(O),N=s&&!u&&p,H=R.useRef(null),G=(K,X)=>{H.current&&H.current.adjustStyleForScrollbar(K,A),S&&S(K,X)},z=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;R.Children.map(a,(K,X)=>{R.isValidElement(K)&&(K.props.disabled||(w==="selectedMenu"&&K.props.selected||D===-1)&&(D=X))});const F=(r=b.paper)!=null?r:K0e,j=(i=x.paper)!=null?i:g,V=ti({elementType:b.root,externalSlotProps:x.root,ownerState:O,className:[L.root,c]}),W=ti({elementType:F,externalSlotProps:j,ownerState:O,className:L.paper});return C.jsx(Y0e,$({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?V0e:q0e,slots:{paper:F,root:b.root},slotProps:{root:V,paper:W},open:p,ref:n,transitionDuration:y,TransitionProps:$({onEntering:G},E),ownerState:O},I,{classes:v,children:C.jsx(Q0e,$({onKeyDown:z,actions:H,autoFocus:s&&(D===-1||u),autoFocusItem:N,variant:w},f,{className:Ue(L.list,f.className),children:a}))}))}),rm=J0e;function Z0e(e){return Ct("MuiMenuItem",e)}const ebe=It("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Pb=ebe,tbe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],nbe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},rbe=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=At({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Z0e,s);return $({},s,c)},ibe=Ce(Ku,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:nbe})(({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"}},[`&.${Pb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Pb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:kn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Pb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:kn(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})`:kn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Pb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Pb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${mH.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${mH.inset}`]:{marginLeft:52},[`& .${xC.root}`]:{marginTop:0,marginBottom:0},[`& .${xC.inset}`]:{paddingLeft:36},[`& .${EH.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${EH.root} svg`]:{fontSize:"1.25rem"}}))),obe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:c=!1,focusVisibleClassName:u,role:f="menuitem",tabIndex:h,className:p}=r,g=Ne(r,tbe),v=R.useContext(Ta),y=R.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=R.useRef(null);jo(()=>{i&&S.current&&S.current.focus()},[i]);const w=$({},r,{dense:y.dense,divider:a,disableGutters:c}),b=rbe(r),x=Tr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(Ta.Provider,{value:y,children:C.jsx(ibe,$({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:Ue(b.focusVisible,u),className:Ue(b.root,p)},g,{ownerState:w,classes:b}))})}),Pu=obe;function sbe(e){return Ct("MuiNativeSelect",e)}const abe=It("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jz=abe,lbe=["className","disabled","error","IconComponent","inputRef","variant"],cbe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${De(n)}`,o&&"iconOpen",r&&"disabled"]};return At(a,sbe,t)},BQ=({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"},[`&.${jz.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}}),ube=Ce("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Da,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${jz.multiple}`]:t.multiple}]}})(BQ),$Q=({ownerState:e,theme:t})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${jz.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),dbe=Ce("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})($Q),fbe=R.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:c="standard"}=t,u=Ne(t,lbe),f=$({},t,{disabled:i,variant:c,error:o}),h=cbe(f);return C.jsxs(R.Fragment,{children:[C.jsx(ube,$({ownerState:f,className:Ue(h.select,r),disabled:i,ref:a||n},u)),t.multiple?null:C.jsx(dbe,{as:s,ownerState:f,className:h.icon})]})}),hbe=fbe;var IH;const pbe=["children","classes","className","label","notched"],mbe=Ce("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),gbe=Ce("legend")(({ownerState:e,theme:t})=>$({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function vbe(e){const{className:t,label:n,notched:r}=e,i=Ne(e,pbe),o=n!=null&&n!=="",s=$({},e,{notched:r,withLabel:o});return C.jsx(mbe,$({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(gbe,{ownerState:s,children:o?C.jsx("span",{children:n}):IH||(IH=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const ybe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],bbe=e=>{const{classes:t}=e,r=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Wme,t);return $({},t,r)},xbe=Ce($k,{shouldForwardProp:e=>Da(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Nk})(({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 .${id.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${id.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${id.focused} .${id.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${id.error} .${id.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${id.disabled} .${id.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"}))}),wbe=Ce(vbe,{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}}),_be=Ce(Fk,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Bk})(({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})),FQ=R.forwardRef(function(t,n){var r,i,o,s,a;const c=Rt({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,w=Ne(c,ybe),b=bbe(c),x=yf(),E=nm({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),I=$({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:x,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:g,size:E.size,type:S}),A=(r=(i=y.root)!=null?i:u.Root)!=null?r:xbe,k=(o=(s=y.input)!=null?s:u.Input)!=null?o:_be;return C.jsx(zk,$({slots:{root:A,input:k},renderSuffix:O=>C.jsx(wbe,{ownerState:I,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?a||(a=C.jsxs(R.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},w,{classes:$({},b,{notchedOutline:null})}))});FQ.muiName="Input";const zQ=FQ;function Sbe(e){return Ct("MuiSelect",e)}const Ebe=It("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Ob=Ebe;var RH;const Cbe=["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"],Tbe=Ce("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ob.select}`]:t.select},{[`&.${Ob.select}`]:t[n.variant]},{[`&.${Ob.error}`]:t.error},{[`&.${Ob.multiple}`]:t.multiple}]}})(BQ,{[`&.${Ob.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),kbe=Ce("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})($Q),Abe=Ce("input",{shouldForwardProp:e=>L4(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 PH(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Ibe(e){return e==null||typeof e=="string"&&!e.trim()}const Rbe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${De(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return At(a,Sbe,t)},Pbe=R.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:c,className:u,defaultOpen:f,defaultValue:h,disabled:p,displayEmpty:g,error:v=!1,IconComponent:y,inputRef:S,labelId:w,MenuProps:b={},multiple:x,name:E,onBlur:I,onChange:A,onClose:k,onFocus:O,onOpen:L,open:N,readOnly:H,renderValue:G,SelectDisplayProps:z={},tabIndex:D,value:F,variant:j="standard"}=t,V=Ne(t,Cbe),[W,K]=o1({controlled:F,default:h,name:"Select"}),[X,Q]=o1({controlled:N,default:f,name:"Select"}),ie=R.useRef(null),ce=R.useRef(null),[ue,se]=R.useState(null),{current:J}=R.useRef(N!=null),[ae,le]=R.useState(),he=Tr(n,S),pe=R.useCallback(Ie=>{ce.current=Ie,Ie&&se(Ie)},[]),ve=ue==null?void 0:ue.parentNode;R.useImperativeHandle(he,()=>({focus:()=>{ce.current.focus()},node:ie.current,value:W}),[W]),R.useEffect(()=>{f&&X&&ue&&!J&&(le(a?null:ve.clientWidth),ce.current.focus())},[ue,a]),R.useEffect(()=>{s&&ce.current.focus()},[s]),R.useEffect(()=>{if(!w)return;const Ie=Fr(ce.current).getElementById(w);if(Ie){const at=()=>{getSelection().isCollapsed&&ce.current.focus()};return Ie.addEventListener("click",at),()=>{Ie.removeEventListener("click",at)}}},[w]);const ye=(Ie,at)=>{Ie?L&&L(at):k&&k(at),J||(le(a?null:ve.clientWidth),Q(Ie))},xe=Ie=>{Ie.button===0&&(Ie.preventDefault(),ce.current.focus(),ye(!0,Ie))},me=Ie=>{ye(!1,Ie)},be=R.Children.toArray(c),Ze=Ie=>{const at=be.find(zt=>zt.props.value===Ie.target.value);at!==void 0&&(K(at.props.value),A&&A(Ie,at))},Xe=Ie=>at=>{let zt;if(at.currentTarget.hasAttribute("tabindex")){if(x){zt=Array.isArray(W)?W.slice():[];const Re=W.indexOf(Ie.props.value);Re===-1?zt.push(Ie.props.value):zt.splice(Re,1)}else zt=Ie.props.value;if(Ie.props.onClick&&Ie.props.onClick(at),W!==zt&&(K(zt),A)){const Re=at.nativeEvent||at,He=new Re.constructor(Re.type,Re);Object.defineProperty(He,"target",{writable:!0,value:{value:zt,name:E}}),A(He,Ie)}x||ye(!1,at)}},ct=Ie=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ie.key)!==-1&&(Ie.preventDefault(),ye(!0,Ie))},Bt=ue!==null&&X,Pe=Ie=>{!Bt&&I&&(Object.defineProperty(Ie,"target",{writable:!0,value:{value:W,name:E}}),I(Ie))};delete V["aria-invalid"];let ze,st;const gt=[];let vt=!1;(yC({value:W})||g)&&(G?ze=G(W):vt=!0);const _e=be.map(Ie=>{if(!R.isValidElement(Ie))return null;let at;if(x){if(!Array.isArray(W))throw new Error(Zd(2));at=W.some(zt=>PH(zt,Ie.props.value)),at&&vt&>.push(Ie.props.children)}else at=PH(W,Ie.props.value),at&&vt&&(st=Ie.props.children);return R.cloneElement(Ie,{"aria-selected":at?"true":"false",onClick:Xe(Ie),onKeyUp:zt=>{zt.key===" "&&zt.preventDefault(),Ie.props.onKeyUp&&Ie.props.onKeyUp(zt)},role:"option",selected:at,value:void 0,"data-value":Ie.props.value})});vt&&(x?gt.length===0?ze=null:ze=gt.reduce((Ie,at,zt)=>(Ie.push(at),zt{const{classes:t}=e;return t},Uz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Da(e)&&e!=="variant",slot:"Root"},Nbe=Ce(MQ,Uz)(""),Bbe=Ce(zQ,Uz)(""),$be=Ce(IQ,Uz)(""),jQ=R.forwardRef(function(t,n){const r=Rt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:f=Xme,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:w=!1,native:b=!1,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:k,variant:O="outlined"}=r,L=Ne(r,Mbe),N=b?hbe:Obe,H=yf(),G=nm({props:r,muiFormControl:H,states:["variant","error"]}),z=G.variant||O,D=$({},r,{variant:z,classes:s}),F=Lbe(D),j=Ne(F,Dbe),V=p||{standard:C.jsx(Nbe,{ownerState:D}),outlined:C.jsx(Bbe,{label:v,ownerState:D}),filled:C.jsx($be,{ownerState:D})}[z],W=Tr(n,V.ref);return C.jsx(R.Fragment,{children:R.cloneElement(V,$({inputComponent:N,inputProps:$({children:o,error:G.error,IconComponent:f,variant:z,type:void 0,multiple:w},b?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:u,labelId:y,MenuProps:S,onClose:x,onOpen:E,open:I,renderValue:A,SelectDisplayProps:$({id:h},k)},g,{classes:g?ns(j,g.classes):j},p?p.props.inputProps:{})},w&&b&&z==="outlined"?{notched:!0}:{},{ref:W,className:Ue(V.props.className,a,F.root)},!p&&{variant:z},L))})});jQ.muiName="Select";const Fbe=jQ,zbe=e=>!e||!rc(e),jbe=zbe;function Ube(e){return Ct("MuiSlider",e)}const Hbe=It("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"]),vl=Hbe,Wbe=e=>{const{open:t}=e;return{offset:Ue(t&&vl.valueLabelOpen),circle:vl.valueLabelCircle,label:vl.valueLabelLabel}};function Gbe(e){const{children:t,className:n,value:r}=e,i=Wbe(e);return t?R.cloneElement(t,{className:Ue(t.props.className)},C.jsxs(R.Fragment,{children:[t.props.children,C.jsx("span",{className:Ue(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const Vbe=["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 OH(e){return e}const qbe=Ce("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${De(n.color)}`],n.size!=="medium"&&t[`size${De(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>$({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&$({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&$({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${vl.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${vl.dragging}`]:{[`& .${vl.thumb}, & .${vl.track}`]:{transition:"none"}}})),Xbe=Ce("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>$({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),Ybe=Ce("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?wv(e.palette[t.color].main,.62):xv(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})}),Kbe=Ce("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${De(n.color)}`],n.size!=="medium"&&t[`thumbSize${De(n.size)}`]]}})(({theme:e,ownerState:t})=>$({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":$({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${vl.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:kn(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${vl.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:kn(e.palette[t.color].main,.16)}`},[`&.${vl.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Qbe=Ce(Gbe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>$({[`&.${vl.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"})),Jbe=Ce("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>L4(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})),Zbe=Ce("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>L4(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})),exe=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:c}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${De(a)}`,c&&`size${De(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${De(c)}`,a&&`thumbColor${De(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return At(u,Ube,s)},txe=({children:e})=>e,nxe=R.forwardRef(function(t,n){var r,i,o,s,a,c,u,f,h,p,g,v,y,S,w,b,x,E,I,A,k,O,L,N;const H=Rt({props:t,name:"MuiSlider"}),z=Ln().direction==="rtl",{"aria-label":D,"aria-valuetext":F,"aria-labelledby":j,component:V="span",components:W={},componentsProps:K={},color:X="primary",classes:Q,className:ie,disableSwap:ce=!1,disabled:ue=!1,getAriaLabel:se,getAriaValueText:J,marks:ae=!1,max:le=100,min:he=0,orientation:pe="horizontal",size:ve="medium",step:ye=1,scale:xe=OH,slotProps:me,slots:be,track:Ze="normal",valueLabelDisplay:Xe="off",valueLabelFormat:ct=OH}=H,Bt=Ne(H,Vbe),Pe=$({},H,{isRtl:z,max:le,min:he,classes:Q,disabled:ue,disableSwap:ce,orientation:pe,marks:ae,color:X,size:ve,step:ye,scale:xe,track:Ze,valueLabelDisplay:Xe,valueLabelFormat:ct}),{axisProps:ze,getRootProps:st,getHiddenInputProps:gt,getThumbProps:vt,open:_e,active:je,axis:Ke,focusedThumbIndex:Fe,range:Be,dragging:Pt,marks:dt,values:Ie,trackOffset:at,trackLeap:zt,getThumbStyle:Re}=wme($({},Pe,{rootRef:n}));Pe.marked=dt.length>0&&dt.some(Kn=>Kn.label),Pe.dragging=Pt,Pe.focusedThumbIndex=Fe;const He=exe(Pe),xt=(r=(i=be==null?void 0:be.root)!=null?i:W.Root)!=null?r:qbe,Vt=(o=(s=be==null?void 0:be.rail)!=null?s:W.Rail)!=null?o:Xbe,yn=(a=(c=be==null?void 0:be.track)!=null?c:W.Track)!=null?a:Ybe,Yr=(u=(f=be==null?void 0:be.thumb)!=null?f:W.Thumb)!=null?u:Kbe,Hr=(h=(p=be==null?void 0:be.valueLabel)!=null?p:W.ValueLabel)!=null?h:Qbe,Wr=(g=(v=be==null?void 0:be.mark)!=null?v:W.Mark)!=null?g:Jbe,Kr=(y=(S=be==null?void 0:be.markLabel)!=null?S:W.MarkLabel)!=null?y:Zbe,ui=(w=(b=be==null?void 0:be.input)!=null?b:W.Input)!=null?w:"input",ps=(x=me==null?void 0:me.root)!=null?x:K.root,td=(E=me==null?void 0:me.rail)!=null?E:K.rail,aa=(I=me==null?void 0:me.track)!=null?I:K.track,_c=(A=me==null?void 0:me.thumb)!=null?A:K.thumb,Sc=(k=me==null?void 0:me.valueLabel)!=null?k:K.valueLabel,If=(O=me==null?void 0:me.mark)!=null?O:K.mark,ms=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,Rf=(N=me==null?void 0:me.input)!=null?N:K.input,xo=ti({elementType:xt,getSlotProps:st,externalSlotProps:ps,externalForwardedProps:Bt,additionalProps:$({},jbe(xt)&&{as:V}),ownerState:$({},Pe,ps==null?void 0:ps.ownerState),className:[He.root,ie]}),Ec=ti({elementType:Vt,externalSlotProps:td,ownerState:Pe,className:He.rail}),Li=ti({elementType:yn,externalSlotProps:aa,additionalProps:{style:$({},ze[Ke].offset(at),ze[Ke].leap(zt))},ownerState:$({},Pe,aa==null?void 0:aa.ownerState),className:He.track}),gs=ti({elementType:Yr,getSlotProps:vt,externalSlotProps:_c,ownerState:$({},Pe,_c==null?void 0:_c.ownerState),className:He.thumb}),Pf=ti({elementType:Hr,externalSlotProps:Sc,ownerState:$({},Pe,Sc==null?void 0:Sc.ownerState),className:He.valueLabel}),vs=ti({elementType:Wr,externalSlotProps:If,ownerState:Pe,className:He.mark}),Ba=ti({elementType:Kr,externalSlotProps:ms,ownerState:Pe,className:He.markLabel}),nd=ti({elementType:ui,getSlotProps:gt,externalSlotProps:Rf,ownerState:Pe});return C.jsxs(xt,$({},xo,{children:[C.jsx(Vt,$({},Ec)),C.jsx(yn,$({},Li)),dt.filter(Kn=>Kn.value>=he&&Kn.value<=le).map((Kn,lr)=>{const Nl=vC(Kn.value,he,le),Bl=ze[Ke].offset(Nl);let wo;return Ze===!1?wo=Ie.indexOf(Kn.value)!==-1:wo=Ze==="normal"&&(Be?Kn.value>=Ie[0]&&Kn.value<=Ie[Ie.length-1]:Kn.value<=Ie[0])||Ze==="inverted"&&(Be?Kn.value<=Ie[0]||Kn.value>=Ie[Ie.length-1]:Kn.value>=Ie[0]),C.jsxs(R.Fragment,{children:[C.jsx(Wr,$({"data-index":lr},vs,!rc(Wr)&&{markActive:wo},{style:$({},Bl,vs.style),className:Ue(vs.className,wo&&He.markActive)})),Kn.label!=null?C.jsx(Kr,$({"aria-hidden":!0,"data-index":lr},Ba,!rc(Kr)&&{markLabelActive:wo},{style:$({},Bl,Ba.style),className:Ue(He.markLabel,Ba.className,wo&&He.markLabelActive),children:Kn.label})):null]},lr)}),Ie.map((Kn,lr)=>{const Nl=vC(Kn,he,le),Bl=ze[Ke].offset(Nl),wo=Xe==="off"?txe:Hr;return C.jsx(wo,$({},!rc(wo)&&{valueLabelFormat:ct,valueLabelDisplay:Xe,value:typeof ct=="function"?ct(xe(Kn),lr):ct,index:lr,open:_e===lr||je===lr||Xe==="on",disabled:ue},Pf,{children:C.jsx(Yr,$({"data-index":lr},gs,{className:Ue(He.thumb,gs.className,je===lr&&He.active,Fe===lr&&He.focusVisible),style:$({},Bl,Re(lr),gs.style),children:C.jsx(ui,$({"data-index":lr,"aria-label":se?se(lr):D,"aria-valuenow":xe(Kn),"aria-labelledby":j,"aria-valuetext":J?J(xe(Kn),lr):F,value:Ie[lr]},nd))}))}),lr)})]}))}),rxe=nxe;function ixe(e){return Ct("MuiSnackbarContent",e)}It("MuiSnackbarContent",["root","message","action"]);const oxe=["action","className","message","role"],sxe=e=>{const{classes:t}=e;return At({root:["root"],action:["action"],message:["message"]},ixe,t)},axe=Ce(Cv,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=Tce(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}})}),lxe=Ce("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),cxe=Ce("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),uxe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,c=Ne(r,oxe),u=r,f=sxe(u);return C.jsxs(axe,$({role:a,square:!0,elevation:6,className:Ue(f.root,o),ownerState:u,ref:n},c,{children:[C.jsx(lxe,{className:f.message,ownerState:u,children:s}),i?C.jsx(cxe,{className:f.action,ownerState:u,children:i}):null]}))}),dxe=uxe;function fxe(e){return Ct("MuiSnackbar",e)}It("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const hxe=["onEnter","onExited"],pxe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],mxe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${De(n.vertical)}${De(n.horizontal)}`]};return At(r,fxe,t)},MH=Ce("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${De(n.anchorOrigin.vertical)}${De(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return $({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:$({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),gxe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiSnackbar"}),i=Ln(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:w=bC,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,I=Ne(r.TransitionProps,hxe),A=Ne(r,pxe),k=$({},r,{anchorOrigin:{vertical:a,horizontal:c},autoHideDuration:u,disableWindowBlurListener:v,TransitionComponent:w,transitionDuration:b}),O=mxe(k),{getRootProps:L,onClickAway:N}=_me($({},k)),[H,G]=R.useState(!0),z=ti({elementType:MH,getSlotProps:L,externalForwardedProps:A,ownerState:k,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{G(!0),E&&E(j)},F=(j,V)=>{G(!1),x&&x(j,V)};return!S&&H?null:C.jsx(Nhe,$({onClickAway:N},p,{children:C.jsx(MH,$({},z,{children:C.jsx(w,$({appear:!0,in:S,timeout:b,direction:a==="top"?"down":"up",onEnter:F,onExited:D},I,{children:f||C.jsx(dxe,$({message:y,action:s},g))}))}))}))}),vxe=gxe;function yxe(e){return Ct("MuiTooltip",e)}const bxe=It("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Id=bxe,xxe=["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 wxe(e){return Math.round(e*1e5)/1e5}const _xe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${De(o.split("-")[0])}`],arrow:["arrow"]};return At(s,yxe,t)},Sxe=Ce(wQ,{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"] .${Id.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Id.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Id.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"] .${Id.arrow}`]:$({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Exe=Ce("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${De(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>$({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:kn(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:`${wxe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Id.popper}[data-popper-placement*="left"] &`]:$({transformOrigin:"right center"},t.isRtl?$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):$({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Id.popper}[data-popper-placement*="right"] &`]:$({transformOrigin:"left center"},t.isRtl?$({marginRight:"14px"},t.touch&&{marginRight:"24px"}):$({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Id.popper}[data-popper-placement*="top"] &`]:$({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Id.popper}[data-popper-placement*="bottom"] &`]:$({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),Cxe=Ce("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:kn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let M_=!1,XL=null,Mb={x:0,y:0};function D_(e,t){return n=>{t&&t(n),e(n)}}const Txe=R.forwardRef(function(t,n){var r,i,o,s,a,c,u,f,h,p,g,v,y,S,w,b,x,E,I;const A=Rt({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:G=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:V=0,enterTouchDelay:W=700,followCursor:K=!1,id:X,leaveDelay:Q=0,leaveTouchDelay:ie=1500,onClose:ce,onOpen:ue,open:se,placement:J="bottom",PopperComponent:ae,PopperProps:le={},slotProps:he={},slots:pe={},title:ve,TransitionComponent:ye=bC,TransitionProps:xe}=A,me=Ne(A,xxe),be=R.isValidElement(O)?O:C.jsx("span",{children:O}),Ze=Ln(),Xe=Ze.direction==="rtl",[ct,Bt]=R.useState(),[Pe,ze]=R.useState(null),st=R.useRef(!1),gt=D||K,vt=R.useRef(),_e=R.useRef(),je=R.useRef(),Ke=R.useRef(),[Fe,Be]=o1({controlled:se,default:!1,name:"Tooltip",state:"open"});let Pt=Fe;const dt=m4(X),Ie=R.useRef(),at=R.useCallback(()=>{Ie.current!==void 0&&(document.body.style.WebkitUserSelect=Ie.current,Ie.current=void 0),clearTimeout(Ke.current)},[]);R.useEffect(()=>()=>{clearTimeout(vt.current),clearTimeout(_e.current),clearTimeout(je.current),at()},[at]);const zt=en=>{clearTimeout(XL),M_=!0,Be(!0),ue&&!Pt&&ue(en)},Re=mo(en=>{clearTimeout(XL),XL=setTimeout(()=>{M_=!1},800+Q),Be(!1),ce&&Pt&&ce(en),clearTimeout(vt.current),vt.current=setTimeout(()=>{st.current=!1},Ze.transitions.duration.shortest)}),He=en=>{st.current&&en.type!=="touchstart"||(ct&&ct.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(je.current),j||M_&&V?_e.current=setTimeout(()=>{zt(en)},M_?V:j):zt(en))},xt=en=>{clearTimeout(_e.current),clearTimeout(je.current),je.current=setTimeout(()=>{Re(en)},Q)},{isFocusVisibleRef:Vt,onBlur:yn,onFocus:Yr,ref:Hr}=g4(),[,Wr]=R.useState(!1),Kr=en=>{yn(en),Vt.current===!1&&(Wr(!1),xt(en))},ui=en=>{ct||Bt(en.currentTarget),Yr(en),Vt.current===!0&&(Wr(!0),He(en))},ps=en=>{st.current=!0;const Ar=be.props;Ar.onTouchStart&&Ar.onTouchStart(en)},td=He,aa=xt,_c=en=>{ps(en),clearTimeout(je.current),clearTimeout(vt.current),at(),Ie.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ke.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ie.current,He(en)},W)},Sc=en=>{be.props.onTouchEnd&&be.props.onTouchEnd(en),at(),clearTimeout(je.current),je.current=setTimeout(()=>{Re(en)},ie)};R.useEffect(()=>{if(!Pt)return;function en(Ar){(Ar.key==="Escape"||Ar.key==="Esc")&&Re(Ar)}return document.addEventListener("keydown",en),()=>{document.removeEventListener("keydown",en)}},[Re,Pt]);const If=Tr(be.ref,Hr,Bt,n);!ve&&ve!==0&&(Pt=!1);const ms=R.useRef(),Rf=en=>{const Ar=be.props;Ar.onMouseMove&&Ar.onMouseMove(en),Mb={x:en.clientX,y:en.clientY},ms.current&&ms.current.update()},xo={},Ec=typeof ve=="string";H?(xo.title=!Pt&&Ec&&!z?ve:null,xo["aria-describedby"]=Pt?dt:null):(xo["aria-label"]=Ec?ve:null,xo["aria-labelledby"]=Pt&&!Ec?dt:null);const Li=$({},xo,me,be.props,{className:Ue(me.className,be.props.className),onTouchStart:ps,ref:If},K?{onMouseMove:Rf}:{}),gs={};F||(Li.onTouchStart=_c,Li.onTouchEnd=Sc),z||(Li.onMouseOver=D_(td,Li.onMouseOver),Li.onMouseLeave=D_(aa,Li.onMouseLeave),gt||(gs.onMouseOver=td,gs.onMouseLeave=aa)),G||(Li.onFocus=D_(ui,Li.onFocus),Li.onBlur=D_(Kr,Li.onBlur),gt||(gs.onFocus=ui,gs.onBlur=Kr));const Pf=R.useMemo(()=>{var en;let Ar=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(en=le.popperOptions)!=null&&en.modifiers&&(Ar=Ar.concat(le.popperOptions.modifiers)),$({},le.popperOptions,{modifiers:Ar})},[Pe,le]),vs=$({},A,{isRtl:Xe,arrow:k,disableInteractive:gt,placement:J,PopperComponentProp:ae,touch:st.current}),Ba=_xe(vs),nd=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:Sxe,Kn=(o=(s=(a=pe.transition)!=null?a:L.Transition)!=null?s:ye)!=null?o:bC,lr=(c=(u=pe.tooltip)!=null?u:L.Tooltip)!=null?c:Exe,Nl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:Cxe,Bl=ax(nd,$({},le,(p=he.popper)!=null?p:N.popper,{className:Ue(Ba.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),vs),wo=ax(Kn,$({},xe,(y=he.transition)!=null?y:N.transition),vs),Hv=ax(lr,$({},(S=he.tooltip)!=null?S:N.tooltip,{className:Ue(Ba.tooltip,(w=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:w.className)}),vs),Wv=ax(Nl,$({},(x=he.arrow)!=null?x:N.arrow,{className:Ue(Ba.arrow,(E=(I=he.arrow)!=null?I:N.arrow)==null?void 0:E.className)}),vs);return C.jsxs(R.Fragment,{children:[R.cloneElement(be,Li),C.jsx(nd,$({as:ae??wQ,placement:J,anchorEl:K?{getBoundingClientRect:()=>({top:Mb.y,left:Mb.x,right:Mb.x,bottom:Mb.y,width:0,height:0})}:ct,popperRef:ms,open:ct?Pt:!1,id:dt,transition:!0},gs,Bl,{popperOptions:Pf,children:({TransitionProps:en})=>C.jsx(Kn,$({timeout:Ze.transitions.duration.shorter},en,wo,{children:C.jsxs(lr,$({},Hv,{children:[ve,k?C.jsx(Nl,$({},Wv,{ref:ze})):null]}))}))}))]})}),bf=Txe;function kxe(e){return Ct("MuiSwitch",e)}const Axe=It("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Do=Axe,Ixe=["className","color","edge","size","sx"],Rxe=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${De(n)}`,`size${De(r)}`],switchBase:["switchBase",`color${De(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=At(a,kxe,t);return $({},t,c)},Pxe=Ce("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(({ownerState:e})=>$({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${Do.thumb}`]:{width:16,height:16},[`& .${Do.switchBase}`]:{padding:4,[`&.${Do.checked}`]:{transform:"translateX(16px)"}}})),Oxe=Ce(CQ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Do.input}`]:t.input},n.color!=="default"&&t[`color${De(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Do.checked}`]:{transform:"translateX(20px)"},[`&.${Do.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Do.checked} + .${Do.track}`]:{opacity:.5},[`&.${Do.disabled} + .${Do.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Do.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>$({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:kn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${Do.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:kn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Do.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?wv(e.palette[t.color].main,.62):xv(e.palette[t.color].main,.55)}`}},[`&.${Do.checked} + .${Do.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),Mxe=Ce("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),Dxe=Ce("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Lxe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:c}=r,u=Ne(r,Ixe),f=$({},r,{color:o,edge:s,size:a}),h=Rxe(f),p=C.jsx(Dxe,{className:h.thumb,ownerState:f});return C.jsxs(Pxe,{className:Ue(h.root,i),sx:c,ownerState:f,children:[C.jsx(Oxe,$({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},u,{classes:$({},h,{root:h.switchBase})})),C.jsx(Mxe,{className:h.track,ownerState:f})]})}),Kg=Lxe;function Nxe(e){return Ct("MuiTab",e)}const Bxe=It("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Hh=Bxe,$xe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Fxe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:c}=e,u={root:["root",o&&s&&"labelIcon",`textColor${De(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return At(u,Nxe,t)},zxe=Ce(Ku,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${De(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Hh.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,[`&.${Hh.selected}`]:{opacity:1},[`&.${Hh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Hh.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Hh.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Hh.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Hh.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)})),jxe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:c,iconPosition:u="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:w="inherit",value:b,wrapped:x=!1}=r,E=Ne(r,$xe),I=$({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:u,label:!!h,fullWidth:a,textColor:w,wrapped:x}),A=Fxe(I),k=c&&h&&R.isValidElement(c)?R.cloneElement(c,{className:Ue(A.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(zxe,$({focusRipple:!s,className:Ue(A.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:I,tabIndex:y?0:-1},E,{children:[u==="top"||u==="start"?C.jsxs(R.Fragment,{children:[k,h]}):C.jsxs(R.Fragment,{children:[h,k]}),f]}))}),rg=jxe;function Uxe(e){return Ct("MuiToolbar",e)}It("MuiToolbar",["root","gutters","regular","dense"]);const Hxe=["className","component","disableGutters","variant"],Wxe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return At({root:["root",!n&&"gutters",r]},Uxe,t)},Gxe=Ce("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>$({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),Vxe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,c=Ne(r,Hxe),u=$({},r,{component:o,disableGutters:s,variant:a}),f=Wxe(u);return C.jsx(Gxe,$({as:o,className:Ue(f.root,i),ref:n,ownerState:u},c))}),qxe=Vxe,Xxe=Ft(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Yxe=Ft(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Kxe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Qxe(e,t,n,r={},i=()=>{}){const{ease:o=Kxe,duration:s=300}=r;let a=null;const c=t[e];let u=!1;const f=()=>{u=!0},h=p=>{if(u){i(new Error("Animation cancelled"));return}a===null&&(a=p);const g=Math.min(1,(p-a)/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 Jxe=["onChange"],Zxe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function e1e(e){const{onChange:t}=e,n=Ne(e,Jxe),r=R.useRef(),i=R.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return jo(()=>{const s=MT(()=>{const c=r.current;o(),c!==r.current&&t(r.current)}),a=Nu(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),R.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",$({style:Zxe,ref:i},n))}function t1e(e){return Ct("MuiTabScrollButton",e)}const n1e=It("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),r1e=n1e,i1e=["className","slots","slotProps","direction","orientation","disabled"],o1e=e=>{const{classes:t,orientation:n,disabled:r}=e;return At({root:["root",n,r&&"disabled"]},t1e,t)},s1e=Ce(Ku,{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,[`&.${r1e.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),a1e=R.forwardRef(function(t,n){var r,i;const o=Rt({props:t,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:c={},direction:u}=o,f=Ne(o,i1e),p=Ln().direction==="rtl",g=$({isRtl:p},o),v=o1e(g),y=(r=a.StartScrollButtonIcon)!=null?r:Xxe,S=(i=a.EndScrollButtonIcon)!=null?i:Yxe,w=ti({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=ti({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(s1e,$({component:"div",className:Ue(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:u==="left"?C.jsx(y,$({},w)):C.jsx(S,$({},b))}))}),l1e=a1e;function c1e(e){return Ct("MuiTabs",e)}const u1e=It("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),YL=u1e,d1e=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],DH=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,LH=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,L_=(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}}},f1e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:c}=e;return At({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},c1e,c)},h1e=Ce("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${YL.scrollButtons}`]:t.scrollButtons},{[`& .${YL.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&&{[`& .${YL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),p1e=Ce("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),m1e=Ce("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),g1e=Ce("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),v1e=Ce(e1e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),NH={},y1e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTabs"}),i=Ln(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":a,action:c,centered:u=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:w=l1e,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:I={},TabIndicatorProps:A={},TabScrollButtonProps:k={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,G=Ne(r,d1e),z=N==="scrollable",D=S==="vertical",F=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",W=D?"clientHeight":"clientWidth",K=D?"height":"width",X=$({},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:u&&!z,scrollButtonsHideMobile:!g}),Q=f1e(X),ie=ti({elementType:E.StartScrollButtonIcon,externalSlotProps:I.startScrollButtonIcon,ownerState:X}),ce=ti({elementType:E.EndScrollButtonIcon,externalSlotProps:I.endScrollButtonIcon,ownerState:X}),[ue,se]=R.useState(!1),[J,ae]=R.useState(NH),[le,he]=R.useState(!1),[pe,ve]=R.useState(!1),[ye,xe]=R.useState(!1),[me,be]=R.useState({overflow:"hidden",scrollbarWidth:0}),Ze=new Map,Xe=R.useRef(null),ct=R.useRef(null),Bt=()=>{const Re=Xe.current;let He;if(Re){const Vt=Re.getBoundingClientRect();He={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollLeftNormalized:Qse(Re,i.direction),scrollWidth:Re.scrollWidth,top:Vt.top,bottom:Vt.bottom,left:Vt.left,right:Vt.right}}let xt;if(Re&&L!==!1){const Vt=ct.current.children;if(Vt.length>0){const yn=Vt[Ze.get(L)];xt=yn?yn.getBoundingClientRect():null}}return{tabsMeta:He,tabMeta:xt}},Pe=mo(()=>{const{tabsMeta:Re,tabMeta:He}=Bt();let xt=0,Vt;if(D)Vt="top",He&&Re&&(xt=He.top-Re.top+Re.scrollTop);else if(Vt=o?"right":"left",He&&Re){const Yr=o?Re.scrollLeftNormalized+Re.clientWidth-Re.scrollWidth:Re.scrollLeft;xt=(o?-1:1)*(He[Vt]-Re[Vt]+Yr)}const yn={[Vt]:xt,[K]:He?He[K]:0};if(isNaN(J[Vt])||isNaN(J[K]))ae(yn);else{const Yr=Math.abs(J[Vt]-yn[Vt]),Hr=Math.abs(J[K]-yn[K]);(Yr>=1||Hr>=1)&&ae(yn)}}),ze=(Re,{animation:He=!0}={})=>{He?Qxe(F,Xe.current,Re,{duration:i.transitions.duration.standard}):Xe.current[F]=Re},st=Re=>{let He=Xe.current[F];D?He+=Re:(He+=Re*(o?-1:1),He*=o&&EX()==="reverse"?-1:1),ze(He)},gt=()=>{const Re=Xe.current[W];let He=0;const xt=Array.from(ct.current.children);for(let Vt=0;VtRe){Vt===0&&(He=Re);break}He+=yn[W]}return He},vt=()=>{st(-1*gt())},_e=()=>{st(gt())},je=R.useCallback(Re=>{be({overflow:null,scrollbarWidth:Re})},[]),Ke=()=>{const Re={};Re.scrollbarSizeListener=z?C.jsx(v1e,{onChange:je,className:Ue(Q.scrollableX,Q.hideScrollbar)}):null;const xt=z&&(b==="auto"&&(le||pe)||b===!0);return Re.scrollButtonStart=xt?C.jsx(w,$({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:vt,disabled:!le},k,{className:Ue(Q.scrollButtons,k.className)})):null,Re.scrollButtonEnd=xt?C.jsx(w,$({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},k,{className:Ue(Q.scrollButtons,k.className)})):null,Re},Fe=mo(Re=>{const{tabsMeta:He,tabMeta:xt}=Bt();if(!(!xt||!He)){if(xt[j]He[V]){const Vt=He[F]+(xt[V]-He[V]);ze(Vt,{animation:Re})}}}),Be=mo(()=>{z&&b!==!1&&xe(!ye)});R.useEffect(()=>{const Re=MT(()=>{Xe.current&&Pe()}),He=Nu(Xe.current);He.addEventListener("resize",Re);let xt;return typeof ResizeObserver<"u"&&(xt=new ResizeObserver(Re),Array.from(ct.current.children).forEach(Vt=>{xt.observe(Vt)})),()=>{Re.clear(),He.removeEventListener("resize",Re),xt&&xt.disconnect()}},[Pe]),R.useEffect(()=>{const Re=Array.from(ct.current.children),He=Re.length;if(typeof IntersectionObserver<"u"&&He>0&&z&&b!==!1){const xt=Re[0],Vt=Re[He-1],yn={root:Xe.current,threshold:.99},Yr=ui=>{he(!ui[0].isIntersecting)},Hr=new IntersectionObserver(Yr,yn);Hr.observe(xt);const Wr=ui=>{ve(!ui[0].isIntersecting)},Kr=new IntersectionObserver(Wr,yn);return Kr.observe(Vt),()=>{Hr.disconnect(),Kr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),R.useEffect(()=>{se(!0)},[]),R.useEffect(()=>{Pe()}),R.useEffect(()=>{Fe(NH!==J)},[Fe,J]),R.useImperativeHandle(c,()=>({updateIndicator:Pe,updateScrollButtons:Be}),[Pe,Be]);const Pt=C.jsx(g1e,$({},A,{className:Ue(Q.indicator,A.className),ownerState:X,style:$({},J,A.style)}));let dt=0;const Ie=R.Children.map(f,Re=>{if(!R.isValidElement(Re))return null;const He=Re.props.value===void 0?dt:Re.props.value;Ze.set(He,dt);const xt=He===L;return dt+=1,R.cloneElement(Re,$({fullWidth:N==="fullWidth",indicator:xt&&!ue&&Pt,selected:xt,selectionFollowsFocus:x,onChange:y,textColor:O,value:He},dt===1&&L===!1&&!Re.props.tabIndex?{tabIndex:0}:{}))}),at=Re=>{const He=ct.current,xt=Fr(He).activeElement;if(xt.getAttribute("role")!=="tab")return;let yn=S==="horizontal"?"ArrowLeft":"ArrowUp",Yr=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(yn="ArrowRight",Yr="ArrowLeft"),Re.key){case yn:Re.preventDefault(),L_(He,xt,LH);break;case Yr:Re.preventDefault(),L_(He,xt,DH);break;case"Home":Re.preventDefault(),L_(He,null,DH);break;case"End":Re.preventDefault(),L_(He,null,LH);break}},zt=Ke();return C.jsxs(h1e,$({className:Ue(Q.root,h),ownerState:X,ref:n,as:p},G,{children:[zt.scrollButtonStart,zt.scrollbarSizeListener,C.jsxs(p1e,{className:Q.scroller,ownerState:X,style:{overflow:me.overflow,[D?`margin${o?"Left":"Right"}`:"marginBottom"]:H?void 0:-me.scrollbarWidth},ref:Xe,children:[C.jsx(m1e,{"aria-label":s,"aria-labelledby":a,"aria-orientation":S==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:X,onKeyDown:at,ref:ct,role:"tablist",children:Ie}),ue&&Pt]}),zt.scrollButtonEnd]}))}),b1e=y1e;function x1e(e){return Ct("MuiTextField",e)}It("MuiTextField",["root"]);const w1e=["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"],_1e={standard:MQ,filled:IQ,outlined:zQ},S1e=e=>{const{classes:t}=e;return At({root:["root"]},x1e,t)},E1e=Ce(Wve,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),C1e=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:c="primary",defaultValue:u,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:w,InputProps:b,inputRef:x,label:E,maxRows:I,minRows:A,multiline:k=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:G,required:z=!1,rows:D,select:F=!1,SelectProps:j,type:V,value:W,variant:K="outlined"}=r,X=Ne(r,w1e),Q=$({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:k,required:z,select:F,variant:K}),ie=S1e(Q),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=m4(y),se=v&&ue?`${ue}-helper-text`:void 0,J=E&&ue?`${ue}-label`:void 0,ae=_1e[K],le=C.jsx(ae,$({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:g,multiline:k,name:O,rows:D,maxRows:I,minRows:A,type:V,value:W,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:G,inputProps:w},ce,b));return C.jsxs(E1e,$({className:Ue(ie.root,a),disabled:f,error:h,fullWidth:g,ref:n,required:z,color:c,variant:K,ownerState:Q},X,{children:[E!=null&&E!==""&&C.jsx(Iye,$({htmlFor:ue,id:J},S,{children:E})),F?C.jsx(Fbe,$({"aria-describedby":se,id:ue,labelId:J,value:W,input:le},j,{children:s})):le,v&&C.jsx(sye,$({id:se},p,{children:v}))]}))}),Cw=C1e;function En({vertical:e,...t}){return C.jsx(ht,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const UQ=Ft(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),T1e=Ft(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),k1e=Ft(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),A1e=Ft(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"),I1e=Ft(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"),R1e=Ft(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"),P1e=Ft(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"),O1e=Ft(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"),M1e=Ft(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),D1e=Ft(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"),HQ=Ft(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"),L1e=Ft(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"),N1e=Ft(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"),B1e=Ft(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),Wk=Ft(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"),$1e=Ft(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),WQ=Ft(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"),F1e=Ft(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"),z1e=Ft(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"),j1e=Ft(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"),U1e=Ft(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),H1e=Ft(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"),Tw=Ft(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"),GQ=Ft(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"),W1e=Ft(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"),G1e=Ft(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),V1e=Ft(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"),q1e=Ft(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),VQ=Ft(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"),X1e=Ft(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"),Y1e=Ft(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"),K1e=Ft(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),Q1e=Ft(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),fE=Ft(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),J1e=Ft(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),Z1e=Ft(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"),BH=Ft(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"),qQ=Ft(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"),ewe=Ft(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"),twe=Ft(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"),nwe=Ft(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 wC={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 - */wC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,I=32,A=64,k=128,O=256,L=512,N=30,H="...",G=800,z=16,D=1,F=2,j=3,V=1/0,W=9007199254740991,K=17976931348623157e292,X=0/0,Q=4294967295,ie=Q-1,ce=Q>>>1,ue=[["ary",k],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",L],["partial",I],["partialRight",A],["rearg",O]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Ze="[object Null]",Xe="[object Object]",ct="[object Promise]",Bt="[object Proxy]",Pe="[object RegExp]",ze="[object Set]",st="[object String]",gt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Pt="[object Float64Array]",dt="[object Int8Array]",Ie="[object Int16Array]",at="[object Int32Array]",zt="[object Uint8Array]",Re="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Vt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ps=/<%-([\s\S]+?)%>/g,td=/<%([\s\S]+?)%>/g,aa=/<%=([\s\S]+?)%>/g,_c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sc=/^\w*$/,If=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ms=/[\\^$.*+?()[\]{}|]/g,Rf=RegExp(ms.source),xo=/^\s+/,Ec=/\s/,Li=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gs=/\{\n\/\* \[wrapped with (.+)\] \*/,Pf=/,? & /,vs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ba=/[()=,{}\[\]\/\s]/,nd=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Nl=/^[-+]0x[0-9a-f]+$/i,Bl=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,Hv=/^0o[0-7]+$/i,Wv=/^(?:0|[1-9]\d*)$/,en=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,tI=/['\n\r\u2028\u2029\\]/g,Cc="\\ud800-\\udfff",nI="\\u0300-\\u036f",rI="\\ufe20-\\ufe2f",iI="\\u20d0-\\u20ff",Gv=nI+rI+iI,Vv="\\u2700-\\u27bf",qv="a-z\\xdf-\\xf6\\xf8-\\xff",oI="\\xac\\xb1\\xd7\\xf7",sI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aI="\\u2000-\\u206f",lI=" \\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",Xv="A-Z\\xc0-\\xd6\\xd8-\\xde",Yv="\\ufe0e\\ufe0f",Kv=oI+sI+aI+lI,Of="['’]",cI="["+Cc+"]",Qv="["+Kv+"]",Tc="["+Gv+"]",Jv="\\d+",uI="["+Vv+"]",Zv="["+qv+"]",ey="[^"+Cc+Kv+Jv+Vv+qv+Xv+"]",Mf="\\ud83c[\\udffb-\\udfff]",dI="(?:"+Tc+"|"+Mf+")",ty="[^"+Cc+"]",Df="(?:\\ud83c[\\udde6-\\uddff]){2}",Lf="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+Xv+"]",ny="\\u200d",ry="(?:"+Zv+"|"+ey+")",fI="(?:"+ys+"|"+ey+")",iy="(?:"+Of+"(?:d|ll|m|re|s|t|ve))?",oy="(?:"+Of+"(?:D|LL|M|RE|S|T|VE))?",sy=dI+"?",ay="["+Yv+"]?",hI="(?:"+ny+"(?:"+[ty,Df,Lf].join("|")+")"+ay+sy+")*",pI="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mI="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ly=ay+sy+hI,gI="(?:"+[uI,Df,Lf].join("|")+")"+ly,vI="(?:"+[ty+Tc+"?",Tc,Df,Lf,cI].join("|")+")",yI=RegExp(Of,"g"),bI=RegExp(Tc,"g"),Nf=RegExp(Mf+"(?="+Mf+")|"+vI+ly,"g"),xI=RegExp([ys+"?"+Zv+"+"+iy+"(?="+[Qv,ys,"$"].join("|")+")",fI+"+"+oy+"(?="+[Qv,ys+ry,"$"].join("|")+")",ys+"?"+ry+"+"+iy,ys+"+"+oy,mI,pI,Jv,gI].join("|"),"g"),wI=RegExp("["+ny+Cc+Gv+Yv+"]"),_I=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SI=["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"],EI=-1,Mt={};Mt[Be]=Mt[Pt]=Mt[dt]=Mt[Ie]=Mt[at]=Mt[zt]=Mt[Re]=Mt[He]=Mt[xt]=!0,Mt[se]=Mt[J]=Mt[Ke]=Mt[le]=Mt[Fe]=Mt[he]=Mt[ve]=Mt[ye]=Mt[me]=Mt[be]=Mt[Xe]=Mt[Pe]=Mt[ze]=Mt[st]=Mt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Pt]=Tt[dt]=Tt[Ie]=Tt[at]=Tt[me]=Tt[be]=Tt[Xe]=Tt[Pe]=Tt[ze]=Tt[st]=Tt[gt]=Tt[zt]=Tt[Re]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var CI={À:"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"},TI={"&":"&","<":"<",">":">",'"':""","'":"'"},kI={"&":"&","<":"<",">":">",""":'"',"'":"'"},AI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},II=parseFloat,RI=parseInt,cy=typeof $t=="object"&&$t&&$t.Object===Object&&$t,PI=typeof self=="object"&&self&&self.Object===Object&&self,pn=cy||PI||Function("return this")(),Bf=t&&!t.nodeType&&t,_o=Bf&&!0&&e&&!e.nodeType&&e,uy=_o&&_o.exports===Bf,$f=uy&&cy.process,dr=function(){try{var q=_o&&_o.require&&_o.require("util").types;return q||$f&&$f.binding&&$f.binding("util")}catch{}}(),dy=dr&&dr.isArrayBuffer,fy=dr&&dr.isDate,hy=dr&&dr.isMap,py=dr&&dr.isRegExp,my=dr&&dr.isSet,gy=dr&&dr.isTypedArray;function Qn(q,ee,Z){switch(Z.length){case 0:return q.call(ee);case 1:return q.call(ee,Z[0]);case 2:return q.call(ee,Z[0],Z[1]);case 3:return q.call(ee,Z[0],Z[1],Z[2])}return q.apply(ee,Z)}function OI(q,ee,Z,ge){for(var Le=-1,ft=q==null?0:q.length;++Le-1}function Ff(q,ee,Z){for(var ge=-1,Le=q==null?0:q.length;++ge-1;);return Z}function Ey(q,ee){for(var Z=q.length;Z--&&bs(ee,q[Z],0)>-1;);return Z}function jI(q,ee){for(var Z=q.length,ge=0;Z--;)q[Z]===ee&&++ge;return ge}var UI=Hf(CI),HI=Hf(TI);function WI(q){return"\\"+AI[q]}function GI(q,ee){return q==null?n:q[ee]}function xs(q){return wI.test(q)}function VI(q){return _I.test(q)}function qI(q){for(var ee,Z=[];!(ee=q.next()).done;)Z.push(ee.value);return Z}function qf(q){var ee=-1,Z=Array(q.size);return q.forEach(function(ge,Le){Z[++ee]=[Le,ge]}),Z}function Cy(q,ee){return function(Z){return q(ee(Z))}}function $i(q,ee){for(var Z=-1,ge=q.length,Le=0,ft=[];++Z-1}function DR(l,d){var m=this.__data__,_=Wc(m,l);return _<0?(++this.size,m.push([l,d])):m[_][1]=d,this}di.prototype.clear=RR,di.prototype.delete=PR,di.prototype.get=OR,di.prototype.has=MR,di.prototype.set=DR;function fi(l){var d=-1,m=l==null?0:l.length;for(this.clear();++d=d?l:d)),l}function mr(l,d,m,_,T,M){var B,U=d&h,Y=d&p,ne=d&g;if(m&&(B=T?m(l,_,T,M):m(l)),B!==n)return B;if(!jt(l))return l;var re=$e(l);if(re){if(B=$P(l),!U)return Nn(l,B)}else{var oe=_n(l),fe=oe==ye||oe==xe;if(Wi(l))return a0(l,U);if(oe==Xe||oe==se||fe&&!T){if(B=Y||fe?{}:T0(l),!U)return Y?kP(l,KR(B,l)):TP(l,By(B,l))}else{if(!Tt[oe])return T?l:{};B=FP(l,oe,U)}}M||(M=new Rr);var we=M.get(l);if(we)return we;M.set(l,B),tb(l)?l.forEach(function(Ae){B.add(mr(Ae,d,m,Ae,l,M))}):Z0(l)&&l.forEach(function(Ae,Je){B.set(Je,mr(Ae,d,m,Je,l,M))});var ke=ne?Y?bh:yh:Y?$n:sn,qe=re?n:ke(l);return fr(qe||l,function(Ae,Je){qe&&(Je=Ae,Ae=l[Je]),Wa(B,Je,mr(Ae,d,m,Je,l,M))}),B}function QR(l){var d=sn(l);return function(m){return $y(m,l,d)}}function $y(l,d,m){var _=m.length;if(l==null)return!_;for(l=St(l);_--;){var T=m[_],M=d[T],B=l[T];if(B===n&&!(T in l)||!M(B))return!1}return!0}function Fy(l,d,m){if(typeof l!="function")throw new hr(s);return Qa(function(){l.apply(n,m)},d)}function Ga(l,d,m,_){var T=-1,M=kc,B=!0,U=l.length,Y=[],ne=d.length;if(!U)return Y;m&&(d=Nt(d,Jn(m))),_?(M=Ff,B=!1):d.length>=i&&(M=$a,B=!1,d=new Co(d));e:for(;++TT?0:T+m),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=m>_?0:rb(_);m<_;)l[m++]=d;return l}function jy(l,d){var m=[];return zi(l,function(_,T,M){d(_,T,M)&&m.push(_)}),m}function mn(l,d,m,_,T){var M=-1,B=l.length;for(m||(m=jP),T||(T=[]);++M0&&m(U)?d>1?mn(U,d-1,m,_,T):Bi(T,U):_||(T[T.length]=U)}return T}var eh=h0(),Uy=h0(!0);function Qr(l,d){return l&&eh(l,d,sn)}function th(l,d){return l&&Uy(l,d,sn)}function Vc(l,d){return Ni(d,function(m){return vi(l[m])})}function ko(l,d){d=Ui(d,l);for(var m=0,_=d.length;l!=null&&m<_;)l=l[Zr(d[m++])];return m&&m==_?l:n}function Hy(l,d,m){var _=d(l);return $e(l)?_:Bi(_,m(l))}function In(l){return l==null?l===n?vt:Ze:So&&So in St(l)?LP(l):XP(l)}function nh(l,d){return l>d}function eP(l,d){return l!=null&&bt.call(l,d)}function tP(l,d){return l!=null&&d in St(l)}function nP(l,d,m){return l>=wn(d,m)&&l=120&&re.length>=120)?new Co(B&&re):n}re=l[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==l&&Bc.call(U,Y,1),Bc.call(l,Y,1);return l}function Zy(l,d){for(var m=l?d.length:0,_=m-1;m--;){var T=d[m];if(m==_||T!==M){var M=T;gi(T)?Bc.call(l,T,1):dh(l,T)}}return l}function lh(l,d){return l+zc(My()*(d-l+1))}function mP(l,d,m,_){for(var T=-1,M=nn(Fc((d-l)/(m||1)),0),B=Z(M);M--;)B[_?M:++T]=l,l+=m;return B}function ch(l,d){var m="";if(!l||d<1||d>W)return m;do d%2&&(m+=l),d=zc(d/2),d&&(l+=l);while(d);return m}function Ye(l,d){return Th(I0(l,d,Fn),l+"")}function gP(l){return Ny(Ps(l))}function vP(l,d){var m=Ps(l);return ru(m,To(d,0,m.length))}function Xa(l,d,m,_){if(!jt(l))return l;d=Ui(d,l);for(var T=-1,M=d.length,B=M-1,U=l;U!=null&&++TT?0:T+d),m=m>T?T:m,m<0&&(m+=T),T=d>m?0:m-d>>>0,d>>>=0;for(var M=Z(T);++_>>1,B=l[M];B!==null&&!er(B)&&(m?B<=d:B=i){var ne=d?null:PP(l);if(ne)return Ic(ne);B=!1,T=$a,Y=new Co}else Y=d?[]:U;e:for(;++_=_?l:gr(l,d,m)}var s0=lR||function(l){return pn.clearTimeout(l)};function a0(l,d){if(d)return l.slice();var m=l.length,_=Ay?Ay(m):new l.constructor(m);return l.copy(_),_}function mh(l){var d=new l.constructor(l.byteLength);return new Lc(d).set(new Lc(l)),d}function _P(l,d){var m=d?mh(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function SP(l){var d=new l.constructor(l.source,lr.exec(l));return d.lastIndex=l.lastIndex,d}function EP(l){return Ha?St(Ha.call(l)):{}}function l0(l,d){var m=d?mh(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function c0(l,d){if(l!==d){var m=l!==n,_=l===null,T=l===l,M=er(l),B=d!==n,U=d===null,Y=d===d,ne=er(d);if(!U&&!ne&&!M&&l>d||M&&B&&Y&&!U&&!ne||_&&B&&Y||!m&&Y||!T)return 1;if(!_&&!M&&!ne&&l=U)return Y;var ne=m[_];return Y*(ne=="desc"?-1:1)}}return l.index-d.index}function u0(l,d,m,_){for(var T=-1,M=l.length,B=m.length,U=-1,Y=d.length,ne=nn(M-B,0),re=Z(Y+ne),oe=!_;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=l.length>3&&typeof M=="function"?(T--,M):n,B&&Rn(m[0],m[1],B)&&(M=T<3?n:M,T=1),d=St(d);++_-1?T[M?d[B]:B]:n}}function g0(l){return mi(function(d){var m=d.length,_=m,T=pr.prototype.thru;for(l&&d.reverse();_--;){var M=d[_];if(typeof M!="function")throw new hr(s);if(T&&!B&&tu(M)=="wrapper")var B=new pr([],!0)}for(_=B?_:m;++_1&&it.reverse(),re&&YU))return!1;var ne=M.get(l),re=M.get(d);if(ne&&re)return ne==d&&re==l;var oe=-1,fe=!0,we=m&y?new Co:n;for(M.set(l,d),M.set(d,l);++oe1?"& ":"")+d[_],d=d.join(m>2?", ":" "),l.replace(Li,`{ -/* [wrapped with `+d+`] */ -`)}function jP(l){return $e(l)||Ro(l)||!!(Py&&l&&l[Py])}function gi(l,d){var m=typeof l;return d=d??W,!!d&&(m=="number"||m!="symbol"&&Wv.test(l))&&l>-1&&l%1==0&&l0){if(++d>=G)return arguments[0]}else d=0;return l.apply(n,arguments)}}function ru(l,d){var m=-1,_=l.length,T=_-1;for(d=d===n?_:d;++m1?l[d-1]:n;return m=typeof m=="function"?(l.pop(),m):n,j0(l,m)});function U0(l){var d=P(l);return d.__chain__=!0,d}function J2(l,d){return d(l),l}function iu(l,d){return d(l)}var Z2=mi(function(l){var d=l.length,m=d?l[0]:0,_=this.__wrapped__,T=function(M){return Zf(M,l)};return d>1||this.__actions__.length||!(_ instanceof et)||!gi(m)?this.thru(T):(_=_.slice(m,+m+(d?1:0)),_.__actions__.push({func:iu,args:[T],thisArg:n}),new pr(_,this.__chain__).thru(function(M){return d&&!M.length&&M.push(n),M}))});function eO(){return U0(this)}function tO(){return new pr(this.value(),this.__chain__)}function nO(){this.__values__===n&&(this.__values__=nb(this.value()));var l=this.__index__>=this.__values__.length,d=l?n:this.__values__[this.__index__++];return{done:l,value:d}}function rO(){return this}function iO(l){for(var d,m=this;m instanceof Hc;){var _=L0(m);_.__index__=0,_.__values__=n,d?T.__wrapped__=_:d=_;var T=_;m=m.__wrapped__}return T.__wrapped__=l,d}function oO(){var l=this.__wrapped__;if(l instanceof et){var d=l;return this.__actions__.length&&(d=new et(this)),d=d.reverse(),d.__actions__.push({func:iu,args:[kh],thisArg:n}),new pr(d,this.__chain__)}return this.thru(kh)}function sO(){return i0(this.__wrapped__,this.__actions__)}var aO=Kc(function(l,d,m){bt.call(l,m)?++l[m]:hi(l,m,1)});function lO(l,d,m){var _=$e(l)?vy:JR;return m&&Rn(l,d,m)&&(d=n),_(l,Te(d,3))}function cO(l,d){var m=$e(l)?Ni:jy;return m(l,Te(d,3))}var uO=m0(N0),dO=m0(B0);function fO(l,d){return mn(ou(l,d),1)}function hO(l,d){return mn(ou(l,d),V)}function pO(l,d,m){return m=m===n?1:Ge(m),mn(ou(l,d),m)}function H0(l,d){var m=$e(l)?fr:zi;return m(l,Te(d,3))}function W0(l,d){var m=$e(l)?MI:zy;return m(l,Te(d,3))}var mO=Kc(function(l,d,m){bt.call(l,m)?l[m].push(d):hi(l,m,[d])});function gO(l,d,m,_){l=Bn(l)?l:Ps(l),m=m&&!_?Ge(m):0;var T=l.length;return m<0&&(m=nn(T+m,0)),uu(l)?m<=T&&l.indexOf(d,m)>-1:!!T&&bs(l,d,m)>-1}var vO=Ye(function(l,d,m){var _=-1,T=typeof d=="function",M=Bn(l)?Z(l.length):[];return zi(l,function(B){M[++_]=T?Qn(d,B,m):Va(B,d,m)}),M}),yO=Kc(function(l,d,m){hi(l,m,d)});function ou(l,d){var m=$e(l)?Nt:qy;return m(l,Te(d,3))}function bO(l,d,m,_){return l==null?[]:($e(d)||(d=d==null?[]:[d]),m=_?n:m,$e(m)||(m=m==null?[]:[m]),Qy(l,d,m))}var xO=Kc(function(l,d,m){l[m?0:1].push(d)},function(){return[[],[]]});function wO(l,d,m){var _=$e(l)?zf:wy,T=arguments.length<3;return _(l,Te(d,4),m,T,zi)}function _O(l,d,m){var _=$e(l)?DI:wy,T=arguments.length<3;return _(l,Te(d,4),m,T,zy)}function SO(l,d){var m=$e(l)?Ni:jy;return m(l,lu(Te(d,3)))}function EO(l){var d=$e(l)?Ny:gP;return d(l)}function CO(l,d,m){(m?Rn(l,d,m):d===n)?d=1:d=Ge(d);var _=$e(l)?qR:vP;return _(l,d)}function TO(l){var d=$e(l)?XR:bP;return d(l)}function kO(l){if(l==null)return 0;if(Bn(l))return uu(l)?ws(l):l.length;var d=_n(l);return d==me||d==ze?l.size:oh(l).length}function AO(l,d,m){var _=$e(l)?jf:xP;return m&&Rn(l,d,m)&&(d=n),_(l,Te(d,3))}var IO=Ye(function(l,d){if(l==null)return[];var m=d.length;return m>1&&Rn(l,d[0],d[1])?d=[]:m>2&&Rn(d[0],d[1],d[2])&&(d=[d[0]]),Qy(l,mn(d,1),[])}),su=cR||function(){return pn.Date.now()};function RO(l,d){if(typeof d!="function")throw new hr(s);return l=Ge(l),function(){if(--l<1)return d.apply(this,arguments)}}function G0(l,d,m){return d=m?n:d,d=l&&d==null?l.length:d,pi(l,k,n,n,n,n,d)}function V0(l,d){var m;if(typeof d!="function")throw new hr(s);return l=Ge(l),function(){return--l>0&&(m=d.apply(this,arguments)),l<=1&&(d=n),m}}var Ih=Ye(function(l,d,m){var _=S;if(m.length){var T=$i(m,Is(Ih));_|=I}return pi(l,_,d,m,T)}),q0=Ye(function(l,d,m){var _=S|w;if(m.length){var T=$i(m,Is(q0));_|=I}return pi(d,_,l,m,T)});function X0(l,d,m){d=m?n:d;var _=pi(l,x,n,n,n,n,n,d);return _.placeholder=X0.placeholder,_}function Y0(l,d,m){d=m?n:d;var _=pi(l,E,n,n,n,n,n,d);return _.placeholder=Y0.placeholder,_}function K0(l,d,m){var _,T,M,B,U,Y,ne=0,re=!1,oe=!1,fe=!0;if(typeof l!="function")throw new hr(s);d=yr(d)||0,jt(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?nn(yr(m.maxWait)||0,d):M,fe="trailing"in m?!!m.trailing:fe);function we(Kt){var Or=_,bi=T;return _=T=n,ne=Kt,B=l.apply(bi,Or),B}function ke(Kt){return ne=Kt,U=Qa(Je,d),re?we(Kt):B}function qe(Kt){var Or=Kt-Y,bi=Kt-ne,mb=d-Or;return oe?wn(mb,M-bi):mb}function Ae(Kt){var Or=Kt-Y,bi=Kt-ne;return Y===n||Or>=d||Or<0||oe&&bi>=M}function Je(){var Kt=su();if(Ae(Kt))return it(Kt);U=Qa(Je,qe(Kt))}function it(Kt){return U=n,fe&&_?we(Kt):(_=T=n,B)}function tr(){U!==n&&s0(U),ne=0,_=Y=T=U=n}function Pn(){return U===n?B:it(su())}function nr(){var Kt=su(),Or=Ae(Kt);if(_=arguments,T=this,Y=Kt,Or){if(U===n)return ke(Y);if(oe)return s0(U),U=Qa(Je,d),we(Y)}return U===n&&(U=Qa(Je,d)),B}return nr.cancel=tr,nr.flush=Pn,nr}var PO=Ye(function(l,d){return Fy(l,1,d)}),OO=Ye(function(l,d,m){return Fy(l,yr(d)||0,m)});function MO(l){return pi(l,L)}function au(l,d){if(typeof l!="function"||d!=null&&typeof d!="function")throw new hr(s);var m=function(){var _=arguments,T=d?d.apply(this,_):_[0],M=m.cache;if(M.has(T))return M.get(T);var B=l.apply(this,_);return m.cache=M.set(T,B)||M,B};return m.cache=new(au.Cache||fi),m}au.Cache=fi;function lu(l){if(typeof l!="function")throw new hr(s);return function(){var d=arguments;switch(d.length){case 0:return!l.call(this);case 1:return!l.call(this,d[0]);case 2:return!l.call(this,d[0],d[1]);case 3:return!l.call(this,d[0],d[1],d[2])}return!l.apply(this,d)}}function DO(l){return V0(2,l)}var LO=wP(function(l,d){d=d.length==1&&$e(d[0])?Nt(d[0],Jn(Te())):Nt(mn(d,1),Jn(Te()));var m=d.length;return Ye(function(_){for(var T=-1,M=wn(_.length,m);++T=d}),Ro=Wy(function(){return arguments}())?Wy:function(l){return Ht(l)&&bt.call(l,"callee")&&!Ry.call(l,"callee")},$e=Z.isArray,KO=dy?Jn(dy):iP;function Bn(l){return l!=null&&cu(l.length)&&!vi(l)}function Yt(l){return Ht(l)&&Bn(l)}function QO(l){return l===!0||l===!1||Ht(l)&&In(l)==le}var Wi=dR||jh,JO=fy?Jn(fy):oP;function ZO(l){return Ht(l)&&l.nodeType===1&&!Ja(l)}function eM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Wi(l)||Rs(l)||Ro(l)))return!l.length;var d=_n(l);if(d==me||d==ze)return!l.size;if(Ka(l))return!oh(l).length;for(var m in l)if(bt.call(l,m))return!1;return!0}function tM(l,d){return qa(l,d)}function nM(l,d,m){m=typeof m=="function"?m:n;var _=m?m(l,d):n;return _===n?qa(l,d,n,m):!!_}function Ph(l){if(!Ht(l))return!1;var d=In(l);return d==ve||d==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Ja(l)}function rM(l){return typeof l=="number"&&Oy(l)}function vi(l){if(!jt(l))return!1;var d=In(l);return d==ye||d==xe||d==ae||d==Bt}function J0(l){return typeof l=="number"&&l==Ge(l)}function cu(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function jt(l){var d=typeof l;return l!=null&&(d=="object"||d=="function")}function Ht(l){return l!=null&&typeof l=="object"}var Z0=hy?Jn(hy):aP;function iM(l,d){return l===d||ih(l,d,wh(d))}function oM(l,d,m){return m=typeof m=="function"?m:n,ih(l,d,wh(d),m)}function sM(l){return eb(l)&&l!=+l}function aM(l){if(WP(l))throw new Le(o);return Gy(l)}function lM(l){return l===null}function cM(l){return l==null}function eb(l){return typeof l=="number"||Ht(l)&&In(l)==be}function Ja(l){if(!Ht(l)||In(l)!=Xe)return!1;var d=Nc(l);if(d===null)return!0;var m=bt.call(d,"constructor")&&d.constructor;return typeof m=="function"&&m instanceof m&&Oc.call(m)==oR}var Oh=py?Jn(py):lP;function uM(l){return J0(l)&&l>=-W&&l<=W}var tb=my?Jn(my):cP;function uu(l){return typeof l=="string"||!$e(l)&&Ht(l)&&In(l)==st}function er(l){return typeof l=="symbol"||Ht(l)&&In(l)==gt}var Rs=gy?Jn(gy):uP;function dM(l){return l===n}function fM(l){return Ht(l)&&_n(l)==_e}function hM(l){return Ht(l)&&In(l)==je}var pM=eu(sh),mM=eu(function(l,d){return l<=d});function nb(l){if(!l)return[];if(Bn(l))return uu(l)?Ir(l):Nn(l);if(Fa&&l[Fa])return qI(l[Fa]());var d=_n(l),m=d==me?qf:d==ze?Ic:Ps;return m(l)}function yi(l){if(!l)return l===0?l:0;if(l=yr(l),l===V||l===-V){var d=l<0?-1:1;return d*K}return l===l?l:0}function Ge(l){var d=yi(l),m=d%1;return d===d?m?d-m:d:0}function rb(l){return l?To(Ge(l),0,Q):0}function yr(l){if(typeof l=="number")return l;if(er(l))return X;if(jt(l)){var d=typeof l.valueOf=="function"?l.valueOf():l;l=jt(d)?d+"":d}if(typeof l!="string")return l===0?l:+l;l=_y(l);var m=Bl.test(l);return m||Hv.test(l)?RI(l.slice(2),m?2:8):Nl.test(l)?X:+l}function ib(l){return Jr(l,$n(l))}function gM(l){return l?To(Ge(l),-W,W):l===0?l:0}function pt(l){return l==null?"":Zn(l)}var vM=ks(function(l,d){if(Ka(d)||Bn(d)){Jr(d,sn(d),l);return}for(var m in d)bt.call(d,m)&&Wa(l,m,d[m])}),ob=ks(function(l,d){Jr(d,$n(d),l)}),du=ks(function(l,d,m,_){Jr(d,$n(d),l,_)}),yM=ks(function(l,d,m,_){Jr(d,sn(d),l,_)}),bM=mi(Zf);function xM(l,d){var m=Ts(l);return d==null?m:By(m,d)}var wM=Ye(function(l,d){l=St(l);var m=-1,_=d.length,T=_>2?d[2]:n;for(T&&Rn(d[0],d[1],T)&&(_=1);++m<_;)for(var M=d[m],B=$n(M),U=-1,Y=B.length;++U1),M}),Jr(l,bh(l),m),_&&(m=mr(m,h|p|g,OP));for(var T=d.length;T--;)dh(m,d[T]);return m});function FM(l,d){return ab(l,lu(Te(d)))}var zM=mi(function(l,d){return l==null?{}:hP(l,d)});function ab(l,d){if(l==null)return{};var m=Nt(bh(l),function(_){return[_]});return d=Te(d),Jy(l,m,function(_,T){return d(_,T[0])})}function jM(l,d,m){d=Ui(d,l);var _=-1,T=d.length;for(T||(T=1,l=n);++_d){var _=l;l=d,d=_}if(m||l%1||d%1){var T=My();return wn(l+T*(d-l+II("1e-"+((T+"").length-1))),d)}return lh(l,d)}var JM=As(function(l,d,m){return d=d.toLowerCase(),l+(m?ub(d):d)});function ub(l){return Lh(pt(l).toLowerCase())}function db(l){return l=pt(l),l&&l.replace(en,UI).replace(bI,"")}function ZM(l,d,m){l=pt(l),d=Zn(d);var _=l.length;m=m===n?_:To(Ge(m),0,_);var T=m;return m-=d.length,m>=0&&l.slice(m,T)==d}function eD(l){return l=pt(l),l&&ui.test(l)?l.replace(Wr,HI):l}function tD(l){return l=pt(l),l&&Rf.test(l)?l.replace(ms,"\\$&"):l}var nD=As(function(l,d,m){return l+(m?"-":"")+d.toLowerCase()}),rD=As(function(l,d,m){return l+(m?" ":"")+d.toLowerCase()}),iD=p0("toLowerCase");function oD(l,d,m){l=pt(l),d=Ge(d);var _=d?ws(l):0;if(!d||_>=d)return l;var T=(d-_)/2;return Zc(zc(T),m)+l+Zc(Fc(T),m)}function sD(l,d,m){l=pt(l),d=Ge(d);var _=d?ws(l):0;return d&&_>>0,m?(l=pt(l),l&&(typeof d=="string"||d!=null&&!Oh(d))&&(d=Zn(d),!d&&xs(l))?Hi(Ir(l),0,m):l.split(d,m)):[]}var hD=As(function(l,d,m){return l+(m?" ":"")+Lh(d)});function pD(l,d,m){return l=pt(l),m=m==null?0:To(Ge(m),0,l.length),d=Zn(d),l.slice(m,m+d.length)==d}function mD(l,d,m){var _=P.templateSettings;m&&Rn(l,d,m)&&(d=n),l=pt(l),d=du({},d,_,w0);var T=du({},d.imports,_.imports,w0),M=sn(T),B=Vf(T,M),U,Y,ne=0,re=d.interpolate||Ar,oe="__p += '",fe=Xf((d.escape||Ar).source+"|"+re.source+"|"+(re===aa?Kn:Ar).source+"|"+(d.evaluate||Ar).source+"|$","g"),we="//# sourceURL="+(bt.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EI+"]")+` -`;l.replace(fe,function(Ae,Je,it,tr,Pn,nr){return it||(it=tr),oe+=l.slice(ne,nr).replace(tI,WI),Je&&(U=!0,oe+=`' + -__e(`+Je+`) + -'`),Pn&&(Y=!0,oe+=`'; -`+Pn+`; -__p += '`),it&&(oe+=`' + -((__t = (`+it+`)) == null ? '' : __t) + -'`),ne=nr+Ae.length,Ae}),oe+=`'; -`;var ke=bt.call(d,"variable")&&d.variable;if(!ke)oe=`with (obj) { -`+oe+` -} -`;else if(Ba.test(ke))throw new Le(a);oe=(Y?oe.replace(Vt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(ke||"obj")+`) { -`+(ke?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+oe+`return __p -}`;var qe=hb(function(){return ft(M,we+"return "+oe).apply(n,B)});if(qe.source=oe,Ph(qe))throw qe;return qe}function gD(l){return pt(l).toLowerCase()}function vD(l){return pt(l).toUpperCase()}function yD(l,d,m){if(l=pt(l),l&&(m||d===n))return _y(l);if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Ir(d),M=Sy(_,T),B=Ey(_,T)+1;return Hi(_,M,B).join("")}function bD(l,d,m){if(l=pt(l),l&&(m||d===n))return l.slice(0,Ty(l)+1);if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Ey(_,Ir(d))+1;return Hi(_,0,T).join("")}function xD(l,d,m){if(l=pt(l),l&&(m||d===n))return l.replace(xo,"");if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Sy(_,Ir(d));return Hi(_,T).join("")}function wD(l,d){var m=N,_=H;if(jt(d)){var T="separator"in d?d.separator:T;m="length"in d?Ge(d.length):m,_="omission"in d?Zn(d.omission):_}l=pt(l);var M=l.length;if(xs(l)){var B=Ir(l);M=B.length}if(m>=M)return l;var U=m-ws(_);if(U<1)return _;var Y=B?Hi(B,0,U).join(""):l.slice(0,U);if(T===n)return Y+_;if(B&&(U+=Y.length-U),Oh(T)){if(l.slice(U).search(T)){var ne,re=Y;for(T.global||(T=Xf(T.source,pt(lr.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;Y=Y.slice(0,oe===n?U:oe)}}else if(l.indexOf(Zn(T),U)!=U){var fe=Y.lastIndexOf(T);fe>-1&&(Y=Y.slice(0,fe))}return Y+_}function _D(l){return l=pt(l),l&&Kr.test(l)?l.replace(Hr,QI):l}var SD=As(function(l,d,m){return l+(m?" ":"")+d.toUpperCase()}),Lh=p0("toUpperCase");function fb(l,d,m){return l=pt(l),d=m?n:d,d===n?VI(l)?eR(l):BI(l):l.match(d)||[]}var hb=Ye(function(l,d){try{return Qn(l,n,d)}catch(m){return Ph(m)?m:new Le(m)}}),ED=mi(function(l,d){return fr(d,function(m){m=Zr(m),hi(l,m,Ih(l[m],l))}),l});function CD(l){var d=l==null?0:l.length,m=Te();return l=d?Nt(l,function(_){if(typeof _[1]!="function")throw new hr(s);return[m(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var m=Q,_=wn(l,Q);d=Te(d),l-=Q;for(var T=Gf(_,d);++m0||d<0)?new et(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),d!==n&&(d=Ge(d),m=d<0?m.dropRight(-d):m.take(d-l)),m)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,d){var m=/^(?:filter|find|map|reject)|While$/.test(d),_=/^(?:head|last)$/.test(d),T=P[_?"take"+(d=="last"?"Right":""):d],M=_||/^find/.test(d);T&&(P.prototype[d]=function(){var B=this.__wrapped__,U=_?[1]:arguments,Y=B instanceof et,ne=U[0],re=Y||$e(B),oe=function(Je){var it=T.apply(P,Bi([Je],U));return _&&fe?it[0]:it};re&&m&&typeof ne=="function"&&ne.length!=1&&(Y=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,ke=M&&!fe,qe=Y&&!we;if(!M&&re){B=qe?B:new et(this);var Ae=l.apply(B,U);return Ae.__actions__.push({func:iu,args:[oe],thisArg:n}),new pr(Ae,fe)}return ke&&qe?l.apply(this,U):(Ae=this.thru(oe),ke?_?Ae.value()[0]:Ae.value():Ae)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var d=Rc[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var M=this.value();return d.apply($e(M)?M:[],T)}return this[m](function(B){return d.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,d){var m=P[d];if(m){var _=m.name+"";bt.call(Cs,_)||(Cs[_]=[]),Cs[_].push({name:d,func:m})}}),Cs[Qc(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=_R,et.prototype.reverse=SR,et.prototype.value=ER,P.prototype.at=Z2,P.prototype.chain=eO,P.prototype.commit=tO,P.prototype.next=nO,P.prototype.plant=iO,P.prototype.reverse=oO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=sO,P.prototype.first=P.prototype.head,Fa&&(P.prototype[Fa]=rO),P},_s=tR();_o?((_o.exports=_s)._=_s,Bf._=_s):pn._=_s}).call($t)})(wC,wC.exports);var te=wC.exports;function li(e){return C.jsx(ht,{px:.5,display:"inline-block",...e})}function Hz({primary:e,secondary:t}){return C.jsxs(En,{children:[C.jsx(ht,{children:e}),C.jsx(li,{}),C.jsx(ht,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -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 _C=function(){return _C=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},fwe=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(uwe,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return dwe(r.stringify(i))},selector:function(i,o){return i+(o[0]===":"?"":" ")+o},putRaw:function(i){r.raw+=i}},e);return r.client&&(r.sh||document.head.appendChild(r.sh=document.createElement("style")),r.putRaw=function(i){{var o=r.sh.sheet;try{o.insertRule(i,o.cssRules.length)}catch{}}}),r.put=function(i,o,s){var a="",c,u,f=[];for(c in o)u=o[c],u instanceof Object&&!(u instanceof Array)?f.push(c):a+=r.decl(c,u,i,s);a&&(a=i+"{"+a+"}",r.putRaw(s?s+"{"+a+"}":a));for(var h=0;h=0;){if(r[t]===e){n.deleteRule(t);break}t--}}XQ.removeRule=pwe;var mwe=XQ.removeRule,gwe=function(e){if(!e.client)return;var t=e.kebab;function n(i,o){this.rule=e.createRule(i,o),this.decl={}}n.prototype.diff=function(i){var o=this.decl,s=this.rule.style,a;for(a in o)i[a]===void 0&&s.removeProperty(a);for(a in i)i[a]!==o[a]&&s.setProperty(t(a),i[a]);this.decl=i},n.prototype.del=function(){mwe(this.rule)};function r(){this.tree={}}r.prototype.diff=function(i){var o=this.tree;for(var s in o)if(i[s]===void 0){var a=o[s];for(var c in a)a[c].del()}for(var s in i)if(o[s]===void 0)for(var c in i[s]){var u=new n(c,s);u.diff(i[s][c]),i[s][c]=u}else{var f=o[s],h=i[s];for(var c in f)h[c]||f[c].del();for(var c in h){var u=f[c];u?(u.diff(h[c]),h[c]=u):(u=new n(c,s),u.diff(h[c]),h[c]=u)}}this.tree=i},e.VRule=n,e.VSheet=r};function s3(e,t,n,r){var i={},o=!1,s,a;for(s in t)a=t[s],typeof a!="object"&&(o=!0,i[s]=a);o&&(e[r]||(e[r]={}),e[r][n]=i);for(s in t)if(a=t[s],typeof a=="object")if(s[0]==="@")s3(e,a,n,s);else{var c=s.indexOf("&")>-1,u=n.split(",");if(c)for(var f=0;ft,Gk=(e,t)=>({...e,...t});function vc(e,{init:t,effect:n,reduce:r=Gk}={}){const i=R.createContext([e,te.noop]);return[()=>R.useContext(i),({children:o})=>{const[s,a]=cwe(e),c=R.useCallback(f=>{const h=r(s(),f(s()));n==null||n({prev:s(),next:h}),a(h)},[s]),u=R.useMemo(()=>[s(),c],[s(),c]);return owe(async()=>{const f=await(t==null?void 0:t());f&&c(()=>f)}),C.jsx(i.Provider,{value:u,children:o})}]}function Iwe(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[ZQ,Rwe]=vc([],{reduce:(e,t)=>[t,...e]}),eJ=R.createContext(()=>te.noop);function Ol(){return R.useContext(eJ)}function Pwe({children:e}){const[t,n]=R.useState([]),[r,i]=R.useState(!1),[o,s]=R.useState(void 0),[,a]=ZQ();R.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=R.useCallback((h,p)=>(n(g=>[...g,{message:C.jsx(Hz,{primary:h,secondary:p}),key:new Date().getTime()}]),a(()=>({content:te.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`})),()=>u()),[n]),u=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(eJ.Provider,{value:c,children:e}),C.jsx(vxe,{anchorOrigin:{horizontal:"right",vertical:"bottom"},open:r,autoHideDuration:6e3,onClose:u,TransitionProps:{onExited:f},message:o==null?void 0:o.message,action:C.jsx(C.Fragment,{children:C.jsx(jp,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:u,children:C.jsx(HQ,{})})})},o==null?void 0:o.key)]})}/*! - * OverlayScrollbars - * Version: 2.3.2 - * - * Copyright (c) Rene Haas | KingSora. - * https://github.com/KingSora - * - * Released under the MIT license. - */function An(e,t){if(qk(e))for(let n=0;nt(e[n],n,e));return e}function fo(e,t){const n=xf(t);if(ta(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?UH(e,o,t):t.reduce((s,a)=>(s[a]=UH(e,o,a),s),i)}return i}e&&An(na(t),i=>qwe(e,i,t[i]))}const pl=(e,t)=>{const{o:n,u:r,_:i}=e;let o=n,s;const a=(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=>a(t(o,s),f):a,f=>[o,!!f,s]]},kw=()=>typeof window<"u",tJ=kw()&&Node.ELEMENT_NODE,{toString:Owe,hasOwnProperty:KL}=Object.prototype,Ju=e=>e===void 0,Vk=e=>e===null,Mwe=e=>Ju(e)||Vk(e)?`${e}`:Owe.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Vd=e=>typeof e=="number",xf=e=>typeof e=="string",Gz=e=>typeof e=="boolean",Rl=e=>typeof e=="function",ta=e=>Array.isArray(e),I1=e=>typeof e=="object"&&!ta(e)&&!Vk(e),qk=e=>{const t=!!e&&e.length,n=Vd(t)&&t>-1&&t%1==0;return ta(e)||!Rl(e)&&n?t>0&&I1(e)?t-1 in e:!0:!1},a3=e=>{if(!e||!I1(e)||Mwe(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=KL.call(e,n),s=i&&KL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Ju(t)||KL.call(e,t)},zx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===tJ:!1},Xk=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===tJ:!1},Yk=(e,t,n)=>e.indexOf(t,n),Gn=(e,t,n)=>(!n&&!xf(t)&&qk(t)?Array.prototype.push.apply(e,t):e.push(t),e),Wp=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Gn(n,r)}):An(e,r=>{Gn(n,r)}),n)},Vz=e=>!!e&&e.length===0,yc=(e,t,n)=>{An(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},Kk=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),na=e=>e?Object.keys(e):[],Br=(e,t,n,r,i,o,s)=>{const a=[t,n,r,i,o,s];return(typeof e!="object"||Vk(e))&&!Rl(e)&&(e={}),An(a,c=>{An(na(c),u=>{const f=c[u];if(e===f)return!0;const h=ta(f);if(f&&a3(f)){const p=e[u];let g=p;h&&!ta(p)?g=[]:!h&&!a3(p)&&(g={}),e[u]=Br(g,f)}else e[u]=h?f.slice():f})}),e},qz=e=>{for(const t in e)return!1;return!0},nJ=(e,t,n,r)=>{if(Ju(r))return n?n[e]:t;n&&(xf(r)||Vd(r))&&(n[e]=r)},No=(e,t,n)=>{if(Ju(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},rJ=(e,t)=>new Set((No(e,t)||"").split(" ")),Go=(e,t)=>{e&&e.removeAttribute(t)},Cp=(e,t,n,r)=>{if(n){const i=rJ(e,t);i[r?"add":"delete"](n);const o=Wp(i).join(" ").trim();No(e,t,o)}},Dwe=(e,t,n)=>rJ(e,t).has(n),_l=(e,t)=>nJ("scrollLeft",0,e,t),Ou=(e,t)=>nJ("scrollTop",0,e,t),l3=kw()&&Element.prototype,iJ=(e,t)=>{const n=[],r=t?Xk(t)&&t:document;return r?Gn(n,r.querySelectorAll(e)):n},Lwe=(e,t)=>{const n=t?Xk(t)&&t:document;return n?n.querySelector(e):null},SC=(e,t)=>Xk(e)?(l3.matches||l3.msMatchesSelector).call(e,t):!1,Xz=e=>e?Wp(e.childNodes):[],Uu=e=>e&&e.parentElement,ig=(e,t)=>{if(Xk(e)){const n=l3.closest;if(n)return n.call(e,t);do{if(SC(e,t))return e;e=Uu(e)}while(e)}},Nwe=(e,t,n)=>{const r=ig(e,t),i=e&&Lwe(n,r),o=ig(i,t)===r;return r&&i?r===e||i===e||o&&ig(ig(e,n),t)!==r:!1},Yz=(e,t,n)=>{if(n&&e){let r=t,i;qk(n)?(i=document.createDocumentFragment(),An(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)}},ba=(e,t)=>{Yz(e,null,t)},Bwe=(e,t)=>{Yz(Uu(e),e,t)},FH=(e,t)=>{Yz(Uu(e),e&&e.nextSibling,t)},hc=e=>{if(qk(e))An(Wp(e),t=>hc(t));else if(e){const t=Uu(e);t&&t.removeChild(e)}},Tp=e=>{const t=document.createElement("div");return e&&No(t,"class",e),t},oJ=e=>{const t=Tp();return t.innerHTML=e.trim(),An(Xz(t),n=>hc(n))},c3=e=>e.charAt(0).toUpperCase()+e.slice(1),$we=()=>Tp().style,Fwe=["-webkit-","-moz-","-o-","-ms-"],zwe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],QL={},JL={},jwe=e=>{let t=JL[e];if(Kk(JL,e))return t;const n=c3(e),r=$we();return An(Fwe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,c3(o)+n].find(a=>r[a]!==void 0))}),JL[e]=t||""},kv=e=>{if(kw()){let t=QL[e]||window[e];return Kk(QL,e)||(An(zwe,n=>(t=t||window[n+c3(e)],!t)),QL[e]=t),t}},Uwe=kv("MutationObserver"),zH=kv("IntersectionObserver"),og=kv("ResizeObserver"),sJ=kv("cancelAnimationFrame"),aJ=kv("requestAnimationFrame"),u3=kv("ScrollTimeline"),EC=kw()&&window.setTimeout,d3=kw()&&window.clearTimeout,Hwe=/[^\x20\t\r\n\f]+/g,lJ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&xf(t)){const a=t.match(Hwe)||[];for(s=a.length>0;i=a[o++];)s=!!n(r,i)&&s}return s},Kz=(e,t)=>{lJ(e,t,(n,r)=>n.remove(r))},rf=(e,t)=>(lJ(e,t,(n,r)=>n.add(r)),Kz.bind(0,e,t)),Qk=(e,t,n,r)=>{if(e&&t){let i=!0;return An(n,o=>{const s=r?r(e[o]):e[o],a=r?r(t[o]):t[o];s!==a&&(i=!1)}),i}return!1},cJ=(e,t)=>Qk(e,t,["w","h"]),uJ=(e,t)=>Qk(e,t,["x","y"]),Wwe=(e,t)=>Qk(e,t,["t","r","b","l"]),jH=(e,t,n)=>Qk(e,t,["width","height"],n&&(r=>Math.round(r))),Fs=()=>{},np=e=>{let t;const n=e?EC:aJ,r=e?d3:sJ;return[i=>{r(t),t=n(i,Rl(e)?e():e)},()=>r(t)]},Qz=(e,t)=>{let n,r,i,o=Fs;const{g:s,v:a,p:c}=t||{},u=function(v){o(),d3(n),n=r=void 0,o=Fs,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Fs&&u(f(i)||i)},p=function(){const v=Wp(arguments),y=Rl(s)?s():s;if(Vd(y)&&y>=0){const w=Rl(a)?a():a,b=Vd(w)&&w>=0,x=y>0?EC:aJ,E=y>0?d3:sJ,A=f(v)||v,k=u.bind(0,A);o();const O=x(k,y);o=()=>E(O),b&&!n&&(n=EC(h,w)),r=i=A}else u(v)};return p.m=h,p},Gwe={opacity:1,zIndex:1},N_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},Vwe=(e,t)=>!Gwe[e]&&Vd(t)?`${t}px`:t,UH=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),qwe=(e,t,n)=>{try{const{style:r}=e;Ju(r[t])?r.setProperty(t,n):r[t]=Vwe(t,n)}catch{}},Qg=e=>fo(e,"direction")==="rtl",HH=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,a=`${r}bottom${i}`,c=`${r}left${i}`,u=fo(e,[o,s,a,c]);return{t:N_(u[o],!0),r:N_(u[s],!0),b:N_(u[a],!0),l:N_(u[c],!0)}},Jg=(e,t)=>`translate${ta(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:WH}=Math,Jz={w:0,h:0},R1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:Jz,hE=e=>e?{w:e.clientWidth,h:e.clientHeight}:Jz,CC=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:Jz,TC=e=>{const t=parseFloat(fo(e,"height"))||0,n=parseFloat(fo(e,"width"))||0;return{w:n-WH(n),h:t-WH(t)}},Ql=e=>e.getBoundingClientRect(),sg=e=>!!(e&&(e.height||e.width));let B_;const Xwe=()=>{if(Ju(B_)){B_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){B_=!0}}))}catch{}}return B_},dJ=e=>e.split(" "),Ywe=(e,t,n,r)=>{An(dJ(t),i=>{e.removeEventListener(i,n,r)})},oi=(e,t,n,r)=>{var i;const o=Xwe(),s=(i=o&&r&&r.S)!=null?i:o,a=r&&r.$||!1,c=r&&r.C||!1,u=[],f=o?{passive:s,capture:a}:a;return An(dJ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,a),n&&n(g)}:n;Gn(u,Ywe.bind(null,e,h,p,a)),e.addEventListener(h,p,f)}),yc.bind(0,u)},fJ=e=>e.stopPropagation(),hJ=e=>e.preventDefault(),Kwe={x:0,y:0},ZL=e=>{const t=e?Ql(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:Kwe},GH=(e,t)=>{An(ta(t)?t:[t],e)},Zz=e=>{const t=new Map,n=(o,s)=>{if(o){const a=t.get(o);GH(c=>{a&&a[c?"delete":"clear"](c)},s)}else t.forEach(a=>{a.clear()}),t.clear()},r=(o,s)=>{if(xf(o)){const u=t.get(o)||new Set;return t.set(o,u),GH(f=>{Rl(f)&&u.add(f)},s),n.bind(0,o,s)}Gz(s)&&s&&n();const a=na(o),c=[];return An(a,u=>{const f=o[u];f&&Gn(c,r(u,f))}),yc.bind(0,c)},i=(o,s)=>{const a=t.get(o);An(Wp(a),c=>{s&&!Vz(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},VH=e=>JSON.stringify(e,(t,n)=>{if(Rl(n))throw new Error;return n}),Qwe={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"]}},pJ=(e,t)=>{const n={},r=na(t).concat(na(e));return An(r,i=>{const o=e[i],s=t[i];if(I1(o)&&I1(s))Br(n[i]={},pJ(o,s)),qz(n[i])&&delete n[i];else if(Kk(t,i)&&s!==o){let a=!0;if(ta(o)||ta(s))try{VH(o)===VH(s)&&(a=!1)}catch{}a&&(n[i]=s)}}),n},Aw="data-overlayscrollbars",mJ="os-environment",gJ=`${mJ}-flexbox-glue`,Jwe=`${gJ}-max`,vJ="os-scrollbar-hidden",eN=`${Aw}-initialize`,ml=Aw,yJ=`${ml}-overflow-x`,bJ=`${ml}-overflow-y`,_g="overflowVisible",Zwe="scrollbarHidden",qH="scrollbarPressed",kC="updating",gd=`${Aw}-viewport`,tN="arrange",xJ="scrollbarHidden",Sg=_g,f3=`${Aw}-padding`,e_e=Sg,XH=`${Aw}-content`,ej="os-size-observer",t_e=`${ej}-appear`,n_e=`${ej}-listener`,r_e="os-trinsic-observer",i_e="os-no-css-vars",o_e="os-theme-none",fs="os-scrollbar",s_e=`${fs}-rtl`,a_e=`${fs}-horizontal`,l_e=`${fs}-vertical`,wJ=`${fs}-track`,tj=`${fs}-handle`,c_e=`${fs}-visible`,u_e=`${fs}-cornerless`,YH=`${fs}-transitionless`,KH=`${fs}-interaction`,QH=`${fs}-unusable`,h3=`${fs}-auto-hide`,JH=`${h3}-hidden`,ZH=`${fs}-wheel`,d_e=`${wJ}-interactive`,f_e=`${tj}-interactive`,_J={},Gp=()=>_J,h_e=e=>{const t=[];return An(ta(e)?e:[e],n=>{const r=na(n);An(r,i=>{Gn(t,_J[i]=n[i])})}),t},p_e="__osOptionsValidationPlugin",m_e="__osSizeObserverPlugin",nj="__osScrollbarsHidingPlugin",g_e="__osClickScrollPlugin";let nN;const eW=(e,t,n,r)=>{ba(e,t);const i=hE(t),o=R1(t),s=TC(n);return r&&hc(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},v_e=e=>{let t=!1;const n=rf(e,vJ);try{t=fo(e,jwe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},y_e=(e,t)=>{const n="hidden";fo(e,{overflowX:n,overflowY:n,direction:"rtl"}),_l(e,0);const r=ZL(e),i=ZL(t);_l(e,-999);const o=ZL(t);return{i:r.x===i.x,n:i.x!==o.x}},b_e=(e,t)=>{const n=rf(e,gJ),r=Ql(e),i=Ql(t),o=jH(i,r,!0),s=rf(e,Jwe),a=Ql(e),c=Ql(t),u=jH(c,a,!0);return n(),s(),o&&u},x_e=()=>{const{body:e}=document,n=oJ(`
`)[0],r=n.firstChild,[i,,o]=Zz(),[s,a]=pl({o:eW(e,n,r),u:uJ},eW.bind(0,e,n,r,!0)),[c]=a(),u=v_e(n),f={x:c.x===0,y:c.y===0},h={elements:{host:null,padding:!u,viewport:b=>u&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},p=Br({},Qwe),g=Br.bind(0,{},p),v=Br.bind(0,{},h),y={k:c,I:f,A:u,H:fo(n,"zIndex")==="-1",B:!!u3,V:y_e(n,r),Y:b_e(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Br(h,b)&&v(),G:g,X:b=>Br(p,b)&&g(),U:Br({},h),W:Br({},p)},S=window.addEventListener,w=Qz(b=>o(b?"z":"r"),{g:33,v:99});if(Go(n,"style"),hc(n),S("resize",w.bind(0,!1)),!u&&(!f.x||!f.y)){let b;S("resize",()=>{const x=Gp()[nj];b=b||x&&x.R(),b&&b(y,s,w.bind(0,!0))})}return y},hs=()=>(nN||(nN=x_e()),nN),rj=(e,t)=>Rl(t)?t.apply(0,e):t,w_e=(e,t,n,r)=>{const i=Ju(r)?n:r;return rj(e,i)||t.apply(0,e)},SJ=(e,t,n,r)=>{const i=Ju(r)?n:r,o=rj(e,i);return!!o&&(zx(o)?o:t.apply(0,e))},__e=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=hs(),{nativeScrollbarsOverlaid:a,body:c}=t,u=r??a,f=Ju(i)?c:i,h=(o.x||o.y)&&u,p=e&&(Vk(f)?!s:f);return!!h||!!p},ij=new WeakMap,S_e=(e,t)=>{ij.set(e,t)},E_e=e=>{ij.delete(e)},EJ=e=>ij.get(e),tW=(e,t)=>e?t.split(".").reduce((n,r)=>n&&Kk(n,r)?n[r]:void 0,e):void 0,p3=(e,t,n)=>r=>[tW(e,r),n||tW(t,r)!==void 0],CJ=e=>{let t=e;return[()=>t,n=>{t=Br({},t,n)}]},$_="tabindex",F_=Tp.bind(0,""),rN=e=>{ba(Uu(e),Xz(e)),hc(e)},C_e=e=>{const t=hs(),{q:n,A:r}=t,i=Gp()[nj],o=i&&i.T,{elements:s}=n(),{host:a,padding:c,viewport:u,content:f}=s,h=zx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:w}=g||{},b=h?e:p.target,x=SC(b,"textarea"),E=b.ownerDocument,I=E.documentElement,A=b===E.body,k=E.defaultView,O=w_e.bind(0,[b]),L=SJ.bind(0,[b]),N=rj.bind(0,[b]),H=O.bind(0,F_,u),G=L.bind(0,F_,f),z=H(S),D=z===b,F=D&&A,j=!D&&G(w),V=!D&&zx(z)&&z===j,W=V&&!!N(f),K=W?H():z,X=W?j:G(),ie=F?I:V?K:z,ce=x?O(F_,a,v):b,ue=F?ie:ce,se=V?X:j,J=E.activeElement,ae=!D&&k.top===k&&J===b,le={Z:b,J:ue,K:ie,tt:!D&&L(F_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:F?I:ie,et:F?E:ie,ct:k,rt:E,lt:x,it:A,ut:h,ft:D,dt:V,_t:(st,gt)=>Dwe(ie,D?ml:gd,D?gt:st),ht:(st,gt,vt)=>Cp(ie,D?ml:gd,D?gt:st,vt)},he=na(le).reduce((st,gt)=>{const vt=le[gt];return Gn(st,vt&&zx(vt)&&!Uu(vt)?vt:!1)},[]),pe=st=>st?Yk(he,st)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Ze}=le,Xe=[()=>{Go(ye,ml),Go(ye,eN),Go(ve,eN),A&&(Go(I,ml),Go(I,eN))}],ct=x&&pe(ye);let Bt=x?ve:Xz([be,me,xe,ye,ve].find(st=>pe(st)===!1));const Pe=F?ve:be||me;return[le,()=>{No(ye,ml,D?"viewport":"host"),No(xe,f3,""),No(be,XH,""),D||No(me,gd,"");const st=A&&!D?rf(Uu(b),vJ):Fs;if(ct&&(FH(ve,ye),Gn(Xe,()=>{FH(ye,ve),hc(ye)})),ba(Pe,Bt),ba(ye,xe),ba(xe||ye,!D&&me),ba(me,be),Gn(Xe,()=>{st(),Go(xe,f3),Go(be,XH),Go(me,yJ),Go(me,bJ),Go(me,gd),pe(be)&&rN(be),pe(me)&&rN(me),pe(xe)&&rN(xe)}),r&&!D&&(Cp(me,gd,xJ,!0),Gn(Xe,Go.bind(0,me,gd))),Ze&&(Bwe(me,Ze),Gn(Xe,hc.bind(0,Ze))),ae){const gt=No(me,$_);No(me,$_,"-1"),me.focus();const vt=()=>gt?No(me,$_,gt):Go(me,$_),_e=oi(E,"pointerdown keydown",()=>{vt(),_e()});Gn(Xe,[vt,_e])}else J&&J.focus&&J.focus();Bt=0},yc.bind(0,Xe)]},T_e=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=hs(),{gt:s}=r(),{vt:a}=i,c=(n||!o)&&a;return c&&fo(n,{height:s?"":"100%"}),{wt:c,bt:c}}},k_e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:a}=e,[c,u]=pl({u:Wwe,o:HH()},HH.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=u(p);const{A:y,Y:S}=hs(),{yt:w}=n(),{wt:b,bt:x,St:E}=f,[I,A]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!a&&(A||E||v);if(O){const L=!I||!o&&!y,N=g.r+g.l,H=g.t+g.b,G={marginRight:L&&!w?-N:0,marginBottom:L?-H:0,marginLeft:L&&w?-N:0,top:L?-g.t:0,right:L?w?-g.r:"auto":0,left:L?w?"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};fo(o||s,G),fo(s,z),r({tt:g,$t:!L,P:o?z:Br({},G,z)})}return{xt:O}}},{max:m3}=Math,vd=m3.bind(0,0),TJ="visible",nW="hidden",A_e=42,z_={u:cJ,o:{w:0,h:0}},I_e={u:uJ,o:{x:nW,y:nW}},R_e=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:vd(e.w-t.w),h:vd(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},j_=e=>e.indexOf(TJ)===0,P_e=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ot:a,ft:c,ht:u,it:f,ct:h}=e,{k:p,Y:g,A:v,I:y}=hs(),S=Gp()[nj],w=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=pl(z_,TC.bind(0,s)),[I,A]=pl(z_,CC.bind(0,s)),[k,O]=pl(z_),[L,N]=pl(z_),[H]=pl(I_e),G=(W,K)=>{if(fo(s,{height:""}),K){const{$t:X,tt:Q}=n(),{Ct:ie,M:ce}=W,ue=TC(i),se=hE(i),J=fo(s,"boxSizing")==="content-box",ae=X||J?Q.b+Q.t:0,le=!(y.x&&J);fo(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(W,K)=>{const X=!v&&!W?A_e:0,Q=(pe,ve,ye)=>{const xe=fo(s,pe),be=(K?K[pe]:xe)==="scroll";return[xe,be,be&&!v?ve?X:ye:0,ve&&!!X]},[ie,ce,ue,se]=Q("overflowX",y.x,p.x),[J,ae,le,he]=Q("overflowY",y.y,p.y);return{Ot:{x:ie,y:J},Ct:{x:ce,y:ae},M:{x:ue,y:le},D:{x:se,y:he}}},D=(W,K,X,Q)=>{const ie=(ae,le)=>{const he=j_(ae),pe=le&&he&&ae.replace(`${TJ}-`,"")||"";return[le&&!he?ae:"",j_(pe)?"hidden":pe]},[ce,ue]=ie(X.x,K.x),[se,J]=ie(X.y,K.y);return Q.overflowX=ue&&se?ue:ce,Q.overflowY=J&&ce?J:se,z(W,Q)},F=(W,K,X,Q)=>{const{M:ie,D:ce}=W,{x:ue,y:se}=ce,{x:J,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;Q.width=`calc(100% + ${ae+ve*-1}px)`,Q[he]=-ae+ve,Q.marginBottom=-J+ye,X&&(Q[pe]=xe+(se?ae:0),Q.paddingBottom=me+(ue?J:0))},[j,V]=S?S.L(w,g,s,a,n,z,F):[()=>w,()=>[Fs]];return(W,K,X)=>{const{wt:Q,Tt:ie,bt:ce,xt:ue,vt:se,St:J}=W,{gt:ae,yt:le}=n(),[he,pe]=K("showNativeOverlaidScrollbars"),[ve,ye]=K("overflow"),xe=he&&y.x&&y.y,me=!c&&!g&&(Q||ce||ie||pe||se),be=j_(ve.x),Ze=j_(ve.y),Xe=be||Ze;let ct=E(X),Bt=A(X),Pe=O(X),ze=N(X),st;if(pe&&v&&u(xJ,Zwe,!xe),me&&(st=z(xe),G(st,ae)),Q||ue||ce||J||pe){Xe&&u(Sg,_g,!1);const[Re,He]=V(xe,le,st),[xt,Vt]=ct=x(X),[yn,Yr]=Bt=I(X),Hr=hE(s);let Wr=yn,Kr=Hr;Re(),(Yr||Vt||pe)&&He&&!xe&&j(He,yn,xt,le)&&(Kr=hE(s),Wr=CC(s));const ui={w:vd(m3(yn.w,Wr.w)+xt.w),h:vd(m3(yn.h,Wr.h)+xt.h)},ps={w:vd((b?h.innerWidth:Kr.w+vd(Hr.w-yn.w))+xt.w),h:vd((b?h.innerHeight+xt.h:Kr.h+vd(Hr.h-yn.h))+xt.h)};ze=L(ps),Pe=k(R_e(ui,ps),X)}const[gt,vt]=ze,[_e,je]=Pe,[Ke,Fe]=Bt,[Be,Pt]=ct,dt={x:_e.w>0,y:_e.h>0},Ie=be&&Ze&&(dt.x||dt.y)||be&&dt.x&&!dt.y||Ze&&dt.y&&!dt.x;if(ue||J||Pt||Fe||vt||je||ye||pe||me){const Re={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},He=D(xe,dt,ve,Re),xt=j(He,Ke,Be,le);c||F(He,le,xt,Re),me&&G(He,ae),c?(No(i,yJ,Re.overflowX),No(i,bJ,Re.overflowY)):fo(s,Re)}Cp(i,ml,_g,Ie),Cp(o,f3,e_e,Ie),c||Cp(s,gd,Sg,Xe);const[at,zt]=H(z(xe).Ot);return r({Ot:at,zt:{x:gt.w,y:gt.h},Et:{x:_e.w,y:_e.h},At:dt}),{It:zt,Ht:vt,Lt:je}}},rW=(e,t,n)=>{const r={},i=t||{},o=na(e).concat(na(i));return An(o,s=>{const a=e[s],c=i[s];r[s]=!!(n||a||c)}),r},O_e=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:a,Y:c}=hs(),u=!s&&(a.x||a.y),f=[T_e(e,t),k_e(e,t),P_e(e,t)];return(h,p,g)=>{const v=rW(Br({wt:!1,xt:!1,St:!1,vt:!1,Ht:!1,Lt:!1,It:!1,Tt:!1,bt:!1,Pt:!1},p),{},g),y=u||!c,S=y&&_l(r),w=y&&Ou(r);i("",kC,!0);let b=v;return An(f,x=>{b=rW(b,x(b,h,!!g)||{},g)}),_l(r,S),Ou(r,w),i("",kC),o||(_l(n,0),Ou(n,0)),b}},M_e=(e,t,n)=>{let r,i=!1;const o=()=>{i=!0},s=a=>{if(n){const c=n.reduce((u,f)=>{if(f){const[h,p]=f,g=p&&h&&(a?a(h):iJ(h,e));g&&g.length&&p&&xf(p)&&Gn(u,[g,p.trim()],!0)}return u},[]);An(c,u=>An(u[0],f=>{const h=u[1],p=r.get(f)||[];if(e.contains(f)){const v=oi(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,Gn(p,v))}else yc(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},iW=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:a,kt:c,Bt:u,Vt:f}=r||{},h=Qz(()=>i&&n(!0),{g:33,v:99}),[p,g]=M_e(e,h,a),v=o||[],y=s||[],S=v.concat(y),w=(x,E)=>{const I=u||Fs,A=f||Fs,k=new Set,O=new Set;let L=!1,N=!1;if(An(x,H=>{const{attributeName:G,target:z,type:D,oldValue:F,addedNodes:j,removedNodes:V}=H,W=D==="attributes",K=D==="childList",X=e===z,Q=W&&xf(G)?No(z,G):0,ie=Q!==0&&F!==Q,ce=Yk(y,G)>-1&&ie;if(t&&(K||!X)){const ue=!W,se=W&&ie,J=se&&c&&SC(z,c),le=(J?!I(z,G,F,Q):ue||se)&&!A(H,!!J,e,r);An(j,he=>k.add(he)),An(V,he=>k.add(he)),N=N||le}!t&&X&&ie&&!I(z,G,F,Q)&&(O.add(G),L=L||ce)}),k.size>0&&g(H=>Wp(k).reduce((G,z)=>(Gn(G,iJ(H,z)),SC(z,H)?Gn(G,z):G),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[Wp(O),L];return!E&&n.apply(0,H),H}},b=new Uwe(x=>w(x));return b.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:S,subtree:t,childList:t,characterData:t}),i=!0,[()=>{i&&(p(),b.disconnect(),i=!1)},()=>{if(i){h.m();const x=b.takeRecords();return!Vz(x)&&w(x,!0)}}]},U_=3333333,kJ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=Gp()[m_e],{V:s}=hs(),c=oJ(`
`)[0],u=c.firstChild,f=Qg.bind(0,e),[h]=pl({o:!1,_:!0,u:(v,y)=>!(!v||!sg(v)&&sg(y))}),p=v=>{const y=ta(v)&&v.length>0&&I1(v[0]),S=!y&&Gz(v[0]);let w=!1,b=!1,x=!0;if(y){const[E,,I]=h(v.pop().contentRect),A=sg(E),k=sg(I);w=!I&&!!k||!A,b=!k&&A,x=!w}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Qg(c);_l(c,E?s.n?-U_:s.i?0:U_:U_),Ou(c,U_)}w||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{yc(g),hc(c)},()=>{let v=i&&p;if(og){const y=new og(p);y.observe(u),Gn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(u,p,i);v=y,Gn(g,S)}if(r){const[y]=pl({o:void 0},f);Gn(g,oi(c,"scroll",S=>{const w=y(),[b,x,E]=w;x&&(Kz(u,"ltr rtl"),rf(u,b?"rtl":"ltr"),p([!!b,x,E])),fJ(S)}))}v&&(rf(c,t_e),Gn(g,oi(c,"animationstart",v,{C:!!og}))),(og||o)&&ba(e,c)}]},D_e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,L_e=(e,t)=>{let n;const r=Tp(r_e),i=[],[o]=pl({o:!1}),s=(c,u)=>{if(c){const f=o(D_e(c)),[,h]=f;return h&&!u&&t(f)&&[f]}},a=(c,u)=>c&&c.length>0&&s(c.pop(),u);return[()=>{yc(i),hc(r)},()=>{if(zH)n=new zH(c=>a(c),{root:e}),n.observe(r),Gn(i,()=>{n.disconnect()});else{const c=()=>{const h=R1(r);s(h)},[u,f]=kJ(r,c);Gn(i,u),f(),c()}ba(e,r)},()=>n&&a(n.takeRecords(),!0)]},oW=`[${ml}]`,N_e=`[${gd}]`,iN=["tabindex"],sW=["wrap","cols","rows"],oN=["id","class","style","open"],B_e=(e,t,n)=>{let r,i,o;const{J:s,K:a,nt:c,lt:u,ft:f,_t:h,ht:p}=e,{Y:g}=hs(),[v]=pl({u:cJ,o:{w:0,h:0}},()=>{const F=h(Sg,_g),j=h(tN,""),V=j&&_l(a),W=j&&Ou(a);p(Sg,_g),p(tN,""),p("",kC,!0);const K=CC(c),X=CC(a),Q=TC(a);return p(Sg,_g,F),p(tN,"",j),p("",kC),_l(a,V),Ou(a,W),{w:X.w+K.w+Q.w,h:X.h+K.h+Q.h}}),y=u?sW:oN.concat(sW),S=Qz(n,{g:()=>r,v:()=>i,p(F,j){const[V]=F,[W]=j;return[na(V).concat(na(W)).reduce((K,X)=>(K[X]=V[X]||W[X],K),{})]}}),w=F=>{An(F||iN,j=>{if(Yk(iN,j)>-1){const V=No(s,j);xf(V)?No(a,j,V):Go(a,j)}})},b=(F,j)=>{const[V,W]=F,K={vt:W};return t({gt:V}),!j&&n(K),K},x=({wt:F,jt:j,Pt:V})=>{const W=!F||V?n:S;let K=!1;if(j){const[X,Q]=j;K=Q,t({yt:X})}W({wt:F,Pt:V,St:K})},E=(F,j)=>{const[,V]=v(),W={bt:V};return V&&!j&&(F?n:S)(W),W},I=(F,j,V)=>{const W={Tt:j};return j?!V&&S(W):f||w(F),W},[A,k,O]=c||!g?L_e(s,b):[Fs,Fs,Fs],[L,N]=f?[Fs,Fs]:kJ(s,x,{Pt:!0,Yt:!0}),[H,G]=iW(s,!1,I,{Dt:oN,Mt:oN.concat(iN)});let z;const D=f&&og&&new og(F=>{const j=F[F.length-1].contentRect,V=sg(j),K=!sg(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{A(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),w(),N(),k()},()=>{const F={},j=G(),V=O(),W=o&&o[1]();return j&&Br(F,I.apply(0,Gn(j,!0))),V&&Br(F,b.apply(0,Gn(V,!0))),W&&Br(F,E.apply(0,Gn(W,!0))),F},F=>{const[j]=F("update.ignoreMutation"),[V,W]=F("update.attributes"),[K,X]=F("update.elementEvents"),[Q,ie]=F("update.debounce"),ce=X||W,ue=se=>Rl(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=iW(c||a,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:oW,Vt:(se,J)=>{const{target:ae,attributeName:le}=se;return(!J&&le&&!f?Nwe(ae,oW,N_e):!1)||!!ig(ae,`.${fs}`)||!!ue(se)}})),ie)if(S.m(),ta(Q)){const se=Q[0],J=Q[1];r=Vd(se)&&se,i=Vd(J)&&J}else Vd(Q)?(r=Q,i=!1):(r=!1,i=!1)}]},aW={x:0,y:0},$_e=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:aW,Et:aW,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Qg(e.J)}),F_e=(e,t)=>{const n=p3(t,{}),[r,i,o]=Zz(),[s,a,c]=C_e(e),u=CJ($_e(s)),[f,h]=u,p=O_e(s,u),g=(x,E,I)=>{const k=na(x).some(O=>!!x[O])||!qz(E)||I;return k&&o("u",[x,E,I]),k},[v,y,S,w]=B_e(s,h,x=>g(p(n,x),{},!1)),b=f.bind(0);return b.Nt=x=>r("u",x),b.qt=()=>{const{Z:x,K:E,rt:I,it:A}=s,k=A?I.documentElement:x,O=_l(k),L=Ou(k);y(),a(),_l(E,O),Ou(E,L)},b.Ft=s,[(x,E)=>{const I=p3(t,x,E);return w(I),g(p(I,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:lW}=Math,z_e=e=>{const{width:t,height:n}=Ql(e),{w:r,h:i}=R1(e);return{x:lW(t)/r||1,y:lW(n)/i||1}},j_e=(e,t,n)=>{const r=t.scrollbars,{button:i,isPrimary:o,pointerType:s}=e,{pointers:a}=r;return i===0&&o&&r[n?"dragScroll":"clickScroll"]&&(a||[]).includes(s)},cW="pointerup pointerleave pointercancel lostpointercapture",U_e=(e,t)=>oi(e,"mousedown",oi.bind(0,t,"click",fJ,{C:!0,$:!0}),{$:!0}),H_e=(e,t,n,r,i,o,s)=>{const{V:a}=hs(),{Gt:c,Xt:u,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",w=(b,x)=>E=>{const{Et:I}=o(),A=R1(u)[y]-R1(c)[y],O=x*E/A*I[S],N=Qg(f)&&s?a.n||a.i?1:-1:1;i[h]=b+O*N};return oi(u,"pointerdown",b=>{const x=ig(b.target,`.${tj}`)===c,E=x?c:u;if(Cp(t,ml,qH,!0),j_e(b,e,x)){const I=!x&&b.shiftKey,A=()=>Ql(c),k=()=>Ql(u),O=(K,X)=>(K||A())[v]-(X||k())[v],L=w(i[h]||0,1/z_e(i)[S]),N=b[p],H=A(),G=k(),z=H[g],D=O(H,G)+z/2,F=N-G[v],j=x?0:F-D,V=K=>{yc(W),E.releasePointerCapture(K.pointerId)},W=[Cp.bind(0,t,ml,qH),oi(n,cW,V),oi(n,"selectstart",K=>hJ(K),{S:!1}),oi(u,cW,V),oi(u,"pointermove",K=>{const X=K[p]-N;(x||I)&&L(j+X)})];if(I)L(j);else if(!x){const K=Gp()[g_e];K&&Gn(W,K.O(L,O,j,z,F))}E.setPointerCapture(b.pointerId)}})},W_e=(e,t)=>(n,r,i,o,s,a,c)=>{const{Ut:u}=n,[f,h]=np(333),p=!!s.scrollBy;let g=!0;return yc.bind(0,[oi(u,"pointerenter",()=>{r(KH,!0)}),oi(u,"pointerleave pointercancel",()=>{r(KH)}),oi(u,"wheel",v=>{const{deltaX:y,deltaY:S,deltaMode:w}=v;p&&g&&w===0&&Uu(u)===o&&s.scrollBy({left:y,top:S,behavior:"smooth"}),g=!1,r(ZH,!0),f(()=>{g=!0,r(ZH)}),hJ(v)},{S:!1,$:!0}),U_e(u,i),H_e(e,o,i,n,s,t,c),h])},{min:AC,max:g3,round:G_e}=Math,AJ=(e,t,n,r)=>{if(r){const a=n?"x":"y",{Et:c,zt:u}=r,f=u[a],h=c[a];return g3(0,AC(1,f/(f+h)))}const i=n?"width":"height",o=Ql(e)[i],s=Ql(t)[i];return g3(0,AC(1,o/s))},V_e=(e,t,n,r,i,o)=>{const{V:s}=hs(),a=o?"x":"y",c=o?"Left":"Top",{Et:u}=r,f=G_e(u[a]),h=AC(f,g3(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=AC(1,(p?g:h)/f),S=AJ(e,t,o);return 1/S*(1-S)*y},IJ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),q_e=(e,t)=>({transform:[Jg("0%",t),Jg(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),X_e=e=>`${Math.max(0,e-.5)}px`,uW=(e,t,n,r)=>IJ(e,t,{transform:[Jg("0px",r),Jg(X_e(n),r)]},"add"),dW=(e,t)=>u3?new u3({source:e,axis:t}):null,Y_e=(e,t,n)=>{const{q:r,H:i}=hs(),{scrollbars:o}=r(),{slot:s}=o,{rt:a,Z:c,J:u,K:f,ut:h,st:p,it:g,ft:v}=t,{scrollbars:y}=h?{}:e,{slot:S}=y||{},w=new Map,b=dW(p,"x"),x=dW(p,"y"),E=SJ([c,u,f],()=>v&&g?c:u,s,S),I=se=>v&&!g&&Uu(se)===f,A=se=>{w.forEach((J,ae)=>{(se?Yk(ta(se)?se:[se],ae)>-1:!0)&&((J||[]).forEach(he=>{he&&he.cancel()}),w.delete(ae))})},k=(se,J,ae)=>{const le=ae?rf:Kz;An(se,he=>{le(he.Ut,J)})},O=(se,J)=>{An(se,ae=>{const[le,he]=J(ae);fo(le,he)})},L=(se,J,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(AJ(he,pe,ae,J)*100).toFixed(3)}%`}]})},N=(se,J,ae)=>{!x&&!x&&O(se,le=>{const{Gt:he,Xt:pe,Ut:ve}=le,ye=V_e(he,pe,p,J,Qg(ve),ae);return[he,{transform:ye===ye?Jg(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:J}=se,ae=I(J)&&J;return[ae,{transform:ae?Jg([`${_l(p)}px`,`${Ou(p)}px`]):""}]},G=[],z=[],D=[],F=(se,J,ae)=>{const le=Gz(ae),he=le?ae:!0,pe=le?!ae:!0;he&&k(z,se,J),pe&&k(D,se,J)},j=se=>{L(z,se,!0),L(D,se)},V=se=>{N(z,se,!0),N(D,se)},W=()=>{const se=(J,{Ut:ae,Gt:le})=>{A(le),w.set(le,[IJ(le,J?b:x,q_e(J&&Qg(ae),J))])};z.forEach(se.bind(0,!0)),D.forEach(se.bind(0,!1))},K=()=>{!x&&!x&&(v&&O(z,H),v&&O(D,H))},X=({Et:se})=>{D.concat(z).forEach(({Ut:J})=>{A(J),I(J)&&w.set(J,[uW(J,b,se.x,!0),uW(J,x,se.y)])})},Q=se=>{const J=se?a_e:l_e,ae=se?z:D,le=Vz(ae)?YH:"",he=Tp(`${fs} ${J} ${le}`),pe=Tp(wJ),ve=Tp(tj),ye={Ut:he,Xt:pe,Gt:ve};return i||rf(he,i_e),ba(he,pe),ba(pe,ve),Gn(ae,ye),Gn(G,[hc.bind(0,he),A,n(ye,F,a,u,p,se?b:x,se)]),ye},ie=Q.bind(0,!0),ce=Q.bind(0,!1),ue=()=>{ba(E,z[0].Ut),ba(E,D[0].Ut),EC(()=>{F(YH)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:W,Kt:X,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,yc.bind(0,G)]},sN=e=>e.pointerType==="mouse",K_e=(e,t,n,r)=>{let i,o,s,a,c,u=Fs,f=0;const h=CJ({}),[p]=h,[g,v]=np(),[y,S]=np(),[w,b]=np(100),[x,E]=np(100),[I,A]=np(100),[k,O]=np(()=>f),[L,N,H]=Y_e(e,n.Ft,W_e(t,n)),{J:G,et:z,it:D}=n.Ft,{tn:F,Wt:j,Zt:V,Jt:W,Kt:K,Qt:X}=L,Q=J=>{F(h3,J,!0),F(h3,J,!1)},ie=(J,ae)=>{if(O(),J)F(JH);else{const le=()=>F(JH,!0);f>0&&!ae?k(le):le()}},ce=J=>{sN(J)&&(a=o,a&&ie(!0))},ue=[b,O,E,A,S,v,H,oi(G,"pointerover",ce,{C:!0}),oi(G,"pointerenter",ce),oi(G,"pointerleave",J=>{sN(J)&&(a=!1,o&&ie(!1))}),oi(G,"pointermove",J=>{sN(J)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),oi(z,"scroll",J=>{y(()=>{V(n()),s&&ie(!0),w(()=>{s&&!a&&ie(!1)})}),r(J),X()})],se=p.bind(0);return se.Ft=L,se.qt=N,[(J,ae,le)=>{const{Ht:he,Lt:pe,It:ve,St:ye,Pt:xe}=le,{I:me}=hs(),be=p3(t,J,ae),Ze=n(),{Et:Xe,Ot:ct,yt:Bt,At:Pe}=Ze,[ze,st]=be("showNativeOverlaidScrollbars"),[gt,vt]=be("scrollbars.theme"),[_e,je]=be("scrollbars.visibility"),[Ke,Fe]=be("scrollbars.autoHide"),[Be,Pt]=be("scrollbars.autoHideSuspend"),[dt]=be("scrollbars.autoHideDelay"),[Ie,at]=be("scrollbars.dragScroll"),[zt,Re]=be("scrollbars.clickScroll"),He=xe&&!ae,xt=Pe.x||Pe.y,Vt=he||pe||ye,yn=ve||je,Yr=ze&&me.x&&me.y,Hr=(Wr,Kr)=>{const ui=_e==="visible"||_e==="auto"&&Wr==="scroll";return F(c_e,ui,Kr),ui};if(f=dt,He&&(Be&&xt?(Q(!1),u(),I(()=>{u=oi(z,"scroll",Q.bind(0,!0),{C:!0})})):Q(!0)),st&&F(o_e,Yr),vt&&(F(c),F(gt,!0),c=gt),Pt&&!Be&&Q(!0),Fe&&(i=Ke==="move",o=Ke==="leave",s=Ke!=="never",ie(!s,!0)),at&&F(f_e,Ie),Re&&F(d_e,zt),yn){const Wr=Hr(ct.x,!0),Kr=Hr(ct.y,!1);F(u_e,!(Wr&&Kr))}Vt&&(j(Ze),V(Ze),W(Ze),K(Ze),X(),F(QH,!Xe.x,!0),F(QH,!Xe.y,!1),F(s_e,Bt&&!D))},se,()=>{yc(ue),u()}]},RJ=(e,t,n)=>{Rl(e)&&e(t||void 0,n||void 0)},Rd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=hs(),a=Gp(),c=zx(e),u=c?e:e.target,f=EJ(u);if(t&&!f){let h=!1;const p=z=>{const D=Gp()[p_e],F=D&&D.O;return F?F(z,!0):z},g=Br({},r(),p(t)),[v,y,S]=Zz(n),[w,b,x]=F_e(e,g),[E,I,A]=K_e(e,g,b,z=>S("scroll",[G,z])),k=(z,D)=>w(z,!!D),O=k.bind(0,{},!0),L=o(O),N=s(O),H=z=>{E_e(u),L(),N(),A(),x(),h=!0,S("destroyed",[G,!!z]),y()},G={options(z,D){if(z){const F=D?r():{},j=pJ(g,Br(F,p(z)));qz(j)||(Br(g,j),k(j))}return Br({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:F,At:j,tt:V,$t:W,yt:K}=b();return Br({},{overflowEdge:z,overflowAmount:D,overflowStyle:F,hasOverflow:j,padding:V,paddingAbsolute:W,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:F,K:j,nt:V,st:W,et:K}=b.Ft,{nn:X,rn:Q}=I.Ft,ie=ue=>{const{Gt:se,Xt:J,Ut:ae}=ue;return{scrollbar:ae,track:J,handle:se}},ce=ue=>{const{sn:se,en:J}=ue,ae=ie(se[0]);return Br({},ae,{clone:()=>{const le=ie(J());return E({},!0,{}),le}})};return Br({},{target:z,host:D,padding:F||j,viewport:j,content:V||j,scrollOffsetElement:W,scrollEventElement:K,scrollbarHorizontal:ce(X),scrollbarVertical:ce(Q)})},update:z=>k({},z),destroy:H.bind(0)};return b.Nt((z,D,F)=>{E(D,F,z)}),S_e(u,G),An(na(a),z=>RJ(a[z],0,G)),__e(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),G):(b.qt(),I.qt(),S("initialized",[G]),b.Nt((z,D,F)=>{const{wt:j,St:V,vt:W,Ht:K,Lt:X,It:Q,bt:ie,Tt:ce}=z;S("updated",[G,{updateHints:{sizeChanged:j,directionChanged:V,heightIntrinsicChanged:W,overflowEdgeChanged:K,overflowAmountChanged:X,overflowStyleChanged:Q,contentMutation:ie,hostMutation:ce},changedOptions:D,force:F}])}),G.update(!0),G)}return f};Rd.plugin=e=>{An(h_e(e),t=>RJ(t,Rd))};Rd.valid=e=>{const t=e&&e.elements,n=Rl(t)&&t();return a3(n)&&!!EJ(n.target)};Rd.env=()=>{const{k:e,I:t,A:n,V:r,Y:i,H:o,B:s,U:a,W:c,q:u,F:f,G:h,X:p}=hs();return Br({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:i,cssCustomProperties:o,scrollTimeline:s,staticDefaultInitialization:a,staticDefaultOptions:c,getDefaultInitialization:u,setDefaultInitialization:f,getDefaultOptions:h,setDefaultOptions:p})};const Q_e=()=>{if(typeof window>"u"){const u=()=>{};return[u,u]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",i=n.requestAnimationFrame,o=n.cancelAnimationFrame,s=r?n.requestIdleCallback:i,a=r?n.cancelIdleCallback:o,c=()=>{a(e),o(t)};return[(u,f)=>{c(),e=s(r?()=>{c(),t=i(u)}:u,typeof f=="object"?f:{timeout:2233})},c]},PJ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=R.useMemo(Q_e,[]),s=R.useRef(null),a=R.useRef(r),c=R.useRef(t),u=R.useRef(n);return R.useEffect(()=>{a.current=r},[r]),R.useEffect(()=>{const{current:f}=s;c.current=t,Rd.valid(f)&&f.options(t||{},!0)},[t]),R.useEffect(()=>{const{current:f}=s;u.current=n,Rd.valid(f)&&f.on(n||{},!0)},[n]),R.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),R.useMemo(()=>[f=>{const h=s.current;if(Rd.valid(h))return;const p=a.current,g=c.current||{},v=u.current||{},y=()=>s.current=Rd(f,g,v);p?i(y,p):y()},()=>s.current],[])},J_e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...a}=e,c=n,u=R.useRef(null),f=R.useRef(null),[h,p]=R.useState(!1),[g,v]=PJ({options:r,events:i,defer:o});return R.useEffect(()=>{p(!0)},[]),R.useEffect(()=>{const{current:y}=u,{current:S}=f;return h&&y&&S&&g({target:y,elements:{viewport:S,content:S}}),()=>{var w;return(w=v())==null?void 0:w.destroy()}},[h,g,n]),R.useImperativeHandle(t,()=>({osInstance:v,getElement:()=>u.current}),[]),de.createElement(c,{"data-overlayscrollbars-initialize":"",ref:u,...a},h?de.createElement("div",{ref:f,"data-overlayscrollbars-contents":!0},s):s)},Z_e=R.forwardRef(J_e),Iw=R.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:a}=Ln(),c=A1({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${a(r)})`,marginTop:a(r)}}),u=R.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(Z_e,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:u},children:e})});var OJ={exports:{}},or={};/** @license React v17.0.2 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Jk=60103,Zk=60106,Rw=60107,Pw=60108,Ow=60114,Mw=60109,Dw=60110,Lw=60112,Nw=60113,oj=60120,Bw=60115,$w=60116,MJ=60121,DJ=60122,LJ=60117,NJ=60129,BJ=60131;if(typeof Symbol=="function"&&Symbol.for){var Vi=Symbol.for;Jk=Vi("react.element"),Zk=Vi("react.portal"),Rw=Vi("react.fragment"),Pw=Vi("react.strict_mode"),Ow=Vi("react.profiler"),Mw=Vi("react.provider"),Dw=Vi("react.context"),Lw=Vi("react.forward_ref"),Nw=Vi("react.suspense"),oj=Vi("react.suspense_list"),Bw=Vi("react.memo"),$w=Vi("react.lazy"),MJ=Vi("react.block"),DJ=Vi("react.server.block"),LJ=Vi("react.fundamental"),NJ=Vi("react.debug_trace_mode"),BJ=Vi("react.legacy_hidden")}function Ml(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Jk:switch(e=e.type,e){case Rw:case Ow:case Pw:case Nw:case oj:return e;default:switch(e=e&&e.$$typeof,e){case Dw:case Lw:case $w:case Bw:case Mw:return e;default:return t}}case Zk:return t}}}var eSe=Mw,tSe=Jk,nSe=Lw,rSe=Rw,iSe=$w,oSe=Bw,sSe=Zk,aSe=Ow,lSe=Pw,cSe=Nw;or.ContextConsumer=Dw;or.ContextProvider=eSe;or.Element=tSe;or.ForwardRef=nSe;or.Fragment=rSe;or.Lazy=iSe;or.Memo=oSe;or.Portal=sSe;or.Profiler=aSe;or.StrictMode=lSe;or.Suspense=cSe;or.isAsyncMode=function(){return!1};or.isConcurrentMode=function(){return!1};or.isContextConsumer=function(e){return Ml(e)===Dw};or.isContextProvider=function(e){return Ml(e)===Mw};or.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jk};or.isForwardRef=function(e){return Ml(e)===Lw};or.isFragment=function(e){return Ml(e)===Rw};or.isLazy=function(e){return Ml(e)===$w};or.isMemo=function(e){return Ml(e)===Bw};or.isPortal=function(e){return Ml(e)===Zk};or.isProfiler=function(e){return Ml(e)===Ow};or.isStrictMode=function(e){return Ml(e)===Pw};or.isSuspense=function(e){return Ml(e)===Nw};or.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rw||e===Ow||e===NJ||e===Pw||e===Nw||e===oj||e===BJ||typeof e=="object"&&e!==null&&(e.$$typeof===$w||e.$$typeof===Bw||e.$$typeof===Mw||e.$$typeof===Dw||e.$$typeof===Lw||e.$$typeof===LJ||e.$$typeof===MJ||e[0]===DJ)};or.typeOf=Ml;OJ.exports=or;var $J=OJ.exports;function IC(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Lr.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Lr.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */function H_(e,t,n=[],r={condition:!0}){const{condition:i}=r,o=function(s,a){var c={};for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&a.indexOf(u)<0&&(c[u]=s[u]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(u=Object.getOwnPropertySymbols(s);f(i&&window.addEventListener(e,t,o),()=>{i&&window.removeEventListener(e,t)}),[e,t,i,...n])}(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`/* === Main Container === */ -.__dbk__container { - height: 100%; - width: 100%; - - display: flex; - overflow: hidden; -} - -.__dbk__container.Horizontal { - flex-direction: row; -} - -.__dbk__container.Vertical { - flex-direction: column; -} -/* ====== */ - -/* === Wrapper for each child element === */ -.__dbk__child-wrapper { - height: 100%; - width: 100%; -} -/* ====== */ - -/* === Gutter === */ -.__dbk__gutter { - display: flex; - align-items: center; - justify-content: center; -} -/* .__dbk__gutter > div { - background: red; -} */ -.__dbk__gutter.Horizontal { - height: 100%; - padding: 0 2px; - flex-direction: column; -} -.__dbk__gutter.Horizontal:hover { - cursor: col-resize; -} - -.__dbk__gutter.Vertical { - width: 100%; - padding: 2px 0; - flex-direction: row; -} -.__dbk__gutter.Vertical:hover { - cursor: row-resize; -} - -.__dbk__gutter.Light { - background: #EDF0EF; -} -.__dbk__gutter.Light:hover > .__dbk__dragger { - background: #76747B; -} - -.__dbk__gutter.Dark { - background: #020203; -} -.__dbk__gutter.Dark:hover > .__dbk__dragger { - background: #9995A3; -} -/* ====== */ - -/* === Gutter's Dragger === */ -.__dbk__dragger { - border-radius: 2px; -} - -.__dbk__dragger.Horizontal { - width: 4px; - height: 24px; -} - -.__dbk__dragger.Vertical { - width: 24px; - height: 4px; -} - -.__dbk__dragger.Light { - background: #A6ACB5; -} - -.__dbk__dragger.Dark { - background: #434252; -} -/* ====== */`);const uSe=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Lr.Vertical,onDragging:i},o)=>{const s=`__dbk__gutter ${r} ${e||t}`,a=`__dbk__dragger ${r} ${n||t}`;return C.jsx("div",Object.assign({className:s,ref:o,dir:r,onMouseDown:i,onTouchStart:pE?i:void 0},{children:C.jsx("div",{className:a},void 0)}),void 0)});var ga;function v3(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 dSe(e,t){switch(t.type){case ga.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case ga.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=IC(n,o);if(s===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${s}.`);const a=[];return r.forEach((c,u)=>{if(u>0){const f=r[u-1],h=r[u],p=i[u-1],g=n===Lr.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Lr.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Lr.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Lr.Horizontal?p.getBoundingClientRect().width:p.getBoundingClientRect().height,w={idx:u-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};a.push(w)}}),Object.assign(Object.assign({},e),{pairs:a})}case ga.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case ga.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case ga.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=IC(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Lr.Horizontal?"clientWidth":"clientHeight"],a=r===0,c=r===e.pairs.length-1,{aGutterSize:u,bGutterSize:f}=v3(s,a,c);let h,p,g,v,y;return n===Lr.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,v=(i.a.getBoundingClientRect().width+u)/o*100,y=(i.b.getBoundingClientRect().width+f)/o*100,g=i.a.getBoundingClientRect().width+u+f+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,v=(i.a.getBoundingClientRect().height+u)/o*100,y=(i.b.getBoundingClientRect().height+f)/o*100,g=i.a.getBoundingClientRect().height+u+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 FJ(e,t=0,n=[]){return R.Children.toArray(e).reduce((r,i,o)=>($J.isFragment(i)?r.push.apply(r,FJ(i.props.children,t+1,n.concat(i.key||o))):R.isValidElement(i)?r.push(R.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"})(ga||(ga={}));const fW=e=>"changedTouches"in e;var Lr,y3;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Lr||(Lr={})),function(e){e.Light="Light",e.Dark="Dark"}(y3||(y3={}));const pE=typeof window<"u"&&"ontouchstart"in window;function aN(e){return e===Lr.Horizontal?"col-resize":"row-resize"}const fSe={isReady:!1,isDragging:!1,pairs:[]};function hSe({direction:e=Lr.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=y3.Dark,gutterClassName:o,draggerClassName:s,children:a,onResizeStarted:c,onResizeFinished:u,classes:f=[]}){const h=FJ(a),[p,g]=R.useReducer(dSe,fSe),v=R.useRef(null),y=R.useRef([]),S=R.useRef([]);y.current=[],S.current=[];const w=de.useCallback(G=>{g({type:ga.SetIsReadyToCompute,payload:{isReady:G}})},[]),b=de.useCallback((G,z)=>{g({type:ga.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=aN(G),D.parent.style.cursor=aN(G),document.body.style.cursor=aN(G)},[p.pairs]),x=de.useCallback(()=>{g({type:ga.StopDragging});const G=[];for(let D=0;D{g({type:ga.CalculateSizes,payload:{direction:G,gutterIdx:z}})},[]),I=de.useCallback((G,z,D)=>{g({type:ga.CreatePairs,payload:{direction:G,children:z,gutters:D}})},[]),A=de.useCallback((G,z,D,F)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(IC(G,j)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");z.forEach((V,W)=>{const K=W===0,X=W===z.length-1;let Q,ie=0;z.length>1&&(ie=D[X?W-1:W].getBoundingClientRect()[G===Lr.Horizontal?"width":"height"],ie=K||X?ie/2:ie),Q=F&&W{if(p.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const D=p.pairs[p.draggingIdx];if(D.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(D.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const F=D.aSizePct+D.bSizePct,j=z/D.size*F,V=F-z/D.size*F,W=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:X,bGutterSize:Q}=v3(D.gutterSize,W,K),ie=`calc(${j}% - ${X}px)`,ce=`calc(${V}% - ${Q}px)`;G===Lr.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((G,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,X){const Q=fW(X)?X.changedTouches[0]:X;return K===Lr.Horizontal?Q.clientX:Q.clientY}(z,G)-F.start,V=16,W=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(W=D[p.draggingIdx+1]),j=F.size-(F.gutterSize+W)&&(j=F.size-(F.gutterSize+W)),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=G=>{p.isDragging&&(fW(G)&&G.preventDefault(),O(G,e,e===Lr.Horizontal?t:n))};function H(G,z){if(!G.current)throw new Error("Can't add element to ref object - ref isn't initialized");z&&!G.current.includes(z)&&G.current.push(z)}return H_("mouseup",L,[p.isDragging,x]),H_("mousemove",N,[e,p.isDragging,O,t,n]),H_("touchend",L,[p.isDragging,x],{condition:pE}),H_("touchmove",N,[e,p.isDragging,O,t,n],{condition:pE,passive:!pE}),R.useEffect(function(){if(!v.current)return;const G=v.current.parentElement;if(!G)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(G),F=e===Lr.Horizontal?G.clientWidth:G.clientHeight;w(!!D&&!!F)});return z.observe(G),()=>{z.disconnect()}},[v.current,e]),R.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?A(e,y.current,S.current,r):(A(e,y.current,S.current,r),I(e,y.current,S.current))}},[a,p.isReady,e,A,I,r]),C.jsx("div",Object.assign({className:`__dbk__container ${e}`,ref:v},{children:p.isReady&&h.map((G,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 qo=(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 Db(e){if(typeof window>"u")return e;const t=R.useRef(null);return R.useLayoutEffect(()=>{t.current=e}),R.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const hW={};function pSe(e,t){hW[e]||(hW[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const mSe={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function gSe({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=R.useRef(!0);R.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=R.useState(mSe),a=R.useCallback(b=>{i.current&&s(b)},[]),c=R.useCallback(b=>a(x=>({...x,setAnchorElUsed:!0,anchorEl:b??void 0})),[]),u=Db(b=>(o.isOpen?p(b):f(b),o)),f=Db(b=>{const x=b instanceof Element?void 0:b,E=b instanceof Element?b:(b==null?void 0:b.currentTarget)instanceof Element?b.currentTarget:void 0;if((x==null?void 0:x.type)==="touchstart"){a(L=>({...L,_deferNextOpen:!0}));return}const I=x==null?void 0:x.clientX,A=x==null?void 0:x.clientY,k=typeof I=="number"&&typeof A=="number"?{left:I,top:A}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&pSe("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),e){if(!e.isOpen)return L;setTimeout(()=>e._setChildPopupState(w))}const N={...L,isOpen:!0,anchorPosition: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};a(L=>L._deferNextOpen?(setTimeout(()=>a(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=Db(b=>{const x=b instanceof Element?void 0:b;if((x==null?void 0:x.type)==="touchstart"){a(E=>({...E,_deferNextClose:!0}));return}a(E=>E._deferNextClose?(setTimeout(()=>a(h),0),{...E,_deferNextClose:!1}):h(E))}),g=R.useCallback((b,x)=>{b?f(x):p(x)},[]),v=Db(b=>{const{relatedTarget:x}=b;a(E=>E.hovered&&!(x instanceof Element&&b3(x,w))?E.focused?{...E,hovered:!1}:h(E):E)}),y=Db(b=>{if(!b)return;const{relatedTarget:x}=b;a(E=>E.focused&&!(x instanceof Element&&b3(x,w))?E.hovered?{...E,focused:!1}:h(E):E)}),S=R.useCallback(b=>a(x=>({...x,_childPopupState:b})),[]),w={...o,setAnchorEl:c,popupId:t,variant:n,open:f,close:p,toggle:u,setOpen:g,onBlur:y,onMouseLeave:v,disableAutoFocus:r??!!(o.hovered||o.focused),_setChildPopupState:S};return w}function vSe({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 eA(e){return{...vSe(e),onClick:e.open,onTouchStart:e.open}}function Fw({isOpen:e,anchorEl:t,anchorPosition:n,close:r,popupId:i,onMouseLeave:o,disableAutoFocus:s,_openEventType:a}){return{id:i,anchorEl:t,anchorPosition:n,anchorReference:a==="contextmenu"?"anchorPosition":"anchorEl",open:e,onClose:r,onMouseLeave:o,...s&&{autoFocus:!1,disableAutoFocusItem:!0,disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function ySe(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 b3(e,t){const{anchorEl:n,_childPopupState:r}=t;return pW(n,e)||pW(ySe(e,t),e)||r!=null&&b3(e,r)}function pW(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function im({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=gSe({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}im.propTypes={children:gb.func.isRequired,popupId:gb.string,variant:gb.oneOf(["popover","popper"]).isRequired,parentPopupState:gb.object,disableAutoFocus:gb.bool};function bSe({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(im,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(nf,{sx:{m:1},children:C.jsx(bf,{title:"Panel Options",children:C.jsx(jp,{size:"small",...eA(s),children:C.jsx(W1e,{fontSize:"small"})})})}),C.jsxs(rm,{...Fw(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(Pu,{onClick:n,disabled:o,children:[C.jsx(Gd,{children:C.jsx(BH,{fontSize:"small"})}),C.jsx(oc,{children:"Split Vertical"})]}),C.jsxs(Pu,{onClick:e,disabled:i,children:[C.jsx(Gd,{children:C.jsx(BH,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(oc,{children:"Split Horizontal"})]}),C.jsx(Qu,{}),C.jsxs(Pu,{onClick:t,disabled:r,children:[C.jsx(Gd,{children:C.jsx(HQ,{fontSize:"small"})}),C.jsx(oc,{children:"Close Panel"})]})]})]})})}function ka(e,t){const n=te.clone(e);return t(n),n}function mW(e,t){return t(te.clone(e))}function Zg(e){return t=>R.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>ka(i,n))}})}const zJ=R.createContext({});function wf(){return R.useContext(zJ)}function jJ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:a}=Ln(),c=A1({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:a.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),u=A1({"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-te.sumBy(g,"size"),y=te.filter(g,S=>!S.size).length;return y?v/y:0}const p=R.useMemo(()=>{const g=v=>n==null?void 0:n(mW(e,y=>({key:qo(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:qo()},{...structuredClone(y),size:50,key:qo()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx(bSe,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(ka(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(En,{children:C.jsx(En,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(zJ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(hSe,{gutterClassName:u,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(ka(e,y=>{te.forEach(v,(S,w)=>{y.children[w].size=S})})),minHeights:te.map(e.children,()=>f(6)-8),minWidths:te.map(e.children,()=>f(32)),initialSizes:te.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Lr.Vertical,horizontal:Lr.Horizontal}[e.orientation],children:te.map(e.children,(g,v)=>C.jsx(jJ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(ka(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(mW(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:qo(),content:y.children[0].content}:y.children[0]:(te.forEach(y.children,(S,w,b)=>S.size=100/b.length),y))))},g.key))})})}function P1(){return P1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var wSe=["PropTypes"],_Se=function(t,n){return R.Children.toArray(t).reduce(function(r,i){if(R.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},SSe=function(t,n){var r=R.Children.toArray(t).filter(function(i){if(R.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},ESe=function(t){return typeof t=="string"&&!wSe.includes(t)&&t.match(/^[A-Z0-9]/)},CSe=function(t){var n=R.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,a=s===void 0?[]:s,c=xSe(r,["children","propagateSlotProps","slotKeys"]),u=R.useMemo(function(){return _Se(i,a)},[a,i]),f=R.useMemo(function(){return SSe(i,a)},[a,i]),h=R.useMemo(function(){return P1({},c,{slotProps:P1({},o,u)})},[c,u,o]);return R.createElement(t,h,f)});return n},TSe=function(t){var n=R.memo(CSe(t));n.displayName="WithSlots("+(t.displayName||t.name)+")";var r=new Proxy(n,{get:function(o,s,a){var c;if(s in o||typeof s=="symbol"||!ESe(s))return Reflect.get(o,s,a);var u=((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",P1({},o.defaultProps,{slotKeys:[].concat(u,[s])})),Reflect.get(o,s,a)}});return r};function sj(){const e=Ln();return bye(e.breakpoints.down("sm"))}const kSe=e=>e?48:36,ASe=8;function ISe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=sj(),s=te.max([te.findIndex(t,{value:n}),0])??0;return C.jsx(im,{variant:"popover",children:a=>C.jsxs(C.Fragment,{children:[C.jsx(bf,{title:i,children:C.jsx("span",{children:e==null?void 0:e(eA(a))})}),C.jsx(rm,{...Fw(a),anchorOrigin:{horizontal:"center",vertical:-kSe(o)*s-ASe},transformOrigin:{vertical:"top",horizontal:"center"},children:te.map(t,({value:c,label:u,disabled:f})=>C.jsx(Pu,{disabled:f,value:c,selected:c===n,onClick:()=>{a.close(),r==null||r(c)},children:u},c))})]})})}function jx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(Cw,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:te.map(r,o=>C.jsx(Pu,{value:o.value,children:o.label},o.value))})}function of({children:e,icon:t,showArrow:n,...r}){return C.jsx(Fz,{...r,startIcon:t,endIcon:n&&C.jsx(U1e,{sx:{ml:-.5,color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1}}),children:C.jsx(ht,{sx:{color:"text.primary",opacity:i=>r.disabled?i.palette.action.disabledOpacity:1},children:e})})}function Vs({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:a}){const c=te.find(r,{id:t});return C.jsx(ISe,{placeholder:te.startCase(e),trigger:u=>C.jsx(of,{...u,...a,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(c==null?void 0:c.name)??e}),items:te.map(r,({id:u,name:f,description:h,hidden:p})=>({value:u,label:C.jsxs(C.Fragment,{children:[C.jsx(Ut,{children:f}),C.jsx(li,{}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const UJ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],HJ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],Lm=4,RSe={renderer:HJ,remote:UJ,playbackRate:Lm,theme:"dark",acrylic:!0,accentColor:"blue"},[Zu,PSe]=vc({},Iwe("settings",RSe)),{common:xVe,...OSe}=yX,MSe=` - 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%) -`,gW=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", - "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,DSe=(e,t)=>D4({palette:{primary:{main:yX[t][e==="dark"?"A100":"A700"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:gW},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:gW}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...te.times(24,te.constant(MSe))]});function aj(){const[{acrylic:e}]=Zu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>kn(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const LSe=C.jsx(Qu,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),zn=TSe(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,a;const r=aj();return C.jsxs(En,{vertical:!0,children:[C.jsx(En,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(Hp,{in:!0,children:C.jsx(ht,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(i=e.Content)==null?void 0:i.children})})}),C.jsxs(En,{sx:{height:c=>c.spacing(6)},children:[C.jsx(En,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(Iw,{x:!0,children:C.jsxs(En,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Vs,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=l4[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:te.values(l4)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[LSe,e.Options.children]})]})})}),C.jsx(li,{sx:{mx:"auto"}}),(a=e.Extras)==null?void 0:a.children]})]})}),WJ=""+new URL("logo512-23eace97.png",import.meta.url).href,x3="Visualiser",NSe="1.0.5",BSe="1.0.5; mid October 2023",$Se="https://github.com/path-visualiser/app",FSe="https://github.com/path-visualiser/app/blob/master/docs",zSe=[{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 jSe(){const{controls:e,onChange:t,state:n}=wf();function r(i,o){return C.jsxs(ht,{sx:{pt:2},children:[C.jsx(Ut,{variant:"overline",color:"text.secondary",children:i}),C.jsx(Ut,{variant:"body2",children:o})]})}return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsxs(En,{children:[" ",C.jsx(Iw,{y:!0,children:C.jsxs(ht,{sx:{p:2},children:[C.jsx(ht,{sx:{pt:6,pb:2},children:C.jsx("img",{src:WJ,height:"64"})}),C.jsx(Ut,{variant:"h6",children:x3}),r("Build Info",C.jsx(C.Fragment,{children:BSe})),r("About this App",C.jsxs(C.Fragment,{children:[x3," 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(Yg,{sx:{mx:-2},children:zSe.map(({name:i,email:o},s)=>C.jsxs(o3,{href:`mailto:${o}`,children:[C.jsx(x0e,{children:C.jsx(ige,{children:te.head(i)})}),C.jsx(oc,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(Yg,{sx:{mx:-2},children:C.jsxs(o3,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Gd,{children:C.jsx(F1e,{})}),C.jsx(oc,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(zn.Extras,{children:e})]})}const GJ=R.createContext(null);function USe(){const[e,t]=R.useState(null);return R.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function VJ(e){const{children:t,value:n}=e,r=USe(),i=R.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(GJ.Provider,{value:i,children:t})}function qJ(){return R.useContext(GJ)}function XJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function YJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const HSe=["children"],WSe=R.forwardRef(function(t,n){const{children:r}=t,i=Ne(t,HSe),o=qJ();if(o===null)throw new TypeError("No TabContext provided");const s=R.Children.map(r,a=>R.isValidElement(a)?R.cloneElement(a,{"aria-controls":XJ(o,a.props.value),id:YJ(o,a.props.value)}):null);return C.jsx(b1e,$({},i,{ref:n,value:o.value,children:s}))}),KJ=WSe;function GSe(e){return Ct("MuiTabPanel",e)}It("MuiTabPanel",["root"]);const VSe=["children","className","value"],qSe=e=>{const{classes:t}=e;return At({root:["root"]},GSe,t)},XSe=Ce("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),YSe=R.forwardRef(function(t,n){const r=Rt({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,a=Ne(r,VSe),c=$({},r),u=qSe(c),f=qJ();if(f===null)throw new TypeError("No TabContext provided");const h=XJ(f,s),p=YJ(f,s);return C.jsx(XSe,$({"aria-labelledby":p,className:Ue(u.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},a,{children:s===f.value&&i}))}),ag=YSe;var QJ={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})(QJ);var lj=QJ.exports;function w3({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(Zve,{control:C.jsx(Kg,{defaultChecked:!0,...t}),label:e})}function KSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vW(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 yW(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function JSe(e,t){if(e==null)return{};var n=QSe(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 ZSe(e,t){return eEe(e)||tEe(e,t)||nEe(e,t)||rEe()}function eEe(e){if(Array.isArray(e))return e}function tEe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function nEe(e,t){if(e){if(typeof e=="string")return bW(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 bW(e,t)}}function bW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};W_.initial(e),W_.handler(t);var n={current:e},r=cx(vEe)(n,t),i=cx(gEe)(n),o=cx(W_.changes)(e),s=cx(mEe)(n);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return W_.selector(u),u(n.current)}function c(u){oEe(r,i,o,s)(u)}return[a,c]}function mEe(e,t){return O1(t)?t(e.current):t}function gEe(e,t){return e.current=wW(wW({},e.current),t),t}function vEe(e,t,n){return O1(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 yEe={create:pEe},bEe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function xEe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var s=arguments.length,a=new Array(s),c=0;c{r.current=!1}:e,t)}var Bs=GEe;function Ux(){}function lg(e,t,n,r){return VEe(e,r)||qEe(e,t,n,r)}function VEe(e,t){return e.editor.getModel(oZ(e,t))}function qEe(e,t,n,r){return e.editor.createModel(t,n,r?oZ(e,r):void 0)}function oZ(e,t){return e.Uri.parse(t)}function XEe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:f="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:y={},beforeMount:S=Ux,onMount:w=Ux}){let[b,x]=R.useState(!1),[E,I]=R.useState(!0),A=R.useRef(null),k=R.useRef(null),O=R.useRef(null),L=R.useRef(w),N=R.useRef(S),H=R.useRef(!1);iZ(()=>{let F=nZ.init();return F.then(j=>(k.current=j)&&I(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>A.current?D():F.cancel()}),Bs(()=>{if(A.current&&k.current){let F=A.current.getOriginalEditor(),j=lg(k.current,e||"",r||n||"text",o||"");j!==F.getModel()&&F.setModel(j)}},[o],b),Bs(()=>{if(A.current&&k.current){let F=A.current.getModifiedEditor(),j=lg(k.current,t||"",i||n||"text",s||"");j!==F.getModel()&&F.setModel(j)}},[s],b),Bs(()=>{let F=A.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),Bs(()=>{var F,j;(j=(F=A.current)==null?void 0:F.getModel())==null||j.original.setValue(e||"")},[e],b),Bs(()=>{let{original:F,modified:j}=A.current.getModel();k.current.editor.setModelLanguage(F,r||n||"text"),k.current.editor.setModelLanguage(j,i||n||"text")},[n,r,i],b),Bs(()=>{var F;(F=k.current)==null||F.editor.setTheme(u)},[u],b),Bs(()=>{var F;(F=A.current)==null||F.updateOptions(h)},[h],b);let G=R.useCallback(()=>{var V;if(!k.current)return;N.current(k.current);let F=lg(k.current,e||"",r||n||"text",o||""),j=lg(k.current,t||"",i||n||"text",s||"");(V=A.current)==null||V.setModel({original:F,modified:j})},[n,t,i,e,r,o,s]),z=R.useCallback(()=>{var F;!H.current&&O.current&&(A.current=k.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...h}),G(),(F=k.current)==null||F.editor.setTheme(u),x(!0),H.current=!0)},[h,u,G]);R.useEffect(()=>{b&&L.current(A.current,k.current)},[b]),R.useEffect(()=>{!E&&!b&&z()},[E,b,z]);function D(){var j,V,W,K;let F=(j=A.current)==null?void 0:j.getModel();a||((V=F==null?void 0:F.original)==null||V.dispose()),c||((W=F==null?void 0:F.modified)==null||W.dispose()),(K=A.current)==null||K.dispose()}return de.createElement(rZ,{width:g,height:p,isEditorReady:b,loading:f,_ref:O,className:v,wrapperProps:y})}var YEe=XEe;R.memo(YEe);function KEe(e){let t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}var QEe=KEe,G_=new Map;function JEe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:s="light",line:a,loading:c="Loading...",options:u={},overrideServices:f={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:y,wrapperProps:S={},beforeMount:w=Ux,onMount:b=Ux,onChange:x,onValidate:E=Ux}){let[I,A]=R.useState(!1),[k,O]=R.useState(!0),L=R.useRef(null),N=R.useRef(null),H=R.useRef(null),G=R.useRef(b),z=R.useRef(w),D=R.useRef(),F=R.useRef(r),j=QEe(o),V=R.useRef(!1),W=R.useRef(!1);iZ(()=>{let Q=nZ.init();return Q.then(ie=>(L.current=ie)&&O(!1)).catch(ie=>(ie==null?void 0:ie.type)!=="cancelation"&&console.error("Monaco initialization: error:",ie)),()=>N.current?X():Q.cancel()}),Bs(()=>{var ie,ce,ue,se;let Q=lg(L.current,e||r||"",t||i||"",o||n||"");Q!==((ie=N.current)==null?void 0:ie.getModel())&&(h&&G_.set(j,(ce=N.current)==null?void 0:ce.saveViewState()),(ue=N.current)==null||ue.setModel(Q),h&&((se=N.current)==null||se.restoreViewState(G_.get(o))))},[o],I),Bs(()=>{var Q;(Q=N.current)==null||Q.updateOptions(u)},[u],I),Bs(()=>{!N.current||r===void 0||(N.current.getOption(L.current.editor.EditorOption.readOnly)?N.current.setValue(r):r!==N.current.getValue()&&(W.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),N.current.pushUndoStop(),W.current=!1))},[r],I),Bs(()=>{var ie,ce;let Q=(ie=N.current)==null?void 0:ie.getModel();Q&&i&&((ce=L.current)==null||ce.editor.setModelLanguage(Q,i))},[i],I),Bs(()=>{var Q;a!==void 0&&((Q=N.current)==null||Q.revealLine(a))},[a],I),Bs(()=>{var Q;(Q=L.current)==null||Q.editor.setTheme(s)},[s],I);let K=R.useCallback(()=>{var Q;if(!(!H.current||!L.current)&&!V.current){z.current(L.current);let ie=o||n,ce=lg(L.current,r||e||"",t||i||"",ie||"");N.current=(Q=L.current)==null?void 0:Q.editor.create(H.current,{model:ce,automaticLayout:!0,...u},f),h&&N.current.restoreViewState(G_.get(ie)),L.current.editor.setTheme(s),A(!0),V.current=!0}},[e,t,n,r,i,o,u,f,h,s]);R.useEffect(()=>{I&&G.current(N.current,L.current)},[I]),R.useEffect(()=>{!k&&!I&&K()},[k,I,K]),F.current=r,R.useEffect(()=>{var Q,ie;I&&x&&((Q=D.current)==null||Q.dispose(),D.current=(ie=N.current)==null?void 0:ie.onDidChangeModelContent(ce=>{W.current||x(N.current.getValue(),ce)}))},[I,x]),R.useEffect(()=>{if(I){let Q=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()=>{Q==null||Q.dispose()}}return()=>{}},[I,E]);function X(){var Q,ie;(Q=D.current)==null||Q.dispose(),p?h&&G_.set(o,N.current.saveViewState()):(ie=N.current.getModel())==null||ie.dispose(),N.current.dispose()}return de.createElement(rZ,{width:g,height:v,isEditorReady:I,loading:c,_ref:H,className:y,wrapperProps:S})}var ZEe=JEe,eCe=R.memo(ZEe),sZ=eCe;let Aa;typeof window<"u"?Aa=window:typeof self<"u"?Aa=self:Aa=global;let _3=null,S3=null;const SW=20,dN=Aa.clearTimeout,EW=Aa.setTimeout,fN=Aa.cancelAnimationFrame||Aa.mozCancelAnimationFrame||Aa.webkitCancelAnimationFrame,CW=Aa.requestAnimationFrame||Aa.mozRequestAnimationFrame||Aa.webkitRequestAnimationFrame;fN==null||CW==null?(_3=dN,S3=function(t){return EW(t,SW)}):(_3=function([t,n]){fN(t),dN(n)},S3=function(t){const n=CW(function(){dN(r),t()}),r=EW(function(){fN(n),t()},SW);return[n,r]});function tCe(e){let t,n,r,i,o,s,a;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(w){const b=w.__resizeTriggers__,x=b.firstElementChild,E=b.lastElementChild,I=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,I.style.width=x.offsetWidth+1+"px",I.style.height=x.offsetHeight+1+"px",x.scrollLeft=x.scrollWidth,x.scrollTop=x.scrollHeight},o=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},a=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const b=this;s(this),this.__resizeRAF__&&_3(this.__resizeRAF__),this.__resizeRAF__=S3(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(I){I.call(b,w)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),S="";{const w=document.createElement("fakeelement");if(w.style.animationName!==void 0&&(p=!0),p===!1){for(let b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=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=Aa.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),u(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const S=v.createElement("div");S.className="expand-trigger",S.appendChild(v.createElement("div"));const w=v.createElement("div");w.className="contract-trigger",p.__resizeTriggers__.appendChild(S),p.__resizeTriggers__.appendChild(w),p.appendChild(p.__resizeTriggers__),s(p),p.addEventListener("scroll",a,!0),r&&(p.__resizeTriggers__.__animationListener__=function(x){x.animationName===n&&s(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(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",a,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class nA extends R.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,s,a,c;const u=window.getComputedStyle(this._parentNode)||{},f=parseFloat((o=u.paddingLeft)!==null&&o!==void 0?o:"0"),h=parseFloat((s=u.paddingRight)!==null&&s!==void 0?s:"0"),p=parseFloat((a=u.paddingTop)!==null&&a!==void 0?a:"0"),g=parseFloat((c=u.paddingBottom)!==null&&c!==void 0?c:"0"),v=this._parentNode.getBoundingClientRect(),y=v.height-p-g,S=v.width-f-h,w=this._parentNode.offsetHeight-p-g,b=this._parentNode.offsetWidth-f-h;(!n&&(this.state.height!==w||this.state.scaledHeight!==y)||!r&&(this.state.width!==b||this.state.scaledWidth!==S))&&(this.setState({height:w,width:b,scaledHeight:y,scaledWidth:S}),typeof i=="function"&&i({height:w,scaledHeight:y,scaledWidth:S,width:b}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=tCe(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:s,onResize:a,style:c={},tagName:u="div",...f}=this.props,{height:h,scaledHeight:p,scaledWidth:g,width:v}=this.state,y={overflow:"visible"},S={};let w=!1;return i||(h===0&&(w=!0),y.height=0,S.height=h,S.scaledHeight=p),o||(v===0&&(w=!0),y.width=0,S.width=v,S.scaledWidth=g),R.createElement(u,{ref:this._setRef,style:{...y,...c},...f},!w&&t(S))}}function nCe({returnType:e,params:t}){return`@type {(${te.join(te.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function rCe(e){const[t,n,r]=["/**"," * "," */"],i=te.map(te.chunk(te.split(e.description," "),9),o=>te.join(o," "));return te.join([t,...te.map(i,o=>`${n}${o}`),`${n}${nCe(e)}`,r],` -`)}function iCe({name:e,params:t,defaultReturnValue:n}){return te.join([`function ${e}(${te.join(te.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` -`)}function oCe(e){return te.join(te.map(e,t=>te.join([rCe(t),iCe(t)],` -`)),` - -`)}const sCe={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},aCe={name:"shouldRender",description:"Define which objects the renderer should display.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!0,returnType:"boolean"},lCe={shouldRender:aCe,shouldBreak:sCe},[rA,cCe]=vc({code:oCe(te.values(lCe)),busy:{}}),uCe=2500;function dCe(){const[{code:e},t]=rA(),n=Ln();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(nA,{children:({width:r,height:i})=>C.jsx(sZ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(Ew,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:te.debounce(o=>t(()=>({code:o})),uCe),options:{minimap:{enabled:!1}}})})})}function fCe(e){const t=Ln();return C.jsx(En,{height:"100%",overflow:"hidden",children:C.jsx(nA,{children:({width:n,height:r})=>C.jsx(sZ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(Ew,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function M1(e){"@babel/helpers - typeof";return M1=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},M1(e)}function hCe(e,t){if(M1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(M1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pCe(e){var t=hCe(e,"string");return M1(t)==="symbol"?t:String(t)}function mCe(e,t,n){return t=pCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TW(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 kW(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Vo(1));return n(aZ)(e,t)}if(typeof e!="function")throw new Error(Vo(2));var i=e,o=t,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function f(){if(c)throw new Error(Vo(3));return o}function h(y){if(typeof y!="function")throw new Error(Vo(4));if(c)throw new Error(Vo(5));var S=!0;return u(),a.push(y),function(){if(S){if(c)throw new Error(Vo(6));S=!1,u();var b=a.indexOf(y);a.splice(b,1),s=null}}}function p(y){if(!gCe(y))throw new Error(Vo(7));if(typeof y.type>"u")throw new Error(Vo(8));if(c)throw new Error(Vo(9));try{c=!0,o=i(o,y)}finally{c=!1}for(var S=s=a,w=0;w=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function KCe(e,t){return e===t}function QCe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?PCe:n,i=t.mapStateToPropsFactories,o=i===void 0?FCe:i,s=t.mapDispatchToPropsFactories,a=s===void 0?NCe:s,c=t.mergePropsFactories,u=c===void 0?WCe:c,f=t.selectorFactory,h=f===void 0?XCe:f;return function(g,v,y,S){S===void 0&&(S={});var w=S,b=w.pure,x=b===void 0?!0:b,E=w.areStatesEqual,I=E===void 0?KCe:E,A=w.areOwnPropsEqual,k=A===void 0?pN:A,O=w.areStatePropsEqual,L=O===void 0?pN:O,N=w.areMergedPropsEqual,H=N===void 0?pN:N,G=Ne(w,YCe),z=mN(g,o,"mapStateToProps"),D=mN(v,a,"mapDispatchToProps"),F=mN(y,u,"mergeProps");return r(h,$({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:F,pure:x,areStatesEqual:I,areOwnPropsEqual:k,areStatePropsEqual:L,areMergedPropsEqual:H},G))}}const pZ=QCe();bCe(Ev.unstable_batchedUpdates);function JCe(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return r.callbacks},r.setCallbacks=function(a){r.callbacks=a},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=xa(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof MC){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),uTe=` - 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 -`,DC=function(t){return t+1},dTe=function(t){return` - You have lifted an item in position `+DC(t.source.index)+` -`},bZ=function(t,n){var r=t.droppableId===n.droppableId,i=DC(t.index),o=DC(n.index);return r?` - You have moved the item from position `+i+` - to position `+o+` - `:` - You have moved the item from position `+i+` - in list `+t.droppableId+` - to list `+n.droppableId+` - in position `+o+` - `},xZ=function(t,n,r){var i=n.droppableId===r.droppableId;return i?` - The item `+t+` - has been combined with `+r.draggableId:` - The item `+t+` - in list `+n.droppableId+` - has been combined with `+r.draggableId+` - in list `+r.droppableId+` - `},fTe=function(t){var n=t.destination;if(n)return bZ(t.source,n);var r=t.combine;return r?xZ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},$W=function(t){return` - The item has returned to its starting position - of `+DC(t.index)+` -`},hTe=function(t){if(t.reason==="CANCEL")return` - Movement cancelled. - `+$W(t.source)+` - `;var n=t.destination,r=t.combine;return n?` - You have dropped the item. - `+bZ(t.source,n)+` - `:r?` - You have dropped the item. - `+xZ(t.draggableId,t.source,r)+` - `:` - The item has been dropped while not over a drop area. - `+$W(t.source)+` - `},mE={dragHandleUsageInstructions:uTe,onDragStart:dTe,onDragUpdate:fTe,onDragEnd:hTe},Mi={x:0,y:0},eo=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Us=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Yd=function(t,n){return t.x===n.x&&t.y===n.y},Av=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Vp=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},L1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},FW=function(t,n){return Math.min.apply(Math,n.map(function(r){return L1(t,r)}))},wZ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},pTe=function(e,t){var n=yl({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},jw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},zW=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}]},mTe={top:0,right:0,bottom:0,left:0},gTe=function(t,n){return n?jw(t,n.scroll.diff.displacement):t},vTe=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},yTe=function(t,n){return n&&n.shouldClipSubject?pTe(n.pageMarginBox,t):yl(t)},ev=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=gTe(t.marginBox,i),s=vTe(o,r,n),a=yTe(s,i);return{page:t,withPlaceholder:n,active:a}},fj=function(e,t){e.frame||We(!1);var n=e.frame,r=Us(t,n.scroll.initial),i=Av(r),o=$({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=ev({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=$({},e,{frame:o,subject:s});return a};function LC(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function hj(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,u=r.lefte.right,f=c&&u;if(f)return!0;var h=c&&s||u&&o;return h}},_Te=function(e){var t=Ia(e.top,e.bottom),n=Ia(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},mj={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},kZ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},STe=function(e){return function(t){var n=Ia(t.top,t.bottom),r=Ia(t.left,t.right);return function(i){return e===mj?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},ETe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:Mi;return jw(t,r)},CTe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},TTe=function(t,n,r){return r(n)(t)},gj=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,a=o?ETe(n,r):n;return CTe(a,r,s)&&TTe(a,i,s)},kTe=function(t){return gj($({},t,{isVisibleThroughFrameFn:TZ}))},AZ=function(t){return gj($({},t,{isVisibleThroughFrameFn:_Te}))},ATe=function(t){return gj($({},t,{isVisibleThroughFrameFn:STe(t.destination.axis)}))},ITe=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 RTe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return yl(uj(n,r))}function B1(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,u){var f=RTe(u,r),h=u.descriptor.id;c.all.push(h);var p=kTe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[u.descriptor.id]=!0,c;var g=ITe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function PTe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function jW(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=PTe(t,{inHomeList:n});return{displaced:N1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function NC(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,a=e.index,c=e.forceShouldAnimate,u=Rv(t,r);if(a==null)return jW({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var f=_f(n,function(y){return y.descriptor.index===a});if(!f)return jW({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var h=sA(t,n),p=n.indexOf(f),g=h.slice(p),v=B1({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:a}}}}function sf(e,t){return!!t.effected[e]}var OTe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,a=r[s],c=a.descriptor.index,u=sf(s,o);return u?t?c:c-1:t?c+1:c},MTe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,a=r[0].descriptor.index,c=r[r.length-1].descriptor.index,u=n?c:c+1;return su?null:s},DTe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,a=e.previousImpact,c=e.viewport,u=e.afterCritical,f=a.at;if(f||We(!1),f.type==="REORDER"){var h=MTe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:NC({draggable:r,insideDestination:s,destination:o,viewport:c,last:a.displaced,displacedBy:a.displacedBy,index:h})}var p=OTe({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:f.combine,afterCritical:u});return p==null?null:NC({draggable:r,insideDestination:s,destination:o,viewport:c,last:a.displaced,displacedBy:a.displacedBy,index:p})},LTe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return sf(r,n)?o?Mi:Av(i.point):o?i.point:Mi},NTe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=oA(n);i||We(!1);var o=i.draggableId,s=r[o].page.borderBox.center,a=LTe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return eo(s,a)},IZ=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},BTe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},vj=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},UW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Vp(n.line,r.marginBox[n.end]+IZ(n,i),vj(n,r.marginBox,i))},HW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Vp(n.line,r.marginBox[n.start]-BTe(n,i),vj(n,r.marginBox,i))},$Te=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Vp(n.line,r.contentBox[n.start]+IZ(n,i),vj(n,r.contentBox,i))},FTe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=Iv(i.descriptor.id,r),a=n.page,c=i.axis;if(!s.length)return $Te({axis:c,moveInto:i.page,isMoving:a});var u=t.displaced,f=t.displacedBy,h=u.all[0];if(h){var p=r[h];if(sf(h,o))return HW({axis:c,moveRelativeTo:p.page,isMoving:a});var g=PC(p.page,f.point);return HW({axis:c,moveRelativeTo:g,isMoving:a})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return a.borderBox.center;if(sf(v.descriptor.id,o)){var y=PC(v.page,Av(o.displacedBy.point));return UW({axis:c,moveRelativeTo:y,isMoving:a})}return UW({axis:c,moveRelativeTo:v.page,isMoving:a})},E3=function(e,t){var n=e.frame;return n?eo(t,n.scroll.diff.displacement):t},zTe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,a=r.page.borderBox.center,c=n.at;return!i||!c?a:c.type==="REORDER"?FTe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):NTe({impact:n,draggables:o,afterCritical:s})},aA=function(e){var t=zTe(e),n=e.droppable,r=n?E3(n,t):t;return r},RZ=function(e,t){var n=Us(t,e.scroll.initial),r=Av(n),i=yl({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 WW(e,t){return e.map(function(n){return t[n]})}function jTe(e,t){for(var n=0;n1?f.sort(function(h,p){return Po(h)[a.start]-Po(p)[a.start]})[0]:u.sort(function(h,p){var g=FW(n,zW(Po(h))),v=FW(n,zW(Po(p)));return g!==v?g-v:Po(h)[a.start]-Po(p)[a.start]})[0]},GW=function(t,n){var r=t.page.borderBox.center;return sf(t.descriptor.id,n)?Us(r,n.displacedBy.point):r},VTe=function(t,n){var r=t.page.borderBox;return sf(t.descriptor.id,n)?jw(r,Av(n.displacedBy.point)):r},qTe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(a){return AZ({target:VTe(a,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(a,c){var u=L1(t,E3(r,GW(a,o))),f=L1(t,E3(r,GW(c,o)));return ut.left&&e.topt.top}function tke(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var a=s.axis,c=Vp(s.axis.line,t.center[a.line],s.page.borderBox.center[a.crossAxisLine]);return{id:s.descriptor.id,distance:L1(i,c)}}).sort(function(s,a){return a.distance-s.distance});return o[0]?o[0].id:null}function nke(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=iA(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!eke(t,s))return!1;if(DZ(s)(t.center))return!0;var a=o.axis,c=s.center[a.crossAxisLine],u=t[a.crossAxisStart],f=t[a.crossAxisEnd],h=Ia(s[a.crossAxisStart],s[a.crossAxisEnd]),p=h(u),g=h(f);return!p&&!g?!0:p?uc});return i.length?i.length===1?i[0].descriptor.id:tke({pageBorderBox:t,draggable:n,candidates:i}):null}var LZ=function(t,n){return yl(jw(t,n))},rke=function(e,t){var n=e.frame;return n?LZ(t,n.scroll.diff.value):t};function NZ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ike(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 oke=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,a=e.afterCritical,c=r.axis,u=Uw(r.axis,n.displaceBy),f=u.value,h=t[c.start],p=t[c.end],g=sA(n,i),v=_f(g,function(S){var w=S.descriptor.id,b=S.page.borderBox.center[c.line],x=sf(w,a),E=NZ({displaced:o,id:w});return x?E?p<=b:hw[a.start]+x&&hw[a.start]-u+x&&fw[a.start]+u+x&&hw[a.start]+x&&f=XW)return GZ;var o=i/XW,s=k3+Nke*o,a=r==="CANCEL"?s*Bke:s;return Number(a.toFixed(2))},Fke=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,a=r.droppables,c=qs(t),u=c?a[c]:null,f=a[n.descriptor.droppableId],h=FZ({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:u||f,viewport:i}),p=Us(h,n.client.borderBox.center);return p},zke=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var a=$Z({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=$({},r,{displaced:N1});return{impact:c,didDropInsideDroppable:!0}},jke=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(Mke({reason:s}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&We(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||We(!1);var c=o.critical,u=o.dimensions,f=u.draggables[o.critical.draggable.id],h=zke({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?pj(p):null,y=g?oA(p):null,S={index:c.draggable.index,droppableId:c.droppable.id},w={draggableId:f.descriptor.id,type:f.descriptor.type,source:S,reason:s,mode:o.movementMode,destination:v,combine:y},b=Fke({impact:p,draggable:f,dimensions:u,viewport:o.viewport,afterCritical:o.afterCritical}),x={critical:o.critical,afterCritical:o.afterCritical,result:w,impact:p},E=!Yd(o.current.client.offset,b)||!!w.combine;if(!E){n(wj({completed:x}));return}var I=$ke({current:o.current.client.offset,destination:b,reason:s}),A={newHomeClientOffset:b,dropDuration:I,completed:x};n(Oke(A))}}}},VZ=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Uke(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function Hke(e){var t=e.onWindowScroll;function n(){t(VZ())}var r=D1(n),i=Uke(r),o=Xd;function s(){return o!==Xd}function a(){s()&&We(!1),o=xa(window,[i])}function c(){s()||We(!1),r.cancel(),o(),o=Xd}return{start:a,stop:c,isActive:s}}var Wke=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Gke=function(e){var t=Hke({onWindowScroll:function(r){e.dispatch(Tke({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Wke(r)&&t.stop(),n(r)}}},Vke=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},qke=function(){var e=[],t=function(o){var s=hj(e,function(u){return u.timerId===o});s===-1&&We(!1);var a=e.splice(s,1),c=a[0];c.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),a={timerId:s,callback:o};e.push(a)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},Xke=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Yke=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Kke=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},Lb=function(t,n){n()},V_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},xN=function(t,n,r,i){if(!t){r(i(n));return}var o=Vke(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},Qke=function(e,t){var n=qke(),r=null,i=function(p,g){r&&We(!1),Lb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&We(!1),Lb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(V_(p,g))})},s=function(p,g){r&&We(!1);var v=V_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){Lb("onDragStart",function(){return xN(e().onDragStart,v,t,mE.onDragStart)})})},a=function(p,g){var v=pj(g),y=oA(g);r||We(!1);var S=!Kke(p,r.lastCritical);S&&(r.lastCritical=p);var w=!Xke(r.lastLocation,v);w&&(r.lastLocation=v);var b=!Yke(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!w&&!b)){var x=$({},V_(p,r.mode),{combine:y,destination:v});n.add(function(){Lb("onDragUpdate",function(){return xN(e().onDragUpdate,x,t,mE.onDragUpdate)})})}},c=function(){r||We(!1),n.flush()},u=function(p){r||We(!1),r=null,Lb("onDragEnd",function(){return xN(e().onDragEnd,p,t,mE.onDragEnd)})},f=function(){if(r){var p=$({},V_(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});u(p)}};return{beforeCapture:i,beforeStart:o,start:s,update:a,flush:c,drop:u,abort:f}},Jke=function(e,t){var n=Qke(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var a=o.payload.completed.result;n.flush(),i(o),n.drop(a);return}if(i(o),o.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},Zke=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&We(!1),e.dispatch(wj({completed:r.completed}))}}},eAe=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(WZ())}};n=requestAnimationFrame(function(){n=null,t=xa(window,[s])})}}}},tAe=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)}}}},nAe=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()}}}}}},rAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},iAe=function(e){return function(t){return function(n){return function(r){if(rAe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&We(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},oAe=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(HZ({reason:r.reason})))}}}},sAe=lZ,aAe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return aZ(vke,sAe(vCe(Lke(r),tAe(t),Dke(t),jke,Zke,eAe,oAe,iAe(s),Gke,nAe(n),Jke(i,o))))},wN=function(){return{additions:{},removals:{},modified:{}}};function lAe(e){var t=e.registry,n=e.callbacks,r=wN(),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(w){return t.draggable.getById(w).getDimension(Mi)}).sort(function(w,b){return w.descriptor.index-b.descriptor.index}),y=Object.keys(g).map(function(w){var b=t.droppable.getById(w),x=b.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:x}}),S={additions:v,removals:Object.keys(p),modified:y};r=wN(),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()},a=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=wN())};return{add:s,remove:a,stop:c}}var qZ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Us({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},XZ=function(){var e=document.documentElement;return e||We(!1),e},YZ=function(){var e=XZ(),t=qZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},cAe=function(){var e=VZ(),t=YZ(),n=e.y,r=e.x,i=XZ(),o=i.clientWidth,s=i.clientHeight,a=r+o,c=n+s,u=yl({top:n,left:r,right:a,bottom:c}),f={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:Mi,displacement:Mi}}};return f},uAe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=cAe(),o=i.scroll.current,s=t.droppable,a=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)}),u={draggables:EZ(c),droppables:SZ(a)},f={dimensions:u,critical:t,viewport:i};return f};function YW(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var dAe=function(e,t){var n=null,r=lAe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(g,v){e.droppable.exists(g)||We(!1),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},o=function(g,v){n&&(e.droppable.exists(g)||We(!1),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},s=function(g,v){n&&(e.droppable.exists(g)||We(!1),t.updateDroppableScroll({id:g,newScroll:v}))},a=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}},u=function(g){n||We(!1);var v=n.critical.draggable;g.type==="ADDITION"&&YW(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&YW(e,v,g.value)&&r.remove(g.value)},f=function(g){n&&We(!1);var v=e.draggable.getById(g.draggableId),y=e.droppable.getById(v.descriptor.droppableId),S={draggable:v.descriptor,droppable:y.descriptor},w=e.subscribe(u);return n={critical:S,unsubscribe:w},uAe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},KZ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},fAe=function(e){window.scrollBy(e.x,e.y)},hAe=Oi(function(e){return iA(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),pAe=function(t,n){var r=_f(hAe(n),function(i){return i.frame||We(!1),DZ(i.frame.pageMarginBox)(t)});return r},mAe=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=pAe(t,r);return o},Kd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},gAe=function(e,t){var n=e[t.size]*Kd.startFromPercentage,r=e[t.size]*Kd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},QZ=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},Ej=1,vAe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Kd.maxPixelScroll;if(e===t.startScrollingFrom)return Ej;var n=QZ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Kd.maxPixelScroll*Kd.ease(r);return Math.ceil(i)},KW=Kd.durationDampening.accelerateAt,QW=Kd.durationDampening.stopDampeningAt,yAe=function(e,t){var n=t,r=QW,i=Date.now(),o=i-n;if(o>=QW)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}},xAe=wZ(function(e){return e===0?0:e}),JZ=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},a=ZW({container:n,distanceToEdges:s,dragStartTime:t,axis:mj,shouldUseTimeDampening:o}),c=ZW({container:n,distanceToEdges:s,dragStartTime:t,axis:kZ,shouldUseTimeDampening:o}),u=xAe({x:c,y:a});if(Yd(u,Mi))return null;var f=bAe({container:n,subject:r,proposedScroll:u});return f?Yd(f,Mi)?null:f:null},wAe=wZ(function(e){return e===0?0:e>0?1:-1}),Cj=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=eo(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Yd(s,Mi)?null:s}}(),ZZ=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=wAe(i),a=Cj({max:o,current:r,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},Tj=function(t,n){return ZZ({current:t.scroll.current,max:t.scroll.max,change:n})},_Ae=function(t,n){if(!Tj(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Cj({current:i,max:r,change:n})},kj=function(t,n){var r=t.frame;return r?ZZ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},SAe=function(t,n){var r=t.frame;return!r||!kj(t,n)?null:Cj({current:r.scroll.current,max:r.scroll.max,change:n})},EAe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=JZ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&Tj(t,s)?s:null},CAe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var a=JZ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return a&&kj(t,a)?a:null},eG=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],c=a.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,f=EAe({dragStartTime:n,viewport:u,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=mAe({center:s,destination:qs(t.impact),droppables:t.dimensions.droppables});if(h){var p=CAe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},TAe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=D1(t),i=D1(n),o=null,s=function(f){o||We(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;eG({state:f,scrollWindow:r,scrollDroppable:i,dragStartTime:g,shouldUseTimeDampening:p})},a=function(f){o&&We(!1);var h=Date.now(),p=!1,g=function(){p=!0};eG({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:a,stop:c,scroll:s}},kAe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(u,f){var h=eo(u.current.client.selection,f);t({client:h})},o=function(u,f){if(!kj(u,f))return f;var h=SAe(u,f);if(!h)return n(u.descriptor.id,f),null;var p=Us(f,h);n(u.descriptor.id,p);var g=Us(f,p);return g},s=function(u,f,h){if(!u||!Tj(f,h))return h;var p=_Ae(f,h);if(!p)return r(h),null;var g=Us(h,p);r(g);var v=Us(h,g);return v},a=function(u){var f=u.scrollJumpRequest;if(f){var h=qs(u.impact);h||We(!1);var p=o(u.dimensions.droppables[h],f);if(p){var g=u.viewport,v=s(u.isWindowScrollAllowed,g,p);v&&i(u,v)}}};return a},AAe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=TAe({scrollWindow:n,scrollDroppable:t}),o=kAe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){i.scroll(u);return}u.scrollJumpRequest&&o(u)}},a={scroll:s,start:i.start,stop:i.stop};return a},tv="data-rbd",nv=function(){var e=tv+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),A3=function(){var e=tv+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),IAe=function(){var e=tv+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),tG={contextId:tv+"-scroll-container-context-id"},RAe=function(t){return function(n){return"["+n+'="'+t+'"]'}},Nb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},PAe="pointer-events: none;",OAe=function(e){var t=RAe(e),n=function(){var a=` - cursor: -webkit-grab; - cursor: grab; - `;return{selector:t(nv.contextId),styles:{always:` - -webkit-touch-callout: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - touch-action: manipulation; - `,resting:a,dragging:PAe,dropAnimating:a}}}(),r=function(){var a=` - transition: `+Wx.outOfTheWay+`; - `;return{selector:t(A3.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(IAe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` - cursor: grabbing; - cursor: -webkit-grabbing; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - overflow-anchor: none; - `}},s=[r,n,i,o];return{always:Nb(s,"always"),resting:Nb(s,"resting"),dragging:Nb(s,"dragging"),dropAnimating:Nb(s,"dropAnimating"),userCancel:Nb(s,"userCancel")}},Xs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect,_N=function(){var t=document.querySelector("head");return t||We(!1),t},nG=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function MAe(e,t){var n=Cn(function(){return OAe(e)},[e]),r=R.useRef(null),i=R.useRef(null),o=_t(Oi(function(h){var p=i.current;p||We(!1),p.textContent=h}),[]),s=_t(function(h){var p=r.current;p||We(!1),p.textContent=h},[]);Xs(function(){!r.current&&!i.current||We(!1);var h=nG(t),p=nG(t);return r.current=h,i.current=p,h.setAttribute(tv+"-always",e),p.setAttribute(tv+"-dynamic",e),_N().appendChild(h),_N().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||We(!1),_N().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var a=_t(function(){return o(n.dragging)},[o,n.dragging]),c=_t(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),u=_t(function(){i.current&&o(n.resting)},[o,n.resting]),f=Cn(function(){return{dragging:a,dropping:c,resting:u}},[a,c,u]);return f}var eee=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function lA(e){return e instanceof eee(e).HTMLElement}function DAe(e,t){var n="["+nv.contextId+'="'+e+'"]',r=_Z(document.querySelectorAll(n));if(!r.length)return null;var i=_f(r,function(o){return o.getAttribute(nv.draggableId)===t});return!i||!lA(i)?null:i}function LAe(e){var t=R.useRef({}),n=R.useRef(null),r=R.useRef(null),i=R.useRef(!1),o=_t(function(p,g){var v={id:p,focus:g};return t.current[p]=v,function(){var S=t.current,w=S[p];w!==v&&delete S[p]}},[]),s=_t(function(p){var g=DAe(e,p);g&&g!==document.activeElement&&g.focus()},[e]),a=_t(function(p,g){n.current===p&&(n.current=g)},[]),c=_t(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),u=_t(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(nv.draggableId)===p&&(n.current=p)},[]);Xs(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=Cn(function(){return{register:o,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:a}},[o,u,c,a]);return f}function NAe(){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||We(!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 a(h){return e.droppables[h]||null}function c(h){var p=a(h);return p||We(!1),p}var u={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var g=a(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:a,exists:function(p){return!!a(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:u,subscribe:n,clean:f}}function BAe(){var e=Cn(NAe,[]);return R.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Aj=de.createContext(null),BC=function(){var e=document.body;return e||We(!1),e},$Ae={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},FAe=function(t){return"rbd-announcement-"+t};function zAe(e){var t=Cn(function(){return FAe(e)},[e]),n=R.useRef(null);R.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,$Ae),BC().appendChild(o),function(){setTimeout(function(){var c=BC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=_t(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var jAe=0,UAe={separator:"::"};function Ij(e,t){return t===void 0&&(t=UAe),Cn(function(){return""+e+t.separator+jAe++},[t.separator,e])}function HAe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function WAe(e){var t=e.contextId,n=e.text,r=Ij("hidden-text",{separator:"-"}),i=Cn(function(){return HAe({contextId:t,uniqueId:r})},[r,t]);return R.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",BC().appendChild(s),function(){var c=BC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var cA=de.createContext(null);function tee(e){var t=R.useRef(e);return R.useEffect(function(){t.current=e}),t}function GAe(){var e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&We(!1);var a={abandon:s};return e=a,a}function i(){e||We(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var VAe=9,qAe=13,Rj=27,nee=32,XAe=33,YAe=34,KAe=35,QAe=36,JAe=37,ZAe=38,eIe=39,tIe=40,q_,nIe=(q_={},q_[qAe]=!0,q_[VAe]=!0,q_),ree=function(e){nIe[e.keyCode]&&e.preventDefault()},uA=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=_f(t,function(r){return"on"+r in document});return n||e}(),iee=0,rG=5;function rIe(e,t){return Math.abs(t.x-e.x)>=rG||Math.abs(t.y-e.y)>=rG}var iG={type:"IDLE"};function iIe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,c=s.clientX,u=s.clientY;if(a===iee){var f={x:c,y:u},h=r();if(h.type==="DRAGGING"){s.preventDefault(),h.actions.move(f);return}h.type!=="PENDING"&&We(!1);var p=h.point;if(rIe(p,f)){s.preventDefault();var g=h.actions.fluidLift(f);i({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===Rj){s.preventDefault(),t();return}ree(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&We(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:uA,fn:t}]}function oIe(e){var t=R.useRef(iG),n=R.useRef(Xd),r=Cn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===iee&&!(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(),u(g,v)}}}}}},[e]),i=Cn(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=_t(function(){var h={passive:!1,capture:!0};n.current=xa(window,[i,r],h)},[i,r]),s=_t(function(){var f=t.current;f.type!=="IDLE"&&(t.current=iG,n.current(),o())},[o]),a=_t(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=_t(function(){var h={capture:!0,passive:!1},p=iIe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=xa(window,p,h)},[a,s]),u=_t(function(h,p){t.current.type!=="IDLE"&&We(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Xs(function(){return o(),function(){n.current()}},[o])}var wm;function sIe(){}var aIe=(wm={},wm[YAe]=!0,wm[XAe]=!0,wm[QAe]=!0,wm[KAe]=!0,wm);function lIe(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===nee){o.preventDefault(),r();return}if(o.keyCode===tIe){o.preventDefault(),e.moveDown();return}if(o.keyCode===ZAe){o.preventDefault(),e.moveUp();return}if(o.keyCode===eIe){o.preventDefault(),e.moveRight();return}if(o.keyCode===JAe){o.preventDefault(),e.moveLeft();return}if(aIe[o.keyCode]){o.preventDefault();return}ree(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:uA,fn:n}]}function cIe(e){var t=R.useRef(sIe),n=Cn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==nee)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,f,{sourceEvent:o});if(!a)return;o.preventDefault();var c=!0,u=a.snapLift();t.current();function f(){c||We(!1),c=!1,t.current(),r()}t.current=xa(window,lIe(u,f),{capture:!0,passive:!1})}}},[e]),r=_t(function(){var o={passive:!1,capture:!0};t.current=xa(window,[n],o)},[n]);Xs(function(){return r(),function(){t.current()}},[r])}var SN={type:"IDLE"},uIe=120,dIe=.15;function fIe(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:uA,fn:t}]}function hIe(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var a=o.touches[0],c=a.clientX,u=a.clientY,f={x:c,y:u};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"&&We(!1);var a=o.touches[0];if(a){var c=a.force>=dIe;if(c){var u=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){u&&t();return}if(u){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:uA,fn:t}]}function pIe(e){var t=R.useRef(SN),n=R.useRef(Xd),r=_t(function(){return t.current},[]),i=_t(function(g){t.current=g},[]),o=Cn(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var y=e.tryGetLock(v,a,{sourceEvent:g});if(y){var S=g.touches[0],w=S.clientX,b=S.clientY,x={x:w,y:b};n.current(),h(y,x)}}}}}},[e]),s=_t(function(){var g={capture:!0,passive:!1};n.current=xa(window,[o],g)},[o]),a=_t(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(SN),n.current(),s())},[s,i]),c=_t(function(){var p=t.current;a(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[a]),u=_t(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:a,getPhase:r},y=xa(window,hIe(v),g),S=xa(window,fIe(v),g);n.current=function(){y(),S()}},[c,r,a]),f=_t(function(){var g=r();g.type!=="PENDING"&&We(!1);var v=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),h=_t(function(g,v){r().type!=="IDLE"&&We(!1);var y=setTimeout(f,uIe);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),u()},[u,r,i,f]);Xs(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(SN))}},[r,s,i]),Xs(function(){var g=xa(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var mIe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function oee(e,t){if(t==null)return!1;var n=!!mIe[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:oee(e,t.parentElement)}function gIe(e,t){var n=t.target;return lA(n)?oee(e,n):!1}var vIe=function(e){return yl(e.getBoundingClientRect()).center};function yIe(e){return e instanceof eee(e).Element}var bIe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=_f(t,function(r){return r in Element.prototype});return n||e}();function see(e,t){return e==null?null:e[bIe](t)?e:see(e.parentElement,t)}function xIe(e,t){return e.closest?e.closest(t):see(e,t)}function wIe(e){return"["+nv.contextId+'="'+e+'"]'}function _Ie(e,t){var n=t.target;if(!yIe(n))return null;var r=wIe(e),i=xIe(n,r);return!i||!lA(i)?null:i}function SIe(e,t){var n=_Ie(e,t);return n?n.getAttribute(nv.draggableId):null}function EIe(e,t){var n="["+A3.contextId+'="'+e+'"]',r=_Z(document.querySelectorAll(n)),i=_f(r,function(o){return o.getAttribute(A3.id)===t});return!i||!lA(i)?null:i}function CIe(e){e.preventDefault()}function X_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function aee(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!KZ(n.getState(),i))}function TIe(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,c=aee({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var u=i.draggable.getById(o),f=EIe(n,u.descriptor.id);if(!f||a&&!u.options.canDragInteractiveElements&&gIe(f,a))return null;var h=t.claim(s||Xd),p="PRE_DRAG";function g(){return u.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(A,k){X_({expected:A,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(k())}var S=y.bind(null,"DRAGGING");function w(A){function k(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(k(),p!=="PRE_DRAG"&&We(!1)),r.dispatch(bke(A.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),A.cleanup(),N.shouldBlockNextClick){var H=xa(window,[{eventName:"click",fn:CIe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}k(),r.dispatch(HZ({reason:L}))}return $({isActive:function(){return X_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},A.actions)}function b(A){var k=D1(function(L){S(function(){return UZ({client:L})})}),O=w({liftActionArgs:{id:o,clientSelection:A,movementMode:"FLUID"},cleanup:function(){return k.cancel()},actions:{move:k}});return $({},O,{move:k})}function x(){var A={moveUp:function(){return S(Ake)},moveRight:function(){return S(Rke)},moveDown:function(){return S(Ike)},moveLeft:function(){return S(Pke)}};return w({liftActionArgs:{id:o,clientSelection:vIe(f),movementMode:"SNAP"},cleanup:Xd,actions:A})}function E(){var A=X_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});A&&t.release()}var I={isActive:function(){return X_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return I}var kIe=[oIe,cIe,pIe];function AIe(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?kIe:[],i||[]),a=R.useState(function(){return GAe()})[0],c=_t(function(b,x){b.isDragging&&!x.isDragging&&a.tryAbandon()},[a]);Xs(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[a,n,c]),Xs(function(){return a.tryAbandon},[a.tryAbandon]);for(var u=_t(function(w){return aee({lockAPI:a,registry:r,store:n,draggableId:w})},[a,r,n]),f=_t(function(w,b,x){return TIe({lockAPI:a,registry:r,contextId:t,store:n,draggableId:w,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,a,r,n]),h=_t(function(w){return SIe(t,w)},[t]),p=_t(function(w){var b=r.draggable.findById(w);return b?b.options:null},[r.draggable]),g=_t(function(){a.isClaimed()&&(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(xj()))},[a,n]),v=_t(a.isClaimed,[a]),y=Cn(function(){return{canGetLock:u,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[u,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:a=C.jsx(_Re,{}),value:c,id:u,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,w]=R.useState(null),b=Ln(),x=E=>C.jsxs(ht,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(ht,{color:"text.secondary",sx:{pr:2},children:C.jsx(B1e,{})})}),e!==null&&R.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(ht,{flexGrow:1,sx:{ml:e===null?2:0},children:R.cloneElement(a,{onDelete:()=>o(u??f),autoFocus:g,value:c,key:u??f,onValueChange:I=>i(u??f,I,s),onChange:I=>i(u??f,I.target.value,s),ref:I=>w(I)})}),C.jsxs(ht,{display:"flex",alignItems:"center",children:[t&&C.jsx(Kg,{color:"primary",edge:"end",onChange:(I,A)=>i(u??f,c,A),checked:s}),r&&C.jsx(jp,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(Wk,{})}),n&&C.jsx(jp,{onClick:()=>o(u??f),children:C.jsx(D1e,{})})]})]});return C.jsx(gRe,{index:f,draggableId:`${u}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(ht,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(Oge,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function CRe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function TRe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:a,autoFocus:c,getCategory:u,getOrder:f,onChange:h,extras:p}=e,g=SRe(),v=Ln(),[y,S]=R.useState(s),[w,b]=R.useState(-1);R.useEffect(()=>{const A=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(A)}},[s,S,v.transitions.duration.standard]);const x=te.uniqBy([...y,...s],A=>A.id).map(A=>s.find(k=>A.id===k.id)??A).map((A,k)=>{const{enabled:O,element:L,value:N,id:H}=A??{};return{value:N,render:G=>C.jsx(zL,{in:!!s.find(z=>z.id===A.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(ERe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:k,autoFocus:c||k===w,...G})}),key:H,in:!!s.find(G=>G.id===A.id)}}),E=te.sortBy(x,A=>u==null?void 0:u(A.value),A=>f==null?void 0:f(A.value)).map(A=>({...A,render:k=>C.jsx(ht,{children:A.render(k)},A.key)}));return C.jsx(MIe,{onDragEnd:A=>{if(!A.destination)return;const k=CRe(s,A.source.index,A.destination.index);h==null||h(k),S(k)},children:C.jsxs(Yg,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(Mme,{disableSticky:!0,children:[n&&C.jsx(Ut,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(Ut,{variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:v.spacing(3)},children:r})]})}):void 0,children:[C.jsx(ht,{mt:u?-1:0,children:C.jsx(hee,{droppableId:"list",children:A=>C.jsxs("div",{...A.droppableProps,ref:A.innerRef,children:[(()=>{const k=[];return E.forEach((O,L)=>{u&&I(E,L,O)&&k.push(C.jsx(zL,{in:s.some(N=>u(N.value)===u(O.value)),appear:!0,children:C.jsx(ht,{pl:2,pb:2,pt:1,children:C.jsx(Ut,{variant:"overline",color:"text.secondary",children:u(O.value)})})},u(O.value))),k.push(O.render())}),k})(),A.placeholder]})})}),C.jsx(zL,{in:!(s!=null&&s.length),children:C.jsx(ht,{ml:2,mb:1,pt:u?1:0,children:C.jsx(Ut,{component:"div",color:"text.secondary",children:a??"No items"})})}),C.jsxs(ht,{p:2,pt:1,mb:-3,children:[C.jsx(Fz,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(T1e,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:A=>kn(A.palette.text.primary,A.palette.action.activatedOpacity)},children:C.jsx(ht,{sx:{color:"text.primary"},children:t})}),p]})]})});function I(A,k,O){return!!(u&&(A[k-1]===void 0||u(A[k-1].value)!==u(O.value)))}}function dA({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=R.useState(t??[]);function a(c){s(c),e==null||e(c)}return R.useEffect(()=>{s(t)},[t]),C.jsx(ht,{sx:{ml:-2},children:C.jsx(TRe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>a==null?void 0:a([...o,{key:qo(),...r==null?void 0:r()}]),onDeleteItem:c=>a==null?void 0:a(te.filter(o,u=>u.key!==c)),onChangeItem:(c,u)=>a==null?void 0:a(te.map(o,f=>f.key===c?u:f)),onChange:c=>a==null?void 0:a(te.map(c,u=>u.value))})})}const _d=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],kRe=["any","source","destination","expanding","generating","closing"];function ARe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(En,{children:[C.jsx(jx,{placeholder:"Event",sx:{minWidth:160},items:te.map(kRe,s=>({value:s,label:te.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(Qu,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(jx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:te.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[te.last(s.split(".")),C.jsx(li,{}),C.jsx(Ut,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(li,{}),C.jsx(jx,{placeholder:"Condition",items:_d.map(s=>({value:s.key,label:te.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=_d==null?void 0:_d[0])==null?void 0:o.key),onChange:s=>r({condition:te.find(_d,{key:s})})}),C.jsx(li,{}),C.jsx(Cw,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(li,{sx:{px:2}}),C.jsx(w3,{checked:!!e.active,onChange:(s,a)=>r({active:a})})]})}const IRe=["f","g"],RRe=["variables"];function PRe(){const[{breakpoints:e=[]},t]=rA(),n=te.uniq([...IRe,...te.flatMap(RRe,r=>te.flatMap([],i=>te.map(te.keys(te.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(ht,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(ht,{sx:{minWidth:720,mb:2},children:C.jsx(dA,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(ARe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:_d==null?void 0:_d[0],type:void 0,reference:0}),onChange:te.debounce(r=>t(()=>({breakpoints:r})),1e3),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function ORe(){const{controls:e,onChange:t,state:n}=wf(),[{monotonicF:r,monotonicG:i},o]=rA(),[s,a]=R.useState("standard");function c(u){return C.jsx(Ut,{variant:"overline",color:"text.secondary",children:u})}return C.jsx(VJ,{value:s,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(KJ,{onChange:(u,f)=>a(f),children:[C.jsx(rg,{label:"Standard",value:"standard"}),C.jsx(rg,{label:"Advanced",value:"advanced"})]})}),C.jsxs(zn.Content,{children:[C.jsx(ht,{overflow:"auto",height:"100%",children:C.jsxs(ht,{pt:6,height:"100%",children:[C.jsxs(ag,{value:"standard",children:[C.jsxs(ht,{children:[c("General"),C.jsxs(En,{children:[C.jsx(w3,{label:"Monotonic f value",checked:!!r,onChange:(u,f)=>o(()=>({monotonicF:f}))}),C.jsx(li,{}),C.jsx(w3,{label:"Monotonic g value",checked:!!i,onChange:(u,f)=>o(()=>({monotonicG:f}))})]})]}),C.jsx(li,{}),C.jsxs(ht,{children:[c("Breakpoints"),C.jsx(PRe,{})]}),C.jsxs(ht,{children:[c("Export"),C.jsx(En,{mt:1})]})]}),C.jsx(ag,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(dCe,{})})]})})," "]}),C.jsx(zn.Extras,{children:e})]})})}function gp({label:e,icon:t=C.jsx(twe,{}),...n}){return C.jsxs(En,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[R.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(Ut,{children:e})]})}function MRe(){const{controls:e,onChange:t,state:n}=wf(),[r]=ZQ();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:r.length?C.jsx(Iw,{y:!0,children:C.jsx(Yg,{sx:{pt:6},children:te.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(Fx,{children:C.jsx(oc,{primary:i.content,secondary:i.timestamp})}),C.jsx(Qu,{})]},o))})}):C.jsx(gp,{pt:6,label:"Logs",icon:C.jsx(GQ,{})})})}),C.jsx(zn.Extras,{children:e})]})}const DRe=te.constant(!0),[om,LRe]=vc({layers:[]});function qp(e,t=DRe){const[n,r]=R.useState(e),[{layers:i},o]=om(),s=te.filter(i,t),a=n?te.find(s,{key:n}):te.head(s);return R.useEffect(()=>{r(e)},[e]),R.useEffect(()=>{a&&a.key!==n&&r(a.key)},[a,n,r]),R.useMemo(()=>({key:a==null?void 0:a.key,setKey:r,layer:a,setLayer:c=>{const u={...a,...c};o(({layers:f})=>({layers:te.map(f,h=>h.key===u.key?u:h)}))},layers:s}),[a,o,s])}var pee={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:$t,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(f){return n.setTimeout(f,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(f){n.clearTimeout(f)};function o(f,h){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,y=f.length;if(g)for(;v=G&&(F+=N.value),N.mode==="max"&&z<=G&&(F+=N.value),D[j]||(D[j]=""),F&&(" "+D[j]+" ").indexOf(" "+F+" ")===-1&&(D[j]+=" "+F));for(var W in V)V.hasOwnProperty(W)&&(D[V[W]]?this.element.setAttribute(V[W],D[V[W]].substr(1)):this.element.removeAttribute(V[W]))}}function p(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=a.length;o.innerHTML+=` -`+k+" {animation: 0.1s element-queries;}",o.innerHTML+=` -`+k+" > .resize-sensor {min-width: "+H+"px;}",a.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,G=N.length;HL[X].minWidth&&(K=X);if(K||(K=H),G!==K)if(z[K])O[G].style.display="none",O[K].style.display="block",G=K;else{var Q=new Image;Q.onload=function(){O[K].src=N[K],O[G].style.display="none",O[K].style.display="block",z[K]=!0,G=K},Q.src=N[K]}else O[K].src=N[K]}k.resizeSensorInstance=new n(k,W),W()}function w(){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),A=!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(vee.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const vee=R.createContext(null);function FRe(){return R.useContext(vee)}function zRe(e=128){const[t,n]=R.useState(!0),[r,i]=R.useState(!0),[o,s]=R.useState(!0),[a,c]=R.useState(null),u=R.useRef(0);return R.useEffect(()=>{if(a){const f=()=>{{const h=a.scrollTop<=e;h!==o&&s(h)}{const h=a.scrollTop<=1;h!==r&&i(h)}u.current-a.scrollTop&&(Math.abs(u.current-a.scrollTop)>2&&u.current>=0&&n(u.current>a.scrollTop),u.current=a.scrollTop)};return a.addEventListener("scroll",f,{passive:!0}),()=>{a.removeEventListener("scroll",f)}}},[a,o,r,u,e]),[t||o,o,r,a,c]}function Oj({children:e}){return C.jsx(Ut,{variant:"h6",children:e})}function jRe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:a="sticky"}){const c=FRe(),u=Ln(),[,,f,,h]=zRe();R.useEffect(()=>{h(c)},[c,h]);const p=f?{background:u.palette.background.paper,...!s&&{boxShadow:u.shadows[0]},...t}:{background:u.palette.background.paper,...!s&&{boxShadow:u.shadows[4]},...n};return C.jsx(khe,{elevation:0,position:a,style:{color:u.palette.text.primary,transition:u.transitions.create(i),...p},children:C.jsxs(qxe,{children:[C.jsx(jp,{style:{marginRight:u.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(k1e,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(Hp,{in:!!(!o||f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(ht,{style:{width:"100%"},children:r})})}),o&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(Hp,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(ht,{style:{width:"100%"},children:o})})})]})})}function URe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...a}){var I;const[c,u]=R.useState(void 0);R.useEffect(()=>{e&&u(e)},[e]);const f=Ln(),h=sj(),[p,g]=R.useState(null),[v,y]=R.useState(null),[S,w]=R.useState(!1),[b,x]=R.useState(0);R.useEffect(()=>{if(p&&v&&!h&&!r){const A=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",A),k.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(Ave,{fullScreen:h,...a,style:{...E&&{paddingTop:f.spacing(8)},...a.style},PaperProps:{ref:A=>g(A),style:{...E&&{borderRadius:`${f.shape.borderRadius}px ${f.shape.borderRadius}px 0 0`},background:f.palette.background.paper,overflow:"hidden",height:r&&!h?r:S||h?"100%":b||"fit-content",position:"relative",maxWidth:"none",...(I=a.PaperProps)==null?void 0:I.style},...a.PaperProps},children:[C.jsx($Re,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:A=>y(A),style:{width:"100%",height:"100%"},children:c})}),t]})}function Mj({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(im,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[R.cloneElement(n(i)),C.jsxs(URe,{open:s,onClose:o,...e,children:[C.jsx(jRe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const[rv,HRe]=vc([],{reduce:JQ}),[FC,WRe]=vc({algorithms:[],maps:[],formats:[]}),[fA,GRe]=vc({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>ka(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function VRe(){const[e]=fA();return te.some(te.values(e))}function sm(e){const[,t]=fA();return R.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let yee=class extends Error{},qRe=class extends yee{},XRe=class extends yee{};const YRe=(e,t=",")=>e.join(t),KRe={accept:"*",multiple:!1,strict:!1},Dj=e=>{const{accept:t,multiple:n,strict:r}={...KRe,...e},i=ZRe({multiple:n,accept:Array.isArray(t)?YRe(t):t});return new Promise(o=>{i.onchange=()=>{o(QRe(i.files,n,r)),i.remove()},i.click()})},QRe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new qRe);const o=JRe(e,t,n);if(!o)return i(new XRe);r(o)}),JRe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,ZRe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},ePe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,tPe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,nPe=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,rPe=""+new URL("parseYaml.worker-25aef2ce.js",import.meta.url).href;class iPe extends Worker{constructor(){super(ePe,{type:"module"})}}class oPe extends Worker{constructor(){super(nPe,{type:"module"})}}class sPe extends Worker{constructor(){super(tPe,{type:"module"})}}class aPe extends Worker{constructor(){super(rPe,{type:"module"})}}var lPe=function(){},cPe=lPe(),am=function(e){return e!==cPe&&e!==null},uPe=am,dPe=Array.prototype.forEach,fPe=Object.create,hPe=function(e,t){var n;for(n in e)t[n]=e[n]},bee=function(e){var t=fPe(null);return dPe.call(arguments,function(n){uPe(n)&&hPe(Object(n),t)}),t},pPe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},TN,uG;function mPe(){return uG||(uG=1,TN=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),TN}var gPe=pPe()?Math.sign:mPe(),vPe=gPe,yPe=Math.abs,bPe=Math.floor,xPe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:vPe(e)*bPe(yPe(e)))},wPe=xPe,_Pe=Math.max,lm=function(e){return _Pe(0,wPe(e))},SPe=lm,xee=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:SPe(e)},Sf=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},EPe=am,Pv=function(e){if(!EPe(e))throw new TypeError("Cannot use null or undefined");return e},CPe=Sf,TPe=Pv,kPe=Function.prototype.bind,dG=Function.prototype.call,APe=Object.keys,IPe=Object.prototype.propertyIsEnumerable,RPe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(TPe(n)),CPe(r),i=APe(n),s&&i.sort(typeof s=="function"?kPe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),dG.call(e,i,function(a,c){return IPe.call(n,a)?dG.call(r,o,n[a],a,n,c):t})}},hA=RPe("forEach"),cm={},wee={exports:{}},PPe=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")},kN,fG;function OPe(){return fG||(fG=1,kN=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),kN}var AN,hG;function MPe(){if(hG)return AN;hG=1;var e=am,t=Object.keys;return AN=function(n){return t(e(n)?Object(n):n)},AN}var IN,pG;function DPe(){return pG||(pG=1,IN=OPe()()?Object.keys:MPe()),IN}var RN,mG;function LPe(){if(mG)return RN;mG=1;var e=DPe(),t=Pv,n=Math.max;return RN=function(r,i){var o,s,a=n(arguments.length,2),c;for(r=Object(t(r)),c=function(u){try{r[u]=i[u]}catch(f){o||(o=f)}},s=1;s-1},DN}var e2e=JPe()?String.prototype.contains:ZPe(),gE=kee,_G=QPe,Aee=_ee,Iee=bee,Gx=e2e,t2e=Tee.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],gE(e)?(n=Gx.call(e,"c"),r=Gx.call(e,"e"),i=Gx.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?Aee(Iee(o),s):s};t2e.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],gE(t)?_G(t)?gE(n)?_G(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,gE(e)?(r=Gx.call(e,"c"),i=Gx.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?Aee(Iee(o),s):s};var um=Tee.exports,P3={exports:{}};(function(e,t){var n=um,r=Sf,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,c=Object.defineProperties,u=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,w;h=function(b,x){var E;return r(x),u.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),a(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,k;if(r(x),!u.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(k=0;A=I[k];++k)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[k?0:1]:I.splice(k,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,k;if(u.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?u.call(g,v,O,w):O,y?(f.value=O,h(b,w,f)):b[w]=O,++w;x=w}}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"}},mB}var gB,a9;function K2e(){if(a9)return gB;a9=1;var e=Y2e(),t=/[\n\r\u2028\u2029]/g;return gB=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},gB}var Z_={exports:{}},l9;function Lee(){if(l9)return Z_.exports;l9=1,Z_.exports=e,Z_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return Z_.exports}var c9;function Q2e(){if(c9)return t9;c9=1;var e=Mee(),t=V2e(),n=X2e(),r=K2e(),i=Lee(),o=Bj(),s=Object.create,a=t("then","then:finally","done","done:finally");return cm.promise=function(c,u){var f=s(null),h=s(null),p=s(null);if(c===!0)c=null;else if(c=n(c),!a[c])throw new TypeError("'"+r(c)+"' is not valid promise mode");u.on("set",function(g,v,y){var S=!1;if(!i(y)){h[g]=y,u.emit("setasync",g,1);return}f[g]=1,p[g]=y;var w=function(I){var A=f[g];if(S)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);A&&(delete f[g],h[g]=I,u.emit("setasync",g,A))},b=function(){S=!0,f[g]&&(delete f[g],delete p[g],u.delete(g))},x=c;if(x||(x="then"),x==="then"){var E=function(){o(b)};y=y.then(function(I){o(w.bind(this,I))},E),typeof y.finally=="function"&&y.finally(E)}else if(x==="done"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");y.done(w,b)}else if(x==="done:finally"){if(typeof y.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof y.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");y.done(w),y.finally(b)}}),u.on("get",function(g,v,y){var S;if(f[g]){++f[g];return}S=p[g];var w=function(){u.emit("getasync",g,v,y)};i(S)?typeof S.done=="function"?S.done(w):S.then(function(){o(w)}):w()}),u.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],u.emit("deleteasync",g,[v])}}),u.on("clear",function(){var g=h;h=s(null),f=s(null),p=s(null),u.emit("clearasync",e(g,function(v){return[v]}))})},t9}var u9={},d9;function J2e(){if(d9)return u9;d9=1;var e=Sf,t=hA,n=cm,r=Function.prototype.apply;return n.dispose=function(i,o,s){var a;if(e(i),s.async&&n.async||s.promise&&n.promise){o.on("deleteasync",a=function(c,u){r.call(i,null,u)}),o.on("clearasync",function(c){t(c,function(u,f){a(f,u)})});return}o.on("delete",a=function(c,u){i(u)}),o.on("clear",function(c){t(c,function(u,f){a(f,u)})})},u9}var f9={},vB,h9;function Z2e(){return h9||(h9=1,vB=2147483647),vB}var yB,p9;function eOe(){if(p9)return yB;p9=1;var e=lm,t=Z2e();return yB=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},yB}var m9;function tOe(){if(m9)return f9;m9=1;var e=Lj(),t=hA,n=Bj(),r=Lee(),i=eOe(),o=cm,s=Function.prototype,a=Math.max,c=Math.min,u=Object.create;return o.maxAge=function(f,h,p){var g,v,y,S;f=i(f),f&&(g=u(null),v=p.async&&o.async||p.promise&&o.promise?"async":"",h.on("set"+v,function(w){g[w]=setTimeout(function(){h.delete(w)},f),typeof g[w].unref=="function"&&g[w].unref(),S&&(S[w]&&S[w]!=="nextTick"&&clearTimeout(S[w]),S[w]=setTimeout(function(){delete S[w]},y),typeof S[w].unref=="function"&&S[w].unref())}),h.on("delete"+v,function(w){clearTimeout(g[w]),delete g[w],S&&(S[w]!=="nextTick"&&clearTimeout(S[w]),delete S[w])}),p.preFetch&&(p.preFetch===!0||isNaN(p.preFetch)?y=.333:y=a(c(Number(p.preFetch),1),0),y&&(S={},y=(1-y)*f,h.on("get"+v,function(w,b,x){S[w]||(S[w]="nextTick",n(function(){var E;S[w]==="nextTick"&&(delete S[w],h.delete(w),p.async&&(b=e(b),b.push(s)),E=h.memoized.apply(x,b),p.promise&&r(E)&&(typeof E.done=="function"?E.done(s,s):E.then(s,s)))}))}))),h.on("clear"+v,function(){t(g,function(w){clearTimeout(w)}),g={},S&&(t(S,function(w){w!=="nextTick"&&clearTimeout(w)}),S={})}))},f9}var g9={},bB,v9;function nOe(){if(v9)return bB;v9=1;var e=lm,t=Object.create,n=Object.prototype.hasOwnProperty;return bB=function(r){var i=0,o=1,s=t(null),a=t(null),c=0,u;return r=e(r),{hit:function(f){var h=a[f],p=++c;if(s[p]=f,a[f]=p,!h)return++i,i<=r?void 0:(f=s[o],u(f),f);if(delete s[h],o===h)for(;!n.call(s,++o););},delete:u=function(f){var h=a[f];if(h&&(delete s[h],delete a[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),a=t(null),c=0}}},bB}var y9;function rOe(){if(y9)return g9;y9=1;var e=lm,t=nOe(),n=cm;return n.max=function(r,i,o){var s,a,c;r=e(r),r&&(a=t(r),s=o.async&&n.async||o.promise&&n.promise?"async":"",i.on("set"+s,c=function(u){u=a.hit(u),u!==void 0&&i.delete(u)}),i.on("get"+s,c),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))},g9}var b9={},x9;function iOe(){if(x9)return b9;x9=1;var e=um,t=cm,n=Object.create,r=Object.defineProperties;return t.refCounter=function(i,o,s){var a,c;a=n(null),c=s.async&&t.async||s.promise&&t.promise?"async":"",o.on("set"+c,function(u,f){a[u]=f||1}),o.on("get"+c,function(u){++a[u]}),o.on("delete"+c,function(u){delete a[u]}),o.on("clear"+c,function(){a={}}),r(o.memoized,{deleteRef:e(function(){var u=o.get(arguments);return u===null||!a[u]?null:--a[u]?!1:(o.delete(u),!0)}),getRefCount:e(function(){var u=o.get(arguments);return u===null||!a[u]?0:a[u]})})},b9}var oOe=bee,sOe=xee,aOe=N2e,lOe=function(e){var t=oOe(arguments[1]),n;return t.normalizer||(n=t.length=sOe(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=B2e():n>1&&(t.normalizer=$2e()(n)):n===!1?t.normalizer=U2e()():n===1?t.normalizer=H2e()():t.normalizer=W2e()(n))),t.async&&G2e(),t.promise&&Q2e(),t.dispose&&J2e(),t.maxAge&&tOe(),t.max&&rOe(),t.refCounter&&iOe(),aOe(e,t)};const Ef=ds(lOe),cOe=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},mA=e=>t=>cOe(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),Ov=(e,t={async:!0,length:1})=>Ef(mA(e),t);te.memoize(mA(iPe));te.memoize(mA(oPe));const Nee=te.memoize(mA(aPe));function Vx(e){return e.split(".").pop()}function Bee(e){return e.split(".").shift()}const w9="internal/custom",O3="json",M3=e=>({name:(e==null?void 0:e.id)===w9?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:w9}),uOe=e=>({name:(e==null?void 0:e.type)===O3?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:O3}),_9=["json","yaml"];async function dOe(){const e=await Dj({accept:_9.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(_9.includes(Vx(e.name))){const t=await e.text(),n=await Nee(t);return{...uOe(),format:n==null?void 0:n.format,content:n,name:te.startCase(Bee(e.name)),type:O3}}else throw new Error(`The format (${Vx(e.name)}) is unsupported.`)}}}async function fOe(e){const t=await Dj({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(te.find(e,{id:Vx(t.name)}))return{...M3(),format:Vx(t.name),content:await t.text(),name:te.startCase(Bee(t.name))};throw new Error(`The format (${Vx(t.name)}) is unsupported.`)}}}const $ee=20*1024*1024,[Fee,hOe]=vc({},{reduce:(e,t)=>te.omitBy(Gk(e,t),te.isUndefined)});function pOe(e){return new Promise(t=>te.delay(t,e))}function $j(e){const[,t]=Fee();return R.useCallback(async(n,r)=>{t(()=>({[e]:r})),pOe(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function Fj(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function mOe({onChange:e,value:t}){const n=Ol(),r=sm("map"),i=$j("map"),[o]=rv(),[{maps:s,formats:a}]=FC();return C.jsx(Vs,{showArrow:!0,icon:C.jsx(WQ,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[M3(t),...s.map(c=>{var u;return{...c,description:(u=te.find(o,{url:c.source}))==null?void 0:u.name}})],onChange:async c=>{switch(c){case M3().id:try{const u=await fOe(a);u&&r(async()=>{n("Opening map...");const f=u.file.size>$ee?await i(u.read,`Opening map (${Fj(u.file.size)})`):await u.read();f&&(e==null||e(f))})}catch(u){n(`${u}`)}break;default:e==null||e(te.find(s,{id:c}));break}}})}function gOe({onChange:e,value:t}){const n=Ol(),r=sm("specimen"),i=$j("specimen");return C.jsx(of,{icon:C.jsx(WQ,{}),onClick:async()=>{try{const o=await dOe();o&&r(async()=>{n("Opening trace...");const s=o.file.size>$ee?await i(o.read,`Opening trace (${Fj(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 ux="500";function vOe(e){return parseInt(e.replace("#","0x"))}const zj={source:hd.A400,destination:dd.A400,updating:cp[ux],expanding:gX[ux],generating:vX[ux],closing:mX[ux],end:fd.A400};te.mapValues(zj,vOe);function F1(e){return(e&&zj[e])??p4[ux]}function yOe(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 bOe(){return this.eachAfter(yOe)}function xOe(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 _Oe(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 EOe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function COe(e){for(var t=this,n=TOe(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 TOe(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 kOe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function AOe(){var e=[];return this.each(function(t){e.push(t)}),e}function IOe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ROe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function jj(e,t){var n=new z1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,a,c,u;for(t==null&&(t=OOe);i=o.pop();)if(r&&(i.value=+i.data.value),(a=t(i.data))&&(u=a.length))for(i.children=new Array(u),c=u-1;c>=0;--c)o.push(s=i.children[c]=new z1(a[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(DOe)}function POe(){return jj(this).eachBefore(MOe)}function OOe(e){return e.children}function MOe(e){e.data=e.data.data}function DOe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function z1(e){this.data=e,this.depth=this.height=0,this.parent=null}z1.prototype=jj.prototype={constructor:z1,count:bOe,each:xOe,eachAfter:_Oe,eachBefore:wOe,sum:SOe,sort:EOe,path:COe,ancestors:kOe,descendants:AOe,leaves:IOe,links:ROe,copy:POe};function LOe(e,t){return e.parent===t.parent?1:2}function xB(e){var t=e.children;return t?t[0]:e.t}function wB(e){var t=e.children;return t?t[t.length-1]:e.t}function NOe(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 BOe(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 $Oe(e,t,n){return e.a.parent===t.parent?e.a:n}function vE(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}vE.prototype=Object.create(z1.prototype);function FOe(e){for(var t=new vE(e,0),n,r=[t],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new vE(o[s],s)),i.parent=n;return(t.parent=new vE(null,0)).children=[t],t}function zOe(){var e=LOe,t=1,n=1,r=null;function i(u){var f=FOe(u);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(s),r)u.eachBefore(c);else{var h=u,p=u,g=u;u.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),w=n/(g.depth||1);u.eachBefore(function(b){b.x=(b.x+y)*S,b.y=b.depth*w})}return u}function o(u){var f=u.children,h=u.parent.children,p=u.i?h[u.i-1]:null;if(f){BOe(u);var g=(f[0].z+f[f.length-1].z)/2;p?(u.z=p.z+e(u._,p._),u.m=u.z-g):u.z=g}else p&&(u.z=p.z+e(u._,p._));u.parent.A=a(u,p,u.parent.A||h[0])}function s(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function a(u,f,h){if(f){for(var p=u,g=u,v=f,y=p.parent.children[0],S=p.m,w=g.m,b=v.m,x=y.m,E;v=wB(v),p=xB(p),v&&p;)y=xB(y),g=wB(g),g.a=u,E=v.z+b-p.z-S+e(v._,p._),E>0&&(NOe($Oe(v,u,h),u,E),S+=E,w+=E),b+=v.m,S+=p.m,x+=y.m,w+=g.m;v&&!wB(g)&&(g.t=v,g.m+=b-w),p&&!xB(y)&&(y.t=p,y.m+=S-x,h=u)}return h}function c(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}var D3="http://www.w3.org/1999/xhtml";const S9={svg:"http://www.w3.org/2000/svg",xhtml:D3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function gA(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),S9.hasOwnProperty(t)?{space:S9[t],local:e}:e}function jOe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===D3&&t.documentElement.namespaceURI===D3?t.createElement(e):t.createElementNS(n,e)}}function UOe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zee(e){var t=gA(e);return(t.local?UOe:jOe)(t)}function HOe(){}function Uj(e){return e==null?HOe:function(){return this.querySelector(e)}}function WOe(e){typeof e!="function"&&(e=Uj(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(I=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function mMe(e){e||(e=gMe);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 vMe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yMe(){return Array.from(this)}function bMe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?RMe:typeof t=="function"?OMe:PMe)(e,t,n??"")):iv(this.node(),e)}function iv(e,t){return e.style.getPropertyValue(t)||Gee(e).getComputedStyle(e,null).getPropertyValue(t)}function DMe(e){return function(){delete this[e]}}function LMe(e,t){return function(){this[e]=t}}function NMe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BMe(e,t){return arguments.length>1?this.each((t==null?DMe:typeof t=="function"?NMe:LMe)(e,t)):this.node()[e]}function Vee(e){return e.trim().split(/^|\s+/)}function Hj(e){return e.classList||new qee(e)}function qee(e){this._node=e,this._names=Vee(e.getAttribute("class")||"")}qee.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 Xee(e,t){for(var n=Hj(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function dDe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function Wj(){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}})}yE.prototype=Wj.prototype={constructor:yE,on:function(e,t){var n=this._,r=wDe(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?eS(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?eS(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=TDe.exec(e))?new ts(t[1],t[2],t[3],1):(t=kDe.exec(e))?new ts(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ADe.exec(e))?eS(t[1],t[2],t[3],t[4]):(t=IDe.exec(e))?eS(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=RDe.exec(e))?P9(t[1],t[2]/100,t[3]/100,1):(t=PDe.exec(e))?P9(t[1],t[2]/100,t[3]/100,t[4]):C9.hasOwnProperty(e)?A9(C9[e]):e==="transparent"?new ts(NaN,NaN,NaN,0):null}function A9(e){return new ts(e>>16&255,e>>8&255,e&255,1)}function eS(e,t,n,r){return r<=0&&(e=t=n=NaN),new ts(e,t,n,r)}function DDe(e){return e instanceof Ww||(e=H1(e)),e?(e=e.rgb(),new ts(e.r,e.g,e.b,e.opacity)):new ts}function B3(e,t,n,r){return arguments.length===1?DDe(e):new ts(e,t,n,r??1)}function ts(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Gj(ts,B3,Jee(Ww,{brighter(e){return e=e==null?jC:Math.pow(jC,e),new ts(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?j1:Math.pow(j1,e),new ts(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ts(kp(this.r),kp(this.g),kp(this.b),UC(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:I9,formatHex:I9,formatHex8:LDe,formatRgb:R9,toString:R9}));function I9(){return`#${vp(this.r)}${vp(this.g)}${vp(this.b)}`}function LDe(){return`#${vp(this.r)}${vp(this.g)}${vp(this.b)}${vp((isNaN(this.opacity)?1:this.opacity)*255)}`}function R9(){const e=UC(this.opacity);return`${e===1?"rgb(":"rgba("}${kp(this.r)}, ${kp(this.g)}, ${kp(this.b)}${e===1?")":`, ${e})`}`}function UC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function kp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vp(e){return e=kp(e),(e<16?"0":"")+e.toString(16)}function P9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gl(e,t,n,r)}function Zee(e){if(e instanceof gl)return new gl(e.h,e.s,e.l,e.opacity);if(e instanceof Ww||(e=H1(e)),!e)return new gl;if(e instanceof gl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(t===o?s=(n-r)/a+(n0&&c<1?0:s,new gl(s,a,c,e.opacity)}function NDe(e,t,n,r){return arguments.length===1?Zee(e):new gl(e,t,n,r??1)}function gl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gj(gl,NDe,Jee(Ww,{brighter(e){return e=e==null?jC:Math.pow(jC,e),new gl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?j1:Math.pow(j1,e),new gl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ts(_B(e>=240?e-240:e+120,i,r),_B(e,i,r),_B(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gl(O9(this.h),tS(this.s),tS(this.l),UC(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=UC(this.opacity);return`${e===1?"hsl(":"hsla("}${O9(this.h)}, ${tS(this.s)*100}%, ${tS(this.l)*100}%${e===1?")":`, ${e})`}`}}));function O9(e){return e=(e||0)%360,e<0?e+360:e}function tS(e){return Math.max(0,Math.min(1,e||0))}function _B(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 ete=e=>()=>e;function BDe(e,t){return function(n){return e+n*t}}function $De(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 FDe(e){return(e=+e)==1?tte:function(t,n){return n-t?$De(t,n,e):ete(isNaN(t)?n:t)}}function tte(e,t){var n=t-e;return n?BDe(e,n):ete(isNaN(e)?t:e)}const M9=function e(t){var n=FDe(t);function r(i,o){var s=n((i=B3(i)).r,(o=B3(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),u=tte(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=a(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function yd(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var $3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SB=new RegExp($3.source,"g");function zDe(e){return function(){return e}}function jDe(e){return function(t){return e(t)+""}}function UDe(e,t){var n=$3.lastIndex=SB.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=$3.exec(e))&&(i=SB.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:yd(r,i)})),n=SB.lastIndex;return n180?f+=360:f-u>180&&(u+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:yd(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function a(u,f,h,p){u!==f?p.push({i:h.push(i(h)+"skewX(",null,r)-2,x:yd(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,p,g,v){if(u!==h||f!==p){var y=g.push(i(g)+"scale(",null,",",null,")");v.push({i:y-4,x:yd(u,h)},{i:y-2,x:yd(f,p)})}else(h!==1||p!==1)&&g.push(i(g)+"scale("+h+","+p+")")}return function(u,f){var h=[],p=[];return u=e(u),f=e(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,p),s(u.rotate,f.rotate,h,p),a(u.skewX,f.skewX,h,p),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,p),u=f=null,function(g){for(var v=-1,y=p.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--ov}function N9(){Xp=(WC=W1.now())+vA,ov=dx=0;try{JDe()}finally{ov=0,eLe(),Xp=0}}function ZDe(){var e=W1.now(),t=e-WC;t>ite&&(vA-=t,WC=e)}function eLe(){for(var e,t=HC,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:HC=n);fx=e,z3(r)}function z3(e){if(!ov){dx&&(dx=clearTimeout(dx));var t=e-Xp;t>24?(e<1/0&&(dx=setTimeout(N9,e-W1.now()-vA)),Fb&&(Fb=clearInterval(Fb))):(Fb||(WC=W1.now(),Fb=setInterval(ZDe,ite)),ov=1,ote(N9))}}function B9(e,t,n){var r=new GC;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var tLe=Wj("start","end","cancel","interrupt"),nLe=[],ate=0,$9=1,j3=2,bE=3,F9=4,U3=5,xE=6;function yA(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;rLe(e,n,{name:t,index:r,group:i,on:tLe,tween:nLe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ate})}function qj(e,t){var n=Dl(e,t);if(n.state>ate)throw new Error("too late; already scheduled");return n}function bc(e,t){var n=Dl(e,t);if(n.state>bE)throw new Error("too late; already running");return n}function Dl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function rLe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ste(o,0,n.time);function o(u){n.state=$9,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,h,p,g;if(n.state!==$9)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===bE)return B9(s);g.state===F9?(g.state=xE,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fj3&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function MLe(e,t,n){var r,i,o=OLe(t)?qj:bc;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function DLe(e,t){var n=this._id;return arguments.length<2?Dl(this.node(),n).on.on(e):this.each(MLe(n,e,t))}function LLe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function NLe(){return this.on("end.remove",LLe(this._id))}function BLe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Uj(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function lNe(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 ku(e,t,n){this.k=e,this.x=t,this.y=n}ku.prototype={constructor:ku,scale:function(e){return e===1?this:new ku(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ku(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 VC=new ku(1,0,0);ku.prototype;function EB(e){e.stopImmediatePropagation()}function zb(e){e.preventDefault(),e.stopImmediatePropagation()}function cNe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function uNe(){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 z9(){return this.__zoom||VC}function dNe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function fNe(){return navigator.maxTouchPoints||"ontouchstart"in this}function hNe(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 CB(){var e=cNe,t=uNe,n=hNe,r=dNe,i=fNe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=KDe,u=Wj("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function w(D){D.property("__zoom",z9).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(D,F,j,V){var W=D.selection?D.selection():D;W.property("__zoom",z9),D!==W?I(D,F,j,V):W.interrupt().each(function(){A(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},w.scaleBy=function(D,F,j,V){w.scaleTo(D,function(){var W=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return W*K},j,V)},w.scaleTo=function(D,F,j,V){w.transform(D,function(){var W=t.apply(this,arguments),K=this.__zoom,X=j==null?E(W):typeof j=="function"?j.apply(this,arguments):j,Q=K.invert(X),ie=typeof F=="function"?F.apply(this,arguments):F;return n(x(b(K,ie),X,Q),W,s)},j,V)},w.translateBy=function(D,F,j,V){w.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)},w.translateTo=function(D,F,j,V,W){w.transform(D,function(){var K=t.apply(this,arguments),X=this.__zoom,Q=V==null?E(K):typeof V=="function"?V.apply(this,arguments):V;return n(VC.translate(Q[0],Q[1]).scale(X.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,W)};function b(D,F){return F=Math.max(o[0],Math.min(o[1],F)),F===D.k?D:new ku(F,D.x,D.y)}function x(D,F,j){var V=F[0]-j[0]*D.k,W=F[1]-j[1]*D.k;return V===D.x&&W===D.y?D:new ku(D.k,V,W)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function I(D,F,j,V){D.on("start.zoom",function(){A(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(V).end()}).tween("zoom",function(){var W=this,K=arguments,X=A(W,K).event(V),Q=t.apply(W,K),ie=j==null?E(Q):typeof j=="function"?j.apply(W,K):j,ce=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),ue=W.__zoom,se=typeof F=="function"?F.apply(W,K):F,J=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=J(ae),he=ce/le[2];ae=new ku(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}X.zoom(null,ae)}})}function A(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=$o(this.that).datum();u.call(D,this.that,new lNe(D,{sourceEvent:this.sourceEvent,target:w,type:D,transform:this.that.__zoom,dispatch:u}),F)}};function O(D,...F){if(!e.apply(this,arguments))return;var j=A(this,F).event(D),V=this.__zoom,W=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=Gh(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===W)return;j.mouse=[K,V.invert(K)],wE(this),j.start()}zb(D),j.wheel=setTimeout(X,v),j.zoom("mouse",n(x(b(V,W),j.mouse[0],j.mouse[1]),j.extent,s));function X(){j.wheel=null,j.end()}}function L(D,...F){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=A(this,F,!0).event(D),W=$o(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=Gh(D,j),X=D.clientX,Q=D.clientY;SDe(D.view),EB(D),V.mouse=[K,this.__zoom.invert(K)],wE(this),V.start();function ie(ue){if(zb(ue),!V.moved){var se=ue.clientX-X,J=ue.clientY-Q;V.moved=se*se+J*J>y}V.event(ue).zoom("mouse",n(x(V.that.__zoom,V.mouse[0]=Gh(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){W.on("mousemove.zoom mouseup.zoom",null),EDe(ue.view,V.moved),zb(ue),V.event(ue).end()}}function N(D,...F){if(e.apply(this,arguments)){var j=this.__zoom,V=Gh(D.changedTouches?D.changedTouches[0]:D,this),W=j.invert(V),K=j.k*(D.shiftKey?.5:2),X=n(x(b(j,K),V,W),t.apply(this,F),s);zb(D),a>0?$o(this).transition().duration(a).call(I,X,V,D):$o(this).call(w.transform,X,V,D)}}function H(D,...F){if(e.apply(this,arguments)){var j=D.touches,V=j.length,W=A(this,F,D.changedTouches.length===V).event(D),K,X,Q,ie;for(EB(D),X=0;X"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(I,A){if(I===null)return null;if(A===0)return I;var k,O;if(typeof I!="object")return I;if(n(I,r))k=new r;else if(n(I,i))k=new i;else if(n(I,o))k=new o(function(V,W){I.then(function(K){V(E(K,A-1))},function(K){W(E(K,A-1))})});else if(s.__isArray(I))k=[];else if(s.__isRegExp(I))k=new RegExp(I.source,h(I)),I.lastIndex&&(k.lastIndex=I.lastIndex);else if(s.__isDate(I))k=new Date(I.getTime());else{if(x&&Buffer.isBuffer(I))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(I.length):k=new Buffer(I.length),I.copy(k),k;n(I,Error)?k=Object.create(I):typeof y>"u"?(O=Object.getPrototypeOf(I),k=Object.create(O)):(k=Object.create(y),O=y)}if(g){var L=w.indexOf(I);if(L!=-1)return b[L];w.push(I),b.push(k)}n(I,r)&&I.forEach(function(V,W){var K=E(W,A-1),X=E(V,A-1);k.set(K,X)}),n(I,i)&&I.forEach(function(V){var W=E(V,A-1);k.add(W)});for(var N in I){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(k[N]=E(I[N],A-1))}if(Object.getOwnPropertySymbols)for(var G=Object.getOwnPropertySymbols(I),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(qi[e[t+0]]+qi[e[t+1]]+qi[e[t+2]]+qi[e[t+3]]+"-"+qi[e[t+4]]+qi[e[t+5]]+"-"+qi[e[t+6]]+qi[e[t+7]]+"-"+qi[e[t+8]]+qi[e[t+9]]+"-"+qi[e[t+10]]+qi[e[t+11]]+qi[e[t+12]]+qi[e[t+13]]+qi[e[t+14]]+qi[e[t+15]]).toLowerCase();if(!yNe(n))throw TypeError("Stringified UUID is invalid");return n}function kB(e,t,n){e=e||{};var r=e.random||(e.rng||gNe)();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 bNe(r)}var H3={exports:{}},W3={exports:{}},xNe=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?de.createElement(VNe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),XNe=15,G9={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},YNe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:XNe,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},G9.title),e.name),de.createElement("text",{className:"rd3t-label__attributes"},e.attributes&&Object.entries(e.attributes).map(([o,s],a)=>de.createElement("tspan",Object.assign({key:`${o}-${a}`},G9.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let KNe=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:YNe,o={hierarchyPointNode:n,nodeDatum:t,toggleNode:this.handleNodeToggle,onNodeClick:this.handleOnClick,onNodeMouseOver:this.handleOnMouseOver,onNodeMouseOut:this.handleOnMouseOut,addChildren:this.handleAddChildren};return i(o)},this.handleNodeToggle=()=>{this.setState({wasClicked:!0}),this.props.onNodeToggle(this.props.data.__rd3t.id)},this.handleOnClick=t=>{this.setState({wasClicked:!0}),this.props.onNodeClick(this.props.hierarchyPointNode,t)},this.handleOnMouseOver=t=>{this.props.onNodeMouseOver(this.props.hierarchyPointNode,t)},this.handleOnMouseOut=t=>{this.props.onNodeMouseOut(this.props.hierarchyPointNode,t)},this.handleAddChildren=t=>{this.props.handleAddChildrenToNode(this.props.data.__rd3t.id,t)}}componentDidMount(){this.commitTransform()}componentDidUpdate(){this.state.wasClicked&&(this.props.centerNode(this.props.hierarchyPointNode),this.setState({wasClicked:!1})),this.commitTransform()}shouldComponentUpdate(t,n){return this.shouldNodeTransform(this.props,t,this.state,n)}setTransform(t,n,r,i=!1){if(i){const o=n!=null,s=o?n.x:0,a=o?n.y:0;return r==="horizontal"?`translate(${a},${s})`:`translate(${s},${a})`}return r==="horizontal"?`translate(${t.y},${t.x})`:`translate(${t.x},${t.y})`}applyTransform(t,n,r=1,i=()=>{}){this.props.enableLegacyTransitions?$o(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):($o(this.nodeRef).attr("transform",t).style("opacity",r),i())}commitTransform(){const{orientation:t,transitionDuration:n,position:r,parent:i}=this.props,o=this.setTransform(r,i,t);this.applyTransform(o,n)}componentWillLeave(t){const{orientation:n,transitionDuration:r,position:i,parent:o}=this.props,s=this.setTransform(i,o,n,!0);this.applyTransform(s,r,0,t)}render(){const{data:t,nodeClassName:n}=this.props;return 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 X3=Math.PI,Y3=2*X3,ip=1e-6,QNe=Y3-ip;function K3(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ete(){return new K3}K3.prototype=Ete.prototype={constructor:K3,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-e,c=r-t,u=o-e,f=s-t,h=u*u+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>ip)if(!(Math.abs(f*a-c*u)>ip)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-o,g=r-s,v=a*a+c*c,y=p*p+g*g,S=Math.sqrt(v),w=Math.sqrt(h),b=i*Math.tan((X3-Math.acos((v+h-y)/(2*S*w)))/2),x=b/w,E=b/S;Math.abs(x-1)>ip&&(this._+="L"+(e+x*u)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>u*g)+","+(this._x1=e+E*a)+","+(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),a=n*Math.sin(r),c=e+s,u=t+a,f=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+u:(Math.abs(this._x1-c)>ip||Math.abs(this._y1-u)>ip)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Y3+Y3),h>QNe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=u):h>ip&&(this._+="A"+n+","+n+",0,"+ +(h>=X3)+","+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 V9(e){return function(){return e}}function JNe(e){return e[0]}function ZNe(e){return e[1]}var eBe=Array.prototype.slice;function tBe(e){return e.source}function nBe(e){return e.target}function Cte(e){var t=tBe,n=nBe,r=JNe,i=ZNe,o=null;function s(){var a,c=eBe.call(arguments),u=t.apply(this,c),f=n.apply(this,c);if(o||(o=a=Ete()),e(o,+r.apply(this,(c[0]=u,c)),+i.apply(this,c),+r.apply(this,(c[0]=f,c)),+i.apply(this,c)),a)return o=null,a+""||null}return s.source=function(a){return arguments.length?(t=a,s):t},s.target=function(a){return arguments.length?(n=a,s):n},s.x=function(a){return arguments.length?(r=typeof a=="function"?a:V9(+a),s):r},s.y=function(a){return arguments.length?(i=typeof a=="function"?a:V9(+a),s):i},s.context=function(a){return arguments.length?(o=a??null,s):o},s}function rBe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function iBe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function oBe(){return Cte(rBe)}function sBe(){return Cte(iBe)}class aBe 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?$o(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):($o(this.linkRef).style("opacity",t),r())}drawStepPath(t,n){const{source:r,target:i}=t,o=i.y-r.y;return n==="horizontal"?`M${r.y},${r.x} H${r.y+o/2} V${i.x} H${i.y}`:`M${r.x},${r.y} V${r.y+o/2} H${i.x} V${i.y}`}drawDiagonalPath(t,n){const{source:r,target:i}=t;return n==="horizontal"?oBe()({source:[r.y,r.x],target:[i.y,i.x]}):sBe()({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 lBe=` -/* Tree */ -.rd3t-tree-container { - width: 100%; - height: 100%; -} - -.rd3t-grabbable { - cursor: move; /* fallback if grab cursor is unsupported */ - cursor: grab; - cursor: -moz-grab; - cursor: -webkit-grab; -} -.rd3t-grabbable:active { - cursor: grabbing; - cursor: -moz-grabbing; - cursor: -webkit-grabbing; -} - -/* Node */ -.rd3t-node { - cursor: pointer; - fill: #777; - stroke: #000; - stroke-width: 2; -} - -.rd3t-leaf-node { - cursor: pointer; - fill: transparent; - stroke: #000; - stroke-width: 1; -} - -.rd3t-label__title { - fill: #000; - stroke: none; - font-weight: bolder; -} - -.rd3t-label__attributes { - fill: #777; - stroke: none; - font-weight: bolder; - font-size: smaller; -} - -/* Link */ -.rd3t-link { - fill: none; - stroke: #000; -} -`;let Tte=class nl extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:nl.assignInternalProperties(Oo(this.props.data)),d3:nl.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${kB()}`,this.gInstanceRef=`rd3t-g-${kB()}`,this.handleNodeToggle=t=>{const n=Oo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(nl.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):nl.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=Oo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,a=Oo(n).map(c=>nl.assignInternalProperties([c],s+1));o.children.push(...a.flat()),this.setState({data:r})}},this.handleOnNodeClickCb=(t,n)=>{const{onNodeClick:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Oo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Oo(t),Oo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Oo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Oo(t),Oo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(Oo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(Oo(t),Oo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=$o(`.${this.gInstanceRef}`),a=$o(`.${this.svgInstanceRef}`),c=this.state.d3.scale;let u,f;r==="horizontal"?(f=-t.x*c+n.height/2,u=-t.y*c+n.width/2):(u=-t.x*c+n.width/2,f=-t.y*c+n.height/2),s.transition().duration(o).attr("transform","translate("+u+","+f+")scale("+c+")"),a.call(CB().transform,VC.translate(u,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:nl.assignInternalProperties(Oo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=nl.calculateD3Geometry(t);return qx(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}),(!qx(this.props.translate,t.translate)||!qx(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?Oo(this.internalState.targetNode):null,zoom:this.state.d3.scale,translate:this.state.d3.translate}),this.internalState.targetNode=null}setInitialTreeDepth(t,n){t.forEach(r=>{r.data.__rd3t.collapsed=r.depth>=n})}bindZoomListener(t){const{zoomable:n,scaleExtent:r,translate:i,zoom:o,onUpdate:s,hasInteractiveNodes:a}=t,c=$o(`.${this.svgInstanceRef}`),u=$o(`.${this.gInstanceRef}`);c.call(CB().transform,VC.translate(i.x,i.y).scale(o)),c.call(CB().scaleExtent(n?[r.min,r.max]:[o,o]).filter(f=>a?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)||(u.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=kB(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=nl.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=>{nl.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=>nl.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=zOe().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)(jj(this.state.data[0],h=>h.__rd3t.collapsed?null:h.children));let u=c.descendants();const f=c.links();return t!==void 0&&s&&this.setInitialTreeDepth(u,t),n&&u.forEach(h=>{h.y=h.depth*n}),{nodes:u,links:f}}static calculateD3Geometry(t){let n;return t.zoom>t.scaleExtent.max?n=t.scaleExtent.max:t.zoomde.createElement(aBe,{key:"link-"+b,orientation:i,pathFunc:o,pathClassFunc:g,linkData:w,onClick:this.handleOnLinkClickCb,onMouseOver:this.handleOnLinkMouseOverCb,onMouseOut:this.handleOnLinkMouseOutCb,enableLegacyTransitions:h,transitionDuration:s})),t.map((w,b)=>{const{data:x,x:E,y:I,parent:A}=w;return de.createElement(KNe,{key:"node-"+b,data:x,position:{x:E,y:I},hierarchyPointNode:w,parent:A,nodeClassName:this.getNodeClassName(A,x),renderCustomNodeElement:r,nodeSize:a,orientation:i,enableLegacyTransitions:h,transitionDuration:s,onNodeToggle:this.handleNodeToggle,onNodeClick:this.handleOnNodeClickCb,onNodeMouseOver:this.handleOnNodeMouseOverCb,onNodeMouseOut:this.handleOnNodeMouseOutCb,handleAddChildrenToNode:this.handleAddChildrenToNode,subscriptions:S,centerNode:this.centerNode})}))))}};Tte.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};function G1(){return G1=Object.assign||function(e){for(var t=1;tawait EBe(e),[e])}function TBe(e,t){const n=R.useMemo(()=>e,t);return CBe(n)}const kBe=C.jsx(Qu,{orientation:"vertical",flexItem:!0,sx:{m:1}}),ABe=Tte;function Ite(e,t=!1){const[n,r]=R.useState();return R.useEffect(()=>{t||e&&r(e)},[e,t]),n}const X9={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function IBe(){var w,b,x,E,I;const{palette:e}=Ln(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=qp(),s=QQ(((w=r==null?void 0:r.source)==null?void 0:w.step)??0,600),{controls:a,onChange:c,state:u}=wf(),[f,h]=R.useState("small"),p=A1({"&.rd3t-link":{stroke:kn(e.text.primary,e.action.disabledOpacity)}}),{result:g,loading:v}=TBe({trace:(x=(b=r==null?void 0:r.source)==null?void 0:b.trace)==null?void 0:x.content,step:s,radius:X9[f].value},[s,r,f]),y=Ite(g,v),S=R.useCallback(()=>p,[p]);return C.jsxs(zn,{onChange:c,stack:u,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:(I=(E=r==null?void 0:r.source)==null?void 0:E.trace)!=null&&I.content&&(y!=null&&y.tree)?C.jsx(nA,{children:({width:A,height:k})=>C.jsx(ht,{width:A,height:k,children:C.jsx(ABe,{scaleExtent:{max:10,min:.01},translate:{x:A/2,y:A/2},data:y.tree,dimensions:{width:A,height:k},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:O,onNodeClick:L})=>{var N;return C.jsx(RBe,{node:O,onClick:()=>L==null?void 0:L({}),step:(N=r==null?void 0:r.source)==null?void 0:N.step,onStep:H=>i(ka(r,G=>{te.set(G,"source.step",H)}))})}})})}):C.jsx(gp,{icon:C.jsx(UQ,{}),label:"Tree"})})})," ",C.jsxs(zn.Options,{children:[C.jsx(Vs,{icon:C.jsx(Tw,{}),label:"Layer",value:t,items:te.map(o,A=>({id:A.key,name:va(A)})),onChange:n,showArrow:!0}),kBe,C.jsx(Vs,{icon:C.jsx(ewe,{}),label:"Radius",value:f,onChange:A=>h(A),items:te.map(te.entries(X9),([A,k])=>({id:A,...k})),showArrow:!0})]}),C.jsx(zn.Extras,{children:a})]})}const jb=16,pu=4;function RBe({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=Ln(),a=te.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!te.find(t==null?void 0:t.events,h=>h.step===n),u=F1((f=a==null?void 0:a.data)==null?void 0:f.type);return C.jsx(im,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(bf,{title:`f: ${((p=a==null?void 0:a.data)==null?void 0:p.f)??"unknown"}, g: ${((g=a==null?void 0:a.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(-pu/2),x:o(-.25),strokeWidth:0,width:o(jb),height:o(pu),rx:s.borderRadius})}),C.jsx("rect",{y:o(-pu/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(jb),height:o(pu),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-pu/2),x:o(-.25),strokeWidth:0,fill:kn(i.primary.main,i.action.selectedOpacity),width:o(jb),height:o(pu),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-pu/2),height:o(pu),width:o(.5),fill:u,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(jb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(M1e,{width:o(2),height:o(2),x:o(jb-2-1),y:o(-pu/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(rm,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...Fw(h),children:C.jsx(Hk,{dense:!0,sx:{p:0},children:te.map(t==null?void 0:t.events,v=>C.jsx(Pu,{selected:v.step===n,sx:{borderLeft:`4px solid ${F1(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),te.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(Hz,{primary:te.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function PBe({selection:e,onClose:t}){const n=OBe(),r=Ite(e),{client:i}=e??{};return C.jsx(rm,{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(Hk,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=te.entries(o);return s.length?te.chain(s).sortBy(([,a])=>a.index).map(([,{items:a,primary:c}],u)=>C.jsxs(C.Fragment,{children:[!!u&&C.jsx(Qu,{sx:{my:1,mx:2}}),c&&C.jsx(Fx,{sx:{py:0},children:C.jsx(Ut,{color:"text.secondary",variant:"overline",children:c})}),te.chain(a).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(Pu,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Gd,{children:p}),C.jsx(oc,{primary:g,sx:{mr:4}}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(Fx,{children:[p&&C.jsx(Gd,{children:p}),C.jsx(oc,{primary:g,sx:{mr:4}}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(Fx,{children:C.jsx(Ut,{children:"No info to show."})})})}})})})}const Y9=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function OBe(){const[{layers:e}]=om();return R.useMemo(()=>te.chain(e).reduce((t,n)=>{var i;const r=((i=Ene(n))==null?void 0:i.getSelectionInfo)??Y9;return({children:o,event:s})=>C.jsx(r,{layer:n.key,event:s,children:a=>C.jsx(t,{event:s,children:c=>o==null?void 0:o(te.merge(a,c))})})},Y9).value(),[e])}const[xA,MBe]=vc([],{reduce:JQ}),DBe={tileSubdivision:1,workerCount:8,tileResolution:{width:te.round(256*devicePixelRatio),height:te.round(256*devicePixelRatio)}},Rte=R.createContext({});function LBe(){return R.useContext(Rte)}function NBe(e,{width:t,height:n}={}){const r=Ln(),[i]=xA(),o=R.useRef(null),[s,a]=R.useState(""),[c,u]=R.useState();return R.useEffect(()=>{if(a(""),o.current&&t&&n&&e){const f=te.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...DBe,screenSize:{width:t,height:n},backgroundColor:r.palette.background.paper,accentColor:r.palette.primary.main}),o.current.append(h.getView()),u(h),()=>{var p,g;try{(g=(p=o.current)==null?void 0:p.removeChild)==null||g.call(p,h.getView()),u(void 0)}catch(v){console.warn(v)}finally{h.destroy()}}}}},[o.current,te.map,e,i,r,a,u]),_we(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function BBe(){const[{map:e,specimen:t}]=fA();return!!(e||t)&&C.jsx(Ew,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function $Be({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:a}=NBe(n,{width:e,height:t}),[c,u]=R.useState();R.useEffect(()=>{if(o){const h=(p,g)=>{const v=p;u({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=R.useMemo(()=>({renderer:o}),[o]);return R.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(BBe,{}),C.jsx(Rte.Provider,{value:f,children:i!=null&&i.length?s?C.jsxs(ht,{sx:{display:"flex",flexDirection:"column",width:e,height:t,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[C.jsx(R1e,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(ht,{ref:a,children:i.map(h=>C.jsx(t3e,{layer:h},h.key))})}):C.jsx(gp,{icon:C.jsx(qQ,{}),label:"No layers to render",width:e,height:t})}),C.jsx(PBe,{selection:c,onClose:()=>u(void 0)})]})}function V1({nodes:e}){const{renderer:t}=LBe();return R.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function FBe({nodes:e,step:t}){const r=te.floor((t??0)/200)*200,i=R.useMemo(()=>te.slice(e,0,r),[e,r]),o=R.useMemo(()=>te.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(V1,{nodes:i}),C.jsx(V1,{nodes:o})]})}const wA=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,zBe=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class jBe extends Worker{constructor(){super(zBe,{type:"module"})}}const UBe=Ov(jBe),{floor:K9}=Math;function Q9(e,t,n){return e>=t&&e({...await UBe({map:e,options:t})}),{normalizer:JSON.stringify}),WBe=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,a]=[K9(r+o/2),K9(i+o/2)];if(Q9(s,0,t)&&Q9(a,0,n))return{x:s,y:a}},nodeAt:r=>{const{x:i,y:o}=r;return o*t+i},pointOf:r=>({x:r%t,y:~~(r/t)}),matchNode:wA}},GBe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:WBe,parse:HBe},Symbol.toStringTag,{value:"Module"})),VBe=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class qBe extends Worker{constructor(){super(VBe,{type:"module"})}}const XBe=Ov(qBe),YBe=Ef(async(e="",t)=>await XBe({map:e,options:t}),{normalizer:JSON.stringify}),KBe=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:wA}),QBe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:KBe,parse:YBe},Symbol.toStringTag,{value:"Module"})),JBe=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class ZBe extends Worker{constructor(){super(JBe,{type:"module"})}}const e$e=Ov(ZBe),t$e=Ef(async(e="",t)=>await e$e({map:e,options:t}),{normalizer:JSON.stringify}),n$e=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:wA}),r$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:n$e,parse:t$e},Symbol.toStringTag,{value:"Module"})),i$e=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class o$e extends Worker{constructor(){super(i$e,{type:"module"})}}const s$e=Ov(o$e),a$e=Ef(async(e="",t)=>await s$e({map:e,options:t}),{normalizer:JSON.stringify}),l$e=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:wA}),c$e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:l$e,parse:a$e},Symbol.toStringTag,{value:"Module"})),eU={grid:GBe,xy:r$e,mesh:QBe,poly:c$e};function tU(e=""){return eU[e]}const Pte=(e,t,n)=>{const r=R.useRef(n||[]),o=r.current===n||!r.current.every((a,c)=>a===n[c]);r.current=n;const s=t.map(()=>null);return R.useEffect(o?()=>void e():()=>{},o?t:s)};function u$e(e,t){return te.zip(e,t).every(([n,r])=>n===r)}const d$e=(e,t=[],n=[])=>{const[r,i]=R.useState(t),[o,s]=R.useState(n);return R.useEffect(()=>{u$e(o,n)||(i(t),s(n))},[t,n,o]),Ate(e,[...r,...o])};function nU(){const[e]=rv();return R.useCallback(t=>te.find(e,t),[e])}function f$e(e){return nU()({url:e})}function h$e(e){const t=Ol(),n=sm("map"),r=nU(),i=R.useMemo(()=>Ef(async({source:c,id:u}={})=>{if(c&&u){const f=r({url:c});if(f){t("Fetching map...");const h=await f.call("features/map",{id:u});return h==null?void 0:h.content}}},{normalizer:JSON.stringify}),[r,t]),{content:o,source:s,id:a}=e??{};return Gw(()=>n(async()=>{if(a)return{...e,content:o||await i({source:s,id:a})}}),[i,o,s,a])}function p$e(e){const t=Ol(),n=Ln(),r=sm("map"),{format:i,content:o}=e??{};return Gw(()=>r(async()=>{var a,c;const s=n.palette.mode==="dark"?wv:xv;if(i&&o){t("Processing map...");const u=await((c=(a=tU(i))==null?void 0:a.parse)==null?void 0:c.call(a,o,{color:s(n.palette.background.paper,1-n.palette.action.hoverOpacity)}))??{nodes:[]};return t("Map loaded",`${u.nodes.length} elements, ${u.log.join(", ")}`),u}}),[i,o,n])}const Ote=({label:e})=>C.jsx(Ut,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),m$e=({label:e})=>C.jsx(Ut,{variant:"body1",children:e}),q1=({label:e,content:t})=>C.jsxs(En,{alignItems:"center",children:[C.jsx(m$e,{label:e}),C.jsx(li,{flex:1}),t]}),g$e={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${te.startCase(e.source.map.format)})`:"Untitled Map"},editor:Zg(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(q1,{label:"Source",content:C.jsx(mOe,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>te.set(i,"source.map",r))})})})}),renderer:({layer:e})=>{var r;const{nodes:t}=((r=e==null?void 0:e.source)==null?void 0:r.parsedMap)??{},n=R.useMemo(()=>[t??[]],[t]);return C.jsx(V1,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Zg(({value:e,produce:t})=>{var i;const{result:n}=h$e((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=p$e(n);return Pte(()=>void t(o=>te.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=qp(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:a,node:c}=R.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=tU((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]),u=R.useMemo(()=>({...r&&a&&!te.isUndefined(c)&&{[r.key]:{primary:va(r),items:{point:{primary:"Point",secondary:`(${te.round(a.x,2)}, ${te.round(a.y,2)})`}}}}}),[a,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(u)})}};var IB=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Mo,_E,v$e={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},ud;function RB(e){return IB.lastIndex=0,IB.test(e)?'"'+e.replace(IB,function(t){var n=v$e[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function SE(e,t,n){var r,i,o,s,a=Mo,c,u=t[e];switch(u&&typeof u=="object"&&typeof u.toJSON=="function"&&(u=u.toJSON(e)),typeof ud=="function"&&(u=ud.call(t,e,u)),typeof u){case"string":return RB(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(Mo+=_E,c=[],Object.prototype.toString.apply(u)==="[object Array]"){for(s=u.length,r=0;rn?`[ -`+Mo+c.join(`, -`+Mo)+` -`+a+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",Mo=a,o}if(ud&&typeof ud=="object")for(s=ud.length,r=0;rn?`{ -`+Mo+c.join(`, -`+Mo)+` -`+a+"}":"{ "+c.join(", ")+" }":"{"+c.join(",")+"}",Mo=a,o}}function y$e(e,t,n,r){var i;if(Mo="",_E="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function EE(e,t,n){return Dte()?EE=Reflect.construct:EE=function(i,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(i,a),u=new c;return s&&X1(u,s.prototype),u},EE.apply(null,arguments)}function w$e(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Q3(e){var t=typeof Map=="function"?new Map:void 0;return Q3=function(r){if(r===null||!w$e(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return EE(r,arguments,oo(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),X1(i,r)},Q3(e)}function ua(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lte(e,t){return t&&(typeof t=="object"||typeof t=="function")?t:ua(e)}function ar(e){var t=Dte();return function(){var r=oo(e),i;if(t){var o=oo(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Lte(this,i)}}function _$e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=oo(e),e!==null););return e}function ls(e,t,n){return typeof Reflect<"u"&&Reflect.get?ls=Reflect.get:ls=function(i,o,s){var a=_$e(i,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(s):c.value}},ls(e,t,n||e)}function Vw(e,t){return Nte(e)||E$e(e,t)||rU(e,t)||Bte()}function Ub(e){return Nte(e)||S$e(e)||rU(e)||Bte()}function Nte(e){if(Array.isArray(e))return e}function S$e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function E$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](),a;!(r=(a=s.next()).done)&&(n.push(a.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 rU(e,t){if(e){if(typeof e=="string")return Z9(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 Z9(e,t)}}function Z9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=rU(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}var ni={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Se={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},CE="tag:yaml.org,2002:",Pd={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function e7(e){for(var t=[0],n=e.indexOf(` -`);n!==-1;)n+=1,t.push(n),n=e.indexOf(` -`,n);return t}function $te(e){var t,n;return typeof e=="string"?(t=e7(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=e7(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function J3(e,t){if(typeof e!="number"||e<0)return null;var n=$te(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],s=r[e];s&&s>o&&i[s-1]===` -`;)--s;return i.slice(o,s)}function T$e(e,t){var n=e.start,r=e.end,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:80,o=C$e(n.line,t);if(!o)return null;var s=n.col;if(o.length>i)if(s<=i-10)o=o.substr(0,i-1)+"…";else{var a=Math.round(i/2);o.length>s+a&&(o=o.substr(0,s+a-1)+"…"),s-=o.length-i,o="…"+o.substr(1-i)}var c=1,u="";r&&(r.line===n.line&&s+(r.col-n.col)<=i+1?c=r.col-n.col:(c=Math.min(o.length+1,i)-s,u="…"));var f=s>1?" ".repeat(s-1):"",h="^".repeat(c);return"".concat(o,` -`).concat(f).concat(h).concat(u)}var Er=function(){function e(t,n){xn(this,e),this.start=t,this.end=n||t}return Yn(e,[{key:"isEmpty",value:function(){return typeof this.start!="number"||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(n,r){var i=this.start,o=this.end;if(n.length===0||o<=n[0])return this.origStart=i,this.origEnd=o,r;for(var s=r;si);)++s;this.origStart=i+s;for(var a=s;s=o);)++s;return this.origEnd=o+s,a}}],[{key:"copy",value:function(n){return new e(n.start,n.end)}}]),e}(),Qe=function(){function e(t,n,r){xn(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return Yn(e,[{key:"getPropValue",value:function(n,r,i){if(!this.context)return null;var o=this.context.src,s=this.props[n];return s&&o[s.start]===r?o.slice(s.start+(i?1:0),s.end):null}},{key:"anchor",get:function(){for(var n=0;n0?n.join(` -`):null}},{key:"commentHasRequiredWhitespace",value:function(n){var r=this.context.src;if(this.header&&n===this.header.end||!this.valueRange)return!1;var i=this.valueRange.end;return n!==i||e.atBlank(r,i-1)}},{key:"hasComment",get:function(){if(this.context){for(var n=this.context.src,r=0;r=n.length||n[o]===` -`?i+` -`:i}},{key:"atDocumentBoundary",value:function(n,r,i){var o=n[r];if(!o)return!0;var s=n[r-1];if(s&&s!==` -`)return!1;if(i){if(o!==i)return!1}else if(o!==ni.DIRECTIVES_END&&o!==ni.DOCUMENT_END)return!1;var a=n[r+1],c=n[r+2];if(a!==o||c!==o)return!1;var u=n[r+3];return!u||u===` -`||u===" "||u===" "}},{key:"endOfIdentifier",value:function(n,r){for(var i=n[r],o=i==="<",s=o?[` -`," "," ",">"]:[` -`," "," ","[","]","{","}",","];i&&s.indexOf(i)===-1;)i=n[r+=1];return o&&i===">"&&(r+=1),r}},{key:"endOfIndent",value:function(n,r){for(var i=n[r];i===" ";)i=n[r+=1];return r}},{key:"endOfLine",value:function(n,r){for(var i=n[r];i&&i!==` -`;)i=n[r+=1];return r}},{key:"endOfWhiteSpace",value:function(n,r){for(var i=n[r];i===" "||i===" ";)i=n[r+=1];return r}},{key:"startOfLine",value:function(n,r){var i=n[r-1];if(i===` -`)return r;for(;i&&i!==` -`;)i=n[r-=1];return r+1}},{key:"endOfBlockIndent",value:function(n,r,i){var o=e.endOfIndent(n,i);if(o>i+r)return o;var s=e.endOfWhiteSpace(n,o),a=n[s];return!a||a===` -`?s:null}},{key:"atBlank",value:function(n,r,i){var o=n[r];return o===` -`||o===" "||o===" "||i&&!o}},{key:"nextNodeIsIndented",value:function(n,r,i){return!n||r<0?!1:r>0?!0:i&&n==="-"}},{key:"normalizeOffset",value:function(n,r){var i=n[r];return i?i!==` -`&&n[r-1]===` -`?r-1:e.endOfWhiteSpace(n,r):r}},{key:"foldNewline",value:function(n,r,i){for(var o=0,s=!1,a="",c=n[r+1];c===" "||c===" "||c===` -`;){switch(c){case` -`:o=0,r+=1,a+=` -`;break;case" ":o<=i&&(s=!0),r=e.endOfWhiteSpace(n,r+2)-1;break;case" ":o+=1,r+=1;break}c=n[r+1]}return a||(a=" "),c&&o<=i&&(s=!0),{fold:a,offset:r,error:s}}}]),e}(),sv=function(e){sr(n,e);var t=ar(n);function n(r,i,o){var s;if(xn(this,n),!o||!(i instanceof Qe))throw new Error("Invalid arguments for new ".concat(r));return s=t.call(this),s.name=r,s.message=o,s.source=i,s}return Yn(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var i=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Er(this.offset,this.offset+1);var o=i&&J3(this.offset,i);if(o){var s={line:o.line,col:o.col+1};this.linePos={start:o,end:s}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var a=this.linePos.start,c=a.line,u=a.col;this.message+=" at line ".concat(c,", column ").concat(u);var f=i&&T$e(this.linePos,i);f&&(this.message+=`: - -`.concat(f,` -`))}delete this.source}}}]),n}(Q3(Error)),Y1=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLReferenceError",r,i)}return n}(sv),Jt=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLSemanticError",r,i)}return n}(sv),go=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLSyntaxError",r,i)}return n}(sv),Dv=function(e){sr(n,e);var t=ar(n);function n(r,i){return xn(this,n),t.call(this,"YAMLWarning",r,i)}return n}(sv),Fte=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var i=this.valueRange,o=i.start,s=i.end,a=this.context.src,c=a[s-1];oy?a.slice(y,f+1):h)}else u+=h}var w=a[o];switch(w){case" ":{var b="Plain value cannot start with a tab character",x=[new Jt(this,b)];return{errors:x,str:u}}case"@":case"`":{var E="Plain value cannot start with reserved character ".concat(w),I=[new Jt(this,E)];return{errors:I,str:u}}default:return u}}},{key:"parseBlockValue",value:function(i){for(var o=this.context,s=o.indent,a=o.inFlow,c=o.src,u=i,f=i,h=c[u];h===` -`&&!Qe.atDocumentBoundary(c,u+1);h=c[u]){var p=Qe.endOfBlockIndent(c,s,u+1);if(p===null||c[p]==="#")break;c[p]===` -`?u=p:(f=n.endOfLine(c,p,a),u=f)}return this.valueRange.isEmpty()&&(this.valueRange.start=i),this.valueRange.end=f,f}},{key:"parse",value:function(i,o){this.context=i;var s=i.inFlow,a=i.src,c=o,u=a[c];return u&&u!=="#"&&u!==` -`&&(c=n.endOfLine(a,o,s)),this.valueRange=new Er(o,c),c=Qe.endOfWhiteSpace(a,c),c=this.parseComment(c),(!this.hasComment||this.valueRange.isEmpty())&&(c=this.parseBlockValue(c)),c}}],[{key:"endOfLine",value:function(i,o,s){for(var a=i[o],c=o;a&&a!==` -`&&!(s&&(a==="["||a==="]"||a==="{"||a==="}"||a===","));){var u=i[c+1];if(a===":"&&(!u||u===` -`||u===" "||u===" "||s&&u===",")||(a===" "||a===" ")&&u==="#")break;c+=1,a=u}return c}}]),n}(Qe),K1=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.BLANK_LINE)}return Yn(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(i,o){return this.context=i,this.range=new Er(o,o+1),o+1}}]),n}(Qe),iU=function(e){sr(n,e);var t=ar(n);function n(r,i){var o;return xn(this,n),o=t.call(this,r,i),o.node=null,o}return Yn(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,c=i.atLineStart,u=i.lineStart;!c&&this.type===Se.SEQ_ITEM&&(this.error=new Jt(this,"Sequence items must not have preceding content on the same line"));for(var f=c?o-u:i.indent,h=Qe.endOfWhiteSpace(a,o+1),p=a[h],g=p==="#",v=[],y=null;p===` -`||p==="#";){if(p==="#"){var S=Qe.endOfLine(a,h+1);v.push(new Er(h,S)),h=S}else{c=!0,u=h+1;var w=Qe.endOfWhiteSpace(a,u);a[w]===` -`&&v.length===0&&(y=new K1,u=y.parse({src:a},u)),h=Qe.endOfIndent(a,u)}p=a[h]}if(Qe.nextNodeIsIndented(p,h-(u+f),this.type!==Se.SEQ_ITEM)?this.node=s({atLineStart:c,inCollection:!1,indent:f,lineStart:u,parent:this},h):p&&u>o+1&&(h=u-1),this.node){if(y){var b=i.parent.items||i.parent.contents;b&&b.push(y)}v.length&&Array.prototype.push.apply(this.props,v),h=this.node.range.end}else if(g){var x=v[0];this.props.push(x),h=x.end}else h=Qe.endOfLine(a,o+1);var E=this.node?this.node.valueRange.end:h;return this.valueRange=new Er(o,E),h}},{key:"setOrigRanges",value:function(i,o){return o=ls(oo(n.prototype),"setOrigRanges",this).call(this,i,o),this.node?this.node.setOrigRanges(i,o):o}},{key:"toString",value:function(){var i=this.context.src,o=this.node,s=this.range,a=this.value;if(a!=null)return a;var c=o?i.slice(s.start,o.range.start)+String(o):i.slice(s.start,s.end);return Qe.addStringTerminator(i,s.end,c)}}]),n}(Qe),Xx=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.call(this,Se.COMMENT)}return Yn(n,[{key:"parse",value:function(i,o){this.context=i;var s=this.parseComment(o);return this.range=new Er(o,s),s}}]),n}(Qe);function Z3(e){for(var t=e;t instanceof iU;)t=t.node;if(!(t instanceof zte))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===Se.COMMENT){var s=o.context,a=s.indent,c=s.lineStart;if(a>0&&o.range.start>=c+a)break;r=i}else if(o.type===Se.BLANK_LINE)r=i;else break}if(r===-1)return null;for(var u=t.items.splice(r,n-r),f=u[0].range.start;t.range.end=f,t.valueRange&&t.valueRange.end>f&&(t.valueRange.end=f),t!==e;)t=t.context.parent;return u}var zte=function(e){sr(n,e);var t=ar(n);function n(r){var i;xn(this,n),i=t.call(this,r.type===Se.SEQ_ITEM?Se.SEQ:Se.MAP);for(var o=r.props.length-1;o>=0;--o)if(r.props[o].start0}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,c=Qe.startOfLine(a,o),u=this.items[0];u.context.parent=this,this.valueRange=Er.copy(u.valueRange);var f=u.range.start-u.context.lineStart,h=o;h=Qe.normalizeOffset(a,h);for(var p=a[h],g=Qe.endOfWhiteSpace(a,c)===h,v=!1;p;){for(;p===` -`||p==="#";){if(g&&p===` -`&&!v){var y=new K1;if(h=y.parse({src:a},h),this.valueRange.end=h,h>=a.length){p=null;break}this.items.push(y),h-=1}else if(p==="#"){if(h=a.length){p=null;break}}if(c=h+1,h=Qe.endOfIndent(a,c),Qe.atBlank(a,h)){var w=Qe.endOfWhiteSpace(a,h),b=a[w];(!b||b===` -`||b==="#")&&(h=w)}p=a[h],g=!0}if(!p)break;if(h!==c+f&&(g||p!==":")){if(ho&&(h=c);break}else if(!this.error){var x="All collection items must start at the same column";this.error=new go(this,x)}}if(u.type===Se.SEQ_ITEM){if(p!=="-"){c>o&&(h=c);break}}else if(p==="-"&&!this.error){var E=a[h+1];if(!E||E===` -`||E===" "||E===" "){var I="A collection cannot be both a mapping and a sequence";this.error=new go(this,I)}}var A=s({atLineStart:g,inCollection:!0,indent:f,lineStart:c,parent:this},h);if(!A)return h;if(this.items.push(A),this.valueRange.end=A.valueRange.end,h=Qe.normalizeOffset(a,A.range.end),p=a[h],g=!1,v=A.includesTrailingLines,p){for(var k=h-1,O=a[k];O===" "||O===" ";)O=a[--k];O===` -`&&(c=k+1,g=!0)}var L=Z3(A);L&&Array.prototype.push.apply(this.items,L)}return h}},{key:"setOrigRanges",value:function(i,o){return o=ls(oo(n.prototype),"setOrigRanges",this).call(this,i,o),this.items.forEach(function(s){o=s.setOrigRanges(i,o)}),o}},{key:"toString",value:function(){var i=this.context.src,o=this.items,s=this.range,a=this.value;if(a!=null)return a;for(var c=i.slice(s.start,o[0].range.start)+String(o[0]),u=1;u=a+s?!0:c!=="#"&&c!==` -`?!1:n.nextContentHasIndent(i,o,s):!1}}]),n}(Qe),k$e=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this,Se.DIRECTIVE),r.name=null,r}return Yn(n,[{key:"parameters",get:function(){var i=this.rawValue;return i?i.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(i){for(var o=this.context.src,s=i,a=o[s];a&&a!==` -`&&a!==" "&&a!==" ";)a=o[s+=1];return this.name=o.slice(i,s),s}},{key:"parseParameters",value:function(i){for(var o=this.context.src,s=i,a=o[s];a&&a!==` -`&&a!=="#";)a=o[s+=1];return this.valueRange=new Er(i,s),s}},{key:"parse",value:function(i,o){this.context=i;var s=this.parseName(o+1);return s=this.parseParameters(s),s=this.parseComment(s),this.range=new Er(o,s),s}}]),n}(Qe),A$e=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this,Se.DOCUMENT),r.directives=null,r.contents=null,r.directivesEndMarker=null,r.documentEndMarker=null,r}return Yn(n,[{key:"parseDirectives",value:function(i){var o=this.context.src;this.directives=[];for(var s=!0,a=!1,c=i;!Qe.atDocumentBoundary(o,c,ni.DIRECTIVES_END);)switch(c=n.startCommentOrEndBlankLine(o,c),o[c]){case` -`:if(s){var u=new K1;c=u.parse({src:o},c),c0&&(this.contents=this.directives,this.directives=[]),c}return o[c]?(this.directivesEndMarker=new Er(c,c+3),c+3):(a?this.error=new Jt(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),c)}},{key:"parseContents",value:function(i){var o=this.context,s=o.parseNode,a=o.src;this.contents||(this.contents=[]);for(var c=i;a[c-1]==="-";)c-=1;var u=Qe.endOfWhiteSpace(a,i),f=c===i;for(this.valueRange=new Er(u);!Qe.atDocumentBoundary(a,u,ni.DOCUMENT_END);){switch(a[u]){case` -`:if(f){var h=new K1;u=h.parse({src:a},u),u0&&((o.length>0||i[0].type===Se.COMMENT)&&(a+=`--- -`),a+=i.join("")),a[a.length-1]!==` -`&&(a+=` -`),a}}],[{key:"startCommentOrEndBlankLine",value:function(i,o){var s=Qe.endOfWhiteSpace(i,o),a=i[s];return a==="#"||a===` -`?s:o}}]),n}(Qe),I$e=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=Qe.endOfIdentifier(s,o+1);return this.valueRange=new Er(o+1,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}]),n}(Qe),sd={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},R$e=function(e){sr(n,e);var t=ar(n);function n(r,i){var o;return xn(this,n),o=t.call(this,r,i),o.blockIndent=null,o.chomping=sd.CLIP,o.header=null,o}return Yn(n,[{key:"includesTrailingLines",get:function(){return this.chomping===sd.KEEP}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var i=this.valueRange,o=i.start,s=i.end,a=this.context,c=a.indent,u=a.src;if(this.valueRange.isEmpty())return"";for(var f=null,h=u[s-1];h===` -`||h===" "||h===" ";){if(s-=1,s<=o){if(this.chomping===sd.KEEP)break;return""}h===` -`&&(f=s),h=u[s-1]}var p=s+1;f&&(this.chomping===sd.KEEP?(p=f,s=this.valueRange.end):s=f);for(var g=c+this.blockIndent,v=this.type===Se.BLOCK_FOLDED,y=!0,S="",w="",b=!1,x=o;xh&&(h=y);a[g]===` -`?u=g:u=f=Qe.endOfLine(a,g)}return this.chomping!==sd.KEEP&&(u=a[f]?f+1:f),this.valueRange=new Er(i+1,u),u}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=this.parseBlockHeader(o);return a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a=this.parseBlockValue(a),a}},{key:"setOrigRanges",value:function(i,o){return o=ls(oo(n.prototype),"setOrigRanges",this).call(this,i,o),this.header?this.header.setOrigRange(i,o):o}}]),n}(Qe),P$e=function(e){sr(n,e);var t=ar(n);function n(r,i){var o;return xn(this,n),o=t.call(this,r,i),o.items=null,o}return Yn(n,[{key:"prevNodeIsJsonLike",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.items.length,o=this.items[i-1];return!!o&&(o.jsonLike||o.type===Se.COMMENT&&this.prevNodeIsJsonLike(i-1))}},{key:"parse",value:function(i,o){this.context=i;var s=i.parseNode,a=i.src,c=i.indent,u=i.lineStart,f=a[o];this.items=[{char:f,offset:o}];var h=Qe.endOfWhiteSpace(a,o+1);for(f=a[h];f&&f!=="]"&&f!=="}";){switch(f){case` -`:{u=h+1;var p=Qe.endOfWhiteSpace(a,u);if(a[p]===` -`){var g=new K1;u=g.parse({src:a},u),this.items.push(g)}if(h=Qe.endOfIndent(a,u),h<=u+c&&(f=a[h],hs.offset);)++a;s.origOffset=s.offset+a,o=a}}),o}},{key:"toString",value:function(){var i=this.context.src,o=this.items,s=this.range,a=this.value;if(a!=null)return a;var c=o.filter(function(h){return h instanceof Qe}),u="",f=s.start;return c.forEach(function(h){var p=i.slice(f,h.range.start);f=h.range.end,u+=p+String(h),u[u.length-1]===` -`&&i[f-1]!==` -`&&i[f]===` -`&&(f+=1)}),u+=i.slice(f,s.end),Qe.addStringTerminator(i,s.end,u)}}]),n}(Qe),O$e=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var i=[],o=this.valueRange,s=o.start,a=o.end,c=this.context,u=c.indent,f=c.src;f[a-1]!=='"'&&i.push(new go(this,'Missing closing "quote'));for(var h="",p=s+1;pb?f.slice(b,p+1):g)}else h+=g}return i.length>0?{errors:i,str:h}:h}},{key:"parseCharCode",value:function(i,o,s){var a=this.context.src,c=a.substr(i,o),u=c.length===o&&/^[0-9a-fA-F]+$/.test(c),f=u?parseInt(c,16):NaN;return isNaN(f)?(s.push(new go(this,"Invalid escape sequence ".concat(a.substr(i-2,o+2)))),a.substr(i-2,o+2)):String.fromCodePoint(f)}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=n.endOfQuote(s,o+1);return this.valueRange=new Er(o,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}],[{key:"endOfQuote",value:function(i,o){for(var s=i[o];s&&s!=='"';)o+=s==="\\"?2:1,s=i[o];return o+1}}]),n}(Qe),M$e=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var i=[],o=this.valueRange,s=o.start,a=o.end,c=this.context,u=c.indent,f=c.src;f[a-1]!=="'"&&i.push(new go(this,"Missing closing 'quote"));for(var h="",p=s+1;pb?f.slice(b,p+1):g)}else h+=g}return i.length>0?{errors:i,str:h}:h}},{key:"parse",value:function(i,o){this.context=i;var s=i.src,a=n.endOfQuote(s,o+1);return this.valueRange=new Er(o,a),a=Qe.endOfWhiteSpace(s,a),a=this.parseComment(a),a}}],[{key:"endOfQuote",value:function(i,o){for(var s=i[o];s;)if(s==="'"){if(i[o+1]!=="'")break;s=i[o+=2]}else s=i[o+=1];return o+1}}]),n}(Qe);function D$e(e,t){switch(e){case Se.ALIAS:return new I$e(e,t);case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return new R$e(e,t);case Se.FLOW_MAP:case Se.FLOW_SEQ:return new P$e(e,t);case Se.MAP_KEY:case Se.MAP_VALUE:case Se.SEQ_ITEM:return new iU(e,t);case Se.COMMENT:case Se.PLAIN:return new Fte(e,t);case Se.QUOTE_DOUBLE:return new O$e(e,t);case Se.QUOTE_SINGLE:return new M$e(e,t);default:return null}}var L$e=function(){function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.atLineStart,o=r.inCollection,s=r.inFlow,a=r.indent,c=r.lineStart,u=r.parent;xn(this,e),ho(this,"parseNode",function(f,h){if(Qe.atDocumentBoundary(t.src,h))return null;var p=new e(t,f),g=p.parseProps(h),v=g.props,y=g.type,S=g.valueStart,w=D$e(y,v),b=w.parse(p,S);if(w.range=new Er(h,b),b<=h&&(w.error=new Error("Node#parse consumed no characters"),w.error.parseEnd=b,w.error.source=w,w.range.end=h+1),p.nodeStartsCollection(w)){!w.error&&!p.atLineStart&&p.parent.type===Se.DOCUMENT&&(w.error=new go(w,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var x=new zte(w);return b=x.parse(new e(p),b),x.range=new Er(h,b),x}return w}),this.atLineStart=i??(n.atLineStart||!1),this.inCollection=o??(n.inCollection||!1),this.inFlow=s??(n.inFlow||!1),this.indent=a??n.indent,this.lineStart=c??n.lineStart,this.parent=u??(n.parent||{}),this.root=n.root,this.src=n.src}return Yn(e,[{key:"nodeStartsCollection",value:function(n){var r=this.inCollection,i=this.inFlow,o=this.src;if(r||i)return!1;if(n instanceof iU)return!0;var s=n.range.end;return o[s]===` -`||o[s-1]===` -`?!1:(s=Qe.endOfWhiteSpace(o,s),o[s]===":")}},{key:"parseProps",value:function(n){var r=this.inFlow,i=this.parent,o=this.src,s=[],a=!1;n=this.atLineStart?Qe.endOfIndent(o,n):Qe.endOfWhiteSpace(o,n);for(var c=o[n];c===ni.ANCHOR||c===ni.COMMENT||c===ni.TAG||c===` -`;){if(c===` -`){var u=n,f=void 0;do f=u+1,u=Qe.endOfIndent(o,f);while(o[u]===` -`);var h=u-(f+this.indent),p=i.type===Se.SEQ_ITEM&&i.context.atLineStart;if(o[u]!=="#"&&!Qe.nextNodeIsIndented(o[u],h,!p))break;this.atLineStart=!0,this.lineStart=f,a=!1,n=u}else if(c===ni.COMMENT){var g=Qe.endOfLine(o,n+1);s.push(new Er(n,g)),n=g}else{var v=Qe.endOfIdentifier(o,n+1);c===ni.TAG&&o[v]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(o.slice(n+1,v+13))&&(v=Qe.endOfIdentifier(o,v+5)),s.push(new Er(n,v)),a=!0,n=Qe.endOfWhiteSpace(o,v)}c=o[n]}a&&c===":"&&Qe.atBlank(o,n+1,!0)&&(n-=1);var y=e.parseType(o,n,r);return{props:s,type:y,valueStart:n}}}],[{key:"parseType",value:function(n,r,i){switch(n[r]){case"*":return Se.ALIAS;case">":return Se.BLOCK_FOLDED;case"|":return Se.BLOCK_LITERAL;case"{":return Se.FLOW_MAP;case"[":return Se.FLOW_SEQ;case"?":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_KEY:Se.PLAIN;case":":return!i&&Qe.atBlank(n,r+1,!0)?Se.MAP_VALUE:Se.PLAIN;case"-":return!i&&Qe.atBlank(n,r+1,!0)?Se.SEQ_ITEM:Se.PLAIN;case'"':return Se.QUOTE_DOUBLE;case"'":return Se.QUOTE_SINGLE;default:return Se.PLAIN}}}]),e}();function oU(e){var t=[];e.indexOf("\r")!==-1&&(e=e.replace(/\r\n?/g,function(s,a){return s.length>1&&t.push(a),` -`}));var n=[],r=0;do{var i=new A$e,o=new L$e({src:e});r=i.parse(o,r),n.push(i)}while(r=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var s=[];s[o]=r,r=s}else{var a={};Object.defineProperty(a,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=a}}return e.createNode(r,!1)}var hx=function(t){return t==null||Ys(t)==="object"&&t[Symbol.iterator]().next().done},to=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),ho(ua(i),"items",[]),i.schema=r,i}return Yn(n,[{key:"addIn",value:function(i,o){if(hx(i))this.add(o);else{var s=Ub(i),a=s[0],c=s.slice(1),u=this.get(a,!0);if(u instanceof n)u.addIn(c,o);else if(u===void 0&&this.schema)this.set(a,t7(this.schema,c,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(c))}}},{key:"deleteIn",value:function(i){var o=Ub(i),s=o[0],a=o.slice(1);if(a.length===0)return this.delete(s);var c=this.get(s,!0);if(c instanceof n)return c.deleteIn(a);throw new Error("Expected YAML collection at ".concat(s,". Remaining path: ").concat(a))}},{key:"getIn",value:function(i,o){var s=Ub(i),a=s[0],c=s.slice(1),u=this.get(a,!0);return c.length===0?!o&&u instanceof Un?u.value:u:u instanceof n?u.getIn(c,o):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every(function(i){if(!i||i.type!=="PAIR")return!1;var o=i.value;return o==null||o instanceof Un&&o.value==null&&!o.commentBefore&&!o.comment&&!o.tag})}},{key:"hasIn",value:function(i){var o=Ub(i),s=o[0],a=o.slice(1);if(a.length===0)return this.has(s);var c=this.get(s,!0);return c instanceof n?c.hasIn(a):!1}},{key:"setIn",value:function(i,o){var s=Ub(i),a=s[0],c=s.slice(1);if(c.length===0)this.set(a,o);else{var u=this.get(a,!0);if(u instanceof n)u.setIn(c,o);else if(u===void 0&&this.schema)this.set(a,t7(this.schema,c,o));else throw new Error("Expected YAML collection at ".concat(a,". Remaining path: ").concat(c))}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(i,o,s,a){var c=this,u=o.blockItem,f=o.flowChars,h=o.isMap,p=o.itemIndent,g=i,v=g.indent,y=g.indentStep,S=g.stringify,w=this.type===Se.FLOW_MAP||this.type===Se.FLOW_SEQ||i.inFlow;w&&(p+=y);var b=h&&this.hasAllNullValues();i=Object.assign({},i,{allNullValues:b,indent:p,inFlow:w,type:null});var x=!1,E=!1,I=this.items.reduce(function(V,W,K){var X;W&&(!x&&W.spaceBefore&&V.push({type:"comment",str:""}),W.commentBefore&&W.commentBefore.match(/^.*$/gm).forEach(function(ie){V.push({type:"comment",str:"#".concat(ie)})}),W.comment&&(X=W.comment),w&&(!x&&W.spaceBefore||W.commentBefore||W.comment||W.key&&(W.key.commentBefore||W.key.comment)||W.value&&(W.value.commentBefore||W.value.comment))&&(E=!0)),x=!1;var Q=S(W,i,function(){return X=null},function(){return x=!0});return w&&!E&&Q.includes(` -`)&&(E=!0),w&&Kn.maxFlowStringSingleLineLength){A=k;var N=ir(L),H;try{for(N.s();!(H=N.n()).done;){var G=H.value;A+=G?` -`.concat(y).concat(v).concat(G):` -`}}catch(V){N.e(V)}finally{N.f()}A+=` -`.concat(v).concat(O)}else A="".concat(k," ").concat(L.join(" ")," ").concat(O)}else{var z=I.map(u);A=z.shift();var D=ir(z),F;try{for(D.s();!(F=D.n()).done;){var j=F.value;A+=j?` -`.concat(v).concat(j):` -`}}catch(V){D.e(V)}finally{D.f()}}return this.comment?(A+=` -`+this.comment.replace(/^/gm,"".concat(v,"#")),s&&s()):x&&a&&a(),A}}]),n}(Qo);ho(to,"maxFlowStringSingleLineLength",60);function aS(e){var t=e instanceof Un?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}var ac=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i){this.items.push(i)}},{key:"delete",value:function(i){var o=aS(i);if(typeof o!="number")return!1;var s=this.items.splice(o,1);return s.length>0}},{key:"get",value:function(i,o){var s=aS(i);if(typeof s=="number"){var a=this.items[s];return!o&&a instanceof Un?a.value:a}}},{key:"has",value:function(i){var o=aS(i);return typeof o=="number"&&o1&&arguments[1]!==void 0?arguments[1]:null;return xn(this,n),i=t.call(this),i.key=r,i.value=o,i.type=n.Type.PAIR,i}return Yn(n,[{key:"commentBefore",get:function(){return this.key instanceof Qo?this.key.commentBefore:void 0},set:function(i){if(this.key==null&&(this.key=new Un(null)),this.key instanceof Qo)this.key.commentBefore=i;else{var o="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(o)}}},{key:"addToJSMap",value:function(i,o){var s=Sl(this.key,"",i);if(o instanceof Map){var a=Sl(this.value,s,i);o.set(s,a)}else if(o instanceof Set)o.add(s);else{var c=B$e(this.key,s,i),u=Sl(this.value,c,i);c in o?Object.defineProperty(o,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):o[c]=u}return o}},{key:"toJSON",value:function(i,o){var s=o&&o.mapAsMap?new Map:{};return this.addToJSMap(o,s)}},{key:"toString",value:function(i,o,s){if(!i||!i.doc)return JSON.stringify(this);var a=i.doc.options,c=a.indent,u=a.indentSeq,f=a.simpleKeys,h=this.key,p=this.value,g=h instanceof Qo&&h.comment;if(f){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(h instanceof to){var v="With simple keys, collection cannot be used as a key value";throw new Error(v)}}var y=!f&&(!h||g||(h instanceof Qo?h instanceof to||h.type===Se.BLOCK_FOLDED||h.type===Se.BLOCK_LITERAL:Ys(h)==="object")),S=i,w=S.doc,b=S.indent,x=S.indentStep,E=S.stringify;i=Object.assign({},i,{implicitKey:!y,indent:b+x});var I=!1,A=E(h,i,function(){return g=null},function(){return I=!0});if(A=cg(A,i.indent,g),!y&&A.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.allNullValues&&!f)return this.comment?(A=cg(A,i.indent,this.comment),o&&o()):I&&!g&&s&&s(),i.inFlow&&!y?A:"? ".concat(A);A=y?"? ".concat(A,` -`).concat(b,":"):"".concat(A,":"),this.comment&&(A=cg(A,i.indent,this.comment),o&&o());var k="",O=null;if(p instanceof Qo){if(p.spaceBefore&&(k=` -`),p.commentBefore){var L=p.commentBefore.replace(/^/gm,"".concat(i.indent,"#"));k+=` -`.concat(L)}O=p.comment}else p&&Ys(p)==="object"&&(p=w.schema.createNode(p,!0));i.implicitKey=!1,!y&&!this.comment&&p instanceof Un&&(i.indentAtStart=A.length+1),I=!1,!u&&c>=2&&!i.inFlow&&!y&&p instanceof ac&&p.type!==Se.FLOW_SEQ&&!p.tag&&!w.anchors.getName(p)&&(i.indent=i.indent.substr(2));var N=E(p,i,function(){return O=null},function(){return I=!0}),H=" ";if(k||this.comment)H="".concat(k,` -`).concat(i.indent);else if(!y&&p instanceof to){var G=N[0]==="["||N[0]==="{";(!G||N.includes(` -`))&&(H=` -`.concat(i.indent))}else N[0]===` -`&&(H="");return I&&!O&&s&&s(),cg(A+H+N,i.indent,O)}}]),n}(Qo);ho(vn,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var $$e=function e(t,n){if(t instanceof Wu){var r=n.get(t.source);return r.count*r.aliasCount}else if(t instanceof to){var i=0,o=ir(t.items),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,c=e(a,n);c>i&&(i=c)}}catch(h){o.e(h)}finally{o.f()}return i}else if(t instanceof vn){var u=e(t.key,n),f=e(t.value,n);return Math.max(u,f)}return 1},Wu=function(e){sr(n,e);var t=ar(n);function n(r){var i;return xn(this,n),i=t.call(this),i.source=r,i.type=Se.ALIAS,i}return Yn(n,[{key:"tag",set:function(i){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(i,o){if(!o)return Sl(this.source,i,o);var s=o.anchors,a=o.maxAliasCount,c=s.get(this.source);if(!c||c.res===void 0){var u="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new Y1(this.cstNode,u):new ReferenceError(u)}if(a>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=$$e(this.source,s)),c.count*c.aliasCount>a)){var f="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new Y1(this.cstNode,f):new ReferenceError(f)}return c.res}},{key:"toString",value:function(i){return n.stringify(this,i)}}],[{key:"stringify",value:function(i,o){var s=i.range,a=i.source,c=o.anchors,u=o.doc,f=o.implicitKey,h=o.inStringifyKey,p=Object.keys(c).find(function(v){return c[v]===a});if(!p&&h&&(p=u.anchors.getName(a)||u.anchors.newName()),p)return"*".concat(p).concat(f?" ":"");var g=u.anchors.getName(a)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(g," [").concat(s,"]"))}}]),n}(Qo);ho(Wu,"default",!0);function yp(e,t){var n=t instanceof Un?t.value:t,r=ir(e),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o instanceof vn&&(o.key===t||o.key===n||o.key&&o.key.value===n))return o}}catch(s){r.e(s)}finally{r.f()}}var Jo=function(e){sr(n,e);var t=ar(n);function n(){return xn(this,n),t.apply(this,arguments)}return Yn(n,[{key:"add",value:function(i,o){i?i instanceof vn||(i=new vn(i.key||i,i.value)):i=new vn(i);var s=yp(this.items,i.key),a=this.schema&&this.schema.sortMapEntries;if(s)if(o)s.value=i.value;else throw new Error("Key ".concat(i.key," already set"));else if(a){var c=this.items.findIndex(function(u){return a(i,u)<0});c===-1?this.items.push(i):this.items.splice(c,0,i)}else this.items.push(i)}},{key:"delete",value:function(i){var o=yp(this.items,i);if(!o)return!1;var s=this.items.splice(this.items.indexOf(o),1);return s.length>0}},{key:"get",value:function(i,o){var s=yp(this.items,i),a=s&&s.value;return!o&&a instanceof Un?a.value:a}},{key:"has",value:function(i){return!!yp(this.items,i)}},{key:"set",value:function(i,o){this.add(new vn(i,o),!0)}},{key:"toJSON",value:function(i,o,s){var a=s?new s:o&&o.mapAsMap?new Map:{};o&&o.onCreate&&o.onCreate(a);var c=ir(this.items),u;try{for(c.s();!(u=c.n()).done;){var f=u.value;f.addToJSMap(o,a)}}catch(h){c.e(h)}finally{c.f()}return a}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);var a=ir(this.items),c;try{for(a.s();!(c=a.n()).done;){var u=c.value;if(!(u instanceof vn))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(u)," instead"))}}catch(f){a.e(f)}finally{a.f()}return ls(oo(n.prototype),"toString",this).call(this,i,{blockItem:function(h){return h.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:i.indent||""},o,s)}}]),n}(to),jte="<<",Ute=function(e){sr(n,e);var t=ar(n);function n(r){var i;if(xn(this,n),r instanceof vn){var o=r.value;o instanceof ac||(o=new ac,o.items.push(r.value),o.range=r.value.range),i=t.call(this,r.key,o),i.range=r.range}else i=t.call(this,new Un(jte),new ac);return i.type=vn.Type.MERGE_PAIR,Lte(i)}return Yn(n,[{key:"addToJSMap",value:function(i,o){var s=ir(this.value.items),a;try{for(s.s();!(a=s.n()).done;){var c=a.value.source;if(!(c instanceof Jo))throw new Error("Merge sources must be maps");var u=c.toJSON(null,i,Map),f=ir(u),h;try{for(f.s();!(h=f.n()).done;){var p=Vw(h.value,2),g=p[0],v=p[1];o instanceof Map?o.has(g)||o.set(g,v):o instanceof Set?o.add(g):Object.prototype.hasOwnProperty.call(o,g)||Object.defineProperty(o,g,{value:v,writable:!0,enumerable:!0,configurable:!0})}}catch(y){f.e(y)}finally{f.f()}}}catch(y){s.e(y)}finally{s.f()}return o}},{key:"toString",value:function(i,o){var s=this.value;if(s.items.length>1)return ls(oo(n.prototype),"toString",this).call(this,i,o);this.value=s.items[0];var a=ls(oo(n.prototype),"toString",this).call(this,i,o);return this.value=s,a}}]),n}(vn),Yx={defaultType:Se.BLOCK_LITERAL,lineWidth:76},Mu={trueStr:"true",falseStr:"false"},af={asBigInt:!1},av={nullStr:"null"},Gu={defaultType:Se.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function sU(e,t,n){var r=ir(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.format,a=o.test,c=o.resolve;if(a){var u=e.match(a);if(u){var f=c.apply(null,u);return f instanceof Un||(f=new Un(f)),s&&(f.format=s),f}}}}catch(h){r.e(h)}finally{r.f()}return n&&(e=n(e)),new Un(e)}var Hte="flow",e5="block",TE="quoted",n7=function(t,n){for(var r=t[n+1];r===" "||r===" ";){do r=t[n+=1];while(r&&r!==` -`);r=t[n+1]}return n};function _A(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,s=o===void 0?80:o,a=r.minContentWidth,c=a===void 0?20:a,u=r.onFold,f=r.onOverflow;if(!s||s<0)return e;var h=Math.max(1+c,1+s-t.length);if(e.length<=h)return e;var p=[],g={},v=s-t.length;typeof i=="number"&&(i>s-Math.max(2,c)?p.push(0):v=s-i);var y=void 0,S=void 0,w=!1,b=-1,x=-1,E=-1;n===e5&&(b=n7(e,b),b!==-1&&(v=b+h));for(var I;I=e[b+=1];){if(n===TE&&I==="\\"){switch(x=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}E=b}if(I===` -`)n===e5&&(b=n7(e,b)),v=b+h,y=void 0;else{if(I===" "&&S&&S!==" "&&S!==` -`&&S!==" "){var A=e[b+1];A&&A!==" "&&A!==` -`&&A!==" "&&(y=b)}if(b>=v)if(y)p.push(y),v=y+h,y=void 0;else if(n===TE){for(;S===" "||S===" ";)S=I,I=e[b+=1],w=!0;var k=b>E+1?b-2:x-1;if(g[k])return e;p.push(k),g[k]=!0,v=k+h,y=void 0}else w=!0}S=I}if(w&&f&&f(),p.length===0)return e;u&&u();for(var O=e.slice(0,p[0]),L=0;Lr)return!0;if(s=o+1,i-s<=r)return!1}return!0}function Ap(e,t){var n=t.implicitKey,r=Gu.doubleQuoted,i=r.jsonEncoding,o=r.minMultiLineLength,s=JSON.stringify(e);if(i)return s;for(var a=t.indent||(SA(e)?" ":""),c="",u=0,f=0,h=s[f];h;h=s[++f])if(h===" "&&s[f+1]==="\\"&&s[f+2]==="n"&&(c+=s.slice(u,f)+"\\ ",f+=1,u=f,h="\\"),h==="\\")switch(s[f+1]){case"u":{c+=s.slice(u,f);var p=s.substr(f+2,4);switch(p){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:p.substr(0,2)==="00"?c+="\\x"+p.substr(2):c+=s.substr(f,6)}f+=5,u=f+1}break;case"n":if(n||s[f+2]==='"'||s.length";if(!s)return f+` -`;var h="",p="";if(s=s.replace(/[\n\t ]*$/,function(v){var y=v.indexOf(` -`);return y===-1?f+="-":(s===v||y!==v.length-1)&&(f+="+",r&&r()),p=v.replace(/\n$/,""),""}).replace(/^[\n ]*/,function(v){v.indexOf(" ")!==-1&&(f+=c);var y=v.match(/ +$/);return y?(h=v.slice(0,-y[0].length),y[0]):(h=v,"")}),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(a))),h&&(h=h.replace(/\n+/g,"$&".concat(a))),i&&(f+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!s)return"".concat(f).concat(c,` -`).concat(a).concat(p);if(u)return s=s.replace(/\n+/g,"$&".concat(a)),"".concat(f,` -`).concat(a).concat(h).concat(s).concat(p);s=s.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(a));var g=_A("".concat(h).concat(s).concat(p),a,e5,Gu.fold);return"".concat(f,` -`).concat(a).concat(g)}function z$e(e,t,n,r){var i=e.comment,o=e.type,s=e.value,a=t.actualString,c=t.implicitKey,u=t.indent,f=t.inFlow;if(c&&/[\n[\]{},]/.test(s)||f&&/[[\]{},]/.test(s))return Ap(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return c||f||s.indexOf(` -`)===-1?s.indexOf('"')!==-1&&s.indexOf("'")===-1?Wte(s,t):Ap(s,t):kE(e,t,n,r);if(!c&&!f&&o!==Se.PLAIN&&s.indexOf(` -`)!==-1)return kE(e,t,n,r);if(u===""&&SA(s))return t.forceBlockIndent=!0,kE(e,t,n,r);var h=s.replace(/\n+/g,`$& -`.concat(u));if(a){var p=t.doc.schema.tags,g=sU(h,p,p.scalarFallback).value;if(typeof g!="string")return Ap(s,t)}var v=c?h:_A(h,u,Hte,aU(t));return i&&!f&&(v.indexOf(` -`)!==-1||i.indexOf(` -`)!==-1)?(n&&n(),N$e(v,u,i)):v}function lU(e,t,n,r){var i=Gu.defaultType,o=t.implicitKey,s=t.inFlow,a=e,c=a.type,u=a.value;typeof u!="string"&&(u=String(u),e=Object.assign({},e,{value:u}));var f=function(g){switch(g){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:return kE(e,t,n,r);case Se.QUOTE_DOUBLE:return Ap(u,t);case Se.QUOTE_SINGLE:return Wte(u,t);case Se.PLAIN:return z$e(e,t,n,r);default:return null}};(c!==Se.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(u)||(o||s)&&(c===Se.BLOCK_FOLDED||c===Se.BLOCK_LITERAL))&&(c=Se.QUOTE_DOUBLE);var h=f(c);if(h===null&&(h=f(i),h===null))throw new Error("Unsupported default string type ".concat(i));return h}function Du(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if(typeof i=="bigint")return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){var s=o.indexOf(".");s<0&&(s=o.length,o+=".");for(var a=n-(o.length-s-1);a-- >0;)o+="0"}return o}function Gte(e,t){var n,r;switch(t.type){case Se.FLOW_MAP:n="}",r="flow map";break;case Se.FLOW_SEQ:n="]",r="flow sequence";break;default:e.push(new Jt(t,"Not a flow collection!?"));return}for(var i,o=t.items.length-1;o>=0;--o){var s=t.items[o];if(!s||s.type!==Se.COMMENT){i=s;break}}if(i&&i.char!==n){var a="Expected ".concat(r," to end with ").concat(n),c;typeof i.offset=="number"?(c=new Jt(t,a),c.offset=i.offset+1):(c=new Jt(i,a),i.range&&i.range.end&&(c.offset=i.range.end-i.range.start)),e.push(c)}}function Vte(e,t){var n=t.context.src[t.range.start-1];if(n!==` -`&&n!==" "&&n!==" "){var r="Comments must be separated from other tokens by white space characters";e.push(new Jt(t,r))}}function qte(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Jt(e,'The "'.concat(r,'" key is too long'))}function Xte(e,t){var n=ir(t),r;try{for(n.s();!(r=n.n()).done;){var i=r.value,o=i.afterKey,s=i.before,a=i.comment,c=e.items[s];c?(o&&c.value&&(c=c.value),a===void 0?(o||!c.commentBefore)&&(c.spaceBefore=!0):c.commentBefore?c.commentBefore+=` -`+a:c.commentBefore=a):a!==void 0&&(e.comment?e.comment+=` -`+a:e.comment=a)}}catch(u){n.e(u)}finally{n.f()}}function qw(e,t){var n=t.strValue;return n?typeof n=="string"?n:(n.errors.forEach(function(r){r.source||(r.source=t),e.errors.push(r)}),n.str):""}function j$e(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find(function(c){return c.handle===r});if(!o){var s=e.getDefaults().tagPrefixes;if(s&&(o=s.find(function(c){return c.handle===r})),!o)throw new Jt(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new Jt(t,"The ".concat(r," tag has no suffix."));if(r==="!"&&(e.version||e.options.version)==="1.0"){if(i[0]==="^")return e.warnings.push(new Dv(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var a=i.match(/^([a-z0-9-]+)\/(.*)/i);return a?"tag:".concat(a[1],".yaml.org,2002:").concat(a[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}function U$e(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,s=n.suffix,a=n.verbatim;if(a){if(a!=="!"&&a!=="!!")return a;var c="Verbatim tags aren't resolved, so ".concat(a," is invalid.");e.errors.push(new Jt(t,c))}else if(o==="!"&&!s)i=!0;else try{return j$e(e,t)}catch(u){e.errors.push(u)}}switch(r){case Se.BLOCK_FOLDED:case Se.BLOCK_LITERAL:case Se.QUOTE_DOUBLE:case Se.QUOTE_SINGLE:return Pd.STR;case Se.FLOW_MAP:case Se.MAP:return Pd.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Pd.SEQ;case Se.PLAIN:return i?Pd.STR:null;default:return null}}function r7(e,t,n){var r=e.schema.tags,i=[],o=ir(r),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.tag===n)if(a.test)i.push(a);else{var c=a.resolve(e,t);return c instanceof to?c:new Un(c)}}}catch(f){o.e(f)}finally{o.f()}var u=qw(e,t);return typeof u=="string"&&i.length>0?sU(u,i,r.scalarFallback):null}function H$e(e){var t=e.type;switch(t){case Se.FLOW_MAP:case Se.MAP:return Pd.MAP;case Se.FLOW_SEQ:case Se.SEQ:return Pd.SEQ;default:return Pd.STR}}function W$e(e,t,n){try{var r=r7(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(c){return c.source||(c.source=t),e.errors.push(c),null}try{var i=H$e(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new Dv(t,o));var s=r7(e,t,i);return s.tag=n,s}catch(c){var a=new Y1(t,c.message);return a.stack=c.stack,e.errors.push(a),null}}var G$e=function(t){if(!t)return!1;var n=t.type;return n===Se.MAP_KEY||n===Se.MAP_VALUE||n===Se.SEQ_ITEM};function V$e(e,t){var n={before:[],after:[]},r=!1,i=!1,o=G$e(t.context.parent)?t.context.parent.props.concat(t.props):t.props,s=ir(o),a;try{for(s.s();!(a=s.n()).done;){var c=a.value,u=c.start,f=c.end;switch(t.context.src[u]){case ni.COMMENT:{if(!t.commentHasRequiredWhitespace(u)){var h="Comments must be separated from other tokens by white space characters";e.push(new Jt(t,h))}var p=t.header,g=t.valueRange,v=g&&(u>g.start||p&&u>p.start)?n.after:n.before;v.push(t.context.src.slice(u+1,f));break}case ni.ANCHOR:if(r){var y="A node can have at most one anchor";e.push(new Jt(t,y))}r=!0;break;case ni.TAG:if(i){var S="A node can have at most one tag";e.push(new Jt(t,S))}i=!0;break}}}catch(w){s.e(w)}finally{s.f()}return{comments:n,hasAnchor:r,hasTag:i}}function q$e(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===Se.ALIAS){var o=t.rawValue,s=n.getNode(o);if(!s){var a="Aliased anchor not found: ".concat(o);return r.push(new Y1(t,a)),null}var c=new Wu(s);return n._cstAliases.push(c),c}var u=U$e(e,t);if(u)return W$e(e,t,u);if(t.type!==Se.PLAIN){var f="Failed to resolve ".concat(t.type," node here");return r.push(new go(t,f)),null}try{var h=qw(e,t);return sU(h,i.tags,i.tags.scalarFallback)}catch(p){return p.source||(p.source=t),r.push(p),null}}function Qd(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=V$e(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var s=e.anchors,a=t.anchor,c=s.getNode(a);c&&(s.map[s.newName(a)]=c),s.map[a]=t}if(t.type===Se.ALIAS&&(i||o)){var u="An alias node must not specify any properties";e.errors.push(new Jt(t,u))}var f=q$e(e,t);if(f){f.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(f.cstNode=t),e.options.keepNodeTypes&&(f.type=t.type);var h=r.before.join(` -`);h&&(f.commentBefore=f.commentBefore?"".concat(f.commentBefore,` -`).concat(h):h);var p=r.after.join(` -`);p&&(f.comment=f.comment?"".concat(f.comment,` -`).concat(p):p)}return t.resolved=f}function Yte(e,t){if(t.type!==Se.MAP&&t.type!==Se.FLOW_MAP){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new go(t,n)),null}var r=t.type===Se.FLOW_MAP?Q$e(e,t):K$e(e,t),i=r.comments,o=r.items,s=new Jo;s.items=o,Xte(s,i);for(var a=!1,c=0;ci.valueRange.start||o[a]!==ni.COMMENT)return!1;for(var c=r;c0){u=new Fte(Se.PLAIN,[]),u.context={parent:a,src:a.context.src};var f=a.range.start+1;if(u.range={start:f,end:f},u.valueRange={start:f,end:f},typeof a.range.origStart=="number"){var h=a.range.origStart+1;u.range.origStart=u.range.origEnd=h,u.valueRange.origStart=u.valueRange.origEnd=h}}var p=new vn(i,Qd(e,u));Y$e(a,p),r.push(p),i&&typeof o=="number"&&a.range.start>o+1024&&e.errors.push(qte(t,i)),i=void 0,o=null}break;default:i!==void 0&&r.push(new vn(i)),i=Qd(e,a),o=a.range.start,a.error&&e.errors.push(a.error);e:for(var g=s+1;;++g){var v=t.items[g];switch(v&&v.type){case Se.BLANK_LINE:case Se.COMMENT:continue e;case Se.MAP_VALUE:break e;default:{var y="Implicit map keys need to be followed by map values";e.errors.push(new Jt(a,y));break e}}}if(a.valueRangeContainsNewline){var S="Implicit map keys need to be on a single line";e.errors.push(new Jt(a,S))}}}return i!==void 0&&r.push(new vn(i)),{comments:n,items:r}}function Q$e(e,t){for(var n=[],r=[],i=void 0,o=!1,s="{",a=0;as+1024&&e.errors.push(qte(t,o));for(var S=c.context.src,w=s;w1){var o="Each pair must have its own sequence indicator";throw new Jt(t,o)}var s=i.items[0]||new vn;i.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(i.commentBefore,` -`).concat(s.commentBefore):i.commentBefore),i.comment&&(s.comment=s.comment?"".concat(i.comment,` -`).concat(s.comment):i.comment),i=s}n.items[r]=i instanceof vn?i:new vn(i)}}return n}function Zte(e,t,n){var r=new ac(e);r.tag="tag:yaml.org,2002:pairs";var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=void 0,c=void 0;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError("Expected [key, value] tuple: ".concat(s));else if(s&&s instanceof Object){var u=Object.keys(s);if(u.length===1)a=u[0],c=s[a];else throw new TypeError("Expected { key: value } tuple: ".concat(s))}else a=s;var f=e.createPair(a,c,n);r.items.push(f)}}catch(h){i.e(h)}finally{i.f()}return r}var ene={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Jte,createNode:Zte},EA=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),ho(ua(r),"add",Jo.prototype.add.bind(ua(r))),ho(ua(r),"delete",Jo.prototype.delete.bind(ua(r))),ho(ua(r),"get",Jo.prototype.get.bind(ua(r))),ho(ua(r),"has",Jo.prototype.has.bind(ua(r))),ho(ua(r),"set",Jo.prototype.set.bind(ua(r))),r.tag=n.tag,r}return Yn(n,[{key:"toJSON",value:function(i,o){var s=new Map;o&&o.onCreate&&o.onCreate(s);var a=ir(this.items),c;try{for(a.s();!(c=a.n()).done;){var u=c.value,f=void 0,h=void 0;if(u instanceof vn?(f=Sl(u.key,"",o),h=Sl(u.value,f,o)):f=Sl(u,"",o),s.has(f))throw new Error("Ordered maps must not include duplicate keys");s.set(f,h)}}catch(p){a.e(p)}finally{a.f()}return s}}]),n}(ac);ho(EA,"tag","tag:yaml.org,2002:omap");function eFe(e,t){var n=Jte(e,t),r=[],i=ir(n.items),o;try{for(i.s();!(o=i.n()).done;){var s=o.value.key;if(s instanceof Un)if(r.includes(s.value)){var a="Ordered maps must not include duplicate keys";throw new Jt(t,a)}else r.push(s.value)}}catch(c){i.e(c)}finally{i.f()}return Object.assign(new EA,n)}function tFe(e,t,n){var r=Zte(e,t,n),i=new EA;return i.items=r.items,i}var tne={identify:function(t){return t instanceof Map},nodeClass:EA,default:!1,tag:"tag:yaml.org,2002:omap",resolve:eFe,createNode:tFe},CA=function(e){sr(n,e);var t=ar(n);function n(){var r;return xn(this,n),r=t.call(this),r.tag=n.tag,r}return Yn(n,[{key:"add",value:function(i){var o=i instanceof vn?i:new vn(i),s=yp(this.items,o.key);s||this.items.push(o)}},{key:"get",value:function(i,o){var s=yp(this.items,i);return!o&&s instanceof vn?s.key instanceof Un?s.key.value:s.key:s}},{key:"set",value:function(i,o){if(typeof o!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Ys(o)));var s=yp(this.items,i);s&&!o?this.items.splice(this.items.indexOf(s),1):!s&&o&&this.items.push(new vn(i))}},{key:"toJSON",value:function(i,o){return ls(oo(n.prototype),"toJSON",this).call(this,i,o,Set)}},{key:"toString",value:function(i,o,s){if(!i)return JSON.stringify(this);if(this.hasAllNullValues())return ls(oo(n.prototype),"toString",this).call(this,i,o,s);throw new Error("Set items must all have null values")}}]),n}(Jo);ho(CA,"tag","tag:yaml.org,2002:set");function nFe(e,t){var n=Yte(e,t);if(!n.hasAllNullValues())throw new Jt(t,"Set items must all have null values");return Object.assign(new CA,n)}function rFe(e,t,n){var r=new CA,i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;r.items.push(e.createPair(s,null,n))}}catch(a){i.e(a)}finally{i.f()}return r}var nne={identify:function(t){return t instanceof Set},nodeClass:CA,default:!1,tag:"tag:yaml.org,2002:set",resolve:nFe,createNode:rFe},cU=function(t,n){var r=n.split(":").reduce(function(i,o){return i*60+Number(o)},0);return t==="-"?-r:r},rne=function(t){var n=t.value;if(isNaN(n)||!isFinite(n))return Du(n);var r="";n<0&&(r="-",n=Math.abs(n));var i=[n%60];return n<60?i.unshift(0):(n=Math.round((n-i[0])/60),i.unshift(n%60),n>=60&&(n=Math.round((n-i[0])/60),i.unshift(n))),r+i.map(function(o){return o<10?"0"+String(o):String(o)}).join(":").replace(/000000\d*$/,"")},ine={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(t,n,r){return cU(n,r.replace(/_/g,""))},stringify:rne},one={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(t,n,r){return cU(n,r.replace(/_/g,""))},stringify:rne},sne={identify:function(t){return t instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(t,n,r,i,o,s,a,c,u){c&&(c=(c+"00").substr(1,3));var f=Date.UTC(n,r-1,i,o||0,s||0,a||0,c||0);if(u&&u!=="Z"){var h=cU(u[0],u.slice(1));Math.abs(h)<30&&(h*=60),f-=6e4*h}return new Date(f)},stringify:function(t){var n=t.value;return n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function ane(e){var t=typeof process<"u"&&process.env||{};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function lne(e,t){if(ane(!1)){var n=typeof process<"u"&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var i7={};function iFe(e,t){if(!i7[e]&&ane(!0)){i7[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");n+=t?", use '".concat(t,"' instead."):".",lne(n,"DeprecationWarning")}}function oFe(e,t,n){var r=new Jo(e);if(t instanceof Map){var i=ir(t),o;try{for(i.s();!(o=i.n()).done;){var s=Vw(o.value,2),a=s[0],c=s[1];r.items.push(e.createPair(a,c,n))}}catch(p){i.e(p)}finally{i.f()}}else if(t&&Ys(t)==="object")for(var u=0,f=Object.keys(t);u=0?n+r.toString(t):Du(e)}var une={identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new Un(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:av,stringify:function(){return av.nullStr}},dne={identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(t){return t[0]==="t"||t[0]==="T"},options:Mu,stringify:function(t){var n=t.value;return n?Mu.trueStr:Mu.falseStr}},fne={identify:function(t){return kA(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(t,n){return dU(t,n,8)},options:af,stringify:function(t){return cne(t,8,"0o")}},hne={identify:kA,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(t){return dU(t,t,10)},options:af,stringify:Du},pne={identify:function(t){return kA(t)&&t>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(t,n){return dU(t,n,16)},options:af,stringify:function(t){return cne(t,16,"0x")}},mne={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Du},gne={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t)},stringify:function(t){var n=t.value;return Number(n).toExponential()}},vne={identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(t,n,r){var i=n||r,o=new Un(parseFloat(t));return i&&i[i.length-1]==="0"&&(o.minFractionDigits=i.length),o},stringify:Du},lFe=uU.concat([une,dne,fne,hne,pne,mne,gne,vne]),o7=function(t){return typeof t=="bigint"||Number.isInteger(t)},lS=function(t){var n=t.value;return JSON.stringify(n)},yne=[Q1,TA,{identify:function(t){return typeof t=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:qw,stringify:lS},{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new Un(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:lS},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(t){return t==="true"},stringify:lS},{identify:o7,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(t){return af.asBigInt?BigInt(t):parseInt(t,10)},stringify:function(t){var n=t.value;return o7(n)?n.toString():JSON.stringify(n)}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(t){return parseFloat(t)},stringify:lS}];yne.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var s7=function(t){var n=t.value;return n?Mu.trueStr:Mu.falseStr},px=function(t){return typeof t=="bigint"||Number.isInteger(t)};function cS(e,t,n){var r=t.replace(/_/g,"");if(af.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r);break}var i=BigInt(r);return e==="-"?BigInt(-1)*i:i}var o=parseInt(r,n);return e==="-"?-1*o:o}function PB(e,t,n){var r=e.value;if(px(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Du(e)}var cFe=uU.concat([{identify:function(t){return t==null},createNode:function(t,n,r){return r.wrapScalars?new Un(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:av,stringify:function(){return av.nullStr}},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:Mu,stringify:s7},{identify:function(t){return typeof t=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:Mu,stringify:s7},{identify:px,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(t,n,r){return cS(n,r,2)},stringify:function(t){return PB(t,2,"0b")}},{identify:px,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(t,n,r){return cS(n,r,8)},stringify:function(t){return PB(t,8,"0")}},{identify:px,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(t,n,r){return cS(n,r,10)},stringify:Du},{identify:px,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(t,n,r){return cS(n,r,16)},stringify:function(t){return PB(t,16,"0x")}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(t,n){return n?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Du},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(t){return parseFloat(t.replace(/_/g,""))},stringify:function(t){var n=t.value;return Number(n).toExponential()}},{identify:function(t){return typeof t=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(t,n){var r=new Un(parseFloat(t.replace(/_/g,"")));if(n){var i=n.replace(/_/g,"");i[i.length-1]==="0"&&(r.minFractionDigits=i.length)}return r},stringify:Du}],Qte,tne,ene,nne,ine,one,sne),uFe={core:lFe,failsafe:uU,json:yne,yaml11:cFe},dFe={binary:Qte,bool:dne,float:vne,floatExp:gne,floatNaN:mne,floatTime:one,int:hne,intHex:pne,intOct:fne,intTime:ine,map:Q1,null:une,omap:tne,pairs:ene,seq:TA,set:nne,timestamp:sne};function fFe(e,t,n){if(t){var r=n.filter(function(o){return o.tag===t}),i=r.find(function(o){return!o.format})||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find(function(o){return(o.identify&&o.identify(e)||o.class&&e instanceof o.class)&&!o.format})}function hFe(e,t,n){if(e instanceof Qo)return e;var r=n.defaultPrefix,i=n.onTagObj,o=n.prevObjects,s=n.schema,a=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var c=fFe(e,t,s.tags);if(!c){if(typeof e.toJSON=="function"&&(e=e.toJSON()),!e||Ys(e)!=="object")return a?new Un(e):e;c=e instanceof Map?Q1:e[Symbol.iterator]?TA:Q1}i&&(i(c),delete n.onTagObj);var u={value:void 0,node:void 0};if(e&&Ys(e)==="object"&&o){var f=o.get(e);if(f){var h=new Wu(f);return n.aliasNodes.push(h),h}u.value=e,o.set(e,u)}return u.node=c.createNode?c.createNode(n.schema,e,n):a?new Un(e):e,t&&u.node instanceof Qo&&(u.node.tag=t),u.node}function pFe(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map(function(g){return JSON.stringify(g)}).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var s=ir(n),a;try{for(s.s();!(a=s.n()).done;){var c=a.value;i=i.concat(c)}}catch(g){s.e(g)}finally{s.f()}}else typeof n=="function"&&(i=n(i.slice()));for(var u=0;un.key?1:0},J1=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,o=t.sortMapEntries,s=t.tags;xn(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=o===!0?mFe:o||null,!n&&s&&iFe("tags","customTags"),this.tags=pFe(uFe,dFe,n||s,i)}return Yn(e,[{key:"createNode",value:function(n,r,i,o){var s={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r},a=o?Object.assign(o,s):s;return hFe(n,i,a)}},{key:"createPair",value:function(n,r,i){i||(i={wrapScalars:!0});var o=this.createNode(n,i.wrapScalars,null,i),s=this.createNode(r,i.wrapScalars,null,i);return new vn(o,s)}}]),e}();ho(J1,"defaultPrefix",CE);ho(J1,"defaultTags",Pd);var XC={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},gFe={get binary(){return Yx},set binary(e){Object.assign(Yx,e)},get bool(){return Mu},set bool(e){Object.assign(Mu,e)},get int(){return af},set int(e){Object.assign(af,e)},get null(){return av},set null(e){Object.assign(av,e)},get str(){return Gu},set str(e){Object.assign(Gu,e)}},bne={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:CE},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:CE}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:CE}]}};function a7(e,t){if((e.version||e.options.version)==="1.0"){var n=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(n)return"!"+n[1];var r=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return r?"!".concat(r[1],"/").concat(r[2]):"!".concat(t.replace(/^tag:/,""))}var i=e.tagPrefixes.find(function(a){return t.indexOf(a.prefix)===0});if(!i){var o=e.getDefaults().tagPrefixes;i=o&&o.find(function(a){return t.indexOf(a.prefix)===0})}if(!i)return t[0]==="!"?t:"!<".concat(t,">");var s=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,function(a){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[a]});return i.handle+s}function vFe(e,t){if(t instanceof Wu)return Wu;if(t.tag){var n=e.filter(function(a){return a.tag===t.tag});if(n.length>0)return n.find(function(a){return a.format===t.format})||n[0]}var r,i;if(t instanceof Un){i=t.value;var o=e.filter(function(a){return a.identify&&a.identify(i)||a.class&&i instanceof a.class});r=o.find(function(a){return a.format===t.format})||o.find(function(a){return!a.format})}else i=t,r=e.find(function(a){return a.nodeClass&&i instanceof a.nodeClass});if(!r){var s=i&&i.constructor?i.constructor.name:Ys(i);throw new Error("Tag not resolved for ".concat(s," value"))}return r}function yFe(e,t,n){var r=n.anchors,i=n.doc,o=[],s=i.anchors.getName(e);return s&&(r[s]=e,o.push("&".concat(s))),e.tag?o.push(a7(i,e.tag)):t.default||o.push(a7(i,t.tag)),o.join(" ")}function uS(e,t,n,r){var i=t.doc,o=i.anchors,s=i.schema,a;if(!(e instanceof Qo)){var c={aliasNodes:[],onTagObj:function(S){return a=S},prevObjects:new Map};e=s.createNode(e,!0,null,c);var u=ir(c.aliasNodes),f;try{for(u.s();!(f=u.n()).done;){var h=f.value;h.source=h.source.node;var p=o.getName(h.source);p||(p=o.newName(),o.map[p]=h.source)}}catch(y){u.e(y)}finally{u.f()}}if(e instanceof vn)return e.toString(t,n,r);a||(a=vFe(s.tags,e));var g=yFe(e,a,t);g.length>0&&(t.indentAtStart=(t.indentAtStart||0)+g.length+1);var v=typeof a.stringify=="function"?a.stringify(e,t,n,r):e instanceof Un?lU(e,t,n,r):e.toString(t,n,r);return g?e instanceof Un||v[0]==="{"||v[0]==="["?"".concat(g," ").concat(v):"".concat(g,` -`).concat(t.indent).concat(v):v}var bFe=function(){function e(t){xn(this,e),ho(this,"map",Object.create(null)),this.prefix=t}return Yn(e,[{key:"createAlias",value:function(n,r){return this.setAnchor(n,r),new Wu(n)}},{key:"createMergePair",value:function(){for(var n=this,r=new Ute,i=arguments.length,o=new Array(i),s=0;s0&&!e.commentBefore&&(e.commentBefore=n.before.join(` -`),n.before=[]))}}catch(g){o.e(g)}finally{o.f()}if(e.contents=r||null,!r)e.comment=n.before.concat(n.after).join(` -`)||null;else{var h=n.before.join(` -`);if(h){var p=r instanceof to&&r.items[0]?r.items[0]:r;p.commentBefore=p.commentBefore?"".concat(h,` -`).concat(p.commentBefore):h}e.comment=n.after.join(` -`)||null}}function SFe(e,t){var n=e.tagPrefixes,r=Vw(t.parameters,2),i=r[0],o=r[1];if(!i||!o){var s="Insufficient parameters given for %TAG directive";throw new Jt(t,s)}if(n.some(function(c){return c.handle===i})){var a="The %TAG directive must only be given at most once per handle in the same document.";throw new Jt(t,a)}return{handle:i,prefix:o}}function EFe(e,t){var n=Vw(t.parameters,1),r=n[0];if(t.name==="YAML:1.0"&&(r="1.0"),!r){var i="Insufficient parameters given for %YAML directive";throw new Jt(t,i)}if(!bne[r]){var o=e.version||e.options.version,s="Document will be parsed as YAML ".concat(o," rather than YAML ").concat(r);e.warnings.push(new Dv(t,s))}return r}function CFe(e,t,n){var r=[],i=!1,o=ir(t),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,c=a.comment,u=a.name;switch(u){case"TAG":try{e.tagPrefixes.push(SFe(e,a))}catch(g){e.errors.push(g)}i=!0;break;case"YAML":case"YAML:1.0":if(e.version){var f="The %YAML directive must only be given at most once per document.";e.errors.push(new Jt(a,f))}try{e.version=EFe(e,a)}catch(g){e.errors.push(g)}i=!0;break;default:if(u){var h="YAML only supports %TAG and %YAML directives, and not %".concat(u);e.warnings.push(new Dv(a,h))}}c&&r.push(c)}}catch(g){o.e(g)}finally{o.f()}if(n&&!i&&(e.version||n.version||e.options.version)==="1.1"){var p=function(v){var y=v.handle,S=v.prefix;return{handle:y,prefix:S}};e.tagPrefixes=n.tagPrefixes.map(p),e.version=n.version}e.commentBefore=r.join(` -`)||null}function _m(e){if(e instanceof to)return!0;throw new Error("Expected a YAML collection as document contents")}var fU=function(){function e(t){xn(this,e),this.anchors=new bFe(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return Yn(e,[{key:"add",value:function(n){return _m(this.contents),this.contents.add(n)}},{key:"addIn",value:function(n,r){_m(this.contents),this.contents.addIn(n,r)}},{key:"delete",value:function(n){return _m(this.contents),this.contents.delete(n)}},{key:"deleteIn",value:function(n){return hx(n)?this.contents==null?!1:(this.contents=null,!0):(_m(this.contents),this.contents.deleteIn(n))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(n,r){return this.contents instanceof to?this.contents.get(n,r):void 0}},{key:"getIn",value:function(n,r){return hx(n)?!r&&this.contents instanceof Un?this.contents.value:this.contents:this.contents instanceof to?this.contents.getIn(n,r):void 0}},{key:"has",value:function(n){return this.contents instanceof to?this.contents.has(n):!1}},{key:"hasIn",value:function(n){return hx(n)?this.contents!==void 0:this.contents instanceof to?this.contents.hasIn(n):!1}},{key:"set",value:function(n,r){_m(this.contents),this.contents.set(n,r)}},{key:"setIn",value:function(n,r){hx(n)?this.contents=r:(_m(this.contents),this.contents.setIn(n,r))}},{key:"setSchema",value:function(n,r){if(!(!n&&!r&&this.schema)){typeof n=="number"&&(n=n.toFixed(1)),n==="1.0"||n==="1.1"||n==="1.2"?(this.version?this.version=n:this.options.version=n,delete this.options.schema):n&&typeof n=="string"&&(this.options.schema=n),Array.isArray(r)&&(this.options.customTags=r);var i=Object.assign({},this.getDefaults(),this.options);this.schema=new J1(i)}}},{key:"parse",value:function(n,r){this.options.keepCstNodes&&(this.cstNode=n),this.options.keepNodeTypes&&(this.type="DOCUMENT");var i=n.directives,o=i===void 0?[]:i,s=n.contents,a=s===void 0?[]:s,c=n.directivesEndMarker,u=n.error,f=n.valueRange;if(u&&(u.source||(u.source=this),this.errors.push(u)),CFe(this,o,r),c&&(this.directivesEndMarker=!0),this.range=f?[f.start,f.end]:null,this.setSchema(),this.anchors._cstAliases=[],_Fe(this,a),this.anchors.resolveNodes(),this.options.prettyErrors){var h=ir(this.errors),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g instanceof sv&&g.makePretty()}}catch(w){h.e(w)}finally{h.f()}var v=ir(this.warnings),y;try{for(v.s();!(y=v.n()).done;){var S=y.value;S instanceof sv&&S.makePretty()}}catch(w){v.e(w)}finally{v.f()}}return this}},{key:"listNonDefaultTags",value:function(){return wFe(this.contents).filter(function(n){return n.indexOf(J1.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(n,r){if(n[0]!=="!"||n[n.length-1]!=="!")throw new Error("Handle must start and end with !");if(r){var i=this.tagPrefixes.find(function(o){return o.handle===n});i?i.prefix=r:this.tagPrefixes.push({handle:n,prefix:r})}else this.tagPrefixes=this.tagPrefixes.filter(function(o){return o.handle!==n})}},{key:"toJSON",value:function(n,r){var i=this,o=this.options,s=o.keepBlobsInJSON,a=o.mapAsMap,c=o.maxAliasCount,u=s&&(typeof n!="string"||!(this.contents instanceof Un)),f={doc:this,indentStep:" ",keep:u,mapAsMap:u&&!!a,maxAliasCount:c,stringify:uS},h=Object.keys(this.anchors.map);h.length>0&&(f.anchors=new Map(h.map(function(b){return[i.anchors.map[b],{alias:[],aliasCount:0,count:1}]})));var p=Sl(this.contents,n,f);if(typeof r=="function"&&f.anchors){var g=ir(f.anchors.values()),v;try{for(g.s();!(v=g.n()).done;){var y=v.value,S=y.count,w=y.res;r(w,S)}}catch(b){g.e(b)}finally{g.f()}}return p}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var n=this.options.indent;if(!Number.isInteger(n)||n<=0){var r=JSON.stringify(n);throw new Error('"indent" option must be a positive integer, not '.concat(r))}this.setSchema();var i=[],o=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),i.push(s),o=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach(function(g){var v=g.handle,y=g.prefix;a.some(function(S){return S.indexOf(y)===0})&&(i.push("%TAG ".concat(v," ").concat(y)),o=!0)}),(o||this.directivesEndMarker)&&i.push("---"),this.commentBefore&&((o||!this.directivesEndMarker)&&i.unshift(""),i.unshift(this.commentBefore.replace(/^/gm,"#")));var c={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(n),stringify:uS},u=!1,f=null;if(this.contents){this.contents instanceof Qo&&(this.contents.spaceBefore&&(o||this.directivesEndMarker)&&i.push(""),this.contents.commentBefore&&i.push(this.contents.commentBefore.replace(/^/gm,"#")),c.forceBlockIndent=!!this.comment,f=this.contents.comment);var h=f?null:function(){return u=!0},p=uS(this.contents,c,function(){return f=null},h);i.push(cg(p,"",f))}else this.contents!==void 0&&i.push(uS(this.contents,c));return this.comment&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(this.comment.replace(/^/gm,"#"))),i.join(` -`)+` -`}}]),e}();ho(fU,"defaults",bne);function TFe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2?arguments[2]:void 0;n===void 0&&typeof t=="string"&&(n=t,t=!0);var r=Object.assign({},fU.defaults[XC.version],XC),i=new J1(r);return i.createNode(e,t,n)}var AA=function(e){sr(n,e);var t=ar(n);function n(r){return xn(this,n),t.call(this,Object.assign({},XC,r))}return n}(fU);function kFe(e,t){var n=[],r,i=ir(oU(e)),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=new AA(t);a.parse(s,r),n.push(a),r=a}}catch(c){i.e(c)}finally{i.f()}return n}function xne(e,t){var n=oU(e),r=new AA(t).parse(n[0]);if(n.length>1){var i="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Jt(n[1],i))}return r}function AFe(e,t){var n=xne(e,t);if(n.warnings.forEach(function(r){return lne(r)}),n.errors.length>0)throw n.errors[0];return n.toJSON()}function IFe(e,t){var n=new AA(t);return n.contents=e,String(n)}var RFe={createNode:TFe,defaultOptions:XC,Document:AA,parse:AFe,parseAllDocuments:kFe,parseCST:oU,parseDocument:xne,scalarOptions:gFe,stringify:IFe};const PFe=Object.freeze(Object.defineProperty({__proto__:null,YAML:RFe},Symbol.toStringTag,{value:"Module"})),OFe=c4(PFe);var wne=OFe.YAML;const MFe=ds(wne);function l7(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:te.truncate(MFe.stringify(e).replace(` -`,", "),{length:30})})}}function c7({label:e,value:t,type:n}){return C.jsxs(En,{width:"auto",mr:3,mt:.5,children:[C.jsx(Ut,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(li,{}),C.jsx(Ut,{component:"div",variant:"body2",...n,children:l7(t)??"none"})]},`${e}::${l7(t)}`)}function t5({event:e,variant:t="body2",max:n=10,...r}){const i=te.filter(te.entries(e),([,o])=>o!==void 0);return C.jsxs(En,{...r,children:[te.map(te.slice(i,0,n),([o,s])=>C.jsx(c7,{label:o,value:s,type:{variant:t}})),i.length>n&&C.jsx(c7,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var _ne={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(a){var c=a===void 0?{}:a,u=c.ESCAPE,f=u===void 0?/^\\/:u,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,w=c.PIPE_PARAMETER_START,b=w===void 0?/^\s*:\s*/:w,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,I=c.QUOTED_STRING_TEST,A=I===void 0?null:I,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,G=H===void 0?null:H,z=A||function(V){return E.test(V)},D=O||s(E),F=N||function(V){return E.test(V)},j=G||s(E);return function(V){function W(Pe){Pe===void 0&&(Pe=1),pe=pe.substr(Pe)}function K(Pe){Pe===void 0&&(Pe=/^/),W(pe.match(Pe)[0].length)}function X(){var Pe;return K(f),Pe=pe.length>0?pe[0]:"",W(),Pe}function Q(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;me={name:"",pipes:[]},Xe=!st}function ie(){ve.variables.push(me),Q({isNull:!0})}function ce(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;be={name:"",parameters:[]},ct=!st}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;Ze="",Bt=!st}function J(){be.parameters.push(Ze),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&J(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Ze="",Xe=!1,ct=!1,Bt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=X();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],W();break;case 1:if(f.test(pe)){me.name+=X();continue}if(ae()||le())continue;if(z(pe)){me.name+=D(pe,W);continue}me.name+=pe[0],W();break;case 2:if(f.test(pe)){be.name+=X();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=D(pe,W);continue}be.name+=pe[0],W();break;case 3:if(f.test(pe)){Ze+=X();continue}if(ae()||he()||le())continue;if(F(pe)){Ze+=j(pe,W);continue}Ze+=pe[0],W()}return Bt&&be.parameters.push(Ze),ct&&me.pipes.push(be),Xe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(a){return function(c,u){var f=c.match(a);return u(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 a in s)r.hasOwnProperty(a)||(r[a]=s[a])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(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 a(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 a(u.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var u=i(0);r.evaluateParsedString=a,r.evaluateStringTemplate=c}])})})(_ne);var u7=_ne.exports;function DFe(e={},t){const{$:n,...r}=e;return{...te.mapValues(r,t),$:n}}function n5(e){switch(e==null?void 0:e.constructor){case Array:{const t=te.map(e,n5);return n=>te.map(t,r=>r(n))}case Object:{const t=te.mapValues(e,n5);return n=>te.mapValues(t,r=>r(n))}case String:return r5(e);default:return te.constant(e)}}function LFe(e={}){return DFe(e,t=>te.isFunction(t)?t:n5(t))}const d7=Ef(e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(LFe(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))},{primitive:!0}),NFe=/^\{\{\s*/,BFe=/^\s*\}\}/,OB=/\b\B/,r5=Ef(e=>{const n=u7.parseStringTemplateGenerator({VARIABLE_START:NFe,VARIABLE_END:BFe,PIPE_START:OB,PIPE_PARAMETER_START:OB,QUOTED_STRING:OB})(e);return te.join(n.literals,"")?r=>u7.evaluateParsedString(n,{},{},i=>d7(i)(r)):d7(n.variables[0].name)},{primitive:!0});function $Fe(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 Sne={exports:{}};(function(e,t){(function(n,r){typeof $Fe=="function"?e.exports=r():n.pluralize=r()})($t,function(){var n=[],r=[],i={},o={},s={};function a(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 u(y,S){return y.replace(/\$(\d{1,2})/g,function(w,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(w,b){var x=u(S[1],arguments);return c(w===""?y[b-1]:w,x)})}function h(y,S,w){if(!y.length||i.hasOwnProperty(y))return S;for(var b=w.length;b--;){var x=w[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,w){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,w)}}function g(y,S,w,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,w)===E}}function v(y,S,w){var b=S===1?v.singular(y):v.plural(y);return(w?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([a(y),S])},v.addSingularRule=function(y,S){r.push([a(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(Sne);var FFe=Sne.exports;const zFe=ds(FFe),jFe=""+new URL("parseTrace.worker-0a89fcf6.js",import.meta.url).href;class UFe extends Worker{constructor(){super(jFe,{type:"module"})}}const HFe=Ov(UFe);function WFe(e){const t=Ol(),n=sm("specimen");return R.useCallback(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await HFe(e);return t("Trace loaded",zFe("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){t("Error parsing",`${wne.stringify(i)}`)}}}),[e])}function ug({label:e,icon:t,...n}){return C.jsx(bf,{title:te.startCase(e),children:C.jsx("span",{children:C.jsx(jp,{...n,children:t})})},e)}function GFe(){return R.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function hU(e){const t=Ol(),{layer:n,setLayer:r}=qp(e),{playback:i,playbackTo:o,step:s=0}=(n==null?void 0:n.source)??{},a=te.min([o,s])??0,c=!!o,u=i==="playing",[f,h]=[0,(o??1)-1];return R.useMemo(()=>{function p(S){r(ka(n,w=>te.set(w,"source",{...w==null?void 0:w.source,...S})))}const g={start:f,end:h,step:a,canPlay:c&&!u&&a0},v=S=>te.clamp(a+S,f,h);return{playing:i==="playing",...g,...{play:()=>{t("Playback started"),p({playback:"playing",step:v(1)})},pause:(S=0)=>{t("Playback paused"),p({playback:"paused",step:v(S)})},stepTo:(S=0)=>p({step:S}),stop:()=>p({step:f,playback:"paused"}),stepForward:()=>p({step:v(1)}),stepBackward:()=>p({step:v(-1)}),tick:(S=1)=>p({playback:"playing",step:v(S)})}}},[h,i,u,c,f,a,r])}function VFe(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function qFe({children:e,value:t}){KQ();const{step:n,tick:r,end:i,playing:o,pause:s}=hU(t==null?void 0:t.key),a=Ol(),[{playbackRate:c=1}]=Zu(),u=GFe(),f=R.useCallback((h,p)=>C.jsx(Hz,{primary:h,secondary:`Step ${n+p}`}),[n]);return R.useEffect(()=>{if(o)return n{for(const h of te.range(c)){const p=u(n+h);if(p.result||p.error)return{...p,offset:h}}return{result:"",offset:0,error:void 0}},({result:h,offset:p,error:g})=>{g?(a(`${te.trimEnd(g,".")}.`,`${p}`),s()):h?(a(`Breakpoint hit: ${h}.`,`${p}`),s(p)):r(c)}):s()},[f,o,i,n,s,r,a,u,c]),C.jsx(C.Fragment,{children:e})}function XFe({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:a,play:c,stepBackward:u,stepForward:f,stop:h}=hU(e==null?void 0:e.key);return KQ(),C.jsxs(C.Fragment,{children:[C.jsx(ug,{label:"step-backward",icon:C.jsx(Q1e,{}),onClick:u,disabled:!i}),C.jsx(ug,{...t?{label:"pause",icon:C.jsx(G1e,{}),onClick:()=>a(),disabled:!n}:{label:"play",icon:C.jsx(q1e,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(ug,{label:"step-forward",icon:C.jsx(K1e,{}),onClick:f,disabled:!o}),C.jsx(ug,{label:"stop",icon:C.jsx(J1e,{}),onClick:h,disabled:!s})]})}const YFe=e=>e==null;function KFe(e){const t=[],n={},r={},i=te.chain(e==null?void 0:e.events).map((a,c)=>({step:c,id:a.id,pId:a.pId})).groupBy("id").value();te.forEach(e==null?void 0:e.events,({id:a,pId:c},u)=>{!YFe(c)&&n[a]!==c&&(t.push({id:a,pId:c,step:u,prev:te.last(t)}),n[a]=c),r[u]=te.last(t)});const o=(a,c=(u=>(u=e==null?void 0:e.events)==null?void 0:u.length)()??0)=>{let f=r[c];for(;f;){if(f.id===a)return f.pId;f=f.prev}};return{getParent:o,getPath:a=>{const c=[a];let u={...(e.events??[])[a],step:a};for(;u;){const f=o(u.id,u.step);if(f){const h=te.findLast(i[f],p=>p.step<=u.step);if(h)c.push(h.step),u=h;else break}else break}return c}}}const Kx={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:Zg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(q1,{label:"Trace",content:C.jsx(gOe,{onChange:s=>t(a=>te.set(a,"source.trace",{...s,key:qo()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(q1,{label:"Onion Skinning",content:C.jsx(Vs,{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:te.startCase(s)})),onChange:s=>t(a=>te.set(a,"source.onion",s))})}),C.jsx(Ote,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Mte,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Zg(({value:e,produce:t})=>{var i,o,s,a,c,u,f,h;const{palette:n}=Ln(),r=WFe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:zj,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return R.useEffect(()=>{t(p=>{var g,v,y,S;return te.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)})},[(u=(c=(a=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:a.content)==null?void 0:c.events)==null?void 0:u.length]),Pte(async()=>{const p=await r();t(g=>te.set(g,"source.parsedTrace",p))},[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(qFe,{value:e})})}),renderer:({layer:e})=>{var a,c;const t=(a=e==null?void 0:e.source)==null?void 0:a.parsedTrace,n=QQ(((c=e==null?void 0:e.source)==null?void 0:c.step)??0,1e3/60),r=QFe(e,n),i=R.useMemo(()=>te.map(t==null?void 0:t.stepsPersistent,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsPersistent,e==null?void 0:e.key]),o=R.useMemo(()=>te.map(t==null?void 0:t.stepsTransient,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsTransient,e==null?void 0:e.key]),s=R.useMemo(()=>[o[n]??[]],[o,n]);return C.jsxs(C.Fragment,{children:[C.jsx(FBe,{step:n,nodes:i}),C.jsx(V1,{nodes:s}),r]})},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}=qp(e),o=R.useMemo(()=>{var c,u,f,h;const s=((f=(u=(c=r==null?void 0:r.source)==null?void 0:c.trace)==null?void 0:u.content)==null?void 0:f.events)??[],a=te.chain((h=t==null?void 0:t.info)==null?void 0:h.components).filter(p=>{var g;return((g=p.meta)==null?void 0:g.sourceLayer)===(r==null?void 0:r.key)}).map(p=>{var g;return(g=p.meta)==null?void 0:g.step}).filter(te.negate(te.isUndefined)).sort((p,g)=>p-g).value();if(a.length&&r){const p=te.last(a),g=s[p];if(g)return{[r.key]:{primary:va(r),items:{properties:{index:-1,primary:C.jsx(t5,{event:g,vertical:!0})},[`${g}`]:{primary:`Go to Step ${p}`,secondary:`${te.startCase(g.type)}`,action:()=>i(ka(r,v=>{te.set(v,"source.step",p)})),icon:C.jsx(A1e,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function QFe(e,t=0){var o,s;const{palette:n}=Ln(),{getPath:r}=R.useMemo(()=>{var a,c;return(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)!=null&&c.content?KFe(e.source.trace.content):{getParent:te.constant(void 0),getPath:te.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return R.useMemo(()=>{var a,c,u,f;if((f=(u=(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:c.content)==null?void 0:u.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?r5(g):b=>b.event.x,S=v?r5(v):b=>b.event.y,w=te.map(r(t),b=>{var x,E,I,A;return(A=(I=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:I.events)==null?void 0:A[b]});if(w.length){const b=[{$:"rect",x:y({event:{x:0,y:0,...te.head(w)}})-2*p/2,y:S({event:{x:0,y:0,...te.head(w)}})-2*p/2,fill:F1("destination"),width:2*p,height:2*p},{$:"rect",x:y({event:{x:0,y:0,...te.last(w)}})-2*p/2,y:S({event:{x:0,y:0,...te.last(w)}})-2*p/2,fill:F1("source"),width:2*p,height:2*p},{$:"path",points:w.map(x=>({x:y({event:{x:0,y:0,...x}}),y:S({event:{x:0,y:0,...x}})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(V1,{nodes:[te.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}const JFe=Kx.getSelectionInfo;async function ZFe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(te.find(i,{id:t})&&te.find(o,{id:n}))return r}}const e3e={key:"query",editor:Zg(({value:e,produce:t})=>{var c,u;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=qp(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=FC(),[a]=rv();return C.jsxs(C.Fragment,{children:[C.jsx(q1,{label:"Algorithm",content:C.jsx(Vs,{showArrow:!0,icon:C.jsx(L1e,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=te.find(a,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>te.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(Ut,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(q1,{label:"Map",content:C.jsx(Vs,{showArrow:!0,icon:C.jsx(Tw,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:va(f)})),onChange:async f=>t(h=>te.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(Ut,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",va(i)]}),C.jsx(Ote,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Mte,{trace:(u=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:u.content})})]})}),service:Zg(({value:e,produce:t})=>{const n=Ol(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:a}]=om(),[c]=rv(),[{algorithms:u}]=FC(),f=R.useMemo(()=>{if(i&&r)return te.find(a,{key:i})},[i,r,a]);return d$e(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await ZFe(c,r,g),S=te.find(u,{id:r});if(y){n(`Executing ${va(e)} using ${y.name}...`);const w=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>te.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:w,key:qo()}))}}}},[f,c,r,o,s,t,n,e,u],[f,c,r,o,s]),C.jsx(C.Fragment,{children:Kx.service})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},renderer:Kx.renderer,steps:Kx.steps,getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=qp(n),s=R.useMemo(()=>{const c=te.filter(o,{source:{type:"map"}});return te.filter(te.map(c,u=>{var h,p,g,v;const{parsedMap:f}=(u==null?void 0:u.source)??{};if(f&&t){const y=(v=(g=tU((p=(h=u==null?void 0:u.source)==null?void 0:h.map)==null?void 0:p.format))==null?void 0:g.hydrate)==null?void 0:v.call(g,f);if(y){const S=(t==null?void 0:t.world)&&y.snap(t.world);if(S){const w=(t==null?void 0:t.world)&&y.nodeAt(S);return{point:S,node:w,key:u.key,name:va(u)}}}}}))},[o]),a=R.useMemo(()=>!!r&&!!s.length&&{[r.key]:{primary:va(r),items:{...te.reduce(s,(c,u)=>({...c,[`${n}-${u==null?void 0:u.key}-source`]:{primary:"Set as source",secondary:u==null?void 0:u.name,action:()=>i(ka(r,f=>{te.set(f,"source.start",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(Z1e,{sx:{transform:"scale(0.5)"}})},[`${n}-${u==null?void 0:u.key}-destination`]:{primary:"Set as destination",secondary:u==null?void 0:u.name,action:()=>i(ka(r,f=>{te.set(f,"source.end",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(V1e,{})}}),{})}}},[s,r,o,i]);return C.jsx(JFe,{event:t,layer:n,children:c=>e==null?void 0:e(te.merge(c,a))})}};function t3e({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&R.createElement((n=Xw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function va(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?Xw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function Ene(e){var t;return Xw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const Xw={map:g$e,trace:Kx,query:e3e};function n3e(e,t,n=600){const[r,i]=R.useState(e);R.useEffect(()=>void i(e),[i,e]);const o=R.useMemo(()=>te.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function r3e({value:e,onValueChange:t},n){var f,h,p;const[r,i]=n3e(e,t),o=g=>C.jsx(Ut,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(Ut,{variant:"body1",children:g}),a=(g,v)=>C.jsxs(En,{alignItems:"center",children:[s(g),C.jsx(li,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:te.startCase(v)})),u=r.name||va(e);return C.jsx(C.Fragment,{children:C.jsxs(nf,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(ht,{py:1,ml:-1,children:[C.jsx(Ut,{children:u}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:te.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(li,{flex:1}),C.jsx(nf,{alignItems:"center",direction:"row",children:C.jsx(Mj,{appBar:{children:C.jsx(Oj,{children:"Edit Layer"})},trigger:g=>C.jsx(jp,{size:"small",onClick:g,children:C.jsx(Wk,{})}),children:C.jsxs(ht,{p:2,children:[C.jsx(ht,{pb:2,children:C.jsx(Cw,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(ka(r,v=>te.set(v,"name",g.target.value)))})}),o("Layer Options"),a("Transparency",C.jsx(Vs,{label:"Transparency",items:["25","50","75","100"].map(g=>({id:g,name:`${g}%`})),value:"100",showArrow:!0})),a("Display Mode",C.jsx(Vs,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),a("Type",C.jsx(Vs,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:te.startCase(g)})),onChange:g=>i==null?void 0:i(ka(r,v=>{te.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&R.createElement(Xw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const i3e=R.forwardRef(r3e);function o3e(){const[{layers:e=[]},t]=om();return C.jsx(ht,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(ht,{sx:{mb:2},children:C.jsx(dA,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(i3e,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(ht,{pt:2,children:"Click the button below to add a layer."})})})})}function s3e(){const{controls:e,onChange:t,state:n}=wf();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(ht,{p:2,pr:1,pt:6,children:C.jsx(o3e,{})})}),C.jsx(zn.Extras,{children:e})]})}function Cne(e){return C.jsx($1e,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function a3e({children:e}){return C.jsx(Ut,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var YC={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 - */YC.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,p=2,g=4,v=1,y=2,S=1,w=2,b=4,x=8,E=16,I=32,A=64,k=128,O=256,L=512,N=30,H="...",G=800,z=16,D=1,F=2,j=3,V=1/0,W=9007199254740991,K=17976931348623157e292,X=0/0,Q=4294967295,ie=Q-1,ce=Q>>>1,ue=[["ary",k],["bind",S],["bindKey",w],["curry",x],["curryRight",E],["flip",L],["partial",I],["partialRight",A],["rearg",O]],se="[object Arguments]",J="[object Array]",ae="[object AsyncFunction]",le="[object Boolean]",he="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",xe="[object GeneratorFunction]",me="[object Map]",be="[object Number]",Ze="[object Null]",Xe="[object Object]",ct="[object Promise]",Bt="[object Proxy]",Pe="[object RegExp]",ze="[object Set]",st="[object String]",gt="[object Symbol]",vt="[object Undefined]",_e="[object WeakMap]",je="[object WeakSet]",Ke="[object ArrayBuffer]",Fe="[object DataView]",Be="[object Float32Array]",Pt="[object Float64Array]",dt="[object Int8Array]",Ie="[object Int16Array]",at="[object Int32Array]",zt="[object Uint8Array]",Re="[object Uint8ClampedArray]",He="[object Uint16Array]",xt="[object Uint32Array]",Vt=/\b__p \+= '';/g,yn=/\b(__p \+=) '' \+/g,Yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hr=/&(?:amp|lt|gt|quot|#39);/g,Wr=/[&<>"']/g,Kr=RegExp(Hr.source),ui=RegExp(Wr.source),ps=/<%-([\s\S]+?)%>/g,td=/<%([\s\S]+?)%>/g,aa=/<%=([\s\S]+?)%>/g,_c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sc=/^\w*$/,If=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ms=/[\\^$.*+?()[\]{}|]/g,Rf=RegExp(ms.source),xo=/^\s+/,Ec=/\s/,Li=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gs=/\{\n\/\* \[wrapped with (.+)\] \*/,Pf=/,? & /,vs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ba=/[()=,{}\[\]\/\s]/,nd=/\\(\\)?/g,Kn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,Nl=/^[-+]0x[0-9a-f]+$/i,Bl=/^0b[01]+$/i,wo=/^\[object .+?Constructor\]$/,Hv=/^0o[0-7]+$/i,Wv=/^(?:0|[1-9]\d*)$/,en=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,tI=/['\n\r\u2028\u2029\\]/g,Cc="\\ud800-\\udfff",nI="\\u0300-\\u036f",rI="\\ufe20-\\ufe2f",iI="\\u20d0-\\u20ff",Gv=nI+rI+iI,Vv="\\u2700-\\u27bf",qv="a-z\\xdf-\\xf6\\xf8-\\xff",oI="\\xac\\xb1\\xd7\\xf7",sI="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aI="\\u2000-\\u206f",lI=" \\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",Xv="A-Z\\xc0-\\xd6\\xd8-\\xde",Yv="\\ufe0e\\ufe0f",Kv=oI+sI+aI+lI,Of="['’]",cI="["+Cc+"]",Qv="["+Kv+"]",Tc="["+Gv+"]",Jv="\\d+",uI="["+Vv+"]",Zv="["+qv+"]",ey="[^"+Cc+Kv+Jv+Vv+qv+Xv+"]",Mf="\\ud83c[\\udffb-\\udfff]",dI="(?:"+Tc+"|"+Mf+")",ty="[^"+Cc+"]",Df="(?:\\ud83c[\\udde6-\\uddff]){2}",Lf="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+Xv+"]",ny="\\u200d",ry="(?:"+Zv+"|"+ey+")",fI="(?:"+ys+"|"+ey+")",iy="(?:"+Of+"(?:d|ll|m|re|s|t|ve))?",oy="(?:"+Of+"(?:D|LL|M|RE|S|T|VE))?",sy=dI+"?",ay="["+Yv+"]?",hI="(?:"+ny+"(?:"+[ty,Df,Lf].join("|")+")"+ay+sy+")*",pI="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mI="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ly=ay+sy+hI,gI="(?:"+[uI,Df,Lf].join("|")+")"+ly,vI="(?:"+[ty+Tc+"?",Tc,Df,Lf,cI].join("|")+")",yI=RegExp(Of,"g"),bI=RegExp(Tc,"g"),Nf=RegExp(Mf+"(?="+Mf+")|"+vI+ly,"g"),xI=RegExp([ys+"?"+Zv+"+"+iy+"(?="+[Qv,ys,"$"].join("|")+")",fI+"+"+oy+"(?="+[Qv,ys+ry,"$"].join("|")+")",ys+"?"+ry+"+"+iy,ys+"+"+oy,mI,pI,Jv,gI].join("|"),"g"),wI=RegExp("["+ny+Cc+Gv+Yv+"]"),_I=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SI=["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"],EI=-1,Mt={};Mt[Be]=Mt[Pt]=Mt[dt]=Mt[Ie]=Mt[at]=Mt[zt]=Mt[Re]=Mt[He]=Mt[xt]=!0,Mt[se]=Mt[J]=Mt[Ke]=Mt[le]=Mt[Fe]=Mt[he]=Mt[ve]=Mt[ye]=Mt[me]=Mt[be]=Mt[Xe]=Mt[Pe]=Mt[ze]=Mt[st]=Mt[_e]=!1;var Tt={};Tt[se]=Tt[J]=Tt[Ke]=Tt[Fe]=Tt[le]=Tt[he]=Tt[Be]=Tt[Pt]=Tt[dt]=Tt[Ie]=Tt[at]=Tt[me]=Tt[be]=Tt[Xe]=Tt[Pe]=Tt[ze]=Tt[st]=Tt[gt]=Tt[zt]=Tt[Re]=Tt[He]=Tt[xt]=!0,Tt[ve]=Tt[ye]=Tt[_e]=!1;var CI={À:"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"},TI={"&":"&","<":"<",">":">",'"':""","'":"'"},kI={"&":"&","<":"<",">":">",""":'"',"'":"'"},AI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},II=parseFloat,RI=parseInt,cy=typeof $t=="object"&&$t&&$t.Object===Object&&$t,PI=typeof self=="object"&&self&&self.Object===Object&&self,pn=cy||PI||Function("return this")(),Bf=t&&!t.nodeType&&t,_o=Bf&&!0&&e&&!e.nodeType&&e,uy=_o&&_o.exports===Bf,$f=uy&&cy.process,dr=function(){try{var q=_o&&_o.require&&_o.require("util").types;return q||$f&&$f.binding&&$f.binding("util")}catch{}}(),dy=dr&&dr.isArrayBuffer,fy=dr&&dr.isDate,hy=dr&&dr.isMap,py=dr&&dr.isRegExp,my=dr&&dr.isSet,gy=dr&&dr.isTypedArray;function Qn(q,ee,Z){switch(Z.length){case 0:return q.call(ee);case 1:return q.call(ee,Z[0]);case 2:return q.call(ee,Z[0],Z[1]);case 3:return q.call(ee,Z[0],Z[1],Z[2])}return q.apply(ee,Z)}function OI(q,ee,Z,ge){for(var Le=-1,ft=q==null?0:q.length;++Le-1}function Ff(q,ee,Z){for(var ge=-1,Le=q==null?0:q.length;++ge-1;);return Z}function Ey(q,ee){for(var Z=q.length;Z--&&bs(ee,q[Z],0)>-1;);return Z}function jI(q,ee){for(var Z=q.length,ge=0;Z--;)q[Z]===ee&&++ge;return ge}var UI=Hf(CI),HI=Hf(TI);function WI(q){return"\\"+AI[q]}function GI(q,ee){return q==null?n:q[ee]}function xs(q){return wI.test(q)}function VI(q){return _I.test(q)}function qI(q){for(var ee,Z=[];!(ee=q.next()).done;)Z.push(ee.value);return Z}function qf(q){var ee=-1,Z=Array(q.size);return q.forEach(function(ge,Le){Z[++ee]=[Le,ge]}),Z}function Cy(q,ee){return function(Z){return q(ee(Z))}}function $i(q,ee){for(var Z=-1,ge=q.length,Le=0,ft=[];++Z-1}function DR(l,d){var m=this.__data__,_=Wc(m,l);return _<0?(++this.size,m.push([l,d])):m[_][1]=d,this}di.prototype.clear=RR,di.prototype.delete=PR,di.prototype.get=OR,di.prototype.has=MR,di.prototype.set=DR;function fi(l){var d=-1,m=l==null?0:l.length;for(this.clear();++d=d?l:d)),l}function mr(l,d,m,_,T,M){var B,U=d&h,Y=d&p,ne=d&g;if(m&&(B=T?m(l,_,T,M):m(l)),B!==n)return B;if(!jt(l))return l;var re=$e(l);if(re){if(B=$P(l),!U)return Nn(l,B)}else{var oe=_n(l),fe=oe==ye||oe==xe;if(Wi(l))return a0(l,U);if(oe==Xe||oe==se||fe&&!T){if(B=Y||fe?{}:T0(l),!U)return Y?kP(l,KR(B,l)):TP(l,By(B,l))}else{if(!Tt[oe])return T?l:{};B=FP(l,oe,U)}}M||(M=new Rr);var we=M.get(l);if(we)return we;M.set(l,B),tb(l)?l.forEach(function(Ae){B.add(mr(Ae,d,m,Ae,l,M))}):Z0(l)&&l.forEach(function(Ae,Je){B.set(Je,mr(Ae,d,m,Je,l,M))});var ke=ne?Y?bh:yh:Y?$n:sn,qe=re?n:ke(l);return fr(qe||l,function(Ae,Je){qe&&(Je=Ae,Ae=l[Je]),Wa(B,Je,mr(Ae,d,m,Je,l,M))}),B}function QR(l){var d=sn(l);return function(m){return $y(m,l,d)}}function $y(l,d,m){var _=m.length;if(l==null)return!_;for(l=St(l);_--;){var T=m[_],M=d[T],B=l[T];if(B===n&&!(T in l)||!M(B))return!1}return!0}function Fy(l,d,m){if(typeof l!="function")throw new hr(s);return Qa(function(){l.apply(n,m)},d)}function Ga(l,d,m,_){var T=-1,M=kc,B=!0,U=l.length,Y=[],ne=d.length;if(!U)return Y;m&&(d=Nt(d,Jn(m))),_?(M=Ff,B=!1):d.length>=i&&(M=$a,B=!1,d=new Co(d));e:for(;++TT?0:T+m),_=_===n||_>T?T:Ge(_),_<0&&(_+=T),_=m>_?0:rb(_);m<_;)l[m++]=d;return l}function jy(l,d){var m=[];return zi(l,function(_,T,M){d(_,T,M)&&m.push(_)}),m}function mn(l,d,m,_,T){var M=-1,B=l.length;for(m||(m=jP),T||(T=[]);++M0&&m(U)?d>1?mn(U,d-1,m,_,T):Bi(T,U):_||(T[T.length]=U)}return T}var eh=h0(),Uy=h0(!0);function Qr(l,d){return l&&eh(l,d,sn)}function th(l,d){return l&&Uy(l,d,sn)}function Vc(l,d){return Ni(d,function(m){return vi(l[m])})}function ko(l,d){d=Ui(d,l);for(var m=0,_=d.length;l!=null&&m<_;)l=l[Zr(d[m++])];return m&&m==_?l:n}function Hy(l,d,m){var _=d(l);return $e(l)?_:Bi(_,m(l))}function In(l){return l==null?l===n?vt:Ze:So&&So in St(l)?LP(l):XP(l)}function nh(l,d){return l>d}function eP(l,d){return l!=null&&bt.call(l,d)}function tP(l,d){return l!=null&&d in St(l)}function nP(l,d,m){return l>=wn(d,m)&&l=120&&re.length>=120)?new Co(B&&re):n}re=l[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==l&&Bc.call(U,Y,1),Bc.call(l,Y,1);return l}function Zy(l,d){for(var m=l?d.length:0,_=m-1;m--;){var T=d[m];if(m==_||T!==M){var M=T;gi(T)?Bc.call(l,T,1):dh(l,T)}}return l}function lh(l,d){return l+zc(My()*(d-l+1))}function mP(l,d,m,_){for(var T=-1,M=nn(Fc((d-l)/(m||1)),0),B=Z(M);M--;)B[_?M:++T]=l,l+=m;return B}function ch(l,d){var m="";if(!l||d<1||d>W)return m;do d%2&&(m+=l),d=zc(d/2),d&&(l+=l);while(d);return m}function Ye(l,d){return Th(I0(l,d,Fn),l+"")}function gP(l){return Ny(Ps(l))}function vP(l,d){var m=Ps(l);return ru(m,To(d,0,m.length))}function Xa(l,d,m,_){if(!jt(l))return l;d=Ui(d,l);for(var T=-1,M=d.length,B=M-1,U=l;U!=null&&++TT?0:T+d),m=m>T?T:m,m<0&&(m+=T),T=d>m?0:m-d>>>0,d>>>=0;for(var M=Z(T);++_>>1,B=l[M];B!==null&&!er(B)&&(m?B<=d:B=i){var ne=d?null:PP(l);if(ne)return Ic(ne);B=!1,T=$a,Y=new Co}else Y=d?[]:U;e:for(;++_=_?l:gr(l,d,m)}var s0=lR||function(l){return pn.clearTimeout(l)};function a0(l,d){if(d)return l.slice();var m=l.length,_=Ay?Ay(m):new l.constructor(m);return l.copy(_),_}function mh(l){var d=new l.constructor(l.byteLength);return new Lc(d).set(new Lc(l)),d}function _P(l,d){var m=d?mh(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function SP(l){var d=new l.constructor(l.source,lr.exec(l));return d.lastIndex=l.lastIndex,d}function EP(l){return Ha?St(Ha.call(l)):{}}function l0(l,d){var m=d?mh(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function c0(l,d){if(l!==d){var m=l!==n,_=l===null,T=l===l,M=er(l),B=d!==n,U=d===null,Y=d===d,ne=er(d);if(!U&&!ne&&!M&&l>d||M&&B&&Y&&!U&&!ne||_&&B&&Y||!m&&Y||!T)return 1;if(!_&&!M&&!ne&&l=U)return Y;var ne=m[_];return Y*(ne=="desc"?-1:1)}}return l.index-d.index}function u0(l,d,m,_){for(var T=-1,M=l.length,B=m.length,U=-1,Y=d.length,ne=nn(M-B,0),re=Z(Y+ne),oe=!_;++U1?m[T-1]:n,B=T>2?m[2]:n;for(M=l.length>3&&typeof M=="function"?(T--,M):n,B&&Rn(m[0],m[1],B)&&(M=T<3?n:M,T=1),d=St(d);++_-1?T[M?d[B]:B]:n}}function g0(l){return mi(function(d){var m=d.length,_=m,T=pr.prototype.thru;for(l&&d.reverse();_--;){var M=d[_];if(typeof M!="function")throw new hr(s);if(T&&!B&&tu(M)=="wrapper")var B=new pr([],!0)}for(_=B?_:m;++_1&&it.reverse(),re&&YU))return!1;var ne=M.get(l),re=M.get(d);if(ne&&re)return ne==d&&re==l;var oe=-1,fe=!0,we=m&y?new Co:n;for(M.set(l,d),M.set(d,l);++oe1?"& ":"")+d[_],d=d.join(m>2?", ":" "),l.replace(Li,`{ -/* [wrapped with `+d+`] */ -`)}function jP(l){return $e(l)||Ro(l)||!!(Py&&l&&l[Py])}function gi(l,d){var m=typeof l;return d=d??W,!!d&&(m=="number"||m!="symbol"&&Wv.test(l))&&l>-1&&l%1==0&&l0){if(++d>=G)return arguments[0]}else d=0;return l.apply(n,arguments)}}function ru(l,d){var m=-1,_=l.length,T=_-1;for(d=d===n?_:d;++m1?l[d-1]:n;return m=typeof m=="function"?(l.pop(),m):n,j0(l,m)});function U0(l){var d=P(l);return d.__chain__=!0,d}function J2(l,d){return d(l),l}function iu(l,d){return d(l)}var Z2=mi(function(l){var d=l.length,m=d?l[0]:0,_=this.__wrapped__,T=function(M){return Zf(M,l)};return d>1||this.__actions__.length||!(_ instanceof et)||!gi(m)?this.thru(T):(_=_.slice(m,+m+(d?1:0)),_.__actions__.push({func:iu,args:[T],thisArg:n}),new pr(_,this.__chain__).thru(function(M){return d&&!M.length&&M.push(n),M}))});function eO(){return U0(this)}function tO(){return new pr(this.value(),this.__chain__)}function nO(){this.__values__===n&&(this.__values__=nb(this.value()));var l=this.__index__>=this.__values__.length,d=l?n:this.__values__[this.__index__++];return{done:l,value:d}}function rO(){return this}function iO(l){for(var d,m=this;m instanceof Hc;){var _=L0(m);_.__index__=0,_.__values__=n,d?T.__wrapped__=_:d=_;var T=_;m=m.__wrapped__}return T.__wrapped__=l,d}function oO(){var l=this.__wrapped__;if(l instanceof et){var d=l;return this.__actions__.length&&(d=new et(this)),d=d.reverse(),d.__actions__.push({func:iu,args:[kh],thisArg:n}),new pr(d,this.__chain__)}return this.thru(kh)}function sO(){return i0(this.__wrapped__,this.__actions__)}var aO=Kc(function(l,d,m){bt.call(l,m)?++l[m]:hi(l,m,1)});function lO(l,d,m){var _=$e(l)?vy:JR;return m&&Rn(l,d,m)&&(d=n),_(l,Te(d,3))}function cO(l,d){var m=$e(l)?Ni:jy;return m(l,Te(d,3))}var uO=m0(N0),dO=m0(B0);function fO(l,d){return mn(ou(l,d),1)}function hO(l,d){return mn(ou(l,d),V)}function pO(l,d,m){return m=m===n?1:Ge(m),mn(ou(l,d),m)}function H0(l,d){var m=$e(l)?fr:zi;return m(l,Te(d,3))}function W0(l,d){var m=$e(l)?MI:zy;return m(l,Te(d,3))}var mO=Kc(function(l,d,m){bt.call(l,m)?l[m].push(d):hi(l,m,[d])});function gO(l,d,m,_){l=Bn(l)?l:Ps(l),m=m&&!_?Ge(m):0;var T=l.length;return m<0&&(m=nn(T+m,0)),uu(l)?m<=T&&l.indexOf(d,m)>-1:!!T&&bs(l,d,m)>-1}var vO=Ye(function(l,d,m){var _=-1,T=typeof d=="function",M=Bn(l)?Z(l.length):[];return zi(l,function(B){M[++_]=T?Qn(d,B,m):Va(B,d,m)}),M}),yO=Kc(function(l,d,m){hi(l,m,d)});function ou(l,d){var m=$e(l)?Nt:qy;return m(l,Te(d,3))}function bO(l,d,m,_){return l==null?[]:($e(d)||(d=d==null?[]:[d]),m=_?n:m,$e(m)||(m=m==null?[]:[m]),Qy(l,d,m))}var xO=Kc(function(l,d,m){l[m?0:1].push(d)},function(){return[[],[]]});function wO(l,d,m){var _=$e(l)?zf:wy,T=arguments.length<3;return _(l,Te(d,4),m,T,zi)}function _O(l,d,m){var _=$e(l)?DI:wy,T=arguments.length<3;return _(l,Te(d,4),m,T,zy)}function SO(l,d){var m=$e(l)?Ni:jy;return m(l,lu(Te(d,3)))}function EO(l){var d=$e(l)?Ny:gP;return d(l)}function CO(l,d,m){(m?Rn(l,d,m):d===n)?d=1:d=Ge(d);var _=$e(l)?qR:vP;return _(l,d)}function TO(l){var d=$e(l)?XR:bP;return d(l)}function kO(l){if(l==null)return 0;if(Bn(l))return uu(l)?ws(l):l.length;var d=_n(l);return d==me||d==ze?l.size:oh(l).length}function AO(l,d,m){var _=$e(l)?jf:xP;return m&&Rn(l,d,m)&&(d=n),_(l,Te(d,3))}var IO=Ye(function(l,d){if(l==null)return[];var m=d.length;return m>1&&Rn(l,d[0],d[1])?d=[]:m>2&&Rn(d[0],d[1],d[2])&&(d=[d[0]]),Qy(l,mn(d,1),[])}),su=cR||function(){return pn.Date.now()};function RO(l,d){if(typeof d!="function")throw new hr(s);return l=Ge(l),function(){if(--l<1)return d.apply(this,arguments)}}function G0(l,d,m){return d=m?n:d,d=l&&d==null?l.length:d,pi(l,k,n,n,n,n,d)}function V0(l,d){var m;if(typeof d!="function")throw new hr(s);return l=Ge(l),function(){return--l>0&&(m=d.apply(this,arguments)),l<=1&&(d=n),m}}var Ih=Ye(function(l,d,m){var _=S;if(m.length){var T=$i(m,Is(Ih));_|=I}return pi(l,_,d,m,T)}),q0=Ye(function(l,d,m){var _=S|w;if(m.length){var T=$i(m,Is(q0));_|=I}return pi(d,_,l,m,T)});function X0(l,d,m){d=m?n:d;var _=pi(l,x,n,n,n,n,n,d);return _.placeholder=X0.placeholder,_}function Y0(l,d,m){d=m?n:d;var _=pi(l,E,n,n,n,n,n,d);return _.placeholder=Y0.placeholder,_}function K0(l,d,m){var _,T,M,B,U,Y,ne=0,re=!1,oe=!1,fe=!0;if(typeof l!="function")throw new hr(s);d=yr(d)||0,jt(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?nn(yr(m.maxWait)||0,d):M,fe="trailing"in m?!!m.trailing:fe);function we(Kt){var Or=_,bi=T;return _=T=n,ne=Kt,B=l.apply(bi,Or),B}function ke(Kt){return ne=Kt,U=Qa(Je,d),re?we(Kt):B}function qe(Kt){var Or=Kt-Y,bi=Kt-ne,mb=d-Or;return oe?wn(mb,M-bi):mb}function Ae(Kt){var Or=Kt-Y,bi=Kt-ne;return Y===n||Or>=d||Or<0||oe&&bi>=M}function Je(){var Kt=su();if(Ae(Kt))return it(Kt);U=Qa(Je,qe(Kt))}function it(Kt){return U=n,fe&&_?we(Kt):(_=T=n,B)}function tr(){U!==n&&s0(U),ne=0,_=Y=T=U=n}function Pn(){return U===n?B:it(su())}function nr(){var Kt=su(),Or=Ae(Kt);if(_=arguments,T=this,Y=Kt,Or){if(U===n)return ke(Y);if(oe)return s0(U),U=Qa(Je,d),we(Y)}return U===n&&(U=Qa(Je,d)),B}return nr.cancel=tr,nr.flush=Pn,nr}var PO=Ye(function(l,d){return Fy(l,1,d)}),OO=Ye(function(l,d,m){return Fy(l,yr(d)||0,m)});function MO(l){return pi(l,L)}function au(l,d){if(typeof l!="function"||d!=null&&typeof d!="function")throw new hr(s);var m=function(){var _=arguments,T=d?d.apply(this,_):_[0],M=m.cache;if(M.has(T))return M.get(T);var B=l.apply(this,_);return m.cache=M.set(T,B)||M,B};return m.cache=new(au.Cache||fi),m}au.Cache=fi;function lu(l){if(typeof l!="function")throw new hr(s);return function(){var d=arguments;switch(d.length){case 0:return!l.call(this);case 1:return!l.call(this,d[0]);case 2:return!l.call(this,d[0],d[1]);case 3:return!l.call(this,d[0],d[1],d[2])}return!l.apply(this,d)}}function DO(l){return V0(2,l)}var LO=wP(function(l,d){d=d.length==1&&$e(d[0])?Nt(d[0],Jn(Te())):Nt(mn(d,1),Jn(Te()));var m=d.length;return Ye(function(_){for(var T=-1,M=wn(_.length,m);++T=d}),Ro=Wy(function(){return arguments}())?Wy:function(l){return Ht(l)&&bt.call(l,"callee")&&!Ry.call(l,"callee")},$e=Z.isArray,KO=dy?Jn(dy):iP;function Bn(l){return l!=null&&cu(l.length)&&!vi(l)}function Yt(l){return Ht(l)&&Bn(l)}function QO(l){return l===!0||l===!1||Ht(l)&&In(l)==le}var Wi=dR||jh,JO=fy?Jn(fy):oP;function ZO(l){return Ht(l)&&l.nodeType===1&&!Ja(l)}function eM(l){if(l==null)return!0;if(Bn(l)&&($e(l)||typeof l=="string"||typeof l.splice=="function"||Wi(l)||Rs(l)||Ro(l)))return!l.length;var d=_n(l);if(d==me||d==ze)return!l.size;if(Ka(l))return!oh(l).length;for(var m in l)if(bt.call(l,m))return!1;return!0}function tM(l,d){return qa(l,d)}function nM(l,d,m){m=typeof m=="function"?m:n;var _=m?m(l,d):n;return _===n?qa(l,d,n,m):!!_}function Ph(l){if(!Ht(l))return!1;var d=In(l);return d==ve||d==pe||typeof l.message=="string"&&typeof l.name=="string"&&!Ja(l)}function rM(l){return typeof l=="number"&&Oy(l)}function vi(l){if(!jt(l))return!1;var d=In(l);return d==ye||d==xe||d==ae||d==Bt}function J0(l){return typeof l=="number"&&l==Ge(l)}function cu(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function jt(l){var d=typeof l;return l!=null&&(d=="object"||d=="function")}function Ht(l){return l!=null&&typeof l=="object"}var Z0=hy?Jn(hy):aP;function iM(l,d){return l===d||ih(l,d,wh(d))}function oM(l,d,m){return m=typeof m=="function"?m:n,ih(l,d,wh(d),m)}function sM(l){return eb(l)&&l!=+l}function aM(l){if(WP(l))throw new Le(o);return Gy(l)}function lM(l){return l===null}function cM(l){return l==null}function eb(l){return typeof l=="number"||Ht(l)&&In(l)==be}function Ja(l){if(!Ht(l)||In(l)!=Xe)return!1;var d=Nc(l);if(d===null)return!0;var m=bt.call(d,"constructor")&&d.constructor;return typeof m=="function"&&m instanceof m&&Oc.call(m)==oR}var Oh=py?Jn(py):lP;function uM(l){return J0(l)&&l>=-W&&l<=W}var tb=my?Jn(my):cP;function uu(l){return typeof l=="string"||!$e(l)&&Ht(l)&&In(l)==st}function er(l){return typeof l=="symbol"||Ht(l)&&In(l)==gt}var Rs=gy?Jn(gy):uP;function dM(l){return l===n}function fM(l){return Ht(l)&&_n(l)==_e}function hM(l){return Ht(l)&&In(l)==je}var pM=eu(sh),mM=eu(function(l,d){return l<=d});function nb(l){if(!l)return[];if(Bn(l))return uu(l)?Ir(l):Nn(l);if(Fa&&l[Fa])return qI(l[Fa]());var d=_n(l),m=d==me?qf:d==ze?Ic:Ps;return m(l)}function yi(l){if(!l)return l===0?l:0;if(l=yr(l),l===V||l===-V){var d=l<0?-1:1;return d*K}return l===l?l:0}function Ge(l){var d=yi(l),m=d%1;return d===d?m?d-m:d:0}function rb(l){return l?To(Ge(l),0,Q):0}function yr(l){if(typeof l=="number")return l;if(er(l))return X;if(jt(l)){var d=typeof l.valueOf=="function"?l.valueOf():l;l=jt(d)?d+"":d}if(typeof l!="string")return l===0?l:+l;l=_y(l);var m=Bl.test(l);return m||Hv.test(l)?RI(l.slice(2),m?2:8):Nl.test(l)?X:+l}function ib(l){return Jr(l,$n(l))}function gM(l){return l?To(Ge(l),-W,W):l===0?l:0}function pt(l){return l==null?"":Zn(l)}var vM=ks(function(l,d){if(Ka(d)||Bn(d)){Jr(d,sn(d),l);return}for(var m in d)bt.call(d,m)&&Wa(l,m,d[m])}),ob=ks(function(l,d){Jr(d,$n(d),l)}),du=ks(function(l,d,m,_){Jr(d,$n(d),l,_)}),yM=ks(function(l,d,m,_){Jr(d,sn(d),l,_)}),bM=mi(Zf);function xM(l,d){var m=Ts(l);return d==null?m:By(m,d)}var wM=Ye(function(l,d){l=St(l);var m=-1,_=d.length,T=_>2?d[2]:n;for(T&&Rn(d[0],d[1],T)&&(_=1);++m<_;)for(var M=d[m],B=$n(M),U=-1,Y=B.length;++U1),M}),Jr(l,bh(l),m),_&&(m=mr(m,h|p|g,OP));for(var T=d.length;T--;)dh(m,d[T]);return m});function FM(l,d){return ab(l,lu(Te(d)))}var zM=mi(function(l,d){return l==null?{}:hP(l,d)});function ab(l,d){if(l==null)return{};var m=Nt(bh(l),function(_){return[_]});return d=Te(d),Jy(l,m,function(_,T){return d(_,T[0])})}function jM(l,d,m){d=Ui(d,l);var _=-1,T=d.length;for(T||(T=1,l=n);++_d){var _=l;l=d,d=_}if(m||l%1||d%1){var T=My();return wn(l+T*(d-l+II("1e-"+((T+"").length-1))),d)}return lh(l,d)}var JM=As(function(l,d,m){return d=d.toLowerCase(),l+(m?ub(d):d)});function ub(l){return Lh(pt(l).toLowerCase())}function db(l){return l=pt(l),l&&l.replace(en,UI).replace(bI,"")}function ZM(l,d,m){l=pt(l),d=Zn(d);var _=l.length;m=m===n?_:To(Ge(m),0,_);var T=m;return m-=d.length,m>=0&&l.slice(m,T)==d}function eD(l){return l=pt(l),l&&ui.test(l)?l.replace(Wr,HI):l}function tD(l){return l=pt(l),l&&Rf.test(l)?l.replace(ms,"\\$&"):l}var nD=As(function(l,d,m){return l+(m?"-":"")+d.toLowerCase()}),rD=As(function(l,d,m){return l+(m?" ":"")+d.toLowerCase()}),iD=p0("toLowerCase");function oD(l,d,m){l=pt(l),d=Ge(d);var _=d?ws(l):0;if(!d||_>=d)return l;var T=(d-_)/2;return Zc(zc(T),m)+l+Zc(Fc(T),m)}function sD(l,d,m){l=pt(l),d=Ge(d);var _=d?ws(l):0;return d&&_>>0,m?(l=pt(l),l&&(typeof d=="string"||d!=null&&!Oh(d))&&(d=Zn(d),!d&&xs(l))?Hi(Ir(l),0,m):l.split(d,m)):[]}var hD=As(function(l,d,m){return l+(m?" ":"")+Lh(d)});function pD(l,d,m){return l=pt(l),m=m==null?0:To(Ge(m),0,l.length),d=Zn(d),l.slice(m,m+d.length)==d}function mD(l,d,m){var _=P.templateSettings;m&&Rn(l,d,m)&&(d=n),l=pt(l),d=du({},d,_,w0);var T=du({},d.imports,_.imports,w0),M=sn(T),B=Vf(T,M),U,Y,ne=0,re=d.interpolate||Ar,oe="__p += '",fe=Xf((d.escape||Ar).source+"|"+re.source+"|"+(re===aa?Kn:Ar).source+"|"+(d.evaluate||Ar).source+"|$","g"),we="//# sourceURL="+(bt.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EI+"]")+` -`;l.replace(fe,function(Ae,Je,it,tr,Pn,nr){return it||(it=tr),oe+=l.slice(ne,nr).replace(tI,WI),Je&&(U=!0,oe+=`' + -__e(`+Je+`) + -'`),Pn&&(Y=!0,oe+=`'; -`+Pn+`; -__p += '`),it&&(oe+=`' + -((__t = (`+it+`)) == null ? '' : __t) + -'`),ne=nr+Ae.length,Ae}),oe+=`'; -`;var ke=bt.call(d,"variable")&&d.variable;if(!ke)oe=`with (obj) { -`+oe+` -} -`;else if(Ba.test(ke))throw new Le(a);oe=(Y?oe.replace(Vt,""):oe).replace(yn,"$1").replace(Yr,"$1;"),oe="function("+(ke||"obj")+`) { -`+(ke?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+oe+`return __p -}`;var qe=hb(function(){return ft(M,we+"return "+oe).apply(n,B)});if(qe.source=oe,Ph(qe))throw qe;return qe}function gD(l){return pt(l).toLowerCase()}function vD(l){return pt(l).toUpperCase()}function yD(l,d,m){if(l=pt(l),l&&(m||d===n))return _y(l);if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Ir(d),M=Sy(_,T),B=Ey(_,T)+1;return Hi(_,M,B).join("")}function bD(l,d,m){if(l=pt(l),l&&(m||d===n))return l.slice(0,Ty(l)+1);if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Ey(_,Ir(d))+1;return Hi(_,0,T).join("")}function xD(l,d,m){if(l=pt(l),l&&(m||d===n))return l.replace(xo,"");if(!l||!(d=Zn(d)))return l;var _=Ir(l),T=Sy(_,Ir(d));return Hi(_,T).join("")}function wD(l,d){var m=N,_=H;if(jt(d)){var T="separator"in d?d.separator:T;m="length"in d?Ge(d.length):m,_="omission"in d?Zn(d.omission):_}l=pt(l);var M=l.length;if(xs(l)){var B=Ir(l);M=B.length}if(m>=M)return l;var U=m-ws(_);if(U<1)return _;var Y=B?Hi(B,0,U).join(""):l.slice(0,U);if(T===n)return Y+_;if(B&&(U+=Y.length-U),Oh(T)){if(l.slice(U).search(T)){var ne,re=Y;for(T.global||(T=Xf(T.source,pt(lr.exec(T))+"g")),T.lastIndex=0;ne=T.exec(re);)var oe=ne.index;Y=Y.slice(0,oe===n?U:oe)}}else if(l.indexOf(Zn(T),U)!=U){var fe=Y.lastIndexOf(T);fe>-1&&(Y=Y.slice(0,fe))}return Y+_}function _D(l){return l=pt(l),l&&Kr.test(l)?l.replace(Hr,QI):l}var SD=As(function(l,d,m){return l+(m?" ":"")+d.toUpperCase()}),Lh=p0("toUpperCase");function fb(l,d,m){return l=pt(l),d=m?n:d,d===n?VI(l)?eR(l):BI(l):l.match(d)||[]}var hb=Ye(function(l,d){try{return Qn(l,n,d)}catch(m){return Ph(m)?m:new Le(m)}}),ED=mi(function(l,d){return fr(d,function(m){m=Zr(m),hi(l,m,Ih(l[m],l))}),l});function CD(l){var d=l==null?0:l.length,m=Te();return l=d?Nt(l,function(_){if(typeof _[1]!="function")throw new hr(s);return[m(_[0]),_[1]]}):[],Ye(function(_){for(var T=-1;++TW)return[];var m=Q,_=wn(l,Q);d=Te(d),l-=Q;for(var T=Gf(_,d);++m0||d<0)?new et(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),d!==n&&(d=Ge(d),m=d<0?m.dropRight(-d):m.take(d-l)),m)},et.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},et.prototype.toArray=function(){return this.take(Q)},Qr(et.prototype,function(l,d){var m=/^(?:filter|find|map|reject)|While$/.test(d),_=/^(?:head|last)$/.test(d),T=P[_?"take"+(d=="last"?"Right":""):d],M=_||/^find/.test(d);T&&(P.prototype[d]=function(){var B=this.__wrapped__,U=_?[1]:arguments,Y=B instanceof et,ne=U[0],re=Y||$e(B),oe=function(Je){var it=T.apply(P,Bi([Je],U));return _&&fe?it[0]:it};re&&m&&typeof ne=="function"&&ne.length!=1&&(Y=re=!1);var fe=this.__chain__,we=!!this.__actions__.length,ke=M&&!fe,qe=Y&&!we;if(!M&&re){B=qe?B:new et(this);var Ae=l.apply(B,U);return Ae.__actions__.push({func:iu,args:[oe],thisArg:n}),new pr(Ae,fe)}return ke&&qe?l.apply(this,U):(Ae=this.thru(oe),ke?_?Ae.value()[0]:Ae.value():Ae)})}),fr(["pop","push","shift","sort","splice","unshift"],function(l){var d=Rc[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",_=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var T=arguments;if(_&&!this.__chain__){var M=this.value();return d.apply($e(M)?M:[],T)}return this[m](function(B){return d.apply($e(B)?B:[],T)})}}),Qr(et.prototype,function(l,d){var m=P[d];if(m){var _=m.name+"";bt.call(Cs,_)||(Cs[_]=[]),Cs[_].push({name:d,func:m})}}),Cs[Qc(n,w).name]=[{name:"wrapper",func:n}],et.prototype.clone=_R,et.prototype.reverse=SR,et.prototype.value=ER,P.prototype.at=Z2,P.prototype.chain=eO,P.prototype.commit=tO,P.prototype.next=nO,P.prototype.plant=iO,P.prototype.reverse=oO,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=sO,P.prototype.first=P.prototype.head,Fa&&(P.prototype[Fa]=rO),P},_s=tR();_o?((_o.exports=_s)._=_s,Bf._=_s):pn._=_s}).call($t)})(YC,YC.exports);var Qt=YC.exports;let l3e=(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 dm=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(dm||{}),Tne=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Tne||{}),i5=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(i5||{}),Lt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Lt||{}),Jl=(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))(Jl||{}),Ve=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Ve||{}),Cg=(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))(Cg||{}),Ot=(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))(Ot||{}),o5=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(o5||{}),Au=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Au||{}),Jd=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Jd||{}),pc=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(pc||{}),Ll=(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))(Ll||{}),ql=(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))(ql||{}),pU=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(pU||{}),wa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(wa||{}),xi=(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))(xi||{}),ri=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(ri||{}),lc=(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))(lc||{});const c3e={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")},rt={ADAPTER:c3e,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var MB=/iPhone/i,f7=/iPod/i,h7=/iPad/i,p7=/\biOS-universal(?:.+)Mac\b/i,DB=/\bAndroid(?:.+)Mobile\b/i,m7=/Android/i,Sm=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,dS=/Silk/i,mu=/Windows Phone/i,g7=/\bWindows(?:.+)ARM\b/i,v7=/BlackBerry/i,y7=/BB10/i,b7=/Opera Mini/i,x7=/\b(CriOS|Chrome)(?:.+)Mobile/i,w7=/Mobile(?:.+)Firefox\b/i,_7=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function u3e(e){return function(t){return t.test(e)}}function S7(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);var i=u3e(n),o={apple:{phone:i(MB)&&!i(mu),ipod:i(f7),tablet:!i(MB)&&(i(h7)||_7(t))&&!i(mu),universal:i(p7),device:(i(MB)||i(f7)||i(h7)||i(p7)||_7(t))&&!i(mu)},amazon:{phone:i(Sm),tablet:!i(Sm)&&i(dS),device:i(Sm)||i(dS)},android:{phone:!i(mu)&&i(Sm)||!i(mu)&&i(DB),tablet:!i(mu)&&!i(Sm)&&!i(DB)&&(i(dS)||i(m7)),device:!i(mu)&&(i(Sm)||i(dS)||i(DB)||i(m7))||i(/\bokhttp\b/i)},windows:{phone:i(mu),tablet:i(g7),device:i(mu)||i(g7)},other:{blackberry:i(v7),blackberry10:i(y7),opera:i(b7),firefox:i(w7),chrome:i(x7),device:i(v7)||i(y7)||i(b7)||i(w7)||i(x7)},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 d3e=S7.default??S7,Iu=d3e(globalThis.navigator);rt.RETINA_PREFIX=/@([0-9\.]+)x/;rt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var kne={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,u,f){this.fn=c,this.context=u,this.once=f||!1}function o(c,u,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+u:u;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,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],f,h;if(this._eventsCount===0)return u;for(h in f=this._events)t.call(f,h)&&u.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},a.prototype.listeners=function(u){var f=n?n+u:u,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){a=u=e[0],c=f=e[1];for(var v=n;vu&&(u=h),p>f&&(f=p);g=Math.max(u-a,f-c),g=g!==0?32767/g:0}return Z1(o,s,n,a,c,g,0),s}function Ane(e,t,n,r,i){var o,s;if(i===l5(e,t,n,r)>0)for(o=t;o=t;o-=r)s=E7(o,e[o],e[o+1],s);return s&&RA(s,s.next)&&(tw(s),s=s.next),s}function Yp(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(RA(n,n.next)||$r(n.prev,n,n.next)===0)){if(tw(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Z1(e,t,n,r,i,o,s){if(e){!s&&o&&_3e(e,r,i,o);for(var a=e,c,u;e.prev!==e.next;){if(c=e.prev,u=e.next,o?p3e(e,r,i,o):h3e(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),tw(e),e=u.next,a=u.next;continue}if(e=u,e===a){s?s===1?(e=m3e(Yp(e),t,n),Z1(e,t,n,r,i,o,2)):s===2&&g3e(e,t,n,r,i,o):Z1(Yp(e),t,n,r,i,o,1);break}}}}function h3e(e){var t=e.prev,n=e,r=e.next;if($r(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,s=r.x,a=t.y,c=n.y,u=r.y,f=io?i>s?i:s:o>s?o:s,g=a>c?a>u?a:u:c>u?c:u,v=r.next;v!==t;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=g&&dg(i,a,o,c,s,u,v.x,v.y)&&$r(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function p3e(e,t,n,r){var i=e.prev,o=e,s=e.next;if($r(i,o,s)>=0)return!1;for(var a=i.x,c=o.x,u=s.x,f=i.y,h=o.y,p=s.y,g=ac?a>u?a:u:c>u?c:u,S=f>h?f>p?f:p:h>p?h:p,w=s5(g,v,t,n,r),b=s5(y,S,t,n,r),x=e.prevZ,E=e.nextZ;x&&x.z>=w&&E&&E.z<=b;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&dg(a,f,c,h,u,p,x.x,x.y)&&$r(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&&dg(a,f,c,h,u,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;x&&x.z>=w;){if(x.x>=g&&x.x<=y&&x.y>=v&&x.y<=S&&x!==i&&x!==s&&dg(a,f,c,h,u,p,x.x,x.y)&&$r(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;E&&E.z<=b;){if(E.x>=g&&E.x<=y&&E.y>=v&&E.y<=S&&E!==i&&E!==s&&dg(a,f,c,h,u,p,E.x,E.y)&&$r(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function m3e(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!RA(i,o)&&Ine(i,r,r.next,o)&&ew(i,o)&&ew(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),tw(r),tw(r.next),r=e=o),r=r.next}while(r!==e);return Yp(r)}function g3e(e,t,n,r,i,o){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&C3e(s,a)){var c=Rne(s,a);s=Yp(s,s.next),c=Yp(c,c.next),Z1(s,t,n,r,i,o,0),Z1(c,t,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==e)}function v3e(e,t,n,r){var i=[],o,s,a,c,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,s=n.x=n.x&&n.x>=u&&r!==n.x&&dg(is.x||n.x===s.x&&w3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function w3e(e,t){return $r(e.prev,e,t.prev)<0&&$r(t.next,e,e.next)<0}function _3e(e,t,n,r){var i=e;do i.z===0&&(i.z=s5(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,S3e(i)}function S3e(e){var t,n,r,i,o,s,a,c,u=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t0||c>0&&r;)a!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(s>1);return e}function s5(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 E3e(e){var t=e,n=e;do(t.x=(e-s)*(o-a)&&(e-s)*(r-a)>=(n-s)*(t-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function C3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!T3e(e,t)&&(ew(e,t)&&ew(t,e)&&k3e(e,t)&&($r(e.prev,e,t.prev)||$r(e,t.prev,t))||RA(e,t)&&$r(e.prev,e,e.next)>0&&$r(t.prev,t,t.next)>0)}function $r(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function RA(e,t){return e.x===t.x&&e.y===t.y}function Ine(e,t,n,r){var i=hS($r(e,t,n)),o=hS($r(e,t,r)),s=hS($r(n,r,e)),a=hS($r(n,r,t));return!!(i!==o&&s!==a||i===0&&fS(e,n,t)||o===0&&fS(e,r,t)||s===0&&fS(n,e,r)||a===0&&fS(n,t,r))}function fS(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 hS(e){return e>0?1:e<0?-1:0}function T3e(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&&Ine(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function ew(e,t){return $r(e.prev,e,e.next)<0?$r(e,t,e.next)>=0&&$r(e,e.prev,t)>=0:$r(e,t,e.prev)<0||$r(e,e.next,t)<0}function k3e(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 Rne(e,t){var n=new a5(e.i,e.x,e.y),r=new a5(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 E7(e,t,n,r){var i=new a5(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 tw(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 a5(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}IA.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(l5(e,0,o,n));if(i)for(var a=0,c=t.length;a0&&(r+=e[i-1].length,n.holes.push(r))}return n};var A3e=mU.exports;const I3e=ds(A3e);var KC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */KC.exports;(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof $t=="object"&&$t;(o.global===o||o.window===o||o.self===o)&&(n=o);var s,a=2147483647,c=36,u=1,f=26,h=38,p=700,g=72,v=128,y="-",S=/^xn--/,w=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-u,I=Math.floor,A=String.fromCharCode,k;function O(X){throw new RangeError(x[X])}function L(X,Q){for(var ie=X.length,ce=[];ie--;)ce[ie]=Q(X[ie]);return ce}function N(X,Q){var ie=X.split("@"),ce="";ie.length>1&&(ce=ie[0]+"@",X=ie[1]),X=X.replace(b,".");var ue=X.split("."),se=L(ue,Q).join(".");return ce+se}function H(X){for(var Q=[],ie=0,ce=X.length,ue,se;ie=55296&&ue<=56319&&ie65535&&(Q-=65536,ie+=A(Q>>>10&1023|55296),Q=56320|Q&1023),ie+=A(Q),ie}).join("")}function z(X){return X-48<10?X-22:X-65<26?X-65:X-97<26?X-97:c}function D(X,Q){return X+22+75*(X<26)-((Q!=0)<<5)}function F(X,Q,ie){var ce=0;for(X=ie?I(X/p):X>>1,X+=I(X/Q);X>E*f>>1;ce+=c)X=I(X/E);return I(ce+(E+1)*X/(X+h))}function j(X){var Q=[],ie=X.length,ce,ue=0,se=v,J=g,ae,le,he,pe,ve,ye,xe,me,be;for(ae=X.lastIndexOf(y),ae<0&&(ae=0),le=0;le=128&&O("not-basic"),Q.push(X.charCodeAt(le));for(he=ae>0?ae+1:0;he=ie&&O("invalid-input"),xe=z(X.charCodeAt(he++)),(xe>=c||xe>I((a-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=J?u:ye>=J+f?f:ye-J,!(xeI(a/be)&&O("overflow"),ve*=be;ce=Q.length+1,J=F(ue-pe,ce,pe==0),I(ue/ce)>a-se&&O("overflow"),se+=I(ue/ce),ue%=ce,Q.splice(ue++,0,se)}return G(Q)}function V(X){var Q,ie,ce,ue,se,J,ae,le,he,pe,ve,ye=[],xe,me,be,Ze;for(X=H(X),xe=X.length,Q=v,ie=0,se=g,J=0;J=Q&&veI((a-ie)/me)&&O("overflow"),ie+=(ae-Q)*me,Q=ae,J=0;Ja&&O("overflow"),ve==Q){for(le=ie,he=c;pe=he<=se?u:he>=se+f?f:he-se,!(le"u"||!ki?dn:ki(Uint8Array),Rp={"%AggregateError%":typeof AggregateError>"u"?dn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?dn:ArrayBuffer,"%ArrayIteratorPrototype%":Em&&ki?ki([][Symbol.iterator]()):dn,"%AsyncFromSyncIteratorPrototype%":dn,"%AsyncFunction%":Nm,"%AsyncGenerator%":Nm,"%AsyncGeneratorFunction%":Nm,"%AsyncIteratorPrototype%":Nm,"%Atomics%":typeof Atomics>"u"?dn:Atomics,"%BigInt%":typeof BigInt>"u"?dn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?dn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?dn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?dn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?dn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?dn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?dn:FinalizationRegistry,"%Function%":Pne,"%GeneratorFunction%":Nm,"%Int8Array%":typeof Int8Array>"u"?dn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?dn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?dn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Em&&ki?ki(ki([][Symbol.iterator]())):dn,"%JSON%":typeof JSON=="object"?JSON:dn,"%Map%":typeof Map>"u"?dn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Em||!ki?dn:ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?dn:Promise,"%Proxy%":typeof Proxy>"u"?dn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?dn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?dn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Em||!ki?dn:ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?dn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Em&&ki?ki(""[Symbol.iterator]()):dn,"%Symbol%":Em?Symbol:dn,"%SyntaxError%":lv,"%ThrowTypeError%":H3e,"%TypedArray%":G3e,"%TypeError%":Tg,"%Uint8Array%":typeof Uint8Array>"u"?dn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?dn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?dn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?dn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?dn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?dn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?dn:WeakSet};if(ki)try{null.error}catch(e){var V3e=ki(ki(e));Rp["%Error.prototype%"]=V3e}var q3e=function e(t){var n;if(t==="%AsyncFunction%")n=NB("async function () {}");else if(t==="%GeneratorFunction%")n=NB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=NB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ki&&(n=ki(i.prototype))}return Rp[t]=n,n},k7={"%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"]},Kw=gU,QC=U3e,X3e=Kw.call(Function.call,Array.prototype.concat),Y3e=Kw.call(Function.apply,Array.prototype.splice),A7=Kw.call(Function.call,String.prototype.replace),JC=Kw.call(Function.call,String.prototype.slice),K3e=Kw.call(Function.call,RegExp.prototype.exec),Q3e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J3e=/\\(\\)?/g,Z3e=function(t){var n=JC(t,0,1),r=JC(t,-1);if(n==="%"&&r!=="%")throw new lv("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new lv("invalid intrinsic syntax, expected opening `%`");var i=[];return A7(t,Q3e,function(o,s,a,c){i[i.length]=a?A7(c,J3e,"$1"):s||o}),i},e5e=function(t,n){var r=t,i;if(QC(k7,r)&&(i=k7[r],r="%"+i[0]+"%"),QC(Rp,r)){var o=Rp[r];if(o===Nm&&(o=q3e(r)),typeof o>"u"&&!n)throw new Tg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new lv("intrinsic "+t+" does not exist!")},vU=function(t,n){if(typeof t!="string"||t.length===0)throw new Tg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Tg('"allowMissing" argument must be a boolean');if(K3e(/^%?[^%]*%?$/,t)===null)throw new lv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Z3e(t),i=r.length>0?r[0]:"",o=e5e("%"+i+"%",n),s=o.name,a=o.value,c=!1,u=o.alias;u&&(i=u[0],Y3e(r,X3e([0,1],u)));for(var f=1,h=!0;f=r.length){var y=Ip(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=QC(a,p),a=a[p];h&&!c&&(Rp[s]=a)}}return a},One={exports:{}};(function(e){var t=gU,n=vU,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var g=s(p,"length");g.configurable&&a(p,"length",{value:1+c(0,h.length-(arguments.length-1))})}return p};var u=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:u}):e.exports.apply=u})(One);var t5e=One.exports,Mne=vU,Dne=t5e,n5e=Dne(Mne("String.prototype.indexOf")),r5e=function(t,n){var r=Mne(t,!!n);return typeof r=="function"&&n5e(t,".prototype.")>-1?Dne(r):r};const i5e={},o5e=Object.freeze(Object.defineProperty({__proto__:null,default:i5e},Symbol.toStringTag,{value:"Module"})),Lne=c4(o5e);var yU=typeof Map=="function"&&Map.prototype,$B=Object.getOwnPropertyDescriptor&&yU?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ZC=yU&&$B&&typeof $B.get=="function"?$B.get:null,I7=yU&&Map.prototype.forEach,bU=typeof Set=="function"&&Set.prototype,FB=Object.getOwnPropertyDescriptor&&bU?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,eT=bU&&FB&&typeof FB.get=="function"?FB.get:null,R7=bU&&Set.prototype.forEach,s5e=typeof WeakMap=="function"&&WeakMap.prototype,Qx=s5e?WeakMap.prototype.has:null,a5e=typeof WeakSet=="function"&&WeakSet.prototype,Jx=a5e?WeakSet.prototype.has:null,l5e=typeof WeakRef=="function"&&WeakRef.prototype,P7=l5e?WeakRef.prototype.deref:null,c5e=Boolean.prototype.valueOf,u5e=Object.prototype.toString,d5e=Function.prototype.toString,f5e=String.prototype.match,xU=String.prototype.slice,Od=String.prototype.replace,h5e=String.prototype.toUpperCase,O7=String.prototype.toLowerCase,Nne=RegExp.prototype.test,M7=Array.prototype.concat,Xl=Array.prototype.join,p5e=Array.prototype.slice,D7=Math.floor,c5=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zB=Object.getOwnPropertySymbols,u5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,cv=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===cv||"symbol")?Symbol.toStringTag:null,Bne=Object.prototype.propertyIsEnumerable,L7=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N7(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Nne.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-D7(-e):D7(e);if(r!==e){var i=String(r),o=xU.call(t,i.length+1);return Od.call(i,n,"$&_")+"."+Od.call(Od.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Od.call(t,n,"$&_")}var d5=Lne,B7=d5.custom,$7=Fne(B7)?B7:null,m5e=function e(t,n,r,i){var o=n||{};if(bd(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bd(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=bd(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(bd(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(bd(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return jne(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?N7(t,c):c}if(typeof t=="bigint"){var u=String(t)+"n";return a?N7(t,u):u}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return f5(t)?"[Array]":"[Object]";var h=M5e(o,r);if(typeof i>"u")i=[];else if(zne(i,t)>=0)return"[Circular]";function p(z,D,F){if(D&&(i=p5e.call(i),i.push(D)),F){var j={depth:o.depth};return bd(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!F7(t)){var g=E5e(t),v=pS(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Xl.call(v,", ")+" }":"")}if(Fne(t)){var y=cv?Od.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):u5.call(t);return typeof t=="object"&&!cv?Hb(y):y}if(R5e(t)){for(var S="<"+O7.call(String(t.nodeName)),w=t.attributes||[],b=0;b",S}if(f5(t)){if(t.length===0)return"[]";var x=pS(t,p);return h&&!O5e(x)?"["+h5(x,h)+"]":"[ "+Xl.call(x,", ")+" ]"}if(y5e(t)){var E=pS(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!Bne.call(t,"cause")?"{ ["+String(t)+"] "+Xl.call(M7.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Xl.call(E,", ")+" }"}if(typeof t=="object"&&s){if($7&&typeof t[$7]=="function"&&d5)return d5(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(C5e(t)){var I=[];return I7&&I7.call(t,function(z,D){I.push(p(D,t,!0)+" => "+p(z,t))}),z7("Map",ZC.call(t),I,h)}if(A5e(t)){var A=[];return R7&&R7.call(t,function(z){A.push(p(z,t))}),z7("Set",eT.call(t),A,h)}if(T5e(t))return jB("WeakMap");if(I5e(t))return jB("WeakSet");if(k5e(t))return jB("WeakRef");if(x5e(t))return Hb(p(Number(t)));if(_5e(t))return Hb(p(c5.call(t)));if(w5e(t))return Hb(c5e.call(t));if(b5e(t))return Hb(p(String(t)));if(!v5e(t)&&!F7(t)){var k=pS(t,p),O=L7?L7(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&bo&&Object(t)===t&&bo in t?xU.call(Cf(t),8,-1):L?"Object":"",H=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",G=H+(N||L?"["+Xl.call(M7.call([],N||[],L||[]),": ")+"] ":"");return k.length===0?G+"{}":h?G+"{"+h5(k,h)+"}":G+"{ "+Xl.call(k,", ")+" }"}return String(t)};function $ne(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function g5e(e){return Od.call(String(e),/"/g,""")}function f5(e){return Cf(e)==="[object Array]"&&(!bo||!(typeof e=="object"&&bo in e))}function v5e(e){return Cf(e)==="[object Date]"&&(!bo||!(typeof e=="object"&&bo in e))}function F7(e){return Cf(e)==="[object RegExp]"&&(!bo||!(typeof e=="object"&&bo in e))}function y5e(e){return Cf(e)==="[object Error]"&&(!bo||!(typeof e=="object"&&bo in e))}function b5e(e){return Cf(e)==="[object String]"&&(!bo||!(typeof e=="object"&&bo in e))}function x5e(e){return Cf(e)==="[object Number]"&&(!bo||!(typeof e=="object"&&bo in e))}function w5e(e){return Cf(e)==="[object Boolean]"&&(!bo||!(typeof e=="object"&&bo in e))}function Fne(e){if(cv)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!u5)return!1;try{return u5.call(e),!0}catch{}return!1}function _5e(e){if(!e||typeof e!="object"||!c5)return!1;try{return c5.call(e),!0}catch{}return!1}var S5e=Object.prototype.hasOwnProperty||function(e){return e in this};function bd(e,t){return S5e.call(e,t)}function Cf(e){return u5e.call(e)}function E5e(e){if(e.name)return e.name;var t=f5e.call(d5e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function zne(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 jne(xU.call(e,0,t.maxStringLength),t)+r}var i=Od.call(Od.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,P5e);return $ne(i,"single",t)}function P5e(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":"")+h5e.call(t.toString(16))}function Hb(e){return"Object("+e+")"}function jB(e){return e+" { ? }"}function z7(e,t,n,r){var i=r?h5(n,r):Xl.call(n,", ");return e+" ("+t+") {"+i+"}"}function O5e(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=Xl.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Xl.call(Array(t+1),n)}}function h5(e,t){if(e.length===0)return"";var n=` -`+t.prev+t.base;return n+Xl.call(e,","+n)+` -`+t.prev}function pS(e,t){var n=f5(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(dp(r)){for(var i=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===X5e.RFC1738&&(u===40||u===41)){a+=s.charAt(c);continue}if(u<128){a=a+zl[u];continue}if(u<2048){a=a+(zl[192|u>>6]+zl[128|u&63]);continue}if(u<55296||u>=57344){a=a+(zl[224|u>>12]+zl[128|u>>6&63]+zl[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|s.charCodeAt(c)&1023),a+=zl[240|u>>18]+zl[128|u>>12&63]+zl[128|u>>6&63]+zl[128|u&63]}return a},e4e=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(x=0)}if(typeof c=="function"?w=c(n,w):w instanceof Date?w=h(w):r==="comma"&&_u(w)&&(w=AE.maybeMap(w,function(j){return j instanceof Date?h(j):j})),w===null){if(o)return a&&!v?a(n,co.encoder,y,"key",p):n;w=""}if(l4e(w)||AE.isBuffer(w)){if(a){var A=v?n:a(n,co.encoder,y,"key",p);return[g(A)+"="+g(a(w,co.encoder,y,"value",p))]}return[g(n)+"="+g(String(w))]}var k=[];if(typeof w>"u")return k;var O;if(r==="comma"&&_u(w))v&&a&&(w=AE.maybeMap(w,a)),O=[{value:w.length>0?w.join(",")||null:void 0}];else if(_u(c))O=c;else{var L=Object.keys(w);O=u?L.sort(u):L}for(var N=i&&_u(w)&&w.length===1?n+"[]":n,H=0;H"u"?co.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:co.charsetSentinel,delimiter:typeof t.delimiter>"u"?co.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:co.encode,encoder:typeof t.encoder=="function"?t.encoder:co.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:co.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:co.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:co.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:co.strictNullHandling}},d4e=function(e,t){var n=e,r=u4e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):_u(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in j7?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var c=j7[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=Wne(),h=0;h0?v+g:""},uv=Hne,p5=Object.prototype.hasOwnProperty,f4e=Array.isArray,Ci={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:uv.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},h4e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Vne=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},p4e="utf8=%26%2310003%3B",m4e="utf8=%E2%9C%93",g4e=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,c,u=n.charset;if(n.charsetSentinel)for(c=0;c-1&&(v=f4e(v)?[v]:v),p5.call(r,g)?r[g]=uv.combine(r[g],v):r[g]=v}return r},v4e=function(e,t,n,r){for(var i=r?t:Vne(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:i}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},y4e=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=r.depth>0&&s.exec(o),u=c?o.slice(0,c.index):o,f=[];if(u){if(!r.plainObjects&&p5.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}for(var h=0;r.depth>0&&(c=a.exec(o))!==null&&h"u"?Ci.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ci.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ci.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ci.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ci.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ci.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ci.comma,decoder:typeof t.decoder=="function"?t.decoder:Ci.decoder,delimiter:typeof t.delimiter=="string"||uv.isRegExp(t.delimiter)?t.delimiter:Ci.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ci.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ci.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ci.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ci.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ci.strictNullHandling}},x4e=function(e,t){var n=b4e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?g4e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` -`," "],R4e=["{","}","|","\\","^","`"].concat(I4e),m5=["'"].concat(R4e),H7=["%","/","?",";","#"].concat(m5),W7=["/","?","#"],P4e=255,G7=/^[+a-z0-9A-Z_-]{0,63}$/,O4e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M4e={javascript:!0,"javascript:":!0},g5={javascript:!0,"javascript:":!0},kg={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v5=E4e;function PA(e,t,n){if(e&&typeof e=="object"&&e instanceof El)return e;var r=new El;return r.parse(e,t,n),r}El.prototype.parse=function(e,t,n){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?I+="x":I+=E[A];if(!I.match(G7)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(O4e);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(a="/"+L.join(".")+a),this.hostname=O.join(".");break}}}this.hostname.length>P4e?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=C4e.toASCII(this.hostname));var H=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+H,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!M4e[f])for(var g=0,x=m5.length;g0?n.host.split("@"):!1;I&&(n.auth=I.shift(),n.hostname=I.shift(),n.host=n.hostname)}return n.search=e.search,n.query=e.query,(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=b.slice(-1)[0],k=(n.host||e.host||b.length>1)&&(A==="."||A==="..")||A==="",O=0,L=b.length;L>=0;L--)A=b[L],A==="."?b.splice(L,1):A===".."?(b.splice(L,1),O++):O&&(b.splice(L,1),O--);if(!S&&!w)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 I=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;I&&(n.auth=I.shift(),n.hostname=I.shift(),n.host=n.hostname)}return S=S||n.host&&b.length,S&&!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};El.prototype.parseHost=function(){var e=this.host,t=k4e.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 N4e=PA,B4e=L4e,$4e=D4e;const F4e={parse:N4e,format:$4e,resolve:B4e};function el(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function Wb(e){return e.split("?")[0].split("#")[0]}function z4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function j4e(e,t,n){return e.replace(new RegExp(z4e(t),"g"),n)}function U4e(e,t){let n="",r=0,i=-1,o=0,s=-1;for(let a=0;a<=e.length;++a){if(a2){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=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+=`/${e.slice(i+1,a)}`:n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}const vo={toPosix(e){return j4e(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){el(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=Wb(this.toPosix(t??rt.ADAPTER.getBaseUrl())),i=Wb(this.toPosix(n??this.rootname(r)));return el(e),e=this.toPosix(e),e.startsWith("/")?vo.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),el(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=U4e(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return el(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(el(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!i){r=a;break}}else i=!1;return r===-1?n?"/":this.isUrl(s)?o+e:o:n&&r===1?"//":o+e.slice(0,r)},rootname(e){el(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){el(e),t&&el(t),e=Wb(this.toPosix(e));let n=0,r=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let s=t.length-1,a=-1;for(o=e.length-1;o>=0;--o){const c=e.charCodeAt(o);if(c===47){if(!i){n=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(c===t.charCodeAt(s)?--s===-1&&(r=o):(s=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){n=o+1;break}}else r===-1&&(i=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname(e){el(e),e=Wb(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a===47){if(!i){n=s+1;break}continue}r===-1&&(i=!1,r=s+1),a===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||r===-1||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)},parse(e){el(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=Wb(this.toPosix(e));let n=e.charCodeAt(0);const r=this.isAbsolute(e);let i;t.root=this.rootname(e),r||this.hasProtocol(e)?i=1:i=0;let o=-1,s=0,a=-1,c=!0,u=e.length-1,f=0;for(;u>=i;--u){if(n=e.charCodeAt(u),n===47){if(!c){s=u+1;break}continue}a===-1&&(c=!1,a=u+1),n===46?o===-1?o=u:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||a===-1||f===0||f===1&&o===a-1&&o===s+1?a!==-1&&(s===0&&r?t.base=t.name=e.slice(1,a):t.base=t.name=e.slice(s,a)):(s===0&&r?(t.name=e.slice(1,o),t.base=e.slice(1,a)):(t.name=e.slice(s,o),t.base=e.slice(s,a)),t.ext=e.slice(o,a)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"},V7={};function fn(e,t,n=3){if(V7[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))),V7[t]=!0}let GB;function H4e(){return typeof GB>"u"&&(GB=function(){var n;const t={stencil:!0,failIfMajorPerformanceCaveat:rt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!rt.ADAPTER.getWebGLRenderingContext())return!1;const r=rt.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}}()),GB}var W4e={grad:.9,turn:360,rad:360/(2*Math.PI)},gu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ii=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},_a=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},qne=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},q7=function(e){return{r:_a(e.r,0,255),g:_a(e.g,0,255),b:_a(e.b,0,255),a:_a(e.a)}},VB=function(e){return{r:Ii(e.r),g:Ii(e.g),b:Ii(e.b),a:Ii(e.a,3)}},G4e=/^#([0-9a-f]{3,8})$/i,vS=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Xne=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},Yne=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),u=o%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:i}},X7=function(e){return{h:qne(e.h),s:_a(e.s,0,100),l:_a(e.l,0,100),a:_a(e.a)}},Y7=function(e){return{h:Ii(e.h),s:Ii(e.s),l:Ii(e.l),a:Ii(e.a,3)}},K7=function(e){return Yne((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},e1=function(e){return{h:(t=Xne(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},V4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,q4e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,X4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Y4e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y5={string:[[function(e){var t=G4e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ii(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ii(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=X4e.exec(e)||Y4e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:q7({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=V4e.exec(e)||q4e.exec(e);if(!t)return null;var n,r,i=X7({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(W4e[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return K7(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i===void 0?1:i;return gu(t)&&gu(n)&&gu(r)?q7({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(!gu(t)||!gu(n)||!gu(r))return null;var s=X7({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return K7(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!gu(t)||!gu(n)||!gu(r))return null;var s=function(a){return{h:qne(a.h),s:_a(a.s,0,100),v:_a(a.v,0,100),a:_a(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Yne(s)},"hsv"]]},Q7=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=VB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?vS(Ii(255*o)):"","#"+vS(n)+vS(r)+vS(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return VB(this.rgba)},e.prototype.toRgbString=function(){return t=VB(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 Y7(e1(this.rgba))},e.prototype.toHslString=function(){return t=Y7(e1(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=Xne(this.rgba),{h:Ii(t.h),s:Ii(t.s),v:Ii(t.v),a:Ii(t.a,3)};var t},e.prototype.invert=function(){return jl({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),jl(qB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),jl(qB(this.rgba,-t))},e.prototype.grayscale=function(){return jl(qB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),jl(J7(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),jl(J7(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"?jl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):Ii(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=e1(this.rgba);return typeof t=="number"?jl({h:t,s:n.s,l:n.l,a:n.a}):Ii(n.h)},e.prototype.isEqual=function(t){return this.toHex()===jl(t).toHex()},e}(),jl=function(e){return e instanceof b5?e:new b5(e)},Z7=[],Q4e=function(e){e.forEach(function(t){Z7.indexOf(t)<0&&(t(b5,y5),Z7.push(t))})};function J4e(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;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=(a=f,c=o[v],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.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]=Ag.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=Ag.HEX_PATTERN.exec(e);s&&(e=`#${s[2]}`)}const o=jl(e);o.isValid()&&({r:t,g:n,b:r,a:i}=o.rgba,t/=255,n/=255,r/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=r,this._components[3]=i,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((r,i)=>{e[i]=Math.min(Math.max(r,t),n)}),e)}};let Vn=Ag;Vn.shared=new Ag;Vn.temp=new Ag;Vn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function Z4e(e){return fn("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Vn.shared.setValue(e).toHex()}function eze(e){return fn("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Vn.shared.setValue(e).toNumber()}function tze(){const e=[],t=[];for(let r=0;r<32;r++)e[r]=r,t[r]=r;e[Lt.NORMAL_NPM]=Lt.NORMAL,e[Lt.ADD_NPM]=Lt.ADD,e[Lt.SCREEN_NPM]=Lt.SCREEN,t[Lt.NORMAL]=Lt.NORMAL_NPM,t[Lt.ADD]=Lt.ADD_NPM,t[Lt.SCREEN]=Lt.SCREEN_NPM;const n=[];return n.push(t),n.push(e),n}const Kne=tze();function Qne(e,t){return Kne[t?1:0][e]}function nze(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 eV(e){return!(e&e-1)&&!!e}function tV(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 Ig(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))(ot||{});const w5=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},oV=(e,t)=>w5(e).priority??t,wt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(w5).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(w5).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)=>oV(o,n)-oV(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class _5{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 lze=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function cze(e){let t="";for(let n=0;n0&&(t+=` -else `),n=0;--r){const i=S5[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,a,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:u,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 nw{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 Qw extends nw{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===Ll.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 dze={scaleMode:Au.NEAREST,format:Ve.RGBA,alphaMode:Ll.NPM},Bm=class extends Yw{constructor(e=null,t=null){super(),t=Object.assign({},Bm.defaultOptions,t);const{alphaMode:n,mipmap:r,anisotropicLevel:i,scaleMode:o,width:s,height:a,wrapMode:c,format:u,type:f,target:h,resolution:p,resourceOptions:g}=t;e&&!(e instanceof nw)&&(e=ere(e,g),e.internal=!0),this.resolution=p||rt.RESOLUTION,this.width=Math.round((s||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=r,this.anisotropicLevel=i,this._wrapMode=c,this._scaleMode=o,this.format=u,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&&a>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=eV(this.realWidth)&&eV(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 ad[this.cacheId],delete Ul[this.cacheId],this.cacheId=null),this.dispose(),Bm.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=rt.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=ad[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new Bm(e,t),o.cacheId=i,Bm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new Qw(e,{width:t,height:n}),o=e instanceof Float32Array?Ot.FLOAT:Ot.UNSIGNED_BYTE;return new Bm(i,Object.assign({},dze,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),ad[t]&&ad[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),ad[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=ad[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete ad[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 Dt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Dt(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const bS=[new Dt,new Dt,new Dt,new Dt];class Zt{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 Zt(0,0,0,0)}clone(){return new Zt(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 a=bS[0].set(t.left,t.top),c=bS[1].set(t.left,t.bottom),u=bS[2].set(t.right,t.top),f=bS[3].set(t.right,t.bottom);if(u.x<=a.x||c.y<=a.y)return!1;const h=Math.sign(n.a*n.d-n.b*n.c);if(h===0||(n.apply(a,a),n.apply(c,c),n.apply(u,u),n.apply(f,f),Math.max(a.x,c.x,u.x,f.x)<=r||Math.min(a.x,c.x,u.x,f.x)>=i||Math.max(a.y,c.y,u.y,f.y)<=o||Math.min(a.y,c.y,u.y,f.y)>=s))return!1;const p=h*(c.y-a.y),g=h*(a.x-c.x),v=p*r+g*o,y=p*i+g*o,S=p*r+g*s,w=p*i+g*s;if(Math.max(v,y,S,w)<=p*a.x+g*a.y||Math.min(v,y,S,w)>=p*f.x+g*f.y)return!1;const b=h*(a.y-u.y),x=h*(u.x-a.x),E=b*r+x*o,I=b*i+x*o,A=b*r+x*s,k=b*i+x*s;return!(Math.max(E,I,A,k)<=b*a.x+x*a.y||Math.min(E,I,A,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 EU{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=Ji.CIRC}clone(){return new EU(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 Zt(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 CU{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 CU(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 Zt(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 Rg{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<(u-a)*((n-c)/(f-c))+a&&(r=!r)}return r}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}}class TU{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 TU(this.x,this.y,this.width,this.height,this.radius)}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+r&&n<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),o=n-(this.y+r);const s=r*r;if(i*i+o*o<=s||(i=t-(this.x+this.width-r),i*i+o*o<=s)||(o=n-(this.y+this.height-r),i*i+o*o<=s)||(i=t-(this.x+r),i*i+o*o<=s))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class Cr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Dt;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Dt;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,a,c,u){return this.a=Math.cos(a+u)*o,this.b=Math.sin(a+u)*o,this.c=-Math.sin(a-c)*s,this.d=Math.cos(a-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,a=-Math.atan2(-i,o),c=Math.atan2(r,n),u=Math.abs(a+c);return u<1e-5||Math.abs(rT-u)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,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 Cr;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Cr}static get TEMP_MATRIX(){return new Cr}}const op=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],sp=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ap=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],lp=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],C5=[],rre=[],xS=Math.sign;function bze(){for(let e=0;e<16;e++){const t=[];C5.push(t);for(let n=0;n<16;n++){const r=xS(op[e]*op[n]+ap[e]*sp[n]),i=xS(sp[e]*op[n]+lp[e]*sp[n]),o=xS(op[e]*ap[n]+ap[e]*lp[n]),s=xS(sp[e]*ap[n]+lp[e]*lp[n]);for(let a=0;a<16;a++)if(op[a]===r&&sp[a]===i&&ap[a]===o&&lp[a]===s){t.push(a);break}}}for(let e=0;e<16;e++){const t=new Cr;t.set(op[e],sp[e],ap[e],lp[e],0,0),rre.push(t)}}bze();const Mr={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=>op[e],uY:e=>sp[e],vX:e=>ap[e],vY:e=>lp[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>C5[e][t],sub:(e,t)=>C5[e][Mr.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?Mr.S:Mr.N:Math.abs(t)*2<=Math.abs(e)?e>0?Mr.E:Mr.W:t>0?e>0?Mr.SE:Mr.SW:e>0?Mr.NE:Mr.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=rre[Mr.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class Dd{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 Dd(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 ire=class{constructor(){this.worldTransform=new Cr,this.localTransform=new Cr,this.position=new Dd(this.onChange,this,0,0),this.scale=new Dd(this.onChange,this,1,1),this.pivot=new Dd(this.onChange,this,0,0),this.skew=new Dd(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 kU=ire;kU.IDENTITY=new ire;var xze=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; - -void main(void){ - gl_FragColor *= texture2D(uSampler, vTextureCoord); -}`,wze=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void){ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -} -`;function aV(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function t$(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}"] - gl.uniform1f(ud["${e}"].location, uv["${e}"]) - } - `},{test:(e,t)=>(e.type==="sampler2D"||e.type==="samplerCube"||e.type==="sampler2DArray")&&e.size===1&&!e.isArray&&(t==null||t.castToBaseTexture!==void 0),code:e=>`t = syncData.textureCount++; - - renderer.texture.bind(uv["${e}"], t); - - if(ud["${e}"].value !== t) - { - ud["${e}"].value = t; - gl.uniform1i(ud["${e}"].location, t); -; // eslint-disable-line max-len - }`},{test:(e,t)=>e.type==="mat3"&&e.size===1&&!e.isArray&&t.a!==void 0,code:e=>` - gl.uniformMatrix3fv(ud["${e}"].location, false, uv["${e}"].toArray(true)); - `,codeUbo:e=>` - var ${e}_matrix = uv.${e}.toArray(true); - - data[offset] = ${e}_matrix[0]; - data[offset+1] = ${e}_matrix[1]; - data[offset+2] = ${e}_matrix[2]; - - data[offset + 4] = ${e}_matrix[3]; - data[offset + 5] = ${e}_matrix[4]; - data[offset + 6] = ${e}_matrix[5]; - - data[offset + 8] = ${e}_matrix[6]; - data[offset + 9] = ${e}_matrix[7]; - data[offset + 10] = ${e}_matrix[8]; - `},{test:(e,t)=>e.type==="vec2"&&e.size===1&&!e.isArray&&t.x!==void 0,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v.x || cv[1] !== v.y) - { - cv[0] = v.x; - cv[1] = v.y; - gl.uniform2f(ud["${e}"].location, v.x, v.y); - }`,codeUbo:e=>` - v = uv.${e}; - - data[offset] = v.x; - data[offset+1] = v.y; - `},{test:e=>e.type==="vec2"&&e.size===1&&!e.isArray,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - gl.uniform2f(ud["${e}"].location, v[0], v[1]); - } - `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.width!==void 0,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) - { - cv[0] = v.x; - cv[1] = v.y; - cv[2] = v.width; - cv[3] = v.height; - gl.uniform4f(ud["${e}"].location, v.x, v.y, v.width, v.height) - }`,codeUbo:e=>` - v = uv.${e}; - - data[offset] = v.x; - data[offset+1] = v.y; - data[offset+2] = v.width; - data[offset+3] = v.height; - `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) - { - cv[0] = v.red; - cv[1] = v.green; - cv[2] = v.blue; - cv[3] = v.alpha; - gl.uniform4f(ud["${e}"].location, v.red, v.green, v.blue, v.alpha) - }`,codeUbo:e=>` - v = uv.${e}; - - data[offset] = v.red; - data[offset+1] = v.green; - data[offset+2] = v.blue; - data[offset+3] = v.alpha; - `},{test:(e,t)=>e.type==="vec3"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a) - { - cv[0] = v.red; - cv[1] = v.green; - cv[2] = v.blue; - - gl.uniform3f(ud["${e}"].location, v.red, v.green, v.blue) - }`,codeUbo:e=>` - v = uv.${e}; - - data[offset] = v.red; - data[offset+1] = v.green; - data[offset+2] = v.blue; - `},{test:e=>e.type==="vec4"&&e.size===1&&!e.isArray,code:e=>` - cv = ud["${e}"].value; - v = uv["${e}"]; - - if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3]) - }`}],_ze={float:` - if (cv !== v) - { - cu.value = v; - gl.uniform1f(location, v); - }`,vec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2f(location, v[0], v[1]) - }`,vec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3f(location, v[0], v[1], v[2]) - }`,vec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4f(location, v[0], v[1], v[2], v[3]); - }`,int:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,ivec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2i(location, v[0], v[1]); - }`,ivec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3i(location, v[0], v[1], v[2]); - }`,ivec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4i(location, v[0], v[1], v[2], v[3]); - }`,uint:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1ui(location, v); - }`,uvec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2ui(location, v[0], v[1]); - }`,uvec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3ui(location, v[0], v[1], v[2]); - }`,uvec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4ui(location, v[0], v[1], v[2], v[3]); - }`,bool:` - if (cv !== v) - { - cu.value = v; - gl.uniform1i(location, v); - }`,bvec2:` - if (cv[0] != v[0] || cv[1] != v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2i(location, v[0], v[1]); - }`,bvec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3i(location, v[0], v[1], v[2]); - }`,bvec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4i(location, v[0], v[1], v[2], v[3]); - }`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,samplerCube:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,sampler2DArray:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`},Sze={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 Eze(e,t){var r;const n=[` - var v = null; - var cv = null; - var cu = null; - var t = 0; - var gl = renderer.gl; - `];for(const i in e.uniforms){const o=t[i];if(!o){(r=e.uniforms[i])!=null&&r.group&&(e.uniforms[i].ubo?n.push(` - renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}'); - `):n.push(` - renderer.shader.syncUniformGroup(uv.${i}, syncData); - `));continue}const s=e.uniforms[i];let a=!1;for(let c=0;c=dm.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Cm=t}return Cm}let wS;function Tze(){if(!wS){wS=wa.MEDIUM;const e=Cze();e&&e.getShaderPrecisionFormat&&(wS=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?wa.HIGH:wa.MEDIUM)}return wS}function lV(e,t){const n=e.getShaderSource(t).split(` -`).map((u,f)=>`${f}: ${u}`),r=e.getShaderInfoLog(t),i=r.split(` -`),o={},s=i.map(u=>parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(u=>u&&!o[u]?(o[u]=!0,!0):!1),a=[""];s.forEach(u=>{n[u-1]=`%c${n[u-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=n.join(` -`);a[0]=c,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function kze(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||lV(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||lV(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const Aze={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 are(e){return Aze[e]}let _S=null;const cV={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 lre(e,t){if(!_S){const n=Object.keys(cV);_S={};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=rl._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++qt._globalBatch,a=0,c=n[0],u=0;r.copyBoundTextures(i,t);for(let f=0;f=t&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,u,f),u=f,c=n[++a],++s),h._batchEnabled=s,h.touched=o,c.elements[c.count++]=h)}c.count>0&&(r.boundArray(c,i,s,t),this.buildDrawCalls(c,u,this._bufferSize),++a,++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:a}=t;let c=0;for(let u=0;u=0&&h=dm.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")}}DA.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};DA.extension={type:ot.RendererSystem,name:"context"};wt.add(DA);class Fze extends Qw{upload(t,n,r){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Ll.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 k5{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=ri.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new qt(null,{scaleMode:Au.NEAREST,resolution:1,mipmap:pc.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new qt(new Fze(null,{width:this.width,height:this.height}),{scaleMode:Au.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:pc.OFF,format:Ve.DEPTH_COMPONENT,type:Ot.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===Ll.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,n,r){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,n,r,this.bitmap),!this.preserveBitmap){let i=!0;const o=n._glTextures;for(const s in o){const a=o[s];if(a!==r&&a.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class fre{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,n,r){const i=n.width,o=n.height;if(r){const s=t.width/2/i,a=t.height/2/o,c=t.x/i+s,u=t.y/o+a;r=Mr.add(r,Mr.NW),this.x0=c+s*Mr.uX(r),this.y0=u+a*Mr.uY(r),r=Mr.add(r,2),this.x1=c+s*Mr.uX(r),this.y1=u+a*Mr.uY(r),r=Mr.add(r,2),this.x2=c+s*Mr.uX(r),this.y2=u+a*Mr.uY(r),r=Mr.add(r,2),this.x3=c+s*Mr.uX(r),this.y3=u+a*Mr.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 fV=new fre;function ES(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class mt extends Yw{constructor(t,n,r,i,o,s,a){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Zt(0,0,1,1)),t instanceof mt&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=fV,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Dt(s.x,s.y):new Dt(0,0),this.defaultBorders=a,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&Ul[n.url]&&mt.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,mt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new mt(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===fV&&(this._uvs=new fre),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,n={},r=rt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof qt){if(!t.cacheId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${a}-${Kp()}`,qt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const a=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${a}_${Kp()}`}o=t._pixiId}let s=Ul[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof qt)?(n.resolution||(n.resolution=lf(t)),s=new mt(new qt(t,n)),s.baseTexture.cacheId=o,qt.addToCache(s.baseTexture,o),mt.addToCache(s,o)):!s&&t instanceof qt&&(s=new mt(t),mt.addToCache(s,o)),s}static fromURL(t,n){const r=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),i=mt.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 mt(qt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new qt(t,Object.assign({scaleMode:qt.defaultOptions.scaleMode,resolution:lf(n)},i)),{resource:s}=o;s instanceof dre&&(s.url=n);const a=new mt(o);return r||(r=n),qt.addToCache(a.baseTexture,r),mt.addToCache(a,r),r!==n&&(qt.addToCache(a.baseTexture,n),mt.addToCache(a,n)),a.baseTexture.valid?Promise.resolve(a):new Promise(c=>{a.baseTexture.once("loaded",()=>c(a))})}static addToCache(t,n){n&&(t.textureCacheIds.includes(n)||t.textureCacheIds.push(n),Ul[n]&&Ul[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),Ul[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=Ul[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete Ul[t],n}}else if(t!=null&&t.textureCacheIds){for(let n=0;nthis.baseTexture.width,a=r+o>this.baseTexture.height;if(s||a){const c=s&&a?"and":"or",u=`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: ${u} ${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 mt._EMPTY||(mt._EMPTY=new mt(new qt),ES(mt._EMPTY),ES(mt._EMPTY.baseTexture)),mt._EMPTY}static get WHITE(){if(!mt._WHITE){const t=rt.ADAPTER.createCanvas(16,16),n=t.getContext("2d");t.width=16,t.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),mt._WHITE=new mt(qt.from(t)),ES(mt._WHITE),ES(mt._WHITE.baseTexture)}return mt._WHITE}}class fm extends mt{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 fm(new ure(t))}}class hre{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=ri.NONE){const i=new ure(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new fm(i)}getOptimalTexture(t,n,r=1,i=ri.NONE){let o;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=tT(t),n=tT(n),o=((t&65535)<<16|n&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let s=this.texturePool[o].pop();return s||(s=this.createTexture(t,n,i)),s.filterPoolKey=o,s.setResolution(r),s}getFilterTexture(t,n,r){const i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||ri.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const n in this.texturePool){const r=this.texturePool[n];if(r)for(let i=0;i0&&t.height>0;for(const n in this.texturePool){if(!(Number(n)<0))continue;const r=this.texturePool[n];if(r)for(let i=0;i1&&(f=this.getOptimalFilterTexture(u.width,u.height,n.resolution),f.filterFrame=u.filterFrame),r[h].apply(this,u,f,ql.CLEAR,n);const p=u;u=f,f=p}r[h].apply(this,u,c.renderTexture,ql.BLEND,n),h>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(u),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)}bindAndClear(t,n=ql.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===ql.CLEAR||n===ql.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(Jl.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(Jl.TRIANGLE_STRIP))}calculateSpriteMatrix(t,n){const{sourceFrame:r,destinationFrame:i}=this.activeState,{orig:o}=n._texture,s=t.set(i.width,0,0,i.height,r.x,r.y),a=n.worldTransform.copyTo(Cr.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,n,r=1,i=ri.NONE){return this.texturePool.getOptimalTexture(t,n,r,i)}getFilterTexture(t,n,r){if(typeof t=="number"){const o=t;t=n,n=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||ri.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,n){const r=CS[0],i=CS[1],o=CS[2],s=CS[3];r.set(n.left,n.top),i.set(n.left,n.bottom),o.set(n.right,n.top),s.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(o,o),t.apply(s,s);const a=Math.min(r.x,i.x,o.x,s.x),c=Math.min(r.y,i.y,o.y,s.y),u=Math.max(r.x,i.x,o.x,s.x),f=Math.max(r.y,i.y,o.y,s.y);n.x=a,n.y=c,n.width=u-a,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:a,c,d:u}=o;if((Math.abs(a)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(s)>1e-4||Math.abs(u)>1e-4))return}o=o?n$.copyFrom(o):n$.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)}}}mre.extension={type:ot.RendererSystem,name:"filter"};wt.add(mre);class Uze{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ri.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Hze=new Zt;class gre{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new k5(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 Zt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;rt.PREFER_ENV===dm.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=i=>n.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,n,r=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=r),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let s=0;s>r,a=n.height>>r,c=s/n.width;this.setViewport(n.x*c,n.y*c,s,a)}else{const s=t.width>>r,a=t.height>>r;this.setViewport(0,0,s,a)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,n,r,i){const o=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(o.width!==r||o.height!==i||o.x!==t||o.y!==n)&&(o.x=t,o.y=n,o.width=r,o.height=i,this.gl.viewport(t,n,r,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,n,r,i,o=i5.COLOR|i5.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new Uze(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r}resizeFramebuffer(t){const{gl:n}=this,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;n.drawBuffers||(o=Math.min(o,1));for(let s=0;s1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer():i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const a=[];for(let c=0;c1&&r.drawBuffers(a),t.depthTexture&&this.writeDepthTexture){const u=t.depthTexture;this.renderer.texture.bind(u,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,n)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:n}=this;let r=ri.NONE;if(t<=1||n===null)return r;for(let i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&this.disposeFramebuffer(r.blitFramebuffer,n)}disposeAll(t){const n=this.managedFramebuffers;this.managedFramebuffers=[];for(let r=0;rr.createVertexArrayOES(),t.bindVertexArray=i=>r.bindVertexArrayOES(i),t.deleteVertexArray=i=>r.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(n.webGLVersion!==2){const r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=(i,o)=>r.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,s,a,c)=>r.drawElementsInstancedANGLE(i,o,s,a,c),t.drawArraysInstanced=(i,o,s,a)=>r.drawArraysInstancedANGLE(i,o,s,a)):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex}bind(t,n){n=n||this.renderer.shader.shader;const{gl:r}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const s=i[n.program.id]||this.initGeometryVao(t,n,o);this._activeGeometry=t,this._activeVao!==s&&(this._activeVao=s,this.hasVao?r.bindVertexArray(s):this.activateVao(t,n.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,n=this.renderer.buffer;for(let r=0;r"u"?.5:n,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,n){n===void 0&&(n=t);const r=this.mapCoord;for(let i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==n&&this.renderer.gl.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)}destroy(){this.renderer=null}}bre.extension={type:ot.RendererSystem,name:"mask"};wt.add(bre);class xre{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 pV=new Cr,mV=[],IE=class extends xre{constructor(e){super(e),this.glConst=rt.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,mV.pop()??new Zt);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()||IE.isMatrixRotated(t.worldTransform)||IE.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){IE.isMatrixRotated(i)||(i=i?pV.copyFrom(i):pV.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&&mV.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 wre=IE;wre.extension={type:ot.RendererSystem,name:"scissor"};wt.add(wre);class _re extends xre{constructor(t){super(t),this.glConst=rt.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)}}_re.extension={type:ot.RendererSystem,name:"stencil"};wt.add(_re);class Sre{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return fn("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return fn("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return fn("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}}Sre.extension={type:[ot.RendererSystem,ot.CanvasRendererSystem],name:"_plugin"};wt.add(Sre);class Ere{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Cr,this.transform=null}update(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,n,r,i){const o=this.projectionMatrix,s=i?-1:1;o.identity(),o.a=1/n.width*2,o.d=s*(1/n.height*2),o.tx=-1-n.x*o.a,o.ty=-s-n.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Ere.extension={type:ot.RendererSystem,name:"projection"};wt.add(Ere);const Xze=new kU;class Cre{constructor(t){this.renderer=t,this._tempMatrix=new Cr}generateTexture(t,n){const{region:r,...i}=n||{},o=r||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const s=fm.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const a=t.transform;return t.transform=Xze,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=a,s}destroy(){}}Cre.extension={type:[ot.RendererSystem,ot.CanvasRendererSystem],name:"textureGenerator"};wt.add(Cre);const Vh=new Zt,Vb=new Zt;class Tre{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Zt,this.destinationFrame=new Zt,this.viewportFrame=new Zt}contextChange(){var n;const t=(n=this.renderer)==null?void 0:n.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,n,r){const i=this.renderer;this.current=t;let o,s,a;t?(o=t.baseTexture,a=o.resolution,n||(Vh.width=t.frame.width,Vh.height=t.frame.height,n=Vh),r||(Vb.x=t.frame.x,Vb.y=t.frame.y,Vb.width=n.width,Vb.height=n.height,r=Vb),s=o.framebuffer):(a=i.resolution,n||(Vh.width=i._view.screen.width,Vh.height=i._view.screen.height,n=Vh),r||(r=Vh,r.width=n.width,r.height=n.height));const c=this.viewportFrame;c.x=r.x*a,c.y=r.y*a,c.width=r.width*a,c.height=r.height*a,t||(c.y=i.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(s,c),this.renderer.projection.update(r,n,a,!s),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)}clear(t,n){const r=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=Vn.shared.setValue(t||r);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&i.premultiply(i.alpha);const o=this.destinationFrame,s=this.current?this.current.baseTexture:this.renderer._view.screen,a=o.width!==s.width||o.height!==s.height;if(a){let{x:c,y:u,width:f,height:h}=this.viewportFrame;c=Math.round(c),u=Math.round(u),f=Math.round(f),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,u,f,h)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,n),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Tre.extension={type:ot.RendererSystem,name:"renderTexture"};wt.add(Tre);class Yze{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 Kze(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 a=r%n%16;r+=a,i+=a}r+n>16?(i=Math.ceil(i/16)*16,s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function nje(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 rje(e,t){if(!e.autoManage)return{size:0,syncFunc:Zze};const n=nje(e.uniforms,t),{uboElements:r,size:i}=tje(n),o=[` - var v = null; - var v2 = null; - var cv = null; - var t = 0; - var gl = renderer.gl - var index = 0; - var data = buffer.data; - `];for(let s=0;s1){const h=are(a.data.type),p=Math.max(kre[a.data.type]/16,1),g=h/p,v=(4-g%4)%4;o.push(` - cv = ud.${u}.value; - v = uv.${u}; - offset = ${a.offset/4}; - - t = 0; - - for(var i=0; i < ${a.data.size*p}; i++) - { - for(var j = 0; j < ${g}; j++) - { - data[offset++] = v[t++]; - } - offset += ${v}; - } - - `)}else{const h=eje[a.data.type];o.push(` - cv = ud.${u}.value; - v = uv.${u}; - offset = ${a.offset/4}; - ${h}; - `)}}return o.push(` - renderer.buffer.update(buffer); - `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}let ije=0;const TS={textureCount:0,uboCount:0};class Are{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=ije++}systemCheck(){if(!Ize())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||(TS.textureCount=0,TS.uboCount=0,this.syncUniformGroup(t.uniformGroup,TS)),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]=Eze(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,TS,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])}createSyncBufferGroup(t,n,r){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const s=this.getSignature(t,this.shader.program.uniformData,"ubo");let a=this._uboCache[s];if(a||(a=this._uboCache[s]=rje(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(a.size/4);t.buffer.update(c)}return n.uniformGroups[t.id]=a.syncFunc,n.uniformGroups[t.id]}getSignature(t,n,r){const i=t.uniforms,o=[`${r}-`];for(const s in i)o.push(s),n[s]&&o.push(n[s].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const n=this.gl,r=t.program,i=Jze(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}}Are.extension={type:ot.RendererSystem,name:"shader"};wt.add(Are);class LA{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(){}}LA.defaultOptions={hello:!1};LA.extension={type:[ot.RendererSystem,ot.CanvasRendererSystem],name:"startup"};wt.add(LA);function oje(e,t=[]){return t[Lt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.ADD]=[e.ONE,e.ONE],t[Lt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.NONE]=[0,0],t[Lt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Lt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Lt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Lt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Lt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Lt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Lt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Lt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Lt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Lt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Lt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sje=0,aje=1,lje=2,cje=3,uje=4,dje=5,A5=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Lt.NONE,this._blendEq=!1,this.map=[],this.map[sje]=this.setBlend,this.map[aje]=this.setOffset,this.map[lje]=this.setCullFace,this.map[cje]=this.setDepthTest,this.map[uje]=this.setFrontFace,this.map[dje]=this.setDepthMask,this.checks=[],this.defaultState=new ed,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=oje(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 RE=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=RE.defaultMaxIdle,this.checkCountMax=RE.defaultCheckCountMax,this.mode=RE.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==pU.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 hl=RE;hl.defaultMode=pU.AUTO;hl.defaultMaxIdle=60*60;hl.defaultCheckCountMax=60*10;hl.extension={type:ot.RendererSystem,name:"textureGC"};wt.add(hl);class i${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=Ot.UNSIGNED_BYTE,this.internalFormat=Ve.RGBA,this.samplerType=0}}function hje(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Ot.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA8,[Ve.RGB]:e.RGB8,[Ve.RG]:e.RG8,[Ve.RED]:e.R8,[Ve.RGBA_INTEGER]:e.RGBA8UI,[Ve.RGB_INTEGER]:e.RGB8UI,[Ve.RG_INTEGER]:e.RG8UI,[Ve.RED_INTEGER]:e.R8UI,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ot.BYTE]:{[Ve.RGBA]:e.RGBA8_SNORM,[Ve.RGB]:e.RGB8_SNORM,[Ve.RG]:e.RG8_SNORM,[Ve.RED]:e.R8_SNORM,[Ve.RGBA_INTEGER]:e.RGBA8I,[Ve.RGB_INTEGER]:e.RGB8I,[Ve.RG_INTEGER]:e.RG8I,[Ve.RED_INTEGER]:e.R8I},[Ot.UNSIGNED_SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16UI,[Ve.RGB_INTEGER]:e.RGB16UI,[Ve.RG_INTEGER]:e.RG16UI,[Ve.RED_INTEGER]:e.R16UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Ot.SHORT]:{[Ve.RGBA_INTEGER]:e.RGBA16I,[Ve.RGB_INTEGER]:e.RGB16I,[Ve.RG_INTEGER]:e.RG16I,[Ve.RED_INTEGER]:e.R16I},[Ot.UNSIGNED_INT]:{[Ve.RGBA_INTEGER]:e.RGBA32UI,[Ve.RGB_INTEGER]:e.RGB32UI,[Ve.RG_INTEGER]:e.RG32UI,[Ve.RED_INTEGER]:e.R32UI,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Ot.INT]:{[Ve.RGBA_INTEGER]:e.RGBA32I,[Ve.RGB_INTEGER]:e.RGB32I,[Ve.RG_INTEGER]:e.RG32I,[Ve.RED_INTEGER]:e.R32I},[Ot.FLOAT]:{[Ve.RGBA]:e.RGBA32F,[Ve.RGB]:e.RGB32F,[Ve.RG]:e.RG32F,[Ve.RED]:e.R32F,[Ve.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Ot.HALF_FLOAT]:{[Ve.RGBA]:e.RGBA16F,[Ve.RGB]:e.RGB16F,[Ve.RG]:e.RG16F,[Ve.RED]:e.R16F},[Ot.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB565},[Ot.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA4},[Ot.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGB5_A1},[Ot.UNSIGNED_INT_2_10_10_10_REV]:{[Ve.RGBA]:e.RGB10_A2,[Ve.RGBA_INTEGER]:e.RGB10_A2UI},[Ot.UNSIGNED_INT_10F_11F_11F_REV]:{[Ve.RGB]:e.R11F_G11F_B10F},[Ot.UNSIGNED_INT_5_9_9_9_REV]:{[Ve.RGB]:e.RGB9_E5},[Ot.UNSIGNED_INT_24_8]:{[Ve.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Ot.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ve.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Ot.UNSIGNED_BYTE]:{[Ve.RGBA]:e.RGBA,[Ve.RGB]:e.RGB,[Ve.ALPHA]:e.ALPHA,[Ve.LUMINANCE]:e.LUMINANCE,[Ve.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ot.UNSIGNED_SHORT_5_6_5]:{[Ve.RGB]:e.RGB},[Ot.UNSIGNED_SHORT_4_4_4_4]:{[Ve.RGBA]:e.RGBA},[Ot.UNSIGNED_SHORT_5_5_5_1]:{[Ve.RGBA]:e.RGBA}},t}class Rre{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new qt,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=hje(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!==o5.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new i$(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===Ot.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!==o5.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,s=t.realHeight,a=r.gl;(n.width!==o||n.height!==s||n.dirtyId<0)&&(n.width=o,n.height=s,a.texImage2D(t.target,0,n.internalFormat,o,s,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}destroyTexture(t,n){const{gl:r}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){const i=this.managedTextures.indexOf(t);i!==-1&&Ig(this.managedTextures,i,1)}}updateTextureStyle(t){var r;const n=t._glTextures[this.CONTEXT_UID];n&&((t.mipmap===pc.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Jd.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!==pc.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===Au.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Au.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===Au.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===Au.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}Rre.extension={type:ot.RendererSystem,name:"texture"};wt.add(Rre);class Pre{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))(Qp||{});class o${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 Ms=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 o$(null,null,1/0),this.deltaMS=1/Ms.targetFPMS,this.elapsedMS=1/Ms.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=Qp.NORMAL){return this._addListener(new o$(e,t,n))}addOnce(e,t,n=Qp.NORMAL){return this._addListener(new o$(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?si.shared:new si,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ore.extension=ot.Application;wt.add(Ore);const Mre=[];wt.handleByList(ot.Renderer,Mre);function pje(e){for(const t of Mre)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var mje=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,gje=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); -} -`;const vje=mje,Dre=gje;class Lre{constructor(t){this.renderer=t}contextChange(t){let n;if(this.renderer.context.webGLVersion===1){const r=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,r)}else{const r=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),n=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r)}n>=ri.HIGH?this.multisample=ri.HIGH:n>=ri.MEDIUM?this.multisample=ri.MEDIUM:n>=ri.LOW?this.multisample=ri.LOW:this.multisample=ri.NONE}destroy(){}}Lre.extension={type:ot.RendererSystem,name:"_multisample"};wt.add(Lre);class yje{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Nre{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 bje extends $re{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=Cg.TEXTURE_2D_ARRAY}upload(t,n,r){const{length:i,itemDirtyIds:o,items:s}=this,{gl:a}=t;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,i,0,n.format,r.type,null);for(let 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=Cg.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 rt.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===Ll.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 fg._EMPTY=fg._EMPTY??rt.ADAPTER.createCanvas(0,0),fg._EMPTY}}const PE=class extends uf{constructor(e,t){t=t||{},super(rt.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)},PE.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;uf.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=PE.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"&&PE.SVG_XML.test(e)}};let rw=PE;rw.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const R5=class extends uf{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];uf.crossOrigin(n,r,t.crossorigin);for(let i=0;i{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(si.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(si.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(si.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(si.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(si.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||R5.TYPES.includes(t)}};let AU=R5;AU.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];AU.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};S5.push(fg,dre,xje,AU,rw,Qw,Fre,bje);class iT{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?Zt.EMPTY:(t=t||new Zt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:a,ty:c}=t,u=r*n.x+o*n.y+a,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),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],a=t[1];n=si?s:i,o=a>o?a:o,s=t[2],a=t[3],n=si?s:i,o=a>o?a:o,s=t[4],a=t[5],n=si?s:i,o=a>o?a:o,s=t[6],a=t[7],n=si?s:i,o=a>o?a:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,a=t.b,c=t.c,u=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,w=a*n+u*r+h;p=Sv?S:v,y=w>y?w:y,S=s*i+c*r+f,w=a*i+u*r+h,p=Sv?S:v,y=w>y?w:y,S=s*n+c*o+f,w=a*n+u*o+h,p=Sv?S:v,y=w>y?w:y,S=s*i+c*o+f,w=a*i+u*o+h,p=Sv?S:v,y=w>y?w: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,a=this.maxY;for(let c=n;cs?u:s,a=f>a?f:a}this.minX=i,this.minY=o,this.maxX=s,this.maxY=a}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const a=t.a,c=t.b,u=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 w=r;wi?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXu?o:u,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.maxXu?o:u,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 Ur extends Yw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new kU,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 iT,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);Ig(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(Sje),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!==P5.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=_je.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?Eje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ee=(e,t,n)=>(Cje(e,typeof t!="symbol"?t+"":t,n),n);let Na=class{constructor(t){Ee(this,"parent"),Ee(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}};var Tje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zre={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,a){return s*i/a+o},easeInQuad:function(i,o,s,a){return s*(i/=a)*i+o},easeOutQuad:function(i,o,s,a){return-s*(i/=a)*(i-2)+o},easeInOutQuad:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,a){return s*(i/=a)*i*i+o},easeOutCubic:function(i,o,s,a){return s*((i=i/a-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,a){return s*(i/=a)*i*i*i+o},easeOutQuart:function(i,o,s,a){return-s*((i=i/a-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,a){return s*(i/=a)*i*i*i*i+o},easeOutQuint:function(i,o,s,a){return s*((i=i/a-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,a){return(i/=a/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,a){return-s*Math.cos(i/a*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,a){return s*Math.sin(i/a*(Math.PI/2))+o},easeInOutSine:function(i,o,s,a){return-s/2*(Math.cos(Math.PI*i/a)-1)+o},easeInExpo:function(i,o,s,a){return i===0?o:s*Math.pow(2,10*(i/a-1))+o},easeOutExpo:function(i,o,s,a){return i===a?o+s:s*(-Math.pow(2,-10*i/a)+1)+o},easeInOutExpo:function(i,o,s,a){return(i/=a/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,a){return-s*(Math.sqrt(1-(i/=a)*i)-1)+o},easeOutCirc:function(i,o,s,a){return s*Math.sqrt(1-(i=i/a-1)*i)+o},easeInOutCirc:function(i,o,s,a){return(i/=a/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,a){var c,u,f;return f=1.70158,u=0,c=s,i===0||(i/=a),u||(u=a*.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,a=this.deltaY,c=new Dt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+a*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const Ije={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let Rje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"underflowX"),Ee(this,"underflowY"),Ee(this,"ease"),Ee(this,"toX"),Ee(this,"toY"),this.options=Object.assign({},Ije,n),this.ease=BA(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Dt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Dt(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Dt(0,0),bottomRight:new Dt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const a=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let u=null;r.left&&this.left?u=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 Dje=class extends Na{constructor(t,n={}){super(t),Ee(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 Lje={friction:.98,bounce:.8,minSpeed:.01},ld=16;let Nje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percentChangeX"),Ee(this,"percentChangeY"),Ee(this,"saved"),Ee(this,"timeSinceRelease"),this.options=Object.assign({},Lje,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*ld/s*(Math.pow(o,i/ld)-Math.pow(o,r/ld)),this.x*=Math.pow(this.percentChangeX,t/ld)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*ld/s*(Math.pow(o,i/ld)-Math.pow(o,r/ld)),this.y*=Math.pow(this.percentChangeY,t/ld)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const a={x:n,y:r};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new Dt(this.last.x,this.last.y),world:this.parent.toWorld(new Dt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Dt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const Fje={speed:0,acceleration:null,radius:null};let zje=class extends Na{constructor(t,n,r={}){super(t),Ee(this,"options"),Ee(this,"target"),Ee(this,"velocity"),this.target=n,this.options=Object.assign({},Fje,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const n=this.parent.center;let r=this.target.x,i=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-n.y,2)+Math.pow(this.target.x-n.x,2))>this.options.radius){const a=Math.atan2(this.target.y-n.y,this.target.x-n.x);r=this.target.x-Math.cos(a)*this.options.radius,i=this.target.y-Math.sin(a)*this.options.radius}else return;const o=r-n.x,s=i-n.y;if(o||s)if(this.options.speed)if(this.options.acceleration){const a=Math.atan2(i-n.y,r-n.x),c=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));if(c){const u=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);c>u?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(a)*this.velocity.x,h=Math.sin(a)*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 a=Math.atan2(i-n.y,r-n.x),c=Math.cos(a)*this.options.speed,u=Math.sin(a)*this.options.speed,f=Math.abs(c)>Math.abs(o)?r:n.x+c,h=Math.abs(u)>Math.abs(s)?i:n.y+u;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 jje={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let Uje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"reverse"),Ee(this,"radiusSquared"),Ee(this,"left"),Ee(this,"top"),Ee(this,"right"),Ee(this,"bottom"),Ee(this,"horizontal"),Ee(this,"vertical"),this.options=Object.assign({},jje,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 Hje={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let Wje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"active",!1),Ee(this,"pinching",!1),Ee(this,"moved",!1),Ee(this,"lastCenter"),this.options=Object.assign({},Hje,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],a=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),a){let c;const u=new Dt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(u));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-a/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:u});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+=(u.x-g.x)*this.options.factor,this.parent.y+=(u.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(u.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(u.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,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 Gje={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let Vje=class extends Na{constructor(t,n,r,i={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"x"),Ee(this,"y"),Ee(this,"percent"),Ee(this,"snapping"),Ee(this,"deltaX"),Ee(this,"deltaY"),Ee(this,"startX"),Ee(this,"startY"),this.options=Object.assign({},Gje,i),this.ease=BA(i.ease,"easeInOutSine"),this.x=n,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const n=this.snapping;n.time+=t;let r,i,o;const s=this.startX,a=this.startY,c=this.deltaX,u=this.deltaY;if(n.time>this.options.time)r=!0,i=s+c,o=a+u;else{const f=this.ease(n.time,0,1,this.options.time);i=s+c*f,o=a+u*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 qje={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let Xje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"ease"),Ee(this,"xScale"),Ee(this,"yScale"),Ee(this,"xIndependent"),Ee(this,"yIndependent"),Ee(this,"snapping"),this.options=Object.assign({},qje,n),this.ease=BA(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):n.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,n=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,i=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:n,deltaX:r-t,deltaY:i-n},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let n;if(!this.options.center&&!this.options.noMove&&(n=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const o=this.snapping,s=this.ease(o.time,o.startX,o.deltaX,this.options.time),a=this.ease(o.time,o.startY,o.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/s,this.parent.scale.y=this.parent.screenHeight/a}const i=this.parent.plugins.get("clamp-zoom",!0);i&&i.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(n))}}resume(){this.snapping=null,super.resume()}};const Yje={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let Kje=class extends Na{constructor(t,n={}){super(t),Ee(this,"options"),Ee(this,"smoothing"),Ee(this,"smoothingCenter"),Ee(this,"smoothingCount"),Ee(this,"keyIsPressed"),this.options=Object.assign({},Yje,n),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",n=>{t.includes(n.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",n=>{t.includes(n.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,n=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=n.x),this.isAxisY()&&(this.parent.scale.y+=n.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const i=this.parent.plugins.get("clamp-zoom",!0);if(i&&i.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const o=this.parent.toGlobal(r);this.parent.x+=t.x-o.x,this.parent.y+=t.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const n=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,i=Math.pow(2,(1+this.options.percent)*r);let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const n=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,i=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const o={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+o.x)*i-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+o.y)*i-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=n}else{let o;this.options.center||(o=this.parent.toLocal(n)),this.isAxisX()&&(this.parent.scale.x*=i),this.isAxisY()&&(this.parent.scale.y*=i),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const s=this.parent.plugins.get("clamp-zoom",!0);if(s&&s.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(o);this.parent.x+=n.x-a.x,this.parent.y+=n.y-a.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}},Qje=class{constructor(t){Ee(this,"viewport"),Ee(this,"clickedAvailable"),Ee(this,"isMouseDown"),Ee(this,"last"),Ee(this,"wheelFunction"),Ee(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new Zt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Dt;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of qb)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 Zje={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:si.shared,allowPreserveDragOutside:!1};class eUe extends us{constructor(t){super(),Ee(this,"moving"),Ee(this,"screenWidth"),Ee(this,"screenHeight"),Ee(this,"threshold"),Ee(this,"input"),Ee(this,"plugins"),Ee(this,"zooming"),Ee(this,"lastViewport"),Ee(this,"options"),Ee(this,"_dirty"),Ee(this,"_forceHitArea"),Ee(this,"_hitAreaDefault"),Ee(this,"_pause"),Ee(this,"tickerFunction"),Ee(this,"_worldWidth"),Ee(this,"_worldHeight"),Ee(this,"_disableOnContextMenu",n=>n.preventDefault()),this.options={...Zje,...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 Qje(this),this.plugins=new Jje(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 Zt(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 Zt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Dt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Dt(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Dt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Dt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Dt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Zt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new $je(this,t)),this}clamp(t){return this.plugins.add("clamp",new Oje(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new Nje(this,t)),this}bounce(t){return this.plugins.add("bounce",new Rje(this,t)),this}pinch(t){return this.plugins.add("pinch",new Wje(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new Vje(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new zje(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new Kje(this,t)),this}animate(t){return this.plugins.add("animate",new Aje(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new Dje(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new Uje(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 Xb=new Dt,tUe=new Uint16Array([0,1,2,0,2,3]);class hm extends us{constructor(t){super(),this._anchor=new Dd(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new Vn(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Lt.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||mt.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=tUe,this.pluginName="batch",this.isSprite=!0,this._roundPixels=rt.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,a=n.tx,c=n.ty,u=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),u[0]=r*v+o*S+a,u[1]=s*S+i*v+c,u[2]=r*g+o*S+a,u[3]=s*S+i*g+c,u[4]=r*g+o*y+a,u[5]=s*y+i*g+c,u[6]=r*v+o*y+a,u[7]=s*y+i*v+c,this._roundPixels){const w=rt.RESOLUTION;for(let b=0;b=i&&Xb.x=o&&Xb.y=n&&(s=e-a-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 lUe=` - attribute vec2 aVertexPosition; - - uniform mat3 projectionMatrix; - - uniform float strength; - - varying vec2 vBlurTexCoords[%size%]; - - uniform vec4 inputSize; - uniform vec4 outputFrame; - - vec4 filterVertexPosition( void ) - { - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); - } - - vec2 filterTextureCoord( void ) - { - return aVertexPosition * (outputFrame.zw * inputSize.zw); - } - - void main(void) - { - gl_Position = filterVertexPosition(); - - vec2 textureCoord = filterTextureCoord(); - %blur% - }`;function cUe(e,t){const n=Math.ceil(e/2);let r=lUe,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 0.0) { - c.rgb /= c.a; - } - - vec4 result; - - result.r = (m[0] * c.r); - result.r += (m[1] * c.g); - result.r += (m[2] * c.b); - result.r += (m[3] * c.a); - result.r += m[4]; - - result.g = (m[5] * c.r); - result.g += (m[6] * c.g); - result.g += (m[7] * c.b); - result.g += (m[8] * c.a); - result.g += m[9]; - - result.b = (m[10] * c.r); - result.b += (m[11] * c.g); - result.b += (m[12] * c.b); - result.b += (m[13] * c.a); - result.b += m[14]; - - result.a = (m[15] * c.r); - result.a += (m[16] * c.g); - result.a += (m[17] * c.b); - result.a += (m[18] * c.a); - result.a += m[19]; - - vec3 rgb = mix(c.rgb, result.rgb, uAlpha); - - // Premultiply alpha again. - rgb *= result.a; - - gl_FragColor = vec4(rgb, result.a); -} -`;class M5 extends no{constructor(){const t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Dre,dUe,t),this.alpha=1}_loadMatrix(t,n=!1){let r=t;n&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r}_multiply(t,n,r){return t[0]=n[0]*r[0]+n[1]*r[5]+n[2]*r[10]+n[3]*r[15],t[1]=n[0]*r[1]+n[1]*r[6]+n[2]*r[11]+n[3]*r[16],t[2]=n[0]*r[2]+n[1]*r[7]+n[2]*r[12]+n[3]*r[17],t[3]=n[0]*r[3]+n[1]*r[8]+n[2]*r[13]+n[3]*r[18],t[4]=n[0]*r[4]+n[1]*r[9]+n[2]*r[14]+n[3]*r[19]+n[4],t[5]=n[5]*r[0]+n[6]*r[5]+n[7]*r[10]+n[8]*r[15],t[6]=n[5]*r[1]+n[6]*r[6]+n[7]*r[11]+n[8]*r[16],t[7]=n[5]*r[2]+n[6]*r[7]+n[7]*r[12]+n[8]*r[17],t[8]=n[5]*r[3]+n[6]*r[8]+n[7]*r[13]+n[8]*r[18],t[9]=n[5]*r[4]+n[6]*r[9]+n[7]*r[14]+n[8]*r[19]+n[9],t[10]=n[10]*r[0]+n[11]*r[5]+n[12]*r[10]+n[13]*r[15],t[11]=n[10]*r[1]+n[11]*r[6]+n[12]*r[11]+n[13]*r[16],t[12]=n[10]*r[2]+n[11]*r[7]+n[12]*r[12]+n[13]*r[17],t[13]=n[10]*r[3]+n[11]*r[8]+n[12]*r[13]+n[13]*r[18],t[14]=n[10]*r[4]+n[11]*r[9]+n[12]*r[14]+n[13]*r[19]+n[14],t[15]=n[15]*r[0]+n[16]*r[5]+n[17]*r[10]+n[18]*r[15],t[16]=n[15]*r[1]+n[16]*r[6]+n[17]*r[11]+n[18]*r[16],t[17]=n[15]*r[2]+n[16]*r[7]+n[17]*r[12]+n[18]*r[17],t[18]=n[15]*r[3]+n[16]*r[8]+n[17]*r[13]+n[18]*r[18],t[19]=n[15]*r[4]+n[16]*r[9]+n[17]*r[14]+n[18]*r[19]+n[19],t}_colorMatrix(t){const n=new Float32Array(t);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n}brightness(t,n){const r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,n)}tint(t,n){const[r,i,o]=Vn.shared.setValue(t).toArray(),s=[r,0,0,0,0,0,i,0,0,0,0,0,o,0,0,0,0,0,1,0];this._loadMatrix(s,n)}greyscale(t,n){const r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,n)}blackAndWhite(t){const n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,t)}hue(t,n){t=(t||0)/180*Math.PI;const r=Math.cos(t),i=Math.sin(t),o=Math.sqrt,s=1/3,a=o(s),c=r+(1-r)*s,u=s*(1-r)-a*i,f=s*(1-r)+a*i,h=s*(1-r)+a*i,p=r+s*(1-r),g=s*(1-r)-a*i,v=s*(1-r)-a*i,y=s*(1-r)+a*i,S=r+s*(1-r),w=[c,u,f,0,0,h,p,g,0,0,v,y,S,0,0,0,0,0,1,0];this._loadMatrix(w,n)}contrast(t,n){const r=(t||0)+1,i=-.5*(r-1),o=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(o,n)}saturate(t=0,n){const r=t*2/3+1,i=(r-1)*-.5,o=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(o,n)}desaturate(){this.saturate(-1)}negative(t){const n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,t)}sepia(t){const n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,t)}technicolor(t){const n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,t)}polaroid(t){const n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,t)}toBGR(t){const n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,t)}kodachrome(t){const n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,t)}browni(t){const n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,t)}vintage(t){const n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,t)}colorTone(t,n,r,i,o){t=t||.2,n=n||.15,r=r||16770432,i=i||3375104;const s=Vn.shared,[a,c,u]=s.setValue(r).toArray(),[f,h,p]=s.setValue(i).toArray(),g=[.3,.59,.11,0,0,a,c,u,t,0,f,h,p,n,0,a-f,c-h,u-p,0,0];this._loadMatrix(g,o)}night(t,n){t=t||.1;const r=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(r,n)}predator(t,n){const r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,n)}lsd(t){const n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.uniforms.m}set matrix(t){this.uniforms.m=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}M5.prototype.grayscale=M5.prototype.greyscale;var fUe=`varying vec2 vFilterCoord; -varying vec2 vTextureCoord; - -uniform vec2 scale; -uniform mat2 rotation; -uniform sampler2D uSampler; -uniform sampler2D mapSampler; - -uniform highp vec4 inputSize; -uniform vec4 inputClamp; - -void main(void) -{ - vec4 map = texture2D(mapSampler, vFilterCoord); - - map -= 0.5; - map.xy = scale * inputSize.zw * (rotation * map.xy); - - gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); -} -`,hUe=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; -uniform mat3 filterMatrix; - -varying vec2 vTextureCoord; -varying vec2 vFilterCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); - vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; -} -`;class pUe extends no{constructor(t,n){const r=new Cr;t.renderable=!1,super(hUe,fUe,{mapSampler:t._texture,filterMatrix:r,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=t,this.maskMatrix=r,n==null&&(n=20),this.scale=new Dt(n,n)}apply(t,n,r,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const o=this.maskSprite.worldTransform,s=Math.sqrt(o.a*o.a+o.b*o.b),a=Math.sqrt(o.c*o.c+o.d*o.d);s!==0&&a!==0&&(this.uniforms.rotation[0]=o.a/s,this.uniforms.rotation[1]=o.b/s,this.uniforms.rotation[2]=o.c/a,this.uniforms.rotation[3]=o.d/a),t.applyFilter(this,n,r,i)}get map(){return this.uniforms.mapSampler}set map(t){this.uniforms.mapSampler=t}}var mUe=`varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; -uniform sampler2D uSampler; -uniform highp vec4 inputSize; - - -/** - Basic FXAA implementation based on the code on geeks3d.com with the - modification that the texture2DLod stuff was removed since it's - unsupported by WebGL. - - -- - - From: - https://github.com/mitsuhiko/webgl-meincraft - - Copyright (c) 2011 by Armin Ronacher. - - Some rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FXAA_REDUCE_MIN -#define FXAA_REDUCE_MIN (1.0/ 128.0) -#endif -#ifndef FXAA_REDUCE_MUL -#define FXAA_REDUCE_MUL (1.0 / 8.0) -#endif -#ifndef FXAA_SPAN_MAX -#define FXAA_SPAN_MAX 8.0 -#endif - -//optimized version for mobile, where dependent -//texture reads can be a bottleneck -vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, - vec2 v_rgbNW, vec2 v_rgbNE, - vec2 v_rgbSW, vec2 v_rgbSE, - vec2 v_rgbM) { - vec4 color; - vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; - vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; - vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; - vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; - vec4 texColor = texture2D(tex, v_rgbM); - vec3 rgbM = texColor.xyz; - vec3 luma = vec3(0.299, 0.587, 0.114); - float lumaNW = dot(rgbNW, luma); - float lumaNE = dot(rgbNE, luma); - float lumaSW = dot(rgbSW, luma); - float lumaSE = dot(rgbSE, luma); - float lumaM = dot(rgbM, luma); - float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); - float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); - - mediump vec2 dir; - dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); - dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); - - float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * - (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); - - float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); - dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), - max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), - dir * rcpDirMin)) * inverseVP; - - vec3 rgbA = 0.5 * ( - texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + - texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); - vec3 rgbB = rgbA * 0.5 + 0.25 * ( - texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + - texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); - - float lumaB = dot(rgbB, luma); - if ((lumaB < lumaMin) || (lumaB > lumaMax)) - color = vec4(rgbA, texColor.a); - else - color = vec4(rgbB, texColor.a); - return color; -} - -void main() { - - vec4 color; - - color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); - - gl_FragColor = color; -} -`,gUe=` -attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -void texcoords(vec2 fragCoord, vec2 inverseVP, - out vec2 v_rgbNW, out vec2 v_rgbNE, - out vec2 v_rgbSW, out vec2 v_rgbSE, - out vec2 v_rgbM) { - v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; - v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; - v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; - v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; - v_rgbM = vec2(fragCoord * inverseVP); -} - -void main(void) { - - gl_Position = filterVertexPosition(); - - vFragCoord = aVertexPosition * outputFrame.zw; - - texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); -} -`;class vUe extends no{constructor(){super(gUe,mUe)}}var yUe=`precision highp float; - -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform float uNoise; -uniform float uSeed; -uniform sampler2D uSampler; - -float rand(vec2 co) -{ - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main() -{ - vec4 color = texture2D(uSampler, vTextureCoord); - float randomValue = rand(gl_FragCoord.xy * uSeed); - float diff = (randomValue - 0.5) * uNoise; - - // Un-premultiply alpha before applying the color matrix. See issue #3539. - if (color.a > 0.0) { - color.rgb /= color.a; - } - - color.r += diff; - color.g += diff; - color.b += diff; - - // Premultiply alpha again. - color.rgb *= color.a; - - gl_FragColor = color; -} -`;class bUe extends no{constructor(t=.5,n=Math.random()){super(Dre,yUe,{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 vV={AlphaFilter:iUe,BlurFilter:uUe,BlurFilterPass:O5,ColorMatrixFilter:M5,DisplacementFilter:pUe,FXAAFilter:vUe,NoiseFilter:bUe};Object.entries(vV).forEach(([e,t])=>{Object.defineProperty(vV,e,{get(){return fn("7.1.0",`filters.${e} has moved to ${e}`),t}})});class xUe{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(si.system.add(this.tickerUpdate,this,Qp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(si.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTimer.priority-i.priority)}dispatchEvent(t,n){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,n),this.dispatch.emit(n||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const n=this.mappingTable[t.type];if(n)for(let r=0,i=n.length;r=0;i--)if(t.currentTarget=r[i],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,n,r=this._allInteractiveElements){if(r.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(n)?n:[n];for(let o=r.length-1;o>=0;o--)i.forEach(s=>{t.currentTarget=r[o],this.notifyTarget(t,s)})}propagationPath(t){const n=[t];for(let r=0;r=0;h--){const p=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),a=!0}}}const c=this._isInteractive(n),u=t.isInteractive();return u&&u&&this._allInteractiveElements.push(t),s||this._hitElements.length>0?null:a?this._hitElements:c&&!o(t,r)&&i(t,r)?u?[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 u=c.length-1;u>=0;u--){const f=c[u],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),a=t.isInteractive();return s&&i(t,r)?a?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,n){var r;if(t.hitArea&&(t.worldTransform.applyInverse(n,s$),!t.hitArea.contains(s$.x,s$.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 il)){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,u;if(!(t instanceof il)){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=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?s.push("pointermove"):this.dispatchEvent(n,"pointermove"),a&&s.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?s.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),a&&s.push("globaltouchmove")),r&&(this.moveOnAll?s.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),a&&s.push("globalmousemove"),this.cursor=(u=n.target)==null?void 0:u.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 il)){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 il)){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 il)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const n=performance.now(),r=this.createPointerEvent(t);if(this.dispatchEvent(r,"pointerup"),r.pointerType==="touch")this.dispatchEvent(r,"touchend");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const a=r.button===2;this.dispatchEvent(r,a?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),o=this.findMountedTarget(i.pressTargetsByButton[t.button]);let s=o;if(o&&!r.composedPath().includes(o)){let a=o;for(;a&&!r.composedPath().includes(a);){if(r.currentTarget=a,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch")this.notifyTarget(r,"touchendoutside");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const c=r.button===2;this.notifyTarget(r,c?"rightupoutside":"mouseupoutside")}a=a.parent}delete i.pressTargetsByButton[t.button],s=a}if(s){const a=this.clonePointerEvent(r,"click");a.target=s,a.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:n});const c=i.clicksByButton[t.button];if(c.target===a.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=a.target,c.timeStamp=n,a.detail=c.clickCount,a.pointerType==="mouse"){const u=a.button===2;this.dispatchEvent(a,u?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(r)}mapPointerUpOutside(t){if(!(t instanceof il)){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 dv)){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,D5._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=EUe),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=CUe[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 iw=D5;iw.extension={name:"events",type:[ot.RendererSystem,ot.CanvasRendererSystem]};iw.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};wt.add(iw);function yV(e){return e==="dynamic"||e==="static"}const TUe={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??yV(iw.defaultEventMode)},set interactive(e){fn("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??iw.defaultEventMode},set eventMode(e){this._internalInteractive=yV(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 Jw))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}};Ur.mixin(TUe);const kUe={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Ur.mixin(kUe);const AUe=9,kS=100,IUe=0,RUe=0,bV=2,xV=1,PUe=-1e3,OUe=-1e3,MUe=2;class Ure{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,(Iu.tablet||Iu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${kS}px`,n.style.height=`${kS}px`,n.style.position="absolute",n.style.top=`${IUe}px`,n.style.left=`${RUe}px`,n.style.zIndex=bV.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=`${xV}px`,t.style.height=`${xV}px`,t.style.position="absolute",t.style.top=`${PUe}px`,t.style.left=`${OUe}px`,t.style.zIndex=MUe.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=`${kS}px`,n.style.height=`${kS}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=bV.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 Jw(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===AUe&&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}}Ure.extension={name:"accessibility",type:[ot.RendererPlugin,ot.CanvasRendererPlugin]};wt.add(Ure);const L5=class{constructor(e){this.stage=new us,e=Object.assign({forceCanvas:!1},e),this.renderer=pje(e),L5._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=L5._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 IU=L5;IU._plugins=[];wt.handleByList(ot.Application,IU._plugins);class Hre{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}}Hre.extension=ot.Application;wt.add(Hre);const wV={loader:ot.LoadParser,resolver:ot.ResolveParser,cache:ot.CacheParser,detection:ot.DetectionParser};wt.handle(ot.Asset,e=>{const t=e.ref;Object.entries(wV).filter(([n])=>!!t[n]).forEach(([n,r])=>wt.add(Object.assign(t[n],{extension:t[n].extension??r})))},e=>{const t=e.ref;Object.keys(wV).filter(n=>!!t[n]).forEach(n=>wt.remove(t[n]))});class DUe{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),N5=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function Wre(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)}),Wre(e,i,0,n,r)}else r.push(e);return r}const sT=e=>!Array.isArray(e);class NUe{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=Lu(t);let i;for(let a=0;a{i[a]=n}));const o=Object.keys(i),s={cacheKeys:o,keys:r};if(r.forEach(a=>{this._cacheMap.set(a,s)}),o.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==n&&console.warn("[Cache] already has key:",a),this._cache.set(a,i[a])}),n instanceof mt){const a=n;r.forEach(c=>{a.baseTexture!==mt.EMPTY.baseTexture&&qt.addToCache(a.baseTexture,c),mt.addToCache(a,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 Yb=new NUe;class BUe{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,n,r)=>(this._parsersValidated=!1,t[n]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,n){const r={promise:null,parser:null};return r.promise=(async()=>{var s,a;let i=null,o=null;if(n.loadParser&&(o=this._parserHash[n.loadParser],o||console.warn(`[Assets] specified load parser "${n.loadParser}" not found while loading ${t}`)),!o){for(let c=0;c({src:u})),a=s.length,c=s.map(async u=>{const f=vo.toAbsolute(u.src);if(!i[u.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,u)),i[u.src]=await this.promiseCache[f].promise,n&&n(++r/a)}catch(h){throw delete this.promiseCache[f],delete i[u.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=Lu(t,i=>({src:i})).map(async i=>{var a,c;const o=vo.toAbsolute(i.src),s=this.promiseCache[o];if(s){const u=await s.promise;(c=(a=s.parser)==null?void 0:a.unload)==null||c.call(a,u,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 xc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(xc||{});const $Ue=".json",FUe="application/json",zUe={extension:{type:ot.LoadParser,priority:xc.Low},name:"loadJson",test(e){return Zw(e,FUe)||pm(e,$Ue)},async load(e){return await(await rt.ADAPTER.fetch(e)).json()}};wt.add(zUe);const jUe=".txt",UUe="text/plain",HUe={name:"loadTxt",extension:{type:ot.LoadParser,priority:xc.Low},test(e){return Zw(e,UUe)||pm(e,jUe)},async load(e){return await(await rt.ADAPTER.fetch(e)).text()}};wt.add(HUe);const WUe=["normal","bold","100","200","300","400","500","600","700","800","900"],GUe=[".ttf",".otf",".woff",".woff2"],VUe=["font/ttf","font/otf","font/woff","font/woff2"],qUe=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function XUe(e){const t=vo.extname(e),i=vo.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1));let o=i.length>0;for(const a of i)if(!a.match(qUe)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const YUe={extension:{type:ot.LoadParser,priority:xc.Low},name:"loadWebFont",test(e){return Zw(e,VUe)||pm(e,GUe)},async load(e,t){var r,i,o;const n=rt.ADAPTER.getFontFaceSet();if(n){const s=[],a=((r=t.data)==null?void 0:r.family)??XUe(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>WUe.includes(f)))??["normal"],u=t.data??{};for(let f=0;frt.ADAPTER.getFontFaceSet().delete(t))}};wt.add(YUe);let _V=0,a$;const KUe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",QUe={id:"checkImageBitmap",code:` - async function checkImageBitmap() - { - try - { - if (typeof createImageBitmap !== 'function') return false; - - const response = await fetch('${KUe}'); - const imageBlob = await response.blob(); - const imageBitmap = await createImageBitmap(imageBlob); - - return imageBitmap.width === 1 && imageBitmap.height === 1; - } - catch (e) - { - return false; - } - } - checkImageBitmap().then((result) => { self.postMessage(result); }); - `},JUe={id:"loadImageBitmap",code:` - async function loadImageBitmap(url) - { - const response = await fetch(url); - - if (!response.ok) - { - throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \` - + \`\${response.status} \${response.statusText}\`); - } - - const imageBlob = await response.blob(); - const imageBitmap = await createImageBitmap(imageBlob); - - return imageBitmap; - } - self.onmessage = async (event) => - { - try - { - const imageBitmap = await loadImageBitmap(event.data.data[0]); - - self.postMessage({ - data: imageBitmap, - uuid: event.data.uuid, - id: event.data.id, - }, [imageBitmap]); - } - catch(e) - { - self.postMessage({ - error: e, - uuid: event.data.uuid, - id: event.data.id, - }); - } - };`};let l$;class ZUe{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([QUe.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(){a$===void 0&&(a$=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[_V]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:_V++,id:r})}}const SV=new ZUe;function $A(e,t,n){const r=new mt(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const e6e=[".jpeg",".jpg",".png",".webp",".avif"],t6e=["image/jpeg","image/png","image/webp","image/avif"];async function n6e(e){const t=await rt.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 FA={name:"loadTextures",extension:{type:ot.LoadParser,priority:xc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Zw(e,t6e)||pm(e,e6e)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await SV.isImageBitmapSupported()?r=await SV.loadImageBitmap(e):r=await n6e(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 qt(r,{resolution:lf(e),...t.data});return i.resource.src=e,$A(i,n,e)},unload(e){e.destroy(!0)}};wt.add(FA);const r6e=".svg",i6e="image/svg+xml",o6e={extension:{type:ot.LoadParser,priority:xc.High},name:"loadSVG",test(e){return Zw(e,i6e)||pm(e,r6e)},async testParse(e){return rw.test(e)},async parse(e,t,n){var s;const r=new rw(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new qt(r,{resolution:lf(e),...t==null?void 0:t.data});return i.resource.src=e,$A(i,n,e)},async load(e,t){return(await rt.ADAPTER.fetch(e)).text()},unload:FA.unload};wt.add(o6e);class s6e{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=Lu(t);i.forEach(s=>{this.hasKey(s)&&console.warn(`[Resolver] already has key: ${s} overwriting`)}),Array.isArray(n)||(typeof n=="string"?n=LUe(n):n=[n]);const o=n.map(s=>{let a=s;if(typeof s=="string"){let c=!1;for(let u=0;u{this._assetMap[s]=o})}resolveBundle(t){const n=sT(t);t=Lu(t);const r={};return t.forEach(i=>{const o=this._bundles[i];if(o){const s=this.resolve(o),a={};for(const c in s){const u=s[c];a[this._extractAssetIdFromBundle(i,c)]=u}r[i]=a}}),n?r[t[0]]:r}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const r={};for(const i in n)r[i]=n[i].src;return r}return n.src}resolve(t){const n=sT(t);t=Lu(t);const r={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let o=this._assetMap[i];const s=this._getPreferredOrder(o),a=o[0];s==null||s.priority.forEach(c=>{s.params[c].forEach(u=>{const f=o.filter(h=>h[c]?h[c]===u:!1);f.length&&(o=f)})}),this._resolverHash[i]=o[0]??a}else{let o=i;(this._basePath||this._rootPath)&&(o=vo.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[i]={src:o}}r[i]=this._resolverHash[i]}),n?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;no.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}}class a6e{constructor(){this._detections=[],this._initialized=!1,this.resolver=new s6e,this.loader=new BUe,this.cache=Yb,this._backgroundLoader=new DUe(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var o,s,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let 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=(a=t.texturePreference)==null?void 0:a.format;i=typeof c=="string"?[c]:c;for(const u of this._detections)await u.test()||(i=await u.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=sT(t),i=Lu(t).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),o=this.resolver.resolve(i),s=await this._mapLoadToResolve(o,n);return r?s[i[0]]:s}addBundle(t,n){this.resolver.addBundle(t,n)}async loadBundle(t,n){this._initialized||await this.init();let r=!1;typeof t=="string"&&(r=!0,t=[t]);const i=this.resolver.resolveBundle(t),o={},s=Object.keys(i);let a=0,c=0;const u=()=>{n==null||n(++a/c)},f=s.map(h=>{const p=i[h];return c+=Object.keys(p).length,this._mapLoadToResolve(p,u).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 Yb.get(t);const n={};for(let r=0;r{const u=o[a.src],f=[a.src];a.alias&&f.push(...a.alias),s[i[c]]=u,Yb.set(f,u)}),s}async unload(t){this._initialized||await this.init();const n=Lu(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=Lu(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=>{Yb.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return FA.config.preferWorkers}set preferWorkers(t){fn("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 AS=new a6e;wt.handleByList(ot.LoadParser,AS.loader.parsers).handleByList(ot.ResolveParser,AS.resolver.parsers).handleByList(ot.CacheParser,AS.cache.parsers).handleByList(ot.DetectionParser,AS.detections);const l6e={extension:ot.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof mt),getCacheableAssets:(e,t)=>{const n={};return e.forEach(r=>{t.forEach((i,o)=>{n[r+(o===0?"":o+1)]=i})}),n}};wt.add(l6e);const c6e={extension:{type:ot.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await rt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};wt.add(c6e);const u6e={extension:{type:ot.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await rt.ADAPTER.fetch(e).then(n=>n.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};wt.add(u6e);const EV=["png","jpg","jpeg"],d6e={extension:{type:ot.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...EV],remove:async e=>e.filter(t=>!EV.includes(t))};wt.add(d6e);const f6e={extension:ot.ResolveParser,test:FA.test,parse:e=>{var t;return{resolution:parseFloat(((t=rt.RETINA_PREFIX.exec(e))==null?void 0:t[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(f6e);var Ls=(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))(Ls||{});const aT={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 yu,Fm;function CV(){Fm={s3tc:yu.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:yu.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:yu.getExtension("WEBGL_compressed_texture_etc"),etc1:yu.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:yu.getExtension("WEBGL_compressed_texture_pvrtc")||yu.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:yu.getExtension("WEBGL_compressed_texture_atc"),astc:yu.getExtension("WEBGL_compressed_texture_astc")}}const h6e={extension:{type:ot.DetectionParser,priority:2},test:async()=>{const t=rt.ADAPTER.createCanvas().getContext("webgl");return t?(yu=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{Fm||CV();const t=[];for(const n in Fm)Fm[n]&&t.push(n);return[...t,...e]},remove:async e=>(Fm||CV(),e.filter(t=>!(t in Fm)))};wt.add(h6e);class p6e extends Qw{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 _5(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 _5(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class Pp extends p6e{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=Pp._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||Pp._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,n,r){const i=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let s=0,a=this.levels;s=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,n,r,i,o,s,a){const c=new Array(r);let u=t.byteOffset,f=s,h=a,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*aT[n];for(let y=0;y1?f:p,levelHeight:r>1?h:g,levelBuffer:new Uint8Array(t.buffer,u,v)},u+=v,f=f>>1||1,h=h>>1||1,p=f+i-1&~(i-1),g=h+o-1&~(o-1),v=p*g*aT[n];return c}}const c$=4,IS=124,m6e=32,TV=20,g6e=542327876,RS={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},v6e={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},PS={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},y6e=1,b6e=2,x6e=4,w6e=64,_6e=512,S6e=131072,E6e=827611204,C6e=861165636,T6e=894720068,k6e=808540228,A6e=4,I6e={[E6e]:Ls.COMPRESSED_RGBA_S3TC_DXT1_EXT,[C6e]:Ls.COMPRESSED_RGBA_S3TC_DXT3_EXT,[T6e]:Ls.COMPRESSED_RGBA_S3TC_DXT5_EXT},R6e={70:Ls.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Ls.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Ls.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Ls.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Ls.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Ls.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Ls.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Ls.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Ls.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function P6e(e){const t=new Uint32Array(e);if(t[0]!==g6e)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,IS/Uint32Array.BYTES_PER_ELEMENT),i=r[RS.HEIGHT],o=r[RS.WIDTH],s=r[RS.MIPMAP_COUNT],a=new Uint32Array(e,RS.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,m6e/Uint32Array.BYTES_PER_ELEMENT),c=a[y6e];if(c&x6e){const u=a[v6e.FOURCC];if(u!==k6e){const x=I6e[u],E=c$+IS,I=new Uint8Array(e,E);return[new Pp(I,{format:x,width:o,height:i,levels:s})]}const f=c$+IS,h=new Uint32Array(t.buffer,f,TV/Uint32Array.BYTES_PER_ELEMENT),p=h[PS.DXGI_FORMAT],g=h[PS.RESOURCE_DIMENSION],v=h[PS.MISC_FLAG],y=h[PS.ARRAY_SIZE],S=R6e[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===A6e)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");const w=new Array,b=c$+IS+TV;if(y===1)w.push(new Uint8Array(e,b));else{const x=aT[S];let E=0,I=o,A=i;for(let O=0;O>>1,A=A>>>1}let k=b;for(let O=0;Onew Pp(x,{format:S,width:o,height:i,levels:s}))}throw c&w6e?new Error("DDSParser does not support uncompressed texture data."):c&_6e?new Error("DDSParser does not supported YUV uncompressed texture data."):c&S6e?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&b6e?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 kV=[171,75,84,88,32,49,49,187,13,10,26,10],O6e=67305985,tl={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},B5=64,AV={[Ot.UNSIGNED_BYTE]:1,[Ot.UNSIGNED_SHORT]:2,[Ot.INT]:4,[Ot.UNSIGNED_INT]:4,[Ot.FLOAT]:4,[Ot.HALF_FLOAT]:8},M6e={[Ve.RGBA]:4,[Ve.RGB]:3,[Ve.RG]:2,[Ve.RED]:1,[Ve.LUMINANCE]:1,[Ve.LUMINANCE_ALPHA]:2,[Ve.ALPHA]:1},D6e={[Ot.UNSIGNED_SHORT_4_4_4_4]:2,[Ot.UNSIGNED_SHORT_5_5_5_1]:2,[Ot.UNSIGNED_SHORT_5_6_5]:2};function L6e(e,t,n=!1){const r=new DataView(t);if(!N6e(e,r))return null;const i=r.getUint32(tl.ENDIANNESS,!0)===O6e,o=r.getUint32(tl.GL_TYPE,i),s=r.getUint32(tl.GL_FORMAT,i),a=r.getUint32(tl.GL_INTERNAL_FORMAT,i),c=r.getUint32(tl.PIXEL_WIDTH,i),u=r.getUint32(tl.PIXEL_HEIGHT,i)||1,f=r.getUint32(tl.PIXEL_DEPTH,i)||1,h=r.getUint32(tl.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(tl.NUMBER_OF_FACES,i),g=r.getUint32(tl.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(tl.BYTES_OF_KEY_VALUE_DATA,i);if(u===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,w=c+3&-4,b=u+3&-4,x=new Array(h);let E=c*u;o===0&&(E=w*b);let I;if(o!==0?AV[o]?I=AV[o]*M6e[s]:I=D6e[o]:I=aT[a],I===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const A=n?$6e(r,v,i):null;let O=E*I,L=c,N=u,H=w,G=b,z=B5+v;for(let D=0;D1||o!==0?L:H,levelHeight:g>1||o!==0?N:G,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),G=N+S-1&~(S-1),O=H*G*I}return o!==0?{uncompressed:x.map(D=>{let F=D[0].levelBuffer,j=!1;return o===Ot.FLOAT?F=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===Ot.UNSIGNED_INT?(j=!0,F=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===Ot.INT&&(j=!0,F=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new Qw(F,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?B6e(s):s}}),kvData:A}:{compressed:x.map(D=>new Pp(null,{format:a,width:c,height:u,levels:g,levelBuffers:D})),kvData:A}}function N6e(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new qt(a,{mipmap:pc.OFF,alphaMode:Ll.NO_PREMULTIPLIED_ALPHA,resolution:lf(e),...t.data});return $A(c,n,e)});return s.length===1?s[0]:s},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(F6e);const z6e={extension:{type:ot.LoadParser,priority:xc.High},name:"loadKTX",test(e){return pm(e,".ktx")},async load(e,t,n){const i=await(await rt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:a}=L6e(e,i),c=o??s,u={mipmap:pc.OFF,alphaMode:Ll.NO_PREMULTIPLIED_ALPHA,resolution:lf(e),...t.data},f=c.map(h=>{c===s&&Object.assign(u,{type:h.type,format:h.format});const p=new qt(h,u);return p.ktxKeyValueData=a,$A(p,n,e)});return f.length===1?f[0]:f},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};wt.add(z6e);const j6e={extension:ot.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=rt.RETINA_PREFIX.exec(e))==null?void 0:r[1])??"1"),format:o.find(s=>e.endsWith(s)),src:e}}return{resolution:parseFloat(((i=rt.RETINA_PREFIX.exec(e))==null?void 0:i[1])??"1"),format:e.split(".").pop(),src:e}}};wt.add(j6e);const U6e=new Zt,H6e=4,vx=class{constructor(e){this.renderer=e}async image(e,t,n){const r=new Image;return r.src=await this.base64(e,t,n),r}async base64(e,t,n){const r=this.canvas(e);if(r.toBlob!==void 0)return new Promise((i,o)=>{r.toBlob(s=>{if(!s){o(new Error("ICanvas.toBlob failed!"));return}const a=new FileReader;a.onload=()=>i(a.result),a.onerror=o,a.readAsDataURL(s)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const i=await r.convertToBlob({type:t,quality:n});return new Promise((o,s)=>{const a=new FileReader;a.onload=()=>o(a.result),a.onerror=s,a.readAsDataURL(i)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);o&&vx._flipY(n,r,i),vx._unpremultiplyAlpha(n);const s=new ize(r,i,1),a=new ImageData(new Uint8ClampedArray(n.buffer),r,i);return s.context.putImageData(a,0,0),s.canvas}pixels(e,t){const{pixels:n,width:r,height:i,flipY:o}=this._rawPixels(e,t);return o&&vx._flipY(n,r,i),vx._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 fm?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=U6e,t.width=n.width/r,t.height=n.height/r),i=!0,n.renderTexture.bind();const a=Math.round(t.width*r),c=Math.round(t.height*r),u=new Uint8Array(H6e*a*c),f=n.gl;return f.readPixels(Math.round(t.x*r),Math.round(t.y*r),a,c,f.RGBA,f.UNSIGNED_BYTE,u),s&&(o==null||o.destroy(!0)),{pixels:u,width:a,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&&a>=0&&i>=0&&o>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(s+a)),u=c*8+(i?4:0)+(o?4:0);if(t.length=u,u===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=u;{const v=i+s,y=o,S=n+v,w=n-v,b=r+y;if(t[f++]=S,t[f++]=b,t[--h]=b,t[--h]=w,o){const x=r-y;t[p++]=w,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){IV(n,!1);const s=[];for(let u=0;u=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)}},G6e={build(e){lT.build(e)},triangulate(e,t){lT.triangulate(e,t)}};var ll=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(ll||{}),bp=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(bp||{});const fv={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 RV{static curveTo(t,n,r,i,o,s){const a=s[s.length-2],u=s[s.length-1]-n,f=a-t,h=i-n,p=r-t,g=Math.abs(u*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=u*u+f*f,y=h*h+p*p,S=u*h+f*p,w=o*Math.sqrt(v)/g,b=o*Math.sqrt(y)/g,x=w*S/v,E=b*S/y,I=w*p+b*f,A=w*h+b*u,k=f*(b+x),O=u*(b+x),L=p*(w+E),N=h*(w+E),H=Math.atan2(O-A,k-I),G=Math.atan2(N-A,L-I);return{cx:I+t,cy:A+n,radius:o,startAngle:H,endAngle:G,anticlockwise:f*h>p*u}}static arc(t,n,r,i,o,s,a,c,u){const f=a-s,h=fv._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/rT)*40),p=f/(h*2),g=p*2,v=Math.cos(p),y=Math.sin(p),S=h-1,w=S%1/S;for(let b=0;b<=S;++b){const x=b+w*b,E=p+s+g*x,I=Math.cos(E),A=-Math.sin(E);u.push((v*I+y*A)*o+r,(v*-A+y*I)*o+i)}}}class V6e{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 RU{static curveLength(t,n,r,i,o,s,a,c){let f=0,h=0,p=0,g=0,v=0,y=0,S=0,w=0,b=0,x=0,E=0,I=t,A=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,w=S*t+3*y*h*r+3*v*p*o+g*a,b=S*n+3*y*h*i+3*v*p*s+g*c,x=I-w,E=A-b,I=w,A=b,f+=Math.sqrt(x*x+E*E);return f}static curveTo(t,n,r,i,o,s,a){const c=a[a.length-2],u=a[a.length-1];a.length-=2;const f=fv._segmentsCount(RU.curveLength(c,u,t,n,r,i,o,s));let h=0,p=0,g=0,v=0,y=0;a.push(c,u);for(let S=1,w=0;S<=f;++S)w=S/f,h=1-w,p=h*h,g=p*h,v=w*w,y=v*w,a.push(g*c+3*p*w*t+3*h*v*r+y*o,g*u+3*p*w*n+3*h*v*i+y*s)}}function PV(e,t,n,r,i,o,s,a){const c=e-n*i,u=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=u+g,S=f+p,w=h+g;return a.push(v,y,S,w),2}function qh(e,t,n,r,i,o,s,a){const c=n-e,u=r-t;let f=Math.atan2(c,u),h=Math.atan2(i-e,o-t);a&&fh&&(h+=Math.PI*2);let p=f;const g=h-f,v=Math.abs(g),y=Math.sqrt(c*c+u*u),S=(15*v*Math.sqrt(y)/Math.PI>>0)+1,w=g/S;if(p+=w,a){s.push(e,t,n,r);for(let b=1,x=p;b=0&&(o.join===ll.ROUND?p+=qh(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+w)*(-O+E)-(-k+x)*(-O+b),J=(-L+I)*(-N+E)-(-L+x)*(-N+A),ae=(W*J-X*se)/ce,le=(Q*se-K*J)/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(W*W+K*K,X*X+Q*Q),be=ue?z:D,Ze=me+be*be*y,Xe=he<=Ze;let ct=o.join;if(ct===ll.MITER&&he/y>S&&(ct=ll.BEVEL),Xe)switch(ct){case ll.MITER:{f.push(pe,ve,ye,xe);break}case ll.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 ll.ROUND:{ue?(f.push(pe,ve,x+k*D,E+O*D),p+=qh(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+=qh(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),ct){case ll.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case ll.ROUND:{ue?p+=qh(x,E,x+k*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=qh(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}}w=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=w-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===bp.ROUND?p+=qh(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===bp.SQUARE&&(p+=PV(x,E,k,O,z,D,!1,f)));const F=t.indices,j=fv.epsilon*fv.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 cT(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 cT(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(n=this.batches[this.batches.length-1],r=n.style);for(let a=this.shapeIndex;a65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&s===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=s?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(r=OS.pop(),r||(r=new E5,r.texArray=new T5),this.drawCalls.push(r)),r.start=u,r.size=0,r.texArray.count=0,r.type=c),v.touched=1,v._batchEnabled=e,v._batchLocation=i,v.wrapMode=Jd.REPEAT,r.texArray.elements[r.texArray.count++]=v,i++)),r.size+=h.size,u+=h.size,s=v._batchLocation,this.addColors(t,g.color,g.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,s,h.attribSize,h.attribStart)}qt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),s=new Uint32Array(i);let a=0;for(let 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 Rg,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Rg,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),PU.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),RU.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=RV.curveTo(e,t,n,r,i,o);if(s){const{cx:a,cy:c,radius:u,startAngle:f,endAngle:h,anticlockwise:p}=s;this.arc(a,c,u,f,h,p)}return this}arc(e,t,n,r,i,o=!1){if(r===i)return this;if(!o&&i<=r?i+=rT:o&&r<=i&&(r+=rT),i-r===0)return this;const a=e+Math.cos(r)*n,c=t+Math.sin(r)*n,u=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const h=Math.abs(f[f.length-2]-a),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 Zt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new TU(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new EU(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new CU(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 Rg(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 a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));const c=n[0]._texture.baseTexture,u=c.alphaMode>0;this.state.blendMode=Qne(t.blendMode,u),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=Vn.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,u).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>=a.length&&a.push(this._generateOneMoreBuffer(t));const S=a[v];S.uploadDynamic(n,g,y);const w=t._bufferUpdateIDs[v]||0;p=p||S._updateID0);i[s]=u,i[s+o]=u,i[s+o*2]=u,i[s+o*3]=u,s+=o*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Kre.extension={name:"particle",type:ot.RendererPlugin};wt.add(Kre);var jA=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(jA||{});const MS={willReadFrequently:!0},yt=class{static get experimentalLetterSpacingSupported(){let e=yt._experimentalLetterSpacingSupported;if(e!==void 0){const t=rt.ADAPTER.getCanvasRenderingContext2D().prototype;e=yt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,r,i,o,s,a,c){this.text=e,this.style=t,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=c}static measureText(e,t,n,r=yt._canvas){n=n??t.wordWrap;const i=t.toFontString(),o=yt.measureFont(i);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const s=r.getContext("2d",MS);s.font=i;const c=(n?yt.wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),u=new Array(c.length);let f=0;for(let v=0;v0&&(r?i-=t:i+=(yt.graphemeSegmenter(e).length-1)*t),i}static wordWrap(e,t,n=yt._canvas){const r=n.getContext("2d",MS);let i=0,o="",s="";const a=Object.create(null),{letterSpacing:c,whiteSpace:u}=t,f=yt.collapseSpaces(u),h=yt.collapseNewlines(u);let p=!f;const g=t.wordWrapWidth+c,v=yt.tokenize(e);for(let y=0;yg)if(o!==""&&(s+=yt.addLine(o),o="",i=0),yt.canBreakWords(S,t.breakWords)){const b=yt.wordWrapSplit(S);for(let x=0;xg&&(s+=yt.addLine(o),p=!1,o="",i=0),o+=E,i+=k}}else{o.length>0&&(s+=yt.addLine(o),o="",i=0);const b=y===v.length-1;s+=yt.addLine(S,!b),p=!1,o="",i=0}else w+i>g&&(p=!1,s+=yt.addLine(o),o="",i=0),(o.length>0||!yt.isBreakingSpace(S)||p)&&(o+=S,i+=w)}return s+=yt.addLine(o,!1),s}static addLine(e,t=!0){return e=yt.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,n,r){let i=n[e];return typeof i!="number"&&(i=yt._measureText(e,t,r)+t,n[e]=i),i}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!yt.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:yt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:yt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let r=0;rs;--h){for(let v=0;v{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(n=>n.segment)}return e=>[...e]})();Qi.experimentalLetterSpacing=!1;Qi._fonts={};Qi._newlines=[10,13];Qi._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const t8e=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],yx=class{constructor(e){this.styleID=0,this.reset(),p$(this,e,e)}clone(){const e={};return p$(e,this,yx.defaultStyle),new yx(e)}reset(){p$(this,yx.defaultStyle,yx.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=h$(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=h$(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){n8e(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=h$(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)&&!t8e.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let Vu=yx;Vu.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:jA.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 h$(e){const t=Vn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function n8e(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,w=n.lineHeight*(p+1);let b=S;p+10}}function o8e(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(u8e),this.registerFindHook(d8e),this.registerFindHook(o8e),this.registerFindHook(s8e),this.registerFindHook(a8e),this.registerUploadHook(l8e),this.registerUploadHook(c8e)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,si.system.addOnce(this.tick,this,Qp.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,r=this.uploadHooks.length;n=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&si.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let uT=Qre;uT.uploadsPerFrame=4;Object.defineProperties(rt,{UPLOADS_PER_FRAME:{get(){return uT.uploadsPerFrame},set(e){fn("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),uT.uploadsPerFrame=e}}});function Jre(e,t){return t instanceof qt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function f8e(e,t){if(!(t instanceof hv))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?cc.from(m8e,p8e,n):cc.from(BV,g8e,n)}render(t){const n=this.renderer,r=this.quad;let i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);const o=t.uvRespectAnchor?t.anchor.x:0,s=t.uvRespectAnchor?t.anchor.y:0;i=r.uvs,i[0]=i[6]=-o,i[1]=i[3]=-s,i[2]=i[4]=1-o,i[5]=i[7]=1-s,r.invalidate();const a=t._texture,c=a.baseTexture,u=c.alphaMode>0,f=t.tileTransform.localTransform,h=t.uvMatrix;let p=c.isPowerOfTwo&&a.frame.width===c.width&&a.frame.height===c.height;p&&(c._glTextures[n.CONTEXT_UID]?p=c.wrapMode!==Jd.CLAMP:c.wrapMode===Jd.CLAMP&&(c.wrapMode=Jd.REPEAT));const g=p?this.simpleShader:this.shader,v=a.width,y=a.height,S=t._width,w=t._height;DS.set(f.a*v/S,f.b*v/w,f.c*y/S,f.d*y/w,f.tx/S,f.ty/w),DS.invert(),p?DS.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=DS.toArray(!0),g.uniforms.uColor=Vn.shared.setValue(t.tint).premultiply(t.worldAlpha,u).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),g.uniforms.uSampler=a,n.shader.bind(g),n.geometry.bind(r),this.state.blendMode=Qne(t.blendMode,u),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}eie.extension={name:"tilingSprite",type:ot.RendererPlugin};wt.add(eie);const bx=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof mt?e:null,this.baseTexture=e instanceof qt?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=lf(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<=bx.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=bx.BATCH_SIZE;for(;t-e{this._batchIndex*bx.BATCH_SIZE{r[i]=t}),Object.keys(t.textures).forEach(i=>{r[i]=t.textures[i]}),!n){const i=vo.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const a=tie([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,a)})}return r}const b8e={extension:ot.Asset,cache:{test:e=>e instanceof z5,getCacheableAssets:(e,t)=>tie(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&y8e.includes(i)},parse:e=>{var n;const t=e.split(".");return{resolution:parseFloat(((n=rt.RETINA_PREFIX.exec(e))==null?void 0:n[1])??"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:ot.LoadParser,priority:xc.Normal},async testParse(e,t){return vo.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var u,f;let r=vo.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=N5(i,t.src);const s=(await n.load([i]))[i],a=new z5(s.baseTexture,e,t.src);await a.parse();const c=(u=e==null?void 0:e.meta)==null?void 0:u.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=N5(v,t.src),h.push(n.load({src:v,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(h);a.linkedSheets=p,p.forEach(g=>{g.linkedSheets=[a].concat(a.linkedSheets.filter(v=>v!==g))})}return a},unload(e){e.destroy(!0)}}};wt.add(b8e);class dT{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class ME{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const n=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const o in n){const s=n[o].match(/^[a-z]+/gm)[0],a=n[o].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const u in a){const f=a[u].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 dT;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 j5{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 dT,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),s=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),c=t.getElementsByTagName("distanceField");for(let u=0;u")?j5.test(rt.ADAPTER.parseXML(t)):!1}static parse(t){return j5.parse(rt.ADAPTER.parseXML(t))}}const m$=[ME,j5,U5];function x8e(e){for(let t=0;t=a-L*o){if(v===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: '${f.fontFamily}', fontSize: ${f.fontSize}px, char: '${A}')`);--I,y=null,S=null,w=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: '${A}')`);--I,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}_8e(y,S,k,g,v,o,f);const H=DE(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 I=0,A=u.length;I 0.99) {\r - alpha = 1.0;\r - }\r -\r - // Gamma correction for coverage-like alpha\r - float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r - float gamma = mix(1.0, 1.0 / 2.2, luma);\r - float coverage = pow(uColor.a * alpha, gamma); \r -\r - // NPM Textures, NPM outputs\r - gl_FragColor = vec4(uColor.rgb, coverage);\r -}\r -`,C8e=`// Mesh material default fragment\r -attribute vec2 aVertexPosition;\r -attribute vec2 aTextureCoord;\r -\r -uniform mat3 projectionMatrix;\r -uniform mat3 translationMatrix;\r -uniform mat3 uTextureMatrix;\r -\r -varying vec2 vTextureCoord;\r -\r -void main(void)\r -{\r - gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r -\r - vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r -}\r -`;const $V=[],FV=[],zV=[],rie=class extends us{constructor(e,t={}){super();const{align:n,tint:r,maxWidth:i,letterSpacing:o,fontName:s,fontSize:a}=Object.assign({},rie.styleDefaults,t);if(!Xo.available[s])throw new Error(`Missing BitmapFont "${s}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new Vn(r),this._font=void 0,this._fontName=s,this._fontSize=a,this.text=e,this._maxWidth=i,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new Dd(()=>{this.dirty=!0},this,0,0),this._roundPixels=rt.ROUND_PIXELS,this.dirty=!0,this._resolution=rt.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var N;const e=Xo.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Dt,i=[],o=[],s=[],a=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",c=nie(a),u=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?$V:FV;let h=null,p=0,g=0,v=0,y=-1,S=0,w=0,b=0,x=0;for(let H=0;H0&&r.x>u&&(++w,Ig(i,1+y-w,1+H-y),H=y,y=-1,o.push(S),s.push(i.length>0?i[i.length-1].prevSpaces:0),g=Math.max(g,S),v++,r.x=0,r.y+=e.lineHeight,h=null,x=0)}const E=c[c.length-1];E!=="\r"&&E!==` -`&&(/(?:\s)/.test(E)&&(p=S),o.push(p),g=Math.max(g,p),s.push(-1));const I=[];for(let H=0;H<=v;H++){let G=0;this._align==="right"?G=g-o[H]:this._align==="center"?G=(g-o[H])/2:this._align==="justify"&&(G=s[H]<0?0:(g-o[H])/s[H]),I.push(G)}const A=i.length,k={},O=[],L=this._activePagesMeshData;f.push(...L);for(let H=0;H6*z)||G.vertices.length<$5.BATCHABLE_SIZE*2)G.vertices=new Float32Array(4*2*z),G.uvs=new Float32Array(4*2*z),G.indices=new Uint16Array(6*z);else{const D=G.total,F=G.vertices;for(let j=D*4*2;jt[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=mt.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 T8e=rie;T8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const k8e=[".xml",".fnt"],A8e={extension:{type:ot.LoadParser,priority:xc.Normal},name:"loadBitmapFont",test(e){return k8e.includes(vo.extname(e).toLowerCase())},async testParse(e){return ME.test(e)||U5.test(e)},async parse(e,t,n){const r=ME.test(e)?ME.parse(e):U5.parse(e),{src:i}=t,{page:o}=r,s=[];for(let u=0;ua[u]);return Xo.install(r,c,!0)},async load(e,t){return(await rt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};wt.add(A8e);const zm=class extends Vu{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new zm(Object.keys(zm.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 zm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=zm;if(n[e]){const r=n[e];return this._fonts.push(r),r.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return rt.ADAPTER.fetch(e).then(r=>r.blob()).then(async r=>new Promise((i,o)=>{const s=URL.createObjectURL(r),a=new FileReader;a.onload=()=>i([s,a.result]),a.onerror=o,a.readAsDataURL(r)})).then(async([r,i])=>{const o=Object.assign({family:vo.basename(e,vo.extname(e)),weight:"normal",style:"normal",src:r,dataSrc:i,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const s=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style});o.fontFace=s,await s.load(),document.fonts.add(s),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} - @font-face { - font-family: "${t.family}"; - src: url('${t.dataSrc}'); - font-weight: ${t.weight}; - font-style: ${t.style}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=eze(e)),typeof e=="number"?Z4e(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,zm.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}=rt.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 t1=zm;t1.availableFonts={};t1.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 jm=class extends hm{constructor(e="",t={}){super(mt.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=mt.from(n,{scaleMode:rt.SCALE_MODE,resourceOptions:{autoLoad:!1}});r.orig=new Zt,r.trim=new Zt,this.texture=r;const i="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",s=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject"),c=document.createElementNS(o,"div"),u=document.createElementNS(o,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",s.appendChild(a),this.maxWidth=jm.defaultMaxWidth,this.maxHeight=jm.defaultMaxHeight,this._domElement=c,this._styleElement=u,this._svgRoot=s,this._foreignObject=a,this._foreignObject.appendChild(u),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=jm.defaultAutoResolution,this._resolution=jm.defaultResolution??rt.RESOLUTION,this.text=e,this.style=t}measureText(e){var a,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:(a=this._style)==null?void 0:a.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 a=new XMLSerializer().serializeToString(this._svgRoot);r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:r}=this,{padding:i}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/r,t.trim.height=t._frame.height=n.height/r,t.trim.x=-i,t.trim.y=-i,t.orig.width=t._frame.width-i*2,t.orig.height=t._frame.height-i*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,r),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,r,i,o,s;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},jm.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 t1?(this.ownsStyle=!1,this._style=e):e instanceof Vu?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=t1.from(e)):(this.ownsStyle=!0,this._style=new t1(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 UA=jm;UA.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};UA.defaultMaxWidth=2024;UA.defaultMaxHeight=2024;UA.defaultAutoResolution=!0;function I8e(e,t){return{constructor:e,meta:t}}function R8e(e,t,n,r,i){iie(e,t,n||0,r||e.length-1,i||P8e)}function iie(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=t-n+1,a=Math.log(o),c=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(t-s*c/o+u)),h=Math.min(r,Math.floor(t+(o-s)*c/o+u));iie(e,t,f,h,i)}var p=e[t],g=n,v=r;for(Kb(e,n,t),i(e[r],p)>0&&Kb(e,n,r);g0;)v--}i(e[n],p)===0?Kb(e,n,v):(v++,Kb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function Kb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function P8e(e,t){return et?1:0}class O8e{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(!NS(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),a=Um(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,km(r,this.toBBox),km(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(r,a)}_splitRoot(t,n){this.data=Um([t,n]),this.data.height=t.height+1,this.data.leaf=!1,km(this.data,this.toBBox)}_chooseSplitIndex(t,n,r){let i,o=1/0,s=1/0;for(let a=n;a<=r-n;a++){const c=xx(t,0,a,this.toBBox),u=xx(t,a,r,this.toBBox),f=B8e(c,u),h=g$(c)+g$(u);f=n;u--){const f=t.children[u];wx(a,t.leaf?o(f):f),c+=LS(a)}return c}_adjustParentBBoxes(t,n,r){for(let i=r;i>=0;i--)wx(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():km(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 Um(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function jV(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;R8e(e,s,t,n,i),o.push(t,s,s,n)}}class $8e extends O8e{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 UV={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/30,animationDuration:150,debounceInterval:75,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var oie={},fT=$t&&$t.__assign||function(){return fT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),y$}var K8e=X8e()?Math.sign:Y8e(),Q8e=K8e,J8e=Math.abs,Z8e=Math.floor,eHe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Q8e(e)*Z8e(J8e(e)))},tHe=eHe,nHe=Math.max,rHe=function(e){return nHe(0,tHe(e))},sie=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},iHe=Bv,aie=function(e){if(!iHe(e))throw new TypeError("Cannot use null or undefined");return e},oHe={exports:{}},sHe=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")},b$,WV;function aHe(){return WV||(WV=1,b$=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),b$}var x$,GV;function lHe(){if(GV)return x$;GV=1;var e=Bv,t=Object.keys;return x$=function(n){return t(e(n)?Object(n):n)},x$}var w$,VV;function cHe(){return VV||(VV=1,w$=aHe()()?Object.keys:lHe()),w$}var _$,qV;function uHe(){if(qV)return _$;qV=1;var e=cHe(),t=aie,n=Math.max;return _$=function(r,i){var o,s,a=n(arguments.length,2),c;for(r=Object(t(r)),c=function(u){try{r[u]=i[u]}catch(f){o||(o=f)}},s=1;s-1},E$}var AHe=THe()?String.prototype.contains:kHe(),LE=die,YV=CHe,fie=lie,hie=q8e,n1=AHe,IHe=uie.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],LE(e)?(n=n1.call(e,"c"),r=n1.call(e,"e"),i=n1.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?fie(hie(o),s):s};IHe.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],LE(t)?YV(t)?LE(n)?YV(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,LE(e)?(r=n1.call(e,"c"),i=n1.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?fie(hie(o),s):s};var e_=uie.exports,H5={exports:{}};(function(e,t){var n=e_,r=sie,i=Function.prototype.apply,o=Function.prototype.call,s=Object.create,a=Object.defineProperty,c=Object.defineProperties,u=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},h,p,g,v,y,S,w;h=function(b,x){var E;return r(x),u.call(this,"__ee__")?E=this.__ee__:(E=f.value=s(null),a(this,"__ee__",f),f.value=null),E[b]?typeof E[b]=="object"?E[b].push(x):E[b]=[E[b],x]:E[b]=x,this},p=function(b,x){var E,I;return r(x),I=this,h.call(this,b,E=function(){g.call(I,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,I,A,k;if(r(x),!u.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(I=E[b],typeof I=="object")for(k=0;A=I[k];++k)(A===x||A.__eeOnceListener__===x)&&(I.length===2?E[b]=I[k?0:1]:I.splice(k,1));else(I===x||I.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,I,A,k;if(u.call(this,"__ee__")&&(A=this.__ee__[b],!!A))if(typeof A=="object"){for(E=arguments.length,k=new Array(E-1),x=1;x=55296&&E<=56319&&(O+=p[++S])),O=g?u.call(g,v,O,w):O,y?(f.value=O,h(b,w,f)):b[w]=O,++w;x=w}}if(x===void 0)for(x=r(p.length),y&&(b=new y(x)),S=0;S=6&&(n-=6),kt(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},Yi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:H$(i,r,(e/=60)+2),g:H$(i,r,e),b:H$(i,r,e-2)}},DU=function(e,t,n,r){return{r:kt(255*(1-e)*(r=1-r)),g:kt(255*(1-t)*r),b:kt(255*(1-n)*r)}},bie=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:kt(100*(i&&(i-e)/i)),m:kt(100*o),y:kt(100*s),k:kt(100*r)}},pv=function(e,t,n,r){r===void 0&&(r=1),e/=255,t/=255,n/=255,r=Math.min(r,1);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=i-o,a=0,c=0,u=(i+o)/2;if(s!==0){switch(i){case e:a=(t-n)/s%6;break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}(a=kt(60*a))<0&&(a+=360),c=s/(1-Math.abs(2*u-1))}return{h:a,s:kt(100*c),l:kt(100*u),a:r}},hq=function(e,t){if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=t?r:n,o=0,s=0,a=0,c=0;return(t?n:r).find(function(u,f){return e>=u[0]&&e360||e<0)&&(e-=360*Math.floor(e/360)),e},Bo=function(e){return typeof e=="string"&&(e=$v.test(e)?WA(e)/100:+e),isNaN(+e)||e>1?1:kt(e)},Fv=function(e,t,n){return t.reduce(function(r,i){return W5(W5([],r,!0),[cn(cn({},e),{h:n===Yo.ADDITIVE?ow(e.h+i):ow(hq(hq(e.h,!1)+i,!0))})],!1)},[cn({},e)])},eWe=function(e,t){return Fv(e,[30,-30],t)},tWe=function(e,t){return Fv(e,[180],t)},nWe=function(e,t){return Fv(e,[150,-150],t)},rWe=function(e,t){return Fv(e,[120,-120],t)},iWe=function(e,t){return Fv(e,[60,-120,180],t)},oWe=function(e,t){return Fv(e,[90,-90,180],t)},da=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Xt).some(function(r){if(_x[r].test(t))return n=r,!0}),!n&&~vie.indexOf(t)&&(n=Xt.HEX),!n)throw new Error(JHe);return n}(e):function(t){var n,r=!1,i=yie(Object.keys(t));if(G5[i]&&(n=G5[i]),n&&n===Xt.RGB){var o=Object.entries(t).some(function(a){return!V5.test("".concat(a[1]))}),s=Object.entries(t).some(function(a){return!($v.test("".concat(a[1]))||!V5.test("".concat(a[1]))&&!isNaN(+a[1])&&+a[1]<=255)});o&&s&&(r=!0),o||(n=Xt.HEX)}if(!n||r)throw new Error(ZHe);return n}(e)},sWe=((Zb={})[Xt.HEX]=function(e){var t=(~vie.indexOf(e)?hT[e]:e).match(_x.HEX),n={r:BS(t[1]||t[5]),g:BS(t[2]||t[6]),b:BS(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=BS(r)/255),n},Zb[Xt.RGB]=function(e){var t=e.match(_x.RGB),n=xp(t[1]||t[5]),r=xp(t[2]||t[6]),i=xp(t[3]||t[7]),o=t[4]||t[8],s={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return o!==void 0&&(s.a=Bo(o)),s},Zb[Xt.HSL]=function(e){var t=e.match(_x.HSL),n=ow(t[1]||t[5]),r=pT(t[2]||t[6]),i=pT(t[3]||t[7]),o=t[4]||t[8],s=Yi(n,r,i);return o!==void 0&&(s.a=Bo(o)),s},Zb[Xt.CMYK]=function(e){var t=e.match(_x.CMYK),n=Ld(t[1]||t[6]),r=Ld(t[2]||t[7]),i=Ld(t[3]||t[8]),o=Ld(t[4]||t[9]),s=t[5]||t[10],a=DU(n,r,i,o);return s!==void 0&&(a.a=Bo(s)),a},Zb),aWe=((ex={})[Xt.HEX]=function(e){var t={r:xp("".concat(e.r)),g:xp("".concat(e.g)),b:xp("".concat(e.b))};return po(e,"a")&&(t.a=Math.min(xp("".concat(e.a),!0),1)),t},ex[Xt.RGB]=function(e){return this.HEX(e)},ex[Xt.HSL]=function(e){var t=pT("".concat(e.s)),n=pT("".concat(e.l)),r=Yi(ow(e.h),t,n);return po(e,"a")&&(r.a=Bo(e.a)),r},ex[Xt.CMYK]=function(e){var t=Ld("".concat(e.c)),n=Ld("".concat(e.m)),r=Ld("".concat(e.y)),i=Ld("".concat(e.k)),o=DU(t,n,r,i);return po(e,"a")&&(o.a=Bo(e.a)),o},ex),Jp=function(e,t){return t===void 0&&(t=da(e)),typeof e=="string"?sWe[t](e):aWe[t](e)},an=((vu={})[Xt.HEX]=function(e){return{r:$S(e.r),g:$S(e.g),b:$S(e.b)}},vu.HEXA=function(e){var t=an.HEX(e);return t.a=po(e,"a")?$S(255*e.a):"0xFF",t},vu[Xt.RGB]=function(e,t){return po(e,"a")&&delete e.a,Op(e,t)},vu.RGBA=function(e,t){return e.a=po(e,"a")?kt(e.a):1,Op(e,t)},vu[Xt.HSL]=function(e,t){var n=pv(e.r,e.g,e.b);return delete n.a,hg(n,t)},vu.HSLA=function(e,t){var n=an.HSL(e,t);return n.a=po(e,"a")?kt(e.a,t):1,n},vu[Xt.CMYK]=function(e,t){return lWe(bie(e.r,e.g,e.b),t)},vu.CMYKA=function(e,t){var n=an.CMYK(e,t);return n.a=po(e,"a")?kt(e.a,t):1,n},vu),pq=function(e,t,n,r){var i=da(e),o=typeof e=="string",s=Jp(e,i),a=typeof e=="string"&&po(s,"a")||typeof e!="string"&&po(e,"a"),c=pv(s.r,s.g,s.b,s.a);a||delete c.a;var u=n?c.l/(t+1):(100-c.l)/(t+1),f=Array(t).fill(null).map(function(h,p){return cn(cn({},c),{l:c.l+u*(p+1)*(1-2*+n)})});switch(i){case Xt.HEX:default:return f.map(function(h){var p=Yi(h.h,h.s,h.l);return a&&(p.a=h.a),o?a?on.HEX(Op(cn(cn({},p),{a:kt(255*p.a)}),r)):on.HEX(Op(p,r)):a?an.HEXA(p):an.HEX(p)});case Xt.RGB:return f.map(function(h){var p=Yi(h.h,h.s,h.l);return a&&(p.a=h.a),o?on.RGB(Op(p,r)):a?an.RGBA(p,r):an.RGB(p,r)});case Xt.HSL:return f.map(function(h){return o?on.HSL(hg(h,r)):a?an.HSLA(cn(cn({},Yi(h.h,h.s,h.l)),{a:h.a}),r):an.HSL(Yi(h.h,h.s,h.l),r)})}},Am=((Xh={buildHarmony:function(e,t,n,r){var i=da(e),o=Jp(e,i),s=pv(o.r,o.g,o.b,o.a),a=typeof e=="string"&&po(o,"a")||typeof e!="string"&&po(e,"a"),c=typeof e=="string";switch(i){case Xt.HEX:default:return a?this.HEXA(hg(s,0),t,n,c):this.HEX(hg(s,0),t,n,c);case Xt.HSL:return a?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case Xt.RGB:return a?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[Xt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(Yi(i.h,i.s,i.l)):an.HEX(Yi(i.h,i.s,i.l))})},Xh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?on.HEX(cn(cn({},Yi(i.h,i.s,i.l)),{a:255*Bo(i.a)})):an.HEXA(cn(cn({},Yi(i.h,i.s,i.l)),{a:Bo(i.a)}))})},Xh[Xt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Op(Yi(o.h,o.s,o.l),i)):an.RGB(Yi(o.h,o.s,o.l),i)})},Xh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.RGB(Op(cn(cn({},Yi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)):an.RGBA(cn(cn({},Yi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Xh[Xt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(hg({h:o.h,s:o.s,l:o.l},i)):an.HSL(Yi(o.h,o.s,o.l),i)})},Xh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?on.HSL(hg(cn(cn({},o),{a:Bo(o.a)}),i)):an.HSLA(cn(cn({},Yi(o.h,o.s,o.l)),{a:Bo(o.a)}),i)})},Xh),Im=((Yh={mix:function(e,t){var n,r,i,o,s,a,c,u,f,h,p,g,v,y,S,w=e.map(function(I){var A=da(I);return Jp(I,A)}),b=t===Yo.SUBTRACTIVE?w.map(function(I){var A,k,O,L,N,H,G,z,D,F,j,V,W,K,X=(A=I.r,k=I.g,O=I.b,L=Math.min(A,k,O),N=Math.min(255-A,255-k,255-O),H=A-L,G=k-L,z=O-L,D=Math.min(H,G),F=H-D,j=(G+D)/2,V=(z+G-D)/2,W=Math.max(F,j,V)/Math.max(H,G,z),K=isNaN(W)||W===1/0||W<=0?1:W,{r:F/K+N,y:j/K+N,b:V/K+N});return po(I,"a")&&(X.a=I.a),X}):null;function x(I){var A=t===Yo.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return I.reduce(function(k,O){var L=po(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,G="g"in O?O.g:O.y;return cn(cn({},N),t===Yo.ADDITIVE?{g:Math.min(H+G*L,255)}:{y:Math.min(H+G*L,255)})},A)}if(t===Yo.ADDITIVE)n=x(w);else{var E=x(b);r=E.r,i=E.y,o=E.b,s=Math.min(r,i,o),a=Math.min(255-r,255-i,255-o),c=r-s,u=i-s,f=o-s,h=Math.min(u,f),p=c+u-h,g=u+h,v=2*(f-h),y=Math.max(p,g,v)/Math.max(c,u,f),S=isNaN(y)||y===1/0||y<=0?1:y,(n={r:p/S+a,g:g/S+a,b:v/S+a}).a=E.a}return{r:kt(n.r),g:kt(n.g),b:kt(n.b),a:ol(n.a,0,1)}}})[Xt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?on.HEX(r):an.HEX(r)},Yh.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*Bo(r.a):Bo(r.a),n?on.HEX(r):an.HEXA(r)},Yh[Xt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?on.RGB(i):an.RGB(i,r)},Yh.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?on.RGB(i):an.RGBA(i,r)},Yh[Xt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=pv(i.r,i.g,i.b);return delete i.a,delete o.a,n?on.HSL(o):an.HSL(i,r)},Yh.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=pv(i.r,i.g,i.b,i.a);return n?on.HSL(o):an.HSLA(i,r)},Yh),Op=function(e,t){return cn({r:kt(e.r,t),g:kt(e.g,t),b:kt(e.b,t)},po(e,"a")?{a:kt(e.a,t)}:{})},hg=function(e,t){return cn({h:kt(e.h,t),s:kt(e.s,t),l:kt(e.l,t)},po(e,"a")?{a:kt(e.a,t)}:{})},lWe=function(e,t){return{c:kt(e.c,t),m:kt(e.m,t),y:kt(e.y,t),k:kt(e.k,t)}},cd=function(e,t,n,r,i,o){var s=i(Jp(e,t),r);return n?o(s):s},Rm=function(e,t,n,r,i,o,s){n<1&&(n=5);var a=function(c,u,f){var h=f-1,p=(u.r-c.r)/h,g=(u.g-c.g)/h,v=(u.b-c.b)/h,y=Bo(c.a),S=(Bo(u.a)-y)/h;return Array(f).fill(null).map(function(w,b){return b===0?c:b===h?u:{r:kt(c.r+p*b),g:kt(c.g+g*b),b:kt(c.b+v*b),a:kt(y+S*b)}})}(Jp(e),Jp(t),n);return a.map(function(c){var u=o(c,i);return r?s(u):u})},cWe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Jp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=cn(cn({},Yi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=cn(cn({},DU(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=pv(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=bie(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=ow(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=ol(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=ol(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=ol(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=ol(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=ol(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=ol(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=ol(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=ol(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=ol(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=ol(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 kt(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return kt(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return kt(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return kt(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return kt(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return kt(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return kt(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return kt(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return kt(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return kt(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return kt(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return an.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return an.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBAObject",{get:function(){return cn(cn({},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 cn(cn({},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 cn(cn({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return on.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXA",{get:function(){return on.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGB",{get:function(){return on.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RGBA",{get:function(){return on.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSL",{get:function(){return on.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HSLA",{get:function(){return on.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYK",{get:function(){return on.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CMYKA",{get:function(){return on.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=da(t);return cd(t,r,n,0,an.HEX,on.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=da(t);return cd(t,r,n,0,an.HEXA,on.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.RGB,on.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.RGBA,on.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.HSL,on.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.HSLA,on.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.CMYK,on.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=da(t);return cd(t,i,n,r,an.CMYKA,on.CMYK)},e.getBlendHEX=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.HEX,on.HEX)},e.getBlendHEXA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.HEXA,on.HEX)},e.getBlendRGB=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.RGB,on.RGB)},e.getBlendRGBA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.RGBA,on.RGB)},e.getBlendHSL=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.HSL,on.HSL)},e.getBlendHSLA=function(t,n,r,i,o){return r===void 0&&(r=5),i===void 0&&(i=!0),o===void 0&&(o=6),Rm(t,n,r,i,o,an.HSLA,on.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=Yo.ADDITIVE),r===void 0&&(r=!0),Im.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=Yo.ADDITIVE),r===void 0&&(r=!0),Im.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=Yo.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=Yo.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=Yo.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=Yo.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),pq(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),pq(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=xu.COMPLEMENTARY),r===void 0&&(r=Yo.ADDITIVE),i===void 0&&(i=6),function(o,s,a,c){var u;return(u={},u[xu.ANALOGOUS]=Am.buildHarmony(s,eWe,c,a),u[xu.COMPLEMENTARY]=Am.buildHarmony(s,tWe,c,a),u[xu.SPLIT_COMPLEMENTARY]=Am.buildHarmony(s,nWe,c,a),u[xu.TRIADIC]=Am.buildHarmony(s,rWe,c,a),u[xu.TETRADIC]=Am.buildHarmony(s,iWe,c,a),u[xu.SQUARE]=Am.buildHarmony(s,oWe,c,a),u)[o]}(n,t,i,r)},e}();const uWe={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:Zi,PI:dWe}=Math,t_=(e,t)=>new cWe(e).setA(t??uWe.alpha).RGBA,fWe=(e,t)=>t_(e,t);function df(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 hWe={draw(e,t,n){if(e.text){const r=df(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=df(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=t_(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}}},pWe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=df(e,n);t.fillStyle=t_(e.fill,e.alpha),t.fillRect(Zi(r),Zi(i),Zi(o)||1,Zi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},mWe={draw(e,t,n){t.fillStyle=t_(e.fill,e.alpha),t.beginPath();const r=df({...e,width:e.radius,height:e.radius},n);t.ellipse(Zi(r.x),Zi(r.y),Zi(r.width),Zi(r.height),0,0,2*dWe),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}}},gWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=t_(e.fill,e.alpha);const{x:o,y:s}=df({...r,width:0,height:0},n);t.moveTo(Zi(o),Zi(s));for(const a of i){const{x:c,y:u}=df({...a,width:0,height:0},n);t.lineTo(Zi(c),Zi(u))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Qt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Qt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Qt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Qt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},vWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=fWe(e.fill,e.alpha);const{x:o,y:s,width:a}=df({...r,width:e.lineWidth,height:0},n);t.lineWidth=Zi(a),t.moveTo(Zi(o),Zi(s));for(const c of i){const{x:u,y:f}=df({...c,width:0,height:0},n);t.lineTo(Zi(u),Zi(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Qt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Qt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Qt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Qt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},yWe={text:hWe,path:vWe,rect:pWe,polygon:gWe,circle:mWe},{log2:bWe,max:xWe}=Math,mq=e=>Qt.floor(bWe(e+1));function gq({right:e,left:t,bottom:n,top:r},i){const o=xWe(mq(e-t),mq(n-r))-i,s=2**o,a={left:Qt.floor(t/s),right:Qt.ceil((e+1)/s),top:Qt.floor(r/s),bottom:Qt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Qt.shuffle(z8e({x:Qt.range(a.left,a.right+1),y:Qt.range(a.top,a.bottom+1)}).map(c=>{const u=c.x*s,f=c.y*s;return{tile:c,bounds:{left:u-s/2,right:u+s/2,top:f-s/2,bottom:f+s/2}}}))}}const wWe=""+new URL("D2Renderer.worker-157c7b8d.js",import.meta.url).href;class _We extends Worker{constructor(){super(wWe,{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 SWe(e,t){return!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}const{max:vq,min:yq}=Math,xie=class wie extends hm{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=wie.age++}};xie.age=0;let EWe=xie;function jS(e,t){return Qt.isNaN(e)?t:e}var Ds,qr,Ed,Eu,Ti,Wl,Cd,Td,xT,wT,_ie,_T,Sie,Mg,dw,ST,ET,Eie,CT,Cie,TT,Tie,kT,kie,fw,q5,hw,X5,AT,Aie,pw,Y5,IT,Iie,RT,Rie,PT,Pie;class CWe extends XHe{constructor(){super(...arguments);cr(this,wT);cr(this,_T);cr(this,ET);cr(this,CT);cr(this,TT);cr(this,kT);cr(this,fw);cr(this,hw);cr(this,AT);cr(this,pw);cr(this,IT);cr(this,RT);cr(this,PT);cr(this,Ds,void 0);cr(this,qr,void 0);cr(this,Ed,void 0);cr(this,Eu,void 0);cr(this,Ti,UV);cr(this,Wl,[]);cr(this,Cd,new $8e(16));cr(this,Td,void 0);cr(this,xT,0);cr(this,Mg,Qt.once(()=>Qt.debounce(()=>Gi(this,fw,q5).call(this),tt(this,Ti).debounceInterval)));cr(this,dw,Qt.once(()=>Qt.throttle(()=>Gi(this,hw,X5).call(this),tt(this,Ti).refreshInterval)));cr(this,ST,Qt.once(()=>Qt.throttle(n=>Gi(this,AT,Aie).call(this,n),tt(this,Ti).refreshInterval)))}getInstance(){return{app:tt(this,Ds),viewport:tt(this,qr)}}fitCamera(){var r,i,o,s;const n=Qt.values(tt(this,Cd).all()).flat();if(n.length){const a=Qt.reduce(n,(c,u)=>({top:jS(yq(c.top,u.top),c.top),left:jS(yq(c.left,u.left),c.left),bottom:jS(vq(c.bottom,u.bottom),c.bottom),right:jS(vq(c.right,u.right),c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=tt(this,qr))==null?void 0:r.animate)==null||s.call(r,{position:new Dt((a.left+a.right)/2,(a.top+a.bottom)/2),scale:((o=(i=tt(this,qr))==null?void 0:i.findFit)==null?void 0:o.call(i,a.right-a.left,a.bottom-a.top))*.8,ease:"easeOutExpo",time:tt(this,Ti).animationDuration*1.5,callbackOnComplete:()=>tt(this,Mg).call(this)()})}}initialCamera(){var n,r;(r=(n=tt(this,qr))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:tt(this,Ti).animationDuration*1.5,callbackOnComplete:()=>tt(this,Mg).call(this)()})}getView(){var n;return(n=tt(this,Ds))==null?void 0:n.view}setup(n){const r={...UV,...n};Gi(this,_T,Sie).call(this,r),this.setOptions(r),Gi(this,CT,Cie).call(this,r)}destroy(){Qt.map(tt(this,Wl),n=>n.terminate()),tt(this,Ds).destroy()}add(n){const r=l3e(),i=Qt.map(n,({component:o,meta:s})=>({...yWe[o.$].test(o),component:o,meta:s,index:Gi(this,wT,_ie).call(this)}));return tt(this,Cd).load(i),Qt.map(tt(this,Wl),o=>o.call("add",[Qt.map(n,"component"),r])),()=>{for(const o of i)tt(this,Cd).remove(o);Qt.map(tt(this,Wl),o=>o.call("remove",[r]))}}setOptions(n){const r={...tt(this,Ti),...n};Gi(this,TT,Tie).call(this,r),fu(this,Ti,r),Gi(this,fw,q5).call(this),Gi(this,hw,X5).call(this)}}Ds=new WeakMap,qr=new WeakMap,Ed=new WeakMap,Eu=new WeakMap,Ti=new WeakMap,Wl=new WeakMap,Cd=new WeakMap,Td=new WeakMap,xT=new WeakMap,wT=new WeakSet,_ie=function(){return r6(this,xT)._++},_T=new WeakSet,Sie=function(n){fu(this,Ds,new IU({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),fu(this,qr,new eUe({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:tt(this,Ds).renderer.events,passiveWheel:!1})),tt(this,qr).on("clicked",r=>{const{x:i,y:o}=r.world,s=tt(this,Cd).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})}),tt(this,Ds).stage.addChild(tt(this,qr)),tt(this,qr).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),tt(this,qr).on("moved",()=>{tt(this,Mg).call(this)(),tt(this,dw).call(this)()}),tt(this,qr).on("mousemove",r=>tt(this,ST).call(this)(r)),fu(this,Ed,new us),tt(this,qr).addChild(tt(this,Ed)),fu(this,Eu,new hv),tt(this,qr).addChild(tt(this,Eu)),fu(this,Td,new hv),tt(this,qr).addChild(tt(this,Td)),Gi(this,ET,Eie).call(this)},Mg=new WeakMap,dw=new WeakMap,ST=new WeakMap,ET=new WeakSet,Eie=function(){const{dynamicResolution:n}=tt(this,Ti),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:a,minScale:c}=n,u=Qt.floor(si.targetFPMS*s);let f=0,h=0,p=1;tt(this,Ds).ticker.add(g=>{const{tileResolution:v}=tt(this,Ti);if(!(f%u)){const y=h/u;p=Qt.clamp(y>=r?p+o:y<=i?p-o:p,c,a),Qt.map(tt(this,Wl),S=>{S.call("setTileResolution",[{width:Qt.ceil(v.width/p),height:Qt.ceil(v.height/p)}])}),h=0}h+=g,f++})},CT=new WeakSet,Cie=function(n){Qt.map(tt(this,Wl),r=>r.terminate()),fu(this,Wl,Qt.times(n.workerCount,r=>{const i=new _We;return i.on("update",o=>Gi(this,kT,kie).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},TT=new WeakSet,Tie=function(n){var o,s,a,c;const{width:r,height:i}=n.screenSize;(a=(s=(o=tt(this,Ds))==null?void 0:o.renderer)==null?void 0:s.resize)==null||a.call(s,r,i),(c=tt(this,qr))==null||c.resize(r,i)},kT=new WeakSet,kie=function({bounds:n,bitmap:r}){const i=mt.from(r);Gi(this,IT,Iie).call(this,i,n)},fw=new WeakSet,q5=function(){const{top:n,bottom:r,left:i,right:o}=tt(this,qr);Qt.map(tt(this,Wl),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},hw=new WeakSet,X5=function(){var s,a,c,u,f;const{tileSubdivision:n,accentColor:r}=tt(this,Ti),{tiles:i}=gq(tt(this,qr),n),o=Gi(this,pw,Y5).call(this);(s=tt(this,Eu))==null||s.clear(),(a=tt(this,Eu))==null||a.lineStyle(1*o,r,.5),(c=tt(this,Eu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Qt.find((u=tt(this,Ed))==null?void 0:u.children,g=>Qt.isEqual(g.bounds,h))||(f=tt(this,Eu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},AT=new WeakSet,Aie=function(n){var c;const{accentColor:r}=tt(this,Ti),i=Gi(this,pw,Y5).call(this),{x:o,y:s}=tt(this,qr).toWorld(n.globalX,n.globalY),a=tt(this,Cd).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});tt(this,Td).clear(),tt(this,Td).lineStyle(2*i,r,1);for(const u of a)(c=tt(this,Td))==null||c.drawRect(u.left,u.top,u.right-u.left,u.bottom-u.top)},pw=new WeakSet,Y5=function(){const{right:n,left:r}=tt(this,qr),{width:i}=tt(this,Ti).screenSize;return(n-r)/i},IT=new WeakSet,Iie=async function(n,r){var s,a;const{tileSubdivision:i}=tt(this,Ti),{tiles:o}=gq(tt(this,qr),i);if(Qt.find(o,c=>Qt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},u=new EWe(n,r);(s=tt(this,Ed))==null||s.addChild(u).setTransform(r.left,r.top,c.x,c.y),tt(this,dw).call(this)(),await Gi(this,RT,Rie).call(this,u),Qt.forEach((a=tt(this,Ed))==null?void 0:a.children,async f=>{SWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/si.targetFPMS/tt(this,Ti).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},PT=new WeakSet,Pie=function(n){const r=tt(this,Ds).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/si.targetFPMS/tt(this,Ti).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const TWe=I8e(CWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),kWe={"d2-renderer":TWe};var AWe=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},LU={},IWe=Object.prototype.hasOwnProperty,RWe;function bq(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function xq(e){try{return encodeURIComponent(e)}catch{return null}}function PWe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=bq(r[1]),o=bq(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function OWe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(IWe.call(e,i)){if(r=e[i],!r&&(r===null||r===RWe||isNaN(r))&&(r=""),i=xq(i),r=xq(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}LU.stringify=OWe;LU.parse=PWe;var Oie=AWe,GA=LU,MWe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Mie=/[\n\r\t]/g,DWe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Die=/:\d+$/,LWe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,NWe=/^[a-zA-Z]:/;function NU(e){return(e||"").toString().replace(MWe,"")}var K5=[["#","hash"],["?","query"],function(t,n){return uc(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]],wq={hash:1,query:1};function Lie(e){var t;typeof window<"u"?t=window:typeof $t<"u"?t=$t: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 mc(unescape(e.pathname),{});else if(i==="string"){r=new mc(e,{});for(o in wq)delete r[o]}else if(i==="object"){for(o in e)o in wq||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=DWe.test(e.href))}return r}function uc(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function Nie(e,t){e=NU(e),e=e.replace(Mie,""),t=t||{};var n=LWe.exec(e),r=n[1]?n[1].toLowerCase():"",i=!!n[2],o=!!n[3],s=0,a;return i?o?(a=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(a=n[2]+n[4],s=n[2].length):o?(a=n[3]+n[4],s=n[3].length):a=n[4],r==="file:"?s>=2&&(a=a.slice(2)):uc(r)?a=n[4]:r?i&&(a=a.slice(2)):s>=2&&uc(t.protocol)&&(a=n[4]),{protocol:r,slashes:i||uc(r),slashesCount:s,rest:a}}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 mc(e,t,n){if(e=NU(e),e=e.replace(Mie,""),!(this instanceof mc))return new mc(e,t,n);var r,i,o,s,a,c,u=K5.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=GA.parse),t=Lie(t),i=Nie(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||NWe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!uc(h.protocol)))&&(u[3]=[/(.*)/,"pathname"]);p{const n=[];for(const{transport:r,url:i,key:o,disabled:s}of e??[])if(!s){const a=new $ie[r].constructor({url:i});n.push({key:o,url:i,renderer:await a.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const HWe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function WWe({value:e,onValueChange:t}){const[n]=xA(),r=te.find(n,{key:e.key});function i(s){t==null||t(Gk(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(Cne,{sx:{color:HWe[o]}}),C.jsx(li,{}),C.jsxs(ht,{flex:1,children:[C.jsx(Ut,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:te.startCase(o)}),C.jsx(Ut,{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: ",te.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(bf,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(ht,{children:C.jsx(Kg,{checked:!e.disabled,onChange:(s,a)=>i({disabled:!a})})})}),C.jsx(Mj,{trigger:s=>C.jsx(ug,{icon:C.jsx(Wk,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(Oj,{children:"Edit Renderer"})},children:C.jsxs(ht,{p:2.5,children:[C.jsx(Cw,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(jx,{placeholder:"Renderer Type",items:te.entries($ie).map(([s,{name:a}])=>({value:s,label:a})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var BU={},VA={},n_={};(function(e){var t=$t&&$t.__extends||function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(S[b]=w[b])},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 a=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,w){var b=g.call(this,y)||this;return Object.setPrototypeOf(b,v.prototype),b.code=S,b.data=w,b}return v.prototype.toObject=function(){return a(this.code,this.message,this.data)},v}(Error);e.JSONRPCErrorException=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 u=function(g,v,y,S){return{jsonrpc:e.JSONRPC,id:g,error:a(v,y,S)}};e.createJSONRPCErrorResponse=u;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})(n_);var r_={};Object.defineProperty(r_,"__esModule",{value:!0});r_.DefaultErrorCode=void 0;r_.DefaultErrorCode=0;var _q=$t&&$t.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{u(r.next(f))}catch(h){s(h)}}function c(f){try{u(r.throw(f))}catch(h){s(h)}}function u(f){f.done?o(f.value):i(f.value).then(a,c)}u((r=r.apply(e,t||[])).next())})},Sq=$t&&$t.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[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 aGe={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 lGe{constructor(t){vm(this,"handler");this.options=t;const{hostname:n}=Bie(t.url);this.handler=aGe[n]}async connect(){}async disconnect(){}async call(t,n){return await this.handler(t,n)}}const gc=Object.create(null);gc.open="0";gc.close="1";gc.ping="2";gc.pong="3";gc.message="4";gc.upgrade="5";gc.noop="6";const NE=Object.create(null);Object.keys(gc).forEach(e=>{NE[gc[e]]=e});const Q5={type:"error",data:"parser error"},zie=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jie=typeof ArrayBuffer=="function",Uie=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$U=({type:e,data:t},n,r)=>zie&&t instanceof Blob?n?r(t):kq(t,r):jie&&(t instanceof ArrayBuffer||Uie(t))?n?r(t):kq(new Blob([t]),r):r(gc[e]+(t||"")),kq=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Aq(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let G$;function cGe(e,t){if(zie&&e.data instanceof Blob)return e.data.arrayBuffer().then(Aq).then(t);if(jie&&(e.data instanceof ArrayBuffer||Uie(e.data)))return t(Aq(e.data));$U(e,!1,n=>{G$||(G$=new TextEncoder),t(G$.encode(n))})}const Iq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r>4,f[i++]=(s&15)<<4|a>>2,f[i++]=(a&3)<<6|c&63;return u},dGe=typeof ArrayBuffer=="function",FU=(e,t)=>{if(typeof e!="string")return{type:"message",data:Hie(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:fGe(e.substring(1),t)}:NE[n]?e.length>1?{type:NE[n],data:e.substring(1)}:{type:NE[n]}:Q5},fGe=(e,t)=>{if(dGe){const n=uGe(e);return Hie(n,t)}else return{base64:!0,data:e}},Hie=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Wie=String.fromCharCode(30),hGe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{$U(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Wie))})})},pGe=(e,t)=>{const n=e.split(Wie),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 V$;function HS(e){return e.reduce((t,n)=>t+n.length,0)}function WS(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){a.enqueue(Q5);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(HS(n)e){a.enqueue(Q5);break}}}})}const Gie=4;function ci(e){if(e)return vGe(e)}function vGe(e){for(var t in ci.prototype)e[t]=ci.prototype[t];return e}ci.prototype.on=ci.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ci.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ci.prototype.off=ci.prototype.removeListener=ci.prototype.removeAllListeners=ci.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 Vie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const yGe=ma.setTimeout,bGe=ma.clearTimeout;function YA(e,t){t.useNativeTimers?(e.setTimeoutFn=yGe.bind(ma),e.clearTimeoutFn=bGe.bind(ma)):(e.setTimeoutFn=ma.setTimeout.bind(ma),e.clearTimeoutFn=ma.clearTimeout.bind(ma))}const xGe=1.33;function wGe(e){return typeof e=="string"?_Ge(e):Math.ceil((e.byteLength||e.size)*xGe)}function _Ge(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function SGe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function EGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Xie(){const e=Oq(+new Date);return e!==Pq?(Rq=0,Pq=e):e+"."+Oq(Rq++)}for(;GS{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)};pGe(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,hGe(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]=Xie()),!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 dc(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 dc extends ci{constructor(t,n){super(),YA(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=Vie(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Kie(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=dc.requestsCount++,dc.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=AGe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete dc.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()}}dc.requestsCount=0;dc.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Mq);else if(typeof addEventListener=="function"){const e="onpagehide"in ma?"pagehide":"unload";addEventListener(e,Mq,!1)}}function Mq(){for(let e in dc.requests)dc.requests.hasOwnProperty(e)&&dc.requests[e].abort()}const jU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),VS=ma.WebSocket||ma.MozWebSocket,Dq=!0,PGe="arraybuffer",Lq=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class OGe extends zU{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=Lq?{}:Vie(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=Dq&&!Lq?n?new VS(t,n):new VS(t):new VS(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{Dq&&this.ws.send(o)}catch{}i&&jU(()=>{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]=Xie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!VS}}class MGe extends zU{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=gGe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=mGe();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&jU(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const DGe={websocket:OGe,webtransport:MGe,polling:RGe},LGe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,NGe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Z5(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=LGe.exec(e||""),o={},s=14;for(;s--;)o[NGe[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=$Ge(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 $Ge(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Qie=class Hm extends ci{constructor(t,n={}){super(),this.binaryType=PGe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Z5(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=Z5(n.host).host),YA(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=EGe(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=Gie,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 DGe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Hm.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;Hm.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;Hm.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 a(){s("transport closed")}function c(){s("socket closed")}function u(h){n&&h.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Hm.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){Hm.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,Jie=Object.prototype.toString,UGe=typeof Blob=="function"||typeof Blob<"u"&&Jie.call(Blob)==="[object BlobConstructor]",HGe=typeof File=="function"||typeof File<"u"&&Jie.call(File)==="[object FileConstructor]";function UU(e){return zGe&&(e instanceof ArrayBuffer||jGe(e))||UGe&&e instanceof Blob||HGe&&e instanceof File}function BE(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:gn.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 gn.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 gn.EVENT:case gn.BINARY_EVENT:this.onevent(t);break;case gn.ACK:case gn.BINARY_ACK:this.onack(t);break;case gn.DISCONNECT:this.ondisconnect();break;case gn.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:gn.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:gn.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}zv.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};zv.prototype.reset=function(){this.attempts=0};zv.prototype.setMin=function(e){this.ms=e};zv.prototype.setMax=function(e){this.max=e};zv.prototype.setJitter=function(e){this.jitter=e};class n4 extends ci{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,YA(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 zv({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||KGe;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 Qie(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ul(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=ul(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);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(ul(t,"ping",this.onping.bind(this)),ul(t,"data",this.ondata.bind(this)),ul(t,"error",this.onerror.bind(this)),ul(t,"close",this.onclose.bind(this)),ul(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){jU(()=>{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 Zie(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 tx={};function $E(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=FGe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tx[i]&&o in tx[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return a?c=new n4(r,t):(tx[i]||(tx[i]=new n4(r,t)),c=tx[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign($E,{Manager:n4,Socket:Zie,io:$E,connect:$E});class JGe{constructor(t){vm(this,"rpc");vm(this,"socket");this.options=t,this.socket=$E(t.url),this.rpc=new BU.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 WU={socketio:{name:"socket.io",constructor:JGe},ipc:{name:"Web Worker",constructor:sGe},native:{name:"Internal",constructor:lGe}};function ZGe(e){return WU[e].constructor}const eoe=te.first(te.keys(WU));function e9e(){const[{renderer:e},t]=Zu();return C.jsx(C.Fragment,{children:C.jsx(dA,{editor:n=>C.jsx(WWe,{value:n}),icon:null,value:e,onChange:te.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:eoe,url:"",disabled:!0}),extras:C.jsx(of,{icon:C.jsx(VQ,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:HJ})),children:"Reset to Defaults"})})})}function t9e(e){const[{connections:t}]=fA(),n=nU(),[{remote:r}]=Zu(),i=te.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const n9e={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function r9e({value:e,onValueChange:t}){const n=f$e(e.url),r=t9e(e.url);function i(o){t==null||t(Gk(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(En,{alignItems:"center",py:.5,children:[C.jsx(Cne,{sx:{color:n9e[r]}}),C.jsx(li,{}),C.jsxs(ht,{flex:1,children:[C.jsx(Ut,{children:n?`${n.name} ${n.version}`:te.startCase(r)}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(bf,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(ht,{children:C.jsx(Kg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(Mj,{trigger:o=>C.jsx(ug,{icon:C.jsx(Wk,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(Oj,{children:"Edit Connection"})},children:C.jsxs(ht,{p:2.5,children:[C.jsx(Cw,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(jx,{placeholder:"Connection Type",items:te.entries(WU).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function i9e(){const[{remote:e},t]=Zu();return C.jsx(C.Fragment,{children:C.jsx(dA,{editor:n=>C.jsx(r9e,{value:n}),icon:null,value:e,onChange:te.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:eoe,url:"",disabled:!0}),extras:C.jsx(of,{icon:C.jsx(VQ,{}),sx:{ml:2},onClick:()=>t(()=>({remote:UJ})),children:"Reset to Defaults"})})})}const Bq=e=>`${e}x`;function o9e(){const{controls:e,onChange:t,state:n}=wf(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},a]=Zu(),[c,u]=R.useState("general");function f(p){return C.jsx(Ut,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(Ut,{variant:"body1",children:p})}return C.jsx(VJ,{value:c,children:C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Options,{children:C.jsxs(KJ,{onChange:(p,g)=>u(g),children:[C.jsx(rg,{label:"General",value:"general"}),C.jsx(rg,{label:"Connections",value:"connections"}),C.jsx(rg,{label:"Renderers",value:"renderers"}),C.jsx(rg,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,children:C.jsx(Iw,{y:!0,children:C.jsxs(En,{vertical:!0,pt:6,children:[C.jsx(ag,{value:"general",children:C.jsxs(ht,{children:[f("Playback"),C.jsxs(En,{alignItems:"center",children:[h("Playback Rate"),C.jsx(li,{flex:1}),C.jsx(rxe,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*Lm,label:Bq(p)})),step:.25*Lm,min:.25*Lm,max:5*Lm,valueLabelFormat:p=>Bq(p/Lm),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>a(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(En,{alignItems:"center",children:[h("Acrylic"),C.jsx(li,{flex:1}),C.jsx(Kg,{defaultChecked:!!i,onChange:(p,g)=>a(()=>({acrylic:g}))})]}),C.jsxs(En,{alignItems:"center",children:[h("Dark Mode"),C.jsx(li,{flex:1}),C.jsx(Kg,{defaultChecked:o==="dark",onChange:(p,g)=>a(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(En,{alignItems:"center",children:[h("Accent"),C.jsx(li,{flex:1}),C.jsx(Vs,{value:s,items:te.map(te.keys(OSe),p=>({id:p,name:te.startCase(p)})),showArrow:!0,onChange:p=>a(()=>({accentColor:p}))})]})]})}),C.jsx(ag,{value:"connections",children:C.jsxs(ht,{children:[f("Solvers"),C.jsx(i9e,{})]})}),C.jsx(ag,{value:"renderers",children:C.jsxs(ht,{children:[f("Renderers"),C.jsx(e9e,{})]})}),C.jsx(ag,{value:"map-parsers",children:C.jsxs(ht,{children:[f("Map Parsers"),C.jsx(s9e,{})]})})]})})})}),C.jsx(zn.Extras,{children:e})]})})}function s9e(){return C.jsx(Yg,{children:te.keys(eU).map(e=>C.jsx(Fx,{children:C.jsx(oc,{primary:e,secondary:"Internal"})},e))})}const KA=0,Tf=1,jv=2,toe=4;function noe(e,t){return n=>e(t(n))}function a9e(e,t){return t(e)}function roe(e,t){return n=>e(t,n)}function $q(e,t){return()=>e(t)}function QA(e,t){return t(e),e}function kr(...e){return e}function l9e(e){e()}function Fq(e){return()=>e}function c9e(...e){return()=>{e.map(l9e)}}function GU(e){return e!==void 0}function Uv(){}function qn(e,t){return e(Tf,t)}function rn(e,t){e(KA,t)}function VU(e){e(jv)}function Hs(e){return e(toe)}function Et(e,t){return qn(e,roe(t,KA))}function qu(e,t){const n=e(Tf,r=>{n(),t(r)});return n}function Sn(){const e=[];return(t,n)=>{switch(t){case jv:e.splice(0,e.length);return;case Tf:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case KA:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function nt(e){let t=e;const n=Sn();return(r,i)=>{switch(r){case Tf:i(t);break;case KA:t=i;break;case toe:return t}return n(r,i)}}function u9e(e){let t,n;const r=()=>t&&t();return function(i,o){switch(i){case Tf:return o?n===o?void 0:(r(),n=o,t=qn(e,o),t):(r(),Uv);case jv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Qs(e){return QA(Sn(),t=>Et(e,t))}function Fo(e,t){return QA(nt(t),n=>Et(e,n))}function d9e(...e){return t=>e.reduceRight(a9e,t)}function Oe(e,...t){const n=d9e(...t);return(r,i)=>{switch(r){case Tf:return qn(e,n(i));case jv:VU(e);return}}}function ioe(e,t){return e===t}function Sr(e=ioe){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Gt(e){return t=>n=>{e(n)&&t(n)}}function ut(e){return t=>noe(t,e)}function Su(e){return t=>()=>t(e)}function Zl(e,t){return n=>r=>n(t=e(t,r))}function mv(e){return t=>n=>{e>0?e--:t(n)}}function Nd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function zq(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function un(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);qn(o,c=>{const u=n;n=n|a,t[s]=c,u!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const a=()=>o([s].concat(t));n===i?a():r=a}}function jq(...e){return function(t,n){switch(t){case Tf:return c9e(...e.map(r=>qn(r,n)));case jv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Wt(e,t=ioe){return Oe(e,Sr(t))}function Ri(...e){const t=Sn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);qn(o,c=>{n[s]=c,r=r|a,r===i&&rn(t,n)})}),function(o,s){switch(o){case Tf:return r===i&&s(n),qn(t,s);case jv:return VU(t);default:throw new Error(`unrecognized action ${o}`)}}}function Wn(e,t=[],{singleton:n}={singleton:!0}){return{id:f9e(),constructor:e,dependencies:t,singleton:n}}const f9e=()=>Symbol();function h9e(e){const t=new Map,n=({id:r,constructor:i,dependencies:o,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=i(o.map(c=>n(c)));return s&&t.set(r,a),a};return n(e)}function p9e(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[w]=b=>{const x=y[t.methods[w]];rn(x,b)},S),{})}function f(y){return s.reduce((S,w)=>(S[w]=u9e(y[t.events[w]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:w,...b}=y,[x]=de.useState(()=>QA(h9e(e),I=>c(I,b))),[E]=de.useState($q(f,x));return qS(()=>{for(const I of s)I in b&&qn(E[I],b[I]);return()=>{Object.values(E).map(VU)}},[b,E,x]),qS(()=>{c(x,b)}),de.useImperativeHandle(S,Fq(u(x))),de.createElement(a.Provider,{value:x},n?de.createElement(n,p9e([...r,...i,...s],b),w):w)}),usePublisher:y=>de.useCallback(roe(rn,de.useContext(a)[y]),[y]),useEmitterValue:y=>{const w=de.useContext(a)[y],[b,x]=de.useState($q(Hs,w));return qS(()=>qn(w,E=>{E!==b&&x(Fq(E))}),[w,b]),b},useEmitter:(y,S)=>{const b=de.useContext(a)[y];qS(()=>qn(b,S),[S,b])}}}const m9e=typeof document<"u"?de.useLayoutEffect:de.useEffect,g9e=m9e;var Js=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Js||{});const v9e={0:"debug",1:"log",2:"warn",3:"error"},y9e=()=>typeof globalThis>"u"?window:globalThis,kf=Wn(()=>{const e=nt(3);return{log:nt((n,r,i=1)=>{var o;const s=(o=y9e().VIRTUOSO_LOG_LEVEL)!=null?o:Hs(e);i>=s&&console[v9e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function qU(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 mm(e,t=!0){return qU(e,t).callbackRef}function b9e(e,t,n,r,i,o,s){const a=de.useCallback(c=>{const u=x9e(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(w9e("row-gap",getComputedStyle(c).rowGap,i)),u!==null&&e(u)},[e,t,i,o,s,r]);return qU(a,n)}function x9e(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,w=()=>{e({scrollTop:Math.max(v,0),scrollHeight:y,viewportHeight:S})};h.suppressFlushSync?w():ng.flushSync(w),s.current!==null&&(v===s.current||v<=0||v===y-S)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);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 u(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(ff(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=ff(p,"height"),S=p.scrollTop);const w=y-v;if(h.top=Math.ceil(Math.max(Math.min(w,h.top),0)),soe(v,y)||h.top===S){e({scrollTop:S,scrollHeight:y,viewportHeight:v}),g&&t(!0);return}g?(s.current=h.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,p.scrollTo(h)}function f(h){o.current.scrollBy(h)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:u}}const Wo=Wn(()=>{const e=Sn(),t=Sn(),n=nt(0),r=Sn(),i=nt(0),o=Sn(),s=Sn(),a=nt(0),c=nt(0),u=nt(0),f=nt(0),h=Sn(),p=Sn(),g=nt(!1);return Et(Oe(e,ut(({scrollTop:v})=>v)),t),Et(Oe(e,ut(({scrollHeight:v})=>v)),s),Et(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:a,fixedHeaderHeight:c,fixedFooterHeight:u,footerHeight:f,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:p,statefulScrollTop:i,deviation:n,scrollingInProgress:g}},[],{singleton:!0}),sw={lvl:0};function loe(e,t,n,r=sw,i=sw){return{k:e,v:t,lvl:n,l:r,r:i}}function rr(e){return e===sw}function Og(){return sw}function r4(e,t){if(rr(e))return sw;const{k:n,l:r,r:i}=e;if(t===n){if(rr(r))return i;if(rr(i))return r;{const[o,s]=coe(r);return FE(_i(e,{k:o,v:s,l:uoe(r)}))}}else return tt&&(a=a.concat(i4(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:i}),r<=n&&(a=a.concat(i4(s,t,n))),a}function wp(e){return rr(e)?[]:[...wp(e.l),{k:e.k,v:e.v},...wp(e.r)]}function coe(e){return rr(e.r)?[e.k,e.v]:coe(e.r)}function uoe(e){return rr(e.r)?e.l:FE(_i(e,{r:uoe(e.r)}))}function _i(e,t){return loe(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 q$(e){return rr(e)||e.lvl>e.r.lvl}function Uq(e){return o4(foe(e))}function FE(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(q$(t))return foe(_i(e,{lvl:r-1}));if(!rr(t)&&!rr(t.r))return _i(t.r,{l:_i(t,{r:t.r.l}),r:_i(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(q$(e))return o4(_i(e,{lvl:r-1}));if(!rr(n)&&!rr(n.l)){const i=n.l,o=q$(i)?n.lvl-1:n.lvl;return _i(i,{l:_i(e,{r:i.l,lvl:r-1}),r:o4(_i(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function JA(e,t,n){if(rr(e))return[];const r=Pl(e,t)[0];return _9e(i4(e,r,n))}function doe(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 o4(e){const{r:t,lvl:n}=e;return!rr(t)&&!rr(t.r)&&t.lvl===n&&t.r.lvl===n?_i(t,{l:_i(e,{r:t.l}),lvl:n+1}):e}function foe(e){const{l:t}=e;return!rr(t)&&t.lvl===e.lvl?_i(t,{r:_i(e,{l:t.r})}):e}function gT(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],a=n(s,t);if(a===0)return o;if(a===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function hoe(e,t,n){return e[gT(e,t,n)]}function S9e(e,t,n,r){const i=gT(e,t,r),o=gT(e,n,r,i);return e.slice(i,o+1)}const XU=Wn(()=>({recalcInProgress:nt(!1)}),[],{singleton:!0});function E9e(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 Hq(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=r4(e,f)):(u=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=zs(e,s+1,p));u&&(e=zs(e,o,i))}return[e,n]}function T9e(){return{offsetTree:[],sizeTree:Og(),groupOffsetTree:Og(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function YU({index:e},t){return t===e?0:t0&&(t=Math.max(t,hoe(e,r,YU).offset)),doe(S9e(e,t,n,k9e),A9e)}function s4(e,t,n,r){let i=e,o=0,s=0,a=0,c=0;if(t!==0){c=gT(i,t-1,YU),a=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:u,value:f}of JA(n,t,1/0)){const h=u-o,p=h*s+a+h*r;i.push({offset:p,size:f,index:u}),o=u,a=p,s=f}return{offsetTree:i,lastIndex:o,lastOffset:a,lastSize:s}}function R9e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Js.DEBUG);const o=e.sizeTree;let s=o,a=0;if(n.length>0&&rr(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>zs(zs(v,y,p),y+1,g),s)}else[s,a]=C9e(s,t);if(s===o)return e;const{offsetTree:c,lastIndex:u,lastSize:f,lastOffset:h}=s4(e.offsetTree,a,s,i);return{sizeTree:s,offsetTree:c,lastIndex:u,lastOffset:h,lastSize:f,groupOffsetTree:n.reduce((p,g)=>zs(p,g,lw(g,c,i)),Og()),groupIndices:n}}function lw(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=hoe(t,e,YU),s=e-i,a=o*s+(s-1)*n+r;return a>0?a+n:a}function P9e(e){return typeof e.groupIndex<"u"}function poe(e,t,n){if(P9e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=moe(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function moe(e,t){if(!ZA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ZA(e){return!rr(e.groupOffsetTree)}function O9e(e){return wp(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"},wc=Wn(([{log:e},{recalcInProgress:t}])=>{const n=Sn(),r=Sn(),i=Fo(r,0),o=Sn(),s=Sn(),a=nt(0),c=nt([]),u=nt(void 0),f=nt(void 0),h=nt((I,A)=>ff(I,M9e[A])),p=nt(void 0),g=nt(0),v=T9e(),y=Fo(Oe(n,un(c,e,g),Zl(R9e,v),Sr()),v),S=Fo(Oe(c,Sr(),Zl((I,A)=>({prev:I.current,current:A}),{prev:[],current:[]}),ut(({prev:I})=>I)),[]);Et(Oe(c,Gt(I=>I.length>0),un(y,g),ut(([I,A,k])=>{const O=I.reduce((L,N,H)=>zs(L,N,lw(N,A.offsetTree,k)||H),Og());return{...A,groupIndices:I,groupOffsetTree:O}})),y),Et(Oe(r,un(y),Gt(([I,{lastIndex:A}])=>I[{startIndex:I,endIndex:A,size:k}])),n),Et(u,f);const w=Fo(Oe(u,ut(I=>I===void 0)),!0);Et(Oe(f,Gt(I=>I!==void 0&&rr(Hs(y).sizeTree)),ut(I=>[{startIndex:0,endIndex:0,size:I}])),n);const b=Qs(Oe(n,un(y),Zl(({sizes:I},[A,k])=>({changed:k!==I,sizes:k}),{changed:!1,sizes:v}),ut(I=>I.changed)));qn(Oe(a,Zl((I,A)=>({diff:I.prev-A,prev:A}),{diff:0,prev:0}),ut(I=>I.diff)),I=>{const{groupIndices:A}=Hs(y);if(I>0)rn(t,!0),rn(o,I+Hq(I,A));else if(I<0){const k=Hs(S);k.length>0&&(I-=Hq(-I,k)),rn(s,I)}}),qn(Oe(a,un(e)),([I,A])=>{I<0&&A("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Js.ERROR)});const x=Qs(o);Et(Oe(o,un(y),ut(([I,A])=>{const k=A.groupIndices.length>0,O=[],L=A.lastSize;if(k){const N=aw(A.sizeTree,0);let H=0,G=0;for(;H{let W=F.ranges;return F.prevSize!==0&&(W=[...F.ranges,{startIndex:F.prevIndex,endIndex:j+I-1,size:F.prevSize}]),{ranges:W,prevIndex:j+I,prevSize:V}},{ranges:O,prevIndex:I,prevSize:0}).ranges}return wp(A.sizeTree).reduce((N,{k:H,v:G})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+I-1,size:N.prevSize}],prevIndex:H+I,prevSize:G}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Qs(Oe(s,un(y,g),ut(([I,{offsetTree:A},k])=>{const O=-I;return lw(O,A,k)})));return Et(Oe(s,un(y,g),ut(([I,A,k])=>{if(A.groupIndices.length>0){if(rr(A.sizeTree))return A;let L=Og();const N=Hs(S);let H=0,G=0,z=0;for(;H<-I;){z=N[G];const F=N[G+1]-z-1;G++,H+=F+1}if(L=wp(A.sizeTree).reduce((F,{k:j,v:V})=>zs(F,Math.max(0,j+I),V),L),H!==-I){const F=aw(A.sizeTree,z);L=zs(L,0,F);const j=Pl(A.sizeTree,-I+1)[1];L=zs(L,1,j)}return{...A,sizeTree:L,...s4(A.offsetTree,0,L,k)}}else{const L=wp(A.sizeTree).reduce((N,{k:H,v:G})=>zs(N,Math.max(0,H+I),G),Og());return{...A,sizeTree:L,...s4(A.offsetTree,0,L,k)}}})),y),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:f,fixedItemSize:u,unshiftWith:o,shiftWith:s,shiftWithOffset:E,beforeUnshiftWith:x,firstItemIndex:a,gap:g,sizes:y,listRefresh:b,statefulTotalCount:i,trackItemSizes:w,itemSize:h}},kr(kf,XU),{singleton:!0}),D9e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function goe(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!D9e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const i_=Wn(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:a,headerHeight:c,footerHeight:u,fixedHeaderHeight:f,fixedFooterHeight:h},{log:p}])=>{const g=Sn(),v=nt(0);let y=null,S=null,w=null;function b(){y&&(y(),y=null),w&&(w(),w=null),S&&(clearTimeout(S),S=null),rn(i,!1)}return Et(Oe(g,un(e,o,t,v,c,u,p),un(r,f,h),ut(([[x,E,I,A,k,O,L,N],H,G,z])=>{const D=goe(x),{align:F,behavior:j,offset:V}=D,W=A-1,K=poe(D,E,W);let X=lw(K,E.offsetTree,H)+O;F==="end"?(X+=G+Pl(E.sizeTree,K)[1]-I+z,K===W&&(X+=L)):F==="center"?X+=(G+Pl(E.sizeTree,K)[1]-I+z)/2:X-=k,V&&(X+=V);const Q=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Js.DEBUG),rn(g,x)):N("list did not change, scroll successful",{},Js.DEBUG)};if(b(),j==="smooth"){let ie=!1;w=qn(n,ce=>{ie=ie||ce}),y=qu(a,()=>{Q(ie)})}else y=qu(Oe(n,L9e(150)),Q);return S=setTimeout(()=>{b()},1200),rn(i,!0),N("scrolling from index to",{index:K,top:X,behavior:j},Js.DEBUG),{top:X,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},kr(wc,Wo,kf),{singleton:!0});function L9e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const cw="up",r1="down",N9e="none",B9e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},$9e=0,o_=Wn(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=nt(!1),a=nt(!0),c=Sn(),u=Sn(),f=nt(4),h=nt($9e),p=Fo(Oe(jq(Oe(Wt(t),mv(1),Su(!0)),Oe(Wt(t),mv(1),Su(!1),zq(100))),Sr()),!1),g=Fo(Oe(jq(Oe(o,Su(!0)),Oe(o,Su(!1),zq(200))),Sr()),!1);Et(Oe(Ri(Wt(t),Wt(h)),ut(([b,x])=>b<=x),Sr()),a),Et(Oe(a,Nd(50)),u);const v=Qs(Oe(Ri(e,Wt(n),Wt(r),Wt(i),Wt(f)),Zl((b,[{scrollTop:x,scrollHeight:E},I,A,k,O])=>{const L=x+I-E>-O,N={viewportHeight:I,scrollTop:x,scrollHeight:E};if(L){let G,z;return x>b.state.scrollTop?(G="SCROLLED_DOWN",z=b.state.scrollTop-x):(G="SIZE_DECREASED",z=b.state.scrollTop-x||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:G,scrollTopDelta:z}}let H;return N.scrollHeight>b.state.scrollHeight?H="SIZE_INCREASED":Ib&&b.atBottom===x.atBottom))),y=Fo(Oe(e,Zl((b,{scrollTop:x,scrollHeight:E,viewportHeight:I})=>{if(soe(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const A=E-(x+I)<1;return b.scrollTop!==x&&A?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Gt(b=>b.changed),ut(b=>b.jump)),0);Et(Oe(v,ut(b=>b.atBottom)),s),Et(Oe(s,Nd(50)),c);const S=nt(r1);Et(Oe(e,ut(({scrollTop:b})=>b),Sr(),Zl((b,x)=>Hs(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),Et(Oe(e,Nd(50),Su(N9e)),S);const w=nt(0);return Et(Oe(p,Gt(b=>!b),Su(0)),w),Et(Oe(t,Nd(100),un(p),Gt(([b,x])=>!!x),Zl(([b,x],[E])=>[x,E],[0,0]),ut(([b,x])=>x-b)),w),{isScrolling:p,isAtTop:a,isAtBottom:s,atBottomState:v,atTopStateChange:u,atBottomStateChange:c,scrollDirection:S,atBottomThreshold:f,atTopThreshold:h,scrollVelocity:w,lastJumpDueToItemResize:y}},kr(Wo)),Af=Wn(([{log:e}])=>{const t=nt(!1),n=Qs(Oe(t,Gt(r=>r),Sr()));return qn(t,r=>{r&&Hs(e)("props updated",{},Js.DEBUG)}),{propsReady:t,didMount:n}},kr(kf),{singleton:!0});function KU(e,t){e==0?t():requestAnimationFrame(()=>KU(e-1,t))}function QU(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const s_=Wn(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i},{didMount:o}])=>{const s=nt(!0),a=nt(0),c=nt(!1);return Et(Oe(o,un(a),Gt(([u,f])=>!!f),Su(!1)),s),qn(Oe(Ri(t,o),un(s,e,n,c),Gt(([[,u],f,{sizeTree:h},p,g])=>u&&(!rr(h)||GU(p))&&!f&&!g),un(a)),([,u])=>{rn(c,!0),KU(3,()=>{qu(r,()=>rn(s,!0)),rn(i,u)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:a}},kr(wc,Wo,i_,Af),{singleton:!0});function Wq(e){return e?e==="smooth"?"smooth":"auto":!1}const F9e=(e,t)=>typeof e=="function"?Wq(e(t)):t&&Wq(e),z9e=Wn(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:a},{log:c},{scrollingInProgress:u}])=>{const f=nt(!1),h=Sn();let p=null;function g(y){rn(i,{index:"LAST",align:"end",behavior:y})}qn(Oe(Ri(Oe(Wt(e),mv(1)),a),un(Wt(f),n,o,u),ut(([[y,S],w,b,x,E])=>{let I=S&&x,A="auto";return I&&(A=F9e(w,b||E),I=I&&!!A),{totalCount:y,shouldFollow:I,followOutputBehavior:A}}),Gt(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=qu(t,()=>{Hs(c)("following output to ",{totalCount:y},Js.DEBUG),g(S),p=null})});function v(y){const S=qu(r,w=>{y&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Hs(c)("scrolling to bottom due to increased size",{},Js.DEBUG),g("auto"))});setTimeout(S,100)}return qn(Oe(Ri(Wt(f),e,s),Gt(([y,,S])=>y&&S),Zl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Gt(({refreshed:y})=>y),un(f,e)),([,y])=>{v(y!==!1)}),qn(h,()=>{v(Hs(f)!==!1)}),qn(Ri(Wt(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},kr(wc,o_,i_,s_,Af,kf,Wo));function j9e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const voe=Wn(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=Sn(),s=Sn(),a=Qs(Oe(o,ut(j9e)));return Et(Oe(a,ut(c=>c.totalCount)),e),Et(Oe(a,ut(c=>c.groupIndices)),t),Et(Oe(Ri(r,n,i),Gt(([c,u])=>ZA(u)),ut(([c,u,f])=>Pl(u.groupOffsetTree,Math.max(c-f,0),"v")[0]),Sr(),ut(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},kr(wc,Wo));function uw(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function yoe(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const vT="top",yT="bottom",Gq="none";function Vq(e,t,n){return typeof e=="number"?n===cw&&t===vT||n===r1&&t===yT?e:0:n===cw?t===vT?e.main:e.reverse:t===yT?e.main:e.reverse}function qq(e,t){return typeof e=="number"?e:e[t]||0}const JU=Wn(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=Sn(),s=nt(0),a=nt(0),c=nt(0),u=Fo(Oe(Ri(Wt(e),Wt(t),Wt(r),Wt(o,uw),Wt(c),Wt(s),Wt(i),Wt(n),Wt(a)),ut(([f,h,p,[g,v],y,S,w,b,x])=>{const E=f-b,I=S+w,A=Math.max(p-E,0);let k=Gq;const O=qq(x,vT),L=qq(x,yT);return g-=b,g+=p+w,v+=p+w,v-=b,g>f+I-O&&(k=cw),vf!=null),Sr(uw)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:a,visibleRange:u}},kr(Wo),{singleton:!0});function U9e(e,t,n){if(ZA(t)){const r=moe(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 X$={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xq(e,t,n){if(e.length===0)return[];if(!ZA(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=JA(t.groupOffsetTree,r,i);let a,c=0;for(const u of e){(!a||a.end0){u=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const h=n-c,p=a+h*s+(h-1)*r,g=u,v=p-f;return{items:Xq(e,i,o),topItems:Xq(t,i,o),topListHeight:t.reduce((y,S)=>S.size+y,0),offsetTop:u,offsetBottom:v,top:g,bottom:f,totalCount:n,firstItemIndex:o}}function boe(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 a=e+s,c=QU(t,a),u=Array.from({length:a}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return zE(u,[],a,i,n,r)}const gm=Wn(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:a,topListHeight:c},{scrolledToInitialItem:u,initialTopMostItemIndex:f},{topListHeight:h},p,{didMount:g},{recalcInProgress:v}])=>{const y=nt([]),S=nt(0),w=Sn();Et(o.topItemsIndexes,y);const b=Fo(Oe(Ri(g,v,Wt(s,uw),Wt(t),Wt(e),Wt(f),u,Wt(y),Wt(r),Wt(i),n),Gt(([A,k,,O,,,,,,,L])=>{const N=L&&L.length!==O;return A&&!k&&!N}),ut(([,,[A,k],O,L,N,H,G,z,D,F])=>{const j=L,{sizeTree:V,offsetTree:W}=j,K=Hs(S);if(O===0)return{...X$,totalCount:O};if(A===0&&k===0)return K===0?{...X$,totalCount:O}:boe(K,N,L,z,D,F||[]);if(rr(V))return K>0?null:zE(U9e(QU(N,O),j,F),[],O,D,j,z);const X=[];if(G.length>0){const se=G[0],J=G[G.length-1];let ae=0;for(const le of JA(V,se,J)){const he=le.value,pe=Math.max(le.start,se),ve=Math.min(le.end,J);for(let ye=pe;ye<=ve;ye++)X.push({index:ye,size:he,offset:ae,data:F&&F[ye]}),ae+=he}}if(!H)return zE([],X,O,D,j,z);const Q=G.length>0?G[G.length-1]+1:0,ie=I9e(W,A,k,Q);if(ie.length===0)return null;const ce=O-1,ue=QA([],se=>{for(const J of ie){const ae=J.value;let le=ae.offset,he=J.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 zE(ue,X,O,D,j,z)}),Gt(A=>A!==null),Sr()),X$);Et(Oe(n,Gt(GU),ut(A=>A==null?void 0:A.length)),t),Et(Oe(b,ut(A=>A.topListHeight)),h),Et(h,c),Et(Oe(b,ut(A=>[A.top,A.bottom])),a),Et(Oe(b,ut(A=>A.items)),w);const x=Qs(Oe(b,Gt(({items:A})=>A.length>0),un(t,n),Gt(([{items:A},k])=>A[A.length-1].originalIndex===k-1),ut(([,A,k])=>[A-1,k]),Sr(uw),ut(([A])=>A))),E=Qs(Oe(b,Nd(200),Gt(({items:A,topItems:k})=>A.length>0&&A[0].originalIndex===k.length),ut(({items:A})=>A[0].index),Sr())),I=Qs(Oe(b,Gt(({items:A})=>A.length>0),ut(({items:A})=>{let k=0,O=A.length-1;for(;A[k].type==="group"&&kk;)O--;return{startIndex:A[k].index,endIndex:A[O].index}}),Sr(yoe)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:I,itemsRendered:w,initialItemCount:S,...p}},kr(wc,voe,JU,s_,i_,o_,Af,XU),{singleton:!0}),H9e=Wn(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:a}])=>(Et(Oe(a,un(o),Gt(([,c])=>c!==0),un(i,e,t,r,n),ut(([[,c],u,f,h,p,g=[]])=>boe(c,u,f,h,p,g))),s),{}),kr(wc,s_,gm,Af),{singleton:!0}),xoe=Wn(([{scrollVelocity:e}])=>{const t=nt(!1),n=Sn(),r=nt(!1);return Et(Oe(e,un(r,t,n),Gt(([i,o])=>!!o),ut(([i,o,s,a])=>{const{exit:c,enter:u}=o;if(s){if(c(i,a))return!1}else if(u(i,a))return!0;return s}),Sr()),t),qn(Oe(Ri(t,e,n),un(r)),([[i,o,s],a])=>i&&a&&a.change&&a.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},kr(o_),{singleton:!0}),W9e=Wn(([{topItemsIndexes:e}])=>{const t=nt(0);return Et(Oe(t,Gt(n=>n>0),ut(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},kr(gm)),woe=Wn(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=Sn(),s=Fo(Oe(Ri(e,r,t,n,i),ut(([a,c,u,f,h])=>a+c+u+f+h.offsetBottom+h.bottom)),0);return Et(Wt(s),o),{totalListHeight:s,totalListHeightChanged:o}},kr(Wo,gm),{singleton:!0});function _oe(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const G9e=_oe(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),V9e=Wn(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:a},{listState:c},{beforeUnshiftWith:u,shiftWithOffset:f,sizes:h,gap:p},{log:g},{recalcInProgress:v}])=>{const y=Qs(Oe(c,un(a),Zl(([,w,b,x],[{items:E,totalCount:I,bottom:A,offsetBottom:k},O])=>{const L=A+k;let N=0;return b===I&&w.length>0&&E.length>0&&(E[0].originalIndex===0&&w[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,I,L]},[0,[],0,0]),Gt(([w])=>w!==0),un(t,s,r,o,g,v),Gt(([,w,b,x,,,E])=>!E&&!x&&w!==0&&b===cw),ut(([[w],,,,,b])=>(b("Upward scrolling compensation",{amount:w},Js.DEBUG),w))));function S(w){w>0?(rn(e,{top:-w,behavior:"auto"}),rn(n,0)):(rn(n,0),rn(e,{top:-w,behavior:"auto"}))}return qn(Oe(y,un(n,i)),([w,b,x])=>{x&&G9e()?rn(n,b-w):S(-w)}),qn(Oe(Ri(Fo(i,!1),n,v),Gt(([w,b,x])=>!w&&!x&&b!==0),ut(([w,b])=>b),Nd(1)),S),Et(Oe(f,ut(w=>({top:-w}))),e),qn(Oe(u,un(h,p),ut(([w,{lastSize:b,groupIndices:x,sizeTree:E},I])=>{function A(k){return k*(b+I)}if(x.length===0)return A(w);{let k=0;const O=aw(E,0);let L=0,N=0;for(;Lw&&(k-=O,H=w-L+1),L+=H,k+=A(H),N++}return k}})),w=>{rn(n,w),requestAnimationFrame(()=>{rn(e,{top:w}),requestAnimationFrame(()=>{rn(n,0),rn(v,!1)})})}),{deviation:n}},kr(Wo,o_,gm,wc,kf,XU)),q9e=Wn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=nt(0);return qn(Oe(e,un(r),Gt(([,i])=>i!==0),ut(([,i])=>({top:i}))),i=>{qu(Oe(n,mv(1),Gt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{rn(t,i)})})}),{initialScrollTop:r}},kr(Af,Wo,gm),{singleton:!0}),X9e=Wn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=nt(!1),r=Fo(Oe(Ri(n,e,t),Gt(([i])=>i),ut(([,i,o])=>Math.max(0,i-o)),Nd(0),Sr()),0);return{alignToBottom:n,paddingTopAddition:r}},kr(Wo,woe),{singleton:!0}),ZU=Wn(([{scrollTo:e,scrollContainerState:t}])=>{const n=Sn(),r=Sn(),i=Sn(),o=nt(!1),s=nt(void 0);return Et(Oe(Ri(n,r),ut(([{viewportHeight:a,scrollTop:c,scrollHeight:u},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:u,viewportHeight:a}))),t),Et(Oe(e,un(r),ut(([a,{offsetTop:c}])=>({...a,top:a.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},kr(Wo)),Y9e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,K9e=Wn(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:c},{scrollToIndex:u}])=>{const f=Sn();return Et(Oe(f,un(e,i,t,o,s,a,r),un(n),ut(([[h,p,g,v,y,S,w,b],x])=>{const{done:E,behavior:I,align:A,calculateViewLocation:k=Y9e,...O}=h,L=poe(h,p,v-1),N=lw(L,p.offsetTree,x)+y+S,H=N+Pl(p.sizeTree,L)[1],G=b+S,z=b+g-w,D=k({itemTop:N,itemBottom:H,viewportTop:G,viewportBottom:z,locationParams:{behavior:I,align:A,...O}});return D?E&&qu(Oe(c,Gt(F=>F===!1),mv(Hs(c)?1:2)),E):E&&E(),D}),Gt(h=>h!==null)),u),{scrollIntoView:f}},kr(wc,Wo,i_,gm,kf),{singleton:!0}),Q9e=Wn(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:a}])=>{const c=Sn(),u=nt(void 0),f=nt(null),h=nt(null);return Et(s,f),Et(a,h),qn(Oe(c,un(e,n,o,f,h)),([p,g,v,y,S,w])=>{const b=O9e(g.sizeTree);y&&S!==null&&w!==null&&(v=S.scrollTop-w.offsetTop),p({ranges:b,scrollTop:v})}),Et(Oe(u,Gt(GU),ut(J9e)),r),Et(Oe(i,un(u),Gt(([,p])=>p!==void 0),Sr(),ut(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:u}},kr(wc,Wo,s_,Af,ZU));function J9e(e){return{offset:e.scrollTop,index:0,align:"start"}}const Z9e=Wn(([e,t,n,r,i,o,s,a,c,u])=>({...e,...t,...n,...r,...i,...o,...s,...a,...c,...u}),kr(JU,H9e,Af,xoe,woe,q9e,X9e,ZU,K9e,kf)),e7e=Wn(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:a,groupIndices:c,statefulTotalCount:u,gap:f,sizes:h},{initialTopMostItemIndex:p,scrolledToInitialItem:g},v,y,S,{listState:w,topItemsIndexes:b,...x},{scrollToIndex:E},I,{topItemCount:A},{groupCounts:k},O])=>(Et(x.rangeChanged,O.scrollSeekRangeChanged),Et(Oe(O.windowViewportRect,ut(L=>L.visibleHeight)),v.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:p,scrolledToInitialItem:g,topItemsIndexes:b,topItemCount:A,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:u,listState:w,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),kr(wc,s_,Wo,Q9e,z9e,gm,i_,V9e,W9e,voe,Z9e)),Y$="-webkit-sticky",Yq="sticky",Soe=_oe(()=>{if(typeof document>"u")return Yq;const e=document.createElement("div");return e.style.position=Y$,e.style.position===Y$?Y$:Yq});function Eoe(e,t){const n=de.useRef(null),r=de.useCallback(a=>{if(a===null||!a.offsetParent)return;const c=a.getBoundingClientRect(),u=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:u},e(n.current)},[e,t]),{callbackRef:i,ref:o}=qU(r),s=de.useCallback(()=>{r(o.current)},[r,o]);return de.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(s);return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),i}const Coe=de.createContext(void 0),Toe=de.createContext(void 0);function koe(e){return e}const t7e=Wn(()=>{const e=nt(c=>`Item ${c}`),t=nt(null),n=nt(c=>`Group ${c}`),r=nt({}),i=nt(koe),o=nt("div"),s=nt(Uv),a=(c,u=null)=>Fo(Oe(r,ut(f=>f[c]),Sr()),u);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),n7e=Wn(([e,t])=>({...e,...t}),kr(e7e,t7e)),r7e=({height:e})=>de.createElement("div",{style:{height:e}}),i7e={position:Soe(),zIndex:1,overflowAnchor:"none"},o7e={overflowAnchor:"none"},Kq=de.memo(function({showTopList:t=!1}){const n=bn("listState"),r=Sa("sizeRanges"),i=bn("useWindowScroll"),o=bn("customScrollParent"),s=Sa("windowScrollContainerState"),a=Sa("scrollContainerState"),c=o||i?s:a,u=bn("itemContent"),f=bn("context"),h=bn("groupContent"),p=bn("trackItemSizes"),g=bn("itemSize"),v=bn("log"),y=Sa("gap"),{callbackRef:S}=b9e(r,g,p,t?Uv:c,v,y,o),[w,b]=de.useState(0);e6("deviation",D=>{w!==D&&b(D)});const x=bn("EmptyPlaceholder"),E=bn("ScrollSeekPlaceholder")||r7e,I=bn("ListComponent"),A=bn("ItemComponent"),k=bn("GroupComponent"),O=bn("computeItemKey"),L=bn("isSeeking"),N=bn("groupIndices").length>0,H=bn("paddingTopAddition"),G=bn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+H,paddingBottom:n.offsetBottom,marginTop:w,...G?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&x?de.createElement(x,Zo(x,f)):de.createElement(I,{...Zo(I,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:i7e},h(D.index,f)):de.createElement(A,{...Zo(A,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:o7e},N?u(D.index,D.groupIndex,D.data,f):u(D.index,D.data,f))}))}),s7e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},eI={width:"100%",height:"100%",position:"absolute",top:0},a7e={width:"100%",position:Soe(),top:0,zIndex:1};function Zo(e,t){if(typeof e!="string")return{context:t}}const l7e=de.memo(function(){const t=bn("HeaderComponent"),n=Sa("headerHeight"),r=bn("headerFooterTag"),i=mm(s=>n(ff(s,"height"))),o=bn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Zo(t,o))):null}),c7e=de.memo(function(){const t=bn("FooterComponent"),n=Sa("footerHeight"),r=bn("headerFooterTag"),i=mm(s=>n(ff(s,"height"))),o=bn("context");return t?de.createElement(r,{ref:i},de.createElement(t,Zo(t,o))):null});function Aoe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...a}){const c=e("scrollContainerState"),u=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("scrollerRef"),p=n("context"),{scrollerRef:g,scrollByCallback:v,scrollToCallback:y}=aoe(c,f,u,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(u,{ref:g,style:{...s7e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Zo(u,p)},s)})}function Ioe({usePublisher:e,useEmitter:t,useEmitterValue:n}){return de.memo(function({style:o,children:s,...a}){const c=e("windowScrollContainerState"),u=n("ScrollerComponent"),f=e("smoothScrollTargetReached"),h=n("totalListHeight"),p=n("deviation"),g=n("customScrollParent"),v=n("context"),{scrollerRef:y,scrollByCallback:S,scrollToCallback:w}=aoe(c,f,u,Uv,g);return g9e(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",w),t("scrollBy",S),de.createElement(u,{style:{position:"relative",...o,...h!==0?{height:h+p}:{}},"data-virtuoso-scroller":!0,...a,...Zo(u,v)},s)})}const u7e=({children:e})=>{const t=de.useContext(Coe),n=Sa("viewportHeight"),r=Sa("fixedItemHeight"),i=mm(noe(n,o=>ff(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:eI,ref:i,"data-viewport-type":"element"},e)},d7e=({children:e})=>{const t=de.useContext(Coe),n=Sa("windowViewportRect"),r=Sa("fixedItemHeight"),i=bn("customScrollParent"),o=Eoe(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:eI,"data-viewport-type":"window"},e)},f7e=({children:e})=>{const t=bn("TopItemListComponent"),n=bn("headerHeight"),r={...a7e,marginTop:`${n}px`},i=bn("context");return de.createElement(t||"div",{style:r,context:i},e)},h7e=de.memo(function(t){const n=bn("useWindowScroll"),r=bn("topItemsIndexes").length>0,i=bn("customScrollParent"),o=i||n?g7e:m7e,s=i||n?d7e:u7e;return de.createElement(o,{...t},r&&de.createElement(f7e,null,de.createElement(Kq,{showTopList:!0})),de.createElement(s,null,de.createElement(l7e,null),de.createElement(Kq,null),de.createElement(c7e,null)))}),{Component:p7e,usePublisher:Sa,useEmitterValue:bn,useEmitter:e6}=ooe(n7e,{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"}},h7e),m7e=Aoe({usePublisher:Sa,useEmitterValue:bn,useEmitter:e6}),g7e=Ioe({usePublisher:Sa,useEmitterValue:bn,useEmitter:e6}),v7e=p7e,Qq={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},y7e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Jq,ceil:Zq,floor:bT,min:K$,max:i1}=Math;function b7e(e){return{...y7e,items:e}}function eX(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 x7e(e,t){return e&&e.column===t.column&&e.row===t.row}function XS(e,t){return e&&e.width===t.width&&e.height===t.height}const w7e=Wn(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:c,footerHeight:u,headerHeight:f},h,p,{propsReady:g,didMount:v},{windowViewportRect:y,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,windowScrollTo:x},E])=>{const I=nt(0),A=nt(0),k=nt(Qq),O=nt({height:0,width:0}),L=nt({height:0,width:0}),N=Sn(),H=Sn(),G=nt(0),z=nt(null),D=nt({row:0,column:0}),F=Sn(),j=Sn(),V=nt(!1),W=nt(0),K=nt(!0),X=nt(!1);qn(Oe(v,un(W),Gt(([J,ae])=>!!ae)),()=>{rn(K,!1),rn(A,0)}),qn(Oe(Ri(v,K,L,O,W,X),Gt(([J,ae,le,he,,pe])=>J&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,J])=>{rn(X,!0),KU(1,()=>{rn(N,J)}),qu(Oe(r),()=>{rn(n,[0,0]),rn(K,!0)})}),Et(Oe(j,Gt(J=>J!=null&&J.scrollTop>0),Su(0)),A),qn(Oe(v,un(j),Gt(([,J])=>J!=null)),([,J])=>{J&&(rn(O,J.viewport),rn(L,J==null?void 0:J.item),rn(D,J.gap),J.scrollTop>0&&(rn(V,!0),qu(Oe(r,mv(1)),ae=>{rn(V,!1)}),rn(s,{top:J.scrollTop})))}),Et(Oe(O,ut(({height:J})=>J)),i),Et(Oe(Ri(Wt(O,XS),Wt(L,XS),Wt(D,(J,ae)=>J&&J.column===ae.column&&J.row===ae.row),Wt(r)),ut(([J,ae,le,he])=>({viewport:J,item:ae,gap:le,scrollTop:he}))),F),Et(Oe(Ri(Wt(I),t,Wt(D,x7e),Wt(L,XS),Wt(O,XS),Wt(z),Wt(A),Wt(V),Wt(K),Wt(W)),Gt(([,,,,,,,J])=>!J),ut(([J,[ae,le],he,pe,ve,ye,xe,,me,be])=>{const{row:Ze,column:Xe}=he,{height:ct,width:Bt}=pe,{width:Pe}=ve;if(xe===0&&(J===0||Pe===0))return Qq;if(Bt===0){const Pt=QU(be,J),dt=Pt===0?Math.max(xe-1,0):Pt;return b7e(eX(Pt,dt,ye))}const ze=Roe(Pe,Bt,Xe);let st,gt;me?ae===0&&le===0&&xe>0?(st=0,gt=xe-1):(st=ze*bT((ae+Ze)/(ct+Ze)),gt=ze*Zq((le+Ze)/(ct+Ze))-1,gt=K$(J-1,i1(gt,ze-1)),st=K$(gt,i1(0,st))):(st=0,gt=-1);const vt=eX(st,gt,ye),{top:_e,bottom:je}=tX(ve,he,pe,vt),Ke=Zq(J/ze),Be=Ke*ct+(Ke-1)*Ze-je;return{items:vt,offsetTop:_e,offsetBottom:Be,top:_e,bottom:je,itemHeight:ct,itemWidth:Bt}})),k),Et(Oe(z,Gt(J=>J!==null),ut(J=>J.length)),I),Et(Oe(Ri(O,L,k,D),Gt(([J,ae,{items:le}])=>le.length>0&&ae.height!==0&&J.height!==0),ut(([J,ae,{items:le},he])=>{const{top:pe,bottom:ve}=tX(J,he,ae,le);return[pe,ve]}),Sr(uw)),n);const Q=nt(!1);Et(Oe(r,un(Q),ut(([J,ae])=>ae||J!==0)),Q);const ie=Qs(Oe(Wt(k),Gt(({items:J})=>J.length>0),un(I,Q),Gt(([{items:J},ae,le])=>le&&J[J.length-1].index===ae-1),ut(([,J])=>J-1),Sr())),ce=Qs(Oe(Wt(k),Gt(({items:J})=>J.length>0&&J[0].index===0),Su(0),Sr())),ue=Qs(Oe(Wt(k),un(V),Gt(([{items:J},ae])=>J.length>0&&!ae),ut(([{items:J}])=>({startIndex:J[0].index,endIndex:J[J.length-1].index})),Sr(yoe),Nd(0)));Et(ue,p.scrollSeekRangeChanged),Et(Oe(N,un(O,L,I,D),ut(([J,ae,le,he,pe])=>{const ve=goe(J),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=i1(0,be,K$(he-1,be));let Ze=a4(ae,pe,le,be);return ye==="end"?Ze=Jq(Ze-ae.height+le.height):ye==="center"&&(Ze=Jq(Ze-ae.height/2+le.height/2)),me&&(Ze+=me),{top:Ze,behavior:xe}})),s);const se=Fo(Oe(k,ut(J=>J.offsetBottom+J.bottom)),0);return Et(Oe(y,ut(J=>({width:J.visibleWidth,height:J.visibleHeight}))),O),{data:z,totalCount:I,viewportDimensions:O,itemDimensions:L,scrollTop:r,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:s,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:y,windowScrollTo:x,useWindowScroll:S,customScrollParent:w,windowScrollContainerState:b,deviation:G,scrollContainerState:c,footerHeight:u,headerHeight:f,initialItemCount:A,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:W,gridState:k,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:F,propsReady:g,stateRestoreInProgress:V,...E}},kr(JU,Wo,o_,xoe,Af,ZU,kf));function tX(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=a4(e,t,n,r[0].index),s=a4(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function a4(e,t,n,r){const i=Roe(e.width,n.width,t.column),o=bT(r/i),s=o*n.height+i1(0,o-1)*t.row;return s>0?s+t.row:s}function Roe(e,t,n){return i1(1,bT((e+n)/(bT(t)+n)))}const _7e=Wn(()=>{const e=nt(u=>`Item ${u}`),t=nt({}),n=nt(null),r=nt("virtuoso-grid-item"),i=nt("virtuoso-grid-list"),o=nt(koe),s=nt("div"),a=nt(Uv),c=(u,f=null)=>Fo(Oe(t,ut(h=>h[u]),Sr()),f);return{context:n,itemContent:e,components:t,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:a,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),S7e=Wn(([e,t])=>({...e,...t}),kr(w7e,_7e)),E7e=de.memo(function(){const t=Dr("gridState"),n=Dr("listClassName"),r=Dr("itemClassName"),i=Dr("itemContent"),o=Dr("computeItemKey"),s=Dr("isSeeking"),a=kl("scrollHeight"),c=Dr("ItemComponent"),u=Dr("ListComponent"),f=Dr("ScrollSeekPlaceholder"),h=Dr("context"),p=kl("itemDimensions"),g=kl("gap"),v=Dr("log"),y=Dr("stateRestoreInProgress"),S=mm(w=>{const b=w.parentElement.parentElement.scrollHeight;a(b);const x=w.firstChild;if(x){const{width:E,height:I}=x.getBoundingClientRect();p({width:E,height:I})}g({row:nX("row-gap",getComputedStyle(w).rowGap,v),column:nX("column-gap",getComputedStyle(w).columnGap,v)})});return y?null:de.createElement(u,{ref:S,className:n,...Zo(u,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(w=>{const b=o(w.index,w.data,h);return s?de.createElement(f,{key:b,...Zo(f,h),index:w.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...Zo(c,h),className:r,"data-index":w.index,key:b},i(w.index,w.data,h))}))}),C7e=de.memo(function(){const t=Dr("HeaderComponent"),n=kl("headerHeight"),r=Dr("headerFooterTag"),i=mm(s=>n(ff(s,"height"))),o=Dr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Zo(t,o))):null}),T7e=de.memo(function(){const t=Dr("FooterComponent"),n=kl("footerHeight"),r=Dr("headerFooterTag"),i=mm(s=>n(ff(s,"height"))),o=Dr("context");return t?de.createElement(r,{ref:i},de.createElement(t,Zo(t,o))):null}),k7e=({children:e})=>{const t=de.useContext(Toe),n=kl("itemDimensions"),r=kl("viewportDimensions"),i=mm(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:eI,ref:i},e)},A7e=({children:e})=>{const t=de.useContext(Toe),n=kl("windowViewportRect"),r=kl("itemDimensions"),i=Dr("customScrollParent"),o=Eoe(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:eI},e)},I7e=de.memo(function({...t}){const n=Dr("useWindowScroll"),r=Dr("customScrollParent"),i=r||n?P7e:R7e,o=r||n?A7e:k7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(C7e,null),de.createElement(E7e,null),de.createElement(T7e,null)))}),{Component:zVe,usePublisher:kl,useEmitterValue:Dr,useEmitter:Poe}=ooe(S7e,{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"}},I7e),R7e=Aoe({usePublisher:kl,useEmitterValue:Dr,useEmitter:Poe}),P7e=Ioe({usePublisher:kl,useEmitterValue:Dr,useEmitter:Poe});function nX(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Js.WARN),t==="normal"?0:parseInt(t??"0",10)}const O7e=R.forwardRef(({style:e,children:t,...n},r)=>{const i=R.useRef(null),{palette:o,spacing:s}=Ln(),a=A1({".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]=PJ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});R.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const u=R.useCallback(f=>{f&&r&&(typeof r=="function"?r(f):r.current=f)},[r]);return C.jsx("div",{ref:i,style:e,className:a,children:C.jsx("div",{ref:u,...n,children:t})})});function M7e({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(ht,{...i,children:C.jsx(v7e,{components:{Scroller:O7e},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function D7e({event:e,hidden:t}){return C.jsxs(a3e,{children:[te.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(z1e,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function L7e({event:e,index:t,selected:n,...r}){const{spacing:i}=Ln();return C.jsx(bf,{title:C.jsx(ht,{p:1,children:C.jsx(t5,{event:e,flexDirection:"column"})}),followCursor:!0,children:C.jsxs(o3,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${F1(e==null?void 0:e.type)}`,...r.sx},children:[C.jsx(Gd,{children:C.jsx(Ut,{variant:"body2",children:t})}),C.jsx(oc,{sx:{overflow:"hidden"},primary:C.jsx(D7e,{event:e,hidden:!1}),secondary:C.jsx(t5,{event:te.pick(e,"f","g","pId")})})]})})}const N7e=C.jsx(Qu,{orientation:"vertical",flexItem:!0,sx:{m:1}}),B7e=e=>Number(e.replace(/px$/,""));function $7e(){const{spacing:e}=Ln(),{controls:t,onChange:n,state:r}=wf(),i=R.useRef(null),{key:o,setKey:s,layers:a,layer:c}=qp(),{step:u,playing:f,pause:h,stepTo:p}=hU(o),g=R.useMemo(()=>{var v;if(c)return R.createElement(Xw[((v=c==null?void 0:c.source)==null?void 0:v.type)??""].steps,{layer:c})},[c]);return R.useEffect(()=>{f||te.delay(()=>{var v,y;return(y=(v=i==null?void 0:i.current)==null?void 0:v.scrollToIndex)==null?void 0:y.call(v,{index:u,align:"start",behavior:"smooth",offset:-B7e(e(6+2))})},150)},[u,f,e]),C.jsxs(zn,{onChange:n,stack:r,children:[C.jsx(zn.Content,{children:C.jsx(En,{vertical:!0,alignItems:"center",children:g?f?C.jsx(gp,{icon:C.jsx(Ew,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(Ut,{children:"Running"}),C.jsx(Fz,{onClick:()=>h(),children:"Pause"})]})}):R.cloneElement(g,{children:v=>c?v.length?C.jsx(M7e,{sx:{width:"100%",height:"100%"},items:v,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(y,S)=>C.jsxs(ht,{sx:{height:e(S?10:16),pt:S?0:e(6)},children:[C.jsx(L7e,{event:y,index:S,selected:S===u,sx:{height:"100%"},onClick:()=>p(S)}),C.jsx(Qu,{variant:"inset"})]})}):C.jsx(gp,{icon:C.jsx(fE,{}),label:`${va(c)} has no steps to display`}):C.jsx(gp,{icon:C.jsx(fE,{}),label:"Steps"})}):C.jsx(gp,{icon:C.jsx(fE,{}),label:"Steps"})})}),C.jsxs(zn.Options,{children:[C.jsx(Vs,{icon:C.jsx(Tw,{}),label:"Layer",value:o,items:te.map(a,v=>({id:v.key,name:va(v)})),onChange:s,showArrow:!0}),N7e,C.jsx(XFe,{layer:c})]}),C.jsx(zn.Extras,{children:t})]})}const F7e=e=>e?48:36,z7e=8;function j7e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=sj(),a=te.max([te.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(im,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(bf,{title:i,children:C.jsx("span",{children:e==null?void 0:e(eA(c))})}),C.jsx(rm,{...Fw(c),anchorOrigin:{horizontal:"center",vertical:-F7e(s)*a-z7e},transformOrigin:{vertical:"top",horizontal:"center"},children:te.map(t,({value:u,label:f,disabled:h})=>C.jsxs(Pu,{disabled:h,onClick:()=>{r==null||r({...n,[u]:!((n==null?void 0:n[u])??o)})},children:[C.jsx(Gd,{children:C.jsx(Qge,{sx:{p:0},checked:!!((n==null?void 0:n[u])??o)})}),f]},u))})]})})}function U7e({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var u;const a=te.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=a.length?a.length===1?(u=te.head(a))==null?void 0:u.name:`${a.length} Selected`:e;return C.jsx(j7e,{defaultChecked:!0,placeholder:te.startCase(e),trigger:f=>C.jsx(of,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:te.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(Ut,{children:h}),C.jsx(li,{}),C.jsx(Ut,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const rX=C.jsx(Qu,{orientation:"vertical",flexItem:!0,sx:{m:1}});function H7e(){var p,g,v,y;const{controls:e,onChange:t,state:n}=wf(),[r]=xA(),[{layers:i}]=om(),[o,s]=R.useState({}),a=R.useMemo(()=>te.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,u]=R.useState(),f=R.useMemo(()=>te.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(En,{children:C.jsx(nA,{children:S=>C.jsx(ht,{children:C.jsx($Be,{...S,layers:a,renderer:h,rendererRef:u})})})})}),C.jsx(zn.Options,{children:C.jsxs(nf,{direction:"row",children:[C.jsx(Vs,{label:"Renderer",icon:C.jsx(I1e,{}),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"})`},...te.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),rX,C.jsx(U7e,{defaultChecked:!0,label:"Layers",icon:C.jsx(Tw,{}),value:o,onChange:s,items:te.map(i,S=>({id:S.key,name:va(S)})),showArrow:!0}),rX,C.jsx(of,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(O1e,{}),children:"Fit"}),C.jsx(of,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(N1e,{}),children:"1:1"})]})}),C.jsx(zn.Extras,{children:e})]})}const l4={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(qQ,{}),content:H7e},tree:{id:"tree",name:"Tree",icon:C.jsx(UQ,{}),content:IBe},steps:{id:"steps",name:"Steps",icon:C.jsx(fE,{}),content:$7e},info:{id:"info",name:"Logs",icon:C.jsx(GQ,{}),content:MRe},layers:{id:"layers",name:"Layers",icon:C.jsx(Tw,{}),content:s3e},debug:{id:"debug",name:"Debugger",icon:C.jsx(P1e,{}),content:ORe},settings:{id:"settings",name:"Settings",icon:C.jsx(Y1e,{}),content:o9e},about:{id:"about",name:"About",icon:C.jsx(j1e,{}),content:jSe}},[W7e,G7e]=vc({view:{type:"branch",key:qo(),orientation:"horizontal",children:[{size:75,type:"branch",key:qo(),orientation:"horizontal",children:[{type:"leaf",size:25,key:qo(),content:{type:"layers"}},{size:75,type:"branch",key:qo(),orientation:"vertical",children:[{type:"leaf",size:75,key:qo(),content:{type:"viewport"}},{type:"leaf",size:25,key:qo(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:qo(),content:{type:"steps"}}]}});function V7e(){const[e]=Fee(),t=aj(),n=te.values(e);return C.jsx(jk,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs(nf,{alignItems:"center",spacing:4,children:[C.jsx(Ew,{}),n.map((r,i)=>C.jsx(Ut,{variant:"body2",color:"textSecondary",children:r},i))]})})}var Ooe={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function n(r,i,o){var s=window,a="application/octet-stream",c=o||a,u=r,f=!i&&!o&&u,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"&&(u=[u,c],c=u[0],u=u[1]),f&&f.length<2048&&(v=f.split("/").pop().split("?")[0],h.href=f,h.href.indexOf(f)!==-1)){var w=new XMLHttpRequest;return w.open("GET",f,!0),w.responseType="blob",w.onload=function(k){n(k.target.response,v,a)},setTimeout(function(){w.send()},0),w}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))if(u.length>1024*1024*1.999&&g!==p)u=I(u),c=u.type||a;else return navigator.msSaveBlob?navigator.msSaveBlob(I(u),v):A(u);else if(/([\x80-\xff])/.test(u)){var b=0,x=new Uint8Array(u.length),E=x.length;for(b;b{const p=(0,n.randomBytes)(4).readUInt32BE(0);return u+p%(f-u+1)},i=u=>{let f;switch(u){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(u,f){return u.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+i(f)}e.generateFromEmail=o;function s(u,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 u?v=g+u+p+i(f):v=g+p+i(f),h?v.substring(0,h):v}e.generateUsername=s;function a(u){if(u.dictionaries){const f=u.dictionaries.length;let h="";for(let g=0;g{const a=s??await Dj({accept:Doe,strict:!0});a&&(Q7e(a)?await o(async()=>{const c=await a.text(),u=await Nee(c);u&&(n(()=>u.layers),i(()=>u.UIState))},`Opening workspace (${Fj(a.size)})`):e(`${a==null?void 0:a.name} is not a workspace file.`))},save:()=>{X7e(JSON.stringify({layers:t,UIState:r}),`${Moe.generateUsername("-")}.workspace.json`,"application/json")}}}function Q7e(e){return te.find(Doe,t=>e.name.endsWith(t))}var Noe={},J7e=$t&&$t.__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)}}(),Boe=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Noe,"__esModule",{value:!0});var ca=Boe(vv),Q$=Boe(R),Z7e=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,a=n.draggingOverTargetClassName,c=this.state,u=c.draggingOverTarget,f=c.draggingOverFrame,h=o;return f&&(h+=" "+s),u&&(h+=" "+a),Q$.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},Q$.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:ca.default.string,targetClassName:ca.default.string,draggingOverFrameClassName:ca.default.string,draggingOverTargetClassName:ca.default.string,onDragOver:ca.default.func,onDragLeave:ca.default.func,onDrop:ca.default.func,onTargetClick:ca.default.func,dropEffect:ca.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:ca.default.func,onFrameDragLeave:ca.default.func,onFrameDrop:ca.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}(Q$.default.PureComponent),eVe=Noe.FileDrop=Z7e;function tVe(){const e=aj(),{load:t}=Loe(),[n,r]=R.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(eVe,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(te.head(i)),children:C.jsx(jk,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs(nf,{alignItems:"center",spacing:4,children:[C.jsx(nwe,{}),C.jsx(Ut,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function nVe(e){const t=VRe(),[{view:n},r]=W7e();return C.jsxs(C.Fragment,{children:[C.jsx(En,{...e,children:C.jsx(jJ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(Hp,{in:!0,children:C.jsx(ht,{sx:{width:"100%",height:"100%"},children:R.createElement((o=l4[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(Hp,{in:t,children:C.jsx(jye,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx(V7e,{}),C.jsx(tVe,{})]})}const rVe=e=>iF(e,"#ffffff")>iF(e,"#000000")?"#ffffff":"#000000";function iVe(e){R.useEffect(()=>{te.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=x3,"electron"in window&&window.electron.invoke("title-bar","#00000000",rVe(e))},[e])}function oVe(e){return new Promise(t=>te.delay(t,e))}async function sVe(e,t=2500){const n=te.now();return{result:await Promise.any([e(),oVe(t)]),delta:te.now()-n}}function aVe(){const e=Ol(),[{remote:t}]=Zu(),[,n]=rv(),r=sm("connections");return R.useEffect(()=>{let i=!1,o=[];return r(async()=>{if(t!=null&&t.length){for(const{transport:s,url:a,disabled:c}of t){if(c!==!0){e(`Connecting to ${a}...`);const u=new(ZGe(s))({url:a});await u.connect();const{result:f,delta:h}=await sVe(()=>u.call("about"));f?(e(`Connected to ${f.name}.`),o=[...o,{...f,url:a,ping:h,call:u.call.bind(u),disconnect:u.disconnect.bind(u)}]):await u.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 lVe=e=>t=>({...t,source:e});function cVe(){const[e]=rv(),[,t]=FC(),n=sm("features");return Ate(r=>n(async()=>{const i={algorithms:[],formats:te.keys(eU).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const a of["algorithms","formats","maps"])i[a]=te.uniqBy([...i[a],...te.map(await o(`features/${a}`),lVe(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function uVe(){const[{layers:e},t]=om();return R.useMemo(()=>te.map(e,n=>{const r=Ene(n).service;if(r)return R.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:te.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function dVe(){const e=uVe();return C.jsx(C.Fragment,{children:e})}function $oe({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:te.reduce(te.map(e,r=>R.createElement(r)),(r,i)=>R.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,te.map(n,(r,i)=>R.createElement(r,{key:i}))]}))})}const fVe=()=>{const{save:e,load:t}=Loe(),[n,r]=R.useState(!1);return R.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(ht,{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(Iw,{x:!0,style:{height:"100%"},children:C.jsx(ht,{sx:{height:"100%"},children:C.jsxs(nf,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(ht,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:WJ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open($Se,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${FSe}/changelog-${NSe}.md`,"_blank")}]}].map(({key:i,items:o})=>C.jsx(im,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(rm,{...Fw(s),children:C.jsx(Hk,{dense:!0,sx:{p:0},children:o.map(({name:a,key:c,action:u})=>C.jsx(Pu,{onClick:()=>{u==null||u(),s.close()},children:a},c))})}),C.jsx(of,{...eA(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:te.startCase(i)})]})},i)),C.jsx(ht,{sx:{p:.75,height:"100%"},children:C.jsx(hVe,{})})]})})})})};function hVe(){const e=Ol();return C.jsxs(Ku,{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(X1e,{fontSize:"small",color:"disabled"})," ",C.jsx(Ut,{sx:{mt:0},children:"Commands"})]})}const pVe=[aVe,cVe,UWe,dVe];function mVe(){const t=Ln().palette.background.default;return iVe(t),C.jsxs(En,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(fVe,{}),C.jsx(nVe,{flex:1})]})}function gVe(){const[{theme:e="light",accentColor:t="teal"}]=Zu(),n=R.useMemo(()=>DSe(e,t),[e,t]);return C.jsx(pue,{theme:n,children:C.jsx(Pwe,{children:C.jsx($oe,{services:pVe,children:C.jsx(mVe,{})})})})}var Foe,iX=Ev;Foe=iX.createRoot,iX.hydrateRoot;const vVe=Foe(document.getElementById("root")),yVe=[hOe,PSe,HRe,WRe,cCe,GRe,MBe,Rwe,G7e,LRe];vVe.render(C.jsx(uve,{children:C.jsx($oe,{slices:yVe,children:C.jsx(gVe,{})})})); diff --git a/assets/index-3eab0860.js b/assets/index-3eab0860.js new file mode 100644 index 00000000..997c475e --- /dev/null +++ b/assets/index-3eab0860.js @@ -0,0 +1,1730 @@ +var soe=Object.defineProperty;var aoe=(e,t,n)=>t in e?soe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kp=(e,t,n)=>(aoe(e,typeof t!="symbol"?t+"":t,n),n),CD=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ze=(e,t,n)=>(CD(e,t,"read from private field"),n?n.call(e):t.get(e)),er=(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)},Qc=(e,t,n,r)=>(CD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var v6=(e,t,n,r)=>({set _(i){Qc(e,t,i,n)},get _(){return Ze(e,t,r)}}),Ni=(e,t,n)=>(CD(e,t,"access private method"),n);function loe(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 Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Eq(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 Cq={exports:{}},eT={},Tq={exports:{}},dn={};/** + * @license React + * react.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 U1=Symbol.for("react.element"),coe=Symbol.for("react.portal"),uoe=Symbol.for("react.fragment"),doe=Symbol.for("react.strict_mode"),foe=Symbol.for("react.profiler"),hoe=Symbol.for("react.provider"),poe=Symbol.for("react.context"),moe=Symbol.for("react.forward_ref"),goe=Symbol.for("react.suspense"),voe=Symbol.for("react.memo"),yoe=Symbol.for("react.lazy"),y6=Symbol.iterator;function boe(e){return e===null||typeof e!="object"?null:(e=y6&&e[y6]||e["@@iterator"],typeof e=="function"?e:null)}var Aq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kq=Object.assign,Iq={};function Kg(e,t,n){this.props=e,this.context=t,this.refs=Iq,this.updater=n||Aq}Kg.prototype.isReactComponent={};Kg.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")};Kg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rq(){}Rq.prototype=Kg.prototype;function k5(e,t,n){this.props=e,this.context=t,this.refs=Iq,this.updater=n||Aq}var I5=k5.prototype=new Rq;I5.constructor=k5;kq(I5,Kg.prototype);I5.isPureReactComponent=!0;var b6=Array.isArray,Pq=Object.prototype.hasOwnProperty,R5={current:null},Oq={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)Pq.call(t,r)&&!Oq.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{t[n]=$q(e[n])}),t}function Go(e,t,n={clone:!0}){const r=n.clone?F({},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]=Go(e[i],t[i],n):n.clone?r[i]=Wh(t[i])?$q(t[i]):t[i]:r[i]=t[i])}),r}var zq={exports:{}},ose="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",sse=ose,ase=sse;function jq(){}function Uq(){}Uq.resetWarningCache=jq;var lse=function(){function e(r,i,o,s,l,c){if(c!==ase){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:Uq,resetWarningCache:jq};return n.PropTypes=n,n};zq.exports=lse();var Qg=zq.exports;const Y0=Ws(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 tT(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 yS(e,t){var n,r;return R.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 Ir(e){return e&&e.ownerDocument||document}function bu(e){return Ir(e).defaultView||window}function mF(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const cse=typeof window<"u"?R.useLayoutEffect:R.useEffect,Po=cse;let _6=0;function use(e){const[t,n]=R.useState(e),r=e||t;return R.useEffect(()=>{t==null&&(_6+=1,n(`mui-${_6}`))},[t]),r}const S6=iE["useId".toString()];function M5(e){if(S6!==void 0){const t=S6();return e??t}return use(e)}function Mx({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=R.useRef(e!==void 0),[o,s]=R.useState(t),l=i?e:o,c=R.useCallback(d=>{i||s(d)},[]);return[l,c]}function ro(e){const t=R.useRef(e);return Po(()=>{t.current=e}),R.useCallback((...n)=>(0,t.current)(...n),[])}function gr(...e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{mF(n,t)})},e)}let nT=!0,gF=!1,E6;const dse={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 fse(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&dse[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function hse(e){e.metaKey||e.altKey||e.ctrlKey||(nT=!0)}function AD(){nT=!1}function pse(){this.visibilityState==="hidden"&&gF&&(nT=!0)}function mse(e){e.addEventListener("keydown",hse,!0),e.addEventListener("mousedown",AD,!0),e.addEventListener("pointerdown",AD,!0),e.addEventListener("touchstart",AD,!0),e.addEventListener("visibilitychange",pse,!0)}function gse(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return nT||fse(t)}function D5(){const e=R.useCallback(i=>{i!=null&&mse(i.ownerDocument)},[]),t=R.useRef(!1);function n(){return t.current?(gF=!0,window.clearTimeout(E6),E6=window.setTimeout(()=>{gF=!1},100),t.current=!1,!0):!1}function r(i){return gse(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Hq(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Qp;function Wq(){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 vse(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(Wq()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const yse={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},bse=yse;function L5(e,t){const n=F({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=F({},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]=F({},o),Object.keys(i).forEach(s=>{n[r][s]=L5(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function At(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 C6=e=>e,xse=()=>{let e=C6;return{configure(t){e=t},generate(t){return e(t)},reset(){e=C6}}},wse=xse(),Gq=wse,_se={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 Et(e,t,n="Mui"){const r=_se[t];return r?`${n}-${r}`:`${Gq.generate(e)}-${t}`}function kt(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Et(e,i,n)}),r}const fp="$$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 Vq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Sse=/^((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)-.*))$/,Ese=Vq(function(e){return Sse.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Cse(e){if(e.sheet)return e.sheet;for(var t=0;t0?ji(Jg,--Qo):0,gg--,qr===10&&(gg=1,iT--),qr}function Ps(){return qr=Qo2||Lx(qr)>3?"":" "}function Fse(e,t){for(;--t&&Ps()&&!(qr<48||qr>102||qr>57&&qr<65||qr>70&&qr<97););return H1(e,bS()+(t<6&&$l()==32&&Ps()==32))}function yF(e){for(;Ps();)switch(qr){case e:return Qo;case 34:case 39:e!==34&&e!==39&&yF(qr);break;case 40:e===41&&yF(e);break;case 92:Ps();break}return Qo}function $se(e,t){for(;Ps()&&e+qr!==47+10;)if(e+qr===42+42&&$l()===47)break;return"/*"+H1(t,Qo-1)+"*"+rT(e===47?e:Ps())}function zse(e){for(;!Lx($l());)Ps();return H1(e,Qo)}function jse(e){return Jq(wS("",null,null,null,[""],e=Qq(e),0,[0],e))}function wS(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,k=o,I=r,A=x;S;)switch(v=b,b=Ps()){case 40:if(v!=108&&ji(A,h-1)==58){vF(A+=In(xS(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:A+=xS(b);break;case 9:case 10:case 13:case 32:A+=Bse(v);break;case 92:A+=Fse(bS()-1,7);continue;case 47:switch($l()){case 42:case 47:Mw(Use($se(Ps(),bS()),t,n),c);break;default:A+="/"}break;case 123*y:l[d++]=Rl(A)*_;case 125*y:case 59:case 0:switch(b){case 0:case 125:S=0;case 59+f:_==-1&&(A=In(A,/\f/g,"")),g>0&&Rl(A)-h&&Mw(g>32?A6(A+";",r,n,h-1):A6(In(A," ","")+";",r,n,h-2),c);break;case 59:A+=";";default:if(Mw(I=T6(A,t,n,d,f,i,l,x,E=[],k=[],h),o),b===123)if(f===0)wS(A,t,I,I,E,o,h,l,k);else switch(p===99&&ji(A,3)===110?100:p){case 100:case 108:case 109:case 115:wS(e,I,I,r&&Mw(T6(e,I,I,0,0,i,l,x,i,E=[],h),k),i,k,h,l,r?E:k);break;default:wS(A,I,I,I,[""],k,0,l,k)}}d=f=g=0,y=_=1,x=A="",h=s;break;case 58:h=1+Rl(A),g=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Nse()==125)continue}switch(A+=rT(b),b*y){case 38:_=f>0?1:(A+="\f",-1);break;case 44:l[d++]=(Rl(A)-1)*_,_=1;break;case 64:$l()===45&&(A+=xS(Ps())),p=$l(),f=h=Rl(x=A+=zse(bS())),b++;break;case 45:v===45&&Rl(A)==2&&(y=0)}}return o}function T6(e,t,n,r,i,o,s,l,c,d,f){for(var h=i-1,p=i===0?o:[""],g=F5(p),v=0,y=0,S=0;v0?p[_]+" "+b:In(b,/&\f/g,p[_])))&&(c[S++]=x);return oT(e,t,n,i===0?N5:l,c,d,f)}function Use(e,t,n){return oT(e,t,n,qq,rT(Lse()),Dx(e,2,-2),0)}function A6(e,t,n,r){return oT(e,t,n,B5,Dx(e,0,r),Dx(e,r+1,-1),r)}function Ym(e,t){for(var n="",r=F5(e),i=0;i6)switch(ji(e,t+1)){case 109:if(ji(e,t+4)!==45)break;case 102:return In(e,/(.+:)(.+)-([^]+)/,"$1"+kn+"$2-$3$1"+oE+(ji(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vF(e,"stretch")?Zq(In(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ji(e,t+1)!==115)break;case 6444:switch(ji(e,Rl(e)-3-(~vF(e,"!important")&&10))){case 107:return In(e,":",":"+kn)+e;case 101:return In(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+kn+(ji(e,14)===45?"inline-":"")+"box$3$1"+kn+"$2$3$1"+Ji+"$2box$3")+e}break;case 5936:switch(ji(e,t+11)){case 114:return kn+e+Ji+In(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return kn+e+Ji+In(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return kn+e+Ji+In(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return kn+e+Ji+e+e}return e}var Qse=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case B5:t.return=Zq(t.value,t.length);break;case Xq:return Ym([K0(t,{value:In(t.value,"@","@"+kn)})],i);case N5:if(t.length)return Dse(t.props,function(o){switch(Mse(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ym([K0(t,{props:[In(o,/:(read-\w+)/,":"+oE+"$1")]})],i);case"::placeholder":return Ym([K0(t,{props:[In(o,/:(plac\w+)/,":"+kn+"input-$1")]}),K0(t,{props:[In(o,/:(plac\w+)/,":"+oE+"$1")]}),K0(t,{props:[In(o,/:(plac\w+)/,Ji+"input-$1")]})],i)}return""})}},Jse=[Qse],Zse=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||Jse,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 vae={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},yae=/[A-Z]|^ms/g,bae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sX=function(t){return t.charCodeAt(1)===45},M6=function(t){return t!=null&&typeof t!="boolean"},kD=Vq(function(e){return sX(e)?e:e.replace(yae,"-$&").toLowerCase()}),D6=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bae,function(r,i,o){return Pl={name:i,styles:o,next:Pl},i})}return vae[t]!==1&&!sX(t)&&typeof n=="number"&&n!==0?n+"px":n};function Nx(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 xae(e,t,n)}case"function":{if(e!==void 0){var o=Pl,s=n(e);return Pl=o,Nx(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function xae(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?Eae:Cae},F6=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},Tae=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return iX(n,r,i),_ae(function(){return oX(n,r,i)}),null},Aae=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=F6(t,n,r),c=l||B6(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(Iae(i)?n:i):t;return C.jsx(Sae,{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 uX(e,t){return bF(e,t)}const Pae=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Oae=["values","unit","step"],Mae=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)=>F({},n,{[r.key]:r.val}),{})};function Dae(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Le(e,Oae),o=Mae(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:${G5[e]}px)`};function hl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||$6;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||$6;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||G5).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 dX(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function fX(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Bae(e,...t){const n=dX(e),r=[n,...t].reduce((i,o)=>Go(i,o),{});return fX(Object.keys(n),r)}function Fae(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 ID({values:e,breakpoints:t,base:n}){const r=n||Fae(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 vT(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 sE(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=vT(e,n)||r,t&&(i=t(i,r,e)),i}function Rn(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=vT(c,r)||{};return hl(s,l,h=>{let p=sE(d,i,h);return h===p&&typeof h=="string"&&(p=sE(d,i,`${t}${h==="default"?"":Me(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function $ae(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const zae={m:"margin",p:"padding"},jae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},z6={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Uae=$ae(e=>{if(e.length>2)if(z6[e])e=z6[e];else return[e];const[t,n]=e.split(""),r=zae[t],i=jae[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),V5=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],q5=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...V5,...q5];function W1(e,t,n,r){var i;const o=(i=vT(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 X5(e){return W1(e,"spacing",8)}function hp(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 Hae(e,t){return n=>e.reduce((r,i)=>(r[i]=hp(t,n),r),{})}function Wae(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=Uae(n),o=Hae(i,r),s=e[n];return hl(e,s,o)}function hX(e,t){const n=X5(e.theme);return Object.keys(e).map(r=>Wae(e,t,r,n)).reduce(tx,{})}function Lr(e){return hX(e,V5)}Lr.propTypes={};Lr.filterProps=V5;function Nr(e){return hX(e,q5)}Nr.propTypes={};Nr.filterProps=q5;function Gae(e=8){if(e.mui)return e;const t=X5({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 yT(...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 Vae=Rn({prop:"border",themeKey:"borders",transform:Dl}),qae=Rn({prop:"borderTop",themeKey:"borders",transform:Dl}),Xae=Rn({prop:"borderRight",themeKey:"borders",transform:Dl}),Yae=Rn({prop:"borderBottom",themeKey:"borders",transform:Dl}),Kae=Rn({prop:"borderLeft",themeKey:"borders",transform:Dl}),Qae=Rn({prop:"borderColor",themeKey:"palette"}),Jae=Rn({prop:"borderTopColor",themeKey:"palette"}),Zae=Rn({prop:"borderRightColor",themeKey:"palette"}),ele=Rn({prop:"borderBottomColor",themeKey:"palette"}),tle=Rn({prop:"borderLeftColor",themeKey:"palette"}),bT=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=W1(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:hp(t,r)});return hl(e,e.borderRadius,n)}return null};bT.propTypes={};bT.filterProps=["borderRadius"];yT(Vae,qae,Xae,Yae,Kae,Qae,Jae,Zae,ele,tle,bT);const xT=e=>{if(e.gap!==void 0&&e.gap!==null){const t=W1(e.theme,"spacing",8),n=r=>({gap:hp(t,r)});return hl(e,e.gap,n)}return null};xT.propTypes={};xT.filterProps=["gap"];const wT=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=W1(e.theme,"spacing",8),n=r=>({columnGap:hp(t,r)});return hl(e,e.columnGap,n)}return null};wT.propTypes={};wT.filterProps=["columnGap"];const _T=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=W1(e.theme,"spacing",8),n=r=>({rowGap:hp(t,r)});return hl(e,e.rowGap,n)}return null};_T.propTypes={};_T.filterProps=["rowGap"];const nle=Rn({prop:"gridColumn"}),rle=Rn({prop:"gridRow"}),ile=Rn({prop:"gridAutoFlow"}),ole=Rn({prop:"gridAutoColumns"}),sle=Rn({prop:"gridAutoRows"}),ale=Rn({prop:"gridTemplateColumns"}),lle=Rn({prop:"gridTemplateRows"}),cle=Rn({prop:"gridTemplateAreas"}),ule=Rn({prop:"gridArea"});yT(xT,wT,_T,nle,rle,ile,ole,sle,ale,lle,cle,ule);function Km(e,t){return t==="grey"?t:e}const dle=Rn({prop:"color",themeKey:"palette",transform:Km}),fle=Rn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Km}),hle=Rn({prop:"backgroundColor",themeKey:"palette",transform:Km});yT(dle,fle,hle);function Cs(e){return e<=1&&e!==0?`${e*100}%`:e}const ple=Rn({prop:"width",transform:Cs}),Y5=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])||G5[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:Cs(n)}};return hl(e,e.maxWidth,t)}return null};Y5.filterProps=["maxWidth"];const mle=Rn({prop:"minWidth",transform:Cs}),gle=Rn({prop:"height",transform:Cs}),vle=Rn({prop:"maxHeight",transform:Cs}),yle=Rn({prop:"minHeight",transform:Cs});Rn({prop:"size",cssProperty:"width",transform:Cs});Rn({prop:"size",cssProperty:"height",transform:Cs});const ble=Rn({prop:"boxSizing"});yT(ple,Y5,mle,gle,vle,yle,ble);const xle={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:bT},color:{themeKey:"palette",transform:Km},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Km},backgroundColor:{themeKey:"palette",transform:Km},p:{style:Nr},pt:{style:Nr},pr:{style:Nr},pb:{style:Nr},pl:{style:Nr},px:{style:Nr},py:{style:Nr},padding:{style:Nr},paddingTop:{style:Nr},paddingRight:{style:Nr},paddingBottom:{style:Nr},paddingLeft:{style:Nr},paddingX:{style:Nr},paddingY:{style:Nr},paddingInline:{style:Nr},paddingInlineStart:{style:Nr},paddingInlineEnd:{style:Nr},paddingBlock:{style:Nr},paddingBlockStart:{style:Nr},paddingBlockEnd:{style:Nr},m:{style:Lr},mt:{style:Lr},mr:{style:Lr},mb:{style:Lr},ml:{style:Lr},mx:{style:Lr},my:{style:Lr},margin:{style:Lr},marginTop:{style:Lr},marginRight:{style:Lr},marginBottom:{style:Lr},marginLeft:{style:Lr},marginX:{style:Lr},marginY:{style:Lr},marginInline:{style:Lr},marginInlineStart:{style:Lr},marginInlineEnd:{style:Lr},marginBlock:{style:Lr},marginBlockStart:{style:Lr},marginBlockEnd:{style:Lr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xT},rowGap:{style:_T},columnGap:{style:wT},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Cs},maxWidth:{style:Y5},minWidth:{transform:Cs},height:{transform:Cs},maxHeight:{transform:Cs},minHeight:{transform:Cs},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ST=xle;function wle(...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 _le(e,t){return typeof e=="function"?e(t):e}function Sle(){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=vT(i,d)||{};return h?h(s):hl(s,r,v=>{let y=sE(p,f,v);return v===y&&typeof v=="string"&&(y=sE(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:ST;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=dX(o.breakpoints),h=Object.keys(f);let p=f;return Object.keys(d).forEach(g=>{const v=_le(d[g],o);if(v!=null)if(typeof v=="object")if(s[g])p=tx(p,e(g,v,o,s));else{const y=hl({theme:o},v,S=>({[g]:S}));wle(y,v)?p[g]=t({sx:v,theme:o}):p=tx(p,y)}else p=tx(p,e(g,v,o,s))}),fX(h,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const pX=Sle();pX.filterProps=["sx"];const ET=pX,Ele=["breakpoints","palette","spacing","shape"];function CT(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Le(e,Ele),l=Dae(n),c=Gae(i);let d=Go({breakpoints:l,direction:"ltr",components:{},palette:F({mode:"light"},r),spacing:c,shape:F({},Nae,o)},s);return d=t.reduce((f,h)=>Go(f,h),d),d.unstable_sxConfig=F({},ST,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return ET({sx:h,theme:this})},d}function Cle(e){return Object.keys(e).length===0}function TT(e=null){const t=R.useContext(gT);return!t||Cle(t)?e:t}const Tle=CT();function AT(e=Tle){return TT(e)}function Ale({styles:e,themeId:t,defaultTheme:n={}}){const r=AT(n),i=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(Rae,{styles:i})}const kle=["sx"],Ile=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:ST;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function K5(e){const{sx:t}=e,n=Le(e,kle),{systemProps:r,otherProps:i}=Ile(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Wh(l)?F({},r,l):r}:o=F({},r,t),F({},i,{sx:o})}function mX(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"})(ET);return R.forwardRef(function(c,d){const f=AT(n),h=K5(c),{className:p,component:g="div"}=h,v=Le(h,Rle);return C.jsx(o,F({as:g,ref:d,className:je(p,i?i(r):r),theme:t&&f[t]||f},v))})}const Ole=["variant"];function j6(e){return e.length===0}function gX(e){const{variant:t}=e,n=Le(e,Ole);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=j6(r)?e[i]:Me(e[i]):r+=`${j6(r)?i:Me(i)}${Me(e[i].toString())}`}),r}const Mle=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Dle(e){return Object.keys(e).length===0}function Lle(e){return typeof e=="string"&&e.charCodeAt(0)>96}const Nle=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,Ble=(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=gX(i.props);r[o]=i.style}),r},Fle=(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[gX(c.props)])}),s};function nx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $le=CT(),zle=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Q0({defaultTheme:e,theme:t,themeId:n}){return Dle(t)?e:t[n]||t}function jle(e){return e?(t,n)=>n[e]:null}function vX(e={}){const{themeId:t,defaultTheme:n=$le,rootShouldForwardProp:r=nx,slotShouldForwardProp:i=nx}=e,o=s=>ET(F({},s,{theme:Q0(F({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{Pae(s,E=>E.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=jle(zle(d))}=l,g=Le(l,Mle),v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,y=h||!1;let S,_=nx;d==="Root"||d==="root"?_=r:d?_=i:Lle(s)&&(_=void 0);const b=uX(s,F({shouldForwardProp:_,label:S},g)),x=(E,...k)=>{const I=k?k.map(N=>typeof N=="function"&&N.__emotion_real!==N?H=>N(F({},H,{theme:Q0(F({},H,{defaultTheme:n,themeId:t}))})):N):[];let A=E;c&&p&&I.push(N=>{const H=Q0(F({},N,{defaultTheme:n,themeId:t})),W=Nle(c,H);if(W){const z={};return Object.entries(W).forEach(([D,$])=>{z[D]=typeof $=="function"?$(F({},N,{theme:H})):$}),p(N,z)}return null}),c&&!v&&I.push(N=>{const H=Q0(F({},N,{defaultTheme:n,themeId:t}));return Fle(N,Ble(c,H),H,c)}),y||I.push(o);const O=I.length-k.length;if(Array.isArray(E)&&O>0){const N=new Array(O).fill("");A=[...E,...N],A.raw=[...E.raw,...N]}else typeof E=="function"&&E.__emotion_real!==E&&(A=N=>E(F({},N,{theme:Q0(F({},N,{defaultTheme:n,themeId:t}))})));const L=b(A,...I);return s.muiName&&(L.muiName=s.muiName),L};return b.withConfig&&(x.withConfig=b.withConfig),x}}const Ule=vX(),Hle=Ule;function yX(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:L5(t.components[n].defaultProps,r)}function bX({props:e,name:t,defaultTheme:n,themeId:r}){let i=AT(n);return r&&(i=i[r]||i),yX({theme:i,name:t,props:e})}function Q5(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function Wle(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 pp(e){if(e.type)return e;if(e.charAt(0)==="#")return pp(Wle(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 kT(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 Gle(e){e=pp(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])),kT({type:l,values:c})}function xF(e){e=pp(e);let t=e.type==="hsl"||e.type==="hsla"?pp(Gle(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 wF(e,t){const n=xF(e),r=xF(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Sn(e,t){return e=pp(e),t=Q5(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,kT(e)}function ev(e,t){if(e=pp(e),t=Q5(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 kT(e)}function tv(e,t){if(e=pp(e),t=Q5(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 kT(e)}function Vle(e,t=.15){return xF(e)>.5?ev(e,t):tv(e,t)}const qle=R.createContext(null),xX=qle;function wX(){return R.useContext(xX)}const Xle=typeof Symbol=="function"&&Symbol.for,Yle=Xle?Symbol.for("mui.nested"):"__THEME_NESTED__";function Kle(e,t){return typeof t=="function"?t(e):F({},e,t)}function Qle(e){const{children:t,theme:n}=e,r=wX(),i=R.useMemo(()=>{const o=r===null?n:Kle(r,n);return o!=null&&(o[Yle]=r!==null),o},[n,r]);return C.jsx(xX.Provider,{value:i,children:t})}const U6={};function H6(e,t,n,r=!1){return R.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?F({},t,{[e]:o}):o;return r?()=>s:s}return e?F({},t,{[e]:n}):F({},t,n)},[e,t,n,r])}function Jle(e){const{children:t,theme:n,themeId:r}=e,i=TT(U6),o=wX()||U6,s=H6(r,i,n),l=H6(r,o,n,!0);return C.jsx(Qle,{theme:l,children:C.jsx(gT.Provider,{value:s,children:t})})}const Zle=["component","direction","spacing","divider","children","className","useFlexGap"],ece=CT(),tce=Hle("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function nce(e){return bX({props:e,name:"MuiStack",defaultTheme:ece})}function rce(e,t){const n=R.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],oce=({ownerState:e,theme:t})=>{let n=F({display:"flex",flexDirection:"column"},hl({theme:t},ID({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=X5(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=ID({values:e.direction,base:i}),s=ID({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=Go(n,hl({theme:t},s,(c,d)=>e.useFlexGap?{gap:hp(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ice(d?o[d]:e.direction)}`]:hp(r,c)}}))}return n=Bae(t.breakpoints,n),n};function sce(e={}){const{createStyledComponent:t=tce,useThemeProps:n=nce,componentName:r="MuiStack"}=e,i=()=>At({root:["root"]},c=>Et(r,c),{}),o=t(oce);return R.forwardRef(function(c,d){const f=n(c),h=K5(f),{component:p="div",direction:g="column",spacing:v=0,divider:y,children:S,className:_,useFlexGap:b=!1}=h,x=Le(h,Zle),E={direction:g,spacing:v,useFlexGap:b},k=i();return C.jsx(o,F({as:p,ownerState:E,ref:d,className:je(k.root,_)},x,{children:y?rce(S,y):S}))})}function ace(e,t){return F({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const lce=["mode","contrastThreshold","tonalOffset"],W6={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:mg.white,default:mg.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}},RD={text:{primary:mg.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:mg.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 G6(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=tv(e.main,i):t==="dark"&&(e.dark=ev(e.main,o)))}function cce(e="light"){return e==="dark"?{main:qu[200],light:qu[50],dark:qu[400]}:{main:qu[700],light:qu[400],dark:qu[800]}}function uce(e="light"){return e==="dark"?{main:Rh[200],light:Rh[50],dark:Rh[400]}:{main:Rh[500],light:Rh[300],dark:Rh[700]}}function dce(e="light"){return e==="dark"?{main:Vu[500],light:Vu[300],dark:Vu[700]}:{main:Vu[700],light:Vu[400],dark:Vu[800]}}function fce(e="light"){return e==="dark"?{main:Ph[400],light:Ph[300],dark:Ph[700]}:{main:Ph[700],light:Ph[500],dark:Ph[900]}}function hce(e="light"){return e==="dark"?{main:Xu[400],light:Xu[300],dark:Xu[700]}:{main:Xu[800],light:Xu[500],dark:Xu[900]}}function pce(e="light"){return e==="dark"?{main:Hh[400],light:Hh[300],dark:Hh[700]}:{main:"#ed6c02",light:Hh[500],dark:Hh[900]}}function mce(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Le(e,lce),o=e.primary||cce(t),s=e.secondary||uce(t),l=e.error||dce(t),c=e.info||fce(t),d=e.success||hce(t),f=e.warning||pce(t);function h(y){return wF(y,RD.text.primary)>=n?RD.text.primary:W6.text.primary}const p=({color:y,name:S,mainShade:_=500,lightShade:b=300,darkShade:x=700})=>{if(y=F({},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 G6(y,"light",b,r),G6(y,"dark",x,r),y.contrastText||(y.contrastText=h(y.main)),y},g={dark:RD,light:W6};return Go(F({common:F({},mg),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:O5,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r},g[t]),i)}const gce=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function vce(e){return Math.round(e*1e5)/1e5}const V6={textTransform:"uppercase"},q6='"Roboto", "Helvetica", "Arial", sans-serif';function yce(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=q6,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,gce),g=i/14,v=h||(_=>`${_/d*g}rem`),y=(_,b,x,E,k)=>F({fontFamily:r,fontWeight:_,fontSize:v(b),lineHeight:x},r===q6?{letterSpacing:`${vce(E/b)}em`}:{},k,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,V6),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,V6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Go(F({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},S),p,{clone:!1})}const bce=.2,xce=.14,wce=.12;function fr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${bce})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${xce})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${wce})`].join(",")}const _ce=["none",fr(0,2,1,-1,0,1,1,0,0,1,3,0),fr(0,3,1,-2,0,2,2,0,0,1,5,0),fr(0,3,3,-2,0,3,4,0,0,1,8,0),fr(0,2,4,-1,0,4,5,0,0,1,10,0),fr(0,3,5,-1,0,5,8,0,0,1,14,0),fr(0,3,5,-1,0,6,10,0,0,1,18,0),fr(0,4,5,-2,0,7,10,1,0,2,16,1),fr(0,5,5,-3,0,8,10,1,0,3,14,2),fr(0,5,6,-3,0,9,12,1,0,3,16,2),fr(0,6,6,-3,0,10,14,1,0,4,18,3),fr(0,6,7,-4,0,11,15,1,0,4,20,3),fr(0,7,8,-4,0,12,17,2,0,5,22,4),fr(0,7,8,-4,0,13,19,2,0,5,24,4),fr(0,7,9,-4,0,14,21,2,0,5,26,4),fr(0,8,9,-5,0,15,22,2,0,6,28,5),fr(0,8,10,-5,0,16,24,2,0,6,30,5),fr(0,8,11,-5,0,17,26,2,0,6,32,5),fr(0,9,11,-5,0,18,28,2,0,7,34,6),fr(0,9,12,-6,0,19,29,2,0,7,36,6),fr(0,10,13,-6,0,20,31,3,0,8,38,7),fr(0,10,13,-6,0,21,33,3,0,8,40,7),fr(0,10,14,-6,0,22,35,3,0,8,42,7),fr(0,11,14,-7,0,23,36,3,0,9,44,8),fr(0,11,15,-7,0,24,38,3,0,9,46,8)],Sce=_ce,Ece=["duration","easing","delay"],Cce={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)"},_X={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function X6(e){return`${Math.round(e)}ms`}function Tce(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Ace(e){const t=F({},Cce,e.easing),n=F({},_X,e.duration);return F({getAutoHeightDuration:Tce,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o;return Le(o,Ece),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:X6(s)} ${l} ${typeof c=="string"?c:X6(c)}`).join(",")}},e,{easing:t,duration:n})}const kce={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Ice=kce,Rce=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function J5(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Le(e,Rce);if(e.vars)throw new Error(Md(18));const l=mce(r),c=CT(e);let d=Go(c,{mixins:ace(c.breakpoints,n),palette:l,shadows:Sce.slice(),typography:yce(l,o),transitions:Ace(i),zIndex:F({},Ice)});return d=Go(d,s),d=t.reduce((f,h)=>Go(f,h),d),d.unstable_sxConfig=F({},ST,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return ET({sx:h,theme:this})},d}const Pce=J5(),IT=Pce;function Pn(){const e=AT(IT);return e[fp]||e}function It({props:e,name:t}){return bX({props:e,name:t,defaultTheme:IT,themeId:fp})}const xa=e=>nx(e)&&e!=="classes",Z5=nx,Oce=vX({themeId:fp,defaultTheme:IT,rootShouldForwardProp:xa}),Ee=Oce,Mce=["theme"];function Dce(e){let{theme:t}=e,n=Le(e,Mce);const r=t[fp];return C.jsx(Jle,F({},n,{themeId:r?fp:void 0,theme:r||t}))}const Lce=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},Y6=Lce;function Nce(e){return Et("MuiSvgIcon",e)}kt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Bce=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Fce=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Me(t)}`,`fontSize${Me(n)}`]};return At(i,Nce,r)},$ce=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]}}),SX=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:p="0 0 24 24"}=r,g=Le(r,Bce),v=R.isValidElement(i)&&i.type==="svg",y=F({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),S={};f||(S.viewBox=p);const _=Fce(y);return C.jsxs($ce,F({as:l,className:je(_.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]}))});SX.muiName="SvgIcon";const K6=SX;function Ft(e,t){function n(r,i){return C.jsx(K6,F({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=K6.muiName,R.memo(R.forwardRef(n))}var Hn={};/** + * @license React + * 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 e4=Symbol.for("react.element"),t4=Symbol.for("react.portal"),RT=Symbol.for("react.fragment"),PT=Symbol.for("react.strict_mode"),OT=Symbol.for("react.profiler"),MT=Symbol.for("react.provider"),DT=Symbol.for("react.context"),zce=Symbol.for("react.server_context"),LT=Symbol.for("react.forward_ref"),NT=Symbol.for("react.suspense"),BT=Symbol.for("react.suspense_list"),FT=Symbol.for("react.memo"),$T=Symbol.for("react.lazy"),jce=Symbol.for("react.offscreen"),EX;EX=Symbol.for("react.module.reference");function wa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case e4:switch(e=e.type,e){case RT:case OT:case PT:case NT:case BT:return e;default:switch(e=e&&e.$$typeof,e){case zce:case DT:case LT:case $T:case FT:case MT:return e;default:return t}}case t4:return t}}}Hn.ContextConsumer=DT;Hn.ContextProvider=MT;Hn.Element=e4;Hn.ForwardRef=LT;Hn.Fragment=RT;Hn.Lazy=$T;Hn.Memo=FT;Hn.Portal=t4;Hn.Profiler=OT;Hn.StrictMode=PT;Hn.Suspense=NT;Hn.SuspenseList=BT;Hn.isAsyncMode=function(){return!1};Hn.isConcurrentMode=function(){return!1};Hn.isContextConsumer=function(e){return wa(e)===DT};Hn.isContextProvider=function(e){return wa(e)===MT};Hn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===e4};Hn.isForwardRef=function(e){return wa(e)===LT};Hn.isFragment=function(e){return wa(e)===RT};Hn.isLazy=function(e){return wa(e)===$T};Hn.isMemo=function(e){return wa(e)===FT};Hn.isPortal=function(e){return wa(e)===t4};Hn.isProfiler=function(e){return wa(e)===OT};Hn.isStrictMode=function(e){return wa(e)===PT};Hn.isSuspense=function(e){return wa(e)===NT};Hn.isSuspenseList=function(e){return wa(e)===BT};Hn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===RT||e===OT||e===PT||e===NT||e===BT||e===jce||typeof e=="object"&&e!==null&&(e.$$typeof===$T||e.$$typeof===FT||e.$$typeof===MT||e.$$typeof===DT||e.$$typeof===LT||e.$$typeof===EX||e.getModuleId!==void 0)};Hn.typeOf=wa;function _F(e,t){return _F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_F(e,t)}function zT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_F(e,t)}var CX={exports:{}},Vs={},TX={exports:{}},AX={};/** + * @license React + * scheduler.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. + */(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(k);else{var K=n(d);K!==null&&V(E,K.startTime-G)}}function k(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 I=!1,A=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(k))),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}}}})(AX);TX.exports=AX;var Uce=TX.exports;/** + * @license React + * react-dom.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 kX=R,$s=Uce;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"),SF=Object.prototype.hasOwnProperty,Hce=/^[: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]*$/,Q6={},J6={};function Wce(e){return SF.call(J6,e)?!0:SF.call(Q6,e)?!1:Hce.test(e)?J6[e]=!0:(Q6[e]=!0,!1)}function Gce(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 Vce(e,t,n,r){if(t===null||typeof t>"u"||Gce(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 Mo(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 Yi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Yi[e]=new Mo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Yi[t]=new Mo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Yi[e]=new Mo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Yi[e]=new Mo(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){Yi[e]=new Mo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Yi[e]=new Mo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Yi[e]=new Mo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Yi[e]=new Mo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Yi[e]=new Mo(e,5,!1,e.toLowerCase(),null,!1,!1)});var n4=/[\-:]([a-z])/g;function r4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n4,r4);Yi[t]=new Mo(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(n4,r4);Yi[t]=new Mo(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(n4,r4);Yi[t]=new Mo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Yi[e]=new Mo(e,1,!1,e.toLowerCase(),null,!1,!1)});Yi.xlinkHref=new Mo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Yi[e]=new Mo(e,1,!1,e.toLowerCase(),null,!0,!0)});function i4(e,t,n,r){var i=Yi.hasOwnProperty(t)?Yi[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{OD=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Db(e):""}function qce(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=MD(e.type,!1),e;case 11:return e=MD(e.type.render,!1),e;case 1:return e=MD(e.type,!0),e;default:return""}}function AF(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 Cm:return"Fragment";case Em:return"Portal";case EF:return"Profiler";case o4:return"StrictMode";case CF:return"Suspense";case TF:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case PX:return(e.displayName||"Context")+".Consumer";case RX:return(e._context.displayName||"Context")+".Provider";case s4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case a4:return t=e.displayName||null,t!==null?t:AF(e.type)||"Memo";case Yu:t=e._payload,e=e._init;try{return AF(e(t))}catch{}}return null}function Xce(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 AF(t);case 8:return t===o4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dd(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 Yce(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 Lw(e){e._valueTracker||(e._valueTracker=Yce(e))}function DX(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 aE(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 kF(e,t){var n=t.checked;return Pr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eU(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function LX(e,t){t=t.checked,t!=null&&i4(e,"checked",t,!1)}function IF(e,t){LX(e,t);var n=Dd(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")?RF(e,t.type,n):t.hasOwnProperty("defaultValue")&&RF(e,t.type,Dd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tU(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 RF(e,t,n){(t!=="number"||aE(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Lb=Array.isArray;function Qm(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Nw.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fx(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},Kce=["Webkit","ms","Moz","O"];Object.keys(rx).forEach(function(e){Kce.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rx[t]=rx[e]})});function $X(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 zX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=$X(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Qce=Pr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function MF(e,t){if(t){if(Qce[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 DF(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 LF=null;function l4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var NF=null,Jm=null,Zm=null;function iU(e){if(e=q1(e)){if(typeof NF!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=GT(t),NF(e.stateNode,e.type,t))}}function jX(e){Jm?Zm?Zm.push(e):Zm=[e]:Jm=e}function UX(){if(Jm){var e=Jm,t=Zm;if(Zm=Jm=null,iU(e),t)for(e=0;e>>=0,e===0?32:31-(lue(e)/cue|0)|0}var Bw=64,Fw=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 dE(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 G1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sl(t),e[t]=n}function hue(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),hU=String.fromCharCode(32),pU=!1;function lY(e,t){switch(e){case"keyup":return jue.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tm=!1;function Hue(e,t){switch(e){case"compositionend":return cY(t);case"keypress":return t.which!==32?null:(pU=!0,hU);case"textInput":return e=t.data,e===hU&&pU?null:e;default:return null}}function Wue(e,t){if(Tm)return e==="compositionend"||!g4&&lY(e,t)?(e=sY(),SS=h4=ld=null,Tm=!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=yU(n)}}function hY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pY(){for(var e=window,t=aE();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=aE(e.document)}return t}function v4(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 Zue(e){var t=pY(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hY(n.ownerDocument.documentElement,n)){if(r!==null&&v4(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=bU(n,o);var s=bU(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,Am=null,UF=null,ax=null,HF=!1;function xU(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;HF||Am==null||Am!==aE(r)||(r=Am,"selectionStart"in r&&v4(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&&Wx(ax,r)||(ax=r,r=pE(UF,"onSelect"),0Rm||(e.current=YF[Rm],YF[Rm]=null,Rm--)}function tr(e,t){Rm++,YF[Rm]=e.current,e.current=t}var Ld={},oo=Xd(Ld),Vo=Xd(!1),mp=Ld;function yg(e,t){var n=e.type.contextTypes;if(!n)return Ld;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 qo(e){return e=e.childContextTypes,e!=null}function gE(){dr(Vo),dr(oo)}function AU(e,t,n){if(oo.current!==Ld)throw Error(Oe(168));tr(oo,t),tr(Vo,n)}function SY(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,Xce(e)||"Unknown",i));return Pr({},n,r)}function vE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ld,mp=oo.current,tr(oo,e),tr(Vo,Vo.current),!0}function kU(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=SY(e,t,mp),r.__reactInternalMemoizedMergedChildContext=e,dr(Vo),dr(oo),tr(oo,e)):dr(Vo),tr(Vo,n)}var su=null,VT=!1,qD=!1;function EY(e){su===null?su=[e]:su.push(e)}function dde(e){VT=!0,EY(e)}function Yd(){if(!qD&&su!==null){qD=!0;var e=0,t=Bn;try{var n=su;for(Bn=1;e>=s,i-=s,uu=1<<32-sl(t)+i|n<O?(L=A,A=null):L=A.sibling;var N=p(_,A,x[O],E);if(N===null){A===null&&(A=L);break}e&&A&&N.alternate===null&&t(_,A),b=o(N,b,O),I===null?k=N:I.sibling=N,I=N,A=L}if(O===x.length)return n(_,A),hr&&Oh(_,O),k;if(A===null){for(;OO?(L=A,A=null):L=A.sibling;var H=p(_,A,N.value,E);if(H===null){A===null&&(A=L);break}e&&A&&H.alternate===null&&t(_,A),b=o(H,b,O),I===null?k=H:I.sibling=H,I=H,A=L}if(N.done)return n(_,A),hr&&Oh(_,O),k;if(A===null){for(;!N.done;O++,N=x.next())N=h(_,N.value,E),N!==null&&(b=o(N,b,O),I===null?k=N:I.sibling=N,I=N);return hr&&Oh(_,O),k}for(A=r(_,A);!N.done;O++,N=x.next())N=g(A,_,O,N.value,E),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?O:N.key),b=o(N,b,O),I===null?k=N:I.sibling=N,I=N);return e&&A.forEach(function(W){return t(_,W)}),hr&&Oh(_,O),k}function S(_,b,x,E){if(typeof x=="object"&&x!==null&&x.type===Cm&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Dw:e:{for(var k=x.key,I=b;I!==null;){if(I.key===k){if(k=x.type,k===Cm){if(I.tag===7){n(_,I.sibling),b=i(I,x.props.children),b.return=_,_=b;break e}}else if(I.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Yu&&LU(k)===I.type){n(_,I.sibling),b=i(I,x.props),b.ref=rb(_,I,x),b.return=_,_=b;break e}n(_,I);break}else t(_,I);I=I.sibling}x.type===Cm?(b=np(x.props.children,_.mode,E,x.key),b.return=_,_=b):(E=PS(x.type,x.key,x.props,null,_.mode,E),E.ref=rb(_,b,x),E.return=_,_=E)}return s(_);case Em:e:{for(I=x.key;b!==null;){if(b.key===I)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(_,b.sibling),b=i(b,x.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=tL(x,_.mode,E),b.return=_,_=b}return s(_);case Yu:return I=x._init,S(_,b,I(x._payload),E)}if(Lb(x))return v(_,b,x,E);if(J0(x))return y(_,b,x,E);Gw(_,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=eL(x,_.mode,E),b.return=_,_=b),s(_)):n(_,b)}return S}var xg=OY(!0),MY=OY(!1),X1={},jl=Xd(X1),Xx=Xd(X1),Yx=Xd(X1);function Xh(e){if(e===X1)throw Error(Oe(174));return e}function T4(e,t){switch(tr(Yx,t),tr(Xx,e),tr(jl,X1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:OF(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=OF(t,e)}dr(jl),tr(jl,t)}function wg(){dr(jl),dr(Xx),dr(Yx)}function DY(e){Xh(Yx.current);var t=Xh(jl.current),n=OF(t,e.type);t!==n&&(tr(Xx,e),tr(jl,n))}function A4(e){Xx.current===e&&(dr(jl),dr(Xx))}var Tr=Xd(0);function SE(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 XD=[];function k4(){for(var e=0;en?n:4,e(!0);var r=YD.transition;YD.transition={};try{e(!1),t()}finally{Bn=n,YD.transition=r}}function KY(){return va().memoizedState}function mde(e,t,n){var r=Sd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},QY(e))JY(t,n);else if(n=kY(e,t,n,r),n!==null){var i=Ro();al(n,e,r,i),ZY(n,t,r)}}function gde(e,t,n){var r=Sd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(QY(e))JY(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,pl(l,s)){var c=t.interleaved;c===null?(i.next=i,E4(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=kY(e,t,i,r),n!==null&&(i=Ro(),al(n,e,r,i),ZY(n,t,r))}}function QY(e){var t=e.alternate;return e===Rr||t!==null&&t===Rr}function JY(e,t){lx=EE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ZY(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,u4(e,n)}}var CE={readContext:ga,useCallback:Ki,useContext:Ki,useEffect:Ki,useImperativeHandle:Ki,useInsertionEffect:Ki,useLayoutEffect:Ki,useMemo:Ki,useReducer:Ki,useRef:Ki,useState:Ki,useDebugValue:Ki,useDeferredValue:Ki,useTransition:Ki,useMutableSource:Ki,useSyncExternalStore:Ki,useId:Ki,unstable_isNewReconciler:!1},vde={readContext:ga,useCallback:function(e,t){return kl().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:BU,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,AS(4194308,4,GY.bind(null,t,e),n)},useLayoutEffect:function(e,t){return AS(4194308,4,e,t)},useInsertionEffect:function(e,t){return AS(4,2,e,t)},useMemo:function(e,t){var n=kl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kl();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=mde.bind(null,Rr,e),[r.memoizedState,e]},useRef:function(e){var t=kl();return e={current:e},t.memoizedState=e},useState:NU,useDebugValue:M4,useDeferredValue:function(e){return kl().memoizedState=e},useTransition:function(){var e=NU(!1),t=e[0];return e=pde.bind(null,e[1]),kl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rr,i=kl();if(hr){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),_i===null)throw Error(Oe(349));vp&30||BY(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,BU($Y.bind(null,r,o,e),[e]),r.flags|=2048,Jx(9,FY.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kl(),t=_i.identifierPrefix;if(hr){var n=du,r=uu;n=(r&~(1<<32-sl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Kx++,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[Ll]=t,e[qx]=r,lK(e,t,!1,!1),t.stateNode=e;e:{switch(s=DF(n,r),n){case"dialog":ur("cancel",e),ur("close",e),i=r;break;case"iframe":case"object":case"embed":ur("load",e),i=r;break;case"video":case"audio":for(i=0;iSg&&(t.flags|=128,r=!0,ib(o,!1),t.lanes=4194304)}else{if(!r)if(e=SE(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&&!hr)return Qi(t),null}else 2*Wr()-o.renderingStartTime>Sg&&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=Wr(),t.sibling=null,n=Tr.current,tr(Tr,r?n&1|2:n&1),t):(Qi(t),null);case 22:case 23:return $4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ss&1073741824&&(Qi(t),t.subtreeFlags&6&&(t.flags|=8192)):Qi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function Cde(e,t){switch(b4(t),t.tag){case 1:return qo(t.type)&&gE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wg(),dr(Vo),dr(oo),k4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return A4(t),null;case 13:if(dr(Tr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));bg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return dr(Tr),null;case 4:return wg(),null;case 10:return S4(t.type._context),null;case 22:case 23:return $4(),null;case 24:return null;default:return null}}var qw=!1,eo=!1,Tde=typeof WeakSet=="function"?WeakSet:Set,st=null;function Dm(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fr(e,t,r)}else n.current=null}function a$(e,t,n){try{n()}catch(r){Fr(e,t,r)}}var VU=!1;function Ade(e,t){if(WF=fE,e=pY(),v4(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(GF={focusedElem:e,selectionRange:n},fE=!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:qa(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){Fr(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return v=VU,VU=!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&&a$(t,n,o)}i=i.next}while(i!==r)}}function YT(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 l$(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 dK(e){var t=e.alternate;t!==null&&(e.alternate=null,dK(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ll],delete t[qx],delete t[XF],delete t[cde],delete t[ude])),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 fK(e){return e.tag===5||e.tag===3||e.tag===4}function qU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fK(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 c$(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=mE));else if(r!==4&&(e=e.child,e!==null))for(c$(e,t,n),e=e.sibling;e!==null;)c$(e,t,n),e=e.sibling}function u$(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(u$(e,t,n),e=e.sibling;e!==null;)u$(e,t,n),e=e.sibling}var $i=null,Ya=!1;function $u(e,t,n){for(n=n.child;n!==null;)hK(e,t,n),n=n.sibling}function hK(e,t,n){if(zl&&typeof zl.onCommitFiberUnmount=="function")try{zl.onCommitFiberUnmount(jT,n)}catch{}switch(n.tag){case 5:eo||Dm(n,t);case 6:var r=$i,i=Ya;$i=null,$u(e,t,n),$i=r,Ya=i,$i!==null&&(Ya?(e=$i,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$i.removeChild(n.stateNode));break;case 18:$i!==null&&(Ya?(e=$i,n=n.stateNode,e.nodeType===8?VD(e.parentNode,n):e.nodeType===1&&VD(e,n),Ux(e)):VD($i,n.stateNode));break;case 4:r=$i,i=Ya,$i=n.stateNode.containerInfo,Ya=!0,$u(e,t,n),$i=r,Ya=i;break;case 0:case 11:case 14:case 15:if(!eo&&(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)&&a$(n,t,s),i=i.next}while(i!==r)}$u(e,t,n);break;case 1:if(!eo&&(Dm(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Fr(n,t,l)}$u(e,t,n);break;case 21:$u(e,t,n);break;case 22:n.mode&1?(eo=(r=eo)||n.memoizedState!==null,$u(e,t,n),eo=r):$u(e,t,n);break;default:$u(e,t,n)}}function XU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tde),t.forEach(function(r){var i=Nde.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $a(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Wr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ide(r/1960))-r,10e?16:e,cd===null)var r=!1;else{if(e=cd,cd=null,kE=0,_n&6)throw Error(Oe(331));var i=_n;for(_n|=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;cWr()-B4?tp(e,0):N4|=n),Xo(e,t)}function wK(e,t){t===0&&(e.mode&1?(t=Fw,Fw<<=1,!(Fw&130023424)&&(Fw=4194304)):t=1);var n=Ro();e=_u(e,t),e!==null&&(G1(e,t,n),Xo(e,n))}function Lde(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wK(e,n)}function Nde(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),wK(e,n)}var _K;_K=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Vo.current)Uo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Uo=!1,Sde(e,t,n);Uo=!!(e.flags&131072)}else Uo=!1,hr&&t.flags&1048576&&CY(t,bE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kS(e,t),e=t.pendingProps;var i=yg(t,oo.current);tg(t,n),i=R4(null,t,r,e,i,n);var o=P4();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,qo(r)?(o=!0,vE(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C4(t),i.updater=qT,t.stateNode=i,i._reactInternals=t,e$(t,r,e,n),t=r$(null,t,r,!0,o,n)):(t.tag=0,hr&&o&&y4(t),Eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kS(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Fde(r),e=qa(r,e),i){case 0:t=n$(null,t,r,e,n);break e;case 1:t=HU(null,t,r,e,n);break e;case 11:t=jU(null,t,r,e,n);break e;case 14:t=UU(null,t,r,qa(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:qa(r,i),n$(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qa(r,i),HU(e,t,r,i,n);case 3:e:{if(oK(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,IY(e,t),_E(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=_g(Error(Oe(423)),t),t=WU(e,t,r,n,i);break e}else if(r!==i){i=_g(Error(Oe(424)),t),t=WU(e,t,r,n,i);break e}else for(ks=xd(t.stateNode.containerInfo.firstChild),Os=t,hr=!0,Qa=null,n=MY(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bg(),r===i){t=Su(e,t,n);break e}Eo(e,t,r,n)}t=t.child}return t;case 5:return DY(t),e===null&&QF(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,VF(r,i)?s=null:o!==null&&VF(r,o)&&(t.flags|=32),iK(e,t),Eo(e,t,s,n),t.child;case 6:return e===null&&QF(t),null;case 13:return sK(e,t,n);case 4:return T4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xg(t,null,r,n):Eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qa(r,i),jU(e,t,r,i,n);case 7:return Eo(e,t,t.pendingProps,n),t.child;case 8:return Eo(e,t,t.pendingProps.children,n),t.child;case 12:return Eo(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,tr(xE,r._currentValue),r._currentValue=s,o!==null)if(pl(o.value,s)){if(o.children===i.children&&!Vo.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=mu(-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),JF(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),JF(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}Eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,tg(t,n),i=ga(i),r=r(i),t.flags|=1,Eo(e,t,r,n),t.child;case 14:return r=t.type,i=qa(r,t.pendingProps),i=qa(r.type,i),UU(e,t,r,i,n);case 15:return nK(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qa(r,i),kS(e,t),t.tag=1,qo(r)?(e=!0,vE(t)):e=!1,tg(t,n),PY(t,r,i),e$(t,r,i,n),r$(null,t,r,!0,e,n);case 19:return aK(e,t,n);case 22:return rK(e,t,n)}throw Error(Oe(156,t.tag))};function SK(e,t){return YX(e,t)}function Bde(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 ia(e,t,n,r){return new Bde(e,t,n,r)}function j4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fde(e){if(typeof e=="function")return j4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===s4)return 11;if(e===a4)return 14}return 2}function Ed(e,t){var n=e.alternate;return n===null?(n=ia(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 PS(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")j4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Cm:return np(n.children,i,o,t);case o4:s=8,i|=8;break;case EF:return e=ia(12,n,t,i|2),e.elementType=EF,e.lanes=o,e;case CF:return e=ia(13,n,t,i),e.elementType=CF,e.lanes=o,e;case TF:return e=ia(19,n,t,i),e.elementType=TF,e.lanes=o,e;case OX:return QT(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RX:s=10;break e;case PX:s=9;break e;case s4:s=11;break e;case a4:s=14;break e;case Yu:s=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=ia(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function np(e,t,n,r){return e=ia(7,e,r,t),e.lanes=n,e}function QT(e,t,n,r){return e=ia(22,e,r,t),e.elementType=OX,e.lanes=n,e.stateNode={isHidden:!1},e}function eL(e,t,n){return e=ia(6,e,null,t),e.lanes=n,e}function tL(e,t,n){return t=ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $de(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=LD(0),this.expirationTimes=LD(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=LD(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function U4(e,t,n,r,i,o,s,l,c){return e=new $de(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ia(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 zde(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AK)}catch(e){console.error(e)}}AK(),CX.exports=Vs;var iv=CX.exports;const Nm=Ws(iv),n8={disabled:!1},PE=de.createContext(null);var Gde=function(t){return t.scrollTop},Fb="unmounted",Dh="exited",Lh="entering",dm="entered",m$="exiting",Pu=function(e){zT(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=dm:r.unmountOnExit||r.mountOnEnter?c=Fb:c=Dh,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Fb?{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!==dm&&(o=Lh):(s===Lh||s===dm)&&(o=m$)}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:Nm.findDOMNode(this);s&&Gde(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Dh&&this.setState({status:Fb})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[Nm.findDOMNode(this),l],d=c[0],f=c[1],h=this.getTimeouts(),p=l?h.appear:h.enter;if(!i&&!s||n8.disabled){this.safeSetState({status:dm},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:dm},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:Nm.findDOMNode(this);if(!o||n8.disabled){this.safeSetState({status:Dh},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:m$},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:Nm.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===Fb)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(PE.Provider,{value:null},typeof s=="function"?s(i,l):de.cloneElement(de.Children.only(s),l))},t}(de.Component);Pu.contextType=PE;Pu.propTypes={};function Zp(){}Pu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zp,onEntering:Zp,onEntered:Zp,onExit:Zp,onExiting:Zp,onExited:Zp};Pu.UNMOUNTED=Fb;Pu.EXITED=Dh;Pu.ENTERING=Lh;Pu.ENTERED=dm;Pu.EXITING=m$;const V4=Pu;function Vde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q4(e,t){var n=function(o){return t&&R.isValidElement(o)?t(o):o},r=Object.create(null);return e&&R.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function qde(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,l={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function Eg(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function Zde(e){return Et("MuiCollapse",e)}kt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const efe=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],tfe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return At(r,Zde,n)},nfe=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})=>F({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&F({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),rfe=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>F({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),ife=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>F({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),IK=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:l="0px",component:c,easing:d,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:v,onExited:y,onExiting:S,orientation:_="vertical",style:b,timeout:x=_X.standard,TransitionComponent:E=V4}=r,k=Le(r,efe),I=F({},r,{orientation:_,collapsedSize:l}),A=tfe(I),O=Pn(),L=R.useRef(),N=R.useRef(null),H=R.useRef(),W=typeof l=="number"?`${l}px`:l,z=_==="horizontal",D=z?"width":"height";R.useEffect(()=>()=>{clearTimeout(L.current)},[]);const $=R.useRef(null),j=gr(n,$),V=Q=>ae=>{if(Q){const le=$.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}=Eg({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}=Eg({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($.current,Q)};return C.jsx(E,F({in:f,onEnter:K,onEntered:J,onEntering:Y,onExit:ie,onExited:ce,onExiting:ue,addEndListener:se,nodeRef:$,timeout:x==="auto"?null:x},k,{children:(Q,ae)=>C.jsx(nfe,F({as:c,className:je(A.root,s,{entered:A.entered,exited:!f&&W==="0px"&&A.hidden}[Q]),style:F({[z?"minWidth":"minHeight"]:W},b),ownerState:F({},I,{state:Q}),ref:j},ae,{children:C.jsx(rfe,{ownerState:F({},I,{state:Q}),className:A.wrapper,ref:N,children:C.jsx(ife,{ownerState:F({},I,{state:Q}),className:A.wrapperInner,children:o})})}))}))});IK.muiSupportAuto=!0;const nL=IK;function ofe(e){return Et("MuiPaper",e)}kt("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 sfe=["className","component","elevation","square","variant"],afe=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return At(o,ofe,i)},lfe=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 F({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"&&F({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Sn("#fff",Y6(t.elevation))}, ${Sn("#fff",Y6(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),cfe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,d=Le(r,sfe),f=F({},r,{component:o,elevation:s,square:l,variant:c}),h=afe(f);return C.jsx(lfe,F({as:o,ownerState:f,className:je(h.root,i),ref:n},d))}),ov=cfe;function ufe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:d}=e,[f,h]=R.useState(!1),p=je(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=je(n.child,f&&n.childLeaving,r&&n.childPulsate);return!l&&!f&&h(!0),R.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 dfe=kt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Js=dfe,ffe=["center","classes","className"];let nA=e=>e,r8,i8,o8,s8;const g$=550,hfe=80,pfe=Vd(r8||(r8=nA` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),mfe=Vd(i8||(i8=nA` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),gfe=Vd(o8||(o8=nA` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),vfe=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),yfe=Ee(ufe,{name:"MuiTouchRipple",slot:"Ripple"})(s8||(s8=nA` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),Js.rippleVisible,pfe,g$,({theme:e})=>e.transitions.easing.easeInOut,Js.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Js.child,Js.childLeaving,mfe,g$,({theme:e})=>e.transitions.easing.easeInOut,Js.childPulsate,gfe,({theme:e})=>e.transitions.easing.easeInOut),bfe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,l=Le(r,ffe),[c,d]=R.useState([]),f=R.useRef(0),h=R.useRef(null);R.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const p=R.useRef(!1),g=R.useRef(0),v=R.useRef(null),y=R.useRef(null);R.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S=R.useCallback(E=>{const{pulsate:k,rippleX:I,rippleY:A,rippleSize:O,cb:L}=E;d(N=>[...N,C.jsx(yfe,{classes:{ripple:je(o.ripple,Js.ripple),rippleVisible:je(o.rippleVisible,Js.rippleVisible),ripplePulsate:je(o.ripplePulsate,Js.ripplePulsate),child:je(o.child,Js.child),childLeaving:je(o.childLeaving,Js.childLeaving),childPulsate:je(o.childPulsate,Js.childPulsate)},timeout:g$,pulsate:k,rippleX:I,rippleY:A,rippleSize:O},f.current)]),f.current+=1,h.current=L},[o]),_=R.useCallback((E={},k={},I=()=>{})=>{const{pulsate:A=!1,center:O=i||k.pulsate,fakeElement:L=!1}=k;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:$,clientY:j}=E.touches&&E.touches.length>0?E.touches[0]:E;W=Math.round($-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 $=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($**2+j**2)}E!=null&&E.touches?v.current===null&&(v.current=()=>{S({pulsate:A,rippleX:W,rippleY:z,rippleSize:D,cb:I})},g.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},hfe)):S({pulsate:A,rippleX:W,rippleY:z,rippleSize:D,cb:I})},[i,S]),b=R.useCallback(()=>{_({},{pulsate:!0})},[_]),x=R.useCallback((E,k)=>{if(clearTimeout(g.current),(E==null?void 0:E.type)==="touchend"&&v.current){v.current(),v.current=null,g.current=setTimeout(()=>{x(E,k)});return}v.current=null,d(I=>I.length>0?I.slice(1):I),h.current=k},[]);return R.useImperativeHandle(n,()=>({pulsate:b,start:_,stop:x}),[b,_,x]),C.jsx(vfe,F({className:je(Js.root,o.root,s),ref:y},l,{children:C.jsx(Jde,{component:null,exit:!0,children:c})}))}),xfe=bfe;function wfe(e){return Et("MuiButtonBase",e)}const _fe=kt("MuiButtonBase",["root","disabled","focusVisible"]),Sfe=_fe,Efe=["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"],Cfe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=At({root:["root",t&&"disabled",n&&"focusVisible"]},wfe,i);return n&&r&&(s.root+=` ${r}`),s},Tfe=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"},[`&.${Sfe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Afe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:p=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:S,onDragLeave:_,onFocus:b,onFocusVisible:x,onKeyDown:E,onKeyUp:k,onMouseDown:I,onMouseLeave:A,onMouseUp:O,onTouchEnd:L,onTouchMove:N,onTouchStart:H,tabIndex:W=0,TouchRippleProps:z,touchRippleRef:D,type:$}=r,j=Le(r,Efe),V=R.useRef(null),G=R.useRef(null),K=gr(G,D),{isFocusVisibleRef:Y,onFocus:J,onBlur:ie,ref:ce}=D5(),[ue,se]=R.useState(!1);d&&ue&&se(!1),R.useImperativeHandle(i,()=>({focusVisible:()=>{se(!0),V.current.focus()}}),[]);const[Q,ae]=R.useState(!1);R.useEffect(()=>{ae(!0)},[]);const le=Q&&!f&&!d;R.useEffect(()=>{ue&&p&&!f&&Q&&G.current.pulsate()},[f,p,ue,Q]);function he(Ne,Rt,ct=h){return ro(ke=>(Rt&&Rt(ke),!ct&&G.current&&G.current[Ne](ke),!0))}const pe=he("start",I),ve=he("stop",S),ye=he("stop",_),xe=he("stop",O),me=he("stop",Ne=>{ue&&Ne.preventDefault(),A&&A(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=ro(Ne=>{V.current||(V.current=Ne.currentTarget),J(Ne),Y.current===!0&&(se(!0),x&&x(Ne)),b&&b(Ne)}),Re=()=>{const Ne=V.current;return c&&c!=="button"&&!(Ne.tagName==="A"&&Ne.href)},$e=R.useRef(!1),it=ro(Ne=>{p&&!$e.current&&ue&&G.current&&Ne.key===" "&&($e.current=!0,G.current.stop(Ne,()=>{G.current.start(Ne)})),Ne.target===Ne.currentTarget&&Re()&&Ne.key===" "&&Ne.preventDefault(),E&&E(Ne),Ne.target===Ne.currentTarget&&Re()&&Ne.key==="Enter"&&!d&&(Ne.preventDefault(),y&&y(Ne))}),pt=ro(Ne=>{p&&Ne.key===" "&&G.current&&ue&&!Ne.defaultPrevented&&($e.current=!1,G.current.stop(Ne,()=>{G.current.pulsate(Ne)})),k&&k(Ne),y&&Ne.target===Ne.currentTarget&&Re()&&Ne.key===" "&&!Ne.defaultPrevented&&y(Ne)});let mt=c;mt==="button"&&(j.href||j.to)&&(mt=g);const _e={};mt==="button"?(_e.type=$===void 0?"button":$,_e.disabled=d):(!j.href&&!j.to&&(_e.role="button"),d&&(_e["aria-disabled"]=d));const ze=gr(n,ce,V),Ye=F({},r,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:p,tabIndex:W,focusVisible:ue}),Fe=Cfe(Ye);return C.jsxs(Tfe,F({as:mt,className:je(Fe.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:ze,tabIndex:d?-1:W,type:$},_e,j,{children:[s,le?C.jsx(xfe,F({ref:K,center:o},z)):null]}))}),Ou=Afe;function kfe(e){return Et("MuiIconButton",e)}const Ife=kt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Rfe=Ife,Pfe=["edge","children","className","color","disabled","disableFocusRipple","size"],Ofe=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 At(s,kfe,t)},Mfe=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})=>F({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})`:Sn(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 F({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&F({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":F({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Sn(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)},{[`&.${Rfe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Dfe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=r,h=Le(r,Pfe),p=F({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:f}),g=Ofe(p);return C.jsx(Mfe,F({className:je(g.root,s),centerRipple:!0,focusRipple:!d,disabled:c,ref:n,ownerState:p},h,{children:o}))}),xp=Dfe;function Lfe(e){return Et("MuiTypography",e)}kt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Nfe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Bfe=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 At(l,Lfe,s)},Ffe=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})=>F({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})),a8={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$fe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zfe=e=>$fe[e]||e,jfe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTypography"}),i=zfe(r.color),o=K5(F({},r,{color:i})),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=a8}=o,v=Le(o,Nfe),y=F({},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]||a8[p])||"span",_=Bfe(y);return C.jsx(Ffe,F({as:S,ref:n,ownerState:y,className:je(_.root,l)},v))}),jt=jfe;function Ufe(e){return Et("MuiAppBar",e)}kt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const Hfe=["className","color","enableColorOnDark","position"],Wfe=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${Me(t)}`,`position${Me(n)}`]};return At(i,Ufe,r)},Kw=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Gfe=Ee(ov,{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 F({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&&F({},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"&&F({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&F({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Kw(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Kw(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:Kw(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Kw(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"}))}),Vfe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Le(r,Hfe),d=F({},r,{color:o,position:l,enableColorOnDark:s}),f=Wfe(d);return C.jsx(Gfe,F({square:!0,component:"header",ownerState:d,elevation:4,className:je(f.root,i,l==="fixed"&&"mui-fixed"),ref:n},c))}),qfe=Vfe;function Ul(e){return typeof e=="string"}function $b(e,t,n){return e===void 0||Ul(e)?t:F({},t,{ownerState:F({},t.ownerState,n)})}function Xfe(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const Yfe={disableDefaultClasses:!1},Kfe=R.createContext(Yfe);function Qfe(e){const{disableDefaultClasses:t}=R.useContext(Kfe);return n=>t?"":e(n)}function OE(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 Jfe(e,t,n){return typeof e=="function"?e(t,n):e}function l8(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 Zfe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=je(i==null?void 0:i.className,r==null?void 0:r.className,o,n==null?void 0:n.className),v=F({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),y=F({},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=OE(F({},i,r)),l=l8(r),c=l8(i),d=t(s),f=je(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=F({},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=F({},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 ehe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Gr(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Le(e,ehe),l=o?{}:Jfe(r,i),{props:c,internalRef:d}=Zfe(F({},s,{externalSlotProps:l})),f=gr(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return $b(n,F({},c,{ref:f}),i)}function c8(e){return e.substring(2).toLowerCase()}function the(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=gr(t.ref,l),h=ro(v=>{const y=d.current;d.current=!1;const S=Ir(l.current);if(!c.current||!l.current||"clientX"in v&&the(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)),R.useEffect(()=>{if(o!==!1){const v=c8(o),y=Ir(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)),R.useEffect(()=>{if(r!==!1){const v=c8(r),y=Ir(l.current);return y.addEventListener(v,h),()=>{y.removeEventListener(v,h)}}},[h,r]),C.jsx(R.Fragment,{children:R.cloneElement(t,g)})}const rhe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ihe(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 ohe(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 she(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||ohe(e))}function ahe(e){const t=[],n=[];return Array.from(e.querySelectorAll(rhe)).forEach((r,i)=>{const o=ihe(r);o===-1||!she(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 lhe(){return!0}function che(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=ahe,isEnabled:s=lhe,open:l}=e,c=R.useRef(!1),d=R.useRef(null),f=R.useRef(null),h=R.useRef(null),p=R.useRef(null),g=R.useRef(!1),v=R.useRef(null),y=gr(t.ref,v),S=R.useRef(null);R.useEffect(()=>{!l||!v.current||(g.current=!n)},[n,l]),R.useEffect(()=>{if(!l||!v.current)return;const x=Ir(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]),R.useEffect(()=>{if(!l||!v.current)return;const x=Ir(v.current),E=A=>{S.current=A,!(r||!s()||A.key!=="Tab")&&x.activeElement===v.current&&A.shiftKey&&(c.current=!0,f.current&&f.current.focus())},k=()=>{const A=v.current;if(A===null)return;if(!x.hasFocus()||!s()||c.current){c.current=!1;return}if(A.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 A.focus()};x.addEventListener("focusin",k),x.addEventListener("keydown",E,!0);const I=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(I),x.removeEventListener("focusin",k),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(R.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),R.cloneElement(t,{ref:y,onFocus:_}),C.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:f,"data-testid":"sentinelEnd"})]})}var Yo="top",ya="bottom",ba="right",Ko="left",Y4="auto",Y1=[Yo,ya,ba,Ko],Cg="start",e1="end",uhe="clippingParents",RK="viewport",sb="popper",dhe="reference",u8=Y1.reduce(function(e,t){return e.concat([t+"-"+Cg,t+"-"+e1])},[]),PK=[].concat(Y1,[Y4]).reduce(function(e,t){return e.concat([t,t+"-"+Cg,t+"-"+e1])},[]),fhe="beforeRead",hhe="read",phe="afterRead",mhe="beforeMain",ghe="main",vhe="afterMain",yhe="beforeWrite",bhe="write",xhe="afterWrite",whe=[fhe,hhe,phe,mhe,ghe,vhe,yhe,bhe,xhe];function Ql(e){return e?(e.nodeName||"").toLowerCase():null}function zs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function wp(e){var t=zs(e).Element;return e instanceof t||e instanceof Element}function da(e){var t=zs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function K4(e){if(typeof ShadowRoot>"u")return!1;var t=zs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function _he(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];!da(o)||!Ql(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 She(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},{});!da(i)||!Ql(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ehe={name:"applyStyles",enabled:!0,phase:"write",fn:_he,effect:She,requires:["computeStyles"]};function Hl(e){return e.split("-")[0]}var rp=Math.max,ME=Math.min,Tg=Math.round;function v$(){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 OK(){return!/^((?!chrome|android).)*safari/i.test(v$())}function Ag(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&da(e)&&(i=e.offsetWidth>0&&Tg(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Tg(r.height)/e.offsetHeight||1);var s=wp(e)?zs(e):window,l=s.visualViewport,c=!OK()&&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 Q4(e){var t=Ag(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&&K4(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 zs(e).getComputedStyle(e)}function Che(e){return["table","td","th"].indexOf(Ql(e))>=0}function Kd(e){return((wp(e)?e.ownerDocument:e.document)||window.document).documentElement}function rA(e){return Ql(e)==="html"?e:e.assignedSlot||e.parentNode||(K4(e)?e.host:null)||Kd(e)}function d8(e){return!da(e)||Eu(e).position==="fixed"?null:e.offsetParent}function The(e){var t=/firefox/i.test(v$()),n=/Trident/i.test(v$());if(n&&da(e)){var r=Eu(e);if(r.position==="fixed")return null}var i=rA(e);for(K4(i)&&(i=i.host);da(i)&&["html","body"].indexOf(Ql(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 K1(e){for(var t=zs(e),n=d8(e);n&&Che(n)&&Eu(n).position==="static";)n=d8(n);return n&&(Ql(n)==="html"||Ql(n)==="body"&&Eu(n).position==="static")?t:n||The(e)||t}function J4(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fx(e,t,n){return rp(e,ME(t,n))}function Ahe(e,t,n){var r=fx(e,t,n);return r>n?n:r}function DK(){return{top:0,right:0,bottom:0,left:0}}function LK(e){return Object.assign({},DK(),e)}function NK(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var khe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,LK(typeof t!="number"?t:NK(t,Y1))};function Ihe(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=J4(l),d=[Ko,ba].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!s)){var h=khe(i.padding,n),p=Q4(o),g=c==="y"?Yo:Ko,v=c==="y"?ya:ba,y=n.rects.reference[f]+n.rects.reference[c]-s[c]-n.rects.popper[f],S=s[c]-n.rects.reference[c],_=K1(o),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,x=y/2-S/2,E=h[g],k=b-p[f]-h[v],I=b/2-p[f]/2+x,A=fx(E,I,k),O=c;n.modifiersData[r]=(t={},t[O]=A,t.centerOffset=A-I,t)}}function Rhe(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 Phe={name:"arrow",enabled:!0,phase:"main",fn:Ihe,effect:Rhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kg(e){return e.split("-")[1]}var Ohe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mhe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Tg(n*i)/i||0,y:Tg(r*i)/i||0}}function f8(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=Ko,E=Yo,k=window;if(d){var I=K1(n),A="clientHeight",O="clientWidth";if(I===zs(n)&&(I=Kd(n),Eu(I).position!=="static"&&l==="absolute"&&(A="scrollHeight",O="scrollWidth")),I=I,i===Yo||(i===Ko||i===ba)&&o===e1){E=ya;var L=h&&I===k&&k.visualViewport?k.visualViewport.height:I[A];y-=L-r.height,y*=c?1:-1}if(i===Ko||(i===Yo||i===ya)&&o===e1){x=ba;var N=h&&I===k&&k.visualViewport?k.visualViewport.width:I[O];g-=N-r.width,g*=c?1:-1}}var H=Object.assign({position:l},d&&Ohe),W=f===!0?Mhe({x:g,y},zs(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=(k.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 Dhe(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:kg(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,f8(Object.assign({},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,f8(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 Lhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dhe,data:{}};var Qw={passive:!0};function Nhe(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=zs(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,Qw)}),l&&c.addEventListener("resize",n.update,Qw),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Qw)}),l&&c.removeEventListener("resize",n.update,Qw)}}const Bhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nhe,data:{}};var Fhe={left:"right",right:"left",bottom:"top",top:"bottom"};function OS(e){return e.replace(/left|right|bottom|top/g,function(t){return Fhe[t]})}var $he={start:"end",end:"start"};function h8(e){return e.replace(/start|end/g,function(t){return $he[t]})}function Z4(e){var t=zs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function ez(e){return Ag(Kd(e)).left+Z4(e).scrollLeft}function zhe(e,t){var n=zs(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=OK();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+ez(e),y:c}}function jhe(e){var t,n=Kd(e),r=Z4(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+ez(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 tz(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(Ql(e))>=0?e.ownerDocument.body:da(e)&&tz(e)?e:BK(rA(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=zs(r),s=i?[o].concat(o.visualViewport||[],tz(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(hx(rA(s)))}function y$(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Uhe(e,t){var n=Ag(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 p8(e,t,n){return t===RK?y$(zhe(e,n)):wp(t)?Uhe(t,n):y$(jhe(Kd(e)))}function Hhe(e){var t=hx(rA(e)),n=["absolute","fixed"].indexOf(Eu(e).position)>=0,r=n&&da(e)?K1(e):e;return wp(r)?t.filter(function(i){return wp(i)&&MK(i,r)&&Ql(i)!=="body"}):[]}function Whe(e,t,n,r){var i=t==="clippingParents"?Hhe(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var f=p8(e,d,r);return c.top=rp(f.top,c.top),c.right=ME(f.right,c.right),c.bottom=ME(f.bottom,c.bottom),c.left=rp(f.left,c.left),c},p8(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 FK(e){var t=e.reference,n=e.element,r=e.placement,i=r?Hl(r):null,o=r?kg(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Yo:c={x:s,y:t.y-n.height};break;case ya:c={x:s,y:t.y+t.height};break;case ba:c={x:t.x+t.width,y:l};break;case Ko:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?J4(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case Cg:c[d]=c[d]-(t[f]/2-n[f]/2);break;case e1:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function t1(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?uhe:l,d=n.rootBoundary,f=d===void 0?RK: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,_=LK(typeof S!="number"?S:NK(S,Y1)),b=p===sb?dhe:sb,x=e.rects.popper,E=e.elements[v?b:p],k=Whe(wp(E)?E:E.contextElement||Kd(e.elements.popper),c,f,s),I=Ag(e.elements.reference),A=FK({reference:I,element:x,strategy:"absolute",placement:i}),O=y$(Object.assign({},x,A)),L=p===sb?O:I,N={top:k.top-L.top+_.top,bottom:L.bottom-k.bottom+_.bottom,left:k.left-L.left+_.left,right:L.right-k.right+_.right},H=e.modifiersData.offset;if(p===sb&&H){var W=H[i];Object.keys(N).forEach(function(z){var D=[ba,ya].indexOf(z)>=0?1:-1,$=[Yo,ya].indexOf(z)>=0?"y":"x";N[z]+=W[$]*D})}return N}function Ghe(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?PK:c,f=kg(r),h=f?l?u8:u8.filter(function(v){return kg(v)===f}):Y1,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]=t1(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 Vhe(e){if(Hl(e)===Y4)return[];var t=OS(e);return[h8(e),t,h8(t)]}function qhe(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?[OS(S)]:Vhe(S)),E=[S].concat(x).reduce(function(ue,se){return ue.concat(Hl(se)===Y4?Ghe(t,{placement:se,boundary:f,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:y}):se)},[]),k=t.rects.reference,I=t.rects.popper,A=new Map,O=!0,L=E[0],N=0;N=0,$=D?"width":"height",j=t1(t,{placement:H,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),V=D?z?ba:Ko:z?ya:Yo;k[$]>I[$]&&(V=OS(V));var G=OS(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}A.set(H,K)}if(O)for(var Y=v?3:1,J=function(se){var Q=E.find(function(ae){var le=A.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 Xhe={name:"flip",enabled:!0,phase:"main",fn:qhe,requiresIfExists:["offset"],data:{_skip:!1}};function m8(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 g8(e){return[Yo,ba,ya,Ko].some(function(t){return e[t]>=0})}function Yhe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=t1(t,{elementContext:"reference"}),l=t1(t,{altBoundary:!0}),c=m8(s,r),d=m8(l,i,o),f=g8(c),h=g8(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 Khe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yhe};function Qhe(e,t,n){var r=Hl(e),i=[Ko,Yo].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,[Ko,ba].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Jhe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=PK.reduce(function(f,h){return f[h]=Qhe(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 Zhe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jhe};function epe(e){var t=e.state,n=e.name;t.modifiersData[n]=FK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const tpe={name:"popperOffsets",enabled:!0,phase:"read",fn:epe,data:{}};function npe(e){return e==="x"?"y":"x"}function rpe(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=t1(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),_=Hl(t.placement),b=kg(t.placement),x=!b,E=J4(_),k=npe(E),I=t.modifiersData.popperOffsets,A=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(I){if(o){var z,D=E==="y"?Yo:Ko,$=E==="y"?ya:ba,j=E==="y"?"height":"width",V=I[E],G=V+S[D],K=V-S[$],Y=g?-O[j]/2:0,J=b===Cg?A[j]:O[j],ie=b===Cg?-O[j]:-A[j],ce=t.elements.arrow,ue=g&&ce?Q4(ce):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:DK(),Q=se[D],ae=se[$],le=fx(0,A[j],ue[j]),he=x?A[j]/2-Y-le-Q-N.mainAxis:J-le-Q-N.mainAxis,pe=x?-A[j]/2+Y+le+ae+N.mainAxis:ie+le+ae+N.mainAxis,ve=t.elements.arrow&&K1(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?ME(G,me):G,V,g?rp(K,be):K);I[E]=Qe,W[E]=Qe-V}if(l){var qe,at=E==="x"?Yo:Ko,Nt=E==="x"?ya:ba,Re=I[k],$e=k==="y"?"height":"width",it=Re+S[at],pt=Re-S[Nt],mt=[Yo,Ko].indexOf(_)!==-1,_e=(qe=H==null?void 0:H[k])!=null?qe:0,ze=mt?it:Re-A[$e]-O[$e]-_e+N.altAxis,Ye=mt?Re+A[$e]+O[$e]-_e-N.altAxis:pt,Fe=g&&mt?Ahe(ze,Re,Ye):fx(g?ze:it,Re,g?Ye:pt);I[k]=Fe,W[k]=Fe-Re}t.modifiersData[r]=W}}const ipe={name:"preventOverflow",enabled:!0,phase:"main",fn:rpe,requiresIfExists:["offset"]};function ope(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function spe(e){return e===zs(e)||!da(e)?Z4(e):ope(e)}function ape(e){var t=e.getBoundingClientRect(),n=Tg(t.width)/e.offsetWidth||1,r=Tg(t.height)/e.offsetHeight||1;return n!==1||r!==1}function lpe(e,t,n){n===void 0&&(n=!1);var r=da(t),i=da(t)&&ape(t),o=Kd(t),s=Ag(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Ql(t)!=="body"||tz(o))&&(l=spe(t)),da(t)?(c=Ag(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=ez(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function cpe(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 upe(e){var t=cpe(e);return whe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function dpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fpe(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 v8={placement:"bottom",modifiers:[],strategy:"absolute"};function y8(){for(var e=arguments.length,t=new Array(e),n=0;n{o||l(gpe(i)||document.body)},[i,o]),Po(()=>{if(s&&!o)return mF(n,s),()=>{mF(n,null)}},[n,s,o]),o){if(R.isValidElement(r)){const d={ref:c};return R.cloneElement(r,d)}return C.jsx(R.Fragment,{children:r})}return C.jsx(R.Fragment,{children:s&&iv.createPortal(r,s)})});function vpe(e){return Et("MuiPopper",e)}kt("MuiPopper",["root"]);const ype=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],bpe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function xpe(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 b$(e){return typeof e=="function"?e():e}function wpe(e){return e.nodeType!==void 0}const _pe=()=>At({root:["root"]},Qfe(vpe)),Spe={},Epe=R.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,ype),_=R.useRef(null),b=gr(_,n),x=R.useRef(null),E=gr(x,p),k=R.useRef(E);Po(()=>{k.current=E},[E]),R.useImperativeHandle(p,()=>x.current,[]);const I=xpe(f,s),[A,O]=R.useState(I),[L,N]=R.useState(b$(i));R.useEffect(()=>{x.current&&x.current.forceUpdate()}),R.useEffect(()=>{i&&N(b$(i))},[i]),Po(()=>{if(!L||!d)return;const $=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})=>{$(G)}}];c!=null&&(j=j.concat(c)),h&&h.modifiers!=null&&(j=j.concat(h.modifiers));const V=mpe(L,_.current,F({placement:I},h,{modifiers:j}));return k.current(V),()=>{V.destroy(),k.current(null)}},[L,l,c,d,h,I]);const H={placement:A};y!==null&&(H.TransitionProps=y);const W=_pe(),z=(r=v.root)!=null?r:"div",D=Gr({elementType:z,externalSlotProps:g.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:b},ownerState:t,className:W.root});return C.jsx(z,F({},D,{children:typeof o=="function"?o(H):o}))}),Cpe=R.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=Spe,popperRef:g,style:v,transition:y=!1,slotProps:S={},slots:_={}}=t,b=Le(t,bpe),[x,E]=R.useState(!0),k=()=>{E(!1)},I=()=>{E(!0)};if(!c&&!f&&(!y||x))return null;let A;if(o)A=o;else if(r){const N=b$(r);A=N&&wpe(N)?Ir(N).body:Ir(null).body}const O=!f&&c&&(!y||x)?"none":void 0,L=y?{in:f,onEnter:k,onExited:I}:void 0;return C.jsx($K,{disablePortal:l,container:A,children:C.jsx(Epe,F({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:F({position:"fixed",top:0,left:0,display:O},v),TransitionProps:L,children:i}))})});function Tpe(e){const t=Ir(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 b8(e){return parseInt(bu(e).getComputedStyle(e).paddingRight,10)||0}function Ape(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function x8(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Ape(s);l&&c&&px(s,i)})}function rL(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function kpe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Tpe(r)){const s=Hq(Ir(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${b8(r)+s}px`;const l=Ir(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${b8(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ir(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 Ipe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Rpe{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=Ipe(n);x8(n,t.mount,t.modalRef,i,!0);const o=rL(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=rL(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=kpe(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=rL(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),x8(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&px(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ppe(e){return typeof e=="function"?e():e}function Ope(e){return e?e.props.hasOwnProperty("in"):!1}const Mpe=new Rpe;function Dpe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Mpe,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:d,open:f,rootRef:h}=e,p=R.useRef({}),g=R.useRef(null),v=R.useRef(null),y=gr(v,h),[S,_]=R.useState(!f),b=Ope(c);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const E=()=>Ir(g.current),k=()=>(p.current.modalRef=v.current,p.current.mount=g.current,p.current),I=()=>{i.mount(k(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},A=ro(()=>{const j=Ppe(t)||E().body;i.add(k(),j),v.current&&I()}),O=R.useCallback(()=>i.isTopModal(k()),[i]),L=ro(j=>{g.current=j,j&&(f&&O()?I():v.current&&px(v.current,x))}),N=R.useCallback(()=>{i.remove(k(),x)},[x,i]);R.useEffect(()=>()=>{N()},[N]),R.useEffect(()=>{f?A():(!b||!o)&&N()},[f,N,b,o,A]);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=OE(e);delete V.onTransitionEnter,delete V.onTransitionExited;const G=F({},V,j);return F({role:"presentation"},G,{onKeyDown:H(G),ref:y})},getBackdropProps:(j={})=>{const V=j;return F({"aria-hidden":!0},V,{onClick:W(V),open:f})},getTransitionProps:()=>{const j=()=>{_(!1),s&&s()},V=()=>{_(!0),l&&l(),o&&N()};return{onEnter:w6(j,c==null?void 0:c.props.onEnter),onExited:w6(V,c==null?void 0:c.props.onExited)}},rootRef:y,portalRef:L,isTopModal:O,exited:S,hasTransition:b}}const Lpe=2;function zK(e,t){return e-t}function ab(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function w8(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}%`})}},zpe=e=>e;let t_;function iL(){return t_===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?t_=CSS.supports("touch-action","none"):t_=!0),t_}function jpe(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=zpe,step:y=1,tabIndex:S,value:_}=e,b=R.useRef(),[x,E]=R.useState(-1),[k,I]=R.useState(-1),[A,O]=R.useState(!1),L=R.useRef(0),[N,H]=Mx({controlled:_,default:n??c,name:"Slider"}),W=f&&((_e,ze,Ye)=>{const Fe=_e.nativeEvent||_e,Ne=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Ne,"target",{writable:!0,value:{value:ze,name:d}}),f(Ne,ze,Ye)}),z=Array.isArray(N);let D=z?N.slice().sort(zK):[N];D=D.map(_e=>ab(_e,c,l));const $=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((_e,ze)=>({value:c+y*ze})):s||[],j=$.map(_e=>_e.value),{isFocusVisibleRef:V,onBlur:G,onFocus:K,ref:Y}=D5(),[J,ie]=R.useState(-1),ce=R.useRef(),ue=gr(Y,ce),se=gr(g,ue),Q=_e=>ze=>{var Ye;const Fe=Number(ze.currentTarget.getAttribute("data-index"));K(ze),V.current===!0&&ie(Fe),I(Fe),_e==null||(Ye=_e.onFocus)==null||Ye.call(_e,ze)},ae=_e=>ze=>{var Ye;G(ze),V.current===!1&&ie(-1),I(-1),_e==null||(Ye=_e.onBlur)==null||Ye.call(_e,ze)};Po(()=>{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=>ze=>{var Ye;(Ye=_e.onChange)==null||Ye.call(_e,ze);const Fe=Number(ze.currentTarget.getAttribute("data-index")),Ne=D[Fe],Rt=j.indexOf(Ne);let ct=ze.target.valueAsNumber;if($&&y==null){const ke=j[j.length-1];ct>ke?ct=ke:ct{const{current:Ye}=ce,{width:Fe,height:Ne,bottom:Rt,left:ct}=Ye.getBoundingClientRect();let ke;pe.indexOf("vertical")===0?ke=(Rt-_e.y)/Ne:ke=(_e.x-ct)/Fe,pe.indexOf("-reverse")!==-1&&(ke=1-ke);let ot;if(ot=Npe(ke,c,l),y)ot=Fpe(ot,y,c);else{const Ie=w8(j,ot);ot=j[Ie]}ot=ab(ot,c,l);let $t=0;if(z){ze?$t=he.current:$t=w8(D,ot),i&&(ot=ab(ot,D[$t-1]||-1/0,D[$t+1]||1/0));const Ie=ot;ot=_8({values:D,newValue:ot,index:$t}),i&&ze||($t=ot.indexOf(Ie),he.current=$t)}return{newValue:ot,activeIndex:$t}},ye=ro(_e=>{const ze=Jw(_e,b);if(!ze)return;if(L.current+=1,_e.type==="mousemove"&&_e.buttons===0){xe(_e);return}const{newValue:Ye,activeIndex:Fe}=ve({finger:ze,move:!0});Zw({sliderRef:ce,activeIndex:Fe,setActive:E}),H(Ye),!A&&L.current>Lpe&&O(!0),W&&!e_(Ye,N)&&W(_e,Ye,Fe)}),xe=ro(_e=>{const ze=Jw(_e,b);if(O(!1),!ze)return;const{newValue:Ye}=ve({finger:ze,move:!0});E(-1),_e.type==="touchend"&&I(-1),h&&h(_e,Ye),b.current=void 0,be()}),me=ro(_e=>{if(r)return;iL()||_e.preventDefault();const ze=_e.changedTouches[0];ze!=null&&(b.current=ze.identifier);const Ye=Jw(_e,b);if(Ye!==!1){const{newValue:Ne,activeIndex:Rt}=ve({finger:Ye});Zw({sliderRef:ce,activeIndex:Rt,setActive:E}),H(Ne),W&&!e_(Ne,N)&&W(_e,Ne,Rt)}L.current=0;const Fe=Ir(ce.current);Fe.addEventListener("touchmove",ye),Fe.addEventListener("touchend",xe)}),be=R.useCallback(()=>{const _e=Ir(ce.current);_e.removeEventListener("mousemove",ye),_e.removeEventListener("mouseup",xe),_e.removeEventListener("touchmove",ye),_e.removeEventListener("touchend",xe)},[xe,ye]);R.useEffect(()=>{const{current:_e}=ce;return _e.addEventListener("touchstart",me,{passive:iL()}),()=>{_e.removeEventListener("touchstart",me,{passive:iL()}),be()}},[be,me]),R.useEffect(()=>{r&&be()},[r,be]);const Qe=_e=>ze=>{var Ye;if((Ye=_e.onMouseDown)==null||Ye.call(_e,ze),r||ze.defaultPrevented||ze.button!==0)return;ze.preventDefault();const Fe=Jw(ze,b);if(Fe!==!1){const{newValue:Rt,activeIndex:ct}=ve({finger:Fe});Zw({sliderRef:ce,activeIndex:ct,setActive:E}),H(Rt),W&&!e_(Rt,N)&&W(ze,Rt,ct)}L.current=0;const Ne=Ir(ce.current);Ne.addEventListener("mousemove",ye),Ne.addEventListener("mouseup",xe)},qe=DE(z?D[0]:c,c,l),at=DE(D[D.length-1],c,l)-qe,Nt=(_e={})=>{const ze={onMouseDown:Qe(_e||{})},Ye=F({},_e,ze);return F({ref:se},Ye)},Re=_e=>ze=>{var Ye;(Ye=_e.onMouseOver)==null||Ye.call(_e,ze);const Fe=Number(ze.currentTarget.getAttribute("data-index"));I(Fe)},$e=_e=>ze=>{var Ye;(Ye=_e.onMouseLeave)==null||Ye.call(_e,ze),I(-1)};return{active:x,axis:pe,axisProps:$pe,dragging:A,focusedThumbIndex:J,getHiddenInputProps:(_e={})=>{var ze;const Ye={onChange:le(_e||{}),onFocus:Q(_e||{}),onBlur:ae(_e||{})},Fe=F({},_e,Ye);return F({tabIndex:S,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":v(l),"aria-valuemin":v(c),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(ze=e.step)!=null?ze:void 0,disabled:r},Fe,{style:F({},bse,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Nt,getThumbProps:(_e={})=>{const ze={onMouseOver:Re(_e||{}),onMouseLeave:$e(_e||{})};return F({},_e,ze)},marks:$,open:k,range:z,rootRef:se,trackLeap:at,trackOffset:qe,values:D,getThumbStyle:_e=>({pointerEvents:x!==-1&&x!==_e?"none":void 0})}}function Upe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=R.useRef();R.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=ro((_,b)=>{r==null||r(_,b)}),c=ro(_=>{!r||_==null||(clearTimeout(s.current),s.current=setTimeout(()=>{l(null,"timeout")},_))});R.useEffect(()=>(i&&c(t),()=>{clearTimeout(s.current)}),[i,t,c]);const d=_=>{r==null||r(_,"clickaway")},f=()=>{clearTimeout(s.current)},h=R.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 R.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=F({},OE(e),OE(_));return F({role:"presentation"},_,b,{onBlur:p(b),onFocus:g(b),onMouseEnter:v(b),onMouseLeave:y(b)})},onClickAway:d}}const Hpe=["onChange","maxRows","minRows","style","value"];function n_(e){return parseInt(e,10)||0}const Wpe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function S8(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const Gpe=R.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:l}=t,c=Le(t,Hpe),{current:d}=R.useRef(l!=null),f=R.useRef(null),h=gr(n,f),p=R.useRef(null),g=R.useRef(0),[v,y]=R.useState({outerHeightStyle:0}),S=R.useCallback(()=>{const E=f.current,I=bu(E).getComputedStyle(E);if(I.width==="0px")return{outerHeightStyle:0};const A=p.current;A.style.width=I.width,A.value=E.value||t.placeholder||"x",A.value.slice(-1)===` +`&&(A.value+=" ");const O=I.boxSizing,L=n_(I.paddingBottom)+n_(I.paddingTop),N=n_(I.borderBottomWidth)+n_(I.borderTopWidth),H=A.scrollHeight;A.value="x";const W=A.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),$=Math.abs(z-H)<=1;return{outerHeightStyle:D,overflow:$}},[i,o,t.placeholder]),_=(E,k)=>{const{outerHeightStyle:I,overflow:A}=k;return g.current<20&&(I>0&&Math.abs((E.outerHeightStyle||0)-I)>1||E.overflow!==A)?(g.current+=1,{overflow:A,outerHeightStyle:I}):E},b=R.useCallback(()=>{const E=S();S8(E)||y(k=>_(k,E))},[S]);Po(()=>{const E=()=>{const H=S();S8(H)||iv.flushSync(()=>{y(W=>_(W,H))})},k=()=>{g.current=0,E()};let I;const A=tT(k),O=f.current,L=bu(O);L.addEventListener("resize",A);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(k),N.observe(O)),()=>{A.clear(),cancelAnimationFrame(I),L.removeEventListener("resize",A),N&&N.disconnect()}},[S]),Po(()=>{b()}),R.useEffect(()=>{g.current=0},[l]);const x=E=>{g.current=0,d||b(),r&&r(E)};return C.jsxs(R.Fragment,{children:[C.jsx("textarea",F({value:l,onChange:x,ref:h,rows:o,style:F({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:F({},Wpe.shadow,s,{paddingTop:0,paddingBottom:0})})]})}),Vpe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],qpe=Ee(Cpe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Xpe=R.forwardRef(function(t,n){var r;const i=TT(),o=It({props:t,name:"MuiPopper"}),{anchorEl:s,component:l,components:c,componentsProps:d,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b,slots:x,slotProps:E}=o,k=Le(o,Vpe),I=(r=x==null?void 0:x.root)!=null?r:c==null?void 0:c.Root,A=F({anchorEl:s,container:f,disablePortal:h,keepMounted:p,modifiers:g,open:v,placement:y,popperOptions:S,popperRef:_,transition:b},k);return C.jsx(qpe,F({as:l,direction:i==null?void 0:i.direction,slots:{root:I},slotProps:E??d},A,{ref:n}))}),jK=Xpe;function Ype(e){return Et("MuiListSubheader",e)}kt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Kpe=["className","color","component","disableGutters","disableSticky","inset"],Qpe=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 At(s,Ype,t)},Jpe=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})=>F({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})),UK=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:d=!1}=r,f=Le(r,Kpe),h=F({},r,{color:o,component:s,disableGutters:l,disableSticky:c,inset:d}),p=Qpe(h);return C.jsx(Jpe,F({as:s,className:je(p.root,i),ref:n,ownerState:h},f))});UK.muiSkipListHighlight=!0;const Zpe=UK;function Lp({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 eme=R.createContext(void 0),nz=eme;function Qd(){return R.useContext(nz)}function HK(e){return C.jsx(Ale,F({},e,{defaultTheme:IT,themeId:fp}))}function E8(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function LE(e,t=!1){return e&&(E8(e.value)&&e.value!==""||t&&E8(e.defaultValue)&&e.defaultValue!=="")}function tme(e){return e.startAdornment}function nme(e){return Et("MuiInputBase",e)}const rme=kt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Ig=rme,ime=["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"],iA=(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]},oA=(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]},ome=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 At(y,nme,t)},sA=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:iA})(({theme:e,ownerState:t})=>F({},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",[`&.${Ig.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&F({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),aA=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:oA})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=F({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 F({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] + .${Ig.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},[`&.${Ig.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"})}),sme=C.jsx(HK,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),ame=R.forwardRef(function(t,n){var r;const i=It({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:g,endAdornment:v,fullWidth:y=!1,id:S,inputComponent:_="input",inputProps:b={},inputRef:x,maxRows:E,minRows:k,multiline:I=!1,name:A,onBlur:O,onChange:L,onClick:N,onFocus:H,onKeyDown:W,onKeyUp:z,placeholder:D,readOnly:$,renderSuffix:j,rows:V,slotProps:G={},slots:K={},startAdornment:Y,type:J="text",value:ie}=i,ce=Le(i,ime),ue=b.value!=null?b.value:ie,{current:se}=R.useRef(ue!=null),Q=R.useRef(),ae=R.useCallback(Fe=>{},[]),le=gr(Q,x,b.ref,ae),[he,pe]=R.useState(!1),ve=Qd(),ye=Lp({props:i,muiFormControl:ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=ve?ve.focused:he,R.useEffect(()=>{!ve&&p&&he&&(pe(!1),O&&O())},[ve,p,he,O]);const xe=ve&&ve.onFilled,me=ve&&ve.onEmpty,be=R.useCallback(Fe=>{LE(Fe)?xe&&xe():me&&me()},[xe,me]);Po(()=>{se&&be({value:ue})},[ue,be,se]);const Qe=Fe=>{if(ye.disabled){Fe.stopPropagation();return}H&&H(Fe),b.onFocus&&b.onFocus(Fe),ve&&ve.onFocus?ve.onFocus(Fe):pe(!0)},qe=Fe=>{O&&O(Fe),b.onBlur&&b.onBlur(Fe),ve&&ve.onBlur?ve.onBlur(Fe):pe(!1)},at=(Fe,...Ne)=>{if(!se){const Rt=Fe.target||Q.current;if(Rt==null)throw new Error(Md(1));be({value:Rt.value})}b.onChange&&b.onChange(Fe,...Ne),L&&L(Fe,...Ne)};R.useEffect(()=>{be(Q.current)},[]);const Nt=Fe=>{Q.current&&Fe.currentTarget===Fe.target&&Q.current.focus(),N&&N(Fe)};let Re=_,$e=b;I&&Re==="input"&&(V?$e=F({type:void 0,minRows:V,maxRows:V},$e):$e=F({type:void 0,maxRows:E,minRows:k},$e),Re=Gpe);const it=Fe=>{be(Fe.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};R.useEffect(()=>{ve&&ve.setAdornedStart(!!Y)},[ve,Y]);const pt=F({},i,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:v,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:y,hiddenLabel:ye.hiddenLabel,multiline:I,size:ye.size,startAdornment:Y,type:J}),mt=ome(pt),_e=K.root||d.Root||sA,ze=G.root||f.root||{},Ye=K.input||d.Input||aA;return $e=F({},$e,(r=G.input)!=null?r:f.input),C.jsxs(R.Fragment,{children:[!g&&sme,C.jsxs(_e,F({},ze,!Ul(_e)&&{ownerState:F({},pt,ze.ownerState)},{ref:n,onClick:Nt},ce,{className:je(mt.root,ze.className,c,$&&"MuiInputBase-readOnly"),children:[Y,C.jsx(nz.Provider,{value:null,children:C.jsx(Ye,F({ownerState:pt,"aria-invalid":ye.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:h,disabled:ye.disabled,id:S,onAnimationStart:it,name:A,placeholder:D,readOnly:$,required:ye.required,rows:V,value:ue,onKeyDown:W,onKeyUp:z,type:J},$e,!Ul(Ye)&&{as:Re,ownerState:F({},pt,$e.ownerState)},{ref:le,className:je(mt.input,$e.className,$&&"MuiInputBase-readOnly"),onBlur:qe,onChange:at,onFocus:Qe}))}),v,j?j(F({},ye,{startAdornment:Y})):null]}))]})}),lA=ame;function lme(e){return Et("MuiInput",e)}const cme=F({},Ig,kt("MuiInput",["root","underline","input"])),lb=cme;function ume(e){return Et("MuiOutlinedInput",e)}const dme=F({},Ig,kt("MuiOutlinedInput",["root","notchedOutline","input"])),zu=dme;function fme(e){return Et("MuiFilledInput",e)}const hme=F({},Ig,kt("MuiFilledInput",["root","underline","input"])),_h=hme,pme=Ft(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),mme=Ft(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 gme(e){return Et("MuiAvatar",e)}kt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const vme=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],yme=e=>{const{classes:t,variant:n,colorDefault:r}=e;return At({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},gme,t)},bme=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})=>F({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&&F({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]}))),xme=Ee("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),wme=Ee(mme,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function _me({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=R.useState(!1);return R.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 Sme=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:l="div",imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=Le(r,vme);let v=null;const y=_me(F({},c,{src:f,srcSet:h})),S=f||h,_=S&&y!=="error",b=F({},r,{colorDefault:!_,component:l,variant:p}),x=yme(b);return _?v=C.jsx(xme,F({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(wme,{ownerState:b,className:x.fallback}),C.jsx(bme,F({as:l,ownerState:b,className:je(x.root,s),ref:n},g,{children:v}))}),Eme=Sme,Cme=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Tme={entering:{opacity:1},entered:{opacity:1}},Ame=R.forwardRef(function(t,n){const r=Pn(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:d,onEnter:f,onEntered:h,onEntering:p,onExit:g,onExited:v,onExiting:y,style:S,timeout:_=i,TransitionComponent:b=V4}=t,x=Le(t,Cme),E=R.useRef(null),k=gr(E,l.ref,n),I=D=>$=>{if(D){const j=E.current;$===void 0?D(j):D(j,$)}},A=I(p),O=I((D,$)=>{kK(D);const j=Eg({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,$)}),L=I(h),N=I(y),H=I(D=>{const $=Eg({style:S,timeout:_,easing:c},{mode:"exit"});D.style.webkitTransition=r.transitions.create("opacity",$),D.style.transition=r.transitions.create("opacity",$),g&&g(D)}),W=I(v),z=D=>{o&&o(E.current,D)};return C.jsx(b,F({appear:s,in:d,nodeRef:E,onEnter:O,onEntered:L,onEntering:A,onExit:H,onExited:W,onExiting:N,addEndListener:z,timeout:_},x,{children:(D,$)=>R.cloneElement(l,F({style:F({opacity:0,visibility:D==="exited"&&!d?"hidden":void 0},Tme[D],S,l.props.style),ref:k},$))}))}),_p=Ame;function kme(e){return Et("MuiBackdrop",e)}kt("MuiBackdrop",["root","invisible"]);const Ime=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Rme=e=>{const{classes:t,invisible:n}=e;return At({root:["root",n&&"invisible"]},kme,t)},Pme=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>F({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"})),Ome=R.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:f={},componentsProps:h={},invisible:p=!1,open:g,slotProps:v={},slots:y={},TransitionComponent:S=_p,transitionDuration:_}=s,b=Le(s,Ime),x=F({},s,{component:d,invisible:p}),E=Rme(x),k=(r=v.root)!=null?r:h.root;return C.jsx(S,F({in:g,timeout:_},b,{children:C.jsx(Pme,F({"aria-hidden":!0},k,{as:(i=(o=y.root)!=null?o:f.Root)!=null?i:d,className:je(E.root,c,k==null?void 0:k.className),ownerState:F({},x,k==null?void 0:k.ownerState),classes:E,ref:n,children:l}))}))}),cA=Ome,Mme=J5(),Dme=Ple({themeId:fp,defaultTheme:Mme,defaultClassName:"MuiBox-root",generateClassName:Gq.generate}),dt=Dme;function Lme(e){return Et("MuiButton",e)}const Nme=kt("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"]),r_=Nme,Bme=R.createContext({}),Fme=Bme,$me=R.createContext(void 0),zme=$me,jme=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Ume=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=At(l,Lme,s);return F({},s,c)},WK=e=>F({},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}}),Hme=Ee(Ou,{shouldForwardProp:e=>xa(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 F({},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":F({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Sn(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})`:Sn(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})`:Sn(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":F({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${r_.focusVisible}`]:F({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${r_.disabled}`]:F({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 ${Sn(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"},[`&.${r_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${r_.disabled}`]:{boxShadow:"none"}}),Wme=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>F({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},WK(e))),Gme=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Me(n.size)}`]]}})(({ownerState:e})=>F({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},WK(e))),Vme=R.forwardRef(function(t,n){const r=R.useContext(Fme),i=R.useContext(zme),o=L5(r,t),s=It({props:o,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:f,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:S=!1,size:_="medium",startIcon:b,type:x,variant:E="text"}=s,k=Le(s,jme),I=F({},s,{color:c,component:d,disabled:h,disableElevation:p,disableFocusRipple:g,fullWidth:S,size:_,type:x,variant:E}),A=Ume(I),O=b&&C.jsx(Wme,{className:A.startIcon,ownerState:I,children:b}),L=v&&C.jsx(Gme,{className:A.endIcon,ownerState:I,children:v}),N=i||"";return C.jsxs(Hme,F({ownerState:I,className:je(r.className,A.root,f,N),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:je(A.focusVisible,y),ref:n,type:x},k,{classes:A,children:[O,l,L]}))}),rz=Vme;function qme(e){return Et("MuiCard",e)}kt("MuiCard",["root"]);const Xme=["className","raised"],Yme=e=>{const{classes:t}=e;return At({root:["root"]},qme,t)},Kme=Ee(ov,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Qme=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Le(r,Xme),l=F({},r,{raised:o}),c=Yme(l);return C.jsx(Kme,F({className:je(c.root,i),elevation:o?8:void 0,ref:n,ownerState:l},s))}),Jme=Qme;function Zme(e){return Et("PrivateSwitchBase",e)}kt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const ege=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],tge=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 At(o,Zme,t)},nge=Ee(Ou)(({ownerState:e})=>F({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),rge=Ee("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ige=R.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:k,type:I,value:A}=t,O=Le(t,ege),[L,N]=Mx({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 $=c;H&&typeof $>"u"&&($=H.disabled);const j=I==="checkbox"||I==="radio",V=F({},t,{checked:L,disabled:$,disableFocusRipple:d,edge:f}),G=tge(V);return C.jsxs(nge,F({component:"span",className:je(G.root,s),centerRipple:!0,focusRipple:!d,disabled:$,tabIndex:null,role:void 0,onFocus:W,onBlur:z,ownerState:V,ref:n},O,{children:[C.jsx(rge,F({autoFocus:r,checked:i,defaultChecked:l,className:G.input,disabled:$,id:j?p:void 0,name:y,onChange:D,readOnly:x,ref:v,required:E,ownerState:V,tabIndex:k,type:I},I==="checkbox"&&A===void 0?{}:{value:A},g)),L?o:h]}))}),GK=ige,oge=Ft(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"),sge=Ft(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"),age=Ft(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 lge(e){return Et("MuiCheckbox",e)}const cge=kt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),oL=cge,uge=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],dge=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${Me(r)}`,`size${Me(i)}`]},s=At(o,lge,t);return F({},t,s)},fge=Ee(GK,{shouldForwardProp:e=>xa(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})=>F({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})`:Sn(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${oL.checked}, &.${oL.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${oL.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),hge=C.jsx(sge,{}),pge=C.jsx(oge,{}),mge=C.jsx(age,{}),gge=R.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiCheckbox"}),{checkedIcon:s=hge,color:l="primary",icon:c=pge,indeterminate:d=!1,indeterminateIcon:f=mge,inputProps:h,size:p="medium",className:g}=o,v=Le(o,uge),y=d?f:c,S=d?f:s,_=F({},o,{color:l,indeterminate:d,size:p}),b=dge(_);return C.jsx(fge,F({type:"checkbox",inputProps:F({"data-indeterminate":d},h),icon:R.cloneElement(y,{fontSize:(r=y.props.fontSize)!=null?r:p}),checkedIcon:R.cloneElement(S,{fontSize:(i=S.props.fontSize)!=null?i:p}),ownerState:_,ref:n,className:je(b.root,g)},v,{classes:b}))}),vge=gge;function yge(e){return Et("MuiCircularProgress",e)}kt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const bge=["className","color","disableShrink","size","style","thickness","value","variant"];let uA=e=>e,C8,T8,A8,k8;const ju=44,xge=Vd(C8||(C8=uA` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),wge=Vd(T8||(T8=uA` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),_ge=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 At(o,yge,t)},Sge=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})=>F({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"&&Zg(A8||(A8=uA` + animation: ${0} 1.4s linear infinite; + `),xge)),Ege=Ee("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Cge=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})=>F({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&&Zg(k8||(k8=uA` + animation: ${0} 1.4s ease-in-out infinite; + `),wge)),Tge=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:h="indeterminate"}=r,p=Le(r,bge),g=F({},r,{color:o,disableShrink:s,size:l,thickness:d,value:f,variant:h}),v=_ge(g),y={},S={},_={};if(h==="determinate"){const b=2*Math.PI*((ju-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(Sge,F({className:je(v.root,i),style:F({width:l,height:l},S,c),ownerState:g,ref:n,role:"progressbar"},_,p,{children:C.jsx(Ege,{className:v.svg,ownerState:g,viewBox:`${ju/2} ${ju/2} ${ju} ${ju}`,children:C.jsx(Cge,{className:v.circle,style:y,ownerState:g,cx:ju,cy:ju,r:(ju-d)/2,fill:"none",strokeWidth:d})})}))}),Q1=Tge,Age=(e,t)=>F({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),kge=e=>F({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}}),Ige=(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=F({html:Age(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:F({margin:0},kge(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 Rge(e){const t=It({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return C.jsxs(R.Fragment,{children:[C.jsx(HK,{styles:i=>Ige(i,r)}),n]})}function Pge(e){return Et("MuiModal",e)}kt("MuiModal",["root","hidden","backdrop"]);const Oge=["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"],Mge=e=>{const{open:t,exited:n,classes:r}=e;return At({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Pge,r)},Dge=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})=>F({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Lge=Ee(cA,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Nge=R.forwardRef(function(t,n){var r,i,o,s,l,c;const d=It({name:"MuiModal",props:t}),{BackdropComponent:f=Lge,BackdropProps:h,className:p,closeAfterTransition:g=!1,children:v,container:y,component:S,components:_={},componentsProps:b={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:k=!1,disablePortal:I=!1,disableRestoreFocus:A=!1,disableScrollLock:O=!1,hideBackdrop:L=!1,keepMounted:N=!1,onBackdropClick:H,open:W,slotProps:z,slots:D}=d,$=Le(d,Oge),j=F({},d,{closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:k,disablePortal:I,disableRestoreFocus:A,disableScrollLock:O,hideBackdrop:L,keepMounted:N}),{getRootProps:V,getBackdropProps:G,getTransitionProps:K,portalRef:Y,isTopModal:J,exited:ie,hasTransition:ce}=Dpe(F({},j,{rootRef:n})),ue=F({},j,{exited:ie}),se=Mge(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:Dge,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=Gr({elementType:ae,externalSlotProps:he,externalForwardedProps:$,getSlotProps:V,additionalProps:{ref:n,as:S},ownerState:ue,className:je(p,he==null?void 0:he.className,se==null?void 0:se.root,!ue.open&&ue.exited&&(se==null?void 0:se.hidden))}),ye=Gr({elementType:le,externalSlotProps:pe,additionalProps:h,getSlotProps:xe=>G(F({},xe,{onClick:me=>{H&&H(me),xe!=null&&xe.onClick&&xe.onClick(me)}})),className:je(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($K,{ref:Y,container:y,disablePortal:I,children:C.jsxs(ae,F({},ve,{children:[!L&&f?C.jsx(le,F({},ye)):null,C.jsx(che,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:A,isEnabled:J,open:W,children:R.cloneElement(v,Q)})]}))})}),VK=Nge;function Bge(e){return Et("MuiDialog",e)}const Fge=kt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),sL=Fge,$ge=R.createContext({}),zge=$ge,jge=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Uge=Ee(cA,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Hge=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 At(s,Bge,t)},Wge=Ee(VK,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Gge=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Me(n.scroll)}`]]}})(({ownerState:e})=>F({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"}})),Vge=Ee(ov,{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})=>F({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)`,[`&.${sL.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}`,[`&.${sL.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,[`&.${sL.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),qge=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiDialog"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:S,onClose:_,open:b,PaperComponent:x=ov,PaperProps:E={},scroll:k="paper",TransitionComponent:I=_p,transitionDuration:A=o,TransitionProps:O}=r,L=Le(r,jge),N=F({},r,{disableEscapeKeyDown:p,fullScreen:g,fullWidth:v,maxWidth:y,scroll:k}),H=Hge(N),W=R.useRef(),z=V=>{W.current=V.target===V.currentTarget},D=V=>{W.current&&(W.current=null,S&&S(V),_&&_(V,"backdropClick"))},$=M5(l),j=R.useMemo(()=>({titleId:$}),[$]);return C.jsx(Wge,F({className:je(H.root,h),closeAfterTransition:!0,components:{Backdrop:Uge},componentsProps:{backdrop:F({transitionDuration:A,as:c},d)},disableEscapeKeyDown:p,onClose:_,open:b,ref:n,onClick:D,ownerState:N},L,{children:C.jsx(I,F({appear:!0,in:b,timeout:A,role:"presentation"},O,{children:C.jsx(Gge,{className:je(H.container),onMouseDown:z,ownerState:N,children:C.jsx(Vge,F({as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":$},E,{className:je(H.paper,E.className),ownerState:N,children:C.jsx(zge.Provider,{value:j,children:f})}))})}))}))}),Xge=qge;function Yge(e){return Et("MuiDivider",e)}const Kge=kt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),I8=Kge,Qge=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Jge=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:l,variant:c}=e;return At({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"]},Yge,r)},Zge=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})=>F({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)`:Sn(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})=>F({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>F({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>F({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>F({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),eve=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})=>F({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)`})),qK=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:l=o?"div":"hr",flexItem:c=!1,light:d=!1,orientation:f="horizontal",role:h=l!=="hr"?"separator":void 0,textAlign:p="center",variant:g="fullWidth"}=r,v=Le(r,Qge),y=F({},r,{absolute:i,component:l,flexItem:c,light:d,orientation:f,role:h,textAlign:p,variant:g}),S=Jge(y);return C.jsx(Zge,F({as:l,className:je(S.root,s),role:h,ref:n,ownerState:y},v,{children:o?C.jsx(eve,{className:S.wrapper,ownerState:y,children:o}):null}))});qK.muiSkipListHighlight=!0;const Mu=qK,tve=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],nve=e=>{const{classes:t,disableUnderline:n}=e,i=At({root:["root",!n&&"underline"],input:["input"]},fme,t);return F({},t,i)},rve=Ee(sA,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...iA(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 F({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&&F({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),ive=Ee(aA,{name:"MuiFilledInput",slot:"Input",overridesResolver:oA})(({theme:e,ownerState:t})=>F({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})),XK=R.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:h="input",multiline:p=!1,slotProps:g,slots:v={},type:y="text"}=l,S=Le(l,tve),_=F({},l,{fullWidth:f,inputComponent:h,multiline:p,type:y}),b=nve(l),x={root:{ownerState:_},input:{ownerState:_}},E=g??d?Go(g??d,x):x,k=(r=(i=v.root)!=null?i:c.Root)!=null?r:rve,I=(o=(s=v.input)!=null?s:c.Input)!=null?o:ive;return C.jsx(lA,F({slots:{root:k,input:I},componentsProps:E,fullWidth:f,inputComponent:h,multiline:p,ref:n,type:y},S,{classes:b}))});XK.muiName="Input";const YK=XK;function ove(e){return Et("MuiFormControl",e)}kt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const sve=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ave=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${Me(n)}`,r&&"fullWidth"]};return At(i,ove,t)},lve=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>F({},t.root,t[`margin${Me(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>F({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%"})),cve=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:h=!1,hiddenLabel:p=!1,margin:g="none",required:v=!1,size:y="medium",variant:S="outlined"}=r,_=Le(r,sve),b=F({},r,{color:s,component:l,disabled:c,error:d,fullWidth:h,hiddenLabel:p,margin:g,required:v,size:y,variant:S}),x=ave(b),[E,k]=R.useState(()=>{let z=!1;return i&&R.Children.forEach(i,D=>{if(!yS(D,["Input","Select"]))return;const $=yS(D,["Select"])?D.props.input:D;$&&tme($.props)&&(z=!0)}),z}),[I,A]=R.useState(()=>{let z=!1;return i&&R.Children.forEach(i,D=>{yS(D,["Input","Select"])&&(LE(D.props,!0)||LE(D.props.inputProps,!0))&&(z=!0)}),z}),[O,L]=R.useState(!1);c&&O&&L(!1);const N=f!==void 0&&!c?f:O;let H;const W=R.useMemo(()=>({adornedStart:E,setAdornedStart:k,color:s,disabled:c,error:d,filled:I,focused:N,fullWidth:h,hiddenLabel:p,size:y,onBlur:()=>{L(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{L(!0)},registerEffect:H,required:v,variant:S}),[E,s,c,d,I,N,h,p,H,v,y,S]);return C.jsx(nz.Provider,{value:W,children:C.jsx(lve,F({as:l,ownerState:b,className:je(x.root,o),ref:n},_,{children:i}))})}),uve=cve,dve=sce({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>It({props:e,name:"MuiStack"})}),Nd=dve;function fve(e){return Et("MuiFormControlLabel",e)}const hve=kt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),zb=hve,pve=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],mve=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 At(s,fve,t)},gve=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})=>F({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}}})),vve=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${zb.error}`]:{color:(e.vars||e).palette.error.main}})),yve=R.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:d,disableTypography:f,label:h,labelPlacement:p="end",required:g,slotProps:v={}}=o,y=Le(o,pve),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=Lp({props:o,muiFormControl:S,states:["error"]}),k=F({},o,{disabled:_,labelPlacement:p,required:b,error:E.error}),I=mve(k),A=(i=v.typography)!=null?i:l.typography;let O=h;return O!=null&&O.type!==jt&&!f&&(O=C.jsx(jt,F({component:"span"},A,{className:je(I.label,A==null?void 0:A.className),children:O}))),C.jsxs(gve,F({className:je(I.root,s),ownerState:k,ref:n},y,{children:[R.cloneElement(c,x),b?C.jsxs(Nd,{direction:"row",alignItems:"center",children:[O,C.jsxs(vve,{ownerState:k,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):O]}))}),bve=yve;function xve(e){return Et("MuiFormHelperText",e)}const wve=kt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),R8=wve;var P8;const _ve=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Sve=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 At(d,xve,t)},Eve=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})=>F({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${R8.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${R8.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Cve=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,l=Le(r,_ve),c=Qd(),d=Lp({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=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=Sve(f);return C.jsx(Eve,F({as:s,ownerState:f,className:je(h.root,o),ref:n},l,{children:i===" "?P8||(P8=C.jsx("span",{className:"notranslate",children:"​"})):i}))}),Tve=Cve;function Ave(e){return Et("MuiFormLabel",e)}const kve=kt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mx=kve,Ive=["children","className","color","component","disabled","error","filled","focused","required"],Rve=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 At(c,Ave,t)},Pve=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>F({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>F({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}})),Ove=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${mx.error}`]:{color:(e.vars||e).palette.error.main}})),Mve=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,l=Le(r,Ive),c=Qd(),d=Lp({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=F({},r,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),h=Rve(f);return C.jsxs(Pve,F({as:s,ownerState:f,className:je(h.root,o),ref:n},l,{children:[i,d.required&&C.jsxs(Ove,{ownerState:f,"aria-hidden":!0,className:h.asterisk,children:[" ","*"]})]}))}),Dve=Mve,Lve=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function x$(e){return`scale(${e}, ${e**2})`}const Nve={entering:{opacity:1,transform:x$(1)},entered:{opacity:1,transform:"none"}},aL=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),KK=R.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=V4}=t,_=Le(t,Lve),b=R.useRef(),x=R.useRef(),E=Pn(),k=R.useRef(null),I=gr(k,o.ref,n),A=$=>j=>{if($){const V=k.current;j===void 0?$(V):$(V,j)}},O=A(f),L=A(($,j)=>{kK($);const{duration:V,delay:G,easing:K}=Eg({style:v,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration($.clientHeight),x.current=Y):Y=V,$.style.transition=[E.transitions.create("opacity",{duration:Y,delay:G}),E.transitions.create("transform",{duration:aL?Y:Y*.666,delay:G,easing:K})].join(","),c&&c($,j)}),N=A(d),H=A(g),W=A($=>{const{duration:j,delay:V,easing:G}=Eg({style:v,timeout:y,easing:s},{mode:"exit"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration($.clientHeight),x.current=K):K=j,$.style.transition=[E.transitions.create("opacity",{duration:K,delay:V}),E.transitions.create("transform",{duration:aL?K:K*.666,delay:aL?V:V||K*.333,easing:G})].join(","),$.style.opacity=0,$.style.transform=x$(.75),h&&h($)}),z=A(p),D=$=>{y==="auto"&&(b.current=setTimeout($,x.current||0)),r&&r(k.current,$)};return R.useEffect(()=>()=>{clearTimeout(b.current)},[]),C.jsx(S,F({appear:i,in:l,nodeRef:k,onEnter:L,onEntered:N,onEntering:O,onExit:W,onExited:z,onExiting:H,addEndListener:D,timeout:y==="auto"?null:y},_,{children:($,j)=>R.cloneElement(o,F({style:F({opacity:0,transform:x$(.75),visibility:$==="exited"&&!l?"hidden":void 0},Nve[$],v,o.props.style),ref:I},j))}))});KK.muiSupportAuto=!0;const NE=KK;function Bve(e,t,n,r,i){const[o,s]=R.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return Po(()=>{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 QK=iE["useSyncExternalStore"];function Fve(e,t,n,r,i){const o=R.useCallback(()=>t,[t]),s=R.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]=R.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const f=n(e);return[()=>f.matches,h=>(f.addListener(h),()=>{f.removeListener(h)})]},[o,n,e]);return QK(c,l,s)}function $ve(e,t={}){const n=TT(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=yX({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(QK!==void 0?Fve:Bve)(c,i,o,s,l)}const zve=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],jve=e=>{const{classes:t,disableUnderline:n}=e,i=At({root:["root",!n&&"underline"],input:["input"]},lme,t);return F({},t,i)},Uve=Ee(sA,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...iA(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})`),F({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"}})}),Hve=Ee(aA,{name:"MuiInput",slot:"Input",overridesResolver:oA})({}),JK=R.forwardRef(function(t,n){var r,i,o,s;const l=It({props:t,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:h=!1,inputComponent:p="input",multiline:g=!1,slotProps:v,slots:y={},type:S="text"}=l,_=Le(l,zve),b=jve(l),E={root:{ownerState:{disableUnderline:c}}},k=v??f?Go(v??f,E):E,I=(r=(i=y.root)!=null?i:d.Root)!=null?r:Uve,A=(o=(s=y.input)!=null?s:d.Input)!=null?o:Hve;return C.jsx(lA,F({slots:{root:I,input:A},slotProps:k,fullWidth:h,inputComponent:p,multiline:g,ref:n,type:S},_,{classes:b}))});JK.muiName="Input";const ZK=JK;function Wve(e){return Et("MuiInputLabel",e)}kt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Gve=["disableAnimation","margin","shrink","variant","className"],Vve=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=At(c,Wve,t);return F({},t,d)},qve=Ee(Dve,{shouldForwardProp:e=>xa(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})=>F({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"&&F({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&&F({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"&&F({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)"}))),Xve=R.forwardRef(function(t,n){const r=It({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,l=Le(r,Gve),c=Qd();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=Lp({props:r,muiFormControl:c,states:["size","variant","required"]}),h=F({},r,{disableAnimation:i,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),p=Vve(h);return C.jsx(qve,F({"data-shrink":d,ownerState:h,ref:n,className:je(p.root,s)},l,{classes:p}))}),Yve=Xve;function Kve(e){return Et("MuiLinearProgress",e)}kt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Qve=["className","color","value","valueBuffer","variant"];let sv=e=>e,O8,M8,D8,L8,N8,B8;const w$=4,Jve=Vd(O8||(O8=sv` + 0% { + left: -35%; + right: 100%; + } + + 60% { + left: 100%; + right: -90%; + } + + 100% { + left: 100%; + right: -90%; + } +`)),Zve=Vd(M8||(M8=sv` + 0% { + left: -200%; + right: 100%; + } + + 60% { + left: 107%; + right: -8%; + } + + 100% { + left: 107%; + right: -8%; + } +`)),eye=Vd(D8||(D8=sv` + 0% { + opacity: 1; + background-position: 0 -23px; + } + + 60% { + opacity: 0; + background-position: 0 -23px; + } + + 100% { + opacity: 1; + background-position: -200px -23px; + } +`)),tye=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 At(i,Kve,t)},iz=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?tv(e.palette[t].main,.62):ev(e.palette[t].main,.5),nye=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})=>F({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:iz(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)"})),rye=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=iz(t,e.color);return F({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"})},Zg(L8||(L8=sv` + animation: ${0} 3s infinite linear; + `),eye)),iye=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})=>F({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 .${w$}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${w$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Zg(N8||(N8=sv` + width: auto; + animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `),Jve)),oye=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})=>F({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:iz(t,e.color),transition:`transform .${w$}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Zg(B8||(B8=sv` + width: auto; + animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `),Zve)),sye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,d=Le(r,Qve),f=F({},r,{color:o,variant:c}),h=tye(f),p=Pn(),g={},v={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let y=s-100;p.direction==="rtl"&&(y=-y),v.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;p.direction==="rtl"&&(y=-y),v.bar2.transform=`translateX(${y}%)`}return C.jsxs(nye,F({className:je(h.root,i),ownerState:f,role:"progressbar"},g,{ref:n},d,{children:[c==="buffer"?C.jsx(rye,{className:h.dashed,ownerState:f}):null,C.jsx(iye,{className:h.bar1,ownerState:f,style:v.bar1}),c==="determinate"?null:C.jsx(oye,{className:h.bar2,ownerState:f,style:v.bar2})]}))}),aye=sye,lye=R.createContext({}),fa=lye;function cye(e){return Et("MuiList",e)}kt("MuiList",["root","padding","dense","subheader"]);const uye=["children","className","component","dense","disablePadding","subheader"],dye=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return At({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},cye,t)},fye=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})=>F({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),hye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,f=Le(r,uye),h=R.useMemo(()=>({dense:l}),[l]),p=F({},r,{component:s,dense:l,disablePadding:c}),g=dye(p);return C.jsx(fa.Provider,{value:h,children:C.jsxs(fye,F({as:s,className:je(g.root,o),ref:n,ownerState:p},f,{children:[d,i]}))})}),Rg=hye;function pye(e){return Et("MuiListItem",e)}const mye=kt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),fm=mye;function gye(e){return Et("MuiListItemButton",e)}const vye=kt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),hm=vye,yye=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],bye=(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]},xye=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:l}=e,d=At({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},gye,n);return F({},n,d)},wye=Ee(Ou,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:bye})(({theme:e,ownerState:t})=>F({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"}},[`&.${hm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${hm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${hm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Sn(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})`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${hm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${hm.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})),_ye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:l,dense:c=!1,disableGutters:d=!1,divider:f=!1,focusVisibleClassName:h,selected:p=!1,className:g}=r,v=Le(r,yye),y=R.useContext(fa),S=R.useMemo(()=>({dense:c||y.dense||!1,alignItems:i,disableGutters:d}),[i,y.dense,c,d]),_=R.useRef(null);Po(()=>{o&&_.current&&_.current.focus()},[o]);const b=F({},r,{alignItems:i,dense:S.dense,disableGutters:d,divider:f,selected:p}),x=xye(b),E=gr(_,n);return C.jsx(fa.Provider,{value:S,children:C.jsx(wye,F({ref:E,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:je(x.focusVisible,h),ownerState:b,className:je(x.root,g)},v,{classes:x,children:l}))})}),_$=_ye;function Sye(e){return Et("MuiListItemSecondaryAction",e)}kt("MuiListItemSecondaryAction",["root","disableGutters"]);const Eye=["className"],Cye=e=>{const{disableGutters:t,classes:n}=e;return At({root:["root",t&&"disableGutters"]},Sye,n)},Tye=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>F({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),eQ=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Le(r,Eye),s=R.useContext(fa),l=F({},r,{disableGutters:s.disableGutters}),c=Cye(l);return C.jsx(Tye,F({className:je(c.root,i),ownerState:l,ref:n},o))});eQ.muiName="ListItemSecondaryAction";const Aye=eQ,kye=["className"],Iye=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Rye=(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]},Pye=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:d,selected:f}=e;return At({root:["root",i&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",d&&"secondaryAction",f&&"selected"],container:["container"]},pye,r)},Oye=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:Rye})(({theme:e,ownerState:t})=>F({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&F({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${hm.root}`]:{paddingRight:48}},{[`&.${fm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${fm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${fm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${fm.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"}},[`&.${fm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Sn(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})`:Sn(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Mye=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Dye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:l,className:c,component:d,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:g}={},dense:v=!1,disabled:y=!1,disableGutters:S=!1,disablePadding:_=!1,divider:b=!1,focusVisibleClassName:x,secondaryAction:E,selected:k=!1,slotProps:I={},slots:A={}}=r,O=Le(r.ContainerProps,kye),L=Le(r,Iye),N=R.useContext(fa),H=R.useMemo(()=>({dense:v||N.dense||!1,alignItems:i,disableGutters:S}),[i,N.dense,v,S]),W=R.useRef(null);Po(()=>{o&&W.current&&W.current.focus()},[o]);const z=R.Children.toArray(l),D=z.length&&yS(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:k}),j=Pye($),V=gr(W,n),G=A.root||f.Root||Oye,K=I.root||h.root||{},Y=F({className:je(j.root,K.className,c),disabled:y},L);let J=d||"li";return s&&(Y.component=d||"div",Y.focusVisibleClassName=je(fm.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(fa.Provider,{value:H,children:C.jsxs(Mye,F({as:p,className:je(j.container,g),ref:V,ownerState:$},O,{children:[C.jsx(G,F({},K,!Ul(G)&&{as:J,ownerState:F({},$,K.ownerState)},Y,{children:z})),z.pop()]}))})):C.jsx(fa.Provider,{value:H,children:C.jsxs(G,F({},K,{as:J,ref:V},!Ul(G)&&{ownerState:F({},$,K.ownerState)},Y,{children:[z,E&&C.jsx(Aye,{children:E})]}))})}),gx=Dye;function Lye(e){return Et("MuiListItemAvatar",e)}kt("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Nye=["className"],Bye=e=>{const{alignItems:t,classes:n}=e;return At({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Lye,n)},Fye=Ee("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>F({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),$ye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemAvatar"}),{className:i}=r,o=Le(r,Nye),s=R.useContext(fa),l=F({},r,{alignItems:s.alignItems}),c=Bye(l);return C.jsx(Fye,F({className:je(c.root,i),ownerState:l,ref:n},o))}),zye=$ye;function jye(e){return Et("MuiListItemIcon",e)}const Uye=kt("MuiListItemIcon",["root","alignItemsFlexStart"]),F8=Uye,Hye=["className"],Wye=e=>{const{alignItems:t,classes:n}=e;return At({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},jye,n)},Gye=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})=>F({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),Vye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Le(r,Hye),s=R.useContext(fa),l=F({},r,{alignItems:s.alignItems}),c=Wye(l);return C.jsx(Gye,F({className:je(c.root,i),ownerState:l,ref:n},o))}),Cd=Vye;function qye(e){return Et("MuiListItemText",e)}const Xye=kt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),BE=Xye,Yye=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Kye=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return At({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},qye,t)},Qye=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${BE.primary}`]:t.primary},{[`& .${BE.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>F({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Jye=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:d,secondary:f,secondaryTypographyProps:h}=r,p=Le(r,Yye),{dense:g}=R.useContext(fa);let v=c??i,y=f;const S=F({},r,{disableTypography:s,inset:l,primary:!!v,secondary:!!y,dense:g}),_=Kye(S);return v!=null&&v.type!==jt&&!s&&(v=C.jsx(jt,F({variant:g?"body2":"body1",className:_.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:v}))),y!=null&&y.type!==jt&&!s&&(y=C.jsx(jt,F({variant:"body2",className:_.secondary,color:"text.secondary",display:"block"},h,{children:y}))),C.jsxs(Qye,F({className:je(_.root,o),ownerState:S,ref:n},p,{children:[v,y]}))}),Wl=Jye,Zye=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function lL(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $8(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function tQ(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")||!tQ(l,o)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const e0e=R.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,Zye),g=R.useRef(null),v=R.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Po(()=>{i&&g.current.focus()},[i]),R.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,E)=>{const k=!g.current.style.width;if(x.clientHeight{const E=g.current,k=x.key,I=Ir(E).activeElement;if(k==="ArrowDown")x.preventDefault(),cb(E,I,d,c,lL);else if(k==="ArrowUp")x.preventDefault(),cb(E,I,d,c,$8);else if(k==="Home")x.preventDefault(),cb(E,null,d,c,lL);else if(k==="End")x.preventDefault(),cb(E,null,d,c,$8);else if(k.length===1){const A=v.current,O=k.toLowerCase(),L=performance.now();A.keys.length>0&&(L-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&O!==A.keys[0]&&(A.repeating=!1)),A.lastTime=L,A.keys.push(O);const N=I&&!A.repeating&&tQ(I,A);A.previousKeyMatched&&(N||cb(E,I,!1,c,lL,A))?x.preventDefault():A.previousKeyMatched=!1}f&&f(x)},S=gr(g,n);let _=-1;R.Children.forEach(s,(x,E)=>{if(!R.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=R.Children.map(s,(x,E)=>{if(E===_){const k={};return o&&(k.autoFocus=!0),x.props.tabIndex===void 0&&h==="selectedMenu"&&(k.tabIndex=0),R.cloneElement(x,k)}return x});return C.jsx(Rg,F({role:"menu",ref:S,className:l,onKeyDown:y,tabIndex:i?0:-1},p,{children:b}))}),dA=e0e;function t0e(e){return Et("MuiPopover",e)}kt("MuiPopover",["root","paper"]);const n0e=["onEntering"],r0e=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],i0e=["slotProps"];function z8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function j8(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function U8(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function cL(e){return typeof e=="function"?e():e}const o0e=e=>{const{classes:t}=e;return At({root:["root"],paper:["paper"]},t0e,t)},s0e=Ee(VK,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nQ=Ee(ov,{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}),a0e=R.forwardRef(function(t,n){var r,i,o;const s=It({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:p,className:g,container:v,elevation:y=8,marginThreshold:S=16,open:_,PaperProps:b={},slots:x,slotProps:E,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:I=NE,transitionDuration:A="auto",TransitionProps:{onEntering:O}={},disableScrollLock:L=!1}=s,N=Le(s.TransitionProps,n0e),H=Le(s,r0e),W=(r=E==null?void 0:E.paper)!=null?r:b,z=R.useRef(),D=gr(z,W.ref),$=F({},s,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:S,externalPaperSlotProps:W,transformOrigin:k,TransitionComponent:I,transitionDuration:A,TransitionProps:N}),j=o0e($),V=R.useCallback(()=>{if(h==="anchorPosition")return f;const xe=cL(c),be=(xe&&xe.nodeType===1?xe:Ir(z.current).body).getBoundingClientRect();return{top:be.top+z8(be,d.vertical),left:be.left+j8(be,d.horizontal)}},[c,d.horizontal,d.vertical,f,h]),G=R.useCallback(xe=>({vertical:z8(xe,k.vertical),horizontal:j8(xe,k.horizontal)}),[k.horizontal,k.vertical]),K=R.useCallback(xe=>{const me={width:xe.offsetWidth,height:xe.offsetHeight},be=G(me);if(h==="none")return{top:null,left:null,transformOrigin:U8(be)};const Qe=V();let qe=Qe.top-be.vertical,at=Qe.left-be.horizontal;const Nt=qe+me.height,Re=at+me.width,$e=bu(cL(c)),it=$e.innerHeight-S,pt=$e.innerWidth-S;if(S!==null&&qeit){const mt=Nt-it;qe-=mt,be.vertical+=mt}if(S!==null&&atpt){const mt=Re-pt;at-=mt,be.horizontal+=mt}return{top:`${Math.round(qe)}px`,left:`${Math.round(at)}px`,transformOrigin:U8(be)}},[c,h,V,G,S]),[Y,J]=R.useState(_),ie=R.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]);R.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)};R.useEffect(()=>{_&&ie()}),R.useImperativeHandle(l,()=>_?{updatePosition:()=>{ie()}}:null,[_,ie]),R.useEffect(()=>{if(!_)return;const xe=tT(()=>{ie()}),me=bu(c);return me.addEventListener("resize",xe),()=>{xe.clear(),me.removeEventListener("resize",xe)}},[c,_,ie]);let se=A;A==="auto"&&!I.muiSupportAuto&&(se=void 0);const Q=v||(c?Ir(cL(c)).body:void 0),ae=(i=x==null?void 0:x.root)!=null?i:s0e,le=(o=x==null?void 0:x.paper)!=null?o:nQ,he=Gr({elementType:le,externalSlotProps:F({},W,{style:Y?W.style:F({},W.style,{opacity:0})}),additionalProps:{elevation:y,ref:D},ownerState:$,className:je(j.paper,W==null?void 0:W.className)}),pe=Gr({elementType:ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:H,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Q,open:_},ownerState:$,className:je(j.root,g)}),{slotProps:ve}=pe,ye=Le(pe,i0e);return C.jsx(ae,F({},ye,!Ul(ae)&&{slotProps:ve,disableScrollLock:L},{children:C.jsx(I,F({appear:!0,in:_,onEntering:ce,onExited:ue,timeout:se},N,{children:C.jsx(le,F({},he,{children:p}))}))}))}),l0e=a0e;function c0e(e){return Et("MuiMenu",e)}kt("MuiMenu",["root","paper","list"]);const u0e=["onEntering"],d0e=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],f0e={vertical:"top",horizontal:"right"},h0e={vertical:"top",horizontal:"left"},p0e=e=>{const{classes:t}=e;return At({root:["root"],paper:["paper"],list:["list"]},c0e,t)},m0e=Ee(l0e,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),g0e=Ee(nQ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),v0e=Ee(dA,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),y0e=R.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:S}={},variant:_="selectedMenu",slots:b={},slotProps:x={}}=o,E=Le(o.TransitionProps,u0e),k=Le(o,d0e),I=Pn(),A=I.direction==="rtl",O=F({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:S,PaperProps:g,transitionDuration:y,TransitionProps:E,variant:_}),L=p0e(O),N=s&&!d&&p,H=R.useRef(null),W=(K,Y)=>{H.current&&H.current.adjustStyleForScrollbar(K,I),S&&S(K,Y)},z=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let D=-1;R.Children.map(l,(K,Y)=>{R.isValidElement(K)&&(K.props.disabled||(_==="selectedMenu"&&K.props.selected||D===-1)&&(D=Y))});const $=(r=b.paper)!=null?r:g0e,j=(i=x.paper)!=null?i:g,V=Gr({elementType:b.root,externalSlotProps:x.root,ownerState:O,className:[L.root,c]}),G=Gr({elementType:$,externalSlotProps:j,ownerState:O,className:L.paper});return C.jsx(m0e,F({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?f0e:h0e,slots:{paper:$,root:b.root},slotProps:{root:V,paper:G},open:p,ref:n,transitionDuration:y,TransitionProps:F({onEntering:W},E),ownerState:O},k,{classes:v,children:C.jsx(v0e,F({onKeyDown:z,actions:H,autoFocus:s&&(D===-1||d),autoFocusItem:N,variant:_},f,{className:je(L.list,f.className),children:l}))}))}),Np=y0e;function b0e(e){return Et("MuiMenuItem",e)}const x0e=kt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ub=x0e,w0e=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],_0e=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},S0e=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=At({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},b0e,s);return F({},s,c)},E0e=Ee(Ou,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:_0e})(({theme:e,ownerState:t})=>F({},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})`:Sn(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}))`:Sn(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}))`:Sn(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})`:Sn(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},[`& + .${I8.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${I8.inset}`]:{marginLeft:52},[`& .${BE.root}`]:{marginTop:0,marginBottom:0},[`& .${BE.inset}`]:{paddingLeft:36},[`& .${F8.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&F({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${F8.root} svg`]:{fontSize:"1.25rem"}}))),C0e=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:p}=r,g=Le(r,w0e),v=R.useContext(fa),y=R.useMemo(()=>({dense:s||v.dense||!1,disableGutters:c}),[v.dense,s,c]),S=R.useRef(null);Po(()=>{i&&S.current&&S.current.focus()},[i]);const _=F({},r,{dense:y.dense,divider:l,disableGutters:c}),b=S0e(r),x=gr(S,n);let E;return r.disabled||(E=h!==void 0?h:-1),C.jsx(fa.Provider,{value:y,children:C.jsx(E0e,F({ref:x,role:f,tabIndex:E,component:o,focusVisibleClassName:je(b.focusVisible,d),className:je(b.root,p)},g,{ownerState:_,classes:b}))})}),gu=C0e;function T0e(e){return Et("MuiNativeSelect",e)}const A0e=kt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),oz=A0e,k0e=["className","disabled","error","IconComponent","inputRef","variant"],I0e=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 At(l,T0e,t)},rQ=({ownerState:e,theme:t})=>F({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":F({},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"},[`&.${oz.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}}),R0e=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:xa,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${oz.multiple}`]:t.multiple}]}})(rQ),iQ=({ownerState:e,theme:t})=>F({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${oz.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),P0e=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]}})(iQ),O0e=R.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:l,variant:c="standard"}=t,d=Le(t,k0e),f=F({},t,{disabled:i,variant:c,error:o}),h=I0e(f);return C.jsxs(R.Fragment,{children:[C.jsx(R0e,F({ownerState:f,className:je(h.select,r),disabled:i,ref:l||n},d)),t.multiple?null:C.jsx(P0e,{as:s,ownerState:f,className:h.icon})]})}),M0e=O0e;var H8;const D0e=["children","classes","className","label","notched"],L0e=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%"}),N0e=Ee("legend")(({ownerState:e,theme:t})=>F({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&&F({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 B0e(e){const{className:t,label:n,notched:r}=e,i=Le(e,D0e),o=n!=null&&n!=="",s=F({},e,{notched:r,withLabel:o});return C.jsx(L0e,F({"aria-hidden":!0,className:t,ownerState:s},i,{children:C.jsx(N0e,{ownerState:s,children:o?C.jsx("span",{children:n}):H8||(H8=C.jsx("span",{className:"notranslate",children:"​"}))})}))}const F0e=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],$0e=e=>{const{classes:t}=e,r=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ume,t);return F({},t,r)},z0e=Ee(sA,{shouldForwardProp:e=>xa(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:iA})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return F({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${zu.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${zu.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${zu.focused} .${zu.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${zu.error} .${zu.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${zu.disabled} .${zu.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&F({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),j0e=Ee(B0e,{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}}),U0e=Ee(aA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:oA})(({theme:e,ownerState:t})=>F({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})),oQ=R.forwardRef(function(t,n){var r,i,o,s,l;const c=It({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:h="input",label:p,multiline:g=!1,notched:v,slots:y={},type:S="text"}=c,_=Le(c,F0e),b=$0e(c),x=Qd(),E=Lp({props:c,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=F({},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}),I=(r=(i=y.root)!=null?i:d.Root)!=null?r:z0e,A=(o=(s=y.input)!=null?s:d.Input)!=null?o:U0e;return C.jsx(lA,F({slots:{root:I,input:A},renderSuffix:O=>C.jsx(j0e,{ownerState:k,className:b.notchedOutline,label:p!=null&&p!==""&&E.required?l||(l=C.jsxs(R.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:F({},b,{notchedOutline:null})}))});oQ.muiName="Input";const sQ=oQ;function H0e(e){return Et("MuiSelect",e)}const W0e=kt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),db=W0e;var W8;const G0e=["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"],V0e=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}]}})(rQ,{[`&.${db.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),q0e=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]}})(iQ),X0e=Ee("input",{shouldForwardProp:e=>Z5(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 G8(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Y0e(e){return e==null||typeof e=="string"&&!e.trim()}const K0e=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 At(l,H0e,t)},Q0e=R.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:k,onChange:I,onClose:A,onFocus:O,onOpen:L,open:N,readOnly:H,renderValue:W,SelectDisplayProps:z={},tabIndex:D,value:$,variant:j="standard"}=t,V=Le(t,G0e),[G,K]=Mx({controlled:$,default:h,name:"Select"}),[Y,J]=Mx({controlled:N,default:f,name:"Select"}),ie=R.useRef(null),ce=R.useRef(null),[ue,se]=R.useState(null),{current:Q}=R.useRef(N!=null),[ae,le]=R.useState(),he=gr(n,S),pe=R.useCallback(ke=>{ce.current=ke,ke&&se(ke)},[]),ve=ue==null?void 0:ue.parentNode;R.useImperativeHandle(he,()=>({focus:()=>{ce.current.focus()},node:ie.current,value:G}),[G]),R.useEffect(()=>{f&&Y&&ue&&!Q&&(le(l?null:ve.clientWidth),ce.current.focus())},[ue,l]),R.useEffect(()=>{s&&ce.current.focus()},[s]),R.useEffect(()=>{if(!_)return;const ke=Ir(ce.current).getElementById(_);if(ke){const ot=()=>{getSelection().isCollapsed&&ce.current.focus()};return ke.addEventListener("click",ot),()=>{ke.removeEventListener("click",ot)}}},[_]);const ye=(ke,ot)=>{ke?L&&L(ot):A&&A(ot),Q||(le(l?null:ve.clientWidth),J(ke))},xe=ke=>{ke.button===0&&(ke.preventDefault(),ce.current.focus(),ye(!0,ke))},me=ke=>{ye(!1,ke)},be=R.Children.toArray(c),Qe=ke=>{const ot=be.find($t=>$t.props.value===ke.target.value);ot!==void 0&&(K(ot.props.value),I&&I(ke,ot))},qe=ke=>ot=>{let $t;if(ot.currentTarget.hasAttribute("tabindex")){if(x){$t=Array.isArray(G)?G.slice():[];const Ie=G.indexOf(ke.props.value);Ie===-1?$t.push(ke.props.value):$t.splice(Ie,1)}else $t=ke.props.value;if(ke.props.onClick&&ke.props.onClick(ot),G!==$t&&(K($t),I)){const Ie=ot.nativeEvent||ot,Ue=new Ie.constructor(Ie.type,Ie);Object.defineProperty(Ue,"target",{writable:!0,value:{value:$t,name:E}}),I(Ue,ke)}x||ye(!1,ot)}},at=ke=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(ke.key)!==-1&&(ke.preventDefault(),ye(!0,ke))},Nt=ue!==null&&Y,Re=ke=>{!Nt&&k&&(Object.defineProperty(ke,"target",{writable:!0,value:{value:G,name:E}}),k(ke))};delete V["aria-invalid"];let $e,it;const pt=[];let mt=!1;(LE({value:G})||g)&&(W?$e=W(G):mt=!0);const _e=be.map(ke=>{if(!R.isValidElement(ke))return null;let ot;if(x){if(!Array.isArray(G))throw new Error(Md(2));ot=G.some($t=>G8($t,ke.props.value)),ot&&mt&&pt.push(ke.props.children)}else ot=G8(G,ke.props.value),ot&&mt&&(it=ke.props.children);return R.cloneElement(ke,{"aria-selected":ot?"true":"false",onClick:qe(ke),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),ke.props.onKeyUp&&ke.props.onKeyUp($t)},role:"option",selected:ot,value:void 0,"data-value":ke.props.value})});mt&&(x?pt.length===0?$e=null:$e=pt.reduce((ke,ot,$t)=>(ke.push(ot),$t{const{classes:t}=e;return t},sz={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>xa(e)&&e!=="variant",slot:"Root"},nbe=Ee(ZK,sz)(""),rbe=Ee(sQ,sz)(""),ibe=Ee(YK,sz)(""),aQ=R.forwardRef(function(t,n){const r=It({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=pme,id:h,input:p,inputProps:g,label:v,labelId:y,MenuProps:S,multiple:_=!1,native:b=!1,onClose:x,onOpen:E,open:k,renderValue:I,SelectDisplayProps:A,variant:O="outlined"}=r,L=Le(r,Z0e),N=b?M0e:J0e,H=Qd(),W=Lp({props:r,muiFormControl:H,states:["variant","error"]}),z=W.variant||O,D=F({},r,{variant:z,classes:s}),$=tbe(D),j=Le($,ebe),V=p||{standard:C.jsx(nbe,{ownerState:D}),outlined:C.jsx(rbe,{label:v,ownerState:D}),filled:C.jsx(ibe,{ownerState:D})}[z],G=gr(n,V.ref);return C.jsx(R.Fragment,{children:R.cloneElement(V,F({inputComponent:N,inputProps:F({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:k,renderValue:I,SelectDisplayProps:F({id:h},A)},g,{classes:g?Go(j,g.classes):j},p?p.props.inputProps:{})},_&&b&&z==="outlined"?{notched:!0}:{},{ref:G,className:je(V.props.className,l,$.root)},!p&&{variant:z},L))})});aQ.muiName="Select";const obe=aQ,sbe=e=>!e||!Ul(e),abe=sbe;function lbe(e){return Et("MuiSlider",e)}const cbe=kt("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"]),rl=cbe,ube=e=>{const{open:t}=e;return{offset:je(t&&rl.valueLabelOpen),circle:rl.valueLabelCircle,label:rl.valueLabelLabel}};function dbe(e){const{children:t,className:n,value:r}=e,i=ube(e);return t?R.cloneElement(t,{className:je(t.props.className)},C.jsxs(R.Fragment,{children:[t.props.children,C.jsx("span",{className:je(i.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:i.circle,children:C.jsx("span",{className:i.label,children:r})})})]})):null}const fbe=["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 V8(e){return e}const hbe=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})=>F({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"&&F({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"&&F({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"},[`&.${rl.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${rl.dragging}`]:{[`& .${rl.thumb}, & .${rl.track}`]:{transition:"none"}}})),pbe=Ee("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>F({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})),mbe=Ee("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?tv(e.palette[t.color].main,.62):ev(e.palette[t.color].main,.5);return F({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})}),gbe=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})=>F({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":F({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, &.${rl.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Sn(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${rl.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Sn(e.palette[t.color].main,.16)}`},[`&.${rl.disabled}`]:{"&:hover":{boxShadow:"none"}}})),vbe=Ee(dbe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>F({[`&.${rl.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"})),ybe=Ee("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Z5(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>F({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})),bbe=Ee("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Z5(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>F({},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})),xbe=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 At(d,lbe,s)},wbe=({children:e})=>e,_be=R.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,k,I,A,O,L,N;const H=It({props:t,name:"MuiSlider"}),z=Pn().direction==="rtl",{"aria-label":D,"aria-valuetext":$,"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=V8,slotProps:me,slots:be,track:Qe="normal",valueLabelDisplay:qe="off",valueLabelFormat:at=V8}=H,Nt=Le(H,fbe),Re=F({},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:$e,getRootProps:it,getHiddenInputProps:pt,getThumbProps:mt,open:_e,active:ze,axis:Ye,focusedThumbIndex:Fe,range:Ne,dragging:Rt,marks:ct,values:ke,trackOffset:ot,trackLeap:$t,getThumbStyle:Ie}=jpe(F({},Re,{rootRef:n}));Re.marked=ct.length>0&&ct.some(Wn=>Wn.label),Re.dragging=Rt,Re.focusedThumbIndex=Fe;const Ue=xbe(Re),yt=(r=(i=be==null?void 0:be.root)!=null?i:G.Root)!=null?r:hbe,Gt=(o=(s=be==null?void 0:be.rail)!=null?s:G.Rail)!=null?o:pbe,mn=(l=(c=be==null?void 0:be.track)!=null?c:G.Track)!=null?l:mbe,$r=(d=(f=be==null?void 0:be.thumb)!=null?f:G.Thumb)!=null?d:gbe,Mr=(h=(p=be==null?void 0:be.valueLabel)!=null?p:G.ValueLabel)!=null?h:vbe,Dr=(g=(v=be==null?void 0:be.mark)!=null?v:G.Mark)!=null?g:ybe,zr=(y=(S=be==null?void 0:be.markLabel)!=null?S:G.MarkLabel)!=null?y:bbe,ei=(_=(b=be==null?void 0:be.input)!=null?b:G.Input)!=null?_:"input",ts=(x=me==null?void 0:me.root)!=null?x:K.root,Bu=(E=me==null?void 0:me.rail)!=null?E:K.rail,Xs=(k=me==null?void 0:me.track)!=null?k:K.track,ac=(I=me==null?void 0:me.thumb)!=null?I:K.thumb,lc=(A=me==null?void 0:me.valueLabel)!=null?A:K.valueLabel,cf=(O=me==null?void 0:me.mark)!=null?O:K.mark,ns=(L=me==null?void 0:me.markLabel)!=null?L:K.markLabel,uf=(N=me==null?void 0:me.input)!=null?N:K.input,lo=Gr({elementType:yt,getSlotProps:it,externalSlotProps:ts,externalForwardedProps:Nt,additionalProps:F({},abe(yt)&&{as:V}),ownerState:F({},Re,ts==null?void 0:ts.ownerState),className:[Ue.root,ie]}),cc=Gr({elementType:Gt,externalSlotProps:Bu,ownerState:Re,className:Ue.rail}),Ti=Gr({elementType:mn,externalSlotProps:Xs,additionalProps:{style:F({},$e[Ye].offset(ot),$e[Ye].leap($t))},ownerState:F({},Re,Xs==null?void 0:Xs.ownerState),className:Ue.track}),rs=Gr({elementType:$r,getSlotProps:mt,externalSlotProps:ac,ownerState:F({},Re,ac==null?void 0:ac.ownerState),className:Ue.thumb}),df=Gr({elementType:Mr,externalSlotProps:lc,ownerState:F({},Re,lc==null?void 0:lc.ownerState),className:Ue.valueLabel}),is=Gr({elementType:Dr,externalSlotProps:cf,ownerState:Re,className:Ue.mark}),Sa=Gr({elementType:zr,externalSlotProps:ns,ownerState:Re,className:Ue.markLabel}),Fu=Gr({elementType:ei,getSlotProps:pt,externalSlotProps:uf,ownerState:Re});return C.jsxs(yt,F({},lo,{children:[C.jsx(Gt,F({},cc)),C.jsx(mn,F({},Ti)),ct.filter(Wn=>Wn.value>=he&&Wn.value<=le).map((Wn,Zn)=>{const wl=DE(Wn.value,he,le),_l=$e[Ye].offset(wl);let co;return Qe===!1?co=ke.indexOf(Wn.value)!==-1:co=Qe==="normal"&&(Ne?Wn.value>=ke[0]&&Wn.value<=ke[ke.length-1]:Wn.value<=ke[0])||Qe==="inverted"&&(Ne?Wn.value<=ke[0]||Wn.value>=ke[ke.length-1]:Wn.value>=ke[0]),C.jsxs(R.Fragment,{children:[C.jsx(Dr,F({"data-index":Zn},is,!Ul(Dr)&&{markActive:co},{style:F({},_l,is.style),className:je(is.className,co&&Ue.markActive)})),Wn.label!=null?C.jsx(zr,F({"aria-hidden":!0,"data-index":Zn},Sa,!Ul(zr)&&{markLabelActive:co},{style:F({},_l,Sa.style),className:je(Ue.markLabel,Sa.className,co&&Ue.markLabelActive),children:Wn.label})):null]},Zn)}),ke.map((Wn,Zn)=>{const wl=DE(Wn,he,le),_l=$e[Ye].offset(wl),co=qe==="off"?wbe:Mr;return C.jsx(co,F({},!Ul(co)&&{valueLabelFormat:at,valueLabelDisplay:qe,value:typeof at=="function"?at(xe(Wn),Zn):at,index:Zn,open:_e===Zn||ze===Zn||qe==="on",disabled:ue},df,{children:C.jsx($r,F({"data-index":Zn},rs,{className:je(Ue.thumb,rs.className,ze===Zn&&Ue.active,Fe===Zn&&Ue.focusVisible),style:F({},_l,Ie(Zn),rs.style),children:C.jsx(ei,F({"data-index":Zn,"aria-label":se?se(Zn):D,"aria-valuenow":xe(Wn),"aria-labelledby":j,"aria-valuetext":Q?Q(xe(Wn),Zn):$,value:ke[Zn]},Fu))}))}),Zn)})]}))}),Sbe=_be;function Ebe(e){return Et("MuiSnackbarContent",e)}kt("MuiSnackbarContent",["root","message","action"]);const Cbe=["action","className","message","role"],Tbe=e=>{const{classes:t}=e;return At({root:["root"],action:["action"],message:["message"]},Ebe,t)},Abe=Ee(ov,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=Vle(e.palette.background.default,t);return F({},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}})}),kbe=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Ibe=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Rbe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:l="alert"}=r,c=Le(r,Cbe),d=r,f=Tbe(d);return C.jsxs(Abe,F({role:l,square:!0,elevation:6,className:je(f.root,o),ownerState:d,ref:n},c,{children:[C.jsx(kbe,{className:f.message,ownerState:d,children:s}),i?C.jsx(Ibe,{className:f.action,ownerState:d,children:i}):null]}))}),Pbe=Rbe;function Obe(e){return Et("MuiSnackbar",e)}kt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Mbe=["onEnter","onExited"],Dbe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Lbe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Me(n.vertical)}${Me(n.horizontal)}`]};return At(r,Obe,t)},q8=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 F({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")]:F({},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"})})}),Nbe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiSnackbar"}),i=Pn(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:h,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:v=!1,message:y,open:S,TransitionComponent:_=NE,transitionDuration:b=o,TransitionProps:{onEnter:x,onExited:E}={}}=r,k=Le(r.TransitionProps,Mbe),I=Le(r,Dbe),A=F({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:v,TransitionComponent:_,transitionDuration:b}),O=Lbe(A),{getRootProps:L,onClickAway:N}=Upe(F({},A)),[H,W]=R.useState(!0),z=Gr({elementType:q8,getSlotProps:L,externalForwardedProps:I,ownerState:A,additionalProps:{ref:n},className:[O.root,h]}),D=j=>{W(!0),E&&E(j)},$=(j,V)=>{W(!1),x&&x(j,V)};return!S&&H?null:C.jsx(nhe,F({onClickAway:N},p,{children:C.jsx(q8,F({},z,{children:C.jsx(_,F({appear:!0,in:S,timeout:b,direction:l==="top"?"down":"up",onEnter:$,onExited:D},k,{children:f||C.jsx(Pbe,F({message:y,action:s},g))}))}))}))}),Bbe=Nbe;function Fbe(e){return Et("MuiTooltip",e)}const $be=kt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),ud=$be,zbe=["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 jbe(e){return Math.round(e*1e5)/1e5}const Ube=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 At(s,Fbe,t)},Hbe=Ee(jK,{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})=>F({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${ud.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ud.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ud.arrow}`]:F({},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"] .${ud.arrow}`]:F({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Wbe=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})=>F({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Sn(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:`${jbe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${ud.popper}[data-popper-placement*="left"] &`]:F({transformOrigin:"right center"},t.isRtl?F({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):F({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${ud.popper}[data-popper-placement*="right"] &`]:F({transformOrigin:"left center"},t.isRtl?F({marginRight:"14px"},t.touch&&{marginRight:"24px"}):F({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${ud.popper}[data-popper-placement*="top"] &`]:F({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${ud.popper}[data-popper-placement*="bottom"] &`]:F({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:Sn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let i_=!1,uL=null,fb={x:0,y:0};function o_(e,t){return n=>{t&&t(n),e(n)}}const Vbe=R.forwardRef(function(t,n){var r,i,o,s,l,c,d,f,h,p,g,v,y,S,_,b,x,E,k;const I=It({props:t,name:"MuiTooltip"}),{arrow:A=!1,children:O,components:L={},componentsProps:N={},describeChild:H=!1,disableFocusListener:W=!1,disableHoverListener:z=!1,disableInteractive:D=!1,disableTouchListener:$=!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=NE,TransitionProps:xe}=I,me=Le(I,zbe),be=R.isValidElement(O)?O:C.jsx("span",{children:O}),Qe=Pn(),qe=Qe.direction==="rtl",[at,Nt]=R.useState(),[Re,$e]=R.useState(null),it=R.useRef(!1),pt=D||K,mt=R.useRef(),_e=R.useRef(),ze=R.useRef(),Ye=R.useRef(),[Fe,Ne]=Mx({controlled:se,default:!1,name:"Tooltip",state:"open"});let Rt=Fe;const ct=M5(Y),ke=R.useRef(),ot=R.useCallback(()=>{ke.current!==void 0&&(document.body.style.WebkitUserSelect=ke.current,ke.current=void 0),clearTimeout(Ye.current)},[]);R.useEffect(()=>()=>{clearTimeout(mt.current),clearTimeout(_e.current),clearTimeout(ze.current),ot()},[ot]);const $t=Jt=>{clearTimeout(uL),i_=!0,Ne(!0),ue&&!Rt&&ue(Jt)},Ie=ro(Jt=>{clearTimeout(uL),uL=setTimeout(()=>{i_=!1},800+J),Ne(!1),ce&&Rt&&ce(Jt),clearTimeout(mt.current),mt.current=setTimeout(()=>{it.current=!1},Qe.transitions.duration.shortest)}),Ue=Jt=>{it.current&&Jt.type!=="touchstart"||(at&&at.removeAttribute("title"),clearTimeout(_e.current),clearTimeout(ze.current),j||i_&&V?_e.current=setTimeout(()=>{$t(Jt)},i_?V:j):$t(Jt))},yt=Jt=>{clearTimeout(_e.current),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ie(Jt)},J)},{isFocusVisibleRef:Gt,onBlur:mn,onFocus:$r,ref:Mr}=D5(),[,Dr]=R.useState(!1),zr=Jt=>{mn(Jt),Gt.current===!1&&(Dr(!1),yt(Jt))},ei=Jt=>{at||Nt(Jt.currentTarget),$r(Jt),Gt.current===!0&&(Dr(!0),Ue(Jt))},ts=Jt=>{it.current=!0;const yr=be.props;yr.onTouchStart&&yr.onTouchStart(Jt)},Bu=Ue,Xs=yt,ac=Jt=>{ts(Jt),clearTimeout(ze.current),clearTimeout(mt.current),ot(),ke.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=ke.current,Ue(Jt)},G)},lc=Jt=>{be.props.onTouchEnd&&be.props.onTouchEnd(Jt),ot(),clearTimeout(ze.current),ze.current=setTimeout(()=>{Ie(Jt)},ie)};R.useEffect(()=>{if(!Rt)return;function Jt(yr){(yr.key==="Escape"||yr.key==="Esc")&&Ie(yr)}return document.addEventListener("keydown",Jt),()=>{document.removeEventListener("keydown",Jt)}},[Ie,Rt]);const cf=gr(be.ref,Mr,Nt,n);!ve&&ve!==0&&(Rt=!1);const ns=R.useRef(),uf=Jt=>{const yr=be.props;yr.onMouseMove&&yr.onMouseMove(Jt),fb={x:Jt.clientX,y:Jt.clientY},ns.current&&ns.current.update()},lo={},cc=typeof ve=="string";H?(lo.title=!Rt&&cc&&!z?ve:null,lo["aria-describedby"]=Rt?ct:null):(lo["aria-label"]=cc?ve:null,lo["aria-labelledby"]=Rt&&!cc?ct:null);const Ti=F({},lo,me,be.props,{className:je(me.className,be.props.className),onTouchStart:ts,ref:cf},K?{onMouseMove:uf}:{}),rs={};$||(Ti.onTouchStart=ac,Ti.onTouchEnd=lc),z||(Ti.onMouseOver=o_(Bu,Ti.onMouseOver),Ti.onMouseLeave=o_(Xs,Ti.onMouseLeave),pt||(rs.onMouseOver=Bu,rs.onMouseLeave=Xs)),W||(Ti.onFocus=o_(ei,Ti.onFocus),Ti.onBlur=o_(zr,Ti.onBlur),pt||(rs.onFocus=ei,rs.onBlur=zr));const df=R.useMemo(()=>{var Jt;let yr=[{name:"arrow",enabled:!!Re,options:{element:Re,padding:4}}];return(Jt=le.popperOptions)!=null&&Jt.modifiers&&(yr=yr.concat(le.popperOptions.modifiers)),F({},le.popperOptions,{modifiers:yr})},[Re,le]),is=F({},I,{isRtl:qe,arrow:A,disableInteractive:pt,placement:Q,PopperComponentProp:ae,touch:it.current}),Sa=Ube(is),Fu=(r=(i=pe.popper)!=null?i:L.Popper)!=null?r:Hbe,Wn=(o=(s=(l=pe.transition)!=null?l:L.Transition)!=null?s:ye)!=null?o:NE,Zn=(c=(d=pe.tooltip)!=null?d:L.Tooltip)!=null?c:Wbe,wl=(f=(h=pe.arrow)!=null?h:L.Arrow)!=null?f:Gbe,_l=$b(Fu,F({},le,(p=he.popper)!=null?p:N.popper,{className:je(Sa.popper,le==null?void 0:le.className,(g=(v=he.popper)!=null?v:N.popper)==null?void 0:g.className)}),is),co=$b(Wn,F({},xe,(y=he.transition)!=null?y:N.transition),is),_v=$b(Zn,F({},(S=he.tooltip)!=null?S:N.tooltip,{className:je(Sa.tooltip,(_=(b=he.tooltip)!=null?b:N.tooltip)==null?void 0:_.className)}),is),Sv=$b(wl,F({},(x=he.arrow)!=null?x:N.arrow,{className:je(Sa.arrow,(E=(k=he.arrow)!=null?k:N.arrow)==null?void 0:E.className)}),is);return C.jsxs(R.Fragment,{children:[R.cloneElement(be,Ti),C.jsx(Fu,F({as:ae??jK,placement:Q,anchorEl:K?{getBoundingClientRect:()=>({top:fb.y,left:fb.x,right:fb.x,bottom:fb.y,width:0,height:0})}:at,popperRef:ns,open:at?Rt:!1,id:ct,transition:!0},rs,_l,{popperOptions:df,children:({TransitionProps:Jt})=>C.jsx(Wn,F({timeout:Qe.transitions.duration.shorter},Jt,co,{children:C.jsxs(Zn,F({},_v,{children:[ve,A?C.jsx(wl,F({},Sv,{ref:$e})):null]}))}))}))]})}),Jd=Vbe;function qbe(e){return Et("MuiSwitch",e)}const Xbe=kt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),So=Xbe,Ybe=["className","color","edge","size","sx"],Kbe=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=At(l,qbe,t);return F({},t,c)},Qbe=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})=>F({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,[`& .${So.thumb}`]:{width:16,height:16},[`& .${So.switchBase}`]:{padding:4,[`&.${So.checked}`]:{transform:"translateX(16px)"}}})),Jbe=Ee(GK,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${So.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}),[`&.${So.checked}`]:{transform:"translateX(20px)"},[`&.${So.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${So.checked} + .${So.track}`]:{opacity:.5},[`&.${So.disabled} + .${So.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${So.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>F({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Sn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${So.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})`:Sn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${So.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?tv(e.palette[t.color].main,.62):ev(e.palette[t.color].main,.55)}`}},[`&.${So.checked} + .${So.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),Zbe=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}`})),exe=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%"})),txe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:l="medium",sx:c}=r,d=Le(r,Ybe),f=F({},r,{color:o,edge:s,size:l}),h=Kbe(f),p=C.jsx(exe,{className:h.thumb,ownerState:f});return C.jsxs(Qbe,{className:je(h.root,i),sx:c,ownerState:f,children:[C.jsx(Jbe,F({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:f},d,{classes:F({},h,{root:h.switchBase})})),C.jsx(Zbe,{className:h.track,ownerState:f})]})}),Pg=txe;function nxe(e){return Et("MuiTab",e)}const rxe=kt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Sh=rxe,ixe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],oxe=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 At(d,nxe,t)},sxe=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})=>F({},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}`]:F({},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)})),axe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:d="top",indicator:f,label:h,onChange:p,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:S,textColor:_="inherit",value:b,wrapped:x=!1}=r,E=Le(r,ixe),k=F({},r,{disabled:o,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:d,label:!!h,fullWidth:l,textColor:_,wrapped:x}),I=oxe(k),A=c&&h&&R.isValidElement(c)?R.cloneElement(c,{className:je(I.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(sxe,F({focusRipple:!s,className:je(I.root,i),ref:n,role:"tab","aria-selected":y,disabled:o,onClick:O,onFocus:L,ownerState:k,tabIndex:y?0:-1},E,{children:[d==="top"||d==="start"?C.jsxs(R.Fragment,{children:[A,h]}):C.jsxs(R.Fragment,{children:[h,A]}),f]}))}),Bm=axe;function lxe(e){return Et("MuiToolbar",e)}kt("MuiToolbar",["root","gutters","regular","dense"]);const cxe=["className","component","disableGutters","variant"],uxe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return At({root:["root",!n&&"gutters",r]},lxe,t)},dxe=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})=>F({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),fxe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:l="regular"}=r,c=Le(r,cxe),d=F({},r,{component:o,disableGutters:s,variant:l}),f=uxe(d);return C.jsx(dxe,F({as:o,className:je(f.root,i),ref:n,ownerState:d},c))}),hxe=fxe,pxe=Ft(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mxe=Ft(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function gxe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function vxe(e,t,n,r={},i=()=>{}){const{ease:o=gxe,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 yxe=["onChange"],bxe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function xxe(e){const{onChange:t}=e,n=Le(e,yxe),r=R.useRef(),i=R.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Po(()=>{const s=tT(()=>{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]),R.useEffect(()=>{o(),t(r.current)},[t]),C.jsx("div",F({style:bxe,ref:i},n))}function wxe(e){return Et("MuiTabScrollButton",e)}const _xe=kt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Sxe=_xe,Exe=["className","slots","slotProps","direction","orientation","disabled"],Cxe=e=>{const{classes:t,orientation:n,disabled:r}=e;return At({root:["root",n,r&&"disabled"]},wxe,t)},Txe=Ee(Ou,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>F({width:40,flexShrink:0,opacity:.8,[`&.${Sxe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Axe=R.forwardRef(function(t,n){var r,i;const o=It({props:t,name:"MuiTabScrollButton"}),{className:s,slots:l={},slotProps:c={},direction:d}=o,f=Le(o,Exe),p=Pn().direction==="rtl",g=F({isRtl:p},o),v=Cxe(g),y=(r=l.StartScrollButtonIcon)!=null?r:pxe,S=(i=l.EndScrollButtonIcon)!=null?i:mxe,_=Gr({elementType:y,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g}),b=Gr({elementType:S,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:g});return C.jsx(Txe,F({component:"div",className:je(v.root,s),ref:n,role:null,ownerState:g,tabIndex:null},f,{children:d==="left"?C.jsx(y,F({},_)):C.jsx(S,F({},b))}))}),kxe=Axe;function Ixe(e){return Et("MuiTabs",e)}const Rxe=kt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),dL=Rxe,Pxe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],X8=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Y8=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,s_=(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}}},Oxe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return At({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"]},Ixe,c)},Mxe=Ee("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${dL.scrollButtons}`]:t.scrollButtons},{[`& .${dL.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>F({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${dL.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Dxe=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})=>F({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"})),Lxe=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})=>F({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Nxe=Ee("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>F({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})),Bxe=Ee(xxe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),K8={},Fxe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabs"}),i=Pn(),o=i.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:d=!1,children:f,className:h,component:p="div",allowScrollButtonsMobile:g=!1,indicatorColor:v="primary",onChange:y,orientation:S="horizontal",ScrollButtonComponent:_=kxe,scrollButtons:b="auto",selectionFollowsFocus:x,slots:E={},slotProps:k={},TabIndicatorProps:I={},TabScrollButtonProps:A={},textColor:O="primary",value:L,variant:N="standard",visibleScrollbar:H=!1}=r,W=Le(r,Pxe),z=N==="scrollable",D=S==="vertical",$=D?"scrollTop":"scrollLeft",j=D?"top":"left",V=D?"bottom":"right",G=D?"clientHeight":"clientWidth",K=D?"height":"width",Y=F({},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=Oxe(Y),ie=Gr({elementType:E.StartScrollButtonIcon,externalSlotProps:k.startScrollButtonIcon,ownerState:Y}),ce=Gr({elementType:E.EndScrollButtonIcon,externalSlotProps:k.endScrollButtonIcon,ownerState:Y}),[ue,se]=R.useState(!1),[Q,ae]=R.useState(K8),[le,he]=R.useState(!1),[pe,ve]=R.useState(!1),[ye,xe]=R.useState(!1),[me,be]=R.useState({overflow:"hidden",scrollbarWidth:0}),Qe=new Map,qe=R.useRef(null),at=R.useRef(null),Nt=()=>{const Ie=qe.current;let Ue;if(Ie){const Gt=Ie.getBoundingClientRect();Ue={clientWidth:Ie.clientWidth,scrollLeft:Ie.scrollLeft,scrollTop:Ie.scrollTop,scrollLeftNormalized:vse(Ie,i.direction),scrollWidth:Ie.scrollWidth,top:Gt.top,bottom:Gt.bottom,left:Gt.left,right:Gt.right}}let yt;if(Ie&&L!==!1){const Gt=at.current.children;if(Gt.length>0){const mn=Gt[Qe.get(L)];yt=mn?mn.getBoundingClientRect():null}}return{tabsMeta:Ue,tabMeta:yt}},Re=ro(()=>{const{tabsMeta:Ie,tabMeta:Ue}=Nt();let yt=0,Gt;if(D)Gt="top",Ue&&Ie&&(yt=Ue.top-Ie.top+Ie.scrollTop);else if(Gt=o?"right":"left",Ue&&Ie){const $r=o?Ie.scrollLeftNormalized+Ie.clientWidth-Ie.scrollWidth:Ie.scrollLeft;yt=(o?-1:1)*(Ue[Gt]-Ie[Gt]+$r)}const mn={[Gt]:yt,[K]:Ue?Ue[K]:0};if(isNaN(Q[Gt])||isNaN(Q[K]))ae(mn);else{const $r=Math.abs(Q[Gt]-mn[Gt]),Mr=Math.abs(Q[K]-mn[K]);($r>=1||Mr>=1)&&ae(mn)}}),$e=(Ie,{animation:Ue=!0}={})=>{Ue?vxe($,qe.current,Ie,{duration:i.transitions.duration.standard}):qe.current[$]=Ie},it=Ie=>{let Ue=qe.current[$];D?Ue+=Ie:(Ue+=Ie*(o?-1:1),Ue*=o&&Wq()==="reverse"?-1:1),$e(Ue)},pt=()=>{const Ie=qe.current[G];let Ue=0;const yt=Array.from(at.current.children);for(let Gt=0;GtIe){Gt===0&&(Ue=Ie);break}Ue+=mn[G]}return Ue},mt=()=>{it(-1*pt())},_e=()=>{it(pt())},ze=R.useCallback(Ie=>{be({overflow:null,scrollbarWidth:Ie})},[]),Ye=()=>{const Ie={};Ie.scrollbarSizeListener=z?C.jsx(Bxe,{onChange:ze,className:je(J.scrollableX,J.hideScrollbar)}):null;const yt=z&&(b==="auto"&&(le||pe)||b===!0);return Ie.scrollButtonStart=yt?C.jsx(_,F({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ie},orientation:S,direction:o?"right":"left",onClick:mt,disabled:!le},A,{className:je(J.scrollButtons,A.className)})):null,Ie.scrollButtonEnd=yt?C.jsx(_,F({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ce},orientation:S,direction:o?"left":"right",onClick:_e,disabled:!pe},A,{className:je(J.scrollButtons,A.className)})):null,Ie},Fe=ro(Ie=>{const{tabsMeta:Ue,tabMeta:yt}=Nt();if(!(!yt||!Ue)){if(yt[j]Ue[V]){const Gt=Ue[$]+(yt[V]-Ue[V]);$e(Gt,{animation:Ie})}}}),Ne=ro(()=>{z&&b!==!1&&xe(!ye)});R.useEffect(()=>{const Ie=tT(()=>{qe.current&&Re()}),Ue=bu(qe.current);Ue.addEventListener("resize",Ie);let yt;return typeof ResizeObserver<"u"&&(yt=new ResizeObserver(Ie),Array.from(at.current.children).forEach(Gt=>{yt.observe(Gt)})),()=>{Ie.clear(),Ue.removeEventListener("resize",Ie),yt&&yt.disconnect()}},[Re]),R.useEffect(()=>{const Ie=Array.from(at.current.children),Ue=Ie.length;if(typeof IntersectionObserver<"u"&&Ue>0&&z&&b!==!1){const yt=Ie[0],Gt=Ie[Ue-1],mn={root:qe.current,threshold:.99},$r=ei=>{he(!ei[0].isIntersecting)},Mr=new IntersectionObserver($r,mn);Mr.observe(yt);const Dr=ei=>{ve(!ei[0].isIntersecting)},zr=new IntersectionObserver(Dr,mn);return zr.observe(Gt),()=>{Mr.disconnect(),zr.disconnect()}}},[z,b,ye,f==null?void 0:f.length]),R.useEffect(()=>{se(!0)},[]),R.useEffect(()=>{Re()}),R.useEffect(()=>{Fe(K8!==Q)},[Fe,Q]),R.useImperativeHandle(c,()=>({updateIndicator:Re,updateScrollButtons:Ne}),[Re,Ne]);const Rt=C.jsx(Nxe,F({},I,{className:je(J.indicator,I.className),ownerState:Y,style:F({},Q,I.style)}));let ct=0;const ke=R.Children.map(f,Ie=>{if(!R.isValidElement(Ie))return null;const Ue=Ie.props.value===void 0?ct:Ie.props.value;Qe.set(Ue,ct);const yt=Ue===L;return ct+=1,R.cloneElement(Ie,F({fullWidth:N==="fullWidth",indicator:yt&&!ue&&Rt,selected:yt,selectionFollowsFocus:x,onChange:y,textColor:O,value:Ue},ct===1&&L===!1&&!Ie.props.tabIndex?{tabIndex:0}:{}))}),ot=Ie=>{const Ue=at.current,yt=Ir(Ue).activeElement;if(yt.getAttribute("role")!=="tab")return;let mn=S==="horizontal"?"ArrowLeft":"ArrowUp",$r=S==="horizontal"?"ArrowRight":"ArrowDown";switch(S==="horizontal"&&o&&(mn="ArrowRight",$r="ArrowLeft"),Ie.key){case mn:Ie.preventDefault(),s_(Ue,yt,Y8);break;case $r:Ie.preventDefault(),s_(Ue,yt,X8);break;case"Home":Ie.preventDefault(),s_(Ue,null,X8);break;case"End":Ie.preventDefault(),s_(Ue,null,Y8);break}},$t=Ye();return C.jsxs(Mxe,F({className:je(J.root,h),ownerState:Y,ref:n,as:p},W,{children:[$t.scrollButtonStart,$t.scrollbarSizeListener,C.jsxs(Dxe,{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(Lxe,{"aria-label":s,"aria-labelledby":l,"aria-orientation":S==="vertical"?"vertical":null,className:J.flexContainer,ownerState:Y,onKeyDown:ot,ref:at,role:"tablist",children:ke}),ue&&Rt]}),$t.scrollButtonEnd]}))}),$xe=Fxe;function zxe(e){return Et("MuiTextField",e)}kt("MuiTextField",["root"]);const jxe=["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"],Uxe={standard:ZK,filled:YK,outlined:sQ},Hxe=e=>{const{classes:t}=e;return At({root:["root"]},zxe,t)},Wxe=Ee(uve,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gxe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:h=!1,FormHelperTextProps:p,fullWidth:g=!1,helperText:v,id:y,InputLabelProps:S,inputProps:_,InputProps:b,inputRef:x,label:E,maxRows:k,minRows:I,multiline:A=!1,name:O,onBlur:L,onChange:N,onFocus:H,placeholder:W,required:z=!1,rows:D,select:$=!1,SelectProps:j,type:V,value:G,variant:K="outlined"}=r,Y=Le(r,jxe),J=F({},r,{autoFocus:o,color:c,disabled:f,error:h,fullWidth:g,multiline:A,required:z,select:$,variant:K}),ie=Hxe(J),ce={};K==="outlined"&&(S&&typeof S.shrink<"u"&&(ce.notched=S.shrink),ce.label=E),$&&((!j||!j.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const ue=M5(y),se=v&&ue?`${ue}-helper-text`:void 0,Q=E&&ue?`${ue}-label`:void 0,ae=Uxe[K],le=C.jsx(ae,F({"aria-describedby":se,autoComplete:i,autoFocus:o,defaultValue:d,fullWidth:g,multiline:A,name:O,rows:D,maxRows:k,minRows:I,type:V,value:G,id:ue,inputRef:x,onBlur:L,onChange:N,onFocus:H,placeholder:W,inputProps:_},ce,b));return C.jsxs(Wxe,F({className:je(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(Yve,F({htmlFor:ue,id:Q},S,{children:E})),$?C.jsx(obe,F({"aria-describedby":se,id:ue,labelId:Q,value:G,input:le},j,{children:s})):le,v&&C.jsx(Tve,F({id:se},p,{children:v}))]}))}),J1=Gxe;function xn({vertical:e,...t}){return C.jsx(dt,{position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:e?"column":"row",...t})}const lQ=Ft(C.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z"}),"AccountTreeOutlined"),Vxe=Ft(C.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),qxe=Ft(C.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),Xxe=Ft(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"),Yxe=Ft(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"),Kxe=Ft(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"),Qxe=Ft(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"),Jxe=Ft(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"),Zxe=Ft(C.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined"),e1e=Ft(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"),cQ=Ft(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"),t1e=Ft(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"),n1e=Ft(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"),r1e=Ft(C.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}),"DragHandleOutlined"),fA=Ft(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"),i1e=Ft(C.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),uQ=Ft(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"),o1e=Ft(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"),s1e=Ft(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"),a1e=Ft(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"),l1e=Ft(C.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),c1e=Ft(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"),Z1=Ft(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"),dQ=Ft(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"),u1e=Ft(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"),d1e=Ft(C.jsx("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"PauseOutlined"),f1e=Ft(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"),h1e=Ft(C.jsx("path",{d:"M10 8.64 15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"}),"PlayArrowOutlined"),fQ=Ft(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"),p1e=Ft(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"),m1e=Ft(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"),g1e=Ft(C.jsx("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined"),v1e=Ft(C.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined"),MS=Ft(C.jsx("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined"),y1e=Ft(C.jsx("path",{d:"M16 8v8H8V8h8m2-2H6v12h12V6z"}),"StopOutlined"),b1e=Ft(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"),Q8=Ft(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"),hQ=Ft(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"),x1e=Ft(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"),w1e=Ft(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"),_1e=Ft(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 FE={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 + */FE.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,k=32,I=64,A=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,$=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",A],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",k],["partialRight",I],["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]",Re="[object RegExp]",$e="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",ze="[object WeakSet]",Ye="[object ArrayBuffer]",Fe="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",ke="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Ie="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Gt=/\b__p \+= '';/g,mn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mr=/&(?:amp|lt|gt|quot|#39);/g,Dr=/[&<>"']/g,zr=RegExp(Mr.source),ei=RegExp(Dr.source),ts=/<%-([\s\S]+?)%>/g,Bu=/<%([\s\S]+?)%>/g,Xs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ns=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(ns.source),lo=/^\s+/,cc=/\s/,Ti=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rs=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,is=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Wn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zn=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,_l=/^0b[01]+$/i,co=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Jt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yr=/($^)/,vk=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",yk="\\u0300-\\u036f",bk="\\ufe20-\\ufe2f",xk="\\u20d0-\\u20ff",Ev=yk+bk+xk,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",wk="\\xac\\xb1\\xd7\\xf7",_k="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sk="\\u2000-\\u206f",Ek=" \\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",Av="A-Z\\xc0-\\xd6\\xd8-\\xde",kv="\\ufe0e\\ufe0f",Iv=wk+_k+Sk+Ek,ff="['’]",Ck="["+uc+"]",Rv="["+Iv+"]",dc="["+Ev+"]",Pv="\\d+",Tk="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+uc+Iv+Pv+Cv+Tv+Av+"]",hf="\\ud83c[\\udffb-\\udfff]",Ak="(?:"+dc+"|"+hf+")",Dv="[^"+uc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",os="["+Av+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",kk="(?:"+os+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",Fv="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",$v=Ak+"?",zv="["+kv+"]?",Ik="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+$v+")*",Rk="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+$v+Ik,Ok="(?:"+[Tk,pf,mf].join("|")+")"+jv,Mk="(?:"+[Dv+dc+"?",dc,pf,mf,Ck].join("|")+")",Dk=RegExp(ff,"g"),Lk=RegExp(dc,"g"),gf=RegExp(hf+"(?="+hf+")|"+Mk+jv,"g"),Nk=RegExp([os+"?"+Ov+"+"+Bv+"(?="+[Rv,os,"$"].join("|")+")",kk+"+"+Fv+"(?="+[Rv,os+Nv,"$"].join("|")+")",os+"?"+Nv+"+"+Bv,os+"+"+Fv,Pk,Rk,Pv,Ok].join("|"),"g"),Bk=RegExp("["+Lv+uc+Ev+kv+"]"),Fk=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$k=["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"],zk=-1,Ot={};Ot[Ne]=Ot[Rt]=Ot[ct]=Ot[ke]=Ot[ot]=Ot[$t]=Ot[Ie]=Ot[Ue]=Ot[yt]=!0,Ot[se]=Ot[Q]=Ot[Ye]=Ot[le]=Ot[Fe]=Ot[he]=Ot[ve]=Ot[ye]=Ot[me]=Ot[be]=Ot[qe]=Ot[Re]=Ot[$e]=Ot[it]=Ot[_e]=!1;var Ct={};Ct[se]=Ct[Q]=Ct[Ye]=Ct[Fe]=Ct[le]=Ct[he]=Ct[Ne]=Ct[Rt]=Ct[ct]=Ct[ke]=Ct[ot]=Ct[me]=Ct[be]=Ct[qe]=Ct[Re]=Ct[$e]=Ct[it]=Ct[pt]=Ct[$t]=Ct[Ie]=Ct[Ue]=Ct[yt]=!0,Ct[ve]=Ct[ye]=Ct[_e]=!1;var jk={À:"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"},Uk={"&":"&","<":"<",">":">",'"':""","'":"'"},Hk={"&":"&","<":"<",">":">",""":'"',"'":"'"},Wk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gk=parseFloat,Vk=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,qk=typeof self=="object"&&self&&self.Object===Object&&self,fn=Uv||qk||Function("return this")(),vf=t&&!t.nodeType&&t,uo=vf&&!0&&e&&!e.nodeType&&e,Hv=uo&&uo.exports===vf,yf=Hv&&Uv.process,nr=function(){try{var q=uo&&uo.require&&uo.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=nr&&nr.isArrayBuffer,Gv=nr&&nr.isDate,Vv=nr&&nr.isMap,qv=nr&&nr.isRegExp,Xv=nr&&nr.isSet,Yv=nr&&nr.isTypedArray;function Gn(q,ee,Z){switch(Z.length){case 0:return q.call(ee);case 1:return q.call(ee,Z[0]);case 2:return q.call(ee,Z[0],Z[1]);case 3:return q.call(ee,Z[0],Z[1],Z[2])}return q.apply(ee,Z)}function Xk(q,ee,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,ee,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,ee){for(var Z=q.length;Z--&&ss(ee,q[Z],0)>-1;);return Z}function rI(q,ee){for(var Z=q.length,ge=0;Z--;)q[Z]===ee&&++ge;return ge}var iI=Sf(jk),oI=Sf(Uk);function sI(q){return"\\"+Wk[q]}function aI(q,ee){return q==null?n:q[ee]}function as(q){return Bk.test(q)}function lI(q){return Fk.test(q)}function cI(q){for(var ee,Z=[];!(ee=q.next()).done;)Z.push(ee.value);return Z}function Af(q){var ee=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++ee]=[De,ge]}),Z}function iy(q,ee){return function(Z){return q(ee(Z))}}function Ii(q,ee){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function KI(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}ti.prototype.clear=VI,ti.prototype.delete=qI,ti.prototype.get=XI,ti.prototype.has=YI,ti.prototype.set=KI;function ni(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function sr(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(!zt(a))return a;var re=Be(a);if(re){if(B=eP(a),!U)return On(a,B)}else{var oe=yn(a),fe=oe==ye||oe==xe;if(Li(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?HR(a,fR(B,a)):UR(a,gy(B,a))}else{if(!Ct[oe])return T?a:{};B=tP(a,oe,U)}}M||(M=new xr);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(Ae){B.add(sr(Ae,u,m,Ae,a,M))}):O0(a)&&a.forEach(function(Ae,Ke){B.set(Ke,sr(Ae,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:rn,Ve=re?n:Te(a);return rr(Ve||a,function(Ae,Ke){Ve&&(Ke=Ae,Ae=a[Ke]),Ra(B,Ke,sr(Ae,u,m,Ke,a,M))}),B}function hR(a){var u=rn(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=_t(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 ir(s);return Ba(function(){a.apply(n,m)},u)}function Pa(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Vn(m))),w?(M=bf,B=!1):u.length>=i&&(M=Ea,B=!1,u=new po(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?hn(U,u-1,m,w,T):ki(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function jr(a,u){return a&&Df(a,u,rn)}function Lf(a,u){return a&&wy(a,u,rn)}function Pc(a,u){return Ai(u,function(m){return ai(a[m])})}function go(a,u){u=Mi(u,a);for(var m=0,w=u.length;a!=null&&mu}function gR(a,u){return a!=null&&vt.call(a,u)}function vR(a,u){return a!=null&&u in _t(a)}function yR(a,u,m){return a>=vn(u,m)&&a=120&&re.length>=120)?new po(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.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;si(T)?_c.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Cc(fy()*(u-a+1))}function PR(a,u,m,w){for(var T=-1,M=en(Ec((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=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function OR(a){return my(ys(a))}function MR(a,u){var m=ys(a);return Uc(m,mo(u,0,m.length))}function Da(a,u,m,w){if(!zt(a))return a;u=Mi(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&&!Xn(B)&&(m?B<=u:B=i){var ne=u?null:qR(a);if(ne)return pc(ne);B=!1,T=Ea,X=new po}else X=u?[]:U;e:for(;++w=w?a:ar(a,u,m)}var $y=EI||function(a){return fn.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 xc(u).set(new xc(a)),u}function FR(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function $R(a){var u=new a.constructor(a.source,Zn.exec(a));return u.lastIndex=a.lastIndex,u}function zR(a){return Ia?_t(Ia.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=Xn(a),B=u!==n,U=u===null,X=u===u,ne=Xn(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=en(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=_t(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return oi(function(u){var m=u.length,w=m,T=or.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new ir(s);if(T&&!B&&zc(M)=="wrapper")var B=new or([],!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 po:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Ti,`{ +/* [wrapped with `+u+`] */ +`)}function rP(a){return Be(a)||bo(a)||!!(uy&&a&&a[uy])}function si(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 Uc(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 p2(a,u){return u(a),a}function Hc(a,u){return u(a)}var m2=oi(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)||!si(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new or(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function g2(){return w0(this)}function v2(){return new or(this.value(),this.__chain__)}function y2(){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 b2(){return this}function x2(a){for(var u,m=this;m instanceof kc;){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 w2(){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:Hc,args:[ah],thisArg:n}),new or(u,this.__chain__)}return this.thru(ah)}function _2(){return By(this.__wrapped__,this.__actions__)}var S2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ri(a,m,1)});function E2(a,u,m){var w=Be(a)?Kv:pR;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function C2(a,u){var m=Be(a)?Ai:xy;return m(a,Ce(u,3))}var T2=Xy(m0),A2=Xy(g0);function k2(a,u){return hn(Wc(a,u),1)}function I2(a,u){return hn(Wc(a,u),V)}function R2(a,u,m){return m=m===n?1:We(m),hn(Wc(a,u),m)}function _0(a,u){var m=Be(a)?rr:Pi;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?Yk:by;return m(a,Ce(u,3))}var P2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ri(a,m,[u])});function O2(a,u,m,w){a=Mn(a)?a:ys(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=en(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&ss(a,u,m)>-1}var M2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Pi(a,function(B){M[++w]=T?Gn(u,B,m):Oa(B,u,m)}),M}),D2=Lc(function(a,u,m){ri(a,m,u)});function Wc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function L2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ry(a,u,m))}var N2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function B2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Pi)}function F2(a,u,m){var w=Be(a)?Kk:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function $2(a,u){var m=Be(a)?Ai:xy;return m(a,qc(Ce(u,3)))}function z2(a){var u=Be(a)?my:OR;return u(a)}function j2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?cR:MR;return w(a,u)}function U2(a){var u=Be(a)?uR:LR;return u(a)}function H2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ls(a):a.length;var u=yn(a);return u==me||u==$e?a.size:$f(a).length}function W2(a,u,m){var w=Be(a)?wf:NR;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var G2=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]]),Ry(a,hn(u,1),[])}),Gc=CI||function(){return fn.Date.now()};function V2(a,u){if(typeof u!="function")throw new ir(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,ii(a,A,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new ir(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=Ii(m,gs(ch));w|=k}return ii(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ii(m,gs(T0));w|=k}return ii(u,w,a,m,T)});function A0(a,u,m){u=m?n:u;var w=ii(a,x,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function k0(a,u,m){u=m?n:u;var w=ii(a,E,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function I0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new ir(s);u=cr(u)||0,zt(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?en(cr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Kt){var _r=w,ci=T;return w=T=n,ne=Kt,B=a.apply(ci,_r),B}function Te(Kt){return ne=Kt,U=Ba(Ke,u),re?we(Kt):B}function Ve(Kt){var _r=Kt-X,ci=Kt-ne,X0=u-_r;return oe?vn(X0,M-ci):X0}function Ae(Kt){var _r=Kt-X,ci=Kt-ne;return X===n||_r>=u||_r<0||oe&&ci>=M}function Ke(){var Kt=Gc();if(Ae(Kt))return nt(Kt);U=Ba(Ke,Ve(Kt))}function nt(Kt){return U=n,fe&&w?we(Kt):(w=T=n,B)}function Yn(){U!==n&&$y(U),ne=0,w=X=T=U=n}function An(){return U===n?B:nt(Gc())}function Kn(){var Kt=Gc(),_r=Ae(Kt);if(w=arguments,T=this,X=Kt,_r){if(U===n)return Te(X);if(oe)return $y(U),U=Ba(Ke,u),we(X)}return U===n&&(U=Ba(Ke,u)),B}return Kn.cancel=Yn,Kn.flush=An,Kn}var q2=Xe(function(a,u){return yy(a,1,u)}),X2=Xe(function(a,u,m){return yy(a,cr(u)||0,m)});function Y2(a){return ii(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new ir(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(Vc.Cache||ni),m}Vc.Cache=ni;function qc(a){if(typeof a!="function")throw new ir(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 K2(a){return C0(2,a)}var Q2=BR(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Vn(Ce())):Lt(hn(u,1),Vn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=vn(w.length,m);++T=u}),bo=Sy(function(){return arguments}())?Sy:function(a){return Ut(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,fO=Wv?Vn(Wv):xR;function Mn(a){return a!=null&&Xc(a.length)&&!ai(a)}function Yt(a){return Ut(a)&&Mn(a)}function hO(a){return a===!0||a===!1||Ut(a)&&Cn(a)==le}var Li=AI||wh,pO=Gv?Vn(Gv):wR;function mO(a){return Ut(a)&&a.nodeType===1&&!Fa(a)}function gO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Li(a)||vs(a)||bo(a)))return!a.length;var u=yn(a);if(u==me||u==$e)return!a.size;if(Na(a))return!$f(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function vO(a,u){return Ma(a,u)}function yO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ma(a,u,n,m):!!w}function dh(a){if(!Ut(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Fa(a)}function bO(a){return typeof a=="number"&&dy(a)}function ai(a){if(!zt(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 Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function zt(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function Ut(a){return a!=null&&typeof a=="object"}var O0=Vv?Vn(Vv):SR;function xO(a,u){return a===u||Ff(a,u,th(u))}function wO(a,u,m){return m=typeof m=="function"?m:n,Ff(a,u,th(u),m)}function _O(a){return M0(a)&&a!=+a}function SO(a){if(sP(a))throw new De(o);return Ey(a)}function EO(a){return a===null}function CO(a){return a==null}function M0(a){return typeof a=="number"||Ut(a)&&Cn(a)==be}function Fa(a){if(!Ut(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==wI}var fh=qv?Vn(qv):ER;function TO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Vn(Xv):CR;function Yc(a){return typeof a=="string"||!Be(a)&&Ut(a)&&Cn(a)==it}function Xn(a){return typeof a=="symbol"||Ut(a)&&Cn(a)==pt}var vs=Yv?Vn(Yv):TR;function AO(a){return a===n}function kO(a){return Ut(a)&&yn(a)==_e}function IO(a){return Ut(a)&&Cn(a)==ze}var RO=$c(zf),PO=$c(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Yc(a)?br(a):On(a);if(Ca&&a[Ca])return cI(a[Ca]());var u=yn(a),m=u==me?Af:u==$e?pc:ys;return m(a)}function li(a){if(!a)return a===0?a:0;if(a=cr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=li(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?mo(We(a),0,J):0}function cr(a){if(typeof a=="number")return a;if(Xn(a))return Y;if(zt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=zt(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)?Vk(a.slice(2),m?2:8):wl.test(a)?Y:+a}function B0(a){return Ur(a,Dn(a))}function OO(a){return a?mo(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":qn(a)}var MO=ps(function(a,u){if(Na(u)||Mn(u)){Ur(u,rn(u),a);return}for(var m in u)vt.call(u,m)&&Ra(a,m,u[m])}),F0=ps(function(a,u){Ur(u,Dn(u),a)}),Kc=ps(function(a,u,m,w){Ur(u,Dn(u),a,w)}),DO=ps(function(a,u,m,w){Ur(u,rn(u),a,w)}),LO=oi(Mf);function NO(a,u){var m=hs(a);return u==null?m:gy(m,u)}var BO=Xe(function(a,u){a=_t(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}),Ur(a,Zf(a),m),w&&(m=sr(m,h|p|g,XR));for(var T=u.length;T--;)Gf(m,u[T]);return m});function tM(a,u){return z0(a,qc(Ce(u)))}var nM=oi(function(a,u){return a==null?{}:IR(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 rM(a,u,m){u=Mi(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 vn(a+T*(u-a+Gk("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var pM=ms(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(Jt,iI).replace(Lk,"")}function mM(a,u,m){a=ft(a),u=qn(u);var w=a.length;m=m===n?w:mo(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function gM(a){return a=ft(a),a&&ei.test(a)?a.replace(Dr,oI):a}function vM(a){return a=ft(a),a&&uf.test(a)?a.replace(ns,"\\$&"):a}var yM=ms(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),bM=ms(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),xM=qy("toLowerCase");function wM(a,u,m){a=ft(a),u=We(u);var w=u?ls(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Cc(T),m)+a+Fc(Ec(T),m)}function _M(a,u,m){a=ft(a),u=We(u);var w=u?ls(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=qn(u),!u&&as(a))?Di(br(a),0,m):a.split(u,m)):[]}var IM=ms(function(a,u,m){return a+(m?" ":"")+mh(u)});function RM(a,u,m){return a=ft(a),m=m==null?0:mo(We(m),0,a.length),u=qn(u),a.slice(m,m+u.length)==u}function PM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,e0);var T=Kc({},u.imports,w.imports,e0),M=rn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||yr,oe="__p += '",fe=kf((u.escape||yr).source+"|"+re.source+"|"+(re===Xs?Wn:yr).source+"|"+(u.evaluate||yr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zk+"]")+` +`;a.replace(fe,function(Ae,Ke,nt,Yn,An,Kn){return nt||(nt=Yn),oe+=a.slice(ne,Kn).replace(vk,sI),Ke&&(U=!0,oe+=`' + +__e(`+Ke+`) + +'`),An&&(X=!0,oe+=`'; +`+An+`; +__p += '`),nt&&(oe+=`' + +((__t = (`+nt+`)) == null ? '' : __t) + +'`),ne=Kn+Ae.length,Ae}),oe+=`'; +`;var Te=vt.call(u,"variable")&&u.variable;if(!Te)oe=`with (obj) { +`+oe+` +} +`;else if(Sa.test(Te))throw new De(l);oe=(X?oe.replace(Gt,""):oe).replace(mn,"$1").replace($r,"$1;"),oe="function("+(Te||"obj")+`) { +`+(Te?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(X?`, __j = Array.prototype.join; +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 OM(a){return ft(a).toLowerCase()}function MM(a){return ft(a).toUpperCase()}function DM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=qn(u)))return a;var w=br(a),T=br(u),M=ny(w,T),B=ry(w,T)+1;return Di(w,M,B).join("")}function LM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=qn(u)))return a;var w=br(a),T=ry(w,br(u))+1;return Di(w,0,T).join("")}function NM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(lo,"");if(!a||!(u=qn(u)))return a;var w=br(a),T=ny(w,br(u));return Di(w,T).join("")}function BM(a,u){var m=N,w=H;if(zt(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?qn(u.omission):w}a=ft(a);var M=a.length;if(as(a)){var B=br(a);M=B.length}if(m>=M)return a;var U=m-ls(w);if(U<1)return w;var X=B?Di(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=kf(T.source,ft(Zn.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(qn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function FM(a){return a=ft(a),a&&zr.test(a)?a.replace(Mr,hI):a}var $M=ms(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?lI(a)?gI(a):Zk(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Gn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),zM=oi(function(a,u){return rr(u,function(m){m=Hr(m),ri(a,m,ch(a[m],a))}),a});function jM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new ir(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=vn(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)},jr(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,ki([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 Ae=a.apply(B,U);return Ae.__actions__.push({func:Hc,args:[oe],thisArg:n}),new or(Ae,fe)}return Te&&Ve?a.apply(this,U):(Ae=this.thru(oe),Te?w?Ae.value()[0]:Ae.value():Ae)})}),rr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[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)})}}),jr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(fs,w)||(fs[w]=[]),fs[w].push({name:u,func:m})}}),fs[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=FI,Je.prototype.reverse=$I,Je.prototype.value=zI,P.prototype.at=m2,P.prototype.chain=g2,P.prototype.commit=v2,P.prototype.next=y2,P.prototype.plant=x2,P.prototype.reverse=w2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=_2,P.prototype.first=P.prototype.head,Ca&&(P.prototype[Ca]=b2),P},cs=vI();uo?((uo.exports=cs)._=cs,vf._=cs):fn._=cs}).call(Bt)})(FE,FE.exports);var te=FE.exports;function Jr(e){return C.jsx(dt,{px:.5,display:"inline-block",...e})}function az({primary:e,secondary:t}){return C.jsxs(xn,{children:[C.jsx(dt,{children:e}),C.jsx(Jr,{}),C.jsx(dt,{sx:{opacity:.56},children:t})]})}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +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 $E=function(){return $E=Object.assign||function(t){for(var n,r=1,i=arguments.length;r>>0).toString(36)},O1e=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(R1e,"-$&").toLowerCase()},decl:function(i,o){return i=r.kebab(i),i+":"+o+";"},hash:function(i){return P1e(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--}}pQ.removeRule=D1e;var L1e=pQ.removeRule,N1e=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(){L1e(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 S$(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]==="@")S$(e,l,n,s);else{var c=s.indexOf("&")>-1,d=n.split(",");if(c)for(var f=0;ft,hA=(e,t)=>({...e,...t});function nc(e,{init:t,effect:n,reduce:r=hA}={}){const i=R.createContext([e,te.noop]);return[()=>R.useContext(i),({children:o})=>{const[s,l]=I1e(e),c=R.useCallback(f=>{const h=r(s(),f(s()));n==null||n({prev:s(),next:h}),l(h)},[s]),d=R.useMemo(()=>[s(),c],[s(),c]);return C1e(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[bQ,K1e]=nc([],{reduce:(e,t)=>[t,...e]}),xQ=R.createContext(()=>te.noop);function vl(){return R.useContext(xQ)}function Q1e({children:e}){const[t,n]=R.useState([]),[r,i]=R.useState(!1),[o,s]=R.useState(void 0),[,l]=bQ();R.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=R.useCallback((h,p)=>(n(g=>[...g,{message:C.jsx(az,{primary:h,secondary:p}),key:new Date().getTime()}]),l(()=>({content:te.filter([h,p]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`})),()=>d()),[n]),d=(h,p)=>{p!=="clickaway"&&i(!1)},f=()=>s(void 0);return C.jsxs(C.Fragment,{children:[C.jsx(xQ.Provider,{value:c,children:e}),C.jsx(Bbe,{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(xp,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:d,children:C.jsx(cQ,{})})})},o==null?void 0:o.key)]})}/*! + * OverlayScrollbars + * Version: 2.3.2 + * + * Copyright (c) Rene Haas | KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + */function En(e,t){if(mA(e))for(let n=0;nt(e[n],n,e));return e}function to(e,t){const n=Zd(t);if(js(t)||n){let i=n?"":{};if(e){const o=window.getComputedStyle(e,null);i=n?nH(e,o,t):t.reduce((s,l)=>(s[l]=nH(e,o,l),s),i)}return i}e&&En(Us(t),i=>hwe(e,i,t[i]))}const el=(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]]},ew=()=>typeof window<"u",wQ=ew()&&Node.ELEMENT_NODE,{toString:J1e,hasOwnProperty:fL}=Object.prototype,Du=e=>e===void 0,pA=e=>e===null,Z1e=e=>Du(e)||pA(e)?`${e}`:J1e.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Td=e=>typeof e=="number",Zd=e=>typeof e=="string",cz=e=>typeof e=="boolean",ml=e=>typeof e=="function",js=e=>Array.isArray(e),r1=e=>typeof e=="object"&&!js(e)&&!pA(e),mA=e=>{const t=!!e&&e.length,n=Td(t)&&t>-1&&t%1==0;return js(e)||!ml(e)&&n?t>0&&r1(e)?t-1 in e:!0:!1},E$=e=>{if(!e||!r1(e)||Z1e(e)!=="object")return!1;let t;const n="constructor",r=e[n],i=r&&r.prototype,o=fL.call(e,n),s=i&&fL.call(i,"isPrototypeOf");if(r&&!o&&!s)return!1;for(t in e);return Du(t)||fL.call(e,t)},vx=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===wQ:!1},gA=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===wQ:!1},vA=(e,t,n)=>e.indexOf(t,n),zn=(e,t,n)=>(!n&&!Zd(t)&&mA(t)?Array.prototype.push.apply(e,t):e.push(t),e),Sp=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{zn(n,r)}):En(e,r=>{zn(n,r)}),n)},uz=e=>!!e&&e.length===0,rc=(e,t,n)=>{En(e,i=>i&&i.apply(void 0,t||[])),!n&&(e.length=0)},yA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Us=e=>e?Object.keys(e):[],Ar=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||pA(e))&&!ml(e)&&(e={}),En(l,c=>{En(Us(c),d=>{const f=c[d];if(e===f)return!0;const h=js(f);if(f&&E$(f)){const p=e[d];let g=p;h&&!js(p)?g=[]:!h&&!E$(p)&&(g={}),e[d]=Ar(g,f)}else e[d]=h?f.slice():f})}),e},dz=e=>{for(const t in e)return!1;return!0},_Q=(e,t,n,r)=>{if(Du(r))return n?n[e]:t;n&&(Zd(r)||Td(r))&&(n[e]=r)},Co=(e,t,n)=>{if(Du(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},SQ=(e,t)=>new Set((Co(e,t)||"").split(" ")),Lo=(e,t)=>{e&&e.removeAttribute(t)},ip=(e,t,n,r)=>{if(n){const i=SQ(e,t);i[r?"add":"delete"](n);const o=Sp(i).join(" ").trim();Co(e,t,o)}},ewe=(e,t,n)=>SQ(e,t).has(n),ll=(e,t)=>_Q("scrollLeft",0,e,t),vu=(e,t)=>_Q("scrollTop",0,e,t),C$=ew()&&Element.prototype,EQ=(e,t)=>{const n=[],r=t?gA(t)&&t:document;return r?zn(n,r.querySelectorAll(e)):n},twe=(e,t)=>{const n=t?gA(t)&&t:document;return n?n.querySelector(e):null},zE=(e,t)=>gA(e)?(C$.matches||C$.msMatchesSelector).call(e,t):!1,fz=e=>e?Sp(e.childNodes):[],Cu=e=>e&&e.parentElement,Fm=(e,t)=>{if(gA(e)){const n=C$.closest;if(n)return n.call(e,t);do{if(zE(e,t))return e;e=Cu(e)}while(e)}},nwe=(e,t,n)=>{const r=Fm(e,t),i=e&&twe(n,r),o=Fm(i,t)===r;return r&&i?r===e||i===e||o&&Fm(Fm(e,n),t)!==r:!1},hz=(e,t,n)=>{if(n&&e){let r=t,i;mA(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)}},oa=(e,t)=>{hz(e,null,t)},rwe=(e,t)=>{hz(Cu(e),e,t)},Z8=(e,t)=>{hz(Cu(e),e&&e.nextSibling,t)},Jl=e=>{if(mA(e))En(Sp(e),t=>Jl(t));else if(e){const t=Cu(e);t&&t.removeChild(e)}},op=e=>{const t=document.createElement("div");return e&&Co(t,"class",e),t},CQ=e=>{const t=op();return t.innerHTML=e.trim(),En(fz(t),n=>Jl(n))},T$=e=>e.charAt(0).toUpperCase()+e.slice(1),iwe=()=>op().style,owe=["-webkit-","-moz-","-o-","-ms-"],swe=["WebKit","Moz","O","MS","webkit","moz","o","ms"],hL={},pL={},awe=e=>{let t=pL[e];if(yA(pL,e))return t;const n=T$(e),r=iwe();return En(owe,i=>{const o=i.replace(/-/g,"");return!(t=[e,i+e,o+n,T$(o)+n].find(l=>r[l]!==void 0))}),pL[e]=t||""},av=e=>{if(ew()){let t=hL[e]||window[e];return yA(hL,e)||(En(swe,n=>(t=t||window[n+T$(e)],!t)),hL[e]=t),t}},lwe=av("MutationObserver"),eH=av("IntersectionObserver"),$m=av("ResizeObserver"),TQ=av("cancelAnimationFrame"),AQ=av("requestAnimationFrame"),A$=av("ScrollTimeline"),jE=ew()&&window.setTimeout,k$=ew()&&window.clearTimeout,cwe=/[^\x20\t\r\n\f]+/g,kQ=(e,t,n)=>{const r=e&&e.classList;let i,o=0,s=!1;if(r&&t&&Zd(t)){const l=t.match(cwe)||[];for(s=l.length>0;i=l[o++];)s=!!n(r,i)&&s}return s},pz=(e,t)=>{kQ(e,t,(n,r)=>n.remove(r))},Bd=(e,t)=>(kQ(e,t,(n,r)=>n.add(r)),pz.bind(0,e,t)),bA=(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},IQ=(e,t)=>bA(e,t,["w","h"]),RQ=(e,t)=>bA(e,t,["x","y"]),uwe=(e,t)=>bA(e,t,["t","r","b","l"]),tH=(e,t,n)=>bA(e,t,["width","height"],n&&(r=>Math.round(r))),Ts=()=>{},Nh=e=>{let t;const n=e?jE:AQ,r=e?k$:TQ;return[i=>{r(t),t=n(i,ml(e)?e():e)},()=>r(t)]},mz=(e,t)=>{let n,r,i,o=Ts;const{g:s,v:l,p:c}=t||{},d=function(v){o(),k$(n),n=r=void 0,o=Ts,e.apply(this,v)},f=g=>c&&r?c(r,g):g,h=()=>{o!==Ts&&d(f(i)||i)},p=function(){const v=Sp(arguments),y=ml(s)?s():s;if(Td(y)&&y>=0){const _=ml(l)?l():l,b=Td(_)&&_>=0,x=y>0?jE:AQ,E=y>0?k$:TQ,I=f(v)||v,A=d.bind(0,I);o();const O=x(A,y);o=()=>E(O),b&&!n&&(n=jE(h,_)),r=i=I}else d(v)};return p.m=h,p},dwe={opacity:1,zIndex:1},a_=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},fwe=(e,t)=>!dwe[e]&&Td(t)?`${t}px`:t,nH=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),hwe=(e,t,n)=>{try{const{style:r}=e;Du(r[t])?r.setProperty(t,n):r[t]=fwe(t,n)}catch{}},Og=e=>to(e,"direction")==="rtl",rH=(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=to(e,[o,s,l,c]);return{t:a_(d[o],!0),r:a_(d[s],!0),b:a_(d[l],!0),l:a_(d[c],!0)}},Mg=(e,t)=>`translate${js(e)?`(${e[0]},${e[1]})`:`${t?"X":"Y"}(${e})`}`,{round:iH}=Math,gz={w:0,h:0},i1=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:gz,DS=e=>e?{w:e.clientWidth,h:e.clientHeight}:gz,UE=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:gz,HE=e=>{const t=parseFloat(to(e,"height"))||0,n=parseFloat(to(e,"width"))||0;return{w:n-iH(n),h:t-iH(t)}},Nl=e=>e.getBoundingClientRect(),zm=e=>!!(e&&(e.height||e.width));let l_;const pwe=()=>{if(Du(l_)){l_=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){l_=!0}}))}catch{}}return l_},PQ=e=>e.split(" "),mwe=(e,t,n,r)=>{En(PQ(t),i=>{e.removeEventListener(i,n,r)})},Xr=(e,t,n,r)=>{var i;const o=pwe(),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(PQ(t),h=>{const p=c?g=>{e.removeEventListener(h,p,l),n&&n(g)}:n;zn(d,mwe.bind(null,e,h,p,l)),e.addEventListener(h,p,f)}),rc.bind(0,d)},OQ=e=>e.stopPropagation(),MQ=e=>e.preventDefault(),gwe={x:0,y:0},mL=e=>{const t=e?Nl(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:gwe},oH=(e,t)=>{En(js(t)?t:[t],e)},vz=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);oH(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),oH(f=>{ml(f)&&d.add(f)},s),n.bind(0,o,s)}cz(s)&&s&&n();const l=Us(o),c=[];return En(l,d=>{const f=o[d];f&&zn(c,r(d,f))}),rc.bind(0,c)},i=(o,s)=>{const l=t.get(o);En(Sp(l),c=>{s&&!uz(s)?c.apply(0,s):c()})};return r(e||{}),[r,n,i]},sH=e=>JSON.stringify(e,(t,n)=>{if(ml(n))throw new Error;return n}),vwe={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"]}},DQ=(e,t)=>{const n={},r=Us(t).concat(Us(e));return En(r,i=>{const o=e[i],s=t[i];if(r1(o)&&r1(s))Ar(n[i]={},DQ(o,s)),dz(n[i])&&delete n[i];else if(yA(t,i)&&s!==o){let l=!0;if(js(o)||js(s))try{sH(o)===sH(s)&&(l=!1)}catch{}l&&(n[i]=s)}}),n},tw="data-overlayscrollbars",LQ="os-environment",NQ=`${LQ}-flexbox-glue`,ywe=`${NQ}-max`,BQ="os-scrollbar-hidden",gL=`${tw}-initialize`,tl=tw,FQ=`${tl}-overflow-x`,$Q=`${tl}-overflow-y`,rg="overflowVisible",bwe="scrollbarHidden",aH="scrollbarPressed",WE="updating",Qu=`${tw}-viewport`,vL="arrange",zQ="scrollbarHidden",ig=rg,I$=`${tw}-padding`,xwe=ig,lH=`${tw}-content`,yz="os-size-observer",wwe=`${yz}-appear`,_we=`${yz}-listener`,Swe="os-trinsic-observer",Ewe="os-no-css-vars",Cwe="os-theme-none",Zo="os-scrollbar",Twe=`${Zo}-rtl`,Awe=`${Zo}-horizontal`,kwe=`${Zo}-vertical`,jQ=`${Zo}-track`,bz=`${Zo}-handle`,Iwe=`${Zo}-visible`,Rwe=`${Zo}-cornerless`,cH=`${Zo}-transitionless`,uH=`${Zo}-interaction`,dH=`${Zo}-unusable`,R$=`${Zo}-auto-hide`,fH=`${R$}-hidden`,hH=`${Zo}-wheel`,Pwe=`${jQ}-interactive`,Owe=`${bz}-interactive`,UQ={},Ep=()=>UQ,Mwe=e=>{const t=[];return En(js(e)?e:[e],n=>{const r=Us(n);En(r,i=>{zn(t,UQ[i]=n[i])})}),t},Dwe="__osOptionsValidationPlugin",Lwe="__osSizeObserverPlugin",xz="__osScrollbarsHidingPlugin",Nwe="__osClickScrollPlugin";let yL;const pH=(e,t,n,r)=>{oa(e,t);const i=DS(t),o=i1(t),s=HE(n);return r&&Jl(t),{x:o.h-i.h+s.h,y:o.w-i.w+s.w}},Bwe=e=>{let t=!1;const n=Bd(e,BQ);try{t=to(e,awe("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},Fwe=(e,t)=>{const n="hidden";to(e,{overflowX:n,overflowY:n,direction:"rtl"}),ll(e,0);const r=mL(e),i=mL(t);ll(e,-999);const o=mL(t);return{i:r.x===i.x,n:i.x!==o.x}},$we=(e,t)=>{const n=Bd(e,NQ),r=Nl(e),i=Nl(t),o=tH(i,r,!0),s=Bd(e,ywe),l=Nl(e),c=Nl(t),d=tH(c,l,!0);return n(),s(),o&&d},zwe=()=>{const{body:e}=document,n=CQ(`
`)[0],r=n.firstChild,[i,,o]=vz(),[s,l]=el({o:pH(e,n,r),u:RQ},pH.bind(0,e,n,r,!0)),[c]=l(),d=Bwe(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=Ar({},vwe),g=Ar.bind(0,{},p),v=Ar.bind(0,{},h),y={k:c,I:f,A:d,H:to(n,"zIndex")==="-1",B:!!A$,V:Fwe(n,r),Y:$we(n,r),j:i.bind(0,"z"),N:i.bind(0,"r"),q:v,F:b=>Ar(h,b)&&v(),G:g,X:b=>Ar(p,b)&&g(),U:Ar({},h),W:Ar({},p)},S=window.addEventListener,_=mz(b=>o(b?"z":"r"),{g:33,v:99});if(Lo(n,"style"),Jl(n),S("resize",_.bind(0,!1)),!d&&(!f.x||!f.y)){let b;S("resize",()=>{const x=Ep()[xz];b=b||x&&x.R(),b&&b(y,s,_.bind(0,!0))})}return y},es=()=>(yL||(yL=zwe()),yL),wz=(e,t)=>ml(t)?t.apply(0,e):t,jwe=(e,t,n,r)=>{const i=Du(r)?n:r;return wz(e,i)||t.apply(0,e)},HQ=(e,t,n,r)=>{const i=Du(r)?n:r,o=wz(e,i);return!!o&&(vx(o)?o:t.apply(0,e))},Uwe=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:i}=n||{},{I:o,A:s}=es(),{nativeScrollbarsOverlaid:l,body:c}=t,d=r??l,f=Du(i)?c:i,h=(o.x||o.y)&&d,p=e&&(pA(f)?!s:f);return!!h||!!p},_z=new WeakMap,Hwe=(e,t)=>{_z.set(e,t)},Wwe=e=>{_z.delete(e)},WQ=e=>_z.get(e),mH=(e,t)=>e?t.split(".").reduce((n,r)=>n&&yA(n,r)?n[r]:void 0,e):void 0,P$=(e,t,n)=>r=>[mH(e,r),n||mH(t,r)!==void 0],GQ=e=>{let t=e;return[()=>t,n=>{t=Ar({},t,n)}]},c_="tabindex",u_=op.bind(0,""),bL=e=>{oa(Cu(e),fz(e)),Jl(e)},Gwe=e=>{const t=es(),{q:n,A:r}=t,i=Ep()[xz],o=i&&i.T,{elements:s}=n(),{host:l,padding:c,viewport:d,content:f}=s,h=vx(e),p=h?{}:e,{elements:g}=p,{host:v,padding:y,viewport:S,content:_}=g||{},b=h?e:p.target,x=zE(b,"textarea"),E=b.ownerDocument,k=E.documentElement,I=b===E.body,A=E.defaultView,O=jwe.bind(0,[b]),L=HQ.bind(0,[b]),N=wz.bind(0,[b]),H=O.bind(0,u_,d),W=L.bind(0,u_,f),z=H(S),D=z===b,$=D&&I,j=!D&&W(_),V=!D&&vx(z)&&z===j,G=V&&!!N(f),K=G?H():z,Y=G?j:W(),ie=$?k:V?K:z,ce=x?O(u_,l,v):b,ue=$?ie:ce,se=V?Y:j,Q=E.activeElement,ae=!D&&A.top===A&&Q===b,le={Z:b,J:ue,K:ie,tt:!D&&L(u_,c,y),nt:se,ot:!D&&!r&&o&&o(t),st:$?k:ie,et:$?E:ie,ct:A,rt:E,lt:x,it:I,ut:h,ft:D,dt:V,_t:(it,pt)=>ewe(ie,D?tl:Qu,D?pt:it),ht:(it,pt,mt)=>ip(ie,D?tl:Qu,D?pt:it,mt)},he=Us(le).reduce((it,pt)=>{const mt=le[pt];return zn(it,mt&&vx(mt)&&!Cu(mt)?mt:!1)},[]),pe=it=>it?vA(he,it)>-1:null,{Z:ve,J:ye,tt:xe,K:me,nt:be,ot:Qe}=le,qe=[()=>{Lo(ye,tl),Lo(ye,gL),Lo(ve,gL),I&&(Lo(k,tl),Lo(k,gL))}],at=x&&pe(ye);let Nt=x?ve:fz([be,me,xe,ye,ve].find(it=>pe(it)===!1));const Re=$?ve:be||me;return[le,()=>{Co(ye,tl,D?"viewport":"host"),Co(xe,I$,""),Co(be,lH,""),D||Co(me,Qu,"");const it=I&&!D?Bd(Cu(b),BQ):Ts;if(at&&(Z8(ve,ye),zn(qe,()=>{Z8(ye,ve),Jl(ye)})),oa(Re,Nt),oa(ye,xe),oa(xe||ye,!D&&me),oa(me,be),zn(qe,()=>{it(),Lo(xe,I$),Lo(be,lH),Lo(me,FQ),Lo(me,$Q),Lo(me,Qu),pe(be)&&bL(be),pe(me)&&bL(me),pe(xe)&&bL(xe)}),r&&!D&&(ip(me,Qu,zQ,!0),zn(qe,Lo.bind(0,me,Qu))),Qe&&(rwe(me,Qe),zn(qe,Jl.bind(0,Qe))),ae){const pt=Co(me,c_);Co(me,c_,"-1"),me.focus();const mt=()=>pt?Co(me,c_,pt):Lo(me,c_),_e=Xr(E,"pointerdown keydown",()=>{mt(),_e()});zn(qe,[mt,_e])}else Q&&Q.focus&&Q.focus();Nt=0},rc.bind(0,qe)]},Vwe=(e,t)=>{const{nt:n}=e,[r]=t;return i=>{const{Y:o}=es(),{gt:s}=r(),{vt:l}=i,c=(n||!o)&&l;return c&&to(n,{height:s?"":"100%"}),{wt:c,bt:c}}},qwe=(e,t)=>{const[n,r]=t,{J:i,tt:o,K:s,ft:l}=e,[c,d]=el({u:uwe,o:rH()},rH.bind(0,i,"padding",""));return(f,h,p)=>{let[g,v]=d(p);const{A:y,Y:S}=es(),{yt:_}=n(),{wt:b,bt:x,St:E}=f,[k,I]=h("paddingAbsolute");(b||v||!S&&x)&&([g,v]=c(p));const O=!l&&(I||E||v);if(O){const L=!k||!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};to(o||s,W),to(s,z),r({tt:g,$t:!L,P:o?z:Ar({},W,z)})}return{xt:O}}},{max:O$}=Math,Ju=O$.bind(0,0),VQ="visible",gH="hidden",Xwe=42,d_={u:IQ,o:{w:0,h:0}},Ywe={u:RQ,o:{x:gH,y:gH}},Kwe=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:Ju(e.w-t.w),h:Ju(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},f_=e=>e.indexOf(VQ)===0,Qwe=(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}=es(),S=Ep()[xz],_=!c&&!v&&(y.x||y.y),b=f&&c,[x,E]=el(d_,HE.bind(0,s)),[k,I]=el(d_,UE.bind(0,s)),[A,O]=el(d_),[L,N]=el(d_),[H]=el(Ywe),W=(G,K)=>{if(to(s,{height:""}),K){const{$t:Y,tt:J}=n(),{Ct:ie,M:ce}=G,ue=HE(i),se=DS(i),Q=to(s,"boxSizing")==="content-box",ae=Y||Q?J.b+J.t:0,le=!(y.x&&Q);to(s,{height:se.h+ue.h+(ie.x&&le?ce.x:0)-ae})}},z=(G,K)=>{const Y=!v&&!G?Xwe:0,J=(pe,ve,ye)=>{const xe=to(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=f_(ae),pe=le&&he&&ae.replace(`${VQ}-`,"")||"";return[le&&!he?ae:"",f_(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)},$=(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,$):[()=>_,()=>[Ts]];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=f_(ve.x),Qe=f_(ve.y),qe=be||Qe;let at=E(Y),Nt=I(Y),Re=O(Y),$e=N(Y),it;if(pe&&v&&d(zQ,bwe,!xe),me&&(it=z(xe),W(it,ae)),J||ue||ce||Q||pe){qe&&d(ig,rg,!1);const[Ie,Ue]=V(xe,le,it),[yt,Gt]=at=x(Y),[mn,$r]=Nt=k(Y),Mr=DS(s);let Dr=mn,zr=Mr;Ie(),($r||Gt||pe)&&Ue&&!xe&&j(Ue,mn,yt,le)&&(zr=DS(s),Dr=UE(s));const ei={w:Ju(O$(mn.w,Dr.w)+yt.w),h:Ju(O$(mn.h,Dr.h)+yt.h)},ts={w:Ju((b?h.innerWidth:zr.w+Ju(Mr.w-mn.w))+yt.w),h:Ju((b?h.innerHeight+yt.h:zr.h+Ju(Mr.h-mn.h))+yt.h)};$e=L(ts),Re=A(Kwe(ei,ts),Y)}const[pt,mt]=$e,[_e,ze]=Re,[Ye,Fe]=Nt,[Ne,Rt]=at,ct={x:_e.w>0,y:_e.h>0},ke=be&&Qe&&(ct.x||ct.y)||be&&ct.x&&!ct.y||Qe&&ct.y&&!ct.x;if(ue||Q||Rt||Fe||mt||ze||ye||pe||me){const Ie={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ue=D(xe,ct,ve,Ie),yt=j(Ue,Ye,Ne,le);c||$(Ue,le,yt,Ie),me&&W(Ue,ae),c?(Co(i,FQ,Ie.overflowX),Co(i,$Q,Ie.overflowY)):to(s,Ie)}ip(i,tl,rg,ke),ip(o,I$,xwe,ke),c||ip(s,Qu,ig,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:ze}}},vH=(e,t,n)=>{const r={},i=t||{},o=Us(e).concat(Us(i));return En(o,s=>{const l=e[s],c=i[s];r[s]=!!(n||l||c)}),r},Jwe=(e,t)=>{const{Z:n,K:r,ht:i,ft:o}=e,{A:s,I:l,Y:c}=es(),d=!s&&(l.x||l.y),f=[Vwe(e,t),qwe(e,t),Qwe(e,t)];return(h,p,g)=>{const v=vH(Ar({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&&ll(r),_=y&&vu(r);i("",WE,!0);let b=v;return En(f,x=>{b=vH(b,x(b,h,!!g)||{},g)}),ll(r,S),vu(r,_),i("",WE),o||(ll(n,0),vu(n,0)),b}},Zwe=(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):EQ(h,e));g&&g.length&&p&&Zd(p)&&zn(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=Xr(f,h,y=>{i?(v(),r.delete(f)):t(y)});r.set(f,zn(p,v))}else rc(p),r.delete(f)}))}};return n&&(r=new WeakMap,s()),[o,s]},yH=(e,t,n,r)=>{let i=!1;const{Mt:o,Dt:s,Rt:l,kt:c,Bt:d,Vt:f}=r||{},h=mz(()=>i&&n(!0),{g:33,v:99}),[p,g]=Zwe(e,h,l),v=o||[],y=s||[],S=v.concat(y),_=(x,E)=>{const k=d||Ts,I=f||Ts,A=new Set,O=new Set;let L=!1,N=!1;if(En(x,H=>{const{attributeName:W,target:z,type:D,oldValue:$,addedNodes:j,removedNodes:V}=H,G=D==="attributes",K=D==="childList",Y=e===z,J=G&&Zd(W)?Co(z,W):0,ie=J!==0&&$!==J,ce=vA(y,W)>-1&&ie;if(t&&(K||!Y)){const ue=!G,se=G&&ie,Q=se&&c&&zE(z,c),le=(Q?!k(z,W,$,J):ue||se)&&!I(H,!!Q,e,r);En(j,he=>A.add(he)),En(V,he=>A.add(he)),N=N||le}!t&&Y&&ie&&!k(z,W,$,J)&&(O.add(W),L=L||ce)}),A.size>0&&g(H=>Sp(A).reduce((W,z)=>(zn(W,EQ(H,z)),zE(z,H)?zn(W,z):W),[])),t)return!E&&N&&n(!1),[!1];if(O.size>0||L){const H=[Sp(O),L];return!E&&n.apply(0,H),H}},b=new lwe(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!uz(x)&&_(x,!0)}}]},h_=3333333,qQ=(e,t,n)=>{const{Yt:r,Pt:i}=n||{},o=Ep()[Lwe],{V:s}=es(),c=CQ(`
`)[0],d=c.firstChild,f=Og.bind(0,e),[h]=el({o:!1,_:!0,u:(v,y)=>!(!v||!zm(v)&&zm(y))}),p=v=>{const y=js(v)&&v.length>0&&r1(v[0]),S=!y&&cz(v[0]);let _=!1,b=!1,x=!0;if(y){const[E,,k]=h(v.pop().contentRect),I=zm(E),A=zm(k);_=!k&&!!A||!I,b=!A&&I,x=!_}else S?[,x]=v:b=v===!0;if(r&&x){const E=S?v[0]:Og(c);ll(c,E?s.n?-h_:s.i?0:h_:h_),vu(c,h_)}_||t({wt:!S,jt:S?v:void 0,Pt:!!b})},g=[];return[()=>{rc(g),Jl(c)},()=>{let v=i&&p;if($m){const y=new $m(p);y.observe(d),zn(g,()=>{y.disconnect()})}else if(o){const[y,S]=o.O(d,p,i);v=y,zn(g,S)}if(r){const[y]=el({o:void 0},f);zn(g,Xr(c,"scroll",S=>{const _=y(),[b,x,E]=_;x&&(pz(d,"ltr rtl"),Bd(d,b?"rtl":"ltr"),p([!!b,x,E])),OQ(S)}))}v&&(Bd(c,wwe),zn(g,Xr(c,"animationstart",v,{C:!!$m}))),($m||o)&&oa(e,c)}]},e_e=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,t_e=(e,t)=>{let n;const r=op(Swe),i=[],[o]=el({o:!1}),s=(c,d)=>{if(c){const f=o(e_e(c)),[,h]=f;return h&&!d&&t(f)&&[f]}},l=(c,d)=>c&&c.length>0&&s(c.pop(),d);return[()=>{rc(i),Jl(r)},()=>{if(eH)n=new eH(c=>l(c),{root:e}),n.observe(r),zn(i,()=>{n.disconnect()});else{const c=()=>{const h=i1(r);s(h)},[d,f]=qQ(r,c);zn(i,d),f(),c()}oa(e,r)},()=>n&&l(n.takeRecords(),!0)]},bH=`[${tl}]`,n_e=`[${Qu}]`,xL=["tabindex"],xH=["wrap","cols","rows"],wL=["id","class","style","open"],r_e=(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}=es(),[v]=el({u:IQ,o:{w:0,h:0}},()=>{const $=h(ig,rg),j=h(vL,""),V=j&&ll(l),G=j&&vu(l);p(ig,rg),p(vL,""),p("",WE,!0);const K=UE(c),Y=UE(l),J=HE(l);return p(ig,rg,$),p(vL,"",j),p("",WE),ll(l,V),vu(l,G),{w:Y.w+K.w+J.w,h:Y.h+K.h+J.h}}),y=d?xH:wL.concat(xH),S=mz(n,{g:()=>r,v:()=>i,p($,j){const[V]=$,[G]=j;return[Us(V).concat(Us(G)).reduce((K,Y)=>(K[Y]=V[Y]||G[Y],K),{})]}}),_=$=>{En($||xL,j=>{if(vA(xL,j)>-1){const V=Co(s,j);Zd(V)?Co(l,j,V):Lo(l,j)}})},b=($,j)=>{const[V,G]=$,K={vt:G};return t({gt:V}),!j&&n(K),K},x=({wt:$,jt:j,Pt:V})=>{const G=!$||V?n:S;let K=!1;if(j){const[Y,J]=j;K=J,t({yt:Y})}G({wt:$,Pt:V,St:K})},E=($,j)=>{const[,V]=v(),G={bt:V};return V&&!j&&($?n:S)(G),G},k=($,j,V)=>{const G={Tt:j};return j?!V&&S(G):f||_($),G},[I,A,O]=c||!g?t_e(s,b):[Ts,Ts,Ts],[L,N]=f?[Ts,Ts]:qQ(s,x,{Pt:!0,Yt:!0}),[H,W]=yH(s,!1,k,{Dt:wL,Mt:wL.concat(xL)});let z;const D=f&&$m&&new $m($=>{const j=$[$.length-1].contentRect,V=zm(j),K=!zm(z)&&V;x({wt:!0,Pt:K}),z=j});return[()=>{I(),L(),o&&o[0](),D&&D.disconnect(),H()},()=>{D&&D.observe(s),_(),N(),A()},()=>{const $={},j=W(),V=O(),G=o&&o[1]();return j&&Ar($,k.apply(0,zn(j,!0))),V&&Ar($,b.apply(0,zn(V,!0))),G&&Ar($,E.apply(0,zn(G,!0))),$},$=>{const[j]=$("update.ignoreMutation"),[V,G]=$("update.attributes"),[K,Y]=$("update.elementEvents"),[J,ie]=$("update.debounce"),ce=Y||G,ue=se=>ml(j)&&j(se);if(ce&&(o&&(o[1](),o[0]()),o=yH(c||l,!0,E,{Mt:y.concat(V||[]),Rt:K,kt:bH,Vt:(se,Q)=>{const{target:ae,attributeName:le}=se;return(!Q&&le&&!f?nwe(ae,bH,n_e):!1)||!!Fm(ae,`.${Zo}`)||!!ue(se)}})),ie)if(S.m(),js(J)){const se=J[0],Q=J[1];r=Td(se)&&se,i=Td(Q)&&Q}else Td(J)?(r=J,i=!1):(r=!1,i=!1)}]},wH={x:0,y:0},i_e=e=>({tt:{t:0,r:0,b:0,l:0},$t:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:wH,Et:wH,Ot:{x:"hidden",y:"hidden"},At:{x:!1,y:!1},gt:!1,yt:Og(e.J)}),o_e=(e,t)=>{const n=P$(t,{}),[r,i,o]=vz(),[s,l,c]=Gwe(e),d=GQ(i_e(s)),[f,h]=d,p=Jwe(s,d),g=(x,E,k)=>{const A=Us(x).some(O=>!!x[O])||!dz(E)||k;return A&&o("u",[x,E,k]),A},[v,y,S,_]=r_e(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:k,it:I}=s,A=I?k.documentElement:x,O=ll(A),L=vu(A);y(),l(),ll(E,O),vu(E,L)},b.Ft=s,[(x,E)=>{const k=P$(t,x,E);return _(k),g(p(k,S(),E),x,!!E)},b,()=>{i(),v(),c()}]},{round:_H}=Math,s_e=e=>{const{width:t,height:n}=Nl(e),{w:r,h:i}=i1(e);return{x:_H(t)/r||1,y:_H(n)/i||1}},a_e=(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)},SH="pointerup pointerleave pointercancel lostpointercapture",l_e=(e,t)=>Xr(e,"mousedown",Xr.bind(0,t,"click",OQ,{C:!0,$:!0}),{$:!0}),c_e=(e,t,n,r,i,o,s)=>{const{V:l}=es(),{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:k}=o(),I=i1(d)[y]-i1(c)[y],O=x*E/I*k[S],N=Og(f)&&s?l.n||l.i?1:-1:1;i[h]=b+O*N};return Xr(d,"pointerdown",b=>{const x=Fm(b.target,`.${bz}`)===c,E=x?c:d;if(ip(t,tl,aH,!0),a_e(b,e,x)){const k=!x&&b.shiftKey,I=()=>Nl(c),A=()=>Nl(d),O=(K,Y)=>(K||I())[v]-(Y||A())[v],L=_(i[h]||0,1/s_e(i)[S]),N=b[p],H=I(),W=A(),z=H[g],D=O(H,W)+z/2,$=N-W[v],j=x?0:$-D,V=K=>{rc(G),E.releasePointerCapture(K.pointerId)},G=[ip.bind(0,t,tl,aH),Xr(n,SH,V),Xr(n,"selectstart",K=>MQ(K),{S:!1}),Xr(d,SH,V),Xr(d,"pointermove",K=>{const Y=K[p]-N;(x||k)&&L(j+Y)})];if(k)L(j);else if(!x){const K=Ep()[Nwe];K&&zn(G,K.O(L,O,j,z,$))}E.setPointerCapture(b.pointerId)}})},u_e=(e,t)=>(n,r,i,o,s,l,c)=>{const{Ut:d}=n,[f,h]=Nh(333),p=!!s.scrollBy;let g=!0;return rc.bind(0,[Xr(d,"pointerenter",()=>{r(uH,!0)}),Xr(d,"pointerleave pointercancel",()=>{r(uH)}),Xr(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(hH,!0),f(()=>{g=!0,r(hH)}),MQ(v)},{S:!1,$:!0}),l_e(d,i),c_e(e,o,i,n,s,t,c),h])},{min:GE,max:M$,round:d_e}=Math,XQ=(e,t,n,r)=>{if(r){const l=n?"x":"y",{Et:c,zt:d}=r,f=d[l],h=c[l];return M$(0,GE(1,f/(f+h)))}const i=n?"width":"height",o=Nl(e)[i],s=Nl(t)[i];return M$(0,GE(1,o/s))},f_e=(e,t,n,r,i,o)=>{const{V:s}=es(),l=o?"x":"y",c=o?"Left":"Top",{Et:d}=r,f=d_e(d[l]),h=GE(f,M$(0,n[`scroll${c}`])),p=o&&i,g=s.i?h:f-h,y=GE(1,(p?g:h)/f),S=XQ(e,t,o);return 1/S*(1-S)*y},YQ=(e,t,n,r)=>t&&e.animate(n,{timeline:t,composite:r}),h_e=(e,t)=>({transform:[Mg("0%",t),Mg(t&&e?"100%":"-100%",t)],[t?e?"right":"left":"top"]:["0%","100%"]}),p_e=e=>`${Math.max(0,e-.5)}px`,EH=(e,t,n,r)=>YQ(e,t,{transform:[Mg("0px",r),Mg(p_e(n),r)]},"add"),CH=(e,t)=>A$?new A$({source:e,axis:t}):null,m_e=(e,t,n)=>{const{q:r,H:i}=es(),{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=HQ([c,d,f],()=>v&&g?c:d,s,S),k=se=>v&&!g&&Cu(se)===f,I=se=>{_.forEach((Q,ae)=>{(se?vA(js(se)?se:[se],ae)>-1:!0)&&((Q||[]).forEach(he=>{he&&he.cancel()}),_.delete(ae))})},A=(se,Q,ae)=>{const le=ae?Bd:pz;En(se,he=>{le(he.Ut,Q)})},O=(se,Q)=>{En(se,ae=>{const[le,he]=Q(ae);to(le,he)})},L=(se,Q,ae)=>{O(se,le=>{const{Gt:he,Xt:pe}=le;return[he,{[ae?"width":"height"]:`${(XQ(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=f_e(he,pe,p,Q,Og(ve),ae);return[he,{transform:ye===ye?Mg(`${(ye*100).toFixed(3)}%`,ae):""}]})},H=se=>{const{Ut:Q}=se,ae=k(Q)&&Q;return[ae,{transform:ae?Mg([`${ll(p)}px`,`${vu(p)}px`]):""}]},W=[],z=[],D=[],$=(se,Q,ae)=>{const le=cz(ae),he=le?ae:!0,pe=le?!ae:!0;he&&A(z,se,Q),pe&&A(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})=>{I(le),_.set(le,[YQ(le,Q?b:x,h_e(Q&&Og(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})=>{I(Q),k(Q)&&_.set(Q,[EH(Q,b,se.x,!0),EH(Q,x,se.y)])})},J=se=>{const Q=se?Awe:kwe,ae=se?z:D,le=uz(ae)?cH:"",he=op(`${Zo} ${Q} ${le}`),pe=op(jQ),ve=op(bz),ye={Ut:he,Xt:pe,Gt:ve};return i||Bd(he,Ewe),oa(he,pe),oa(pe,ve),zn(ae,ye),zn(W,[Jl.bind(0,he),I,n(ye,$,l,d,p,se?b:x,se)]),ye},ie=J.bind(0,!0),ce=J.bind(0,!1),ue=()=>{oa(E,z[0].Ut),oa(E,D[0].Ut),jE(()=>{$(cH)},300)};return ie(),ce(),[{Wt:j,Zt:V,Jt:G,Kt:Y,Qt:K,tn:$,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,rc.bind(0,W)]},_L=e=>e.pointerType==="mouse",g_e=(e,t,n,r)=>{let i,o,s,l,c,d=Ts,f=0;const h=GQ({}),[p]=h,[g,v]=Nh(),[y,S]=Nh(),[_,b]=Nh(100),[x,E]=Nh(100),[k,I]=Nh(100),[A,O]=Nh(()=>f),[L,N,H]=m_e(e,n.Ft,u_e(t,n)),{J:W,et:z,it:D}=n.Ft,{tn:$,Wt:j,Zt:V,Jt:G,Kt:K,Qt:Y}=L,J=Q=>{$(R$,Q,!0),$(R$,Q,!1)},ie=(Q,ae)=>{if(O(),Q)$(fH);else{const le=()=>$(fH,!0);f>0&&!ae?A(le):le()}},ce=Q=>{_L(Q)&&(l=o,l&&ie(!0))},ue=[b,O,E,I,S,v,H,Xr(W,"pointerover",ce,{C:!0}),Xr(W,"pointerenter",ce),Xr(W,"pointerleave",Q=>{_L(Q)&&(l=!1,o&&ie(!1))}),Xr(W,"pointermove",Q=>{_L(Q)&&i&&g(()=>{b(),ie(!0),x(()=>{i&&ie(!1)})})}),Xr(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}=es(),be=P$(t,Q,ae),Qe=n(),{Et:qe,Ot:at,yt:Nt,At:Re}=Qe,[$e,it]=be("showNativeOverlaidScrollbars"),[pt,mt]=be("scrollbars.theme"),[_e,ze]=be("scrollbars.visibility"),[Ye,Fe]=be("scrollbars.autoHide"),[Ne,Rt]=be("scrollbars.autoHideSuspend"),[ct]=be("scrollbars.autoHideDelay"),[ke,ot]=be("scrollbars.dragScroll"),[$t,Ie]=be("scrollbars.clickScroll"),Ue=xe&&!ae,yt=Re.x||Re.y,Gt=he||pe||ye,mn=ve||ze,$r=$e&&me.x&&me.y,Mr=(Dr,zr)=>{const ei=_e==="visible"||_e==="auto"&&Dr==="scroll";return $(Iwe,ei,zr),ei};if(f=ct,Ue&&(Ne&&yt?(J(!1),d(),k(()=>{d=Xr(z,"scroll",J.bind(0,!0),{C:!0})})):J(!0)),it&&$(Cwe,$r),mt&&($(c),$(pt,!0),c=pt),Rt&&!Ne&&J(!0),Fe&&(i=Ye==="move",o=Ye==="leave",s=Ye!=="never",ie(!s,!0)),ot&&$(Owe,ke),Ie&&$(Pwe,$t),mn){const Dr=Mr(at.x,!0),zr=Mr(at.y,!1);$(Rwe,!(Dr&&zr))}Gt&&(j(Qe),V(Qe),G(Qe),K(Qe),Y(),$(dH,!qe.x,!0),$(dH,!qe.y,!1),$(Twe,Nt&&!D))},se,()=>{rc(ue),d()}]},KQ=(e,t,n)=>{ml(e)&&e(t||void 0,n||void 0)},dd=(e,t,n)=>{const{G:r,q:i,j:o,N:s}=es(),l=Ep(),c=vx(e),d=c?e:e.target,f=WQ(d);if(t&&!f){let h=!1;const p=z=>{const D=Ep()[Dwe],$=D&&D.O;return $?$(z,!0):z},g=Ar({},r(),p(t)),[v,y,S]=vz(n),[_,b,x]=o_e(e,g),[E,k,I]=g_e(e,g,b,z=>S("scroll",[W,z])),A=(z,D)=>_(z,!!D),O=A.bind(0,{},!0),L=o(O),N=s(O),H=z=>{Wwe(d),L(),N(),I(),x(),h=!0,S("destroyed",[W,!!z]),y()},W={options(z,D){if(z){const $=D?r():{},j=DQ(g,Ar($,p(z)));dz(j)||(Ar(g,j),A(j))}return Ar({},g)},on:v,off:(z,D)=>{z&&D&&y(z,D)},state(){const{zt:z,Et:D,Ot:$,At:j,tt:V,$t:G,yt:K}=b();return Ar({},{overflowEdge:z,overflowAmount:D,overflowStyle:$,hasOverflow:j,padding:V,paddingAbsolute:G,directionRTL:K,destroyed:h})},elements(){const{Z:z,J:D,tt:$,K:j,nt:V,st:G,et:K}=b.Ft,{nn:Y,rn:J}=k.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 Ar({},ae,{clone:()=>{const le=ie(Q());return E({},!0,{}),le}})};return Ar({},{target:z,host:D,padding:$||j,viewport:j,content:V||j,scrollOffsetElement:G,scrollEventElement:K,scrollbarHorizontal:ce(Y),scrollbarVertical:ce(J)})},update:z=>A({},z),destroy:H.bind(0)};return b.Nt((z,D,$)=>{E(D,$,z)}),Hwe(d,W),En(Us(l),z=>KQ(l[z],0,W)),Uwe(b.Ft.it,i().cancel,!c&&e.cancel)?(H(!0),W):(b.qt(),k.qt(),S("initialized",[W]),b.Nt((z,D,$)=>{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:$}])}),W.update(!0),W)}return f};dd.plugin=e=>{En(Mwe(e),t=>KQ(t,dd))};dd.valid=e=>{const t=e&&e.elements,n=ml(t)&&t();return E$(n)&&!!WQ(n.target)};dd.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}=es();return Ar({},{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 v_e=()=>{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]},QQ=e=>{const{options:t,events:n,defer:r}=e||{},[i,o]=R.useMemo(v_e,[]),s=R.useRef(null),l=R.useRef(r),c=R.useRef(t),d=R.useRef(n);return R.useEffect(()=>{l.current=r},[r]),R.useEffect(()=>{const{current:f}=s;c.current=t,dd.valid(f)&&f.options(t||{},!0)},[t]),R.useEffect(()=>{const{current:f}=s;d.current=n,dd.valid(f)&&f.on(n||{},!0)},[n]),R.useEffect(()=>()=>{var f;o(),(f=s.current)==null||f.destroy()},[]),R.useMemo(()=>[f=>{const h=s.current;if(dd.valid(h))return;const p=l.current,g=c.current||{},v=d.current||{},y=()=>s.current=dd(f,g,v);p?i(y,p):y()},()=>s.current],[])},y_e=(e,t)=>{const{element:n="div",options:r,events:i,defer:o,children:s,...l}=e,c=n,d=R.useRef(null),f=R.useRef(null),[h,p]=R.useState(!1),[g,v]=QQ({options:r,events:i,defer:o});return R.useEffect(()=>{p(!0)},[]),R.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]),R.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)},b_e=R.forwardRef(y_e),nw=R.forwardRef(({children:e,x:t,y:n,px:r=6,...i},o)=>{const{palette:s,spacing:l}=Pn(),c=n1({"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${l(r)})`,marginTop:l(r)}}),d=R.useCallback(f=>{if(o&&f){const h=f.elements().viewport;h&&(typeof o=="function"?o(h):o.current=h)}},[o]);return C.jsx(b_e,{options:{overflow:{x:t?"scroll":"hidden",y:n?"scroll":"hidden"},scrollbars:{autoHide:"move",theme:s.mode==="dark"?"os-theme-light":"os-theme-dark"}},...i,className:`${c} ${i.className}`,events:{initialized:d},children:e})});var JQ={exports:{}},Jn={};/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xA=60103,wA=60106,rw=60107,iw=60108,ow=60114,sw=60109,aw=60110,lw=60112,cw=60113,Sz=60120,uw=60115,dw=60116,ZQ=60121,eJ=60122,tJ=60117,nJ=60129,rJ=60131;if(typeof Symbol=="function"&&Symbol.for){var Bi=Symbol.for;xA=Bi("react.element"),wA=Bi("react.portal"),rw=Bi("react.fragment"),iw=Bi("react.strict_mode"),ow=Bi("react.profiler"),sw=Bi("react.provider"),aw=Bi("react.context"),lw=Bi("react.forward_ref"),cw=Bi("react.suspense"),Sz=Bi("react.suspense_list"),uw=Bi("react.memo"),dw=Bi("react.lazy"),ZQ=Bi("react.block"),eJ=Bi("react.server.block"),tJ=Bi("react.fundamental"),nJ=Bi("react.debug_trace_mode"),rJ=Bi("react.legacy_hidden")}function yl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xA:switch(e=e.type,e){case rw:case ow:case iw:case cw:case Sz:return e;default:switch(e=e&&e.$$typeof,e){case aw:case lw:case dw:case uw:case sw:return e;default:return t}}case wA:return t}}}var x_e=sw,w_e=xA,__e=lw,S_e=rw,E_e=dw,C_e=uw,T_e=wA,A_e=ow,k_e=iw,I_e=cw;Jn.ContextConsumer=aw;Jn.ContextProvider=x_e;Jn.Element=w_e;Jn.ForwardRef=__e;Jn.Fragment=S_e;Jn.Lazy=E_e;Jn.Memo=C_e;Jn.Portal=T_e;Jn.Profiler=A_e;Jn.StrictMode=k_e;Jn.Suspense=I_e;Jn.isAsyncMode=function(){return!1};Jn.isConcurrentMode=function(){return!1};Jn.isContextConsumer=function(e){return yl(e)===aw};Jn.isContextProvider=function(e){return yl(e)===sw};Jn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xA};Jn.isForwardRef=function(e){return yl(e)===lw};Jn.isFragment=function(e){return yl(e)===rw};Jn.isLazy=function(e){return yl(e)===dw};Jn.isMemo=function(e){return yl(e)===uw};Jn.isPortal=function(e){return yl(e)===wA};Jn.isProfiler=function(e){return yl(e)===ow};Jn.isStrictMode=function(e){return yl(e)===iw};Jn.isSuspense=function(e){return yl(e)===cw};Jn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rw||e===ow||e===nJ||e===iw||e===cw||e===Sz||e===rJ||typeof e=="object"&&e!==null&&(e.$$typeof===dw||e.$$typeof===uw||e.$$typeof===sw||e.$$typeof===aw||e.$$typeof===lw||e.$$typeof===tJ||e.$$typeof===ZQ||e[0]===eJ)};Jn.typeOf=yl;JQ.exports=Jn;var iJ=JQ.exports;function VE(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===Cr.Horizontal?t.clientWidth:t.clientHeight;return r!==0?(e===Cr.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 +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function p_(e,t,n=[],r={condition:!0}){const{condition:i}=r,o=function(s,l){var c={};for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&l.indexOf(d)<0&&(c[d]=s[d]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(d=Object.getOwnPropertySymbols(s);f(i&&window.addEventListener(e,t,o),()=>{i&&window.removeEventListener(e,t)}),[e,t,i,...n])}(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(e&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`/* === Main Container === */ +.__dbk__container { + height: 100%; + width: 100%; + + display: flex; + overflow: hidden; +} + +.__dbk__container.Horizontal { + flex-direction: row; +} + +.__dbk__container.Vertical { + flex-direction: column; +} +/* ====== */ + +/* === Wrapper for each child element === */ +.__dbk__child-wrapper { + height: 100%; + width: 100%; +} +/* ====== */ + +/* === Gutter === */ +.__dbk__gutter { + display: flex; + align-items: center; + justify-content: center; +} +/* .__dbk__gutter > div { + background: red; +} */ +.__dbk__gutter.Horizontal { + height: 100%; + padding: 0 2px; + flex-direction: column; +} +.__dbk__gutter.Horizontal:hover { + cursor: col-resize; +} + +.__dbk__gutter.Vertical { + width: 100%; + padding: 2px 0; + flex-direction: row; +} +.__dbk__gutter.Vertical:hover { + cursor: row-resize; +} + +.__dbk__gutter.Light { + background: #EDF0EF; +} +.__dbk__gutter.Light:hover > .__dbk__dragger { + background: #76747B; +} + +.__dbk__gutter.Dark { + background: #020203; +} +.__dbk__gutter.Dark:hover > .__dbk__dragger { + background: #9995A3; +} +/* ====== */ + +/* === Gutter's Dragger === */ +.__dbk__dragger { + border-radius: 2px; +} + +.__dbk__dragger.Horizontal { + width: 4px; + height: 24px; +} + +.__dbk__dragger.Vertical { + width: 24px; + height: 4px; +} + +.__dbk__dragger.Light { + background: #A6ACB5; +} + +.__dbk__dragger.Dark { + background: #434252; +} +/* ====== */`);const R_e=de.forwardRef(({className:e,theme:t,draggerClassName:n,direction:r=Cr.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:LS?i:void 0},{children:C.jsx("div",{className:l},void 0)}),void 0)});var na;function D$(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 P_e(e,t){switch(t.type){case na.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case na.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=VE(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===Cr.Horizontal?f.getBoundingClientRect().left:f.getBoundingClientRect().top,v=n===Cr.Horizontal?h.getBoundingClientRect().right:h.getBoundingClientRect().bottom,y=n===Cr.Horizontal?f.getBoundingClientRect().width+p.getBoundingClientRect().width+h.getBoundingClientRect().width:f.getBoundingClientRect().height+p.getBoundingClientRect().height+h.getBoundingClientRect().height,S=n===Cr.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 na.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case na.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case na.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],o=VE(n,i.parent);if(!o)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const s=i.gutter[n===Cr.Horizontal?"clientWidth":"clientHeight"],l=r===0,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:f}=D$(s,l,c);let h,p,g,v,y;return n===Cr.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 oJ(e,t=0,n=[]){return R.Children.toArray(e).reduce((r,i,o)=>(iJ.isFragment(i)?r.push.apply(r,oJ(i.props.children,t+1,n.concat(i.key||o))):R.isValidElement(i)?r.push(R.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"})(na||(na={}));const TH=e=>"changedTouches"in e;var Cr,L$;(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(Cr||(Cr={})),function(e){e.Light="Light",e.Dark="Dark"}(L$||(L$={}));const LS=typeof window<"u"&&"ontouchstart"in window;function SL(e){return e===Cr.Horizontal?"col-resize":"row-resize"}const O_e={isReady:!1,isDragging:!1,pairs:[]};function M_e({direction:e=Cr.Horizontal,minWidths:t=[],minHeights:n=[],initialSizes:r,gutterTheme:i=L$.Dark,gutterClassName:o,draggerClassName:s,children:l,onResizeStarted:c,onResizeFinished:d,classes:f=[]}){const h=oJ(l),[p,g]=R.useReducer(P_e,O_e),v=R.useRef(null),y=R.useRef([]),S=R.useRef([]);y.current=[],S.current=[];const _=de.useCallback(W=>{g({type:na.SetIsReadyToCompute,payload:{isReady:W}})},[]),b=de.useCallback((W,z)=>{g({type:na.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=SL(W),D.parent.style.cursor=SL(W),document.body.style.cursor=SL(W)},[p.pairs]),x=de.useCallback(()=>{g({type:na.StopDragging});const W=[];for(let D=0;D{g({type:na.CalculateSizes,payload:{direction:W,gutterIdx:z}})},[]),k=de.useCallback((W,z,D)=>{g({type:na.CreatePairs,payload:{direction:W,children:z,gutters:D}})},[]),I=de.useCallback((W,z,D,$)=>{const j=z[0].parentNode;if(!j)throw new Error("Cannot set initial sizes - parent is undefined");if(VE(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===Cr.Horizontal?"width":"height"],ie=K||Y?ie/2:ie),J=$&&G<$.length?`calc(${$[G]}% - ${ie}px)`:`calc(${100/z.length}% - ${ie}px)`,W===Cr.Horizontal?(V.style.width=J,V.style.height="100%"):(V.style.height=J,V.style.width="100%")})},[]),A=de.useCallback((W,z)=>{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 $=D.aSizePct+D.bSizePct,j=z/D.size*$,V=$-z/D.size*$,G=p.draggingIdx===0,K=p.draggingIdx===p.pairs.length-1,{aGutterSize:Y,bGutterSize:J}=D$(D.gutterSize,G,K),ie=`calc(${j}% - ${Y}px)`,ce=`calc(${V}% - ${J}px)`;W===Cr.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 $=p.pairs[p.draggingIdx];if($.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if($.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if($.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let j=function(K,Y){const J=TH(Y)?Y.changedTouches[0]:Y;return K===Cr.Horizontal?J.clientX:J.clientY}(z,W)-$.start,V=16,G=16;D.length>p.draggingIdx&&(V=D[p.draggingIdx]),D.length>=p.draggingIdx+1&&(G=D[p.draggingIdx+1]),j<$.gutterSize+V&&(j=$.gutterSize+V),j>=$.size-($.gutterSize+G)&&(j=$.size-($.gutterSize+G)),A(z,j)},[p.isDragging,p.draggingIdx,p.pairs,A]),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&&(TH(W)&&W.preventDefault(),O(W,e,e===Cr.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 p_("mouseup",L,[p.isDragging,x]),p_("mousemove",N,[e,p.isDragging,O,t,n]),p_("touchend",L,[p.isDragging,x],{condition:LS}),p_("touchmove",N,[e,p.isDragging,O,t,n],{condition:LS,passive:!LS}),R.useEffect(function(){if(!v.current)return;const W=v.current.parentElement;if(!W)return;const z=new ResizeObserver(()=>{const D=getComputedStyle(W),$=e===Cr.Horizontal?W.clientWidth:W.clientHeight;_(!!D&&!!$)});return z.observe(W),()=>{z.disconnect()}},[v.current,e]),R.useEffect(function(){if(p.isReady&&(!y.current||y.current[0].offsetParent)){if(!y.current||!S.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");h.length<=1?I(e,y.current,S.current,r):(I(e,y.current,S.current,r),k(e,y.current,S.current))}},[l,p.isReady,e,I,k,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 Bo=(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=R.useRef(null);return R.useLayoutEffect(()=>{t.current=e}),R.useCallback((...n)=>{var r;(r=t.current)===null||r===void 0||r.call(t,...n)},[])}const AH={};function D_e(e,t){AH[e]||(AH[e]=!0,console.error("[material-ui-popup-state] WARNING",t))}const L_e={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function N_e({parentPopupState:e,popupId:t,variant:n,disableAutoFocus:r}){const i=R.useRef(!0);R.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const[o,s]=R.useState(L_e),l=R.useCallback(b=>{i.current&&s(b)},[]),c=R.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 k=x==null?void 0:x.clientX,I=x==null?void 0:x.clientY,A=typeof k=="number"&&typeof I=="number"?{left:k,top:I}:void 0,O=L=>{if(!b&&!L.setAnchorElUsed&&n!=="dialog"&&D_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:A,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=R.useCallback((b,x)=>{b?f(x):p(x)},[]),v=hb(b=>{const{relatedTarget:x}=b;l(E=>E.hovered&&!(x instanceof Element&&N$(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&&N$(x,_))?E.hovered?{...E,focused:!1}:h(E):E)}),S=R.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 B_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 _A(e){return{...B_e(e),onClick:e.open,onTouchStart:e.open}}function fw({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 F_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 N$(e,t){const{anchorEl:n,_childPopupState:r}=t;return kH(n,e)||kH(F_e(e,t),e)||r!=null&&N$(e,r)}function kH(e,t){if(!e)return!1;for(;t;){if(t===e)return!0;t=t.parentElement}return!1}function Bp({children:e,popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}){const o=N_e({popupId:t,variant:n,parentPopupState:r,disableAutoFocus:i}),s=e(o);return s??null}Bp.propTypes={children:Y0.func.isRequired,popupId:Y0.string,variant:Y0.oneOf(["popover","popper"]).isRequired,parentPopupState:Y0.object,disableAutoFocus:Y0.bool};function $_e({onSplitHorizontal:e,onClose:t,onSplitVertical:n,closeDisabled:r,splitHorizontalDisabled:i,splitVerticalDisabled:o}){return C.jsx(Bp,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Nd,{sx:{m:1},children:C.jsx(Jd,{title:"Panel Options",children:C.jsx(xp,{size:"small",..._A(s),children:C.jsx(u1e,{fontSize:"small"})})})}),C.jsxs(Np,{...fw(s),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[C.jsxs(gu,{onClick:n,disabled:o,children:[C.jsx(Cd,{children:C.jsx(Q8,{fontSize:"small"})}),C.jsx(Wl,{children:"Split Vertical"})]}),C.jsxs(gu,{onClick:e,disabled:i,children:[C.jsx(Cd,{children:C.jsx(Q8,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),C.jsx(Wl,{children:"Split Horizontal"})]}),C.jsx(Mu,{}),C.jsxs(gu,{onClick:t,disabled:r,children:[C.jsx(Cd,{children:C.jsx(cQ,{fontSize:"small"})}),C.jsx(Wl,{children:"Close Panel"})]})]})]})})}function ha(e,t){const n=te.clone(e);return t(n),n}function IH(e,t){return t(te.clone(e))}function Dg(e){return t=>R.createElement(e,{...t,produce:n=>{var r;return(r=t==null?void 0:t.onChange)==null?void 0:r.call(t,i=>ha(i,n))}})}const sJ=R.createContext({});function ef(){return R.useContext(sJ)}function aJ({root:e={type:"leaf",key:""},renderLeaf:t,onChange:n,onClose:r,depth:i=0}){const{palette:o,spacing:s,transitions:l}=Pn(),c=n1({"div&":{background:o.text.secondary,opacity:1-o.action.activatedOpacity,transition:l.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),d=n1({"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-te.sumBy(g,"size"),y=te.filter(g,S=>!S.size).length;return y?v/y:0}const p=R.useMemo(()=>{const g=v=>n==null?void 0:n(IH(e,y=>({key:Bo(),type:"branch",orientation:v,children:[{...structuredClone(y),size:50,key:Bo()},{...structuredClone(y),size:50,key:Bo()}]})));return e.type==="leaf"?{state:e.content,controls:C.jsx($_e,{onClose:r,closeDisabled:!i,onSplitHorizontal:()=>g("horizontal"),onSplitVertical:()=>g("vertical")}),onChange:v=>n==null?void 0:n(ha(e,y=>{y.content={...y.content,...v}}))}:{}},[n,r,i,e]);return C.jsx(C.Fragment,{children:e.type==="leaf"?C.jsx(xn,{children:C.jsx(xn,{sx:{borderRadius:g=>g.spacing(1),overflow:"hidden"},children:C.jsx(sJ.Provider,{value:p,children:t==null?void 0:t(e)})})}):C.jsx(M_e,{gutterClassName:d,draggerClassName:c,onResizeFinished:(g,v)=>n==null?void 0:n(ha(e,y=>{te.forEach(v,(S,_)=>{y.children[_].size=S})})),minHeights:te.map(e.children,()=>f(6)-8),minWidths:te.map(e.children,()=>f(32)),initialSizes:te.map(e.children,(g,v,y)=>g.size??h(y)),direction:{vertical:Cr.Vertical,horizontal:Cr.Horizontal}[e.orientation],children:te.map(e.children,(g,v)=>C.jsx(aJ,{depth:i+1,renderLeaf:t,root:g,onChange:y=>n==null?void 0:n(ha(e,S=>S.children[v]=y)),onClose:()=>n==null?void 0:n(IH(e,y=>(y.children.splice(v,1),y.children.length===1?y.children[0].type==="leaf"?{type:"leaf",key:Bo(),content:y.children[0].content}:y.children[0]:(te.forEach(y.children,(S,_,b)=>S.size=100/b.length),y))))},g.key))})})}function o1(){return o1=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var j_e=["PropTypes"],U_e=function(t,n){return R.Children.toArray(t).reduce(function(r,i){if(R.isValidElement(i)){var o=i.type.displayName;n!=null&&n.includes(o)&&(r[o]=i.props)}return r},{})},H_e=function(t,n){var r=R.Children.toArray(t).filter(function(i){if(R.isValidElement(i)){var o=i.type.displayName;return!(n!=null&&n.includes(o))}return!0});return r.length>0?r:void 0},W_e=function(t){return typeof t=="string"&&!j_e.includes(t)&&t.match(/^[A-Z0-9]/)},G_e=function(t){var n=R.memo(function(r){var i=r.children,o=r.propagateSlotProps,s=r.slotKeys,l=s===void 0?[]:s,c=z_e(r,["children","propagateSlotProps","slotKeys"]),d=R.useMemo(function(){return U_e(i,l)},[l,i]),f=R.useMemo(function(){return H_e(i,l)},[l,i]),h=R.useMemo(function(){return o1({},c,{slotProps:o1({},o,d)})},[c,d,o]);return R.createElement(t,h,f)});return n},V_e=function(t){var n=R.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"||!W_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",o1({},o.defaultProps,{slotKeys:[].concat(d,[s])})),Reflect.get(o,s,l)}});return r};function Ez(){const e=Pn();return $ve(e.breakpoints.down("sm"))}const q_e=e=>e?48:36,X_e=8;function Y_e({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Option"}){const o=Ez(),s=te.max([te.findIndex(t,{value:n}),0])??0;return C.jsx(Bp,{variant:"popover",children:l=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(_A(l))})}),C.jsx(Np,{...fw(l),anchorOrigin:{horizontal:"center",vertical:-q_e(o)*s-X_e},transformOrigin:{vertical:"top",horizontal:"center"},children:te.map(t,({value:c,label:d,disabled:f})=>C.jsx(gu,{disabled:f,value:c,selected:c===n,onClick:()=>{l.close(),r==null||r(c)},children:d},c))})]})})}function yx(e){const{placeholder:t,value:n,items:r=[],onChange:i}=e;return C.jsx(J1,{sx:{minWidth:120},select:!0,label:t,value:n,variant:"filled",...e,onChange:o=>i==null?void 0:i(o.target.value),children:te.map(r,o=>C.jsx(gu,{value:o.value,children:o.label},o.value))})}function Fd({children:e,icon:t,showArrow:n,...r}){return C.jsx(rz,{...r,startIcon:t,endIcon:n&&C.jsx(l1e,{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 Ms({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,disabled:s,ButtonProps:l}){const c=te.find(r,{id:t});return C.jsx(Y_e,{placeholder:te.startCase(e),trigger:d=>C.jsx(Fd,{...d,...l,disabled:!(r!=null&&r.length)||s,icon:i,showArrow:o,children:(c==null?void 0:c.name)??e}),items:te.map(r,({id:d,name:f,description:h,hidden:p})=>({value:d,label:C.jsxs(C.Fragment,{children:[C.jsx(jt,{children:f}),C.jsx(Jr,{}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:h})]}),disabled:p})),value:c==null?void 0:c.id,onChange:n})}const lJ=[{url:"https://cdn.jsdelivr.net/gh/path-visualiser/app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],cJ=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],pm=4,K_e={renderer:cJ,remote:lJ,playbackRate:pm,theme:"dark",acrylic:!0,accentColor:"blue"},[Lu,Q_e]=nc({},Y1e("settings",K_e)),{common:VVe,...J_e}=Fq,Z_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%) +`,RH=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", + "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,eSe=(e,t)=>J5({palette:{primary:{main:Fq[t][e==="dark"?"A100":"A700"]},mode:e,background:e==="dark"?{default:"#1c2128",paper:"#22272e"}:{default:"#f6f8fa",paper:"#ffffff"}},typography:{allVariants:{fontFamily:RH},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:RH}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h6:{fontWeight:500,letterSpacing:-.4}}}},shadows:["",...te.times(24,te.constant(Z_e))]});function Cz(){const[{acrylic:e}]=Lu();return e?{backdropFilter:"blur(10px)",background:({palette:t})=>Sn(t.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:t})=>t.background.paper}}const tSe=C.jsx(Mu,{orientation:"vertical",flexItem:!0,sx:{m:1,height:e=>e.spacing(3),alignSelf:"auto"}}),Nn=V_e(({slotProps:e,onChange:t,stack:n})=>{var i,o,s,l;const r=Cz();return C.jsxs(xn,{vertical:!0,children:[C.jsx(xn,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:C.jsx(_p,{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(xn,{sx:{height:c=>c.spacing(6)},children:[C.jsx(xn,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...r},children:C.jsx(nw,{x:!0,children:C.jsxs(xn,{sx:{width:"max-content",height:c=>c.spacing(6),alignItems:"center",p:1},children:[C.jsx(Ms,{showArrow:!0,label:"Page",onChange:c=>t==null?void 0:t({...n,type:c}),icon:(o=A5[n.type])==null?void 0:o.icon,value:n==null?void 0:n.type,items:te.values(A5)}),((s=e.Options)==null?void 0:s.children)&&C.jsxs(C.Fragment,{children:[tSe,e.Options.children]})]})})}),C.jsx(Jr,{sx:{mx:"auto"}}),(l=e.Extras)==null?void 0:l.children]})]})}),uJ=""+new URL("logo512-23eace97.png",import.meta.url).href,B$="Visualiser",nSe="1.0.5",rSe="1.0.5; mid October 2023",iSe="https://github.com/path-visualiser/app",oSe="https://github.com/path-visualiser/app/blob/master/docs",sSe=[{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 aSe(){const{controls:e,onChange:t,state:n}=ef();function r(i,o){return C.jsxs(dt,{sx:{pt:2},children:[C.jsx(jt,{variant:"overline",color:"text.secondary",children:i}),C.jsx(jt,{variant:"body2",children:o})]})}return C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Content,{children:C.jsxs(xn,{children:[" ",C.jsx(nw,{y:!0,children:C.jsxs(dt,{sx:{p:2},children:[C.jsx(dt,{sx:{pt:6,pb:2},children:C.jsx("img",{src:uJ,height:"64"})}),C.jsx(jt,{variant:"h6",children:B$}),r("Build Info",C.jsx(C.Fragment,{children:rSe})),r("About this App",C.jsxs(C.Fragment,{children:[B$," 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(Rg,{sx:{mx:-2},children:sSe.map(({name:i,email:o},s)=>C.jsxs(_$,{href:`mailto:${o}`,children:[C.jsx(zye,{children:C.jsx(Eme,{children:te.head(i)})}),C.jsx(Wl,{primary:i,secondary:o})]},s))})]})),r("Resources",C.jsx(C.Fragment,{children:C.jsx(Rg,{sx:{mx:-2},children:C.jsxs(_$,{target:"_blank",href:"https://github.com/path-visualiser",children:[C.jsx(Cd,{children:C.jsx(o1e,{})}),C.jsx(Wl,{primary:"Repository",secondary:"https://github.com/path-visualiser"})]})})}))]})})]})}),C.jsx(Nn.Extras,{children:e})]})}const dJ=R.createContext(null);function lSe(){const[e,t]=R.useState(null);return R.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function fJ(e){const{children:t,value:n}=e,r=lSe(),i=R.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(dJ.Provider,{value:i,children:t})}function hJ(){return R.useContext(dJ)}function pJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function mJ(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const cSe=["children"],uSe=R.forwardRef(function(t,n){const{children:r}=t,i=Le(t,cSe),o=hJ();if(o===null)throw new TypeError("No TabContext provided");const s=R.Children.map(r,l=>R.isValidElement(l)?R.cloneElement(l,{"aria-controls":pJ(o,l.props.value),id:mJ(o,l.props.value)}):null);return C.jsx($xe,F({},i,{ref:n,value:o.value,children:s}))}),gJ=uSe;function dSe(e){return Et("MuiTabPanel",e)}kt("MuiTabPanel",["root"]);const fSe=["children","className","value"],hSe=e=>{const{classes:t}=e;return At({root:["root"]},dSe,t)},pSe=Ee("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),mSe=R.forwardRef(function(t,n){const r=It({props:t,name:"MuiTabPanel"}),{children:i,className:o,value:s}=r,l=Le(r,fSe),c=F({},r),d=hSe(c),f=hJ();if(f===null)throw new TypeError("No TabContext provided");const h=pJ(f,s),p=mJ(f,s);return C.jsx(pSe,F({"aria-labelledby":p,className:je(d.root,o),hidden:s!==f.value,id:h,ref:n,role:"tabpanel",ownerState:c},l,{children:s===f.value&&i}))}),jm=mSe;var vJ={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})(vJ);var Tz=vJ.exports;function F$({label:e=C.jsx(C.Fragment,{}),...t}){return C.jsx(bve,{control:C.jsx(Pg,{defaultChecked:!0,...t}),label:e})}function gSe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(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 OH(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ySe(e,t){if(e==null)return{};var n=vSe(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 bSe(e,t){return xSe(e)||wSe(e,t)||_Se(e,t)||SSe()}function xSe(e){if(Array.isArray(e))return e}function wSe(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 _Se(e,t){if(e){if(typeof e=="string")return MH(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 MH(e,t)}}function MH(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]:{};m_.initial(e),m_.handler(t);var n={current:e},r=jb(BSe)(n,t),i=jb(NSe)(n),o=jb(m_.changes)(e),s=jb(LSe)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return m_.selector(d),d(n.current)}function c(d){CSe(r,i,o,s)(d)}return[l,c]}function LSe(e,t){return s1(t)?t(e.current):t}function NSe(e,t){return e.current=LH(LH({},e.current),t),t}function BSe(e,t,n){return s1(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 FSe={create:DSe},$Se={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function zSe(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 Es=dEe;function bx(){}function Um(e,t,n,r){return fEe(e,r)||hEe(e,t,n,r)}function fEe(e,t){return e.editor.getModel(CJ(e,t))}function hEe(e,t,n,r){return e.editor.createModel(t,n,r?CJ(e,r):void 0)}function CJ(e,t){return e.Uri.parse(t)}function pEe({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=bx,onMount:_=bx}){let[b,x]=R.useState(!1),[E,k]=R.useState(!0),I=R.useRef(null),A=R.useRef(null),O=R.useRef(null),L=R.useRef(_),N=R.useRef(S),H=R.useRef(!1);EJ(()=>{let $=_J.init();return $.then(j=>(A.current=j)&&k(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>I.current?D():$.cancel()}),Es(()=>{if(I.current&&A.current){let $=I.current.getOriginalEditor(),j=Um(A.current,e||"",r||n||"text",o||"");j!==$.getModel()&&$.setModel(j)}},[o],b),Es(()=>{if(I.current&&A.current){let $=I.current.getModifiedEditor(),j=Um(A.current,t||"",i||n||"text",s||"");j!==$.getModel()&&$.setModel(j)}},[s],b),Es(()=>{let $=I.current.getModifiedEditor();$.getOption(A.current.editor.EditorOption.readOnly)?$.setValue(t||""):t!==$.getValue()&&($.executeEdits("",[{range:$.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),$.pushUndoStop())},[t],b),Es(()=>{var $,j;(j=($=I.current)==null?void 0:$.getModel())==null||j.original.setValue(e||"")},[e],b),Es(()=>{let{original:$,modified:j}=I.current.getModel();A.current.editor.setModelLanguage($,r||n||"text"),A.current.editor.setModelLanguage(j,i||n||"text")},[n,r,i],b),Es(()=>{var $;($=A.current)==null||$.editor.setTheme(d)},[d],b),Es(()=>{var $;($=I.current)==null||$.updateOptions(h)},[h],b);let W=R.useCallback(()=>{var V;if(!A.current)return;N.current(A.current);let $=Um(A.current,e||"",r||n||"text",o||""),j=Um(A.current,t||"",i||n||"text",s||"");(V=I.current)==null||V.setModel({original:$,modified:j})},[n,t,i,e,r,o,s]),z=R.useCallback(()=>{var $;!H.current&&O.current&&(I.current=A.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...h}),W(),($=A.current)==null||$.editor.setTheme(d),x(!0),H.current=!0)},[h,d,W]);R.useEffect(()=>{b&&L.current(I.current,A.current)},[b]),R.useEffect(()=>{!E&&!b&&z()},[E,b,z]);function D(){var j,V,G,K;let $=(j=I.current)==null?void 0:j.getModel();l||((V=$==null?void 0:$.original)==null||V.dispose()),c||((G=$==null?void 0:$.modified)==null||G.dispose()),(K=I.current)==null||K.dispose()}return de.createElement(SJ,{width:g,height:p,isEditorReady:b,loading:f,_ref:O,className:v,wrapperProps:y})}var mEe=pEe;R.memo(mEe);function gEe(e){let t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}var vEe=gEe,g_=new Map;function yEe({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:_=bx,onMount:b=bx,onChange:x,onValidate:E=bx}){let[k,I]=R.useState(!1),[A,O]=R.useState(!0),L=R.useRef(null),N=R.useRef(null),H=R.useRef(null),W=R.useRef(b),z=R.useRef(_),D=R.useRef(),$=R.useRef(r),j=vEe(o),V=R.useRef(!1),G=R.useRef(!1);EJ(()=>{let J=_J.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()}),Es(()=>{var ie,ce,ue,se;let J=Um(L.current,e||r||"",t||i||"",o||n||"");J!==((ie=N.current)==null?void 0:ie.getModel())&&(h&&g_.set(j,(ce=N.current)==null?void 0:ce.saveViewState()),(ue=N.current)==null||ue.setModel(J),h&&((se=N.current)==null||se.restoreViewState(g_.get(o))))},[o],k),Es(()=>{var J;(J=N.current)==null||J.updateOptions(d)},[d],k),Es(()=>{!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],k),Es(()=>{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],k),Es(()=>{var J;l!==void 0&&((J=N.current)==null||J.revealLine(l))},[l],k),Es(()=>{var J;(J=L.current)==null||J.editor.setTheme(s)},[s],k);let K=R.useCallback(()=>{var J;if(!(!H.current||!L.current)&&!V.current){z.current(L.current);let ie=o||n,ce=Um(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(g_.get(ie)),L.current.editor.setTheme(s),I(!0),V.current=!0}},[e,t,n,r,i,o,d,f,h,s]);R.useEffect(()=>{k&&W.current(N.current,L.current)},[k]),R.useEffect(()=>{!A&&!k&&K()},[A,k,K]),$.current=r,R.useEffect(()=>{var J,ie;k&&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)}))},[k,x]),R.useEffect(()=>{if(k){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()=>{}},[k,E]);function Y(){var J,ie;(J=D.current)==null||J.dispose(),p?h&&g_.set(o,N.current.saveViewState()):(ie=N.current.getModel())==null||ie.dispose(),N.current.dispose()}return de.createElement(SJ,{width:g,height:v,isEditorReady:k,loading:c,_ref:H,className:y,wrapperProps:S})}var bEe=yEe,xEe=R.memo(bEe),TJ=xEe;let pa;typeof window<"u"?pa=window:typeof self<"u"?pa=self:pa=global;let z$=null,j$=null;const BH=20,AL=pa.clearTimeout,FH=pa.setTimeout,kL=pa.cancelAnimationFrame||pa.mozCancelAnimationFrame||pa.webkitCancelAnimationFrame,$H=pa.requestAnimationFrame||pa.mozRequestAnimationFrame||pa.webkitRequestAnimationFrame;kL==null||$H==null?(z$=AL,j$=function(t){return FH(t,BH)}):(z$=function([t,n]){kL(t),AL(n)},j$=function(t){const n=$H(function(){AL(r),t()}),r=FH(function(){kL(n),t()},BH);return[n,r]});function wEe(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,k=x.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,k.style.width=x.offsetWidth+1+"px",k.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__&&z$(this.__resizeRAF__),this.__resizeRAF__=j$(function(){o(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(k){k.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=pa.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 EA extends R.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=wEe(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),R.createElement(d,{ref:this._setRef,style:{...y,...c},...f},!_&&t(S))}}function _Ee({returnType:e,params:t}){return`@type {(${te.join(te.map(t,n=>`${n.name}: ${n.type}`),", ")}) => ${e}}`}function SEe(e){const[t,n,r]=["/**"," * "," */"],i=te.map(te.chunk(te.split(e.description," "),9),o=>te.join(o," "));return te.join([t,...te.map(i,o=>`${n}${o}`),`${n}${_Ee(e)}`,r],` +`)}function EEe({name:e,params:t,defaultReturnValue:n}){return te.join([`function ${e}(${te.join(te.map(t,"name"),", ")}) {`,` return ${JSON.stringify(n)};`,"}"],` +`)}function CEe(e){return te.join(te.map(e,t=>te.join([SEe(t),EEe(t)],` +`)),` + +`)}const TEe={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},AEe={name:"shouldRender",description:"Define which objects the renderer should display.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"}],defaultReturnValue:!0,returnType:"boolean"},kEe={shouldRender:AEe,shouldBreak:TEe},[CA,IEe]=nc({code:CEe(te.values(kEe)),busy:{}}),REe=2500;function PEe(){const[{code:e},t]=CA(),n=Pn();return C.jsx(xn,{height:"100%",overflow:"hidden",children:C.jsx(EA,{children:({width:r,height:i})=>C.jsx(TJ,{theme:n.palette.mode==="dark"?"vs-dark":"light",width:r,loading:C.jsx(Q1,{variant:"indeterminate"}),height:i,language:"javascript",defaultValue:e,onChange:te.debounce(o=>t(()=>({code:o})),REe),options:{minimap:{enabled:!1}}})})})}function OEe(e){const t=Pn();return C.jsx(xn,{height:"100%",overflow:"hidden",children:C.jsx(EA,{children:({width:n,height:r})=>C.jsx(TJ,{theme:t.palette.mode==="dark"?"vs-dark":"light",width:n,loading:C.jsx(Q1,{variant:"indeterminate"}),height:r,language:"javascript",...e,options:{minimap:{enabled:!1},...e.options}})})})}function a1(e){"@babel/helpers - typeof";return a1=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},a1(e)}function MEe(e,t){if(a1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(a1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DEe(e){var t=MEe(e,"string");return a1(t)==="symbol"?t:String(t)}function LEe(e,t,n){return t=DEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zH(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 jH(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(No(1));return n(AJ)(e,t)}if(typeof e!="function")throw new Error(No(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(No(3));return o}function h(y){if(typeof y!="function")throw new Error(No(4));if(c)throw new Error(No(5));var S=!0;return d(),l.push(y),function(){if(S){if(c)throw new Error(No(6));S=!1,d();var b=l.indexOf(y);l.splice(b,1),s=null}}}function p(y){if(!NEe(y))throw new Error(No(7));if(typeof y.type>"u")throw new Error(No(8));if(c)throw new Error(No(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 gCe(e,t){return e===t}function vCe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?QEe:n,i=t.mapStateToPropsFactories,o=i===void 0?oCe:i,s=t.mapDispatchToPropsFactories,l=s===void 0?nCe:s,c=t.mergePropsFactories,d=c===void 0?uCe:c,f=t.selectorFactory,h=f===void 0?pCe:f;return function(g,v,y,S){S===void 0&&(S={});var _=S,b=_.pure,x=b===void 0?!0:b,E=_.areStatesEqual,k=E===void 0?gCe:E,I=_.areOwnPropsEqual,A=I===void 0?RL:I,O=_.areStatePropsEqual,L=O===void 0?RL:O,N=_.areMergedPropsEqual,H=N===void 0?RL:N,W=Le(_,mCe),z=PL(g,o,"mapStateToProps"),D=PL(v,l,"mapDispatchToProps"),$=PL(y,d,"mergeProps");return r(h,F({methodName:"connect",getDisplayName:function(V){return"Connect("+V+")"},shouldHandleStateChanges:!!g,initMapStateToProps:z,initMapDispatchToProps:D,initMergeProps:$,pure:x,areStatesEqual:k,areOwnPropsEqual:A,areStatePropsEqual:L,areMergedPropsEqual:H},W))}}const DJ=vCe();$Ee(iv.unstable_batchedUpdates);function yCe(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=sa(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof KE){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(de.Component),RCe=` + 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 +`,QE=function(t){return t+1},PCe=function(t){return` + You have lifted an item in position `+QE(t.source.index)+` +`},$J=function(t,n){var r=t.droppableId===n.droppableId,i=QE(t.index),o=QE(n.index);return r?` + You have moved the item from position `+i+` + to position `+o+` + `:` + You have moved the item from position `+i+` + in list `+t.droppableId+` + to list `+n.droppableId+` + in position `+o+` + `},zJ=function(t,n,r){var i=n.droppableId===r.droppableId;return i?` + The item `+t+` + has been combined with `+r.draggableId:` + The item `+t+` + in list `+n.droppableId+` + has been combined with `+r.draggableId+` + in list `+r.droppableId+` + `},OCe=function(t){var n=t.destination;if(n)return $J(t.source,n);var r=t.combine;return r?zJ(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},JH=function(t){return` + The item has returned to its starting position + of `+QE(t.index)+` +`},MCe=function(t){if(t.reason==="CANCEL")return` + Movement cancelled. + `+JH(t.source)+` + `;var n=t.destination,r=t.combine;return n?` + You have dropped the item. + `+$J(t.source,n)+` + `:r?` + You have dropped the item. + `+zJ(t.draggableId,t.source,r)+` + `:` + The item has been dropped while not over a drop area. + `+JH(t.source)+` + `},NS={dragHandleUsageInstructions:RCe,onDragStart:PCe,onDragUpdate:OCe,onDragEnd:MCe},Ei={x:0,y:0},Gi=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Is=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},lv=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},c1=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},ZH=function(t,n){return Math.min.apply(Math,n.map(function(r){return c1(t,r)}))},jJ=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},DCe=function(e,t){var n=il({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},pw=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},eW=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}]},LCe={top:0,right:0,bottom:0,left:0},NCe=function(t,n){return n?pw(t,n.scroll.diff.displacement):t},BCe=function(t,n,r){if(r&&r.increasedBy){var i;return F({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},FCe=function(t,n){return n&&n.shouldClipSubject?DCe(n.pageMarginBox,t):il(t)},Lg=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=NCe(t.marginBox,i),s=BCe(o,r,n),l=FCe(s,i);return{page:t,withPlaceholder:n,active:l}},Rz=function(e,t){e.frame||He(!1);var n=e.frame,r=Is(t,n.scroll.initial),i=lv(r),o=F({},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=F({},e,{frame:o,subject:s});return l};function JE(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Pz(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}},UCe=function(e){var t=ma(e.top,e.bottom),n=ma(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Mz={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},qJ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},HCe=function(e){return function(t){var n=ma(t.top,t.bottom),r=ma(t.left,t.right);return function(i){return e===Mz?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},WCe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:Ei;return pw(t,r)},GCe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},VCe=function(t,n,r){return r(n)(t)},Dz=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,l=o?WCe(n,r):n;return GCe(l,r,s)&&VCe(l,i,s)},qCe=function(t){return Dz(F({},t,{isVisibleThroughFrameFn:VJ}))},XJ=function(t){return Dz(F({},t,{isVisibleThroughFrameFn:UCe}))},XCe=function(t){return Dz(F({},t,{isVisibleThroughFrameFn:HCe(t.destination.axis)}))},YCe=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 KCe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return il(kz(n,r))}function d1(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=KCe(d,r),h=d.descriptor.id;c.all.push(h);var p=qCe({target:f,destination:n,viewport:i,withDroppableDisplacement:!0});if(!p)return c.invisible[d.descriptor.id]=!0,c;var g=YCe(h,s,o),v={draggableId:h,shouldAnimate:g};return c.visible[h]=v,c},{all:[],visible:{},invisible:{}})}function QCe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function tW(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=QCe(t,{inHomeList:n});return{displaced:u1,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function ZE(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=uv(t,r);if(l==null)return tW({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var f=tf(n,function(y){return y.descriptor.index===l});if(!f)return tW({insideDestination:n,inHomeList:d,displacedBy:o,destination:r});var h=kA(t,n),p=n.indexOf(f),g=h.slice(p),v=d1({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 $d(e,t){return!!t.effected[e]}var JCe=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=$d(s,o);return d?t?c:c-1:t?c+1:c},ZCe=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},eTe=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=ZCe({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:s});return h==null?null:ZE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:h})}var p=JCe({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:d});return p==null?null:ZE({draggable:r,insideDestination:s,destination:o,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:p})},tTe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return $d(r,n)?o?Ei:lv(i.point):o?i.point:Ei},nTe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=AA(n);i||He(!1);var o=i.draggableId,s=r[o].page.borderBox.center,l=tTe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Gi(s,l)},YJ=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},rTe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Lz=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},nW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.end]+YJ(n,i),Lz(n,r.marginBox,i))},rW=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Cp(n.line,r.marginBox[n.start]-rTe(n,i),Lz(n,r.marginBox,i))},iTe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Cp(n.line,r.contentBox[n.start]+YJ(n,i),Lz(n,r.contentBox,i))},oTe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=cv(i.descriptor.id,r),l=n.page,c=i.axis;if(!s.length)return iTe({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($d(h,o))return rW({axis:c,moveRelativeTo:p.page,isMoving:l});var g=XE(p.page,f.point);return rW({axis:c,moveRelativeTo:g,isMoving:l})}var v=s[s.length-1];if(v.descriptor.id===n.descriptor.id)return l.borderBox.center;if($d(v.descriptor.id,o)){var y=XE(v.page,lv(o.displacedBy.point));return nW({axis:c,moveRelativeTo:y,isMoving:l})}return nW({axis:c,moveRelativeTo:v.page,isMoving:l})},U$=function(e,t){var n=e.frame;return n?Gi(t,n.scroll.diff.displacement):t},sTe=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"?oTe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):nTe({impact:n,draggables:o,afterCritical:s})},IA=function(e){var t=sTe(e),n=e.droppable,r=n?U$(n,t):t;return r},KJ=function(e,t){var n=Is(t,e.scroll.initial),r=lv(n),i=il({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 iW(e,t){return e.map(function(n){return t[n]})}function aTe(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=ZH(n,eW(xo(h))),v=ZH(n,eW(xo(p)));return g!==v?g-v:xo(h)[l.start]-xo(p)[l.start]})[0]},oW=function(t,n){var r=t.page.borderBox.center;return $d(t.descriptor.id,n)?Is(r,n.displacedBy.point):r},fTe=function(t,n){var r=t.page.borderBox;return $d(t.descriptor.id,n)?pw(r,lv(n.displacedBy.point)):r},hTe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(l){return XJ({target:fTe(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,c){var d=c1(t,U$(r,oW(l,o))),f=c1(t,U$(r,oW(c,o)));return dt.left&&e.topt.top}function wTe(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:c1(i,c)}}).sort(function(s,l){return l.distance-s.distance});return o[0]?o[0].id:null}function _Te(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=TA(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!xTe(t,s))return!1;if(eZ(s)(t.center))return!0;var l=o.axis,c=s.center[l.crossAxisLine],d=t[l.crossAxisStart],f=t[l.crossAxisEnd],h=ma(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:wTe({pageBorderBox:t,draggable:n,candidates:i}):null}var tZ=function(t,n){return il(pw(t,n))},STe=function(e,t){var n=e.frame;return n?tZ(t,n.scroll.diff.value):t};function nZ(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function ETe(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 CTe=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=mw(r.axis,n.displaceBy),f=d.value,h=t[c.start],p=t[c.end],g=kA(n,i),v=tf(g,function(S){var _=S.descriptor.id,b=S.page.borderBox.center[c.line],x=$d(_,l),E=nZ({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:k?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},rZ=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=tZ(n.page.borderBox,t),d=_Te({pageBorderBox:c,draggable:n,droppables:i});if(!d)return jCe;var f=i[d],h=cv(f.descriptor.id,r),p=STe(f,c);return ATe({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:f,insideDestination:h,afterCritical:l})||CTe({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:f,insideDestination:h,last:o.displaced,viewport:s,afterCritical:l})},Bz=function(e,t){var n;return F({},e,(n={},n[t.descriptor.id]=t,n))},kTe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Ds(n),s=Ds(r);if(!o||o===s)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var c=mTe(l);return Bz(i,c)},ITe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=kTe({previousImpact:i,impact:o,droppables:r}),l=Ds(o);if(!l)return s;var c=r[l];if(uv(t,c)||c.subject.withPlaceholder)return s;var d=ZJ(c,t,n);return Bz(s,d)},xx=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=Is(d,t.initial.client.selection),h={offset:f,selection:d,borderBoxCenter:Gi(t.initial.client.borderBoxCenter,f)},p={selection:Gi(h.selection,l.scroll.current),borderBoxCenter:Gi(h.borderBoxCenter,l.scroll.current),offset:Gi(h.offset,l.scroll.diff.value)},g={client:h,page:p};if(t.phase==="COLLECTING")return F({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:g});var v=c.draggables[t.critical.draggable.id],y=o||rZ({pageOffset:p.offset,draggable:v,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),S=ITe({draggable:v,impact:y,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),_=F({},t,{current:g,dimensions:{draggables:c.draggables,droppables:S},impact:y,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return _};function RTe(e,t){return e.map(function(n){return t[n]})}var iZ=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,l=RTe(s.all,r),c=d1({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return F({},t,{displaced:c})},oZ=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,l=IA({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Nz({pageBorderBoxCenter:l,draggable:n,viewport:o})},sZ=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=Ds(i);f||He(!1);var h=c[f],p=iZ({impact:i,viewport:o,destination:h,draggables:l}),g=oZ({impact:p,draggable:d,droppable:h,draggables:l,viewport:o,afterCritical:t.afterCritical});return xx({impact:p,clientSelection:g,state:t,dimensions:s,viewport:o})},PTe=function(e){return{index:e.index,droppableId:e.droppableId}},aZ=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=mw(n.axis,t.displaceBy),s=cv(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=d1({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),p={displaced:h,displacedBy:o,at:{type:"REORDER",destination:PTe(t.descriptor)}};return{impact:p,afterCritical:f}},OTe=function(e,t){return{draggables:e.draggables,droppables:Bz(e.droppables,t)}},MTe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=XE(t.client,n),o=YE(i,r),s=F({},t,{placeholder:F({},t.placeholder,{client:i}),client:i,page:o});return s},DTe=function(e){var t=e.frame;return t||He(!1),t},LTe=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=DTe(l),d=c.scroll.diff.value,f=Gi(i,d),h=MTe({draggable:o,offset:f,initialWindowScroll:r.scroll.initial});return h})},NTe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(x){var E=t.dimensions.droppables[x.droppableId],k=Rz(E,x.scroll);return k}),i=F({},t.dimensions.droppables,{},HJ(r)),o=WJ(LTe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=F({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete s[x]});var l={droppables:i,draggables:s},c=Ds(t.impact),d=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],p=aZ({draggable:f,home:h,draggables:s,viewport:t.viewport}),g=p.impact,v=p.afterCritical,y=d&&d.isCombineEnabled?t.impact:g,S=rZ({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}),_=F({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:S,onLiftImpact:g,dimensions:l,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return _;var b=F({phase:"DROP_PENDING"},_,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return b},H$=function(t){return t.movementMode==="SNAP"},DL=function(t,n,r){var i=OTe(t.dimensions,n);return!H$(t)||r?xx({state:t,dimensions:i}):sZ({state:t,dimensions:i})};function LL(e){return e.isDragging&&e.movementMode==="SNAP"?F({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var sW={phase:"IDLE",completed:null,shouldFlush:!1},BTe=function(e,t){if(e===void 0&&(e=sW),t.type==="FLUSH")return F({},sW,{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:Ei},h={client:f,page:{selection:Gi(f.selection,o.scroll.initial),borderBoxCenter:Gi(f.selection,o.scroll.initial),offset:Gi(f.selection,o.scroll.diff.value)}},p=TA(s.droppables).every(function(ve){return!ve.isFixedOnPage}),g=aZ({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 _=F({phase:"COLLECTING"},e,{phase:"COLLECTING"});return _}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||He(!1),NTe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Bh(e)||He(!1);var b=t.payload.client;return Id(b,e.current.client.selection)?e:xx({state:e,clientSelection:b,impact:H$(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return LL(e);Bh(e)||He(!1);var x=t.payload,E=x.id,k=x.newScroll,I=e.dimensions.droppables[E];if(!I)return e;var A=Rz(I,k);return DL(e,A,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Bh(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=F({},H,{isEnabled:N});return DL(e,W,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Bh(e)||He(!1);var z=t.payload,D=z.id,$=z.isCombineEnabled,j=e.dimensions.droppables[D];j||He(!1),j.isCombineEnabled===$&&He(!1);var V=F({},j,{isCombineEnabled:$});return DL(e,V,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Bh(e)||He(!1),e.isWindowScrollAllowed||He(!1);var G=t.payload.newScroll;if(Id(e.viewport.scroll.current,G))return LL(e);var K=KJ(e.viewport,G);return H$(e)?sZ({state:e,viewport:K}):xx({state:e,viewport:K})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Bh(e))return e;var Y=t.payload.maxScroll;if(Id(Y,e.viewport.scroll.max))return e;var J=F({},e.viewport,{scroll:F({},e.viewport.scroll,{max:Y})});return F({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=bTe({state:e,type:t.type});return ie?xx({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=F({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},FTe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},$Te=function(t){return{type:"LIFT",payload:t}},zTe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},jTe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},UTe=function(){return{type:"COLLECTION_STARTING",payload:null}},HTe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},WTe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},GTe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},lZ=function(t){return{type:"MOVE",payload:t}},VTe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},qTe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},XTe=function(){return{type:"MOVE_UP",payload:null}},YTe=function(){return{type:"MOVE_DOWN",payload:null}},KTe=function(){return{type:"MOVE_RIGHT",payload:null}},QTe=function(){return{type:"MOVE_LEFT",payload:null}},Fz=function(){return{type:"FLUSH",payload:null}},JTe=function(t){return{type:"DROP_ANIMATE",payload:t}},$z=function(t){return{type:"DROP_COMPLETE",payload:t}},cZ=function(t){return{type:"DROP",payload:t}},ZTe=function(t){return{type:"DROP_PENDING",payload:t}},uZ=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},eAe=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($z({completed:f.completed})),n().phase!=="IDLE"&&He(!1),r(Fz()),r(FTe({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(zTe({critical:v,dimensions:y,clientSelection:c,movementMode:d,viewport:S}))}}}},tAe=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)}}}},zz={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},f1={opacity:{drop:0,combining:.7},scale:{drop:.75}},jz={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Eh=jz.outOfTheWay+"s "+zz.outOfTheWay,wx={fluid:"opacity "+Eh,snap:"transform "+Eh+", opacity "+Eh,drop:function(t){var n=t+"s "+zz.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Eh,placeholder:"height "+Eh+", width "+Eh+", margin "+Eh},aW=function(t){return Id(t,Ei)?null:"translate("+t.x+"px, "+t.y+"px)"},W$={moveTo:aW,drop:function(t,n){var r=aW(t);return r?n?r+" scale("+f1.scale.drop+")":r:null}},G$=jz.minDropTime,dZ=jz.maxDropTime,nAe=dZ-G$,lW=1500,rAe=.6,iAe=function(e){var t=e.current,n=e.destination,r=e.reason,i=c1(t,n);if(i<=0)return G$;if(i>=lW)return dZ;var o=i/lW,s=G$+nAe*o,l=r==="CANCEL"?s*rAe:s;return Number(l.toFixed(2))},oAe=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=Ds(t),d=c?l[c]:null,f=l[n.descriptor.droppableId],h=oZ({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:d||f,viewport:i}),p=Is(h,n.client.borderBox.center);return p},sAe=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=iZ({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=F({},r,{displaced:u1});return{impact:c,didDropInsideDroppable:!0}},aAe=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(ZTe({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=sAe({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?Oz(p):null,y=g?AA(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=oAe({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($z({completed:x}));return}var k=iAe({current:o.current.client.offset,destination:b,reason:s}),I={newHomeClientOffset:b,dropDuration:k,completed:x};n(JTe(I))}}}},fZ=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function lAe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function cAe(e){var t=e.onWindowScroll;function n(){t(fZ())}var r=l1(n),i=lAe(r),o=kd;function s(){return o!==kd}function l(){s()&&He(!1),o=sa(window,[i])}function c(){s()||He(!1),r.cancel(),o(),o=kd}return{start:l,stop:c,isActive:s}}var uAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},dAe=function(e){var t=cAe({onWindowScroll:function(r){e.dispatch(VTe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&uAe(r)&&t.stop(),n(r)}}},fAe=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},hAe=function(){var e=[],t=function(o){var s=Pz(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}},pAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},mAe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},gAe=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},pb=function(t,n){n()},v_=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},NL=function(t,n,r,i){if(!t){r(i(n));return}var o=fAe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},vAe=function(e,t){var n=hAe(),r=null,i=function(p,g){r&&He(!1),pb("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var y={draggableId:p,mode:g};v(y)}})},o=function(p,g){r&&He(!1),pb("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(v_(p,g))})},s=function(p,g){r&&He(!1);var v=v_(p,g);r={mode:g,lastCritical:p,lastLocation:v.source,lastCombine:null},n.add(function(){pb("onDragStart",function(){return NL(e().onDragStart,v,t,NS.onDragStart)})})},l=function(p,g){var v=Oz(g),y=AA(g);r||He(!1);var S=!gAe(p,r.lastCritical);S&&(r.lastCritical=p);var _=!pAe(r.lastLocation,v);_&&(r.lastLocation=v);var b=!mAe(r.lastCombine,y);if(b&&(r.lastCombine=y),!(!S&&!_&&!b)){var x=F({},v_(p,r.mode),{combine:y,destination:v});n.add(function(){pb("onDragUpdate",function(){return NL(e().onDragUpdate,x,t,NS.onDragUpdate)})})}},c=function(){r||He(!1),n.flush()},d=function(p){r||He(!1),r=null,pb("onDragEnd",function(){return NL(e().onDragEnd,p,t,NS.onDragEnd)})},f=function(){if(r){var p=F({},v_(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}},yAe=function(e,t){var n=vAe(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)}}}},bAe=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($z({completed:r.completed}))}}},xAe=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(uZ())}};n=requestAnimationFrame(function(){n=null,t=sa(window,[s])})}}}},wAe=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)}}}},_Ae=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()}}}}}},SAe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},EAe=function(e){return function(t){return function(n){return function(r){if(SAe(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())}}}},CAe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(cZ({reason:r.reason})))}}}},TAe=kJ,AAe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return AJ(BTe,TAe(BEe(tAe(r),wAe(t),eAe(t),aAe,bAe,xAe,CAe,EAe(s),dAe,_Ae(n),yAe(i,o))))},BL=function(){return{additions:{},removals:{},modified:{}}};function kAe(e){var t=e.registry,n=e.callbacks,r=BL(),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(Ei)}).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=BL(),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=BL())};return{add:s,remove:l,stop:c}}var hZ=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Is({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},pZ=function(){var e=document.documentElement;return e||He(!1),e},mZ=function(){var e=pZ(),t=hZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},IAe=function(){var e=fZ(),t=mZ(),n=e.y,r=e.x,i=pZ(),o=i.clientWidth,s=i.clientHeight,l=r+o,c=n+s,d=il({top:n,left:r,right:l,bottom:c}),f={frame:d,scroll:{initial:e,current:e,max:t,diff:{value:Ei,displacement:Ei}}};return f},RAe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=IAe(),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:WJ(c),droppables:HJ(l)},f={dimensions:d,critical:t,viewport:i};return f};function cW(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 PAe=function(e,t){var n=null,r=kAe({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"&&cW(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&cW(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:_},RAe({critical:S,registry:e,scrollOptions:g.scrollOptions})},h={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:s,startPublishing:f,stopPublishing:c};return h},gZ=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},OAe=function(e){window.scrollBy(e.x,e.y)},MAe=Si(function(e){return TA(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),DAe=function(t,n){var r=tf(MAe(n),function(i){return i.frame||He(!1),eZ(i.frame.pageMarginBox)(t)});return r},LAe=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=DAe(t,r);return o},Rd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},NAe=function(e,t){var n=e[t.size]*Rd.startFromPercentage,r=e[t.size]*Rd.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},vZ=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},Uz=1,BAe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Rd.maxPixelScroll;if(e===t.startScrollingFrom)return Uz;var n=vZ({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Rd.maxPixelScroll*Rd.ease(r);return Math.ceil(i)},uW=Rd.durationDampening.accelerateAt,dW=Rd.durationDampening.stopDampeningAt,FAe=function(e,t){var n=t,r=dW,i=Date.now(),o=i-n;if(o>=dW)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}},zAe=jJ(function(e){return e===0?0:e}),yZ=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=hW({container:n,distanceToEdges:s,dragStartTime:t,axis:Mz,shouldUseTimeDampening:o}),c=hW({container:n,distanceToEdges:s,dragStartTime:t,axis:qJ,shouldUseTimeDampening:o}),d=zAe({x:c,y:l});if(Id(d,Ei))return null;var f=$Ae({container:n,subject:r,proposedScroll:d});return f?Id(f,Ei)?null:f:null},jAe=jJ(function(e){return e===0?0:e>0?1:-1}),Hz=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=Gi(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Id(s,Ei)?null:s}}(),bZ=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=jAe(i),l=Hz({max:o,current:r,change:s});return!l||s.x!==0&&l.x===0||s.y!==0&&l.y===0},Wz=function(t,n){return bZ({current:t.scroll.current,max:t.scroll.max,change:n})},UAe=function(t,n){if(!Wz(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Hz({current:i,max:r,change:n})},Gz=function(t,n){var r=t.frame;return r?bZ({current:r.scroll.current,max:r.scroll.max,change:n}):!1},HAe=function(t,n){var r=t.frame;return!r||!Gz(t,n)?null:Hz({current:r.scroll.current,max:r.scroll.max,change:n})},WAe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=yZ({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&Wz(t,s)?s:null},GAe=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=yZ({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&Gz(t,l)?l:null},pW=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=WAe({dragStartTime:n,viewport:d,subject:c,center:s,shouldUseTimeDampening:r});if(f){i(f);return}}var h=LAe({center:s,destination:Ds(t.impact),droppables:t.dimensions.droppables});if(h){var p=GAe({dragStartTime:n,droppable:h,subject:c,center:s,shouldUseTimeDampening:r});p&&o(h.descriptor.id,p)}},VAe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=l1(t),i=l1(n),o=null,s=function(f){o||He(!1);var h=o,p=h.shouldUseTimeDampening,g=h.dragStartTime;pW({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};pW({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}},qAe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(d,f){var h=Gi(d.current.client.selection,f);t({client:h})},o=function(d,f){if(!Gz(d,f))return f;var h=HAe(d,f);if(!h)return n(d.descriptor.id,f),null;var p=Is(f,h);n(d.descriptor.id,p);var g=Is(f,p);return g},s=function(d,f,h){if(!d||!Wz(f,h))return h;var p=UAe(f,h);if(!p)return r(h),null;var g=Is(h,p);r(g);var v=Is(h,g);return v},l=function(d){var f=d.scrollJumpRequest;if(f){var h=Ds(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},XAe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=VAe({scrollWindow:n,scrollDroppable:t}),o=qAe({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"}}(),V$=function(){var e=Ng+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),YAe=function(){var e=Ng+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),mW={contextId:Ng+"-scroll-container-context-id"},KAe=function(t){return function(n){return"["+n+'="'+t+'"]'}},mb=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},QAe="pointer-events: none;",JAe=function(e){var t=KAe(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:QAe,dropAnimating:l}}}(),r=function(){var l=` + transition: `+wx.outOfTheWay+`; + `;return{selector:t(V$.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}}(),i={selector:t(YAe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` + cursor: grabbing; + cursor: -webkit-grabbing; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + overflow-anchor: none; + `}},s=[r,n,i,o];return{always:mb(s,"always"),resting:mb(s,"resting"),dragging:mb(s,"dragging"),dropAnimating:mb(s,"dropAnimating"),userCancel:mb(s,"userCancel")}},Ls=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect,FL=function(){var t=document.querySelector("head");return t||He(!1),t},gW=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function ZAe(e,t){var n=wn(function(){return JAe(e)},[e]),r=R.useRef(null),i=R.useRef(null),o=wt(Si(function(h){var p=i.current;p||He(!1),p.textContent=h}),[]),s=wt(function(h){var p=r.current;p||He(!1),p.textContent=h},[]);Ls(function(){!r.current&&!i.current||He(!1);var h=gW(t),p=gW(t);return r.current=h,i.current=p,h.setAttribute(Ng+"-always",e),p.setAttribute(Ng+"-dynamic",e),FL().appendChild(h),FL().appendChild(p),s(n.always),o(n.resting),function(){var g=function(y){var S=y.current;S||He(!1),FL().removeChild(S),y.current=null};g(r),g(i)}},[t,s,o,n.always,n.resting,e]);var l=wt(function(){return o(n.dragging)},[o,n.dragging]),c=wt(function(h){if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),d=wt(function(){i.current&&o(n.resting)},[o,n.resting]),f=wn(function(){return{dragging:l,dropping:c,resting:d}},[l,c,d]);return f}var xZ=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function RA(e){return e instanceof xZ(e).HTMLElement}function eke(e,t){var n="["+Bg.contextId+'="'+e+'"]',r=UJ(document.querySelectorAll(n));if(!r.length)return null;var i=tf(r,function(o){return o.getAttribute(Bg.draggableId)===t});return!i||!RA(i)?null:i}function tke(e){var t=R.useRef({}),n=R.useRef(null),r=R.useRef(null),i=R.useRef(!1),o=wt(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=wt(function(p){var g=eke(e,p);g&&g!==document.activeElement&&g.focus()},[e]),l=wt(function(p,g){n.current===p&&(n.current=g)},[]),c=wt(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&s(p)}))},[s]),d=wt(function(p){n.current=null;var g=document.activeElement;g&&g.getAttribute(Bg.draggableId)===p&&(n.current=p)},[]);Ls(function(){return i.current=!0,function(){i.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var f=wn(function(){return{register:o,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}},[o,d,c,l]);return f}function nke(){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 JE(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 JE(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 rke(){var e=wn(nke,[]);return R.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Vz=de.createContext(null),eC=function(){var e=document.body;return e||He(!1),e},ike={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},oke=function(t){return"rbd-announcement-"+t};function ske(e){var t=wn(function(){return oke(e)},[e]),n=R.useRef(null);R.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),F(o.style,ike),eC().appendChild(o),function(){setTimeout(function(){var c=eC();c.contains(o)&&c.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=wt(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var ake=0,lke={separator:"::"};function qz(e,t){return t===void 0&&(t=lke),wn(function(){return""+e+t.separator+ake++},[t.separator,e])}function cke(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function uke(e){var t=e.contextId,n=e.text,r=qz("hidden-text",{separator:"-"}),i=wn(function(){return cke({contextId:t,uniqueId:r})},[r,t]);return R.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",eC().appendChild(s),function(){var c=eC();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var PA=de.createContext(null);function wZ(e){var t=R.useRef(e);return R.useEffect(function(){t.current=e}),t}function dke(){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 fke=9,hke=13,Xz=27,_Z=32,pke=33,mke=34,gke=35,vke=36,yke=37,bke=38,xke=39,wke=40,y_,_ke=(y_={},y_[hke]=!0,y_[fke]=!0,y_),SZ=function(e){_ke[e.keyCode]&&e.preventDefault()},OA=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=tf(t,function(r){return"on"+r in document});return n||e}(),EZ=0,vW=5;function Ske(e,t){return Math.abs(t.x-e.x)>=vW||Math.abs(t.y-e.y)>=vW}var yW={type:"IDLE"};function Eke(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===EZ){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(Ske(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===Xz){s.preventDefault(),t();return}SZ(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:OA,fn:t}]}function Cke(e){var t=R.useRef(yW),n=R.useRef(kd),r=wn(function(){return{eventName:"mousedown",fn:function(h){if(!h.defaultPrevented&&h.button===EZ&&!(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=wn(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=wt(function(){var h={passive:!1,capture:!0};n.current=sa(window,[i,r],h)},[i,r]),s=wt(function(){var f=t.current;f.type!=="IDLE"&&(t.current=yW,n.current(),o())},[o]),l=wt(function(){var f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=wt(function(){var h={capture:!0,passive:!1},p=Eke({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=sa(window,p,h)},[l,s]),d=wt(function(h,p){t.current.type!=="IDLE"&&He(!1),t.current={type:"PENDING",point:p,actions:h},c()},[c]);Ls(function(){return o(),function(){n.current()}},[o])}var em;function Tke(){}var Ake=(em={},em[mke]=!0,em[pke]=!0,em[vke]=!0,em[gke]=!0,em);function kke(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Xz){o.preventDefault(),n();return}if(o.keyCode===_Z){o.preventDefault(),r();return}if(o.keyCode===wke){o.preventDefault(),e.moveDown();return}if(o.keyCode===bke){o.preventDefault(),e.moveUp();return}if(o.keyCode===xke){o.preventDefault(),e.moveRight();return}if(o.keyCode===yke){o.preventDefault(),e.moveLeft();return}if(Ake[o.keyCode]){o.preventDefault();return}SZ(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:OA,fn:n}]}function Ike(e){var t=R.useRef(Tke),n=wn(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==_Z)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=sa(window,kke(d,f),{capture:!0,passive:!1})}}},[e]),r=wt(function(){var o={passive:!1,capture:!0};t.current=sa(window,[n],o)},[n]);Ls(function(){return r(),function(){t.current()}},[r])}var $L={type:"IDLE"},Rke=120,Pke=.15;function Oke(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===Xz&&i.preventDefault(),t()}},{eventName:OA,fn:t}]}function Mke(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>=Pke;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:OA,fn:t}]}function Dke(e){var t=R.useRef($L),n=R.useRef(kd),r=wt(function(){return t.current},[]),i=wt(function(g){t.current=g},[]),o=wn(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=wt(function(){var g={capture:!0,passive:!1};n.current=sa(window,[o],g)},[o]),l=wt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i($L),n.current(),s())},[s,i]),c=wt(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),d=wt(function(){var g={capture:!0,passive:!1},v={cancel:c,completed:l,getPhase:r},y=sa(window,Mke(v),g),S=sa(window,Oke(v),g);n.current=function(){y(),S()}},[c,r,l]),f=wt(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=wt(function(g,v){r().type!=="IDLE"&&He(!1);var y=setTimeout(f,Rke);i({type:"PENDING",point:v,actions:g,longPressTimerId:y}),d()},[d,r,i,f]);Ls(function(){return s(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i($L))}},[r,s,i]),Ls(function(){var g=sa(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}var Lke={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function CZ(e,t){if(t==null)return!1;var n=!!Lke[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:CZ(e,t.parentElement)}function Nke(e,t){var n=t.target;return RA(n)?CZ(e,n):!1}var Bke=function(e){return il(e.getBoundingClientRect()).center};function Fke(e){return e instanceof xZ(e).Element}var $ke=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=tf(t,function(r){return r in Element.prototype});return n||e}();function TZ(e,t){return e==null?null:e[$ke](t)?e:TZ(e.parentElement,t)}function zke(e,t){return e.closest?e.closest(t):TZ(e,t)}function jke(e){return"["+Bg.contextId+'="'+e+'"]'}function Uke(e,t){var n=t.target;if(!Fke(n))return null;var r=jke(e),i=zke(n,r);return!i||!RA(i)?null:i}function Hke(e,t){var n=Uke(e,t);return n?n.getAttribute(Bg.draggableId):null}function Wke(e,t){var n="["+V$.contextId+'="'+e+'"]',r=UJ(document.querySelectorAll(n)),i=tf(r,function(o){return o.getAttribute(V$.id)===t});return!i||!RA(i)?null:i}function Gke(e){e.preventDefault()}function b_(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function AZ(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||!gZ(n.getState(),i))}function Vke(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent,c=AZ({lockAPI:t,store:r,registry:i,draggableId:o});if(!c)return null;var d=i.draggable.getById(o),f=Wke(n,d.descriptor.id);if(!f||l&&!d.options.canDragInteractiveElements&&Nke(f,l))return null;var h=t.claim(s||kd),p="PRE_DRAG";function g(){return d.options.shouldRespectForcePress}function v(){return t.isActive(h)}function y(I,A){b_({expected:I,phase:p,isLockActive:v,shouldWarn:!0})&&r.dispatch(A())}var S=y.bind(null,"DRAGGING");function _(I){function A(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(A(),p!=="PRE_DRAG"&&He(!1)),r.dispatch($Te(I.liftActionArgs)),p="DRAGGING";function O(L,N){if(N===void 0&&(N={shouldBlockNextClick:!1}),I.cleanup(),N.shouldBlockNextClick){var H=sa(window,[{eventName:"click",fn:Gke,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}A(),r.dispatch(cZ({reason:L}))}return F({isActive:function(){return b_({expected:"DRAGGING",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(N){return O("DROP",N)},cancel:function(N){return O("CANCEL",N)}},I.actions)}function b(I){var A=l1(function(L){S(function(){return lZ({client:L})})}),O=_({liftActionArgs:{id:o,clientSelection:I,movementMode:"FLUID"},cleanup:function(){return A.cancel()},actions:{move:A}});return F({},O,{move:A})}function x(){var I={moveUp:function(){return S(XTe)},moveRight:function(){return S(KTe)},moveDown:function(){return S(YTe)},moveLeft:function(){return S(QTe)}};return _({liftActionArgs:{id:o,clientSelection:Bke(f),movementMode:"SNAP"},cleanup:kd,actions:I})}function E(){var I=b_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!0});I&&t.release()}var k={isActive:function(){return b_({expected:"PRE_DRAG",phase:p,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:b,snapLift:x,abort:E};return k}var qke=[Cke,Ike,Dke];function Xke(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?qke:[],i||[]),l=R.useState(function(){return dke()})[0],c=wt(function(b,x){b.isDragging&&!x.isDragging&&l.tryAbandon()},[l]);Ls(function(){var b=n.getState(),x=n.subscribe(function(){var E=n.getState();c(b,E),b=E});return x},[l,n,c]),Ls(function(){return l.tryAbandon},[l.tryAbandon]);for(var d=wt(function(_){return AZ({lockAPI:l,registry:r,store:n,draggableId:_})},[l,r,n]),f=wt(function(_,b,x){return Vke({lockAPI:l,registry:r,contextId:t,store:n,draggableId:_,forceSensorStop:b,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null})},[t,l,r,n]),h=wt(function(_){return Hke(t,_)},[t]),p=wt(function(_){var b=r.draggable.findById(_);return b?b.options:null},[r.draggable]),g=wt(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Fz()))},[l,n]),v=wt(l.isClaimed,[l]),y=wn(function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}},[d,f,h,p,g,v]),S=0;S{},onDeleteItem:o=()=>{},enabled:s=!1,element:l=C.jsx(UIe,{}),value:c,id:d,i:f=0,variant:h="default",extrasPlacement:p="center",autoFocus:g,cardStyle:v,sortable:y}){const[S,_]=R.useState(null),b=Pn(),x=E=>C.jsxs(dt,{display:"flex",alignItems:p,children:[y&&C.jsx("div",{...E,children:C.jsx(dt,{color:"text.secondary",sx:{pr:2},children:C.jsx(r1e,{})})}),e!==null&&R.cloneElement(e,{style:{marginRight:b.spacing(1),marginTop:b.spacing(.5),marginBottom:b.spacing(.5)},color:"action"}),C.jsx(dt,{flexGrow:1,sx:{ml:e===null?2:0},children:R.cloneElement(l,{onDelete:()=>o(d??f),autoFocus:g,value:c,key:d??f,onValueChange:k=>i(d??f,k,s),onChange:k=>i(d??f,k.target.value,s),ref:k=>_(k)})}),C.jsxs(dt,{display:"flex",alignItems:"center",children:[t&&C.jsx(Pg,{color:"primary",edge:"end",onChange:(k,I)=>i(d??f,c,I),checked:s}),r&&C.jsx(xp,{edge:"end",onClick:()=>{S!=null&&S.focus&&S.focus()},children:C.jsx(fA,{})}),n&&C.jsx(xp,{onClick:()=>o(d??f),children:C.jsx(e1e,{})})]})]});return C.jsx(NIe,{index:f,draggableId:`${d}`,children:E=>C.jsx("div",{ref:E.innerRef,...E.draggableProps,children:C.jsx(dt,{sx:{pb:1,ml:2},children:h==="outlined"?C.jsx(Jme,{variant:"outlined",style:{borderColor:"transparent",paddingRight:b.spacing(2),transition:b.transitions.create(["box-shadow","border-color"]),...v},children:x(E.dragHandleProps)}):x(E.dragHandleProps)})})})}function GIe(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function VIe(e){const{addItemLabel:t="Add Item",label:n,text:r,onAddItem:i=()=>{},onDeleteItem:o=()=>{},items:s=[],placeholderText:l,autoFocus:c,getCategory:d,getOrder:f,onChange:h,extras:p}=e,g=HIe(),v=Pn(),[y,S]=R.useState(s),[_,b]=R.useState(-1);R.useEffect(()=>{const I=setTimeout(()=>{S(s)},v.transitions.duration.standard);return()=>{clearTimeout(I)}},[s,S,v.transitions.duration.standard]);const x=te.uniqBy([...y,...s],I=>I.id).map(I=>s.find(A=>I.id===A.id)??I).map((I,A)=>{const{enabled:O,element:L,value:N,id:H}=I??{};return{value:N,render:W=>C.jsx(nL,{in:!!s.find(z=>z.id===I.id),unmountOnExit:!0,appear:!g,mountOnEnter:!0,children:C.jsx(WIe,{...e,onDeleteItem:z=>{o(z),b(-1)},enabled:O,element:L,value:N,id:H,i:A,autoFocus:c||A===_,...W})}),key:H,in:!!s.find(W=>W.id===I.id)}}),E=te.sortBy(x,I=>d==null?void 0:d(I.value),I=>f==null?void 0:f(I.value)).map(I=>({...I,render:A=>C.jsx(dt,{children:I.render(A)},I.key)}));return C.jsx(Zke,{onDragEnd:I=>{if(!I.destination)return;const A=GIe(s,I.source.index,I.destination.index);h==null||h(A),S(A)},children:C.jsxs(Rg,{subheader:n||r?C.jsx(C.Fragment,{children:C.jsxs(Zpe,{disableSticky:!0,children:[n&&C.jsx(jt,{variant:"body1",gutterBottom:!0,color:"textPrimary",children:n}),r&&C.jsx(jt,{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(MZ,{droppableId:"list",children:I=>C.jsxs("div",{...I.droppableProps,ref:I.innerRef,children:[(()=>{const A=[];return E.forEach((O,L)=>{d&&k(E,L,O)&&A.push(C.jsx(nL,{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(jt,{variant:"overline",color:"text.secondary",children:d(O.value)})})},d(O.value))),A.push(O.render())}),A})(),I.placeholder]})})}),C.jsx(nL,{in:!(s!=null&&s.length),children:C.jsx(dt,{ml:2,mb:1,pt:d?1:0,children:C.jsx(jt,{component:"div",color:"text.secondary",children:l??"No items"})})}),C.jsxs(dt,{p:2,pt:1,mb:-3,children:[C.jsx(rz,{disableElevation:!0,variant:"outlined",startIcon:C.jsx(Vxe,{}),color:"primary",onClick:()=>{i(),b(s.length)},sx:{borderColor:I=>Sn(I.palette.text.primary,I.palette.action.activatedOpacity)},children:C.jsx(dt,{sx:{color:"text.primary"},children:t})}),p]})]})});function k(I,A,O){return!!(d&&(I[A-1]===void 0||d(I[A-1].value)!==d(O.value)))}}function MA({onChange:e,value:t=[],editor:n,create:r,...i}){const[o,s]=R.useState(t??[]);function l(c){s(c),e==null||e(c)}return R.useEffect(()=>{s(t)},[t]),C.jsx(dt,{sx:{ml:-2},children:C.jsx(VIe,{...i,items:o.map(c=>({id:c.key,value:c,element:n==null?void 0:n(c)})),useDelete:!0,useEdit:!1,onAddItem:()=>l==null?void 0:l([...o,{key:Bo(),...r==null?void 0:r()}]),onDeleteItem:c=>l==null?void 0:l(te.filter(o,d=>d.key!==c)),onChangeItem:(c,d)=>l==null?void 0:l(te.map(o,f=>f.key===c?d:f)),onChange:c=>l==null?void 0:l(te.map(c,d=>d.value))})})}const rd=[{key:"equal",apply:(e,t)=>e===t},{key:"less-than",apply:(e,t)=>ee>t}],qIe=["any","source","destination","expanding","generating","closing"];function XIe({value:e,onValueChange:t,properties:n}){var i,o;function r(s){t==null||t({...e,...s})}return C.jsxs(xn,{children:[C.jsx(yx,{placeholder:"Event",sx:{minWidth:160},items:te.map(qIe,s=>({value:s,label:te.startCase(s)})),onChange:s=>r({type:s==="any"?void 0:s}),value:e.type??"any"}),C.jsx(Mu,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),C.jsx(yx,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:te.map(n,s=>({value:s,label:C.jsxs(C.Fragment,{children:[te.last(s.split(".")),C.jsx(Jr,{}),C.jsx(jt,{color:"text.secondary",variant:"body2",component:"span",children:`event.${s}`})]})})),onChange:s=>r({property:s}),value:e.property}),C.jsx(Jr,{}),C.jsx(yx,{placeholder:"Condition",items:rd.map(s=>({value:s.key,label:te.startCase(s.key)})),value:((i=e==null?void 0:e.condition)==null?void 0:i.key)??((o=rd==null?void 0:rd[0])==null?void 0:o.key),onChange:s=>r({condition:te.find(rd,{key:s})})}),C.jsx(Jr,{}),C.jsx(J1,{label:"Reference",fullWidth:!0,value:`${e.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:s=>r({reference:+s.target.value}),type:"number"}),C.jsx(Jr,{sx:{px:2}}),C.jsx(F$,{checked:!!e.active,onChange:(s,l)=>r({active:l})})]})}const YIe=["f","g"],KIe=["variables"];function QIe(){const[{breakpoints:e=[]},t]=CA(),n=te.uniq([...YIe,...te.flatMap(KIe,r=>te.flatMap([],i=>te.map(te.keys(te.get(i,r)),o=>`${r}.${o}`)))]);return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{minWidth:720,mb:2},children:C.jsx(MA,{icon:null,value:e,useDelete:!0,useEdit:!1,editor:r=>C.jsx(XIe,{value:r,properties:n}),create:()=>({active:!0,property:n==null?void 0:n[0],condition:rd==null?void 0:rd[0],type:void 0,reference:0}),onChange:te.debounce(r=>t(()=>({breakpoints:r})),1e3),addItemLabel:"Breakpoint",placeholderText:"Click the button below to add a breakpoint."})})})}function JIe(){const{controls:e,onChange:t,state:n}=ef(),[{monotonicF:r,monotonicG:i},o]=CA(),[s,l]=R.useState("standard");function c(d){return C.jsx(jt,{variant:"overline",color:"text.secondary",children:d})}return C.jsx(fJ,{value:s,children:C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Options,{children:C.jsxs(gJ,{onChange:(d,f)=>l(f),children:[C.jsx(Bm,{label:"Standard",value:"standard"}),C.jsx(Bm,{label:"Advanced",value:"advanced"})]})}),C.jsxs(Nn.Content,{children:[C.jsx(dt,{overflow:"auto",height:"100%",children:C.jsxs(dt,{pt:6,height:"100%",children:[C.jsxs(jm,{value:"standard",children:[C.jsxs(dt,{children:[c("General"),C.jsxs(xn,{children:[C.jsx(F$,{label:"Monotonic f value",checked:!!r,onChange:(d,f)=>o(()=>({monotonicF:f}))}),C.jsx(Jr,{}),C.jsx(F$,{label:"Monotonic g value",checked:!!i,onChange:(d,f)=>o(()=>({monotonicG:f}))})]})]}),C.jsx(Jr,{}),C.jsxs(dt,{children:[c("Breakpoints"),C.jsx(QIe,{})]}),C.jsxs(dt,{children:[c("Export"),C.jsx(xn,{mt:1})]})]}),C.jsx(jm,{value:"advanced",sx:{p:0,height:"100%"},children:C.jsx(PEe,{})})]})})," "]}),C.jsx(Nn.Extras,{children:e})]})})}function Kh({label:e,icon:t=C.jsx(w1e,{}),...n}){return C.jsxs(xn,{justifyContent:"center",alignItems:"center",color:"text.secondary",bgcolor:"background.paper",textAlign:"center",vertical:!0,pt:6,...n,children:[R.cloneElement(t,{sx:{mb:2},fontSize:"large"}),C.jsx(jt,{children:e})]})}function ZIe(){const{controls:e,onChange:t,state:n}=ef(),[r]=bQ();return C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Content,{children:C.jsx(xn,{vertical:!0,children:r.length?C.jsx(nw,{y:!0,children:C.jsx(Rg,{sx:{pt:6},children:te.map(r,(i,o)=>C.jsxs("div",{children:[C.jsx(gx,{children:C.jsx(Wl,{primary:i.content,secondary:i.timestamp})}),C.jsx(Mu,{})]},o))})}):C.jsx(Kh,{pt:6,label:"Logs",icon:C.jsx(dQ,{})})})}),C.jsx(Nn.Extras,{children:e})]})}const eRe=te.constant(!0),[Fp,tRe]=nc({layers:[]});function Tp(e,t=eRe){const[n,r]=R.useState(e),[{layers:i},o]=Fp(),s=te.filter(i,t),l=n?te.find(s,{key:n}):te.head(s);return R.useEffect(()=>{r(e)},[e]),R.useEffect(()=>{l&&l.key!==n&&r(l.key)},[l,n,r]),R.useMemo(()=>({key:l==null?void 0:l.key,setKey:r,layer:l,setLayer:c=>{const d={...l,...c};o(({layers:f})=>({layers:te.map(f,h=>h.key===d.key?d:h)}))},layers:s}),[l,o,s])}var DZ={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&&($+=N.value),N.mode==="max"&&z<=W&&($+=N.value),D[j]||(D[j]=""),$&&(" "+D[j]+" ").indexOf(" "+$+" ")===-1&&(D[j]+=" "+$));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(A,O){A.elementQueriesSetupInformation||(A.elementQueriesSetupInformation=new h(A,O)),A.elementQueriesSensor||(A.elementQueriesSensor=new n(A,function(){A.elementQueriesSetupInformation.call()}))}function g(A,O,L,N){if(typeof s[A]>"u"){s[A]=[];var H=l.length;o.innerHTML+=` +`+A+" {animation: 0.1s element-queries;}",o.innerHTML+=` +`+A+" > .resize-sensor {min-width: "+H+"px;}",l.push(A)}s[A].push({mode:O,property:L,value:N})}function v(A){var O;if(document.querySelectorAll&&(O=A?A.querySelectorAll.bind(A):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(A){var O=v(A);for(var L in s)if(s.hasOwnProperty(L))for(var N=O(L,A),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]}A.resizeSensorInstance=new n(A,G),G()}function _(){for(var A=v(),O=A("[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),I=!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(BZ.Provider,{value:r,children:C.jsx("div",{style:{width:"100%"},children:n.children})})})}const BZ=R.createContext(null);function oRe(){return R.useContext(BZ)}function sRe(e=128){const[t,n]=R.useState(!0),[r,i]=R.useState(!0),[o,s]=R.useState(!0),[l,c]=R.useState(null),d=R.useRef(0);return R.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 Kz({children:e}){return C.jsx(jt,{variant:"h6",children:e})}function aRe({onClose:e=()=>{},style:t,elevatedStyle:n,children:r,transitionProperties:i=["box-shadow","background","border-bottom"],elevatedChildren:o,simple:s,position:l="sticky"}){const c=oRe(),d=Pn(),[,,f,,h]=sRe();R.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(qfe,{elevation:0,position:l,style:{color:d.palette.text.primary,transition:d.transitions.create(i),...p},children:C.jsxs(hxe,{children:[C.jsx(xp,{style:{marginRight:d.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>e(),children:C.jsx(qxe,{})}),r&&C.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:C.jsx(_p,{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(_p,{in:!!(o&&!f),mountOnEnter:!0,unmountOnExit:!0,children:C.jsx(dt,{style:{width:"100%"},children:o})})})]})})}function lRe({children:e,actions:t,width:n=480,height:r,onTarget:i,variant:o="default",scrollable:s=!0,...l}){var k;const[c,d]=R.useState(void 0);R.useEffect(()=>{e&&d(e)},[e]);const f=Pn(),h=Ez(),[p,g]=R.useState(null),[v,y]=R.useState(null),[S,_]=R.useState(!1),[b,x]=R.useState(0);R.useEffect(()=>{if(p&&v&&!h&&!r){const I=()=>{const O=window.innerHeight-64{window.removeEventListener("resize",I),A.detach()}}},[p,v,h,r]);const E=o==="submodal"&&h;return C.jsxs(Xge,{fullScreen:h,...l,style:{...E&&{paddingTop:f.spacing(8)},...l.style},PaperProps:{ref:I=>g(I),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",...(k=l.PaperProps)==null?void 0:k.style},...l.PaperProps},children:[C.jsx(iRe,{style:{height:"100%",width:h?void 0:n,maxWidth:"100%",overflow:s?void 0:"hidden"},onTarget:i,children:C.jsx("div",{ref:I=>y(I),style:{width:"100%",height:"100%"},children:c})}),t]})}function Qz({options:e,appBar:t,trigger:n=()=>C.jsx(C.Fragment,{}),children:r}){return C.jsx(Bp,{variant:"popover",children:({open:i,close:o,isOpen:s})=>C.jsxs(C.Fragment,{children:[R.cloneElement(n(i)),C.jsxs(lRe,{open:s,onClose:o,...e,children:[C.jsx(aRe,{onClose:o,...t}),r??(e==null?void 0:e.children)]})]})})}const[Fg,cRe]=nc([],{reduce:yQ}),[nC,uRe]=nc({algorithms:[],maps:[],formats:[]}),[DA,dRe]=nc({specimen:0,connections:0,features:0,map:0},{reduce:(e,{action:t,key:n})=>ha(e,r=>{switch(t){case"start":r[n]+=1;break;case"end":r[n]-=1}return r})});function fRe(){const[e]=DA();return te.some(te.values(e))}function $p(e){const[,t]=DA();return R.useCallback(async n=>{t(()=>({action:"start",key:e}));const r=await n();return t(()=>({action:"end",key:e})),r},[e,t])}let FZ=class extends Error{},hRe=class extends FZ{},pRe=class extends FZ{};const mRe=(e,t=",")=>e.join(t),gRe={accept:"*",multiple:!1,strict:!1},Jz=e=>{const{accept:t,multiple:n,strict:r}={...gRe,...e},i=bRe({multiple:n,accept:Array.isArray(t)?mRe(t):t});return new Promise(o=>{i.onchange=()=>{o(vRe(i.files,n,r)),i.remove()},i.click()})},vRe=(e,t,n)=>new Promise((r,i)=>{if(!e)return i(new hRe);const o=yRe(e,t,n);if(!o)return i(new pRe);r(o)}),yRe=(e,t,n)=>!t&&n?e.length===1?e[0]:null:e.length?e:null,bRe=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n},xRe=""+new URL("hash.worker-76266fd6.js",import.meta.url).href,wRe=""+new URL("ipc.worker-78007631.js",import.meta.url).href,_Re=""+new URL("compress.worker-5a39bbab.js",import.meta.url).href,SRe=""+new URL("parseYaml.worker-858dc2e2.js",import.meta.url).href;class ERe extends Worker{constructor(){super(xRe,{type:"module"})}}class CRe extends Worker{constructor(){super(_Re,{type:"module"})}}class TRe extends Worker{constructor(){super(wRe,{type:"module"})}}class ARe extends Worker{constructor(){super(SRe,{type:"module"})}}var kRe=function(){},IRe=kRe(),zp=function(e){return e!==IRe&&e!==null},RRe=zp,PRe=Array.prototype.forEach,ORe=Object.create,MRe=function(e,t){var n;for(n in e)t[n]=e[n]},$Z=function(e){var t=ORe(null);return PRe.call(arguments,function(n){RRe(n)&&MRe(Object(n),t)}),t},DRe=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1},UL,EW;function LRe(){return EW||(EW=1,UL=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),UL}var NRe=DRe()?Math.sign:LRe(),BRe=NRe,FRe=Math.abs,$Re=Math.floor,zRe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:BRe(e)*$Re(FRe(e)))},jRe=zRe,URe=Math.max,jp=function(e){return URe(0,jRe(e))},HRe=jp,zZ=function(e,t,n){var r;return isNaN(e)?(r=t,r>=0?n&&r?r-1:r:1):e===!1?!1:HRe(e)},nf=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},WRe=zp,dv=function(e){if(!WRe(e))throw new TypeError("Cannot use null or undefined");return e},GRe=nf,VRe=dv,qRe=Function.prototype.bind,CW=Function.prototype.call,XRe=Object.keys,YRe=Object.prototype.propertyIsEnumerable,KRe=function(e,t){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(VRe(n)),GRe(r),i=XRe(n),s&&i.sort(typeof s=="function"?qRe.call(s,n):void 0),typeof e!="function"&&(e=i[e]),CW.call(e,i,function(l,c){return YRe.call(n,l)?CW.call(r,o,n[l],l,n,c):t})}},LA=KRe("forEach"),Up={},jZ={exports:{}},QRe=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")},HL,TW;function JRe(){return TW||(TW=1,HL=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),HL}var WL,AW;function ZRe(){if(AW)return WL;AW=1;var e=zp,t=Object.keys;return WL=function(n){return t(e(n)?Object(n):n)},WL}var GL,kW;function ePe(){return kW||(kW=1,GL=JRe()()?Object.keys:ZRe()),GL}var VL,IW;function tPe(){if(IW)return VL;IW=1;var e=ePe(),t=dv,n=Math.max;return VL=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 xPe=yPe()?String.prototype.contains:bPe(),BS=qZ,NW=vPe,XZ=UZ,YZ=$Z,_x=xPe,wPe=VZ.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],BS(e)?(n=_x.call(e,"c"),r=_x.call(e,"e"),i=_x.call(e,"w")):(n=i=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:i},o?XZ(YZ(o),s):s};wPe.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],BS(t)?NW(t)?BS(n)?NW(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,BS(e)?(r=_x.call(e,"c"),i=_x.call(e,"e")):(r=!0,i=!1),s={get:t,set:n,configurable:r,enumerable:i},o?XZ(YZ(o),s):s};var Hp=VZ.exports,Y$={exports:{}};(function(e,t){var n=Hp,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,k;return r(x),k=this,h.call(this,b,E=function(){g.call(k,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,k,I,A;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(k=E[b],typeof k=="object")for(A=0;I=k[A];++A)(I===x||I.__eeOnceListener__===x)&&(k.length===2?E[b]=k[A?0:1]:k.splice(A,1));else(k===x||k.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,k,I,A;if(d.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,A=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"}},PN}var ON,wG;function g2e(){if(wG)return ON;wG=1;var e=m2e(),t=/[\n\r\u2028\u2029]/g;return ON=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},ON}var E_={exports:{}},_G;function tee(){if(_G)return E_.exports;_G=1,E_.exports=e,E_.exports.default=e;function e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}return E_.exports}var SG;function v2e(){if(SG)return mG;SG=1;var e=ZZ(),t=f2e(),n=p2e(),r=g2e(),i=tee(),o=tj(),s=Object.create,l=t("then","then:finally","done","done:finally");return Up.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(k){var I=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.`);I&&(delete f[g],h[g]=k,d.emit("setasync",g,I))},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(k){o(_.bind(this,k))},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]}))})},mG}var EG={},CG;function y2e(){if(CG)return EG;CG=1;var e=nf,t=LA,n=Up,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)})})},EG}var TG={},MN,AG;function b2e(){return AG||(AG=1,MN=2147483647),MN}var DN,kG;function x2e(){if(kG)return DN;kG=1;var e=jp,t=b2e();return DN=function(n){if(n=e(n),n>t)throw new TypeError(n+" exceeds maximum possible timeout");return n},DN}var IG;function w2e(){if(IG)return TG;IG=1;var e=Zz(),t=LA,n=tj(),r=tee(),i=x2e(),o=Up,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={})}))},TG}var RG={},LN,PG;function _2e(){if(PG)return LN;PG=1;var e=jp,t=Object.create,n=Object.prototype.hasOwnProperty;return LN=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}}},LN}var OG;function S2e(){if(OG)return RG;OG=1;var e=jp,t=_2e(),n=Up;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))},RG}var MG={},DG;function E2e(){if(DG)return MG;DG=1;var e=Hp,t=Up,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]})})},MG}var C2e=$Z,T2e=zZ,A2e=n2e,k2e=function(e){var t=C2e(arguments[1]),n;return t.normalizer||(n=t.length=T2e(t.length,e.length,t.async),n!==0&&(t.primitive?n===!1?t.normalizer=r2e():n>1&&(t.normalizer=i2e()(n)):n===!1?t.normalizer=l2e()():n===1?t.normalizer=c2e()():t.normalizer=u2e()(n))),t.async&&d2e(),t.promise&&v2e(),t.dispose&&y2e(),t.maxAge&&w2e(),t.max&&S2e(),t.refCounter&&E2e(),A2e(e,t)};const rf=Ws(k2e),I2e=e=>async t=>{const n=new e,r=await t(n);return n.terminate(),r},BA=e=>t=>I2e(e)(n=>(n.postMessage(t),new Promise((r,i)=>{n.onmessage=o=>{r(o.data)},n.onerror=i}))),fv=(e,t={async:!0,length:1})=>rf(BA(e),t);te.memoize(BA(ERe));te.memoize(BA(CRe));const nee=te.memoize(BA(ARe));function Sx(e){return e.split(".").pop()}function ree(e){return e.split(".").shift()}const LG="internal/custom",K$="json",Q$=e=>({name:(e==null?void 0:e.id)===LG?`Imported Map - ${e==null?void 0:e.name}`:"Import Map",description:"Internal",id:LG}),R2e=e=>({name:(e==null?void 0:e.type)===K$?`Imported Trace - ${e==null?void 0:e.name}`:"Import Trace",description:"Internal",id:K$}),NG=["json","yaml"];async function P2e(){const e=await Jz({accept:NG.map(t=>`.trace.${t}`),strict:!0});if(e)return{file:e,read:async()=>{if(NG.includes(Sx(e.name))){const t=await e.text(),n=await nee(t);return{...R2e(),format:n==null?void 0:n.format,content:n,name:te.startCase(ree(e.name)),type:K$}}else throw new Error(`The format (${Sx(e.name)}) is unsupported.`)}}}async function O2e(e){const t=await Jz({accept:e.map(({id:n})=>`.${n}`),strict:!0});if(t)return{file:t,read:async()=>{if(te.find(e,{id:Sx(t.name)}))return{...Q$(),format:Sx(t.name),content:await t.text(),name:te.startCase(ree(t.name))};throw new Error(`The format (${Sx(t.name)}) is unsupported.`)}}}const iee=20*1024*1024,[oee,M2e]=nc({},{reduce:(e,t)=>te.omitBy(hA(e,t),te.isUndefined)});function D2e(e){return new Promise(t=>te.delay(t,e))}function nj(e){const[,t]=oee();return R.useCallback(async(n,r)=>{t(()=>({[e]:r})),D2e(300);const i=await n();return t(()=>({[e]:void 0})),i},[e,t])}function rj(e){return`${(e/(1024*1024)).toFixed(2)} MB`}function L2e({onChange:e,value:t}){const n=vl(),r=$p("map"),i=nj("map"),[o]=Fg(),[{maps:s,formats:l}]=nC();return C.jsx(Ms,{showArrow:!0,icon:C.jsx(uQ,{}),label:"Choose Map",value:t==null?void 0:t.id,items:[Q$(t),...s.map(c=>{var d;return{...c,description:(d=te.find(o,{url:c.source}))==null?void 0:d.name}})],onChange:async c=>{switch(c){case Q$().id:try{const d=await O2e(l);d&&r(async()=>{n("Opening map...");const f=d.file.size>iee?await i(d.read,`Opening map (${rj(d.file.size)})`):await d.read();f&&(e==null||e(f))})}catch(d){n(`${d}`)}break;default:e==null||e(te.find(s,{id:c}));break}}})}function N2e({onChange:e,value:t}){const n=vl(),r=$p("specimen"),i=nj("specimen");return C.jsx(Fd,{icon:C.jsx(uQ,{}),onClick:async()=>{try{const o=await P2e();o&&r(async()=>{n("Opening trace...");const s=o.file.size>iee?await i(o.read,`Opening trace (${rj(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 see=({label:e})=>C.jsx(jt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:e}),B2e=({label:e})=>C.jsx(jt,{variant:"body1",children:e}),h1=({label:e,content:t})=>C.jsxs(xn,{alignItems:"center",children:[C.jsx(B2e,{label:e}),C.jsx(Jr,{flex:1}),t]}),FA=({variables:e},{x:t,y:n})=>(e==null?void 0:e.x)===t&&(e==null?void 0:e.y)===n,F2e=""+new URL("parseGrid.worker-d5269b43.js",import.meta.url).href;class $2e extends Worker{constructor(){super(F2e,{type:"module"})}}const z2e=fv($2e),{floor:BG}=Math;function FG(e,t,n){return e>=t&&e({...await z2e({map:e,options:t})}),{normalizer:JSON.stringify}),U2e=e=>{const{width:t,height:n}=e.bounds;return{...e,snap:({x:r,y:i},o=1)=>{const[s,l]=[BG(r+o/2),BG(i+o/2)];if(FG(s,0,t)&&FG(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:FA}},H2e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:U2e,parse:j2e},Symbol.toStringTag,{value:"Module"})),W2e=""+new URL("parseMesh.worker-114081b8.js",import.meta.url).href;class G2e extends Worker{constructor(){super(W2e,{type:"module"})}}const V2e=fv(G2e),q2e=rf(async(e="",t)=>await V2e({map:e,options:t}),{normalizer:JSON.stringify}),X2e=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:FA}),Y2e=Object.freeze(Object.defineProperty({__proto__:null,hydrate:X2e,parse:q2e},Symbol.toStringTag,{value:"Module"})),K2e=""+new URL("parseNetwork.worker-0345a67d.js",import.meta.url).href;class Q2e extends Worker{constructor(){super(K2e,{type:"module"})}}const J2e=fv(Q2e),Z2e=rf(async(e="",t)=>await J2e({map:e,options:t}),{normalizer:JSON.stringify}),eOe=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:FA}),tOe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:eOe,parse:Z2e},Symbol.toStringTag,{value:"Module"})),nOe=""+new URL("parsePoly.worker-bf1460fa.js",import.meta.url).href;class rOe extends Worker{constructor(){super(nOe,{type:"module"})}}const iOe=fv(rOe),oOe=rf(async(e="",t)=>await iOe({map:e,options:t}),{normalizer:JSON.stringify}),sOe=e=>({...e,snap:te.identity,nodeAt:te.constant(0),pointOf:te.constant({x:0,y:0}),matchNode:FA}),aOe=Object.freeze(Object.defineProperty({__proto__:null,hydrate:sOe,parse:oOe},Symbol.toStringTag,{value:"Module"})),ij={grid:H2e,xy:tOe,mesh:Y2e,poly:aOe};function oj(e=""){return ij[e]}const Ub="500";function lOe(e){return parseInt(e.replace("#","0x"))}const sj={source:Xu.A400,destination:Vu.A400,updating:Hh[Ub],expanding:Nq[Ub],generating:Bq[Ub],closing:Lq[Ub],end:qu.A400};te.mapValues(sj,lOe);function p1(e){return(e&&sj[e])??O5[Ub]}function cOe(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 uOe(){return this.eachAfter(cOe)}function dOe(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 hOe(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 mOe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function gOe(e){for(var t=this,n=vOe(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 vOe(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 yOe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bOe(){var e=[];return this.each(function(t){e.push(t)}),e}function xOe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function wOe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function aj(e,t){var n=new m1(e),r=+e.value&&(n.value=e.value),i,o=[n],s,l,c,d;for(t==null&&(t=SOe);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 m1(l[c])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(COe)}function _Oe(){return aj(this).eachBefore(EOe)}function SOe(e){return e.children}function EOe(e){e.data=e.data.data}function COe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function m1(e){this.data=e,this.depth=this.height=0,this.parent=null}m1.prototype=aj.prototype={constructor:m1,count:uOe,each:dOe,eachAfter:hOe,eachBefore:fOe,sum:pOe,sort:mOe,path:gOe,ancestors:yOe,descendants:bOe,leaves:xOe,links:wOe,copy:_Oe};function TOe(e,t){return e.parent===t.parent?1:2}function NN(e){var t=e.children;return t?t[0]:e.t}function BN(e){var t=e.children;return t?t[t.length-1]:e.t}function AOe(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 kOe(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 IOe(e,t,n){return e.a.parent===t.parent?e.a:n}function FS(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}FS.prototype=Object.create(m1.prototype);function ROe(e){for(var t=new FS(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 FS(o[s],s)),i.parent=n;return(t.parent=new FS(null,0)).children=[t],t}function POe(){var e=TOe,t=1,n=1,r=null;function i(d){var f=ROe(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){kOe(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=BN(v),p=NN(p),v&&p;)y=NN(y),g=BN(g),g.a=d,E=v.z+b-p.z-S+e(v._,p._),E>0&&(AOe(IOe(v,d,h),d,E),S+=E,_+=E),b+=v.m,S+=p.m,x+=y.m,_+=g.m;v&&!BN(g)&&(g.t=v,g.m+=b-_),p&&!NN(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 J$="http://www.w3.org/1999/xhtml";const $G={svg:"http://www.w3.org/2000/svg",xhtml:J$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $A(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),$G.hasOwnProperty(t)?{space:$G[t],local:e}:e}function OOe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===J$&&t.documentElement.namespaceURI===J$?t.createElement(e):t.createElementNS(n,e)}}function MOe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function aee(e){var t=$A(e);return(t.local?MOe:OOe)(t)}function DOe(){}function lj(e){return e==null?DOe:function(){return this.querySelector(e)}}function LOe(e){typeof e!="function"&&(e=lj(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=x&&(x=b+1);!(k=S[x])&&++x=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function sMe(e){e||(e=aMe);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 lMe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cMe(){return Array.from(this)}function uMe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?wMe:typeof t=="function"?SMe:_Me)(e,t,n??"")):$g(this.node(),e)}function $g(e,t){return e.style.getPropertyValue(t)||fee(e).getComputedStyle(e,null).getPropertyValue(t)}function CMe(e){return function(){delete this[e]}}function TMe(e,t){return function(){this[e]=t}}function AMe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function kMe(e,t){return arguments.length>1?this.each((t==null?CMe:typeof t=="function"?AMe:TMe)(e,t)):this.node()[e]}function hee(e){return e.trim().split(/^|\s+/)}function cj(e){return e.classList||new pee(e)}function pee(e){this._node=e,this._names=hee(e.getAttribute("class")||"")}pee.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 mee(e,t){for(var n=cj(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function nDe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n{}};function uj(){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}})}$S.prototype=uj.prototype={constructor:$S,on:function(e,t){var n=this._,r=fDe(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?C_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?C_(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=vDe.exec(e))?new Ho(t[1],t[2],t[3],1):(t=yDe.exec(e))?new Ho(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bDe.exec(e))?C_(t[1],t[2],t[3],t[4]):(t=xDe.exec(e))?C_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wDe.exec(e))?qG(t[1],t[2]/100,t[3]/100,1):(t=_De.exec(e))?qG(t[1],t[2]/100,t[3]/100,t[4]):jG.hasOwnProperty(e)?WG(jG[e]):e==="transparent"?new Ho(NaN,NaN,NaN,0):null}function WG(e){return new Ho(e>>16&255,e>>8&255,e&255,1)}function C_(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ho(e,t,n,r)}function CDe(e){return e instanceof vw||(e=y1(e)),e?(e=e.rgb(),new Ho(e.r,e.g,e.b,e.opacity)):new Ho}function t3(e,t,n,r){return arguments.length===1?CDe(e):new Ho(e,t,n,r??1)}function Ho(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}dj(Ho,t3,bee(vw,{brighter(e){return e=e==null?iC:Math.pow(iC,e),new Ho(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?g1:Math.pow(g1,e),new Ho(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ho(sp(this.r),sp(this.g),sp(this.b),oC(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:GG,formatHex:GG,formatHex8:TDe,formatRgb:VG,toString:VG}));function GG(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}`}function TDe(){return`#${Qh(this.r)}${Qh(this.g)}${Qh(this.b)}${Qh((isNaN(this.opacity)?1:this.opacity)*255)}`}function VG(){const e=oC(this.opacity);return`${e===1?"rgb(":"rgba("}${sp(this.r)}, ${sp(this.g)}, ${sp(this.b)}${e===1?")":`, ${e})`}`}function oC(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 qG(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new nl(e,t,n,r)}function xee(e){if(e instanceof nl)return new nl(e.h,e.s,e.l,e.opacity);if(e instanceof vw||(e=y1(e)),!e)return new nl;if(e instanceof nl)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 nl(s,l,c,e.opacity)}function ADe(e,t,n,r){return arguments.length===1?xee(e):new nl(e,t,n,r??1)}function nl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}dj(nl,ADe,bee(vw,{brighter(e){return e=e==null?iC:Math.pow(iC,e),new nl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?g1:Math.pow(g1,e),new nl(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 Ho(FN(e>=240?e-240:e+120,i,r),FN(e,i,r),FN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new nl(XG(this.h),T_(this.s),T_(this.l),oC(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=oC(this.opacity);return`${e===1?"hsl(":"hsla("}${XG(this.h)}, ${T_(this.s)*100}%, ${T_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XG(e){return e=(e||0)%360,e<0?e+360:e}function T_(e){return Math.max(0,Math.min(1,e||0))}function FN(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 wee=e=>()=>e;function kDe(e,t){return function(n){return e+n*t}}function IDe(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 RDe(e){return(e=+e)==1?_ee:function(t,n){return n-t?IDe(t,n,e):wee(isNaN(t)?n:t)}}function _ee(e,t){var n=t-e;return n?kDe(e,n):wee(isNaN(e)?t:e)}const YG=function e(t){var n=RDe(t);function r(i,o){var s=n((i=t3(i)).r,(o=t3(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),d=_ee(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 Zu(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var n3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$N=new RegExp(n3.source,"g");function PDe(e){return function(){return e}}function ODe(e){return function(t){return e(t)+""}}function MDe(e,t){var n=n3.lastIndex=$N.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=n3.exec(e))&&(i=$N.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:Zu(r,i)})),n=$N.lastIndex;return n180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Zu(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:Zu(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:Zu(d,h)},{i:y-2,x:Zu(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;--zg}function JG(){Ap=(aC=b1.now())+zA,zg=Hb=0;try{HDe()}finally{zg=0,GDe(),Ap=0}}function WDe(){var e=b1.now(),t=e-aC;t>Cee&&(zA-=t,aC=e)}function GDe(){for(var e,t=sC,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:sC=n);Wb=e,i3(r)}function i3(e){if(!zg){Hb&&(Hb=clearTimeout(Hb));var t=e-Ap;t>24?(e<1/0&&(Hb=setTimeout(JG,e-b1.now()-zA)),yb&&(yb=clearInterval(yb))):(yb||(aC=b1.now(),yb=setInterval(WDe,Cee)),zg=1,Tee(JG))}}function ZG(e,t,n){var r=new lC;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var VDe=uj("start","end","cancel","interrupt"),qDe=[],kee=0,e9=1,o3=2,zS=3,t9=4,s3=5,jS=6;function jA(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;XDe(e,n,{name:t,index:r,group:i,on:VDe,tween:qDe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:kee})}function hj(e,t){var n=bl(e,t);if(n.state>kee)throw new Error("too late; already scheduled");return n}function ic(e,t){var n=bl(e,t);if(n.state>zS)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 XDe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Aee(o,0,n.time);function o(d){n.state=e9,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!==e9)return c();for(f in r)if(g=r[f],g.name===n.name){if(g.state===zS)return ZG(s);g.state===t9?(g.state=jS,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+fo3&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function ELe(e,t,n){var r,i,o=SLe(t)?hj:ic;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function CLe(e,t){var n=this._id;return arguments.length<2?bl(this.node(),n).on.on(e):this.each(ELe(n,e,t))}function TLe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ALe(){return this.on("end.remove",TLe(this._id))}function kLe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=lj(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s()=>e;function ZLe(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 fu(e,t,n){this.k=e,this.x=t,this.y=n}fu.prototype={constructor:fu,scale:function(e){return e===1?this:new fu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fu(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 cC=new fu(1,0,0);fu.prototype;function zN(e){e.stopImmediatePropagation()}function bb(e){e.preventDefault(),e.stopImmediatePropagation()}function eNe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tNe(){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 n9(){return this.__zoom||cC}function nNe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rNe(){return navigator.maxTouchPoints||"ontouchstart"in this}function iNe(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 jN(){var e=eNe,t=tNe,n=iNe,r=nNe,i=rNe,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=jDe,d=uj("start","zoom","end"),f,h,p,g=500,v=150,y=0,S=10;function _(D){D.property("__zoom",n9).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,$,j,V){var G=D.selection?D.selection():D;G.property("__zoom",n9),D!==G?k(D,$,j,V):G.interrupt().each(function(){I(this,arguments).event(V).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},_.scaleBy=function(D,$,j,V){_.scaleTo(D,function(){var G=this.__zoom.k,K=typeof $=="function"?$.apply(this,arguments):$;return G*K},j,V)},_.scaleTo=function(D,$,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 $=="function"?$.apply(this,arguments):$;return n(x(b(K,ie),Y,J),G,s)},j,V)},_.translateBy=function(D,$,j,V){_.transform(D,function(){return n(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),s)},null,V)},_.translateTo=function(D,$,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(cC.translate(J[0],J[1]).scale(Y.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof j=="function"?-j.apply(this,arguments):-j),K,s)},V,G)};function b(D,$){return $=Math.max(o[0],Math.min(o[1],$)),$===D.k?D:new fu($,D.x,D.y)}function x(D,$,j){var V=$[0]-j[0]*D.k,G=$[1]-j[1]*D.k;return V===D.x&&G===D.y?D:new fu(D.k,V,G)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function k(D,$,j,V){D.on("start.zoom",function(){I(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,K=arguments,Y=I(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 $=="function"?$.apply(G,K):$,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 fu(he,ie[0]-le[0]*he,ie[1]-le[1]*he)}Y.zoom(null,ae)}})}function I(D,$,j){return!j&&D.__zooming||new A(D,$)}function A(D,$){this.that=D,this.args=$,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,$),this.taps=0}A.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,$){return this.mouse&&D!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var $=Ao(this.that).datum();d.call(D,this.that,new ZLe(D,{sourceEvent:this.sourceEvent,target:_,type:D,transform:this.that.__zoom,dispatch:d}),$)}};function O(D,...$){if(!e.apply(this,arguments))return;var j=I(this,$).event(D),V=this.__zoom,G=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),K=Ch(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)],US(this),j.start()}bb(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,...$){if(p||!e.apply(this,arguments))return;var j=D.currentTarget,V=I(this,$,!0).event(D),G=Ao(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ce,!0),K=Ch(D,j),Y=D.clientX,J=D.clientY;pDe(D.view),zN(D),V.mouse=[K,this.__zoom.invert(K)],US(this),V.start();function ie(ue){if(bb(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]=Ch(ue,j),V.mouse[1]),V.extent,s))}function ce(ue){G.on("mousemove.zoom mouseup.zoom",null),mDe(ue.view,V.moved),bb(ue),V.event(ue).end()}}function N(D,...$){if(e.apply(this,arguments)){var j=this.__zoom,V=Ch(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,$),s);bb(D),l>0?Ao(this).transition().duration(l).call(k,Y,V,D):Ao(this).call(_.transform,Y,V,D)}}function H(D,...$){if(e.apply(this,arguments)){var j=D.touches,V=j.length,G=I(this,$,D.changedTouches.length===V).event(D),K,Y,J,ie;for(zN(D),Y=0;Y"u"&&(g=!0),typeof v>"u"&&(v=1/0);function E(k,I){if(k===null)return null;if(I===0)return k;var A,O;if(typeof k!="object")return k;if(n(k,r))A=new r;else if(n(k,i))A=new i;else if(n(k,o))A=new o(function(V,G){k.then(function(K){V(E(K,I-1))},function(K){G(E(K,I-1))})});else if(s.__isArray(k))A=[];else if(s.__isRegExp(k))A=new RegExp(k.source,h(k)),k.lastIndex&&(A.lastIndex=k.lastIndex);else if(s.__isDate(k))A=new Date(k.getTime());else{if(x&&Buffer.isBuffer(k))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(k.length):A=new Buffer(k.length),k.copy(A),A;n(k,Error)?A=Object.create(k):typeof y>"u"?(O=Object.getPrototypeOf(k),A=Object.create(O)):(A=Object.create(y),O=y)}if(g){var L=_.indexOf(k);if(L!=-1)return b[L];_.push(k),b.push(A)}n(k,r)&&k.forEach(function(V,G){var K=E(G,I-1),Y=E(V,I-1);A.set(K,Y)}),n(k,i)&&k.forEach(function(V){var G=E(V,I-1);A.add(G)});for(var N in k){var H;O&&(H=Object.getOwnPropertyDescriptor(O,N)),!(H&&H.set==null)&&(A[N]=E(k[N],I-1))}if(Object.getOwnPropertySymbols)for(var W=Object.getOwnPropertySymbols(k),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,n=(Fi[e[t+0]]+Fi[e[t+1]]+Fi[e[t+2]]+Fi[e[t+3]]+"-"+Fi[e[t+4]]+Fi[e[t+5]]+"-"+Fi[e[t+6]]+Fi[e[t+7]]+"-"+Fi[e[t+8]]+Fi[e[t+9]]+"-"+Fi[e[t+10]]+Fi[e[t+11]]+Fi[e[t+12]]+Fi[e[t+13]]+Fi[e[t+14]]+Fi[e[t+15]]).toLowerCase();if(!cNe(n))throw TypeError("Stringified UUID is invalid");return n}function HN(e,t,n){e=e||{};var r=e.random||(e.rng||aNe)();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 uNe(r)}var a3={exports:{}},l3={exports:{}},dNe=function(){for(var t=arguments.length,n=[],r=0;re.enableLegacyTransitions?de.createElement(BNe.TransitionGroup,{component:e.component,className:e.className,transform:e.transform},e.children):de.createElement("g",{className:e.className,transform:e.transform},e.children),$Ne=15,a9={title:{textAnchor:"start",x:40},attribute:{x:40,dy:"1.2em"}},zNe=({nodeDatum:e,toggleNode:t,onNodeClick:n,onNodeMouseOver:r,onNodeMouseOut:i})=>de.createElement(de.Fragment,null,de.createElement("circle",{r:$Ne,onClick:o=>{t(),n(o)},onMouseOver:r,onMouseOut:i}),de.createElement("g",{className:"rd3t-label"},de.createElement("text",Object.assign({className:"rd3t-label__title"},a9.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}`},a9.attribute),o,": ",typeof s=="boolean"?s.toString():s)))));let jNe=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:zNe,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?Ao(this.nodeRef).transition().duration(n).attr("transform",t).style("opacity",r).on("end",i):(Ao(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 f3=Math.PI,h3=2*f3,Fh=1e-6,UNe=h3-Fh;function p3(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Gee(){return new p3}p3.prototype=Gee.prototype={constructor:p3,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>Fh)if(!(Math.abs(f*l-c*d)>Fh)||!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((f3-Math.acos((v+h-y)/(2*S*_)))/2),x=b/_,E=b/S;Math.abs(x-1)>Fh&&(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)>Fh||Math.abs(this._y1-d)>Fh)&&(this._+="L"+c+","+d),n&&(h<0&&(h=h%h3+h3),h>UNe?this._+="A"+n+","+n+",0,1,"+f+","+(e-s)+","+(t-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=c)+","+(this._y1=d):h>Fh&&(this._+="A"+n+","+n+",0,"+ +(h>=f3)+","+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 l9(e){return function(){return e}}function HNe(e){return e[0]}function WNe(e){return e[1]}var GNe=Array.prototype.slice;function VNe(e){return e.source}function qNe(e){return e.target}function Vee(e){var t=VNe,n=qNe,r=HNe,i=WNe,o=null;function s(){var l,c=GNe.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o||(o=l=Gee()),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:l9(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:l9(+l),s):i},s.context=function(l){return arguments.length?(o=l??null,s):o},s}function XNe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function YNe(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function KNe(){return Vee(XNe)}function QNe(){return Vee(YNe)}class JNe 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?Ao(this.linkRef).transition().duration(n).style("opacity",t).on("end",r):(Ao(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"?KNe()({source:[r.y,r.x],target:[i.y,i.x]}):QNe()({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 ZNe=` +/* Tree */ +.rd3t-tree-container { + width: 100%; + height: 100%; +} + +.rd3t-grabbable { + cursor: move; /* fallback if grab cursor is unsupported */ + cursor: grab; + cursor: -moz-grab; + cursor: -webkit-grab; +} +.rd3t-grabbable:active { + cursor: grabbing; + cursor: -moz-grabbing; + cursor: -webkit-grabbing; +} + +/* Node */ +.rd3t-node { + cursor: pointer; + fill: #777; + stroke: #000; + stroke-width: 2; +} + +.rd3t-leaf-node { + cursor: pointer; + fill: transparent; + stroke: #000; + stroke-width: 1; +} + +.rd3t-label__title { + fill: #000; + stroke: none; + font-weight: bolder; +} + +.rd3t-label__attributes { + fill: #777; + stroke: none; + font-weight: bolder; + font-size: smaller; +} + +/* Link */ +.rd3t-link { + fill: none; + stroke: #000; +} +`;let qee=class Ua extends de.Component{constructor(){super(...arguments),this.state={dataRef:this.props.data,data:Ua.assignInternalProperties(wo(this.props.data)),d3:Ua.calculateD3Geometry(this.props),isTransitioning:!1,isInitialRenderForDataset:!0,dataKey:this.props.dataKey},this.internalState={targetNode:null,isTransitioning:!1},this.svgInstanceRef=`rd3t-svg-${HN()}`,this.gInstanceRef=`rd3t-g-${HN()}`,this.handleNodeToggle=t=>{const n=wo(this.state.data),i=this.findNodesById(t,n,[])[0];this.props.collapsible&&!this.state.isTransitioning&&(i.__rd3t.collapsed?(Ua.expandNode(i),this.props.shouldCollapseNeighborNodes&&this.collapseNeighborNodes(i,n)):Ua.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=wo(this.state.data),i=this.findNodesById(t,r,[]);if(i.length>0){const o=i[0],s=o.__rd3t.depth,l=wo(n).map(c=>Ua.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(wo(t),n))},this.handleOnLinkClickCb=(t,n,r)=>{const{onLinkClick:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(wo(t),wo(n),r))},this.handleOnNodeMouseOverCb=(t,n)=>{const{onNodeMouseOver:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(wo(t),n))},this.handleOnLinkMouseOverCb=(t,n,r)=>{const{onLinkMouseOver:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(wo(t),wo(n),r))},this.handleOnNodeMouseOutCb=(t,n)=>{const{onNodeMouseOut:r}=this.props;r&&typeof r=="function"&&(n.persist(),r(wo(t),n))},this.handleOnLinkMouseOutCb=(t,n,r)=>{const{onLinkMouseOut:i}=this.props;i&&typeof i=="function"&&(r.persist(),i(wo(t),wo(n),r))},this.centerNode=t=>{const{dimensions:n,orientation:r,zoom:i,centeringTransitionDuration:o}=this.props;if(n){const s=Ao(`.${this.gInstanceRef}`),l=Ao(`.${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(jN().transform,cC.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:Ua.assignInternalProperties(wo(t.data)),isInitialRenderForDataset:!0,dataKey:t.dataKey});const o=Ua.calculateD3Geometry(t);return Ex(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}),(!Ex(this.props.translate,t.translate)||!Ex(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?wo(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=Ao(`.${this.svgInstanceRef}`),d=Ao(`.${this.gInstanceRef}`);c.call(jN().transform,cC.translate(i.x,i.y).scale(o)),c.call(jN().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=HN(),o.__rd3t.depth=n,o.children&&o.children.length>0&&(o.children=Ua.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=>{Ua.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=>Ua.collapseNode(i))}generateTree(){const{initialDepth:t,depthFactor:n,separation:r,nodeSize:i,orientation:o}=this.props,{isInitialRenderForDataset:s}=this.state,c=POe().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)(aj(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(JNe,{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:k,parent:I}=_;return de.createElement(jNe,{key:"node-"+b,data:x,position:{x:E,y:k},hierarchyPointNode:_,parent:I,nodeClassName:this.getNodeClassName(I,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})}))))}};qee.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};function x1(){return x1=Object.assign||function(e){for(var t=1;tawait mBe(e),[e])}function vBe(e,t){const n=R.useMemo(()=>e,t);return gBe(n)}const yBe=C.jsx(Mu,{orientation:"vertical",flexItem:!0,sx:{m:1}}),bBe=qee;function Kee(e,t=!1){const[n,r]=R.useState();return R.useEffect(()=>{t||e&&r(e)},[e,t]),n}const u9={small:{value:0,name:"Current",description:"Show the current node and its parents"},medium:{value:4,name:"Nearby",description:"Show nodes with ≤4 degrees of separation"},infinite:{value:void 0,name:"All",description:"Show all nodes, may impact performance"}};function xBe(){var _,b,x,E,k;const{palette:e}=Pn(),{key:t,setKey:n,layer:r,setLayer:i,layers:o}=Tp(),s=vQ(((_=r==null?void 0:r.source)==null?void 0:_.step)??0,600),{controls:l,onChange:c,state:d}=ef(),[f,h]=R.useState("small"),p=n1({"&.rd3t-link":{stroke:Sn(e.text.primary,e.action.disabledOpacity)}}),{result:g,loading:v}=vBe({trace:(x=(b=r==null?void 0:r.source)==null?void 0:b.trace)==null?void 0:x.content,step:s,radius:u9[f].value},[s,r,f]),y=Kee(g,v),S=R.useCallback(()=>p,[p]);return C.jsxs(Nn,{onChange:c,stack:d,children:[C.jsx(Nn.Content,{children:C.jsx(xn,{children:(k=(E=r==null?void 0:r.source)==null?void 0:E.trace)!=null&&k.content&&(y!=null&&y.tree)?C.jsx(EA,{children:({width:I,height:A})=>C.jsx(dt,{width:I,height:A,children:C.jsx(bBe,{scaleExtent:{max:10,min:.01},translate:{x:I/2,y:I/2},data:y.tree,dimensions:{width:I,height:A},separation:{siblings:.4,nonSiblings:.4},pathClassFunc:S,renderCustomNodeElement:({nodeDatum:O,onNodeClick:L})=>{var N;return C.jsx(wBe,{node:O,onClick:()=>L==null?void 0:L({}),step:(N=r==null?void 0:r.source)==null?void 0:N.step,onStep:H=>i(ha(r,W=>{te.set(W,"source.step",H)}))})}})})}):C.jsx(Kh,{icon:C.jsx(lQ,{}),label:"Tree"})})})," ",C.jsxs(Nn.Options,{children:[C.jsx(Ms,{icon:C.jsx(Z1,{}),label:"Layer",value:t,items:te.map(o,I=>({id:I.key,name:ra(I)})),onChange:n,showArrow:!0}),yBe,C.jsx(Ms,{icon:C.jsx(x1e,{}),label:"Radius",value:f,onChange:I=>h(I),items:te.map(te.entries(u9),([I,A])=>({id:I,...A})),showArrow:!0})]}),C.jsx(Nn.Extras,{children:l})]})}const xb=16,Zc=4;function wBe({onClick:e,node:t,step:n=0,onStep:r}){var f;const{palette:i,spacing:o,shape:s}=Pn(),l=te.findLast(t==null?void 0:t.events,h=>h.step<=n),c=!!te.find(t==null?void 0:t.events,h=>h.step===n),d=p1((f=l==null?void 0:l.data)==null?void 0:f.type);return C.jsx(Bp,{variant:"popover",children:h=>{var p,g;return C.jsxs(C.Fragment,{children:[C.jsx(Jd,{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(-Zc/2),x:o(-.25),strokeWidth:0,width:o(xb),height:o(Zc),rx:s.borderRadius})}),C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:i.background.default,width:o(xb),height:o(Zc),clipPath:"url(#clipPath)"}),c&&C.jsx("rect",{y:o(-Zc/2),x:o(-.25),strokeWidth:0,fill:Sn(i.primary.main,i.action.selectedOpacity),width:o(xb),height:o(Zc),clipPath:"url(#clipPath)"}),C.jsx("rect",{x:o(-.25),y:o(-Zc/2),height:o(Zc),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(xb-2.25-1),textAnchor:"end",fontWeight:400,fontSize:"0.875rem",alignmentBaseline:"central",children:t==null?void 0:t.cumulativeChildCount}),C.jsx(Zxe,{width:o(2),height:o(2),x:o(xb-2-1),y:o(-Zc/2+1),strokeWidth:0,fill:i.text.primary,opacity:i.action.disabledOpacity})]})]})}),C.jsx(Np,{anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},...fw(h),children:C.jsx(dA,{dense:!0,sx:{p:0},children:te.map(t==null?void 0:t.events,v=>C.jsx(gu,{selected:v.step===n,sx:{borderLeft:`4px solid ${p1(v.data.type)}`},onClick:()=>{h.close(),e==null||e(),te.delay(()=>r==null?void 0:r(v.step),150)},children:C.jsx(az,{primary:te.startCase(v.data.type),secondary:`Step ${v.step}`})}))})})]})}})}function _Be({selection:e,onClose:t}){const n=SBe(),r=Kee(e),{client:i}=e??{};return C.jsx(Np,{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(dA,{dense:!0,sx:{py:0},children:C.jsx(n,{event:r,children:o=>{const s=te.entries(o);return s.length?te.chain(s).sortBy(([,l])=>l.index).map(([,{items:l,primary:c}],d)=>C.jsxs(C.Fragment,{children:[!!d&&C.jsx(Mu,{sx:{my:1,mx:2}}),c&&C.jsx(gx,{sx:{py:0},children:C.jsx(jt,{color:"text.secondary",variant:"overline",children:c})}),te.chain(l).entries().sortBy(([,f])=>f.index).map(([f,{action:h,icon:p,primary:g,secondary:v}])=>h?C.jsxs(gu,{onClick:()=>{h(),t==null||t()},children:[p&&C.jsx(Cd,{children:p}),C.jsx(Wl,{primary:g,sx:{mr:4}}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:v})]},f):C.jsxs(gx,{children:[p&&C.jsx(Cd,{children:p}),C.jsx(Wl,{primary:g,sx:{mr:4}}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:v})]},f)).value()]})).value():C.jsx(C.Fragment,{children:C.jsx(gx,{children:C.jsx(jt,{children:"No info to show."})})})}})})})}const d9=({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e({})});function SBe(){const[{layers:e}]=Fp();return R.useMemo(()=>te.chain(e).reduce((t,n)=>{var i;const r=((i=Wte(n))==null?void 0:i.getSelectionInfo)??d9;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(te.merge(l,c))})})},d9).value(),[e])}const[HA,EBe]=nc([],{reduce:yQ}),CBe={tileSubdivision:1,workerCount:8,tileResolution:{width:te.round(256*devicePixelRatio),height:te.round(256*devicePixelRatio)}},Qee=R.createContext({});function TBe(){return R.useContext(Qee)}function ABe(e,{width:t,height:n}={}){const r=Pn(),[i]=HA(),o=R.useRef(null),[s,l]=R.useState(""),[c,d]=R.useState();return R.useEffect(()=>{if(l(""),o.current&&t&&n&&e){const f=te.find(i,h=>h.renderer.meta.id===e);if(f){const h=new f.renderer.constructor;return h.setup({...CBe,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,te.map,e,i,r,l,d]),U1e(()=>{c&&t&&n&&c.setOptions({screenSize:{width:t,height:n}})},r.transitions.duration.standard,[c,t,n]),{instance:c,ref:o,error:s}}function kBe(){const[{map:e,specimen:t}]=DA();return!!(e||t)&&C.jsx(Q1,{sx:{position:"absolute",top:n=>n.spacing(6+2),right:n=>n.spacing(2)}})}function IBe({width:e,height:t,renderer:n,rendererRef:r,layers:i}){const{instance:o,error:s,ref:l}=ABe(n,{width:e,height:t}),[c,d]=R.useState();R.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=R.useMemo(()=>({renderer:o}),[o]);return R.useEffect(()=>r==null?void 0:r(o),[o,r]),C.jsxs(C.Fragment,{children:[C.jsx(kBe,{}),C.jsx(Qee.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(Kxe,{sx:{mb:2},fontSize:"large"}),s]}):C.jsx(C.Fragment,{children:C.jsx(dt,{ref:l,children:i.map(h=>C.jsx(A3e,{layer:h},h.key))})}):C.jsx(Kh,{icon:C.jsx(hQ,{}),label:"No layers to render",width:e,height:t})}),C.jsx(_Be,{selection:c,onClose:()=>d(void 0)})]})}function w1({nodes:e}){const{renderer:t}=TBe();return R.useEffect(()=>{if(t&&(e!=null&&e.length))return t.add(e.flat())},[t,e]),C.jsx(C.Fragment,{})}function RBe({nodes:e,step:t}){const r=te.floor((t??0)/200)*200,i=R.useMemo(()=>te.slice(e,0,r),[e,r]),o=R.useMemo(()=>te.slice(e,r,(t??0)+1),[e,r,t]);return C.jsxs(C.Fragment,{children:[!!r&&C.jsx(w1,{nodes:i}),C.jsx(w1,{nodes:o})]})}const Jee=(e,t,n)=>{const r=R.useRef(n||[]),o=r.current===n||!r.current.every((l,c)=>l===n[c]);r.current=n;const s=t.map(()=>null);return R.useEffect(o?()=>void e():()=>{},o?t:s)};function PBe(e,t){return te.zip(e,t).every(([n,r])=>n===r)}const OBe=(e,t=[],n=[])=>{const[r,i]=R.useState(t),[o,s]=R.useState(n);return R.useEffect(()=>{PBe(o,n)||(i(t),s(n))},[t,n,o]),Yee(e,[...r,...o])};function xj(){const[e]=Fg();return R.useCallback(t=>te.find(e,t),[e])}function MBe(e){return xj()({url:e})}function DBe(e){const t=vl(),n=$p("map"),r=xj(),i=R.useMemo(()=>rf(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 yw(()=>n(async()=>{if(l)return{...e,content:o||await i({source:s,id:l})}}),[i,o,s,l])}function LBe(e){const t=vl(),n=Pn(),r=$p("map"),{format:i,content:o}=e??{};return yw(()=>r(async()=>{var l,c;const s=n.palette.mode==="dark"?tv:ev;if(i&&o){t("Processing map...");const d=await((c=(l=oj(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 NBe={key:"map",inferName:e=>{var t;return(t=e==null?void 0:e.source)!=null&&t.map?`${e.source.map.name} (${te.startCase(e.source.map.format)})`:"Untitled Map"},editor:Dg(({value:e,produce:t})=>{var n;return C.jsx(C.Fragment,{children:C.jsx(h1,{label:"Source",content:C.jsx(L2e,{value:(n=e==null?void 0:e.source)==null?void 0:n.map,onChange:r=>t(i=>te.set(i,"source.map",r))})})})}),renderer:({layer:e})=>{var r;const{nodes:t}=((r=e==null?void 0:e.source)==null?void 0:r.parsedMap)??{},n=R.useMemo(()=>[t??[]],[t]);return C.jsx(w1,{nodes:n})},steps:({children:e})=>C.jsx(C.Fragment,{children:e==null?void 0:e([])}),service:Dg(({value:e,produce:t})=>{var i;const{result:n}=DBe((i=e==null?void 0:e.source)==null?void 0:i.map),{result:r}=LBe(n);return Jee(()=>void t(o=>te.set(o,"source.parsedMap",r)),[r,t],[r]),C.jsx(C.Fragment,{})}),getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Tp(n),{parsedMap:s}=(r==null?void 0:r.source)??{},{point:l,node:c}=R.useMemo(()=>{var f,h,p,g;if(s&&t){const v=(g=(p=oj((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=R.useMemo(()=>({...r&&l&&!te.isUndefined(c)&&{[r.key]:{primary:ra(r),items:{point:{primary:"Point",secondary:`(${te.round(l.x,2)}, ${te.round(l.y,2)})`}}}}}),[l,c,r,o,i]);return C.jsx(C.Fragment,{children:e==null?void 0:e(d)})}};var GN=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_o,HS,BBe={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Gu;function VN(e){return GN.lastIndex=0,GN.test(e)?'"'+e.replace(GN,function(t){var n=BBe[t];return typeof n=="string"?n:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function WS(e,t,n){var r,i,o,s,l=_o,c,d=t[e];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(e)),typeof Gu=="function"&&(d=Gu.call(t,e,d)),typeof d){case"string":return VN(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(_o+=HS,c=[],Object.prototype.toString.apply(d)==="[object Array]"){for(s=d.length,r=0;rn?`[ +`+_o+c.join(`, +`+_o)+` +`+l+"]":"[ "+c.join(", ")+" ]":"["+c.join(",")+"]",_o=l,o}if(Gu&&typeof Gu=="object")for(s=Gu.length,r=0;rn?`{ +`+_o+c.join(`, +`+_o)+` +`+l+"}":"{ "+c.join(", ")+" }":"{"+c.join(",")+"}",_o=l,o}}function FBe(e,t,n,r){var i;if(_o="",HS="",r||(r=0),typeof r!="number")throw new Error("beaufifier: limit must be a number");if(typeof n=="number")for(i=0;i"u"||e===null}function jBe(e){return typeof e=="object"&&e!==null}function UBe(e){return Array.isArray(e)?e:ete(e)?[]:[e]}function HBe(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;nl&&(o=" ... ",t=r-l+o.length),n-r>l&&(s=" ...",n=r+l-s.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+s,pos:r-t+o.length}}function XN(e,t){return pi.repeat(" ",t-e.length)+e}function JBe(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],o,s=-1;o=n.exec(e.buffer);)i.push(o.index),r.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var l="",c,d,f=Math.min(e.line+t.linesAfter,i.length).toString().length,h=t.maxLength-(t.indent+f+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)d=qN(e.buffer,r[s-c],i[s-c],e.position-(r[s]-r[s-c]),h),l=pi.repeat(" ",t.indent)+XN((e.line-c+1).toString(),f)+" | "+d.str+` +`+l;for(d=qN(e.buffer,r[s],i[s],e.position,h),l+=pi.repeat(" ",t.indent)+XN((e.line+1).toString(),f)+" | "+d.str+` +`,l+=pi.repeat("-",t.indent+f+3+d.pos)+`^ +`,c=1;c<=t.linesAfter&&!(s+c>=i.length);c++)d=qN(e.buffer,r[s+c],i[s+c],e.position-(r[s]-r[s+c]),h),l+=pi.repeat(" ",t.indent)+XN((e.line+c+1).toString(),f)+" | "+d.str+` +`;return l.replace(/\n$/,"")}var ZBe=JBe,eFe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],tFe=["scalar","sequence","mapping"];function nFe(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function rFe(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(eFe.indexOf(n)===-1)throw new ko('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=nFe(t.styleAliases||null),tFe.indexOf(this.kind)===-1)throw new ko('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Xi=rFe;function f9(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(o,s){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=s)}),n[i]=r}),n}function iFe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t=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"]}}),vFe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function yFe(e){return!(e===null||!vFe.test(e)||e[e.length-1]==="_")}function bFe(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 xFe=/^[-+]?[0-9]+e/;function wFe(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(pi.isNegativeZero(e))return"-0.0";return n=e.toString(10),xFe.test(n)?n.replace("e",".e"):n}function _Fe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||pi.isNegativeZero(e))}var ute=new Xi("tag:yaml.org,2002:float",{kind:"scalar",resolve:yFe,construct:bFe,predicate:_Fe,represent:wFe,defaultStyle:"lowercase"}),dte=ste.extend({implicit:[ate,lte,cte,ute]}),fte=dte,hte=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pte=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 SFe(e){return e===null?!1:hte.exec(e)!==null||pte.exec(e)!==null}function EFe(e){var t,n,r,i,o,s,l,c=0,d=null,f,h,p;if(t=hte.exec(e),t===null&&(t=pte.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 CFe(e){return e.toISOString()}var mte=new Xi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:SFe,construct:EFe,instanceOf:Date,represent:CFe});function TFe(e){return e==="<<"||e===null}var gte=new Xi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:TFe}),wj=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function AFe(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=wj;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function kFe(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=wj,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 IFe(e){var t="",n=0,r,i,o=e.length,s=wj;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 RFe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var vte=new Xi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:AFe,construct:kFe,predicate:RFe,represent:IFe}),PFe=Object.prototype.hasOwnProperty,OFe=Object.prototype.toString;function MFe(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n>10)+55296,(e-65536&1023)+56320)}var Cte=new Array(256),Tte=new Array(256);for(var tm=0;tm<256;tm++)Cte[tm]=m9(tm)?1:0,Tte[tm]=m9(tm);function YFe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||_j,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ate(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=ZBe(n),new ko(t,n)}function xt(e,t){throw Ate(e,t)}function hC(e,t){e.onWarning&&e.onWarning.call(null,Ate(e,t))}var g9={YAML:function(t,n,r){var i,o,s;t.version!==null&&xt(t,"duplication of %YAML directive"),r.length!==1&&xt(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&xt(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&xt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&hC(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&xt(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Ste.test(i)||xt(t,"ill-formed tag handle (first argument) of the TAG directive"),zd.call(t.tagMap,i)&&xt(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ete.test(o)||xt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{xt(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function Pd(e,t,n,r){var i,o,s,l;if(t1&&(e.result+=pi.repeat(` +`,t-1))}function KFe(e,t,n){var r,i,o,s,l,c,d,f,h=e.kind,p=e.result,g;if(g=e.input.charCodeAt(e.position),Wo(g)||Hm(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(i=e.input.charCodeAt(e.position+1),Wo(i)||n&&Hm(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,l=!1;g!==0;){if(g===58){if(i=e.input.charCodeAt(e.position+1),Wo(i)||n&&Hm(i))break}else if(g===35){if(r=e.input.charCodeAt(e.position-1),Wo(r))break}else{if(e.position===e.lineStart&&WA(e)||n&&Hm(g))break;if(Vl(g))if(c=e.line,d=e.lineStart,f=e.lineIndent,Qr(e,!1,-1),e.lineIndent>=t){l=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=d,e.lineIndent=f;break}}l&&(Pd(e,o,s,!1),Ej(e,e.line-c),o=s=e.position,l=!1),ap(g)||(s=e.position+1),g=e.input.charCodeAt(++e.position)}return Pd(e,o,s,!1),e.result?!0:(e.kind=h,e.result=p,!1)}function QFe(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Pd(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Vl(n)?(Pd(e,r,i,!0),Ej(e,Qr(e,!1,t)),r=i=e.position):e.position===e.lineStart&&WA(e)?xt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);xt(e,"unexpected end of the stream within a single quoted scalar")}function JFe(e,t){var n,r,i,o,s,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Pd(e,n,e.position,!0),e.position++,!0;if(l===92){if(Pd(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),Vl(l))Qr(e,!1,t);else if(l<256&&Cte[l])e.result+=Tte[l],e.position++;else if((s=VFe(l))>0){for(i=s,o=0;i>0;i--)l=e.input.charCodeAt(++e.position),(s=GFe(l))>=0?o=(o<<4)+s:xt(e,"expected hexadecimal character");e.result+=XFe(o),e.position++}else xt(e,"unknown escape sequence");n=r=e.position}else Vl(l)?(Pd(e,n,r,!0),Ej(e,Qr(e,!1,t)),n=r=e.position):e.position===e.lineStart&&WA(e)?xt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}xt(e,"unexpected end of the stream within a double quoted scalar")}function ZFe(e,t){var n=!0,r,i,o,s=e.tag,l,c=e.anchor,d,f,h,p,g,v=Object.create(null),y,S,_,b;if(b=e.input.charCodeAt(e.position),b===91)f=93,g=!1,l=[];else if(b===123)f=125,g=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),b=e.input.charCodeAt(++e.position);b!==0;){if(Qr(e,!0,t),b=e.input.charCodeAt(e.position),b===f)return e.position++,e.tag=s,e.anchor=c,e.kind=g?"mapping":"sequence",e.result=l,!0;n?b===44&&xt(e,"expected the node content, but found ','"):xt(e,"missed comma between flow collection entries"),S=y=_=null,h=p=!1,b===63&&(d=e.input.charCodeAt(e.position+1),Wo(d)&&(h=p=!0,e.position++,Qr(e,!0,t))),r=e.line,i=e.lineStart,o=e.position,jg(e,t,dC,!1,!0),S=e.tag,y=e.result,Qr(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===r)&&b===58&&(h=!0,b=e.input.charCodeAt(++e.position),Qr(e,!0,t),jg(e,t,dC,!1,!0),_=e.result),g?Wm(e,l,v,S,y,_,r,i,o):h?l.push(Wm(e,null,v,S,y,_,r,i,o)):l.push(y),Qr(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(n=!0,b=e.input.charCodeAt(++e.position)):n=!1}xt(e,"unexpected end of the stream within a flow collection")}function e$e(e,t){var n,r,i=YN,o=!1,s=!1,l=t,c=0,d=!1,f,h;if(h=e.input.charCodeAt(e.position),h===124)r=!1;else if(h===62)r=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)YN===i?i=h===43?h9:jFe:xt(e,"repeat of a chomping mode identifier");else if((f=qFe(h))>=0)f===0?xt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?xt(e,"repeat of an indentation width identifier"):(l=t+f-1,s=!0);else break;if(ap(h)){do h=e.input.charCodeAt(++e.position);while(ap(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!Vl(h)&&h!==0)}for(;h!==0;){for(Sj(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!s||e.lineIndentl&&(l=e.lineIndent),Vl(h)){c++;continue}if(e.lineIndentt)&&c!==0)xt(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(S&&(s=e.line,l=e.lineStart,c=e.position),jg(e,t,fC,!0,i)&&(S?v=e.result:y=e.result),S||(Wm(e,h,p,g,v,y,s,l,c),g=v=y=null),Qr(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)xt(e,"bad indentation of a mapping entry");else if(e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),h=0,p=e.implicitTypes.length;h"),e.result!==null&&v.kind!==e.kind&&xt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):xt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function o$e(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Qr(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Wo(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&xt(e,"directive name must not be less than one character in length");s!==0;){for(;ap(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Vl(s));break}if(Vl(s))break;for(n=e.position;s!==0&&!Wo(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Sj(e),zd.call(g9,r)?g9[r](e,r,i):hC(e,'unknown document directive "'+r+'"')}if(Qr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Qr(e,!0,-1)):o&&xt(e,"directives end mark is expected"),jg(e,e.lineIndent-1,fC,!1,!0),Qr(e,!0,-1),e.checkLineBreaks&&HFe.test(e.input.slice(t,e.position))&&hC(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&WA(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Qr(e,!0,-1));return}if(e.position"u"&&(n=t,t=null);var r=kte(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Bte(e){var t=/^\n* /;return t.test(e)}var Fte=1,y3=2,$te=3,zte=4,mm=5;function L$e(e,t,n,r,i,o,s,l){var c,d=0,f=null,h=!1,p=!1,g=r!==-1,v=-1,y=M$e(Gb(e,0))&&D$e(Gb(e,e.length-1));if(t||s)for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),!C1(d))return mm;y=y&&w9(d,f,l),f=d}else{for(c=0;c=65536?c+=2:c++){if(d=Gb(e,c),d===S1)h=!0,g&&(p=p||c-v-1>r&&e[v+1]!==" ",v=c);else if(!C1(d))return mm;y=y&&w9(d,f,l),f=d}p=p||g&&c-v-1>r&&e[v+1]!==" "}return!h&&!p?y&&!s&&!i(e)?Fte:o===E1?mm:y3:n>9&&Bte(e)?mm:s?o===E1?mm:y3:p?zte:$te}function N$e(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===E1?'""':"''";if(!e.noCompatMode&&(T$e.indexOf(t)!==-1||A$e.test(t)))return e.quotingType===E1?'"'+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 O$e(e,d)}switch(L$e(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case Fte:return t;case y3:return"'"+t.replace(/'/g,"''")+"'";case $te:return"|"+_9(t,e.indent)+S9(b9(t,o));case zte:return">"+_9(t,e.indent)+S9(b9(B$e(t,s),o));case mm:return'"'+F$e(t)+'"';default:throw new ko("impossible error: invalid scalar style")}}()}function _9(e,t){var n=Bte(e)?String(t):"",r=e[e.length-1]===` +`,i=r&&(e[e.length-2]===` +`||e===` +`),o=i?"+":r?"":"-";return n+o+` +`}function S9(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function B$e(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(` +`);return d=d!==-1?d:e.length,n.lastIndex=d,E9(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!==""?` +`:"")+E9(c,t),i=o}return r}function E9(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 F$e(e){for(var t="",n=0,r,i=0;i=65536?i+=2:i++)n=Gb(e,i),r=ao[n],!r&&C1(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||I$e(n);return t}function $$e(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o"u"&&Au(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function C9(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s"u"&&Au(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=v3(e,t)),e.dump&&S1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function z$e(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?"":" "),Au(e,t,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=i,e.dump="{"+r+"}"}function j$e(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 ko("sortKeys must be a boolean or a function");for(l=0,c=s.length;l1024,h&&(e.dump&&S1===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=v3(e,t)),Au(e,t+1,f,!0,h)&&(e.dump&&S1===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function T9(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 Au(e,t,n,r,i,o,s){e.tag=null,e.dump=n,T9(e,n,!1)||T9(e,n,!0);var l=Rte.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?(j$e(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):(z$e(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?C9(e,t-1,e.dump,i):C9(e,t,e.dump,i),p&&(e.dump="&ref_"+h+e.dump)):($$e(e,t,e.dump),p&&(e.dump="&ref_"+h+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&N$e(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ko("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 U$e(e,t){var n=[],r=[],i,o;for(b3(e,n,r),i=0,o=r.length;io!==void 0);return C.jsxs(xn,{...r,children:[te.map(te.slice(i,0,n),([o,s])=>C.jsx(k9,{label:o,value:s,type:{variant:t}})),i.length>n&&C.jsx(k9,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var Ute={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,k=c.QUOTED_STRING_TEST,I=k===void 0?null:k,A=c.QUOTED_STRING_GET_AND_ADVANCE,O=A===void 0?null:A,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=I||function(V){return E.test(V)},D=O||s(E),$=N||function(V){return E.test(V)},j=W||s(E);return function(V){function G(Re){Re===void 0&&(Re=1),pe=pe.substr(Re)}function K(Re){Re===void 0&&(Re=/^/),G(pe.match(Re)[0].length)}function Y(){var Re;return K(f),Re=pe.length>0?pe[0]:"",G(),Re}function J(Re){var $e=(Re===void 0?{}:Re).isNull,it=$e!==void 0&&$e;me={name:"",pipes:[]},qe=!it}function ie(){ve.variables.push(me),J({isNull:!0})}function ce(Re){var $e=(Re===void 0?{}:Re).isNull,it=$e!==void 0&&$e;be={name:"",parameters:[]},at=!it}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Re){var $e=(Re===void 0?{}:Re).isNull,it=$e!==void 0&&$e;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($(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}])})})(Ute);var I9=Ute.exports;function s3e(e={},t){const{$:n,...r}=e;return{...te.mapValues(r,t),$:n}}function w3(e){switch(e==null?void 0:e.constructor){case Array:{const t=te.map(e,w3);return n=>te.map(t,r=>r(n))}case Object:{const t=te.mapValues(e,w3);return n=>te.mapValues(t,r=>r(n))}case String:return _3(e);default:return te.constant(e)}}function a3e(e={}){return s3e(e,t=>te.isFunction(t)?t:w3(t))}const R9=rf(e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(a3e(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))},{primitive:!0}),l3e=/^\{\{\s*/,c3e=/^\s*\}\}/,KN=/\b\B/,_3=rf(e=>{const n=I9.parseStringTemplateGenerator({VARIABLE_START:l3e,VARIABLE_END:c3e,PIPE_START:KN,PIPE_PARAMETER_START:KN,QUOTED_STRING:KN})(e);return te.join(n.literals,"")?r=>I9.evaluateParsedString(n,{},{},i=>R9(i)(r)):R9(n.variables[0].name)},{primitive:!0});function u3e(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 Hte={exports:{}};(function(e,t){(function(n,r){typeof u3e=="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})})(Hte);var d3e=Hte.exports;const f3e=Ws(d3e),h3e=""+new URL("parseTrace.worker-49d162fd.js",import.meta.url).href;class p3e extends Worker{constructor(){super(h3e,{type:"module"})}}const m3e=fv(p3e);function g3e(e){const t=vl(),n=$p("specimen");return R.useCallback(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await m3e(e);return t("Trace loaded",f3e("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){t("Error parsing",`${jte(i)}`)}}}),[e])}function Gm({label:e,icon:t,...n}){return C.jsx(Jd,{title:te.startCase(e),children:C.jsx("span",{children:C.jsx(xp,{...n,children:t})})},e)}function v3e(){return R.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function Aj(e){const t=vl(),{layer:n,setLayer:r}=Tp(e),{playback:i,playbackTo:o,step:s=0}=(n==null?void 0:n.source)??{},l=te.min([o,s])??0,c=!!o,d=i==="playing",[f,h]=[0,(o??1)-1];return R.useMemo(()=>{function p(S){r(ha(n,_=>te.set(_,"source",{..._==null?void 0:_.source,...S})))}const g={start:f,end:h,step:l,canPlay:c&&!d&&l0},v=S=>te.clamp(l+S,f,h);return{playing:i==="playing",...g,...{play:()=>{t("Playback started"),p({playback:"playing",step:v(1)})},pause:(S=0)=>{t("Playback paused"),p({playback:"paused",step:v(S)})},stepTo:(S=0)=>p({step:S}),stop:()=>p({step:f,playback:"paused"}),stepForward:()=>p({step:v(1)}),stepBackward:()=>p({step:v(-1)}),tick:(S=1)=>p({playback:"playing",step:v(S)})}}},[h,i,d,c,f,l,r])}function y3e(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function b3e({children:e,value:t}){gQ();const{step:n,tick:r,end:i,playing:o,pause:s}=Aj(t==null?void 0:t.key),l=vl(),[{playbackRate:c=1}]=Lu(),d=v3e(),f=R.useCallback((h,p)=>C.jsx(az,{primary:h,secondary:`Step ${n+p}`}),[n]);return R.useEffect(()=>{if(o)return n{for(const h of te.range(c)){const p=d(n+h);if(p.result||p.error)return{...p,offset:h}}return{result:"",offset:0,error:void 0}},({result:h,offset:p,error:g})=>{g?(l(`${te.trimEnd(g,".")}.`,`${p}`),s()):h?(l(`Breakpoint hit: ${h}.`,`${p}`),s(p)):r(c)}):s()},[f,o,i,n,s,r,l,d,c]),C.jsx(C.Fragment,{children:e})}function x3e({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}=Aj(e==null?void 0:e.key);return gQ(),C.jsxs(C.Fragment,{children:[C.jsx(Gm,{label:"step-backward",icon:C.jsx(v1e,{}),onClick:d,disabled:!i}),C.jsx(Gm,{...t?{label:"pause",icon:C.jsx(d1e,{}),onClick:()=>l(),disabled:!n}:{label:"play",icon:C.jsx(h1e,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(Gm,{label:"step-forward",icon:C.jsx(g1e,{}),onClick:f,disabled:!o}),C.jsx(Gm,{label:"stop",icon:C.jsx(y1e,{}),onClick:h,disabled:!s})]})}const w3e=e=>e==null;function _3e(e){const t=[],n={},r={},i=te.chain(e==null?void 0:e.events).map((l,c)=>({step:c,id:l.id,pId:l.pId})).groupBy("id").value();te.forEach(e==null?void 0:e.events,({id:l,pId:c},d)=>{!w3e(c)&&n[l]!==c&&(t.push({id:l,pId:c,step:d,prev:te.last(t)}),n[l]=c),r[d]=te.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=te.findLast(i[f],p=>p.step<=d.step);if(h)c.push(h.step),d=h;else break}else break}return c}}}const gC={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:Dg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(h1,{label:"Trace",content:C.jsx(N2e,{onChange:s=>t(l=>te.set(l,"source.trace",{...s,key:Bo()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(h1,{label:"Onion Skinning",content:C.jsx(Ms,{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:te.startCase(s)})),onChange:s=>t(l=>te.set(l,"source.onion",s))})}),C.jsx(see,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Zee,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Dg(({value:e,produce:t})=>{var i,o,s,l,c,d,f,h;const{palette:n}=Pn(),r=g3e({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:sj,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return R.useEffect(()=>{t(p=>{var g,v,y,S;return te.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]),Jee(async()=>{const p=await r();t(g=>te.set(g,"source.parsedTrace",p))},[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(b3e,{value:e})})}),renderer:({layer:e})=>{var l,c;const t=(l=e==null?void 0:e.source)==null?void 0:l.parsedTrace,n=vQ(((c=e==null?void 0:e.source)==null?void 0:c.step)??0,1e3/60),r=S3e(e,n),i=R.useMemo(()=>te.map(t==null?void 0:t.stepsPersistent,d=>te.map(d,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsPersistent,e==null?void 0:e.key]),o=R.useMemo(()=>te.map(t==null?void 0:t.stepsTransient,d=>te.map(d,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsTransient,e==null?void 0:e.key]),s=R.useMemo(()=>[o[n]??[]],[o,n]);return C.jsxs(C.Fragment,{children:[C.jsx(RBe,{step:n,nodes:i}),C.jsx(w1,{nodes:s}),r]})},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}=Tp(e),o=R.useMemo(()=>{var c,d,f,h;const s=((f=(d=(c=r==null?void 0:r.source)==null?void 0:c.trace)==null?void 0:d.content)==null?void 0:f.events)??[],l=te.chain((h=t==null?void 0:t.info)==null?void 0:h.components).filter(p=>{var g;return((g=p.meta)==null?void 0:g.sourceLayer)===(r==null?void 0:r.key)}).map(p=>{var g;return(g=p.meta)==null?void 0:g.step}).filter(te.negate(te.isUndefined)).sort((p,g)=>p-g).value();if(l.length&&r){const p=te.last(l),g=s[p];if(g)return{[r.key]:{primary:ra(r),items:{properties:{index:-1,primary:C.jsx(x3,{event:g,vertical:!0})},[`${g}`]:{primary:`Go to Step ${p}`,secondary:`${te.startCase(g.type)}`,action:()=>i(ha(r,v=>{te.set(v,"source.step",p)})),icon:C.jsx(Xxe,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function S3e(e,t=0){var o,s;const{palette:n}=Pn(),{getPath:r}=R.useMemo(()=>{var l,c;return(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)!=null&&c.content?_3e(e.source.trace.content):{getParent:te.constant(void 0),getPath:te.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return R.useMemo(()=>{var l,c,d,f;if((f=(d=(c=(l=e==null?void 0:e.source)==null?void 0:l.trace)==null?void 0:c.content)==null?void 0:d.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?_3(g):b=>b.event.x,S=v?_3(v):b=>b.event.y,_=te.map(r(t),b=>{var x,E,k,I;return(I=(k=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:k.events)==null?void 0:I[b]});if(_.length){const b=[{$:"rect",x:y({event:{x:0,y:0,...te.head(_)}})-2*p/2,y:S({event:{x:0,y:0,...te.head(_)}})-2*p/2,fill:p1("destination"),width:2*p,height:2*p},{$:"rect",x:y({event:{x:0,y:0,...te.last(_)}})-2*p/2,y:S({event:{x:0,y:0,...te.last(_)}})-2*p/2,fill:p1("source"),width:2*p,height:2*p},{$:"path",points:_.map(x=>({x:y({event:{x:0,y:0,...x}}),y:S({event:{x:0,y:0,...x}})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(w1,{nodes:[te.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}const E3e=gC.getSelectionInfo;async function C3e(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(te.find(i,{id:t})&&te.find(o,{id:n}))return r}}const T3e={...gC,key:"query",editor:Dg(({value:e,produce:t})=>{var c,d;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Tp(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=nC(),[l]=Fg();return C.jsxs(C.Fragment,{children:[C.jsx(h1,{label:"Algorithm",content:C.jsx(Ms,{showArrow:!0,icon:C.jsx(t1e,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=te.find(l,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>te.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(jt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(h1,{label:"Map",content:C.jsx(Ms,{showArrow:!0,icon:C.jsx(Z1,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:ra(f)})),onChange:async f=>t(h=>te.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(jt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",ra(i)]}),C.jsx(see,{label:"Preview"}),C.jsx(dt,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Zee,{trace:(d=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:d.content})})]})}),service:Dg(({value:e,produce:t})=>{const n=vl(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:l}]=Fp(),[c]=Fg(),[{algorithms:d}]=nC(),f=R.useMemo(()=>{if(i&&r)return te.find(l,{key:i})},[i,r,l]);return OBe(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await C3e(c,r,g),S=te.find(d,{id:r});if(y){n(`Executing ${ra(e)} using ${y.name}...`);const _=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>te.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:_,key:Bo()}))}}}},[f,c,r,o,s,t,n,e,d],[f,c,r,o,s]),C.jsx(C.Fragment,{children:gC.service})}),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{layer:r,setLayer:i,layers:o}=Tp(n),s=R.useMemo(()=>{const c=te.filter(o,{source:{type:"map"}});return te.filter(te.map(c,d=>{var h,p,g,v;const{parsedMap:f}=(d==null?void 0:d.source)??{};if(f&&t){const y=(v=(g=oj((p=(h=d==null?void 0:d.source)==null?void 0:h.map)==null?void 0:p.format))==null?void 0:g.hydrate)==null?void 0:v.call(g,f);if(y){const S=(t==null?void 0:t.world)&&y.snap(t.world);if(S){const _=(t==null?void 0:t.world)&&y.nodeAt(S);return{point:S,node:_,key:d.key,name:ra(d)}}}}}))},[o]),l=R.useMemo(()=>!!r&&!!s.length&&{[r.key]:{primary:ra(r),items:{...te.reduce(s,(c,d)=>({...c,[`${n}-${d==null?void 0:d.key}-source`]:{primary:"Set as source",secondary:d==null?void 0:d.name,action:()=>i(ha(r,f=>{te.set(f,"source.start",d==null?void 0:d.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",d==null?void 0:d.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(b1e,{sx:{transform:"scale(0.5)"}})},[`${n}-${d==null?void 0:d.key}-destination`]:{primary:"Set as destination",secondary:d==null?void 0:d.name,action:()=>i(ha(r,f=>{te.set(f,"source.end",d==null?void 0:d.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",d==null?void 0:d.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(f1e,{})}}),{})}}},[s,r,o,i]);return C.jsx(E3e,{event:t,layer:n,children:c=>e==null?void 0:e(te.merge(c,l))})}};function A3e({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&R.createElement((n=bw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function ra(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?bw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function Wte(e){var t;return bw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const bw={map:NBe,trace:gC,query:T3e};function k3e(e,t,n=600){const[r,i]=R.useState(e);R.useEffect(()=>void i(e),[i,e]);const o=R.useMemo(()=>te.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function I3e({value:e,onValueChange:t},n){var f,h,p;const[r,i]=k3e(e,t),o=g=>C.jsx(jt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(jt,{variant:"body1",children:g}),l=(g,v)=>C.jsxs(xn,{alignItems:"center",children:[s(g),C.jsx(Jr,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:te.startCase(v)})),d=r.name||ra(e);return C.jsx(C.Fragment,{children:C.jsxs(Nd,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(dt,{py:1,ml:-1,children:[C.jsx(jt,{children:d}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:te.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(Jr,{flex:1}),C.jsx(Nd,{alignItems:"center",direction:"row",children:C.jsx(Qz,{appBar:{children:C.jsx(Kz,{children:"Edit Layer"})},trigger:g=>C.jsx(xp,{size:"small",onClick:g,children:C.jsx(fA,{})}),children:C.jsxs(dt,{p:2,children:[C.jsx(dt,{pb:2,children:C.jsx(J1,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(ha(r,v=>te.set(v,"name",g.target.value)))})}),o("Layer Options"),l("Transparency",C.jsx(Ms,{label:"Transparency",items:["25","50","75","100"].map(g=>({id:g,name:`${g}%`})),value:"100",showArrow:!0})),l("Display Mode",C.jsx(Ms,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),l("Type",C.jsx(Ms,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:te.startCase(g)})),onChange:g=>i==null?void 0:i(ha(r,v=>{te.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&R.createElement(bw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const R3e=R.forwardRef(I3e);function P3e(){const[{layers:e=[]},t]=Fp();return C.jsx(dt,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(dt,{sx:{mb:2},children:C.jsx(MA,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(R3e,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(dt,{pt:2,children:"Click the button below to add a layer."})})})})}function O3e(){const{controls:e,onChange:t,state:n}=ef();return C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Content,{children:C.jsx(dt,{p:2,pr:1,pt:6,children:C.jsx(P3e,{})})}),C.jsx(Nn.Extras,{children:e})]})}function Gte(e){return C.jsx(i1e,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function M3e({children:e}){return C.jsx(jt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var vC={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 + */vC.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,k=32,I=64,A=128,O=256,L=512,N=30,H="...",W=800,z=16,D=1,$=2,j=3,V=1/0,G=9007199254740991,K=17976931348623157e292,Y=0/0,J=4294967295,ie=J-1,ce=J>>>1,ue=[["ary",A],["bind",S],["bindKey",_],["curry",x],["curryRight",E],["flip",L],["partial",k],["partialRight",I],["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]",Re="[object RegExp]",$e="[object Set]",it="[object String]",pt="[object Symbol]",mt="[object Undefined]",_e="[object WeakMap]",ze="[object WeakSet]",Ye="[object ArrayBuffer]",Fe="[object DataView]",Ne="[object Float32Array]",Rt="[object Float64Array]",ct="[object Int8Array]",ke="[object Int16Array]",ot="[object Int32Array]",$t="[object Uint8Array]",Ie="[object Uint8ClampedArray]",Ue="[object Uint16Array]",yt="[object Uint32Array]",Gt=/\b__p \+= '';/g,mn=/\b(__p \+=) '' \+/g,$r=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mr=/&(?:amp|lt|gt|quot|#39);/g,Dr=/[&<>"']/g,zr=RegExp(Mr.source),ei=RegExp(Dr.source),ts=/<%-([\s\S]+?)%>/g,Bu=/<%([\s\S]+?)%>/g,Xs=/<%=([\s\S]+?)%>/g,ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lc=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ns=/[\\^$.*+?()[\]{}|]/g,uf=RegExp(ns.source),lo=/^\s+/,cc=/\s/,Ti=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rs=/\{\n\/\* \[wrapped with (.+)\] \*/,df=/,? & /,is=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sa=/[()=,{}\[\]\/\s]/,Fu=/\\(\\)?/g,Wn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zn=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,_l=/^0b[01]+$/i,co=/^\[object .+?Constructor\]$/,_v=/^0o[0-7]+$/i,Sv=/^(?:0|[1-9]\d*)$/,Jt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yr=/($^)/,vk=/['\n\r\u2028\u2029\\]/g,uc="\\ud800-\\udfff",yk="\\u0300-\\u036f",bk="\\ufe20-\\ufe2f",xk="\\u20d0-\\u20ff",Ev=yk+bk+xk,Cv="\\u2700-\\u27bf",Tv="a-z\\xdf-\\xf6\\xf8-\\xff",wk="\\xac\\xb1\\xd7\\xf7",_k="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sk="\\u2000-\\u206f",Ek=" \\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",Av="A-Z\\xc0-\\xd6\\xd8-\\xde",kv="\\ufe0e\\ufe0f",Iv=wk+_k+Sk+Ek,ff="['’]",Ck="["+uc+"]",Rv="["+Iv+"]",dc="["+Ev+"]",Pv="\\d+",Tk="["+Cv+"]",Ov="["+Tv+"]",Mv="[^"+uc+Iv+Pv+Cv+Tv+Av+"]",hf="\\ud83c[\\udffb-\\udfff]",Ak="(?:"+dc+"|"+hf+")",Dv="[^"+uc+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",os="["+Av+"]",Lv="\\u200d",Nv="(?:"+Ov+"|"+Mv+")",kk="(?:"+os+"|"+Mv+")",Bv="(?:"+ff+"(?:d|ll|m|re|s|t|ve))?",Fv="(?:"+ff+"(?:D|LL|M|RE|S|T|VE))?",$v=Ak+"?",zv="["+kv+"]?",Ik="(?:"+Lv+"(?:"+[Dv,pf,mf].join("|")+")"+zv+$v+")*",Rk="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jv=zv+$v+Ik,Ok="(?:"+[Tk,pf,mf].join("|")+")"+jv,Mk="(?:"+[Dv+dc+"?",dc,pf,mf,Ck].join("|")+")",Dk=RegExp(ff,"g"),Lk=RegExp(dc,"g"),gf=RegExp(hf+"(?="+hf+")|"+Mk+jv,"g"),Nk=RegExp([os+"?"+Ov+"+"+Bv+"(?="+[Rv,os,"$"].join("|")+")",kk+"+"+Fv+"(?="+[Rv,os+Nv,"$"].join("|")+")",os+"?"+Nv+"+"+Bv,os+"+"+Fv,Pk,Rk,Pv,Ok].join("|"),"g"),Bk=RegExp("["+Lv+uc+Ev+kv+"]"),Fk=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$k=["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"],zk=-1,Ot={};Ot[Ne]=Ot[Rt]=Ot[ct]=Ot[ke]=Ot[ot]=Ot[$t]=Ot[Ie]=Ot[Ue]=Ot[yt]=!0,Ot[se]=Ot[Q]=Ot[Ye]=Ot[le]=Ot[Fe]=Ot[he]=Ot[ve]=Ot[ye]=Ot[me]=Ot[be]=Ot[qe]=Ot[Re]=Ot[$e]=Ot[it]=Ot[_e]=!1;var Ct={};Ct[se]=Ct[Q]=Ct[Ye]=Ct[Fe]=Ct[le]=Ct[he]=Ct[Ne]=Ct[Rt]=Ct[ct]=Ct[ke]=Ct[ot]=Ct[me]=Ct[be]=Ct[qe]=Ct[Re]=Ct[$e]=Ct[it]=Ct[pt]=Ct[$t]=Ct[Ie]=Ct[Ue]=Ct[yt]=!0,Ct[ve]=Ct[ye]=Ct[_e]=!1;var jk={À:"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"},Uk={"&":"&","<":"<",">":">",'"':""","'":"'"},Hk={"&":"&","<":"<",">":">",""":'"',"'":"'"},Wk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gk=parseFloat,Vk=parseInt,Uv=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,qk=typeof self=="object"&&self&&self.Object===Object&&self,fn=Uv||qk||Function("return this")(),vf=t&&!t.nodeType&&t,uo=vf&&!0&&e&&!e.nodeType&&e,Hv=uo&&uo.exports===vf,yf=Hv&&Uv.process,nr=function(){try{var q=uo&&uo.require&&uo.require("util").types;return q||yf&&yf.binding&&yf.binding("util")}catch{}}(),Wv=nr&&nr.isArrayBuffer,Gv=nr&&nr.isDate,Vv=nr&&nr.isMap,qv=nr&&nr.isRegExp,Xv=nr&&nr.isSet,Yv=nr&&nr.isTypedArray;function Gn(q,ee,Z){switch(Z.length){case 0:return q.call(ee);case 1:return q.call(ee,Z[0]);case 2:return q.call(ee,Z[0],Z[1]);case 3:return q.call(ee,Z[0],Z[1],Z[2])}return q.apply(ee,Z)}function Xk(q,ee,Z,ge){for(var De=-1,ut=q==null?0:q.length;++De-1}function bf(q,ee,Z){for(var ge=-1,De=q==null?0:q.length;++ge-1;);return Z}function ry(q,ee){for(var Z=q.length;Z--&&ss(ee,q[Z],0)>-1;);return Z}function rI(q,ee){for(var Z=q.length,ge=0;Z--;)q[Z]===ee&&++ge;return ge}var iI=Sf(jk),oI=Sf(Uk);function sI(q){return"\\"+Wk[q]}function aI(q,ee){return q==null?n:q[ee]}function as(q){return Bk.test(q)}function lI(q){return Fk.test(q)}function cI(q){for(var ee,Z=[];!(ee=q.next()).done;)Z.push(ee.value);return Z}function Af(q){var ee=-1,Z=Array(q.size);return q.forEach(function(ge,De){Z[++ee]=[De,ge]}),Z}function iy(q,ee){return function(Z){return q(ee(Z))}}function Ii(q,ee){for(var Z=-1,ge=q.length,De=0,ut=[];++Z-1}function KI(a,u){var m=this.__data__,w=Ic(m,a);return w<0?(++this.size,m.push([a,u])):m[w][1]=u,this}ti.prototype.clear=VI,ti.prototype.delete=qI,ti.prototype.get=XI,ti.prototype.has=YI,ti.prototype.set=KI;function ni(a){var u=-1,m=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function sr(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(!zt(a))return a;var re=Be(a);if(re){if(B=eP(a),!U)return On(a,B)}else{var oe=yn(a),fe=oe==ye||oe==xe;if(Li(a))return zy(a,U);if(oe==qe||oe==se||fe&&!T){if(B=X||fe?{}:o0(a),!U)return X?HR(a,fR(B,a)):UR(a,gy(B,a))}else{if(!Ct[oe])return T?a:{};B=tP(a,oe,U)}}M||(M=new xr);var we=M.get(a);if(we)return we;M.set(a,B),D0(a)?a.forEach(function(Ae){B.add(sr(Ae,u,m,Ae,a,M))}):O0(a)&&a.forEach(function(Ae,Ke){B.set(Ke,sr(Ae,u,m,Ke,a,M))});var Te=ne?X?Zf:Jf:X?Dn:rn,Ve=re?n:Te(a);return rr(Ve||a,function(Ae,Ke){Ve&&(Ke=Ae,Ae=a[Ke]),Ra(B,Ke,sr(Ae,u,m,Ke,a,M))}),B}function hR(a){var u=rn(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=_t(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 ir(s);return Ba(function(){a.apply(n,m)},u)}function Pa(a,u,m,w){var T=-1,M=fc,B=!0,U=a.length,X=[],ne=u.length;if(!U)return X;m&&(u=Lt(u,Vn(m))),w?(M=bf,B=!1):u.length>=i&&(M=Ea,B=!1,u=new po(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?hn(U,u-1,m,w,T):ki(T,U):w||(T[T.length]=U)}return T}var Df=Vy(),wy=Vy(!0);function jr(a,u){return a&&Df(a,u,rn)}function Lf(a,u){return a&&wy(a,u,rn)}function Pc(a,u){return Ai(u,function(m){return ai(a[m])})}function go(a,u){u=Mi(u,a);for(var m=0,w=u.length;a!=null&&mu}function gR(a,u){return a!=null&&vt.call(a,u)}function vR(a,u){return a!=null&&u in _t(a)}function yR(a,u,m){return a>=vn(u,m)&&a=120&&re.length>=120)?new po(B&&re):n}re=a[0];var oe=-1,fe=U[0];e:for(;++oe-1;)U!==a&&_c.call(U,X,1),_c.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;si(T)?_c.call(a,T,1):Gf(a,T)}}return a}function Uf(a,u){return a+Cc(fy()*(u-a+1))}function PR(a,u,m,w){for(var T=-1,M=en(Ec((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=Cc(u/2),u&&(a+=a);while(u);return m}function Xe(a,u){return sh(l0(a,u,Ln),a+"")}function OR(a){return my(ys(a))}function MR(a,u){var m=ys(a);return Uc(m,mo(u,0,m.length))}function Da(a,u,m,w){if(!zt(a))return a;u=Mi(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&&!Xn(B)&&(m?B<=u:B=i){var ne=u?null:qR(a);if(ne)return pc(ne);B=!1,T=Ea,X=new po}else X=u?[]:U;e:for(;++w=w?a:ar(a,u,m)}var $y=EI||function(a){return fn.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 xc(u).set(new xc(a)),u}function FR(a,u){var m=u?Yf(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}function $R(a){var u=new a.constructor(a.source,Zn.exec(a));return u.lastIndex=a.lastIndex,u}function zR(a){return Ia?_t(Ia.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=Xn(a),B=u!==n,U=u===null,X=u===u,ne=Xn(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=en(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=_t(u);++w-1?T[M?u[B]:B]:n}}function Yy(a){return oi(function(u){var m=u.length,w=m,T=or.prototype.thru;for(a&&u.reverse();w--;){var M=u[w];if(typeof M!="function")throw new ir(s);if(T&&!B&&zc(M)=="wrapper")var B=new or([],!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 po:n;for(M.set(a,u),M.set(u,a);++oe1?"& ":"")+u[w],u=u.join(m>2?", ":" "),a.replace(Ti,`{ +/* [wrapped with `+u+`] */ +`)}function rP(a){return Be(a)||bo(a)||!!(uy&&a&&a[uy])}function si(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 Uc(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 p2(a,u){return u(a),a}function Hc(a,u){return u(a)}var m2=oi(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)||!si(m)?this.thru(T):(w=w.slice(m,+m+(u?1:0)),w.__actions__.push({func:Hc,args:[T],thisArg:n}),new or(w,this.__chain__).thru(function(M){return u&&!M.length&&M.push(n),M}))});function g2(){return w0(this)}function v2(){return new or(this.value(),this.__chain__)}function y2(){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 b2(){return this}function x2(a){for(var u,m=this;m instanceof kc;){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 w2(){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:Hc,args:[ah],thisArg:n}),new or(u,this.__chain__)}return this.thru(ah)}function _2(){return By(this.__wrapped__,this.__actions__)}var S2=Lc(function(a,u,m){vt.call(a,m)?++a[m]:ri(a,m,1)});function E2(a,u,m){var w=Be(a)?Kv:pR;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}function C2(a,u){var m=Be(a)?Ai:xy;return m(a,Ce(u,3))}var T2=Xy(m0),A2=Xy(g0);function k2(a,u){return hn(Wc(a,u),1)}function I2(a,u){return hn(Wc(a,u),V)}function R2(a,u,m){return m=m===n?1:We(m),hn(Wc(a,u),m)}function _0(a,u){var m=Be(a)?rr:Pi;return m(a,Ce(u,3))}function S0(a,u){var m=Be(a)?Yk:by;return m(a,Ce(u,3))}var P2=Lc(function(a,u,m){vt.call(a,m)?a[m].push(u):ri(a,m,[u])});function O2(a,u,m,w){a=Mn(a)?a:ys(a),m=m&&!w?We(m):0;var T=a.length;return m<0&&(m=en(T+m,0)),Yc(a)?m<=T&&a.indexOf(u,m)>-1:!!T&&ss(a,u,m)>-1}var M2=Xe(function(a,u,m){var w=-1,T=typeof u=="function",M=Mn(a)?Z(a.length):[];return Pi(a,function(B){M[++w]=T?Gn(u,B,m):Oa(B,u,m)}),M}),D2=Lc(function(a,u,m){ri(a,m,u)});function Wc(a,u){var m=Be(a)?Lt:Ty;return m(a,Ce(u,3))}function L2(a,u,m,w){return a==null?[]:(Be(u)||(u=u==null?[]:[u]),m=w?n:m,Be(m)||(m=m==null?[]:[m]),Ry(a,u,m))}var N2=Lc(function(a,u,m){a[m?0:1].push(u)},function(){return[[],[]]});function B2(a,u,m){var w=Be(a)?xf:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,Pi)}function F2(a,u,m){var w=Be(a)?Kk:ey,T=arguments.length<3;return w(a,Ce(u,4),m,T,by)}function $2(a,u){var m=Be(a)?Ai:xy;return m(a,qc(Ce(u,3)))}function z2(a){var u=Be(a)?my:OR;return u(a)}function j2(a,u,m){(m?Tn(a,u,m):u===n)?u=1:u=We(u);var w=Be(a)?cR:MR;return w(a,u)}function U2(a){var u=Be(a)?uR:LR;return u(a)}function H2(a){if(a==null)return 0;if(Mn(a))return Yc(a)?ls(a):a.length;var u=yn(a);return u==me||u==$e?a.size:$f(a).length}function W2(a,u,m){var w=Be(a)?wf:NR;return m&&Tn(a,u,m)&&(u=n),w(a,Ce(u,3))}var G2=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]]),Ry(a,hn(u,1),[])}),Gc=CI||function(){return fn.Date.now()};function V2(a,u){if(typeof u!="function")throw new ir(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,ii(a,A,n,n,n,n,u)}function C0(a,u){var m;if(typeof u!="function")throw new ir(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=Ii(m,gs(ch));w|=k}return ii(a,w,u,m,T)}),T0=Xe(function(a,u,m){var w=S|_;if(m.length){var T=Ii(m,gs(T0));w|=k}return ii(u,w,a,m,T)});function A0(a,u,m){u=m?n:u;var w=ii(a,x,n,n,n,n,n,u);return w.placeholder=A0.placeholder,w}function k0(a,u,m){u=m?n:u;var w=ii(a,E,n,n,n,n,n,u);return w.placeholder=k0.placeholder,w}function I0(a,u,m){var w,T,M,B,U,X,ne=0,re=!1,oe=!1,fe=!0;if(typeof a!="function")throw new ir(s);u=cr(u)||0,zt(m)&&(re=!!m.leading,oe="maxWait"in m,M=oe?en(cr(m.maxWait)||0,u):M,fe="trailing"in m?!!m.trailing:fe);function we(Kt){var _r=w,ci=T;return w=T=n,ne=Kt,B=a.apply(ci,_r),B}function Te(Kt){return ne=Kt,U=Ba(Ke,u),re?we(Kt):B}function Ve(Kt){var _r=Kt-X,ci=Kt-ne,X0=u-_r;return oe?vn(X0,M-ci):X0}function Ae(Kt){var _r=Kt-X,ci=Kt-ne;return X===n||_r>=u||_r<0||oe&&ci>=M}function Ke(){var Kt=Gc();if(Ae(Kt))return nt(Kt);U=Ba(Ke,Ve(Kt))}function nt(Kt){return U=n,fe&&w?we(Kt):(w=T=n,B)}function Yn(){U!==n&&$y(U),ne=0,w=X=T=U=n}function An(){return U===n?B:nt(Gc())}function Kn(){var Kt=Gc(),_r=Ae(Kt);if(w=arguments,T=this,X=Kt,_r){if(U===n)return Te(X);if(oe)return $y(U),U=Ba(Ke,u),we(X)}return U===n&&(U=Ba(Ke,u)),B}return Kn.cancel=Yn,Kn.flush=An,Kn}var q2=Xe(function(a,u){return yy(a,1,u)}),X2=Xe(function(a,u,m){return yy(a,cr(u)||0,m)});function Y2(a){return ii(a,L)}function Vc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new ir(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(Vc.Cache||ni),m}Vc.Cache=ni;function qc(a){if(typeof a!="function")throw new ir(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 K2(a){return C0(2,a)}var Q2=BR(function(a,u){u=u.length==1&&Be(u[0])?Lt(u[0],Vn(Ce())):Lt(hn(u,1),Vn(Ce()));var m=u.length;return Xe(function(w){for(var T=-1,M=vn(w.length,m);++T=u}),bo=Sy(function(){return arguments}())?Sy:function(a){return Ut(a)&&vt.call(a,"callee")&&!cy.call(a,"callee")},Be=Z.isArray,fO=Wv?Vn(Wv):xR;function Mn(a){return a!=null&&Xc(a.length)&&!ai(a)}function Yt(a){return Ut(a)&&Mn(a)}function hO(a){return a===!0||a===!1||Ut(a)&&Cn(a)==le}var Li=AI||wh,pO=Gv?Vn(Gv):wR;function mO(a){return Ut(a)&&a.nodeType===1&&!Fa(a)}function gO(a){if(a==null)return!0;if(Mn(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||Li(a)||vs(a)||bo(a)))return!a.length;var u=yn(a);if(u==me||u==$e)return!a.size;if(Na(a))return!$f(a).length;for(var m in a)if(vt.call(a,m))return!1;return!0}function vO(a,u){return Ma(a,u)}function yO(a,u,m){m=typeof m=="function"?m:n;var w=m?m(a,u):n;return w===n?Ma(a,u,n,m):!!w}function dh(a){if(!Ut(a))return!1;var u=Cn(a);return u==ve||u==pe||typeof a.message=="string"&&typeof a.name=="string"&&!Fa(a)}function bO(a){return typeof a=="number"&&dy(a)}function ai(a){if(!zt(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 Xc(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=G}function zt(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function Ut(a){return a!=null&&typeof a=="object"}var O0=Vv?Vn(Vv):SR;function xO(a,u){return a===u||Ff(a,u,th(u))}function wO(a,u,m){return m=typeof m=="function"?m:n,Ff(a,u,th(u),m)}function _O(a){return M0(a)&&a!=+a}function SO(a){if(sP(a))throw new De(o);return Ey(a)}function EO(a){return a===null}function CO(a){return a==null}function M0(a){return typeof a=="number"||Ut(a)&&Cn(a)==be}function Fa(a){if(!Ut(a)||Cn(a)!=qe)return!1;var u=wc(a);if(u===null)return!0;var m=vt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vc.call(m)==wI}var fh=qv?Vn(qv):ER;function TO(a){return P0(a)&&a>=-G&&a<=G}var D0=Xv?Vn(Xv):CR;function Yc(a){return typeof a=="string"||!Be(a)&&Ut(a)&&Cn(a)==it}function Xn(a){return typeof a=="symbol"||Ut(a)&&Cn(a)==pt}var vs=Yv?Vn(Yv):TR;function AO(a){return a===n}function kO(a){return Ut(a)&&yn(a)==_e}function IO(a){return Ut(a)&&Cn(a)==ze}var RO=$c(zf),PO=$c(function(a,u){return a<=u});function L0(a){if(!a)return[];if(Mn(a))return Yc(a)?br(a):On(a);if(Ca&&a[Ca])return cI(a[Ca]());var u=yn(a),m=u==me?Af:u==$e?pc:ys;return m(a)}function li(a){if(!a)return a===0?a:0;if(a=cr(a),a===V||a===-V){var u=a<0?-1:1;return u*K}return a===a?a:0}function We(a){var u=li(a),m=u%1;return u===u?m?u-m:u:0}function N0(a){return a?mo(We(a),0,J):0}function cr(a){if(typeof a=="number")return a;if(Xn(a))return Y;if(zt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=zt(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)?Vk(a.slice(2),m?2:8):wl.test(a)?Y:+a}function B0(a){return Ur(a,Dn(a))}function OO(a){return a?mo(We(a),-G,G):a===0?a:0}function ft(a){return a==null?"":qn(a)}var MO=ps(function(a,u){if(Na(u)||Mn(u)){Ur(u,rn(u),a);return}for(var m in u)vt.call(u,m)&&Ra(a,m,u[m])}),F0=ps(function(a,u){Ur(u,Dn(u),a)}),Kc=ps(function(a,u,m,w){Ur(u,Dn(u),a,w)}),DO=ps(function(a,u,m,w){Ur(u,rn(u),a,w)}),LO=oi(Mf);function NO(a,u){var m=hs(a);return u==null?m:gy(m,u)}var BO=Xe(function(a,u){a=_t(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}),Ur(a,Zf(a),m),w&&(m=sr(m,h|p|g,XR));for(var T=u.length;T--;)Gf(m,u[T]);return m});function tM(a,u){return z0(a,qc(Ce(u)))}var nM=oi(function(a,u){return a==null?{}:IR(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 rM(a,u,m){u=Mi(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 vn(a+T*(u-a+Gk("1e-"+((T+"").length-1))),u)}return Uf(a,u)}var pM=ms(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(Jt,iI).replace(Lk,"")}function mM(a,u,m){a=ft(a),u=qn(u);var w=a.length;m=m===n?w:mo(We(m),0,w);var T=m;return m-=u.length,m>=0&&a.slice(m,T)==u}function gM(a){return a=ft(a),a&&ei.test(a)?a.replace(Dr,oI):a}function vM(a){return a=ft(a),a&&uf.test(a)?a.replace(ns,"\\$&"):a}var yM=ms(function(a,u,m){return a+(m?"-":"")+u.toLowerCase()}),bM=ms(function(a,u,m){return a+(m?" ":"")+u.toLowerCase()}),xM=qy("toLowerCase");function wM(a,u,m){a=ft(a),u=We(u);var w=u?ls(a):0;if(!u||w>=u)return a;var T=(u-w)/2;return Fc(Cc(T),m)+a+Fc(Ec(T),m)}function _M(a,u,m){a=ft(a),u=We(u);var w=u?ls(a):0;return u&&w>>0,m?(a=ft(a),a&&(typeof u=="string"||u!=null&&!fh(u))&&(u=qn(u),!u&&as(a))?Di(br(a),0,m):a.split(u,m)):[]}var IM=ms(function(a,u,m){return a+(m?" ":"")+mh(u)});function RM(a,u,m){return a=ft(a),m=m==null?0:mo(We(m),0,a.length),u=qn(u),a.slice(m,m+u.length)==u}function PM(a,u,m){var w=P.templateSettings;m&&Tn(a,u,m)&&(u=n),a=ft(a),u=Kc({},u,w,e0);var T=Kc({},u.imports,w.imports,e0),M=rn(T),B=Tf(T,M),U,X,ne=0,re=u.interpolate||yr,oe="__p += '",fe=kf((u.escape||yr).source+"|"+re.source+"|"+(re===Xs?Wn:yr).source+"|"+(u.evaluate||yr).source+"|$","g"),we="//# sourceURL="+(vt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zk+"]")+` +`;a.replace(fe,function(Ae,Ke,nt,Yn,An,Kn){return nt||(nt=Yn),oe+=a.slice(ne,Kn).replace(vk,sI),Ke&&(U=!0,oe+=`' + +__e(`+Ke+`) + +'`),An&&(X=!0,oe+=`'; +`+An+`; +__p += '`),nt&&(oe+=`' + +((__t = (`+nt+`)) == null ? '' : __t) + +'`),ne=Kn+Ae.length,Ae}),oe+=`'; +`;var Te=vt.call(u,"variable")&&u.variable;if(!Te)oe=`with (obj) { +`+oe+` +} +`;else if(Sa.test(Te))throw new De(l);oe=(X?oe.replace(Gt,""):oe).replace(mn,"$1").replace($r,"$1;"),oe="function("+(Te||"obj")+`) { +`+(Te?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(X?`, __j = Array.prototype.join; +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 OM(a){return ft(a).toLowerCase()}function MM(a){return ft(a).toUpperCase()}function DM(a,u,m){if(a=ft(a),a&&(m||u===n))return ty(a);if(!a||!(u=qn(u)))return a;var w=br(a),T=br(u),M=ny(w,T),B=ry(w,T)+1;return Di(w,M,B).join("")}function LM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.slice(0,oy(a)+1);if(!a||!(u=qn(u)))return a;var w=br(a),T=ry(w,br(u))+1;return Di(w,0,T).join("")}function NM(a,u,m){if(a=ft(a),a&&(m||u===n))return a.replace(lo,"");if(!a||!(u=qn(u)))return a;var w=br(a),T=ny(w,br(u));return Di(w,T).join("")}function BM(a,u){var m=N,w=H;if(zt(u)){var T="separator"in u?u.separator:T;m="length"in u?We(u.length):m,w="omission"in u?qn(u.omission):w}a=ft(a);var M=a.length;if(as(a)){var B=br(a);M=B.length}if(m>=M)return a;var U=m-ls(w);if(U<1)return w;var X=B?Di(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=kf(T.source,ft(Zn.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(qn(T),U)!=U){var fe=X.lastIndexOf(T);fe>-1&&(X=X.slice(0,fe))}return X+w}function FM(a){return a=ft(a),a&&zr.test(a)?a.replace(Mr,hI):a}var $M=ms(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?lI(a)?gI(a):Zk(a):a.match(u)||[]}var V0=Xe(function(a,u){try{return Gn(a,n,u)}catch(m){return dh(m)?m:new De(m)}}),zM=oi(function(a,u){return rr(u,function(m){m=Hr(m),ri(a,m,ch(a[m],a))}),a});function jM(a){var u=a==null?0:a.length,m=Ce();return a=u?Lt(a,function(w){if(typeof w[1]!="function")throw new ir(s);return[m(w[0]),w[1]]}):[],Xe(function(w){for(var T=-1;++TG)return[];var m=J,w=vn(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)},jr(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,ki([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 Ae=a.apply(B,U);return Ae.__actions__.push({func:Hc,args:[oe],thisArg:n}),new or(Ae,fe)}return Te&&Ve?a.apply(this,U):(Ae=this.thru(oe),Te?w?Ae.value()[0]:Ae.value():Ae)})}),rr(["pop","push","shift","sort","splice","unshift"],function(a){var u=mc[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)})}}),jr(Je.prototype,function(a,u){var m=P[u];if(m){var w=m.name+"";vt.call(fs,w)||(fs[w]=[]),fs[w].push({name:u,func:m})}}),fs[Nc(n,_).name]=[{name:"wrapper",func:n}],Je.prototype.clone=FI,Je.prototype.reverse=$I,Je.prototype.value=zI,P.prototype.at=m2,P.prototype.chain=g2,P.prototype.commit=v2,P.prototype.next=y2,P.prototype.plant=x2,P.prototype.reverse=w2,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=_2,P.prototype.first=P.prototype.head,Ca&&(P.prototype[Ca]=b2),P},cs=vI();uo?((uo.exports=cs)._=cs,vf._=cs):fn._=cs}).call(Bt)})(vC,vC.exports);var Vt=vC.exports;let D3e=(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 Wp=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Wp||{}),Vte=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Vte||{}),S3=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(S3||{}),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||{}),sg=(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))(sg||{}),Pt=(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))(Pt||{}),E3=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(E3||{}),hu=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(hu||{}),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||{}),kj=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(kj||{}),aa=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(aa||{}),ui=(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))(ui||{}),Vr=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Vr||{}),ql=(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))(ql||{});const L3e={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:L3e,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var QN=/iPhone/i,P9=/iPod/i,O9=/iPad/i,M9=/\biOS-universal(?:.+)Mac\b/i,JN=/\bAndroid(?:.+)Mobile\b/i,D9=/Android/i,nm=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,O_=/Silk/i,eu=/Windows Phone/i,L9=/\bWindows(?:.+)ARM\b/i,N9=/BlackBerry/i,B9=/BB10/i,F9=/Opera Mini/i,$9=/\b(CriOS|Chrome)(?:.+)Mobile/i,z9=/Mobile(?:.+)Firefox\b/i,j9=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function N3e(e){return function(t){return t.test(e)}}function U9(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=N3e(n),o={apple:{phone:i(QN)&&!i(eu),ipod:i(P9),tablet:!i(QN)&&(i(O9)||j9(t))&&!i(eu),universal:i(M9),device:(i(QN)||i(P9)||i(O9)||i(M9)||j9(t))&&!i(eu)},amazon:{phone:i(nm),tablet:!i(nm)&&i(O_),device:i(nm)||i(O_)},android:{phone:!i(eu)&&i(nm)||!i(eu)&&i(JN),tablet:!i(eu)&&!i(nm)&&!i(JN)&&(i(O_)||i(D9)),device:!i(eu)&&(i(nm)||i(O_)||i(JN)||i(D9))||i(/\bokhttp\b/i)},windows:{phone:i(eu),tablet:i(L9),device:i(eu)||i(L9)},other:{blackberry:i(N9),blackberry10:i(B9),opera:i(F9),firefox:i(z9),chrome:i($9),device:i(N9)||i(B9)||i(F9)||i(z9)||i($9)},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 B3e=U9.default??U9,pu=B3e(globalThis.navigator);tt.RETINA_PREFIX=/@([0-9\.]+)x/;tt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var qte={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 T1(o,s,n,l,c,g,0),s}function Xte(e,t,n,r,i){var o,s;if(i===A3(e,t,n,r)>0)for(o=t;o=t;o-=r)s=H9(o,e[o],e[o+1],s);return s&&VA(s,s.next)&&(k1(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&&(VA(n,n.next)||kr(n.prev,n,n.next)===0)){if(k1(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function T1(e,t,n,r,i,o,s){if(e){!s&&o&&X3e(e,r,i,o);for(var l=e,c,d;e.prev!==e.next;){if(c=e.prev,d=e.next,o?z3e(e,r,i,o):$3e(e)){t.push(c.i/n|0),t.push(e.i/n|0),t.push(d.i/n|0),k1(e),e=d.next,l=d.next;continue}if(e=d,e===l){s?s===1?(e=j3e(kp(e),t,n),T1(e,t,n,r,i,o,2)):s===2&&U3e(e,t,n,r,i,o):T1(kp(e),t,n,r,i,o,1);break}}}}function $3e(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&&Vm(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 z3e(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&&Vm(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&&Vm(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&&Vm(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&&Vm(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 j3e(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!VA(i,o)&&Yte(i,r,r.next,o)&&A1(i,o)&&A1(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),k1(r),k1(r.next),r=e=o),r=r.next}while(r!==e);return kp(r)}function U3e(e,t,n,r,i,o){var s=e;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&Q3e(s,l)){var c=Kte(s,l);s=kp(s,s.next),c=kp(c,c.next),T1(s,t,n,r,i,o,0),T1(c,t,n,r,i,o,0);return}l=l.next}s=s.next}while(s!==e)}function H3e(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&&Vm(is.x||n.x===s.x&&q3e(s,n)))&&(s=n,h=p)),n=n.next;while(n!==c);return s}function q3e(e,t){return kr(e.prev,e,t.prev)<0&&kr(t.next,e,e.next)<0}function X3e(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,Y3e(i)}function Y3e(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 K3e(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 Q3e(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!J3e(e,t)&&(A1(e,t)&&A1(t,e)&&Z3e(e,t)&&(kr(e.prev,e,t.prev)||kr(e,t.prev,t))||VA(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 VA(e,t){return e.x===t.x&&e.y===t.y}function Yte(e,t,n,r){var i=D_(kr(e,t,n)),o=D_(kr(e,t,r)),s=D_(kr(n,r,e)),l=D_(kr(n,r,t));return!!(i!==o&&s!==l||i===0&&M_(e,n,t)||o===0&&M_(e,r,t)||s===0&&M_(n,e,r)||l===0&&M_(n,t,r))}function M_(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 D_(e){return e>0?1:e<0?-1:0}function J3e(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&&Yte(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function A1(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 Z3e(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 Kte(e,t){var n=new T3(e.i,e.x,e.y),r=new T3(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 H9(e,t,n,r){var i=new T3(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 k1(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 T3(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}GA.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(A3(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 e5e=Ij.exports;const t5e=Ws(e5e);var yC={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */yC.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,k=Math.floor,I=String.fromCharCode,A;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+=I(J>>>10&1023|55296),J=56320|J&1023),ie+=I(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 $(Y,J,ie){var ce=0;for(Y=ie?k(Y/p):Y>>1,Y+=k(Y/J);Y>E*f>>1;ce+=c)Y=k(Y/E);return k(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>k((l-ue)/ve))&&O("overflow"),ue+=xe*ve,me=ye<=Q?d:ye>=Q+f?f:ye-Q,!(xek(l/be)&&O("overflow"),ve*=be;ce=J.length+1,Q=$(ue-pe,ce,pe==0),k(ue/ce)>l-se&&O("overflow"),se+=k(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&&vek((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"||!yi?cn:yi(Uint8Array),cp={"%AggregateError%":typeof AggregateError>"u"?cn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?cn:ArrayBuffer,"%ArrayIteratorPrototype%":rm&&yi?yi([][Symbol.iterator]()):cn,"%AsyncFromSyncIteratorPrototype%":cn,"%AsyncFunction%":gm,"%AsyncGenerator%":gm,"%AsyncGeneratorFunction%":gm,"%AsyncIteratorPrototype%":gm,"%Atomics%":typeof Atomics>"u"?cn:Atomics,"%BigInt%":typeof BigInt>"u"?cn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?cn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?cn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?cn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?cn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?cn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?cn:FinalizationRegistry,"%Function%":Qte,"%GeneratorFunction%":gm,"%Int8Array%":typeof Int8Array>"u"?cn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?cn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?cn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":rm&&yi?yi(yi([][Symbol.iterator]())):cn,"%JSON%":typeof JSON=="object"?JSON:cn,"%Map%":typeof Map>"u"?cn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!rm||!yi?cn:yi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?cn:Promise,"%Proxy%":typeof Proxy>"u"?cn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?cn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?cn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!rm||!yi?cn:yi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?cn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":rm&&yi?yi(""[Symbol.iterator]()):cn,"%Symbol%":rm?Symbol:cn,"%SyntaxError%":Ug,"%ThrowTypeError%":m5e,"%TypedArray%":v5e,"%TypeError%":ag,"%Uint8Array%":typeof Uint8Array>"u"?cn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?cn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?cn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?cn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?cn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?cn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?cn:WeakSet};if(yi)try{null.error}catch(e){var y5e=yi(yi(e));cp["%Error.prototype%"]=y5e}var b5e=function e(t){var n;if(t==="%AsyncFunction%")n=eB("async function () {}");else if(t==="%GeneratorFunction%")n=eB("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=eB("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&yi&&(n=yi(i.prototype))}return cp[t]=n,n},V9={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ww=Rj,bC=p5e,x5e=ww.call(Function.call,Array.prototype.concat),w5e=ww.call(Function.apply,Array.prototype.splice),q9=ww.call(Function.call,String.prototype.replace),xC=ww.call(Function.call,String.prototype.slice),_5e=ww.call(Function.call,RegExp.prototype.exec),S5e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E5e=/\\(\\)?/g,C5e=function(t){var n=xC(t,0,1),r=xC(t,-1);if(n==="%"&&r!=="%")throw new Ug("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ug("invalid intrinsic syntax, expected opening `%`");var i=[];return q9(t,S5e,function(o,s,l,c){i[i.length]=l?q9(c,E5e,"$1"):s||o}),i},T5e=function(t,n){var r=t,i;if(bC(V9,r)&&(i=V9[r],r="%"+i[0]+"%"),bC(cp,r)){var o=cp[r];if(o===gm&&(o=b5e(r)),typeof o>"u"&&!n)throw new ag("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Ug("intrinsic "+t+" does not exist!")},Pj=function(t,n){if(typeof t!="string"||t.length===0)throw new ag("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ag('"allowMissing" argument must be a boolean');if(_5e(/^%?[^%]*%?$/,t)===null)throw new Ug("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=C5e(t),i=r.length>0?r[0]:"",o=T5e("%"+i+"%",n),s=o.name,l=o.value,c=!1,d=o.alias;d&&(i=d[0],w5e(r,x5e([0,1],d)));for(var f=1,h=!0;f=r.length){var y=lp(l,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[p]}else h=bC(l,p),l=l[p];h&&!c&&(cp[s]=l)}}return l},Jte={exports:{}};(function(e){var t=Rj,n=Pj,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})(Jte);var A5e=Jte.exports,Zte=Pj,ene=A5e,k5e=ene(Zte("String.prototype.indexOf")),I5e=function(t,n){var r=Zte(t,!!n);return typeof r=="function"&&k5e(t,".prototype.")>-1?ene(r):r};const R5e={},P5e=Object.freeze(Object.defineProperty({__proto__:null,default:R5e},Symbol.toStringTag,{value:"Module"})),tne=Eq(P5e);var Oj=typeof Map=="function"&&Map.prototype,nB=Object.getOwnPropertyDescriptor&&Oj?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wC=Oj&&nB&&typeof nB.get=="function"?nB.get:null,X9=Oj&&Map.prototype.forEach,Mj=typeof Set=="function"&&Set.prototype,rB=Object.getOwnPropertyDescriptor&&Mj?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_C=Mj&&rB&&typeof rB.get=="function"?rB.get:null,Y9=Mj&&Set.prototype.forEach,O5e=typeof WeakMap=="function"&&WeakMap.prototype,Cx=O5e?WeakMap.prototype.has:null,M5e=typeof WeakSet=="function"&&WeakSet.prototype,Tx=M5e?WeakSet.prototype.has:null,D5e=typeof WeakRef=="function"&&WeakRef.prototype,K9=D5e?WeakRef.prototype.deref:null,L5e=Boolean.prototype.valueOf,N5e=Object.prototype.toString,B5e=Function.prototype.toString,F5e=String.prototype.match,Dj=String.prototype.slice,fd=String.prototype.replace,$5e=String.prototype.toUpperCase,Q9=String.prototype.toLowerCase,nne=RegExp.prototype.test,J9=Array.prototype.concat,Ml=Array.prototype.join,z5e=Array.prototype.slice,Z9=Math.floor,k3=typeof BigInt=="function"?BigInt.prototype.valueOf:null,iB=Object.getOwnPropertySymbols,I3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="object",so=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Hg||"symbol")?Symbol.toStringTag:null,rne=Object.prototype.propertyIsEnumerable,e7=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function t7(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||nne.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Z9(-e):Z9(e);if(r!==e){var i=String(r),o=Dj.call(t,i.length+1);return fd.call(i,n,"$&_")+"."+fd.call(fd.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return fd.call(t,n,"$&_")}var R3=tne,n7=R3.custom,r7=one(n7)?n7:null,j5e=function e(t,n,r,i){var o=n||{};if(ed(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ed(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=ed(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(ed(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(ed(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 ane(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?t7(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return l?t7(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 P3(t)?"[Array]":"[Object]";var h=o4e(o,r);if(typeof i>"u")i=[];else if(sne(i,t)>=0)return"[Circular]";function p(z,D,$){if(D&&(i=z5e.call(i),i.push(D)),$){var j={depth:o.depth};return ed(o,"quoteStyle")&&(j.quoteStyle=o.quoteStyle),e(z,j,r+1,i)}return e(z,o,r+1,i)}if(typeof t=="function"&&!i7(t)){var g=K5e(t),v=L_(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Ml.call(v,", ")+" }":"")}if(one(t)){var y=Hg?fd.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I3.call(t);return typeof t=="object"&&!Hg?wb(y):y}if(n4e(t)){for(var S="<"+Q9.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)S+=" "+_[b].name+"="+ine(U5e(_[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+="",S}if(P3(t)){if(t.length===0)return"[]";var x=L_(t,p);return h&&!i4e(x)?"["+O3(x,h)+"]":"[ "+Ml.call(x,", ")+" ]"}if(W5e(t)){var E=L_(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!rne.call(t,"cause")?"{ ["+String(t)+"] "+Ml.call(J9.call("[cause]: "+p(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ml.call(E,", ")+" }"}if(typeof t=="object"&&s){if(r7&&typeof t[r7]=="function"&&R3)return R3(t,{depth:f-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Q5e(t)){var k=[];return X9&&X9.call(t,function(z,D){k.push(p(D,t,!0)+" => "+p(z,t))}),o7("Map",wC.call(t),k,h)}if(e4e(t)){var I=[];return Y9&&Y9.call(t,function(z){I.push(p(z,t))}),o7("Set",_C.call(t),I,h)}if(J5e(t))return oB("WeakMap");if(t4e(t))return oB("WeakSet");if(Z5e(t))return oB("WeakRef");if(V5e(t))return wb(p(Number(t)));if(X5e(t))return wb(p(k3.call(t)));if(q5e(t))return wb(L5e.call(t));if(G5e(t))return wb(p(String(t)));if(!H5e(t)&&!i7(t)){var A=L_(t,p),O=e7?e7(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",N=!O&&so&&Object(t)===t&&so in t?Dj.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(J9.call([],N||[],L||[]),": ")+"] ":"");return A.length===0?W+"{}":h?W+"{"+O3(A,h)+"}":W+"{ "+Ml.call(A,", ")+" }"}return String(t)};function ine(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function U5e(e){return fd.call(String(e),/"/g,""")}function P3(e){return of(e)==="[object Array]"&&(!so||!(typeof e=="object"&&so in e))}function H5e(e){return of(e)==="[object Date]"&&(!so||!(typeof e=="object"&&so in e))}function i7(e){return of(e)==="[object RegExp]"&&(!so||!(typeof e=="object"&&so in e))}function W5e(e){return of(e)==="[object Error]"&&(!so||!(typeof e=="object"&&so in e))}function G5e(e){return of(e)==="[object String]"&&(!so||!(typeof e=="object"&&so in e))}function V5e(e){return of(e)==="[object Number]"&&(!so||!(typeof e=="object"&&so in e))}function q5e(e){return of(e)==="[object Boolean]"&&(!so||!(typeof e=="object"&&so in e))}function one(e){if(Hg)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!I3)return!1;try{return I3.call(e),!0}catch{}return!1}function X5e(e){if(!e||typeof e!="object"||!k3)return!1;try{return k3.call(e),!0}catch{}return!1}var Y5e=Object.prototype.hasOwnProperty||function(e){return e in this};function ed(e,t){return Y5e.call(e,t)}function of(e){return N5e.call(e)}function K5e(e){if(e.name)return e.name;var t=F5e.call(B5e.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function sne(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 ane(Dj.call(e,0,t.maxStringLength),t)+r}var i=fd.call(fd.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,r4e);return ine(i,"single",t)}function r4e(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":"")+$5e.call(t.toString(16))}function wb(e){return"Object("+e+")"}function oB(e){return e+" { ? }"}function o7(e,t,n,r){var i=r?O3(n,r):Ml.call(n,", ");return e+" ("+t+") {"+i+"}"}function i4e(e){for(var t=0;t=0)return!1;return!0}function o4e(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 O3(e,t){if(e.length===0)return"";var n=` +`+t.prev+t.base;return n+Ml.call(e,","+n)+` +`+t.prev}function L_(e,t){var n=P3(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Gh(r)){for(var i=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===x4e.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},T4e=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"&&au(_)&&(_=GS.maybeMap(_,function(j){return j instanceof Date?h(j):j})),_===null){if(o)return l&&!v?l(n,Zi.encoder,y,"key",p):n;_=""}if(D4e(_)||GS.isBuffer(_)){if(l){var I=v?n:l(n,Zi.encoder,y,"key",p);return[g(I)+"="+g(l(_,Zi.encoder,y,"value",p))]}return[g(n)+"="+g(String(_))]}var A=[];if(typeof _>"u")return A;var O;if(r==="comma"&&au(_))v&&l&&(_=GS.maybeMap(_,l)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(au(c))O=c;else{var L=Object.keys(_);O=d?L.sort(d):L}for(var N=i&&au(_)&&_.length===1?n+"[]":n,H=0;H"u"?Zi.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Zi.charsetSentinel,delimiter:typeof t.delimiter>"u"?Zi.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Zi.encode,encoder:typeof t.encoder=="function"?t.encoder:Zi.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Zi.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Zi.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Zi.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Zi.strictNullHandling}},B4e=function(e,t){var n=e,r=N4e(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):au(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var l;t&&t.arrayFormat in s7?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=s7[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=une(),h=0;h0?v+g:""},Wg=cne,M3=Object.prototype.hasOwnProperty,F4e=Array.isArray,gi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Wg.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},$4e=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},fne=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},z4e="utf8=%26%2310003%3B",j4e="utf8=%E2%9C%93",U4e=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=F4e(v)?[v]:v),M3.call(r,g)?r[g]=Wg.combine(r[g],v):r[g]=v}return r},H4e=function(e,t,n,r){for(var i=r?t:fne(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},W4e=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&&M3.call(Object.prototype,d)&&!r.allowPrototypes)return;f.push(d)}for(var h=0;r.depth>0&&(c=l.exec(o))!==null&&h"u"?gi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?gi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:gi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:gi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:gi.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:gi.comma,decoder:typeof t.decoder=="function"?t.decoder:gi.decoder,delimiter:typeof t.delimiter=="string"||Wg.isRegExp(t.delimiter)?t.delimiter:gi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:gi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:gi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:gi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:gi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gi.strictNullHandling}},V4e=function(e,t){var n=G4e(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?U4e(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s",'"',"`"," ","\r",` +`," "],nze=["{","}","|","\\","^","`"].concat(tze),D3=["'"].concat(nze),l7=["%","/","?",";","#"].concat(D3),c7=["/","?","#"],rze=255,u7=/^[+a-z0-9A-Z_-]{0,63}$/,ize=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,oze={javascript:!0,"javascript:":!0},L3={javascript:!0,"javascript:":!0},lg={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N3=K4e;function qA(e,t,n){if(e&&typeof e=="object"&&e instanceof cl)return e;var r=new cl;return r.parse(e,t,n),r}cl.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?k+="x":k+=E[I];if(!k.match(u7)){var O=b.slice(0,g),L=b.slice(g+1),N=E.match(ize);N&&(O.push(N[1]),L.unshift(N[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>rze?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=Q4e.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(!oze[f])for(var g=0,x=D3.length;g0?n.host.split("@"):!1;k&&(n.auth=k.shift(),n.hostname=k.shift(),n.host=n.hostname)}return n.search=e.search,n.query=e.query,(n.pathname!==null||n.search!==null)&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var I=b.slice(-1)[0],A=(n.host||e.host||b.length>1)&&(I==="."||I==="..")||I==="",O=0,L=b.length;L>=0;L--)I=b[L],I==="."?b.splice(L,1):I===".."?(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(""),A&&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 k=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;k&&(n.auth=k.shift(),n.hostname=k.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};cl.prototype.parseHost=function(){var e=this.host,t=Z4e.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 lze=qA,cze=aze,uze=sze;const dze={parse:lze,format:uze,resolve:cze};function za(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 fze(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hze(e,t,n){return e.replace(new RegExp(fze(t),"g"),n)}function pze(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 io={toPosix(e){return hze(e,"\\","/")},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol(e){za(e),e=this.toPosix(e);let t="";const n=/^file:\/\/\//.exec(e),r=/^[^/:]+:\/\//.exec(e),i=/^[^/:]+:\//.exec(e);if(n||r||i){const o=(n==null?void 0:n[0])||(r==null?void 0:r[0])||(i==null?void 0:i[0]);t=o,e=e.slice(o.length)}return t},toAbsolute(e,t,n){if(this.isDataUrl(e))return e;const r=_b(this.toPosix(t??tt.ADAPTER.getBaseUrl())),i=_b(this.toPosix(n??this.rootname(r)));return za(e),e=this.toPosix(e),e.startsWith("/")?io.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(e=this.toPosix(e),za(e),e.length===0)return".";let t="";const n=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));const r=e.endsWith("/");return e=pze(e,!1),e.length>0&&r&&(e+="/"),n?`/${e}`:t+e},isAbsolute(e){return za(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join(...e){if(e.length===0)return".";let t;for(let n=0;n0)if(t===void 0)t=r;else{const i=e[n-1]??"";this.extname(i)?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?".":this.normalize(t)},dirname(e){if(za(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const n=t===47;let r=-1,i=!0;const o=this.getProtocol(e),s=e;e=e.slice(o.length);for(let 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){za(e),e=this.toPosix(e);let t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){const n=e.indexOf("/",t.length);n!==-1?t=e.slice(0,n):t=e,t.endsWith("/")||(t+="/")}return t},basename(e,t){za(e),t&&za(t),e=_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){za(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){za(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:":"},d7={};function un(e,t,n=3){if(d7[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))),d7[t]=!0}let cB;function mze(){return typeof cB>"u"&&(cB=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}}()),cB}var gze={grad:.9,turn:360,rad:360/(2*Math.PI)},tu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},xi=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},la=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},hne=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},f7=function(e){return{r:la(e.r,0,255),g:la(e.g,0,255),b:la(e.b,0,255),a:la(e.a)}},uB=function(e){return{r:xi(e.r),g:xi(e.g),b:xi(e.b),a:xi(e.a,3)}},vze=/^#([0-9a-f]{3,8})$/i,F_=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},pne=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),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}},mne=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}},h7=function(e){return{h:hne(e.h),s:la(e.s,0,100),l:la(e.l,0,100),a:la(e.a)}},p7=function(e){return{h:xi(e.h),s:xi(e.s),l:xi(e.l),a:xi(e.a,3)}},m7=function(e){return mne((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=pne(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},yze=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bze=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xze=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wze=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,B3={string:[[function(e){var t=vze.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?xi(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?xi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=xze.exec(e)||wze.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:f7({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=yze.exec(e)||bze.exec(e);if(!t)return null;var n,r,i=h7({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(gze[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return m7(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 tu(t)&&tu(n)&&tu(r)?f7({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(!tu(t)||!tu(n)||!tu(r))return null;var s=h7({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return m7(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=i===void 0?1:i;if(!tu(t)||!tu(n)||!tu(r))return null;var s=function(l){return{h:hne(l.h),s:la(l.s,0,100),v:la(l.v,0,100),a:la(l.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return mne(s)},"hsv"]]},g7=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=uB(this.rgba),n=t.r,r=t.g,i=t.b,s=(o=t.a)<1?F_(xi(255*o)):"","#"+F_(n)+F_(r)+F_(i)+s;var t,n,r,i,o,s},e.prototype.toRgb=function(){return uB(this.rgba)},e.prototype.toRgbString=function(){return t=uB(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 p7(kx(this.rgba))},e.prototype.toHslString=function(){return t=p7(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=pne(this.rgba),{h:xi(t.h),s:xi(t.s),v:xi(t.v),a:xi(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(dB(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tl(dB(this.rgba,-t))},e.prototype.grayscale=function(){return Tl(dB(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tl(v7(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tl(v7(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}):xi(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}):xi(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tl(t).toHex()},e}(),Tl=function(e){return e instanceof F3?e:new F3(e)},y7=[],Sze=function(e){e.forEach(function(t){y7.indexOf(t)<0&&(t(F3,B3),y7.push(t))})};function Eze(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]=cg.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=cg.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 jn=cg;jn.shared=new cg;jn.temp=new cg;jn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function Cze(e){return un("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),jn.shared.setValue(e).toHex()}function Tze(e){return un("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),jn.shared.setValue(e).toNumber()}function Aze(){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 gne=Aze();function vne(e,t){return gne[t?1:0][e]}function kze(e,t=null){const n=e*6;if(t=t||new Uint16Array(n),t.length!==n)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${n}`);for(let r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function b7(e){return!(e&e-1)&&!!e}function x7(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 ug(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 z3=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},E7=(e,t)=>z3(e).priority??t,bt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(z3).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(z3).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)=>E7(o,n)-E7(i,n)))},r=>{const i=t.indexOf(r.ref);i!==-1&&t.splice(i,1)})}};class j3{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 Dze=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function Lze(e){let t="";for(let n=0;n0&&(t+=` +else `),n=0;--r){const i=U3[r];if(i.test&&i.test(e,n))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class ul{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(ul.prototype,{dispatch:{value:ul.prototype.emit},run:{value:ul.prototype.emit}});class I1{constructor(t=0,n=0){this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new ul("setRealSize"),this.onUpdate=new ul("update"),this.onError=new ul("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 _w extends I1{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 Bze={scaleMode:hu.NEAREST,format:Ge.RGBA,alphaMode:xl.NPM},vm=class extends xw{constructor(e=null,t=null){super(),t=Object.assign({},vm.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 I1)&&(e=xne(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=Ip(),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=b7(this.realWidth)&&b7(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Uu[this.cacheId],delete Al[this.cacheId],this.cacheId=null),this.dispose(),vm.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}_${Ip()}`}i=e._pixiId}let o=Uu[i];if(r&&n&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new vm(e,t),o.cacheId=i,vm.addToCache(o,i)),o}static fromBuffer(e,t,n,r){e=e||new Float32Array(t*n*4);const i=new _w(e,{width:t,height:n}),o=e instanceof Float32Array?Pt.FLOAT:Pt.UNSIGNED_BYTE;return new vm(i,Object.assign({},Bze,{type:o},r))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Uu[t]&&Uu[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Uu[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Uu[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Uu[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))(Hi||{});class Mt{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new Mt(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const z_=[new Mt,new Mt,new Mt,new Mt];class Qt{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=Hi.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 Qt(0,0,0,0)}clone(){return new Qt(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=z_[0].set(t.left,t.top),c=z_[1].set(t.left,t.bottom),d=z_[2].set(t.right,t.top),f=z_[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,k=b*i+x*o,I=b*r+x*s,A=b*i+x*s;return!(Math.max(E,k,I,A)<=b*l.x+x*l.y||Math.min(E,k,I,A)>=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 Fj{constructor(t=0,n=0,r=0){this.x=t,this.y=n,this.radius=r,this.type=Hi.CIRC}clone(){return new Fj(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 Qt(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 $j{constructor(t=0,n=0,r=0,i=0){this.x=t,this.y=n,this.width=r,this.height=i,this.type=Hi.ELIP}clone(){return new $j(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 Qt(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 dg{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 zj{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=Hi.RREC}clone(){return new zj(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 mr{constructor(t=1,n=0,r=0,i=1,o=0,s=0){this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,r,i,o,s){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=s,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,n){n=n||new Mt;const r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n}applyInverse(t,n){n=n||new Mt;const r=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return n.x=this.d*r*i+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*o+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),r=Math.sin(t),i=this.a,o=this.c,s=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=o*n-this.d*r,this.d=o*r+this.d*n,this.tx=s*n-this.ty*r,this.ty=s*r+this.ty*n,this}append(t){const n=this.a,r=this.b,i=this.c,o=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*o,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*o,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}setTransform(t,n,r,i,o,s,l,c,d){return this.a=Math.cos(l+d)*o,this.b=Math.sin(l+d)*o,this.c=-Math.sin(l-c)*s,this.d=Math.cos(l-c)*s,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,l=-Math.atan2(-i,o),c=Math.atan2(r,n),d=Math.abs(l+c);return d<1e-5||Math.abs(CC-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 mr;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 mr}static get TEMP_MATRIX(){return new mr}}const $h=[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],W3=[],Sne=[],j_=Math.sign;function Gze(){for(let e=0;e<16;e++){const t=[];W3.push(t);for(let n=0;n<16;n++){const r=j_($h[e]*$h[n]+jh[e]*zh[n]),i=j_(zh[e]*$h[n]+Uh[e]*zh[n]),o=j_($h[e]*jh[n]+jh[e]*Uh[n]),s=j_(zh[e]*jh[n]+Uh[e]*Uh[n]);for(let l=0;l<16;l++)if($h[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 mr;t.set($h[e],zh[e],jh[e],Uh[e],0,0),Sne.push(t)}}Gze();const Sr={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=>$h[e],uY:e=>zh[e],vX:e=>jh[e],vY:e=>Uh[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>W3[e][t],sub:(e,t)=>W3[e][Sr.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?Sr.S:Sr.N:Math.abs(t)*2<=Math.abs(e)?e>0?Sr.E:Sr.W:t>0?e>0?Sr.SE:Sr.SW:e>0?Sr.NE:Sr.NW,matrixAppendRotationInv:(e,t,n=0,r=0)=>{const i=Sne[Sr.inv(t)];i.tx=n,i.ty=r,e.append(i)}};class pd{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 pd(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 Ene=class{constructor(){this.worldTransform=new mr,this.localTransform=new mr,this.position=new pd(this.onChange,this,0,0),this.scale=new pd(this.onChange,this,1,1),this.pivot=new pd(this.onChange,this,0,0),this.skew=new pd(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 jj=Ene;jj.IDENTITY=new Ene;var Vze=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; + +void main(void){ + gl_FragColor *= texture2D(uSampler, vTextureCoord); +}`,qze=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void){ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +} +`;function T7(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function bB(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}"] + gl.uniform1f(ud["${e}"].location, uv["${e}"]) + } + `},{test:(e,t)=>(e.type==="sampler2D"||e.type==="samplerCube"||e.type==="sampler2DArray")&&e.size===1&&!e.isArray&&(t==null||t.castToBaseTexture!==void 0),code:e=>`t = syncData.textureCount++; + + renderer.texture.bind(uv["${e}"], t); + + if(ud["${e}"].value !== t) + { + ud["${e}"].value = t; + gl.uniform1i(ud["${e}"].location, t); +; // eslint-disable-line max-len + }`},{test:(e,t)=>e.type==="mat3"&&e.size===1&&!e.isArray&&t.a!==void 0,code:e=>` + gl.uniformMatrix3fv(ud["${e}"].location, false, uv["${e}"].toArray(true)); + `,codeUbo:e=>` + var ${e}_matrix = uv.${e}.toArray(true); + + data[offset] = ${e}_matrix[0]; + data[offset+1] = ${e}_matrix[1]; + data[offset+2] = ${e}_matrix[2]; + + data[offset + 4] = ${e}_matrix[3]; + data[offset + 5] = ${e}_matrix[4]; + data[offset + 6] = ${e}_matrix[5]; + + data[offset + 8] = ${e}_matrix[6]; + data[offset + 9] = ${e}_matrix[7]; + data[offset + 10] = ${e}_matrix[8]; + `},{test:(e,t)=>e.type==="vec2"&&e.size===1&&!e.isArray&&t.x!==void 0,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v.x || cv[1] !== v.y) + { + cv[0] = v.x; + cv[1] = v.y; + gl.uniform2f(ud["${e}"].location, v.x, v.y); + }`,codeUbo:e=>` + v = uv.${e}; + + data[offset] = v.x; + data[offset+1] = v.y; + `},{test:e=>e.type==="vec2"&&e.size===1&&!e.isArray,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2f(ud["${e}"].location, v[0], v[1]); + } + `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.width!==void 0,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) + { + cv[0] = v.x; + cv[1] = v.y; + cv[2] = v.width; + cv[3] = v.height; + gl.uniform4f(ud["${e}"].location, v.x, v.y, v.width, v.height) + }`,codeUbo:e=>` + v = uv.${e}; + + data[offset] = v.x; + data[offset+1] = v.y; + data[offset+2] = v.width; + data[offset+3] = v.height; + `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) + { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + cv[3] = v.alpha; + gl.uniform4f(ud["${e}"].location, v.red, v.green, v.blue, v.alpha) + }`,codeUbo:e=>` + v = uv.${e}; + + data[offset] = v.red; + data[offset+1] = v.green; + data[offset+2] = v.blue; + data[offset+3] = v.alpha; + `},{test:(e,t)=>e.type==="vec3"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a) + { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + + gl.uniform3f(ud["${e}"].location, v.red, v.green, v.blue) + }`,codeUbo:e=>` + v = uv.${e}; + + data[offset] = v.red; + data[offset+1] = v.green; + data[offset+2] = v.blue; + `},{test:e=>e.type==="vec4"&&e.size===1&&!e.isArray,code:e=>` + cv = ud["${e}"].value; + v = uv["${e}"]; + + if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3]) + }`}],Xze={float:` + if (cv !== v) + { + cu.value = v; + gl.uniform1f(location, v); + }`,vec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2f(location, v[0], v[1]) + }`,vec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3f(location, v[0], v[1], v[2]) + }`,vec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4f(location, v[0], v[1], v[2], v[3]); + }`,int:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,ivec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2i(location, v[0], v[1]); + }`,ivec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3i(location, v[0], v[1], v[2]); + }`,ivec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,uint:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1ui(location, v); + }`,uvec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2ui(location, v[0], v[1]); + }`,uvec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3ui(location, v[0], v[1], v[2]); + }`,uvec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4ui(location, v[0], v[1], v[2], v[3]); + }`,bool:` + if (cv !== v) + { + cu.value = v; + gl.uniform1i(location, v); + }`,bvec2:` + if (cv[0] != v[0] || cv[1] != v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2i(location, v[0], v[1]); + }`,bvec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3i(location, v[0], v[1], v[2]); + }`,bvec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,samplerCube:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,sampler2DArray:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`},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 Kze(e,t){var r;const n=[` + var v = null; + var cv = null; + var cu = null; + var t = 0; + var gl = renderer.gl; + `];for(const i in e.uniforms){const o=t[i];if(!o){(r=e.uniforms[i])!=null&&r.group&&(e.uniforms[i].ubo?n.push(` + 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=Wp.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),im=t}return im}let U_;function Jze(){if(!U_){U_=aa.MEDIUM;const e=Qze();e&&e.getShaderPrecisionFormat&&(U_=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?aa.HIGH:aa.MEDIUM)}return U_}function A7(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 Zze(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 eje={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 Ane(e){return eje[e]}let H_=null;const k7={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 kne(e,t){if(!H_){const n=Object.keys(k7);H_={};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=Ha._textureArrayPool,r=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let s=++qt._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=Wp.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")}}KA.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};KA.extension={type:rt.RendererSystem,name:"context"};bt.add(KA);class dje extends _w{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 V3{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 ul("disposeFramebuffer"),this.multisample=Vr.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,n){return this.colorTextures[t]=n||new qt(null,{scaleMode:hu.NEAREST,resolution:1,mipmap:Zl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new qt(new dje(null,{width:this.width,height:this.height}),{scaleMode:hu.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Zl.OFF,format:Ge.DEPTH_COMPONENT,type:Pt.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 One{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=Sr.add(r,Sr.NW),this.x0=c+s*Sr.uX(r),this.y0=d+l*Sr.uY(r),r=Sr.add(r,2),this.x1=c+s*Sr.uX(r),this.y1=d+l*Sr.uY(r),r=Sr.add(r,2),this.x2=c+s*Sr.uX(r),this.y2=d+l*Sr.uY(r),r=Sr.add(r,2),this.x3=c+s*Sr.uX(r),this.y3=d+l*Sr.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 P7=new One;function G_(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class ht extends xw{constructor(t,n,r,i,o,s,l){if(super(),this.noFrame=!1,n||(this.noFrame=!0,n=new Qt(0,0,1,1)),t instanceof ht&&(t=t.baseTexture),this.baseTexture=t,this._frame=n,this.trim=i,this.valid=!1,this._uvs=P7,this.uvMatrix=null,this.orig=r||n,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=s?new Mt(s.x,s.y):new Mt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=n:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:n}=this.baseTexture;n!=null&&n.url&&Al[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===P7&&(this._uvs=new One),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 qt){if(!t.cacheId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${Ip()}`,qt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const l=(n==null?void 0:n.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${Ip()}`}o=t._pixiId}let s=Al[o];if(i&&r&&!s)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!s&&!(t instanceof qt)?(n.resolution||(n.resolution=jd(t)),s=new ht(new qt(t,n)),s.baseTexture.cacheId=o,qt.addToCache(s.baseTexture,o),ht.addToCache(s,o)):!s&&t instanceof qt&&(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(qt.fromBuffer(t,n,r,i))}static fromLoader(t,n,r,i){const o=new qt(t,Object.assign({scaleMode:qt.defaultOptions.scaleMode,resolution:jd(n)},i)),{resource:s}=o;s instanceof Pne&&(s.url=n);const l=new ht(o);return r||(r=n),qt.addToCache(l.baseTexture,r),ht.addToCache(l,r),r!==n&&(qt.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),Al[n]&&Al[n]!==t&&console.warn(`Texture added to the cache with an id [${n}] that already had an entry`),Al[n]=t)}static removeFromCache(t){if(typeof t=="string"){const n=Al[t];if(n){const r=n.textureCacheIds.indexOf(t);return r>-1&&n.textureCacheIds.splice(r,1),delete Al[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 qt),G_(ht._EMPTY),G_(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(qt.from(t)),G_(ht._WHITE),G_(ht._WHITE.baseTexture)}return ht._WHITE}}class Gp 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 Gp(new Rne(t))}}class Mne{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,n,r=Vr.NONE){const i=new Rne(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new Gp(i)}getOptimalTexture(t,n,r=1,i=Vr.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=SC(t),n=SC(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||Vr.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(mr.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=Vr.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||Vr.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=V_[0],i=V_[1],o=V_[2],s=V_[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?xB.copyFrom(o):xB.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)}}}Lne.extension={type:rt.RendererSystem,name:"filter"};bt.add(Lne);class pje{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Vr.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const mje=new Qt;class Nne{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new V3(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 Qt,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===Wp.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=S3.COLOR|S3.DEPTH){const{gl:s}=this;s.clearColor(t,n,r,i),s.clear(o)}initFramebuffer(t){const{gl:n}=this,r=new pje(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=Vr.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}}$ne.extension={type:rt.RendererSystem,name:"mask"};bt.add($ne);class zne{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 M7=new mr,D7=[],VS=class extends zne{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,D7.pop()??new Qt);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()||VS.isMatrixRotated(t.worldTransform)||VS.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){VS.isMatrixRotated(i)||(i=i?M7.copyFrom(i):M7.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&&D7.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 jne=VS;jne.extension={type:rt.RendererSystem,name:"scissor"};bt.add(jne);class Une extends zne{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)}}Une.extension={type:rt.RendererSystem,name:"stencil"};bt.add(Une);class Hne{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return un("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const n in t)this.plugins[n]=new t[n](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Hne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"_plugin"};bt.add(Hne);class Wne{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new mr,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}}Wne.extension={type:rt.RendererSystem,name:"projection"};bt.add(Wne);const xje=new jj;class Gne{constructor(t){this.renderer=t,this._tempMatrix=new mr}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=Gp.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=xje,this.renderer.render(t,{renderTexture:s,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,s}destroy(){}}Gne.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"textureGenerator"};bt.add(Gne);const Th=new Qt,Eb=new Qt;class Vne{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Qt,this.destinationFrame=new Qt,this.viewportFrame=new Qt}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=jn.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}}Vne.extension={type:rt.RendererSystem,name:"renderTexture"};bt.add(Vne);class wje{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 _je(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 kje(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 Ije(e,t){if(!e.autoManage)return{size:0,syncFunc:Cje};const n=kje(e.uniforms,t),{uboElements:r,size:i}=Aje(n),o=[` + var v = null; + var v2 = null; + var cv = null; + var t = 0; + var gl = renderer.gl + var index = 0; + var data = buffer.data; + `];for(let s=0;s1){const h=Ane(l.data.type),p=Math.max(qne[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}; + + t = 0; + + for(var i=0; i < ${l.data.size*p}; i++) + { + for(var j = 0; j < ${g}; j++) + { + data[offset++] = v[t++]; + } + offset += ${v}; + } + + `)}else{const h=Tje[l.data.type];o.push(` + cv = ud.${d}.value; + v = uv.${d}; + offset = ${l.offset/4}; + ${h}; + `)}}return o.push(` + renderer.buffer.update(buffer); + `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` +`))}}let Rje=0;const q_={textureCount:0,uboCount:0};class Xne{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=Rje++}systemCheck(){if(!tje())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||(q_.textureCount=0,q_.uboCount=0,this.syncUniformGroup(t.uniformGroup,q_)),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]=Kze(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,q_,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]=Ije(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=Eje(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}}Xne.extension={type:rt.RendererSystem,name:"shader"};bt.add(Xne);class QA{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(){}}QA.defaultOptions={hello:!1};QA.extension={type:[rt.RendererSystem,rt.CanvasRendererSystem],name:"startup"};bt.add(QA);function Pje(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 Oje=0,Mje=1,Dje=2,Lje=3,Nje=4,Bje=5,q3=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Dt.NONE,this._blendEq=!1,this.map=[],this.map[Oje]=this.setBlend,this.map[Mje]=this.setOffset,this.map[Dje]=this.setCullFace,this.map[Lje]=this.setDepthTest,this.map[Nje]=this.setFrontFace,this.map[Bje]=this.setDepthMask,this.checks=[],this.defaultState=new Nu,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=Pje(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 ul(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 qS=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=qS.defaultMaxIdle,this.checkCountMax=qS.defaultCheckCountMax,this.mode=qS.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==kj.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 Za=qS;Za.defaultMode=kj.AUTO;Za.defaultMaxIdle=60*60;Za.defaultCheckCountMax=60*10;Za.extension={type:rt.RendererSystem,name:"textureGC"};bt.add(Za);class _B{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=Pt.UNSIGNED_BYTE,this.internalFormat=Ge.RGBA,this.samplerType=0}}function $je(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Pt.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},[Pt.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},[Pt.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},[Pt.SHORT]:{[Ge.RGBA_INTEGER]:e.RGBA16I,[Ge.RGB_INTEGER]:e.RGB16I,[Ge.RG_INTEGER]:e.RG16I,[Ge.RED_INTEGER]:e.R16I},[Pt.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},[Pt.INT]:{[Ge.RGBA_INTEGER]:e.RGBA32I,[Ge.RGB_INTEGER]:e.RGB32I,[Ge.RG_INTEGER]:e.RG32I,[Ge.RED_INTEGER]:e.R32I},[Pt.FLOAT]:{[Ge.RGBA]:e.RGBA32F,[Ge.RGB]:e.RGB32F,[Ge.RG]:e.RG32F,[Ge.RED]:e.R32F,[Ge.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Pt.HALF_FLOAT]:{[Ge.RGBA]:e.RGBA16F,[Ge.RGB]:e.RGB16F,[Ge.RG]:e.RG16F,[Ge.RED]:e.R16F},[Pt.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB565},[Pt.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA4},[Pt.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGB5_A1},[Pt.UNSIGNED_INT_2_10_10_10_REV]:{[Ge.RGBA]:e.RGB10_A2,[Ge.RGBA_INTEGER]:e.RGB10_A2UI},[Pt.UNSIGNED_INT_10F_11F_11F_REV]:{[Ge.RGB]:e.R11F_G11F_B10F},[Pt.UNSIGNED_INT_5_9_9_9_REV]:{[Ge.RGB]:e.RGB9_E5},[Pt.UNSIGNED_INT_24_8]:{[Ge.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Pt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ge.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Pt.UNSIGNED_BYTE]:{[Ge.RGBA]:e.RGBA,[Ge.RGB]:e.RGB,[Ge.ALPHA]:e.ALPHA,[Ge.LUMINANCE]:e.LUMINANCE,[Ge.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Pt.UNSIGNED_SHORT_5_6_5]:{[Ge.RGB]:e.RGB},[Pt.UNSIGNED_SHORT_4_4_4_4]:{[Ge.RGBA]:e.RGBA},[Pt.UNSIGNED_SHORT_5_5_5_1]:{[Ge.RGBA]:e.RGBA}},t}class Kne{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new qt,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=$je(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!==E3.FLOAT&&this.renderer.texture.unbind(s)}}initTexture(t){const n=new _B(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===Pt.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!==E3.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&&ug(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===hu.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===hu.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===hu.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===hu.LINEAR?r.LINEAR:r.NEAREST)}destroy(){this.renderer=null}}Kne.extension={type:rt.RendererSystem,name:"texture"};bt.add(Kne);class Qne{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 SB{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 xs=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 SB(null,null,1/0),this.deltaMS=1/xs.targetFPMS,this.elapsedMS=1/xs.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 SB(e,t,n))}addOnce(e,t,n=Rp.NORMAL){return this._addListener(new SB(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?Yr.shared:new Yr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Jne.extension=rt.Application;bt.add(Jne);const Zne=[];bt.handleByList(rt.Renderer,Zne);function zje(e){for(const t of Zne)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var jje=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Uje=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); +} +`;const Hje=jje,ere=Uje;class tre{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>=Vr.HIGH?this.multisample=Vr.HIGH:n>=Vr.MEDIUM?this.multisample=Vr.MEDIUM:n>=Vr.LOW?this.multisample=Vr.LOW:this.multisample=Vr.NONE}destroy(){}}tre.extension={type:rt.RendererSystem,name:"_multisample"};bt.add(tre);class Wje{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class nre{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 Gje extends ire{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=sg.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=sg.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 qm._EMPTY=qm._EMPTY??tt.ADAPTER.createCanvas(0,0),qm._EMPTY}}const XS=class extends Hd{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)},XS.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;Hd.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_${Ip()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,r,i),this._resolve(),this._resolve=null}}static getSize(e){const t=XS.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"&&XS.SVG_XML.test(e)}};let R1=XS;R1.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const Y3=class extends Hd{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];Hd.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&&(Yr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Yr.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&&(Yr.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?(Yr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Yr.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||Y3.TYPES.includes(t)}};let Uj=Y3;Uj.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Uj.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};U3.push(qm,Pne,Vje,Uj,R1,_w,ore,Gje);class TC{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?Qt.EMPTY:(t=t||new Qt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,n){const{a:r,b:i,c:o,d:s,tx:l,ty:c}=t,d=r*n.x+o*n.y+l,f=i*n.x+s*n.y+c;this.minX=Math.min(this.minX,d),this.maxX=Math.max(this.maxX,d),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(t){let n=this.minX,r=this.minY,i=this.maxX,o=this.maxY,s=t[0],l=t[1];n=si?s:i,o=l>o?l:o,s=t[2],l=t[3],n=si?s:i,o=l>o?l:o,s=t[4],l=t[5],n=si?s:i,o=l>o?l:o,s=t[6],l=t[7],n=si?s:i,o=l>o?l:o,this.minX=n,this.minY=r,this.maxX=i,this.maxY=o}addFrame(t,n,r,i,o){this.addFrameMatrix(t.worldTransform,n,r,i,o)}addFrameMatrix(t,n,r,i,o){const s=t.a,l=t.b,c=t.c,d=t.d,f=t.tx,h=t.ty;let p=this.minX,g=this.minY,v=this.maxX,y=this.maxY,S=s*n+c*r+f,_=l*n+d*r+h;p=Sv?S:v,y=_>y?_:y,S=s*i+c*r+f,_=l*i+d*r+h,p=Sv?S:v,y=_>y?_:y,S=s*n+c*o+f,_=l*n+d*o+h,p=Sv?S:v,y=_>y?_:y,S=s*i+c*o+f,_=l*i+d*o+h,p=Sv?S:v,y=_>y?_:y,this.minX=p,this.minY=g,this.maxX=v,this.maxY=y}addVertexData(t,n,r){let i=this.minX,o=this.minY,s=this.maxX,l=this.maxY;for(let c=n;cs?d:s,l=f>l?f:l}this.minX=i,this.minY=o,this.maxX=s,this.maxY=l}addVertices(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)}addVerticesMatrix(t,n,r,i,o=0,s=o){const l=t.a,c=t.b,d=t.c,f=t.d,h=t.tx,p=t.ty;let g=this.minX,v=this.minY,y=this.maxX,S=this.maxY;for(let _=r;_i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,n){const r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,o=t.maxXd?o:d,this.maxY=s>f?s:f}}addBoundsMatrix(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,n){const r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,o=t.maxXd?o:d,this.maxY=s>f?s:f}}pad(t=0,n=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)}addFramePad(t,n,r,i,o,s){t-=o,n-=s,r+=o,i+=s,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i}}class Or extends xw{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new jj,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 TC,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);ug(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!==K3.prototype._render&&(n=this.getBounds(!0));const i=e.projection.transform;if(i&&(r?(r=Xje.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?Kje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t,n)=>(Qje(e,typeof t!="symbol"?t+"":t,n),n);let _a=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 Jje=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},sre={exports:{}};(function(e,t){(function(){var n,r;r=function(i){return e.exports=i},n={linear:function(i,o,s,l){return s*i/l+o},easeInQuad:function(i,o,s,l){return s*(i/=l)*i+o},easeOutQuad:function(i,o,s,l){return-s*(i/=l)*(i-2)+o},easeInOutQuad:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i+o:-s/2*(--i*(i-2)-1)+o},easeInCubic:function(i,o,s,l){return s*(i/=l)*i*i+o},easeOutCubic:function(i,o,s,l){return s*((i=i/l-1)*i*i+1)+o},easeInOutCubic:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i+o:s/2*((i-=2)*i*i+2)+o},easeInQuart:function(i,o,s,l){return s*(i/=l)*i*i*i+o},easeOutQuart:function(i,o,s,l){return-s*((i=i/l-1)*i*i*i-1)+o},easeInOutQuart:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i+o:-s/2*((i-=2)*i*i*i-2)+o},easeInQuint:function(i,o,s,l){return s*(i/=l)*i*i*i*i+o},easeOutQuint:function(i,o,s,l){return s*((i=i/l-1)*i*i*i*i+1)+o},easeInOutQuint:function(i,o,s,l){return(i/=l/2)<1?s/2*i*i*i*i*i+o:s/2*((i-=2)*i*i*i*i+2)+o},easeInSine:function(i,o,s,l){return-s*Math.cos(i/l*(Math.PI/2))+s+o},easeOutSine:function(i,o,s,l){return s*Math.sin(i/l*(Math.PI/2))+o},easeInOutSine:function(i,o,s,l){return-s/2*(Math.cos(Math.PI*i/l)-1)+o},easeInExpo:function(i,o,s,l){return i===0?o:s*Math.pow(2,10*(i/l-1))+o},easeOutExpo:function(i,o,s,l){return i===l?o+s:s*(-Math.pow(2,-10*i/l)+1)+o},easeInOutExpo:function(i,o,s,l){return(i/=l/2)<1?s/2*Math.pow(2,10*(i-1))+o:s/2*(-Math.pow(2,-10*--i)+2)+o},easeInCirc:function(i,o,s,l){return-s*(Math.sqrt(1-(i/=l)*i)-1)+o},easeOutCirc:function(i,o,s,l){return s*Math.sqrt(1-(i=i/l-1)*i)+o},easeInOutCirc:function(i,o,s,l){return(i/=l/2)<1?-s/2*(Math.sqrt(1-i*i)-1)+o:s/2*(Math.sqrt(1-(i-=2)*i)+1)+o},easeInElastic:function(i,o,s,l){var c,d,f;return f=1.70158,d=0,c=s,i===0||(i/=l),d||(d=l*.3),c=this.options.time){const r=this.parent.width,i=this.parent.height;this.complete(),(r!==this.parent.width||i!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const i=this.startWidth,o=this.deltaWidth;this.parent.fitWidth(i+o*r,this.keepCenter,this.height===null)}if(this.height!==null){const i=this.startHeight,o=this.deltaHeight;this.parent.fitHeight(i+o*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const i=this.startX,o=this.startY,s=this.deltaX,l=this.deltaY,c=new Mt(this.parent.x,this.parent.y);this.parent.moveCenter(i+s*r,o+l*r),this.parent.emit("moved",{viewport:this.parent,original:c,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:n,type:"animate"})}}};const t6e={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};let n6e=class extends _a{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({},t6e,n),this.ease=ZA(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const n=this.toX;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),n.time>=this.options.time?(this.parent.x=n.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(n.time,n.start,n.delta,this.options.time)}if(this.toY){const n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const n=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,i=typeof t.width>"u"?this.parent.worldWidth:t.width,o=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.lefti,top:this.parent.topo,topLeft:new Mt(n*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new Mt(i*this.parent.scale.x-this.parent.screenWidth,o*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new Mt(0,0),bottomRight:new Mt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,n;if(this.paused)return;let r,i=this.parent.plugins.get("decelerate",!0);i&&(i.x||i.y)&&(i.x&&i.percentChangeX===((t=i.options)==null?void 0:t.friction)||i.y&&i.percentChangeY===((n=i.options)==null?void 0:n.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(i.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(i.percentChangeY=this.options.friction));const o=this.parent.plugins.get("drag",!0)||{},s=this.parent.plugins.get("pinch",!0)||{};if(i=i||{},!(o!=null&&o.active)&&!(s!=null&&s.active)&&(!this.toX||!this.toY)&&(!i.x||!i.y)){r=r||this.oob();const l=r.topLeft,c=r.bottomRight;if(!this.toX&&!i.x){let d=null;r.left&&this.left?d=this.parent.screenWorldWidth(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,n.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,n.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}};const o6e={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};let s6e=class extends _a{constructor(t,n={}){super(t),Se(this,"options"),this.options=Object.assign({},o6e,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 a6e={friction:.98,bounce:.8,minSpeed:.01},Hu=16;let l6e=class extends _a{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({},a6e,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*Hu/s*(Math.pow(o,i/Hu)-Math.pow(o,r/Hu)),this.x*=Math.pow(this.percentChangeX,t/Hu)}if(this.y){const o=this.percentChangeY,s=Math.log(o);this.parent.y+=this.y*Hu/s*(Math.pow(o,i/Hu)-Math.pow(o,r/Hu)),this.y*=Math.pow(this.percentChangeY,t/Hu)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x){t.includes(i.code)&&(this.keyIsPressed=!0)},r=i=>{t.includes(i.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",n)}addWindowEventHandler(t,n){window.addEventListener(t,n),this.windowEventHandlers.push({event:t,handler:n})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:n})=>{window.removeEventListener(t,n)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const n=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!n||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const n=t.global.x,r=t.global.y,i=this.parent.input.count();if(i===1||i>1&&!this.parent.plugins.get("pinch",!0)){const o=n-this.last.x,s=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(o)||this.yDirection&&this.parent.input.checkThreshold(s)){const l={x:n,y:r};return this.xDirection&&(this.parent.x+=(l.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(l.y-this.last.y)*this.options.factor),this.last=l,this.moved||this.parent.emit("drag-start",{event:t,screen:new Mt(this.last.x,this.last.y),world:this.parent.toWorld(new Mt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const n=this.parent.input.touches;if(n.length===1){const r=n[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new Mt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const n=this.parent.plugins.get("wheel",!0);if(!n||!n.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,i=[t.deltaX,t.deltaY],[o,s]=this.options.wheelSwapAxes?i.reverse():i;return this.xDirection&&(this.parent.x+=o*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=s*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}};const d6e={speed:0,acceleration:null,radius:null};let f6e=class extends _a{constructor(t,n,r={}){super(t),Se(this,"options"),Se(this,"target"),Se(this,"velocity"),this.target=n,this.options=Object.assign({},d6e,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 h6e={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};let p6e=class extends _a{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({},h6e,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 m6e={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};let g6e=class extends _a{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({},m6e,n)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const n=t.global.x,r=t.global.y,i=this.parent.input.touches;if(i.length>=2){const o=i[0],s=i[1],l=o.last&&s.last?Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2)):null;if(o.id===t.pointerId?o.last={x:n,y:r,data:t}:s.id===t.pointerId&&(s.last={x:n,y:r,data:t}),l){let c;const d=new Mt(o.last.x+(s.last.x-o.last.x)/2,o.last.y+(s.last.y-o.last.y)/2);this.options.center||(c=this.parent.toLocal(d));let f=Math.sqrt(Math.pow(s.last.x-o.last.x,2)+Math.pow(s.last.y-o.last.y,2));f=f===0?f=1e-10:f;const h=(1-l/f)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=h),this.isAxisY()&&(this.parent.scale.y+=h),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:d});const p=this.parent.plugins.get("clamp-zoom",!0);if(p&&p.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const g=this.parent.toGlobal(c);this.parent.x+=(d.x-g.x)*this.options.factor,this.parent.y+=(d.y-g.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(d.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(d.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=d,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}};const v6e={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};let y6e=class extends _a{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({},v6e,i),this.ease=ZA(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 b6e={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};let x6e=class extends _a{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({},b6e,n),this.ease=ZA(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 w6e={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};let _6e=class extends _a{constructor(t,n={}){super(t),Se(this,"options"),Se(this,"smoothing"),Se(this,"smoothingCenter"),Se(this,"smoothingCount"),Se(this,"keyIsPressed"),this.options=Object.assign({},w6e,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}},S6e=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 Qt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const n=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!n||!n.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,i=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1)}n&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const n=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),n&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const n=new Mt;return this.viewport.options.events.mapPositionToPoint(n,t.clientX,t.clientY),n}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const n=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=n.x&&n.x<=this.viewport.right&&this.viewport.top<=n.y&&n.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const n of this.touches)if(n.id===t)return n;return null}remove(t){for(let n=0;n{t.destroy()}),this.plugins={},this.sort()}remove(t){var n;this.plugins[t]&&((n=this.plugins[t])==null||n.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var n;(n=this.plugins[t])==null||n.pause()}resume(t){var n;(n=this.plugins[t])==null||n.resume()}sort(){this.list=[];for(const t of 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 C6e={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Yr.shared,allowPreserveDragOutside:!1};class T6e extends Jo{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={...C6e,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new S6e(this),this.plugins=new E6e(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 Qt(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 Qt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,n){return arguments.length===2?this.toLocal(new Mt(t,n)):this.toLocal(t)}toScreen(t,n){return arguments.length===2?this.toGlobal(new Mt(t,n)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new Mt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let n,r;typeof t[0]=="number"?(n=t[0],r=t[1]):(n=t[0].x,r=t[0].y);const i=(this.worldScreenWidth/2-n)*this.scale.x,o=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==i||this.y!==o)&&(this.position.set(i,o),this.plugins.reset(),this.dirty=!0),this}get corner(){return new Mt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let n,r;return t.length===1?(n=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(n=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(n!==this.x||r!==this.y)&&(this.position.set(n,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.min(r,i)}findCover(t,n){const r=this.screenWidth/t,i=this.screenHeight/n;return Math.max(r,i)}fitWidth(t=this.worldWidth,n,r=!0,i){let o;n&&(o=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitHeight(t=this.worldHeight,n,r=!0,i){let o;n&&(o=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const s=this.plugins.get("clamp-zoom",!0);return!i&&s&&s.clamp(),n&&o&&this.moveCenter(o),this}fitWorld(t){let n;t&&(n=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new Mt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new Qt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new u6e(this,t)),this}clamp(t){return this.plugins.add("clamp",new i6e(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new l6e(this,t)),this}bounce(t){return this.plugins.add("bounce",new n6e(this,t)),this}pinch(t){return this.plugins.add("pinch",new g6e(this,t)),this}snap(t,n,r){return this.plugins.add("snap",new y6e(this,t,n,r)),this}follow(t,n){return this.plugins.add("follow",new f6e(this,t,n)),this}wheel(t){return this.plugins.add("wheel",new _6e(this,t)),this}animate(t){return this.plugins.add("animate",new e6e(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new s6e(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new p6e(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 Mt,A6e=new Uint16Array([0,1,2,0,2,3]);class Vp extends Jo{constructor(t){super(),this._anchor=new pd(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 jn(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=A6e,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=hd(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=hd(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 D6e=` + attribute vec2 aVertexPosition; + + uniform mat3 projectionMatrix; + + uniform float strength; + + varying vec2 vBlurTexCoords[%size%]; + + uniform vec4 inputSize; + uniform vec4 outputFrame; + + vec4 filterVertexPosition( void ) + { + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + } + + vec2 filterTextureCoord( void ) + { + return aVertexPosition * (outputFrame.zw * inputSize.zw); + } + + void main(void) + { + gl_Position = filterVertexPosition(); + + vec2 textureCoord = filterTextureCoord(); + %blur% + }`;function L6e(e,t){const n=Math.ceil(e/2);let r=D6e,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 0.0) { + c.rgb /= c.a; + } + + vec4 result; + + result.r = (m[0] * c.r); + result.r += (m[1] * c.g); + result.r += (m[2] * c.b); + result.r += (m[3] * c.a); + result.r += m[4]; + + result.g = (m[5] * c.r); + result.g += (m[6] * c.g); + result.g += (m[7] * c.b); + result.g += (m[8] * c.a); + result.g += m[9]; + + result.b = (m[10] * c.r); + result.b += (m[11] * c.g); + result.b += (m[12] * c.b); + result.b += (m[13] * c.a); + result.b += m[14]; + + result.a = (m[15] * c.r); + result.a += (m[16] * c.g); + result.a += (m[17] * c.b); + result.a += (m[18] * c.a); + result.a += m[19]; + + vec3 rgb = mix(c.rgb, result.rgb, uAlpha); + + // Premultiply alpha again. + rgb *= result.a; + + gl_FragColor = vec4(rgb, result.a); +} +`;class J3 extends Vi{constructor(){const t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(ere,B6e,t),this.alpha=1}_loadMatrix(t,n=!1){let r=t;n&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r}_multiply(t,n,r){return t[0]=n[0]*r[0]+n[1]*r[5]+n[2]*r[10]+n[3]*r[15],t[1]=n[0]*r[1]+n[1]*r[6]+n[2]*r[11]+n[3]*r[16],t[2]=n[0]*r[2]+n[1]*r[7]+n[2]*r[12]+n[3]*r[17],t[3]=n[0]*r[3]+n[1]*r[8]+n[2]*r[13]+n[3]*r[18],t[4]=n[0]*r[4]+n[1]*r[9]+n[2]*r[14]+n[3]*r[19]+n[4],t[5]=n[5]*r[0]+n[6]*r[5]+n[7]*r[10]+n[8]*r[15],t[6]=n[5]*r[1]+n[6]*r[6]+n[7]*r[11]+n[8]*r[16],t[7]=n[5]*r[2]+n[6]*r[7]+n[7]*r[12]+n[8]*r[17],t[8]=n[5]*r[3]+n[6]*r[8]+n[7]*r[13]+n[8]*r[18],t[9]=n[5]*r[4]+n[6]*r[9]+n[7]*r[14]+n[8]*r[19]+n[9],t[10]=n[10]*r[0]+n[11]*r[5]+n[12]*r[10]+n[13]*r[15],t[11]=n[10]*r[1]+n[11]*r[6]+n[12]*r[11]+n[13]*r[16],t[12]=n[10]*r[2]+n[11]*r[7]+n[12]*r[12]+n[13]*r[17],t[13]=n[10]*r[3]+n[11]*r[8]+n[12]*r[13]+n[13]*r[18],t[14]=n[10]*r[4]+n[11]*r[9]+n[12]*r[14]+n[13]*r[19]+n[14],t[15]=n[15]*r[0]+n[16]*r[5]+n[17]*r[10]+n[18]*r[15],t[16]=n[15]*r[1]+n[16]*r[6]+n[17]*r[11]+n[18]*r[16],t[17]=n[15]*r[2]+n[16]*r[7]+n[17]*r[12]+n[18]*r[17],t[18]=n[15]*r[3]+n[16]*r[8]+n[17]*r[13]+n[18]*r[18],t[19]=n[15]*r[4]+n[16]*r[9]+n[17]*r[14]+n[18]*r[19]+n[19],t}_colorMatrix(t){const n=new Float32Array(t);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n}brightness(t,n){const r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,n)}tint(t,n){const[r,i,o]=jn.shared.setValue(t).toArray(),s=[r,0,0,0,0,0,i,0,0,0,0,0,o,0,0,0,0,0,1,0];this._loadMatrix(s,n)}greyscale(t,n){const r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,n)}blackAndWhite(t){const n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,t)}hue(t,n){t=(t||0)/180*Math.PI;const r=Math.cos(t),i=Math.sin(t),o=Math.sqrt,s=1/3,l=o(s),c=r+(1-r)*s,d=s*(1-r)-l*i,f=s*(1-r)+l*i,h=s*(1-r)+l*i,p=r+s*(1-r),g=s*(1-r)-l*i,v=s*(1-r)-l*i,y=s*(1-r)+l*i,S=r+s*(1-r),_=[c,d,f,0,0,h,p,g,0,0,v,y,S,0,0,0,0,0,1,0];this._loadMatrix(_,n)}contrast(t,n){const r=(t||0)+1,i=-.5*(r-1),o=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(o,n)}saturate(t=0,n){const r=t*2/3+1,i=(r-1)*-.5,o=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(o,n)}desaturate(){this.saturate(-1)}negative(t){const n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,t)}sepia(t){const n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,t)}technicolor(t){const n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,t)}polaroid(t){const n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,t)}toBGR(t){const n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,t)}kodachrome(t){const n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,t)}browni(t){const n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,t)}vintage(t){const n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,t)}colorTone(t,n,r,i,o){t=t||.2,n=n||.15,r=r||16770432,i=i||3375104;const s=jn.shared,[l,c,d]=s.setValue(r).toArray(),[f,h,p]=s.setValue(i).toArray(),g=[.3,.59,.11,0,0,l,c,d,t,0,f,h,p,n,0,l-f,c-h,d-p,0,0];this._loadMatrix(g,o)}night(t,n){t=t||.1;const r=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(r,n)}predator(t,n){const r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,n)}lsd(t){const n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.uniforms.m}set matrix(t){this.uniforms.m=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}J3.prototype.grayscale=J3.prototype.greyscale;var F6e=`varying vec2 vFilterCoord; +varying vec2 vTextureCoord; + +uniform vec2 scale; +uniform mat2 rotation; +uniform sampler2D uSampler; +uniform sampler2D mapSampler; + +uniform highp vec4 inputSize; +uniform vec4 inputClamp; + +void main(void) +{ + vec4 map = texture2D(mapSampler, vFilterCoord); + + map -= 0.5; + map.xy = scale * inputSize.zw * (rotation * map.xy); + + gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); +} +`,$6e=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; +uniform mat3 filterMatrix; + +varying vec2 vTextureCoord; +varying vec2 vFilterCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); + vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; +} +`;class z6e extends Vi{constructor(t,n){const r=new mr;t.renderable=!1,super($6e,F6e,{mapSampler:t._texture,filterMatrix:r,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=t,this.maskMatrix=r,n==null&&(n=20),this.scale=new Mt(n,n)}apply(t,n,r,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const o=this.maskSprite.worldTransform,s=Math.sqrt(o.a*o.a+o.b*o.b),l=Math.sqrt(o.c*o.c+o.d*o.d);s!==0&&l!==0&&(this.uniforms.rotation[0]=o.a/s,this.uniforms.rotation[1]=o.b/s,this.uniforms.rotation[2]=o.c/l,this.uniforms.rotation[3]=o.d/l),t.applyFilter(this,n,r,i)}get map(){return this.uniforms.mapSampler}set map(t){this.uniforms.mapSampler=t}}var j6e=`varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; +uniform sampler2D uSampler; +uniform highp vec4 inputSize; + + +/** + Basic FXAA implementation based on the code on geeks3d.com with the + modification that the texture2DLod stuff was removed since it's + unsupported by WebGL. + + -- + + From: + https://github.com/mitsuhiko/webgl-meincraft + + Copyright (c) 2011 by Armin Ronacher. + + Some rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FXAA_REDUCE_MIN +#define FXAA_REDUCE_MIN (1.0/ 128.0) +#endif +#ifndef FXAA_REDUCE_MUL +#define FXAA_REDUCE_MUL (1.0 / 8.0) +#endif +#ifndef FXAA_SPAN_MAX +#define FXAA_SPAN_MAX 8.0 +#endif + +//optimized version for mobile, where dependent +//texture reads can be a bottleneck +vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, + vec2 v_rgbNW, vec2 v_rgbNE, + vec2 v_rgbSW, vec2 v_rgbSE, + vec2 v_rgbM) { + vec4 color; + vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; + vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; + vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; + vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; + vec4 texColor = texture2D(tex, v_rgbM); + vec3 rgbM = texColor.xyz; + vec3 luma = vec3(0.299, 0.587, 0.114); + float lumaNW = dot(rgbNW, luma); + float lumaNE = dot(rgbNE, luma); + float lumaSW = dot(rgbSW, luma); + float lumaSE = dot(rgbSE, luma); + float lumaM = dot(rgbM, luma); + float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); + float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); + + mediump vec2 dir; + dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); + dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); + + float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * + (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); + + float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); + dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), + max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), + dir * rcpDirMin)) * inverseVP; + + vec3 rgbA = 0.5 * ( + texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + + texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); + vec3 rgbB = rgbA * 0.5 + 0.25 * ( + texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + + texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); + + float lumaB = dot(rgbB, luma); + if ((lumaB < lumaMin) || (lumaB > lumaMax)) + color = vec4(rgbA, texColor.a); + else + color = vec4(rgbB, texColor.a); + return color; +} + +void main() { + + vec4 color; + + color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); + + gl_FragColor = color; +} +`,U6e=` +attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +void texcoords(vec2 fragCoord, vec2 inverseVP, + out vec2 v_rgbNW, out vec2 v_rgbNE, + out vec2 v_rgbSW, out vec2 v_rgbSE, + out vec2 v_rgbM) { + v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; + v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; + v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; + v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; + v_rgbM = vec2(fragCoord * inverseVP); +} + +void main(void) { + + gl_Position = filterVertexPosition(); + + vFragCoord = aVertexPosition * outputFrame.zw; + + texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); +} +`;class H6e extends Vi{constructor(){super(U6e,j6e)}}var W6e=`precision highp float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform float uNoise; +uniform float uSeed; +uniform sampler2D uSampler; + +float rand(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + float randomValue = rand(gl_FragCoord.xy * uSeed); + float diff = (randomValue - 0.5) * uNoise; + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (color.a > 0.0) { + color.rgb /= color.a; + } + + color.r += diff; + color.g += diff; + color.b += diff; + + // Premultiply alpha again. + color.rgb *= color.a; + + gl_FragColor = color; +} +`;class G6e extends Vi{constructor(t=.5,n=Math.random()){super(ere,W6e,{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 N7={AlphaFilter:R6e,BlurFilter:N6e,BlurFilterPass:Q3,ColorMatrixFilter:J3,DisplacementFilter:z6e,FXAAFilter:H6e,NoiseFilter:G6e};Object.entries(N7).forEach(([e,t])=>{Object.defineProperty(N7,e,{get(){return un("7.1.0",`filters.${e} has moved to ${e}`),t}})});class V6e{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||(Yr.system.add(this.tickerUpdate,this,Rp.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Yr.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")&&(id.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,EB),!t.hitArea.contains(EB.x,EB.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 Wa)){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 Wa)){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 Wa)){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 Wa)){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 Wa)){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 Wa)){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 Gg)){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,Z3._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=K6e),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=Q6e[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 P1=Z3;P1.extension={name:"events",type:[rt.RendererSystem,rt.CanvasRendererSystem]};P1.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};bt.add(P1);function B7(e){return e==="dynamic"||e==="static"}const J6e={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??B7(P1.defaultEventMode)},set interactive(e){un("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??P1.defaultEventMode},set eventMode(e){this._internalInteractive=B7(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 Sw))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};Or.mixin(J6e);const Z6e={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Or.mixin(Z6e);const eUe=9,X_=100,tUe=0,nUe=0,F7=2,$7=1,rUe=-1e3,iUe=-1e3,oUe=2;class lre{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,(pu.tablet||pu.phone)&&this.createTouchHook();const n=document.createElement("div");n.style.width=`${X_}px`,n.style.height=`${X_}px`,n.style.position="absolute",n.style.top=`${tUe}px`,n.style.left=`${nUe}px`,n.style.zIndex=F7.toString(),this.div=n,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${$7}px`,t.style.height=`${$7}px`,t.style.position="absolute",t.style.top=`${rUe}px`,t.style.left=`${iUe}px`,t.style.zIndex=oUe.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=`${X_}px`,n.style.height=`${X_}px`,n.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",n.style.position="absolute",n.style.zIndex=F7.toString(),n.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?n.setAttribute("aria-live","off"):n.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?n.setAttribute("aria-relevant","additions"):n.setAttribute("aria-relevant","text"),n.addEventListener("click",this._onClick.bind(this)),n.addEventListener("focus",this._onFocus.bind(this)),n.addEventListener("focusout",this._onFocusOut.bind(this))),n.style.pointerEvents=t.accessiblePointerEvents,n.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?n.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(n.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&n.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(n),t._accessibleActive=!0,t._accessibleDiv=n,n.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,n){const{displayObject:r}=t.target,i=this.renderer.events.rootBoundary,o=Object.assign(new Sw(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===eUe&&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}}lre.extension={name:"accessibility",type:[rt.RendererPlugin,rt.CanvasRendererPlugin]};bt.add(lre);const e5=class{constructor(e){this.stage=new Jo,e=Object.assign({forceCanvas:!1},e),this.renderer=zje(e),e5._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=e5._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 Hj=e5;Hj._plugins=[];bt.handleByList(rt.Application,Hj._plugins);class cre{static init(t){Object.defineProperty(this,"resizeTo",{set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let n,r;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:o}=this._resizeTo;n=i,r=o}this.renderer.resize(n,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}cre.extension=rt.Application;bt.add(cre);const z7={loader:rt.LoadParser,resolver:rt.ResolveParser,cache:rt.CacheParser,detection:rt.DetectionParser};bt.handle(rt.Asset,e=>{const t=e.ref;Object.entries(z7).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(z7).filter(n=>!!t[n]).forEach(n=>bt.remove(t[n]))});class sUe{constructor(t,n=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=n}add(t){t.forEach(n=>{this._assetList.push(n)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],n=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r(Array.isArray(e)||(e=[e]),t?e.map(n=>typeof n=="string"?t(n):n):e),t5=(e,t)=>{const n=t.split("?")[1];return n&&(e+=`?${n}`),e};function ure(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)}),ure(e,i,0,n,r)}else r.push(e);return r}const kC=e=>!Array.isArray(e);class lUe{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&&qt.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 Ab=new lUe;class cUe{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=io.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=io.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 oc=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(oc||{});const uUe=".json",dUe="application/json",fUe={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadJson",test(e){return Ew(e,dUe)||qp(e,uUe)},async load(e){return await(await tt.ADAPTER.fetch(e)).json()}};bt.add(fUe);const hUe=".txt",pUe="text/plain",mUe={name:"loadTxt",extension:{type:rt.LoadParser,priority:oc.Low},test(e){return Ew(e,pUe)||qp(e,hUe)},async load(e){return await(await tt.ADAPTER.fetch(e)).text()}};bt.add(mUe);const gUe=["normal","bold","100","200","300","400","500","600","700","800","900"],vUe=[".ttf",".otf",".woff",".woff2"],yUe=["font/ttf","font/otf","font/woff","font/woff2"],bUe=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function xUe(e){const t=io.extname(e),i=io.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(bUe)){o=!1;break}let s=i.join(" ");return o||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const wUe={extension:{type:rt.LoadParser,priority:oc.Low},name:"loadWebFont",test(e){return Ew(e,yUe)||qp(e,vUe)},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)??xUe(e),c=((o=(i=t.data)==null?void 0:i.weights)==null?void 0:o.filter(f=>gUe.includes(f)))??["normal"],d=t.data??{};for(let f=0;ftt.ADAPTER.getFontFaceSet().delete(t))}};bt.add(wUe);let j7=0,CB;const _Ue="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",SUe={id:"checkImageBitmap",code:` + async function checkImageBitmap() + { + try + { + if (typeof createImageBitmap !== 'function') return false; + + const response = await fetch('${_Ue}'); + const imageBlob = await response.blob(); + const imageBitmap = await createImageBitmap(imageBlob); + + return imageBitmap.width === 1 && imageBitmap.height === 1; + } + catch (e) + { + return false; + } + } + checkImageBitmap().then((result) => { self.postMessage(result); }); + `},EUe={id:"loadImageBitmap",code:` + async function loadImageBitmap(url) + { + const response = await fetch(url); + + if (!response.ok) + { + throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \` + + \`\${response.status} \${response.statusText}\`); + } + + const imageBlob = await response.blob(); + const imageBitmap = await createImageBitmap(imageBlob); + + return imageBitmap; + } + self.onmessage = async (event) => + { + try + { + const imageBitmap = await loadImageBitmap(event.data.data[0]); + + self.postMessage({ + data: imageBitmap, + uuid: event.data.uuid, + id: event.data.id, + }, [imageBitmap]); + } + catch(e) + { + self.postMessage({ + error: e, + uuid: event.data.uuid, + id: event.data.id, + }); + } + };`};let TB;class CUe{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const n=URL.createObjectURL(new Blob([SUe.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(){CB===void 0&&(CB=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[j7]={resolve:n.resolve,reject:n.reject},t.postMessage({data:n.arguments,uuid:j7++,id:r})}}const U7=new CUe;function ek(e,t,n){const r=new ht(e);return r.baseTexture.on("dispose",()=>{delete t.promiseCache[n]}),r}const TUe=[".jpeg",".jpg",".png",".webp",".avif"],AUe=["image/jpeg","image/png","image/webp","image/avif"];async function kUe(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 tk={name:"loadTextures",extension:{type:rt.LoadParser,priority:oc.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return Ew(e,AUe)||qp(e,TUe)},async load(e,t,n){let r=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await U7.isImageBitmapSupported()?r=await U7.loadImageBitmap(e):r=await kUe(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 qt(r,{resolution:jd(e),...t.data});return i.resource.src=e,ek(i,n,e)},unload(e){e.destroy(!0)}};bt.add(tk);const IUe=".svg",RUe="image/svg+xml",PUe={extension:{type:rt.LoadParser,priority:oc.High},name:"loadSVG",test(e){return Ew(e,RUe)||qp(e,IUe)},async testParse(e){return R1.test(e)},async parse(e,t,n){var s;const r=new R1(e,(s=t==null?void 0:t.data)==null?void 0:s.resourceOptions);await r.load();const i=new qt(r,{resolution:jd(e),...t==null?void 0:t.data});return i.resource.src=e,ek(i,n,e)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload:tk.unload};bt.add(PUe);class OUe{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=aUe(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=kC(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=kC(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=io.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 MUe{constructor(){this._detections=[],this._initialized=!1,this.resolver=new OUe,this.loader=new cUe,this.cache=Ab,this._backgroundLoader=new sUe(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=kC(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 Ab.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,Ab.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=>{Ab.remove(r.src)}),await this.loader.unload(n)}get detections(){return this._detections}get preferWorkers(){return tk.config.preferWorkers}set preferWorkers(t){un("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(n=>{n.config&&Object.keys(n.config).filter(r=>r in t).forEach(r=>{n.config[r]=t[r]})})}}const Y_=new MUe;bt.handleByList(rt.LoadParser,Y_.loader.parsers).handleByList(rt.ResolveParser,Y_.resolver.parsers).handleByList(rt.CacheParser,Y_.cache.parsers).handleByList(rt.DetectionParser,Y_.detections);const DUe={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(DUe);const LUe={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(LUe);const NUe={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(NUe);const H7=["png","jpg","jpeg"],BUe={extension:{type:rt.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...H7],remove:async e=>e.filter(t=>!H7.includes(t))};bt.add(BUe);const FUe={extension:rt.ResolveParser,test:tk.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(FUe);var _s=(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))(_s||{});const IC={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 ru,bm;function W7(){bm={s3tc:ru.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ru.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:ru.getExtension("WEBGL_compressed_texture_etc"),etc1:ru.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:ru.getExtension("WEBGL_compressed_texture_pvrtc")||ru.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:ru.getExtension("WEBGL_compressed_texture_atc"),astc:ru.getExtension("WEBGL_compressed_texture_astc")}}const $Ue={extension:{type:rt.DetectionParser,priority:2},test:async()=>{const t=tt.ADAPTER.createCanvas().getContext("webgl");return t?(ru=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{bm||W7();const t=[];for(const n in bm)bm[n]&&t.push(n);return[...t,...e]},remove:async e=>(bm||W7(),e.filter(t=>!(t in bm)))};bt.add($Ue);class zUe extends _w{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 j3(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 j3(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class up extends zUe{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=up._formatToExtension(this.format),(n.levelBuffers||this.buffer)&&(this._levelBuffers=n.levelBuffers||up._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*IC[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*IC[n];return c}}const AB=4,K_=124,jUe=32,G7=20,UUe=542327876,Q_={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},HUe={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},J_={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},WUe=1,GUe=2,VUe=4,qUe=64,XUe=512,YUe=131072,KUe=827611204,QUe=861165636,JUe=894720068,ZUe=808540228,e8e=4,t8e={[KUe]:_s.COMPRESSED_RGBA_S3TC_DXT1_EXT,[QUe]:_s.COMPRESSED_RGBA_S3TC_DXT3_EXT,[JUe]:_s.COMPRESSED_RGBA_S3TC_DXT5_EXT},n8e={70:_s.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:_s.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:_s.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:_s.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:_s.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:_s.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:_s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:_s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:_s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function r8e(e){const t=new Uint32Array(e);if(t[0]!==UUe)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(e,0,K_/Uint32Array.BYTES_PER_ELEMENT),i=r[Q_.HEIGHT],o=r[Q_.WIDTH],s=r[Q_.MIPMAP_COUNT],l=new Uint32Array(e,Q_.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,jUe/Uint32Array.BYTES_PER_ELEMENT),c=l[WUe];if(c&VUe){const d=l[HUe.FOURCC];if(d!==ZUe){const x=t8e[d],E=AB+K_,k=new Uint8Array(e,E);return[new up(k,{format:x,width:o,height:i,levels:s})]}const f=AB+K_,h=new Uint32Array(t.buffer,f,G7/Uint32Array.BYTES_PER_ELEMENT),p=h[J_.DXGI_FORMAT],g=h[J_.RESOURCE_DIMENSION],v=h[J_.MISC_FLAG],y=h[J_.ARRAY_SIZE],S=n8e[p];if(S===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===e8e)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=AB+K_+G7;if(y===1)_.push(new Uint8Array(e,b));else{const x=IC[S];let E=0,k=o,I=i;for(let O=0;O>>1,I=I>>>1}let A=b;for(let O=0;Onew up(x,{format:S,width:o,height:i,levels:s}))}throw c&qUe?new Error("DDSParser does not support uncompressed texture data."):c&XUe?new Error("DDSParser does not supported YUV uncompressed texture data."):c&YUe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):c&GUe?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 V7=[171,75,84,88,32,49,49,187,13,10,26,10],i8e=67305985,ja={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},n5=64,q7={[Pt.UNSIGNED_BYTE]:1,[Pt.UNSIGNED_SHORT]:2,[Pt.INT]:4,[Pt.UNSIGNED_INT]:4,[Pt.FLOAT]:4,[Pt.HALF_FLOAT]:8},o8e={[Ge.RGBA]:4,[Ge.RGB]:3,[Ge.RG]:2,[Ge.RED]:1,[Ge.LUMINANCE]:1,[Ge.LUMINANCE_ALPHA]:2,[Ge.ALPHA]:1},s8e={[Pt.UNSIGNED_SHORT_4_4_4_4]:2,[Pt.UNSIGNED_SHORT_5_5_5_1]:2,[Pt.UNSIGNED_SHORT_5_6_5]:2};function a8e(e,t,n=!1){const r=new DataView(t);if(!l8e(e,r))return null;const i=r.getUint32(ja.ENDIANNESS,!0)===i8e,o=r.getUint32(ja.GL_TYPE,i),s=r.getUint32(ja.GL_FORMAT,i),l=r.getUint32(ja.GL_INTERNAL_FORMAT,i),c=r.getUint32(ja.PIXEL_WIDTH,i),d=r.getUint32(ja.PIXEL_HEIGHT,i)||1,f=r.getUint32(ja.PIXEL_DEPTH,i)||1,h=r.getUint32(ja.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=r.getUint32(ja.NUMBER_OF_FACES,i),g=r.getUint32(ja.NUMBER_OF_MIPMAP_LEVELS,i),v=r.getUint32(ja.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 k;if(o!==0?q7[o]?k=q7[o]*o8e[s]:k=s8e[o]:k=IC[l],k===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const I=n?u8e(r,v,i):null;let O=E*k,L=c,N=d,H=_,W=b,z=n5+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+=$+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*k}return o!==0?{uncompressed:x.map(D=>{let $=D[0].levelBuffer,j=!1;return o===Pt.FLOAT?$=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):o===Pt.UNSIGNED_INT?(j=!0,$=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):o===Pt.INT&&(j=!0,$=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new _w($,{width:D[0].levelWidth,height:D[0].levelHeight}),type:o,format:j?c8e(s):s}}),kvData:I}:{compressed:x.map(D=>new up(null,{format:l,width:c,height:d,levels:g,levelBuffers:D})),kvData:I}}function l8e(e,t){for(let n=0;nt-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c{const c=new qt(l,{mipmap:Zl.OFF,alphaMode:xl.NO_PREMULTIPLIED_ALPHA,resolution:jd(e),...t.data});return ek(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(d8e);const f8e={extension:{type:rt.LoadParser,priority:oc.High},name:"loadKTX",test(e){return qp(e,".ktx")},async load(e,t,n){const i=await(await tt.ADAPTER.fetch(e)).arrayBuffer(),{compressed:o,uncompressed:s,kvData:l}=a8e(e,i),c=o??s,d={mipmap:Zl.OFF,alphaMode:xl.NO_PREMULTIPLIED_ALPHA,resolution:jd(e),...t.data},f=c.map(h=>{c===s&&Object.assign(d,{type:h.type,format:h.format});const p=new qt(h,d);return p.ktxKeyValueData=l,ek(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(f8e);const h8e={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(h8e);const p8e=new Qt,m8e=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 Rze(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 Gp?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=p8e,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(m8e*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){X7(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)}},v8e={build(e){RC.build(e)},triangulate(e,t){RC.triangulate(e,t)}};var Xa=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Xa||{}),Jh=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Jh||{});const Vg={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 Y7{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,k=_*p+b*f,I=_*h+b*d,A=f*(b+x),O=d*(b+x),L=p*(_+E),N=h*(_+E),H=Math.atan2(O-I,A-k),W=Math.atan2(N-I,L-k);return{cx:k+t,cy:I+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=Vg._segmentsCount(Math.abs(f)*o,Math.ceil(Math.abs(f)/CC)*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,k=Math.cos(E),I=-Math.sin(E);d.push((v*k+y*I)*o+r,(v*-I+y*k)*o+i)}}}class y8e{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 Wj{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,k=t,I=n;for(let A=1;A<=10;++A)h=A/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=k-_,E=I-b,k=_,I=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=Vg._segmentsCount(Wj.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 K7(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 Ah(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===Xa.ROUND?p+=Ah(x,E,x-A*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=(-A+_)*(-O+E)-(-A+x)*(-O+b),Q=(-L+k)*(-N+E)-(-L+x)*(-N+I),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===Xa.MITER&&he/y>S&&(at=Xa.BEVEL),qe)switch(at){case Xa.MITER:{f.push(pe,ve,ye,xe);break}case Xa.BEVEL:{ue?f.push(pe,ve,x+A*D,E+O*D,pe,ve,x+L*D,E+N*D):f.push(x-A*z,E-O*z,ye,xe,x-L*z,E-N*z,ye,xe),p+=2;break}case Xa.ROUND:{ue?(f.push(pe,ve,x+A*D,E+O*D),p+=Ah(x,E,x+A*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-A*z,E-O*z,ye,xe),p+=Ah(x,E,x-A*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-A*z,E-O*z,x+A*D,E+O*D),at){case Xa.MITER:{ue?f.push(ye,xe,ye,xe):f.push(pe,ve,pe,ve),p+=2;break}case Xa.ROUND:{ue?p+=Ah(x,E,x+A*D,E+O*D,x+L*D,E+N*D,f,!0)+2:p+=Ah(x,E,x-A*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],A=-(b-E),O=_-x,H=Math.sqrt(A*A+O*O),A/=H,O/=H,A*=v,O*=v,f.push(x-A*z,E-O*z,x+A*D,E+O*D),c||(o.cap===Jh.ROUND?p+=Ah(x-A*(z-D)*.5,E-O*(z-D)*.5,x-A*z,E-O*z,x+A*D,E+O*D,f,!1)+2:o.cap===Jh.SQUARE&&(p+=K7(x,E,A,O,z,D,!1,f)));const $=t.indices,j=Vg.epsilon*Vg.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 PC(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 PC(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=Z_.pop(),r||(r=new H3,r.texArray=new G3),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)}qt._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 dg,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new dg,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),Gj.curveTo(e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,o){return this._initCurve(),Wj.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=Y7.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+=CC:o&&r<=i&&(r+=CC),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 Qt(e,t,n,r))}drawRoundedRect(e,t,n,r,i){return this.drawShape(new zj(e,t,n,r,i))}drawCircle(e,t,n){return this.drawShape(new Fj(e,t,n))}drawEllipse(e,t,n,r){return this.drawShape(new $j(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 dg(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===Hi.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=vne(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=jn.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}}gre.extension={name:"particle",type:rt.RendererPlugin};bt.add(gre);var rk=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(rk||{});const eS={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",eS);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",eS);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+=A}}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]})();Ui.experimentalLetterSpacing=!1;Ui._fonts={};Ui._newlines=[10,13];Ui._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const A8e=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Yb=class{constructor(e){this.styleID=0,this.reset(),OB(this,e,e)}clone(){const e={};return OB(e,this,Yb.defaultStyle),new Yb(e)}reset(){OB(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=PB(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=PB(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){k8e(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=PB(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)&&!A8e.includes(r)&&(r=`"${r}"`),t[n]=r}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let ku=Yb;ku.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:rk.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 PB(e){const t=jn.shared;return Array.isArray(e)?e.map(n=>t.setValue(n).toHex()):t.setValue(e).toHex()}function k8e(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 P8e(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(N8e),this.registerFindHook(B8e),this.registerFindHook(P8e),this.registerFindHook(O8e),this.registerFindHook(M8e),this.registerUploadHook(D8e),this.registerUploadHook(L8e)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,Yr.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&&Yr.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 OC=vre;OC.uploadsPerFrame=4;Object.defineProperties(tt,{UPLOADS_PER_FRAME:{get(){return OC.uploadsPerFrame},set(e){un("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),OC.uploadsPerFrame=e}}});function yre(e,t){return t instanceof qt?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function F8e(e,t){if(!(t instanceof qg))return!1;const{geometry:n}=t;t.finishPoly(),n.updateBatches();const{batches:r}=n;for(let i=0;i1?Xl.from(j8e,z8e,n):Xl.from(nV,U8e,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;tS.set(f.a*v/S,f.b*v/_,f.c*y/S,f.d*y/_,f.tx/S,f.ty/_),tS.invert(),p?tS.prepend(h.mapCoord):(g.uniforms.uMapCoord=h.mapCoord.toArray(!0),g.uniforms.uClampFrame=h.uClampFrame,g.uniforms.uClampOffset=h.uClampOffset),g.uniforms.uTransform=tS.toArray(!0),g.uniforms.uColor=jn.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=vne(t.blendMode,d),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}xre.extension={name:"tilingSprite",type:rt.RendererPlugin};bt.add(xre);const Kb=class{constructor(e,t,n=null){this.linkedSheets=[],this._texture=e instanceof ht?e:null,this.baseTexture=e instanceof qt?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=jd(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=io.dirname(e[0]);t.linkedSheets.forEach((o,s)=>{const l=wre([`${i}/${t.data.meta.related_multi_packs[s]}`],o,!0);Object.assign(r,l)})}return r}const G8e={extension:rt.Asset,cache:{test:e=>e instanceof o5,getCacheableAssets:(e,t)=>wre(e,t,!1)},resolver:{test:e=>{const n=e.split("?")[0].split("."),r=n.pop(),i=n.pop();return r==="json"&&W8e.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:oc.Normal},async testParse(e,t){return io.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,n){var d,f;let r=io.dirname(t.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let i=r+e.meta.image;i=t5(i,t.src);const s=(await n.load([i]))[i],l=new o5(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=t5(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(G8e);class MC{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class KS{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 MC;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 s5{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 MC,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")?s5.test(tt.ADAPTER.parseXML(t)):!1}static parse(t){return s5.parse(tt.ADAPTER.parseXML(t))}}const MB=[KS,s5,a5];function V8e(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: '${I}')`);--k,y=null,S=null,_=null,v=0,g=0,b=0;continue}if(b=Math.max(L+A.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: '${I}')`);--k,v+=b*o,v=Math.ceil(v),g=0,b=0;continue}X8e(y,S,A,g,v,o,f);const H=QS(A.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 k=0,I=d.length;k 0.99) {\r + alpha = 1.0;\r + }\r +\r + // Gamma correction for coverage-like alpha\r + float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r + float gamma = mix(1.0, 1.0 / 2.2, luma);\r + float coverage = pow(uColor.a * alpha, gamma); \r +\r + // NPM Textures, NPM outputs\r + gl_FragColor = vec4(uColor.rgb, coverage);\r +}\r +`,Q8e=`// Mesh material default fragment\r +attribute vec2 aVertexPosition;\r +attribute vec2 aTextureCoord;\r +\r +uniform mat3 projectionMatrix;\r +uniform mat3 translationMatrix;\r +uniform mat3 uTextureMatrix;\r +\r +varying vec2 vTextureCoord;\r +\r +void main(void)\r +{\r + gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r +\r + vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r +}\r +`;const rV=[],iV=[],oV=[],Sre=class extends Jo{constructor(e,t={}){super();const{align:n,tint:r,maxWidth:i,letterSpacing:o,fontName:s,fontSize:l}=Object.assign({},Sre.styleDefaults,t);if(!Fo.available[s])throw new Error(`Missing BitmapFont "${s}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new jn(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 pd(()=>{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=Fo.available[this._fontName],t=this.fontSize,n=t/e.size,r=new Mt,i=[],o=[],s=[],l=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",c=_re(l),d=this._maxWidth*e.size/t,f=e.distanceFieldType==="none"?rV:iV;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&&(++_,ug(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 k=[];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]),k.push(W)}const I=i.length,A={},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 J8e=Sre;J8e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const Z8e=[".xml",".fnt"],eHe={extension:{type:rt.LoadParser,priority:oc.Normal},name:"loadBitmapFont",test(e){return Z8e.includes(io.extname(e).toLowerCase())},async testParse(e){return KS.test(e)||a5.test(e)},async parse(e,t,n){const r=KS.test(e)?KS.parse(e):a5.parse(e),{src:i}=t,{page:o}=r,s=[];for(let d=0;dl[d]);return Fo.install(r,c,!0)},async load(e,t){return(await tt.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};bt.add(eHe);const xm=class extends ku{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new xm(Object.keys(xm.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 xm.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=xm;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:io.basename(e,io.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=Tze(e)),typeof e=="number"?Cze(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,xm.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 Ix=xm;Ix.availableFonts={};Ix.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 wm=class extends Vp{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 Qt,r.trim=new Qt,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=wm.defaultMaxWidth,this.maxHeight=wm.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=wm.defaultAutoResolution,this._resolution=wm.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({},wm.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=hd(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=hd(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 Ix?(this.ownsStyle=!1,this._style=e):e instanceof ku?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Ix.from(e)):(this.ownsStyle=!0,this._style=new Ix(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 ik=wm;ik.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};ik.defaultMaxWidth=2024;ik.defaultMaxHeight=2024;ik.defaultAutoResolution=!0;function tHe(e,t){return{constructor:e,meta:t}}function nHe(e,t,n,r,i){Ere(e,t,n||0,r||e.length-1,i||rHe)}function Ere(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));Ere(e,t,f,h,i)}var p=e[t],g=n,v=r;for(kb(e,n,t),i(e[r],p)>0&&kb(e,n,r);g0;)v--}i(e[n],p)===0?kb(e,n,v):(v++,kb(e,v,r)),v<=t&&(n=v+1),t<=v&&(r=v-1)}}function kb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function rHe(e,t){return et?1:0}class iHe{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data;const r=[];if(!rS(t,n))return r;const i=this.toBBox,o=[];for(;n;){for(let s=0;s=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(i,o,n)}_split(t,n){const r=t[n],i=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,i);const s=this._chooseSplitIndex(r,o,i),l=_m(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,sm(r,this.toBBox),sm(l,this.toBBox),n?t[n-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,n){this.data=_m([t,n]),this.data.height=t.height+1,this.data.leaf=!1,sm(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=cHe(c,d),h=DB(c)+DB(d);f=n;d--){const f=t.children[d];Jb(l,t.leaf?o(f):f),c+=nS(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():sm(t[n],this.toBBox)}}function oHe(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r=e.minX&&t.maxY>=e.minY}function _m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function sV(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;nHe(e,s,t,n,i),o.push(t,s,s,n)}}class uHe extends iHe{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 aV={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/30,animationDuration:150,debounceInterval:75,backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:5e3,increment:.25,maxScale:2,minScale:1,dtMax:1.5,dtMin:1.1}};var Cre={},DC=Bt&&Bt.__assign||function(){return DC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?1:-1}),NB}var _He=xHe()?Math.sign:wHe(),SHe=_He,EHe=Math.abs,CHe=Math.floor,THe=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:SHe(e)*CHe(EHe(e)))},AHe=THe,kHe=Math.max,IHe=function(e){return kHe(0,AHe(e))},Tre=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},RHe=gv,Are=function(e){if(!RHe(e))throw new TypeError("Cannot use null or undefined");return e},PHe={exports:{}},OHe=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")},BB,cV;function MHe(){return cV||(cV=1,BB=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),BB}var FB,uV;function DHe(){if(uV)return FB;uV=1;var e=gv,t=Object.keys;return FB=function(n){return t(e(n)?Object(n):n)},FB}var $B,dV;function LHe(){return dV||(dV=1,$B=MHe()()?Object.keys:DHe()),$B}var zB,fV;function NHe(){if(fV)return zB;fV=1;var e=LHe(),t=Are,n=Math.max;return zB=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},UB}var eWe=JHe()?String.prototype.contains:ZHe(),JS=Pre,pV=QHe,Ore=kre,Mre=bHe,Rx=eWe,tWe=Rre.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],JS(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?Ore(Mre(o),s):s};tWe.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],JS(t)?pV(t)?JS(n)?pV(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,JS(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?Ore(Mre(o),s):s};var Cw=Rre.exports,l5={exports:{}};(function(e,t){var n=Cw,r=Tre,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,k;return r(x),k=this,h.call(this,b,E=function(){g.call(k,b,E),i.call(x,this,arguments)}),E.__eeOnceListener__=x,this},g=function(b,x){var E,k,I,A;if(r(x),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[b])return this;if(k=E[b],typeof k=="object")for(A=0;I=k[A];++A)(I===x||I.__eeOnceListener__===x)&&(k.length===2?E[b]=k[A?0:1]:k.splice(A,1));else(k===x||k.__eeOnceListener__===x)&&delete E[b];return this},v=function(b){var x,E,k,I,A;if(d.call(this,"__ee__")&&(I=this.__ee__[b],!!I))if(typeof I=="object"){for(E=arguments.length,A=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),Tt(n<1?255*((t-e)*n+e):n<3?255*t:n<4?255*((t-e)*(4-n)+e):255*e)},zi=function(e,t,n){t/=100;var r=(n/=100)<=.5?n*(t+1):n+t-n*t,i=2*n-r;return{r:sF(i,r,(e/=60)+2),g:sF(i,r,e),b:sF(i,r,e-2)}},Xj=function(e,t,n,r){return{r:Tt(255*(1-e)*(r=1-r)),g:Tt(255*(1-t)*r),b:Tt(255*(1-n)*r)}},$re=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:Tt(100*(i&&(i-e)/i)),m:Tt(100*o),y:Tt(100*s),k:Tt(100*r)}},Xg=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=Tt(60*l))<0&&(l+=360),c=s/(1-Math.abs(2*d-1))}return{h:l,s:Tt(100*c),l:Tt(100*d),a:r}},OV=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},To=function(e){return typeof e=="string"&&(e=vv.test(e)?sk(e)/100:+e),isNaN(+e)||e>1?1:Tt(e)},yv=function(e,t,n){return t.reduce(function(r,i){return c5(c5([],r,!0),[an(an({},e),{h:n===$o.ADDITIVE?O1(e.h+i):O1(OV(OV(e.h,!1)+i,!0))})],!1)},[an({},e)])},TWe=function(e,t){return yv(e,[30,-30],t)},AWe=function(e,t){return yv(e,[180],t)},kWe=function(e,t){return yv(e,[150,-150],t)},IWe=function(e,t){return yv(e,[120,-120],t)},RWe=function(e,t){return yv(e,[60,-120,180],t)},PWe=function(e,t){return yv(e,[90,-90,180],t)},Qs=function(e){return typeof e=="string"?function(t){var n;if(Object.keys(Xt).some(function(r){if(Zb[r].test(t))return n=r,!0}),!n&&~Bre.indexOf(t)&&(n=Xt.HEX),!n)throw new Error(EWe);return n}(e):function(t){var n,r=!1,i=Fre(Object.keys(t));if(u5[i]&&(n=u5[i]),n&&n===Xt.RGB){var o=Object.entries(t).some(function(l){return!d5.test("".concat(l[1]))}),s=Object.entries(t).some(function(l){return!(vv.test("".concat(l[1]))||!d5.test("".concat(l[1]))&&!isNaN(+l[1])&&+l[1]<=255)});o&&s&&(r=!0),o||(n=Xt.HEX)}if(!n||r)throw new Error(CWe);return n}(e)},OWe=((Pb={})[Xt.HEX]=function(e){var t=(~Bre.indexOf(e)?LC[e]:e).match(Zb.HEX),n={r:iS(t[1]||t[5]),g:iS(t[2]||t[6]),b:iS(t[3]||t[7])},r=t[4]||t[8];return r!==void 0&&(n.a=iS(r)/255),n},Pb[Xt.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=To(o)),s},Pb[Xt.HSL]=function(e){var t=e.match(Zb.HSL),n=O1(t[1]||t[5]),r=NC(t[2]||t[6]),i=NC(t[3]||t[7]),o=t[4]||t[8],s=zi(n,r,i);return o!==void 0&&(s.a=To(o)),s},Pb[Xt.CMYK]=function(e){var t=e.match(Zb.CMYK),n=md(t[1]||t[6]),r=md(t[2]||t[7]),i=md(t[3]||t[8]),o=md(t[4]||t[9]),s=t[5]||t[10],l=Xj(n,r,i,o);return s!==void 0&&(l.a=To(s)),l},Pb),MWe=((Ob={})[Xt.HEX]=function(e){var t={r:Zh("".concat(e.r)),g:Zh("".concat(e.g)),b:Zh("".concat(e.b))};return no(e,"a")&&(t.a=Math.min(Zh("".concat(e.a),!0),1)),t},Ob[Xt.RGB]=function(e){return this.HEX(e)},Ob[Xt.HSL]=function(e){var t=NC("".concat(e.s)),n=NC("".concat(e.l)),r=zi(O1(e.h),t,n);return no(e,"a")&&(r.a=To(e.a)),r},Ob[Xt.CMYK]=function(e){var t=md("".concat(e.c)),n=md("".concat(e.m)),r=md("".concat(e.y)),i=md("".concat(e.k)),o=Xj(t,n,r,i);return no(e,"a")&&(o.a=To(e.a)),o},Ob),Pp=function(e,t){return t===void 0&&(t=Qs(e)),typeof e=="string"?OWe[t](e):MWe[t](e)},on=((nu={})[Xt.HEX]=function(e){return{r:oS(e.r),g:oS(e.g),b:oS(e.b)}},nu.HEXA=function(e){var t=on.HEX(e);return t.a=no(e,"a")?oS(255*e.a):"0xFF",t},nu[Xt.RGB]=function(e,t){return no(e,"a")&&delete e.a,dp(e,t)},nu.RGBA=function(e,t){return e.a=no(e,"a")?Tt(e.a):1,dp(e,t)},nu[Xt.HSL]=function(e,t){var n=Xg(e.r,e.g,e.b);return delete n.a,Xm(n,t)},nu.HSLA=function(e,t){var n=on.HSL(e,t);return n.a=no(e,"a")?Tt(e.a,t):1,n},nu[Xt.CMYK]=function(e,t){return DWe($re(e.r,e.g,e.b),t)},nu.CMYKA=function(e,t){var n=on.CMYK(e,t);return n.a=no(e,"a")?Tt(e.a,t):1,n},nu),MV=function(e,t,n,r){var i=Qs(e),o=typeof e=="string",s=Pp(e,i),l=typeof e=="string"&&no(s,"a")||typeof e!="string"&&no(e,"a"),c=Xg(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 an(an({},c),{l:c.l+d*(p+1)*(1-2*+n)})});switch(i){case Xt.HEX:default:return f.map(function(h){var p=zi(h.h,h.s,h.l);return l&&(p.a=h.a),o?l?nn.HEX(dp(an(an({},p),{a:Tt(255*p.a)}),r)):nn.HEX(dp(p,r)):l?on.HEXA(p):on.HEX(p)});case Xt.RGB:return f.map(function(h){var p=zi(h.h,h.s,h.l);return l&&(p.a=h.a),o?nn.RGB(dp(p,r)):l?on.RGBA(p,r):on.RGB(p,r)});case Xt.HSL:return f.map(function(h){return o?nn.HSL(Xm(h,r)):l?on.HSLA(an(an({},zi(h.h,h.s,h.l)),{a:h.a}),r):on.HSL(zi(h.h,h.s,h.l),r)})}},am=((kh={buildHarmony:function(e,t,n,r){var i=Qs(e),o=Pp(e,i),s=Xg(o.r,o.g,o.b,o.a),l=typeof e=="string"&&no(o,"a")||typeof e!="string"&&no(e,"a"),c=typeof e=="string";switch(i){case Xt.HEX:default:return l?this.HEXA(Xm(s,0),t,n,c):this.HEX(Xm(s,0),t,n,c);case Xt.HSL:return l?this.HSLA(s,t,n,c,r):this.HSL(s,t,n,c,r);case Xt.RGB:return l?this.RGBA(s,t,n,c,r):this.RGB(s,t,n,c,r)}}})[Xt.HEX]=function(e,t,n,r){return t(e,n).map(function(i){return r?nn.HEX(zi(i.h,i.s,i.l)):on.HEX(zi(i.h,i.s,i.l))})},kh.HEXA=function(e,t,n,r){return t(e,n).map(function(i){return r?nn.HEX(an(an({},zi(i.h,i.s,i.l)),{a:255*To(i.a)})):on.HEXA(an(an({},zi(i.h,i.s,i.l)),{a:To(i.a)}))})},kh[Xt.RGB]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?nn.RGB(dp(zi(o.h,o.s,o.l),i)):on.RGB(zi(o.h,o.s,o.l),i)})},kh.RGBA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?nn.RGB(dp(an(an({},zi(o.h,o.s,o.l)),{a:To(o.a)}),i)):on.RGBA(an(an({},zi(o.h,o.s,o.l)),{a:To(o.a)}),i)})},kh[Xt.HSL]=function(e,t,n,r,i){return t(e,n).map(function(o){return r?nn.HSL(Xm({h:o.h,s:o.s,l:o.l},i)):on.HSL(zi(o.h,o.s,o.l),i)})},kh.HSLA=function(e,t,n,r,i){return t(e,n).map(function(o){return r?nn.HSL(Xm(an(an({},o),{a:To(o.a)}),i)):on.HSLA(an(an({},zi(o.h,o.s,o.l)),{a:To(o.a)}),i)})},kh),lm=((Ih={mix:function(e,t){var n,r,i,o,s,l,c,d,f,h,p,g,v,y,S,_=e.map(function(k){var I=Qs(k);return Pp(k,I)}),b=t===$o.SUBTRACTIVE?_.map(function(k){var I,A,O,L,N,H,W,z,D,$,j,V,G,K,Y=(I=k.r,A=k.g,O=k.b,L=Math.min(I,A,O),N=Math.min(255-I,255-A,255-O),H=I-L,W=A-L,z=O-L,D=Math.min(H,W),$=H-D,j=(W+D)/2,V=(z+W-D)/2,G=Math.max($,j,V)/Math.max(H,W,z),K=isNaN(G)||G===1/0||G<=0?1:G,{r:$/K+N,y:j/K+N,b:V/K+N});return no(k,"a")&&(Y.a=k.a),Y}):null;function x(k){var I=t===$o.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return k.reduce(function(A,O){var L=no(O,"a")?O.a:1,N={r:Math.min(A.r+O.r*L,255),b:Math.min(A.b+O.b*L,255),a:1-(1-L)*(1-A.a)},H="g"in A?A.g:A.y,W="g"in O?O.g:O.y;return an(an({},N),t===$o.ADDITIVE?{g:Math.min(H+W*L,255)}:{y:Math.min(H+W*L,255)})},I)}if(t===$o.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:Tt(n.r),g:Tt(n.g),b:Tt(n.b),a:Ga(n.a,0,1)}}})[Xt.HEX]=function(e,t,n){var r=this.mix(e,t);return delete r.a,n?nn.HEX(r):on.HEX(r)},Ih.HEXA=function(e,t,n){var r=this.mix(e,t);return r.a=n?255*To(r.a):To(r.a),n?nn.HEX(r):on.HEXA(r)},Ih[Xt.RGB]=function(e,t,n,r){var i=this.mix(e,t);return delete i.a,n?nn.RGB(i):on.RGB(i,r)},Ih.RGBA=function(e,t,n,r){var i=this.mix(e,t);return n?nn.RGB(i):on.RGBA(i,r)},Ih[Xt.HSL]=function(e,t,n,r){var i=this.mix(e,t),o=Xg(i.r,i.g,i.b);return delete i.a,delete o.a,n?nn.HSL(o):on.HSL(i,r)},Ih.HSLA=function(e,t,n,r){var i=this.mix(e,t),o=Xg(i.r,i.g,i.b,i.a);return n?nn.HSL(o):on.HSLA(i,r)},Ih),dp=function(e,t){return an({r:Tt(e.r,t),g:Tt(e.g,t),b:Tt(e.b,t)},no(e,"a")?{a:Tt(e.a,t)}:{})},Xm=function(e,t){return an({h:Tt(e.h,t),s:Tt(e.s,t),l:Tt(e.l,t)},no(e,"a")?{a:Tt(e.a,t)}:{})},DWe=function(e,t){return{c:Tt(e.c,t),m:Tt(e.m,t),y:Tt(e.y,t),k:Tt(e.k,t)}},Wu=function(e,t,n,r,i,o){var s=i(Pp(e,t),r);return n?o(s):s},cm=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=To(c.a),S=(To(d.a)-y)/h;return Array(f).fill(null).map(function(_,b){return b===0?c:b===h?d:{r:Tt(c.r+p*b),g:Tt(c.g+g*b),b:Tt(c.b+v*b),a:Tt(y+S*b)}})}(Pp(e),Pp(t),n);return l.map(function(c){var d=o(c,i);return r?s(d):d})},LWe=function(){function e(t,n){n===void 0&&(n=6),this.rgb=Pp(t),this._decimals=n,this.updateHSL(),this.updateCMYK()}return e.prototype.updateRGB=function(){this.rgb=an(an({},zi(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},e.prototype.updateRGBFromCMYK=function(){this.rgb=an(an({},Xj(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},e.prototype.updateHSL=function(){this.hsl=Xg(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},e.prototype.updateCMYK=function(){this.cmyk=$re(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=O1(t),this.updateRGBAndCMYK()},e.prototype.setS=function(t){return this.hsl.s=Ga(t,0,100),this.updateRGBAndCMYK()},e.prototype.setL=function(t){return this.hsl.l=Ga(t,0,100),this.updateRGBAndCMYK()},e.prototype.setR=function(t){return this.rgb.r=Ga(t,0,255),this.updateHSLAndCMYK()},e.prototype.setG=function(t){return this.rgb.g=Ga(t,0,255),this.updateHSLAndCMYK()},e.prototype.setB=function(t){return this.rgb.b=Ga(t,0,255),this.updateHSLAndCMYK()},e.prototype.setA=function(t){return this.hsl.a=this.rgb.a=Ga(t,0,1),this},e.prototype.setC=function(t){return this.cmyk.c=Ga(t,0,100),this.updateRGBAndHSL()},e.prototype.setM=function(t){return this.cmyk.m=Ga(t,0,100),this.updateRGBAndHSL()},e.prototype.setY=function(t){return this.cmyk.y=Ga(t,0,100),this.updateRGBAndHSL()},e.prototype.setK=function(t){return this.cmyk.k=Ga(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 Tt(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"S",{get:function(){return Tt(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"L",{get:function(){return Tt(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"R",{get:function(){return Tt(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"G",{get:function(){return Tt(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"B",{get:function(){return Tt(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"A",{get:function(){return Tt(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"C",{get:function(){return Tt(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"M",{get:function(){return Tt(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Y",{get:function(){return Tt(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"K",{get:function(){return Tt(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXObject",{get:function(){return on.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEXAObject",{get:function(){return on.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 an(an({},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 an(an({},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 an(an({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HEX",{get:function(){return nn.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"RGB",{get:function(){return nn.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"HSL",{get:function(){return nn.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.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(e.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}),e.toHEX=function(t,n){n===void 0&&(n=!0);var r=Qs(t);return Wu(t,r,n,0,on.HEX,nn.HEX)},e.toHEXA=function(t,n){n===void 0&&(n=!0);var r=Qs(t);return Wu(t,r,n,0,on.HEXA,nn.HEX)},e.toRGB=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.RGB,nn.RGB)},e.toRGBA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.RGBA,nn.RGB)},e.toHSL=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.HSL,nn.HSL)},e.toHSLA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.HSLA,nn.HSL)},e.toCMYK=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.CMYK,nn.CMYK)},e.toCMYKA=function(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=6);var i=Qs(t);return Wu(t,i,n,r,on.CMYKA,nn.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),cm(t,n,r,i,o,on.HEX,nn.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),cm(t,n,r,i,o,on.HEXA,nn.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),cm(t,n,r,i,o,on.RGB,nn.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),cm(t,n,r,i,o,on.RGBA,nn.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),cm(t,n,r,i,o,on.HSL,nn.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),cm(t,n,r,i,o,on.HSLA,nn.HSL)},e.getMixHEX=function(t,n,r){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),lm.HEX(t,n,r)},e.getMixHEXA=function(t,n,r){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),lm.HEXA(t,n,r)},e.getMixRGB=function(t,n,r,i){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),lm.RGB(t,n,r,i)},e.getMixRGBA=function(t,n,r,i){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),lm.RGBA(t,n,r,i)},e.getMixHSL=function(t,n,r,i){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),lm.HSL(t,n,r,i)},e.getMixHSLA=function(t,n,r,i){return n===void 0&&(n=$o.ADDITIVE),r===void 0&&(r=!0),i===void 0&&(i=6),lm.HSLA(t,n,r,i)},e.getShades=function(t,n,r){return r===void 0&&(r=6),MV(t,n,!0,r)},e.getTints=function(t,n,r){return r===void 0&&(r=6),MV(t,n,!1,r)},e.getHarmony=function(t,n,r,i){return n===void 0&&(n=ou.COMPLEMENTARY),r===void 0&&(r=$o.ADDITIVE),i===void 0&&(i=6),function(o,s,l,c){var d;return(d={},d[ou.ANALOGOUS]=am.buildHarmony(s,TWe,c,l),d[ou.COMPLEMENTARY]=am.buildHarmony(s,AWe,c,l),d[ou.SPLIT_COMPLEMENTARY]=am.buildHarmony(s,kWe,c,l),d[ou.TRIADIC]=am.buildHarmony(s,IWe,c,l),d[ou.TETRADIC]=am.buildHarmony(s,RWe,c,l),d[ou.SQUARE]=am.buildHarmony(s,PWe,c,l),d)[o]}(n,t,i,r)},e}();const NWe={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:Wi,PI:BWe}=Math,Tw=(e,t)=>new LWe(e).setA(t??NWe.alpha).RGBA,FWe=(e,t)=>Tw(e,t);function Wd(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 $We={draw(e,t,n){if(e.text){const r=Wd(e,{x:e.textX,y:e.textY,scale:{x:1,y:1}}),i=Wd(r,n);t.font=`${e.fontSize*n.scale.x}px Arial`,t.fillStyle=Tw(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}}},zWe={draw(e,t,n){const{x:r,y:i,width:o,height:s}=Wd(e,n);t.fillStyle=Tw(e.fill,e.alpha),t.fillRect(Wi(r),Wi(i),Wi(o)||1,Wi(s)||1)},test(e){return{left:e.x,right:e.x+e.width,top:e.y,bottom:e.y+e.height}}},jWe={draw(e,t,n){t.fillStyle=Tw(e.fill,e.alpha),t.beginPath();const r=Wd({...e,width:e.radius,height:e.radius},n);t.ellipse(Wi(r.x),Wi(r.y),Wi(r.width),Wi(r.height),0,0,2*BWe),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}}},UWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.fillStyle=Tw(e.fill,e.alpha);const{x:o,y:s}=Wd({...r,width:0,height:0},n);t.moveTo(Wi(o),Wi(s));for(const l of i){const{x:c,y:d}=Wd({...l,width:0,height:0},n);t.lineTo(Wi(c),Wi(d))}t.closePath(),t.fill()},test(e){var t,n,r,i;return{left:((t=Vt.minBy(e.points,"x"))==null?void 0:t.x)??0,right:((n=Vt.maxBy(e.points,"x"))==null?void 0:n.x)??0,top:((r=Vt.minBy(e.points,"y"))==null?void 0:r.y)??0,bottom:((i=Vt.maxBy(e.points,"y"))==null?void 0:i.y)??0}}},HWe={draw(e,t,n){const[r,...i]=e.points;t.beginPath(),t.lineCap="round",t.lineJoin="round",t.strokeStyle=FWe(e.fill,e.alpha);const{x:o,y:s,width:l}=Wd({...r,width:e.lineWidth,height:0},n);t.lineWidth=Wi(l),t.moveTo(Wi(o),Wi(s));for(const c of i){const{x:d,y:f}=Wd({...c,width:0,height:0},n);t.lineTo(Wi(d),Wi(f))}t.stroke()},test(e){var t,n,r,i;return{left:((t=Vt.minBy(e.points,"x"))==null?void 0:t.x)??0-e.lineWidth??0,right:((n=Vt.maxBy(e.points,"x"))==null?void 0:n.x)??0+e.lineWidth??0,top:((r=Vt.minBy(e.points,"y"))==null?void 0:r.y)??0-e.lineWidth??0,bottom:((i=Vt.maxBy(e.points,"y"))==null?void 0:i.y)??0+e.lineWidth??0}}},WWe={text:$We,path:HWe,rect:zWe,polygon:UWe,circle:jWe},{log2:GWe,max:VWe}=Math,DV=e=>Vt.floor(GWe(e+1));function LV({right:e,left:t,bottom:n,top:r},i){const o=VWe(DV(e-t),DV(n-r))-i,s=2**o,l={left:Vt.floor(t/s),right:Vt.ceil((e+1)/s),top:Vt.floor(r/s),bottom:Vt.ceil((n+1)/s)};return{zoom:o,order:s,tiles:Vt.shuffle(fHe({x:Vt.range(l.left,l.right+1),y:Vt.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 qWe=""+new URL("D2Renderer.worker-603ea83e.js",import.meta.url).href;class XWe extends Worker{constructor(){super(qWe,{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:NV,min:BV}=Math,zre=class jre extends Vp{constructor(t,n){super(t),this.bounds=n,this.destroying=!1,this.age=jre.age++}};zre.age=0;let KWe=zre;function lS(e,t){return Vt.isNaN(e)?t:e}var ws,Br,od,cu,vi,Il,sd,ad,UC,HC,Ure,WC,Hre,pg,F1,GC,VC,Wre,qC,Gre,XC,Vre,YC,qre,$1,f5,z1,h5,KC,Xre,j1,p5,QC,Yre,JC,Kre,ZC,Qre;class QWe extends xWe{constructor(){super(...arguments);er(this,HC);er(this,WC);er(this,VC);er(this,qC);er(this,XC);er(this,YC);er(this,$1);er(this,z1);er(this,KC);er(this,j1);er(this,QC);er(this,JC);er(this,ZC);er(this,ws,void 0);er(this,Br,void 0);er(this,od,void 0);er(this,cu,void 0);er(this,vi,aV);er(this,Il,[]);er(this,sd,new uHe(16));er(this,ad,void 0);er(this,UC,0);er(this,pg,Vt.once(()=>Vt.debounce(()=>Ni(this,$1,f5).call(this),Ze(this,vi).debounceInterval)));er(this,F1,Vt.once(()=>Vt.throttle(()=>Ni(this,z1,h5).call(this),Ze(this,vi).refreshInterval)));er(this,GC,Vt.once(()=>Vt.throttle(n=>Ni(this,KC,Xre).call(this,n),Ze(this,vi).refreshInterval)))}getInstance(){return{app:Ze(this,ws),viewport:Ze(this,Br)}}fitCamera(){var r,i,o,s;const n=Vt.values(Ze(this,sd).all()).flat();if(n.length){const l=Vt.reduce(n,(c,d)=>({top:lS(BV(c.top,d.top),c.top),left:lS(BV(c.left,d.left),c.left),bottom:lS(NV(c.bottom,d.bottom),c.bottom),right:lS(NV(c.right,d.right),c.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(s=(r=Ze(this,Br))==null?void 0:r.animate)==null||s.call(r,{position:new Mt((l.left+l.right)/2,(l.top+l.bottom)/2),scale:((o=(i=Ze(this,Br))==null?void 0:i.findFit)==null?void 0:o.call(i,l.right-l.left,l.bottom-l.top))*.8,ease:"easeOutExpo",time:Ze(this,vi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,pg).call(this)()})}}initialCamera(){var n,r;(r=(n=Ze(this,Br))==null?void 0:n.animate)==null||r.call(n,{scale:1,ease:"easeOutExpo",time:Ze(this,vi).animationDuration*1.5,callbackOnComplete:()=>Ze(this,pg).call(this)()})}getView(){var n;return(n=Ze(this,ws))==null?void 0:n.view}setup(n){const r={...aV,...n};Ni(this,WC,Hre).call(this,r),this.setOptions(r),Ni(this,qC,Gre).call(this,r)}destroy(){Vt.map(Ze(this,Il),n=>n.terminate()),Ze(this,ws).destroy()}add(n){const r=D3e(),i=Vt.map(n,({component:o,meta:s})=>({...WWe[o.$].test(o),component:o,meta:s,index:Ni(this,HC,Ure).call(this)}));return Ze(this,sd).load(i),Vt.map(Ze(this,Il),o=>o.call("add",[Vt.map(n,"component"),r])),()=>Vt.defer(()=>{for(const o of i)Ze(this,sd).remove(o);Vt.map(Ze(this,Il),o=>o.call("remove",[r]))})}setOptions(n){const r={...Ze(this,vi),...n};Ni(this,XC,Vre).call(this,r),Qc(this,vi,r),Ni(this,$1,f5).call(this),Ni(this,z1,h5).call(this)}}ws=new WeakMap,Br=new WeakMap,od=new WeakMap,cu=new WeakMap,vi=new WeakMap,Il=new WeakMap,sd=new WeakMap,ad=new WeakMap,UC=new WeakMap,HC=new WeakSet,Ure=function(){return v6(this,UC)._++},WC=new WeakSet,Hre=function(n){Qc(this,ws,new Hj({backgroundAlpha:0,width:n.screenSize.width,height:n.screenSize.height,autoDensity:!0,resolution:2})),Qc(this,Br,new T6e({stopPropagation:!0,screenWidth:n.screenSize.width,screenHeight:n.screenSize.height,events:Ze(this,ws).renderer.events,passiveWheel:!1})),Ze(this,Br).on("clicked",r=>{const{x:i,y:o}=r.world,s=Ze(this,sd).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,ws).stage.addChild(Ze(this,Br)),Ze(this,Br).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Ze(this,Br).on("moved",()=>{Ze(this,pg).call(this)(),Ze(this,F1).call(this)()}),Ze(this,Br).on("mousemove",r=>Ze(this,GC).call(this)(r)),Qc(this,od,new Jo),Ze(this,Br).addChild(Ze(this,od)),Qc(this,cu,new qg),Ze(this,Br).addChild(Ze(this,cu)),Qc(this,ad,new qg),Ze(this,Br).addChild(Ze(this,ad)),Ni(this,VC,Wre).call(this)},pg=new WeakMap,F1=new WeakMap,GC=new WeakMap,VC=new WeakSet,Wre=function(){const{dynamicResolution:n}=Ze(this,vi),{dtMax:r,dtMin:i,increment:o,intervalMs:s,maxScale:l,minScale:c}=n,d=Vt.floor(Yr.targetFPMS*s);let f=0,h=0,p=1;Ze(this,ws).ticker.add(g=>{const{tileResolution:v}=Ze(this,vi);if(!(f%d)){const y=h/d;p=Vt.clamp(y>=r?p+o:y<=i?p-o:p,c,l),Vt.map(Ze(this,Il),S=>{S.call("setTileResolution",[{width:Vt.ceil(v.width/p),height:Vt.ceil(v.height/p)}])}),h=0}h+=g,f++})},qC=new WeakSet,Gre=function(n){Vt.map(Ze(this,Il),r=>r.terminate()),Qc(this,Il,Vt.times(n.workerCount,r=>{const i=new XWe;return i.on("update",o=>Ni(this,YC,qre).call(this,o)),i.onerror=o=>{throw o},i.call("setup",[{...n,workerIndex:r}]),i}))},XC=new WeakSet,Vre=function(n){var o,s,l,c;const{width:r,height:i}=n.screenSize;(l=(s=(o=Ze(this,ws))==null?void 0:o.renderer)==null?void 0:s.resize)==null||l.call(s,r,i),(c=Ze(this,Br))==null||c.resize(r,i)},YC=new WeakSet,qre=function({bounds:n,bitmap:r}){const i=ht.from(r);Ni(this,QC,Yre).call(this,i,n)},$1=new WeakSet,f5=function(){const{top:n,bottom:r,left:i,right:o}=Ze(this,Br);Vt.map(Ze(this,Il),s=>s.call("setFrustum",[{top:n,bottom:r,left:i,right:o}]))},z1=new WeakSet,h5=function(){var s,l,c,d,f;const{tileSubdivision:n,accentColor:r}=Ze(this,vi),{tiles:i}=LV(Ze(this,Br),n),o=Ni(this,j1,p5).call(this);(s=Ze(this,cu))==null||s.clear(),(l=Ze(this,cu))==null||l.lineStyle(1*o,r,.5),(c=Ze(this,cu))==null||c.beginFill(r,.05);for(const{bounds:h,tile:p}of i)Vt.find((d=Ze(this,od))==null?void 0:d.children,g=>Vt.isEqual(g.bounds,h))||(f=Ze(this,cu))==null||f.drawRect(h.left,h.top,h.right-h.left,h.bottom-h.top)},KC=new WeakSet,Xre=function(n){var c;const{accentColor:r}=Ze(this,vi),i=Ni(this,j1,p5).call(this),{x:o,y:s}=Ze(this,Br).toWorld(n.globalX,n.globalY),l=Ze(this,sd).search({minX:o,minY:s,maxX:o+Number.MIN_VALUE,maxY:s+Number.MIN_VALUE});Ze(this,ad).clear(),Ze(this,ad).lineStyle(2*i,r,1);for(const d of l)(c=Ze(this,ad))==null||c.drawRect(d.left,d.top,d.right-d.left,d.bottom-d.top)},j1=new WeakSet,p5=function(){const{right:n,left:r}=Ze(this,Br),{width:i}=Ze(this,vi).screenSize;return(n-r)/i},QC=new WeakSet,Yre=async function(n,r){var s,l;const{tileSubdivision:i}=Ze(this,vi),{tiles:o}=LV(Ze(this,Br),i);if(Vt.find(o,c=>Vt.isEqual(c.bounds,r))){const c={x:(r.right-r.left)/n.width,y:(r.bottom-r.top)/n.height},d=new KWe(n,r);(s=Ze(this,od))==null||s.addChild(d).setTransform(r.left,r.top,c.x,c.y),Ze(this,F1).call(this)(),await Ni(this,JC,Kre).call(this,d),Vt.forEach((l=Ze(this,od))==null?void 0:l.children,async f=>{YWe(f.bounds,r)&&f.age{const o=s=>{n.alpha+=s/Yr.targetFPMS/Ze(this,vi).animationDuration,n.alpha>1&&(r.remove(o),i())};n.alpha=0,r.add(o)})},ZC=new WeakSet,Qre=function(n){const r=Ze(this,ws).ticker;return new Promise(i=>{const o=s=>{n.alpha-=s/Yr.targetFPMS/Ze(this,vi).animationDuration,n.alpha<0&&(r.remove(o),i())};n.alpha=1,r.add(o)})};const JWe=tHe(QWe,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixi",description:"Provides 2D Visualisation Support",version:"1.0.0"}),ZWe={"d2-renderer":JWe};var eGe=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},Yj={},tGe=Object.prototype.hasOwnProperty,nGe;function FV(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function $V(e){try{return encodeURIComponent(e)}catch{return null}}function rGe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var i=FV(r[1]),o=FV(r[2]);i===null||o===null||i in n||(n[i]=o)}return n}function iGe(e,t){t=t||"";var n=[],r,i;typeof t!="string"&&(t="?");for(i in e)if(tGe.call(e,i)){if(r=e[i],!r&&(r===null||r===nGe||isNaN(r))&&(r=""),i=$V(i),r=$V(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?t+n.join("&"):""}Yj.stringify=iGe;Yj.parse=rGe;var Jre=eGe,ak=Yj,oGe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Zre=/[\n\r\t]/g,sGe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,eie=/:\d+$/,aGe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,lGe=/^[a-zA-Z]:/;function Kj(e){return(e||"").toString().replace(oGe,"")}var m5=[["#","hash"],["?","query"],function(t,n){return Yl(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]],zV={hash:1,query:1};function tie(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 zV)delete r[o]}else if(i==="object"){for(o in e)o in zV||(r[o]=e[o]);r.slashes===void 0&&(r.slashes=sGe.test(e.href))}return r}function Yl(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function nie(e,t){e=Kj(e),e=e.replace(Zre,""),t=t||{};var n=aGe.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)):Yl(r)?l=n[4]:r?i&&(l=l.slice(2)):s>=2&&Yl(t.protocol)&&(l=n[4]),{protocol:r,slashes:i||Yl(r),slashesCount:s,rest:l}}function cGe(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=Kj(e),e=e.replace(Zre,""),!(this instanceof ec))return new ec(e,t,n);var r,i,o,s,l,c,d=m5.slice(),f=typeof t,h=this,p=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=ak.parse),t=tie(t),i=nie(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||lGe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Yl(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 iie[r].constructor({url:i});n.push({key:o,url:i,renderer:await l.get()})}t(()=>n)},[e,t]),C.jsx(C.Fragment,{})}const mGe={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function gGe({value:e,onValueChange:t}){const[n]=HA(),r=te.find(n,{key:e.key});function i(s){t==null||t(hA(e,s))}const o=e!=null&&e.disabled?"disabled":r?"connected":"error";return C.jsx(C.Fragment,{children:C.jsxs(xn,{alignItems:"center",py:.5,children:[C.jsx(Gte,{sx:{color:mGe[o]}}),C.jsx(Jr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(jt,{children:r?`${r.renderer.meta.name} ${r.renderer.meta.version}`:te.startCase(o)}),C.jsx(jt,{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: ",te.join(r.renderer.meta.components,", ")]})]}):(e==null?void 0:e.url)||"No URL"})]}),C.jsx(Jd,{title:`${e.disabled?"Enable":"Disable"} Renderer`,children:C.jsx(dt,{children:C.jsx(Pg,{checked:!e.disabled,onChange:(s,l)=>i({disabled:!l})})})}),C.jsx(Qz,{trigger:s=>C.jsx(Gm,{icon:C.jsx(fA,{}),label:"Edit Renderer",onClick:s}),appBar:{children:C.jsx(Kz,{children:"Edit Renderer"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(J1,{value:e.url,onChange:s=>i({url:s.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(yx,{placeholder:"Renderer Type",items:te.entries(iie).map(([s,{name:l}])=>({value:s,label:l})),fullWidth:!0,value:e.transport,onChange:s=>i({transport:s})})]})})]})})}var Qj={},lk={},Aw={};(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})(Aw);var kw={};Object.defineProperty(kw,"__esModule",{value:!0});kw.DefaultErrorCode=void 0;kw.DefaultErrorCode=0;var jV=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())})},UV=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 MGe={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 DGe{constructor(t){Kp(this,"handler");this.options=t;const{hostname:n}=rie(t.url);this.handler=MGe[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 ZS=Object.create(null);Object.keys(tc).forEach(e=>{ZS[tc[e]]=e});const g5={type:"error",data:"parser error"},sie=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",aie=typeof ArrayBuffer=="function",lie=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Jj=({type:e,data:t},n,r)=>sie&&t instanceof Blob?n?r(t):VV(t,r):aie&&(t instanceof ArrayBuffer||lie(t))?n?r(t):VV(new Blob([t]),r):r(tc[e]+(t||"")),VV=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function qV(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let lF;function LGe(e,t){if(sie&&e.data instanceof Blob)return e.data.arrayBuffer().then(qV).then(t);if(aie&&(e.data instanceof ArrayBuffer||lie(e.data)))return t(qV(e.data));Jj(e,!1,n=>{lF||(lF=new TextEncoder),t(lF.encode(n))})}const XV="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},BGe=typeof ArrayBuffer=="function",Zj=(e,t)=>{if(typeof e!="string")return{type:"message",data:cie(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:FGe(e.substring(1),t)}:ZS[n]?e.length>1?{type:ZS[n],data:e.substring(1)}:{type:ZS[n]}:g5},FGe=(e,t)=>{if(BGe){const n=NGe(e);return cie(n,t)}else return{base64:!0,data:e}},cie=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},uie=String.fromCharCode(30),$Ge=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Jj(o,!1,l=>{r[s]=l,++i===n&&t(r.join(uie))})})},zGe=(e,t)=>{const n=e.split(uie),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 cF;function uS(e){return e.reduce((t,n)=>t+n.length,0)}function dS(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(g5);break}i=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(uS(n)e){l.enqueue(g5);break}}}})}const die=4;function Zr(e){if(e)return HGe(e)}function HGe(e){for(var t in Zr.prototype)e[t]=Zr.prototype[t];return e}Zr.prototype.on=Zr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Zr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Zr.prototype.off=Zr.prototype.removeListener=Zr.prototype.removeAllListeners=Zr.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 fie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const WGe=ta.setTimeout,GGe=ta.clearTimeout;function dk(e,t){t.useNativeTimers?(e.setTimeoutFn=WGe.bind(ta),e.clearTimeoutFn=GGe.bind(ta)):(e.setTimeoutFn=ta.setTimeout.bind(ta),e.clearTimeoutFn=ta.clearTimeout.bind(ta))}const VGe=1.33;function qGe(e){return typeof e=="string"?XGe(e):Math.ceil((e.byteLength||e.size)*VGe)}function XGe(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 KGe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function pie(){const e=QV(+new Date);return e!==KV?(YV=0,KV=e):e+"."+QV(YV++)}for(;fS{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)};zGe(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,$Ge(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]=pie()),!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 Kl(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 Kl extends Zr{constructor(t,n){super(),dk(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=fie(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new gie(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=Kl.requestsCount++,Kl.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=e9e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Kl.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()}}Kl.requestsCount=0;Kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",JV);else if(typeof addEventListener=="function"){const e="onpagehide"in ta?"pagehide":"unload";addEventListener(e,JV,!1)}}function JV(){for(let e in Kl.requests)Kl.requests.hasOwnProperty(e)&&Kl.requests[e].abort()}const t6=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),hS=ta.WebSocket||ta.MozWebSocket,ZV=!0,r9e="arraybuffer",eq=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class i9e extends e6{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=eq?{}:fie(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=ZV&&!eq?n?new hS(t,n):new hS(t):new hS(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{ZV&&this.ws.send(o)}catch{}i&&t6(()=>{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]=pie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!hS}}class o9e extends e6{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=UGe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=jGe();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&&t6(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const s9e={websocket:i9e,webtransport:o9e,polling:n9e},a9e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l9e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function y5(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=a9e.exec(e||""),o={},s=14;for(;s--;)o[l9e[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=c9e(o,o.path),o.queryKey=u9e(o,o.query),o}function c9e(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 u9e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let vie=class Sm extends Zr{constructor(t,n={}){super(),this.binaryType=r9e,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=y5(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=y5(n.host).host),dk(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=KGe(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=die,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 s9e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Sm.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;Sm.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;Sm.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",Sm.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){Sm.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,yie=Object.prototype.toString,p9e=typeof Blob=="function"||typeof Blob<"u"&&yie.call(Blob)==="[object BlobConstructor]",m9e=typeof File=="function"||typeof File<"u"&&yie.call(File)==="[object FileConstructor]";function n6(e){return f9e&&(e instanceof ArrayBuffer||h9e(e))||p9e&&e instanceof Blob||m9e&&e instanceof File}function eE(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:pn.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 pn.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 pn.EVENT:case pn.BINARY_EVENT:this.onevent(t);break;case pn.ACK:case pn.BINARY_ACK:this.onack(t);break;case pn.DISCONNECT:this.ondisconnect();break;case pn.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:pn.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:pn.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 w5 extends Zr{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,dk(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||_9e;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 vie(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Ka(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Ka(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(Ka(t,"ping",this.onping.bind(this)),Ka(t,"data",this.ondata.bind(this)),Ka(t,"error",this.onerror.bind(this)),Ka(t,"close",this.onclose.bind(this)),Ka(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){t6(()=>{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 bie(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 tE(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=d9e(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 w5(r,t):(Mb[i]||(Mb[i]=new w5(r,t)),c=Mb[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(tE,{Manager:w5,Socket:bie,io:tE,connect:tE});class E9e{constructor(t){Kp(this,"rpc");Kp(this,"socket");this.options=t,this.socket=tE(t.url),this.rpc=new Qj.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 i6={socketio:{name:"socket.io",constructor:E9e},ipc:{name:"Web Worker",constructor:OGe},native:{name:"Internal",constructor:DGe}};function C9e(e){return i6[e].constructor}const xie=te.first(te.keys(i6));function T9e(){const[{renderer:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(MA,{editor:n=>C.jsx(gGe,{value:n}),icon:null,value:e,onChange:te.debounce(n=>t(()=>({renderer:n})),300),addItemLabel:"Add Renderer",create:()=>({transport:xie,url:"",disabled:!0}),extras:C.jsx(Fd,{icon:C.jsx(fQ,{}),sx:{ml:2},onClick:()=>t(()=>({renderer:cJ})),children:"Reset to Defaults"})})})}function A9e(e){const[{connections:t}]=DA(),n=xj(),[{remote:r}]=Lu(),i=te.find(r,{url:e});return i&&!(i!=null&&i.disabled)?n({url:e})?"connected":t?"connecting":e?"error":"not-connected":"not-connected"}const k9e={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function I9e({value:e,onValueChange:t}){const n=MBe(e.url),r=A9e(e.url);function i(o){t==null||t(hA(e,o))}return C.jsx(C.Fragment,{children:C.jsxs(xn,{alignItems:"center",py:.5,children:[C.jsx(Gte,{sx:{color:k9e[r]}}),C.jsx(Jr,{}),C.jsxs(dt,{flex:1,children:[C.jsx(jt,{children:n?`${n.name} ${n.version}`:te.startCase(r)}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:(n==null?void 0:n.description)??((e==null?void 0:e.url)||"No URL")})]}),C.jsx(Jd,{title:`${e.disabled?"Enable":"Disable"} Connection`,children:C.jsx(dt,{children:C.jsx(Pg,{checked:!e.disabled,onChange:(o,s)=>i({disabled:!s})})})}),C.jsx(Qz,{trigger:o=>C.jsx(Gm,{icon:C.jsx(fA,{}),label:"Edit Connection",onClick:o}),appBar:{children:C.jsx(Kz,{children:"Edit Connection"})},children:C.jsxs(dt,{p:2.5,children:[C.jsx(J1,{value:e.url,onChange:o=>i({url:o.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),C.jsx(yx,{placeholder:"Connection Type",items:te.entries(i6).map(([o,{name:s}])=>({value:o,label:s})),fullWidth:!0,value:e.transport,onChange:o=>i({transport:o})})]})})]})})}function R9e(){const[{remote:e},t]=Lu();return C.jsx(C.Fragment,{children:C.jsx(MA,{editor:n=>C.jsx(I9e,{value:n}),icon:null,value:e,onChange:te.debounce(n=>t(()=>({remote:n})),300),addItemLabel:"Add Solver",create:()=>({transport:xie,url:"",disabled:!0}),extras:C.jsx(Fd,{icon:C.jsx(fQ,{}),sx:{ml:2},onClick:()=>t(()=>({remote:lJ})),children:"Reset to Defaults"})})})}const nq=e=>`${e}x`;function P9e(){const{controls:e,onChange:t,state:n}=ef(),[{playbackRate:r=1,acrylic:i,theme:o="light",accentColor:s="teal"},l]=Lu(),[c,d]=R.useState("general");function f(p){return C.jsx(jt,{variant:"overline",color:"text.secondary",children:p})}function h(p){return C.jsx(jt,{variant:"body1",children:p})}return C.jsx(fJ,{value:c,children:C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Options,{children:C.jsxs(gJ,{onChange:(p,g)=>d(g),children:[C.jsx(Bm,{label:"General",value:"general"}),C.jsx(Bm,{label:"Connections",value:"connections"}),C.jsx(Bm,{label:"Renderers",value:"renderers"}),C.jsx(Bm,{label:"Map Parsers",value:"map-parsers"})]})}),C.jsx(Nn.Content,{children:C.jsx(xn,{vertical:!0,children:C.jsx(nw,{y:!0,children:C.jsxs(xn,{vertical:!0,pt:6,children:[C.jsx(jm,{value:"general",children:C.jsxs(dt,{children:[f("Playback"),C.jsxs(xn,{alignItems:"center",children:[h("Playback Rate"),C.jsx(Jr,{flex:1}),C.jsx(Sbe,{sx:{maxWidth:320,mr:2},marks:[.25,1,5].map(p=>({value:p*pm,label:nq(p)})),step:.25*pm,min:.25*pm,max:5*pm,valueLabelFormat:p=>nq(p/pm),valueLabelDisplay:"auto",defaultValue:r,onChangeCommitted:(p,g)=>l(()=>({playbackRate:g}))})]}),f("UI"),C.jsxs(xn,{alignItems:"center",children:[h("Acrylic"),C.jsx(Jr,{flex:1}),C.jsx(Pg,{defaultChecked:!!i,onChange:(p,g)=>l(()=>({acrylic:g}))})]}),C.jsxs(xn,{alignItems:"center",children:[h("Dark Mode"),C.jsx(Jr,{flex:1}),C.jsx(Pg,{defaultChecked:o==="dark",onChange:(p,g)=>l(()=>({theme:g?"dark":"light"}))})]}),C.jsxs(xn,{alignItems:"center",children:[h("Accent"),C.jsx(Jr,{flex:1}),C.jsx(Ms,{value:s,items:te.map(te.keys(J_e),p=>({id:p,name:te.startCase(p)})),showArrow:!0,onChange:p=>l(()=>({accentColor:p}))})]})]})}),C.jsx(jm,{value:"connections",children:C.jsxs(dt,{children:[f("Solvers"),C.jsx(R9e,{})]})}),C.jsx(jm,{value:"renderers",children:C.jsxs(dt,{children:[f("Renderers"),C.jsx(T9e,{})]})}),C.jsx(jm,{value:"map-parsers",children:C.jsxs(dt,{children:[f("Map Parsers"),C.jsx(O9e,{})]})})]})})})}),C.jsx(Nn.Extras,{children:e})]})})}function O9e(){return C.jsx(Rg,{children:te.keys(ij).map(e=>C.jsx(gx,{children:C.jsx(Wl,{primary:e,secondary:"Internal"})},e))})}const fk=0,sf=1,xv=2,wie=4;function _ie(e,t){return n=>e(t(n))}function M9e(e,t){return t(e)}function Sie(e,t){return n=>e(t,n)}function rq(e,t){return()=>e(t)}function hk(e,t){return t(e),e}function vr(...e){return e}function D9e(e){e()}function iq(e){return()=>e}function L9e(...e){return()=>{e.map(D9e)}}function o6(e){return e!==void 0}function wv(){}function Un(e,t){return e(sf,t)}function tn(e,t){e(fk,t)}function s6(e){e(xv)}function Rs(e){return e(wie)}function St(e,t){return Un(e,Sie(t,fk))}function Iu(e,t){const n=e(sf,r=>{n(),t(r)});return n}function bn(){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 fk:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function et(e){let t=e;const n=bn();return(r,i)=>{switch(r){case sf:i(t);break;case fk:t=i;break;case wie:return t}return n(r,i)}}function N9e(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=Un(e,o),t):(r(),wv);case xv:r(),n=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Bs(e){return hk(bn(),t=>St(e,t))}function Io(e,t){return hk(et(t),n=>St(e,n))}function B9e(...e){return t=>e.reduceRight(M9e,t)}function Pe(e,...t){const n=B9e(...t);return(r,i)=>{switch(r){case sf:return Un(e,n(i));case xv:s6(e);return}}}function Eie(e,t){return e===t}function pr(e=Eie){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Wt(e){return t=>n=>{e(n)&&t(n)}}function lt(e){return t=>_ie(t,e)}function lu(e){return t=>()=>t(e)}function Fl(e,t){return n=>r=>n(t=e(t,r))}function Yg(e){return t=>n=>{e>0?e--:t(n)}}function gd(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function oq(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function ln(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{const d=n;n=n|l,t[s]=c,d!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const l=()=>o([s].concat(t));n===i?l():r=l}}function sq(...e){return function(t,n){switch(t){case sf:return L9e(...e.map(r=>Un(r,n)));case xv:return;default:throw new Error(`unrecognized action ${t}`)}}}function Ht(e,t=Eie){return Pe(e,pr(t))}function wi(...e){const t=bn(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const l=Math.pow(2,s);Un(o,c=>{n[s]=c,r=r|l,r===i&&tn(t,n)})}),function(o,s){switch(o){case sf:return r===i&&s(n),Un(t,s);case xv:return s6(t);default:throw new Error(`unrecognized action ${o}`)}}}function $n(e,t=[],{singleton:n}={singleton:!0}){return{id:F9e(),constructor:e,dependencies:t,singleton:n}}const F9e=()=>Symbol();function $9e(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 z9e(e,t){const n={},r={};let i=0;const o=e.length;for(;i(S[_]=b=>{const x=y[t.methods[_]];tn(x,b)},S),{})}function f(y){return s.reduce((S,_)=>(S[_]=N9e(y[t.events[_]]),S),{})}return{Component:de.forwardRef((y,S)=>{const{children:_,...b}=y,[x]=de.useState(()=>hk($9e(e),k=>c(k,b))),[E]=de.useState(rq(f,x));return pS(()=>{for(const k of s)k in b&&Un(E[k],b[k]);return()=>{Object.values(E).map(s6)}},[b,E,x]),pS(()=>{c(x,b)}),de.useImperativeHandle(S,iq(d(x))),de.createElement(l.Provider,{value:x},n?de.createElement(n,z9e([...r,...i,...s],b),_):_)}),usePublisher:y=>de.useCallback(Sie(tn,de.useContext(l)[y]),[y]),useEmitterValue:y=>{const _=de.useContext(l)[y],[b,x]=de.useState(rq(Rs,_));return pS(()=>Un(_,E=>{E!==b&&x(iq(E))}),[_,b]),b},useEmitter:(y,S)=>{const b=de.useContext(l)[y];pS(()=>Un(b,S),[S,b])}}}const j9e=typeof document<"u"?de.useLayoutEffect:de.useEffect,U9e=j9e;var Fs=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Fs||{});const H9e={0:"debug",1:"log",2:"warn",3:"error"},W9e=()=>typeof globalThis>"u"?window:globalThis,af=$n(()=>{const e=et(3);return{log:et((n,r,i=1)=>{var o;const s=(o=W9e().VIRTUOSO_LOG_LEVEL)!=null?o:Rs(e);i>=s&&console[H9e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function a6(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 Xp(e,t=!0){return a6(e,t).callbackRef}function G9e(e,t,n,r,i,o,s){const l=de.useCallback(c=>{const d=V9e(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(q9e("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,s,r]);return a6(l,n)}function V9e(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?_():Nm.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(Gd(document.documentElement,"height"),document.documentElement.scrollHeight),v=window.innerHeight,S=document.documentElement.scrollTop):(y=p.scrollHeight,v=Gd(p,"height"),S=p.scrollTop);const _=y-v;if(h.top=Math.ceil(Math.max(Math.min(_,h.top),0)),Tie(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 Do=$n(()=>{const e=bn(),t=bn(),n=et(0),r=bn(),i=et(0),o=bn(),s=bn(),l=et(0),c=et(0),d=et(0),f=et(0),h=bn(),p=bn(),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}),M1={lvl:0};function kie(e,t,n,r=M1,i=M1){return{k:e,v:t,lvl:n,l:r,r:i}}function Qn(e){return e===M1}function hg(){return M1}function _5(e,t){if(Qn(e))return M1;const{k:n,l:r,r:i}=e;if(t===n){if(Qn(r))return i;if(Qn(i))return r;{const[o,s]=Iie(r);return nE(fi(e,{k:o,v:s,l:Rie(r)}))}}else return tt&&(l=l.concat(S5(o,t,n))),r>=t&&r<=n&&l.push({k:r,v:i}),r<=n&&(l=l.concat(S5(s,t,n))),l}function ep(e){return Qn(e)?[]:[...ep(e.l),{k:e.k,v:e.v},...ep(e.r)]}function Iie(e){return Qn(e.r)?[e.k,e.v]:Iie(e.r)}function Rie(e){return Qn(e.r)?e.l:nE(fi(e,{r:Rie(e.r)}))}function fi(e,t){return kie(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 uF(e){return Qn(e)||e.lvl>e.r.lvl}function aq(e){return E5(Oie(e))}function nE(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(uF(t))return Oie(fi(e,{lvl:r-1}));if(!Qn(t)&&!Qn(t.r))return fi(t.r,{l:fi(t,{r:t.r.l}),r:fi(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(uF(e))return E5(fi(e,{lvl:r-1}));if(!Qn(n)&&!Qn(n.l)){const i=n.l,o=uF(i)?n.lvl-1:n.lvl;return fi(i,{l:fi(e,{r:i.l,lvl:r-1}),r:E5(fi(n,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function pk(e,t,n){if(Qn(e))return[];const r=gl(e,t)[0];return X9e(S5(e,r,n))}function Pie(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 E5(e){const{r:t,lvl:n}=e;return!Qn(t)&&!Qn(t.r)&&t.lvl===n&&t.r.lvl===n?fi(t,{l:fi(e,{r:t.l}),lvl:n+1}):e}function Oie(e){const{l:t}=e;return!Qn(t)&&t.lvl===e.lvl?fi(t,{r:fi(e,{l:t.r})}):e}function FC(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 Mie(e,t,n){return e[FC(e,t,n)]}function Y9e(e,t,n,r){const i=FC(e,t,r),o=FC(e,n,r,i);return e.slice(i,o+1)}const l6=$n(()=>({recalcInProgress:et(!1)}),[],{singleton:!0});function K9e(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 lq(e,t){let n=0,r=0;for(;n=f||i===p)&&(e=_5(e,f)):(d=p!==i,c=!0),h>s&&s>=f&&p!==i&&(e=As(e,s+1,p));d&&(e=As(e,o,i))}return[e,n]}function J9e(){return{offsetTree:[],sizeTree:hg(),groupOffsetTree:hg(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function c6({index:e},t){return t===e?0:t0&&(t=Math.max(t,Mie(e,r,c6).offset)),Pie(Y9e(e,t,n,Z9e),e7e)}function C5(e,t,n,r){let i=e,o=0,s=0,l=0,c=0;if(t!==0){c=FC(i,t-1,c6),l=i[c].offset;const f=gl(n,t-1);o=f[0],s=f[1],i.length&&i[c].size===gl(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of pk(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 n7e(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Fs.DEBUG);const o=e.sizeTree;let s=o,l=0;if(n.length>0&&Qn(o)&&t.length===2){const p=t[0].size,g=t[1].size;s=n.reduce((v,y)=>As(As(v,y,p),y+1,g),s)}else[s,l]=Q9e(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)=>As(p,g,L1(g,c,i)),hg()),groupIndices:n}}function L1(e,t,n){if(t.length===0)return 0;const{offset:r,index:i,size:o}=Mie(t,e,c6),s=e-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function r7e(e){return typeof e.groupIndex<"u"}function Die(e,t,n){if(r7e(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=Lie(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function Lie(e,t){if(!mk(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function mk(e){return!Qn(e.groupOffsetTree)}function i7e(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 o7e={offsetHeight:"height",offsetWidth:"width"},sc=$n(([{log:e},{recalcInProgress:t}])=>{const n=bn(),r=bn(),i=Io(r,0),o=bn(),s=bn(),l=et(0),c=et([]),d=et(void 0),f=et(void 0),h=et((k,I)=>Gd(k,o7e[I])),p=et(void 0),g=et(0),v=J9e(),y=Io(Pe(n,ln(c,e,g),Fl(n7e,v),pr()),v),S=Io(Pe(c,pr(),Fl((k,I)=>({prev:k.current,current:I}),{prev:[],current:[]}),lt(({prev:k})=>k)),[]);St(Pe(c,Wt(k=>k.length>0),ln(y,g),lt(([k,I,A])=>{const O=k.reduce((L,N,H)=>As(L,N,L1(N,I.offsetTree,A)||H),hg());return{...I,groupIndices:k,groupOffsetTree:O}})),y),St(Pe(r,ln(y),Wt(([k,{lastIndex:I}])=>k[{startIndex:k,endIndex:I,size:A}])),n),St(d,f);const _=Io(Pe(d,lt(k=>k===void 0)),!0);St(Pe(f,Wt(k=>k!==void 0&&Qn(Rs(y).sizeTree)),lt(k=>[{startIndex:0,endIndex:0,size:k}])),n);const b=Bs(Pe(n,ln(y),Fl(({sizes:k},[I,A])=>({changed:A!==k,sizes:A}),{changed:!1,sizes:v}),lt(k=>k.changed)));Un(Pe(l,Fl((k,I)=>({diff:k.prev-I,prev:I}),{diff:0,prev:0}),lt(k=>k.diff)),k=>{const{groupIndices:I}=Rs(y);if(k>0)tn(t,!0),tn(o,k+lq(k,I));else if(k<0){const A=Rs(S);A.length>0&&(k-=lq(-k,A)),tn(s,k)}}),Un(Pe(l,ln(e)),([k,I])=>{k<0&&I("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Fs.ERROR)});const x=Bs(o);St(Pe(o,ln(y),lt(([k,I])=>{const A=I.groupIndices.length>0,O=[],L=I.lastSize;if(A){const N=D1(I.sizeTree,0);let H=0,W=0;for(;H{let G=$.ranges;return $.prevSize!==0&&(G=[...$.ranges,{startIndex:$.prevIndex,endIndex:j+k-1,size:$.prevSize}]),{ranges:G,prevIndex:j+k,prevSize:V}},{ranges:O,prevIndex:k,prevSize:0}).ranges}return ep(I.sizeTree).reduce((N,{k:H,v:W})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:H+k-1,size:N.prevSize}],prevIndex:H+k,prevSize:W}),{ranges:[],prevIndex:0,prevSize:L}).ranges})),n);const E=Bs(Pe(s,ln(y,g),lt(([k,{offsetTree:I},A])=>{const O=-k;return L1(O,I,A)})));return St(Pe(s,ln(y,g),lt(([k,I,A])=>{if(I.groupIndices.length>0){if(Qn(I.sizeTree))return I;let L=hg();const N=Rs(S);let H=0,W=0,z=0;for(;H<-k;){z=N[W];const $=N[W+1]-z-1;W++,H+=$+1}if(L=ep(I.sizeTree).reduce(($,{k:j,v:V})=>As($,Math.max(0,j+k),V),L),H!==-k){const $=D1(I.sizeTree,z);L=As(L,0,$);const j=gl(I.sizeTree,-k+1)[1];L=As(L,1,j)}return{...I,sizeTree:L,...C5(I.offsetTree,0,L,A)}}else{const L=ep(I.sizeTree).reduce((N,{k:H,v:W})=>As(N,Math.max(0,H+k),W),hg());return{...I,sizeTree:L,...C5(I.offsetTree,0,L,A)}}})),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}},vr(af,l6),{singleton:!0}),s7e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Nie(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!s7e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Iw=$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=bn(),v=et(0);let y=null,S=null,_=null;function b(){y&&(y(),y=null),_&&(_(),_=null),S&&(clearTimeout(S),S=null),tn(i,!1)}return St(Pe(g,ln(e,o,t,v,c,d,p),ln(r,f,h),lt(([[x,E,k,I,A,O,L,N],H,W,z])=>{const D=Nie(x),{align:$,behavior:j,offset:V}=D,G=I-1,K=Die(D,E,G);let Y=L1(K,E.offsetTree,H)+O;$==="end"?(Y+=W+gl(E.sizeTree,K)[1]-k+z,K===G&&(Y+=L)):$==="center"?Y+=(W+gl(E.sizeTree,K)[1]-k+z)/2:Y-=A,V&&(Y+=V);const J=ie=>{b(),ie?(N("retrying to scroll to",{location:x},Fs.DEBUG),tn(g,x)):N("list did not change, scroll successful",{},Fs.DEBUG)};if(b(),j==="smooth"){let ie=!1;_=Un(n,ce=>{ie=ie||ce}),y=Iu(l,()=>{J(ie)})}else y=Iu(Pe(n,a7e(150)),J);return S=setTimeout(()=>{b()},1200),tn(i,!0),N("scrolling from index to",{index:K,top:Y,behavior:j},Fs.DEBUG),{top:Y,behavior:j}})),s),{scrollToIndex:g,topListHeight:v}},vr(sc,Do,af),{singleton:!0});function a7e(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const N1="up",Px="down",l7e="none",c7e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},u7e=0,Rw=$n(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{const s=et(!1),l=et(!0),c=bn(),d=bn(),f=et(4),h=et(u7e),p=Io(Pe(sq(Pe(Ht(t),Yg(1),lu(!0)),Pe(Ht(t),Yg(1),lu(!1),oq(100))),pr()),!1),g=Io(Pe(sq(Pe(o,lu(!0)),Pe(o,lu(!1),oq(200))),pr()),!1);St(Pe(wi(Ht(t),Ht(h)),lt(([b,x])=>b<=x),pr()),l),St(Pe(l,gd(50)),d);const v=Bs(Pe(wi(e,Ht(n),Ht(r),Ht(i),Ht(f)),Fl((b,[{scrollTop:x,scrollHeight:E},k,I,A,O])=>{const L=x+k-E>-O,N={viewportHeight:k,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":kb&&b.atBottom===x.atBottom))),y=Io(Pe(e,Fl((b,{scrollTop:x,scrollHeight:E,viewportHeight:k})=>{if(Tie(b.scrollHeight,E))return{scrollTop:x,scrollHeight:E,jump:0,changed:!1};{const I=E-(x+k)<1;return b.scrollTop!==x&&I?{scrollHeight:E,scrollTop:x,jump:b.scrollTop-x,changed:!0}:{scrollHeight:E,scrollTop:x,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Wt(b=>b.changed),lt(b=>b.jump)),0);St(Pe(v,lt(b=>b.atBottom)),s),St(Pe(s,gd(50)),c);const S=et(Px);St(Pe(e,lt(({scrollTop:b})=>b),pr(),Fl((b,x)=>Rs(g)?{direction:b.direction,prevScrollTop:x}:{direction:xb.direction)),S),St(Pe(e,gd(50),lu(l7e)),S);const _=et(0);return St(Pe(p,Wt(b=>!b),lu(0)),_),St(Pe(t,gd(100),ln(p),Wt(([b,x])=>!!x),Fl(([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}},vr(Do)),lf=$n(([{log:e}])=>{const t=et(!1),n=Bs(Pe(t,Wt(r=>r),pr()));return Un(t,r=>{r&&Rs(e)("props updated",{},Fs.DEBUG)}),{propsReady:t,didMount:n}},vr(af),{singleton:!0});function u6(e,t){e==0?t():requestAnimationFrame(()=>u6(e-1,t))}function d6(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Pw=$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,ln(l),Wt(([d,f])=>!!f),lu(!1)),s),Un(Pe(wi(t,o),ln(s,e,n,c),Wt(([[,d],f,{sizeTree:h},p,g])=>d&&(!Qn(h)||o6(p))&&!f&&!g),ln(l)),([,d])=>{tn(c,!0),u6(3,()=>{Iu(r,()=>tn(s,!0)),tn(i,d)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l}},vr(sc,Do,Iw,lf),{singleton:!0});function cq(e){return e?e==="smooth"?"smooth":"auto":!1}const d7e=(e,t)=>typeof e=="function"?cq(e(t)):t&&cq(e),f7e=$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=bn();let p=null;function g(y){tn(i,{index:"LAST",align:"end",behavior:y})}Un(Pe(wi(Pe(Ht(e),Yg(1)),l),ln(Ht(f),n,o,d),lt(([[y,S],_,b,x,E])=>{let k=S&&x,I="auto";return k&&(I=d7e(_,b||E),k=k&&!!I),{totalCount:y,shouldFollow:k,followOutputBehavior:I}}),Wt(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:S})=>{p&&(p(),p=null),p=Iu(t,()=>{Rs(c)("following output to ",{totalCount:y},Fs.DEBUG),g(S),p=null})});function v(y){const S=Iu(r,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rs(c)("scrolling to bottom due to increased size",{},Fs.DEBUG),g("auto"))});setTimeout(S,100)}return Un(Pe(wi(Ht(f),e,s),Wt(([y,,S])=>y&&S),Fl(({value:y},[,S])=>({refreshed:y===S,value:S}),{refreshed:!1,value:0}),Wt(({refreshed:y})=>y),ln(f,e)),([,y])=>{v(y!==!1)}),Un(h,()=>{v(Rs(f)!==!1)}),Un(wi(Ht(f),r),([y,S])=>{y&&!S.atBottom&&S.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:h}},vr(sc,Rw,Iw,Pw,lf,af,Do));function h7e(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Bie=$n(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:i}])=>{const o=bn(),s=bn(),l=Bs(Pe(o,lt(h7e)));return St(Pe(l,lt(c=>c.totalCount)),e),St(Pe(l,lt(c=>c.groupIndices)),t),St(Pe(wi(r,n,i),Wt(([c,d])=>mk(d)),lt(([c,d,f])=>gl(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),pr(),lt(c=>[c])),s),{groupCounts:o,topItemsIndexes:s}},vr(sc,Do));function B1(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Fie(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const $C="top",zC="bottom",uq="none";function dq(e,t,n){return typeof e=="number"?n===N1&&t===$C||n===Px&&t===zC?e:0:n===N1?t===$C?e.main:e.reverse:t===zC?e.main:e.reverse}function fq(e,t){return typeof e=="number"?e:e[t]||0}const f6=$n(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{const o=bn(),s=et(0),l=et(0),c=et(0),d=Io(Pe(wi(Ht(e),Ht(t),Ht(r),Ht(o,B1),Ht(c),Ht(s),Ht(i),Ht(n),Ht(l)),lt(([f,h,p,[g,v],y,S,_,b,x])=>{const E=f-b,k=S+_,I=Math.max(p-E,0);let A=uq;const O=fq(x,$C),L=fq(x,zC);return g-=b,g+=p+_,v+=p+_,v-=b,g>f+k-O&&(A=N1),vf!=null),pr(B1)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:s,increaseViewportBy:l,visibleRange:d}},vr(Do),{singleton:!0});function p7e(e,t,n){if(mk(t)){const r=Lie(e,t);return[{index:gl(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 dF={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function hq(e,t,n){if(e.length===0)return[];if(!mk(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=pk(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:hq(e,i,o),topItems:hq(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 $ie(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=d6(t,l),d=Array.from({length:l}).map((f,h)=>({index:h+c,size:0,offset:0,data:o[h+c]}));return rE(d,[],l,i,n,r)}const Yp=$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),_=bn();St(o.topItemsIndexes,y);const b=Io(Pe(wi(g,v,Ht(s,B1),Ht(t),Ht(e),Ht(f),d,Ht(y),Ht(r),Ht(i),n),Wt(([I,A,,O,,,,,,,L])=>{const N=L&&L.length!==O;return I&&!A&&!N}),lt(([,,[I,A],O,L,N,H,W,z,D,$])=>{const j=L,{sizeTree:V,offsetTree:G}=j,K=Rs(S);if(O===0)return{...dF,totalCount:O};if(I===0&&A===0)return K===0?{...dF,totalCount:O}:$ie(K,N,L,z,D,$||[]);if(Qn(V))return K>0?null:rE(p7e(d6(N,O),j,$),[],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 pk(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:$&&$[ye]}),ae+=he}}if(!H)return rE([],Y,O,D,j,z);const J=W.length>0?W[W.length-1]+1:0,ie=t7e(G,I,A,J);if(ie.length===0)return null;const ce=O-1,ue=hk([],se=>{for(const Q of ie){const ae=Q.value;let le=ae.offset,he=Q.start;const pe=ae.size;if(ae.offset=A);ye++)se.push({index:ye,size:pe,offset:le,data:$&&$[ye]}),le+=pe+D}});return rE(ue,Y,O,D,j,z)}),Wt(I=>I!==null),pr()),dF);St(Pe(n,Wt(o6),lt(I=>I==null?void 0:I.length)),t),St(Pe(b,lt(I=>I.topListHeight)),h),St(h,c),St(Pe(b,lt(I=>[I.top,I.bottom])),l),St(Pe(b,lt(I=>I.items)),_);const x=Bs(Pe(b,Wt(({items:I})=>I.length>0),ln(t,n),Wt(([{items:I},A])=>I[I.length-1].originalIndex===A-1),lt(([,I,A])=>[I-1,A]),pr(B1),lt(([I])=>I))),E=Bs(Pe(b,gd(200),Wt(({items:I,topItems:A})=>I.length>0&&I[0].originalIndex===A.length),lt(({items:I})=>I[0].index),pr())),k=Bs(Pe(b,Wt(({items:I})=>I.length>0),lt(({items:I})=>{let A=0,O=I.length-1;for(;I[A].type==="group"&&AA;)O--;return{startIndex:I[A].index,endIndex:I[O].index}}),pr(Fie)));return{listState:b,topItemsIndexes:y,endReached:x,startReached:E,rangeChanged:k,itemsRendered:_,initialItemCount:S,...p}},vr(sc,Bie,f6,Pw,Iw,Rw,lf,l6),{singleton:!0}),m7e=$n(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(St(Pe(l,ln(o),Wt(([,c])=>c!==0),ln(i,e,t,r,n),lt(([[,c],d,f,h,p,g=[]])=>$ie(c,d,f,h,p,g))),s),{}),vr(sc,Pw,Yp,lf),{singleton:!0}),zie=$n(([{scrollVelocity:e}])=>{const t=et(!1),n=bn(),r=et(!1);return St(Pe(e,ln(r,t,n),Wt(([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}),pr()),t),Un(Pe(wi(t,e,n),ln(r)),([[i,o,s],l])=>i&&l&&l.change&&l.change(o,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},vr(Rw),{singleton:!0}),g7e=$n(([{topItemsIndexes:e}])=>{const t=et(0);return St(Pe(t,Wt(n=>n>0),lt(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},vr(Yp)),jie=$n(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{const o=bn(),s=Io(Pe(wi(e,r,t,n,i),lt(([l,c,d,f,h])=>l+c+d+f+h.offsetBottom+h.bottom)),0);return St(Ht(s),o),{totalListHeight:s,totalListHeightChanged:o}},vr(Do,Yp),{singleton:!0});function Uie(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const v7e=Uie(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),y7e=$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=Bs(Pe(c,ln(l),Fl(([,_,b,x],[{items:E,totalCount:k,bottom:I,offsetBottom:A},O])=>{const L=I+A;let N=0;return b===k&&_.length>0&&E.length>0&&(E[0].originalIndex===0&&_[0].originalIndex===0||(N=L-x,N!==0&&(N+=O))),[N,E,k,L]},[0,[],0,0]),Wt(([_])=>_!==0),ln(t,s,r,o,g,v),Wt(([,_,b,x,,,E])=>!E&&!x&&_!==0&&b===N1),lt(([[_],,,,,b])=>(b("Upward scrolling compensation",{amount:_},Fs.DEBUG),_))));function S(_){_>0?(tn(e,{top:-_,behavior:"auto"}),tn(n,0)):(tn(n,0),tn(e,{top:-_,behavior:"auto"}))}return Un(Pe(y,ln(n,i)),([_,b,x])=>{x&&v7e()?tn(n,b-_):S(-_)}),Un(Pe(wi(Io(i,!1),n,v),Wt(([_,b,x])=>!_&&!x&&b!==0),lt(([_,b])=>b),gd(1)),S),St(Pe(f,lt(_=>({top:-_}))),e),Un(Pe(d,ln(h,p),lt(([_,{lastSize:b,groupIndices:x,sizeTree:E},k])=>{function I(A){return A*(b+k)}if(x.length===0)return I(_);{let A=0;const O=D1(E,0);let L=0,N=0;for(;L<_;){L++,A+=O;let H=x.length===N+1?1/0:x[N+1]-x[N]-1;L+H>_&&(A-=O,H=_-L+1),L+=H,A+=I(H),N++}return A}})),_=>{tn(n,_),requestAnimationFrame(()=>{tn(e,{top:_}),requestAnimationFrame(()=>{tn(n,0),tn(v,!1)})})}),{deviation:n}},vr(Do,Rw,Yp,sc,af,l6)),b7e=$n(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=et(0);return Un(Pe(e,ln(r),Wt(([,i])=>i!==0),lt(([,i])=>({top:i}))),i=>{Iu(Pe(n,Yg(1),Wt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{tn(t,i)})})}),{initialScrollTop:r}},vr(lf,Do,Yp),{singleton:!0}),x7e=$n(([{viewportHeight:e},{totalListHeight:t}])=>{const n=et(!1),r=Io(Pe(wi(n,e,t),Wt(([i])=>i),lt(([,i,o])=>Math.max(0,i-o)),gd(0),pr()),0);return{alignToBottom:n,paddingTopAddition:r}},vr(Do,jie),{singleton:!0}),h6=$n(([{scrollTo:e,scrollContainerState:t}])=>{const n=bn(),r=bn(),i=bn(),o=et(!1),s=et(void 0);return St(Pe(wi(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,ln(r),lt(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},vr(Do)),w7e=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>er?{...s,behavior:i,align:o??"end"}:null,_7e=$n(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=bn();return St(Pe(f,ln(e,i,t,o,s,l,r),ln(n),lt(([[h,p,g,v,y,S,_,b],x])=>{const{done:E,behavior:k,align:I,calculateViewLocation:A=w7e,...O}=h,L=Die(h,p,v-1),N=L1(L,p.offsetTree,x)+y+S,H=N+gl(p.sizeTree,L)[1],W=b+S,z=b+g-_,D=A({itemTop:N,itemBottom:H,viewportTop:W,viewportBottom:z,locationParams:{behavior:k,align:I,...O}});return D?E&&Iu(Pe(c,Wt($=>$===!1),Yg(Rs(c)?1:2)),E):E&&E(),D}),Wt(h=>h!==null)),d),{scrollIntoView:f}},vr(sc,Do,Iw,Yp,af),{singleton:!0}),S7e=$n(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=bn(),d=et(void 0),f=et(null),h=et(null);return St(s,f),St(l,h),Un(Pe(c,ln(e,n,o,f,h)),([p,g,v,y,S,_])=>{const b=i7e(g.sizeTree);y&&S!==null&&_!==null&&(v=S.scrollTop-_.offsetTop),p({ranges:b,scrollTop:v})}),St(Pe(d,Wt(o6),lt(E7e)),r),St(Pe(i,ln(d),Wt(([,p])=>p!==void 0),pr(),lt(([,p])=>p.ranges)),t),{getState:c,restoreStateFrom:d}},vr(sc,Do,Pw,lf,h6));function E7e(e){return{offset:e.scrollTop,index:0,align:"start"}}const C7e=$n(([e,t,n,r,i,o,s,l,c,d])=>({...e,...t,...n,...r,...i,...o,...s,...l,...c,...d}),vr(f6,m7e,lf,zie,jie,b7e,x7e,h6,_7e,af)),T7e=$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},k,{topItemCount:I},{groupCounts:A},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:I,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:f,...S,statefulTotalCount:d,listState:_,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...x,...O,...v,sizes:h,...y}),vr(sc,Pw,Do,S7e,f7e,Yp,Iw,y7e,g7e,Bie,C7e)),fF="-webkit-sticky",pq="sticky",Hie=Uie(()=>{if(typeof document>"u")return pq;const e=document.createElement("div");return e.style.position=fF,e.style.position===fF?fF:pq});function Wie(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}=a6(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 Gie=de.createContext(void 0),Vie=de.createContext(void 0);function qie(e){return e}const A7e=$n(()=>{const e=et(c=>`Item ${c}`),t=et(null),n=et(c=>`Group ${c}`),r=et({}),i=et(qie),o=et("div"),s=et(wv),l=(c,d=null)=>Io(Pe(r,lt(f=>f[c]),pr()),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")}}),k7e=$n(([e,t])=>({...e,...t}),vr(T7e,A7e)),I7e=({height:e})=>de.createElement("div",{style:{height:e}}),R7e={position:Hie(),zIndex:1,overflowAnchor:"none"},P7e={overflowAnchor:"none"},mq=de.memo(function({showTopList:t=!1}){const n=gn("listState"),r=ca("sizeRanges"),i=gn("useWindowScroll"),o=gn("customScrollParent"),s=ca("windowScrollContainerState"),l=ca("scrollContainerState"),c=o||i?s:l,d=gn("itemContent"),f=gn("context"),h=gn("groupContent"),p=gn("trackItemSizes"),g=gn("itemSize"),v=gn("log"),y=ca("gap"),{callbackRef:S}=G9e(r,g,p,t?wv:c,v,y,o),[_,b]=de.useState(0);p6("deviation",D=>{_!==D&&b(D)});const x=gn("EmptyPlaceholder"),E=gn("ScrollSeekPlaceholder")||I7e,k=gn("ListComponent"),I=gn("ItemComponent"),A=gn("GroupComponent"),O=gn("computeItemKey"),L=gn("isSeeking"),N=gn("groupIndices").length>0,H=gn("paddingTopAddition"),W=gn("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,jo(x,f)):de.createElement(k,{...jo(k,f),ref:S,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const $=D.originalIndex,j=O($+n.firstItemIndex,D.data,f);return L?de.createElement(E,{...jo(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(A,{...jo(A,f),key:j,"data-index":$,"data-known-size":D.size,"data-item-index":D.index,style:R7e},h(D.index,f)):de.createElement(I,{...jo(I,f),key:j,"data-index":$,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,item:D.data,style:P7e},N?d(D.index,D.groupIndex,D.data,f):d(D.index,D.data,f))}))}),O7e={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},gk={width:"100%",height:"100%",position:"absolute",top:0},M7e={width:"100%",position:Hie(),top:0,zIndex:1};function jo(e,t){if(typeof e!="string")return{context:t}}const D7e=de.memo(function(){const t=gn("HeaderComponent"),n=ca("headerHeight"),r=gn("headerFooterTag"),i=Xp(s=>n(Gd(s,"height"))),o=gn("context");return t?de.createElement(r,{ref:i},de.createElement(t,jo(t,o))):null}),L7e=de.memo(function(){const t=gn("FooterComponent"),n=ca("footerHeight"),r=gn("headerFooterTag"),i=Xp(s=>n(Gd(s,"height"))),o=gn("context");return t?de.createElement(r,{ref:i},de.createElement(t,jo(t,o))):null});function Xie({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}=Aie(c,f,d,h);return t("scrollTo",y),t("scrollBy",v),de.createElement(d,{ref:g,style:{...O7e,...o},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,...jo(d,p)},s)})}function Yie({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:_}=Aie(c,f,d,wv,g);return U9e(()=>(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,...jo(d,v)},s)})}const N7e=({children:e})=>{const t=de.useContext(Gie),n=ca("viewportHeight"),r=ca("fixedItemHeight"),i=Xp(_ie(n,o=>Gd(o,"height")));return de.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),de.createElement("div",{style:gk,ref:i,"data-viewport-type":"element"},e)},B7e=({children:e})=>{const t=de.useContext(Gie),n=ca("windowViewportRect"),r=ca("fixedItemHeight"),i=gn("customScrollParent"),o=Wie(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:gk,"data-viewport-type":"window"},e)},F7e=({children:e})=>{const t=gn("TopItemListComponent"),n=gn("headerHeight"),r={...M7e,marginTop:`${n}px`},i=gn("context");return de.createElement(t||"div",{style:r,context:i},e)},$7e=de.memo(function(t){const n=gn("useWindowScroll"),r=gn("topItemsIndexes").length>0,i=gn("customScrollParent"),o=i||n?U7e:j7e,s=i||n?B7e:N7e;return de.createElement(o,{...t},r&&de.createElement(F7e,null,de.createElement(mq,{showTopList:!0})),de.createElement(s,null,de.createElement(D7e,null),de.createElement(mq,null),de.createElement(L7e,null)))}),{Component:z7e,usePublisher:ca,useEmitterValue:gn,useEmitter:p6}=Cie(k7e,{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"}},$7e),j7e=Xie({usePublisher:ca,useEmitterValue:gn,useEmitter:p6}),U7e=Yie({usePublisher:ca,useEmitterValue:gn,useEmitter:p6}),H7e=z7e,gq={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},W7e={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:vq,ceil:yq,floor:jC,min:hF,max:Ox}=Math;function G7e(e){return{...W7e,items:e}}function bq(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 V7e(e,t){return e&&e.column===t.column&&e.row===t.row}function mS(e,t){return e&&e.width===t.width&&e.height===t.height}const q7e=$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 k=et(0),I=et(0),A=et(gq),O=et({height:0,width:0}),L=et({height:0,width:0}),N=bn(),H=bn(),W=et(0),z=et(null),D=et({row:0,column:0}),$=bn(),j=bn(),V=et(!1),G=et(0),K=et(!0),Y=et(!1);Un(Pe(v,ln(G),Wt(([Q,ae])=>!!ae)),()=>{tn(K,!1),tn(I,0)}),Un(Pe(wi(v,K,L,O,G,Y),Wt(([Q,ae,le,he,,pe])=>Q&&!ae&&le.height!==0&&he.height!==0&&!pe)),([,,,,Q])=>{tn(Y,!0),u6(1,()=>{tn(N,Q)}),Iu(Pe(r),()=>{tn(n,[0,0]),tn(K,!0)})}),St(Pe(j,Wt(Q=>Q!=null&&Q.scrollTop>0),lu(0)),I),Un(Pe(v,ln(j),Wt(([,Q])=>Q!=null)),([,Q])=>{Q&&(tn(O,Q.viewport),tn(L,Q==null?void 0:Q.item),tn(D,Q.gap),Q.scrollTop>0&&(tn(V,!0),Iu(Pe(r,Yg(1)),ae=>{tn(V,!1)}),tn(s,{top:Q.scrollTop})))}),St(Pe(O,lt(({height:Q})=>Q)),i),St(Pe(wi(Ht(O,mS),Ht(L,mS),Ht(D,(Q,ae)=>Q&&Q.column===ae.column&&Q.row===ae.row),Ht(r)),lt(([Q,ae,le,he])=>({viewport:Q,item:ae,gap:le,scrollTop:he}))),$),St(Pe(wi(Ht(k),t,Ht(D,V7e),Ht(L,mS),Ht(O,mS),Ht(z),Ht(I),Ht(V),Ht(K),Ht(G)),Wt(([,,,,,,,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:Re}=ve;if(xe===0&&(Q===0||Re===0))return gq;if(Nt===0){const Rt=d6(be,Q),ct=Rt===0?Math.max(xe-1,0):Rt;return G7e(bq(Rt,ct,ye))}const $e=Kie(Re,Nt,qe);let it,pt;me?ae===0&&le===0&&xe>0?(it=0,pt=xe-1):(it=$e*jC((ae+Qe)/(at+Qe)),pt=$e*yq((le+Qe)/(at+Qe))-1,pt=hF(Q-1,Ox(pt,$e-1)),it=hF(pt,Ox(0,it))):(it=0,pt=-1);const mt=bq(it,pt,ye),{top:_e,bottom:ze}=xq(ve,he,pe,mt),Ye=yq(Q/$e),Ne=Ye*at+(Ye-1)*Qe-ze;return{items:mt,offsetTop:_e,offsetBottom:Ne,top:_e,bottom:ze,itemHeight:at,itemWidth:Nt}})),A),St(Pe(z,Wt(Q=>Q!==null),lt(Q=>Q.length)),k),St(Pe(wi(O,L,A,D),Wt(([Q,ae,{items:le}])=>le.length>0&&ae.height!==0&&Q.height!==0),lt(([Q,ae,{items:le},he])=>{const{top:pe,bottom:ve}=xq(Q,he,ae,le);return[pe,ve]}),pr(B1)),n);const J=et(!1);St(Pe(r,ln(J),lt(([Q,ae])=>ae||Q!==0)),J);const ie=Bs(Pe(Ht(A),Wt(({items:Q})=>Q.length>0),ln(k,J),Wt(([{items:Q},ae,le])=>le&&Q[Q.length-1].index===ae-1),lt(([,Q])=>Q-1),pr())),ce=Bs(Pe(Ht(A),Wt(({items:Q})=>Q.length>0&&Q[0].index===0),lu(0),pr())),ue=Bs(Pe(Ht(A),ln(V),Wt(([{items:Q},ae])=>Q.length>0&&!ae),lt(([{items:Q}])=>({startIndex:Q[0].index,endIndex:Q[Q.length-1].index})),pr(Fie),gd(0)));St(ue,p.scrollSeekRangeChanged),St(Pe(N,ln(O,L,k,D),lt(([Q,ae,le,he,pe])=>{const ve=Nie(Q),{align:ye,behavior:xe,offset:me}=ve;let be=ve.index;be==="LAST"&&(be=he-1),be=Ox(0,be,hF(he-1,be));let Qe=T5(ae,pe,le,be);return ye==="end"?Qe=vq(Qe-ae.height+le.height):ye==="center"&&(Qe=vq(Qe-ae.height/2+le.height/2)),me&&(Qe+=me),{top:Qe,behavior:xe}})),s);const se=Io(Pe(A,lt(Q=>Q.offsetBottom+Q.bottom)),0);return St(Pe(y,lt(Q=>({width:Q.visibleWidth,height:Q.visibleHeight}))),O),{data:z,totalCount:k,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:I,gap:D,restoreStateFrom:j,...p,initialTopMostItemIndex:G,gridState:A,totalListHeight:se,...h,startReached:ce,endReached:ie,rangeChanged:ue,stateChanged:$,propsReady:g,stateRestoreInProgress:V,...E}},vr(f6,Do,Rw,zie,lf,h6,af));function xq(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{top:0,bottom:0};const o=T5(e,t,n,r[0].index),s=T5(e,t,n,r[r.length-1].index)+i;return{top:o,bottom:s}}function T5(e,t,n,r){const i=Kie(e.width,n.width,t.column),o=jC(r/i),s=o*n.height+Ox(0,o-1)*t.row;return s>0?s+t.row:s}function Kie(e,t,n){return Ox(1,jC((e+n)/(jC(t)+n)))}const X7e=$n(()=>{const e=et(d=>`Item ${d}`),t=et({}),n=et(null),r=et("virtuoso-grid-item"),i=et("virtuoso-grid-list"),o=et(qie),s=et("div"),l=et(wv),c=(d,f=null)=>Io(Pe(t,lt(h=>h[d]),pr()),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}),vr(q7e,X7e)),K7e=de.memo(function(){const t=Er("gridState"),n=Er("listClassName"),r=Er("itemClassName"),i=Er("itemContent"),o=Er("computeItemKey"),s=Er("isSeeking"),l=fl("scrollHeight"),c=Er("ItemComponent"),d=Er("ListComponent"),f=Er("ScrollSeekPlaceholder"),h=Er("context"),p=fl("itemDimensions"),g=fl("gap"),v=Er("log"),y=Er("stateRestoreInProgress"),S=Xp(_=>{const b=_.parentElement.parentElement.scrollHeight;l(b);const x=_.firstChild;if(x){const{width:E,height:k}=x.getBoundingClientRect();p({width:E,height:k})}g({row:wq("row-gap",getComputedStyle(_).rowGap,v),column:wq("column-gap",getComputedStyle(_).columnGap,v)})});return y?null:de.createElement(d,{ref:S,className:n,...jo(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,...jo(f,h),index:_.index,height:t.itemHeight,width:t.itemWidth}):de.createElement(c,{...jo(c,h),className:r,"data-index":_.index,key:b},i(_.index,_.data,h))}))}),Q7e=de.memo(function(){const t=Er("HeaderComponent"),n=fl("headerHeight"),r=Er("headerFooterTag"),i=Xp(s=>n(Gd(s,"height"))),o=Er("context");return t?de.createElement(r,{ref:i},de.createElement(t,jo(t,o))):null}),J7e=de.memo(function(){const t=Er("FooterComponent"),n=fl("footerHeight"),r=Er("headerFooterTag"),i=Xp(s=>n(Gd(s,"height"))),o=Er("context");return t?de.createElement(r,{ref:i},de.createElement(t,jo(t,o))):null}),Z7e=({children:e})=>{const t=de.useContext(Vie),n=fl("itemDimensions"),r=fl("viewportDimensions"),i=Xp(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:gk,ref:i},e)},eVe=({children:e})=>{const t=de.useContext(Vie),n=fl("windowViewportRect"),r=fl("itemDimensions"),i=Er("customScrollParent"),o=Wie(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:gk},e)},tVe=de.memo(function({...t}){const n=Er("useWindowScroll"),r=Er("customScrollParent"),i=r||n?rVe:nVe,o=r||n?eVe:Z7e;return de.createElement(i,{...t},de.createElement(o,null,de.createElement(Q7e,null),de.createElement(K7e,null),de.createElement(J7e,null)))}),{Component:fqe,usePublisher:fl,useEmitterValue:Er,useEmitter:Qie}=Cie(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"}},tVe),nVe=Xie({usePublisher:fl,useEmitterValue:Er,useEmitter:Qie}),rVe=Yie({usePublisher:fl,useEmitterValue:Er,useEmitter:Qie});function wq(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Fs.WARN),t==="normal"?0:parseInt(t??"0",10)}const iVe=R.forwardRef(({style:e,children:t,...n},r)=>{const i=R.useRef(null),{palette:o,spacing:s}=Pn(),l=n1({".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]=QQ({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:o.mode==="dark"?"os-theme-light":"os-theme-dark"}}});R.useEffect(()=>{typeof r!="function"&&(r!=null&&r.current)&&(i!=null&&i.current)&&c({target:i.current,elements:{viewport:r.current}})},[c]);const d=R.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 oVe({items:e=[],renderItem:t,listOptions:n,placeholder:r,...i}){return C.jsx(dt,{...i,children:C.jsx(H7e,{components:{Scroller:iVe},totalCount:e.length,itemContent:o=>t==null?void 0:t(e[o],o),...n})})}function sVe({event:e,hidden:t}){return C.jsxs(M3e,{children:[te.startCase(`${(e==null?void 0:e.type)??"unsupported"} #${(e==null?void 0:e.id)??"-"}`)," ",t&&C.jsx(s1e,{sx:{opacity:.56,fontSize:12,ml:1,transform:"translateY(1.75px)"}})]})}function aVe({event:e,index:t,selected:n,...r}){const{spacing:i}=Pn();return C.jsx(Jd,{title:C.jsx(dt,{p:1,children:C.jsx(x3,{event:e,flexDirection:"column"})}),followCursor:!0,children:C.jsxs(_$,{selected:n,...r,sx:{borderLeft:`${i(.5)} solid ${p1(e==null?void 0:e.type)}`,...r.sx},children:[C.jsx(Cd,{children:C.jsx(jt,{variant:"body2",children:t})}),C.jsx(Wl,{sx:{overflow:"hidden"},primary:C.jsx(sVe,{event:e,hidden:!1}),secondary:C.jsx(x3,{event:te.pick(e,"f","g","pId")})})]})})}const lVe=C.jsx(Mu,{orientation:"vertical",flexItem:!0,sx:{m:1}}),cVe=e=>Number(e.replace(/px$/,""));function uVe(){const{spacing:e}=Pn(),{controls:t,onChange:n,state:r}=ef(),i=R.useRef(null),{key:o,setKey:s,layers:l,layer:c}=Tp(),{step:d,playing:f,pause:h,stepTo:p}=Aj(o),g=R.useMemo(()=>{var v;if(c)return R.createElement(bw[((v=c==null?void 0:c.source)==null?void 0:v.type)??""].steps,{layer:c})},[c]);return R.useEffect(()=>{f||te.delay(()=>{var v,y;return(y=(v=i==null?void 0:i.current)==null?void 0:v.scrollToIndex)==null?void 0:y.call(v,{index:d,align:"start",behavior:"smooth",offset:-cVe(e(6+2))})},150)},[d,f,e]),C.jsxs(Nn,{onChange:n,stack:r,children:[C.jsx(Nn.Content,{children:C.jsx(xn,{vertical:!0,alignItems:"center",children:g?f?C.jsx(Kh,{icon:C.jsx(Q1,{}),label:C.jsxs(C.Fragment,{children:[C.jsx(jt,{children:"Running"}),C.jsx(rz,{onClick:()=>h(),children:"Pause"})]})}):R.cloneElement(g,{children:v=>c?v.length?C.jsx(oVe,{sx:{width:"100%",height:"100%"},items:v,listOptions:{ref:i,defaultItemHeight:80,overscan:0},renderItem:(y,S)=>C.jsxs(dt,{sx:{height:e(S?10:16),pt:S?0:e(6)},children:[C.jsx(aVe,{event:y,index:S,selected:S===d,sx:{height:"100%"},onClick:()=>p(S)}),C.jsx(Mu,{variant:"inset"})]})}):C.jsx(Kh,{icon:C.jsx(MS,{}),label:`${ra(c)} has no steps to display`}):C.jsx(Kh,{icon:C.jsx(MS,{}),label:"Steps"})}):C.jsx(Kh,{icon:C.jsx(MS,{}),label:"Steps"})})}),C.jsxs(Nn.Options,{children:[C.jsx(Ms,{icon:C.jsx(Z1,{}),label:"Layer",value:o,items:te.map(l,v=>({id:v.key,name:ra(v)})),onChange:s,showArrow:!0}),lVe,C.jsx(x3e,{layer:c})]}),C.jsx(Nn.Extras,{children:t})]})}const dVe=e=>e?48:36,fVe=8;function hVe({trigger:e,items:t,value:n,onChange:r,placeholder:i="Select Options",defaultChecked:o}){const s=Ez(),l=te.max([te.findIndex(t,({value:c})=>!!(n!=null&&n[c])),0])??0;return C.jsx(Bp,{variant:"popover",children:c=>C.jsxs(C.Fragment,{children:[C.jsx(Jd,{title:i,children:C.jsx("span",{children:e==null?void 0:e(_A(c))})}),C.jsx(Np,{...fw(c),anchorOrigin:{horizontal:"center",vertical:-dVe(s)*l-fVe},transformOrigin:{vertical:"top",horizontal:"center"},children:te.map(t,({value:d,label:f,disabled:h})=>C.jsxs(gu,{disabled:h,onClick:()=>{r==null||r({...n,[d]:!((n==null?void 0:n[d])??o)})},children:[C.jsx(Cd,{children:C.jsx(vge,{sx:{p:0},checked:!!((n==null?void 0:n[d])??o)})}),f]},d))})]})})}function pVe({label:e,value:t,onChange:n,items:r,icon:i,showArrow:o,defaultChecked:s}){var d;const l=te.filter(r,({id:f})=>!!((t==null?void 0:t[f])??s)),c=l.length?l.length===1?(d=te.head(l))==null?void 0:d.name:`${l.length} Selected`:e;return C.jsx(hVe,{defaultChecked:!0,placeholder:te.startCase(e),trigger:f=>C.jsx(Fd,{...f,disabled:!(r!=null&&r.length),icon:i,showArrow:o,children:c}),items:te.map(r,({id:f,name:h,description:p,hidden:g})=>({value:f,label:C.jsxs(C.Fragment,{children:[C.jsx(jt,{children:h}),C.jsx(Jr,{}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:p})]}),disabled:g})),value:t,onChange:n})}const _q=C.jsx(Mu,{orientation:"vertical",flexItem:!0,sx:{m:1}});function mVe(){var p,g,v,y;const{controls:e,onChange:t,state:n}=ef(),[r]=HA(),[{layers:i}]=Fp(),[o,s]=R.useState({}),l=R.useMemo(()=>te.filter(i,S=>(o==null?void 0:o[S.key])??!0),[o,i]),[c,d]=R.useState(),f=R.useMemo(()=>te.head(r),[r]),h=n!=null&&n.renderer&&n.renderer!=="internal:auto"?n.renderer:(g=(p=f==null?void 0:f.renderer)==null?void 0:p.meta)==null?void 0:g.id;return C.jsxs(Nn,{onChange:t,stack:n,children:[C.jsx(Nn.Content,{children:C.jsx(xn,{children:C.jsx(EA,{children:S=>C.jsx(dt,{children:C.jsx(IBe,{...S,layers:l,renderer:h,rendererRef:d})})})})}),C.jsx(Nn.Options,{children:C.jsxs(Nd,{direction:"row",children:[C.jsx(Ms,{label:"Renderer",icon:C.jsx(Yxe,{}),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"})`},...te.map(r,({renderer:S})=>({id:S.meta.id,name:S.meta.name,description:S.meta.id}))],showArrow:!0}),_q,C.jsx(pVe,{defaultChecked:!0,label:"Layers",icon:C.jsx(Z1,{}),value:o,onChange:s,items:te.map(i,S=>({id:S.key,name:ra(S)})),showArrow:!0}),_q,C.jsx(Fd,{disabled:!c,onClick:()=>{c==null||c.fitCamera()},icon:C.jsx(Jxe,{}),children:"Fit"}),C.jsx(Fd,{disabled:!c,onClick:()=>{c==null||c.initialCamera()},icon:C.jsx(n1e,{}),children:"1:1"})]})}),C.jsx(Nn.Extras,{children:e})]})}const A5={viewport:{id:"viewport",name:"Viewport",icon:C.jsx(hQ,{}),content:mVe},tree:{id:"tree",name:"Tree",icon:C.jsx(lQ,{}),content:xBe},steps:{id:"steps",name:"Steps",icon:C.jsx(MS,{}),content:uVe},info:{id:"info",name:"Logs",icon:C.jsx(dQ,{}),content:ZIe},layers:{id:"layers",name:"Layers",icon:C.jsx(Z1,{}),content:O3e},debug:{id:"debug",name:"Debugger",icon:C.jsx(Qxe,{}),content:JIe},settings:{id:"settings",name:"Settings",icon:C.jsx(m1e,{}),content:P9e},about:{id:"about",name:"About",icon:C.jsx(a1e,{}),content:aSe}},[gVe,vVe]=nc({view:{type:"branch",key:Bo(),orientation:"horizontal",children:[{size:75,type:"branch",key:Bo(),orientation:"horizontal",children:[{type:"leaf",size:25,key:Bo(),content:{type:"layers"}},{size:75,type:"branch",key:Bo(),orientation:"vertical",children:[{type:"leaf",size:75,key:Bo(),content:{type:"viewport"}},{type:"leaf",size:25,key:Bo(),content:{type:"info"}}]}]},{size:25,type:"leaf",key:Bo(),content:{type:"steps"}}]}});function yVe(){const[e]=oee(),t=Cz(),n=te.values(e);return C.jsx(cA,{sx:{...t,zIndex:r=>r.zIndex.tooltip+1,WebkitAppRegion:"drag"},open:!!n.length,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(Q1,{}),n.map((r,i)=>C.jsx(jt,{variant:"body2",color:"textSecondary",children:r},i))]})})}var Jie={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(A){return String(A)},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(A){n(A.target.response,v,l)},setTimeout(function(){_.send()},0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d))if(d.length>1024*1024*1.999&&g!==p)d=k(d),c=d.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(k(d),v):I(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 Jz({accept:eoe,strict:!0});l&&(SVe(l)?await o(async()=>{const c=await l.text(),d=await nee(c);d&&(n(()=>d.layers),i(()=>d.UIState))},`Opening workspace (${rj(l.size)})`):e(`${l==null?void 0:l.name} is not a workspace file.`))},save:()=>{xVe(JSON.stringify({layers:t,UIState:r}),`${Zie.generateUsername("-")}.workspace.json`,"application/json")}}}function SVe(e){return te.find(eoe,t=>e.name.endsWith(t))}var noe={},EVe=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)}}(),roe=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(noe,"__esModule",{value:!0});var Ks=roe(Qg),pF=roe(R),CVe=function(e){EVe(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),pF.default.createElement("div",{className:i,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},pF.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:Ks.default.string,targetClassName:Ks.default.string,draggingOverFrameClassName:Ks.default.string,draggingOverTargetClassName:Ks.default.string,onDragOver:Ks.default.func,onDragLeave:Ks.default.func,onDrop:Ks.default.func,onTargetClick:Ks.default.func,dropEffect:Ks.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:Ks.default.func,onFrameDragLeave:Ks.default.func,onFrameDrop:Ks.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}(pF.default.PureComponent),TVe=noe.FileDrop=CVe;function AVe(){const e=Cz(),{load:t}=toe(),[n,r]=R.useState(!1);return C.jsx(C.Fragment,{children:C.jsx(TVe,{onFrameDragLeave:()=>r(!1),onFrameDragEnter:()=>r(!0),onFrameDrop:()=>r(!1),onDragLeave:()=>r(!1),onDrop:i=>(i==null?void 0:i.length)&&t(te.head(i)),children:C.jsx(cA,{sx:{...e,zIndex:i=>i.zIndex.tooltip+1},open:n,children:C.jsxs(Nd,{alignItems:"center",spacing:4,children:[C.jsx(_1e,{}),C.jsx(jt,{variant:"body2",color:"textSecondary",children:"Open workspace"})]})})})})}function kVe(e){const t=fRe(),[{view:n},r]=gVe();return C.jsxs(C.Fragment,{children:[C.jsx(xn,{...e,children:C.jsx(aJ,{root:n,onChange:i=>r(()=>({view:i})),renderLeaf:({content:i})=>{var o;return C.jsx(_p,{in:!0,children:C.jsx(dt,{sx:{width:"100%",height:"100%"},children:R.createElement((o=A5[(i==null?void 0:i.type)??""])==null?void 0:o.content)})})}})}),C.jsx(_p,{in:t,children:C.jsx(aye,{variant:"indeterminate",sx:{position:"absolute",bottom:0,width:"100%",zIndex:1}})}),C.jsx(yVe,{}),C.jsx(AVe,{})]})}const IVe=e=>wF(e,"#ffffff")>wF(e,"#000000")?"#ffffff":"#000000";function RVe(e){R.useEffect(()=>{te.defer(()=>document.querySelector('meta[name="theme-color"]').setAttribute("content",e)),document.title=B$,"electron"in window&&window.electron.invoke("title-bar","#00000000",IVe(e))},[e])}function PVe(e){return new Promise(t=>te.delay(t,e))}async function OVe(e,t=2500){const n=te.now();return{result:await Promise.any([e(),PVe(t)]),delta:te.now()-n}}function MVe(){const e=vl(),[{remote:t}]=Lu(),[,n]=Fg(),r=$p("connections");return R.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(C9e(s))({url:l});await d.connect();const{result:f,delta:h}=await OVe(()=>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 DVe=e=>t=>({...t,source:e});function LVe(){const[e]=Fg(),[,t]=nC(),n=$p("features");return Yee(r=>n(async()=>{const i={algorithms:[],formats:te.keys(ij).map(o=>({id:o,source:"internal"})),maps:[]};for(const{call:o,url:s}of e)for(const l of["algorithms","formats","maps"])i[l]=te.uniqBy([...i[l],...te.map(await o(`features/${l}`),DVe(s))],"id");r.aborted||t(()=>i)}),[e,t]),C.jsx(C.Fragment,{})}function NVe(){const[{layers:e},t]=Fp();return R.useMemo(()=>te.map(e,n=>{const r=Wte(n).service;if(r)return R.createElement(r,{key:n.key,value:n,onChange:i=>t(({layers:o})=>({layers:te.map(o,s=>s.key===n.key?i(s):s)}))})}),[e,t])}function BVe(){const e=NVe();return C.jsx(C.Fragment,{children:e})}function ioe({slices:e,children:t,services:n}){return C.jsx(C.Fragment,{children:te.reduce(te.map(e,r=>R.createElement(r)),(r,i)=>R.cloneElement(i,{},r),C.jsxs(C.Fragment,{children:[t,te.map(n,(r,i)=>R.createElement(r,{key:i}))]}))})}const FVe=()=>{const{save:e,load:t}=toe(),[n,r]=R.useState(!1);return R.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(nw,{x:!0,style:{height:"100%"},children:C.jsx(dt,{sx:{height:"100%"},children:C.jsxs(Nd,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",children:[C.jsx(dt,{sx:{p:1,height:"100%"},children:C.jsx("img",{src:uJ,style:{height:"100%"}})}),[{key:"workspace",items:[{name:"Open workspace",key:"workspace-load",action:t},{name:"Save workspace",key:"workspace-save",action:e}]},{key:"help",items:[{name:"Open repository in GitHub",key:"github",action:()=>open(iSe,"_blank")},{name:"Open changelog",key:"changelog",action:()=>open(`${oSe}/changelog-${nSe}.md`,"_blank")}]}].map(({key:i,items:o})=>C.jsx(Bp,{variant:"popover",children:s=>C.jsxs(C.Fragment,{children:[C.jsx(Np,{...fw(s),children:C.jsx(dA,{dense:!0,sx:{p:0},children:o.map(({name:l,key:c,action:d})=>C.jsx(gu,{onClick:()=>{d==null||d(),s.close()},children:l},c))})}),C.jsx(Fd,{..._A(s),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:te.startCase(i)})]})},i)),C.jsx(dt,{sx:{p:.75,height:"100%"},children:C.jsx($Ve,{})})]})})})})};function $Ve(){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(p1e,{fontSize:"small",color:"disabled"})," ",C.jsx(jt,{sx:{mt:0},children:"Commands"})]})}const zVe=[MVe,LVe,pGe,BVe];function jVe(){const t=Pn().palette.background.default;return RVe(t),C.jsxs(xn,{vertical:!0,sx:{bgcolor:t,p:.5,color:"text.primary"},children:[C.jsx(FVe,{}),C.jsx(kVe,{flex:1})]})}function UVe(){const[{theme:e="light",accentColor:t="teal"}]=Lu(),n=R.useMemo(()=>eSe(e,t),[e,t]);return C.jsx(Dce,{theme:n,children:C.jsx(Q1e,{children:C.jsx(ioe,{services:zVe,children:C.jsx(jVe,{})})})})}var ooe,Sq=iv;ooe=Sq.createRoot,Sq.hydrateRoot;const HVe=ooe(document.getElementById("root")),WVe=[M2e,Q_e,cRe,uRe,IEe,dRe,EBe,K1e,vVe,tRe];HVe.render(C.jsx(Rge,{children:C.jsx(ioe,{slices:WVe,children:C.jsx(UVe,{})})})); diff --git a/assets/parseTrace.worker-0a89fcf6.js b/assets/parseTrace.worker-49d162fd.js similarity index 84% rename from assets/parseTrace.worker-0a89fcf6.js rename to assets/parseTrace.worker-49d162fd.js index 65bad34d..345799f3 100644 --- a/assets/parseTrace.worker-0a89fcf6.js +++ b/assets/parseTrace.worker-49d162fd.js @@ -5,9 +5,9 @@ * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Mt.exports,function(f,l){(function(){var i,p="4.17.21",_=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",y="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",m=500,b="__lodash_placeholder__",q=1,F=2,I=4,M=1,$=2,C=1,P=2,L=4,A=8,E=16,W=32,U=64,J=128,rn=256,Pn=512,gt=30,zt="...",Bi=800,Ht=16,vt=1,Ui=2,Gi=3,Nn=1/0,wn=9007199254740991,De=17976931348623157e292,ae=0/0,$n=4294967295,zi=$n-1,Kt=$n>>>1,Zt=[["ary",J],["bind",C],["bindKey",P],["curry",A],["curryRight",E],["flip",Pn],["partial",W],["partialRight",U],["rearg",rn]],le="[object Arguments]",xe="[object Array]",dt="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",xn="[object Function]",Se="[object GeneratorFunction]",vn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",_t="[object Promise]",Vt="[object Proxy]",an="[object RegExp]",dn="[object Set]",kn="[object String]",Yt="[object Symbol]",Ch="[object Undefined]",mt="[object WeakMap]",Lh="[object WeakSet]",yt="[object ArrayBuffer]",Je="[object DataView]",Hi="[object Float32Array]",Ki="[object Float64Array]",Zi="[object Int8Array]",Vi="[object Int16Array]",Yi="[object Int32Array]",Qi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ji="[object Uint16Array]",ji="[object Uint32Array]",qh=/\b__p \+= '';/g,Fh=/\b(__p \+=) '' \+/g,Mh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vo=/&(?:amp|lt|gt|quot|#39);/g,Yo=/[&<>"']/g,Nh=RegExp(Vo.source),$h=RegExp(Yo.source),Dh=/<%-([\s\S]+?)%>/g,Wh=/<%([\s\S]+?)%>/g,Qo=/<%=([\s\S]+?)%>/g,Bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uh=/^\w*$/,Gh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,zh=RegExp(ki.source),nu=/^\s+/,Hh=/\s/,Kh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zh=/\{\n\/\* \[wrapped with (.+)\] \*/,Vh=/,? & /,Yh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qh=/[()=,{}\[\]\/\s]/,Xh=/\\(\\)?/g,Jh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xo=/\w*$/,jh=/^[-+]0x[0-9a-f]+$/i,kh=/^0b[01]+$/i,np=/^\[object .+?Constructor\]$/,ep=/^0o[0-7]+$/i,tp=/^(?:0|[1-9]\d*)$/,rp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,ip=/['\n\r\u2028\u2029\\]/g,Xt="\\ud800-\\udfff",up="\\u0300-\\u036f",fp="\\ufe20-\\ufe2f",op="\\u20d0-\\u20ff",Jo=up+fp+op,jo="\\u2700-\\u27bf",ko="a-z\\xdf-\\xf6\\xf8-\\xff",ap="\\xac\\xb1\\xd7\\xf7",lp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sp="\\u2000-\\u206f",cp=" \\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",na="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",ta=ap+lp+sp+cp,eu="['’]",hp="["+Xt+"]",ra="["+ta+"]",Jt="["+Jo+"]",ia="\\d+",pp="["+jo+"]",ua="["+ko+"]",fa="[^"+Xt+ta+ia+jo+ko+na+"]",tu="\\ud83c[\\udffb-\\udfff]",gp="(?:"+Jt+"|"+tu+")",oa="[^"+Xt+"]",ru="(?:\\ud83c[\\udde6-\\uddff]){2}",iu="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+na+"]",aa="\\u200d",la="(?:"+ua+"|"+fa+")",vp="(?:"+je+"|"+fa+")",sa="(?:"+eu+"(?:d|ll|m|re|s|t|ve))?",ca="(?:"+eu+"(?:D|LL|M|RE|S|T|VE))?",ha=gp+"?",pa="["+ea+"]?",dp="(?:"+aa+"(?:"+[oa,ru,iu].join("|")+")"+pa+ha+")*",_p="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ga=pa+ha+dp,yp="(?:"+[pp,ru,iu].join("|")+")"+ga,wp="(?:"+[oa+Jt+"?",Jt,ru,iu,hp].join("|")+")",xp=RegExp(eu,"g"),bp=RegExp(Jt,"g"),uu=RegExp(tu+"(?="+tu+")|"+wp+ga,"g"),Sp=RegExp([je+"?"+ua+"+"+sa+"(?="+[ra,je,"$"].join("|")+")",vp+"+"+ca+"(?="+[ra,je+la,"$"].join("|")+")",je+"?"+la+"+"+sa,je+"+"+ca,mp,_p,ia,yp].join("|"),"g"),Ap=RegExp("["+aa+Xt+Jo+ea+"]"),Op=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tp=["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"],Ip=-1,ln={};ln[Hi]=ln[Ki]=ln[Zi]=ln[Vi]=ln[Yi]=ln[Qi]=ln[Xi]=ln[Ji]=ln[ji]=!0,ln[le]=ln[xe]=ln[yt]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[xn]=ln[vn]=ln[Cn]=ln[Hn]=ln[an]=ln[dn]=ln[kn]=ln[mt]=!1;var on={};on[le]=on[xe]=on[yt]=on[Je]=on[se]=on[be]=on[Hi]=on[Ki]=on[Zi]=on[Vi]=on[Yi]=on[vn]=on[Cn]=on[Hn]=on[an]=on[dn]=on[kn]=on[Yt]=on[Qi]=on[Xi]=on[Ji]=on[ji]=!0,on[ie]=on[xn]=on[mt]=!1;var Rp={À:"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"},Ep={"&":"&","<":"<",">":">",'"':""","'":"'"},Pp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Cp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Lp=parseFloat,qp=parseInt,va=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Fp=typeof self=="object"&&self&&self.Object===Object&&self,Sn=va||Fp||Function("return this")(),fu=l&&!l.nodeType&&l,We=fu&&!0&&f&&!f.nodeType&&f,da=We&&We.exports===fu,ou=da&&va.process,Kn=function(){try{var h=We&&We.require&&We.require("util").types;return h||ou&&ou.binding&&ou.binding("util")}catch{}}(),_a=Kn&&Kn.isArrayBuffer,ma=Kn&&Kn.isDate,ya=Kn&&Kn.isMap,wa=Kn&&Kn.isRegExp,xa=Kn&&Kn.isSet,ba=Kn&&Kn.isTypedArray;function Dn(h,S,x){switch(x.length){case 0:return h.call(S);case 1:return h.call(S,x[0]);case 2:return h.call(S,x[0],x[1]);case 3:return h.call(S,x[0],x[1],x[2])}return h.apply(S,x)}function Mp(h,S,x,D){for(var K=-1,nn=h==null?0:h.length;++K-1}function au(h,S,x){for(var D=-1,K=h==null?0:h.length;++D-1;);return x}function Pa(h,S){for(var x=h.length;x--&&ke(S,h[x],0)>-1;);return x}function Hp(h,S){for(var x=h.length,D=0;x--;)h[x]===S&&++D;return D}var Kp=hu(Rp),Zp=hu(Ep);function Vp(h){return"\\"+Cp[h]}function Yp(h,S){return h==null?i:h[S]}function nt(h){return Ap.test(h)}function Qp(h){return Op.test(h)}function Xp(h){for(var S,x=[];!(S=h.next()).done;)x.push(S.value);return x}function du(h){var S=-1,x=Array(h.size);return h.forEach(function(D,K){x[++S]=[K,D]}),x}function Ca(h,S){return function(x){return h(S(x))}}function Ie(h,S){for(var x=-1,D=h.length,K=0,nn=[];++x-1}function $g(n,e){var t=this.__data__,r=vr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ce.prototype.clear=qg,ce.prototype.delete=Fg,ce.prototype.get=Mg,ce.prototype.has=Ng,ce.prototype.set=$g;function he(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,u,a){var s,c=e&q,g=e&F,O=e&I;if(t&&(s=u?t(n,r,u,a):t(n)),s!==i)return s;if(!cn(n))return n;var T=Z(n);if(T){if(s=Uv(n),!c)return Ln(n,s)}else{var R=Tn(n),N=R==xn||R==Se;if(qe(n))return pl(n,c);if(R==Hn||R==le||N&&!u){if(s=g||N?{}:Ll(n),!c)return g?Pv(n,kg(s,n)):Ev(n,za(s,n))}else{if(!on[R])return u?n:{};s=Gv(n,R,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),os(n)?n.forEach(function(H){s.add(Qn(H,e,t,H,n,a))}):us(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,t,X,n,a))});var z=O?g?Gu:Uu:g?Fn:bn,Y=T?i:z(n);return Zn(Y||n,function(H,X){Y&&(X=H,H=n[X]),Tt(s,X,Qn(H,e,t,X,n,a))}),s}function nv(n){var e=bn(n);return function(t){return Ha(t,n,e)}}function Ha(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var u=t[r],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function Ka(n,e,t){if(typeof n!="function")throw new Vn(v);return qt(function(){n.apply(i,t)},e)}function It(n,e,t,r){var u=-1,a=jt,s=!0,c=n.length,g=[],O=e.length;if(!c)return g;t&&(e=sn(e,Wn(t))),r?(a=au,s=!1):e.length>=_&&(a=wt,s=!1,e=new Ge(e));n:for(;++uu?0:u+t),r=r===i||r>u?u:V(r),r<0&&(r+=u),r=t>r?0:ls(r);t0&&t(c)?e>1?An(c,e-1,t,r,u):Te(u,c):r||(u[u.length]=c)}return u}var Su=yl(),Ya=yl(!0);function ue(n,e){return n&&Su(n,e,bn)}function Au(n,e){return n&&Ya(n,e,bn)}function _r(n,e){return Oe(e,function(t){return _e(n[t])})}function He(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function rv(n,e){return n!=null&&tn.call(n,e)}function iv(n,e){return n!=null&&e in fn(n)}function uv(n,e,t){return n>=On(e,t)&&n=120&&T.length>=120)?new Ge(s&&T):i}T=n[0];var R=-1,N=c[0];n:for(;++R-1;)c!==n&&ar.call(c,g,1),ar.call(n,g,1);return n}function ul(n,e){for(var t=n?e.length:0,r=t-1;t--;){var u=e[t];if(t==r||u!==a){var a=u;de(u)?ar.call(n,u,1):Fu(n,u)}}return n}function Cu(n,e){return n+cr(Wa()*(e-n+1))}function mv(n,e,t,r){for(var u=-1,a=yn(sr((e-n)/(t||1)),0),s=x(a);a--;)s[r?a:++u]=n,n+=t;return s}function Lu(n,e){var t="";if(!n||e<1||e>wn)return t;do e%2&&(t+=n),e=cr(e/2),e&&(n+=n);while(e);return t}function Q(n,e){return Qu(Ml(n,e,Mn),n+"")}function yv(n){return Ga(ct(n))}function wv(n,e){var t=ct(n);return Rr(t,ze(e,0,t.length))}function Pt(n,e,t,r){if(!cn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),t=t>u?u:t,t<0&&(t+=u),u=e>t?0:t-e>>>0,e>>>=0;for(var a=x(u);++r>>1,s=n[a];s!==null&&!Un(s)&&(t?s<=e:s=_){var O=e?null:Fv(n);if(O)return nr(O);s=!1,u=wt,g=new Ge}else g=e?[]:c;n:for(;++r=r?n:Xn(n,e,t)}var hl=cg||function(n){return Sn.clearTimeout(n)};function pl(n,e){if(e)return n.slice();var t=n.length,r=Fa?Fa(t):new n.constructor(t);return n.copy(r),r}function Du(n){var e=new n.constructor(n.byteLength);return new fr(e).set(new fr(n)),e}function Ov(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Tv(n){var e=new n.constructor(n.source,Xo.exec(n));return e.lastIndex=n.lastIndex,e}function Iv(n){return Ot?fn(Ot.call(n)):{}}function gl(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function vl(n,e){if(n!==e){var t=n!==i,r=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,g=e===e,O=Un(e);if(!c&&!O&&!a&&n>e||a&&s&&g&&!c&&!O||r&&s&&g||!t&&g||!u)return 1;if(!r&&!a&&!O&&n=c)return g;var O=t[r];return g*(O=="desc"?-1:1)}}return n.index-e.index}function dl(n,e,t,r){for(var u=-1,a=n.length,s=t.length,c=-1,g=e.length,O=yn(a-s,0),T=x(g+O),R=!r;++c1?t[u-1]:i,s=u>2?t[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Rn(t[0],t[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++r-1?u[a?e[s]:s]:i}}function bl(n){return ve(function(e){var t=e.length,r=t,u=Yn.prototype.thru;for(n&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new Vn(v);if(u&&!s&&Tr(a)=="wrapper")var s=new Yn([],!0)}for(r=s?r:t;++r1&&k.reverse(),T&&gc))return!1;var O=a.get(n),T=a.get(e);if(O&&T)return O==e&&T==n;var R=-1,N=!0,B=t&$?new Ge:i;for(a.set(n,e),a.set(e,n);++R1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(Kh,`{ + */Mt.exports,function(f,l){(function(){var i,p="4.17.21",_=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",y="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",m=500,b="__lodash_placeholder__",q=1,F=2,T=4,M=1,$=2,C=1,P=2,L=4,A=8,E=16,W=32,U=64,J=128,rn=256,Pn=512,gt=30,zt="...",Bi=800,Ht=16,vt=1,Ui=2,Gi=3,Nn=1/0,yn=9007199254740991,De=17976931348623157e292,ae=0/0,$n=4294967295,zi=$n-1,Kt=$n>>>1,Zt=[["ary",J],["bind",C],["bindKey",P],["curry",A],["curryRight",E],["flip",Pn],["partial",W],["partialRight",U],["rearg",rn]],le="[object Arguments]",xe="[object Array]",dt="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",wn="[object Function]",Se="[object GeneratorFunction]",vn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",_t="[object Promise]",Vt="[object Proxy]",an="[object RegExp]",dn="[object Set]",kn="[object String]",Yt="[object Symbol]",Ch="[object Undefined]",mt="[object WeakMap]",Lh="[object WeakSet]",yt="[object ArrayBuffer]",Je="[object DataView]",Hi="[object Float32Array]",Ki="[object Float64Array]",Zi="[object Int8Array]",Vi="[object Int16Array]",Yi="[object Int32Array]",Qi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ji="[object Uint16Array]",ji="[object Uint32Array]",qh=/\b__p \+= '';/g,Fh=/\b(__p \+=) '' \+/g,Mh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vo=/&(?:amp|lt|gt|quot|#39);/g,Yo=/[&<>"']/g,Nh=RegExp(Vo.source),$h=RegExp(Yo.source),Dh=/<%-([\s\S]+?)%>/g,Wh=/<%([\s\S]+?)%>/g,Qo=/<%=([\s\S]+?)%>/g,Bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uh=/^\w*$/,Gh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,zh=RegExp(ki.source),nu=/^\s+/,Hh=/\s/,Kh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zh=/\{\n\/\* \[wrapped with (.+)\] \*/,Vh=/,? & /,Yh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qh=/[()=,{}\[\]\/\s]/,Xh=/\\(\\)?/g,Jh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xo=/\w*$/,jh=/^[-+]0x[0-9a-f]+$/i,kh=/^0b[01]+$/i,np=/^\[object .+?Constructor\]$/,ep=/^0o[0-7]+$/i,tp=/^(?:0|[1-9]\d*)$/,rp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,ip=/['\n\r\u2028\u2029\\]/g,Xt="\\ud800-\\udfff",up="\\u0300-\\u036f",fp="\\ufe20-\\ufe2f",op="\\u20d0-\\u20ff",Jo=up+fp+op,jo="\\u2700-\\u27bf",ko="a-z\\xdf-\\xf6\\xf8-\\xff",ap="\\xac\\xb1\\xd7\\xf7",lp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sp="\\u2000-\\u206f",cp=" \\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",na="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",ta=ap+lp+sp+cp,eu="['’]",hp="["+Xt+"]",ra="["+ta+"]",Jt="["+Jo+"]",ia="\\d+",pp="["+jo+"]",ua="["+ko+"]",fa="[^"+Xt+ta+ia+jo+ko+na+"]",tu="\\ud83c[\\udffb-\\udfff]",gp="(?:"+Jt+"|"+tu+")",oa="[^"+Xt+"]",ru="(?:\\ud83c[\\udde6-\\uddff]){2}",iu="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+na+"]",aa="\\u200d",la="(?:"+ua+"|"+fa+")",vp="(?:"+je+"|"+fa+")",sa="(?:"+eu+"(?:d|ll|m|re|s|t|ve))?",ca="(?:"+eu+"(?:D|LL|M|RE|S|T|VE))?",ha=gp+"?",pa="["+ea+"]?",dp="(?:"+aa+"(?:"+[oa,ru,iu].join("|")+")"+pa+ha+")*",_p="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ga=pa+ha+dp,yp="(?:"+[pp,ru,iu].join("|")+")"+ga,wp="(?:"+[oa+Jt+"?",Jt,ru,iu,hp].join("|")+")",xp=RegExp(eu,"g"),bp=RegExp(Jt,"g"),uu=RegExp(tu+"(?="+tu+")|"+wp+ga,"g"),Sp=RegExp([je+"?"+ua+"+"+sa+"(?="+[ra,je,"$"].join("|")+")",vp+"+"+ca+"(?="+[ra,je+la,"$"].join("|")+")",je+"?"+la+"+"+sa,je+"+"+ca,mp,_p,ia,yp].join("|"),"g"),Ap=RegExp("["+aa+Xt+Jo+ea+"]"),Op=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tp=["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"],Ip=-1,ln={};ln[Hi]=ln[Ki]=ln[Zi]=ln[Vi]=ln[Yi]=ln[Qi]=ln[Xi]=ln[Ji]=ln[ji]=!0,ln[le]=ln[xe]=ln[yt]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[wn]=ln[vn]=ln[Cn]=ln[Hn]=ln[an]=ln[dn]=ln[kn]=ln[mt]=!1;var on={};on[le]=on[xe]=on[yt]=on[Je]=on[se]=on[be]=on[Hi]=on[Ki]=on[Zi]=on[Vi]=on[Yi]=on[vn]=on[Cn]=on[Hn]=on[an]=on[dn]=on[kn]=on[Yt]=on[Qi]=on[Xi]=on[Ji]=on[ji]=!0,on[ie]=on[wn]=on[mt]=!1;var Rp={À:"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"},Ep={"&":"&","<":"<",">":">",'"':""","'":"'"},Pp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Cp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Lp=parseFloat,qp=parseInt,va=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Fp=typeof self=="object"&&self&&self.Object===Object&&self,bn=va||Fp||Function("return this")(),fu=l&&!l.nodeType&&l,We=fu&&!0&&f&&!f.nodeType&&f,da=We&&We.exports===fu,ou=da&&va.process,Kn=function(){try{var h=We&&We.require&&We.require("util").types;return h||ou&&ou.binding&&ou.binding("util")}catch{}}(),_a=Kn&&Kn.isArrayBuffer,ma=Kn&&Kn.isDate,ya=Kn&&Kn.isMap,wa=Kn&&Kn.isRegExp,xa=Kn&&Kn.isSet,ba=Kn&&Kn.isTypedArray;function Dn(h,S,x){switch(x.length){case 0:return h.call(S);case 1:return h.call(S,x[0]);case 2:return h.call(S,x[0],x[1]);case 3:return h.call(S,x[0],x[1],x[2])}return h.apply(S,x)}function Mp(h,S,x,D){for(var K=-1,nn=h==null?0:h.length;++K-1}function au(h,S,x){for(var D=-1,K=h==null?0:h.length;++D-1;);return x}function Pa(h,S){for(var x=h.length;x--&&ke(S,h[x],0)>-1;);return x}function Hp(h,S){for(var x=h.length,D=0;x--;)h[x]===S&&++D;return D}var Kp=hu(Rp),Zp=hu(Ep);function Vp(h){return"\\"+Cp[h]}function Yp(h,S){return h==null?i:h[S]}function nt(h){return Ap.test(h)}function Qp(h){return Op.test(h)}function Xp(h){for(var S,x=[];!(S=h.next()).done;)x.push(S.value);return x}function du(h){var S=-1,x=Array(h.size);return h.forEach(function(D,K){x[++S]=[K,D]}),x}function Ca(h,S){return function(x){return h(S(x))}}function Ie(h,S){for(var x=-1,D=h.length,K=0,nn=[];++x-1}function $g(n,e){var t=this.__data__,r=vr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ce.prototype.clear=qg,ce.prototype.delete=Fg,ce.prototype.get=Mg,ce.prototype.has=Ng,ce.prototype.set=$g;function he(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,u,a){var s,c=e&q,g=e&F,O=e&T;if(t&&(s=u?t(n,r,u,a):t(n)),s!==i)return s;if(!cn(n))return n;var I=Z(n);if(I){if(s=Uv(n),!c)return Ln(n,s)}else{var R=On(n),N=R==wn||R==Se;if(qe(n))return pl(n,c);if(R==Hn||R==le||N&&!u){if(s=g||N?{}:Ll(n),!c)return g?Pv(n,kg(s,n)):Ev(n,za(s,n))}else{if(!on[R])return u?n:{};s=Gv(n,R,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),os(n)?n.forEach(function(H){s.add(Qn(H,e,t,H,n,a))}):us(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,t,X,n,a))});var z=O?g?Gu:Uu:g?Fn:xn,Y=I?i:z(n);return Zn(Y||n,function(H,X){Y&&(X=H,H=n[X]),Tt(s,X,Qn(H,e,t,X,n,a))}),s}function nv(n){var e=xn(n);return function(t){return Ha(t,n,e)}}function Ha(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var u=t[r],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function Ka(n,e,t){if(typeof n!="function")throw new Vn(v);return qt(function(){n.apply(i,t)},e)}function It(n,e,t,r){var u=-1,a=jt,s=!0,c=n.length,g=[],O=e.length;if(!c)return g;t&&(e=sn(e,Wn(t))),r?(a=au,s=!1):e.length>=_&&(a=wt,s=!1,e=new Ge(e));n:for(;++uu?0:u+t),r=r===i||r>u?u:V(r),r<0&&(r+=u),r=t>r?0:ls(r);t0&&t(c)?e>1?Sn(c,e-1,t,r,u):Te(u,c):r||(u[u.length]=c)}return u}var Su=yl(),Ya=yl(!0);function ue(n,e){return n&&Su(n,e,xn)}function Au(n,e){return n&&Ya(n,e,xn)}function _r(n,e){return Oe(e,function(t){return _e(n[t])})}function He(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function rv(n,e){return n!=null&&tn.call(n,e)}function iv(n,e){return n!=null&&e in fn(n)}function uv(n,e,t){return n>=An(e,t)&&n=120&&I.length>=120)?new Ge(s&&I):i}I=n[0];var R=-1,N=c[0];n:for(;++R-1;)c!==n&&ar.call(c,g,1),ar.call(n,g,1);return n}function ul(n,e){for(var t=n?e.length:0,r=t-1;t--;){var u=e[t];if(t==r||u!==a){var a=u;de(u)?ar.call(n,u,1):Fu(n,u)}}return n}function Cu(n,e){return n+cr(Wa()*(e-n+1))}function mv(n,e,t,r){for(var u=-1,a=mn(sr((e-n)/(t||1)),0),s=x(a);a--;)s[r?a:++u]=n,n+=t;return s}function Lu(n,e){var t="";if(!n||e<1||e>yn)return t;do e%2&&(t+=n),e=cr(e/2),e&&(n+=n);while(e);return t}function Q(n,e){return Qu(Ml(n,e,Mn),n+"")}function yv(n){return Ga(ct(n))}function wv(n,e){var t=ct(n);return Rr(t,ze(e,0,t.length))}function Pt(n,e,t,r){if(!cn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),t=t>u?u:t,t<0&&(t+=u),u=e>t?0:t-e>>>0,e>>>=0;for(var a=x(u);++r>>1,s=n[a];s!==null&&!Un(s)&&(t?s<=e:s=_){var O=e?null:Fv(n);if(O)return nr(O);s=!1,u=wt,g=new Ge}else g=e?[]:c;n:for(;++r=r?n:Xn(n,e,t)}var hl=cg||function(n){return bn.clearTimeout(n)};function pl(n,e){if(e)return n.slice();var t=n.length,r=Fa?Fa(t):new n.constructor(t);return n.copy(r),r}function Du(n){var e=new n.constructor(n.byteLength);return new fr(e).set(new fr(n)),e}function Ov(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Tv(n){var e=new n.constructor(n.source,Xo.exec(n));return e.lastIndex=n.lastIndex,e}function Iv(n){return Ot?fn(Ot.call(n)):{}}function gl(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function vl(n,e){if(n!==e){var t=n!==i,r=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,g=e===e,O=Un(e);if(!c&&!O&&!a&&n>e||a&&s&&g&&!c&&!O||r&&s&&g||!t&&g||!u)return 1;if(!r&&!a&&!O&&n=c)return g;var O=t[r];return g*(O=="desc"?-1:1)}}return n.index-e.index}function dl(n,e,t,r){for(var u=-1,a=n.length,s=t.length,c=-1,g=e.length,O=mn(a-s,0),I=x(g+O),R=!r;++c1?t[u-1]:i,s=u>2?t[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Rn(t[0],t[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++r-1?u[a?e[s]:s]:i}}function bl(n){return ve(function(e){var t=e.length,r=t,u=Yn.prototype.thru;for(n&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new Vn(v);if(u&&!s&&Tr(a)=="wrapper")var s=new Yn([],!0)}for(r=s?r:t;++r1&&k.reverse(),I&&gc))return!1;var O=a.get(n),I=a.get(e);if(O&&I)return O==e&&I==n;var R=-1,N=!0,B=t&$?new Ge:i;for(a.set(n,e),a.set(e,n);++R1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(Kh,`{ /* [wrapped with `+e+`] */ -`)}function Hv(n){return Z(n)||Ve(n)||!!($a&&n&&n[$a])}function de(n,e){var t=typeof n;return e=e??wn,!!e&&(t=="number"||t!="symbol"&&tp.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Bi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Rr(n,e){var t=-1,r=n.length,u=r-1;for(e=e===i?r:e;++t1?n[e-1]:i;return t=typeof t=="function"?(n.pop(),t):i,Vl(n,t)});function Yl(n){var e=o(n);return e.__chain__=!0,e}function e_(n,e){return e(n),n}function Er(n,e){return e(n)}var t_=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,u=function(a){return bu(a,n)};return e>1||this.__actions__.length||!(r instanceof j)||!de(t)?this.thru(u):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Er,args:[u],thisArg:i}),new Yn(r,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function r_(){return Yl(this)}function i_(){return new Yn(this.value(),this.__chain__)}function u_(){this.__values__===i&&(this.__values__=as(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function f_(){return this}function o_(n){for(var e,t=this;t instanceof gr;){var r=Ul(t);r.__index__=0,r.__values__=i,e?u.__wrapped__=r:e=r;var u=r;t=t.__wrapped__}return u.__wrapped__=n,e}function a_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Er,args:[Xu],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(Xu)}function l_(){return sl(this.__wrapped__,this.__actions__)}var s_=xr(function(n,e,t){tn.call(n,t)?++n[t]:pe(n,t,1)});function c_(n,e,t){var r=Z(n)?Sa:ev;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}function h_(n,e){var t=Z(n)?Oe:Va;return t(n,G(e,3))}var p_=xl(Gl),g_=xl(zl);function v_(n,e){return An(Pr(n,e),1)}function d_(n,e){return An(Pr(n,e),Nn)}function __(n,e,t){return t=t===i?1:V(t),An(Pr(n,e),t)}function Ql(n,e){var t=Z(n)?Zn:Ee;return t(n,G(e,3))}function Xl(n,e){var t=Z(n)?Np:Za;return t(n,G(e,3))}var m_=xr(function(n,e,t){tn.call(n,t)?n[t].push(e):pe(n,t,[e])});function y_(n,e,t,r){n=qn(n)?n:ct(n),t=t&&!r?V(t):0;var u=n.length;return t<0&&(t=yn(u+t,0)),Mr(n)?t<=u&&n.indexOf(e,t)>-1:!!u&&ke(n,e,t)>-1}var w_=Q(function(n,e,t){var r=-1,u=typeof e=="function",a=qn(n)?x(n.length):[];return Ee(n,function(s){a[++r]=u?Dn(e,s,t):Rt(s,e,t)}),a}),x_=xr(function(n,e,t){pe(n,t,e)});function Pr(n,e){var t=Z(n)?sn:ka;return t(n,G(e,3))}function b_(n,e,t,r){return n==null?[]:(Z(e)||(e=e==null?[]:[e]),t=r?i:t,Z(t)||(t=t==null?[]:[t]),rl(n,e,t))}var S_=xr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function A_(n,e,t){var r=Z(n)?lu:Ia,u=arguments.length<3;return r(n,G(e,4),t,u,Ee)}function O_(n,e,t){var r=Z(n)?$p:Ia,u=arguments.length<3;return r(n,G(e,4),t,u,Za)}function T_(n,e){var t=Z(n)?Oe:Va;return t(n,qr(G(e,3)))}function I_(n){var e=Z(n)?Ga:yv;return e(n)}function R_(n,e,t){(t?Rn(n,e,t):e===i)?e=1:e=V(e);var r=Z(n)?Xg:wv;return r(n,e)}function E_(n){var e=Z(n)?Jg:bv;return e(n)}function P_(n){if(n==null)return 0;if(qn(n))return Mr(n)?et(n):n.length;var e=Tn(n);return e==vn||e==dn?n.size:Ru(n).length}function C_(n,e,t){var r=Z(n)?su:Sv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}var L_=Q(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Rn(n,e[0],e[1])?e=[]:t>2&&Rn(e[0],e[1],e[2])&&(e=[e[0]]),rl(n,An(e,1),[])}),Cr=hg||function(){return Sn.Date.now()};function q_(n,e){if(typeof e!="function")throw new Vn(v);return n=V(n),function(){if(--n<1)return e.apply(this,arguments)}}function Jl(n,e,t){return e=t?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function jl(n,e){var t;if(typeof e!="function")throw new Vn(v);return n=V(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=i),t}}var ju=Q(function(n,e,t){var r=C;if(t.length){var u=Ie(t,lt(ju));r|=W}return ge(n,r,e,t,u)}),kl=Q(function(n,e,t){var r=C|P;if(t.length){var u=Ie(t,lt(kl));r|=W}return ge(e,r,n,t,u)});function ns(n,e,t){e=t?i:e;var r=ge(n,A,i,i,i,i,i,e);return r.placeholder=ns.placeholder,r}function es(n,e,t){e=t?i:e;var r=ge(n,E,i,i,i,i,i,e);return r.placeholder=es.placeholder,r}function ts(n,e,t){var r,u,a,s,c,g,O=0,T=!1,R=!1,N=!0;if(typeof n!="function")throw new Vn(v);e=jn(e)||0,cn(t)&&(T=!!t.leading,R="maxWait"in t,a=R?yn(jn(t.maxWait)||0,e):a,N="trailing"in t?!!t.trailing:N);function B(gn){var re=r,ye=u;return r=u=i,O=gn,s=n.apply(ye,re),s}function z(gn){return O=gn,c=qt(X,e),T?B(gn):s}function Y(gn){var re=gn-g,ye=gn-O,xs=e-re;return R?On(xs,a-ye):xs}function H(gn){var re=gn-g,ye=gn-O;return g===i||re>=e||re<0||R&&ye>=a}function X(){var gn=Cr();if(H(gn))return k(gn);c=qt(X,Y(gn))}function k(gn){return c=i,N&&r?B(gn):(r=u=i,s)}function Gn(){c!==i&&hl(c),O=0,r=g=u=c=i}function En(){return c===i?s:k(Cr())}function zn(){var gn=Cr(),re=H(gn);if(r=arguments,u=this,g=gn,re){if(c===i)return z(g);if(R)return hl(c),c=qt(X,e),B(g)}return c===i&&(c=qt(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var F_=Q(function(n,e){return Ka(n,1,e)}),M_=Q(function(n,e,t){return Ka(n,jn(e)||0,t)});function N_(n){return ge(n,Pn)}function Lr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Vn(v);var t=function(){var r=arguments,u=e?e.apply(this,r):r[0],a=t.cache;if(a.has(u))return a.get(u);var s=n.apply(this,r);return t.cache=a.set(u,s)||a,s};return t.cache=new(Lr.Cache||he),t}Lr.Cache=he;function qr(n){if(typeof n!="function")throw new Vn(v);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 $_(n){return jl(2,n)}var D_=Av(function(n,e){e=e.length==1&&Z(e[0])?sn(e[0],Wn(G())):sn(An(e,1),Wn(G()));var t=e.length;return Q(function(r){for(var u=-1,a=On(r.length,t);++u=e}),Ve=Xa(function(){return arguments}())?Xa:function(n){return hn(n)&&tn.call(n,"callee")&&!Na.call(n,"callee")},Z=x.isArray,k_=_a?Wn(_a):ov;function qn(n){return n!=null&&Fr(n.length)&&!_e(n)}function pn(n){return hn(n)&&qn(n)}function n0(n){return n===!0||n===!1||hn(n)&&In(n)==se}var qe=gg||cf,e0=ma?Wn(ma):av;function t0(n){return hn(n)&&n.nodeType===1&&!Ft(n)}function r0(n){if(n==null)return!0;if(qn(n)&&(Z(n)||typeof n=="string"||typeof n.splice=="function"||qe(n)||st(n)||Ve(n)))return!n.length;var e=Tn(n);if(e==vn||e==dn)return!n.size;if(Lt(n))return!Ru(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function i0(n,e){return Et(n,e)}function u0(n,e,t){t=typeof t=="function"?t:i;var r=t?t(n,e):i;return r===i?Et(n,e,i,t):!!r}function nf(n){if(!hn(n))return!1;var e=In(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Ft(n)}function f0(n){return typeof n=="number"&&Da(n)}function _e(n){if(!cn(n))return!1;var e=In(n);return e==xn||e==Se||e==dt||e==Vt}function is(n){return typeof n=="number"&&n==V(n)}function Fr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wn}function cn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function hn(n){return n!=null&&typeof n=="object"}var us=ya?Wn(ya):sv;function o0(n,e){return n===e||Iu(n,e,Hu(e))}function a0(n,e,t){return t=typeof t=="function"?t:i,Iu(n,e,Hu(e),t)}function l0(n){return fs(n)&&n!=+n}function s0(n){if(Vv(n))throw new K(d);return Ja(n)}function c0(n){return n===null}function h0(n){return n==null}function fs(n){return typeof n=="number"||hn(n)&&In(n)==Cn}function Ft(n){if(!hn(n)||In(n)!=Hn)return!1;var e=or(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&rr.call(t)==ag}var ef=wa?Wn(wa):cv;function p0(n){return is(n)&&n>=-wn&&n<=wn}var os=xa?Wn(xa):hv;function Mr(n){return typeof n=="string"||!Z(n)&&hn(n)&&In(n)==kn}function Un(n){return typeof n=="symbol"||hn(n)&&In(n)==Yt}var st=ba?Wn(ba):pv;function g0(n){return n===i}function v0(n){return hn(n)&&Tn(n)==mt}function d0(n){return hn(n)&&In(n)==Lh}var _0=Or(Eu),m0=Or(function(n,e){return n<=e});function as(n){if(!n)return[];if(qn(n))return Mr(n)?ne(n):Ln(n);if(xt&&n[xt])return Xp(n[xt]());var e=Tn(n),t=e==vn?du:e==dn?nr:ct;return t(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*De}return n===n?n:0}function V(n){var e=me(n),t=e%1;return e===e?t?e-t:e:0}function ls(n){return n?ze(V(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(cn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=cn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Ra(n);var t=kh.test(n);return t||ep.test(n)?qp(n.slice(2),t?2:8):jh.test(n)?ae:+n}function ss(n){return fe(n,Fn(n))}function y0(n){return n?ze(V(n),-wn,wn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var w0=ot(function(n,e){if(Lt(e)||qn(e)){fe(e,bn(e),n);return}for(var t in e)tn.call(e,t)&&Tt(n,t,e[t])}),cs=ot(function(n,e){fe(e,Fn(e),n)}),Nr=ot(function(n,e,t,r){fe(e,Fn(e),n,r)}),x0=ot(function(n,e,t,r){fe(e,bn(e),n,r)}),b0=ve(bu);function S0(n,e){var t=ft(n);return e==null?t:za(t,e)}var A0=Q(function(n,e){n=fn(n);var t=-1,r=e.length,u=r>2?e[2]:i;for(u&&Rn(e[0],e[1],u)&&(r=1);++t1),a}),fe(n,Gu(n),t),r&&(t=Qn(t,q|F|I,Mv));for(var u=e.length;u--;)Fu(t,e[u]);return t});function G0(n,e){return ps(n,qr(G(e)))}var z0=ve(function(n,e){return n==null?{}:dv(n,e)});function ps(n,e){if(n==null)return{};var t=sn(Gu(n),function(r){return[r]});return e=G(e),il(n,t,function(r,u){return e(r,u[0])})}function H0(n,e,t){e=Ce(e,n);var r=-1,u=e.length;for(u||(u=1,n=i);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var u=Wa();return On(n+u*(e-n+Lp("1e-"+((u+"").length-1))),e)}return Cu(n,e)}var e1=at(function(n,e,t){return e=e.toLowerCase(),n+(t?ds(e):e)});function ds(n){return uf(en(n).toLowerCase())}function _s(n){return n=en(n),n&&n.replace(rp,Kp).replace(bp,"")}function t1(n,e,t){n=en(n),e=Bn(e);var r=n.length;t=t===i?r:ze(V(t),0,r);var u=t;return t-=e.length,t>=0&&n.slice(t,u)==e}function r1(n){return n=en(n),n&&$h.test(n)?n.replace(Yo,Zp):n}function i1(n){return n=en(n),n&&zh.test(n)?n.replace(ki,"\\$&"):n}var u1=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),f1=at(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),o1=wl("toLowerCase");function a1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;if(!e||r>=e)return n;var u=(e-r)/2;return Ar(cr(u),t)+n+Ar(sr(u),t)}function l1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;return e&&r>>0,t?(n=en(n),n&&(typeof e=="string"||e!=null&&!ef(e))&&(e=Bn(e),!e&&nt(n))?Le(ne(n),0,t):n.split(e,t)):[]}var d1=at(function(n,e,t){return n+(t?" ":"")+uf(e)});function _1(n,e,t){return n=en(n),t=t==null?0:ze(V(t),0,n.length),e=Bn(e),n.slice(t,t+e.length)==e}function m1(n,e,t){var r=o.templateSettings;t&&Rn(n,e,t)&&(e=i),n=en(n),e=Nr({},e,r,Il);var u=Nr({},e.imports,r.imports,Il),a=bn(u),s=vu(u,a),c,g,O=0,T=e.interpolate||Qt,R="__p += '",N=_u((e.escape||Qt).source+"|"+T.source+"|"+(T===Qo?Jh:Qt).source+"|"+(e.evaluate||Qt).source+"|$","g"),B="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ip+"]")+` +`)}function Hv(n){return Z(n)||Ve(n)||!!($a&&n&&n[$a])}function de(n,e){var t=typeof n;return e=e??yn,!!e&&(t=="number"||t!="symbol"&&tp.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Bi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Rr(n,e){var t=-1,r=n.length,u=r-1;for(e=e===i?r:e;++t1?n[e-1]:i;return t=typeof t=="function"?(n.pop(),t):i,Vl(n,t)});function Yl(n){var e=o(n);return e.__chain__=!0,e}function e_(n,e){return e(n),n}function Er(n,e){return e(n)}var t_=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,u=function(a){return bu(a,n)};return e>1||this.__actions__.length||!(r instanceof j)||!de(t)?this.thru(u):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Er,args:[u],thisArg:i}),new Yn(r,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function r_(){return Yl(this)}function i_(){return new Yn(this.value(),this.__chain__)}function u_(){this.__values__===i&&(this.__values__=as(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function f_(){return this}function o_(n){for(var e,t=this;t instanceof gr;){var r=Ul(t);r.__index__=0,r.__values__=i,e?u.__wrapped__=r:e=r;var u=r;t=t.__wrapped__}return u.__wrapped__=n,e}function a_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Er,args:[Xu],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(Xu)}function l_(){return sl(this.__wrapped__,this.__actions__)}var s_=xr(function(n,e,t){tn.call(n,t)?++n[t]:pe(n,t,1)});function c_(n,e,t){var r=Z(n)?Sa:ev;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}function h_(n,e){var t=Z(n)?Oe:Va;return t(n,G(e,3))}var p_=xl(Gl),g_=xl(zl);function v_(n,e){return Sn(Pr(n,e),1)}function d_(n,e){return Sn(Pr(n,e),Nn)}function __(n,e,t){return t=t===i?1:V(t),Sn(Pr(n,e),t)}function Ql(n,e){var t=Z(n)?Zn:Ee;return t(n,G(e,3))}function Xl(n,e){var t=Z(n)?Np:Za;return t(n,G(e,3))}var m_=xr(function(n,e,t){tn.call(n,t)?n[t].push(e):pe(n,t,[e])});function y_(n,e,t,r){n=qn(n)?n:ct(n),t=t&&!r?V(t):0;var u=n.length;return t<0&&(t=mn(u+t,0)),Mr(n)?t<=u&&n.indexOf(e,t)>-1:!!u&&ke(n,e,t)>-1}var w_=Q(function(n,e,t){var r=-1,u=typeof e=="function",a=qn(n)?x(n.length):[];return Ee(n,function(s){a[++r]=u?Dn(e,s,t):Rt(s,e,t)}),a}),x_=xr(function(n,e,t){pe(n,t,e)});function Pr(n,e){var t=Z(n)?sn:ka;return t(n,G(e,3))}function b_(n,e,t,r){return n==null?[]:(Z(e)||(e=e==null?[]:[e]),t=r?i:t,Z(t)||(t=t==null?[]:[t]),rl(n,e,t))}var S_=xr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function A_(n,e,t){var r=Z(n)?lu:Ia,u=arguments.length<3;return r(n,G(e,4),t,u,Ee)}function O_(n,e,t){var r=Z(n)?$p:Ia,u=arguments.length<3;return r(n,G(e,4),t,u,Za)}function T_(n,e){var t=Z(n)?Oe:Va;return t(n,qr(G(e,3)))}function I_(n){var e=Z(n)?Ga:yv;return e(n)}function R_(n,e,t){(t?Rn(n,e,t):e===i)?e=1:e=V(e);var r=Z(n)?Xg:wv;return r(n,e)}function E_(n){var e=Z(n)?Jg:bv;return e(n)}function P_(n){if(n==null)return 0;if(qn(n))return Mr(n)?et(n):n.length;var e=On(n);return e==vn||e==dn?n.size:Ru(n).length}function C_(n,e,t){var r=Z(n)?su:Sv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}var L_=Q(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Rn(n,e[0],e[1])?e=[]:t>2&&Rn(e[0],e[1],e[2])&&(e=[e[0]]),rl(n,Sn(e,1),[])}),Cr=hg||function(){return bn.Date.now()};function q_(n,e){if(typeof e!="function")throw new Vn(v);return n=V(n),function(){if(--n<1)return e.apply(this,arguments)}}function Jl(n,e,t){return e=t?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function jl(n,e){var t;if(typeof e!="function")throw new Vn(v);return n=V(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=i),t}}var ju=Q(function(n,e,t){var r=C;if(t.length){var u=Ie(t,lt(ju));r|=W}return ge(n,r,e,t,u)}),kl=Q(function(n,e,t){var r=C|P;if(t.length){var u=Ie(t,lt(kl));r|=W}return ge(e,r,n,t,u)});function ns(n,e,t){e=t?i:e;var r=ge(n,A,i,i,i,i,i,e);return r.placeholder=ns.placeholder,r}function es(n,e,t){e=t?i:e;var r=ge(n,E,i,i,i,i,i,e);return r.placeholder=es.placeholder,r}function ts(n,e,t){var r,u,a,s,c,g,O=0,I=!1,R=!1,N=!0;if(typeof n!="function")throw new Vn(v);e=jn(e)||0,cn(t)&&(I=!!t.leading,R="maxWait"in t,a=R?mn(jn(t.maxWait)||0,e):a,N="trailing"in t?!!t.trailing:N);function B(gn){var re=r,ye=u;return r=u=i,O=gn,s=n.apply(ye,re),s}function z(gn){return O=gn,c=qt(X,e),I?B(gn):s}function Y(gn){var re=gn-g,ye=gn-O,xs=e-re;return R?An(xs,a-ye):xs}function H(gn){var re=gn-g,ye=gn-O;return g===i||re>=e||re<0||R&&ye>=a}function X(){var gn=Cr();if(H(gn))return k(gn);c=qt(X,Y(gn))}function k(gn){return c=i,N&&r?B(gn):(r=u=i,s)}function Gn(){c!==i&&hl(c),O=0,r=g=u=c=i}function En(){return c===i?s:k(Cr())}function zn(){var gn=Cr(),re=H(gn);if(r=arguments,u=this,g=gn,re){if(c===i)return z(g);if(R)return hl(c),c=qt(X,e),B(g)}return c===i&&(c=qt(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var F_=Q(function(n,e){return Ka(n,1,e)}),M_=Q(function(n,e,t){return Ka(n,jn(e)||0,t)});function N_(n){return ge(n,Pn)}function Lr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Vn(v);var t=function(){var r=arguments,u=e?e.apply(this,r):r[0],a=t.cache;if(a.has(u))return a.get(u);var s=n.apply(this,r);return t.cache=a.set(u,s)||a,s};return t.cache=new(Lr.Cache||he),t}Lr.Cache=he;function qr(n){if(typeof n!="function")throw new Vn(v);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 $_(n){return jl(2,n)}var D_=Av(function(n,e){e=e.length==1&&Z(e[0])?sn(e[0],Wn(G())):sn(Sn(e,1),Wn(G()));var t=e.length;return Q(function(r){for(var u=-1,a=An(r.length,t);++u=e}),Ve=Xa(function(){return arguments}())?Xa:function(n){return hn(n)&&tn.call(n,"callee")&&!Na.call(n,"callee")},Z=x.isArray,k_=_a?Wn(_a):ov;function qn(n){return n!=null&&Fr(n.length)&&!_e(n)}function pn(n){return hn(n)&&qn(n)}function n0(n){return n===!0||n===!1||hn(n)&&In(n)==se}var qe=gg||cf,e0=ma?Wn(ma):av;function t0(n){return hn(n)&&n.nodeType===1&&!Ft(n)}function r0(n){if(n==null)return!0;if(qn(n)&&(Z(n)||typeof n=="string"||typeof n.splice=="function"||qe(n)||st(n)||Ve(n)))return!n.length;var e=On(n);if(e==vn||e==dn)return!n.size;if(Lt(n))return!Ru(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function i0(n,e){return Et(n,e)}function u0(n,e,t){t=typeof t=="function"?t:i;var r=t?t(n,e):i;return r===i?Et(n,e,i,t):!!r}function nf(n){if(!hn(n))return!1;var e=In(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Ft(n)}function f0(n){return typeof n=="number"&&Da(n)}function _e(n){if(!cn(n))return!1;var e=In(n);return e==wn||e==Se||e==dt||e==Vt}function is(n){return typeof n=="number"&&n==V(n)}function Fr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=yn}function cn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function hn(n){return n!=null&&typeof n=="object"}var us=ya?Wn(ya):sv;function o0(n,e){return n===e||Iu(n,e,Hu(e))}function a0(n,e,t){return t=typeof t=="function"?t:i,Iu(n,e,Hu(e),t)}function l0(n){return fs(n)&&n!=+n}function s0(n){if(Vv(n))throw new K(d);return Ja(n)}function c0(n){return n===null}function h0(n){return n==null}function fs(n){return typeof n=="number"||hn(n)&&In(n)==Cn}function Ft(n){if(!hn(n)||In(n)!=Hn)return!1;var e=or(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&rr.call(t)==ag}var ef=wa?Wn(wa):cv;function p0(n){return is(n)&&n>=-yn&&n<=yn}var os=xa?Wn(xa):hv;function Mr(n){return typeof n=="string"||!Z(n)&&hn(n)&&In(n)==kn}function Un(n){return typeof n=="symbol"||hn(n)&&In(n)==Yt}var st=ba?Wn(ba):pv;function g0(n){return n===i}function v0(n){return hn(n)&&On(n)==mt}function d0(n){return hn(n)&&In(n)==Lh}var _0=Or(Eu),m0=Or(function(n,e){return n<=e});function as(n){if(!n)return[];if(qn(n))return Mr(n)?ne(n):Ln(n);if(xt&&n[xt])return Xp(n[xt]());var e=On(n),t=e==vn?du:e==dn?nr:ct;return t(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*De}return n===n?n:0}function V(n){var e=me(n),t=e%1;return e===e?t?e-t:e:0}function ls(n){return n?ze(V(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(cn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=cn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Ra(n);var t=kh.test(n);return t||ep.test(n)?qp(n.slice(2),t?2:8):jh.test(n)?ae:+n}function ss(n){return fe(n,Fn(n))}function y0(n){return n?ze(V(n),-yn,yn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var w0=ot(function(n,e){if(Lt(e)||qn(e)){fe(e,xn(e),n);return}for(var t in e)tn.call(e,t)&&Tt(n,t,e[t])}),cs=ot(function(n,e){fe(e,Fn(e),n)}),Nr=ot(function(n,e,t,r){fe(e,Fn(e),n,r)}),x0=ot(function(n,e,t,r){fe(e,xn(e),n,r)}),b0=ve(bu);function S0(n,e){var t=ft(n);return e==null?t:za(t,e)}var A0=Q(function(n,e){n=fn(n);var t=-1,r=e.length,u=r>2?e[2]:i;for(u&&Rn(e[0],e[1],u)&&(r=1);++t1),a}),fe(n,Gu(n),t),r&&(t=Qn(t,q|F|T,Mv));for(var u=e.length;u--;)Fu(t,e[u]);return t});function G0(n,e){return ps(n,qr(G(e)))}var z0=ve(function(n,e){return n==null?{}:dv(n,e)});function ps(n,e){if(n==null)return{};var t=sn(Gu(n),function(r){return[r]});return e=G(e),il(n,t,function(r,u){return e(r,u[0])})}function H0(n,e,t){e=Ce(e,n);var r=-1,u=e.length;for(u||(u=1,n=i);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var u=Wa();return An(n+u*(e-n+Lp("1e-"+((u+"").length-1))),e)}return Cu(n,e)}var e1=at(function(n,e,t){return e=e.toLowerCase(),n+(t?ds(e):e)});function ds(n){return uf(en(n).toLowerCase())}function _s(n){return n=en(n),n&&n.replace(rp,Kp).replace(bp,"")}function t1(n,e,t){n=en(n),e=Bn(e);var r=n.length;t=t===i?r:ze(V(t),0,r);var u=t;return t-=e.length,t>=0&&n.slice(t,u)==e}function r1(n){return n=en(n),n&&$h.test(n)?n.replace(Yo,Zp):n}function i1(n){return n=en(n),n&&zh.test(n)?n.replace(ki,"\\$&"):n}var u1=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),f1=at(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),o1=wl("toLowerCase");function a1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;if(!e||r>=e)return n;var u=(e-r)/2;return Ar(cr(u),t)+n+Ar(sr(u),t)}function l1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;return e&&r>>0,t?(n=en(n),n&&(typeof e=="string"||e!=null&&!ef(e))&&(e=Bn(e),!e&&nt(n))?Le(ne(n),0,t):n.split(e,t)):[]}var d1=at(function(n,e,t){return n+(t?" ":"")+uf(e)});function _1(n,e,t){return n=en(n),t=t==null?0:ze(V(t),0,n.length),e=Bn(e),n.slice(t,t+e.length)==e}function m1(n,e,t){var r=o.templateSettings;t&&Rn(n,e,t)&&(e=i),n=en(n),e=Nr({},e,r,Il);var u=Nr({},e.imports,r.imports,Il),a=xn(u),s=vu(u,a),c,g,O=0,I=e.interpolate||Qt,R="__p += '",N=_u((e.escape||Qt).source+"|"+I.source+"|"+(I===Qo?Jh:Qt).source+"|"+(e.evaluate||Qt).source+"|$","g"),B="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ip+"]")+` `;n.replace(N,function(H,X,k,Gn,En,zn){return k||(k=Gn),R+=n.slice(O,zn).replace(ip,Vp),X&&(c=!0,R+=`' + __e(`+X+`) + '`),En&&(g=!0,R+=`'; @@ -24,5 +24,5 @@ __p += '`),k&&(R+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+R+`return __p -}`;var Y=ys(function(){return nn(a,B+"return "+R).apply(i,s)});if(Y.source=R,nf(Y))throw Y;return Y}function y1(n){return en(n).toLowerCase()}function w1(n){return en(n).toUpperCase()}function x1(n,e,t){if(n=en(n),n&&(t||e===i))return Ra(n);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ne(e),a=Ea(r,u),s=Pa(r,u)+1;return Le(r,a,s).join("")}function b1(n,e,t){if(n=en(n),n&&(t||e===i))return n.slice(0,La(n)+1);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Pa(r,ne(e))+1;return Le(r,0,u).join("")}function S1(n,e,t){if(n=en(n),n&&(t||e===i))return n.replace(nu,"");if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Ea(r,ne(e));return Le(r,u).join("")}function A1(n,e){var t=gt,r=zt;if(cn(e)){var u="separator"in e?e.separator:u;t="length"in e?V(e.length):t,r="omission"in e?Bn(e.omission):r}n=en(n);var a=n.length;if(nt(n)){var s=ne(n);a=s.length}if(t>=a)return n;var c=t-et(r);if(c<1)return r;var g=s?Le(s,0,c).join(""):n.slice(0,c);if(u===i)return g+r;if(s&&(c+=g.length-c),ef(u)){if(n.slice(c).search(u)){var O,T=g;for(u.global||(u=_u(u.source,en(Xo.exec(u))+"g")),u.lastIndex=0;O=u.exec(T);)var R=O.index;g=g.slice(0,R===i?c:R)}}else if(n.indexOf(Bn(u),c)!=c){var N=g.lastIndexOf(u);N>-1&&(g=g.slice(0,N))}return g+r}function O1(n){return n=en(n),n&&Nh.test(n)?n.replace(Vo,ng):n}var T1=at(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),uf=wl("toUpperCase");function ms(n,e,t){return n=en(n),e=t?i:e,e===i?Qp(n)?rg(n):Bp(n):n.match(e)||[]}var ys=Q(function(n,e){try{return Dn(n,i,e)}catch(t){return nf(t)?t:new K(t)}}),I1=ve(function(n,e){return Zn(e,function(t){t=oe(t),pe(n,t,ju(n[t],n))}),n});function R1(n){var e=n==null?0:n.length,t=G();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new Vn(v);return[t(r[0]),r[1]]}):[],Q(function(r){for(var u=-1;++uwn)return[];var t=$n,r=On(n,$n);e=G(e),n-=$n;for(var u=gu(r,e);++t0||e<0)?new j(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=V(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),u=o[r?"take"+(e=="last"?"Right":""):e],a=r||/^find/.test(e);u&&(o.prototype[e]=function(){var s=this.__wrapped__,c=r?[1]:arguments,g=s instanceof j,O=c[0],T=g||Z(s),R=function(X){var k=u.apply(o,Te([X],c));return r&&N?k[0]:k};T&&t&&typeof O=="function"&&O.length!=1&&(g=T=!1);var N=this.__chain__,B=!!this.__actions__.length,z=a&&!N,Y=g&&!B;if(!a&&T){s=Y?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Er,args:[R],thisArg:i}),new Yn(H,N)}return z&&Y?n.apply(this,c):(H=this.thru(R),z?r?H.value()[0]:H.value():H)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=er[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);o.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Z(a)?a:[],u)}return this[t](function(s){return e.apply(Z(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var t=o[e];if(t){var r=t.name+"";tn.call(ut,r)||(ut[r]=[]),ut[r].push({name:e,func:t})}}),ut[br(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=Og,j.prototype.reverse=Tg,j.prototype.value=Ig,o.prototype.at=t_,o.prototype.chain=r_,o.prototype.commit=i_,o.prototype.next=u_,o.prototype.plant=o_,o.prototype.reverse=a_,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=l_,o.prototype.first=o.prototype.head,xt&&(o.prototype[xt]=f_),o},tt=ig();We?((We.exports=tt)._=tt,fu._=tt):Sn._=tt}).call(Ye)}(Mt,Mt.exports);var _n=Mt.exports;function $r(f={},l){const{$:i,...p}=f;return{..._n.mapValues(p,l),$:i}}var hf={exports:{}};(function(f,l){(function(i,p){f.exports=p()})(Ye,function(){return function(i){function p(d){if(_[d])return _[d].exports;var v=_[d]={i:d,l:!1,exports:{}};return i[d].call(v.exports,v,v.exports,p),v.l=!0,v.exports}var _={};return p.m=i,p.c=_,p.d=function(d,v,y){p.o(d,v)||Object.defineProperty(d,v,{configurable:!1,enumerable:!0,get:y})},p.n=function(d){var v=d&&d.__esModule?function(){return d.default}:function(){return d};return p.d(v,"a",v),v},p.o=function(d,v){return Object.prototype.hasOwnProperty.call(d,v)},p.p="",p(p.s=1)}([function(i,p,_){function d(y){var w=y===void 0?{}:y,m=w.ESCAPE,b=m===void 0?/^\\/:m,q=w.VARIABLE_START,F=q===void 0?/^\${\s*/:q,I=w.VARIABLE_END,M=I===void 0?/^\s*}/:I,$=w.PIPE_START,C=$===void 0?/^\s*\|\s*/:$,P=w.PIPE_PARAMETER_START,L=P===void 0?/^\s*:\s*/:P,A=w.QUOTED_STRING,E=A===void 0?p.DEFAULT_QUOTED_STRING_REGEX:A,W=w.QUOTED_STRING_TEST,U=W===void 0?null:W,J=w.QUOTED_STRING_GET_AND_ADVANCE,rn=J===void 0?null:J,Pn=w.QUOTED_STRING_IN_PARAMETER_TEST,gt=Pn===void 0?null:Pn,zt=w.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Bi=zt===void 0?null:zt,Ht=U||function(Nn){return E.test(Nn)},vt=rn||v(E),Ui=gt||function(Nn){return E.test(Nn)},Gi=Bi||v(E);return function(Nn){function wn(an){an===void 0&&(an=1),un=un.substr(an)}function De(an){an===void 0&&(an=/^/),wn(un.match(an)[0].length)}function ae(){var an;return De(b),an=un.length>0?un[0]:"",wn(),an}function $n(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;vn={name:"",pipes:[]},Hn=!kn}function zi(){ie.variables.push(vn),$n({isNull:!0})}function Kt(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;Cn={name:"",parameters:[]},_t=!kn}function Zt(){vn.pipes.push(Cn),Kt({isNull:!0})}function le(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;Ae="",Vt=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function dt(){return!!M.test(un)&&(De(M),xn>=3&&xe(),xn>=2&&Zt(),xn>=1&&zi(),xn=0,!0)}function se(){return!!C.test(un)&&(De(C),xn>=3&&xe(),xn>=2&&Zt(),xn>=1&&Kt(),xn=2,!0)}function be(){return!!L.test(un)&&(De(L),xn>=3&&xe(),xn>=2&&le(),xn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},xn=0,Se="",vn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,_t=!1,Vt=!1;un&&un.length>0;)switch(xn){case 0:if(b.test(un)){Se+=ae();continue}if(F.test(un)){xn=1,$n(),ie.literals.push(Se),Se="",De(F);continue}Se+=un[0],wn();break;case 1:if(b.test(un)){vn.name+=ae();continue}if(dt()||se())continue;if(Ht(un)){vn.name+=vt(un,wn);continue}vn.name+=un[0],wn();break;case 2:if(b.test(un)){Cn.name+=ae();continue}if(dt()||be()||se())continue;if(Ht(un)){Cn.name+=vt(un,wn);continue}Cn.name+=un[0],wn();break;case 3:if(b.test(un)){Ae+=ae();continue}if(dt()||be()||se())continue;if(Ui(un)){Ae+=Gi(un,wn);continue}Ae+=un[0],wn()}return Vt&&Cn.parameters.push(Ae),_t&&vn.pipes.push(Cn),Hn&&ie.variables.push(vn),ie.literals.push(Se),ie}}function v(y){return function(w,m){var b=w.match(y);return m(b[0].length),b.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(p,"__esModule",{value:!0}),p.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,p.parseStringTemplateGenerator=d,p.parseStringTemplate=d(),p.getQuotedStringAndAdvanceForRegex=v},function(i,p,_){i.exports=_(2)},function(i,p,_){function d(v){for(var y in v)p.hasOwnProperty(y)||(p[y]=v[y])}Object.defineProperty(p,"__esModule",{value:!0}),d(_(0)),d(_(3))},function(i,p,_){function d(b){return function(q){return b.hasOwnProperty(q)?b[q]:q.split(".").reduce(function(F,I){return F.hasOwnProperty(I)?F[I]:""},b)}}function v(b,q,F,I){I===void 0&&(I=d(q));var M=I(b.name);return b.pipes.reduce(function($,C){return F.hasOwnProperty(C.name)?F[C.name]($,C.parameters):$},M??"")}function y(b,q,F,I){return I===void 0&&(I=d(q)),b.literals.length===0?"":b.literals.slice(1).reduce(function(M,$,C){return""+M+v(b.variables[C],q,F,I)+$},b.literals[0])}function w(b,q,F){return y(m.parseStringTemplate(b),q,F)}Object.defineProperty(p,"__esModule",{value:!0});var m=_(0);p.evaluateParsedString=y,p.evaluateStringTemplate=w}])})})(hf);var pf=hf.exports,Ss=function(){},As=Ss(),Fe=function(f){return f!==As&&f!==null},Os=Fe,Ts=Array.prototype.forEach,Is=Object.create,Rs=function(f,l){var i;for(i in f)l[i]=f[i]},gf=function(f){var l=Is(null);return Ts.call(arguments,function(i){Os(i)&&Rs(Object(i),l)}),l},Es=function(){var f=Math.sign;return typeof f!="function"?!1:f(10)===1&&f(-20)===-1},Dr,vf;function Ps(){return vf||(vf=1,Dr=function(f){return f=Number(f),isNaN(f)||f===0?f:f>0?1:-1}),Dr}var Cs=Es()?Math.sign:Ps(),Ls=Cs,qs=Math.abs,Fs=Math.floor,Ms=function(f){return isNaN(f)?0:(f=Number(f),f===0||!isFinite(f)?f:Ls(f)*Fs(qs(f)))},Ns=Ms,$s=Math.max,Me=function(f){return $s(0,Ns(f))},Ds=Me,df=function(f,l,i){var p;return isNaN(f)?(p=l,p>=0?i&&p?p-1:p:1):f===!1?!1:Ds(f)},we=function(f){if(typeof f!="function")throw new TypeError(f+" is not a function");return f},Ws=Fe,Qe=function(f){if(!Ws(f))throw new TypeError("Cannot use null or undefined");return f},Bs=we,Us=Qe,Gs=Function.prototype.bind,_f=Function.prototype.call,zs=Object.keys,Hs=Object.prototype.propertyIsEnumerable,Ks=function(f,l){return function(i,p){var _,d=arguments[2],v=arguments[3];return i=Object(Us(i)),Bs(p),_=zs(i),v&&_.sort(typeof v=="function"?Gs.call(v,i):void 0),typeof f!="function"&&(f=_[f]),_f.call(f,_,function(y,w){return Hs.call(i,y)?_f.call(p,d,i[y],y,i,w):l})}},Nt=Ks("forEach"),Ne={},mf={exports:{}},Zs=function(){var f=Object.assign,l;return typeof f!="function"?!1:(l={foo:"raz"},f(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")},Wr,yf;function Vs(){return yf||(yf=1,Wr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Wr}var Br,wf;function Ys(){if(wf)return Br;wf=1;var f=Fe,l=Object.keys;return Br=function(i){return l(f(i)?Object(i):i)},Br}var Ur,xf;function Qs(){return xf||(xf=1,Ur=Vs()()?Object.keys:Ys()),Ur}var Gr,bf;function Xs(){if(bf)return Gr;bf=1;var f=Qs(),l=Qe,i=Math.max;return Gr=function(p,_){var d,v,y=i(arguments.length,2),w;for(p=Object(l(p)),w=function(m){try{p[m]=_[m]}catch(b){d||(d=b)}},v=1;v-1},Vr}var vc=pc()?String.prototype.contains:gc(),$t=qf,Mf=hc,Nf=Sf,$f=gf,ht=vc,dc=Lf.exports=function(f,l){var i,p,_,d,v;return arguments.length<2||typeof f!="string"?(d=l,l=f,f=null):d=arguments[2],$t(f)?(i=ht.call(f,"c"),p=ht.call(f,"e"),_=ht.call(f,"w")):(i=_=!0,p=!1),v={value:l,configurable:i,enumerable:p,writable:_},d?Nf($f(d),v):v};dc.gs=function(f,l,i){var p,_,d,v;return typeof f!="string"?(d=i,i=l,l=f,f=null):d=arguments[3],$t(l)?Mf(l)?$t(i)?Mf(i)||(d=i,i=void 0):i=void 0:(d=l,l=i=void 0):l=void 0,$t(f)?(p=ht.call(f,"c"),_=ht.call(f,"e")):(p=!0,_=!1),v={get:l,set:i,configurable:p,enumerable:_},d?Nf($f(d),v):v};var $e=Lf.exports,Yr={exports:{}};(function(f,l){var i=$e,p=we,_=Function.prototype.apply,d=Function.prototype.call,v=Object.create,y=Object.defineProperty,w=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0},q,F,I,M,$,C,P;q=function(L,A){var E;return p(A),m.call(this,"__ee__")?E=this.__ee__:(E=b.value=v(null),y(this,"__ee__",b),b.value=null),E[L]?typeof E[L]=="object"?E[L].push(A):E[L]=[E[L],A]:E[L]=A,this},F=function(L,A){var E,W;return p(A),W=this,q.call(this,L,E=function(){I.call(W,L,E),_.call(A,this,arguments)}),E.__eeOnceListener__=A,this},I=function(L,A){var E,W,U,J;if(p(A),!m.call(this,"__ee__"))return this;if(E=this.__ee__,!E[L])return this;if(W=E[L],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?E[L]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete E[L];return this},M=function(L){var A,E,W,U,J;if(m.call(this,"__ee__")&&(U=this.__ee__[L],!!U))if(typeof U=="object"){for(E=arguments.length,J=new Array(E-1),A=1;A=55296&&E<=56319&&(rn+=F[++C])),rn=I?m.call(I,M,rn,P):rn,$?(b.value=rn,q(L,P,b)):L[P]=rn,++P;A=P}}if(A===void 0)for(A=p(F.length),$&&(L=new $(A)),C=0;C=0?b=v(b):b=l(this.length)-v(d(b)),w=b;w"}},Li}var qi,Ro;function ch(){if(Ro)return qi;Ro=1;var f=sh(),l=/[\n\r\u2028\u2029]/g;return qi=function(i){var p=f(i);return p.length>100&&(p=p.slice(0,99)+"…"),p=p.replace(l,function(_){return JSON.stringify(_).slice(1,-1)}),p},qi}var Gt={exports:{}},Eo;function Po(){if(Eo)return Gt.exports;Eo=1,Gt.exports=f,Gt.exports.default=f;function f(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Gt.exports}var Co;function hh(){if(Co)return xo;Co=1;var f=mo(),l=oh(),i=lh(),p=ch(),_=Po(),d=Ii(),v=Object.create,y=l("then","then:finally","done","done:finally");return Ne.promise=function(w,m){var b=v(null),q=v(null),F=v(null);if(w===!0)w=null;else if(w=i(w),!y[w])throw new TypeError("'"+p(w)+"' is not valid promise mode");m.on("set",function(I,M,$){var C=!1;if(!_($)){q[I]=$,m.emit("setasync",I,1);return}b[I]=1,F[I]=$;var P=function(W){var U=b[I];if(C)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.`);U&&(delete b[I],q[I]=W,m.emit("setasync",I,U))},L=function(){C=!0,b[I]&&(delete b[I],delete F[I],m.delete(I))},A=w;if(A||(A="then"),A==="then"){var E=function(){d(L)};$=$.then(function(W){d(P.bind(this,W))},E),typeof $.finally=="function"&&$.finally(E)}else if(A==="done"){if(typeof $.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");$.done(P,L)}else if(A==="done:finally"){if(typeof $.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof $.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");$.done(P),$.finally(L)}}),m.on("get",function(I,M,$){var C;if(b[I]){++b[I];return}C=F[I];var P=function(){m.emit("getasync",I,M,$)};_(C)?typeof C.done=="function"?C.done(P):C.then(function(){d(P)}):P()}),m.on("delete",function(I){if(delete F[I],b[I]){delete b[I];return}if(hasOwnProperty.call(q,I)){var M=q[I];delete q[I],m.emit("deleteasync",I,[M])}}),m.on("clear",function(){var I=q;q=v(null),b=v(null),F=v(null),m.emit("clearasync",f(I,function(M){return[M]}))})},xo}var Lo={},qo;function ph(){if(qo)return Lo;qo=1;var f=we,l=Nt,i=Ne,p=Function.prototype.apply;return i.dispose=function(_,d,v){var y;if(f(_),v.async&&i.async||v.promise&&i.promise){d.on("deleteasync",y=function(w,m){p.call(_,null,m)}),d.on("clearasync",function(w){l(w,function(m,b){y(b,m)})});return}d.on("delete",y=function(w,m){_(m)}),d.on("clear",function(w){l(w,function(m,b){y(b,m)})})},Lo}var Fo={},Fi,Mo;function gh(){return Mo||(Mo=1,Fi=2147483647),Fi}var Mi,No;function vh(){if(No)return Mi;No=1;var f=Me,l=gh();return Mi=function(i){if(i=f(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Mi}var $o;function dh(){if($o)return Fo;$o=1;var f=hi(),l=Nt,i=Ii(),p=Po(),_=vh(),d=Ne,v=Function.prototype,y=Math.max,w=Math.min,m=Object.create;return d.maxAge=function(b,q,F){var I,M,$,C;b=_(b),b&&(I=m(null),M=F.async&&d.async||F.promise&&d.promise?"async":"",q.on("set"+M,function(P){I[P]=setTimeout(function(){q.delete(P)},b),typeof I[P].unref=="function"&&I[P].unref(),C&&(C[P]&&C[P]!=="nextTick"&&clearTimeout(C[P]),C[P]=setTimeout(function(){delete C[P]},$),typeof C[P].unref=="function"&&C[P].unref())}),q.on("delete"+M,function(P){clearTimeout(I[P]),delete I[P],C&&(C[P]!=="nextTick"&&clearTimeout(C[P]),delete C[P])}),F.preFetch&&(F.preFetch===!0||isNaN(F.preFetch)?$=.333:$=y(w(Number(F.preFetch),1),0),$&&(C={},$=(1-$)*b,q.on("get"+M,function(P,L,A){C[P]||(C[P]="nextTick",i(function(){var E;C[P]==="nextTick"&&(delete C[P],q.delete(P),F.async&&(L=f(L),L.push(v)),E=q.memoized.apply(A,L),F.promise&&p(E)&&(typeof E.done=="function"?E.done(v,v):E.then(v,v)))}))}))),q.on("clear"+M,function(){l(I,function(P){clearTimeout(P)}),I={},C&&(l(C,function(P){P!=="nextTick"&&clearTimeout(P)}),C={})}))},Fo}var Do={},Ni,Wo;function _h(){if(Wo)return Ni;Wo=1;var f=Me,l=Object.create,i=Object.prototype.hasOwnProperty;return Ni=function(p){var _=0,d=1,v=l(null),y=l(null),w=0,m;return p=f(p),{hit:function(b){var q=y[b],F=++w;if(v[F]=b,y[b]=F,!q)return++_,_<=p?void 0:(b=v[d],m(b),b);if(delete v[q],d===q)for(;!i.call(v,++d););},delete:m=function(b){var q=y[b];if(q&&(delete v[q],delete y[b],--_,d===q)){if(!_){w=0,d=1;return}for(;!i.call(v,++d););}},clear:function(){_=0,d=1,v=l(null),y=l(null),w=0}}},Ni}var Bo;function mh(){if(Bo)return Do;Bo=1;var f=Me,l=_h(),i=Ne;return i.max=function(p,_,d){var v,y,w;p=f(p),p&&(y=l(p),v=d.async&&i.async||d.promise&&i.promise?"async":"",_.on("set"+v,w=function(m){m=y.hit(m),m!==void 0&&_.delete(m)}),_.on("get"+v,w),_.on("delete"+v,y.delete),_.on("clear"+v,y.clear))},Do}var Uo={},Go;function yh(){if(Go)return Uo;Go=1;var f=$e,l=Ne,i=Object.create,p=Object.defineProperties;return l.refCounter=function(_,d,v){var y,w;y=i(null),w=v.async&&l.async||v.promise&&l.promise?"async":"",d.on("set"+w,function(m,b){y[m]=b||1}),d.on("get"+w,function(m){++y[m]}),d.on("delete"+w,function(m){delete y[m]}),d.on("clear"+w,function(){y={}}),p(d.memoized,{deleteRef:f(function(){var m=d.get(arguments);return m===null||!y[m]?null:--y[m]?!1:(d.delete(m),!0)}),getRefCount:f(function(){var m=d.get(arguments);return m===null||!y[m]?0:y[m]})})},Uo}var wh=gf,xh=df,bh=Jc,Sh=function(f){var l=wh(arguments[1]),i;return l.normalizer||(i=l.length=xh(l.length,f.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=jc():i>1&&(l.normalizer=kc()(i)):i===!1?l.normalizer=rh()():i===1?l.normalizer=ih()():l.normalizer=uh()(i))),l.async&&fh(),l.promise&&hh(),l.dispose&&ph(),l.maxAge&&dh(),l.max&&mh(),l.refCounter&&yh(),bh(f,l)},zo=bs(Sh);const Ho=zo(f=>{const l=Function("$",`return ${f};`);return i=>l(new Proxy(Xe(i),{get(p,_){var d;return(d=p[_])==null?void 0:d.call(p,{})}}))},{primitive:!0}),Ah=/^\{\{\s*/,Oh=/^\s*\}\}/,$i=/\b\B/,Th=zo(f=>{const i=pf.parseStringTemplateGenerator({VARIABLE_START:Ah,VARIABLE_END:Oh,PIPE_START:$i,PIPE_PARAMETER_START:$i,QUOTED_STRING:$i})(f);return _n.join(i.literals,"")?p=>pf.evaluateParsedString(i,{},{},_=>Ho(_)(p)):Ho(i.variables[0].name)},{primitive:!0});function Di(f){switch(f==null?void 0:f.constructor){case Array:{const l=_n.map(f,Di);return i=>_n.map(l,p=>p(i))}case Object:{const l=_n.mapValues(f,Di);return i=>_n.mapValues(l,p=>p(i))}case String:return Th(f);default:return _n.constant(f)}}function Xe(f={}){return $r(f,l=>_n.isFunction(l)?l:Di(l))}function Ih(f={}){return new Proxy(f,{get:(l,i)=>()=>l[i]})}function Wi(f,l){const i=$r(l,p=>_=>p(Wi(Xe(_),f)));return{...f,...i}}function Rh(f){const{$for:l,...i}=f;if(l){const{$let:p="i",$from:_=0,$to:d=1,$step:v=1}=l;return _n.range(_,d,v).map(y=>Wi(Xe({[p]:y}),Xe(i)))}else return[f]}function Ko(f,l,i={}){return f.flatMap(p=>{const{$:_}=p,d=Rh(p);return _n.flatMap(d,v=>{const y=Wi(Xe(i),Xe(v));return _ in l?Ko(l[_],l,y):[y]})})}const Eh=f=>f==null,Zo=f=>f.display!=="transient";function Ph({trace:f,context:l,view:i="main"}){var m,b,q,F;const p=Ko(((q=(b=(m=f==null?void 0:f.render)==null?void 0:m.views)==null?void 0:b[i])==null?void 0:q.components)??[],((F=f==null?void 0:f.render)==null?void 0:F.components)??{}),_=(I,M)=>_n.map(p,$=>$r($,C=>C(Ih({alpha:1,...l,...M,event:I,events:f==null?void 0:f.events})))),d=I=>I&&Object.hasOwn(I,"alpha")?I.alpha>0:!0,v=I=>M=>({component:M,meta:{source:"trace",step:I}}),y=_n.chain(f==null?void 0:f.events).map((I,M)=>({step:M,id:I.id,data:I,pId:I.pId})).groupBy("id").value(),w=_n.chain(f==null?void 0:f.events).map((I,M,$)=>{var A;const C=_(I,{step:M,parent:Eh(I.pId)?void 0:$[((A=_n.findLast(y[I.pId],E=>E.step<=M))==null?void 0:A.step)??0]}),P=C.filter(Zo),L=C.filter(_n.negate(Zo));return{persistent:P,transient:L}}).map(I=>_n.mapValues(I,M=>M.filter(d))).map((I,M)=>_n.mapValues(I,$=>$.map(v(M)))).value();return{stepsPersistent:_n.map(w,"persistent"),stepsTransient:_n.map(w,"transient")}}onmessage=({data:f})=>{postMessage(Ph(f))}})(); +}`;var Y=ys(function(){return nn(a,B+"return "+R).apply(i,s)});if(Y.source=R,nf(Y))throw Y;return Y}function y1(n){return en(n).toLowerCase()}function w1(n){return en(n).toUpperCase()}function x1(n,e,t){if(n=en(n),n&&(t||e===i))return Ra(n);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ne(e),a=Ea(r,u),s=Pa(r,u)+1;return Le(r,a,s).join("")}function b1(n,e,t){if(n=en(n),n&&(t||e===i))return n.slice(0,La(n)+1);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Pa(r,ne(e))+1;return Le(r,0,u).join("")}function S1(n,e,t){if(n=en(n),n&&(t||e===i))return n.replace(nu,"");if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Ea(r,ne(e));return Le(r,u).join("")}function A1(n,e){var t=gt,r=zt;if(cn(e)){var u="separator"in e?e.separator:u;t="length"in e?V(e.length):t,r="omission"in e?Bn(e.omission):r}n=en(n);var a=n.length;if(nt(n)){var s=ne(n);a=s.length}if(t>=a)return n;var c=t-et(r);if(c<1)return r;var g=s?Le(s,0,c).join(""):n.slice(0,c);if(u===i)return g+r;if(s&&(c+=g.length-c),ef(u)){if(n.slice(c).search(u)){var O,I=g;for(u.global||(u=_u(u.source,en(Xo.exec(u))+"g")),u.lastIndex=0;O=u.exec(I);)var R=O.index;g=g.slice(0,R===i?c:R)}}else if(n.indexOf(Bn(u),c)!=c){var N=g.lastIndexOf(u);N>-1&&(g=g.slice(0,N))}return g+r}function O1(n){return n=en(n),n&&Nh.test(n)?n.replace(Vo,ng):n}var T1=at(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),uf=wl("toUpperCase");function ms(n,e,t){return n=en(n),e=t?i:e,e===i?Qp(n)?rg(n):Bp(n):n.match(e)||[]}var ys=Q(function(n,e){try{return Dn(n,i,e)}catch(t){return nf(t)?t:new K(t)}}),I1=ve(function(n,e){return Zn(e,function(t){t=oe(t),pe(n,t,ju(n[t],n))}),n});function R1(n){var e=n==null?0:n.length,t=G();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new Vn(v);return[t(r[0]),r[1]]}):[],Q(function(r){for(var u=-1;++uyn)return[];var t=$n,r=An(n,$n);e=G(e),n-=$n;for(var u=gu(r,e);++t0||e<0)?new j(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=V(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),u=o[r?"take"+(e=="last"?"Right":""):e],a=r||/^find/.test(e);u&&(o.prototype[e]=function(){var s=this.__wrapped__,c=r?[1]:arguments,g=s instanceof j,O=c[0],I=g||Z(s),R=function(X){var k=u.apply(o,Te([X],c));return r&&N?k[0]:k};I&&t&&typeof O=="function"&&O.length!=1&&(g=I=!1);var N=this.__chain__,B=!!this.__actions__.length,z=a&&!N,Y=g&&!B;if(!a&&I){s=Y?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Er,args:[R],thisArg:i}),new Yn(H,N)}return z&&Y?n.apply(this,c):(H=this.thru(R),z?r?H.value()[0]:H.value():H)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=er[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);o.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Z(a)?a:[],u)}return this[t](function(s){return e.apply(Z(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var t=o[e];if(t){var r=t.name+"";tn.call(ut,r)||(ut[r]=[]),ut[r].push({name:e,func:t})}}),ut[br(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=Og,j.prototype.reverse=Tg,j.prototype.value=Ig,o.prototype.at=t_,o.prototype.chain=r_,o.prototype.commit=i_,o.prototype.next=u_,o.prototype.plant=o_,o.prototype.reverse=a_,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=l_,o.prototype.first=o.prototype.head,xt&&(o.prototype[xt]=f_),o},tt=ig();We?((We.exports=tt)._=tt,fu._=tt):bn._=tt}).call(Ye)}(Mt,Mt.exports);var Tn=Mt.exports;function $r(f={},l){const{$:i,...p}=f;return{...Tn.mapValues(p,l),$:i}}var hf={exports:{}};(function(f,l){(function(i,p){f.exports=p()})(Ye,function(){return function(i){function p(d){if(_[d])return _[d].exports;var v=_[d]={i:d,l:!1,exports:{}};return i[d].call(v.exports,v,v.exports,p),v.l=!0,v.exports}var _={};return p.m=i,p.c=_,p.d=function(d,v,y){p.o(d,v)||Object.defineProperty(d,v,{configurable:!1,enumerable:!0,get:y})},p.n=function(d){var v=d&&d.__esModule?function(){return d.default}:function(){return d};return p.d(v,"a",v),v},p.o=function(d,v){return Object.prototype.hasOwnProperty.call(d,v)},p.p="",p(p.s=1)}([function(i,p,_){function d(y){var w=y===void 0?{}:y,m=w.ESCAPE,b=m===void 0?/^\\/:m,q=w.VARIABLE_START,F=q===void 0?/^\${\s*/:q,T=w.VARIABLE_END,M=T===void 0?/^\s*}/:T,$=w.PIPE_START,C=$===void 0?/^\s*\|\s*/:$,P=w.PIPE_PARAMETER_START,L=P===void 0?/^\s*:\s*/:P,A=w.QUOTED_STRING,E=A===void 0?p.DEFAULT_QUOTED_STRING_REGEX:A,W=w.QUOTED_STRING_TEST,U=W===void 0?null:W,J=w.QUOTED_STRING_GET_AND_ADVANCE,rn=J===void 0?null:J,Pn=w.QUOTED_STRING_IN_PARAMETER_TEST,gt=Pn===void 0?null:Pn,zt=w.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Bi=zt===void 0?null:zt,Ht=U||function(Nn){return E.test(Nn)},vt=rn||v(E),Ui=gt||function(Nn){return E.test(Nn)},Gi=Bi||v(E);return function(Nn){function yn(an){an===void 0&&(an=1),un=un.substr(an)}function De(an){an===void 0&&(an=/^/),yn(un.match(an)[0].length)}function ae(){var an;return De(b),an=un.length>0?un[0]:"",yn(),an}function $n(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;vn={name:"",pipes:[]},Hn=!kn}function zi(){ie.variables.push(vn),$n({isNull:!0})}function Kt(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;Cn={name:"",parameters:[]},_t=!kn}function Zt(){vn.pipes.push(Cn),Kt({isNull:!0})}function le(an){var dn=(an===void 0?{}:an).isNull,kn=dn!==void 0&&dn;Ae="",Vt=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function dt(){return!!M.test(un)&&(De(M),wn>=3&&xe(),wn>=2&&Zt(),wn>=1&&zi(),wn=0,!0)}function se(){return!!C.test(un)&&(De(C),wn>=3&&xe(),wn>=2&&Zt(),wn>=1&&Kt(),wn=2,!0)}function be(){return!!L.test(un)&&(De(L),wn>=3&&xe(),wn>=2&&le(),wn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},wn=0,Se="",vn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,_t=!1,Vt=!1;un&&un.length>0;)switch(wn){case 0:if(b.test(un)){Se+=ae();continue}if(F.test(un)){wn=1,$n(),ie.literals.push(Se),Se="",De(F);continue}Se+=un[0],yn();break;case 1:if(b.test(un)){vn.name+=ae();continue}if(dt()||se())continue;if(Ht(un)){vn.name+=vt(un,yn);continue}vn.name+=un[0],yn();break;case 2:if(b.test(un)){Cn.name+=ae();continue}if(dt()||be()||se())continue;if(Ht(un)){Cn.name+=vt(un,yn);continue}Cn.name+=un[0],yn();break;case 3:if(b.test(un)){Ae+=ae();continue}if(dt()||be()||se())continue;if(Ui(un)){Ae+=Gi(un,yn);continue}Ae+=un[0],yn()}return Vt&&Cn.parameters.push(Ae),_t&&vn.pipes.push(Cn),Hn&&ie.variables.push(vn),ie.literals.push(Se),ie}}function v(y){return function(w,m){var b=w.match(y);return m(b[0].length),b.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(p,"__esModule",{value:!0}),p.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,p.parseStringTemplateGenerator=d,p.parseStringTemplate=d(),p.getQuotedStringAndAdvanceForRegex=v},function(i,p,_){i.exports=_(2)},function(i,p,_){function d(v){for(var y in v)p.hasOwnProperty(y)||(p[y]=v[y])}Object.defineProperty(p,"__esModule",{value:!0}),d(_(0)),d(_(3))},function(i,p,_){function d(b){return function(q){return b.hasOwnProperty(q)?b[q]:q.split(".").reduce(function(F,T){return F.hasOwnProperty(T)?F[T]:""},b)}}function v(b,q,F,T){T===void 0&&(T=d(q));var M=T(b.name);return b.pipes.reduce(function($,C){return F.hasOwnProperty(C.name)?F[C.name]($,C.parameters):$},M??"")}function y(b,q,F,T){return T===void 0&&(T=d(q)),b.literals.length===0?"":b.literals.slice(1).reduce(function(M,$,C){return""+M+v(b.variables[C],q,F,T)+$},b.literals[0])}function w(b,q,F){return y(m.parseStringTemplate(b),q,F)}Object.defineProperty(p,"__esModule",{value:!0});var m=_(0);p.evaluateParsedString=y,p.evaluateStringTemplate=w}])})})(hf);var pf=hf.exports,Ss=function(){},As=Ss(),Fe=function(f){return f!==As&&f!==null},Os=Fe,Ts=Array.prototype.forEach,Is=Object.create,Rs=function(f,l){var i;for(i in f)l[i]=f[i]},gf=function(f){var l=Is(null);return Ts.call(arguments,function(i){Os(i)&&Rs(Object(i),l)}),l},Es=function(){var f=Math.sign;return typeof f!="function"?!1:f(10)===1&&f(-20)===-1},Dr,vf;function Ps(){return vf||(vf=1,Dr=function(f){return f=Number(f),isNaN(f)||f===0?f:f>0?1:-1}),Dr}var Cs=Es()?Math.sign:Ps(),Ls=Cs,qs=Math.abs,Fs=Math.floor,Ms=function(f){return isNaN(f)?0:(f=Number(f),f===0||!isFinite(f)?f:Ls(f)*Fs(qs(f)))},Ns=Ms,$s=Math.max,Me=function(f){return $s(0,Ns(f))},Ds=Me,df=function(f,l,i){var p;return isNaN(f)?(p=l,p>=0?i&&p?p-1:p:1):f===!1?!1:Ds(f)},we=function(f){if(typeof f!="function")throw new TypeError(f+" is not a function");return f},Ws=Fe,Qe=function(f){if(!Ws(f))throw new TypeError("Cannot use null or undefined");return f},Bs=we,Us=Qe,Gs=Function.prototype.bind,_f=Function.prototype.call,zs=Object.keys,Hs=Object.prototype.propertyIsEnumerable,Ks=function(f,l){return function(i,p){var _,d=arguments[2],v=arguments[3];return i=Object(Us(i)),Bs(p),_=zs(i),v&&_.sort(typeof v=="function"?Gs.call(v,i):void 0),typeof f!="function"&&(f=_[f]),_f.call(f,_,function(y,w){return Hs.call(i,y)?_f.call(p,d,i[y],y,i,w):l})}},Nt=Ks("forEach"),Ne={},mf={exports:{}},Zs=function(){var f=Object.assign,l;return typeof f!="function"?!1:(l={foo:"raz"},f(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")},Wr,yf;function Vs(){return yf||(yf=1,Wr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Wr}var Br,wf;function Ys(){if(wf)return Br;wf=1;var f=Fe,l=Object.keys;return Br=function(i){return l(f(i)?Object(i):i)},Br}var Ur,xf;function Qs(){return xf||(xf=1,Ur=Vs()()?Object.keys:Ys()),Ur}var Gr,bf;function Xs(){if(bf)return Gr;bf=1;var f=Qs(),l=Qe,i=Math.max;return Gr=function(p,_){var d,v,y=i(arguments.length,2),w;for(p=Object(l(p)),w=function(m){try{p[m]=_[m]}catch(b){d||(d=b)}},v=1;v-1},Vr}var vc=pc()?String.prototype.contains:gc(),$t=qf,Mf=hc,Nf=Sf,$f=gf,ht=vc,dc=Lf.exports=function(f,l){var i,p,_,d,v;return arguments.length<2||typeof f!="string"?(d=l,l=f,f=null):d=arguments[2],$t(f)?(i=ht.call(f,"c"),p=ht.call(f,"e"),_=ht.call(f,"w")):(i=_=!0,p=!1),v={value:l,configurable:i,enumerable:p,writable:_},d?Nf($f(d),v):v};dc.gs=function(f,l,i){var p,_,d,v;return typeof f!="string"?(d=i,i=l,l=f,f=null):d=arguments[3],$t(l)?Mf(l)?$t(i)?Mf(i)||(d=i,i=void 0):i=void 0:(d=l,l=i=void 0):l=void 0,$t(f)?(p=ht.call(f,"c"),_=ht.call(f,"e")):(p=!0,_=!1),v={get:l,set:i,configurable:p,enumerable:_},d?Nf($f(d),v):v};var $e=Lf.exports,Yr={exports:{}};(function(f,l){var i=$e,p=we,_=Function.prototype.apply,d=Function.prototype.call,v=Object.create,y=Object.defineProperty,w=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0},q,F,T,M,$,C,P;q=function(L,A){var E;return p(A),m.call(this,"__ee__")?E=this.__ee__:(E=b.value=v(null),y(this,"__ee__",b),b.value=null),E[L]?typeof E[L]=="object"?E[L].push(A):E[L]=[E[L],A]:E[L]=A,this},F=function(L,A){var E,W;return p(A),W=this,q.call(this,L,E=function(){T.call(W,L,E),_.call(A,this,arguments)}),E.__eeOnceListener__=A,this},T=function(L,A){var E,W,U,J;if(p(A),!m.call(this,"__ee__"))return this;if(E=this.__ee__,!E[L])return this;if(W=E[L],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?E[L]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete E[L];return this},M=function(L){var A,E,W,U,J;if(m.call(this,"__ee__")&&(U=this.__ee__[L],!!U))if(typeof U=="object"){for(E=arguments.length,J=new Array(E-1),A=1;A=55296&&E<=56319&&(rn+=F[++C])),rn=T?m.call(T,M,rn,P):rn,$?(b.value=rn,q(L,P,b)):L[P]=rn,++P;A=P}}if(A===void 0)for(A=p(F.length),$&&(L=new $(A)),C=0;C=0?b=v(b):b=l(this.length)-v(d(b)),w=b;w"}},Li}var qi,Ro;function ch(){if(Ro)return qi;Ro=1;var f=sh(),l=/[\n\r\u2028\u2029]/g;return qi=function(i){var p=f(i);return p.length>100&&(p=p.slice(0,99)+"…"),p=p.replace(l,function(_){return JSON.stringify(_).slice(1,-1)}),p},qi}var Gt={exports:{}},Eo;function Po(){if(Eo)return Gt.exports;Eo=1,Gt.exports=f,Gt.exports.default=f;function f(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Gt.exports}var Co;function hh(){if(Co)return xo;Co=1;var f=mo(),l=oh(),i=lh(),p=ch(),_=Po(),d=Ii(),v=Object.create,y=l("then","then:finally","done","done:finally");return Ne.promise=function(w,m){var b=v(null),q=v(null),F=v(null);if(w===!0)w=null;else if(w=i(w),!y[w])throw new TypeError("'"+p(w)+"' is not valid promise mode");m.on("set",function(T,M,$){var C=!1;if(!_($)){q[T]=$,m.emit("setasync",T,1);return}b[T]=1,F[T]=$;var P=function(W){var U=b[T];if(C)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.`);U&&(delete b[T],q[T]=W,m.emit("setasync",T,U))},L=function(){C=!0,b[T]&&(delete b[T],delete F[T],m.delete(T))},A=w;if(A||(A="then"),A==="then"){var E=function(){d(L)};$=$.then(function(W){d(P.bind(this,W))},E),typeof $.finally=="function"&&$.finally(E)}else if(A==="done"){if(typeof $.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");$.done(P,L)}else if(A==="done:finally"){if(typeof $.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof $.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");$.done(P),$.finally(L)}}),m.on("get",function(T,M,$){var C;if(b[T]){++b[T];return}C=F[T];var P=function(){m.emit("getasync",T,M,$)};_(C)?typeof C.done=="function"?C.done(P):C.then(function(){d(P)}):P()}),m.on("delete",function(T){if(delete F[T],b[T]){delete b[T];return}if(hasOwnProperty.call(q,T)){var M=q[T];delete q[T],m.emit("deleteasync",T,[M])}}),m.on("clear",function(){var T=q;q=v(null),b=v(null),F=v(null),m.emit("clearasync",f(T,function(M){return[M]}))})},xo}var Lo={},qo;function ph(){if(qo)return Lo;qo=1;var f=we,l=Nt,i=Ne,p=Function.prototype.apply;return i.dispose=function(_,d,v){var y;if(f(_),v.async&&i.async||v.promise&&i.promise){d.on("deleteasync",y=function(w,m){p.call(_,null,m)}),d.on("clearasync",function(w){l(w,function(m,b){y(b,m)})});return}d.on("delete",y=function(w,m){_(m)}),d.on("clear",function(w){l(w,function(m,b){y(b,m)})})},Lo}var Fo={},Fi,Mo;function gh(){return Mo||(Mo=1,Fi=2147483647),Fi}var Mi,No;function vh(){if(No)return Mi;No=1;var f=Me,l=gh();return Mi=function(i){if(i=f(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Mi}var $o;function dh(){if($o)return Fo;$o=1;var f=hi(),l=Nt,i=Ii(),p=Po(),_=vh(),d=Ne,v=Function.prototype,y=Math.max,w=Math.min,m=Object.create;return d.maxAge=function(b,q,F){var T,M,$,C;b=_(b),b&&(T=m(null),M=F.async&&d.async||F.promise&&d.promise?"async":"",q.on("set"+M,function(P){T[P]=setTimeout(function(){q.delete(P)},b),typeof T[P].unref=="function"&&T[P].unref(),C&&(C[P]&&C[P]!=="nextTick"&&clearTimeout(C[P]),C[P]=setTimeout(function(){delete C[P]},$),typeof C[P].unref=="function"&&C[P].unref())}),q.on("delete"+M,function(P){clearTimeout(T[P]),delete T[P],C&&(C[P]!=="nextTick"&&clearTimeout(C[P]),delete C[P])}),F.preFetch&&(F.preFetch===!0||isNaN(F.preFetch)?$=.333:$=y(w(Number(F.preFetch),1),0),$&&(C={},$=(1-$)*b,q.on("get"+M,function(P,L,A){C[P]||(C[P]="nextTick",i(function(){var E;C[P]==="nextTick"&&(delete C[P],q.delete(P),F.async&&(L=f(L),L.push(v)),E=q.memoized.apply(A,L),F.promise&&p(E)&&(typeof E.done=="function"?E.done(v,v):E.then(v,v)))}))}))),q.on("clear"+M,function(){l(T,function(P){clearTimeout(P)}),T={},C&&(l(C,function(P){P!=="nextTick"&&clearTimeout(P)}),C={})}))},Fo}var Do={},Ni,Wo;function _h(){if(Wo)return Ni;Wo=1;var f=Me,l=Object.create,i=Object.prototype.hasOwnProperty;return Ni=function(p){var _=0,d=1,v=l(null),y=l(null),w=0,m;return p=f(p),{hit:function(b){var q=y[b],F=++w;if(v[F]=b,y[b]=F,!q)return++_,_<=p?void 0:(b=v[d],m(b),b);if(delete v[q],d===q)for(;!i.call(v,++d););},delete:m=function(b){var q=y[b];if(q&&(delete v[q],delete y[b],--_,d===q)){if(!_){w=0,d=1;return}for(;!i.call(v,++d););}},clear:function(){_=0,d=1,v=l(null),y=l(null),w=0}}},Ni}var Bo;function mh(){if(Bo)return Do;Bo=1;var f=Me,l=_h(),i=Ne;return i.max=function(p,_,d){var v,y,w;p=f(p),p&&(y=l(p),v=d.async&&i.async||d.promise&&i.promise?"async":"",_.on("set"+v,w=function(m){m=y.hit(m),m!==void 0&&_.delete(m)}),_.on("get"+v,w),_.on("delete"+v,y.delete),_.on("clear"+v,y.clear))},Do}var Uo={},Go;function yh(){if(Go)return Uo;Go=1;var f=$e,l=Ne,i=Object.create,p=Object.defineProperties;return l.refCounter=function(_,d,v){var y,w;y=i(null),w=v.async&&l.async||v.promise&&l.promise?"async":"",d.on("set"+w,function(m,b){y[m]=b||1}),d.on("get"+w,function(m){++y[m]}),d.on("delete"+w,function(m){delete y[m]}),d.on("clear"+w,function(){y={}}),p(d.memoized,{deleteRef:f(function(){var m=d.get(arguments);return m===null||!y[m]?null:--y[m]?!1:(d.delete(m),!0)}),getRefCount:f(function(){var m=d.get(arguments);return m===null||!y[m]?0:y[m]})})},Uo}var wh=gf,xh=df,bh=Jc,Sh=function(f){var l=wh(arguments[1]),i;return l.normalizer||(i=l.length=xh(l.length,f.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=jc():i>1&&(l.normalizer=kc()(i)):i===!1?l.normalizer=rh()():i===1?l.normalizer=ih()():l.normalizer=uh()(i))),l.async&&fh(),l.promise&&hh(),l.dispose&&ph(),l.maxAge&&dh(),l.max&&mh(),l.refCounter&&yh(),bh(f,l)},zo=bs(Sh);const Ho=zo(f=>{const l=Function("$",`return ${f};`);return i=>l(new Proxy(Xe(i),{get(p,_){var d;return(d=p[_])==null?void 0:d.call(p,{})}}))},{primitive:!0}),Ah=/^\{\{\s*/,Oh=/^\s*\}\}/,$i=/\b\B/,Th=zo(f=>{const i=pf.parseStringTemplateGenerator({VARIABLE_START:Ah,VARIABLE_END:Oh,PIPE_START:$i,PIPE_PARAMETER_START:$i,QUOTED_STRING:$i})(f);return Tn.join(i.literals,"")?p=>pf.evaluateParsedString(i,{},{},_=>Ho(_)(p)):Ho(i.variables[0].name)},{primitive:!0});function Di(f){switch(f==null?void 0:f.constructor){case Array:{const l=Tn.map(f,Di);return i=>Tn.map(l,p=>p(i))}case Object:{const l=Tn.mapValues(f,Di);return i=>Tn.mapValues(l,p=>p(i))}case String:return Th(f);default:return Tn.constant(f)}}function Xe(f={}){return $r(f,l=>Tn.isFunction(l)?l:Di(l))}function Ih(f={}){return new Proxy(f,{get:(l,i)=>()=>l[i]})}function Wi(f,l){const i=$r(l,p=>_=>p(Wi(Xe(_),f)));return{...f,...i}}function Rh(f){const{$for:l,...i}=f;if(l){const{$let:p="i",$from:_=0,$to:d=1,$step:v=1}=l;return Tn.range(_,d,v).map(y=>Wi(Xe({[p]:y}),Xe(i)))}else return[f]}function Ko(f,l,i={}){return f.flatMap(p=>{const{$:_}=p;return Rh(p).flatMap(v=>{const y=Wi(Xe(i),Xe(v));return _ in l?Ko(l[_],l,y):[y]})})}const Eh=f=>f==null,Zo=f=>f.display!=="transient";function Ph({trace:f,context:l,view:i="main"}){var m,b,q,F;const p=Ko(((q=(b=(m=f==null?void 0:f.render)==null?void 0:m.views)==null?void 0:b[i])==null?void 0:q.components)??[],((F=f==null?void 0:f.render)==null?void 0:F.components)??{}),_=(T,M)=>p.map($=>$r($,C=>C(Ih({alpha:1,...l,...M,event:T,events:f==null?void 0:f.events})))),d=T=>T&&Object.hasOwn(T,"alpha")?T.alpha>0:!0,v=T=>M=>({component:M,meta:{source:"trace",step:T}}),y=Tn.chain(f==null?void 0:f.events).map((T,M)=>({step:M,id:T.id,data:T,pId:T.pId})).groupBy("id").value(),w=Tn.chain(f==null?void 0:f.events).map((T,M,$)=>{var A;const C=_(T,{step:M,parent:Eh(T.pId)?void 0:$[((A=Tn.findLast(y[T.pId],E=>E.step<=M))==null?void 0:A.step)??0]}),P=C.filter(Zo),L=C.filter(Tn.negate(Zo));return{persistent:P,transient:L}}).map(T=>Tn.mapValues(T,M=>M.filter(d))).map((T,M)=>Tn.mapValues(T,$=>$.map(v(M)))).value();return{stepsPersistent:w.map(T=>T.persistent),stepsTransient:w.map(T=>T.transient)}}onmessage=({data:f})=>{postMessage(Ph(f))}})(); diff --git a/assets/parseYaml.worker-25aef2ce.js b/assets/parseYaml.worker-25aef2ce.js deleted file mode 100644 index ef341c99..00000000 --- a/assets/parseYaml.worker-25aef2ce.js +++ /dev/null @@ -1,149 +0,0 @@ -(function(){"use strict";function un(i){if(i.__esModule)return i;var n=i.default;if(typeof n=="function"){var e=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};e.prototype=n.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(a){var t=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(e,a,t.get?t:{enumerable:!0,get:function(){return i[a]}})}),e}function J(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(n){return typeof n}:J=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J(i)}function N(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function ot(i,n){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ae(i,n,e){return ut()?Ae=Reflect.construct:Ae=function(t,r,s){var o=[null];o.push.apply(o,r);var u=Function.bind.apply(t,o),f=new u;return s&&pe(f,s.prototype),f},Ae.apply(null,arguments)}function fn(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function Je(i){var n=typeof Map=="function"?new Map:void 0;return Je=function(a){if(a===null||!fn(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(a))return n.get(a);n.set(a,t)}function t(){return Ae(a,arguments,F(this).constructor)}return t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),pe(t,a)},Je(i)}function q(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ft(i,n){return n&&(typeof n=="object"||typeof n=="function")?n:q(i)}function I(i){var n=ut();return function(){var a=F(i),t;if(n){var r=F(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return ft(this,t)}}function ln(i,n){for(;!Object.prototype.hasOwnProperty.call(i,n)&&(i=F(i),i!==null););return i}function Q(i,n,e){return typeof Reflect<"u"&&Reflect.get?Q=Reflect.get:Q=function(t,r,s){var o=ln(t,r);if(o){var u=Object.getOwnPropertyDescriptor(o,r);return u.get?u.get.call(s):u.value}},Q(i,n,e||i)}function ge(i,n){return lt(i)||vn(i,n)||Ve(i,n)||vt()}function de(i){return lt(i)||cn(i)||Ve(i)||vt()}function lt(i){if(Array.isArray(i))return i}function cn(i){if(typeof Symbol<"u"&&Symbol.iterator in Object(i))return Array.from(i)}function vn(i,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(i)))){var e=[],a=!0,t=!1,r=void 0;try{for(var s=i[Symbol.iterator](),o;!(a=(o=s.next()).done)&&(e.push(o.value),!(n&&e.length===n));a=!0);}catch(u){t=!0,r=u}finally{try{!a&&s.return!=null&&s.return()}finally{if(t)throw r}}return e}}function Ve(i,n){if(i){if(typeof i=="string")return ct(i,n);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ct(i,n)}}function ct(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,a=new Array(n);e"u"||i[Symbol.iterator]==null){if(Array.isArray(i)||(e=Ve(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var a=0,t=function(){};return{s:t,n:function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}},e:function(u){throw u},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,s=!1,o;return{s:function(){e=i[Symbol.iterator]()},n:function(){var u=e.next();return r=u.done,u},e:function(u){s=!0,o=u},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(s)throw o}}}}var R={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},p={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},Me="tag:yaml.org,2002:",re={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function ht(i){for(var n=[0],e=i.indexOf(` -`);e!==-1;)e+=1,n.push(e),e=i.indexOf(` -`,e);return n}function pt(i){var n,e;return typeof i=="string"?(n=ht(i),e=i):(Array.isArray(i)&&(i=i[0]),i&&i.context&&(i.lineStarts||(i.lineStarts=ht(i.context.src)),n=i.lineStarts,e=i.context.src)),{lineStarts:n,src:e}}function qe(i,n){if(typeof i!="number"||i<0)return null;var e=pt(n),a=e.lineStarts,t=e.src;if(!a||!t||i>t.length)return null;for(var r=0;r=1)||i>a.length)return null;for(var r=a[i-1],s=a[i];s&&s>r&&t[s-1]===` -`;)--s;return t.slice(r,s)}function pn(i,n){var e=i.start,a=i.end,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:80,r=hn(e.line,n);if(!r)return null;var s=e.col;if(r.length>t)if(s<=t-10)r=r.substr(0,t-1)+"…";else{var o=Math.round(t/2);r.length>s+o&&(r=r.substr(0,s+o-1)+"…"),s-=r.length-t,r="…"+r.substr(1-t)}var u=1,f="";a&&(a.line===e.line&&s+(a.col-e.col)<=t+1?u=a.col-e.col:(u=Math.min(r.length+1,t)-s,f="…"));var l=s>1?" ".repeat(s-1):"",c="^".repeat(u);return"".concat(r,` -`).concat(l).concat(c).concat(f)}var C=function(){function i(n,e){N(this,i),this.start=n,this.end=e||n}return A(i,[{key:"isEmpty",value:function(){return typeof this.start!="number"||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,a){var t=this.start,r=this.end;if(e.length===0||r<=e[0])return this.origStart=t,this.origEnd=r,a;for(var s=a;st);)++s;this.origStart=t+s;for(var o=s;s=r);)++s;return this.origEnd=r+s,o}}],[{key:"copy",value:function(e){return new i(e.start,e.end)}}]),i}(),y=function(){function i(n,e,a){N(this,i),Object.defineProperty(this,"context",{value:a||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=e||[],this.type=n,this.value=null}return A(i,[{key:"getPropValue",value:function(e,a,t){if(!this.context)return null;var r=this.context.src,s=this.props[e];return s&&r[s.start]===a?r.slice(s.start+(t?1:0),s.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join(` -`):null}},{key:"commentHasRequiredWhitespace",value:function(e){var a=this.context.src;if(this.header&&e===this.header.end||!this.valueRange)return!1;var t=this.valueRange.end;return e!==t||i.atBlank(a,t-1)}},{key:"hasComment",get:function(){if(this.context){for(var e=this.context.src,a=0;a=e.length||e[r]===` -`?t+` -`:t}},{key:"atDocumentBoundary",value:function(e,a,t){var r=e[a];if(!r)return!0;var s=e[a-1];if(s&&s!==` -`)return!1;if(t){if(r!==t)return!1}else if(r!==R.DIRECTIVES_END&&r!==R.DOCUMENT_END)return!1;var o=e[a+1],u=e[a+2];if(o!==r||u!==r)return!1;var f=e[a+3];return!f||f===` -`||f===" "||f===" "}},{key:"endOfIdentifier",value:function(e,a){for(var t=e[a],r=t==="<",s=r?[` -`," "," ",">"]:[` -`," "," ","[","]","{","}",","];t&&s.indexOf(t)===-1;)t=e[a+=1];return r&&t===">"&&(a+=1),a}},{key:"endOfIndent",value:function(e,a){for(var t=e[a];t===" ";)t=e[a+=1];return a}},{key:"endOfLine",value:function(e,a){for(var t=e[a];t&&t!==` -`;)t=e[a+=1];return a}},{key:"endOfWhiteSpace",value:function(e,a){for(var t=e[a];t===" "||t===" ";)t=e[a+=1];return a}},{key:"startOfLine",value:function(e,a){var t=e[a-1];if(t===` -`)return a;for(;t&&t!==` -`;)t=e[a-=1];return a+1}},{key:"endOfBlockIndent",value:function(e,a,t){var r=i.endOfIndent(e,t);if(r>t+a)return r;var s=i.endOfWhiteSpace(e,r),o=e[s];return!o||o===` -`?s:null}},{key:"atBlank",value:function(e,a,t){var r=e[a];return r===` -`||r===" "||r===" "||t&&!r}},{key:"nextNodeIsIndented",value:function(e,a,t){return!e||a<0?!1:a>0?!0:t&&e==="-"}},{key:"normalizeOffset",value:function(e,a){var t=e[a];return t?t!==` -`&&e[a-1]===` -`?a-1:i.endOfWhiteSpace(e,a):a}},{key:"foldNewline",value:function(e,a,t){for(var r=0,s=!1,o="",u=e[a+1];u===" "||u===" "||u===` -`;){switch(u){case` -`:r=0,a+=1,o+=` -`;break;case" ":r<=t&&(s=!0),a=i.endOfWhiteSpace(e,a+2)-1;break;case" ":r+=1,a+=1;break}u=e[a+1]}return o||(o=" "),u&&r<=t&&(s=!0),{fold:o,offset:a,error:s}}}]),i}(),fe=function(i){M(e,i);var n=I(e);function e(a,t,r){var s;if(N(this,e),!r||!(t instanceof y))throw new Error("Invalid arguments for new ".concat(a));return s=n.call(this),s.name=a,s.message=r,s.source=t,s}return A(e,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var t=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new C(this.offset,this.offset+1);var r=t&&qe(this.offset,t);if(r){var s={line:r.line,col:r.col+1};this.linePos={start:r,end:s}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var o=this.linePos.start,u=o.line,f=o.col;this.message+=" at line ".concat(u,", column ").concat(f);var l=t&&pn(this.linePos,t);l&&(this.message+=`: - -`.concat(l,` -`))}delete this.source}}}]),e}(Je(Error)),ye=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLReferenceError",a,t)}return e}(fe),k=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLSemanticError",a,t)}return e}(fe),x=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLSyntaxError",a,t)}return e}(fe),le=function(i){M(e,i);var n=I(e);function e(a,t){return N(this,e),n.call(this,"YAMLWarning",a,t)}return e}(fe),gt=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var t=this.valueRange,r=t.start,s=t.end,o=this.context.src,u=o[s-1];rd?o.slice(d,l+1):c)}else f+=c}var m=o[r];switch(m){case" ":{var O="Plain value cannot start with a tab character",b=[new k(this,O)];return{errors:b,str:f}}case"@":case"`":{var _="Plain value cannot start with reserved character ".concat(m),P=[new k(this,_)];return{errors:P,str:f}}default:return f}}},{key:"parseBlockValue",value:function(t){for(var r=this.context,s=r.indent,o=r.inFlow,u=r.src,f=t,l=t,c=u[f];c===` -`&&!y.atDocumentBoundary(u,f+1);c=u[f]){var v=y.endOfBlockIndent(u,s,f+1);if(v===null||u[v]==="#")break;u[v]===` -`?f=v:(l=e.endOfLine(u,v,o),f=l)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=l,l}},{key:"parse",value:function(t,r){this.context=t;var s=t.inFlow,o=t.src,u=r,f=o[u];return f&&f!=="#"&&f!==` -`&&(u=e.endOfLine(o,r,s)),this.valueRange=new C(r,u),u=y.endOfWhiteSpace(o,u),u=this.parseComment(u),(!this.hasComment||this.valueRange.isEmpty())&&(u=this.parseBlockValue(u)),u}}],[{key:"endOfLine",value:function(t,r,s){for(var o=t[r],u=r;o&&o!==` -`&&!(s&&(o==="["||o==="]"||o==="{"||o==="}"||o===","));){var f=t[u+1];if(o===":"&&(!f||f===` -`||f===" "||f===" "||s&&f===",")||(o===" "||o===" ")&&f==="#")break;u+=1,o=f}return u}}]),e}(y),me=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.call(this,p.BLANK_LINE)}return A(e,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(t,r){return this.context=t,this.range=new C(r,r+1),r+1}}]),e}(y),Ge=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.node=null,r}return A(e,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=t.atLineStart,f=t.lineStart;!u&&this.type===p.SEQ_ITEM&&(this.error=new k(this,"Sequence items must not have preceding content on the same line"));for(var l=u?r-f:t.indent,c=y.endOfWhiteSpace(o,r+1),v=o[c],h=v==="#",g=[],d=null;v===` -`||v==="#";){if(v==="#"){var w=y.endOfLine(o,c+1);g.push(new C(c,w)),c=w}else{u=!0,f=c+1;var m=y.endOfWhiteSpace(o,f);o[m]===` -`&&g.length===0&&(d=new me,f=d.parse({src:o},f)),c=y.endOfIndent(o,f)}v=o[c]}if(y.nextNodeIsIndented(v,c-(f+l),this.type!==p.SEQ_ITEM)?this.node=s({atLineStart:u,inCollection:!1,indent:l,lineStart:f,parent:this},c):v&&f>r+1&&(c=f-1),this.node){if(d){var O=t.parent.items||t.parent.contents;O&&O.push(d)}g.length&&Array.prototype.push.apply(this.props,g),c=this.node.range.end}else if(h){var b=g[0];this.props.push(b),c=b.end}else c=y.endOfLine(o,r+1);var _=this.node?this.node.valueRange.end:c;return this.valueRange=new C(r,_),c}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.node?this.node.setOrigRanges(t,r):r}},{key:"toString",value:function(){var t=this.context.src,r=this.node,s=this.range,o=this.value;if(o!=null)return o;var u=r?t.slice(s.start,r.range.start)+String(r):t.slice(s.start,s.end);return y.addStringTerminator(t,s.end,u)}}]),e}(y),we=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.call(this,p.COMMENT)}return A(e,[{key:"parse",value:function(t,r){this.context=t;var s=this.parseComment(r);return this.range=new C(r,s),s}}]),e}(y);function He(i){for(var n=i;n instanceof Ge;)n=n.node;if(!(n instanceof dt))return null;for(var e=n.items.length,a=-1,t=e-1;t>=0;--t){var r=n.items[t];if(r.type===p.COMMENT){var s=r.context,o=s.indent,u=s.lineStart;if(o>0&&r.range.start>=u+o)break;a=t}else if(r.type===p.BLANK_LINE)a=t;else break}if(a===-1)return null;for(var f=n.items.splice(a,e-a),l=f[0].range.start;n.range.end=l,n.valueRange&&n.valueRange.end>l&&(n.valueRange.end=l),n!==i;)n=n.context.parent;return f}var dt=function(i){M(e,i);var n=I(e);function e(a){var t;N(this,e),t=n.call(this,a.type===p.SEQ_ITEM?p.SEQ:p.MAP);for(var r=a.props.length-1;r>=0;--r)if(a.props[r].start0}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=y.startOfLine(o,r),f=this.items[0];f.context.parent=this,this.valueRange=C.copy(f.valueRange);var l=f.range.start-f.context.lineStart,c=r;c=y.normalizeOffset(o,c);for(var v=o[c],h=y.endOfWhiteSpace(o,u)===c,g=!1;v;){for(;v===` -`||v==="#";){if(h&&v===` -`&&!g){var d=new me;if(c=d.parse({src:o},c),this.valueRange.end=c,c>=o.length){v=null;break}this.items.push(d),c-=1}else if(v==="#"){if(c=o.length){v=null;break}}if(u=c+1,c=y.endOfIndent(o,u),y.atBlank(o,c)){var m=y.endOfWhiteSpace(o,c),O=o[m];(!O||O===` -`||O==="#")&&(c=m)}v=o[c],h=!0}if(!v)break;if(c!==u+l&&(h||v!==":")){if(cr&&(c=u);break}else if(!this.error){var b="All collection items must start at the same column";this.error=new x(this,b)}}if(f.type===p.SEQ_ITEM){if(v!=="-"){u>r&&(c=u);break}}else if(v==="-"&&!this.error){var _=o[c+1];if(!_||_===` -`||_===" "||_===" "){var P="A collection cannot be both a mapping and a sequence";this.error=new x(this,P)}}var S=s({atLineStart:h,inCollection:!0,indent:l,lineStart:u,parent:this},c);if(!S)return c;if(this.items.push(S),this.valueRange.end=S.valueRange.end,c=y.normalizeOffset(o,S.range.end),v=o[c],h=!1,g=S.includesTrailingLines,v){for(var B=c-1,W=o[B];W===" "||W===" ";)W=o[--B];W===` -`&&(u=B+1,h=!0)}var V=He(S);V&&Array.prototype.push.apply(this.items,V)}return c}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.items.forEach(function(s){r=s.setOrigRanges(t,r)}),r}},{key:"toString",value:function(){var t=this.context.src,r=this.items,s=this.range,o=this.value;if(o!=null)return o;for(var u=t.slice(s.start,r[0].range.start)+String(r[0]),f=1;f=o+s?!0:u!=="#"&&u!==` -`?!1:e.nextContentHasIndent(t,r,s):!1}}]),e}(y),gn=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this,p.DIRECTIVE),a.name=null,a}return A(e,[{key:"parameters",get:function(){var t=this.rawValue;return t?t.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(t){for(var r=this.context.src,s=t,o=r[s];o&&o!==` -`&&o!==" "&&o!==" ";)o=r[s+=1];return this.name=r.slice(t,s),s}},{key:"parseParameters",value:function(t){for(var r=this.context.src,s=t,o=r[s];o&&o!==` -`&&o!=="#";)o=r[s+=1];return this.valueRange=new C(t,s),s}},{key:"parse",value:function(t,r){this.context=t;var s=this.parseName(r+1);return s=this.parseParameters(s),s=this.parseComment(s),this.range=new C(r,s),s}}]),e}(y),dn=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this,p.DOCUMENT),a.directives=null,a.contents=null,a.directivesEndMarker=null,a.documentEndMarker=null,a}return A(e,[{key:"parseDirectives",value:function(t){var r=this.context.src;this.directives=[];for(var s=!0,o=!1,u=t;!y.atDocumentBoundary(r,u,R.DIRECTIVES_END);)switch(u=e.startCommentOrEndBlankLine(r,u),r[u]){case` -`:if(s){var f=new me;u=f.parse({src:r},u),u0&&(this.contents=this.directives,this.directives=[]),u}return r[u]?(this.directivesEndMarker=new C(u,u+3),u+3):(o?this.error=new k(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),u)}},{key:"parseContents",value:function(t){var r=this.context,s=r.parseNode,o=r.src;this.contents||(this.contents=[]);for(var u=t;o[u-1]==="-";)u-=1;var f=y.endOfWhiteSpace(o,t),l=u===t;for(this.valueRange=new C(f);!y.atDocumentBoundary(o,f,R.DOCUMENT_END);){switch(o[f]){case` -`:if(l){var c=new me;f=c.parse({src:o},f),f0&&((r.length>0||t[0].type===p.COMMENT)&&(o+=`--- -`),o+=t.join("")),o[o.length-1]!==` -`&&(o+=` -`),o}}],[{key:"startCommentOrEndBlankLine",value:function(t,r){var s=y.endOfWhiteSpace(t,r),o=t[s];return o==="#"||o===` -`?s:r}}]),e}(y),yn=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=y.endOfIdentifier(s,r+1);return this.valueRange=new C(r+1,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}]),e}(y),ae={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},mn=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.blockIndent=null,r.chomping=ae.CLIP,r.header=null,r}return A(e,[{key:"includesTrailingLines",get:function(){return this.chomping===ae.KEEP}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=this.valueRange,r=t.start,s=t.end,o=this.context,u=o.indent,f=o.src;if(this.valueRange.isEmpty())return"";for(var l=null,c=f[s-1];c===` -`||c===" "||c===" ";){if(s-=1,s<=r){if(this.chomping===ae.KEEP)break;return""}c===` -`&&(l=s),c=f[s-1]}var v=s+1;l&&(this.chomping===ae.KEEP?(v=l,s=this.valueRange.end):s=l);for(var h=u+this.blockIndent,g=this.type===p.BLOCK_FOLDED,d=!0,w="",m="",O=!1,b=r;bc&&(c=d);o[h]===` -`?f=h:f=l=y.endOfLine(o,h)}return this.chomping!==ae.KEEP&&(f=o[l]?l+1:l),this.valueRange=new C(t+1,f),f}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=this.parseBlockHeader(r);return o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o=this.parseBlockValue(o),o}},{key:"setOrigRanges",value:function(t,r){return r=Q(F(e.prototype),"setOrigRanges",this).call(this,t,r),this.header?this.header.setOrigRange(t,r):r}}]),e}(y),wn=function(i){M(e,i);var n=I(e);function e(a,t){var r;return N(this,e),r=n.call(this,a,t),r.items=null,r}return A(e,[{key:"prevNodeIsJsonLike",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.items.length,r=this.items[t-1];return!!r&&(r.jsonLike||r.type===p.COMMENT&&this.prevNodeIsJsonLike(t-1))}},{key:"parse",value:function(t,r){this.context=t;var s=t.parseNode,o=t.src,u=t.indent,f=t.lineStart,l=o[r];this.items=[{char:l,offset:r}];var c=y.endOfWhiteSpace(o,r+1);for(l=o[c];l&&l!=="]"&&l!=="}";){switch(l){case` -`:{f=c+1;var v=y.endOfWhiteSpace(o,f);if(o[v]===` -`){var h=new me;f=h.parse({src:o},f),this.items.push(h)}if(c=y.endOfIndent(o,f),c<=f+u&&(l=o[c],cs.offset);)++o;s.origOffset=s.offset+o,r=o}}),r}},{key:"toString",value:function(){var t=this.context.src,r=this.items,s=this.range,o=this.value;if(o!=null)return o;var u=r.filter(function(c){return c instanceof y}),f="",l=s.start;return u.forEach(function(c){var v=t.slice(l,c.range.start);l=c.range.end,f+=v+String(c),f[f.length-1]===` -`&&t[l-1]!==` -`&&t[l]===` -`&&(l+=1)}),f+=t.slice(l,s.end),y.addStringTerminator(t,s.end,f)}}]),e}(y),On=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=[],r=this.valueRange,s=r.start,o=r.end,u=this.context,f=u.indent,l=u.src;l[o-1]!=='"'&&t.push(new x(this,'Missing closing "quote'));for(var c="",v=s+1;vO?l.slice(O,v+1):h)}else c+=h}return t.length>0?{errors:t,str:c}:c}},{key:"parseCharCode",value:function(t,r,s){var o=this.context.src,u=o.substr(t,r),f=u.length===r&&/^[0-9a-fA-F]+$/.test(u),l=f?parseInt(u,16):NaN;return isNaN(l)?(s.push(new x(this,"Invalid escape sequence ".concat(o.substr(t-2,r+2)))),o.substr(t-2,r+2)):String.fromCodePoint(l)}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=e.endOfQuote(s,r+1);return this.valueRange=new C(r,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}],[{key:"endOfQuote",value:function(t,r){for(var s=t[r];s&&s!=='"';)r+=s==="\\"?2:1,s=t[r];return r+1}}]),e}(y),bn=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var t=[],r=this.valueRange,s=r.start,o=r.end,u=this.context,f=u.indent,l=u.src;l[o-1]!=="'"&&t.push(new x(this,"Missing closing 'quote"));for(var c="",v=s+1;vO?l.slice(O,v+1):h)}else c+=h}return t.length>0?{errors:t,str:c}:c}},{key:"parse",value:function(t,r){this.context=t;var s=t.src,o=e.endOfQuote(s,r+1);return this.valueRange=new C(r,o),o=y.endOfWhiteSpace(s,o),o=this.parseComment(o),o}}],[{key:"endOfQuote",value:function(t,r){for(var s=t[r];s;)if(s==="'"){if(t[r+1]!=="'")break;s=t[r+=2]}else s=t[r+=1];return r+1}}]),e}(y);function Sn(i,n){switch(i){case p.ALIAS:return new yn(i,n);case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:return new mn(i,n);case p.FLOW_MAP:case p.FLOW_SEQ:return new wn(i,n);case p.MAP_KEY:case p.MAP_VALUE:case p.SEQ_ITEM:return new Ge(i,n);case p.COMMENT:case p.PLAIN:return new gt(i,n);case p.QUOTE_DOUBLE:return new On(i,n);case p.QUOTE_SINGLE:return new bn(i,n);default:return null}}var kn=function(){function i(){var n=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.atLineStart,r=a.inCollection,s=a.inFlow,o=a.indent,u=a.lineStart,f=a.parent;N(this,i),$(this,"parseNode",function(l,c){if(y.atDocumentBoundary(n.src,c))return null;var v=new i(n,l),h=v.parseProps(c),g=h.props,d=h.type,w=h.valueStart,m=Sn(d,g),O=m.parse(v,w);if(m.range=new C(c,O),O<=c&&(m.error=new Error("Node#parse consumed no characters"),m.error.parseEnd=O,m.error.source=m,m.range.end=c+1),v.nodeStartsCollection(m)){!m.error&&!v.atLineStart&&v.parent.type===p.DOCUMENT&&(m.error=new x(m,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var b=new dt(m);return O=b.parse(new i(v),O),b.range=new C(c,O),b}return m}),this.atLineStart=t??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=o??e.indent,this.lineStart=u??e.lineStart,this.parent=f??(e.parent||{}),this.root=e.root,this.src=e.src}return A(i,[{key:"nodeStartsCollection",value:function(e){var a=this.inCollection,t=this.inFlow,r=this.src;if(a||t)return!1;if(e instanceof Ge)return!0;var s=e.range.end;return r[s]===` -`||r[s-1]===` -`?!1:(s=y.endOfWhiteSpace(r,s),r[s]===":")}},{key:"parseProps",value:function(e){var a=this.inFlow,t=this.parent,r=this.src,s=[],o=!1;e=this.atLineStart?y.endOfIndent(r,e):y.endOfWhiteSpace(r,e);for(var u=r[e];u===R.ANCHOR||u===R.COMMENT||u===R.TAG||u===` -`;){if(u===` -`){var f=e,l=void 0;do l=f+1,f=y.endOfIndent(r,l);while(r[f]===` -`);var c=f-(l+this.indent),v=t.type===p.SEQ_ITEM&&t.context.atLineStart;if(r[f]!=="#"&&!y.nextNodeIsIndented(r[f],c,!v))break;this.atLineStart=!0,this.lineStart=l,o=!1,e=f}else if(u===R.COMMENT){var h=y.endOfLine(r,e+1);s.push(new C(e,h)),e=h}else{var g=y.endOfIdentifier(r,e+1);u===R.TAG&&r[g]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(r.slice(e+1,g+13))&&(g=y.endOfIdentifier(r,g+5)),s.push(new C(e,g)),o=!0,e=y.endOfWhiteSpace(r,g)}u=r[e]}o&&u===":"&&y.atBlank(r,e+1,!0)&&(e-=1);var d=i.parseType(r,e,a);return{props:s,type:d,valueStart:e}}}],[{key:"parseType",value:function(e,a,t){switch(e[a]){case"*":return p.ALIAS;case">":return p.BLOCK_FOLDED;case"|":return p.BLOCK_LITERAL;case"{":return p.FLOW_MAP;case"[":return p.FLOW_SEQ;case"?":return!t&&y.atBlank(e,a+1,!0)?p.MAP_KEY:p.PLAIN;case":":return!t&&y.atBlank(e,a+1,!0)?p.MAP_VALUE:p.PLAIN;case"-":return!t&&y.atBlank(e,a+1,!0)?p.SEQ_ITEM:p.PLAIN;case'"':return p.QUOTE_DOUBLE;case"'":return p.QUOTE_SINGLE;default:return p.PLAIN}}}]),i}();function ze(i){var n=[];i.indexOf("\r")!==-1&&(i=i.replace(/\r\n?/g,function(s,o){return s.length>1&&n.push(o),` -`}));var e=[],a=0;do{var t=new dn,r=new kn({src:i});a=t.parse(r,a),e.push(t)}while(a=0;--t){var r=n[t];if(Number.isInteger(r)&&r>=0){var s=[];s[r]=a,a=s}else{var o={};Object.defineProperty(o,r,{value:a,writable:!0,enumerable:!0,configurable:!0}),a=o}}return i.createNode(a,!1)}var Oe=function(n){return n==null||J(n)==="object"&&n[Symbol.iterator]().next().done},j=function(i){M(e,i);var n=I(e);function e(a){var t;return N(this,e),t=n.call(this),$(q(t),"items",[]),t.schema=a,t}return A(e,[{key:"addIn",value:function(t,r){if(Oe(t))this.add(r);else{var s=de(t),o=s[0],u=s.slice(1),f=this.get(o,!0);if(f instanceof e)f.addIn(u,r);else if(f===void 0&&this.schema)this.set(o,yt(this.schema,u,r));else throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(u))}}},{key:"deleteIn",value:function(t){var r=de(t),s=r[0],o=r.slice(1);if(o.length===0)return this.delete(s);var u=this.get(s,!0);if(u instanceof e)return u.deleteIn(o);throw new Error("Expected YAML collection at ".concat(s,". Remaining path: ").concat(o))}},{key:"getIn",value:function(t,r){var s=de(t),o=s[0],u=s.slice(1),f=this.get(o,!0);return u.length===0?!r&&f instanceof L?f.value:f:f instanceof e?f.getIn(u,r):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every(function(t){if(!t||t.type!=="PAIR")return!1;var r=t.value;return r==null||r instanceof L&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}},{key:"hasIn",value:function(t){var r=de(t),s=r[0],o=r.slice(1);if(o.length===0)return this.has(s);var u=this.get(s,!0);return u instanceof e?u.hasIn(o):!1}},{key:"setIn",value:function(t,r){var s=de(t),o=s[0],u=s.slice(1);if(u.length===0)this.set(o,r);else{var f=this.get(o,!0);if(f instanceof e)f.setIn(u,r);else if(f===void 0&&this.schema)this.set(o,yt(this.schema,u,r));else throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(u))}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(t,r,s,o){var u=this,f=r.blockItem,l=r.flowChars,c=r.isMap,v=r.itemIndent,h=t,g=h.indent,d=h.indentStep,w=h.stringify,m=this.type===p.FLOW_MAP||this.type===p.FLOW_SEQ||t.inFlow;m&&(v+=d);var O=c&&this.hasAllNullValues();t=Object.assign({},t,{allNullValues:O,indent:v,inFlow:m,type:null});var b=!1,_=!1,P=this.items.reduce(function(G,D,Sr){var Ke;D&&(!b&&D.spaceBefore&&G.push({type:"comment",str:""}),D.commentBefore&&D.commentBefore.match(/^.*$/gm).forEach(function(kr){G.push({type:"comment",str:"#".concat(kr)})}),D.comment&&(Ke=D.comment),m&&(!b&&D.spaceBefore||D.commentBefore||D.comment||D.key&&(D.key.commentBefore||D.key.comment)||D.value&&(D.value.commentBefore||D.value.comment))&&(_=!0)),b=!1;var Le=w(D,t,function(){return Ke=null},function(){return b=!0});return m&&!_&&Le.includes(` -`)&&(_=!0),m&&Sre.maxFlowStringSingleLineLength){S=B;var Y=T(V),Z;try{for(Y.s();!(Z=Y.n()).done;){var Qe=Z.value;S+=Qe?` -`.concat(d).concat(g).concat(Qe):` -`}}catch(G){Y.e(G)}finally{Y.f()}S+=` -`.concat(g).concat(W)}else S="".concat(B," ").concat(V.join(" ")," ").concat(W)}else{var an=P.map(f);S=an.shift();var Ue=T(an),sn;try{for(Ue.s();!(sn=Ue.n()).done;){var on=sn.value;S+=on?` -`.concat(g).concat(on):` -`}}catch(G){Ue.e(G)}finally{Ue.f()}}return this.comment?(S+=` -`+this.comment.replace(/^/gm,"".concat(g,"#")),s&&s()):b&&o&&o(),S}}]),e}(U);$(j,"maxFlowStringSingleLineLength",60);function Ie(i){var n=i instanceof L?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),Number.isInteger(n)&&n>=0?n:null}var z=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"add",value:function(t){this.items.push(t)}},{key:"delete",value:function(t){var r=Ie(t);if(typeof r!="number")return!1;var s=this.items.splice(r,1);return s.length>0}},{key:"get",value:function(t,r){var s=Ie(t);if(typeof s=="number"){var o=this.items[s];return!r&&o instanceof L?o.value:o}}},{key:"has",value:function(t){var r=Ie(t);return typeof r=="number"&&r1&&arguments[1]!==void 0?arguments[1]:null;return N(this,e),t=n.call(this),t.key=a,t.value=r,t.type=e.Type.PAIR,t}return A(e,[{key:"commentBefore",get:function(){return this.key instanceof U?this.key.commentBefore:void 0},set:function(t){if(this.key==null&&(this.key=new L(null)),this.key instanceof U)this.key.commentBefore=t;else{var r="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(r)}}},{key:"addToJSMap",value:function(t,r){var s=H(this.key,"",t);if(r instanceof Map){var o=H(this.value,s,t);r.set(s,o)}else if(r instanceof Set)r.add(s);else{var u=Nn(this.key,s,t),f=H(this.value,u,t);u in r?Object.defineProperty(r,u,{value:f,writable:!0,enumerable:!0,configurable:!0}):r[u]=f}return r}},{key:"toJSON",value:function(t,r){var s=r&&r.mapAsMap?new Map:{};return this.addToJSMap(r,s)}},{key:"toString",value:function(t,r,s){if(!t||!t.doc)return JSON.stringify(this);var o=t.doc.options,u=o.indent,f=o.indentSeq,l=o.simpleKeys,c=this.key,v=this.value,h=c instanceof U&&c.comment;if(l){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(c instanceof j){var g="With simple keys, collection cannot be used as a key value";throw new Error(g)}}var d=!l&&(!c||h||(c instanceof U?c instanceof j||c.type===p.BLOCK_FOLDED||c.type===p.BLOCK_LITERAL:J(c)==="object")),w=t,m=w.doc,O=w.indent,b=w.indentStep,_=w.stringify;t=Object.assign({},t,{implicitKey:!d,indent:O+b});var P=!1,S=_(c,t,function(){return h=null},function(){return P=!0});if(S=ce(S,t.indent,h),!d&&S.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.allNullValues&&!l)return this.comment?(S=ce(S,t.indent,this.comment),r&&r()):P&&!h&&s&&s(),t.inFlow&&!d?S:"? ".concat(S);S=d?"? ".concat(S,` -`).concat(O,":"):"".concat(S,":"),this.comment&&(S=ce(S,t.indent,this.comment),r&&r());var B="",W=null;if(v instanceof U){if(v.spaceBefore&&(B=` -`),v.commentBefore){var V=v.commentBefore.replace(/^/gm,"".concat(t.indent,"#"));B+=` -`.concat(V)}W=v.comment}else v&&J(v)==="object"&&(v=m.schema.createNode(v,!0));t.implicitKey=!1,!d&&!this.comment&&v instanceof L&&(t.indentAtStart=S.length+1),P=!1,!f&&u>=2&&!t.inFlow&&!d&&v instanceof z&&v.type!==p.FLOW_SEQ&&!v.tag&&!m.anchors.getName(v)&&(t.indent=t.indent.substr(2));var Y=_(v,t,function(){return W=null},function(){return P=!0}),Z=" ";if(B||this.comment)Z="".concat(B,` -`).concat(t.indent);else if(!d&&v instanceof j){var Qe=Y[0]==="["||Y[0]==="{";(!Qe||Y.includes(` -`))&&(Z=` -`.concat(t.indent))}else Y[0]===` -`&&(Z="");return P&&!W&&s&&s(),ce(S+Z+Y,t.indent,W)}}]),e}(U);$(E,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ln=function i(n,e){if(n instanceof X){var a=e.get(n.source);return a.count*a.aliasCount}else if(n instanceof j){var t=0,r=T(n.items),s;try{for(r.s();!(s=r.n()).done;){var o=s.value,u=i(o,e);u>t&&(t=u)}}catch(c){r.e(c)}finally{r.f()}return t}else if(n instanceof E){var f=i(n.key,e),l=i(n.value,e);return Math.max(f,l)}return 1},X=function(i){M(e,i);var n=I(e);function e(a){var t;return N(this,e),t=n.call(this),t.source=a,t.type=p.ALIAS,t}return A(e,[{key:"tag",set:function(t){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(t,r){if(!r)return H(this.source,t,r);var s=r.anchors,o=r.maxAliasCount,u=s.get(this.source);if(!u||u.res===void 0){var f="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new ye(this.cstNode,f):new ReferenceError(f)}if(o>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Ln(this.source,s)),u.count*u.aliasCount>o)){var l="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new ye(this.cstNode,l):new ReferenceError(l)}return u.res}},{key:"toString",value:function(t){return e.stringify(this,t)}}],[{key:"stringify",value:function(t,r){var s=t.range,o=t.source,u=r.anchors,f=r.doc,l=r.implicitKey,c=r.inStringifyKey,v=Object.keys(u).find(function(g){return u[g]===o});if(!v&&c&&(v=f.anchors.getName(o)||f.anchors.newName()),v)return"*".concat(v).concat(l?" ":"");var h=f.anchors.getName(o)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(h," [").concat(s,"]"))}}]),e}(U);$(X,"default",!0);function oe(i,n){var e=n instanceof L?n.value:n,a=T(i),t;try{for(a.s();!(t=a.n()).done;){var r=t.value;if(r instanceof E&&(r.key===n||r.key===e||r.key&&r.key.value===e))return r}}catch(s){a.e(s)}finally{a.f()}}var K=function(i){M(e,i);var n=I(e);function e(){return N(this,e),n.apply(this,arguments)}return A(e,[{key:"add",value:function(t,r){t?t instanceof E||(t=new E(t.key||t,t.value)):t=new E(t);var s=oe(this.items,t.key),o=this.schema&&this.schema.sortMapEntries;if(s)if(r)s.value=t.value;else throw new Error("Key ".concat(t.key," already set"));else if(o){var u=this.items.findIndex(function(f){return o(t,f)<0});u===-1?this.items.push(t):this.items.splice(u,0,t)}else this.items.push(t)}},{key:"delete",value:function(t){var r=oe(this.items,t);if(!r)return!1;var s=this.items.splice(this.items.indexOf(r),1);return s.length>0}},{key:"get",value:function(t,r){var s=oe(this.items,t),o=s&&s.value;return!r&&o instanceof L?o.value:o}},{key:"has",value:function(t){return!!oe(this.items,t)}},{key:"set",value:function(t,r){this.add(new E(t,r),!0)}},{key:"toJSON",value:function(t,r,s){var o=s?new s:r&&r.mapAsMap?new Map:{};r&&r.onCreate&&r.onCreate(o);var u=T(this.items),f;try{for(u.s();!(f=u.n()).done;){var l=f.value;l.addToJSMap(r,o)}}catch(c){u.e(c)}finally{u.f()}return o}},{key:"toString",value:function(t,r,s){if(!t)return JSON.stringify(this);var o=T(this.items),u;try{for(o.s();!(u=o.n()).done;){var f=u.value;if(!(f instanceof E))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(f)," instead"))}}catch(l){o.e(l)}finally{o.f()}return Q(F(e.prototype),"toString",this).call(this,t,{blockItem:function(c){return c.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:t.indent||""},r,s)}}]),e}(j),mt="<<",wt=function(i){M(e,i);var n=I(e);function e(a){var t;if(N(this,e),a instanceof E){var r=a.value;r instanceof z||(r=new z,r.items.push(a.value),r.range=a.value.range),t=n.call(this,a.key,r),t.range=a.range}else t=n.call(this,new L(mt),new z);return t.type=E.Type.MERGE_PAIR,ft(t)}return A(e,[{key:"addToJSMap",value:function(t,r){var s=T(this.value.items),o;try{for(s.s();!(o=s.n()).done;){var u=o.value.source;if(!(u instanceof K))throw new Error("Merge sources must be maps");var f=u.toJSON(null,t,Map),l=T(f),c;try{for(l.s();!(c=l.n()).done;){var v=ge(c.value,2),h=v[0],g=v[1];r instanceof Map?r.has(h)||r.set(h,g):r instanceof Set?r.add(h):Object.prototype.hasOwnProperty.call(r,h)||Object.defineProperty(r,h,{value:g,writable:!0,enumerable:!0,configurable:!0})}}catch(d){l.e(d)}finally{l.f()}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"toString",value:function(t,r){var s=this.value;if(s.items.length>1)return Q(F(e.prototype),"toString",this).call(this,t,r);this.value=s.items[0];var o=Q(F(e.prototype),"toString",this).call(this,t,r);return this.value=s,o}}]),e}(E),be={defaultType:p.BLOCK_LITERAL,lineWidth:76},ee={trueStr:"true",falseStr:"false"},ie={asBigInt:!1},ve={nullStr:"null"},te={defaultType:p.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Ze(i,n,e){var a=T(n),t;try{for(a.s();!(t=a.n()).done;){var r=t.value,s=r.format,o=r.test,u=r.resolve;if(o){var f=i.match(o);if(f){var l=u.apply(null,f);return l instanceof L||(l=new L(l)),s&&(l.format=s),l}}}}catch(c){a.e(c)}finally{a.f()}return e&&(i=e(i)),new L(i)}var Ot="flow",Xe="block",Te="quoted",bt=function(n,e){for(var a=n[e+1];a===" "||a===" ";){do a=n[e+=1];while(a&&a!==` -`);a=n[e+1]}return e};function Pe(i,n,e,a){var t=a.indentAtStart,r=a.lineWidth,s=r===void 0?80:r,o=a.minContentWidth,u=o===void 0?20:o,f=a.onFold,l=a.onOverflow;if(!s||s<0)return i;var c=Math.max(1+u,1+s-n.length);if(i.length<=c)return i;var v=[],h={},g=s-n.length;typeof t=="number"&&(t>s-Math.max(2,u)?v.push(0):g=s-t);var d=void 0,w=void 0,m=!1,O=-1,b=-1,_=-1;e===Xe&&(O=bt(i,O),O!==-1&&(g=O+c));for(var P;P=i[O+=1];){if(e===Te&&P==="\\"){switch(b=O,i[O+1]){case"x":O+=3;break;case"u":O+=5;break;case"U":O+=9;break;default:O+=1}_=O}if(P===` -`)e===Xe&&(O=bt(i,O)),g=O+c,d=void 0;else{if(P===" "&&w&&w!==" "&&w!==` -`&&w!==" "){var S=i[O+1];S&&S!==" "&&S!==` -`&&S!==" "&&(d=O)}if(O>=g)if(d)v.push(d),g=d+c,d=void 0;else if(e===Te){for(;w===" "||w===" ";)w=P,P=i[O+=1],m=!0;var B=O>_+1?O-2:b-1;if(h[B])return i;v.push(B),h[B]=!0,g=B+c,d=void 0}else m=!0}w=P}if(m&&l&&l(),v.length===0)return i;f&&f();for(var W=i.slice(0,v[0]),V=0;Va)return!0;if(s=r+1,t-s<=a)return!1}return!0}function ue(i,n){var e=n.implicitKey,a=te.doubleQuoted,t=a.jsonEncoding,r=a.minMultiLineLength,s=JSON.stringify(i);if(t)return s;for(var o=n.indent||(_e(i)?" ":""),u="",f=0,l=0,c=s[l];c;c=s[++l])if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n"&&(u+=s.slice(f,l)+"\\ ",l+=1,f=l,c="\\"),c==="\\")switch(s[l+1]){case"u":{u+=s.slice(f,l);var v=s.substr(l+2,4);switch(v){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:v.substr(0,2)==="00"?u+="\\x"+v.substr(2):u+=s.substr(l,6)}l+=5,f=l+1}break;case"n":if(e||s[l+2]==='"'||s.length";if(!s)return l+` -`;var c="",v="";if(s=s.replace(/[\n\t ]*$/,function(g){var d=g.indexOf(` -`);return d===-1?l+="-":(s===g||d!==g.length-1)&&(l+="+",a&&a()),v=g.replace(/\n$/,""),""}).replace(/^[\n ]*/,function(g){g.indexOf(" ")!==-1&&(l+=u);var d=g.match(/ +$/);return d?(c=g.slice(0,-d[0].length),d[0]):(c=g,"")}),v&&(v=v.replace(/\n+(?!\n|$)/g,"$&".concat(o))),c&&(c=c.replace(/\n+/g,"$&".concat(o))),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),e&&e()),!s)return"".concat(l).concat(u,` -`).concat(o).concat(v);if(f)return s=s.replace(/\n+/g,"$&".concat(o)),"".concat(l,` -`).concat(o).concat(c).concat(s).concat(v);s=s.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(o));var h=Pe("".concat(c).concat(s).concat(v),o,Xe,te.fold);return"".concat(l,` -`).concat(o).concat(h)}function Mn(i,n,e,a){var t=i.comment,r=i.type,s=i.value,o=n.actualString,u=n.implicitKey,f=n.indent,l=n.inFlow;if(u&&/[\n[\]{},]/.test(s)||l&&/[[\]{},]/.test(s))return ue(s,n);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return u||l||s.indexOf(` -`)===-1?s.indexOf('"')!==-1&&s.indexOf("'")===-1?St(s,n):ue(s,n):Ce(i,n,e,a);if(!u&&!l&&r!==p.PLAIN&&s.indexOf(` -`)!==-1)return Ce(i,n,e,a);if(f===""&&_e(s))return n.forceBlockIndent=!0,Ce(i,n,e,a);var c=s.replace(/\n+/g,`$& -`.concat(f));if(o){var v=n.doc.schema.tags,h=Ze(c,v,v.scalarFallback).value;if(typeof h!="string")return ue(s,n)}var g=u?c:Pe(c,f,Ot,et(n));return t&&!l&&(g.indexOf(` -`)!==-1||t.indexOf(` -`)!==-1)?(e&&e(),En(g,f,t)):g}function tt(i,n,e,a){var t=te.defaultType,r=n.implicitKey,s=n.inFlow,o=i,u=o.type,f=o.value;typeof f!="string"&&(f=String(f),i=Object.assign({},i,{value:f}));var l=function(h){switch(h){case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:return Ce(i,n,e,a);case p.QUOTE_DOUBLE:return ue(f,n);case p.QUOTE_SINGLE:return St(f,n);case p.PLAIN:return Mn(i,n,e,a);default:return null}};(u!==p.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(f)||(r||s)&&(u===p.BLOCK_FOLDED||u===p.BLOCK_LITERAL))&&(u=p.QUOTE_DOUBLE);var c=l(u);if(c===null&&(c=l(t),c===null))throw new Error("Unsupported default string type ".concat(t));return c}function ne(i){var n=i.format,e=i.minFractionDigits,a=i.tag,t=i.value;if(typeof t=="bigint")return String(t);if(!isFinite(t))return isNaN(t)?".nan":t<0?"-.inf":".inf";var r=JSON.stringify(t);if(!n&&e&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(r)){var s=r.indexOf(".");s<0&&(s=r.length,r+=".");for(var o=e-(r.length-s-1);o-- >0;)r+="0"}return r}function kt(i,n){var e,a;switch(n.type){case p.FLOW_MAP:e="}",a="flow map";break;case p.FLOW_SEQ:e="]",a="flow sequence";break;default:i.push(new k(n,"Not a flow collection!?"));return}for(var t,r=n.items.length-1;r>=0;--r){var s=n.items[r];if(!s||s.type!==p.COMMENT){t=s;break}}if(t&&t.char!==e){var o="Expected ".concat(a," to end with ").concat(e),u;typeof t.offset=="number"?(u=new k(n,o),u.offset=t.offset+1):(u=new k(t,o),t.range&&t.range.end&&(u.offset=t.range.end-t.range.start)),i.push(u)}}function Et(i,n){var e=n.context.src[n.range.start-1];if(e!==` -`&&e!==" "&&e!==" "){var a="Comments must be separated from other tokens by white space characters";i.push(new k(n,a))}}function Nt(i,n){var e=String(n),a=e.substr(0,8)+"..."+e.substr(-8);return new k(i,'The "'.concat(a,'" key is too long'))}function Lt(i,n){var e=T(n),a;try{for(e.s();!(a=e.n()).done;){var t=a.value,r=t.afterKey,s=t.before,o=t.comment,u=i.items[s];u?(r&&u.value&&(u=u.value),o===void 0?(r||!u.commentBefore)&&(u.spaceBefore=!0):u.commentBefore?u.commentBefore+=` -`+o:u.commentBefore=o):o!==void 0&&(i.comment?i.comment+=` -`+o:i.comment=o)}}catch(f){e.e(f)}finally{e.f()}}function Se(i,n){var e=n.strValue;return e?typeof e=="string"?e:(e.errors.forEach(function(a){a.source||(a.source=n),i.errors.push(a)}),e.str):""}function In(i,n){var e=n.tag,a=e.handle,t=e.suffix,r=i.tagPrefixes.find(function(u){return u.handle===a});if(!r){var s=i.getDefaults().tagPrefixes;if(s&&(r=s.find(function(u){return u.handle===a})),!r)throw new k(n,"The ".concat(a," tag handle is non-default and was not declared."))}if(!t)throw new k(n,"The ".concat(a," tag has no suffix."));if(a==="!"&&(i.version||i.options.version)==="1.0"){if(t[0]==="^")return i.warnings.push(new le(n,"YAML 1.0 ^ tag expansion is not supported")),t;if(/[:/]/.test(t)){var o=t.match(/^([a-z0-9-]+)\/(.*)/i);return o?"tag:".concat(o[1],".yaml.org,2002:").concat(o[2]):"tag:".concat(t)}}return r.prefix+decodeURIComponent(t)}function Tn(i,n){var e=n.tag,a=n.type,t=!1;if(e){var r=e.handle,s=e.suffix,o=e.verbatim;if(o){if(o!=="!"&&o!=="!!")return o;var u="Verbatim tags aren't resolved, so ".concat(o," is invalid.");i.errors.push(new k(n,u))}else if(r==="!"&&!s)t=!0;else try{return In(i,n)}catch(f){i.errors.push(f)}}switch(a){case p.BLOCK_FOLDED:case p.BLOCK_LITERAL:case p.QUOTE_DOUBLE:case p.QUOTE_SINGLE:return re.STR;case p.FLOW_MAP:case p.MAP:return re.MAP;case p.FLOW_SEQ:case p.SEQ:return re.SEQ;case p.PLAIN:return t?re.STR:null;default:return null}}function At(i,n,e){var a=i.schema.tags,t=[],r=T(a),s;try{for(r.s();!(s=r.n()).done;){var o=s.value;if(o.tag===e)if(o.test)t.push(o);else{var u=o.resolve(i,n);return u instanceof j?u:new L(u)}}}catch(l){r.e(l)}finally{r.f()}var f=Se(i,n);return typeof f=="string"&&t.length>0?Ze(f,t,a.scalarFallback):null}function Pn(i){var n=i.type;switch(n){case p.FLOW_MAP:case p.MAP:return re.MAP;case p.FLOW_SEQ:case p.SEQ:return re.SEQ;default:return re.STR}}function _n(i,n,e){try{var a=At(i,n,e);if(a)return e&&n.tag&&(a.tag=e),a}catch(u){return u.source||(u.source=n),i.errors.push(u),null}try{var t=Pn(n);if(!t)throw new Error("The tag ".concat(e," is unavailable"));var r="The tag ".concat(e," is unavailable, falling back to ").concat(t);i.warnings.push(new le(n,r));var s=At(i,n,t);return s.tag=e,s}catch(u){var o=new ye(n,u.message);return o.stack=u.stack,i.errors.push(o),null}}var Cn=function(n){if(!n)return!1;var e=n.type;return e===p.MAP_KEY||e===p.MAP_VALUE||e===p.SEQ_ITEM};function Rn(i,n){var e={before:[],after:[]},a=!1,t=!1,r=Cn(n.context.parent)?n.context.parent.props.concat(n.props):n.props,s=T(r),o;try{for(s.s();!(o=s.n()).done;){var u=o.value,f=u.start,l=u.end;switch(n.context.src[f]){case R.COMMENT:{if(!n.commentHasRequiredWhitespace(f)){var c="Comments must be separated from other tokens by white space characters";i.push(new k(n,c))}var v=n.header,h=n.valueRange,g=h&&(f>h.start||v&&f>v.start)?e.after:e.before;g.push(n.context.src.slice(f+1,l));break}case R.ANCHOR:if(a){var d="A node can have at most one anchor";i.push(new k(n,d))}a=!0;break;case R.TAG:if(t){var w="A node can have at most one tag";i.push(new k(n,w))}t=!0;break}}}catch(m){s.e(m)}finally{s.f()}return{comments:e,hasAnchor:a,hasTag:t}}function Bn(i,n){var e=i.anchors,a=i.errors,t=i.schema;if(n.type===p.ALIAS){var r=n.rawValue,s=e.getNode(r);if(!s){var o="Aliased anchor not found: ".concat(r);return a.push(new ye(n,o)),null}var u=new X(s);return e._cstAliases.push(u),u}var f=Tn(i,n);if(f)return _n(i,n,f);if(n.type!==p.PLAIN){var l="Failed to resolve ".concat(n.type," node here");return a.push(new x(n,l)),null}try{var c=Se(i,n);return Ze(c,t.tags,t.tags.scalarFallback)}catch(v){return v.source||(v.source=n),a.push(v),null}}function se(i,n){if(!n)return null;n.error&&i.errors.push(n.error);var e=Rn(i.errors,n),a=e.comments,t=e.hasAnchor,r=e.hasTag;if(t){var s=i.anchors,o=n.anchor,u=s.getNode(o);u&&(s.map[s.newName(o)]=u),s.map[o]=n}if(n.type===p.ALIAS&&(t||r)){var f="An alias node must not specify any properties";i.errors.push(new k(n,f))}var l=Bn(i,n);if(l){l.range=[n.range.start,n.range.end],i.options.keepCstNodes&&(l.cstNode=n),i.options.keepNodeTypes&&(l.type=n.type);var c=a.before.join(` -`);c&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,` -`).concat(c):c);var v=a.after.join(` -`);v&&(l.comment=l.comment?"".concat(l.comment,` -`).concat(v):v)}return n.resolved=l}function Mt(i,n){if(n.type!==p.MAP&&n.type!==p.FLOW_MAP){var e="A ".concat(n.type," node cannot be resolved as a mapping");return i.errors.push(new x(n,e)),null}var a=n.type===p.FLOW_MAP?Wn(i,n):jn(i,n),t=a.comments,r=a.items,s=new K;s.items=r,Lt(s,t);for(var o=!1,u=0;ut.valueRange.start||r[o]!==R.COMMENT)return!1;for(var u=a;u0){f=new gt(p.PLAIN,[]),f.context={parent:o,src:o.context.src};var l=o.range.start+1;if(f.range={start:l,end:l},f.valueRange={start:l,end:l},typeof o.range.origStart=="number"){var c=o.range.origStart+1;f.range.origStart=f.range.origEnd=c,f.valueRange.origStart=f.valueRange.origEnd=c}}var v=new E(t,se(i,f));Fn(o,v),a.push(v),t&&typeof r=="number"&&o.range.start>r+1024&&i.errors.push(Nt(n,t)),t=void 0,r=null}break;default:t!==void 0&&a.push(new E(t)),t=se(i,o),r=o.range.start,o.error&&i.errors.push(o.error);e:for(var h=s+1;;++h){var g=n.items[h];switch(g&&g.type){case p.BLANK_LINE:case p.COMMENT:continue e;case p.MAP_VALUE:break e;default:{var d="Implicit map keys need to be followed by map values";i.errors.push(new k(o,d));break e}}}if(o.valueRangeContainsNewline){var w="Implicit map keys need to be on a single line";i.errors.push(new k(o,w))}}}return t!==void 0&&a.push(new E(t)),{comments:e,items:a}}function Wn(i,n){for(var e=[],a=[],t=void 0,r=!1,s="{",o=0;os+1024&&i.errors.push(Nt(n,r));for(var w=u.context.src,m=s;m1){var r="Each pair must have its own sequence indicator";throw new k(n,r)}var s=t.items[0]||new E;t.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(t.commentBefore,` -`).concat(s.commentBefore):t.commentBefore),t.comment&&(s.comment=s.comment?"".concat(t.comment,` -`).concat(s.comment):t.comment),t=s}e.items[a]=t instanceof E?t:new E(t)}}return e}function _t(i,n,e){var a=new z(i);a.tag="tag:yaml.org,2002:pairs";var t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=r.value,o=void 0,u=void 0;if(Array.isArray(s))if(s.length===2)o=s[0],u=s[1];else throw new TypeError("Expected [key, value] tuple: ".concat(s));else if(s&&s instanceof Object){var f=Object.keys(s);if(f.length===1)o=f[0],u=s[o];else throw new TypeError("Expected { key: value } tuple: ".concat(s))}else o=s;var l=i.createPair(o,u,e);a.items.push(l)}}catch(c){t.e(c)}finally{t.f()}return a}var Ct={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Pt,createNode:_t},Re=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this),$(q(a),"add",K.prototype.add.bind(q(a))),$(q(a),"delete",K.prototype.delete.bind(q(a))),$(q(a),"get",K.prototype.get.bind(q(a))),$(q(a),"has",K.prototype.has.bind(q(a))),$(q(a),"set",K.prototype.set.bind(q(a))),a.tag=e.tag,a}return A(e,[{key:"toJSON",value:function(t,r){var s=new Map;r&&r.onCreate&&r.onCreate(s);var o=T(this.items),u;try{for(o.s();!(u=o.n()).done;){var f=u.value,l=void 0,c=void 0;if(f instanceof E?(l=H(f.key,"",r),c=H(f.value,l,r)):l=H(f,"",r),s.has(l))throw new Error("Ordered maps must not include duplicate keys");s.set(l,c)}}catch(v){o.e(v)}finally{o.f()}return s}}]),e}(z);$(Re,"tag","tag:yaml.org,2002:omap");function Yn(i,n){var e=Pt(i,n),a=[],t=T(e.items),r;try{for(t.s();!(r=t.n()).done;){var s=r.value.key;if(s instanceof L)if(a.includes(s.value)){var o="Ordered maps must not include duplicate keys";throw new k(n,o)}else a.push(s.value)}}catch(u){t.e(u)}finally{t.f()}return Object.assign(new Re,e)}function Qn(i,n,e){var a=_t(i,n,e),t=new Re;return t.items=a.items,t}var Rt={identify:function(n){return n instanceof Map},nodeClass:Re,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Yn,createNode:Qn},Be=function(i){M(e,i);var n=I(e);function e(){var a;return N(this,e),a=n.call(this),a.tag=e.tag,a}return A(e,[{key:"add",value:function(t){var r=t instanceof E?t:new E(t),s=oe(this.items,r.key);s||this.items.push(r)}},{key:"get",value:function(t,r){var s=oe(this.items,t);return!r&&s instanceof E?s.key instanceof L?s.key.value:s.key:s}},{key:"set",value:function(t,r){if(typeof r!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(J(r)));var s=oe(this.items,t);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new E(t))}},{key:"toJSON",value:function(t,r){return Q(F(e.prototype),"toJSON",this).call(this,t,r,Set)}},{key:"toString",value:function(t,r,s){if(!t)return JSON.stringify(this);if(this.hasAllNullValues())return Q(F(e.prototype),"toString",this).call(this,t,r,s);throw new Error("Set items must all have null values")}}]),e}(K);$(Be,"tag","tag:yaml.org,2002:set");function Un(i,n){var e=Mt(i,n);if(!e.hasAllNullValues())throw new k(n,"Set items must all have null values");return Object.assign(new Be,e)}function Kn(i,n,e){var a=new Be,t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=r.value;a.items.push(i.createPair(s,null,e))}}catch(o){t.e(o)}finally{t.f()}return a}var Bt={identify:function(n){return n instanceof Set},nodeClass:Be,default:!1,tag:"tag:yaml.org,2002:set",resolve:Un,createNode:Kn},nt=function(n,e){var a=e.split(":").reduce(function(t,r){return t*60+Number(r)},0);return n==="-"?-a:a},Dt=function(n){var e=n.value;if(isNaN(e)||!isFinite(e))return ne(e);var a="";e<0&&(a="-",e=Math.abs(e));var t=[e%60];return e<60?t.unshift(0):(e=Math.round((e-t[0])/60),t.unshift(e%60),e>=60&&(e=Math.round((e-t[0])/60),t.unshift(e))),a+t.map(function(r){return r<10?"0"+String(r):String(r)}).join(":").replace(/000000\d*$/,"")},Ft={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(n,e,a){return nt(e,a.replace(/_/g,""))},stringify:Dt},jt={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(n,e,a){return nt(e,a.replace(/_/g,""))},stringify:Dt},Wt={identify:function(n){return n instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(n,e,a,t,r,s,o,u,f){u&&(u=(u+"00").substr(1,3));var l=Date.UTC(e,a-1,t,r||0,s||0,o||0,u||0);if(f&&f!=="Z"){var c=nt(f[0],f.slice(1));Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:function(n){var e=n.value;return e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function $t(i){var n=typeof process<"u"&&process.env||{};return i?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!n.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!n.YAML_SILENCE_WARNINGS}function xt(i,n){if($t(!1)){var e=typeof process<"u"&&process.emitWarning;e?e(i,n):console.warn(n?"".concat(n,": ").concat(i):i)}}var Yt={};function Jn(i,n){if(!Yt[i]&&$t(!0)){Yt[i]=!0;var e="The option '".concat(i,"' will be removed in a future release");e+=n?", use '".concat(n,"' instead."):".",xt(e,"DeprecationWarning")}}function Vn(i,n,e){var a=new K(i);if(n instanceof Map){var t=T(n),r;try{for(t.s();!(r=t.n()).done;){var s=ge(r.value,2),o=s[0],u=s[1];a.items.push(i.createPair(o,u,e))}}catch(v){t.e(v)}finally{t.f()}}else if(n&&J(n)==="object")for(var f=0,l=Object.keys(n);f=0?e+a.toString(n):ne(i)}var Ut={identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ve,stringify:function(){return ve.nullStr}},Kt={identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(n){return n[0]==="t"||n[0]==="T"},options:ee,stringify:function(n){var e=n.value;return e?ee.trueStr:ee.falseStr}},Jt={identify:function(n){return Fe(n)&&n>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(n,e){return at(n,e,8)},options:ie,stringify:function(n){return Qt(n,8,"0o")}},Vt={identify:Fe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(n){return at(n,n,10)},options:ie,stringify:ne},qt={identify:function(n){return Fe(n)&&n>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(n,e){return at(n,e,16)},options:ie,stringify:function(n){return Qt(n,16,"0x")}},Gt={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(n,e){return e?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:ne},Ht={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(n){return parseFloat(n)},stringify:function(n){var e=n.value;return Number(e).toExponential()}},zt={identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(n,e,a){var t=e||a,r=new L(parseFloat(n));return t&&t[t.length-1]==="0"&&(r.minFractionDigits=t.length),r},stringify:ne},Hn=rt.concat([Ut,Kt,Jt,Vt,qt,Gt,Ht,zt]),Zt=function(n){return typeof n=="bigint"||Number.isInteger(n)},je=function(n){var e=n.value;return JSON.stringify(e)},Xt=[ke,De,{identify:function(n){return typeof n=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:Se,stringify:je},{identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:je},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(n){return n==="true"},stringify:je},{identify:Zt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(n){return ie.asBigInt?BigInt(n):parseInt(n,10)},stringify:function(n){var e=n.value;return Zt(e)?e.toString():JSON.stringify(e)}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(n){return parseFloat(n)},stringify:je}];Xt.scalarFallback=function(i){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(i)))};var en=function(n){var e=n.value;return e?ee.trueStr:ee.falseStr},Ee=function(n){return typeof n=="bigint"||Number.isInteger(n)};function We(i,n,e){var a=n.replace(/_/g,"");if(ie.asBigInt){switch(e){case 2:a="0b".concat(a);break;case 8:a="0o".concat(a);break;case 16:a="0x".concat(a);break}var t=BigInt(a);return i==="-"?BigInt(-1)*t:t}var r=parseInt(a,e);return i==="-"?-1*r:r}function it(i,n,e){var a=i.value;if(Ee(a)){var t=a.toString(n);return a<0?"-"+e+t.substr(1):e+t}return ne(i)}var zn=rt.concat([{identify:function(n){return n==null},createNode:function(n,e,a){return a.wrapScalars?new L(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ve,stringify:function(){return ve.nullStr}},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:ee,stringify:en},{identify:function(n){return typeof n=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:ee,stringify:en},{identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(n,e,a){return We(e,a,2)},stringify:function(n){return it(n,2,"0b")}},{identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(n,e,a){return We(e,a,8)},stringify:function(n){return it(n,8,"0")}},{identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(n,e,a){return We(e,a,10)},stringify:ne},{identify:Ee,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(n,e,a){return We(e,a,16)},stringify:function(n){return it(n,16,"0x")}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(n,e){return e?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:ne},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(n){return parseFloat(n.replace(/_/g,""))},stringify:function(n){var e=n.value;return Number(e).toExponential()}},{identify:function(n){return typeof n=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(n,e){var a=new L(parseFloat(n.replace(/_/g,"")));if(e){var t=e.replace(/_/g,"");t[t.length-1]==="0"&&(a.minFractionDigits=t.length)}return a},stringify:ne}],Tt,Rt,Ct,Bt,Ft,jt,Wt),Zn={core:Hn,failsafe:rt,json:Xt,yaml11:zn},Xn={binary:Tt,bool:Kt,float:zt,floatExp:Ht,floatNaN:Gt,floatTime:jt,int:Vt,intHex:qt,intOct:Jt,intTime:Ft,map:ke,null:Ut,omap:Rt,pairs:Ct,seq:De,set:Bt,timestamp:Wt};function er(i,n,e){if(n){var a=e.filter(function(r){return r.tag===n}),t=a.find(function(r){return!r.format})||a[0];if(!t)throw new Error("Tag ".concat(n," not found"));return t}return e.find(function(r){return(r.identify&&r.identify(i)||r.class&&i instanceof r.class)&&!r.format})}function tr(i,n,e){if(i instanceof U)return i;var a=e.defaultPrefix,t=e.onTagObj,r=e.prevObjects,s=e.schema,o=e.wrapScalars;n&&n.startsWith("!!")&&(n=a+n.slice(2));var u=er(i,n,s.tags);if(!u){if(typeof i.toJSON=="function"&&(i=i.toJSON()),!i||J(i)!=="object")return o?new L(i):i;u=i instanceof Map?ke:i[Symbol.iterator]?De:ke}t&&(t(u),delete e.onTagObj);var f={value:void 0,node:void 0};if(i&&J(i)==="object"&&r){var l=r.get(i);if(l){var c=new X(l);return e.aliasNodes.push(c),c}f.value=i,r.set(i,f)}return f.node=u.createNode?u.createNode(e.schema,i,e):o?new L(i):i,n&&f.node instanceof U&&(f.node.tag=n),f.node}function nr(i,n,e,a){var t=i[a.replace(/\W/g,"")];if(!t){var r=Object.keys(i).map(function(h){return JSON.stringify(h)}).join(", ");throw new Error('Unknown schema "'.concat(a,'"; use one of ').concat(r))}if(Array.isArray(e)){var s=T(e),o;try{for(s.s();!(o=s.n()).done;){var u=o.value;t=t.concat(u)}}catch(h){s.e(h)}finally{s.f()}}else typeof e=="function"&&(t=e(t.slice()));for(var f=0;fe.key?1:0},Ne=function(){function i(n){var e=n.customTags,a=n.merge,t=n.schema,r=n.sortMapEntries,s=n.tags;N(this,i),this.merge=!!a,this.name=t,this.sortMapEntries=r===!0?rr:r||null,!e&&s&&Jn("tags","customTags"),this.tags=nr(Zn,Xn,e||s,t)}return A(i,[{key:"createNode",value:function(e,a,t,r){var s={defaultPrefix:i.defaultPrefix,schema:this,wrapScalars:a},o=r?Object.assign(r,s):s;return tr(e,t,o)}},{key:"createPair",value:function(e,a,t){t||(t={wrapScalars:!0});var r=this.createNode(e,t.wrapScalars,null,t),s=this.createNode(a,t.wrapScalars,null,t);return new E(r,s)}}]),i}();$(Ne,"defaultPrefix",Me),$(Ne,"defaultTags",re);var $e={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},ar={get binary(){return be},set binary(i){Object.assign(be,i)},get bool(){return ee},set bool(i){Object.assign(ee,i)},get int(){return ie},set int(i){Object.assign(ie,i)},get null(){return ve},set null(i){Object.assign(ve,i)},get str(){return te},set str(i){Object.assign(te,i)}},tn={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Me},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Me}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Me}]}};function nn(i,n){if((i.version||i.options.version)==="1.0"){var e=n.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];var a=n.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return a?"!".concat(a[1],"/").concat(a[2]):"!".concat(n.replace(/^tag:/,""))}var t=i.tagPrefixes.find(function(o){return n.indexOf(o.prefix)===0});if(!t){var r=i.getDefaults().tagPrefixes;t=r&&r.find(function(o){return n.indexOf(o.prefix)===0})}if(!t)return n[0]==="!"?n:"!<".concat(n,">");var s=n.substr(t.prefix.length).replace(/[!,[\]{}]/g,function(o){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[o]});return t.handle+s}function ir(i,n){if(n instanceof X)return X;if(n.tag){var e=i.filter(function(o){return o.tag===n.tag});if(e.length>0)return e.find(function(o){return o.format===n.format})||e[0]}var a,t;if(n instanceof L){t=n.value;var r=i.filter(function(o){return o.identify&&o.identify(t)||o.class&&t instanceof o.class});a=r.find(function(o){return o.format===n.format})||r.find(function(o){return!o.format})}else t=n,a=i.find(function(o){return o.nodeClass&&t instanceof o.nodeClass});if(!a){var s=t&&t.constructor?t.constructor.name:J(t);throw new Error("Tag not resolved for ".concat(s," value"))}return a}function sr(i,n,e){var a=e.anchors,t=e.doc,r=[],s=t.anchors.getName(i);return s&&(a[s]=i,r.push("&".concat(s))),i.tag?r.push(nn(t,i.tag)):n.default||r.push(nn(t,n.tag)),r.join(" ")}function xe(i,n,e,a){var t=n.doc,r=t.anchors,s=t.schema,o;if(!(i instanceof U)){var u={aliasNodes:[],onTagObj:function(w){return o=w},prevObjects:new Map};i=s.createNode(i,!0,null,u);var f=T(u.aliasNodes),l;try{for(f.s();!(l=f.n()).done;){var c=l.value;c.source=c.source.node;var v=r.getName(c.source);v||(v=r.newName(),r.map[v]=c.source)}}catch(d){f.e(d)}finally{f.f()}}if(i instanceof E)return i.toString(n,e,a);o||(o=ir(s.tags,i));var h=sr(i,o,n);h.length>0&&(n.indentAtStart=(n.indentAtStart||0)+h.length+1);var g=typeof o.stringify=="function"?o.stringify(i,n,e,a):i instanceof L?tt(i,n,e,a):i.toString(n,e,a);return h?i instanceof L||g[0]==="{"||g[0]==="["?"".concat(h," ").concat(g):"".concat(h,` -`).concat(n.indent).concat(g):g}var or=function(){function i(n){N(this,i),$(this,"map",Object.create(null)),this.prefix=n}return A(i,[{key:"createAlias",value:function(e,a){return this.setAnchor(e,a),new X(e)}},{key:"createMergePair",value:function(){for(var e=this,a=new wt,t=arguments.length,r=new Array(t),s=0;s0&&!i.commentBefore&&(i.commentBefore=e.before.join(` -`),e.before=[]))}}catch(h){r.e(h)}finally{r.f()}if(i.contents=a||null,!a)i.comment=e.before.concat(e.after).join(` -`)||null;else{var c=e.before.join(` -`);if(c){var v=a instanceof j&&a.items[0]?a.items[0]:a;v.commentBefore=v.commentBefore?"".concat(c,` -`).concat(v.commentBefore):c}i.comment=e.after.join(` -`)||null}}function cr(i,n){var e=i.tagPrefixes,a=ge(n.parameters,2),t=a[0],r=a[1];if(!t||!r){var s="Insufficient parameters given for %TAG directive";throw new k(n,s)}if(e.some(function(u){return u.handle===t})){var o="The %TAG directive must only be given at most once per handle in the same document.";throw new k(n,o)}return{handle:t,prefix:r}}function vr(i,n){var e=ge(n.parameters,1),a=e[0];if(n.name==="YAML:1.0"&&(a="1.0"),!a){var t="Insufficient parameters given for %YAML directive";throw new k(n,t)}if(!tn[a]){var r=i.version||i.options.version,s="Document will be parsed as YAML ".concat(r," rather than YAML ").concat(a);i.warnings.push(new le(n,s))}return a}function hr(i,n,e){var a=[],t=!1,r=T(n),s;try{for(r.s();!(s=r.n()).done;){var o=s.value,u=o.comment,f=o.name;switch(f){case"TAG":try{i.tagPrefixes.push(cr(i,o))}catch(h){i.errors.push(h)}t=!0;break;case"YAML":case"YAML:1.0":if(i.version){var l="The %YAML directive must only be given at most once per document.";i.errors.push(new k(o,l))}try{i.version=vr(i,o)}catch(h){i.errors.push(h)}t=!0;break;default:if(f){var c="YAML only supports %TAG and %YAML directives, and not %".concat(f);i.warnings.push(new le(o,c))}}u&&a.push(u)}}catch(h){r.e(h)}finally{r.f()}if(e&&!t&&(i.version||e.version||i.options.version)==="1.1"){var v=function(g){var d=g.handle,w=g.prefix;return{handle:d,prefix:w}};i.tagPrefixes=e.tagPrefixes.map(v),i.version=e.version}i.commentBefore=a.join(` -`)||null}function he(i){if(i instanceof j)return!0;throw new Error("Expected a YAML collection as document contents")}var st=function(){function i(n){N(this,i),this.anchors=new or(n.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=n,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return A(i,[{key:"add",value:function(e){return he(this.contents),this.contents.add(e)}},{key:"addIn",value:function(e,a){he(this.contents),this.contents.addIn(e,a)}},{key:"delete",value:function(e){return he(this.contents),this.contents.delete(e)}},{key:"deleteIn",value:function(e){return Oe(e)?this.contents==null?!1:(this.contents=null,!0):(he(this.contents),this.contents.deleteIn(e))}},{key:"getDefaults",value:function(){return i.defaults[this.version]||i.defaults[this.options.version]||{}}},{key:"get",value:function(e,a){return this.contents instanceof j?this.contents.get(e,a):void 0}},{key:"getIn",value:function(e,a){return Oe(e)?!a&&this.contents instanceof L?this.contents.value:this.contents:this.contents instanceof j?this.contents.getIn(e,a):void 0}},{key:"has",value:function(e){return this.contents instanceof j?this.contents.has(e):!1}},{key:"hasIn",value:function(e){return Oe(e)?this.contents!==void 0:this.contents instanceof j?this.contents.hasIn(e):!1}},{key:"set",value:function(e,a){he(this.contents),this.contents.set(e,a)}},{key:"setIn",value:function(e,a){Oe(e)?this.contents=a:(he(this.contents),this.contents.setIn(e,a))}},{key:"setSchema",value:function(e,a){if(!(!e&&!a&&this.schema)){typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(a)&&(this.options.customTags=a);var t=Object.assign({},this.getDefaults(),this.options);this.schema=new Ne(t)}}},{key:"parse",value:function(e,a){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");var t=e.directives,r=t===void 0?[]:t,s=e.contents,o=s===void 0?[]:s,u=e.directivesEndMarker,f=e.error,l=e.valueRange;if(f&&(f.source||(f.source=this),this.errors.push(f)),hr(this,r,a),u&&(this.directivesEndMarker=!0),this.range=l?[l.start,l.end]:null,this.setSchema(),this.anchors._cstAliases=[],lr(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var c=T(this.errors),v;try{for(c.s();!(v=c.n()).done;){var h=v.value;h instanceof fe&&h.makePretty()}}catch(m){c.e(m)}finally{c.f()}var g=T(this.warnings),d;try{for(g.s();!(d=g.n()).done;){var w=d.value;w instanceof fe&&w.makePretty()}}catch(m){g.e(m)}finally{g.f()}}return this}},{key:"listNonDefaultTags",value:function(){return fr(this.contents).filter(function(e){return e.indexOf(Ne.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(e,a){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(a){var t=this.tagPrefixes.find(function(r){return r.handle===e});t?t.prefix=a:this.tagPrefixes.push({handle:e,prefix:a})}else this.tagPrefixes=this.tagPrefixes.filter(function(r){return r.handle!==e})}},{key:"toJSON",value:function(e,a){var t=this,r=this.options,s=r.keepBlobsInJSON,o=r.mapAsMap,u=r.maxAliasCount,f=s&&(typeof e!="string"||!(this.contents instanceof L)),l={doc:this,indentStep:" ",keep:f,mapAsMap:f&&!!o,maxAliasCount:u,stringify:xe},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map(function(O){return[t.anchors.map[O],{alias:[],aliasCount:0,count:1}]})));var v=H(this.contents,e,l);if(typeof a=="function"&&l.anchors){var h=T(l.anchors.values()),g;try{for(h.s();!(g=h.n()).done;){var d=g.value,w=d.count,m=d.res;a(m,w)}}catch(O){h.e(O)}finally{h.f()}}return v}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var a=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(a))}this.setSchema();var t=[],r=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),t.push(s),r=!0}var o=this.listNonDefaultTags();this.tagPrefixes.forEach(function(h){var g=h.handle,d=h.prefix;o.some(function(w){return w.indexOf(d)===0})&&(t.push("%TAG ".concat(g," ").concat(d)),r=!0)}),(r||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));var u={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:xe},f=!1,l=null;if(this.contents){this.contents instanceof U&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),u.forceBlockIndent=!!this.comment,l=this.contents.comment);var c=l?null:function(){return f=!0},v=xe(this.contents,u,function(){return l=null},c);t.push(ce(v,"",l))}else this.contents!==void 0&&t.push(xe(this.contents,u));return this.comment&&((!f||l)&&t[t.length-1]!==""&&t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join(` -`)+` -`}}]),i}();$(st,"defaults",tn);function pr(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,e=arguments.length>2?arguments[2]:void 0;e===void 0&&typeof n=="string"&&(e=n,n=!0);var a=Object.assign({},st.defaults[$e.version],$e),t=new Ne(a);return t.createNode(i,n,e)}var Ye=function(i){M(e,i);var n=I(e);function e(a){return N(this,e),n.call(this,Object.assign({},$e,a))}return e}(st);function gr(i,n){var e=[],a,t=T(ze(i)),r;try{for(t.s();!(r=t.n()).done;){var s=r.value,o=new Ye(n);o.parse(s,a),e.push(o),a=o}}catch(u){t.e(u)}finally{t.f()}return e}function rn(i,n){var e=ze(i),a=new Ye(n).parse(e[0]);if(e.length>1){var t="Source contains multiple documents; please use YAML.parseAllDocuments()";a.errors.unshift(new k(e[1],t))}return a}function dr(i,n){var e=rn(i,n);if(e.warnings.forEach(function(a){return xt(a)}),e.errors.length>0)throw e.errors[0];return e.toJSON()}function yr(i,n){var e=new Ye(n);return e.contents=i,String(e)}var mr={createNode:pr,defaultOptions:$e,Document:Ye,parse:dr,parseAllDocuments:gr,parseCST:ze,parseDocument:rn,scalarOptions:ar,stringify:yr},wr=Object.freeze({__proto__:null,YAML:mr}),Or=un(wr),br=Or.YAML;onmessage=i=>postMessage(br.parse(i.data))})(); diff --git a/assets/parseYaml.worker-858dc2e2.js b/assets/parseYaml.worker-858dc2e2.js new file mode 100644 index 00000000..8bfe0ef3 --- /dev/null +++ b/assets/parseYaml.worker-858dc2e2.js @@ -0,0 +1,17 @@ +(function(){"use strict";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function H(i){return typeof i>"u"||i===null}function pi(i){return typeof i=="object"&&i!==null}function ai(i){return Array.isArray(i)?i:H(i)?[]:[i]}function hi(i,n){var e,l,r,u;if(n)for(u=Object.keys(n),e=0,l=u.length;ec&&(u=" ... ",n=l-c+u.length),e-l>c&&(o=" ...",e=l+c-o.length),{str:u+i.slice(n,e).replace(/\t/g,"→")+o,pos:l-n+u.length}}function B(i,n){return b.repeat(" ",n-i.length)+i}function bi(i,n){if(n=Object.create(n||null),!i.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var e=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=e.exec(i.buffer);)r.push(u.index),l.push(u.index+u[0].length),i.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var c="",f,h,s=Math.min(i.line+n.linesAfter,r.length).toString().length,t=n.maxLength-(n.indent+s+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)h=P(i.buffer,l[o-f],r[o-f],i.position-(l[o]-l[o-f]),t),c=b.repeat(" ",n.indent)+B((i.line-f+1).toString(),s)+" | "+h.str+` +`+c;for(h=P(i.buffer,l[o],r[o],i.position,t),c+=b.repeat(" ",n.indent)+B((i.line+1).toString(),s)+" | "+h.str+` +`,c+=b.repeat("-",n.indent+s+3+h.pos)+`^ +`,f=1;f<=n.linesAfter&&!(o+f>=r.length);f++)h=P(i.buffer,l[o+f],r[o+f],i.position-(l[o]-l[o+f]),t),c+=b.repeat(" ",n.indent)+B((i.line+f+1).toString(),s)+" | "+h.str+` +`;return c.replace(/\n$/,"")}var wi=bi,Ci=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_i=["scalar","sequence","mapping"];function ki(i){var n={};return i!==null&&Object.keys(i).forEach(function(e){i[e].forEach(function(l){n[String(l)]=e})}),n}function Si(i,n){if(n=n||{},Object.keys(n).forEach(function(e){if(Ci.indexOf(e)===-1)throw new k('Unknown option "'+e+'" is met in definition of "'+i+'" YAML type.')}),this.options=n,this.tag=i,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(e){return e},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=ki(n.styleAliases||null),_i.indexOf(this.kind)===-1)throw new k('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}var y=Si;function W(i,n){var e=[];return i[n].forEach(function(l){var r=e.length;e.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),e[r]=l}),e}function Ii(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,e;function l(r){r.multi?(i.multi[r.kind].push(r),i.multi.fallback.push(r)):i[r.kind][r.tag]=i.fallback[r.tag]=r}for(n=0,e=arguments.length;n=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},octal:function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},decimal:function(i){return i.toString(10)},hexadecimal:function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Zi=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Vi(i){return!(i===null||!Zi.test(i)||i[i.length-1]==="_")}function Xi(i){var n,e;return n=i.replace(/_/g,"").toLowerCase(),e=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?e===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:e*parseFloat(n,10)}var zi=/^[-+]?[0-9]+e/;function Qi(i,n){var e;if(isNaN(i))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(b.isNegativeZero(i))return"-0.0";return e=i.toString(10),zi.test(e)?e.replace("e",".e"):e}function Ji(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||b.isNegativeZero(i))}var nn=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:Vi,construct:Xi,predicate:Ji,represent:Qi,defaultStyle:"lowercase"}),en=Ni.extend({implicit:[ji,Ri,Wi,nn]}),rn=en,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),V=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 ln(i){return i===null?!1:Z.exec(i)!==null||V.exec(i)!==null}function on(i){var n,e,l,r,u,o,c,f=0,h=null,s,t,A;if(n=Z.exec(i),n===null&&(n=V.exec(i)),n===null)throw new Error("Date resolve error");if(e=+n[1],l=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(e,l,r));if(u=+n[4],o=+n[5],c=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(s=+n[10],t=+(n[11]||0),h=(s*60+t)*6e4,n[9]==="-"&&(h=-h)),A=new Date(Date.UTC(e,l,r,u,o,c,f)),h&&A.setTime(A.getTime()-h),A}function un(i){return i.toISOString()}var cn=new y("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ln,construct:on,instanceOf:Date,represent:un});function fn(i){return i==="<<"||i===null}var tn=new y("tag:yaml.org,2002:merge",{kind:"scalar",resolve:fn}),U=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function pn(i){if(i===null)return!1;var n,e,l=0,r=i.length,u=U;for(e=0;e64)){if(n<0)return!1;l+=6}return l%8===0}function an(i){var n,e,l=i.replace(/[\r\n=]/g,""),r=l.length,u=U,o=0,c=[];for(n=0;n>16&255),c.push(o>>8&255),c.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return e=r%4*6,e===0?(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)):e===18?(c.push(o>>10&255),c.push(o>>2&255)):e===12&&c.push(o>>4&255),new Uint8Array(c)}function hn(i){var n="",e=0,l,r,u=i.length,o=U;for(l=0;l>18&63],n+=o[e>>12&63],n+=o[e>>6&63],n+=o[e&63]),e=(e<<8)+i[l];return r=u%3,r===0?(n+=o[e>>18&63],n+=o[e>>12&63],n+=o[e>>6&63],n+=o[e&63]):r===2?(n+=o[e>>10&63],n+=o[e>>4&63],n+=o[e<<2&63],n+=o[64]):r===1&&(n+=o[e>>2&63],n+=o[e<<4&63],n+=o[64],n+=o[64]),n}function sn(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}var dn=new y("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pn,construct:an,predicate:sn,represent:hn}),mn=Object.prototype.hasOwnProperty,xn=Object.prototype.toString;function gn(i){if(i===null)return!0;var n=[],e,l,r,u,o,c=i;for(e=0,l=c.length;e>10)+55296,(i-65536&1023)+56320)}for(var ri=new Array(256),li=new Array(256),O=0;O<256;O++)ri[O]=ei(O)?1:0,li[O]=ei(O);function Yn(i,n){this.input=i,this.filename=n.filename||null,this.schema=n.schema||Tn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function oi(i,n){var e={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return e.snippet=wi(e),new k(n,e)}function p(i,n){throw oi(i,n)}function j(i,n){i.onWarning&&i.onWarning.call(null,oi(i,n))}var ui={YAML:function(n,e,l){var r,u,o;n.version!==null&&p(n,"duplication of %YAML directive"),l.length!==1&&p(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&p(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&p(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&j(n,"unsupported YAML version of the document")},TAG:function(n,e,l){var r,u;l.length!==2&&p(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],J.test(r)||p(n,"ill-formed tag handle (first argument) of the TAG directive"),S.call(n.tagMap,r)&&p(n,'there is a previously declared suffix for "'+r+'" tag handle'),ii.test(u)||p(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{p(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u}};function I(i,n,e,l){var r,u,o,c;if(n1&&(i.result+=b.repeat(` +`,n-1))}function Pn(i,n,e){var l,r,u,o,c,f,h,s,t=i.kind,A=i.result,a;if(a=i.input.charCodeAt(i.position),w(a)||F(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(r=i.input.charCodeAt(i.position+1),w(r)||e&&F(r)))return!1;for(i.kind="scalar",i.result="",u=o=i.position,c=!1;a!==0;){if(a===58){if(r=i.input.charCodeAt(i.position+1),w(r)||e&&F(r))break}else if(a===35){if(l=i.input.charCodeAt(i.position-1),w(l))break}else{if(i.position===i.lineStart&&Y(i)||e&&F(a))break;if(_(a))if(f=i.line,h=i.lineStart,s=i.lineIndent,g(i,!1,-1),i.lineIndent>=n){c=!0,a=i.input.charCodeAt(i.position);continue}else{i.position=o,i.line=f,i.lineStart=h,i.lineIndent=s;break}}c&&(I(i,u,o,!1),G(i,i.line-f),u=o=i.position,c=!1),T(a)||(o=i.position+1),a=i.input.charCodeAt(++i.position)}return I(i,u,o,!1),i.result?!0:(i.kind=t,i.result=A,!1)}function Bn(i,n){var e,l,r;if(e=i.input.charCodeAt(i.position),e!==39)return!1;for(i.kind="scalar",i.result="",i.position++,l=r=i.position;(e=i.input.charCodeAt(i.position))!==0;)if(e===39)if(I(i,l,i.position,!0),e=i.input.charCodeAt(++i.position),e===39)l=i.position,i.position++,r=i.position;else return!0;else _(e)?(I(i,l,r,!0),G(i,g(i,!1,n)),l=r=i.position):i.position===i.lineStart&&Y(i)?p(i,"unexpected end of the document within a single quoted scalar"):(i.position++,r=i.position);p(i,"unexpected end of the stream within a single quoted scalar")}function Rn(i,n){var e,l,r,u,o,c;if(c=i.input.charCodeAt(i.position),c!==34)return!1;for(i.kind="scalar",i.result="",i.position++,e=l=i.position;(c=i.input.charCodeAt(i.position))!==0;){if(c===34)return I(i,e,i.position,!0),i.position++,!0;if(c===92){if(I(i,e,i.position,!0),c=i.input.charCodeAt(++i.position),_(c))g(i,!1,n);else if(c<256&&ri[c])i.result+=li[c],i.position++;else if((o=Mn(c))>0){for(r=o,u=0;r>0;r--)c=i.input.charCodeAt(++i.position),(o=Ln(c))>=0?u=(u<<4)+o:p(i,"expected hexadecimal character");i.result+=jn(u),i.position++}else p(i,"unknown escape sequence");e=l=i.position}else _(c)?(I(i,e,l,!0),G(i,g(i,!1,n)),e=l=i.position):i.position===i.lineStart&&Y(i)?p(i,"unexpected end of the document within a double quoted scalar"):(i.position++,l=i.position)}p(i,"unexpected end of the stream within a double quoted scalar")}function Un(i,n){var e=!0,l,r,u,o=i.tag,c,f=i.anchor,h,s,t,A,a,m=Object.create(null),v,x,C,d;if(d=i.input.charCodeAt(i.position),d===91)s=93,a=!1,c=[];else if(d===123)s=125,a=!0,c={};else return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=c),d=i.input.charCodeAt(++i.position);d!==0;){if(g(i,!0,n),d=i.input.charCodeAt(i.position),d===s)return i.position++,i.tag=o,i.anchor=f,i.kind=a?"mapping":"sequence",i.result=c,!0;e?d===44&&p(i,"expected the node content, but found ','"):p(i,"missed comma between flow collection entries"),x=v=C=null,t=A=!1,d===63&&(h=i.input.charCodeAt(i.position+1),w(h)&&(t=A=!0,i.position++,g(i,!0,n))),l=i.line,r=i.lineStart,u=i.position,N(i,n,M,!1,!0),x=i.tag,v=i.result,g(i,!0,n),d=i.input.charCodeAt(i.position),(A||i.line===l)&&d===58&&(t=!0,d=i.input.charCodeAt(++i.position),g(i,!0,n),N(i,n,M,!1,!0),C=i.result),a?E(i,c,m,x,v,C,l,r,u):t?c.push(E(i,null,m,x,v,C,l,r,u)):c.push(v),g(i,!0,n),d=i.input.charCodeAt(i.position),d===44?(e=!0,d=i.input.charCodeAt(++i.position)):e=!1}p(i,"unexpected end of the stream within a flow collection")}function qn(i,n){var e,l,r=q,u=!1,o=!1,c=n,f=0,h=!1,s,t;if(t=i.input.charCodeAt(i.position),t===124)l=!1;else if(t===62)l=!0;else return!1;for(i.kind="scalar",i.result="";t!==0;)if(t=i.input.charCodeAt(++i.position),t===43||t===45)q===r?r=t===43?Q:Fn:p(i,"repeat of a chomping mode identifier");else if((s=Dn(t))>=0)s===0?p(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?p(i,"repeat of an indentation width identifier"):(c=n+s-1,o=!0);else break;if(T(t)){do t=i.input.charCodeAt(++i.position);while(T(t));if(t===35)do t=i.input.charCodeAt(++i.position);while(!_(t)&&t!==0)}for(;t!==0;){for($(i),i.lineIndent=0,t=i.input.charCodeAt(i.position);(!o||i.lineIndentc&&(c=i.lineIndent),_(t)){f++;continue}if(i.lineIndentn)&&f!==0)p(i,"bad indentation of a sequence entry");else if(i.lineIndentn)&&(x&&(o=i.line,c=i.lineStart,f=i.position),N(i,n,D,!0,r)&&(x?m=i.result:v=i.result),x||(E(i,t,A,a,m,v,o,c,f),a=m=v=null),g(i,!0,-1),d=i.input.charCodeAt(i.position)),(i.line===u||i.lineIndent>n)&&d!==0)p(i,"bad indentation of a mapping entry");else if(i.lineIndentn?f=1:i.lineIndent===n?f=0:i.lineIndentn?f=1:i.lineIndent===n?f=0:i.lineIndent tag; it should be "scalar", not "'+i.kind+'"'),t=0,A=i.implicitTypes.length;t"),i.result!==null&&m.kind!==i.kind&&p(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+m.kind+'", not "'+i.kind+'"'),m.resolve(i.result,i.tag)?(i.result=m.construct(i.result,i.tag),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):p(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||s}function Wn(i){var n=i.position,e,l,r,u=!1,o;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);(o=i.input.charCodeAt(i.position))!==0&&(g(i,!0,-1),o=i.input.charCodeAt(i.position),!(i.lineIndent>0||o!==37));){for(u=!0,o=i.input.charCodeAt(++i.position),e=i.position;o!==0&&!w(o);)o=i.input.charCodeAt(++i.position);for(l=i.input.slice(e,i.position),r=[],l.length<1&&p(i,"directive name must not be less than one character in length");o!==0;){for(;T(o);)o=i.input.charCodeAt(++i.position);if(o===35){do o=i.input.charCodeAt(++i.position);while(o!==0&&!_(o));break}if(_(o))break;for(e=i.position;o!==0&&!w(o);)o=i.input.charCodeAt(++i.position);r.push(i.input.slice(e,i.position))}o!==0&&$(i),S.call(ui,l)?ui[l](i,l,r):j(i,'unknown document directive "'+l+'"')}if(g(i,!0,-1),i.lineIndent===0&&i.input.charCodeAt(i.position)===45&&i.input.charCodeAt(i.position+1)===45&&i.input.charCodeAt(i.position+2)===45?(i.position+=3,g(i,!0,-1)):u&&p(i,"directives end mark is expected"),N(i,i.lineIndent-1,D,!1,!0),g(i,!0,-1),i.checkLineBreaks&&En.test(i.input.slice(n,i.position))&&j(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Y(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,g(i,!0,-1));return}if(i.position"u"&&(e=n,n=null);var l=ti(i,e);if(typeof n!="function")return l;for(var r=0,u=l.length;rpostMessage(Jn(i.data))})(); diff --git a/index.html b/index.html index f564809d..ada91028 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +