@paimaexample/explorer 0.3.62 → 0.3.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,170 @@
1
+ var sR=Object.defineProperty;var F2=e=>{throw TypeError(e)};var aR=(e,t,n)=>t in e?sR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>aR(e,typeof t!="symbol"?t+"":t,n),rm=(e,t,n)=>t.has(e)||F2("Cannot "+n);var Ae=(e,t,n)=>(rm(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>t.has(e)?F2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ht=(e,t,n,o)=>(rm(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),Xe=(e,t,n)=>(rm(e,t,"access private method"),n);var Qh=(e,t,n,o)=>({set _(s){ht(e,t,s,n)},get _(){return Ae(e,t,o)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var af=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nm={exports:{}},ec={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var O2;function uR(){if(O2)return ec;O2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:o,key:l,ref:s!==void 0?s:null,props:a}}return ec.Fragment=t,ec.jsx=n,ec.jsxs=n,ec}var T2;function lR(){return T2||(T2=1,nm.exports=uR()),nm.exports}var Ee=lR(),im={exports:{}},om={},tc={},B2;function cR(){if(B2)return tc;B2=1,tc.byteLength=c,tc.toByteArray=f,tc.fromByteArray=g;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)e[s]=o[s],t[o.charCodeAt(s)]=s;t[45]=62,t[95]=63;function l(b){var w=b.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=b.indexOf("=");F===-1&&(F=w);var I=F===w?0:4-F%4;return[F,I]}function c(b){var w=l(b),F=w[0],I=w[1];return(F+I)*3/4-I}function h(b,w,F){return(w+F)*3/4-F}function f(b){var w,F=l(b),I=F[0],R=F[1],A=new n(h(b,I,R)),E=0,M=R>0?I-4:I,T;for(T=0;T<M;T+=4)w=t[b.charCodeAt(T)]<<18|t[b.charCodeAt(T+1)]<<12|t[b.charCodeAt(T+2)]<<6|t[b.charCodeAt(T+3)],A[E++]=w>>16&255,A[E++]=w>>8&255,A[E++]=w&255;return R===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[E++]=w&255),R===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[E++]=w>>8&255,A[E++]=w&255),A}function p(b){return e[b>>18&63]+e[b>>12&63]+e[b>>6&63]+e[b&63]}function y(b,w,F){for(var I,R=[],A=w;A<F;A+=3)I=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),R.push(p(I));return R.join("")}function g(b){for(var w,F=b.length,I=F%3,R=[],A=16383,E=0,M=F-I;E<M;E+=A)R.push(y(b,E,E+A>M?M:E+A));return I===1?(w=b[F-1],R.push(e[w>>2]+e[w<<4&63]+"==")):I===2&&(w=(b[F-2]<<8)+b[F-1],R.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),R.join("")}return tc}var Gh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var R2;function fR(){return R2||(R2=1,Gh.read=function(e,t,n,o,s){var a,l,c=s*8-o-1,h=(1<<c)-1,f=h>>1,p=-7,y=n?s-1:0,g=n?-1:1,b=e[t+y];for(y+=g,a=b&(1<<-p)-1,b>>=-p,p+=c;p>0;a=a*256+e[t+y],y+=g,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(a===0)a=1-f;else{if(a===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),a=a-f}return(b?-1:1)*l*Math.pow(2,a-o)},Gh.write=function(e,t,n,o,s,a){var l,c,h,f=a*8-s-1,p=(1<<f)-1,y=p>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:a-1,w=o?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,l=p):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+y>=1?t+=g/h:t+=g*Math.pow(2,1-y),t*h>=2&&(l++,h/=2),l+y>=p?(c=0,l=p):l+y>=1?(c=(t*h-1)*Math.pow(2,s),l=l+y):(c=t*Math.pow(2,y-1)*Math.pow(2,s),l=0));s>=8;e[n+b]=c&255,b+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+b]=l&255,b+=w,l/=256,f-=8);e[n+b-w]|=F*128}),Gh}/*!
10
+ * The buffer module from node.js, for the browser.
11
+ *
12
+ * @author Feross Aboukhadijeh <https://feross.org>
13
+ * @license MIT
14
+ */var M2;function hR(){return M2||(M2=1,(function(e){var t=cR(),n=fR(),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var s=2147483647;e.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=a(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var _=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(_,v),_.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function l(_){if(_>s)throw new RangeError('The value "'+_+'" is invalid for option "size"');var v=new Uint8Array(_);return Object.setPrototypeOf(v,c.prototype),v}function c(_,v,C){if(typeof _=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(_)}return h(_,v,C)}c.poolSize=8192;function h(_,v,C){if(typeof _=="string")return g(_,v);if(ArrayBuffer.isView(_))return w(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(se(_,ArrayBuffer)||_&&se(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(_,SharedArrayBuffer)||_&&se(_.buffer,SharedArrayBuffer)))return F(_,v,C);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var P=_.valueOf&&_.valueOf();if(P!=null&&P!==_)return c.from(P,v,C);var he=I(_);if(he)return he;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return c.from(_[Symbol.toPrimitive]("string"),v,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}c.from=function(_,v,C){return h(_,v,C)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function f(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function p(_,v,C){return f(_),_<=0?l(_):v!==void 0?typeof C=="string"?l(_).fill(v,C):l(_).fill(v):l(_)}c.alloc=function(_,v,C){return p(_,v,C)};function y(_){return f(_),l(_<0?0:R(_)|0)}c.allocUnsafe=function(_){return y(_)},c.allocUnsafeSlow=function(_){return y(_)};function g(_,v){if((typeof v!="string"||v==="")&&(v="utf8"),!c.isEncoding(v))throw new TypeError("Unknown encoding: "+v);var C=E(_,v)|0,P=l(C),he=P.write(_,v);return he!==C&&(P=P.slice(0,he)),P}function b(_){for(var v=_.length<0?0:R(_.length)|0,C=l(v),P=0;P<v;P+=1)C[P]=_[P]&255;return C}function w(_){if(se(_,Uint8Array)){var v=new Uint8Array(_);return F(v.buffer,v.byteOffset,v.byteLength)}return b(_)}function F(_,v,C){if(v<0||_.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<v+(C||0))throw new RangeError('"length" is outside of buffer bounds');var P;return v===void 0&&C===void 0?P=new Uint8Array(_):C===void 0?P=new Uint8Array(_,v):P=new Uint8Array(_,v,C),Object.setPrototypeOf(P,c.prototype),P}function I(_){if(c.isBuffer(_)){var v=R(_.length)|0,C=l(v);return C.length===0||_.copy(C,0,0,v),C}if(_.length!==void 0)return typeof _.length!="number"||pe(_.length)?l(0):b(_);if(_.type==="Buffer"&&Array.isArray(_.data))return b(_.data)}function R(_){if(_>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),c.alloc(+_)}c.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==c.prototype},c.compare=function(v,C){if(se(v,Uint8Array)&&(v=c.from(v,v.offset,v.byteLength)),se(C,Uint8Array)&&(C=c.from(C,C.offset,C.byteLength)),!c.isBuffer(v)||!c.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===C)return 0;for(var P=v.length,he=C.length,ce=0,Se=Math.min(P,he);ce<Se;++ce)if(v[ce]!==C[ce]){P=v[ce],he=C[ce];break}return P<he?-1:he<P?1:0},c.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(v,C){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return c.alloc(0);var P;if(C===void 0)for(C=0,P=0;P<v.length;++P)C+=v[P].length;var he=c.allocUnsafe(C),ce=0;for(P=0;P<v.length;++P){var Se=v[P];if(se(Se,Uint8Array))ce+Se.length>he.length?c.from(Se).copy(he,ce):Uint8Array.prototype.set.call(he,Se,ce);else if(c.isBuffer(Se))Se.copy(he,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=Se.length}return he};function E(_,v){if(c.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||se(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);var C=_.length,P=arguments.length>2&&arguments[2]===!0;if(!P&&C===0)return 0;for(var he=!1;;)switch(v){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return ne(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return H(_).length;default:if(he)return P?-1:ne(_).length;v=(""+v).toLowerCase(),he=!0}}c.byteLength=E;function M(_,v,C){var P=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,v>>>=0,C<=v))return"";for(_||(_="utf8");;)switch(_){case"hex":return le(this,v,C);case"utf8":case"utf-8":return re(this,v,C);case"ascii":return ae(this,v,C);case"latin1":case"binary":return ye(this,v,C);case"base64":return Z(this,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,v,C);default:if(P)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),P=!0}}c.prototype._isBuffer=!0;function T(_,v,C){var P=_[v];_[v]=_[C],_[C]=P}c.prototype.swap16=function(){var v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<v;C+=2)T(this,C,C+1);return this},c.prototype.swap32=function(){var v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<v;C+=4)T(this,C,C+3),T(this,C+1,C+2);return this},c.prototype.swap64=function(){var v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<v;C+=8)T(this,C,C+7),T(this,C+1,C+6),T(this,C+2,C+5),T(this,C+3,C+4);return this},c.prototype.toString=function(){var v=this.length;return v===0?"":arguments.length===0?re(this,0,v):M.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(v){if(!c.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:c.compare(this,v)===0},c.prototype.inspect=function(){var v="",C=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(v+=" ... "),"<Buffer "+v+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(v,C,P,he,ce){if(se(v,Uint8Array)&&(v=c.from(v,v.offset,v.byteLength)),!c.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(C===void 0&&(C=0),P===void 0&&(P=v?v.length:0),he===void 0&&(he=0),ce===void 0&&(ce=this.length),C<0||P>v.length||he<0||ce>this.length)throw new RangeError("out of range index");if(he>=ce&&C>=P)return 0;if(he>=ce)return-1;if(C>=P)return 1;if(C>>>=0,P>>>=0,he>>>=0,ce>>>=0,this===v)return 0;for(var Se=ce-he,Be=P-C,de=Math.min(Se,Be),ve=this.slice(he,ce),x=v.slice(C,P),B=0;B<de;++B)if(ve[B]!==x[B]){Se=ve[B],Be=x[B];break}return Se<Be?-1:Be<Se?1:0};function z(_,v,C,P,he){if(_.length===0)return-1;if(typeof C=="string"?(P=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,pe(C)&&(C=he?0:_.length-1),C<0&&(C=_.length+C),C>=_.length){if(he)return-1;C=_.length-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string"&&(v=c.from(v,P)),c.isBuffer(v))return v.length===0?-1:L(_,v,C,P,he);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(_,v,C):Uint8Array.prototype.lastIndexOf.call(_,v,C):L(_,[v],C,P,he);throw new TypeError("val must be string, number or Buffer")}function L(_,v,C,P,he){var ce=1,Se=_.length,Be=v.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(_.length<2||v.length<2)return-1;ce=2,Se/=2,Be/=2,C/=2}function de(oe,me){return ce===1?oe[me]:oe.readUInt16BE(me*ce)}var ve;if(he){var x=-1;for(ve=C;ve<Se;ve++)if(de(_,ve)===de(v,x===-1?0:ve-x)){if(x===-1&&(x=ve),ve-x+1===Be)return x*ce}else x!==-1&&(ve-=ve-x),x=-1}else for(C+Be>Se&&(C=Se-Be),ve=C;ve>=0;ve--){for(var B=!0,D=0;D<Be;D++)if(de(_,ve+D)!==de(v,D)){B=!1;break}if(B)return ve}return-1}c.prototype.includes=function(v,C,P){return this.indexOf(v,C,P)!==-1},c.prototype.indexOf=function(v,C,P){return z(this,v,C,P,!0)},c.prototype.lastIndexOf=function(v,C,P){return z(this,v,C,P,!1)};function k(_,v,C,P){C=Number(C)||0;var he=_.length-C;P?(P=Number(P),P>he&&(P=he)):P=he;var ce=v.length;P>ce/2&&(P=ce/2);for(var Se=0;Se<P;++Se){var Be=parseInt(v.substr(Se*2,2),16);if(pe(Be))return Se;_[C+Se]=Be}return Se}function j(_,v,C,P){return Y(ne(v,_.length-C),_,C,P)}function U(_,v,C,P){return Y(J(v),_,C,P)}function $(_,v,C,P){return Y(H(v),_,C,P)}function N(_,v,C,P){return Y(O(v,_.length-C),_,C,P)}c.prototype.write=function(v,C,P,he){if(C===void 0)he="utf8",P=this.length,C=0;else if(P===void 0&&typeof C=="string")he=C,P=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(P)?(P=P>>>0,he===void 0&&(he="utf8")):(he=P,P=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-C;if((P===void 0||P>ce)&&(P=ce),v.length>0&&(P<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Se=!1;;)switch(he){case"hex":return k(this,v,C,P);case"utf8":case"utf-8":return j(this,v,C,P);case"ascii":case"latin1":case"binary":return U(this,v,C,P);case"base64":return $(this,v,C,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,v,C,P);default:if(Se)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Se=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(_,v,C){return v===0&&C===_.length?t.fromByteArray(_):t.fromByteArray(_.slice(v,C))}function re(_,v,C){C=Math.min(_.length,C);for(var P=[],he=v;he<C;){var ce=_[he],Se=null,Be=ce>239?4:ce>223?3:ce>191?2:1;if(he+Be<=C){var de,ve,x,B;switch(Be){case 1:ce<128&&(Se=ce);break;case 2:de=_[he+1],(de&192)===128&&(B=(ce&31)<<6|de&63,B>127&&(Se=B));break;case 3:de=_[he+1],ve=_[he+2],(de&192)===128&&(ve&192)===128&&(B=(ce&15)<<12|(de&63)<<6|ve&63,B>2047&&(B<55296||B>57343)&&(Se=B));break;case 4:de=_[he+1],ve=_[he+2],x=_[he+3],(de&192)===128&&(ve&192)===128&&(x&192)===128&&(B=(ce&15)<<18|(de&63)<<12|(ve&63)<<6|x&63,B>65535&&B<1114112&&(Se=B))}}Se===null?(Se=65533,Be=1):Se>65535&&(Se-=65536,P.push(Se>>>10&1023|55296),Se=56320|Se&1023),P.push(Se),he+=Be}return X(P)}var ie=4096;function X(_){var v=_.length;if(v<=ie)return String.fromCharCode.apply(String,_);for(var C="",P=0;P<v;)C+=String.fromCharCode.apply(String,_.slice(P,P+=ie));return C}function ae(_,v,C){var P="";C=Math.min(_.length,C);for(var he=v;he<C;++he)P+=String.fromCharCode(_[he]&127);return P}function ye(_,v,C){var P="";C=Math.min(_.length,C);for(var he=v;he<C;++he)P+=String.fromCharCode(_[he]);return P}function le(_,v,C){var P=_.length;(!v||v<0)&&(v=0),(!C||C<0||C>P)&&(C=P);for(var he="",ce=v;ce<C;++ce)he+=te[_[ce]];return he}function ee(_,v,C){for(var P=_.slice(v,C),he="",ce=0;ce<P.length-1;ce+=2)he+=String.fromCharCode(P[ce]+P[ce+1]*256);return he}c.prototype.slice=function(v,C){var P=this.length;v=~~v,C=C===void 0?P:~~C,v<0?(v+=P,v<0&&(v=0)):v>P&&(v=P),C<0?(C+=P,C<0&&(C=0)):C>P&&(C=P),C<v&&(C=v);var he=this.subarray(v,C);return Object.setPrototypeOf(he,c.prototype),he};function G(_,v,C){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+v>C)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(v,C,P){v=v>>>0,C=C>>>0,P||G(v,C,this.length);for(var he=this[v],ce=1,Se=0;++Se<C&&(ce*=256);)he+=this[v+Se]*ce;return he},c.prototype.readUintBE=c.prototype.readUIntBE=function(v,C,P){v=v>>>0,C=C>>>0,P||G(v,C,this.length);for(var he=this[v+--C],ce=1;C>0&&(ce*=256);)he+=this[v+--C]*ce;return he},c.prototype.readUint8=c.prototype.readUInt8=function(v,C){return v=v>>>0,C||G(v,1,this.length),this[v]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(v,C){return v=v>>>0,C||G(v,2,this.length),this[v]|this[v+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(v,C){return v=v>>>0,C||G(v,2,this.length),this[v]<<8|this[v+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(v,C){return v=v>>>0,C||G(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},c.prototype.readIntLE=function(v,C,P){v=v>>>0,C=C>>>0,P||G(v,C,this.length);for(var he=this[v],ce=1,Se=0;++Se<C&&(ce*=256);)he+=this[v+Se]*ce;return ce*=128,he>=ce&&(he-=Math.pow(2,8*C)),he},c.prototype.readIntBE=function(v,C,P){v=v>>>0,C=C>>>0,P||G(v,C,this.length);for(var he=C,ce=1,Se=this[v+--he];he>0&&(ce*=256);)Se+=this[v+--he]*ce;return ce*=128,Se>=ce&&(Se-=Math.pow(2,8*C)),Se},c.prototype.readInt8=function(v,C){return v=v>>>0,C||G(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},c.prototype.readInt16LE=function(v,C){v=v>>>0,C||G(v,2,this.length);var P=this[v]|this[v+1]<<8;return P&32768?P|4294901760:P},c.prototype.readInt16BE=function(v,C){v=v>>>0,C||G(v,2,this.length);var P=this[v+1]|this[v]<<8;return P&32768?P|4294901760:P},c.prototype.readInt32LE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},c.prototype.readInt32BE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},c.prototype.readFloatLE=function(v,C){return v=v>>>0,C||G(v,4,this.length),n.read(this,v,!0,23,4)},c.prototype.readFloatBE=function(v,C){return v=v>>>0,C||G(v,4,this.length),n.read(this,v,!1,23,4)},c.prototype.readDoubleLE=function(v,C){return v=v>>>0,C||G(v,8,this.length),n.read(this,v,!0,52,8)},c.prototype.readDoubleBE=function(v,C){return v=v>>>0,C||G(v,8,this.length),n.read(this,v,!1,52,8)};function Q(_,v,C,P,he,ce){if(!c.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>he||v<ce)throw new RangeError('"value" argument is out of bounds');if(C+P>_.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(v,C,P,he){if(v=+v,C=C>>>0,P=P>>>0,!he){var ce=Math.pow(2,8*P)-1;Q(this,v,C,P,ce,0)}var Se=1,Be=0;for(this[C]=v&255;++Be<P&&(Se*=256);)this[C+Be]=v/Se&255;return C+P},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(v,C,P,he){if(v=+v,C=C>>>0,P=P>>>0,!he){var ce=Math.pow(2,8*P)-1;Q(this,v,C,P,ce,0)}var Se=P-1,Be=1;for(this[C+Se]=v&255;--Se>=0&&(Be*=256);)this[C+Se]=v/Be&255;return C+P},c.prototype.writeUint8=c.prototype.writeUInt8=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,1,255,0),this[C]=v&255,C+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,2,65535,0),this[C]=v&255,this[C+1]=v>>>8,C+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,2,65535,0),this[C]=v>>>8,this[C+1]=v&255,C+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,4,4294967295,0),this[C+3]=v>>>24,this[C+2]=v>>>16,this[C+1]=v>>>8,this[C]=v&255,C+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,4,4294967295,0),this[C]=v>>>24,this[C+1]=v>>>16,this[C+2]=v>>>8,this[C+3]=v&255,C+4},c.prototype.writeIntLE=function(v,C,P,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*P-1);Q(this,v,C,P,ce-1,-ce)}var Se=0,Be=1,de=0;for(this[C]=v&255;++Se<P&&(Be*=256);)v<0&&de===0&&this[C+Se-1]!==0&&(de=1),this[C+Se]=(v/Be>>0)-de&255;return C+P},c.prototype.writeIntBE=function(v,C,P,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*P-1);Q(this,v,C,P,ce-1,-ce)}var Se=P-1,Be=1,de=0;for(this[C+Se]=v&255;--Se>=0&&(Be*=256);)v<0&&de===0&&this[C+Se+1]!==0&&(de=1),this[C+Se]=(v/Be>>0)-de&255;return C+P},c.prototype.writeInt8=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,1,127,-128),v<0&&(v=255+v+1),this[C]=v&255,C+1},c.prototype.writeInt16LE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,2,32767,-32768),this[C]=v&255,this[C+1]=v>>>8,C+2},c.prototype.writeInt16BE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,2,32767,-32768),this[C]=v>>>8,this[C+1]=v&255,C+2},c.prototype.writeInt32LE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,4,2147483647,-2147483648),this[C]=v&255,this[C+1]=v>>>8,this[C+2]=v>>>16,this[C+3]=v>>>24,C+4},c.prototype.writeInt32BE=function(v,C,P){return v=+v,C=C>>>0,P||Q(this,v,C,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[C]=v>>>24,this[C+1]=v>>>16,this[C+2]=v>>>8,this[C+3]=v&255,C+4};function K(_,v,C,P,he,ce){if(C+P>_.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function W(_,v,C,P,he){return v=+v,C=C>>>0,he||K(_,v,C,4),n.write(_,v,C,P,23,4),C+4}c.prototype.writeFloatLE=function(v,C,P){return W(this,v,C,!0,P)},c.prototype.writeFloatBE=function(v,C,P){return W(this,v,C,!1,P)};function q(_,v,C,P,he){return v=+v,C=C>>>0,he||K(_,v,C,8),n.write(_,v,C,P,52,8),C+8}c.prototype.writeDoubleLE=function(v,C,P){return q(this,v,C,!0,P)},c.prototype.writeDoubleBE=function(v,C,P){return q(this,v,C,!1,P)},c.prototype.copy=function(v,C,P,he){if(!c.isBuffer(v))throw new TypeError("argument should be a Buffer");if(P||(P=0),!he&&he!==0&&(he=this.length),C>=v.length&&(C=v.length),C||(C=0),he>0&&he<P&&(he=P),he===P||v.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(P<0||P>=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),v.length-C<he-P&&(he=v.length-C+P);var ce=he-P;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,P,he):Uint8Array.prototype.set.call(v,this.subarray(P,he),C),ce},c.prototype.fill=function(v,C,P,he){if(typeof v=="string"){if(typeof C=="string"?(he=C,C=0,P=this.length):typeof P=="string"&&(he=P,P=this.length),he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!c.isEncoding(he))throw new TypeError("Unknown encoding: "+he);if(v.length===1){var ce=v.charCodeAt(0);(he==="utf8"&&ce<128||he==="latin1")&&(v=ce)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(C<0||this.length<C||this.length<P)throw new RangeError("Out of range index");if(P<=C)return this;C=C>>>0,P=P===void 0?this.length:P>>>0,v||(v=0);var Se;if(typeof v=="number")for(Se=C;Se<P;++Se)this[Se]=v;else{var Be=c.isBuffer(v)?v:c.from(v,he),de=Be.length;if(de===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(Se=0;Se<P-C;++Se)this[Se+C]=Be[Se%de]}return this};var fe=/[^+/0-9A-Za-z-_]/g;function ue(_){if(_=_.split("=")[0],_=_.trim().replace(fe,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function ne(_,v){v=v||1/0;for(var C,P=_.length,he=null,ce=[],Se=0;Se<P;++Se){if(C=_.charCodeAt(Se),C>55295&&C<57344){if(!he){if(C>56319){(v-=3)>-1&&ce.push(239,191,189);continue}else if(Se+1===P){(v-=3)>-1&&ce.push(239,191,189);continue}he=C;continue}if(C<56320){(v-=3)>-1&&ce.push(239,191,189),he=C;continue}C=(he-55296<<10|C-56320)+65536}else he&&(v-=3)>-1&&ce.push(239,191,189);if(he=null,C<128){if((v-=1)<0)break;ce.push(C)}else if(C<2048){if((v-=2)<0)break;ce.push(C>>6|192,C&63|128)}else if(C<65536){if((v-=3)<0)break;ce.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((v-=4)<0)break;ce.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return ce}function J(_){for(var v=[],C=0;C<_.length;++C)v.push(_.charCodeAt(C)&255);return v}function O(_,v){for(var C,P,he,ce=[],Se=0;Se<_.length&&!((v-=2)<0);++Se)C=_.charCodeAt(Se),P=C>>8,he=C%256,ce.push(he),ce.push(P);return ce}function H(_){return t.toByteArray(ue(_))}function Y(_,v,C,P){for(var he=0;he<P&&!(he+C>=v.length||he>=_.length);++he)v[he+C]=_[he];return he}function se(_,v){return _ instanceof v||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===v.name}function pe(_){return _!==_}var te=(function(){for(var _="0123456789abcdef",v=new Array(256),C=0;C<16;++C)for(var P=C*16,he=0;he<16;++he)v[P+he]=_[C]+_[he];return v})()})(om)),om}var Nr=hR(),Kh={exports:{}},j2;function dR(){return j2||(j2=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={exports:{}},o=n.exports={},s,a;function l(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=l}catch{s=l}try{typeof clearTimeout=="function"?a=clearTimeout:a=c}catch{a=c}})();function h(le){if(s===setTimeout)return setTimeout(le,0);if((s===l||!s)&&setTimeout)return s=setTimeout,setTimeout(le,0);try{return s(le,0)}catch{try{return s.call(null,le,0)}catch{return s.call(this,le,0)}}}function f(le){if(a===clearTimeout)return clearTimeout(le);if((a===c||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(le);try{return a(le)}catch{try{return a.call(null,le)}catch{return a.call(this,le)}}}var p=[],y=!1,g,b=-1;function w(){!y||!g||(y=!1,g.length?p=g.concat(p):b=-1,p.length&&F())}function F(){if(!y){var le=h(w);y=!0;for(var ee=p.length;ee;){for(g=p,p=[];++b<ee;)g&&g[b].run();b=-1,ee=p.length}g=null,y=!1,f(le)}}o.nextTick=function(le){var ee=new Array(arguments.length-1);if(arguments.length>1)for(var G=1;G<arguments.length;G++)ee[G-1]=arguments[G];p.push(new I(le,ee)),p.length===1&&!y&&h(F)};function I(le,ee){this.fun=le,this.array=ee}I.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function R(){}o.on=R,o.addListener=R,o.once=R,o.off=R,o.removeListener=R,o.removeAllListeners=R,o.emit=R,o.prependListener=R,o.prependOnceListener=R,o.listeners=function(le){return[]},o.binding=function(le){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(le){throw new Error("process.chdir is not supported")},o.umask=function(){return 0};function A(){}var E=n.exports.browser,M=A,T=n.exports.binding,z=A,L=1,k={},j=A,U=A,$=A,N=A,Z=A,re="browser",ie="browser",X="browser",ae=[],ye={nextTick:n.exports.nextTick,title:n.exports.title,browser:E,env:n.exports.env,argv:n.exports.argv,version:n.exports.version,versions:n.exports.versions,on:n.exports.on,addListener:n.exports.addListener,once:n.exports.once,off:n.exports.off,removeListener:n.exports.removeListener,removeAllListeners:n.exports.removeAllListeners,emit:n.exports.emit,emitWarning:M,prependListener:n.exports.prependListener,prependOnceListener:n.exports.prependOnceListener,listeners:n.exports.listeners,binding:T,cwd:n.exports.cwd,chdir:n.exports.chdir,umask:n.exports.umask,exit:z,pid:L,features:k,kill:j,dlopen:U,uptime:$,memoryUsage:N,uvCounters:Z,platform:re,arch:ie,execPath:X,execArgv:ae};t.addListener=n.exports.addListener,t.arch=ie,t.argv=n.exports.argv,t.binding=T,t.browser=E,t.chdir=n.exports.chdir,t.cwd=n.exports.cwd,t.default=ye,t.dlopen=U,t.emit=n.exports.emit,t.emitWarning=M,t.env=n.exports.env,t.execArgv=ae,t.execPath=X,t.exit=z,t.features=k,t.kill=j,t.listeners=n.exports.listeners,t.memoryUsage=N,t.nextTick=n.exports.nextTick,t.off=n.exports.off,t.on=n.exports.on,t.once=n.exports.once,t.pid=L,t.platform=re,t.prependListener=n.exports.prependListener,t.prependOnceListener=n.exports.prependOnceListener,t.removeAllListeners=n.exports.removeAllListeners,t.removeListener=n.exports.removeListener,t.title=n.exports.title,t.umask=n.exports.umask,t.uptime=$,t.uvCounters=Z,t.version=n.exports.version,t.versions=n.exports.versions,t=e.exports=ye})(Kh,Kh.exports)),Kh.exports}var pR=dR();const jt=tp(pR);var yR=(function(e){function t(){var o=this||self;return delete e.prototype.__magic__,o}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var n=__magic__;return n})(Object),gR=yR,wt={},U2;function mR(){if(U2)return wt;U2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),g=Symbol.iterator;function b(G){return G===null||typeof G!="object"?null:(G=g&&G[g]||G["@@iterator"],typeof G=="function"?G:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,I={};function R(G,Q,K){this.props=G,this.context=Q,this.refs=I,this.updater=K||w}R.prototype.isReactComponent={},R.prototype.setState=function(G,Q){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,Q,"setState")},R.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function A(){}A.prototype=R.prototype;function E(G,Q,K){this.props=G,this.context=Q,this.refs=I,this.updater=K||w}var M=E.prototype=new A;M.constructor=E,F(M,R.prototype),M.isPureReactComponent=!0;var T=Array.isArray;function z(){}var L={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function j(G,Q,K){var W=K.ref;return{$$typeof:e,type:G,key:Q,ref:W!==void 0?W:null,props:K}}function U(G,Q){return j(G.type,Q,G.props)}function $(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function N(G){var Q={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(K){return Q[K]})}var Z=/\/+/g;function re(G,Q){return typeof G=="object"&&G!==null&&G.key!=null?N(""+G.key):Q.toString(36)}function ie(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(z,z):(G.status="pending",G.then(function(Q){G.status==="pending"&&(G.status="fulfilled",G.value=Q)},function(Q){G.status==="pending"&&(G.status="rejected",G.reason=Q)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function X(G,Q,K,W,q){var fe=typeof G;(fe==="undefined"||fe==="boolean")&&(G=null);var ue=!1;if(G===null)ue=!0;else switch(fe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(G.$$typeof){case e:case t:ue=!0;break;case p:return ue=G._init,X(ue(G._payload),Q,K,W,q)}}if(ue)return q=q(G),ue=W===""?"."+re(G,0):W,T(q)?(K="",ue!=null&&(K=ue.replace(Z,"$&/")+"/"),X(q,Q,K,"",function(O){return O})):q!=null&&($(q)&&(q=U(q,K+(q.key==null||G&&G.key===q.key?"":(""+q.key).replace(Z,"$&/")+"/")+ue)),Q.push(q)),1;ue=0;var ne=W===""?".":W+":";if(T(G))for(var J=0;J<G.length;J++)W=G[J],fe=ne+re(W,J),ue+=X(W,Q,K,fe,q);else if(J=b(G),typeof J=="function")for(G=J.call(G),J=0;!(W=G.next()).done;)W=W.value,fe=ne+re(W,J++),ue+=X(W,Q,K,fe,q);else if(fe==="object"){if(typeof G.then=="function")return X(ie(G),Q,K,W,q);throw Q=String(G),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ue}function ae(G,Q,K){if(G==null)return G;var W=[],q=0;return X(G,W,"","",function(fe){return Q.call(K,fe,q++)}),W}function ye(G){if(G._status===-1){var Q=G._result;Q=Q(),Q.then(function(K){(G._status===0||G._status===-1)&&(G._status=1,G._result=K)},function(K){(G._status===0||G._status===-1)&&(G._status=2,G._result=K)}),G._status===-1&&(G._status=0,G._result=Q)}if(G._status===1)return G._result.default;throw G._result}var le=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(Q))return}else if(typeof jt=="object"&&typeof jt.emit=="function"){jt.emit("uncaughtException",G);return}console.error(G)},ee={map:ae,forEach:function(G,Q,K){ae(G,function(){Q.apply(this,arguments)},K)},count:function(G){var Q=0;return ae(G,function(){Q++}),Q},toArray:function(G){return ae(G,function(Q){return Q})||[]},only:function(G){if(!$(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return wt.Activity=y,wt.Children=ee,wt.Component=R,wt.Fragment=n,wt.Profiler=s,wt.PureComponent=E,wt.StrictMode=o,wt.Suspense=h,wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,wt.__COMPILER_RUNTIME={__proto__:null,c:function(G){return L.H.useMemoCache(G)}},wt.cache=function(G){return function(){return G.apply(null,arguments)}},wt.cacheSignal=function(){return null},wt.cloneElement=function(G,Q,K){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var W=F({},G.props),q=G.key;if(Q!=null)for(fe in Q.key!==void 0&&(q=""+Q.key),Q)!k.call(Q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Q.ref===void 0||(W[fe]=Q[fe]);var fe=arguments.length-2;if(fe===1)W.children=K;else if(1<fe){for(var ue=Array(fe),ne=0;ne<fe;ne++)ue[ne]=arguments[ne+2];W.children=ue}return j(G.type,q,W)},wt.createContext=function(G){return G={$$typeof:l,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:a,_context:G},G},wt.createElement=function(G,Q,K){var W,q={},fe=null;if(Q!=null)for(W in Q.key!==void 0&&(fe=""+Q.key),Q)k.call(Q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(q[W]=Q[W]);var ue=arguments.length-2;if(ue===1)q.children=K;else if(1<ue){for(var ne=Array(ue),J=0;J<ue;J++)ne[J]=arguments[J+2];q.children=ne}if(G&&G.defaultProps)for(W in ue=G.defaultProps,ue)q[W]===void 0&&(q[W]=ue[W]);return j(G,fe,q)},wt.createRef=function(){return{current:null}},wt.forwardRef=function(G){return{$$typeof:c,render:G}},wt.isValidElement=$,wt.lazy=function(G){return{$$typeof:p,_payload:{_status:-1,_result:G},_init:ye}},wt.memo=function(G,Q){return{$$typeof:f,type:G,compare:Q===void 0?null:Q}},wt.startTransition=function(G){var Q=L.T,K={};L.T=K;try{var W=G(),q=L.S;q!==null&&q(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(z,le)}catch(fe){le(fe)}finally{Q!==null&&K.types!==null&&(Q.types=K.types),L.T=Q}},wt.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},wt.use=function(G){return L.H.use(G)},wt.useActionState=function(G,Q,K){return L.H.useActionState(G,Q,K)},wt.useCallback=function(G,Q){return L.H.useCallback(G,Q)},wt.useContext=function(G){return L.H.useContext(G)},wt.useDebugValue=function(){},wt.useDeferredValue=function(G,Q){return L.H.useDeferredValue(G,Q)},wt.useEffect=function(G,Q){return L.H.useEffect(G,Q)},wt.useEffectEvent=function(G){return L.H.useEffectEvent(G)},wt.useId=function(){return L.H.useId()},wt.useImperativeHandle=function(G,Q,K){return L.H.useImperativeHandle(G,Q,K)},wt.useInsertionEffect=function(G,Q){return L.H.useInsertionEffect(G,Q)},wt.useLayoutEffect=function(G,Q){return L.H.useLayoutEffect(G,Q)},wt.useMemo=function(G,Q){return L.H.useMemo(G,Q)},wt.useOptimistic=function(G,Q){return L.H.useOptimistic(G,Q)},wt.useReducer=function(G,Q,K){return L.H.useReducer(G,Q,K)},wt.useRef=function(G){return L.H.useRef(G)},wt.useState=function(G){return L.H.useState(G)},wt.useSyncExternalStore=function(G,Q,K){return L.H.useSyncExternalStore(G,Q,K)},wt.useTransition=function(){return L.H.useTransition()},wt.version="19.2.0",wt}var N2;function ZA(){return N2||(N2=1,im.exports=mR()),im.exports}var Ve=ZA(),sm={exports:{}},rc={},am={exports:{}},um={};/**
15
+ * @license React
16
+ * scheduler.production.js
17
+ *
18
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
19
+ *
20
+ * This source code is licensed under the MIT license found in the
21
+ * LICENSE file in the root directory of this source tree.
22
+ */var D2;function bR(){return D2||(D2=1,(function(e){function t(X,ae){var ye=X.length;X.push(ae);e:for(;0<ye;){var le=ye-1>>>1,ee=X[le];if(0<s(ee,ae))X[le]=ae,X[ye]=ee,ye=le;else break e}}function n(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var ae=X[0],ye=X.pop();if(ye!==ae){X[0]=ye;e:for(var le=0,ee=X.length,G=ee>>>1;le<G;){var Q=2*(le+1)-1,K=X[Q],W=Q+1,q=X[W];if(0>s(K,ye))W<ee&&0>s(q,K)?(X[le]=q,X[W]=ye,le=W):(X[le]=K,X[Q]=ye,le=Q);else if(W<ee&&0>s(q,ye))X[le]=q,X[W]=ye,le=W;else break e}}return ae}function s(X,ae){var ye=X.sortIndex-ae.sortIndex;return ye!==0?ye:X.id-ae.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var h=[],f=[],p=1,y=null,g=3,b=!1,w=!1,F=!1,I=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(X){for(var ae=n(f);ae!==null;){if(ae.callback===null)o(f);else if(ae.startTime<=X)o(f),ae.sortIndex=ae.expirationTime,t(h,ae);else break;ae=n(f)}}function T(X){if(F=!1,M(X),!w)if(n(h)!==null)w=!0,z||(z=!0,N());else{var ae=n(f);ae!==null&&ie(T,ae.startTime-X)}}var z=!1,L=-1,k=5,j=-1;function U(){return I?!0:!(e.unstable_now()-j<k)}function $(){if(I=!1,z){var X=e.unstable_now();j=X;var ae=!0;try{e:{w=!1,F&&(F=!1,A(L),L=-1),b=!0;var ye=g;try{t:{for(M(X),y=n(h);y!==null&&!(y.expirationTime>X&&U());){var le=y.callback;if(typeof le=="function"){y.callback=null,g=y.priorityLevel;var ee=le(y.expirationTime<=X);if(X=e.unstable_now(),typeof ee=="function"){y.callback=ee,M(X),ae=!0;break t}y===n(h)&&o(h),M(X)}else o(h);y=n(h)}if(y!==null)ae=!0;else{var G=n(f);G!==null&&ie(T,G.startTime-X),ae=!1}}break e}finally{y=null,g=ye,b=!1}ae=void 0}}finally{ae?N():z=!1}}}var N;if(typeof E=="function")N=function(){E($)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,re=Z.port2;Z.port1.onmessage=$,N=function(){re.postMessage(null)}}else N=function(){R($,0)};function ie(X,ae){L=R(function(){X(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(X){switch(g){case 1:case 2:case 3:var ae=3;break;default:ae=g}var ye=g;g=ae;try{return X()}finally{g=ye}},e.unstable_requestPaint=function(){I=!0},e.unstable_runWithPriority=function(X,ae){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ye=g;g=X;try{return ae()}finally{g=ye}},e.unstable_scheduleCallback=function(X,ae,ye){var le=e.unstable_now();switch(typeof ye=="object"&&ye!==null?(ye=ye.delay,ye=typeof ye=="number"&&0<ye?le+ye:le):ye=le,X){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=ye+ee,X={id:p++,callback:ae,priorityLevel:X,startTime:ye,expirationTime:ee,sortIndex:-1},ye>le?(X.sortIndex=ye,t(f,X),n(h)===null&&X===n(f)&&(F?(A(L),L=-1):F=!0,ie(T,ye-le))):(X.sortIndex=ee,t(h,X),w||b||(w=!0,z||(z=!0,N()))),X},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(X){var ae=g;return function(){var ye=g;g=ae;try{return X.apply(this,arguments)}finally{g=ye}}}})(um)),um}var P2;function AR(){return P2||(P2=1,am.exports=bR()),am.exports}var lm={exports:{}},an={};/**
23
+ * @license React
24
+ * react-dom.production.js
25
+ *
26
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */var k2;function wR(){if(k2)return an;k2=1;var e=ZA();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(h,f,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return an.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,an.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(h,f,null,p)},an.flushSync=function(h){var f=l.T,p=o.p;try{if(l.T=null,o.p=2,h)return h()}finally{l.T=f,o.p=p,o.d.f()}},an.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,o.d.C(h,f))},an.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},an.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?o.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:b}):p==="script"&&o.d.X(h,{crossOrigin:y,integrity:g,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},an.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);o.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&o.d.M(h)},an.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin);o.d.L(h,p,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},an.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);o.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else o.d.m(h)},an.requestFormReset=function(h){o.d.r(h)},an.unstable_batchedUpdates=function(h,f){return h(f)},an.useFormState=function(h,f,p){return l.H.useFormState(h,f,p)},an.useFormStatus=function(){return l.H.useHostTransitionStatus()},an.version="19.2.0",an}var L2;function WF(){if(L2)return lm.exports;L2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lm.exports=wR(),lm.exports}var $2;function vR(){if($2)return rc;$2=1;var e=AR(),t=ZA(),n=WF();function o(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function a(r){var i=r,u=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(u=i.return),r=i.return;while(r)}return i.tag===3?u:null}function l(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function c(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(a(r)!==r)throw Error(o(188))}function f(r){var i=r.alternate;if(!i){if(i=a(r),i===null)throw Error(o(188));return i!==r?null:r}for(var u=r,d=i;;){var m=u.return;if(m===null)break;var S=m.alternate;if(S===null){if(d=m.return,d!==null){u=d;continue}break}if(m.child===S.child){for(S=m.child;S;){if(S===u)return h(m),r;if(S===d)return h(m),i;S=S.sibling}throw Error(o(188))}if(u.return!==d.return)u=m,d=S;else{for(var V=!1,ge=m.child;ge;){if(ge===u){V=!0,u=m,d=S;break}if(ge===d){V=!0,d=m,u=S;break}ge=ge.sibling}if(!V){for(ge=S.child;ge;){if(ge===u){V=!0,u=S,d=m;break}if(ge===d){V=!0,d=S,u=m;break}ge=ge.sibling}if(!V)throw Error(o(189))}}if(u.alternate!==d)throw Error(o(190))}if(u.tag!==3)throw Error(o(188));return u.stateNode.current===u?r:i}function p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(r),i!==null)return i;r=r.sibling}return null}var y=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function N(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var Z=Symbol.for("react.client.reference");function re(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Z?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case F:return"Fragment";case R:return"Profiler";case I:return"StrictMode";case T:return"Suspense";case z:return"SuspenseList";case j:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case E:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case M:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case L:return i=r.displayName||null,i!==null?i:re(r.type)||"Memo";case k:i=r._payload,r=r._init;try{return re(r(i))}catch{}}return null}var ie=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},le=[],ee=-1;function G(r){return{current:r}}function Q(r){0>ee||(r.current=le[ee],le[ee]=null,ee--)}function K(r,i){ee++,le[ee]=r.current,r.current=i}var W=G(null),q=G(null),fe=G(null),ue=G(null);function ne(r,i){switch(K(fe,i),K(q,r),K(W,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?XS(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=XS(i),r=JS(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(W),K(W,r)}function J(){Q(W),Q(q),Q(fe)}function O(r){r.memoizedState!==null&&K(ue,r);var i=W.current,u=JS(i,r.type);i!==u&&(K(q,r),K(W,u))}function H(r){q.current===r&&(Q(W),Q(q)),ue.current===r&&(Q(ue),Wl._currentValue=ye)}var Y,se;function pe(r){if(Y===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);Y=i&&i[1]||"",se=-1<u.stack.indexOf(`
31
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
32
+ `+Y+r+se}var te=!1;function _(r,i){if(!r||te)return"";te=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var Ge=function(){throw Error()};if(Object.defineProperty(Ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ge,[])}catch(De){var je=De}Reflect.construct(r,[],Ge)}else{try{Ge.call()}catch(De){je=De}r.call(Ge.prototype)}}else{try{throw Error()}catch(De){je=De}(Ge=r())&&typeof Ge.catch=="function"&&Ge.catch(function(){})}}catch(De){if(De&&je&&typeof De.stack=="string")return[De.stack,je.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=d.DetermineComponentFrameRoot(),V=S[0],ge=S[1];if(V&&ge){var Fe=V.split(`
33
+ `),Me=ge.split(`
34
+ `);for(m=d=0;d<Fe.length&&!Fe[d].includes("DetermineComponentFrameRoot");)d++;for(;m<Me.length&&!Me[m].includes("DetermineComponentFrameRoot");)m++;if(d===Fe.length||m===Me.length)for(d=Fe.length-1,m=Me.length-1;1<=d&&0<=m&&Fe[d]!==Me[m];)m--;for(;1<=d&&0<=m;d--,m--)if(Fe[d]!==Me[m]){if(d!==1||m!==1)do if(d--,m--,0>m||Fe[d]!==Me[m]){var ze=`
35
+ `+Fe[d].replace(" at new "," at ");return r.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",r.displayName)),ze}while(1<=d&&0<=m);break}}}finally{te=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?pe(u):""}function v(r,i){switch(r.tag){case 26:case 27:case 5:return pe(r.type);case 16:return pe("Lazy");case 13:return r.child!==i&&i!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return _(r.type,!1);case 11:return _(r.type.render,!1);case 1:return _(r.type,!0);case 31:return pe("Activity");default:return""}}function C(r){try{var i="",u=null;do i+=v(r,u),u=r,r=r.return;while(r);return i}catch(d){return`
36
+ Error generating stack: `+d.message+`
37
+ `+d.stack}}var P=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,ce=e.unstable_cancelCallback,Se=e.unstable_shouldYield,Be=e.unstable_requestPaint,de=e.unstable_now,ve=e.unstable_getCurrentPriorityLevel,x=e.unstable_ImmediatePriority,B=e.unstable_UserBlockingPriority,D=e.unstable_NormalPriority,oe=e.unstable_LowPriority,me=e.unstable_IdlePriority,xe=e.log,Ce=e.unstable_setDisableYieldValue,we=null,Ie=null;function He(r){if(typeof xe=="function"&&Ce(r),Ie&&typeof Ie.setStrictMode=="function")try{Ie.setStrictMode(we,r)}catch{}}var Ke=Math.clz32?Math.clz32:gt,We=Math.log,et=Math.LN2;function gt(r){return r>>>=0,r===0?32:31-(We(r)/et|0)|0}var bt=256,lt=262144,yt=4194304;function tt(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function ft(r,i,u){var d=r.pendingLanes;if(d===0)return 0;var m=0,S=r.suspendedLanes,V=r.pingedLanes;r=r.warmLanes;var ge=d&134217727;return ge!==0?(d=ge&~S,d!==0?m=tt(d):(V&=ge,V!==0?m=tt(V):u||(u=ge&~r,u!==0&&(m=tt(u))))):(ge=d&~S,ge!==0?m=tt(ge):V!==0?m=tt(V):u||(u=d&~r,u!==0&&(m=tt(u)))),m===0?0:i!==0&&i!==m&&(i&S)===0&&(S=m&-m,u=i&-i,S>=u||S===32&&(u&4194048)!==0)?i:m}function dt(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function At(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jt(){var r=yt;return yt<<=1,(yt&62914560)===0&&(yt=4194304),r}function Ar(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function be(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function _e(r,i,u,d,m,S){var V=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var ge=r.entanglements,Fe=r.expirationTimes,Me=r.hiddenUpdates;for(u=V&~u;0<u;){var ze=31-Ke(u),Ge=1<<ze;ge[ze]=0,Fe[ze]=-1;var je=Me[ze];if(je!==null)for(Me[ze]=null,ze=0;ze<je.length;ze++){var De=je[ze];De!==null&&(De.lane&=-536870913)}u&=~Ge}d!==0&&Ye(r,d,0),S!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=S&~(V&~i))}function Ye(r,i,u){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-Ke(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|u&261930}function Ze(r,i){var u=r.entangledLanes|=i;for(r=r.entanglements;u;){var d=31-Ke(u),m=1<<d;m&i|r[d]&i&&(r[d]|=i),u&=~m}}function st(r,i){var u=i&-i;return u=(u&42)!==0?1:qt(u),(u&(r.suspendedLanes|i))!==0?0:u}function qt(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function rr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Br(){var r=ae.p;return r!==0?r:(r=window.event,r===void 0?32:v2(r.type))}function $n(r,i){var u=ae.p;try{return ae.p=r,i()}finally{ae.p=u}}var Rr=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Rr,nr="__reactProps$"+Rr,Mr="__reactContainer$"+Rr,jr="__reactEvents$"+Rr,gn="__reactListeners$"+Rr,xn="__reactHandles$"+Rr,kr="__reactResources$"+Rr,wr="__reactMarker$"+Rr;function Wo(r){delete r[Ht],delete r[nr],delete r[jr],delete r[gn],delete r[xn]}function xi(r){var i=r[Ht];if(i)return i;for(var u=r.parentNode;u;){if(i=u[Mr]||u[Ht]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=o2(r);r!==null;){if(u=r[Ht])return u;r=o2(r)}return i}r=u,u=r.parentNode}return null}function Ei(r){if(r=r[Ht]||r[Mr]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Li(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(o(33))}function Si(r){var i=r[kr];return i||(i=r[kr]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ur(r){r[wr]=!0}var qs=new Set,kv={};function Hs(r,i){$a(r,i),$a(r+"Capture",i)}function $a(r,i){for(kv[r]=i,r=0;r<i.length;r++)qs.add(i[r])}var X6=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Lv={},$v={};function J6(r){return P.call($v,r)?!0:P.call(Lv,r)?!1:X6.test(r)?$v[r]=!0:(Lv[r]=!0,!1)}function Mf(r,i,u){if(J6(i))if(u===null)r.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+u)}}function jf(r,i,u){if(u===null)r.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+u)}}function no(r,i,u,d){if(d===null)r.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(i,u,""+d)}}function si(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function zv(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Z6(r,i,u){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var m=d.get,S=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(V){u=""+V,S.call(this,V)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(V){u=""+V},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Vp(r){if(!r._valueTracker){var i=zv(r)?"checked":"value";r._valueTracker=Z6(r,i,""+r[i])}}function qv(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var u=i.getValue(),d="";return r&&(d=zv(r)?r.checked?"true":"false":r.value),r=d,r!==u?(i.setValue(r),!0):!1}function Uf(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var e8=/[\n"\\]/g;function ai(r){return r.replace(e8,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Wp(r,i,u,d,m,S,V,ge){r.name="",V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?r.type=V:r.removeAttribute("type"),i!=null?V==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+si(i)):r.value!==""+si(i)&&(r.value=""+si(i)):V!=="submit"&&V!=="reset"||r.removeAttribute("value"),i!=null?Xp(r,V,si(i)):u!=null?Xp(r,V,si(u)):d!=null&&r.removeAttribute("value"),m==null&&S!=null&&(r.defaultChecked=!!S),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),ge!=null&&typeof ge!="function"&&typeof ge!="symbol"&&typeof ge!="boolean"?r.name=""+si(ge):r.removeAttribute("name")}function Hv(r,i,u,d,m,S,V,ge){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.type=S),i!=null||u!=null){if(!(S!=="submit"&&S!=="reset"||i!=null)){Vp(r);return}u=u!=null?""+si(u):"",i=i!=null?""+si(i):u,ge||i===r.value||(r.value=i),r.defaultValue=i}d=d??m,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=ge?r.checked:!!d,r.defaultChecked=!!d,V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"&&(r.name=V),Vp(r)}function Xp(r,i,u){i==="number"&&Uf(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function za(r,i,u,d){if(r=r.options,i){i={};for(var m=0;m<u.length;m++)i["$"+u[m]]=!0;for(u=0;u<r.length;u++)m=i.hasOwnProperty("$"+r[u].value),r[u].selected!==m&&(r[u].selected=m),m&&d&&(r[u].defaultSelected=!0)}else{for(u=""+si(u),i=null,m=0;m<r.length;m++){if(r[m].value===u){r[m].selected=!0,d&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function Qv(r,i,u){if(i!=null&&(i=""+si(i),i!==r.value&&(r.value=i),u==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=u!=null?""+si(u):""}function Gv(r,i,u,d){if(i==null){if(d!=null){if(u!=null)throw Error(o(92));if(ie(d)){if(1<d.length)throw Error(o(93));d=d[0]}u=d}u==null&&(u=""),i=u}u=si(i),r.defaultValue=u,d=r.textContent,d===u&&d!==""&&d!==null&&(r.value=d),Vp(r)}function qa(r,i){if(i){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=i;return}}r.textContent=i}var t8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Kv(r,i,u){var d=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,u):typeof u!="number"||u===0||t8.has(i)?i==="float"?r.cssFloat=u:r[i]=(""+u).trim():r[i]=u+"px"}function Yv(r,i,u){if(i!=null&&typeof i!="object")throw Error(o(62));if(r=r.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var m in i)d=i[m],i.hasOwnProperty(m)&&u[m]!==d&&Kv(r,m,d)}else for(var S in i)i.hasOwnProperty(S)&&Kv(r,S,i[S])}function Jp(r){if(r.indexOf("-")===-1)return!1;switch(r){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 r8=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),n8=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Nf(r){return n8.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function io(){}var Zp=null;function ey(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ha=null,Qa=null;function Vv(r){var i=Ei(r);if(i&&(r=i.stateNode)){var u=r[nr]||null;e:switch(r=i.stateNode,i.type){case"input":if(Wp(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+ai(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var d=u[i];if(d!==r&&d.form===r.form){var m=d[nr]||null;if(!m)throw Error(o(90));Wp(d,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<u.length;i++)d=u[i],d.form===r.form&&qv(d)}break e;case"textarea":Qv(r,u.value,u.defaultValue);break e;case"select":i=u.value,i!=null&&za(r,!!u.multiple,i,!1)}}}var ty=!1;function Wv(r,i,u){if(ty)return r(i,u);ty=!0;try{var d=r(i);return d}finally{if(ty=!1,(Ha!==null||Qa!==null)&&(Eh(),Ha&&(i=Ha,r=Qa,Qa=Ha=null,Vv(i),r)))for(i=0;i<r.length;i++)Vv(r[i])}}function dl(r,i){var u=r.stateNode;if(u===null)return null;var d=u[nr]||null;if(d===null)return null;u=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(o(231,i,typeof u));return u}var oo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ry=!1;if(oo)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){ry=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{ry=!1}var Xo=null,ny=null,Df=null;function Xv(){if(Df)return Df;var r,i=ny,u=i.length,d,m="value"in Xo?Xo.value:Xo.textContent,S=m.length;for(r=0;r<u&&i[r]===m[r];r++);var V=u-r;for(d=1;d<=V&&i[u-d]===m[S-d];d++);return Df=m.slice(r,1<d?1-d:void 0)}function Pf(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function kf(){return!0}function Jv(){return!1}function En(r){function i(u,d,m,S,V){this._reactName=u,this._targetInst=m,this.type=d,this.nativeEvent=S,this.target=V,this.currentTarget=null;for(var ge in r)r.hasOwnProperty(ge)&&(u=r[ge],this[ge]=u?u(S):S[ge]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?kf:Jv,this.isPropagationStopped=Jv,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=kf)},persist:function(){},isPersistent:kf}),i}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lf=En(Qs),yl=y({},Qs,{view:0,detail:0}),i8=En(yl),iy,oy,gl,$f=y({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ay,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==gl&&(gl&&r.type==="mousemove"?(iy=r.screenX-gl.screenX,oy=r.screenY-gl.screenY):oy=iy=0,gl=r),iy)},movementY:function(r){return"movementY"in r?r.movementY:oy}}),Zv=En($f),o8=y({},$f,{dataTransfer:0}),s8=En(o8),a8=y({},yl,{relatedTarget:0}),sy=En(a8),u8=y({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),l8=En(u8),c8=y({},Qs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),f8=En(c8),h8=y({},Qs,{data:0}),ex=En(h8),d8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p8={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},y8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g8(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=y8[r])?!!i[r]:!1}function ay(){return g8}var m8=y({},yl,{key:function(r){if(r.key){var i=d8[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Pf(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?p8[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ay,charCode:function(r){return r.type==="keypress"?Pf(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Pf(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),b8=En(m8),A8=y({},$f,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=En(A8),w8=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ay}),v8=En(w8),x8=y({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),E8=En(x8),S8=y({},$f,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),I8=En(S8),_8=y({},Qs,{newState:0,oldState:0}),C8=En(_8),F8=[9,13,27,32],uy=oo&&"CompositionEvent"in window,ml=null;oo&&"documentMode"in document&&(ml=document.documentMode);var O8=oo&&"TextEvent"in window&&!ml,rx=oo&&(!uy||ml&&8<ml&&11>=ml),nx=" ",ix=!1;function ox(r,i){switch(r){case"keyup":return F8.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sx(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ga=!1;function T8(r,i){switch(r){case"compositionend":return sx(i);case"keypress":return i.which!==32?null:(ix=!0,nx);case"textInput":return r=i.data,r===nx&&ix?null:r;default:return null}}function B8(r,i){if(Ga)return r==="compositionend"||!uy&&ox(r,i)?(r=Xv(),Df=ny=Xo=null,Ga=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return rx&&i.locale!=="ko"?null:i.data;default:return null}}var R8={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ax(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!R8[r.type]:i==="textarea"}function ux(r,i,u,d){Ha?Qa?Qa.push(d):Qa=[d]:Ha=d,i=Th(i,"onChange"),0<i.length&&(u=new Lf("onChange","change",null,u,d),r.push({event:u,listeners:i}))}var bl=null,Al=null;function M8(r){QS(r,0)}function zf(r){var i=Li(r);if(qv(i))return r}function lx(r,i){if(r==="change")return i}var cx=!1;if(oo){var ly;if(oo){var cy="oninput"in document;if(!cy){var fx=document.createElement("div");fx.setAttribute("oninput","return;"),cy=typeof fx.oninput=="function"}ly=cy}else ly=!1;cx=ly&&(!document.documentMode||9<document.documentMode)}function hx(){bl&&(bl.detachEvent("onpropertychange",dx),Al=bl=null)}function dx(r){if(r.propertyName==="value"&&zf(Al)){var i=[];ux(i,Al,r,ey(r)),Wv(M8,i)}}function j8(r,i,u){r==="focusin"?(hx(),bl=i,Al=u,bl.attachEvent("onpropertychange",dx)):r==="focusout"&&hx()}function U8(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return zf(Al)}function N8(r,i){if(r==="click")return zf(i)}function D8(r,i){if(r==="input"||r==="change")return zf(i)}function P8(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zn=typeof Object.is=="function"?Object.is:P8;function wl(r,i){if(zn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var u=Object.keys(r),d=Object.keys(i);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var m=u[d];if(!P.call(i,m)||!zn(r[m],i[m]))return!1}return!0}function px(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function yx(r,i){var u=px(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=i&&d>=i)return{node:u,offset:i-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=px(u)}}function gx(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?gx(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function mx(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Uf(r.document);i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=Uf(r.document)}return i}function fy(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var k8=oo&&"documentMode"in document&&11>=document.documentMode,Ka=null,hy=null,vl=null,dy=!1;function bx(r,i,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;dy||Ka==null||Ka!==Uf(d)||(d=Ka,"selectionStart"in d&&fy(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),vl&&wl(vl,d)||(vl=d,d=Th(hy,"onSelect"),0<d.length&&(i=new Lf("onSelect","select",null,i,u),r.push({event:i,listeners:d}),i.target=Ka)))}function Gs(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var Ya={animationend:Gs("Animation","AnimationEnd"),animationiteration:Gs("Animation","AnimationIteration"),animationstart:Gs("Animation","AnimationStart"),transitionrun:Gs("Transition","TransitionRun"),transitionstart:Gs("Transition","TransitionStart"),transitioncancel:Gs("Transition","TransitionCancel"),transitionend:Gs("Transition","TransitionEnd")},py={},Ax={};oo&&(Ax=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function Ks(r){if(py[r])return py[r];if(!Ya[r])return r;var i=Ya[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in Ax)return py[r]=i[u];return r}var vx=Ks("animationend"),xx=Ks("animationiteration"),Ex=Ks("animationstart"),L8=Ks("transitionrun"),$8=Ks("transitionstart"),z8=Ks("transitioncancel"),Sx=Ks("transitionend"),Ix=new Map,yy="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");yy.push("scrollEnd");function Ii(r,i){Ix.set(r,i),Hs(i,[r])}var qf=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof jt=="object"&&typeof jt.emit=="function"){jt.emit("uncaughtException",r);return}console.error(r)},ui=[],Va=0,gy=0;function Hf(){for(var r=Va,i=gy=Va=0;i<r;){var u=ui[i];ui[i++]=null;var d=ui[i];ui[i++]=null;var m=ui[i];ui[i++]=null;var S=ui[i];if(ui[i++]=null,d!==null&&m!==null){var V=d.pending;V===null?m.next=m:(m.next=V.next,V.next=m),d.pending=m}S!==0&&_x(u,m,S)}}function Qf(r,i,u,d){ui[Va++]=r,ui[Va++]=i,ui[Va++]=u,ui[Va++]=d,gy|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function my(r,i,u,d){return Qf(r,i,u,d),Gf(r)}function Ys(r,i){return Qf(r,null,null,i),Gf(r)}function _x(r,i,u){r.lanes|=u;var d=r.alternate;d!==null&&(d.lanes|=u);for(var m=!1,S=r.return;S!==null;)S.childLanes|=u,d=S.alternate,d!==null&&(d.childLanes|=u),S.tag===22&&(r=S.stateNode,r===null||r._visibility&1||(m=!0)),r=S,S=S.return;return r.tag===3?(S=r.stateNode,m&&i!==null&&(m=31-Ke(u),r=S.hiddenUpdates,d=r[m],d===null?r[m]=[i]:d.push(i),i.lane=u|536870912),S):null}function Gf(r){if(50<ql)throw ql=0,_g=null,Error(o(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Wa={};function q8(r,i,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(r,i,u,d){return new q8(r,i,u,d)}function by(r){return r=r.prototype,!(!r||!r.isReactComponent)}function so(r,i){var u=r.alternate;return u===null?(u=qn(r.tag,i,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=i,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,i=r.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function Cx(r,i){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,i=u.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Kf(r,i,u,d,m,S){var V=0;if(d=r,typeof r=="function")by(r)&&(V=1);else if(typeof r=="string")V=Y4(r,u,W.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=qn(31,u,i,m),r.elementType=j,r.lanes=S,r;case F:return Vs(u.children,m,S,i);case I:V=8,m|=24;break;case R:return r=qn(12,u,i,m|2),r.elementType=R,r.lanes=S,r;case T:return r=qn(13,u,i,m),r.elementType=T,r.lanes=S,r;case z:return r=qn(19,u,i,m),r.elementType=z,r.lanes=S,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case E:V=10;break e;case A:V=9;break e;case M:V=11;break e;case L:V=14;break e;case k:V=16,d=null;break e}V=29,u=Error(o(130,r===null?"null":typeof r,"")),d=null}return i=qn(V,u,i,m),i.elementType=r,i.type=d,i.lanes=S,i}function Vs(r,i,u,d){return r=qn(7,r,d,i),r.lanes=u,r}function Ay(r,i,u){return r=qn(6,r,null,i),r.lanes=u,r}function Fx(r){var i=qn(18,null,null,0);return i.stateNode=r,i}function wy(r,i,u){return i=qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=u,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Ox=new WeakMap;function li(r,i){if(typeof r=="object"&&r!==null){var u=Ox.get(r);return u!==void 0?u:(i={value:r,source:i,stack:C(i)},Ox.set(r,i),i)}return{value:r,source:i,stack:C(i)}}var Xa=[],Ja=0,Yf=null,xl=0,ci=[],fi=0,Jo=null,$i=1,zi="";function ao(r,i){Xa[Ja++]=xl,Xa[Ja++]=Yf,Yf=r,xl=i}function Tx(r,i,u){ci[fi++]=$i,ci[fi++]=zi,ci[fi++]=Jo,Jo=r;var d=$i;r=zi;var m=32-Ke(d)-1;d&=~(1<<m),u+=1;var S=32-Ke(i)+m;if(30<S){var V=m-m%5;S=(d&(1<<V)-1).toString(32),d>>=V,m-=V,$i=1<<32-Ke(i)+m|u<<m|d,zi=S+r}else $i=1<<S|u<<m|d,zi=r}function vy(r){r.return!==null&&(ao(r,1),Tx(r,1,0))}function xy(r){for(;r===Yf;)Yf=Xa[--Ja],Xa[Ja]=null,xl=Xa[--Ja],Xa[Ja]=null;for(;r===Jo;)Jo=ci[--fi],ci[fi]=null,zi=ci[--fi],ci[fi]=null,$i=ci[--fi],ci[fi]=null}function Bx(r,i){ci[fi++]=$i,ci[fi++]=zi,ci[fi++]=Jo,$i=i.id,zi=i.overflow,Jo=r}var Vr=null,Zt=null,Mt=!1,Zo=null,hi=!1,Ey=Error(o(519));function es(r){var i=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw El(li(i,r)),Ey}function Rx(r){var i=r.stateNode,u=r.type,d=r.memoizedProps;switch(i[Ht]=r,i[nr]=d,u){case"dialog":It("cancel",i),It("close",i);break;case"iframe":case"object":case"embed":It("load",i);break;case"video":case"audio":for(u=0;u<Ql.length;u++)It(Ql[u],i);break;case"source":It("error",i);break;case"img":case"image":case"link":It("error",i),It("load",i);break;case"details":It("toggle",i);break;case"input":It("invalid",i),Hv(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":It("invalid",i);break;case"textarea":It("invalid",i),Gv(i,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||d.suppressHydrationWarning===!0||VS(i.textContent,u)?(d.popover!=null&&(It("beforetoggle",i),It("toggle",i)),d.onScroll!=null&&It("scroll",i),d.onScrollEnd!=null&&It("scrollend",i),d.onClick!=null&&(i.onclick=io),i=!0):i=!1,i||es(r,!0)}function Mx(r){for(Vr=r.return;Vr;)switch(Vr.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:Vr=Vr.return}}function Za(r){if(r!==Vr)return!1;if(!Mt)return Mx(r),Mt=!0,!1;var i=r.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||$g(r.type,r.memoizedProps)),u=!u),u&&Zt&&es(r),Mx(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Zt=i2(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Zt=i2(r)}else i===27?(i=Zt,ps(r.type)?(r=Gg,Gg=null,Zt=r):Zt=i):Zt=Vr?pi(r.stateNode.nextSibling):null;return!0}function Ws(){Zt=Vr=null,Mt=!1}function Sy(){var r=Zo;return r!==null&&(Cn===null?Cn=r:Cn.push.apply(Cn,r),Zo=null),r}function El(r){Zo===null?Zo=[r]:Zo.push(r)}var Iy=G(null),Xs=null,uo=null;function ts(r,i,u){K(Iy,i._currentValue),i._currentValue=u}function lo(r){r._currentValue=Iy.current,Q(Iy)}function _y(r,i,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===u)break;r=r.return}}function Cy(r,i,u,d){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var S=m.dependencies;if(S!==null){var V=m.child;S=S.firstContext;e:for(;S!==null;){var ge=S;S=m;for(var Fe=0;Fe<i.length;Fe++)if(ge.context===i[Fe]){S.lanes|=u,ge=S.alternate,ge!==null&&(ge.lanes|=u),_y(S.return,u,r),d||(V=null);break e}S=ge.next}}else if(m.tag===18){if(V=m.return,V===null)throw Error(o(341));V.lanes|=u,S=V.alternate,S!==null&&(S.lanes|=u),_y(V,u,r),V=null}else V=m.child;if(V!==null)V.return=m;else for(V=m;V!==null;){if(V===r){V=null;break}if(m=V.sibling,m!==null){m.return=V.return,V=m;break}V=V.return}m=V}}function eu(r,i,u,d){r=null;for(var m=i,S=!1;m!==null;){if(!S){if((m.flags&524288)!==0)S=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var V=m.alternate;if(V===null)throw Error(o(387));if(V=V.memoizedProps,V!==null){var ge=m.type;zn(m.pendingProps.value,V.value)||(r!==null?r.push(ge):r=[ge])}}else if(m===ue.current){if(V=m.alternate,V===null)throw Error(o(387));V.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Wl):r=[Wl])}m=m.return}r!==null&&Cy(i,r,u,d),i.flags|=262144}function Vf(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Js(r){Xs=r,uo=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Wr(r){return jx(Xs,r)}function Wf(r,i){return Xs===null&&Js(r),jx(r,i)}function jx(r,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},uo===null){if(r===null)throw Error(o(308));uo=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else uo=uo.next=i;return u}var H8=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(u,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(u){return u()})}},Q8=e.unstable_scheduleCallback,G8=e.unstable_NormalPriority,vr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fy(){return{controller:new H8,data:new Map,refCount:0}}function Sl(r){r.refCount--,r.refCount===0&&Q8(G8,function(){r.controller.abort()})}var Il=null,Oy=0,tu=0,ru=null;function K8(r,i){if(Il===null){var u=Il=[];Oy=0,tu=Rg(),ru={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Oy++,i.then(Ux,Ux),i}function Ux(){if(--Oy===0&&Il!==null){ru!==null&&(ru.status="fulfilled");var r=Il;Il=null,tu=0,ru=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function Y8(r,i){var u=[],d={status:"pending",value:null,reason:null,then:function(m){u.push(m)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var m=0;m<u.length;m++)(0,u[m])(i)},function(m){for(d.status="rejected",d.reason=m,m=0;m<u.length;m++)(0,u[m])(void 0)}),d}var Nx=X.S;X.S=function(r,i){AS=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&K8(r,i),Nx!==null&&Nx(r,i)};var Zs=G(null);function Ty(){var r=Zs.current;return r!==null?r:Wt.pooledCache}function Xf(r,i){i===null?K(Zs,Zs.current):K(Zs,i.pool)}function Dx(){var r=Ty();return r===null?null:{parent:vr._currentValue,pool:r}}var nu=Error(o(460)),By=Error(o(474)),Jf=Error(o(542)),Zf={then:function(){}};function Px(r){return r=r.status,r==="fulfilled"||r==="rejected"}function kx(r,i,u){switch(u=r[u],u===void 0?r.push(i):u!==i&&(i.then(io,io),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,$x(r),r;default:if(typeof i.status=="string")i.then(io,io);else{if(r=Wt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=d}},function(d){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,$x(r),r}throw ta=i,nu}}function ea(r){try{var i=r._init;return i(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ta=u,nu):u}}var ta=null;function Lx(){if(ta===null)throw Error(o(459));var r=ta;return ta=null,r}function $x(r){if(r===nu||r===Jf)throw Error(o(483))}var iu=null,_l=0;function eh(r){var i=_l;return _l+=1,iu===null&&(iu=[]),kx(iu,r,i)}function Cl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function th(r,i){throw i.$$typeof===g?Error(o(525)):(r=Object.prototype.toString.call(i),Error(o(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function zx(r){function i(Te,Oe){if(r){var Re=Te.deletions;Re===null?(Te.deletions=[Oe],Te.flags|=16):Re.push(Oe)}}function u(Te,Oe){if(!r)return null;for(;Oe!==null;)i(Te,Oe),Oe=Oe.sibling;return null}function d(Te){for(var Oe=new Map;Te!==null;)Te.key!==null?Oe.set(Te.key,Te):Oe.set(Te.index,Te),Te=Te.sibling;return Oe}function m(Te,Oe){return Te=so(Te,Oe),Te.index=0,Te.sibling=null,Te}function S(Te,Oe,Re){return Te.index=Re,r?(Re=Te.alternate,Re!==null?(Re=Re.index,Re<Oe?(Te.flags|=67108866,Oe):Re):(Te.flags|=67108866,Oe)):(Te.flags|=1048576,Oe)}function V(Te){return r&&Te.alternate===null&&(Te.flags|=67108866),Te}function ge(Te,Oe,Re,Qe){return Oe===null||Oe.tag!==6?(Oe=Ay(Re,Te.mode,Qe),Oe.return=Te,Oe):(Oe=m(Oe,Re),Oe.return=Te,Oe)}function Fe(Te,Oe,Re,Qe){var pt=Re.type;return pt===F?ze(Te,Oe,Re.props.children,Qe,Re.key):Oe!==null&&(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===k&&ea(pt)===Oe.type)?(Oe=m(Oe,Re.props),Cl(Oe,Re),Oe.return=Te,Oe):(Oe=Kf(Re.type,Re.key,Re.props,null,Te.mode,Qe),Cl(Oe,Re),Oe.return=Te,Oe)}function Me(Te,Oe,Re,Qe){return Oe===null||Oe.tag!==4||Oe.stateNode.containerInfo!==Re.containerInfo||Oe.stateNode.implementation!==Re.implementation?(Oe=wy(Re,Te.mode,Qe),Oe.return=Te,Oe):(Oe=m(Oe,Re.children||[]),Oe.return=Te,Oe)}function ze(Te,Oe,Re,Qe,pt){return Oe===null||Oe.tag!==7?(Oe=Vs(Re,Te.mode,Qe,pt),Oe.return=Te,Oe):(Oe=m(Oe,Re),Oe.return=Te,Oe)}function Ge(Te,Oe,Re){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint")return Oe=Ay(""+Oe,Te.mode,Re),Oe.return=Te,Oe;if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case b:return Re=Kf(Oe.type,Oe.key,Oe.props,null,Te.mode,Re),Cl(Re,Oe),Re.return=Te,Re;case w:return Oe=wy(Oe,Te.mode,Re),Oe.return=Te,Oe;case k:return Oe=ea(Oe),Ge(Te,Oe,Re)}if(ie(Oe)||N(Oe))return Oe=Vs(Oe,Te.mode,Re,null),Oe.return=Te,Oe;if(typeof Oe.then=="function")return Ge(Te,eh(Oe),Re);if(Oe.$$typeof===E)return Ge(Te,Wf(Te,Oe),Re);th(Te,Oe)}return null}function je(Te,Oe,Re,Qe){var pt=Oe!==null?Oe.key:null;if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return pt!==null?null:ge(Te,Oe,""+Re,Qe);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case b:return Re.key===pt?Fe(Te,Oe,Re,Qe):null;case w:return Re.key===pt?Me(Te,Oe,Re,Qe):null;case k:return Re=ea(Re),je(Te,Oe,Re,Qe)}if(ie(Re)||N(Re))return pt!==null?null:ze(Te,Oe,Re,Qe,null);if(typeof Re.then=="function")return je(Te,Oe,eh(Re),Qe);if(Re.$$typeof===E)return je(Te,Oe,Wf(Te,Re),Qe);th(Te,Re)}return null}function De(Te,Oe,Re,Qe,pt){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return Te=Te.get(Re)||null,ge(Oe,Te,""+Qe,pt);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case b:return Te=Te.get(Qe.key===null?Re:Qe.key)||null,Fe(Oe,Te,Qe,pt);case w:return Te=Te.get(Qe.key===null?Re:Qe.key)||null,Me(Oe,Te,Qe,pt);case k:return Qe=ea(Qe),De(Te,Oe,Re,Qe,pt)}if(ie(Qe)||N(Qe))return Te=Te.get(Re)||null,ze(Oe,Te,Qe,pt,null);if(typeof Qe.then=="function")return De(Te,Oe,Re,eh(Qe),pt);if(Qe.$$typeof===E)return De(Te,Oe,Re,Wf(Oe,Qe),pt);th(Oe,Qe)}return null}function ut(Te,Oe,Re,Qe){for(var pt=null,Ut=null,ct=Oe,xt=Oe=0,Ot=null;ct!==null&&xt<Re.length;xt++){ct.index>xt?(Ot=ct,ct=null):Ot=ct.sibling;var Nt=je(Te,ct,Re[xt],Qe);if(Nt===null){ct===null&&(ct=Ot);break}r&&ct&&Nt.alternate===null&&i(Te,ct),Oe=S(Nt,Oe,xt),Ut===null?pt=Nt:Ut.sibling=Nt,Ut=Nt,ct=Ot}if(xt===Re.length)return u(Te,ct),Mt&&ao(Te,xt),pt;if(ct===null){for(;xt<Re.length;xt++)ct=Ge(Te,Re[xt],Qe),ct!==null&&(Oe=S(ct,Oe,xt),Ut===null?pt=ct:Ut.sibling=ct,Ut=ct);return Mt&&ao(Te,xt),pt}for(ct=d(ct);xt<Re.length;xt++)Ot=De(ct,Te,xt,Re[xt],Qe),Ot!==null&&(r&&Ot.alternate!==null&&ct.delete(Ot.key===null?xt:Ot.key),Oe=S(Ot,Oe,xt),Ut===null?pt=Ot:Ut.sibling=Ot,Ut=Ot);return r&&ct.forEach(function(As){return i(Te,As)}),Mt&&ao(Te,xt),pt}function mt(Te,Oe,Re,Qe){if(Re==null)throw Error(o(151));for(var pt=null,Ut=null,ct=Oe,xt=Oe=0,Ot=null,Nt=Re.next();ct!==null&&!Nt.done;xt++,Nt=Re.next()){ct.index>xt?(Ot=ct,ct=null):Ot=ct.sibling;var As=je(Te,ct,Nt.value,Qe);if(As===null){ct===null&&(ct=Ot);break}r&&ct&&As.alternate===null&&i(Te,ct),Oe=S(As,Oe,xt),Ut===null?pt=As:Ut.sibling=As,Ut=As,ct=Ot}if(Nt.done)return u(Te,ct),Mt&&ao(Te,xt),pt;if(ct===null){for(;!Nt.done;xt++,Nt=Re.next())Nt=Ge(Te,Nt.value,Qe),Nt!==null&&(Oe=S(Nt,Oe,xt),Ut===null?pt=Nt:Ut.sibling=Nt,Ut=Nt);return Mt&&ao(Te,xt),pt}for(ct=d(ct);!Nt.done;xt++,Nt=Re.next())Nt=De(ct,Te,xt,Nt.value,Qe),Nt!==null&&(r&&Nt.alternate!==null&&ct.delete(Nt.key===null?xt:Nt.key),Oe=S(Nt,Oe,xt),Ut===null?pt=Nt:Ut.sibling=Nt,Ut=Nt);return r&&ct.forEach(function(oR){return i(Te,oR)}),Mt&&ao(Te,xt),pt}function Kt(Te,Oe,Re,Qe){if(typeof Re=="object"&&Re!==null&&Re.type===F&&Re.key===null&&(Re=Re.props.children),typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case b:e:{for(var pt=Re.key;Oe!==null;){if(Oe.key===pt){if(pt=Re.type,pt===F){if(Oe.tag===7){u(Te,Oe.sibling),Qe=m(Oe,Re.props.children),Qe.return=Te,Te=Qe;break e}}else if(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===k&&ea(pt)===Oe.type){u(Te,Oe.sibling),Qe=m(Oe,Re.props),Cl(Qe,Re),Qe.return=Te,Te=Qe;break e}u(Te,Oe);break}else i(Te,Oe);Oe=Oe.sibling}Re.type===F?(Qe=Vs(Re.props.children,Te.mode,Qe,Re.key),Qe.return=Te,Te=Qe):(Qe=Kf(Re.type,Re.key,Re.props,null,Te.mode,Qe),Cl(Qe,Re),Qe.return=Te,Te=Qe)}return V(Te);case w:e:{for(pt=Re.key;Oe!==null;){if(Oe.key===pt)if(Oe.tag===4&&Oe.stateNode.containerInfo===Re.containerInfo&&Oe.stateNode.implementation===Re.implementation){u(Te,Oe.sibling),Qe=m(Oe,Re.children||[]),Qe.return=Te,Te=Qe;break e}else{u(Te,Oe);break}else i(Te,Oe);Oe=Oe.sibling}Qe=wy(Re,Te.mode,Qe),Qe.return=Te,Te=Qe}return V(Te);case k:return Re=ea(Re),Kt(Te,Oe,Re,Qe)}if(ie(Re))return ut(Te,Oe,Re,Qe);if(N(Re)){if(pt=N(Re),typeof pt!="function")throw Error(o(150));return Re=pt.call(Re),mt(Te,Oe,Re,Qe)}if(typeof Re.then=="function")return Kt(Te,Oe,eh(Re),Qe);if(Re.$$typeof===E)return Kt(Te,Oe,Wf(Te,Re),Qe);th(Te,Re)}return typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint"?(Re=""+Re,Oe!==null&&Oe.tag===6?(u(Te,Oe.sibling),Qe=m(Oe,Re),Qe.return=Te,Te=Qe):(u(Te,Oe),Qe=Ay(Re,Te.mode,Qe),Qe.return=Te,Te=Qe),V(Te)):u(Te,Oe)}return function(Te,Oe,Re,Qe){try{_l=0;var pt=Kt(Te,Oe,Re,Qe);return iu=null,pt}catch(ct){if(ct===nu||ct===Jf)throw ct;var Ut=qn(29,ct,null,Te.mode);return Ut.lanes=Qe,Ut.return=Te,Ut}finally{}}}var ra=zx(!0),qx=zx(!1),rs=!1;function Ry(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function My(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ns(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function is(r,i,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Pt&2)!==0){var m=d.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),d.pending=i,i=Gf(r),_x(r,null,u),i}return Qf(r,d,i,u),Gf(r)}function Fl(r,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,u|=d,i.lanes=u,Ze(r,u)}}function jy(r,i){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var m=null,S=null;if(u=u.firstBaseUpdate,u!==null){do{var V={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};S===null?m=S=V:S=S.next=V,u=u.next}while(u!==null);S===null?m=S=i:S=S.next=i}else m=S=i;u={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:S,shared:d.shared,callbacks:d.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=i:r.next=i,u.lastBaseUpdate=i}var Uy=!1;function Ol(){if(Uy){var r=ru;if(r!==null)throw r}}function Tl(r,i,u,d){Uy=!1;var m=r.updateQueue;rs=!1;var S=m.firstBaseUpdate,V=m.lastBaseUpdate,ge=m.shared.pending;if(ge!==null){m.shared.pending=null;var Fe=ge,Me=Fe.next;Fe.next=null,V===null?S=Me:V.next=Me,V=Fe;var ze=r.alternate;ze!==null&&(ze=ze.updateQueue,ge=ze.lastBaseUpdate,ge!==V&&(ge===null?ze.firstBaseUpdate=Me:ge.next=Me,ze.lastBaseUpdate=Fe))}if(S!==null){var Ge=m.baseState;V=0,ze=Me=Fe=null,ge=S;do{var je=ge.lane&-536870913,De=je!==ge.lane;if(De?(Ft&je)===je:(d&je)===je){je!==0&&je===tu&&(Uy=!0),ze!==null&&(ze=ze.next={lane:0,tag:ge.tag,payload:ge.payload,callback:null,next:null});e:{var ut=r,mt=ge;je=i;var Kt=u;switch(mt.tag){case 1:if(ut=mt.payload,typeof ut=="function"){Ge=ut.call(Kt,Ge,je);break e}Ge=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=mt.payload,je=typeof ut=="function"?ut.call(Kt,Ge,je):ut,je==null)break e;Ge=y({},Ge,je);break e;case 2:rs=!0}}je=ge.callback,je!==null&&(r.flags|=64,De&&(r.flags|=8192),De=m.callbacks,De===null?m.callbacks=[je]:De.push(je))}else De={lane:je,tag:ge.tag,payload:ge.payload,callback:ge.callback,next:null},ze===null?(Me=ze=De,Fe=Ge):ze=ze.next=De,V|=je;if(ge=ge.next,ge===null){if(ge=m.shared.pending,ge===null)break;De=ge,ge=De.next,De.next=null,m.lastBaseUpdate=De,m.shared.pending=null}}while(!0);ze===null&&(Fe=Ge),m.baseState=Fe,m.firstBaseUpdate=Me,m.lastBaseUpdate=ze,S===null&&(m.shared.lanes=0),ls|=V,r.lanes=V,r.memoizedState=Ge}}function Hx(r,i){if(typeof r!="function")throw Error(o(191,r));r.call(i)}function Qx(r,i){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)Hx(u[r],i)}var ou=G(null),rh=G(0);function Gx(r,i){r=Ao,K(rh,r),K(ou,i),Ao=r|i.baseLanes}function Ny(){K(rh,Ao),K(ou,ou.current)}function Dy(){Ao=rh.current,Q(ou),Q(rh)}var Hn=G(null),di=null;function os(r){var i=r.alternate;K(gr,gr.current&1),K(Hn,r),di===null&&(i===null||ou.current!==null||i.memoizedState!==null)&&(di=r)}function Py(r){K(gr,gr.current),K(Hn,r),di===null&&(di=r)}function Kx(r){r.tag===22?(K(gr,gr.current),K(Hn,r),di===null&&(di=r)):ss()}function ss(){K(gr,gr.current),K(Hn,Hn.current)}function Qn(r){Q(Hn),di===r&&(di=null),Q(gr)}var gr=G(0);function nh(r){for(var i=r;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Hg(u)||Qg(u)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var co=0,vt=null,Qt=null,xr=null,ih=!1,su=!1,na=!1,oh=0,Bl=0,au=null,V8=0;function fr(){throw Error(o(321))}function ky(r,i){if(i===null)return!1;for(var u=0;u<i.length&&u<r.length;u++)if(!zn(r[u],i[u]))return!1;return!0}function Ly(r,i,u,d,m,S){return co=S,vt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,X.H=r===null||r.memoizedState===null?TE:tg,na=!1,S=u(d,m),na=!1,su&&(S=Vx(i,u,d,m)),Yx(r),S}function Yx(r){X.H=jl;var i=Qt!==null&&Qt.next!==null;if(co=0,xr=Qt=vt=null,ih=!1,Bl=0,au=null,i)throw Error(o(300));r===null||Er||(r=r.dependencies,r!==null&&Vf(r)&&(Er=!0))}function Vx(r,i,u,d){vt=r;var m=0;do{if(su&&(au=null),Bl=0,su=!1,25<=m)throw Error(o(301));if(m+=1,xr=Qt=null,r.updateQueue!=null){var S=r.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}X.H=BE,S=i(u,d)}while(su);return S}function W8(){var r=X.H,i=r.useState()[0];return i=typeof i.then=="function"?Rl(i):i,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(vt.flags|=1024),i}function $y(){var r=oh!==0;return oh=0,r}function zy(r,i,u){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~u}function qy(r){if(ih){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ih=!1}co=0,xr=Qt=vt=null,su=!1,Bl=oh=0,au=null}function mn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xr===null?vt.memoizedState=xr=r:xr=xr.next=r,xr}function mr(){if(Qt===null){var r=vt.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var i=xr===null?vt.memoizedState:xr.next;if(i!==null)xr=i,Qt=r;else{if(r===null)throw vt.alternate===null?Error(o(467)):Error(o(310));Qt=r,r={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},xr===null?vt.memoizedState=xr=r:xr=xr.next=r}return xr}function sh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rl(r){var i=Bl;return Bl+=1,au===null&&(au=[]),r=kx(au,r,i),i=vt,(xr===null?i.memoizedState:xr.next)===null&&(i=i.alternate,X.H=i===null||i.memoizedState===null?TE:tg),r}function ah(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Rl(r);if(r.$$typeof===E)return Wr(r)}throw Error(o(438,String(r)))}function Hy(r){var i=null,u=vt.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var d=vt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=sh(),vt.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(r),d=0;d<r;d++)u[d]=U;return i.index++,u}function fo(r,i){return typeof i=="function"?i(r):i}function uh(r){var i=mr();return Qy(i,Qt,r)}function Qy(r,i,u){var d=r.queue;if(d===null)throw Error(o(311));d.lastRenderedReducer=u;var m=r.baseQueue,S=d.pending;if(S!==null){if(m!==null){var V=m.next;m.next=S.next,S.next=V}i.baseQueue=m=S,d.pending=null}if(S=r.baseState,m===null)r.memoizedState=S;else{i=m.next;var ge=V=null,Fe=null,Me=i,ze=!1;do{var Ge=Me.lane&-536870913;if(Ge!==Me.lane?(Ft&Ge)===Ge:(co&Ge)===Ge){var je=Me.revertLane;if(je===0)Fe!==null&&(Fe=Fe.next={lane:0,revertLane:0,gesture:null,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null}),Ge===tu&&(ze=!0);else if((co&je)===je){Me=Me.next,je===tu&&(ze=!0);continue}else Ge={lane:0,revertLane:Me.revertLane,gesture:null,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},Fe===null?(ge=Fe=Ge,V=S):Fe=Fe.next=Ge,vt.lanes|=je,ls|=je;Ge=Me.action,na&&u(S,Ge),S=Me.hasEagerState?Me.eagerState:u(S,Ge)}else je={lane:Ge,revertLane:Me.revertLane,gesture:Me.gesture,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},Fe===null?(ge=Fe=je,V=S):Fe=Fe.next=je,vt.lanes|=Ge,ls|=Ge;Me=Me.next}while(Me!==null&&Me!==i);if(Fe===null?V=S:Fe.next=ge,!zn(S,r.memoizedState)&&(Er=!0,ze&&(u=ru,u!==null)))throw u;r.memoizedState=S,r.baseState=V,r.baseQueue=Fe,d.lastRenderedState=S}return m===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Gy(r){var i=mr(),u=i.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=r;var d=u.dispatch,m=u.pending,S=i.memoizedState;if(m!==null){u.pending=null;var V=m=m.next;do S=r(S,V.action),V=V.next;while(V!==m);zn(S,i.memoizedState)||(Er=!0),i.memoizedState=S,i.baseQueue===null&&(i.baseState=S),u.lastRenderedState=S}return[S,d]}function Wx(r,i,u){var d=vt,m=mr(),S=Mt;if(S){if(u===void 0)throw Error(o(407));u=u()}else u=i();var V=!zn((Qt||m).memoizedState,u);if(V&&(m.memoizedState=u,Er=!0),m=m.queue,Vy(Zx.bind(null,d,m,r),[r]),m.getSnapshot!==i||V||xr!==null&&xr.memoizedState.tag&1){if(d.flags|=2048,uu(9,{destroy:void 0},Jx.bind(null,d,m,u,i),null),Wt===null)throw Error(o(349));S||(co&127)!==0||Xx(d,i,u)}return u}function Xx(r,i,u){r.flags|=16384,r={getSnapshot:i,value:u},i=vt.updateQueue,i===null?(i=sh(),vt.updateQueue=i,i.stores=[r]):(u=i.stores,u===null?i.stores=[r]:u.push(r))}function Jx(r,i,u,d){i.value=u,i.getSnapshot=d,eE(i)&&tE(r)}function Zx(r,i,u){return u(function(){eE(i)&&tE(r)})}function eE(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!zn(r,u)}catch{return!0}}function tE(r){var i=Ys(r,2);i!==null&&Fn(i,r,2)}function Ky(r){var i=mn();if(typeof r=="function"){var u=r;if(r=u(),na){He(!0);try{u()}finally{He(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:r},i}function rE(r,i,u,d){return r.baseState=u,Qy(r,Qt,typeof d=="function"?d:fo)}function X8(r,i,u,d,m){if(fh(r))throw Error(o(485));if(r=i.action,r!==null){var S={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(V){S.listeners.push(V)}};X.T!==null?u(!0):S.isTransition=!1,d(S),u=i.pending,u===null?(S.next=i.pending=S,nE(i,S)):(S.next=u.next,i.pending=u.next=S)}}function nE(r,i){var u=i.action,d=i.payload,m=r.state;if(i.isTransition){var S=X.T,V={};X.T=V;try{var ge=u(m,d),Fe=X.S;Fe!==null&&Fe(V,ge),iE(r,i,ge)}catch(Me){Yy(r,i,Me)}finally{S!==null&&V.types!==null&&(S.types=V.types),X.T=S}}else try{S=u(m,d),iE(r,i,S)}catch(Me){Yy(r,i,Me)}}function iE(r,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){oE(r,i,d)},function(d){return Yy(r,i,d)}):oE(r,i,u)}function oE(r,i,u){i.status="fulfilled",i.value=u,sE(i),r.state=u,i=r.pending,i!==null&&(u=i.next,u===i?r.pending=null:(u=u.next,i.next=u,nE(r,u)))}function Yy(r,i,u){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=u,sE(i),i=i.next;while(i!==d)}r.action=null}function sE(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function aE(r,i){return i}function uE(r,i){if(Mt){var u=Wt.formState;if(u!==null){e:{var d=vt;if(Mt){if(Zt){t:{for(var m=Zt,S=hi;m.nodeType!==8;){if(!S){m=null;break t}if(m=pi(m.nextSibling),m===null){m=null;break t}}S=m.data,m=S==="F!"||S==="F"?m:null}if(m){Zt=pi(m.nextSibling),d=m.data==="F!";break e}}es(d)}d=!1}d&&(i=u[0])}}return u=mn(),u.memoizedState=u.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aE,lastRenderedState:i},u.queue=d,u=CE.bind(null,vt,d),d.dispatch=u,d=Ky(!1),S=eg.bind(null,vt,!1,d.queue),d=mn(),m={state:i,dispatch:null,action:r,pending:null},d.queue=m,u=X8.bind(null,vt,m,S,u),m.dispatch=u,d.memoizedState=r,[i,u,!1]}function lE(r){var i=mr();return cE(i,Qt,r)}function cE(r,i,u){if(i=Qy(r,i,aE)[0],r=uh(fo)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=Rl(i)}catch(V){throw V===nu?Jf:V}else d=i;i=mr();var m=i.queue,S=m.dispatch;return u!==i.memoizedState&&(vt.flags|=2048,uu(9,{destroy:void 0},J8.bind(null,m,u),null)),[d,S,r]}function J8(r,i){r.action=i}function fE(r){var i=mr(),u=Qt;if(u!==null)return cE(i,u,r);mr(),i=i.memoizedState,u=mr();var d=u.queue.dispatch;return u.memoizedState=r,[i,d,!1]}function uu(r,i,u,d){return r={tag:r,create:u,deps:d,inst:i,next:null},i=vt.updateQueue,i===null&&(i=sh(),vt.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,i.lastEffect=r),r}function hE(){return mr().memoizedState}function lh(r,i,u,d){var m=mn();vt.flags|=r,m.memoizedState=uu(1|i,{destroy:void 0},u,d===void 0?null:d)}function ch(r,i,u,d){var m=mr();d=d===void 0?null:d;var S=m.memoizedState.inst;Qt!==null&&d!==null&&ky(d,Qt.memoizedState.deps)?m.memoizedState=uu(i,S,u,d):(vt.flags|=r,m.memoizedState=uu(1|i,S,u,d))}function dE(r,i){lh(8390656,8,r,i)}function Vy(r,i){ch(2048,8,r,i)}function Z8(r){vt.flags|=4;var i=vt.updateQueue;if(i===null)i=sh(),vt.updateQueue=i,i.events=[r];else{var u=i.events;u===null?i.events=[r]:u.push(r)}}function pE(r){var i=mr().memoizedState;return Z8({ref:i,nextImpl:r}),function(){if((Pt&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}function yE(r,i){return ch(4,2,r,i)}function gE(r,i){return ch(4,4,r,i)}function mE(r,i){if(typeof i=="function"){r=r();var u=i(r);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function bE(r,i,u){u=u!=null?u.concat([r]):null,ch(4,4,mE.bind(null,i,r),u)}function Wy(){}function AE(r,i){var u=mr();i=i===void 0?null:i;var d=u.memoizedState;return i!==null&&ky(i,d[1])?d[0]:(u.memoizedState=[r,i],r)}function wE(r,i){var u=mr();i=i===void 0?null:i;var d=u.memoizedState;if(i!==null&&ky(i,d[1]))return d[0];if(d=r(),na){He(!0);try{r()}finally{He(!1)}}return u.memoizedState=[d,i],d}function Xy(r,i,u){return u===void 0||(co&1073741824)!==0&&(Ft&261930)===0?r.memoizedState=i:(r.memoizedState=u,r=vS(),vt.lanes|=r,ls|=r,u)}function vE(r,i,u,d){return zn(u,i)?u:ou.current!==null?(r=Xy(r,u,d),zn(r,i)||(Er=!0),r):(co&42)===0||(co&1073741824)!==0&&(Ft&261930)===0?(Er=!0,r.memoizedState=u):(r=vS(),vt.lanes|=r,ls|=r,i)}function xE(r,i,u,d,m){var S=ae.p;ae.p=S!==0&&8>S?S:8;var V=X.T,ge={};X.T=ge,eg(r,!1,i,u);try{var Fe=m(),Me=X.S;if(Me!==null&&Me(ge,Fe),Fe!==null&&typeof Fe=="object"&&typeof Fe.then=="function"){var ze=Y8(Fe,d);Ml(r,i,ze,Yn(r))}else Ml(r,i,d,Yn(r))}catch(Ge){Ml(r,i,{then:function(){},status:"rejected",reason:Ge},Yn())}finally{ae.p=S,V!==null&&ge.types!==null&&(V.types=ge.types),X.T=V}}function e4(){}function Jy(r,i,u,d){if(r.tag!==5)throw Error(o(476));var m=EE(r).queue;xE(r,m,i,ye,u===null?e4:function(){return SE(r),u(d)})}function EE(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:ye},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:u},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function SE(r){var i=EE(r);i.next===null&&(i=r.alternate.memoizedState),Ml(r,i.next.queue,{},Yn())}function Zy(){return Wr(Wl)}function IE(){return mr().memoizedState}function _E(){return mr().memoizedState}function t4(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var u=Yn();r=ns(u);var d=is(i,r,u);d!==null&&(Fn(d,i,u),Fl(d,i,u)),i={cache:Fy()},r.payload=i;return}i=i.return}}function r4(r,i,u){var d=Yn();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fh(r)?FE(i,u):(u=my(r,i,u,d),u!==null&&(Fn(u,r,d),OE(u,i,d)))}function CE(r,i,u){var d=Yn();Ml(r,i,u,d)}function Ml(r,i,u,d){var m={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(fh(r))FE(i,m);else{var S=r.alternate;if(r.lanes===0&&(S===null||S.lanes===0)&&(S=i.lastRenderedReducer,S!==null))try{var V=i.lastRenderedState,ge=S(V,u);if(m.hasEagerState=!0,m.eagerState=ge,zn(ge,V))return Qf(r,i,m,0),Wt===null&&Hf(),!1}catch{}finally{}if(u=my(r,i,m,d),u!==null)return Fn(u,r,d),OE(u,i,d),!0}return!1}function eg(r,i,u,d){if(d={lane:2,revertLane:Rg(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},fh(r)){if(i)throw Error(o(479))}else i=my(r,u,d,2),i!==null&&Fn(i,r,2)}function fh(r){var i=r.alternate;return r===vt||i!==null&&i===vt}function FE(r,i){su=ih=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function OE(r,i,u){if((u&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,u|=d,i.lanes=u,Ze(r,u)}}var jl={readContext:Wr,use:ah,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useLayoutEffect:fr,useInsertionEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useSyncExternalStore:fr,useId:fr,useHostTransitionStatus:fr,useFormState:fr,useActionState:fr,useOptimistic:fr,useMemoCache:fr,useCacheRefresh:fr};jl.useEffectEvent=fr;var TE={readContext:Wr,use:ah,useCallback:function(r,i){return mn().memoizedState=[r,i===void 0?null:i],r},useContext:Wr,useEffect:dE,useImperativeHandle:function(r,i,u){u=u!=null?u.concat([r]):null,lh(4194308,4,mE.bind(null,i,r),u)},useLayoutEffect:function(r,i){return lh(4194308,4,r,i)},useInsertionEffect:function(r,i){lh(4,2,r,i)},useMemo:function(r,i){var u=mn();i=i===void 0?null:i;var d=r();if(na){He(!0);try{r()}finally{He(!1)}}return u.memoizedState=[d,i],d},useReducer:function(r,i,u){var d=mn();if(u!==void 0){var m=u(i);if(na){He(!0);try{u(i)}finally{He(!1)}}}else m=i;return d.memoizedState=d.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},d.queue=r,r=r.dispatch=r4.bind(null,vt,r),[d.memoizedState,r]},useRef:function(r){var i=mn();return r={current:r},i.memoizedState=r},useState:function(r){r=Ky(r);var i=r.queue,u=CE.bind(null,vt,i);return i.dispatch=u,[r.memoizedState,u]},useDebugValue:Wy,useDeferredValue:function(r,i){var u=mn();return Xy(u,r,i)},useTransition:function(){var r=Ky(!1);return r=xE.bind(null,vt,r.queue,!0,!1),mn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,u){var d=vt,m=mn();if(Mt){if(u===void 0)throw Error(o(407));u=u()}else{if(u=i(),Wt===null)throw Error(o(349));(Ft&127)!==0||Xx(d,i,u)}m.memoizedState=u;var S={value:u,getSnapshot:i};return m.queue=S,dE(Zx.bind(null,d,S,r),[r]),d.flags|=2048,uu(9,{destroy:void 0},Jx.bind(null,d,S,u,i),null),u},useId:function(){var r=mn(),i=Wt.identifierPrefix;if(Mt){var u=zi,d=$i;u=(d&~(1<<32-Ke(d)-1)).toString(32)+u,i="_"+i+"R_"+u,u=oh++,0<u&&(i+="H"+u.toString(32)),i+="_"}else u=V8++,i="_"+i+"r_"+u.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Zy,useFormState:uE,useActionState:uE,useOptimistic:function(r){var i=mn();i.memoizedState=i.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=eg.bind(null,vt,!0,u),u.dispatch=i,[r,i]},useMemoCache:Hy,useCacheRefresh:function(){return mn().memoizedState=t4.bind(null,vt)},useEffectEvent:function(r){var i=mn(),u={impl:r};return i.memoizedState=u,function(){if((Pt&2)!==0)throw Error(o(440));return u.impl.apply(void 0,arguments)}}},tg={readContext:Wr,use:ah,useCallback:AE,useContext:Wr,useEffect:Vy,useImperativeHandle:bE,useInsertionEffect:yE,useLayoutEffect:gE,useMemo:wE,useReducer:uh,useRef:hE,useState:function(){return uh(fo)},useDebugValue:Wy,useDeferredValue:function(r,i){var u=mr();return vE(u,Qt.memoizedState,r,i)},useTransition:function(){var r=uh(fo)[0],i=mr().memoizedState;return[typeof r=="boolean"?r:Rl(r),i]},useSyncExternalStore:Wx,useId:IE,useHostTransitionStatus:Zy,useFormState:lE,useActionState:lE,useOptimistic:function(r,i){var u=mr();return rE(u,Qt,r,i)},useMemoCache:Hy,useCacheRefresh:_E};tg.useEffectEvent=pE;var BE={readContext:Wr,use:ah,useCallback:AE,useContext:Wr,useEffect:Vy,useImperativeHandle:bE,useInsertionEffect:yE,useLayoutEffect:gE,useMemo:wE,useReducer:Gy,useRef:hE,useState:function(){return Gy(fo)},useDebugValue:Wy,useDeferredValue:function(r,i){var u=mr();return Qt===null?Xy(u,r,i):vE(u,Qt.memoizedState,r,i)},useTransition:function(){var r=Gy(fo)[0],i=mr().memoizedState;return[typeof r=="boolean"?r:Rl(r),i]},useSyncExternalStore:Wx,useId:IE,useHostTransitionStatus:Zy,useFormState:fE,useActionState:fE,useOptimistic:function(r,i){var u=mr();return Qt!==null?rE(u,Qt,r,i):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:Hy,useCacheRefresh:_E};BE.useEffectEvent=pE;function rg(r,i,u,d){i=r.memoizedState,u=u(d,i),u=u==null?i:y({},i,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ng={enqueueSetState:function(r,i,u){r=r._reactInternals;var d=Yn(),m=ns(d);m.payload=i,u!=null&&(m.callback=u),i=is(r,m,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var d=Yn(),m=ns(d);m.tag=1,m.payload=i,u!=null&&(m.callback=u),i=is(r,m,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=Yn(),d=ns(u);d.tag=2,i!=null&&(d.callback=i),i=is(r,d,u),i!==null&&(Fn(i,r,u),Fl(i,r,u))}};function RE(r,i,u,d,m,S,V){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,S,V):i.prototype&&i.prototype.isPureReactComponent?!wl(u,d)||!wl(m,S):!0}function ME(r,i,u,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,d),i.state!==r&&ng.enqueueReplaceState(i,i.state,null)}function ia(r,i){var u=i;if("ref"in i){u={};for(var d in i)d!=="ref"&&(u[d]=i[d])}if(r=r.defaultProps){u===i&&(u=y({},u));for(var m in r)u[m]===void 0&&(u[m]=r[m])}return u}function jE(r){qf(r)}function UE(r){console.error(r)}function NE(r){qf(r)}function hh(r,i){try{var u=r.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function DE(r,i,u){try{var d=r.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ig(r,i,u){return u=ns(u),u.tag=3,u.payload={element:null},u.callback=function(){hh(r,i)},u}function PE(r){return r=ns(r),r.tag=3,r}function kE(r,i,u,d){var m=u.type.getDerivedStateFromError;if(typeof m=="function"){var S=d.value;r.payload=function(){return m(S)},r.callback=function(){DE(i,u,d)}}var V=u.stateNode;V!==null&&typeof V.componentDidCatch=="function"&&(r.callback=function(){DE(i,u,d),typeof m!="function"&&(cs===null?cs=new Set([this]):cs.add(this));var ge=d.stack;this.componentDidCatch(d.value,{componentStack:ge!==null?ge:""})})}function n4(r,i,u,d,m){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=u.alternate,i!==null&&eu(i,u,m,!0),u=Hn.current,u!==null){switch(u.tag){case 31:case 13:return di===null?Sh():u.alternate===null&&hr===0&&(hr=3),u.flags&=-257,u.flags|=65536,u.lanes=m,d===Zf?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([d]):i.add(d),Og(r,d,m)),!1;case 22:return u.flags|=65536,d===Zf?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([d]):u.add(d)),Og(r,d,m)),!1}throw Error(o(435,u.tag))}return Og(r,d,m),Sh(),!1}if(Mt)return i=Hn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,d!==Ey&&(r=Error(o(422),{cause:d}),El(li(r,u)))):(d!==Ey&&(i=Error(o(423),{cause:d}),El(li(i,u))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,d=li(d,u),m=ig(r.stateNode,d,m),jy(r,m),hr!==4&&(hr=2)),!1;var S=Error(o(520),{cause:d});if(S=li(S,u),zl===null?zl=[S]:zl.push(S),hr!==4&&(hr=2),i===null)return!0;d=li(d,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,r=m&-m,u.lanes|=r,r=ig(u.stateNode,d,r),jy(u,r),!1;case 1:if(i=u.type,S=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(cs===null||!cs.has(S))))return u.flags|=65536,m&=-m,u.lanes|=m,m=PE(m),kE(m,r,u,d),jy(u,m),!1}u=u.return}while(u!==null);return!1}var og=Error(o(461)),Er=!1;function Xr(r,i,u,d){i.child=r===null?qx(i,null,u,d):ra(i,r.child,u,d)}function LE(r,i,u,d,m){u=u.render;var S=i.ref;if("ref"in d){var V={};for(var ge in d)ge!=="ref"&&(V[ge]=d[ge])}else V=d;return Js(i),d=Ly(r,i,u,V,S,m),ge=$y(),r!==null&&!Er?(zy(r,i,m),ho(r,i,m)):(Mt&&ge&&vy(i),i.flags|=1,Xr(r,i,d,m),i.child)}function $E(r,i,u,d,m){if(r===null){var S=u.type;return typeof S=="function"&&!by(S)&&S.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=S,zE(r,i,S,d,m)):(r=Kf(u.type,null,d,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(S=r.child,!dg(r,m)){var V=S.memoizedProps;if(u=u.compare,u=u!==null?u:wl,u(V,d)&&r.ref===i.ref)return ho(r,i,m)}return i.flags|=1,r=so(S,d),r.ref=i.ref,r.return=i,i.child=r}function zE(r,i,u,d,m){if(r!==null){var S=r.memoizedProps;if(wl(S,d)&&r.ref===i.ref)if(Er=!1,i.pendingProps=d=S,dg(r,m))(r.flags&131072)!==0&&(Er=!0);else return i.lanes=r.lanes,ho(r,i,m)}return sg(r,i,u,d,m)}function qE(r,i,u,d){var m=d.children,S=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(S=S!==null?S.baseLanes|u:u,r!==null){for(d=i.child=r.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;d=m&~S}else d=0,i.child=null;return HE(r,i,S,u,d)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Xf(i,S!==null?S.cachePool:null),S!==null?Gx(i,S):Ny(),Kx(i);else return d=i.lanes=536870912,HE(r,i,S!==null?S.baseLanes|u:u,u,d)}else S!==null?(Xf(i,S.cachePool),Gx(i,S),ss(),i.memoizedState=null):(r!==null&&Xf(i,null),Ny(),ss());return Xr(r,i,m,u),i.child}function Ul(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function HE(r,i,u,d,m){var S=Ty();return S=S===null?null:{parent:vr._currentValue,pool:S},i.memoizedState={baseLanes:u,cachePool:S},r!==null&&Xf(i,null),Ny(),Kx(i),r!==null&&eu(r,i,d,!0),i.childLanes=m,null}function dh(r,i){return i=yh({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function QE(r,i,u){return ra(i,r.child,null,u),r=dh(i,i.pendingProps),r.flags|=2,Qn(i),i.memoizedState=null,r}function i4(r,i,u){var d=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Mt){if(d.mode==="hidden")return r=dh(i,d),i.lanes=536870912,Ul(null,r);if(Py(i),(r=Zt)?(r=n2(r,hi),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Jo!==null?{id:$i,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=Fx(r),u.return=i,i.child=u,Vr=i,Zt=null)):r=null,r===null)throw es(i);return i.lanes=536870912,null}return dh(i,d)}var S=r.memoizedState;if(S!==null){var V=S.dehydrated;if(Py(i),m)if(i.flags&256)i.flags&=-257,i=QE(r,i,u);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(o(558));else if(Er||eu(r,i,u,!1),m=(u&r.childLanes)!==0,Er||m){if(d=Wt,d!==null&&(V=st(d,u),V!==0&&V!==S.retryLane))throw S.retryLane=V,Ys(r,V),Fn(d,r,V),og;Sh(),i=QE(r,i,u)}else r=S.treeContext,Zt=pi(V.nextSibling),Vr=i,Mt=!0,Zo=null,hi=!1,r!==null&&Bx(i,r),i=dh(i,d),i.flags|=4096;return i}return r=so(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function ph(r,i){var u=i.ref;if(u===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(o(284));(r===null||r.ref!==u)&&(i.flags|=4194816)}}function sg(r,i,u,d,m){return Js(i),u=Ly(r,i,u,d,void 0,m),d=$y(),r!==null&&!Er?(zy(r,i,m),ho(r,i,m)):(Mt&&d&&vy(i),i.flags|=1,Xr(r,i,u,m),i.child)}function GE(r,i,u,d,m,S){return Js(i),i.updateQueue=null,u=Vx(i,d,u,m),Yx(r),d=$y(),r!==null&&!Er?(zy(r,i,S),ho(r,i,S)):(Mt&&d&&vy(i),i.flags|=1,Xr(r,i,u,S),i.child)}function KE(r,i,u,d,m){if(Js(i),i.stateNode===null){var S=Wa,V=u.contextType;typeof V=="object"&&V!==null&&(S=Wr(V)),S=new u(d,S),i.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=ng,i.stateNode=S,S._reactInternals=i,S=i.stateNode,S.props=d,S.state=i.memoizedState,S.refs={},Ry(i),V=u.contextType,S.context=typeof V=="object"&&V!==null?Wr(V):Wa,S.state=i.memoizedState,V=u.getDerivedStateFromProps,typeof V=="function"&&(rg(i,u,V,d),S.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(V=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),V!==S.state&&ng.enqueueReplaceState(S,S.state,null),Tl(i,d,S,m),Ol(),S.state=i.memoizedState),typeof S.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){S=i.stateNode;var ge=i.memoizedProps,Fe=ia(u,ge);S.props=Fe;var Me=S.context,ze=u.contextType;V=Wa,typeof ze=="object"&&ze!==null&&(V=Wr(ze));var Ge=u.getDerivedStateFromProps;ze=typeof Ge=="function"||typeof S.getSnapshotBeforeUpdate=="function",ge=i.pendingProps!==ge,ze||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(ge||Me!==V)&&ME(i,S,d,V),rs=!1;var je=i.memoizedState;S.state=je,Tl(i,d,S,m),Ol(),Me=i.memoizedState,ge||je!==Me||rs?(typeof Ge=="function"&&(rg(i,u,Ge,d),Me=i.memoizedState),(Fe=rs||RE(i,u,Fe,d,je,Me,V))?(ze||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(i.flags|=4194308)):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=Me),S.props=d,S.state=Me,S.context=V,d=Fe):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{S=i.stateNode,My(r,i),V=i.memoizedProps,ze=ia(u,V),S.props=ze,Ge=i.pendingProps,je=S.context,Me=u.contextType,Fe=Wa,typeof Me=="object"&&Me!==null&&(Fe=Wr(Me)),ge=u.getDerivedStateFromProps,(Me=typeof ge=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(V!==Ge||je!==Fe)&&ME(i,S,d,Fe),rs=!1,je=i.memoizedState,S.state=je,Tl(i,d,S,m),Ol();var De=i.memoizedState;V!==Ge||je!==De||rs||r!==null&&r.dependencies!==null&&Vf(r.dependencies)?(typeof ge=="function"&&(rg(i,u,ge,d),De=i.memoizedState),(ze=rs||RE(i,u,ze,d,je,De,Fe)||r!==null&&r.dependencies!==null&&Vf(r.dependencies))?(Me||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,De,Fe),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,De,Fe)),typeof S.componentDidUpdate=="function"&&(i.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof S.componentDidUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=De),S.props=d,S.state=De,S.context=Fe,d=ze):(typeof S.componentDidUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=1024),d=!1)}return S=d,ph(r,i),d=(i.flags&128)!==0,S||d?(S=i.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:S.render(),i.flags|=1,r!==null&&d?(i.child=ra(i,r.child,null,m),i.child=ra(i,null,u,m)):Xr(r,i,u,m),i.memoizedState=S.state,r=i.child):r=ho(r,i,m),r}function YE(r,i,u,d){return Ws(),i.flags|=256,Xr(r,i,u,d),i.child}var ag={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ug(r){return{baseLanes:r,cachePool:Dx()}}function lg(r,i,u){return r=r!==null?r.childLanes&~u:0,i&&(r|=Kn),r}function VE(r,i,u){var d=i.pendingProps,m=!1,S=(i.flags&128)!==0,V;if((V=S)||(V=r!==null&&r.memoizedState===null?!1:(gr.current&2)!==0),V&&(m=!0,i.flags&=-129),V=(i.flags&32)!==0,i.flags&=-33,r===null){if(Mt){if(m?os(i):ss(),(r=Zt)?(r=n2(r,hi),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Jo!==null?{id:$i,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=Fx(r),u.return=i,i.child=u,Vr=i,Zt=null)):r=null,r===null)throw es(i);return Qg(r)?i.lanes=32:i.lanes=536870912,null}var ge=d.children;return d=d.fallback,m?(ss(),m=i.mode,ge=yh({mode:"hidden",children:ge},m),d=Vs(d,m,u,null),ge.return=i,d.return=i,ge.sibling=d,i.child=ge,d=i.child,d.memoizedState=ug(u),d.childLanes=lg(r,V,u),i.memoizedState=ag,Ul(null,d)):(os(i),cg(i,ge))}var Fe=r.memoizedState;if(Fe!==null&&(ge=Fe.dehydrated,ge!==null)){if(S)i.flags&256?(os(i),i.flags&=-257,i=fg(r,i,u)):i.memoizedState!==null?(ss(),i.child=r.child,i.flags|=128,i=null):(ss(),ge=d.fallback,m=i.mode,d=yh({mode:"visible",children:d.children},m),ge=Vs(ge,m,u,null),ge.flags|=2,d.return=i,ge.return=i,d.sibling=ge,i.child=d,ra(i,r.child,null,u),d=i.child,d.memoizedState=ug(u),d.childLanes=lg(r,V,u),i.memoizedState=ag,i=Ul(null,d));else if(os(i),Qg(ge)){if(V=ge.nextSibling&&ge.nextSibling.dataset,V)var Me=V.dgst;V=Me,d=Error(o(419)),d.stack="",d.digest=V,El({value:d,source:null,stack:null}),i=fg(r,i,u)}else if(Er||eu(r,i,u,!1),V=(u&r.childLanes)!==0,Er||V){if(V=Wt,V!==null&&(d=st(V,u),d!==0&&d!==Fe.retryLane))throw Fe.retryLane=d,Ys(r,d),Fn(V,r,d),og;Hg(ge)||Sh(),i=fg(r,i,u)}else Hg(ge)?(i.flags|=192,i.child=r.child,i=null):(r=Fe.treeContext,Zt=pi(ge.nextSibling),Vr=i,Mt=!0,Zo=null,hi=!1,r!==null&&Bx(i,r),i=cg(i,d.children),i.flags|=4096);return i}return m?(ss(),ge=d.fallback,m=i.mode,Fe=r.child,Me=Fe.sibling,d=so(Fe,{mode:"hidden",children:d.children}),d.subtreeFlags=Fe.subtreeFlags&65011712,Me!==null?ge=so(Me,ge):(ge=Vs(ge,m,u,null),ge.flags|=2),ge.return=i,d.return=i,d.sibling=ge,i.child=d,Ul(null,d),d=i.child,ge=r.child.memoizedState,ge===null?ge=ug(u):(m=ge.cachePool,m!==null?(Fe=vr._currentValue,m=m.parent!==Fe?{parent:Fe,pool:Fe}:m):m=Dx(),ge={baseLanes:ge.baseLanes|u,cachePool:m}),d.memoizedState=ge,d.childLanes=lg(r,V,u),i.memoizedState=ag,Ul(r.child,d)):(os(i),u=r.child,r=u.sibling,u=so(u,{mode:"visible",children:d.children}),u.return=i,u.sibling=null,r!==null&&(V=i.deletions,V===null?(i.deletions=[r],i.flags|=16):V.push(r)),i.child=u,i.memoizedState=null,u)}function cg(r,i){return i=yh({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function yh(r,i){return r=qn(22,r,null,i),r.lanes=0,r}function fg(r,i,u){return ra(i,r.child,null,u),r=cg(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function WE(r,i,u){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),_y(r.return,i,u)}function hg(r,i,u,d,m,S){var V=r.memoizedState;V===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:m,treeForkCount:S}:(V.isBackwards=i,V.rendering=null,V.renderingStartTime=0,V.last=d,V.tail=u,V.tailMode=m,V.treeForkCount=S)}function XE(r,i,u){var d=i.pendingProps,m=d.revealOrder,S=d.tail;d=d.children;var V=gr.current,ge=(V&2)!==0;if(ge?(V=V&1|2,i.flags|=128):V&=1,K(gr,V),Xr(r,i,d,u),d=Mt?xl:0,!ge&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&WE(r,u,i);else if(r.tag===19)WE(r,u,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(u=i.child,m=null;u!==null;)r=u.alternate,r!==null&&nh(r)===null&&(m=u),u=u.sibling;u=m,u===null?(m=i.child,i.child=null):(m=u.sibling,u.sibling=null),hg(i,!1,m,u,S,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&nh(r)===null){i.child=m;break}r=m.sibling,m.sibling=u,u=m,m=r}hg(i,!0,u,null,S,d);break;case"together":hg(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function ho(r,i,u){if(r!==null&&(i.dependencies=r.dependencies),ls|=i.lanes,(u&i.childLanes)===0)if(r!==null){if(eu(r,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(o(153));if(i.child!==null){for(r=i.child,u=so(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=so(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function dg(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Vf(r)))}function o4(r,i,u){switch(i.tag){case 3:ne(i,i.stateNode.containerInfo),ts(i,vr,r.memoizedState.cache),Ws();break;case 27:case 5:O(i);break;case 4:ne(i,i.stateNode.containerInfo);break;case 10:ts(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Py(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(os(i),i.flags|=128,null):(u&i.child.childLanes)!==0?VE(r,i,u):(os(i),r=ho(r,i,u),r!==null?r.sibling:null);os(i);break;case 19:var m=(r.flags&128)!==0;if(d=(u&i.childLanes)!==0,d||(eu(r,i,u,!1),d=(u&i.childLanes)!==0),m){if(d)return XE(r,i,u);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),K(gr,gr.current),d)break;return null;case 22:return i.lanes=0,qE(r,i,u,i.pendingProps);case 24:ts(i,vr,r.memoizedState.cache)}return ho(r,i,u)}function JE(r,i,u){if(r!==null)if(r.memoizedProps!==i.pendingProps)Er=!0;else{if(!dg(r,u)&&(i.flags&128)===0)return Er=!1,o4(r,i,u);Er=(r.flags&131072)!==0}else Er=!1,Mt&&(i.flags&1048576)!==0&&Tx(i,xl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=ea(i.elementType),i.type=r,typeof r=="function")by(r)?(d=ia(r,d),i.tag=1,i=KE(null,i,r,d,u)):(i.tag=0,i=sg(null,i,r,d,u));else{if(r!=null){var m=r.$$typeof;if(m===M){i.tag=11,i=LE(null,i,r,d,u);break e}else if(m===L){i.tag=14,i=$E(null,i,r,d,u);break e}}throw i=re(r)||r,Error(o(306,i,""))}}return i;case 0:return sg(r,i,i.type,i.pendingProps,u);case 1:return d=i.type,m=ia(d,i.pendingProps),KE(r,i,d,m,u);case 3:e:{if(ne(i,i.stateNode.containerInfo),r===null)throw Error(o(387));d=i.pendingProps;var S=i.memoizedState;m=S.element,My(r,i),Tl(i,d,null,u);var V=i.memoizedState;if(d=V.cache,ts(i,vr,d),d!==S.cache&&Cy(i,[vr],u,!0),Ol(),d=V.element,S.isDehydrated)if(S={element:d,isDehydrated:!1,cache:V.cache},i.updateQueue.baseState=S,i.memoizedState=S,i.flags&256){i=YE(r,i,d,u);break e}else if(d!==m){m=li(Error(o(424)),i),El(m),i=YE(r,i,d,u);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Zt=pi(r.firstChild),Vr=i,Mt=!0,Zo=null,hi=!0,u=qx(i,null,d,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Ws(),d===m){i=ho(r,i,u);break e}Xr(r,i,d,u)}i=i.child}return i;case 26:return ph(r,i),r===null?(u=l2(i.type,null,i.pendingProps,null))?i.memoizedState=u:Mt||(u=i.type,r=i.pendingProps,d=Bh(fe.current).createElement(u),d[Ht]=i,d[nr]=r,Jr(d,u,r),ur(d),i.stateNode=d):i.memoizedState=l2(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return O(i),r===null&&Mt&&(d=i.stateNode=s2(i.type,i.pendingProps,fe.current),Vr=i,hi=!0,m=Zt,ps(i.type)?(Gg=m,Zt=pi(d.firstChild)):Zt=m),Xr(r,i,i.pendingProps.children,u),ph(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Mt&&((m=d=Zt)&&(d=U4(d,i.type,i.pendingProps,hi),d!==null?(i.stateNode=d,Vr=i,Zt=pi(d.firstChild),hi=!1,m=!0):m=!1),m||es(i)),O(i),m=i.type,S=i.pendingProps,V=r!==null?r.memoizedProps:null,d=S.children,$g(m,S)?d=null:V!==null&&$g(m,V)&&(i.flags|=32),i.memoizedState!==null&&(m=Ly(r,i,W8,null,null,u),Wl._currentValue=m),ph(r,i),Xr(r,i,d,u),i.child;case 6:return r===null&&Mt&&((r=u=Zt)&&(u=N4(u,i.pendingProps,hi),u!==null?(i.stateNode=u,Vr=i,Zt=null,r=!0):r=!1),r||es(i)),null;case 13:return VE(r,i,u);case 4:return ne(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=ra(i,null,d,u):Xr(r,i,d,u),i.child;case 11:return LE(r,i,i.type,i.pendingProps,u);case 7:return Xr(r,i,i.pendingProps,u),i.child;case 8:return Xr(r,i,i.pendingProps.children,u),i.child;case 12:return Xr(r,i,i.pendingProps.children,u),i.child;case 10:return d=i.pendingProps,ts(i,i.type,d.value),Xr(r,i,d.children,u),i.child;case 9:return m=i.type._context,d=i.pendingProps.children,Js(i),m=Wr(m),d=d(m),i.flags|=1,Xr(r,i,d,u),i.child;case 14:return $E(r,i,i.type,i.pendingProps,u);case 15:return zE(r,i,i.type,i.pendingProps,u);case 19:return XE(r,i,u);case 31:return i4(r,i,u);case 22:return qE(r,i,u,i.pendingProps);case 24:return Js(i),d=Wr(vr),r===null?(m=Ty(),m===null&&(m=Wt,S=Fy(),m.pooledCache=S,S.refCount++,S!==null&&(m.pooledCacheLanes|=u),m=S),i.memoizedState={parent:d,cache:m},Ry(i),ts(i,vr,m)):((r.lanes&u)!==0&&(My(r,i),Tl(i,null,null,u),Ol()),m=r.memoizedState,S=i.memoizedState,m.parent!==d?(m={parent:d,cache:d},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),ts(i,vr,d)):(d=S.cache,ts(i,vr,d),d!==m.cache&&Cy(i,[vr],u,!0))),Xr(r,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function po(r){r.flags|=4}function pg(r,i,u,d,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(IS())r.flags|=8192;else throw ta=Zf,By}else r.flags&=-16777217}function ZE(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!p2(i))if(IS())r.flags|=8192;else throw ta=Zf,By}function gh(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Jt():536870912,r.lanes|=i,hu|=i)}function Nl(r,i){if(!Mt)switch(r.tailMode){case"hidden":i=r.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function er(r){var i=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(i)for(var m=r.child;m!==null;)u|=m.lanes|m.childLanes,d|=m.subtreeFlags&65011712,d|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)u|=m.lanes|m.childLanes,d|=m.subtreeFlags,d|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=d,r.childLanes=u,i}function s4(r,i,u){var d=i.pendingProps;switch(xy(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(i),null;case 1:return er(i),null;case 3:return u=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),lo(vr),J(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(Za(i)?po(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Sy())),er(i),null;case 26:var m=i.type,S=i.memoizedState;return r===null?(po(i),S!==null?(er(i),ZE(i,S)):(er(i),pg(i,m,null,d,u))):S?S!==r.memoizedState?(po(i),er(i),ZE(i,S)):(er(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&po(i),er(i),pg(i,m,r,d,u)),null;case 27:if(H(i),u=fe.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&po(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return er(i),null}r=W.current,Za(i)?Rx(i):(r=s2(m,d,u),i.stateNode=r,po(i))}return er(i),null;case 5:if(H(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&po(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return er(i),null}if(S=W.current,Za(i))Rx(i);else{var V=Bh(fe.current);switch(S){case 1:S=V.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:S=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":S=V.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":S=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":S=V.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof d.is=="string"?V.createElement("select",{is:d.is}):V.createElement("select"),d.multiple?S.multiple=!0:d.size&&(S.size=d.size);break;default:S=typeof d.is=="string"?V.createElement(m,{is:d.is}):V.createElement(m)}}S[Ht]=i,S[nr]=d;e:for(V=i.child;V!==null;){if(V.tag===5||V.tag===6)S.appendChild(V.stateNode);else if(V.tag!==4&&V.tag!==27&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===i)break e;for(;V.sibling===null;){if(V.return===null||V.return===i)break e;V=V.return}V.sibling.return=V.return,V=V.sibling}i.stateNode=S;e:switch(Jr(S,m,d),m){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&po(i)}}return er(i),pg(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,u),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&po(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(o(166));if(r=fe.current,Za(i)){if(r=i.stateNode,u=i.memoizedProps,d=null,m=Vr,m!==null)switch(m.tag){case 27:case 5:d=m.memoizedProps}r[Ht]=i,r=!!(r.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||VS(r.nodeValue,u)),r||es(i,!0)}else r=Bh(r).createTextNode(d),r[Ht]=i,i.stateNode=r}return er(i),null;case 31:if(u=i.memoizedState,r===null||r.memoizedState!==null){if(d=Za(i),u!==null){if(r===null){if(!d)throw Error(o(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(557));r[Ht]=i}else Ws(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),r=!1}else u=Sy(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return i.flags&256?(Qn(i),i):(Qn(i),null);if((i.flags&128)!==0)throw Error(o(558))}return er(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Za(i),d!==null&&d.dehydrated!==null){if(r===null){if(!m)throw Error(o(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Ht]=i}else Ws(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),m=!1}else m=Sy(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Qn(i),i):(Qn(i),null)}return Qn(i),(i.flags&128)!==0?(i.lanes=u,i):(u=d!==null,r=r!==null&&r.memoizedState!==null,u&&(d=i.child,m=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(m=d.alternate.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==m&&(d.flags|=2048)),u!==r&&u&&(i.child.flags|=8192),gh(i,i.updateQueue),er(i),null);case 4:return J(),r===null&&Ng(i.stateNode.containerInfo),er(i),null;case 10:return lo(i.type),er(i),null;case 19:if(Q(gr),d=i.memoizedState,d===null)return er(i),null;if(m=(i.flags&128)!==0,S=d.rendering,S===null)if(m)Nl(d,!1);else{if(hr!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(S=nh(r),S!==null){for(i.flags|=128,Nl(d,!1),r=S.updateQueue,i.updateQueue=r,gh(i,r),i.subtreeFlags=0,r=u,u=i.child;u!==null;)Cx(u,r),u=u.sibling;return K(gr,gr.current&1|2),Mt&&ao(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&de()>vh&&(i.flags|=128,m=!0,Nl(d,!1),i.lanes=4194304)}else{if(!m)if(r=nh(S),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,gh(i,r),Nl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!S.alternate&&!Mt)return er(i),null}else 2*de()-d.renderingStartTime>vh&&u!==536870912&&(i.flags|=128,m=!0,Nl(d,!1),i.lanes=4194304);d.isBackwards?(S.sibling=i.child,i.child=S):(r=d.last,r!==null?r.sibling=S:i.child=S,d.last=S)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=de(),r.sibling=null,u=gr.current,K(gr,m?u&1|2:u&1),Mt&&ao(i,d.treeForkCount),r):(er(i),null);case 22:case 23:return Qn(i),Dy(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(u&536870912)!==0&&(i.flags&128)===0&&(er(i),i.subtreeFlags&6&&(i.flags|=8192)):er(i),u=i.updateQueue,u!==null&&gh(i,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==u&&(i.flags|=2048),r!==null&&Q(Zs),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),lo(vr),er(i),null;case 25:return null;case 30:return null}throw Error(o(156,i.tag))}function a4(r,i){switch(xy(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return lo(vr),J(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return H(i),null;case 31:if(i.memoizedState!==null){if(Qn(i),i.alternate===null)throw Error(o(340));Ws()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Qn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(o(340));Ws()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Q(gr),null;case 4:return J(),null;case 10:return lo(i.type),null;case 22:case 23:return Qn(i),Dy(),r!==null&&Q(Zs),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return lo(vr),null;case 25:return null;default:return null}}function eS(r,i){switch(xy(i),i.tag){case 3:lo(vr),J();break;case 26:case 27:case 5:H(i);break;case 4:J();break;case 31:i.memoizedState!==null&&Qn(i);break;case 13:Qn(i);break;case 19:Q(gr);break;case 10:lo(i.type);break;case 22:case 23:Qn(i),Dy(),r!==null&&Q(Zs);break;case 24:lo(vr)}}function Dl(r,i){try{var u=i.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var m=d.next;u=m;do{if((u.tag&r)===r){d=void 0;var S=u.create,V=u.inst;d=S(),V.destroy=d}u=u.next}while(u!==m)}}catch(ge){Lt(i,i.return,ge)}}function as(r,i,u){try{var d=i.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var S=m.next;d=S;do{if((d.tag&r)===r){var V=d.inst,ge=V.destroy;if(ge!==void 0){V.destroy=void 0,m=i;var Fe=u,Me=ge;try{Me()}catch(ze){Lt(m,Fe,ze)}}}d=d.next}while(d!==S)}}catch(ze){Lt(i,i.return,ze)}}function tS(r){var i=r.updateQueue;if(i!==null){var u=r.stateNode;try{Qx(i,u)}catch(d){Lt(r,r.return,d)}}}function rS(r,i,u){u.props=ia(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(d){Lt(r,i,d)}}function Pl(r,i){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof u=="function"?r.refCleanup=u(d):u.current=d}}catch(m){Lt(r,i,m)}}function qi(r,i){var u=r.ref,d=r.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(m){Lt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(m){Lt(r,i,m)}else u.current=null}function nS(r){var i=r.type,u=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(m){Lt(r,r.return,m)}}function yg(r,i,u){try{var d=r.stateNode;O4(d,r.type,u,i),d[nr]=i}catch(m){Lt(r,r.return,m)}}function iS(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ps(r.type)||r.tag===4}function gg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||iS(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&ps(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function mg(r,i,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(r),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=io));else if(d!==4&&(d===27&&ps(r.type)&&(u=r.stateNode,i=null),r=r.child,r!==null))for(mg(r,i,u),r=r.sibling;r!==null;)mg(r,i,u),r=r.sibling}function mh(r,i,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?u.insertBefore(r,i):u.appendChild(r);else if(d!==4&&(d===27&&ps(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(mh(r,i,u),r=r.sibling;r!==null;)mh(r,i,u),r=r.sibling}function oS(r){var i=r.stateNode,u=r.memoizedProps;try{for(var d=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Jr(i,d,u),i[Ht]=r,i[nr]=u}catch(S){Lt(r,r.return,S)}}var yo=!1,Sr=!1,bg=!1,sS=typeof WeakSet=="function"?WeakSet:Set,Lr=null;function u4(r,i){if(r=r.containerInfo,kg=Ph,r=mx(r),fy(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var m=d.anchorOffset,S=d.focusNode;d=d.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break e}var V=0,ge=-1,Fe=-1,Me=0,ze=0,Ge=r,je=null;t:for(;;){for(var De;Ge!==u||m!==0&&Ge.nodeType!==3||(ge=V+m),Ge!==S||d!==0&&Ge.nodeType!==3||(Fe=V+d),Ge.nodeType===3&&(V+=Ge.nodeValue.length),(De=Ge.firstChild)!==null;)je=Ge,Ge=De;for(;;){if(Ge===r)break t;if(je===u&&++Me===m&&(ge=V),je===S&&++ze===d&&(Fe=V),(De=Ge.nextSibling)!==null)break;Ge=je,je=Ge.parentNode}Ge=De}u=ge===-1||Fe===-1?null:{start:ge,end:Fe}}else u=null}u=u||{start:0,end:0}}else u=null;for(Lg={focusedElem:r,selectionRange:u},Ph=!1,Lr=i;Lr!==null;)if(i=Lr,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Lr=r;else for(;Lr!==null;){switch(i=Lr,S=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)m=r[u],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&S!==null){r=void 0,u=i,m=S.memoizedProps,S=S.memoizedState,d=u.stateNode;try{var ut=ia(u.type,m);r=d.getSnapshotBeforeUpdate(ut,S),d.__reactInternalSnapshotBeforeUpdate=r}catch(mt){Lt(u,u.return,mt)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,u=r.nodeType,u===9)qg(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":qg(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=i.sibling,r!==null){r.return=i.return,Lr=r;break}Lr=i.return}}function aS(r,i,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:mo(r,u),d&4&&Dl(5,u);break;case 1:if(mo(r,u),d&4)if(r=u.stateNode,i===null)try{r.componentDidMount()}catch(V){Lt(u,u.return,V)}else{var m=ia(u.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(V){Lt(u,u.return,V)}}d&64&&tS(u),d&512&&Pl(u,u.return);break;case 3:if(mo(r,u),d&64&&(r=u.updateQueue,r!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{Qx(r,i)}catch(V){Lt(u,u.return,V)}}break;case 27:i===null&&d&4&&oS(u);case 26:case 5:mo(r,u),i===null&&d&4&&nS(u),d&512&&Pl(u,u.return);break;case 12:mo(r,u);break;case 31:mo(r,u),d&4&&cS(r,u);break;case 13:mo(r,u),d&4&&fS(r,u),d&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=m4.bind(null,u),D4(r,u))));break;case 22:if(d=u.memoizedState!==null||yo,!d){i=i!==null&&i.memoizedState!==null||Sr,m=yo;var S=Sr;yo=d,(Sr=i)&&!S?bo(r,u,(u.subtreeFlags&8772)!==0):mo(r,u),yo=m,Sr=S}break;case 30:break;default:mo(r,u)}}function uS(r){var i=r.alternate;i!==null&&(r.alternate=null,uS(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Wo(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var ir=null,Sn=!1;function go(r,i,u){for(u=u.child;u!==null;)lS(r,i,u),u=u.sibling}function lS(r,i,u){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(we,u)}catch{}switch(u.tag){case 26:Sr||qi(u,i),go(r,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Sr||qi(u,i);var d=ir,m=Sn;ps(u.type)&&(ir=u.stateNode,Sn=!1),go(r,i,u),Kl(u.stateNode),ir=d,Sn=m;break;case 5:Sr||qi(u,i);case 6:if(d=ir,m=Sn,ir=null,go(r,i,u),ir=d,Sn=m,ir!==null)if(Sn)try{(ir.nodeType===9?ir.body:ir.nodeName==="HTML"?ir.ownerDocument.body:ir).removeChild(u.stateNode)}catch(S){Lt(u,i,S)}else try{ir.removeChild(u.stateNode)}catch(S){Lt(u,i,S)}break;case 18:ir!==null&&(Sn?(r=ir,t2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),wu(r)):t2(ir,u.stateNode));break;case 4:d=ir,m=Sn,ir=u.stateNode.containerInfo,Sn=!0,go(r,i,u),ir=d,Sn=m;break;case 0:case 11:case 14:case 15:as(2,u,i),Sr||as(4,u,i),go(r,i,u);break;case 1:Sr||(qi(u,i),d=u.stateNode,typeof d.componentWillUnmount=="function"&&rS(u,i,d)),go(r,i,u);break;case 21:go(r,i,u);break;case 22:Sr=(d=Sr)||u.memoizedState!==null,go(r,i,u),Sr=d;break;default:go(r,i,u)}}function cS(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{wu(r)}catch(u){Lt(i,i.return,u)}}}function fS(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{wu(r)}catch(u){Lt(i,i.return,u)}}function l4(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new sS),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new sS),i;default:throw Error(o(435,r.tag))}}function bh(r,i){var u=l4(r);i.forEach(function(d){if(!u.has(d)){u.add(d);var m=b4.bind(null,r,d);d.then(m,m)}})}function In(r,i){var u=i.deletions;if(u!==null)for(var d=0;d<u.length;d++){var m=u[d],S=r,V=i,ge=V;e:for(;ge!==null;){switch(ge.tag){case 27:if(ps(ge.type)){ir=ge.stateNode,Sn=!1;break e}break;case 5:ir=ge.stateNode,Sn=!1;break e;case 3:case 4:ir=ge.stateNode.containerInfo,Sn=!0;break e}ge=ge.return}if(ir===null)throw Error(o(160));lS(S,V,m),ir=null,Sn=!1,S=m.alternate,S!==null&&(S.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)hS(i,r),i=i.sibling}var _i=null;function hS(r,i){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:In(i,r),_n(r),d&4&&(as(3,r,r.return),Dl(3,r),as(5,r,r.return));break;case 1:In(i,r),_n(r),d&512&&(Sr||u===null||qi(u,u.return)),d&64&&yo&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var m=_i;if(In(i,r),_n(r),d&512&&(Sr||u===null||qi(u,u.return)),d&4){var S=u!==null?u.memoizedState:null;if(d=r.memoizedState,u===null)if(d===null)if(r.stateNode===null){e:{d=r.type,u=r.memoizedProps,m=m.ownerDocument||m;t:switch(d){case"title":S=m.getElementsByTagName("title")[0],(!S||S[wr]||S[Ht]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=m.createElement(d),m.head.insertBefore(S,m.querySelector("head > title"))),Jr(S,d,u),S[Ht]=r,ur(S),d=S;break e;case"link":var V=h2("link","href",m).get(d+(u.href||""));if(V){for(var ge=0;ge<V.length;ge++)if(S=V[ge],S.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&S.getAttribute("rel")===(u.rel==null?null:u.rel)&&S.getAttribute("title")===(u.title==null?null:u.title)&&S.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){V.splice(ge,1);break t}}S=m.createElement(d),Jr(S,d,u),m.head.appendChild(S);break;case"meta":if(V=h2("meta","content",m).get(d+(u.content||""))){for(ge=0;ge<V.length;ge++)if(S=V[ge],S.getAttribute("content")===(u.content==null?null:""+u.content)&&S.getAttribute("name")===(u.name==null?null:u.name)&&S.getAttribute("property")===(u.property==null?null:u.property)&&S.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&S.getAttribute("charset")===(u.charSet==null?null:u.charSet)){V.splice(ge,1);break t}}S=m.createElement(d),Jr(S,d,u),m.head.appendChild(S);break;default:throw Error(o(468,d))}S[Ht]=r,ur(S),d=S}r.stateNode=d}else d2(m,r.type,r.stateNode);else r.stateNode=f2(m,d,r.memoizedProps);else S!==d?(S===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):S.count--,d===null?d2(m,r.type,r.stateNode):f2(m,d,r.memoizedProps)):d===null&&r.stateNode!==null&&yg(r,r.memoizedProps,u.memoizedProps)}break;case 27:In(i,r),_n(r),d&512&&(Sr||u===null||qi(u,u.return)),u!==null&&d&4&&yg(r,r.memoizedProps,u.memoizedProps);break;case 5:if(In(i,r),_n(r),d&512&&(Sr||u===null||qi(u,u.return)),r.flags&32){m=r.stateNode;try{qa(m,"")}catch(ut){Lt(r,r.return,ut)}}d&4&&r.stateNode!=null&&(m=r.memoizedProps,yg(r,m,u!==null?u.memoizedProps:m)),d&1024&&(bg=!0);break;case 6:if(In(i,r),_n(r),d&4){if(r.stateNode===null)throw Error(o(162));d=r.memoizedProps,u=r.stateNode;try{u.nodeValue=d}catch(ut){Lt(r,r.return,ut)}}break;case 3:if(jh=null,m=_i,_i=Rh(i.containerInfo),In(i,r),_i=m,_n(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{wu(i.containerInfo)}catch(ut){Lt(r,r.return,ut)}bg&&(bg=!1,dS(r));break;case 4:d=_i,_i=Rh(r.stateNode.containerInfo),In(i,r),_n(r),_i=d;break;case 12:In(i,r),_n(r);break;case 31:In(i,r),_n(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,bh(r,d)));break;case 13:In(i,r),_n(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(wh=de()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,bh(r,d)));break;case 22:m=r.memoizedState!==null;var Fe=u!==null&&u.memoizedState!==null,Me=yo,ze=Sr;if(yo=Me||m,Sr=ze||Fe,In(i,r),Sr=ze,yo=Me,_n(r),d&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(u===null||Fe||yo||Sr||oa(r)),u=null,i=r;;){if(i.tag===5||i.tag===26){if(u===null){Fe=u=i;try{if(S=Fe.stateNode,m)V=S.style,typeof V.setProperty=="function"?V.setProperty("display","none","important"):V.display="none";else{ge=Fe.stateNode;var Ge=Fe.memoizedProps.style,je=Ge!=null&&Ge.hasOwnProperty("display")?Ge.display:null;ge.style.display=je==null||typeof je=="boolean"?"":(""+je).trim()}}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===6){if(u===null){Fe=i;try{Fe.stateNode.nodeValue=m?"":Fe.memoizedProps}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===18){if(u===null){Fe=i;try{var De=Fe.stateNode;m?r2(De,!0):r2(Fe.stateNode,!1)}catch(ut){Lt(Fe,Fe.return,ut)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,bh(r,u))));break;case 19:In(i,r),_n(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,bh(r,d)));break;case 30:break;case 21:break;default:In(i,r),_n(r)}}function _n(r){var i=r.flags;if(i&2){try{for(var u,d=r.return;d!==null;){if(iS(d)){u=d;break}d=d.return}if(u==null)throw Error(o(160));switch(u.tag){case 27:var m=u.stateNode,S=gg(r);mh(r,S,m);break;case 5:var V=u.stateNode;u.flags&32&&(qa(V,""),u.flags&=-33);var ge=gg(r);mh(r,ge,V);break;case 3:case 4:var Fe=u.stateNode.containerInfo,Me=gg(r);mg(r,Me,Fe);break;default:throw Error(o(161))}}catch(ze){Lt(r,r.return,ze)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function dS(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;dS(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function mo(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)aS(r,i.alternate,i),i=i.sibling}function oa(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:as(4,i,i.return),oa(i);break;case 1:qi(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&rS(i,i.return,u),oa(i);break;case 27:Kl(i.stateNode);case 26:case 5:qi(i,i.return),oa(i);break;case 22:i.memoizedState===null&&oa(i);break;case 30:oa(i);break;default:oa(i)}r=r.sibling}}function bo(r,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,m=r,S=i,V=S.flags;switch(S.tag){case 0:case 11:case 15:bo(m,S,u),Dl(4,S);break;case 1:if(bo(m,S,u),d=S,m=d.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(Me){Lt(d,d.return,Me)}if(d=S,m=d.updateQueue,m!==null){var ge=d.stateNode;try{var Fe=m.shared.hiddenCallbacks;if(Fe!==null)for(m.shared.hiddenCallbacks=null,m=0;m<Fe.length;m++)Hx(Fe[m],ge)}catch(Me){Lt(d,d.return,Me)}}u&&V&64&&tS(S),Pl(S,S.return);break;case 27:oS(S);case 26:case 5:bo(m,S,u),u&&d===null&&V&4&&nS(S),Pl(S,S.return);break;case 12:bo(m,S,u);break;case 31:bo(m,S,u),u&&V&4&&cS(m,S);break;case 13:bo(m,S,u),u&&V&4&&fS(m,S);break;case 22:S.memoizedState===null&&bo(m,S,u),Pl(S,S.return);break;case 30:break;default:bo(m,S,u)}i=i.sibling}}function Ag(r,i){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&Sl(u))}function wg(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Sl(r))}function Ci(r,i,u,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pS(r,i,u,d),i=i.sibling}function pS(r,i,u,d){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Ci(r,i,u,d),m&2048&&Dl(9,i);break;case 1:Ci(r,i,u,d);break;case 3:Ci(r,i,u,d),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Sl(r)));break;case 12:if(m&2048){Ci(r,i,u,d),r=i.stateNode;try{var S=i.memoizedProps,V=S.id,ge=S.onPostCommit;typeof ge=="function"&&ge(V,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(Fe){Lt(i,i.return,Fe)}}else Ci(r,i,u,d);break;case 31:Ci(r,i,u,d);break;case 13:Ci(r,i,u,d);break;case 23:break;case 22:S=i.stateNode,V=i.alternate,i.memoizedState!==null?S._visibility&2?Ci(r,i,u,d):kl(r,i):S._visibility&2?Ci(r,i,u,d):(S._visibility|=2,lu(r,i,u,d,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Ag(V,i);break;case 24:Ci(r,i,u,d),m&2048&&wg(i.alternate,i);break;default:Ci(r,i,u,d)}}function lu(r,i,u,d,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var S=r,V=i,ge=u,Fe=d,Me=V.flags;switch(V.tag){case 0:case 11:case 15:lu(S,V,ge,Fe,m),Dl(8,V);break;case 23:break;case 22:var ze=V.stateNode;V.memoizedState!==null?ze._visibility&2?lu(S,V,ge,Fe,m):kl(S,V):(ze._visibility|=2,lu(S,V,ge,Fe,m)),m&&Me&2048&&Ag(V.alternate,V);break;case 24:lu(S,V,ge,Fe,m),m&&Me&2048&&wg(V.alternate,V);break;default:lu(S,V,ge,Fe,m)}i=i.sibling}}function kl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=r,d=i,m=d.flags;switch(d.tag){case 22:kl(u,d),m&2048&&Ag(d.alternate,d);break;case 24:kl(u,d),m&2048&&wg(d.alternate,d);break;default:kl(u,d)}i=i.sibling}}var Ll=8192;function cu(r,i,u){if(r.subtreeFlags&Ll)for(r=r.child;r!==null;)yS(r,i,u),r=r.sibling}function yS(r,i,u){switch(r.tag){case 26:cu(r,i,u),r.flags&Ll&&r.memoizedState!==null&&V4(u,_i,r.memoizedState,r.memoizedProps);break;case 5:cu(r,i,u);break;case 3:case 4:var d=_i;_i=Rh(r.stateNode.containerInfo),cu(r,i,u),_i=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Ll,Ll=16777216,cu(r,i,u),Ll=d):cu(r,i,u));break;default:cu(r,i,u)}}function gS(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function $l(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var d=i[u];Lr=d,bS(d,r)}gS(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mS(r),r=r.sibling}function mS(r){switch(r.tag){case 0:case 11:case 15:$l(r),r.flags&2048&&as(9,r,r.return);break;case 3:$l(r);break;case 12:$l(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Ah(r)):$l(r);break;default:$l(r)}}function Ah(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var d=i[u];Lr=d,bS(d,r)}gS(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:as(8,i,i.return),Ah(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,Ah(i));break;default:Ah(i)}r=r.sibling}}function bS(r,i){for(;Lr!==null;){var u=Lr;switch(u.tag){case 0:case 11:case 15:as(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Sl(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Lr=d;else e:for(u=r;Lr!==null;){d=Lr;var m=d.sibling,S=d.return;if(uS(d),d===u){Lr=null;break e}if(m!==null){m.return=S,Lr=m;break e}Lr=S}}}var c4={getCacheForType:function(r){var i=Wr(vr),u=i.data.get(r);return u===void 0&&(u=r(),i.data.set(r,u)),u},cacheSignal:function(){return Wr(vr).controller.signal}},f4=typeof WeakMap=="function"?WeakMap:Map,Pt=0,Wt=null,St=null,Ft=0,kt=0,Gn=null,us=!1,fu=!1,vg=!1,Ao=0,hr=0,ls=0,sa=0,xg=0,Kn=0,hu=0,zl=null,Cn=null,Eg=!1,wh=0,AS=0,vh=1/0,xh=null,cs=null,Ur=0,fs=null,du=null,wo=0,Sg=0,Ig=null,wS=null,ql=0,_g=null;function Yn(){return(Pt&2)!==0&&Ft!==0?Ft&-Ft:X.T!==null?Rg():Br()}function vS(){if(Kn===0)if((Ft&536870912)===0||Mt){var r=lt;lt<<=1,(lt&3932160)===0&&(lt=262144),Kn=r}else Kn=536870912;return r=Hn.current,r!==null&&(r.flags|=32),Kn}function Fn(r,i,u){(r===Wt&&(kt===2||kt===9)||r.cancelPendingCommit!==null)&&(pu(r,0),hs(r,Ft,Kn,!1)),be(r,u),((Pt&2)===0||r!==Wt)&&(r===Wt&&((Pt&2)===0&&(sa|=u),hr===4&&hs(r,Ft,Kn,!1)),Hi(r))}function xS(r,i,u){if((Pt&6)!==0)throw Error(o(327));var d=!u&&(i&127)===0&&(i&r.expiredLanes)===0||dt(r,i),m=d?p4(r,i):Fg(r,i,!0),S=d;do{if(m===0){fu&&!d&&hs(r,i,0,!1);break}else{if(u=r.current.alternate,S&&!h4(u)){m=Fg(r,i,!1),S=!1;continue}if(m===2){if(S=i,r.errorRecoveryDisabledLanes&S)var V=0;else V=r.pendingLanes&-536870913,V=V!==0?V:V&536870912?536870912:0;if(V!==0){i=V;e:{var ge=r;m=zl;var Fe=ge.current.memoizedState.isDehydrated;if(Fe&&(pu(ge,V).flags|=256),V=Fg(ge,V,!1),V!==2){if(vg&&!Fe){ge.errorRecoveryDisabledLanes|=S,sa|=S,m=4;break e}S=Cn,Cn=m,S!==null&&(Cn===null?Cn=S:Cn.push.apply(Cn,S))}m=V}if(S=!1,m!==2)continue}}if(m===1){pu(r,0),hs(r,i,0,!0);break}e:{switch(d=r,S=m,S){case 0:case 1:throw Error(o(345));case 4:if((i&4194048)!==i)break;case 6:hs(d,i,Kn,!us);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((i&62914560)===i&&(m=wh+300-de(),10<m)){if(hs(d,i,Kn,!us),ft(d,0,!0)!==0)break e;wo=i,d.timeoutHandle=ZS(ES.bind(null,d,u,Cn,xh,Eg,i,Kn,sa,hu,us,S,"Throttled",-0,0),m);break e}ES(d,u,Cn,xh,Eg,i,Kn,sa,hu,us,S,null,-0,0)}}break}while(!0);Hi(r)}function ES(r,i,u,d,m,S,V,ge,Fe,Me,ze,Ge,je,De){if(r.timeoutHandle=-1,Ge=i.subtreeFlags,Ge&8192||(Ge&16785408)===16785408){Ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:io},yS(i,S,Ge);var ut=(S&62914560)===S?wh-de():(S&4194048)===S?AS-de():0;if(ut=W4(Ge,ut),ut!==null){wo=S,r.cancelPendingCommit=ut(BS.bind(null,r,i,S,u,d,m,V,ge,Fe,ze,Ge,null,je,De)),hs(r,S,V,!Me);return}}BS(r,i,S,u,d,m,V,ge,Fe)}function h4(r){for(var i=r;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var m=u[d],S=m.getSnapshot;m=m.value;try{if(!zn(S(),m))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function hs(r,i,u,d){i&=~xg,i&=~sa,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var m=i;0<m;){var S=31-Ke(m),V=1<<S;d[S]=-1,m&=~V}u!==0&&Ye(r,u,i)}function Eh(){return(Pt&6)===0?(Hl(0),!1):!0}function Cg(){if(St!==null){if(kt===0)var r=St.return;else r=St,uo=Xs=null,qy(r),iu=null,_l=0,r=St;for(;r!==null;)eS(r.alternate,r),r=r.return;St=null}}function pu(r,i){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,R4(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),wo=0,Cg(),Wt=r,St=u=so(r.current,null),Ft=i,kt=0,Gn=null,us=!1,fu=dt(r,i),vg=!1,hu=Kn=xg=sa=ls=hr=0,Cn=zl=null,Eg=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var m=31-Ke(d),S=1<<m;i|=r[m],d&=~S}return Ao=i,Hf(),u}function SS(r,i){vt=null,X.H=jl,i===nu||i===Jf?(i=Lx(),kt=3):i===By?(i=Lx(),kt=4):kt=i===og?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Gn=i,St===null&&(hr=1,hh(r,li(i,r.current)))}function IS(){var r=Hn.current;return r===null?!0:(Ft&4194048)===Ft?di===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?r===di:!1}function _S(){var r=X.H;return X.H=jl,r===null?jl:r}function CS(){var r=X.A;return X.A=c4,r}function Sh(){hr=4,us||(Ft&4194048)!==Ft&&Hn.current!==null||(fu=!0),(ls&134217727)===0&&(sa&134217727)===0||Wt===null||hs(Wt,Ft,Kn,!1)}function Fg(r,i,u){var d=Pt;Pt|=2;var m=_S(),S=CS();(Wt!==r||Ft!==i)&&(xh=null,pu(r,i)),i=!1;var V=hr;e:do try{if(kt!==0&&St!==null){var ge=St,Fe=Gn;switch(kt){case 8:Cg(),V=6;break e;case 3:case 2:case 9:case 6:Hn.current===null&&(i=!0);var Me=kt;if(kt=0,Gn=null,yu(r,ge,Fe,Me),u&&fu){V=0;break e}break;default:Me=kt,kt=0,Gn=null,yu(r,ge,Fe,Me)}}d4(),V=hr;break}catch(ze){SS(r,ze)}while(!0);return i&&r.shellSuspendCounter++,uo=Xs=null,Pt=d,X.H=m,X.A=S,St===null&&(Wt=null,Ft=0,Hf()),V}function d4(){for(;St!==null;)FS(St)}function p4(r,i){var u=Pt;Pt|=2;var d=_S(),m=CS();Wt!==r||Ft!==i?(xh=null,vh=de()+500,pu(r,i)):fu=dt(r,i);e:do try{if(kt!==0&&St!==null){i=St;var S=Gn;t:switch(kt){case 1:kt=0,Gn=null,yu(r,i,S,1);break;case 2:case 9:if(Px(S)){kt=0,Gn=null,OS(i);break}i=function(){kt!==2&&kt!==9||Wt!==r||(kt=7),Hi(r)},S.then(i,i);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Px(S)?(kt=0,Gn=null,OS(i)):(kt=0,Gn=null,yu(r,i,S,7));break;case 5:var V=null;switch(St.tag){case 26:V=St.memoizedState;case 5:case 27:var ge=St;if(V?p2(V):ge.stateNode.complete){kt=0,Gn=null;var Fe=ge.sibling;if(Fe!==null)St=Fe;else{var Me=ge.return;Me!==null?(St=Me,Ih(Me)):St=null}break t}}kt=0,Gn=null,yu(r,i,S,5);break;case 6:kt=0,Gn=null,yu(r,i,S,6);break;case 8:Cg(),hr=6;break e;default:throw Error(o(462))}}y4();break}catch(ze){SS(r,ze)}while(!0);return uo=Xs=null,X.H=d,X.A=m,Pt=u,St!==null?0:(Wt=null,Ft=0,Hf(),hr)}function y4(){for(;St!==null&&!Se();)FS(St)}function FS(r){var i=JE(r.alternate,r,Ao);r.memoizedProps=r.pendingProps,i===null?Ih(r):St=i}function OS(r){var i=r,u=i.alternate;switch(i.tag){case 15:case 0:i=GE(u,i,i.pendingProps,i.type,void 0,Ft);break;case 11:i=GE(u,i,i.pendingProps,i.type.render,i.ref,Ft);break;case 5:qy(i);default:eS(u,i),i=St=Cx(i,Ao),i=JE(u,i,Ao)}r.memoizedProps=r.pendingProps,i===null?Ih(r):St=i}function yu(r,i,u,d){uo=Xs=null,qy(i),iu=null,_l=0;var m=i.return;try{if(n4(r,m,i,u,Ft)){hr=1,hh(r,li(u,r.current)),St=null;return}}catch(S){if(m!==null)throw St=m,S;hr=1,hh(r,li(u,r.current)),St=null;return}i.flags&32768?(Mt||d===1?r=!0:fu||(Ft&536870912)!==0?r=!1:(us=r=!0,(d===2||d===9||d===3||d===6)&&(d=Hn.current,d!==null&&d.tag===13&&(d.flags|=16384))),TS(i,r)):Ih(i)}function Ih(r){var i=r;do{if((i.flags&32768)!==0){TS(i,us);return}r=i.return;var u=s4(i.alternate,i,Ao);if(u!==null){St=u;return}if(i=i.sibling,i!==null){St=i;return}St=i=r}while(i!==null);hr===0&&(hr=5)}function TS(r,i){do{var u=a4(r.alternate,r);if(u!==null){u.flags&=32767,St=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(r=r.sibling,r!==null)){St=r;return}St=r=u}while(r!==null);hr=6,St=null}function BS(r,i,u,d,m,S,V,ge,Fe){r.cancelPendingCommit=null;do _h();while(Ur!==0);if((Pt&6)!==0)throw Error(o(327));if(i!==null){if(i===r.current)throw Error(o(177));if(S=i.lanes|i.childLanes,S|=gy,_e(r,u,S,V,ge,Fe),r===Wt&&(St=Wt=null,Ft=0),du=i,fs=r,wo=u,Sg=S,Ig=m,wS=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,A4(D,function(){return NS(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=X.T,X.T=null,m=ae.p,ae.p=2,V=Pt,Pt|=4;try{u4(r,i,u)}finally{Pt=V,ae.p=m,X.T=d}}Ur=1,RS(),MS(),jS()}}function RS(){if(Ur===1){Ur=0;var r=fs,i=du,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=X.T,X.T=null;var d=ae.p;ae.p=2;var m=Pt;Pt|=4;try{hS(i,r);var S=Lg,V=mx(r.containerInfo),ge=S.focusedElem,Fe=S.selectionRange;if(V!==ge&&ge&&ge.ownerDocument&&gx(ge.ownerDocument.documentElement,ge)){if(Fe!==null&&fy(ge)){var Me=Fe.start,ze=Fe.end;if(ze===void 0&&(ze=Me),"selectionStart"in ge)ge.selectionStart=Me,ge.selectionEnd=Math.min(ze,ge.value.length);else{var Ge=ge.ownerDocument||document,je=Ge&&Ge.defaultView||window;if(je.getSelection){var De=je.getSelection(),ut=ge.textContent.length,mt=Math.min(Fe.start,ut),Kt=Fe.end===void 0?mt:Math.min(Fe.end,ut);!De.extend&&mt>Kt&&(V=Kt,Kt=mt,mt=V);var Te=yx(ge,mt),Oe=yx(ge,Kt);if(Te&&Oe&&(De.rangeCount!==1||De.anchorNode!==Te.node||De.anchorOffset!==Te.offset||De.focusNode!==Oe.node||De.focusOffset!==Oe.offset)){var Re=Ge.createRange();Re.setStart(Te.node,Te.offset),De.removeAllRanges(),mt>Kt?(De.addRange(Re),De.extend(Oe.node,Oe.offset)):(Re.setEnd(Oe.node,Oe.offset),De.addRange(Re))}}}}for(Ge=[],De=ge;De=De.parentNode;)De.nodeType===1&&Ge.push({element:De,left:De.scrollLeft,top:De.scrollTop});for(typeof ge.focus=="function"&&ge.focus(),ge=0;ge<Ge.length;ge++){var Qe=Ge[ge];Qe.element.scrollLeft=Qe.left,Qe.element.scrollTop=Qe.top}}Ph=!!kg,Lg=kg=null}finally{Pt=m,ae.p=d,X.T=u}}r.current=i,Ur=2}}function MS(){if(Ur===2){Ur=0;var r=fs,i=du,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=X.T,X.T=null;var d=ae.p;ae.p=2;var m=Pt;Pt|=4;try{aS(r,i.alternate,i)}finally{Pt=m,ae.p=d,X.T=u}}Ur=3}}function jS(){if(Ur===4||Ur===3){Ur=0,Be();var r=fs,i=du,u=wo,d=wS;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Ur=5:(Ur=0,du=fs=null,US(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(cs=null),rr(u),i=i.stateNode,Ie&&typeof Ie.onCommitFiberRoot=="function")try{Ie.onCommitFiberRoot(we,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=X.T,m=ae.p,ae.p=2,X.T=null;try{for(var S=r.onRecoverableError,V=0;V<d.length;V++){var ge=d[V];S(ge.value,{componentStack:ge.stack})}}finally{X.T=i,ae.p=m}}(wo&3)!==0&&_h(),Hi(r),m=r.pendingLanes,(u&261930)!==0&&(m&42)!==0?r===_g?ql++:(ql=0,_g=r):ql=0,Hl(0)}}function US(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Sl(i)))}function _h(){return RS(),MS(),jS(),NS()}function NS(){if(Ur!==5)return!1;var r=fs,i=Sg;Sg=0;var u=rr(wo),d=X.T,m=ae.p;try{ae.p=32>u?32:u,X.T=null,u=Ig,Ig=null;var S=fs,V=wo;if(Ur=0,du=fs=null,wo=0,(Pt&6)!==0)throw Error(o(331));var ge=Pt;if(Pt|=4,mS(S.current),pS(S,S.current,V,u),Pt=ge,Hl(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot=="function")try{Ie.onPostCommitFiberRoot(we,S)}catch{}return!0}finally{ae.p=m,X.T=d,US(r,i)}}function DS(r,i,u){i=li(u,i),i=ig(r.stateNode,i,2),r=is(r,i,2),r!==null&&(be(r,2),Hi(r))}function Lt(r,i,u){if(r.tag===3)DS(r,r,u);else for(;i!==null;){if(i.tag===3){DS(i,r,u);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(cs===null||!cs.has(d))){r=li(u,r),u=PE(2),d=is(i,u,2),d!==null&&(kE(u,d,i,r),be(d,2),Hi(d));break}}i=i.return}}function Og(r,i,u){var d=r.pingCache;if(d===null){d=r.pingCache=new f4;var m=new Set;d.set(i,m)}else m=d.get(i),m===void 0&&(m=new Set,d.set(i,m));m.has(u)||(vg=!0,m.add(u),r=g4.bind(null,r,i,u),i.then(r,r))}function g4(r,i,u){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Wt===r&&(Ft&u)===u&&(hr===4||hr===3&&(Ft&62914560)===Ft&&300>de()-wh?(Pt&2)===0&&pu(r,0):xg|=u,hu===Ft&&(hu=0)),Hi(r)}function PS(r,i){i===0&&(i=Jt()),r=Ys(r,i),r!==null&&(be(r,i),Hi(r))}function m4(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),PS(r,u)}function b4(r,i){var u=0;switch(r.tag){case 31:case 13:var d=r.stateNode,m=r.memoizedState;m!==null&&(u=m.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(o(314))}d!==null&&d.delete(i),PS(r,u)}function A4(r,i){return he(r,i)}var Ch=null,gu=null,Tg=!1,Fh=!1,Bg=!1,ds=0;function Hi(r){r!==gu&&r.next===null&&(gu===null?Ch=gu=r:gu=gu.next=r),Fh=!0,Tg||(Tg=!0,v4())}function Hl(r,i){if(!Bg&&Fh){Bg=!0;do for(var u=!1,d=Ch;d!==null;){if(r!==0){var m=d.pendingLanes;if(m===0)var S=0;else{var V=d.suspendedLanes,ge=d.pingedLanes;S=(1<<31-Ke(42|r)+1)-1,S&=m&~(V&~ge),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(u=!0,zS(d,S))}else S=Ft,S=ft(d,d===Wt?S:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(S&3)===0||dt(d,S)||(u=!0,zS(d,S));d=d.next}while(u);Bg=!1}}function w4(){kS()}function kS(){Fh=Tg=!1;var r=0;ds!==0&&B4()&&(r=ds);for(var i=de(),u=null,d=Ch;d!==null;){var m=d.next,S=LS(d,i);S===0?(d.next=null,u===null?Ch=m:u.next=m,m===null&&(gu=u)):(u=d,(r!==0||(S&3)!==0)&&(Fh=!0)),d=m}Ur!==0&&Ur!==5||Hl(r),ds!==0&&(ds=0)}function LS(r,i){for(var u=r.suspendedLanes,d=r.pingedLanes,m=r.expirationTimes,S=r.pendingLanes&-62914561;0<S;){var V=31-Ke(S),ge=1<<V,Fe=m[V];Fe===-1?((ge&u)===0||(ge&d)!==0)&&(m[V]=At(ge,i)):Fe<=i&&(r.expiredLanes|=ge),S&=~ge}if(i=Wt,u=Ft,u=ft(r,r===i?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,u===0||r===i&&(kt===2||kt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&ce(d),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||dt(r,u)){if(i=u&-u,i===r.callbackPriority)return i;switch(d!==null&&ce(d),rr(u)){case 2:case 8:u=B;break;case 32:u=D;break;case 268435456:u=me;break;default:u=D}return d=$S.bind(null,r),u=he(u,d),r.callbackPriority=i,r.callbackNode=u,i}return d!==null&&d!==null&&ce(d),r.callbackPriority=2,r.callbackNode=null,2}function $S(r,i){if(Ur!==0&&Ur!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(_h()&&r.callbackNode!==u)return null;var d=Ft;return d=ft(r,r===Wt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(xS(r,d,i),LS(r,de()),r.callbackNode!=null&&r.callbackNode===u?$S.bind(null,r):null)}function zS(r,i){if(_h())return null;xS(r,i,!0)}function v4(){M4(function(){(Pt&6)!==0?he(x,w4):kS()})}function Rg(){if(ds===0){var r=tu;r===0&&(r=bt,bt<<=1,(bt&261888)===0&&(bt=256)),ds=r}return ds}function qS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Nf(""+r)}function HS(r,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,r.id&&u.setAttribute("form",r.id),i.parentNode.insertBefore(u,i),r=new FormData(r),u.parentNode.removeChild(u),r}function x4(r,i,u,d,m){if(i==="submit"&&u&&u.stateNode===m){var S=qS((m[nr]||null).action),V=d.submitter;V&&(i=(i=V[nr]||null)?qS(i.formAction):V.getAttribute("formAction"),i!==null&&(S=i,V=null));var ge=new Lf("action","action",null,d,m);r.push({event:ge,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ds!==0){var Fe=V?HS(m,V):new FormData(m);Jy(u,{pending:!0,data:Fe,method:m.method,action:S},null,Fe)}}else typeof S=="function"&&(ge.preventDefault(),Fe=V?HS(m,V):new FormData(m),Jy(u,{pending:!0,data:Fe,method:m.method,action:S},S,Fe))},currentTarget:m}]})}}for(var Mg=0;Mg<yy.length;Mg++){var jg=yy[Mg],E4=jg.toLowerCase(),S4=jg[0].toUpperCase()+jg.slice(1);Ii(E4,"on"+S4)}Ii(vx,"onAnimationEnd"),Ii(xx,"onAnimationIteration"),Ii(Ex,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(L8,"onTransitionRun"),Ii($8,"onTransitionStart"),Ii(z8,"onTransitionCancel"),Ii(Sx,"onTransitionEnd"),$a("onMouseEnter",["mouseout","mouseover"]),$a("onMouseLeave",["mouseout","mouseover"]),$a("onPointerEnter",["pointerout","pointerover"]),$a("onPointerLeave",["pointerout","pointerover"]),Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ql="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),I4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function QS(r,i){i=(i&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],m=d.event;d=d.listeners;e:{var S=void 0;if(i)for(var V=d.length-1;0<=V;V--){var ge=d[V],Fe=ge.instance,Me=ge.currentTarget;if(ge=ge.listener,Fe!==S&&m.isPropagationStopped())break e;S=ge,m.currentTarget=Me;try{S(m)}catch(ze){qf(ze)}m.currentTarget=null,S=Fe}else for(V=0;V<d.length;V++){if(ge=d[V],Fe=ge.instance,Me=ge.currentTarget,ge=ge.listener,Fe!==S&&m.isPropagationStopped())break e;S=ge,m.currentTarget=Me;try{S(m)}catch(ze){qf(ze)}m.currentTarget=null,S=Fe}}}}function It(r,i){var u=i[jr];u===void 0&&(u=i[jr]=new Set);var d=r+"__bubble";u.has(d)||(GS(i,r,2,!1),u.add(d))}function Ug(r,i,u){var d=0;i&&(d|=4),GS(u,r,d,i)}var Oh="_reactListening"+Math.random().toString(36).slice(2);function Ng(r){if(!r[Oh]){r[Oh]=!0,qs.forEach(function(u){u!=="selectionchange"&&(I4.has(u)||Ug(u,!1,r),Ug(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Oh]||(i[Oh]=!0,Ug("selectionchange",!1,i))}}function GS(r,i,u,d){switch(v2(i)){case 2:var m=Z4;break;case 8:m=eR;break;default:m=Xg}u=m.bind(null,i,u,r),m=void 0,!ry||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),d?m!==void 0?r.addEventListener(i,u,{capture:!0,passive:m}):r.addEventListener(i,u,!0):m!==void 0?r.addEventListener(i,u,{passive:m}):r.addEventListener(i,u,!1)}function Dg(r,i,u,d,m){var S=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var V=d.tag;if(V===3||V===4){var ge=d.stateNode.containerInfo;if(ge===m)break;if(V===4)for(V=d.return;V!==null;){var Fe=V.tag;if((Fe===3||Fe===4)&&V.stateNode.containerInfo===m)return;V=V.return}for(;ge!==null;){if(V=xi(ge),V===null)return;if(Fe=V.tag,Fe===5||Fe===6||Fe===26||Fe===27){d=S=V;continue e}ge=ge.parentNode}}d=d.return}Wv(function(){var Me=S,ze=ey(u),Ge=[];e:{var je=Ix.get(r);if(je!==void 0){var De=Lf,ut=r;switch(r){case"keypress":if(Pf(u)===0)break e;case"keydown":case"keyup":De=b8;break;case"focusin":ut="focus",De=sy;break;case"focusout":ut="blur",De=sy;break;case"beforeblur":case"afterblur":De=sy;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":De=Zv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":De=s8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":De=v8;break;case vx:case xx:case Ex:De=l8;break;case Sx:De=E8;break;case"scroll":case"scrollend":De=i8;break;case"wheel":De=I8;break;case"copy":case"cut":case"paste":De=f8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":De=tx;break;case"toggle":case"beforetoggle":De=C8}var mt=(i&4)!==0,Kt=!mt&&(r==="scroll"||r==="scrollend"),Te=mt?je!==null?je+"Capture":null:je;mt=[];for(var Oe=Me,Re;Oe!==null;){var Qe=Oe;if(Re=Qe.stateNode,Qe=Qe.tag,Qe!==5&&Qe!==26&&Qe!==27||Re===null||Te===null||(Qe=dl(Oe,Te),Qe!=null&&mt.push(Gl(Oe,Qe,Re))),Kt)break;Oe=Oe.return}0<mt.length&&(je=new De(je,ut,null,u,ze),Ge.push({event:je,listeners:mt}))}}if((i&7)===0){e:{if(je=r==="mouseover"||r==="pointerover",De=r==="mouseout"||r==="pointerout",je&&u!==Zp&&(ut=u.relatedTarget||u.fromElement)&&(xi(ut)||ut[Mr]))break e;if((De||je)&&(je=ze.window===ze?ze:(je=ze.ownerDocument)?je.defaultView||je.parentWindow:window,De?(ut=u.relatedTarget||u.toElement,De=Me,ut=ut?xi(ut):null,ut!==null&&(Kt=a(ut),mt=ut.tag,ut!==Kt||mt!==5&&mt!==27&&mt!==6)&&(ut=null)):(De=null,ut=Me),De!==ut)){if(mt=Zv,Qe="onMouseLeave",Te="onMouseEnter",Oe="mouse",(r==="pointerout"||r==="pointerover")&&(mt=tx,Qe="onPointerLeave",Te="onPointerEnter",Oe="pointer"),Kt=De==null?je:Li(De),Re=ut==null?je:Li(ut),je=new mt(Qe,Oe+"leave",De,u,ze),je.target=Kt,je.relatedTarget=Re,Qe=null,xi(ze)===Me&&(mt=new mt(Te,Oe+"enter",ut,u,ze),mt.target=Re,mt.relatedTarget=Kt,Qe=mt),Kt=Qe,De&&ut)t:{for(mt=_4,Te=De,Oe=ut,Re=0,Qe=Te;Qe;Qe=mt(Qe))Re++;Qe=0;for(var pt=Oe;pt;pt=mt(pt))Qe++;for(;0<Re-Qe;)Te=mt(Te),Re--;for(;0<Qe-Re;)Oe=mt(Oe),Qe--;for(;Re--;){if(Te===Oe||Oe!==null&&Te===Oe.alternate){mt=Te;break t}Te=mt(Te),Oe=mt(Oe)}mt=null}else mt=null;De!==null&&KS(Ge,je,De,mt,!1),ut!==null&&Kt!==null&&KS(Ge,Kt,ut,mt,!0)}}e:{if(je=Me?Li(Me):window,De=je.nodeName&&je.nodeName.toLowerCase(),De==="select"||De==="input"&&je.type==="file")var Ut=lx;else if(ax(je))if(cx)Ut=D8;else{Ut=U8;var ct=j8}else De=je.nodeName,!De||De.toLowerCase()!=="input"||je.type!=="checkbox"&&je.type!=="radio"?Me&&Jp(Me.elementType)&&(Ut=lx):Ut=N8;if(Ut&&(Ut=Ut(r,Me))){ux(Ge,Ut,u,ze);break e}ct&&ct(r,je,Me),r==="focusout"&&Me&&je.type==="number"&&Me.memoizedProps.value!=null&&Xp(je,"number",je.value)}switch(ct=Me?Li(Me):window,r){case"focusin":(ax(ct)||ct.contentEditable==="true")&&(Ka=ct,hy=Me,vl=null);break;case"focusout":vl=hy=Ka=null;break;case"mousedown":dy=!0;break;case"contextmenu":case"mouseup":case"dragend":dy=!1,bx(Ge,u,ze);break;case"selectionchange":if(k8)break;case"keydown":case"keyup":bx(Ge,u,ze)}var xt;if(uy)e:{switch(r){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else Ga?ox(r,u)&&(Ot="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ot="onCompositionStart");Ot&&(rx&&u.locale!=="ko"&&(Ga||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Ga&&(xt=Xv()):(Xo=ze,ny="value"in Xo?Xo.value:Xo.textContent,Ga=!0)),ct=Th(Me,Ot),0<ct.length&&(Ot=new ex(Ot,r,null,u,ze),Ge.push({event:Ot,listeners:ct}),xt?Ot.data=xt:(xt=sx(u),xt!==null&&(Ot.data=xt)))),(xt=O8?T8(r,u):B8(r,u))&&(Ot=Th(Me,"onBeforeInput"),0<Ot.length&&(ct=new ex("onBeforeInput","beforeinput",null,u,ze),Ge.push({event:ct,listeners:Ot}),ct.data=xt)),x4(Ge,r,Me,u,ze)}QS(Ge,i)})}function Gl(r,i,u){return{instance:r,listener:i,currentTarget:u}}function Th(r,i){for(var u=i+"Capture",d=[];r!==null;){var m=r,S=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||S===null||(m=dl(r,u),m!=null&&d.unshift(Gl(r,m,S)),m=dl(r,i),m!=null&&d.push(Gl(r,m,S))),r.tag===3)return d;r=r.return}return[]}function _4(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function KS(r,i,u,d,m){for(var S=i._reactName,V=[];u!==null&&u!==d;){var ge=u,Fe=ge.alternate,Me=ge.stateNode;if(ge=ge.tag,Fe!==null&&Fe===d)break;ge!==5&&ge!==26&&ge!==27||Me===null||(Fe=Me,m?(Me=dl(u,S),Me!=null&&V.unshift(Gl(u,Me,Fe))):m||(Me=dl(u,S),Me!=null&&V.push(Gl(u,Me,Fe)))),u=u.return}V.length!==0&&r.push({event:i,listeners:V})}var C4=/\r\n?/g,F4=/\u0000|\uFFFD/g;function YS(r){return(typeof r=="string"?r:""+r).replace(C4,`
38
+ `).replace(F4,"")}function VS(r,i){return i=YS(i),YS(r)===i}function Gt(r,i,u,d,m,S){switch(u){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||qa(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&qa(r,""+d);break;case"className":jf(r,"class",d);break;case"tabIndex":jf(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":jf(r,u,d);break;case"style":Yv(r,d,S);break;case"data":if(i!=="object"){jf(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||u!=="href")){r.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(u);break}d=Nf(""+d),r.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(u==="formAction"?(i!=="input"&&Gt(r,i,"name",m.name,m,null),Gt(r,i,"formEncType",m.formEncType,m,null),Gt(r,i,"formMethod",m.formMethod,m,null),Gt(r,i,"formTarget",m.formTarget,m,null)):(Gt(r,i,"encType",m.encType,m,null),Gt(r,i,"method",m.method,m,null),Gt(r,i,"target",m.target,m,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(u);break}d=Nf(""+d),r.setAttribute(u,d);break;case"onClick":d!=null&&(r.onclick=io);break;case"onScroll":d!=null&&It("scroll",r);break;case"onScrollEnd":d!=null&&It("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(o(61));if(u=d.__html,u!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=u}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}u=Nf(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,""+d):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":d===!0?r.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,d):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(u,d):r.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(u):r.setAttribute(u,d);break;case"popover":It("beforetoggle",r),It("toggle",r),Mf(r,"popover",d);break;case"xlinkActuate":no(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":no(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":no(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":no(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":no(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":no(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":no(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":no(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":no(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Mf(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=r8.get(u)||u,Mf(r,u,d))}}function Pg(r,i,u,d,m,S){switch(u){case"style":Yv(r,d,S);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(o(61));if(u=d.__html,u!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=u}}break;case"children":typeof d=="string"?qa(r,d):(typeof d=="number"||typeof d=="bigint")&&qa(r,""+d);break;case"onScroll":d!=null&&It("scroll",r);break;case"onScrollEnd":d!=null&&It("scrollend",r);break;case"onClick":d!=null&&(r.onclick=io);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kv.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(m=u.endsWith("Capture"),i=u.slice(2,m?u.length-7:void 0),S=r[nr]||null,S=S!=null?S[u]:null,typeof S=="function"&&r.removeEventListener(i,S,m),typeof d=="function")){typeof S!="function"&&S!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(i,d,m);break e}u in r?r[u]=d:d===!0?r.setAttribute(u,""):Mf(r,u,d)}}}function Jr(r,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",r),It("load",r);var d=!1,m=!1,S;for(S in u)if(u.hasOwnProperty(S)){var V=u[S];if(V!=null)switch(S){case"src":d=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,S,V,u,null)}}m&&Gt(r,i,"srcSet",u.srcSet,u,null),d&&Gt(r,i,"src",u.src,u,null);return;case"input":It("invalid",r);var ge=S=V=m=null,Fe=null,Me=null;for(d in u)if(u.hasOwnProperty(d)){var ze=u[d];if(ze!=null)switch(d){case"name":m=ze;break;case"type":V=ze;break;case"checked":Fe=ze;break;case"defaultChecked":Me=ze;break;case"value":S=ze;break;case"defaultValue":ge=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(o(137,i));break;default:Gt(r,i,d,ze,u,null)}}Hv(r,S,ge,Fe,Me,V,m,!1);return;case"select":It("invalid",r),d=V=S=null;for(m in u)if(u.hasOwnProperty(m)&&(ge=u[m],ge!=null))switch(m){case"value":S=ge;break;case"defaultValue":V=ge;break;case"multiple":d=ge;default:Gt(r,i,m,ge,u,null)}i=S,u=V,r.multiple=!!d,i!=null?za(r,!!d,i,!1):u!=null&&za(r,!!d,u,!0);return;case"textarea":It("invalid",r),S=m=d=null;for(V in u)if(u.hasOwnProperty(V)&&(ge=u[V],ge!=null))switch(V){case"value":d=ge;break;case"defaultValue":m=ge;break;case"children":S=ge;break;case"dangerouslySetInnerHTML":if(ge!=null)throw Error(o(91));break;default:Gt(r,i,V,ge,u,null)}Gv(r,d,m,S);return;case"option":for(Fe in u)if(u.hasOwnProperty(Fe)&&(d=u[Fe],d!=null))switch(Fe){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Gt(r,i,Fe,d,u,null)}return;case"dialog":It("beforetoggle",r),It("toggle",r),It("cancel",r),It("close",r);break;case"iframe":case"object":It("load",r);break;case"video":case"audio":for(d=0;d<Ql.length;d++)It(Ql[d],r);break;case"image":It("error",r),It("load",r);break;case"details":It("toggle",r);break;case"embed":case"source":case"link":It("error",r),It("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Me in u)if(u.hasOwnProperty(Me)&&(d=u[Me],d!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,Me,d,u,null)}return;default:if(Jp(i)){for(ze in u)u.hasOwnProperty(ze)&&(d=u[ze],d!==void 0&&Pg(r,i,ze,d,u,void 0));return}}for(ge in u)u.hasOwnProperty(ge)&&(d=u[ge],d!=null&&Gt(r,i,ge,d,u,null))}function O4(r,i,u,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,S=null,V=null,ge=null,Fe=null,Me=null,ze=null;for(De in u){var Ge=u[De];if(u.hasOwnProperty(De)&&Ge!=null)switch(De){case"checked":break;case"value":break;case"defaultValue":Fe=Ge;default:d.hasOwnProperty(De)||Gt(r,i,De,null,d,Ge)}}for(var je in d){var De=d[je];if(Ge=u[je],d.hasOwnProperty(je)&&(De!=null||Ge!=null))switch(je){case"type":S=De;break;case"name":m=De;break;case"checked":Me=De;break;case"defaultChecked":ze=De;break;case"value":V=De;break;case"defaultValue":ge=De;break;case"children":case"dangerouslySetInnerHTML":if(De!=null)throw Error(o(137,i));break;default:De!==Ge&&Gt(r,i,je,De,d,Ge)}}Wp(r,V,ge,Fe,Me,ze,S,m);return;case"select":De=V=ge=je=null;for(S in u)if(Fe=u[S],u.hasOwnProperty(S)&&Fe!=null)switch(S){case"value":break;case"multiple":De=Fe;default:d.hasOwnProperty(S)||Gt(r,i,S,null,d,Fe)}for(m in d)if(S=d[m],Fe=u[m],d.hasOwnProperty(m)&&(S!=null||Fe!=null))switch(m){case"value":je=S;break;case"defaultValue":ge=S;break;case"multiple":V=S;default:S!==Fe&&Gt(r,i,m,S,d,Fe)}i=ge,u=V,d=De,je!=null?za(r,!!u,je,!1):!!d!=!!u&&(i!=null?za(r,!!u,i,!0):za(r,!!u,u?[]:"",!1));return;case"textarea":De=je=null;for(ge in u)if(m=u[ge],u.hasOwnProperty(ge)&&m!=null&&!d.hasOwnProperty(ge))switch(ge){case"value":break;case"children":break;default:Gt(r,i,ge,null,d,m)}for(V in d)if(m=d[V],S=u[V],d.hasOwnProperty(V)&&(m!=null||S!=null))switch(V){case"value":je=m;break;case"defaultValue":De=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==S&&Gt(r,i,V,m,d,S)}Qv(r,je,De);return;case"option":for(var ut in u)if(je=u[ut],u.hasOwnProperty(ut)&&je!=null&&!d.hasOwnProperty(ut))switch(ut){case"selected":r.selected=!1;break;default:Gt(r,i,ut,null,d,je)}for(Fe in d)if(je=d[Fe],De=u[Fe],d.hasOwnProperty(Fe)&&je!==De&&(je!=null||De!=null))switch(Fe){case"selected":r.selected=je&&typeof je!="function"&&typeof je!="symbol";break;default:Gt(r,i,Fe,je,d,De)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var mt in u)je=u[mt],u.hasOwnProperty(mt)&&je!=null&&!d.hasOwnProperty(mt)&&Gt(r,i,mt,null,d,je);for(Me in d)if(je=d[Me],De=u[Me],d.hasOwnProperty(Me)&&je!==De&&(je!=null||De!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(o(137,i));break;default:Gt(r,i,Me,je,d,De)}return;default:if(Jp(i)){for(var Kt in u)je=u[Kt],u.hasOwnProperty(Kt)&&je!==void 0&&!d.hasOwnProperty(Kt)&&Pg(r,i,Kt,void 0,d,je);for(ze in d)je=d[ze],De=u[ze],!d.hasOwnProperty(ze)||je===De||je===void 0&&De===void 0||Pg(r,i,ze,je,d,De);return}}for(var Te in u)je=u[Te],u.hasOwnProperty(Te)&&je!=null&&!d.hasOwnProperty(Te)&&Gt(r,i,Te,null,d,je);for(Ge in d)je=d[Ge],De=u[Ge],!d.hasOwnProperty(Ge)||je===De||je==null&&De==null||Gt(r,i,Ge,je,d,De)}function WS(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function T4(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var m=u[d],S=m.transferSize,V=m.initiatorType,ge=m.duration;if(S&&ge&&WS(V)){for(V=0,ge=m.responseEnd,d+=1;d<u.length;d++){var Fe=u[d],Me=Fe.startTime;if(Me>ge)break;var ze=Fe.transferSize,Ge=Fe.initiatorType;ze&&WS(Ge)&&(Fe=Fe.responseEnd,V+=ze*(Fe<ge?1:(ge-Me)/(Fe-Me)))}if(--d,i+=8*(S+V)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var kg=null,Lg=null;function Bh(r){return r.nodeType===9?r:r.ownerDocument}function XS(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function JS(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function $g(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var zg=null;function B4(){var r=window.event;return r&&r.type==="popstate"?r===zg?!1:(zg=r,!0):(zg=null,!1)}var ZS=typeof setTimeout=="function"?setTimeout:void 0,R4=typeof clearTimeout=="function"?clearTimeout:void 0,e2=typeof Promise=="function"?Promise:void 0,M4=typeof queueMicrotask=="function"?queueMicrotask:typeof e2<"u"?function(r){return e2.resolve(null).then(r).catch(j4)}:ZS;function j4(r){setTimeout(function(){throw r})}function ps(r){return r==="head"}function t2(r,i){var u=i,d=0;do{var m=u.nextSibling;if(r.removeChild(u),m&&m.nodeType===8)if(u=m.data,u==="/$"||u==="/&"){if(d===0){r.removeChild(m),wu(i);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")Kl(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Kl(u);for(var S=u.firstChild;S;){var V=S.nextSibling,ge=S.nodeName;S[wr]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=V}}else u==="body"&&Kl(r.ownerDocument.body);u=m}while(u);wu(i)}function r2(r,i){var u=r;r=0;do{var d=u.nextSibling;if(u.nodeType===1?i?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(i?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=d}while(u)}function qg(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":qg(u),Wo(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function U4(r,i,u,d){for(;r.nodeType===1;){var m=u;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[wr])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(S=r.getAttribute("rel"),S==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(S!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(S=r.getAttribute("src"),(S!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&S&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var S=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===S)return r}else return r;if(r=pi(r.nextSibling),r===null)break}return null}function N4(r,i,u){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=pi(r.nextSibling),r===null))return null;return r}function n2(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=pi(r.nextSibling),r===null))return null;return r}function Hg(r){return r.data==="$?"||r.data==="$~"}function Qg(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function D4(r,i){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||u.readyState!=="loading")i();else{var d=function(){i(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function pi(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Gg=null;function i2(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(i===0)return pi(r.nextSibling);i--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||i++}r=r.nextSibling}return null}function o2(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(i===0)return r;i--}else u!=="/$"&&u!=="/&"||i++}r=r.previousSibling}return null}function s2(r,i,u){switch(i=Bh(u),r){case"html":if(r=i.documentElement,!r)throw Error(o(452));return r;case"head":if(r=i.head,!r)throw Error(o(453));return r;case"body":if(r=i.body,!r)throw Error(o(454));return r;default:throw Error(o(451))}}function Kl(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Wo(r)}var yi=new Map,a2=new Set;function Rh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var vo=ae.d;ae.d={f:P4,r:k4,D:L4,C:$4,L:z4,m:q4,X:Q4,S:H4,M:G4};function P4(){var r=vo.f(),i=Eh();return r||i}function k4(r){var i=Ei(r);i!==null&&i.tag===5&&i.type==="form"?SE(i):vo.r(r)}var mu=typeof document>"u"?null:document;function u2(r,i,u){var d=mu;if(d&&typeof i=="string"&&i){var m=ai(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof u=="string"&&(m+='[crossorigin="'+u+'"]'),a2.has(m)||(a2.add(m),r={rel:r,crossOrigin:u,href:i},d.querySelector(m)===null&&(i=d.createElement("link"),Jr(i,"link",r),ur(i),d.head.appendChild(i)))}}function L4(r){vo.D(r),u2("dns-prefetch",r,null)}function $4(r,i){vo.C(r,i),u2("preconnect",r,i)}function z4(r,i,u){vo.L(r,i,u);var d=mu;if(d&&r&&i){var m='link[rel="preload"][as="'+ai(i)+'"]';i==="image"&&u&&u.imageSrcSet?(m+='[imagesrcset="'+ai(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(m+='[imagesizes="'+ai(u.imageSizes)+'"]')):m+='[href="'+ai(r)+'"]';var S=m;switch(i){case"style":S=bu(r);break;case"script":S=Au(r)}yi.has(S)||(r=y({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:r,as:i},u),yi.set(S,r),d.querySelector(m)!==null||i==="style"&&d.querySelector(Yl(S))||i==="script"&&d.querySelector(Vl(S))||(i=d.createElement("link"),Jr(i,"link",r),ur(i),d.head.appendChild(i)))}}function q4(r,i){vo.m(r,i);var u=mu;if(u&&r){var d=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+ai(d)+'"][href="'+ai(r)+'"]',S=m;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Au(r)}if(!yi.has(S)&&(r=y({rel:"modulepreload",href:r},i),yi.set(S,r),u.querySelector(m)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Vl(S)))return}d=u.createElement("link"),Jr(d,"link",r),ur(d),u.head.appendChild(d)}}}function H4(r,i,u){vo.S(r,i,u);var d=mu;if(d&&r){var m=Si(d).hoistableStyles,S=bu(r);i=i||"default";var V=m.get(S);if(!V){var ge={loading:0,preload:null};if(V=d.querySelector(Yl(S)))ge.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},u),(u=yi.get(S))&&Kg(r,u);var Fe=V=d.createElement("link");ur(Fe),Jr(Fe,"link",r),Fe._p=new Promise(function(Me,ze){Fe.onload=Me,Fe.onerror=ze}),Fe.addEventListener("load",function(){ge.loading|=1}),Fe.addEventListener("error",function(){ge.loading|=2}),ge.loading|=4,Mh(V,i,d)}V={type:"stylesheet",instance:V,count:1,state:ge},m.set(S,V)}}}function Q4(r,i){vo.X(r,i);var u=mu;if(u&&r){var d=Si(u).hoistableScripts,m=Au(r),S=d.get(m);S||(S=u.querySelector(Vl(m)),S||(r=y({src:r,async:!0},i),(i=yi.get(m))&&Yg(r,i),S=u.createElement("script"),ur(S),Jr(S,"link",r),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(m,S))}}function G4(r,i){vo.M(r,i);var u=mu;if(u&&r){var d=Si(u).hoistableScripts,m=Au(r),S=d.get(m);S||(S=u.querySelector(Vl(m)),S||(r=y({src:r,async:!0,type:"module"},i),(i=yi.get(m))&&Yg(r,i),S=u.createElement("script"),ur(S),Jr(S,"link",r),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(m,S))}}function l2(r,i,u,d){var m=(m=fe.current)?Rh(m):null;if(!m)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=bu(u.href),u=Si(m).hoistableStyles,d=u.get(i),d||(d={type:"style",instance:null,count:0,state:null},u.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=bu(u.href);var S=Si(m).hoistableStyles,V=S.get(r);if(V||(m=m.ownerDocument||m,V={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(r,V),(S=m.querySelector(Yl(r)))&&!S._p&&(V.instance=S,V.state.loading=5),yi.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},yi.set(r,u),S||K4(m,r,u,V.state))),i&&d===null)throw Error(o(528,""));return V}if(i&&d!==null)throw Error(o(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Au(u),u=Si(m).hoistableScripts,d=u.get(i),d||(d={type:"script",instance:null,count:0,state:null},u.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,r))}}function bu(r){return'href="'+ai(r)+'"'}function Yl(r){return'link[rel="stylesheet"]['+r+"]"}function c2(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function K4(r,i,u,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Jr(i,"link",u),ur(i),r.head.appendChild(i))}function Au(r){return'[src="'+ai(r)+'"]'}function Vl(r){return"script[async]"+r}function f2(r,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+ai(u.href)+'"]');if(d)return i.instance=d,ur(d),d;var m=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),ur(d),Jr(d,"style",m),Mh(d,u.precedence,r),i.instance=d;case"stylesheet":m=bu(u.href);var S=r.querySelector(Yl(m));if(S)return i.state.loading|=4,i.instance=S,ur(S),S;d=c2(u),(m=yi.get(m))&&Kg(d,m),S=(r.ownerDocument||r).createElement("link"),ur(S);var V=S;return V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Jr(S,"link",d),i.state.loading|=4,Mh(S,u.precedence,r),i.instance=S;case"script":return S=Au(u.src),(m=r.querySelector(Vl(S)))?(i.instance=m,ur(m),m):(d=u,(m=yi.get(S))&&(d=y({},u),Yg(d,m)),r=r.ownerDocument||r,m=r.createElement("script"),ur(m),Jr(m,"link",d),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(o(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Mh(d,u.precedence,r));return i.instance}function Mh(r,i,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=d.length?d[d.length-1]:null,S=m,V=0;V<d.length;V++){var ge=d[V];if(ge.dataset.precedence===i)S=ge;else if(S!==m)break}S?S.parentNode.insertBefore(r,S.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(r,i.firstChild))}function Kg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Yg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var jh=null;function h2(r,i,u){if(jh===null){var d=new Map,m=jh=new Map;m.set(u,d)}else m=jh,d=m.get(u),d||(d=new Map,m.set(u,d));if(d.has(r))return d;for(d.set(r,null),u=u.getElementsByTagName(r),m=0;m<u.length;m++){var S=u[m];if(!(S[wr]||S[Ht]||r==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var V=S.getAttribute(i)||"";V=r+V;var ge=d.get(V);ge?ge.push(S):d.set(V,[S])}}return d}function d2(r,i,u){r=r.ownerDocument||r,r.head.insertBefore(u,i==="title"?r.querySelector("head > title"):null)}function Y4(r,i,u){if(u===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function p2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function V4(r,i,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var m=bu(d.href),S=i.querySelector(Yl(m));if(S){i=S._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Uh.bind(r),i.then(r,r)),u.state.loading|=4,u.instance=S,ur(S);return}S=i.ownerDocument||i,d=c2(d),(m=yi.get(m))&&Kg(d,m),S=S.createElement("link"),ur(S);var V=S;V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Jr(S,"link",d),u.instance=S}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Uh.bind(r),i.addEventListener("load",u),i.addEventListener("error",u))}}var Vg=0;function W4(r,i){return r.stylesheets&&r.count===0&&Dh(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var d=setTimeout(function(){if(r.stylesheets&&Dh(r,r.stylesheets),r.unsuspend){var S=r.unsuspend;r.unsuspend=null,S()}},6e4+i);0<r.imgBytes&&Vg===0&&(Vg=62500*T4());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Dh(r,r.stylesheets),r.unsuspend)){var S=r.unsuspend;r.unsuspend=null,S()}},(r.imgBytes>Vg?50:800)+i);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(m)}}:null}function Uh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Nh=null;function Dh(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Nh=new Map,i.forEach(X4,r),Nh=null,Uh.call(r))}function X4(r,i){if(!(i.state.loading&4)){var u=Nh.get(r);if(u)var d=u.get(null);else{u=new Map,Nh.set(r,u);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<m.length;S++){var V=m[S];(V.nodeName==="LINK"||V.getAttribute("media")!=="not all")&&(u.set(V.dataset.precedence,V),d=V)}d&&u.set(null,d)}m=i.instance,V=m.getAttribute("data-precedence"),S=u.get(V)||d,S===d&&u.set(null,m),u.set(V,m),this.count++,d=Uh.bind(this),m.addEventListener("load",d),m.addEventListener("error",d),S?S.parentNode.insertBefore(m,S.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var Wl={$$typeof:E,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function J4(r,i,u,d,m,S,V,ge,Fe){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ar(0),this.hiddenUpdates=Ar(null),this.identifierPrefix=d,this.onUncaughtError=m,this.onCaughtError=S,this.onRecoverableError=V,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Fe,this.incompleteTransitions=new Map}function y2(r,i,u,d,m,S,V,ge,Fe,Me,ze,Ge){return r=new J4(r,i,u,V,Fe,Me,ze,Ge,ge),i=1,S===!0&&(i|=24),S=qn(3,null,null,i),r.current=S,S.stateNode=r,i=Fy(),i.refCount++,r.pooledCache=i,i.refCount++,S.memoizedState={element:d,isDehydrated:u,cache:i},Ry(S),r}function g2(r){return r?(r=Wa,r):Wa}function m2(r,i,u,d,m,S){m=g2(m),d.context===null?d.context=m:d.pendingContext=m,d=ns(i),d.payload={element:u},S=S===void 0?null:S,S!==null&&(d.callback=S),u=is(r,d,i),u!==null&&(Fn(u,r,i),Fl(u,r,i))}function b2(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function Wg(r,i){b2(r,i),(r=r.alternate)&&b2(r,i)}function A2(r){if(r.tag===13||r.tag===31){var i=Ys(r,67108864);i!==null&&Fn(i,r,67108864),Wg(r,67108864)}}function w2(r){if(r.tag===13||r.tag===31){var i=Yn();i=qt(i);var u=Ys(r,i);u!==null&&Fn(u,r,i),Wg(r,i)}}var Ph=!0;function Z4(r,i,u,d){var m=X.T;X.T=null;var S=ae.p;try{ae.p=2,Xg(r,i,u,d)}finally{ae.p=S,X.T=m}}function eR(r,i,u,d){var m=X.T;X.T=null;var S=ae.p;try{ae.p=8,Xg(r,i,u,d)}finally{ae.p=S,X.T=m}}function Xg(r,i,u,d){if(Ph){var m=Jg(d);if(m===null)Dg(r,i,d,kh,u),x2(r,d);else if(rR(m,r,i,u,d))d.stopPropagation();else if(x2(r,d),i&4&&-1<tR.indexOf(r)){for(;m!==null;){var S=Ei(m);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var V=tt(S.pendingLanes);if(V!==0){var ge=S;for(ge.pendingLanes|=2,ge.entangledLanes|=2;V;){var Fe=1<<31-Ke(V);ge.entanglements[1]|=Fe,V&=~Fe}Hi(S),(Pt&6)===0&&(vh=de()+500,Hl(0))}}break;case 31:case 13:ge=Ys(S,2),ge!==null&&Fn(ge,S,2),Eh(),Wg(S,2)}if(S=Jg(d),S===null&&Dg(r,i,d,kh,u),S===m)break;m=S}m!==null&&d.stopPropagation()}else Dg(r,i,d,null,u)}}function Jg(r){return r=ey(r),Zg(r)}var kh=null;function Zg(r){if(kh=null,r=xi(r),r!==null){var i=a(r);if(i===null)r=null;else{var u=i.tag;if(u===13){if(r=l(i),r!==null)return r;r=null}else if(u===31){if(r=c(i),r!==null)return r;r=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return kh=r,null}function v2(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ve()){case x:return 2;case B:return 8;case D:case oe:return 32;case me:return 268435456;default:return 32}default:return 32}}var em=!1,ys=null,gs=null,ms=null,Xl=new Map,Jl=new Map,bs=[],tR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function x2(r,i){switch(r){case"focusin":case"focusout":ys=null;break;case"dragenter":case"dragleave":gs=null;break;case"mouseover":case"mouseout":ms=null;break;case"pointerover":case"pointerout":Xl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jl.delete(i.pointerId)}}function Zl(r,i,u,d,m,S){return r===null||r.nativeEvent!==S?(r={blockedOn:i,domEventName:u,eventSystemFlags:d,nativeEvent:S,targetContainers:[m]},i!==null&&(i=Ei(i),i!==null&&A2(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function rR(r,i,u,d,m){switch(i){case"focusin":return ys=Zl(ys,r,i,u,d,m),!0;case"dragenter":return gs=Zl(gs,r,i,u,d,m),!0;case"mouseover":return ms=Zl(ms,r,i,u,d,m),!0;case"pointerover":var S=m.pointerId;return Xl.set(S,Zl(Xl.get(S)||null,r,i,u,d,m)),!0;case"gotpointercapture":return S=m.pointerId,Jl.set(S,Zl(Jl.get(S)||null,r,i,u,d,m)),!0}return!1}function E2(r){var i=xi(r.target);if(i!==null){var u=a(i);if(u!==null){if(i=u.tag,i===13){if(i=l(u),i!==null){r.blockedOn=i,$n(r.priority,function(){w2(u)});return}}else if(i===31){if(i=c(u),i!==null){r.blockedOn=i,$n(r.priority,function(){w2(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Lh(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=Jg(r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Zp=d,u.target.dispatchEvent(d),Zp=null}else return i=Ei(u),i!==null&&A2(i),r.blockedOn=u,!1;i.shift()}return!0}function S2(r,i,u){Lh(r)&&u.delete(i)}function nR(){em=!1,ys!==null&&Lh(ys)&&(ys=null),gs!==null&&Lh(gs)&&(gs=null),ms!==null&&Lh(ms)&&(ms=null),Xl.forEach(S2),Jl.forEach(S2)}function $h(r,i){r.blockedOn===i&&(r.blockedOn=null,em||(em=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nR)))}var zh=null;function I2(r){zh!==r&&(zh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){zh===r&&(zh=null);for(var i=0;i<r.length;i+=3){var u=r[i],d=r[i+1],m=r[i+2];if(typeof d!="function"){if(Zg(d||u)===null)continue;break}var S=Ei(u);S!==null&&(r.splice(i,3),i-=3,Jy(S,{pending:!0,data:m,method:u.method,action:d},d,m))}}))}function wu(r){function i(Fe){return $h(Fe,r)}ys!==null&&$h(ys,r),gs!==null&&$h(gs,r),ms!==null&&$h(ms,r),Xl.forEach(i),Jl.forEach(i);for(var u=0;u<bs.length;u++){var d=bs[u];d.blockedOn===r&&(d.blockedOn=null)}for(;0<bs.length&&(u=bs[0],u.blockedOn===null);)E2(u),u.blockedOn===null&&bs.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var m=u[d],S=u[d+1],V=m[nr]||null;if(typeof S=="function")V||I2(u);else if(V){var ge=null;if(S&&S.hasAttribute("formAction")){if(m=S,V=S[nr]||null)ge=V.formAction;else if(Zg(m)!==null)continue}else ge=V.action;typeof ge=="function"?u[d+1]=ge:(u.splice(d,3),d-=3),I2(u)}}}function _2(){function r(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(V){return m=V})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function tm(r){this._internalRoot=r}qh.prototype.render=tm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(o(409));var u=i.current,d=Yn();m2(u,d,r,i,null,null)},qh.prototype.unmount=tm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;m2(r.current,2,null,r,null,null),Eh(),i[Mr]=null}};function qh(r){this._internalRoot=r}qh.prototype.unstable_scheduleHydration=function(r){if(r){var i=Br();r={blockedOn:null,target:r,priority:i};for(var u=0;u<bs.length&&i!==0&&i<bs[u].priority;u++);bs.splice(u,0,r),u===0&&E2(r)}};var C2=t.version;if(C2!=="19.2.0")throw Error(o(527,C2,"19.2.0"));ae.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(o(188)):(r=Object.keys(r).join(","),Error(o(268,r)));return r=f(i),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var iR={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hh.isDisabled&&Hh.supportsFiber)try{we=Hh.inject(iR),Ie=Hh}catch{}}return rc.createRoot=function(r,i){if(!s(r))throw Error(o(299));var u=!1,d="",m=jE,S=UE,V=NE;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(V=i.onRecoverableError)),i=y2(r,1,!1,null,null,u,d,null,m,S,V,_2),r[Mr]=i.current,Ng(r),new tm(i)},rc.hydrateRoot=function(r,i,u){if(!s(r))throw Error(o(299));var d=!1,m="",S=jE,V=UE,ge=NE,Fe=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(m=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(V=u.onCaughtError),u.onRecoverableError!==void 0&&(ge=u.onRecoverableError),u.formState!==void 0&&(Fe=u.formState)),i=y2(r,1,!0,i,u??null,d,m,Fe,S,V,ge,_2),i.context=g2(null),u=i.current,d=Yn(),d=qt(d),m=ns(d),m.callback=null,is(u,m,d),u=d,i.current.lanes=u,be(i,u),Hi(i),r[Mr]=i.current,Ng(r),new qh(i)},rc.version="19.2.0",rc}var z2;function xR(){if(z2)return sm.exports;z2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),sm.exports=vR(),sm.exports}var ER=xR(),SR=WF();function cc({isOpen:e,onClose:t,title:n,children:o,className:s,url:a}){Ve.useEffect(()=>{if(e){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e]);const l=()=>{var h;a&&((h=globalThis==null?void 0:globalThis.open)==null||h.call(globalThis,a,"_blank","noopener,noreferrer"),t())};if(!e)return null;const c=Ee.jsx("div",{className:"modal-overlay",onClick:t,children:Ee.jsxs("div",{className:`modal-content ${s}`,onClick:h=>h.stopPropagation(),children:[Ee.jsxs("div",{className:"modal-header",children:[Ee.jsx("h2",{className:"modal-title",children:n}),Ee.jsxs("div",{className:"modal-header-actions",children:[a&&Ee.jsx("button",{className:"modal-open-new-window",onClick:l,"aria-label":"Open in new window",title:"Open in new window",type:"button",children:Ee.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Ee.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),Ee.jsx("polyline",{points:"15 3 21 3 21 9"}),Ee.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}),Ee.jsx("button",{className:"modal-close",onClick:t,type:"button",children:"×"})]})]}),Ee.jsx("div",{className:"modal-body",children:o})]})});return typeof document<"u"&&document.body?SR.createPortal(c,document.body):c}const vu=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function IR(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ic(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function wa(e,...t){if(!IR(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function _R(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Ic(e.outputLen),Ic(e.blockLen)}function ju(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function XF(e,t){wa(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function CR(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Uu(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function cm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Qi(e,t){return e<<32-t|e>>>t}const FR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function OR(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function TR(e){for(let t=0;t<e.length;t++)e[t]=OR(e[t]);return e}const q2=FR?e=>e:TR;function BR(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function rp(e){return typeof e=="string"&&(e=BR(e)),wa(e),e}function RR(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];wa(s),t+=s.length}const n=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const a=e[o];n.set(a,s),s+=a.length}return n}let ew=class{};function JF(e){const t=o=>e().update(rp(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function MR(e=32){if(vu&&typeof vu.getRandomValues=="function")return vu.getRandomValues(new Uint8Array(e));if(vu&&typeof vu.randomBytes=="function")return Uint8Array.from(vu.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tw=BigInt(0),mb=BigInt(1);function uf(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rw(e){if(!uf(e))throw new Error("Uint8Array expected")}function _c(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Yh(e){const t=e.toString(16);return t.length&1?"0"+t:t}function ZF(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?tw:BigInt("0x"+e)}const eO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",jR=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Cc(e){if(rw(e),eO)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=jR[e[n]];return t}const xo={_0:48,_9:57,A:65,F:70,a:97,f:102};function H2(e){if(e>=xo._0&&e<=xo._9)return e-xo._0;if(e>=xo.A&&e<=xo.F)return e-(xo.A-10);if(e>=xo.a&&e<=xo.f)return e-(xo.a-10)}function $d(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(eO)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(n);for(let s=0,a=0;s<n;s++,a+=2){const l=H2(e.charCodeAt(a)),c=H2(e.charCodeAt(a+1));if(l===void 0||c===void 0){const h=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+a)}o[s]=l*16+c}return o}function ga(e){return ZF(Cc(e))}function tO(e){return rw(e),ZF(Cc(Uint8Array.from(e).reverse()))}function lf(e,t){return $d(e.toString(16).padStart(t*2,"0"))}function rO(e,t){return lf(e,t).reverse()}function mi(e,t,n){let o;if(typeof t=="string")try{o=$d(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(uf(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=o.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return o}function zd(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];rw(s),t+=s.length}const n=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const a=e[o];n.set(a,s),s+=a.length}return n}const fm=e=>typeof e=="bigint"&&tw<=e;function nw(e,t,n){return fm(e)&&fm(t)&&fm(n)&&t<=e&&e<n}function Ou(e,t,n,o){if(!nw(t,n,o))throw new Error("expected valid "+e+": "+n+" <= n < "+o+", got "+t)}function UR(e){let t;for(t=0;e>tw;e>>=mb,t+=1);return t}const np=e=>(mb<<BigInt(e))-mb,hm=e=>new Uint8Array(e),Q2=e=>Uint8Array.from(e);function NR(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let o=hm(e),s=hm(e),a=0;const l=()=>{o.fill(1),s.fill(0),a=0},c=(...y)=>n(s,o,...y),h=(y=hm(0))=>{s=c(Q2([0]),y),o=c(),y.length!==0&&(s=c(Q2([1]),y),o=c())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let y=0;const g=[];for(;y<t;){o=c();const b=o.slice();g.push(b),y+=o.length}return zd(...g)};return(y,g)=>{l(),h(y);let b;for(;!(b=g(f()));)h();return l(),b}}const DR={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||uf(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function ip(e,t,n={}){const o=(s,a,l)=>{const c=DR[a];if(typeof c!="function")throw new Error("invalid validator function");const h=e[s];if(!(l&&h===void 0)&&!c(h,e))throw new Error("param "+String(s)+" is invalid. Expected "+a+", got "+h)};for(const[s,a]of Object.entries(t))o(s,a,!1);for(const[s,a]of Object.entries(n))o(s,a,!0);return e}function G2(e){const t=new WeakMap;return(n,...o)=>{const s=t.get(n);if(s!==void 0)return s;const a=e(n,...o);return t.set(n,a),a}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tn=BigInt(0),bn=BigInt(1),fa=BigInt(2),PR=BigInt(3),nO=BigInt(4),iO=BigInt(5),oO=BigInt(8);function On(e,t){const n=e%t;return n>=Tn?n:t+n}function gi(e,t,n){let o=e;for(;t-- >Tn;)o*=o,o%=n;return o}function bb(e,t){if(e===Tn)throw new Error("invert: expected non-zero number");if(t<=Tn)throw new Error("invert: expected positive modulus, got "+t);let n=On(e,t),o=t,s=Tn,a=bn;for(;n!==Tn;){const c=o/n,h=o%n,f=s-a*c;o=n,n=h,s=a,a=f}if(o!==bn)throw new Error("invert: does not exist");return On(s,t)}function sO(e,t){const n=(e.ORDER+bn)/nO,o=e.pow(t,n);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function kR(e,t){const n=(e.ORDER-iO)/oO,o=e.mul(t,fa),s=e.pow(o,n),a=e.mul(t,s),l=e.mul(e.mul(a,fa),s),c=e.mul(a,e.sub(l,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function LR(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-bn,n=0;for(;t%fa===Tn;)t/=fa,n++;let o=fa;const s=iw(e);for(;K2(s,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return sO;let a=s.pow(o,t);const l=(t+bn)/fa;return function(h,f){if(h.is0(f))return f;if(K2(h,f)!==1)throw new Error("Cannot find square root");let p=n,y=h.mul(h.ONE,a),g=h.pow(f,t),b=h.pow(f,l);for(;!h.eql(g,h.ONE);){if(h.is0(g))return h.ZERO;let w=1,F=h.sqr(g);for(;!h.eql(F,h.ONE);)if(w++,F=h.sqr(F),w===p)throw new Error("Cannot find square root");const I=bn<<BigInt(p-w-1),R=h.pow(y,I);p=w,y=h.sqr(R),g=h.mul(g,y),b=h.mul(b,R)}return b}}function $R(e){return e%nO===PR?sO:e%oO===iO?kR:LR(e)}const zR=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function qR(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=zR.reduce((o,s)=>(o[s]="function",o),t);return ip(e,n)}function HR(e,t,n){if(n<Tn)throw new Error("invalid exponent, negatives unsupported");if(n===Tn)return e.ONE;if(n===bn)return t;let o=e.ONE,s=t;for(;n>Tn;)n&bn&&(o=e.mul(o,s)),s=e.sqr(s),n>>=bn;return o}function aO(e,t,n=!1){const o=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((l,c,h)=>e.is0(c)?l:(o[h]=l,e.mul(l,c)),e.ONE),a=e.inv(s);return t.reduceRight((l,c,h)=>e.is0(c)?l:(o[h]=e.mul(l,o[h]),e.mul(l,c)),a),o}function K2(e,t){const n=(e.ORDER-bn)/fa,o=e.pow(t,n),s=e.eql(o,e.ONE),a=e.eql(o,e.ZERO),l=e.eql(o,e.neg(e.ONE));if(!s&&!a&&!l)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function uO(e,t){t!==void 0&&Ic(t);const n=t!==void 0?t:e.toString(2).length,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}function iw(e,t,n=!1,o={}){if(e<=Tn)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=uO(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const c=Object.freeze({ORDER:e,isLE:n,BITS:s,BYTES:a,MASK:np(s),ZERO:Tn,ONE:bn,create:h=>On(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Tn<=h&&h<e},is0:h=>h===Tn,isOdd:h=>(h&bn)===bn,neg:h=>On(-h,e),eql:(h,f)=>h===f,sqr:h=>On(h*h,e),add:(h,f)=>On(h+f,e),sub:(h,f)=>On(h-f,e),mul:(h,f)=>On(h*f,e),pow:(h,f)=>HR(c,h,f),div:(h,f)=>On(h*bb(f,e),e),sqrN:h=>h*h,addN:(h,f)=>h+f,subN:(h,f)=>h-f,mulN:(h,f)=>h*f,inv:h=>bb(h,e),sqrt:o.sqrt||(h=>(l||(l=$R(e)),l(c,h))),toBytes:h=>n?rO(h,a):lf(h,a),fromBytes:h=>{if(h.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+h.length);return n?tO(h):ga(h)},invertBatch:h=>aO(c,h),cmov:(h,f,p)=>p?f:h});return Object.freeze(c)}function lO(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function cO(e){const t=lO(e);return t+Math.ceil(t/2)}function QR(e,t,n=!1){const o=e.length,s=lO(t),a=cO(t);if(o<16||o<a||o>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+o);const l=n?tO(e):ga(e),c=On(l,t-bn)+bn;return n?rO(c,s):lf(c,s)}function GR(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const s=BigInt(32),a=BigInt(4294967295),l=Number(n>>s&a),c=Number(n&a),h=o?4:0,f=o?0:4;e.setUint32(t+h,l,o),e.setUint32(t+f,c,o)}function KR(e,t,n){return e&t^~e&n}function YR(e,t,n){return e&t^e&n^t&n}class VR extends ew{constructor(t,n,o,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=s,this.buffer=new Uint8Array(t),this.view=cm(this.buffer)}update(t){ju(this),t=rp(t),wa(t);const{view:n,buffer:o,blockLen:s}=this,a=t.length;for(let l=0;l<a;){const c=Math.min(s-this.pos,a-l);if(c===s){const h=cm(t);for(;s<=a-l;l+=s)this.process(h,l);continue}o.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ju(this),XF(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:s,isLE:a}=this;let{pos:l}=this;n[l++]=128,Uu(this.buffer.subarray(l)),this.padOffset>s-l&&(this.process(o,0),l=0);for(let y=l;y<s;y++)n[y]=0;GR(o,s-8,BigInt(this.length*8),a),this.process(o,0);const c=cm(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=h/4,p=this.get();if(f>p.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<f;y++)c.setUint32(4*y,p[y],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:s,finished:a,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=a,t.length=s,t.pos=c,s%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const ws=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Vh=BigInt(2**32-1),Y2=BigInt(32);function WR(e,t=!1){return t?{h:Number(e&Vh),l:Number(e>>Y2&Vh)}:{h:Number(e>>Y2&Vh)|0,l:Number(e&Vh)|0}}function XR(e,t=!1){const n=e.length;let o=new Uint32Array(n),s=new Uint32Array(n);for(let a=0;a<n;a++){const{h:l,l:c}=WR(e[a],t);[o[a],s[a]]=[l,c]}return[o,s]}const JR=(e,t,n)=>e<<n|t>>>32-n,ZR=(e,t,n)=>t<<n|e>>>32-n,eM=(e,t,n)=>t<<n-32|e>>>64-n,tM=(e,t,n)=>e<<n-32|t>>>64-n,rM=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),vs=new Uint32Array(64);class nM extends VR{constructor(t=32){super(64,t,8,!1),this.A=ws[0]|0,this.B=ws[1]|0,this.C=ws[2]|0,this.D=ws[3]|0,this.E=ws[4]|0,this.F=ws[5]|0,this.G=ws[6]|0,this.H=ws[7]|0}get(){const{A:t,B:n,C:o,D:s,E:a,F:l,G:c,H:h}=this;return[t,n,o,s,a,l,c,h]}set(t,n,o,s,a,l,c,h){this.A=t|0,this.B=n|0,this.C=o|0,this.D=s|0,this.E=a|0,this.F=l|0,this.G=c|0,this.H=h|0}process(t,n){for(let y=0;y<16;y++,n+=4)vs[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=vs[y-15],b=vs[y-2],w=Qi(g,7)^Qi(g,18)^g>>>3,F=Qi(b,17)^Qi(b,19)^b>>>10;vs[y]=F+vs[y-7]+w+vs[y-16]|0}let{A:o,B:s,C:a,D:l,E:c,F:h,G:f,H:p}=this;for(let y=0;y<64;y++){const g=Qi(c,6)^Qi(c,11)^Qi(c,25),b=p+g+KR(c,h,f)+rM[y]+vs[y]|0,F=(Qi(o,2)^Qi(o,13)^Qi(o,22))+YR(o,s,a)|0;p=f,f=h,h=c,c=l+b|0,l=a,a=s,s=o,o=b+F|0}o=o+this.A|0,s=s+this.B|0,a=a+this.C|0,l=l+this.D|0,c=c+this.E|0,h=h+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(o,s,a,l,c,h,f,p)}roundClean(){Uu(vs)}destroy(){this.set(0,0,0,0,0,0,0,0),Uu(this.buffer)}}const fO=JF(()=>new nM);class hO extends ew{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,_R(t);const o=rp(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,a=new Uint8Array(s);a.set(o.length>s?t.create().update(o).digest():o);for(let l=0;l<a.length;l++)a[l]^=54;this.iHash.update(a),this.oHash=t.create();for(let l=0;l<a.length;l++)a[l]^=106;this.oHash.update(a),Uu(a)}update(t){return ju(this),this.iHash.update(t),this}digestInto(t){ju(this),wa(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:o,finished:s,destroyed:a,blockLen:l,outputLen:c}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=l,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const dO=(e,t,n)=>new hO(e,t).update(n).digest();dO.create=(e,t)=>new hO(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V2=BigInt(0),Ab=BigInt(1);function dm(e,t){const n=t.negate();return e?n:t}function pO(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function pm(e,t){pO(e,t);const n=Math.ceil(t/e)+1,o=2**(e-1),s=2**e,a=np(e),l=BigInt(e);return{windows:n,windowSize:o,mask:a,maxNumber:s,shiftBy:l}}function W2(e,t,n){const{windowSize:o,mask:s,maxNumber:a,shiftBy:l}=n;let c=Number(e&s),h=e>>l;c>o&&(c-=a,h+=Ab);const f=t*o,p=f+Math.abs(c)-1,y=c===0,g=c<0,b=t%2!==0;return{nextN:h,offset:p,isZero:y,isNeg:g,isNegF:b,offsetF:f}}function iM(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,o)=>{if(!(n instanceof t))throw new Error("invalid point at index "+o)})}function oM(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,o)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+o)})}const ym=new WeakMap,yO=new WeakMap;function gm(e){return yO.get(e)||1}function sM(e,t){return{constTimeNegate:dm,hasPrecomputes(n){return gm(n)!==1},unsafeLadder(n,o,s=e.ZERO){let a=n;for(;o>V2;)o&Ab&&(s=s.add(a)),a=a.double(),o>>=Ab;return s},precomputeWindow(n,o){const{windows:s,windowSize:a}=pm(o,t),l=[];let c=n,h=c;for(let f=0;f<s;f++){h=c,l.push(h);for(let p=1;p<a;p++)h=h.add(c),l.push(h);c=h.double()}return l},wNAF(n,o,s){let a=e.ZERO,l=e.BASE;const c=pm(n,t);for(let h=0;h<c.windows;h++){const{nextN:f,offset:p,isZero:y,isNeg:g,isNegF:b,offsetF:w}=W2(s,h,c);s=f,y?l=l.add(dm(b,o[w])):a=a.add(dm(g,o[p]))}return{p:a,f:l}},wNAFUnsafe(n,o,s,a=e.ZERO){const l=pm(n,t);for(let c=0;c<l.windows&&s!==V2;c++){const{nextN:h,offset:f,isZero:p,isNeg:y}=W2(s,c,l);if(s=h,!p){const g=o[f];a=a.add(y?g.negate():g)}}return a},getPrecomputes(n,o,s){let a=ym.get(o);return a||(a=this.precomputeWindow(o,n),n!==1&&ym.set(o,s(a))),a},wNAFCached(n,o,s){const a=gm(n);return this.wNAF(a,this.getPrecomputes(a,n,s),o)},wNAFCachedUnsafe(n,o,s,a){const l=gm(n);return l===1?this.unsafeLadder(n,o,a):this.wNAFUnsafe(l,this.getPrecomputes(l,n,s),o,a)},setWindowSize(n,o){pO(o,t),yO.set(n,o),ym.delete(n)}}}function aM(e,t,n,o){iM(n,e),oM(o,t);const s=n.length,a=o.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const l=e.ZERO,c=UR(BigInt(s));let h=1;c>12?h=c-3:c>4?h=c-2:c>0&&(h=2);const f=np(h),p=new Array(Number(f)+1).fill(l),y=Math.floor((t.BITS-1)/h)*h;let g=l;for(let b=y;b>=0;b-=h){p.fill(l);for(let F=0;F<a;F++){const I=o[F],R=Number(I>>BigInt(b)&f);p[R]=p[R].add(n[F])}let w=l;for(let F=p.length-1,I=l;F>0;F--)I=I.add(p[F]),w=w.add(I);if(g=g.add(w),b!==0)for(let F=0;F<h;F++)g=g.double()}return g}function gO(e){return qR(e.Fp),ip(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...uO(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function X2(e){e.lowS!==void 0&&_c("lowS",e.lowS),e.prehash!==void 0&&_c("prehash",e.prehash)}function uM(e){const t=gO(e);ip(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:o,a:s}=t;if(n){if(!o.eql(s,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class lM extends Error{constructor(t=""){super(t)}}const To={Err:lM,_tlv:{encode:(e,t)=>{const{Err:n}=To;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const o=t.length/2,s=Yh(o);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const a=o>127?Yh(s.length/2|128):"";return Yh(e)+a+s+t},decode(e,t){const{Err:n}=To;let o=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new n("tlv.decode: wrong tlv");const s=t[o++],a=!!(s&128);let l=0;if(!a)l=s;else{const h=s&127;if(!h)throw new n("tlv.decode(long): indefinite length not supported");if(h>4)throw new n("tlv.decode(long): byte length is too big");const f=t.subarray(o,o+h);if(f.length!==h)throw new n("tlv.decode: length bytes not complete");if(f[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const p of f)l=l<<8|p;if(o+=h,l<128)throw new n("tlv.decode(long): not minimal encoding")}const c=t.subarray(o,o+l);if(c.length!==l)throw new n("tlv.decode: wrong value length");return{v:c,l:t.subarray(o+l)}}},_int:{encode(e){const{Err:t}=To;if(e<Uo)throw new t("integer: negative integers are not allowed");let n=Yh(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=To;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return ga(e)}},toSig(e){const{Err:t,_int:n,_tlv:o}=To,s=mi("signature",e),{v:a,l}=o.decode(48,s);if(l.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l:h}=o.decode(2,a),{v:f,l:p}=o.decode(2,h);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(f)}},hexFromSig(e){const{_tlv:t,_int:n}=To,o=t.encode(2,n.encode(e.r)),s=t.encode(2,n.encode(e.s)),a=o+s;return t.encode(48,a)}};function mm(e,t){return Cc(lf(e,t))}const Uo=BigInt(0),$r=BigInt(1);BigInt(2);const bm=BigInt(3),cM=BigInt(4);function fM(e){const t=uM(e),{Fp:n}=t,o=iw(t.n,t.nBitLength),s=t.toBytes||((E,M,T)=>{const z=M.toAffine();return zd(Uint8Array.from([4]),n.toBytes(z.x),n.toBytes(z.y))}),a=t.fromBytes||(E=>{const M=E.subarray(1),T=n.fromBytes(M.subarray(0,n.BYTES)),z=n.fromBytes(M.subarray(n.BYTES,2*n.BYTES));return{x:T,y:z}});function l(E){const{a:M,b:T}=t,z=n.sqr(E),L=n.mul(z,E);return n.add(n.add(L,n.mul(E,M)),T)}function c(E,M){const T=n.sqr(M),z=l(E);return n.eql(T,z)}if(!c(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=n.mul(n.pow(t.a,bm),cM),f=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(h,f)))throw new Error("bad curve params: a or b");function p(E){return nw(E,$r,t.n)}function y(E){const{allowedPrivateKeyLengths:M,nByteLength:T,wrapPrivateKey:z,n:L}=t;if(M&&typeof E!="bigint"){if(uf(E)&&(E=Cc(E)),typeof E!="string"||!M.includes(E.length))throw new Error("invalid private key");E=E.padStart(T*2,"0")}let k;try{k=typeof E=="bigint"?E:ga(mi("private key",E,T))}catch{throw new Error("invalid private key, expected hex or "+T+" bytes, got "+typeof E)}return z&&(k=On(k,L)),Ou("private key",k,$r,L),k}function g(E){if(!(E instanceof F))throw new Error("ProjectivePoint expected")}const b=G2((E,M)=>{const{px:T,py:z,pz:L}=E;if(n.eql(L,n.ONE))return{x:T,y:z};const k=E.is0();M==null&&(M=k?n.ONE:n.inv(L));const j=n.mul(T,M),U=n.mul(z,M),$=n.mul(L,M);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql($,n.ONE))throw new Error("invZ was invalid");return{x:j,y:U}}),w=G2(E=>{if(E.is0()){if(t.allowInfinityPoint&&!n.is0(E.py))return;throw new Error("bad point: ZERO")}const{x:M,y:T}=E.toAffine();if(!n.isValid(M)||!n.isValid(T))throw new Error("bad point: x or y not FE");if(!c(M,T))throw new Error("bad point: equation left != right");if(!E.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class F{constructor(M,T,z){if(M==null||!n.isValid(M))throw new Error("x required");if(T==null||!n.isValid(T)||n.is0(T))throw new Error("y required");if(z==null||!n.isValid(z))throw new Error("z required");this.px=M,this.py=T,this.pz=z,Object.freeze(this)}static fromAffine(M){const{x:T,y:z}=M||{};if(!M||!n.isValid(T)||!n.isValid(z))throw new Error("invalid affine point");if(M instanceof F)throw new Error("projective point not allowed");const L=k=>n.eql(k,n.ZERO);return L(T)&&L(z)?F.ZERO:new F(T,z,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const T=aO(n,M.map(z=>z.pz));return M.map((z,L)=>z.toAffine(T[L])).map(F.fromAffine)}static fromHex(M){const T=F.fromAffine(a(mi("pointHex",M)));return T.assertValidity(),T}static fromPrivateKey(M){return F.BASE.multiply(y(M))}static msm(M,T){return aM(F,o,M,T)}_setWindowSize(M){A.setWindowSize(this,M)}assertValidity(){w(this)}hasEvenY(){const{y:M}=this.toAffine();if(n.isOdd)return!n.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){g(M);const{px:T,py:z,pz:L}=this,{px:k,py:j,pz:U}=M,$=n.eql(n.mul(T,U),n.mul(k,L)),N=n.eql(n.mul(z,U),n.mul(j,L));return $&&N}negate(){return new F(this.px,n.neg(this.py),this.pz)}double(){const{a:M,b:T}=t,z=n.mul(T,bm),{px:L,py:k,pz:j}=this;let U=n.ZERO,$=n.ZERO,N=n.ZERO,Z=n.mul(L,L),re=n.mul(k,k),ie=n.mul(j,j),X=n.mul(L,k);return X=n.add(X,X),N=n.mul(L,j),N=n.add(N,N),U=n.mul(M,N),$=n.mul(z,ie),$=n.add(U,$),U=n.sub(re,$),$=n.add(re,$),$=n.mul(U,$),U=n.mul(X,U),N=n.mul(z,N),ie=n.mul(M,ie),X=n.sub(Z,ie),X=n.mul(M,X),X=n.add(X,N),N=n.add(Z,Z),Z=n.add(N,Z),Z=n.add(Z,ie),Z=n.mul(Z,X),$=n.add($,Z),ie=n.mul(k,j),ie=n.add(ie,ie),Z=n.mul(ie,X),U=n.sub(U,Z),N=n.mul(ie,re),N=n.add(N,N),N=n.add(N,N),new F(U,$,N)}add(M){g(M);const{px:T,py:z,pz:L}=this,{px:k,py:j,pz:U}=M;let $=n.ZERO,N=n.ZERO,Z=n.ZERO;const re=t.a,ie=n.mul(t.b,bm);let X=n.mul(T,k),ae=n.mul(z,j),ye=n.mul(L,U),le=n.add(T,z),ee=n.add(k,j);le=n.mul(le,ee),ee=n.add(X,ae),le=n.sub(le,ee),ee=n.add(T,L);let G=n.add(k,U);return ee=n.mul(ee,G),G=n.add(X,ye),ee=n.sub(ee,G),G=n.add(z,L),$=n.add(j,U),G=n.mul(G,$),$=n.add(ae,ye),G=n.sub(G,$),Z=n.mul(re,ee),$=n.mul(ie,ye),Z=n.add($,Z),$=n.sub(ae,Z),Z=n.add(ae,Z),N=n.mul($,Z),ae=n.add(X,X),ae=n.add(ae,X),ye=n.mul(re,ye),ee=n.mul(ie,ee),ae=n.add(ae,ye),ye=n.sub(X,ye),ye=n.mul(re,ye),ee=n.add(ee,ye),X=n.mul(ae,ee),N=n.add(N,X),X=n.mul(G,ee),$=n.mul(le,$),$=n.sub($,X),X=n.mul(le,ae),Z=n.mul(G,Z),Z=n.add(Z,X),new F($,N,Z)}subtract(M){return this.add(M.negate())}is0(){return this.equals(F.ZERO)}wNAF(M){return A.wNAFCached(this,M,F.normalizeZ)}multiplyUnsafe(M){const{endo:T,n:z}=t;Ou("scalar",M,Uo,z);const L=F.ZERO;if(M===Uo)return L;if(this.is0()||M===$r)return this;if(!T||A.hasPrecomputes(this))return A.wNAFCachedUnsafe(this,M,F.normalizeZ);let{k1neg:k,k1:j,k2neg:U,k2:$}=T.splitScalar(M),N=L,Z=L,re=this;for(;j>Uo||$>Uo;)j&$r&&(N=N.add(re)),$&$r&&(Z=Z.add(re)),re=re.double(),j>>=$r,$>>=$r;return k&&(N=N.negate()),U&&(Z=Z.negate()),Z=new F(n.mul(Z.px,T.beta),Z.py,Z.pz),N.add(Z)}multiply(M){const{endo:T,n:z}=t;Ou("scalar",M,$r,z);let L,k;if(T){const{k1neg:j,k1:U,k2neg:$,k2:N}=T.splitScalar(M);let{p:Z,f:re}=this.wNAF(U),{p:ie,f:X}=this.wNAF(N);Z=A.constTimeNegate(j,Z),ie=A.constTimeNegate($,ie),ie=new F(n.mul(ie.px,T.beta),ie.py,ie.pz),L=Z.add(ie),k=re.add(X)}else{const{p:j,f:U}=this.wNAF(M);L=j,k=U}return F.normalizeZ([L,k])[0]}multiplyAndAddUnsafe(M,T,z){const L=F.BASE,k=(U,$)=>$===Uo||$===$r||!U.equals(L)?U.multiplyUnsafe($):U.multiply($),j=k(this,T).add(k(M,z));return j.is0()?void 0:j}toAffine(M){return b(this,M)}isTorsionFree(){const{h:M,isTorsionFree:T}=t;if(M===$r)return!0;if(T)return T(F,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:T}=t;return M===$r?this:T?T(F,this):this.multiplyUnsafe(t.h)}toRawBytes(M=!0){return _c("isCompressed",M),this.assertValidity(),s(F,this,M)}toHex(M=!0){return _c("isCompressed",M),Cc(this.toRawBytes(M))}}F.BASE=new F(t.Gx,t.Gy,n.ONE),F.ZERO=new F(n.ZERO,n.ONE,n.ZERO);const{endo:I,nBitLength:R}=t,A=sM(F,I?Math.ceil(R/2):R);return{CURVE:t,ProjectivePoint:F,normPrivateKeyToScalar:y,weierstrassEquation:l,isWithinCurveOrder:p}}function hM(e){const t=gO(e);return ip(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function dM(e){const t=hM(e),{Fp:n,n:o,nByteLength:s,nBitLength:a}=t,l=n.BYTES+1,c=2*n.BYTES+1;function h(ie){return On(ie,o)}function f(ie){return bb(ie,o)}const{ProjectivePoint:p,normPrivateKeyToScalar:y,weierstrassEquation:g,isWithinCurveOrder:b}=fM({...t,toBytes(ie,X,ae){const ye=X.toAffine(),le=n.toBytes(ye.x),ee=zd;return _c("isCompressed",ae),ae?ee(Uint8Array.from([X.hasEvenY()?2:3]),le):ee(Uint8Array.from([4]),le,n.toBytes(ye.y))},fromBytes(ie){const X=ie.length,ae=ie[0],ye=ie.subarray(1);if(X===l&&(ae===2||ae===3)){const le=ga(ye);if(!nw(le,$r,n.ORDER))throw new Error("Point is not on curve");const ee=g(le);let G;try{G=n.sqrt(ee)}catch(W){const q=W instanceof Error?": "+W.message:"";throw new Error("Point is not on curve"+q)}const Q=(G&$r)===$r;return(ae&1)===1!==Q&&(G=n.neg(G)),{x:le,y:G}}else if(X===c&&ae===4){const le=n.fromBytes(ye.subarray(0,n.BYTES)),ee=n.fromBytes(ye.subarray(n.BYTES,2*n.BYTES));return{x:le,y:ee}}else{const le=l,ee=c;throw new Error("invalid Point, expected length of "+le+", or uncompressed "+ee+", got "+X)}}});function w(ie){const X=o>>$r;return ie>X}function F(ie){return w(ie)?h(-ie):ie}const I=(ie,X,ae)=>ga(ie.slice(X,ae));class R{constructor(X,ae,ye){Ou("r",X,$r,o),Ou("s",ae,$r,o),this.r=X,this.s=ae,ye!=null&&(this.recovery=ye),Object.freeze(this)}static fromCompact(X){const ae=s;return X=mi("compactSignature",X,ae*2),new R(I(X,0,ae),I(X,ae,2*ae))}static fromDER(X){const{r:ae,s:ye}=To.toSig(mi("DER",X));return new R(ae,ye)}assertValidity(){}addRecoveryBit(X){return new R(this.r,this.s,X)}recoverPublicKey(X){const{r:ae,s:ye,recovery:le}=this,ee=L(mi("msgHash",X));if(le==null||![0,1,2,3].includes(le))throw new Error("recovery id invalid");const G=le===2||le===3?ae+t.n:ae;if(G>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const Q=(le&1)===0?"02":"03",K=p.fromHex(Q+mm(G,n.BYTES)),W=f(G),q=h(-ee*W),fe=h(ye*W),ue=p.BASE.multiplyAndAddUnsafe(K,q,fe);if(!ue)throw new Error("point at infinify");return ue.assertValidity(),ue}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new R(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return $d(this.toDERHex())}toDERHex(){return To.hexFromSig(this)}toCompactRawBytes(){return $d(this.toCompactHex())}toCompactHex(){const X=s;return mm(this.r,X)+mm(this.s,X)}}const A={isValidPrivateKey(ie){try{return y(ie),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const ie=cO(t.n);return QR(t.randomBytes(ie),t.n)},precompute(ie=8,X=p.BASE){return X._setWindowSize(ie),X.multiply(BigInt(3)),X}};function E(ie,X=!0){return p.fromPrivateKey(ie).toRawBytes(X)}function M(ie){if(typeof ie=="bigint")return!1;if(ie instanceof p)return!0;const ae=mi("key",ie).length,ye=n.BYTES,le=ye+1,ee=2*ye+1;if(!(t.allowedPrivateKeyLengths||s===le))return ae===le||ae===ee}function T(ie,X,ae=!0){if(M(ie)===!0)throw new Error("first arg must be private key");if(M(X)===!1)throw new Error("second arg must be public key");return p.fromHex(X).multiply(y(ie)).toRawBytes(ae)}const z=t.bits2int||function(ie){if(ie.length>8192)throw new Error("input is too large");const X=ga(ie),ae=ie.length*8-a;return ae>0?X>>BigInt(ae):X},L=t.bits2int_modN||function(ie){return h(z(ie))},k=np(a);function j(ie){return Ou("num < 2^"+a,ie,Uo,k),lf(ie,s)}function U(ie,X,ae=$){if(["recovered","canonical"].some(J=>J in ae))throw new Error("sign() legacy options not supported");const{hash:ye,randomBytes:le}=t;let{lowS:ee,prehash:G,extraEntropy:Q}=ae;ee==null&&(ee=!0),ie=mi("msgHash",ie),X2(ae),G&&(ie=mi("prehashed msgHash",ye(ie)));const K=L(ie),W=y(X),q=[j(W),j(K)];if(Q!=null&&Q!==!1){const J=Q===!0?le(n.BYTES):Q;q.push(mi("extraEntropy",J))}const fe=zd(...q),ue=K;function ne(J){const O=z(J);if(!b(O))return;const H=f(O),Y=p.BASE.multiply(O).toAffine(),se=h(Y.x);if(se===Uo)return;const pe=h(H*h(ue+se*W));if(pe===Uo)return;let te=(Y.x===se?0:2)|Number(Y.y&$r),_=pe;return ee&&w(pe)&&(_=F(pe),te^=1),new R(se,_,te)}return{seed:fe,k2sig:ne}}const $={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function Z(ie,X,ae=$){const{seed:ye,k2sig:le}=U(ie,X,ae),ee=t;return NR(ee.hash.outputLen,ee.nByteLength,ee.hmac)(ye,le)}p.BASE._setWindowSize(8);function re(ie,X,ae,ye=N){var te;const le=ie;X=mi("msgHash",X),ae=mi("publicKey",ae);const{lowS:ee,prehash:G,format:Q}=ye;if(X2(ye),"strict"in ye)throw new Error("options.strict was renamed to lowS");if(Q!==void 0&&Q!=="compact"&&Q!=="der")throw new Error("format must be compact or der");const K=typeof le=="string"||uf(le),W=!K&&!Q&&typeof le=="object"&&le!==null&&typeof le.r=="bigint"&&typeof le.s=="bigint";if(!K&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let q,fe;try{if(W&&(q=new R(le.r,le.s)),K){try{Q!=="compact"&&(q=R.fromDER(le))}catch(_){if(!(_ instanceof To.Err))throw _}!q&&Q!=="der"&&(q=R.fromCompact(le))}fe=p.fromHex(ae)}catch{return!1}if(!q||ee&&q.hasHighS())return!1;G&&(X=t.hash(X));const{r:ue,s:ne}=q,J=L(X),O=f(ne),H=h(J*O),Y=h(ue*O),se=(te=p.BASE.multiplyAndAddUnsafe(fe,H,Y))==null?void 0:te.toAffine();return se?h(se.x)===ue:!1}return{CURVE:t,getPublicKey:E,getSharedSecret:T,sign:Z,verify:re,ProjectivePoint:p,Signature:R,utils:A}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pM(e){return{hash:e,hmac:(t,...n)=>dO(e,t,RR(...n)),randomBytes:MR}}function yM(e,t){const n=o=>dM({...e,...pM(o)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const mO=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),J2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),gM=BigInt(0),mM=BigInt(1),wb=BigInt(2),Z2=(e,t)=>(e+t/wb)/t;function bM(e){const t=mO,n=BigInt(3),o=BigInt(6),s=BigInt(11),a=BigInt(22),l=BigInt(23),c=BigInt(44),h=BigInt(88),f=e*e*e%t,p=f*f*e%t,y=gi(p,n,t)*p%t,g=gi(y,n,t)*p%t,b=gi(g,wb,t)*f%t,w=gi(b,s,t)*b%t,F=gi(w,a,t)*w%t,I=gi(F,c,t)*F%t,R=gi(I,h,t)*I%t,A=gi(R,c,t)*F%t,E=gi(A,n,t)*p%t,M=gi(E,l,t)*w%t,T=gi(M,o,t)*f%t,z=gi(T,wb,t);if(!vb.eql(vb.sqr(z),e))throw new Error("Cannot find square root");return z}const vb=iw(mO,void 0,void 0,{sqrt:bM}),cf=yM({a:gM,b:BigInt(7),Fp:vb,n:J2,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=J2,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-mM*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,l=BigInt("0x100000000000000000000000000000000"),c=Z2(a*e,t),h=Z2(-o*e,t);let f=On(e-c*n-h*s,t),p=On(-c*o-h*a,t);const y=f>l,g=p>l;if(y&&(f=t-f),g&&(p=t-p),f>l||p>l)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:f,k2neg:g,k2:p}}}},fO),AM=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:cf},Symbol.toStringTag,{value:"Module"})),bO="2.38.0";let nc={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${bO}`};class Je extends Error{constructor(t,n={}){var c;const o=(()=>{var h;return n.cause instanceof Je?n.cause.details:(h=n.cause)!=null&&h.message?n.cause.message:n.details})(),s=n.cause instanceof Je&&n.cause.docsPath||n.docsPath,a=(c=nc.getDocsUrl)==null?void 0:c.call(nc,{...n,docsPath:s}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...o?[`Details: ${o}`]:[],...nc.version?[`Version: ${nc.version}`]:[]].join(`
39
+ `);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=o,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=bO}walk(t){return AO(this,t)}}function AO(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?AO(e.cause,t):t?null:e}class wO extends Je{constructor({max:t,min:n,signed:o,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class wM extends Je{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class vM extends Je{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function ko(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function pr(e){return ko(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Bs(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,o=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)o++;return n=t==="left"?n.slice(o):n.slice(0,n.length-o),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}class vO extends Je{constructor({offset:t,position:n,size:o}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"})}}class xO extends Je{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class eI extends Je{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${n} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"})}}function Ku(e,{dir:t,size:n=32}={}){return typeof e=="string"?Ts(e,{dir:t,size:n}):xM(e,{dir:t,size:n})}function Ts(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new xO({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function xM(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new xO({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let s=0;s<n;s++){const a=t==="right";o[a?s:n-s-1]=e[a?s:e.length-s-1]}return o}const EM=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xi(e,t={}){return typeof e=="number"||typeof e=="bigint"?it(e,t):typeof e=="string"?Nu(e,t):typeof e=="boolean"?EO(e,t):dn(e,t)}function EO(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(to(n,{size:t.size}),Ku(n,{size:t.size})):n}function dn(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=EM[e[s]];const o=`0x${n}`;return typeof t.size=="number"?(to(o,{size:t.size}),Ku(o,{dir:"right",size:t.size})):o}function it(e,t={}){const{signed:n,size:o}=t,s=BigInt(e);let a;o?n?a=(1n<<BigInt(o)*8n-1n)-1n:a=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<l){const h=typeof e=="bigint"?"n":"";throw new wO({max:a?`${a}${h}`:void 0,min:`${l}${h}`,signed:n,size:o,value:`${e}${h}`})}const c=`0x${(n&&s<0?(1n<<BigInt(o*8))+BigInt(s):s).toString(16)}`;return o?Ku(c,{size:o}):c}const SM=new TextEncoder;function Nu(e,t={}){const n=SM.encode(e);return dn(n,t)}const IM=new TextEncoder;function ow(e,t={}){return typeof e=="number"||typeof e=="bigint"?CM(e,t):typeof e=="boolean"?_M(e,t):ko(e)?Bi(e,t):SO(e,t)}function _M(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(to(n,{size:t.size}),Ku(n,{size:t.size})):n}const Eo={zero:48,nine:57,A:65,F:70,a:97,f:102};function tI(e){if(e>=Eo.zero&&e<=Eo.nine)return e-Eo.zero;if(e>=Eo.A&&e<=Eo.F)return e-(Eo.A-10);if(e>=Eo.a&&e<=Eo.f)return e-(Eo.a-10)}function Bi(e,t={}){let n=e;t.size&&(to(n,{size:t.size}),n=Ku(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,a=new Uint8Array(s);for(let l=0,c=0;l<s;l++){const h=tI(o.charCodeAt(c++)),f=tI(o.charCodeAt(c++));if(h===void 0||f===void 0)throw new Je(`Invalid byte sequence ("${o[c-2]}${o[c-1]}" in "${o}").`);a[l]=h*16+f}return a}function CM(e,t){const n=it(e,t);return Bi(n)}function SO(e,t={}){const n=IM.encode(e);return typeof t.size=="number"?(to(n,{size:t.size}),Ku(n,{dir:"right",size:t.size})):n}function to(e,{size:t}){if(pr(e)>t)throw new vM({givenSize:pr(e),maxSize:t})}function Ri(e,t={}){const{signed:n}=t;t.size&&to(e,{size:t.size});const o=BigInt(e);if(!n)return o;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return o<=a?o:o-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function Ji(e,t={}){return Number(Ri(e,t))}async function IO(e,{address:t,blockTag:n="latest",blockNumber:o}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof o=="bigint"?it(o):n]},{dedupe:!!o});return Ji(s)}class ff extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}function FM({r:e,s:t,to:n="hex",v:o,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new cf.Signature(Ri(e),Ri(t)).toCompactHex()}${a===0?"1b":"1c"}`;return n==="hex"?l:Bi(l)}function _O(){return Xi(cf.utils.randomPrivateKey())}class An extends Je{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}const OM=BigInt(0),ic=BigInt(1),TM=BigInt(2),BM=BigInt(7),RM=BigInt(256),MM=BigInt(113),CO=[],FO=[],OO=[];for(let e=0,t=ic,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],CO.push(2*(5*o+n)),FO.push((e+1)*(e+2)/2%64);let s=OM;for(let a=0;a<7;a++)t=(t<<ic^(t>>BM)*MM)%RM,t&TM&&(s^=ic<<(ic<<BigInt(a))-ic);OO.push(s)}const TO=XR(OO,!0),jM=TO[0],UM=TO[1],rI=(e,t,n)=>n>32?eM(e,t,n):JR(e,t,n),nI=(e,t,n)=>n>32?tM(e,t,n):ZR(e,t,n);function NM(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){const c=(l+8)%10,h=(l+2)%10,f=n[h],p=n[h+1],y=rI(f,p,1)^n[c],g=nI(f,p,1)^n[c+1];for(let b=0;b<50;b+=10)e[l+b]^=y,e[l+b+1]^=g}let s=e[2],a=e[3];for(let l=0;l<24;l++){const c=FO[l],h=rI(s,a,c),f=nI(s,a,c),p=CO[l];s=e[p],a=e[p+1],e[p]=h,e[p+1]=f}for(let l=0;l<50;l+=10){for(let c=0;c<10;c++)n[c]=e[l+c];for(let c=0;c<10;c++)e[l+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=jM[o],e[1]^=UM[o]}Uu(n)}class sw extends ew{constructor(t,n,o,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=s,this.rounds=a,Ic(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=CR(this.state)}clone(){return this._cloneInto()}keccak(){q2(this.state32),NM(this.state32,this.rounds),q2(this.state32),this.posOut=0,this.pos=0}update(t){ju(this),t=rp(t),wa(t);const{blockLen:n,state:o}=this,s=t.length;for(let a=0;a<s;){const l=Math.min(n-this.pos,s-a);for(let c=0;c<l;c++)o[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:s}=this;t[o]^=n,(n&128)!==0&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){ju(this,!1),wa(t),this.finish();const n=this.state,{blockLen:o}=this;for(let s=0,a=t.length;s<a;){this.posOut>=o&&this.keccak();const l=Math.min(o-this.posOut,a-s);t.set(n.subarray(this.posOut,this.posOut+l),s),this.posOut+=l,s+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Ic(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(XF(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Uu(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:s,rounds:a,enableXOF:l}=this;return t||(t=new sw(n,o,s,l,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=o,t.outputLen=s,t.enableXOF=l,t.destroyed=this.destroyed,t}}const DM=(e,t,n)=>JF(()=>new sw(t,e,n)),PM=DM(1,136,256/8);function Vn(e,t){const n=t||"hex",o=PM(ko(e,{strict:!1})?ow(e):e);return n==="bytes"?o:Xi(o)}const Am=new ff(8192);function hf(e,t){if(Am.has(`${e}.${t}`))return Am.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=Vn(SO(n),"bytes"),s=n.split("");for(let l=0;l<40;l+=2)o[l>>1]>>4>=8&&s[l]&&(s[l]=s[l].toUpperCase()),(o[l>>1]&15)>=8&&s[l+1]&&(s[l+1]=s[l+1].toUpperCase());const a=`0x${s.join("")}`;return Am.set(`${e}.${t}`,a),a}function kM(e,t){if(!Hr(e,{strict:!1}))throw new An({address:e});return hf(e,t)}const LM=/^0x[a-fA-F0-9]{40}$/,wm=new ff(8192);function Hr(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(wm.has(o))return wm.get(o);const s=LM.test(e)?e.toLowerCase()===e?!0:n?hf(e)===e:!0:!1;return wm.set(o,s),s}function $M(e){if(typeof e=="string"){if(!Hr(e,{strict:!1}))throw new An({address:e});return{address:e,type:"json-rpc"}}if(!Hr(e.address,{strict:!1}))throw new An({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,signAuthorization:e.signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}function BO(e){const t=Vn(`0x${e.substring(4)}`).substring(26);return hf(`0x${t}`)}let vm=!1;async function df({hash:e,privateKey:t,to:n="object"}){const{r:o,s,recovery:a}=cf.sign(e.slice(2),t.slice(2),{lowS:!0,extraEntropy:ko(vm,{strict:!1})?Bi(vm):vm}),l={r:it(o,{size:32}),s:it(s,{size:32}),v:a?28n:27n,yParity:a};return n==="bytes"||n==="hex"?FM({...l,to:n}):l}function Zi(e){return typeof e[0]=="string"?Rs(e):zM(e)}function zM(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let o=0;for(const s of e)n.set(s,o),o+=s.length;return n}function Rs(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class iI extends Je{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class qM extends Je{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class HM extends Je{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const QM={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new HM({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new qM({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new iI({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new iI({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function aw(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(QM);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function va(e,t="hex"){const n=RO(e),o=aw(new Uint8Array(n.length));return n.encode(o),t==="hex"?dn(o.bytes):o.bytes}function RO(e){return Array.isArray(e)?GM(e.map(t=>RO(t))):KM(e)}function GM(e){const t=e.reduce((s,a)=>s+a.length,0),n=MO(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function KM(e){const t=typeof e=="string"?Bi(e):e,n=MO(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function MO(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new Je("Length is too large.")}function jO(e){const{chainId:t,nonce:n,to:o}=e,s=e.contractAddress??e.address,a=Vn(Rs(["0x05",va([t?it(t):"0x",s,n?it(n):"0x"])]));return o==="bytes"?Bi(a):a}async function YM(e){const{chainId:t,nonce:n,privateKey:o,to:s="object"}=e,a=e.contractAddress??e.address,l=await df({hash:jO({address:a,chainId:t,nonce:n}),privateKey:o,to:s});return s==="object"?{address:a,chainId:t,nonce:n,...l}:l}const VM=`Ethereum Signed Message:
40
+ `;function WM(e){const t=typeof e=="string"?Nu(e):typeof e.raw=="string"?e.raw:dn(e.raw),n=Nu(`${VM}${pr(t)}`);return Zi([n,t])}function XM(e,t){return Vn(WM(e),t)}async function JM({message:e,privateKey:t}){return await df({hash:XM(e),privateKey:t,to:"hex"})}const ZM={gwei:9,wei:18},ej={ether:-9,wei:9};function UO(e,t){let n=e.toString();const o=n.startsWith("-");o&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${a?`.${a}`:""}`}function NO(e,t="wei"){return UO(e,ZM[t])}function Ti(e,t="wei"){return UO(e,ej[t])}function op(e){const t=Object.entries(e).map(([o,s])=>s===void 0||s===!1?null:[o,s]).filter(Boolean),n=t.reduce((o,[s])=>Math.max(o,s.length),0);return t.map(([o,s])=>` ${`${o}:`.padEnd(n+1)} ${s}`).join(`
41
+ `)}class tj extends Je{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
42
+ `),{name:"FeeConflictError"})}}class rj extends Je{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class nj extends Je{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",op(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ij extends Je{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class oj extends Je{constructor(t,{account:n,docsPath:o,chain:s,data:a,gas:l,gasPrice:c,maxFeePerGas:h,maxPriorityFeePerGas:f,nonce:p,to:y,value:g}){var w;const b=op({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:n==null?void 0:n.address,to:y,value:typeof g<"u"&&`${NO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:a,gas:l,gasPrice:typeof c<"u"&&`${Ti(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Ti(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Ti(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class DO extends Je{constructor({blockHash:t,blockNumber:n,blockTag:o,hash:s,index:a}){let l="Transaction";o&&a!==void 0&&(l=`Transaction at block time "${o}" at index "${a}"`),t&&a!==void 0&&(l=`Transaction at block hash "${t}" at index "${a}"`),n&&a!==void 0&&(l=`Transaction at block number "${n}" at index "${a}"`),s&&(l=`Transaction with hash "${s}"`),super(`${l} could not be found.`,{name:"TransactionNotFoundError"})}}class PO extends Je{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class sj extends Je{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function aj(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:o,nonce:s,...a}=n,l=n.address;t.push([o?Xi(o):"0x",l,s?Xi(s):"0x",...pf({},a)])}return t}function uw(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(a=>Bi(a)):e.blobs,s=[];for(const a of o)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return n==="bytes"?s:s.map(a=>dn(a))}function lw(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(l=>Bi(l)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(l=>Bi(l)):e.commitments,a=[];for(let l=0;l<o.length;l++){const c=o[l],h=s[l];a.push(Uint8Array.from(t.computeBlobKzgProof(c,h)))}return n==="bytes"?a:a.map(l=>dn(l))}const xb=fO;function uj(e,t){return xb(ko(e,{strict:!1})?ow(e):e)}function lj(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=uj(t);return s.set([n],0),o==="bytes"?s:dn(s)}function kO(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(lj({commitment:a,to:o,version:n}));return s}const oI=6,LO=32,cw=4096,$O=LO*cw,sI=$O*oI-1-1*cw*oI,zO=1;class cj extends Je{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class qO extends Je{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class fj extends Je{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class hj extends Je{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${zO}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function dj(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Bi(e.data):e.data,o=pr(n);if(!o)throw new qO;if(o>sI)throw new cj({maxSize:sI,size:o});const s=[];let a=!0,l=0;for(;a;){const c=aw(new Uint8Array($O));let h=0;for(;h<cw;){const f=n.slice(l,l+(LO-1));if(c.pushByte(0),c.pushBytes(f),f.length<31){c.pushByte(128),a=!1;break}h++,l+=31}s.push(c)}return t==="bytes"?s.map(c=>c.bytes):s.map(c=>dn(c.bytes))}function HO(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??dj({data:t,to:o}),a=e.commitments??uw({blobs:s,kzg:n,to:o}),l=e.proofs??lw({blobs:s,commitments:a,kzg:n,to:o}),c=[];for(let h=0;h<s.length;h++)c.push({blob:s[h],commitment:a[h],proof:l[h]});return c}const sp=2n**256n-1n;class pj extends Je{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class yj extends Je{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
43
+ `),{name:"ChainNotFoundError"})}}class ap extends Je{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Iu extends Je{constructor({cause:t,message:n}={}){var s;const o=(s=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Iu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Iu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class xa extends Je{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ti(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(xa,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Eb extends Je{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ti(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Eb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Sb extends Je{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Sb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Ib extends Je{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
44
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Ib,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class _b extends Je{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(_b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Cb extends Je{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
45
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Cb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Fb extends Je{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Fb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Ob extends Je{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Ob,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Tb extends Je{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Tb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Fc extends Je{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Ti(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${Ti(o)} gwei`:""}).`].join(`
46
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Fc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class fw extends Je{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Oc(e,t,n,{strict:o}={}){return ko(e,{strict:!1})?Bb(e,t,n,{strict:o}):KO(e,t,n,{strict:o})}function QO(e,t){if(typeof t=="number"&&t>0&&t>pr(e)-1)throw new vO({offset:t,position:"start",size:pr(e)})}function GO(e,t,n){if(typeof t=="number"&&typeof n=="number"&&pr(e)!==n-t)throw new vO({offset:n,position:"end",size:pr(e)})}function KO(e,t,n,{strict:o}={}){QO(e,t);const s=e.slice(t,n);return o&&GO(s,t,n),s}function Bb(e,t,n,{strict:o}={}){QO(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&GO(s,t,n),s}function gj(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:o}=n,s=n.address;if(!Hr(s))throw new An({address:s});if(o<0)throw new ap({chainId:o})}hw(e)}function mj(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new qO;for(const n of t){const o=pr(n),s=Ji(Oc(n,0,1));if(o!==32)throw new fj({hash:n,size:o});if(s!==zO)throw new hj({hash:n,version:s})}}hw(e)}function hw(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new ap({chainId:t});if(s&&!Hr(s))throw new An({address:s});if(o&&o>sp)throw new xa({maxFeePerGas:o});if(n&&o&&n>o)throw new Fc({maxFeePerGas:o,maxPriorityFeePerGas:n})}function bj(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:a}=e;if(t<=0)throw new ap({chainId:t});if(a&&!Hr(a))throw new An({address:a});if(n||s)throw new Je("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>sp)throw new xa({maxFeePerGas:o})}function Aj(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:a}=e;if(a&&!Hr(a))throw new An({address:a});if(typeof t<"u"&&t<=0)throw new ap({chainId:t});if(n||s)throw new Je("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>sp)throw new xa({maxFeePerGas:o})}function YO(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new nj({transaction:e})}function up(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:o,storageKeys:s}=e[n];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new ij({storageKey:s[a]});if(!Hr(o,{strict:!1}))throw new An({address:o});t.push([o,s])}return t}function wj(e,t){const n=YO(e);return n==="eip1559"?Ej(e,t):n==="eip2930"?Sj(e,t):n==="eip4844"?xj(e,t):n==="eip7702"?vj(e,t):Ij(e,t)}function vj(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:a,to:l,value:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;gj(e);const g=up(p),b=aj(n);return Rs(["0x04",va([it(o),a?it(a):"0x",f?it(f):"0x",h?it(h):"0x",s?it(s):"0x",l??"0x",c?it(c):"0x",y??"0x",g,b,...pf(e,t)])])}function xj(e,t){const{chainId:n,gas:o,nonce:s,to:a,value:l,maxFeePerBlobGas:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;mj(e);let g=e.blobVersionedHashes,b=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof b>"u")){const E=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>dn(z)),M=e.kzg,T=uw({blobs:E,kzg:M});if(typeof g>"u"&&(g=kO({commitments:T})),typeof b>"u"){const z=lw({blobs:E,commitments:T,kzg:M});b=HO({blobs:E,commitments:T,proofs:z})}}const w=up(p),F=[it(n),s?it(s):"0x",f?it(f):"0x",h?it(h):"0x",o?it(o):"0x",a??"0x",l?it(l):"0x",y??"0x",w,c?it(c):"0x",g??[],...pf(e,t)],I=[],R=[],A=[];if(b)for(let E=0;E<b.length;E++){const{blob:M,commitment:T,proof:z}=b[E];I.push(M),R.push(T),A.push(z)}return Rs(["0x03",va(b?[F,I,R,A]:F)])}function Ej(e,t){const{chainId:n,gas:o,nonce:s,to:a,value:l,maxFeePerGas:c,maxPriorityFeePerGas:h,accessList:f,data:p}=e;hw(e);const y=up(f),g=[it(n),s?it(s):"0x",h?it(h):"0x",c?it(c):"0x",o?it(o):"0x",a??"0x",l?it(l):"0x",p??"0x",y,...pf(e,t)];return Rs(["0x02",va(g)])}function Sj(e,t){const{chainId:n,gas:o,data:s,nonce:a,to:l,value:c,accessList:h,gasPrice:f}=e;bj(e);const p=up(h),y=[it(n),a?it(a):"0x",f?it(f):"0x",o?it(o):"0x",l??"0x",c?it(c):"0x",s??"0x",p,...pf(e,t)];return Rs(["0x01",va(y)])}function Ij(e,t){const{chainId:n=0,gas:o,data:s,nonce:a,to:l,value:c,gasPrice:h}=e;Aj(e);let f=[a?it(a):"0x",h?it(h):"0x",o?it(o):"0x",l??"0x",c?it(c):"0x",s??"0x"];if(t){const p=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const b=27n+(t.v===27n?0n:1n);if(t.v!==b)throw new rj({v:t.v});return b})(),y=Bs(t.r),g=Bs(t.s);f=[...f,it(p),y==="0x00"?"0x":y,g==="0x00"?"0x":g]}else n>0&&(f=[...f,it(n),"0x","0x"]);return va(f)}function pf(e,t){const n=t??e,{v:o,yParity:s}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof o>"u"&&typeof s>"u")return[];const a=Bs(n.r),l=Bs(n.s);return[typeof s=="number"?s?it(1):"0x":o===0n?"0x":o===1n?it(1):o===27n?"0x":it(1),a==="0x00"?"0x":a,l==="0x00"?"0x":l]}async function _j(e){const{privateKey:t,transaction:n,serializer:o=wj}=e,s=n.type==="eip4844"?{...n,sidecars:!1}:n,a=await df({hash:Vn(await o(s)),privateKey:t});return await o(n,a)}function Du(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Pj(e.type);return`${e.name}(${dw(e.inputs,{includeName:t})})`}function dw(e,{includeName:t=!1}={}){return e?e.map(n=>Cj(n,{includeName:t})).join(t?", ":","):""}function Cj(e,{includeName:t}){return e.type.startsWith("tuple")?`(${dw(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Fj extends Je{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
47
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class aI extends Je{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
48
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Oj extends Je{constructor({data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
49
+ `),{metaMessages:[`Params: (${dw(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=o}}class pw extends Je{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Tj extends Je{constructor({expectedLength:t,givenLength:n,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
50
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class Bj extends Je{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${pr(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Rj extends Je{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
51
+ `),{name:"AbiEncodingLengthMismatchError"})}}class VO extends Je{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
52
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class uI extends Je{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
53
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class Mj extends Je{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Du(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Du(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class jj extends Je{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class Uj extends Je{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
54
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Nj extends Je{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
55
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}class Dj extends Je{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
56
+ `),{name:"InvalidArrayError"})}}class Pj extends Je{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
57
+ `),{name:"InvalidDefinitionTypeError"})}}const kj=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,WO=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function lp(e,t){if(e.length!==t.length)throw new Rj({expectedLength:e.length,givenLength:t.length});const n=Lj({params:e,values:t}),o=gw(n);return o.length===0?"0x":o}function Lj({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(yw({param:e[o],value:t[o]}));return n}function yw({param:e,value:t}){const n=mw(e.type);if(n){const[o,s]=n;return zj(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return Kj(t,{param:e});if(e.type==="address")return $j(t);if(e.type==="bool")return Hj(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=WO.exec(e.type)??[];return Qj(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return qj(t,{param:e});if(e.type==="string")return Gj(t);throw new Uj(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function gw(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:l,encoded:c}=e[a];l?t+=32:t+=pr(c)}const n=[],o=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:l,encoded:c}=e[a];l?(n.push(it(t+s,{size:32})),o.push(c),s+=pr(c)):n.push(c)}return Zi([...n,...o])}function $j(e){if(!Hr(e))throw new An({address:e});return{dynamic:!1,encoded:Ts(e.toLowerCase())}}function zj(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new Dj(e);if(!o&&e.length!==t)throw new Tj({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const a=[];for(let l=0;l<e.length;l++){const c=yw({param:n,value:e[l]});c.dynamic&&(s=!0),a.push(c)}if(o||s){const l=gw(a);if(o){const c=it(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Zi([c,l]):c}}if(s)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:Zi(a.map(({encoded:l})=>l))}}function qj(e,{param:t}){const[,n]=t.type.split("bytes"),o=pr(e);if(!n){let s=e;return o%32!==0&&(s=Ts(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Zi([Ts(it(o,{size:32})),s])}}if(o!==Number.parseInt(n,10))throw new Bj({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Ts(e,{dir:"right"})}}function Hj(e){if(typeof e!="boolean")throw new Je(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ts(EO(e))}}function Qj(e,{signed:t,size:n=256}){if(typeof n=="number"){const o=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-o-1n:0n;if(e>o||e<s)throw new wO({max:o.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:it(e,{size:32,signed:t})}}function Gj(e){const t=Nu(e),n=Math.ceil(pr(t)/32),o=[];for(let s=0;s<n;s++)o.push(Ts(Oc(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Zi([Ts(it(pr(t),{size:32})),...o])}}function Kj(e,{param:t}){let n=!1;const o=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],l=Array.isArray(e)?s:a.name,c=yw({param:a,value:e[l]});o.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?gw(o):Zi(o.map(({encoded:s})=>s))}}function mw(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Mn=(e,t,n)=>JSON.stringify(e,(o,s)=>typeof s=="bigint"?s.toString():s,n);class Yj extends Je{constructor({domain:t}){super(`Invalid domain "${Mn(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Vj extends Je{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class Wj extends Je{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Xj(e){const{domain:t,message:n,primaryType:o,types:s}=e,a=(h,f)=>{const p={...f};for(const y of h){const{name:g,type:b}=y;b==="address"&&(p[g]=p[g].toLowerCase())}return p},l=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},c=(()=>{if(o!=="EIP712Domain")return a(s[o],n)})();return Mn({domain:l,message:c,primaryType:o,types:s})}function XO(e){const{domain:t,message:n,primaryType:o,types:s}=e,a=(l,c)=>{for(const h of l){const{name:f,type:p}=h,y=c[f],g=p.match(WO);if(g&&(typeof y=="number"||typeof y=="bigint")){const[F,I,R]=g;it(y,{signed:I==="int",size:Number.parseInt(R,10)/8})}if(p==="address"&&typeof y=="string"&&!Hr(y))throw new An({address:y});const b=p.match(kj);if(b){const[F,I]=b;if(I&&pr(y)!==Number.parseInt(I,10))throw new jj({expectedSize:Number.parseInt(I,10),givenSize:pr(y)})}const w=s[p];w&&(Jj(p),a(w,y))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new Yj({domain:t});a(s.EIP712Domain,t)}if(o!=="EIP712Domain")if(s[o])a(s[o],n);else throw new Vj({primaryType:o,types:s})}function JO({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function Jj(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Wj({type:e})}function Zj(e){const{domain:t={},message:n,primaryType:o}=e,s={EIP712Domain:JO({domain:t}),...e.types};XO({domain:t,message:n,primaryType:o,types:s});const a=["0x1901"];return t&&a.push(eU({domain:t,types:s})),o!=="EIP712Domain"&&a.push(ZO({data:n,primaryType:o,types:s})),Vn(Zi(a))}function eU({domain:e,types:t}){return ZO({data:e,primaryType:"EIP712Domain",types:t})}function ZO({data:e,primaryType:t,types:n}){const o=eT({data:e,primaryType:t,types:n});return Vn(o)}function eT({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],s=[tU({primaryType:t,types:n})];for(const a of n[t]){const[l,c]=rT({types:n,name:a.name,type:a.type,value:e[a.name]});o.push(l),s.push(c)}return lp(o,s)}function tU({primaryType:e,types:t}){const n=Xi(rU({primaryType:e,types:t}));return Vn(n)}function rU({primaryType:e,types:t}){let n="";const o=tT({primaryType:e,types:t});o.delete(e);const s=[e,...Array.from(o).sort()];for(const a of s)n+=`${a}(${t[a].map(({name:l,type:c})=>`${c} ${l}`).join(",")})`;return n}function tT({primaryType:e,types:t},n=new Set){const o=e.match(/^\w*/u),s=o==null?void 0:o[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const a of t[s])tT({primaryType:a.type,types:t},n);return n}function rT({types:e,name:t,type:n,value:o}){if(e[n]!==void 0)return[{type:"bytes32"},Vn(eT({data:o,primaryType:n,types:e}))];if(n==="bytes")return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},Vn(o)];if(n==="string")return[{type:"bytes32"},Vn(Xi(o))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),a=o.map(l=>rT({name:t,type:s,types:e,value:l}));return[{type:"bytes32"},Vn(lp(a.map(([l])=>l),a.map(([,l])=>l)))]}return[{type:n},o]}async function nU(e){const{privateKey:t,...n}=e;return await df({hash:Zj(n),privateKey:t,to:"hex"})}function Ki(e,t={}){const{nonceManager:n}=t,o=Xi(cf.getPublicKey(e.slice(2),!1)),s=BO(o);return{...$M({address:s,nonceManager:n,async sign({hash:l}){return df({hash:l,privateKey:e,to:"hex"})},async signAuthorization(l){return YM({...l,privateKey:e})},async signMessage({message:l}){return JM({message:l,privateKey:e})},async signTransaction(l,{serializer:c}={}){return _j({privateKey:e,transaction:l,serializer:c})},async signTypedData(l){return nU({...l,privateKey:e})}}),publicKey:o,source:"privateKey"}}function wn(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}function iU(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const lI=/^tuple(?<array>(\[(\d*)\])*)$/;function Rb(e){let t=e.type;if(lI.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const a=e.components[s];t+=Rb(a),s<n-1&&(t+=", ")}const o=iU(lI,e.type);return t+=`)${(o==null?void 0:o.array)??""}`,Rb({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function oc(e){let t="";const n=e.length;for(let o=0;o<n;o++){const s=e[o];t+=Rb(s),o!==n-1&&(t+=", ")}return t}function oU(e){var t;return e.type==="function"?`function ${e.name}(${oc(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${oc(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${oc(e.inputs)})`:e.type==="error"?`error ${e.name}(${oc(e.inputs)})`:e.type==="constructor"?`constructor(${oc(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function Yt(e,t,n){const o=e[t.name];if(typeof o=="function")return o;const s=e[n];return typeof s=="function"?s:a=>t(e,a)}const sU=e=>Vn(ow(e));function aU(e){return sU(e)}function uU(e){let t=!0,n="",o=0,s="",a=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&o++,c===")"&&o--,!!t){if(o===0){if(c===" "&&["event","function",""].includes(s))s="";else if(s+=c,c===")"){a=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=c,n+=c}}if(!a)throw new Je("Unable to normalize signature.");return s}const lU=e=>{const t=typeof e=="string"?e:oU(e);return uU(t)};function nT(e){return aU(lU(e))}const cU=nT,bw=e=>Oc(nT(e),0,4);function iT(e){const{abi:t,args:n=[],name:o}=e,s=ko(o,{strict:!1}),a=t.filter(c=>s?c.type==="function"?bw(c)===o:c.type==="event"?cU(c)===o:!1:"name"in c&&c.name===o);if(a.length===0)return;if(a.length===1)return a[0];let l;for(const c of a){if(!("inputs"in c))continue;if(!n||n.length===0){if(!c.inputs||c.inputs.length===0)return c;continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==n.length)continue;if(n.every((f,p)=>{const y="inputs"in c&&c.inputs[p];return y?Mb(f,y):!1})){if(l&&"inputs"in l&&l.inputs){const f=oT(c.inputs,l.inputs,n);if(f)throw new Mj({abiItem:c,type:f[0]},{abiItem:l,type:f[1]})}l=c}}return l||a[0]}function Mb(e,t){const n=typeof e,o=t.type;switch(o){case"address":return Hr(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>Mb(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(s=>Mb(s,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function oT(e,t,n){for(const o in e){const s=e[o],a=t[o];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return oT(s.components,a.components,n[o]);const l=[s.type,a.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?Hr(n[o],{strict:!1}):l.includes("address")&&l.includes("bytes")?Hr(n[o],{strict:!1}):!1)return l}}const cI="/docs/contract/encodeFunctionData";function fU(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const a=iT({abi:t,args:n,name:o});if(!a)throw new uI(o,{docsPath:cI});s=a}if(s.type!=="function")throw new uI(void 0,{docsPath:cI});return{abi:[s],functionName:bw(Du(s))}}function sT(e){const{args:t}=e,{abi:n,functionName:o}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:fU(e)})(),s=n[0],a=o,l="inputs"in s&&s.inputs?lp(s.inputs,t??[]):void 0;return Rs([a,l??"0x"])}const hU={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},dU={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},pU={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function yU(e,t={}){typeof t.size<"u"&&to(e,{size:t.size});const n=dn(e,t);return Ri(n,t)}function gU(e,t={}){let n=e;if(typeof t.size<"u"&&(to(n,{size:t.size}),n=Bs(n)),n.length>1||n[0]>1)throw new wM(n);return!!n[0]}function Po(e,t={}){typeof t.size<"u"&&to(e,{size:t.size});const n=dn(e,t);return Ji(n,t)}function mU(e,t={}){let n=e;return typeof t.size<"u"&&(to(n,{size:t.size}),n=Bs(n,{dir:"right"})),new TextDecoder().decode(n)}function bU(e,t){const n=typeof t=="string"?Bi(t):t,o=aw(n);if(pr(n)===0&&e.length>0)throw new pw;if(pr(t)&&pr(t)<32)throw new Oj({data:typeof t=="string"?t:dn(t),params:e,size:pr(t)});let s=0;const a=[];for(let l=0;l<e.length;++l){const c=e[l];o.setPosition(s);const[h,f]=Tu(o,c,{staticPosition:0});s+=f,a.push(h)}return a}function Tu(e,t,{staticPosition:n}){const o=mw(t.type);if(o){const[s,a]=o;return wU(e,{...t,type:a},{length:s,staticPosition:n})}if(t.type==="tuple")return SU(e,t,{staticPosition:n});if(t.type==="address")return AU(e);if(t.type==="bool")return vU(e);if(t.type.startsWith("bytes"))return xU(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return EU(e,t);if(t.type==="string")return IU(e,{staticPosition:n});throw new Nj(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const fI=32,jb=32;function AU(e){const t=e.readBytes(32);return[hf(dn(KO(t,-20))),32]}function wU(e,t,{length:n,staticPosition:o}){if(!n){const l=Po(e.readBytes(jb)),c=o+l,h=c+fI;e.setPosition(c);const f=Po(e.readBytes(fI)),p=Tc(t);let y=0;const g=[];for(let b=0;b<f;++b){e.setPosition(h+(p?b*32:y));const[w,F]=Tu(e,t,{staticPosition:h});y+=F,g.push(w)}return e.setPosition(o+32),[g,32]}if(Tc(t)){const l=Po(e.readBytes(jb)),c=o+l,h=[];for(let f=0;f<n;++f){e.setPosition(c+f*32);const[p]=Tu(e,t,{staticPosition:c});h.push(p)}return e.setPosition(o+32),[h,32]}let s=0;const a=[];for(let l=0;l<n;++l){const[c,h]=Tu(e,t,{staticPosition:o+s});s+=h,a.push(c)}return[a,s]}function vU(e){return[gU(e.readBytes(32),{size:32}),32]}function xU(e,t,{staticPosition:n}){const[o,s]=t.type.split("bytes");if(!s){const l=Po(e.readBytes(32));e.setPosition(n+l);const c=Po(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const h=e.readBytes(c);return e.setPosition(n+32),[dn(h),32]}return[dn(e.readBytes(Number.parseInt(s,10),32)),32]}function EU(e,t){const n=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[o>48?yU(s,{signed:n}):Po(s,{signed:n}),32]}function SU(e,t,{staticPosition:n}){const o=t.components.length===0||t.components.some(({name:l})=>!l),s=o?[]:{};let a=0;if(Tc(t)){const l=Po(e.readBytes(jb)),c=n+l;for(let h=0;h<t.components.length;++h){const f=t.components[h];e.setPosition(c+a);const[p,y]=Tu(e,f,{staticPosition:c});a+=y,s[o?h:f==null?void 0:f.name]=p}return e.setPosition(n+32),[s,32]}for(let l=0;l<t.components.length;++l){const c=t.components[l],[h,f]=Tu(e,c,{staticPosition:n});s[o?l:c==null?void 0:c.name]=h,a+=f}return[s,a]}function IU(e,{staticPosition:t}){const n=Po(e.readBytes(32)),o=t+n;e.setPosition(o);const s=Po(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),l=mU(Bs(a));return e.setPosition(t+32),[l,32]}function Tc(e){var o;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(o=e.components)==null?void 0:o.some(Tc);const n=mw(e.type);return!!(n&&Tc({...e,type:n[1]}))}function _U(e){const{abi:t,data:n}=e,o=Oc(n,0,4);if(o==="0x")throw new pw;const a=[...t||[],dU,pU].find(l=>l.type==="error"&&o===bw(Du(l)));if(!a)throw new VO(o,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?bU(a.inputs,Oc(n,4)):void 0,errorName:a.name}}function aT({abiItem:e,args:t,includeFunctionName:n=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((s,a)=>`${o&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?Mn(t[a]):t[a]}`).join(", ")})`}class CU extends Je{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class FU extends Je{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}const OU=e=>e,Aw=e=>e;class TU extends Je{constructor(t,{abi:n,args:o,contractAddress:s,docsPath:a,functionName:l,sender:c}){const h=iT({abi:n,args:o,name:l}),f=h?aT({abiItem:h,args:o,includeFunctionName:!1,includeName:!1}):void 0,p=h?Du(h,{includeName:!0}):void 0,y=op({address:s&&OU(s),function:p,args:f&&f!=="()"&&`${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${f}`,sender:c});super(t.shortMessage||`An unknown error occurred while executing the contract function "${l}".`,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],y&&"Contract Call:",y].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=o,this.cause=t,this.contractAddress=s,this.functionName=l,this.sender=c}}class BU extends Je{constructor({abi:t,data:n,functionName:o,message:s}){let a,l,c,h;if(n&&n!=="0x")try{l=_U({abi:t,data:n});const{abiItem:p,errorName:y,args:g}=l;if(y==="Error")h=g[0];else if(y==="Panic"){const[b]=g;h=hU[b]}else{const b=p?Du(p,{includeName:!0}):void 0,w=p&&g?aT({abiItem:p,args:g,includeFunctionName:!1,includeName:!1}):void 0;c=[b?`Error: ${b}`:"",w&&w!=="()"?` ${[...Array((y==null?void 0:y.length)??0).keys()].map(()=>" ").join("")}${w}`:""]}}catch(p){a=p}else s&&(h=s);let f;a instanceof VO&&(f=a.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${f}.`]),super(h&&h!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,h||f].join(`
58
+ `):`The contract function "${o}" reverted.`,{cause:a,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=l,this.raw=n,this.reason=h,this.signature=f}}class RU extends Je{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class MU extends Je{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class bc extends Je{constructor({body:t,cause:n,details:o,headers:s,status:a,url:l}){super("HTTP request failed.",{cause:n,details:o,metaMessages:[a&&`Status: ${a}`,`URL: ${Aw(l)}`,t&&`Request body: ${Mn(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=s,this.status=a,this.url=l}}class ww extends Je{constructor({body:t,error:n,url:o}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Aw(o)}`,`Request body: ${Mn(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}class hI extends Je{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Aw(n)}`,`Request body: ${Mn(t)}`],name:"TimeoutError"})}}const jU=-1;class Pn extends Je{constructor(t,{code:n,docsPath:o,metaMessages:s,name:a,shortMessage:l}){super(l,{cause:t,docsPath:o,metaMessages:s||(t==null?void 0:t.metaMessages),name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||t.name,this.code=t instanceof ww?t.code:n??jU}}class ri extends Pn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class Bc extends Pn{constructor(t){super(t,{code:Bc.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Rc extends Pn{constructor(t){super(t,{code:Rc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Mc extends Pn{constructor(t,{method:n}={}){super(t,{code:Mc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(Mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class jc extends Pn{constructor(t){super(t,{code:jc.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
59
+ `)})}}Object.defineProperty(jc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ea extends Pn{constructor(t){super(t,{code:Ea.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Uc extends Pn{constructor(t){super(t,{code:Uc.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
60
+ `)})}}Object.defineProperty(Uc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Nc extends Pn{constructor(t){super(t,{code:Nc.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Dc extends Pn{constructor(t){super(t,{code:Dc.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Dc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Pc extends Pn{constructor(t){super(t,{code:Pc.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class ha extends Pn{constructor(t,{method:n}={}){super(t,{code:ha.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(ha,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Pu extends Pn{constructor(t){super(t,{code:Pu.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Pu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class kc extends Pn{constructor(t){super(t,{code:kc.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Bu extends ri{constructor(t){super(t,{code:Bu.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Bu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Lc extends ri{constructor(t){super(t,{code:Lc.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Lc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class $c extends ri{constructor(t,{method:n}={}){super(t,{code:$c.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty($c,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class zc extends ri{constructor(t){super(t,{code:zc.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(zc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class qc extends ri{constructor(t){super(t,{code:qc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(qc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Hc extends ri{constructor(t){super(t,{code:Hc.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Hc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ku extends ri{constructor(t){super(t,{code:ku.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(ku,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Qc extends ri{constructor(t){super(t,{code:Qc.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Qc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class Gc extends ri{constructor(t){super(t,{code:Gc.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(Gc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Kc extends ri{constructor(t){super(t,{code:Kc.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Yc extends ri{constructor(t){super(t,{code:Yc.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Yc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Vc extends ri{constructor(t){super(t,{code:Vc.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Vc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Lu extends ri{constructor(t){super(t,{code:Lu.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Lu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class UU extends Pn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const NU=3;function DU(e,{abi:t,address:n,args:o,docsPath:s,functionName:a,sender:l}){const c=e instanceof MU?e:e instanceof Je?e.walk(w=>"data"in w)||e.walk():{},{code:h,data:f,details:p,message:y,shortMessage:g}=c,b=e instanceof pw?new RU({functionName:a}):[NU,Ea.code].includes(h)&&(f||p||y||g)?new BU({abi:t,data:typeof f=="object"?f.data:f,functionName:a,message:c instanceof ww?p:g??y}):e;return new TU(b,{abi:t,args:o,contractAddress:n,docsPath:s,functionName:a,sender:l})}const PU="modulepreload",kU=function(e){return"/"+e},dI={},LU=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=l(n.map(f=>{if(f=kU(f),f in dI)return;dI[f]=!0;const p=f.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":PU,p||(g.as="script"),g.crossOrigin="",g.href=f,h&&g.setAttribute("nonce",h),document.head.appendChild(g),p)return new Promise((b,w)=>{g.addEventListener("load",b),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return s.then(l=>{for(const c of l||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})};async function $U({hash:e,signature:t}){const n=ko(e)?e:Xi(e),{secp256k1:o}=await LU(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>AM);return{secp256k1:l}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:p,v:y,yParity:g}=t,b=Number(g??y),w=pI(b);return new o.Signature(Ri(f),Ri(p)).addRecoveryBit(w)}const l=ko(t)?t:Xi(t);if(pr(l)!==65)throw new Error("invalid signature length");const c=Ji(`0x${l.slice(130)}`),h=pI(c);return o.Signature.fromCompact(l.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function pI(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function zU({hash:e,signature:t}){return BO(await $U({hash:e,signature:t}))}async function vw(e){const{authorization:t,signature:n}=e;return zU({hash:jO(t),signature:n??t})}class qU extends Je{constructor(t,{account:n,docsPath:o,chain:s,data:a,gas:l,gasPrice:c,maxFeePerGas:h,maxPriorityFeePerGas:f,nonce:p,to:y,value:g}){var w;const b=op({from:n==null?void 0:n.address,to:y,value:typeof g<"u"&&`${NO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:a,gas:l,gasPrice:typeof c<"u"&&`${Ti(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Ti(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Ti(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function uT(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof Je?e.walk(s=>(s==null?void 0:s.code)===Iu.code):e;return o instanceof Je?new Iu({cause:e,message:o.details}):Iu.nodeMessage.test(n)?new Iu({cause:e,message:e.details}):xa.nodeMessage.test(n)?new xa({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Eb.nodeMessage.test(n)?new Eb({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Sb.nodeMessage.test(n)?new Sb({cause:e,nonce:t==null?void 0:t.nonce}):Ib.nodeMessage.test(n)?new Ib({cause:e,nonce:t==null?void 0:t.nonce}):_b.nodeMessage.test(n)?new _b({cause:e,nonce:t==null?void 0:t.nonce}):Cb.nodeMessage.test(n)?new Cb({cause:e}):Fb.nodeMessage.test(n)?new Fb({cause:e,gas:t==null?void 0:t.gas}):Ob.nodeMessage.test(n)?new Ob({cause:e,gas:t==null?void 0:t.gas}):Tb.nodeMessage.test(n)?new Tb({cause:e}):Fc.nodeMessage.test(n)?new Fc({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new fw({cause:e})}function HU(e,{docsPath:t,...n}){const o=(()=>{const s=uT(e,n);return s instanceof fw?e:s})();return new qU(o,{docsPath:t,...n})}function xw(e,{format:t}){if(!t)return{};const n={};function o(a){const l=Object.keys(a);for(const c of l)c in e&&(n[c]=e[c]),a[c]&&typeof a[c]=="object"&&!Array.isArray(a[c])&&o(a[c])}const s=t(e||{});return o(s),n}const QU={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function cp(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=GU(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(o=>dn(o)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=it(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=it(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=it(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=it(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=it(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=it(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=QU[e.type]),typeof e.value<"u"&&(n.value=it(e.value)),n}function GU(e){return e.map(t=>({address:t.address,r:t.r?it(BigInt(t.r)):t.r,s:t.s?it(BigInt(t.s)):t.s,chainId:it(t.chainId),nonce:it(t.nonce),...typeof t.yParity<"u"?{yParity:it(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:it(t.v)}:{}}))}function yI(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:o})=>{if(n.length!==66)throw new eI({size:n.length,targetSize:66,type:"hex"});if(o.length!==66)throw new eI({size:o.length,targetSize:66,type:"hex"});return t[n]=o,t},{})}function KU(e){const{balance:t,nonce:n,state:o,stateDiff:s,code:a}=e,l={};if(a!==void 0&&(l.code=a),t!==void 0&&(l.balance=it(t)),n!==void 0&&(l.nonce=it(n)),o!==void 0&&(l.state=yI(o)),s!==void 0){if(l.state)throw new FU;l.stateDiff=yI(s)}return l}function YU(e){if(!e)return;const t={};for(const{address:n,...o}of e){if(!Hr(n,{strict:!1}))throw new An({address:n});if(t[n])throw new CU({address:n});t[n]=KU(o)}return t}function yf(e){const{account:t,gasPrice:n,maxFeePerGas:o,maxPriorityFeePerGas:s,to:a}=e,l=t?wn(t):void 0;if(l&&!Hr(l.address))throw new An({address:l.address});if(a&&!Hr(a))throw new An({address:a});if(typeof n<"u"&&(typeof o<"u"||typeof s<"u"))throw new tj;if(o&&o>sp)throw new xa({maxFeePerGas:o});if(s&&o&&s>o)throw new Fc({maxFeePerGas:o,maxPriorityFeePerGas:s})}class VU extends Je{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Ew extends Je{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class WU extends Je{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ti(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class lT extends Je{constructor({blockHash:t,blockNumber:n}){let o="Block";t&&(o=`Block at hash "${t}"`),n&&(o=`Block at number "${n}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"})}}const cT={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function fT(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Ji(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?Ji(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?cT[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=XU(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function XU(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function JU(e,t){const n=(e.transactions??[]).map(o=>typeof o=="string"?o:fT(o));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function Wc(e,{blockHash:t,blockNumber:n,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,p,y;const a=s??!1,l=n!==void 0?it(n):void 0;let c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[l||o,a]},{dedupe:!!l}),!c)throw new lT({blockHash:t,blockNumber:n});return(((y=(p=(f=e.chain)==null?void 0:f.formatters)==null?void 0:p.block)==null?void 0:y.format)||JU)(c,"getBlock")}async function hT(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function ZU(e,t){var a,l;const{block:n,chain:o=e.chain,request:s}=t||{};try{const c=((a=o==null?void 0:o.fees)==null?void 0:a.maxPriorityFeePerGas)??((l=o==null?void 0:o.fees)==null?void 0:l.defaultPriorityFee);if(typeof c=="function"){const f=n||await Yt(e,Wc,"getBlock")({}),p=await c({block:f,client:e,request:s});if(p===null)throw new Error;return p}if(typeof c<"u")return c;const h=await e.request({method:"eth_maxPriorityFeePerGas"});return Ri(h)}catch{const[c,h]=await Promise.all([n?Promise.resolve(n):Yt(e,Wc,"getBlock")({}),Yt(e,hT,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new Ew;const f=h-c.baseFeePerGas;return f<0n?0n:f}}async function gI(e,t){var g,b;const{block:n,chain:o=e.chain,request:s,type:a="eip1559"}=t||{},l=await(async()=>{var w,F;return typeof((w=o==null?void 0:o.fees)==null?void 0:w.baseFeeMultiplier)=="function"?o.fees.baseFeeMultiplier({block:n,client:e,request:s}):((F=o==null?void 0:o.fees)==null?void 0:F.baseFeeMultiplier)??1.2})();if(l<1)throw new VU;const h=10**(((g=l.toString().split(".")[1])==null?void 0:g.length)??0),f=w=>w*BigInt(Math.ceil(l*h))/BigInt(h),p=n||await Yt(e,Wc,"getBlock")({});if(typeof((b=o==null?void 0:o.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const w=await o.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:a});if(w!==null)return w}if(a==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new Ew;const w=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await ZU(e,{block:p,chain:o,request:s}),F=f(p.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??F+w,maxPriorityFeePerGas:w}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await Yt(e,hT,"getGasPrice")({}))}}async function Yu(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return Ji(t)}const Sw=["blobVersionedHashes","chainId","fees","gas","nonce","type"],mI=new Map;async function fp(e,t){const{account:n=e.account,blobs:o,chain:s,gas:a,kzg:l,nonce:c,nonceManager:h,parameters:f=Sw,type:p}=t,y=n&&wn(n),g={...t,...y?{from:y==null?void 0:y.address}:{}};let b;async function w(){return b||(b=await Yt(e,Wc,"getBlock")({blockTag:"latest"}),b)}let F;async function I(){return F||(s?s.id:typeof t.chainId<"u"?t.chainId:(F=await Yt(e,Yu,"getChainId")({}),F))}if(f.includes("nonce")&&typeof c>"u"&&y)if(h){const R=await I();g.nonce=await h.consume({address:y.address,chainId:R,client:e})}else g.nonce=await Yt(e,IO,"getTransactionCount")({address:y.address,blockTag:"pending"});if((f.includes("blobVersionedHashes")||f.includes("sidecars"))&&o&&l){const R=uw({blobs:o,kzg:l});if(f.includes("blobVersionedHashes")){const A=kO({commitments:R,to:"hex"});g.blobVersionedHashes=A}if(f.includes("sidecars")){const A=lw({blobs:o,commitments:R,kzg:l}),E=HO({blobs:o,commitments:R,proofs:A,to:"hex"});g.sidecars=E}}if(f.includes("chainId")&&(g.chainId=await I()),(f.includes("fees")||f.includes("type"))&&typeof p>"u")try{g.type=YO(g)}catch{let R=mI.get(e.uid);if(typeof R>"u"){const A=await w();R=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",mI.set(e.uid,R)}g.type=R?"eip1559":"legacy"}if(f.includes("fees"))if(g.type!=="legacy"&&g.type!=="eip2930"){if(typeof g.maxFeePerGas>"u"||typeof g.maxPriorityFeePerGas>"u"){const R=await w(),{maxFeePerGas:A,maxPriorityFeePerGas:E}=await gI(e,{block:R,chain:s,request:g});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<E)throw new WU({maxPriorityFeePerGas:E});g.maxPriorityFeePerGas=E,g.maxFeePerGas=A}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new Ew;if(typeof t.gasPrice>"u"){const R=await w(),{gasPrice:A}=await gI(e,{block:R,chain:s,request:g,type:"legacy"});g.gasPrice=A}}return f.includes("gas")&&typeof a>"u"&&(g.gas=await Yt(e,eN,"estimateGas")({...g,account:y&&{address:y.address,type:"json-rpc"}})),yf(g),delete g.parameters,g}async function eN(e,t){var s,a,l;const{account:n=e.account}=t,o=n?wn(n):void 0;try{const{accessList:c,authorizationList:h,blobs:f,blobVersionedHashes:p,blockNumber:y,blockTag:g,data:b,gas:w,gasPrice:F,maxFeePerBlobGas:I,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,value:M,stateOverride:T,...z}=await fp(e,{...t,parameters:(o==null?void 0:o.type)==="local"?void 0:["blobVersionedHashes"]}),k=(typeof y=="bigint"?it(y):void 0)||g,j=YU(T),U=await(async()=>{if(z.to)return z.to;if(h&&h.length>0)return await vw({authorization:h[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`")})})();yf(t);const $=(l=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:l.format,Z=($||cp)({...xw(z,{format:$}),from:o==null?void 0:o.address,accessList:c,authorizationList:h,blobs:f,blobVersionedHashes:p,data:b,gas:w,gasPrice:F,maxFeePerBlobGas:I,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,to:U,value:M},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:j?[Z,k??e.experimental_blockTag??"latest",j]:k?[Z,k]:[Z]}))}catch(c){throw HU(c,{...t,account:o,chain:e.chain})}}function tN(e,t){if(!Hr(e,{strict:!1}))throw new An({address:e});if(!Hr(t,{strict:!1}))throw new An({address:t});return e.toLowerCase()===t.toLowerCase()}function rN(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const xm="/docs/contract/encodeDeployData";function nN(e){const{abi:t,args:n,bytecode:o}=e;if(!n||n.length===0)return o;const s=t.find(l=>"type"in l&&l.type==="constructor");if(!s)throw new Fj({docsPath:xm});if(!("inputs"in s))throw new aI({docsPath:xm});if(!s.inputs||s.inputs.length===0)throw new aI({docsPath:xm});const a=lp(s.inputs,n);return Rs([o,a])}function Iw(){let e=()=>{},t=()=>{};return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}const Em=new Map;function iN({fn:e,id:t,shouldSplitBatch:n,wait:o=0,sort:s}){const a=async()=>{const p=h();l();const y=p.map(({args:g})=>g);y.length!==0&&e(y).then(g=>{s&&Array.isArray(g)&&g.sort(s);for(let b=0;b<p.length;b++){const{resolve:w}=p[b];w==null||w([g[b],g])}}).catch(g=>{for(let b=0;b<p.length;b++){const{reject:w}=p[b];w==null||w(g)}})},l=()=>Em.delete(t),c=()=>h().map(({args:p})=>p),h=()=>Em.get(t)||[],f=p=>Em.set(t,[...h(),p]);return{flush:l,async schedule(p){const{promise:y,resolve:g,reject:b}=Iw();return(n==null?void 0:n([...c(),p]))&&a(),h().length>0?(f({args:p,resolve:g,reject:b}),y):(f({args:p,resolve:g,reject:b}),setTimeout(a,o),y)}}}const Sm=new Map,bI=new Map;let oN=0;function qd(e,t,n){const o=++oN,s=()=>Sm.get(e)||[],a=()=>{const p=s();Sm.set(e,p.filter(y=>y.id!==o))},l=()=>{const p=s();if(!p.some(g=>g.id===o))return;const y=bI.get(e);if(p.length===1&&y){const g=y();g instanceof Promise&&g.catch(()=>{})}a()},c=s();if(Sm.set(e,[...c,{id:o,fns:t}]),c&&c.length>0)return l;const h={};for(const p in t)h[p]=((...y)=>{var b,w;const g=s();if(g.length!==0)for(const F of g)(w=(b=F.fns)[p])==null||w.call(b,...y)});const f=n(h);return typeof f=="function"&&bI.set(e,f),l}async function Ub(e){return new Promise(t=>setTimeout(t,e))}function dT(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let s=!0;const a=()=>s=!1;return(async()=>{let c;t&&(c=await e({unpoll:a}));const h=await(n==null?void 0:n(c))??o;await Ub(h);const f=async()=>{s&&(await e({unpoll:a}),await Ub(o),f())};f()})(),a}const sN=new Map,aN=new Map;function uN(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:l=>a.set(s,l)}),n=t(e,sN),o=t(e,aN);return{clear:()=>{n.clear(),o.clear()},promise:n,response:o}}async function lN(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const o=uN(t),s=o.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let a=o.promise.get();a||(a=e(),o.promise.set(a));try{const l=await a;return o.response.set({created:new Date,data:l}),l}finally{o.promise.clear()}}const cN=e=>`blockNumber.${e}`;async function fN(e,{cacheTime:t=e.cacheTime}={}){const n=await lN(()=>e.request({method:"eth_blockNumber"}),{cacheKey:cN(e.uid),cacheTime:t});return BigInt(n)}class Ms extends Je{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
61
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class ma extends Je{constructor({docsPath:t,metaMessages:n,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function _w({chain:e,currentChainId:t}){if(!e)throw new yj;if(t!==e.id)throw new pj({chain:e,currentChainId:t})}function Cw(e,{docsPath:t,...n}){const o=(()=>{const s=uT(e,n);return s instanceof fw?e:s})();return new oj(o,{docsPath:t,...n})}async function pT(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Im=new ff(128);async function hp(e,t){var A,E,M,T;const{account:n=e.account,chain:o=e.chain,accessList:s,authorizationList:a,blobs:l,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,type:w,value:F,...I}=t;if(typeof n>"u")throw new Ms({docsPath:"/docs/actions/wallet/sendTransaction"});const R=n?wn(n):null;try{yf(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await vw({authorization:a[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`.")})})();if((R==null?void 0:R.type)==="json-rpc"||R===null){let L;o!==null&&(L=await Yt(e,Yu,"getChainId")({}),_w({currentChainId:L,chain:o}));const k=(M=(E=(A=e.chain)==null?void 0:A.formatters)==null?void 0:E.transactionRequest)==null?void 0:M.format,U=(k||cp)({...xw(I,{format:k}),accessList:s,authorizationList:a,blobs:l,chainId:L,data:c,from:R==null?void 0:R.address,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,to:z,type:w,value:F},"sendTransaction"),$=Im.get(e.uid),N=$?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:N,params:[U]},{retryCount:0})}catch(Z){if($===!1)throw Z;const re=Z;if(re.name==="InvalidInputRpcError"||re.name==="InvalidParamsRpcError"||re.name==="MethodNotFoundRpcError"||re.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[U]},{retryCount:0}).then(ie=>(Im.set(e.uid,!0),ie)).catch(ie=>{const X=ie;throw X.name==="MethodNotFoundRpcError"||X.name==="MethodNotSupportedRpcError"?(Im.set(e.uid,!1),re):X});throw re}}if((R==null?void 0:R.type)==="local"){const L=await Yt(e,fp,"prepareTransactionRequest")({account:R,accessList:s,authorizationList:a,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,nonceManager:R.nonceManager,parameters:[...Sw,"sidecars"],type:w,value:F,...I,to:z}),k=(T=o==null?void 0:o.serializers)==null?void 0:T.transaction,j=await R.signTransaction(L,{serializer:k});return await Yt(e,pT,"sendRawTransaction")({serializedTransaction:j})}throw(R==null?void 0:R.type)==="smart"?new ma({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ma({docsPath:"/docs/actions/wallet/sendTransaction",type:R==null?void 0:R.type})}catch(z){throw z instanceof ma?z:Cw(z,{...t,account:R,chain:t.chain||void 0})}}async function Xc(e,t){return Xc.internal(e,hp,"sendTransaction",t)}(function(e){async function t(n,o,s,a){const{abi:l,account:c=n.account,address:h,args:f,dataSuffix:p,functionName:y,...g}=a;if(typeof c>"u")throw new Ms({docsPath:"/docs/contract/writeContract"});const b=c?wn(c):null,w=sT({abi:l,args:f,functionName:y});try{return await Yt(n,o,s)({data:`${w}${p?p.replace("0x",""):""}`,to:h,account:b,...g})}catch(F){throw DU(F,{abi:l,address:h,args:f,docsPath:"/docs/contract/writeContract",functionName:y,sender:b==null?void 0:b.address})}}e.internal=t})(Xc||(Xc={}));class hN extends Je{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function Hd(e,{delay:t=100,retryCount:n=2,shouldRetry:o=()=>!0}={}){return new Promise((s,a)=>{const l=async({count:c=0}={})=>{const h=async({error:f})=>{const p=typeof t=="function"?t({count:c,error:f}):t;p&&await Ub(p),l({count:c+1})};try{const f=await e();s(f)}catch(f){if(c<n&&await o({count:c,error:f}))return h({error:f});a(f)}};l()})}const yT={"0x0":"reverted","0x1":"success"};function gT(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>rN(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Ji(e.transactionIndex):null,status:e.status?yT[e.status]:null,type:e.type?cT[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const mT="0x5792579257925792579257925792579257925792579257925792579257925792",bT=it(0,{size:32});async function AT(e,t){const{account:n=e.account,capabilities:o,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:l=32,forceAtomic:c=!1,id:h,version:f="2.0.0"}=t,p=n?wn(n):null,y=t.calls.map(g=>{const b=g,w=b.abi?sT({abi:b.abi,functionName:b.functionName,args:b.args}):b.data;return{data:b.dataSuffix&&w?Zi([w,b.dataSuffix]):w,to:b.to,value:b.value?it(b.value):void 0}});try{const g=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:c,calls:y,capabilities:o,chainId:it(s.id),from:p==null?void 0:p.address,id:h,version:f}]},{retryCount:0});return typeof g=="string"?{id:g}:g}catch(g){const b=g;if(a&&(b.name==="MethodNotFoundRpcError"||b.name==="MethodNotSupportedRpcError"||b.name==="UnknownRpcError"||b.details.toLowerCase().includes("does not exist / is not available")||b.details.toLowerCase().includes("missing or invalid. request()")||b.details.toLowerCase().includes("did not match any variant of untagged enum")||b.details.toLowerCase().includes("account upgraded to unsupported contract")||b.details.toLowerCase().includes("eip-7702 not supported")||b.details.toLowerCase().includes("unsupported wc_ method")||b.details.toLowerCase().includes("feature toggled misconfigured"))){if(o&&Object.values(o).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new ku(new Je(A,{details:A}))}if(c&&y.length>1){const R="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Lu(new Je(R,{details:R}))}const w=[];for(const R of y){const A=hp(e,{account:p,chain:s,data:R.data,to:R.to,value:R.value?Ri(R.value):void 0});w.push(A),l>0&&await new Promise(E=>setTimeout(E,l))}const F=await Promise.allSettled(w);if(F.every(R=>R.status==="rejected"))throw F[0].reason;const I=F.map(R=>R.status==="fulfilled"?R.value:bT);return{id:Zi([...I,it(s.id,{size:32}),mT])}}throw Cw(g,{...t,account:p,chain:t.chain})}}async function wT(e,t){async function n(p){if(p.endsWith(mT.slice(2))){const g=Bs(Bb(p,-64,-32)),b=Bb(p,0,-64).slice(2).match(/.{1,64}/g),w=await Promise.all(b.map(I=>bT.slice(2)!==I?e.request({method:"eth_getTransactionReceipt",params:[`0x${I}`]},{dedupe:!0}):void 0)),F=w.some(I=>I===null)?100:w.every(I=>(I==null?void 0:I.status)==="0x1")?200:w.every(I=>(I==null?void 0:I.status)==="0x0")?500:600;return{atomic:!1,chainId:Ji(g),receipts:w.filter(Boolean),status:F,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[p]})}const{atomic:o=!1,chainId:s,receipts:a,version:l="2.0.0",...c}=await n(t.id),[h,f]=(()=>{const p=c.status;return p>=100&&p<200?["pending",p]:p>=200&&p<300?["success",p]:p>=300&&p<700?["failure",p]:p==="CONFIRMED"?["success",200]:p==="PENDING"?["pending",100]:[void 0,p]})();return{...c,atomic:o,chainId:s?Ji(s):void 0,receipts:(a==null?void 0:a.map(p=>({...p,blockNumber:Ri(p.blockNumber),gasUsed:Ri(p.gasUsed),status:yT[p.status]})))??[],statusCode:f,status:h,version:l}}async function vT(e,t){const{id:n,pollingInterval:o=e.pollingInterval,status:s=({statusCode:F})=>F===200||F>=300,retryCount:a=4,retryDelay:l=({count:F})=>~~(1<<F)*200,timeout:c=6e4,throwOnFailure:h=!1}=t,f=Mn(["waitForCallsStatus",e.uid,n]),{promise:p,resolve:y,reject:g}=Iw();let b;const w=qd(f,{resolve:y,reject:g},F=>{const I=dT(async()=>{const R=A=>{clearTimeout(b),I(),A(),w()};try{const A=await Hd(async()=>{const E=await Yt(e,wT,"getCallsStatus")({id:n});if(h&&E.status==="failure")throw new hN(E);return E},{retryCount:a,delay:l});if(!s(A))return;R(()=>F.resolve(A))}catch(A){R(()=>F.reject(A))}},{interval:o,emitOnBegin:!0});return I});return b=c?setTimeout(()=>{w(),clearTimeout(b),g(new dN({id:n}))},c):void 0,await p}class dN extends Je{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Nb=256;let Wh=Nb,Xh;function xT(e=11){if(!Xh||Wh+e>Nb*2){Xh="",Wh=0;for(let t=0;t<Nb;t++)Xh+=(256+Math.random()*256|0).toString(16).substring(1)}return Xh.substring(Wh,Wh+++e)}function pN(e){const{batch:t,chain:n,ccipRead:o,key:s="base",name:a="Base Client",type:l="base"}=e,c=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),h=(n==null?void 0:n.blockTime)??12e3,f=Math.min(Math.max(Math.floor(h/2),500),4e3),p=e.pollingInterval??f,y=e.cacheTime??p,g=e.account?wn(e.account):void 0,{config:b,request:w,value:F}=e.transport({chain:n,pollingInterval:p}),I={...b,...F},R={account:g,batch:t,cacheTime:y,ccipRead:o,chain:n,key:s,name:a,pollingInterval:p,request:w,transport:I,type:l,uid:xT(),...c?{experimental_blockTag:c}:{}};function A(E){return M=>{const T=M(E);for(const L in R)delete T[L];const z={...E,...T};return Object.assign(z,{extend:A(z)})}}return Object.assign(R,{extend:A(R)})}const Jh=new ff(8192);function yN(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Jh.get(n))return Jh.get(n);const o=e().finally(()=>Jh.delete(n));return Jh.set(n,o),o}function gN(e,t={}){return async(n,o={})=>{var y;const{dedupe:s=!1,methods:a,retryDelay:l=150,retryCount:c=3,uid:h}={...t,...o},{method:f}=n;if((y=a==null?void 0:a.exclude)!=null&&y.includes(f))throw new ha(new Error("method not supported"),{method:f});if(a!=null&&a.include&&!a.include.includes(f))throw new ha(new Error("method not supported"),{method:f});const p=s?Nu(`${h}.${Mn(n)}`):void 0;return yN(()=>Hd(async()=>{try{return await e(n)}catch(g){const b=g;switch(b.code){case Bc.code:throw new Bc(b);case Rc.code:throw new Rc(b);case Mc.code:throw new Mc(b,{method:n.method});case jc.code:throw new jc(b);case Ea.code:throw new Ea(b);case Uc.code:throw new Uc(b);case Nc.code:throw new Nc(b);case Dc.code:throw new Dc(b);case Pc.code:throw new Pc(b);case ha.code:throw new ha(b,{method:n.method});case Pu.code:throw new Pu(b);case kc.code:throw new kc(b);case Bu.code:throw new Bu(b);case Lc.code:throw new Lc(b);case $c.code:throw new $c(b);case zc.code:throw new zc(b);case qc.code:throw new qc(b);case Hc.code:throw new Hc(b);case ku.code:throw new ku(b);case Qc.code:throw new Qc(b);case Gc.code:throw new Gc(b);case Kc.code:throw new Kc(b);case Yc.code:throw new Yc(b);case Vc.code:throw new Vc(b);case Lu.code:throw new Lu(b);case 5e3:throw new Bu(b);default:throw g instanceof Je?g:new UU(b)}}},{delay:({count:g,error:b})=>{var w;if(b&&b instanceof bc){const F=(w=b==null?void 0:b.headers)==null?void 0:w.get("Retry-After");if(F!=null&&F.match(/\d/))return Number.parseInt(F,10)*1e3}return~~(1<<g)*l},retryCount:c,shouldRetry:({error:g})=>mN(g)}),{enabled:s,id:p})}}function mN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Pu.code||e.code===Ea.code:e instanceof bc&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function bN(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function AN(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:o}){return new Promise((s,a)=>{(async()=>{let l;try{const c=new AbortController;n>0&&(l=setTimeout(()=>{o&&c.abort()},n)),s(await e({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&a(t),a(c)}finally{clearTimeout(l)}})()})}function wN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const AI=wN();function vN(e,t={}){return{async request(n){var g;const{body:o,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:l=t.onResponse,timeout:c=t.timeout??1e4}=n,h={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:f,method:p,signal:y}=h;try{const b=await AN(async({signal:F})=>{const I={...h,body:Array.isArray(o)?Mn(o.map(M=>({jsonrpc:"2.0",id:M.id??AI.take(),...M}))):Mn({jsonrpc:"2.0",id:o.id??AI.take(),...o}),headers:{"Content-Type":"application/json",...f},method:p||"POST",signal:y||(c>0?F:null)},R=new Request(e,I),A=await(a==null?void 0:a(R,I))??{...I,url:e};return await s(A.url??e,A)},{errorInstance:new hI({body:o,url:e}),timeout:c,signal:!0});l&&await l(b);let w;if((g=b.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))w=await b.json();else{w=await b.text();try{w=JSON.parse(w||"{}")}catch(F){if(b.ok)throw F;w={error:w}}}if(!b.ok)throw new bc({body:o,details:Mn(w.error)||b.statusText,headers:b.headers,status:b.status,url:e});return w}catch(b){throw b instanceof bc||b instanceof hI?b:new bc({body:o,cause:b,url:e})}}}}async function xN(e,{blockHash:t,blockNumber:n,blockTag:o,hash:s,index:a}){var p,y,g;const l=o||"latest",c=n!==void 0?it(n):void 0;let h=null;if(s?h=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?h=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,it(a)]},{dedupe:!0}):h=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||l,it(a)]},{dedupe:!!c}),!h)throw new DO({blockHash:t,blockNumber:n,blockTag:l,hash:s,index:a});return(((g=(y=(p=e.chain)==null?void 0:p.formatters)==null?void 0:y.transaction)==null?void 0:g.format)||fT)(h,"getTransaction")}async function _m(e,{hash:t}){var s,a,l;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new PO({hash:t});return(((l=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:l.format)||gT)(n,"getTransactionReceipt")}function EN(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:o,onError:s,poll:a,pollingInterval:l=e.pollingInterval}){const c=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let h;return c?(()=>{const y=Mn(["watchBlockNumber",e.uid,t,n,l]);return qd(y,{onBlockNumber:o,onError:s},g=>dT(async()=>{var b;try{const w=await Yt(e,fN,"getBlockNumber")({cacheTime:0});if(h!==void 0){if(w===h)return;if(w-h>1&&n)for(let F=h+1n;F<w;F++)g.onBlockNumber(F,h),h=F}(h===void 0||w>h)&&(g.onBlockNumber(w,h),h=w)}catch(w){(b=g.onError)==null||b.call(g,w)}},{emitOnBegin:t,interval:l}))})():(()=>{const y=Mn(["watchBlockNumber",e.uid,t,n]);return qd(y,{onBlockNumber:o,onError:s},g=>{let b=!0,w=()=>b=!1;return(async()=>{try{const F=(()=>{if(e.transport.type==="fallback"){const R=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return R?R.value:e.transport}return e.transport})(),{unsubscribe:I}=await F.subscribe({params:["newHeads"],onData(R){var E;if(!b)return;const A=Ri((E=R.result)==null?void 0:E.number);g.onBlockNumber(A,h),h=A},onError(R){var A;(A=g.onError)==null||A.call(g,R)}});w=I,b||w()}catch(F){s==null||s(F)}})(),()=>w()})})()}async function SN(e,t){const{checkReplacement:n=!0,confirmations:o=1,hash:s,onReplaced:a,retryCount:l=6,retryDelay:c=({count:T})=>~~(1<<T)*200,timeout:h=18e4}=t,f=Mn(["waitForTransactionReceipt",e.uid,s]),p=(()=>{var T;return t.pollingInterval?t.pollingInterval:(T=e.chain)!=null&&T.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let y,g,b,w=!1,F,I;const{promise:R,resolve:A,reject:E}=Iw(),M=h?setTimeout(()=>{I==null||I(),F==null||F(),E(new sj({hash:s}))},h):void 0;return F=qd(f,{onReplaced:a,resolve:A,reject:E},async T=>{if(b=await Yt(e,_m,"getTransactionReceipt")({hash:s}).catch(()=>{}),b&&o<=1){clearTimeout(M),T.resolve(b),F==null||F();return}I=Yt(e,EN,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(z){const L=j=>{clearTimeout(M),I==null||I(),j(),F==null||F()};let k=z;if(!w)try{if(b){if(o>1&&(!b.blockNumber||k-b.blockNumber+1n<o))return;L(()=>T.resolve(b));return}if(n&&!y&&(w=!0,await Hd(async()=>{y=await Yt(e,xN,"getTransaction")({hash:s}),y.blockNumber&&(k=y.blockNumber)},{delay:c,retryCount:l}),w=!1),b=await Yt(e,_m,"getTransactionReceipt")({hash:s}),o>1&&(!b.blockNumber||k-b.blockNumber+1n<o))return;L(()=>T.resolve(b))}catch(j){if(j instanceof DO||j instanceof PO){if(!y){w=!1;return}try{g=y,w=!0;const U=await Hd(()=>Yt(e,Wc,"getBlock")({blockNumber:k,includeTransactions:!0}),{delay:c,retryCount:l,shouldRetry:({error:Z})=>Z instanceof lT});w=!1;const $=U.transactions.find(({from:Z,nonce:re})=>Z===g.from&&re===g.nonce);if(!$||(b=await Yt(e,_m,"getTransactionReceipt")({hash:$.hash}),o>1&&(!b.blockNumber||k-b.blockNumber+1n<o)))return;let N="replaced";$.to===g.to&&$.value===g.value&&$.input===g.input?N="repriced":$.from===$.to&&$.value===0n&&(N="cancelled"),L(()=>{var Z;(Z=T.onReplaced)==null||Z.call(T,{reason:N,replacedTransaction:g,transaction:$,transactionReceipt:b}),T.resolve(b)})}catch(U){L(()=>T.reject(U))}}else L(()=>T.reject(j))}}})}),R}async function ET(e,{serializedTransaction:t,timeout:n}){var a,l,c;const o=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,it(n)]:[t]},{retryCount:0});return(((c=(l=(a=e.chain)==null?void 0:a.formatters)==null?void 0:l.transactionReceipt)==null?void 0:c.format)||gT)(o)}async function IN(e,{chain:t}){const{id:n,name:o,nativeCurrency:s,rpcUrls:a,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:it(n),chainName:o,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:l?Object.values(l).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}function _N(e,t){const{abi:n,args:o,bytecode:s,...a}=t,l=nN({abi:n,args:o,bytecode:s});return hp(e,{...a,...a.authorizationList?{to:null}:{},data:l})}async function CN(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(o=>hf(o))}async function FN(e,t={}){const{account:n=e.account,chainId:o}=t,s=n?wn(n):void 0,a=o?[s==null?void 0:s.address,[it(o)]]:[s==null?void 0:s.address],l=await e.request({method:"wallet_getCapabilities",params:a}),c={};for(const[h,f]of Object.entries(l)){c[Number(h)]={};for(let[p,y]of Object.entries(f))p==="addSubAccount"&&(p="unstable_addSubAccount"),c[Number(h)][p]=y}return typeof o=="number"?c[o]:c}async function ON(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function ST(e,t){var h;const{account:n=e.account,chainId:o,nonce:s}=t;if(!n)throw new Ms({docsPath:"/docs/eip7702/prepareAuthorization"});const a=wn(n),l=(()=>{if(t.executor)return t.executor==="self"?t.executor:wn(t.executor)})(),c={address:t.contractAddress??t.address,chainId:o,nonce:s};return typeof c.chainId>"u"&&(c.chainId=((h=e.chain)==null?void 0:h.id)??await Yt(e,Yu,"getChainId")({})),typeof c.nonce>"u"&&(c.nonce=await Yt(e,IO,"getTransactionCount")({address:a.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&tN(l.address,a.address))&&(c.nonce+=1)),c}async function TN(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>kM(n))}async function BN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function RN(e,t){const{chain:n=e.chain}=t,o=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),s=await AT(e,t);return await vT(e,{...t,id:s.id,timeout:o})}const Cm=new ff(128);async function IT(e,t){var M,T,z,L;const{account:n=e.account,chain:o=e.chain,accessList:s,authorizationList:a,blobs:l,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,pollingInterval:w,type:F,value:I,...R}=t,A=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Ms({docsPath:"/docs/actions/wallet/sendTransactionSync"});const E=n?wn(n):null;try{yf(t);const k=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await vw({authorization:a[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`.")})})();if((E==null?void 0:E.type)==="json-rpc"||E===null){let j;o!==null&&(j=await Yt(e,Yu,"getChainId")({}),_w({currentChainId:j,chain:o}));const U=(z=(T=(M=e.chain)==null?void 0:M.formatters)==null?void 0:T.transactionRequest)==null?void 0:z.format,N=(U||cp)({...xw(R,{format:U}),accessList:s,authorizationList:a,blobs:l,chainId:j,data:c,from:E==null?void 0:E.address,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,to:k,type:F,value:I},"sendTransaction"),Z=Cm.get(e.uid),re=Z?"wallet_sendTransaction":"eth_sendTransaction",ie=await(async()=>{try{return await e.request({method:re,params:[N]},{retryCount:0})}catch(X){if(Z===!1)throw X;const ae=X;if(ae.name==="InvalidInputRpcError"||ae.name==="InvalidParamsRpcError"||ae.name==="MethodNotFoundRpcError"||ae.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[N]},{retryCount:0}).then(ye=>(Cm.set(e.uid,!0),ye)).catch(ye=>{const le=ye;throw le.name==="MethodNotFoundRpcError"||le.name==="MethodNotSupportedRpcError"?(Cm.set(e.uid,!1),ae):le});throw ae}})();return Yt(e,SN,"waitForTransactionReceipt")({checkReplacement:!1,hash:ie,pollingInterval:w,timeout:A})}if((E==null?void 0:E.type)==="local"){const j=await Yt(e,fp,"prepareTransactionRequest")({account:E,accessList:s,authorizationList:a,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,nonceManager:E.nonceManager,parameters:[...Sw,"sidecars"],type:F,value:I,...R,to:k}),U=(L=o==null?void 0:o.serializers)==null?void 0:L.transaction,$=await E.signTransaction(j,{serializer:U});return await Yt(e,ET,"sendRawTransactionSync")({serializedTransaction:$})}throw(E==null?void 0:E.type)==="smart"?new ma({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ma({docsPath:"/docs/actions/wallet/sendTransactionSync",type:E==null?void 0:E.type})}catch(k){throw k instanceof ma?k:Cw(k,{...t,account:E,chain:t.chain||void 0})}}async function MN(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function jN(e,t){const{account:n=e.account}=t;if(!n)throw new Ms({docsPath:"/docs/eip7702/signAuthorization"});const o=wn(n);if(!o.signAuthorization)throw new ma({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const s=await ST(e,t);return o.signAuthorization(s)}async function UN(e,{account:t=e.account,message:n}){if(!t)throw new Ms({docsPath:"/docs/actions/wallet/signMessage"});const o=wn(t);if(o.signMessage)return o.signMessage({message:n});const s=typeof n=="string"?Nu(n):n.raw instanceof Uint8Array?Xi(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,o.address]},{retryCount:0})}async function NN(e,t){var f,p,y,g;const{account:n=e.account,chain:o=e.chain,...s}=t;if(!n)throw new Ms({docsPath:"/docs/actions/wallet/signTransaction"});const a=wn(n);yf({account:a,...t});const l=await Yt(e,Yu,"getChainId")({});o!==null&&_w({currentChainId:l,chain:o});const c=(o==null?void 0:o.formatters)||((f=e.chain)==null?void 0:f.formatters),h=((p=c==null?void 0:c.transactionRequest)==null?void 0:p.format)||cp;return a.signTransaction?a.signTransaction({...s,chainId:l},{serializer:(g=(y=e.chain)==null?void 0:y.serializers)==null?void 0:g.transaction}):await e.request({method:"eth_signTransaction",params:[{...h(s,"signTransaction"),chainId:it(l),from:a.address}]},{retryCount:0})}async function DN(e,t){const{account:n=e.account,domain:o,message:s,primaryType:a}=t;if(!n)throw new Ms({docsPath:"/docs/actions/wallet/signTypedData"});const l=wn(n),c={EIP712Domain:JO({domain:o}),...t.types};if(XO({domain:o,message:s,primaryType:a,types:c}),l.signTypedData)return l.signTypedData({domain:o,message:s,primaryType:a,types:c});const h=Xj({domain:o,message:s,primaryType:a,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,h]},{retryCount:0})}async function PN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:it(t)}]},{retryCount:0})}async function kN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function LN(e,t){return Xc.internal(e,IT,"sendTransactionSync",t)}function $N(e){return{addChain:t=>IN(e,t),deployContract:t=>_N(e,t),getAddresses:()=>CN(e),getCallsStatus:t=>wT(e,t),getCapabilities:t=>FN(e,t),getChainId:()=>Yu(e),getPermissions:()=>ON(e),prepareAuthorization:t=>ST(e,t),prepareTransactionRequest:t=>fp(e,t),requestAddresses:()=>TN(e),requestPermissions:t=>BN(e,t),sendCalls:t=>AT(e,t),sendCallsSync:t=>RN(e,t),sendRawTransaction:t=>pT(e,t),sendRawTransactionSync:t=>ET(e,t),sendTransaction:t=>hp(e,t),sendTransactionSync:t=>IT(e,t),showCallsStatus:t=>MN(e,t),signAuthorization:t=>jN(e,t),signMessage:t=>UN(e,t),signTransaction:t=>NN(e,t),signTypedData:t=>DN(e,t),switchChain:t=>PN(e,t),waitForCallsStatus:t=>vT(e,t),watchAsset:t=>kN(e,t),writeContract:t=>Xc(e,t),writeContractSync:t=>LN(e,t)}}function Ac(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return pN({...e,key:t,name:n,transport:o,type:"walletClient"}).extend($N)}function zN({key:e,methods:t,name:n,request:o,retryCount:s=3,retryDelay:a=150,timeout:l,type:c},h){const f=xT();return{config:{key:e,methods:t,name:n,request:o,retryCount:s,retryDelay:a,timeout:l,type:c},request:gN(o,{methods:t,retryCount:s,retryDelay:a,uid:f}),value:h}}class qN extends Je{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function wc(e,t={}){const{batch:n,fetchFn:o,fetchOptions:s,key:a="http",methods:l,name:c="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:f,retryDelay:p,raw:y}=t;return({chain:g,retryCount:b,timeout:w})=>{const{batchSize:F=1e3,wait:I=0}=typeof n=="object"?n:{},R=t.retryCount??b,A=w??t.timeout??1e4,E=g==null?void 0:g.rpcUrls.default.http[0];if(!E)throw new qN;const M=vN(E,{fetchFn:o,fetchOptions:s,onRequest:h,onResponse:f,timeout:A});return zN({key:a,methods:l,name:c,async request({method:T,params:z}){const L={method:T,params:z},{schedule:k}=iN({id:E,wait:I,shouldSplitBatch(N){return N.length>F},fn:N=>M.request({body:N}),sort:(N,Z)=>N.id-Z.id}),j=async N=>n?k(N):[await M.request({body:N})],[{error:U,result:$}]=await j(L);if(y)return{error:U,result:$};if(U)throw new ww({body:L,error:U,url:E});return $},retryCount:R,retryDelay:p,timeout:A,type:"http"},{fetchOptions:s,url:E})}}const vc=bN({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),ni={PAIMA_API_PORT:"9999",BATCHER_PORT:"3334"},sc={evm:"#4caf50",evmParallel:"#ff9800",cardano:"#2196f3",midnight:"#9c27b0"};function HN(e){const t={};return e.filter(o=>o.networkType!=="ntp").forEach((o,s)=>{var y,g,b;const a=o.network,l=o.syncProtocol;let c=a.name;a.type==="evm"&&a.chainId?c=`evm_${a.chainId}`:a.type==="evm"&&a.id&&(c=`evm_${a.id}`),t[c]&&(c=`${c}_${s}`);let h;a.type==="evm"?(b=(g=(y=a.rpcUrls)==null?void 0:y.default)==null?void 0:g.http)!=null&&b[0]?h=a.rpcUrls.default.http[0]:l.chainUri&&(h=l.chainUri):(a.type==="midnight"||a.type==="avail"||a.type==="cardano")&&(h=a.nodeUrl);let f=sc.evm;a.type==="cardano"?f=sc.cardano:a.type==="midnight"?f=sc.midnight:a.name.toLowerCase().includes("arbitrum")?f=sc.evm:(a.name.toLowerCase().includes("ethereum")||a.name.toLowerCase().includes("l1"))&&(f=sc.evmParallel);const p={type:a.type.toUpperCase(),name:a.name,blockTime:a.blockTimeMS??l.pollingInterval??void 0,color:f,blocks:[],currentBlock:a.type==="evm"?5e5:1e5,rpcEndpoint:h,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1,protocolName:l.name};t[c]=p}),t}async function QN(){var s;const e=await fetch(_T);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json(),n=HN(t);return{Paima:{type:"EVM",name:"Paima Engine",blockTime:((s=t.find(a=>a.syncProtocol.name==="mainNtp"))==null?void 0:s.network.blockTimeMS)??1e3,color:"#667eea",blocks:[],currentBlock:1e6,rpcEndpoint:`http://127.0.0.1:${ni.PAIMA_API_PORT}/rpc/evm`,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1},...n}}const _T="http://127.0.0.1:9999/config",GN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/block-heights`,KN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/primitives`,wI=`http://127.0.0.1:${ni.PAIMA_API_PORT}/tables`,YN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/grammar`,VN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/scheduled-data`,WN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/primitives-schema`,XN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/table-schema`,vI=`http://127.0.0.1:${ni.PAIMA_API_PORT}/sync-protocols`,CT=`http://localhost:${ni.BATCHER_PORT}/send-input`,xI=`http://localhost:${ni.BATCHER_PORT}/documentation`,EI=`http://localhost:${ni.PAIMA_API_PORT}/documentation`,SI="https://acedward.github.io/paima-v-next-docs/",JN=`http://127.0.0.1:${ni.PAIMA_API_PORT}/addresses`;function ZN(e){return Fr(e)&&!kn(e)&&!mf(e)&&Symbol.asyncIterator in e}function kn(e){return Array.isArray(e)}function FT(e){return typeof e=="bigint"}function gf(e){return typeof e=="boolean"}function Fw(e){return e instanceof globalThis.Date}function eD(e){return typeof e=="function"}function tD(e){return Fr(e)&&!kn(e)&&!mf(e)&&Symbol.iterator in e}function rD(e){return e===null}function eo(e){return typeof e=="number"}function Fr(e){return typeof e=="object"&&e!==null}function OT(e){return e instanceof globalThis.RegExp}function br(e){return typeof e=="string"}function nD(e){return typeof e=="symbol"}function mf(e){return e instanceof globalThis.Uint8Array}function _r(e){return e===void 0}function iD(e){return e.map(t=>Qd(t))}function oD(e){return new Date(e.getTime())}function sD(e){return new Uint8Array(e)}function aD(e){return new RegExp(e.source,e.flags)}function uD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=Qd(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=Qd(e[n]);return t}function Qd(e){return kn(e)?iD(e):Fw(e)?oD(e):mf(e)?sD(e):OT(e)?aD(e):Fr(e)?uD(e):e}function Jn(e){return Qd(e)}function Ow(e,t){return Jn(t===void 0?e:{...t,...e})}function TT(e){return _a(e)&&globalThis.Symbol.asyncIterator in e}function BT(e){return _a(e)&&globalThis.Symbol.iterator in e}function RT(e){return e instanceof globalThis.Promise}function Tw(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function Bw(e){return e instanceof globalThis.Uint8Array}function lD(e,t){return t in e}function _a(e){return e!==null&&typeof e=="object"}function Lo(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function Ca(e){return e===void 0}function dp(e){return e===null}function pp(e){return typeof e=="boolean"}function No(e){return typeof e=="number"}function MT(e){return globalThis.Number.isInteger(e)}function yp(e){return typeof e=="bigint"}function Wi(e){return typeof e=="string"}function jT(e){return typeof e=="function"}function gp(e){return typeof e=="symbol"}function cD(e){return yp(e)||pp(e)||dp(e)||No(e)||Wi(e)||gp(e)||Ca(e)}var Un;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(l,c){return e.ExactOptionalPropertyTypes?c in l:l[c]!==void 0}e.IsExactOptionalProperty=t;function n(l){const c=_a(l);return e.AllowArrayObject?c:c&&!Lo(l)}e.IsObjectLike=n;function o(l){return n(l)&&!(l instanceof Date)&&!(l instanceof Uint8Array)}e.IsRecordLike=o;function s(l){return e.AllowNaN?No(l):Number.isFinite(l)}e.IsNumberLike=s;function a(l){const c=Ca(l);return e.AllowNullVoid?c||l===null:c}e.IsVoidLike=a})(Un||(Un={}));function fD(e){return globalThis.Object.freeze(e).map(t=>Gd(t))}function hD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=Gd(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=Gd(e[n]);return globalThis.Object.freeze(t)}function Gd(e){return kn(e)?fD(e):Fw(e)?e:mf(e)?e:OT(e)?e:Fr(e)?hD(e):e}function nt(e,t){const n=t!==void 0?{...t,...e}:e;switch(Un.InstanceMode){case"freeze":return Gd(n);case"clone":return Jn(n);default:return n}}class ii extends Error{constructor(t){super(t)}}const Wn=Symbol.for("TypeBox.Transform"),bf=Symbol.for("TypeBox.Readonly"),Ho=Symbol.for("TypeBox.Optional"),mp=Symbol.for("TypeBox.Hint"),at=Symbol.for("TypeBox.Kind");function Rw(e){return Fr(e)&&e[bf]==="Readonly"}function js(e){return Fr(e)&&e[Ho]==="Optional"}function UT(e){return Bt(e,"Any")}function NT(e){return Bt(e,"Argument")}function Vu(e){return Bt(e,"Array")}function bp(e){return Bt(e,"AsyncIterator")}function Ap(e){return Bt(e,"BigInt")}function Af(e){return Bt(e,"Boolean")}function Wu(e){return Bt(e,"Computed")}function Xu(e){return Bt(e,"Constructor")}function dD(e){return Bt(e,"Date")}function Ju(e){return Bt(e,"Function")}function Zu(e){return Bt(e,"Integer")}function wi(e){return Bt(e,"Intersect")}function wp(e){return Bt(e,"Iterator")}function Bt(e,t){return Fr(e)&&at in e&&e[at]===t}function DT(e){return gf(e)||eo(e)||br(e)}function Fa(e){return Bt(e,"Literal")}function Oa(e){return Bt(e,"MappedKey")}function oi(e){return Bt(e,"MappedResult")}function wf(e){return Bt(e,"Never")}function pD(e){return Bt(e,"Not")}function Mw(e){return Bt(e,"Null")}function el(e){return Bt(e,"Number")}function Pi(e){return Bt(e,"Object")}function vp(e){return Bt(e,"Promise")}function xp(e){return Bt(e,"Record")}function Nn(e){return Bt(e,"Ref")}function PT(e){return Bt(e,"RegExp")}function vf(e){return Bt(e,"String")}function jw(e){return Bt(e,"Symbol")}function Ta(e){return Bt(e,"TemplateLiteral")}function yD(e){return Bt(e,"This")}function ar(e){return Fr(e)&&Wn in e}function Ba(e){return Bt(e,"Tuple")}function Ep(e){return Bt(e,"Undefined")}function Gr(e){return Bt(e,"Union")}function gD(e){return Bt(e,"Uint8Array")}function mD(e){return Bt(e,"Unknown")}function bD(e){return Bt(e,"Unsafe")}function AD(e){return Bt(e,"Void")}function wD(e){return Fr(e)&&at in e&&br(e[at])}function Xn(e){return UT(e)||NT(e)||Vu(e)||Af(e)||Ap(e)||bp(e)||Wu(e)||Xu(e)||dD(e)||Ju(e)||Zu(e)||wi(e)||wp(e)||Fa(e)||Oa(e)||oi(e)||wf(e)||pD(e)||Mw(e)||el(e)||Pi(e)||vp(e)||xp(e)||Nn(e)||PT(e)||vf(e)||jw(e)||Ta(e)||yD(e)||Ba(e)||Ep(e)||Gr(e)||gD(e)||mD(e)||bD(e)||AD(e)||wD(e)}const vD=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function kT(e){try{return new RegExp(e),!0}catch{return!1}}function Uw(e){if(!br(e))return!1;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}function LT(e){return Nw(e)||nn(e)}function ac(e){return _r(e)||FT(e)}function Xt(e){return _r(e)||eo(e)}function Nw(e){return _r(e)||gf(e)}function zt(e){return _r(e)||br(e)}function xD(e){return _r(e)||br(e)&&Uw(e)&&kT(e)}function ED(e){return _r(e)||br(e)&&Uw(e)}function $T(e){return _r(e)||nn(e)}function Kd(e){return Fr(e)&&e[Ho]==="Optional"}function Mi(e){return Rt(e,"Any")&&zt(e.$id)}function SD(e){return Rt(e,"Argument")&&eo(e.index)}function Ra(e){return Rt(e,"Array")&&e.type==="array"&&zt(e.$id)&&nn(e.items)&&Xt(e.minItems)&&Xt(e.maxItems)&&Nw(e.uniqueItems)&&$T(e.contains)&&Xt(e.minContains)&&Xt(e.maxContains)}function Dw(e){return Rt(e,"AsyncIterator")&&e.type==="AsyncIterator"&&zt(e.$id)&&nn(e.items)}function Sp(e){return Rt(e,"BigInt")&&e.type==="bigint"&&zt(e.$id)&&ac(e.exclusiveMaximum)&&ac(e.exclusiveMinimum)&&ac(e.maximum)&&ac(e.minimum)&&ac(e.multipleOf)}function Ma(e){return Rt(e,"Boolean")&&e.type==="boolean"&&zt(e.$id)}function ID(e){return Rt(e,"Computed")&&br(e.target)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))}function Ip(e){return Rt(e,"Constructor")&&e.type==="Constructor"&&zt(e.$id)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function _p(e){return Rt(e,"Date")&&e.type==="Date"&&zt(e.$id)&&Xt(e.exclusiveMaximumTimestamp)&&Xt(e.exclusiveMinimumTimestamp)&&Xt(e.maximumTimestamp)&&Xt(e.minimumTimestamp)&&Xt(e.multipleOfTimestamp)}function Cp(e){return Rt(e,"Function")&&e.type==="Function"&&zt(e.$id)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function Qo(e){return Rt(e,"Integer")&&e.type==="integer"&&zt(e.$id)&&Xt(e.exclusiveMaximum)&&Xt(e.exclusiveMinimum)&&Xt(e.maximum)&&Xt(e.minimum)&&Xt(e.multipleOf)}function zT(e){return Fr(e)&&Object.entries(e).every(([t,n])=>Uw(t)&&nn(n))}function ja(e){return Rt(e,"Intersect")&&!(br(e.type)&&e.type!=="object")&&kn(e.allOf)&&e.allOf.every(t=>nn(t)&&!BD(t))&&zt(e.type)&&(Nw(e.unevaluatedProperties)||$T(e.unevaluatedProperties))&&zt(e.$id)}function Pw(e){return Rt(e,"Iterator")&&e.type==="Iterator"&&zt(e.$id)&&nn(e.items)}function Rt(e,t){return Fr(e)&&at in e&&e[at]===t}function qT(e){return Us(e)&&br(e.const)}function HT(e){return Us(e)&&eo(e.const)}function QT(e){return Us(e)&&gf(e.const)}function Us(e){return Rt(e,"Literal")&&zt(e.$id)&&_D(e.const)}function _D(e){return gf(e)||eo(e)||br(e)}function CD(e){return Rt(e,"MappedKey")&&kn(e.keys)&&e.keys.every(t=>eo(t)||br(t))}function FD(e){return Rt(e,"MappedResult")&&zT(e.properties)}function Ns(e){return Rt(e,"Never")&&Fr(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function $u(e){return Rt(e,"Not")&&nn(e.not)}function kw(e){return Rt(e,"Null")&&e.type==="null"&&zt(e.$id)}function Bn(e){return Rt(e,"Number")&&e.type==="number"&&zt(e.$id)&&Xt(e.exclusiveMaximum)&&Xt(e.exclusiveMinimum)&&Xt(e.maximum)&&Xt(e.minimum)&&Xt(e.multipleOf)}function cr(e){return Rt(e,"Object")&&e.type==="object"&&zt(e.$id)&&zT(e.properties)&&LT(e.additionalProperties)&&Xt(e.minProperties)&&Xt(e.maxProperties)}function Lw(e){return Rt(e,"Promise")&&e.type==="Promise"&&zt(e.$id)&&nn(e.item)}function rn(e){return Rt(e,"Record")&&e.type==="object"&&zt(e.$id)&&LT(e.additionalProperties)&&Fr(e.patternProperties)&&(t=>{const n=Object.getOwnPropertyNames(t.patternProperties);return n.length===1&&kT(n[0])&&Fr(t.patternProperties)&&nn(t.patternProperties[n[0]])})(e)}function OD(e){return Rt(e,"Ref")&&zt(e.$id)&&br(e.$ref)}function Jc(e){return Rt(e,"RegExp")&&zt(e.$id)&&br(e.source)&&br(e.flags)&&Xt(e.maxLength)&&Xt(e.minLength)}function ji(e){return Rt(e,"String")&&e.type==="string"&&zt(e.$id)&&Xt(e.minLength)&&Xt(e.maxLength)&&xD(e.pattern)&&ED(e.format)}function Zc(e){return Rt(e,"Symbol")&&e.type==="symbol"&&zt(e.$id)}function ef(e){return Rt(e,"TemplateLiteral")&&e.type==="string"&&br(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function TD(e){return Rt(e,"This")&&zt(e.$id)&&br(e.$ref)}function BD(e){return Fr(e)&&Wn in e}function Fp(e){return Rt(e,"Tuple")&&e.type==="array"&&zt(e.$id)&&eo(e.minItems)&&eo(e.maxItems)&&e.minItems===e.maxItems&&(_r(e.items)&&_r(e.additionalItems)&&e.minItems===0||kn(e.items)&&e.items.every(t=>nn(t)))}function Sa(e){return Rt(e,"Undefined")&&e.type==="undefined"&&zt(e.$id)}function $o(e){return Rt(e,"Union")&&zt(e.$id)&&Fr(e)&&kn(e.anyOf)&&e.anyOf.every(t=>nn(t))}function xf(e){return Rt(e,"Uint8Array")&&e.type==="Uint8Array"&&zt(e.$id)&&Xt(e.minByteLength)&&Xt(e.maxByteLength)}function Ui(e){return Rt(e,"Unknown")&&zt(e.$id)}function RD(e){return Rt(e,"Unsafe")}function Op(e){return Rt(e,"Void")&&e.type==="void"&&zt(e.$id)}function MD(e){return Fr(e)&&at in e&&br(e[at])&&!vD.includes(e[at])}function nn(e){return Fr(e)&&(Mi(e)||SD(e)||Ra(e)||Ma(e)||Sp(e)||Dw(e)||ID(e)||Ip(e)||_p(e)||Cp(e)||Qo(e)||ja(e)||Pw(e)||Us(e)||CD(e)||FD(e)||Ns(e)||$u(e)||kw(e)||Bn(e)||cr(e)||Lw(e)||rn(e)||OD(e)||Jc(e)||ji(e)||Zc(e)||ef(e)||TD(e)||Fp(e)||Sa(e)||$o(e)||xf(e)||Ui(e)||RD(e)||Op(e)||MD(e))}const jD="(true|false)",ud="(0|[1-9][0-9]*)",GT="(.*)",UD="(?!.*)",zu=`^${ud}$`,qu=`^${GT}$`,ND=`^${UD}$`,$w=new Map;function KT(e){return $w.has(e)}function ro(e,t){$w.set(e,t)}function YT(e){return $w.get(e)}const VT=new Map;function zw(e){return VT.has(e)}function WT(e){return VT.get(e)}function DD(e,t){return e.includes(t)}function PD(e){return[...new Set(e)]}function kD(e,t){return e.filter(n=>t.includes(n))}function LD(e,t){return e.reduce((n,o)=>kD(n,o),t)}function $D(e){return e.length===1?e[0]:e.length>1?LD(e.slice(1),e[0]):[]}function zD(e){const t=[];for(const n of e)t.push(...n);return t}function tf(e){return nt({[at]:"Any"},e)}function qw(e,t){return nt({[at]:"Array",type:"array",items:e},t)}function qD(e){return nt({[at]:"Argument",index:e})}function Hw(e,t){return nt({[at]:"AsyncIterator",type:"AsyncIterator",items:e},t)}function Dr(e,t,n){return nt({[at]:"Computed",target:e,parameters:t},n)}function HD(e,t){const{[t]:n,...o}=e;return o}function Zn(e,t){return t.reduce((n,o)=>HD(n,o),e)}function yr(e){return nt({[at]:"Never",not:{}},e)}function on(e){return nt({[at]:"MappedResult",properties:e})}function Qw(e,t,n){return nt({[at]:"Constructor",type:"Constructor",parameters:e,returns:t},n)}function Ef(e,t,n){return nt({[at]:"Function",type:"Function",parameters:e,returns:t},n)}function Db(e,t){return nt({[at]:"Union",anyOf:e},t)}function QD(e){return e.some(t=>js(t))}function II(e){return e.map(t=>js(t)?GD(t):t)}function GD(e){return Zn(e,[Ho])}function KD(e,t){return QD(e)?ks(Db(II(e),t)):Db(II(e),t)}function tl(e,t){return e.length===1?nt(e[0],t):e.length===0?yr(t):KD(e,t)}function sn(e,t){return e.length===0?yr(t):e.length===1?nt(e[0],t):Db(e,t)}class _I extends ii{}function YD(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function Gw(e,t,n){return e[t]===n&&e.charCodeAt(t-1)!==92}function Do(e,t){return Gw(e,t,"(")}function rf(e,t){return Gw(e,t,")")}function XT(e,t){return Gw(e,t,"|")}function VD(e){if(!(Do(e,0)&&rf(e,e.length-1)))return!1;let t=0;for(let n=0;n<e.length;n++)if(Do(e,n)&&(t+=1),rf(e,n)&&(t-=1),t===0&&n!==e.length-1)return!1;return!0}function WD(e){return e.slice(1,e.length-1)}function XD(e){let t=0;for(let n=0;n<e.length;n++)if(Do(e,n)&&(t+=1),rf(e,n)&&(t-=1),XT(e,n)&&t===0)return!0;return!1}function JD(e){for(let t=0;t<e.length;t++)if(Do(e,t))return!0;return!1}function ZD(e){let[t,n]=[0,0];const o=[];for(let a=0;a<e.length;a++)if(Do(e,a)&&(t+=1),rf(e,a)&&(t-=1),XT(e,a)&&t===0){const l=e.slice(n,a);l.length>0&&o.push(Hu(l)),n=a+1}const s=e.slice(n);return s.length>0&&o.push(Hu(s)),o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"or",expr:o}}function eP(e){function t(s,a){if(!Do(s,a))throw new _I("TemplateLiteralParser: Index must point to open parens");let l=0;for(let c=a;c<s.length;c++)if(Do(s,c)&&(l+=1),rf(s,c)&&(l-=1),l===0)return[a,c];throw new _I("TemplateLiteralParser: Unclosed group parens in expression")}function n(s,a){for(let l=a;l<s.length;l++)if(Do(s,l))return[a,l];return[a,s.length]}const o=[];for(let s=0;s<e.length;s++)if(Do(e,s)){const[a,l]=t(e,s),c=e.slice(a,l+1);o.push(Hu(c)),s=l}else{const[a,l]=n(e,s),c=e.slice(a,l);c.length>0&&o.push(Hu(c)),s=l-1}return o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"and",expr:o}}function Hu(e){return VD(e)?Hu(WD(e)):XD(e)?ZD(e):JD(e)?eP(e):{type:"const",const:YD(e)}}function Kw(e){return Hu(e.slice(1,e.length-1))}class tP extends ii{}function rP(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function nP(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function iP(e){return e.type==="const"&&e.const===".*"}function nf(e){return rP(e)||iP(e)?!1:nP(e)?!0:e.type==="and"?e.expr.every(t=>nf(t)):e.type==="or"?e.expr.every(t=>nf(t)):e.type==="const"?!0:(()=>{throw new tP("Unknown expression type")})()}function oP(e){const t=Kw(e.pattern);return nf(t)}class sP extends ii{}function*JT(e){if(e.length===1)return yield*e[0];for(const t of e[0])for(const n of JT(e.slice(1)))yield`${t}${n}`}function*aP(e){return yield*JT(e.expr.map(t=>[...Tp(t)]))}function*uP(e){for(const t of e.expr)yield*Tp(t)}function*lP(e){return yield e.const}function*Tp(e){return e.type==="and"?yield*aP(e):e.type==="or"?yield*uP(e):e.type==="const"?yield*lP(e):(()=>{throw new sP("Unknown expression")})()}function ZT(e){const t=Kw(e.pattern);return nf(t)?[...Tp(t)]:[]}function Cr(e,t){return nt({[at]:"Literal",const:e,type:typeof e},t)}function eB(e){return nt({[at]:"Boolean",type:"boolean"},e)}function Yw(e){return nt({[at]:"BigInt",type:"bigint"},e)}function Ua(e){return nt({[at]:"Number",type:"number"},e)}function Ia(e){return nt({[at]:"String",type:"string"},e)}function*cP(e){const t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield eB():t==="number"?yield Ua():t==="bigint"?yield Yw():t==="string"?yield Ia():yield(()=>{const n=t.split("|").map(o=>Cr(o.trim()));return n.length===0?yr():n.length===1?n[0]:tl(n)})()}function*fP(e){if(e[1]!=="{"){const t=Cr("$"),n=Pb(e.slice(1));return yield*[t,...n]}for(let t=2;t<e.length;t++)if(e[t]==="}"){const n=cP(e.slice(2,t)),o=Pb(e.slice(t+1));return yield*[...n,...o]}yield Cr(e)}function*Pb(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){const n=Cr(e.slice(0,t)),o=fP(e.slice(t));return yield*[n,...o]}yield Cr(e)}function hP(e){return[...Pb(e)]}class dP extends ii{}function pP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tB(e,t){return Ta(e)?e.pattern.slice(1,e.pattern.length-1):Gr(e)?`(${e.anyOf.map(n=>tB(n,t)).join("|")})`:el(e)?`${t}${ud}`:Zu(e)?`${t}${ud}`:Ap(e)?`${t}${ud}`:vf(e)?`${t}${GT}`:Fa(e)?`${t}${pP(e.const.toString())}`:Af(e)?`${t}${jD}`:(()=>{throw new dP(`Unexpected Kind '${e[at]}'`)})()}function CI(e){return`^${e.map(t=>tB(t,"")).join("")}$`}function Yd(e){const n=ZT(e).map(o=>Cr(o));return tl(n)}function rB(e,t){const n=br(e)?CI(hP(e)):CI(e);return nt({[at]:"TemplateLiteral",type:"string",pattern:n},t)}function yP(e){return ZT(e).map(n=>n.toString())}function gP(e){const t=[];for(const n of e)t.push(...Ds(n));return t}function mP(e){return[e.toString()]}function Ds(e){return[...new Set(Ta(e)?yP(e):Gr(e)?gP(e.anyOf):Fa(e)?mP(e.const):el(e)?["[number]"]:Zu(e)?["[number]"]:[])]}function bP(e,t,n){const o={};for(const s of Object.getOwnPropertyNames(t))o[s]=Bp(e,Ds(t[s]),n);return o}function AP(e,t,n){return bP(e,t.properties,n)}function wP(e,t,n){const o=AP(e,t,n);return on(o)}function nB(e,t){return e.map(n=>iB(n,t))}function vP(e){return e.filter(t=>!wf(t))}function xP(e,t){return aB(vP(nB(e,t)))}function EP(e){return e.some(t=>wf(t))?[]:e}function SP(e,t){return tl(EP(nB(e,t)))}function IP(e,t){return t in e?e[t]:t==="[number]"?tl(e):yr()}function _P(e,t){return t==="[number]"?e:yr()}function CP(e,t){return t in e?e[t]:yr()}function iB(e,t){return wi(e)?xP(e.allOf,t):Gr(e)?SP(e.anyOf,t):Ba(e)?IP(e.items??[],t):Vu(e)?_P(e.items,t):Pi(e)?CP(e.properties,t):yr()}function Vw(e,t){return t.map(n=>iB(e,n))}function FI(e,t){return tl(Vw(e,t))}function Bp(e,t,n){if(Nn(e)||Nn(t)){const o="Index types using Ref parameters require both Type and Key to be of TSchema";if(!Xn(e)||!Xn(t))throw new ii(o);return Dr("Index",[e,t])}return oi(t)?wP(e,t,n):Oa(t)?BP(e,t,n):nt(Xn(t)?FI(e,Ds(t)):FI(e,t),n)}function FP(e,t,n){return{[t]:Bp(e,[t],Jn(n))}}function OP(e,t,n){return t.reduce((o,s)=>({...o,...FP(e,s,n)}),{})}function TP(e,t,n){return OP(e,t.keys,n)}function BP(e,t,n){const o=TP(e,t,n);return on(o)}function Ww(e,t){return nt({[at]:"Iterator",type:"Iterator",items:e},t)}function RP(e){const t=[];for(let n in e)js(e[n])||t.push(n);return t}function MP(e,t){const n=RP(e),o=n.length>0?{[at]:"Object",type:"object",properties:e,required:n}:{[at]:"Object",type:"object",properties:e};return nt(o,t)}var Qr=MP;function oB(e,t){return nt({[at]:"Promise",type:"Promise",item:e},t)}function jP(e){return nt(Zn(e,[bf]))}function UP(e){return nt({...e,[bf]:"Readonly"})}function NP(e,t){return t===!1?jP(e):UP(e)}function Ps(e,t){const n=t??!0;return oi(e)?kP(e,n):NP(e,n)}function DP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Ps(e[o],t);return n}function PP(e,t){return DP(e.properties,t)}function kP(e,t){const n=PP(e,t);return on(n)}function rl(e,t){return nt(e.length>0?{[at]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[at]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}function sB(e,t){return e in t?bi(e,t[e]):on(t)}function LP(e){return{[e]:Cr(e)}}function $P(e){const t={};for(const n of e)t[n]=Cr(n);return t}function zP(e,t){return DD(t,e)?LP(e):$P(t)}function qP(e,t){const n=zP(e,t);return sB(e,n)}function uc(e,t){return t.map(n=>bi(e,n))}function HP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(t))n[o]=bi(e,t[o]);return n}function bi(e,t){const n={...t};return js(t)?ks(bi(e,Zn(t,[Ho]))):Rw(t)?Ps(bi(e,Zn(t,[bf]))):oi(t)?sB(e,t.properties):Oa(t)?qP(e,t.keys):Xu(t)?Qw(uc(e,t.parameters),bi(e,t.returns),n):Ju(t)?Ef(uc(e,t.parameters),bi(e,t.returns),n):bp(t)?Hw(bi(e,t.items),n):wp(t)?Ww(bi(e,t.items),n):wi(t)?Ls(uc(e,t.allOf),n):Gr(t)?sn(uc(e,t.anyOf),n):Ba(t)?rl(uc(e,t.items??[]),n):Pi(t)?Qr(HP(e,t.properties),n):Vu(t)?qw(bi(e,t.items),n):vp(t)?oB(bi(e,t.item),n):t}function QP(e,t){const n={};for(const o of e)n[o]=bi(o,t);return n}function GP(e,t,n){const o=Xn(e)?Ds(e):e,s=t({[at]:"MappedKey",keys:o}),a=QP(o,s);return Qr(a,n)}function KP(e){return nt(Zn(e,[Ho]))}function YP(e){return nt({...e,[Ho]:"Optional"})}function VP(e,t){return t===!1?KP(e):YP(e)}function ks(e,t){const n=t??!0;return oi(e)?JP(e,n):VP(e,n)}function WP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=ks(e[o],t);return n}function XP(e,t){return WP(e.properties,t)}function JP(e,t){const n=XP(e,t);return on(n)}function kb(e,t={}){const n=e.every(s=>Pi(s)),o=Xn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return nt(t.unevaluatedProperties===!1||Xn(t.unevaluatedProperties)||n?{...o,[at]:"Intersect",type:"object",allOf:e}:{...o,[at]:"Intersect",allOf:e},t)}function ZP(e){return e.every(t=>js(t))}function e5(e){return Zn(e,[Ho])}function OI(e){return e.map(t=>js(t)?e5(t):t)}function t5(e,t){return ZP(e)?ks(kb(OI(e),t)):kb(OI(e),t)}function aB(e,t={}){if(e.length===1)return nt(e[0],t);if(e.length===0)return yr(t);if(e.some(n=>ar(n)))throw new Error("Cannot intersect transform types");return t5(e,t)}function Ls(e,t){if(e.length===1)return nt(e[0],t);if(e.length===0)return yr(t);if(e.some(n=>ar(n)))throw new Error("Cannot intersect transform types");return kb(e,t)}function Sf(...e){const[t,n]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof t!="string")throw new ii("Ref: $ref must be a string");return nt({[at]:"Ref",$ref:t},n)}function r5(e,t){return Dr("Awaited",[Dr(e,t)])}function n5(e){return Dr("Awaited",[Sf(e)])}function i5(e){return Ls(uB(e))}function o5(e){return sn(uB(e))}function s5(e){return Rp(e)}function uB(e){return e.map(t=>Rp(t))}function Rp(e,t){return nt(Wu(e)?r5(e.target,e.parameters):wi(e)?i5(e.allOf):Gr(e)?o5(e.anyOf):vp(e)?s5(e.item):Nn(e)?n5(e.$ref):e,t)}function lB(e){const t=[];for(const n of e)t.push(nl(n));return t}function a5(e){const t=lB(e);return zD(t)}function u5(e){const t=lB(e);return $D(t)}function l5(e){return e.map((t,n)=>n.toString())}function c5(e){return["[number]"]}function f5(e){return globalThis.Object.getOwnPropertyNames(e)}function h5(e){return Lb?globalThis.Object.getOwnPropertyNames(e).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}function nl(e){return wi(e)?a5(e.allOf):Gr(e)?u5(e.anyOf):Ba(e)?l5(e.items??[]):Vu(e)?c5(e.items):Pi(e)?f5(e.properties):xp(e)?h5(e.patternProperties):[]}let Lb=!1;function Vd(e){Lb=!0;const t=nl(e);return Lb=!1,`^(${t.map(o=>`(${o})`).join("|")})$`}function d5(e,t){return Dr("KeyOf",[Dr(e,t)])}function p5(e){return Dr("KeyOf",[Sf(e)])}function y5(e,t){const n=nl(e),o=g5(n),s=tl(o);return nt(s,t)}function g5(e){return e.map(t=>t==="[number]"?Ua():Cr(t))}function Xw(e,t){return Wu(e)?d5(e.target,e.parameters):Nn(e)?p5(e.$ref):oi(e)?A5(e,t):y5(e,t)}function m5(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Xw(e[o],Jn(t));return n}function b5(e,t){return m5(e.properties,t)}function A5(e,t){const n=b5(e,t);return on(n)}function w5(e){const t=nl(e),n=Vw(e,t);return t.map((o,s)=>[t[s],n[s]])}function v5(e){const t=[];for(const n of e)t.push(...nl(n));return PD(t)}function x5(e){return e.filter(t=>!wf(t))}function E5(e,t){const n=[];for(const o of e)n.push(...Vw(o,[t]));return x5(n)}function S5(e,t){const n={};for(const o of t)n[o]=aB(E5(e,o));return n}function I5(e,t){const n=v5(e),o=S5(e,n);return Qr(o,t)}function cB(e){return nt({[at]:"Date",type:"Date"},e)}function fB(e){return nt({[at]:"Null",type:"null"},e)}function hB(e){return nt({[at]:"Symbol",type:"symbol"},e)}function dB(e){return nt({[at]:"Undefined",type:"undefined"},e)}function pB(e){return nt({[at]:"Uint8Array",type:"Uint8Array"},e)}function Mp(e){return nt({[at]:"Unknown"},e)}function _5(e){return e.map(t=>Jw(t,!1))}function C5(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ps(Jw(e[n],!1));return t}function Zh(e,t){return t===!0?e:Ps(e)}function Jw(e,t){return ZN(e)||tD(e)?Zh(tf(),t):kn(e)?Ps(rl(_5(e))):mf(e)?pB():Fw(e)?cB():Fr(e)?Zh(Qr(C5(e)),t):eD(e)?Zh(Ef([],Mp()),t):_r(e)?dB():rD(e)?fB():nD(e)?hB():FT(e)?Yw():eo(e)||gf(e)||br(e)?Cr(e):Qr({})}function F5(e,t){return nt(Jw(e,!0),t)}function O5(e,t){return Xu(e)?rl(e.parameters,t):yr(t)}function T5(e,t){if(_r(e))throw new Error("Enum undefined or empty");const n=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),s=[...new Set(n)].map(a=>Cr(a));return sn(s,{...t,[mp]:"Enum"})}class B5 extends ii{}var $e;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})($e||($e={}));function Ai(e){return e===$e.False?e:$e.True}function il(e){throw new B5(e)}function Or(e){return Ns(e)||ja(e)||$o(e)||Ui(e)||Mi(e)}function Tr(e,t){return Ns(t)?mB():ja(t)?jp(e,t):$o(t)?ev(e,t):Ui(t)?vB():Mi(t)?Zw():il("StructuralRight")}function Zw(e,t){return $e.True}function R5(e,t){return ja(t)?jp(e,t):$o(t)&&t.anyOf.some(n=>Mi(n)||Ui(n))?$e.True:$o(t)?$e.Union:Ui(t)||Mi(t)?$e.True:$e.Union}function M5(e,t){return Ui(e)?$e.False:Mi(e)?$e.Union:Ns(e)?$e.True:$e.False}function j5(e,t){return cr(t)&&Up(t)?$e.True:Or(t)?Tr(e,t):Ra(t)?Ai($t(e.items,t.items)):$e.False}function U5(e,t){return Or(t)?Tr(e,t):Dw(t)?Ai($t(e.items,t.items)):$e.False}function N5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Sp(t)?$e.True:$e.False}function yB(e,t){return QT(e)||Ma(e)?$e.True:$e.False}function D5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Ma(t)?$e.True:$e.False}function P5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):Ip(t)?e.parameters.length>t.parameters.length?$e.False:e.parameters.every((n,o)=>Ai($t(t.parameters[o],n))===$e.True)?Ai($t(e.returns,t.returns)):$e.False:$e.False}function k5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):_p(t)?$e.True:$e.False}function L5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):Cp(t)?e.parameters.length>t.parameters.length?$e.False:e.parameters.every((n,o)=>Ai($t(t.parameters[o],n))===$e.True)?Ai($t(e.returns,t.returns)):$e.False:$e.False}function gB(e,t){return Us(e)&&eo(e.const)||Bn(e)||Qo(e)?$e.True:$e.False}function $5(e,t){return Qo(t)||Bn(t)?$e.True:Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):$e.False}function jp(e,t){return t.allOf.every(n=>$t(e,n)===$e.True)?$e.True:$e.False}function z5(e,t){return e.allOf.some(n=>$t(n,t)===$e.True)?$e.True:$e.False}function q5(e,t){return Or(t)?Tr(e,t):Pw(t)?Ai($t(e.items,t.items)):$e.False}function H5(e,t){return Us(t)&&t.const===e.const?$e.True:Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):ji(t)?wB(e):Bn(t)?bB(e):Qo(t)?gB(e):Ma(t)?yB(e):$e.False}function mB(e,t){return $e.False}function Q5(e,t){return $e.True}function TI(e){let[t,n]=[e,0];for(;$u(t);)t=t.not,n+=1;return n%2===0?t:Mp()}function G5(e,t){return $u(e)?$t(TI(e),t):$u(t)?$t(e,TI(t)):il("Invalid fallthrough for Not")}function K5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):kw(t)?$e.True:$e.False}function bB(e,t){return HT(e)||Bn(e)||Qo(e)?$e.True:$e.False}function Y5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Qo(t)||Bn(t)?$e.True:$e.False}function Dn(e,t){return Object.getOwnPropertyNames(e.properties).length===t}function BI(e){return Up(e)}function RI(e){return Dn(e,0)||Dn(e,1)&&"description"in e.properties&&$o(e.properties.description)&&e.properties.description.anyOf.length===2&&(ji(e.properties.description.anyOf[0])&&Sa(e.properties.description.anyOf[1])||ji(e.properties.description.anyOf[1])&&Sa(e.properties.description.anyOf[0]))}function Fm(e){return Dn(e,0)}function MI(e){return Dn(e,0)}function V5(e){return Dn(e,0)}function W5(e){return Dn(e,0)}function X5(e){return Up(e)}function J5(e){const t=Ua();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&Ai($t(e.properties.length,t))===$e.True}function Z5(e){return Dn(e,0)}function Up(e){const t=Ua();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&Ai($t(e.properties.length,t))===$e.True}function ek(e){const t=Ef([tf()],tf());return Dn(e,0)||Dn(e,1)&&"then"in e.properties&&Ai($t(e.properties.then,t))===$e.True}function AB(e,t){return $t(e,t)===$e.False||Kd(e)&&!Kd(t)?$e.False:$e.True}function yn(e,t){return Ui(e)?$e.False:Mi(e)?$e.Union:Ns(e)||qT(e)&&BI(t)||HT(e)&&Fm(t)||QT(e)&&MI(t)||Zc(e)&&RI(t)||Sp(e)&&V5(t)||ji(e)&&BI(t)||Zc(e)&&RI(t)||Bn(e)&&Fm(t)||Qo(e)&&Fm(t)||Ma(e)&&MI(t)||xf(e)&&X5(t)||_p(e)&&W5(t)||Ip(e)&&Z5(t)||Cp(e)&&J5(t)?$e.True:rn(e)&&ji($b(e))?t[mp]==="Record"?$e.True:$e.False:rn(e)&&Bn($b(e))?Dn(t,0)?$e.True:$e.False:$e.False}function tk(e,t){return Or(t)?Tr(e,t):rn(t)?vi(e,t):cr(t)?(()=>{for(const n of Object.getOwnPropertyNames(t.properties)){if(!(n in e.properties)&&!Kd(t.properties[n]))return $e.False;if(Kd(t.properties[n]))return $e.True;if(AB(e.properties[n],t.properties[n])===$e.False)return $e.False}return $e.True})():$e.False}function rk(e,t){return Or(t)?Tr(e,t):cr(t)&&ek(t)?$e.True:Lw(t)?Ai($t(e.item,t.item)):$e.False}function $b(e){return zu in e.patternProperties?Ua():qu in e.patternProperties?Ia():il("Unknown record key pattern")}function zb(e){return zu in e.patternProperties?e.patternProperties[zu]:qu in e.patternProperties?e.patternProperties[qu]:il("Unable to get record value schema")}function vi(e,t){const[n,o]=[$b(t),zb(t)];return qT(e)&&Bn(n)&&Ai($t(e,o))===$e.True?$e.True:xf(e)&&Bn(n)||ji(e)&&Bn(n)||Ra(e)&&Bn(n)?$t(e,o):cr(e)?(()=>{for(const s of Object.getOwnPropertyNames(e.properties))if(AB(o,e.properties[s])===$e.False)return $e.False;return $e.True})():$e.False}function nk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?$t(zb(e),zb(t)):$e.False}function ik(e,t){const n=Jc(e)?Ia():e,o=Jc(t)?Ia():t;return $t(n,o)}function wB(e,t){return Us(e)&&br(e.const)||ji(e)?$e.True:$e.False}function ok(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):ji(t)?$e.True:$e.False}function sk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Zc(t)?$e.True:$e.False}function ak(e,t){return ef(e)?$t(Yd(e),t):ef(t)?$t(e,Yd(t)):il("Invalid fallthrough for TemplateLiteral")}function uk(e,t){return Ra(t)&&e.items!==void 0&&e.items.every(n=>$t(n,t.items)===$e.True)}function lk(e,t){return Ns(e)?$e.True:Ui(e)?$e.False:Mi(e)?$e.Union:$e.False}function ck(e,t){return Or(t)?Tr(e,t):cr(t)&&Up(t)||Ra(t)&&uk(e,t)?$e.True:Fp(t)?_r(e.items)&&!_r(t.items)||!_r(e.items)&&_r(t.items)?$e.False:_r(e.items)&&!_r(t.items)||e.items.every((n,o)=>$t(n,t.items[o])===$e.True)?$e.True:$e.False:$e.False}function fk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):xf(t)?$e.True:$e.False}function hk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Op(t)?yk(e):Sa(t)?$e.True:$e.False}function ev(e,t){return t.anyOf.some(n=>$t(e,n)===$e.True)?$e.True:$e.False}function dk(e,t){return e.anyOf.every(n=>$t(n,t)===$e.True)?$e.True:$e.False}function vB(e,t){return $e.True}function pk(e,t){return Ns(t)?mB():ja(t)?jp(e,t):$o(t)?ev(e,t):Mi(t)?Zw():ji(t)?wB(e):Bn(t)?bB(e):Qo(t)?gB(e):Ma(t)?yB(e):Ra(t)?M5(e):Fp(t)?lk(e):cr(t)?yn(e,t):Ui(t)?$e.True:$e.False}function yk(e,t){return Sa(e)||Sa(e)?$e.True:$e.False}function gk(e,t){return ja(t)?jp(e,t):$o(t)?ev(e,t):Ui(t)?vB():Mi(t)?Zw():cr(t)?yn(e,t):Op(t)?$e.True:$e.False}function $t(e,t){return ef(e)||ef(t)?ak(e,t):Jc(e)||Jc(t)?ik(e,t):$u(e)||$u(t)?G5(e,t):Mi(e)?R5(e,t):Ra(e)?j5(e,t):Sp(e)?N5(e,t):Ma(e)?D5(e,t):Dw(e)?U5(e,t):Ip(e)?P5(e,t):_p(e)?k5(e,t):Cp(e)?L5(e,t):Qo(e)?$5(e,t):ja(e)?z5(e,t):Pw(e)?q5(e,t):Us(e)?H5(e,t):Ns(e)?Q5():kw(e)?K5(e,t):Bn(e)?Y5(e,t):cr(e)?tk(e,t):rn(e)?nk(e,t):ji(e)?ok(e,t):Zc(e)?sk(e,t):Fp(e)?ck(e,t):Lw(e)?rk(e,t):xf(e)?fk(e,t):Sa(e)?hk(e,t):$o(e)?dk(e,t):Ui(e)?pk(e,t):Op(e)?gk(e,t):il(`Unknown left type operand '${e[at]}'`)}function If(e,t){return $t(e,t)}function mk(e,t,n,o,s){const a={};for(const l of globalThis.Object.getOwnPropertyNames(e))a[l]=tv(e[l],t,n,o,Jn(s));return a}function bk(e,t,n,o,s){return mk(e.properties,t,n,o,s)}function Ak(e,t,n,o,s){const a=bk(e,t,n,o,s);return on(a)}function wk(e,t,n,o){const s=If(e,t);return s===$e.Union?sn([n,o]):s===$e.True?n:o}function tv(e,t,n,o,s){return oi(e)?Ak(e,t,n,o,s):Oa(e)?nt(Sk(e,t,n,o,s)):nt(wk(e,t,n,o),s)}function vk(e,t,n,o,s){return{[e]:tv(Cr(e),t,n,o,Jn(s))}}function xk(e,t,n,o,s){return e.reduce((a,l)=>({...a,...vk(l,t,n,o,s)}),{})}function Ek(e,t,n,o,s){return xk(e.keys,t,n,o,s)}function Sk(e,t,n,o,s){const a=Ek(e,t,n,o,s);return on(a)}function Ik(e){return e.allOf.every(t=>_f(t))}function _k(e){return e.anyOf.some(t=>_f(t))}function Ck(e){return!_f(e.not)}function _f(e){return e[at]==="Intersect"?Ik(e):e[at]==="Union"?_k(e):e[at]==="Not"?Ck(e):e[at]==="Undefined"}function Fk(e,t){return rv(Yd(e),t)}function Ok(e,t){const n=e.filter(o=>If(o,t)===$e.False);return n.length===1?n[0]:sn(n)}function rv(e,t,n={}){return Ta(e)?nt(Fk(e,t),n):oi(e)?nt(Rk(e,t),n):nt(Gr(e)?Ok(e.anyOf,t):If(e,t)!==$e.False?yr():e,n)}function Tk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=rv(e[o],t);return n}function Bk(e,t){return Tk(e.properties,t)}function Rk(e,t){const n=Bk(e,t);return on(n)}function Mk(e,t){return nv(Yd(e),t)}function jk(e,t){const n=e.filter(o=>If(o,t)!==$e.False);return n.length===1?n[0]:sn(n)}function nv(e,t,n){return Ta(e)?nt(Mk(e,t),n):oi(e)?nt(Dk(e,t),n):nt(Gr(e)?jk(e.anyOf,t):If(e,t)!==$e.False?e:yr(),n)}function Uk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=nv(e[o],t);return n}function Nk(e,t){return Uk(e.properties,t)}function Dk(e,t){const n=Nk(e,t);return on(n)}function Pk(e,t){return Xu(e)?nt(e.returns,t):yr(t)}function xB(e){return Ps(ks(e))}function Na(e,t,n){return nt({[at]:"Record",type:"object",patternProperties:{[e]:t}},n)}function iv(e,t,n){const o={};for(const s of e)o[s]=t;return Qr(o,{...n,[mp]:"Record"})}function kk(e,t,n){return oP(e)?iv(Ds(e),t,n):Na(e.pattern,t,n)}function Lk(e,t,n){return iv(Ds(sn(e)),t,n)}function $k(e,t,n){return iv([e.toString()],t,n)}function zk(e,t,n){return Na(e.source,t,n)}function qk(e,t,n){const o=_r(e.pattern)?qu:e.pattern;return Na(o,t,n)}function Hk(e,t,n){return Na(qu,t,n)}function Qk(e,t,n){return Na(ND,t,n)}function Gk(e,t,n){return Qr({true:t,false:t},n)}function Kk(e,t,n){return Na(zu,t,n)}function Yk(e,t,n){return Na(zu,t,n)}function EB(e,t,n={}){return Gr(e)?Lk(e.anyOf,t,n):Ta(e)?kk(e,t,n):Fa(e)?$k(e.const,t,n):Af(e)?Gk(e,t,n):Zu(e)?Kk(e,t,n):el(e)?Yk(e,t,n):PT(e)?zk(e,t,n):vf(e)?qk(e,t,n):UT(e)?Hk(e,t,n):wf(e)?Qk(e,t,n):yr(n)}function ov(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function Vk(e){const t=ov(e);return t===qu?Ia():t===zu?Ua():Ia({pattern:t})}function SB(e){return e.patternProperties[ov(e)]}function Wk(e,t){return t.parameters=Cf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Xk(e,t){return t.parameters=Cf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Jk(e,t){return t.allOf=Cf(e,t.allOf),t}function Zk(e,t){return t.anyOf=Cf(e,t.anyOf),t}function eL(e,t){return _r(t.items)||(t.items=Cf(e,t.items)),t}function tL(e,t){return t.items=Ni(e,t.items),t}function rL(e,t){return t.items=Ni(e,t.items),t}function nL(e,t){return t.items=Ni(e,t.items),t}function iL(e,t){return t.item=Ni(e,t.item),t}function oL(e,t){const n=lL(e,t.properties);return{...t,...Qr(n)}}function sL(e,t){const n=Ni(e,Vk(t)),o=Ni(e,SB(t)),s=EB(n,o);return{...t,...s}}function aL(e,t){return t.index in e?e[t.index]:Mp()}function uL(e,t){const n=Rw(t),o=js(t),s=Ni(e,t);return n&&o?xB(s):n&&!o?Ps(s):!n&&o?ks(s):s}function lL(e,t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:uL(e,t[o])}),{})}function Cf(e,t){return t.map(n=>Ni(e,n))}function Ni(e,t){return Xu(t)?Wk(e,t):Ju(t)?Xk(e,t):wi(t)?Jk(e,t):Gr(t)?Zk(e,t):Ba(t)?eL(e,t):Vu(t)?tL(e,t):bp(t)?rL(e,t):wp(t)?nL(e,t):vp(t)?iL(e,t):Pi(t)?oL(e,t):xp(t)?sL(e,t):NT(t)?aL(e,t):t}function cL(e,t){return Ni(t,Ow(e))}function fL(e){return nt({[at]:"Integer",type:"integer"},e)}function hL(e,t,n){return{[e]:ol(Cr(e),t,Jn(n))}}function dL(e,t,n){return e.reduce((s,a)=>({...s,...hL(a,t,n)}),{})}function pL(e,t,n){return dL(e.keys,t,n)}function yL(e,t,n){const o=pL(e,t,n);return on(o)}function gL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),n].join("")}function mL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),n].join("")}function bL(e){return e.toUpperCase()}function AL(e){return e.toLowerCase()}function wL(e,t,n){const o=Kw(e.pattern);if(!nf(o))return{...e,pattern:IB(e.pattern,t)};const l=[...Tp(o)].map(f=>Cr(f)),c=_B(l,t),h=sn(c);return rB([h],n)}function IB(e,t){return typeof e=="string"?t==="Uncapitalize"?gL(e):t==="Capitalize"?mL(e):t==="Uppercase"?bL(e):t==="Lowercase"?AL(e):e:e.toString()}function _B(e,t){return e.map(n=>ol(n,t))}function ol(e,t,n={}){return Oa(e)?yL(e,t,n):Ta(e)?wL(e,t,n):Gr(e)?sn(_B(e.anyOf,t),n):Fa(e)?Cr(IB(e.const,t),n):nt(e,n)}function vL(e,t={}){return ol(e,"Capitalize",t)}function xL(e,t={}){return ol(e,"Lowercase",t)}function EL(e,t={}){return ol(e,"Uncapitalize",t)}function SL(e,t={}){return ol(e,"Uppercase",t)}function IL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Np(e[s],t,Jn(n));return o}function _L(e,t,n){return IL(e.properties,t,n)}function CL(e,t,n){const o=_L(e,t,n);return on(o)}function FL(e,t){return e.map(n=>sv(n,t))}function OL(e,t){return e.map(n=>sv(n,t))}function TL(e,t){const{[t]:n,...o}=e;return o}function BL(e,t){return t.reduce((n,o)=>TL(n,o),e)}function RL(e,t){const n=Zn(e,[Wn,"$id","required","properties"]),o=BL(e.properties,t);return Qr(o,n)}function ML(e){const t=e.reduce((n,o)=>DT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function sv(e,t){return wi(e)?Ls(FL(e.allOf,t)):Gr(e)?sn(OL(e.anyOf,t)):Pi(e)?RL(e,t):Qr({})}function Np(e,t,n){const o=kn(t)?ML(t):t,s=Xn(t)?Ds(t):t,a=Nn(e),l=Nn(t);return oi(e)?CL(e,s,n):Oa(t)?DL(e,t,n):a&&l?Dr("Omit",[e,o],n):!a&&l?Dr("Omit",[e,o],n):a&&!l?Dr("Omit",[e,o],n):nt({...sv(e,s),...n})}function jL(e,t,n){return{[t]:Np(e,[t],Jn(n))}}function UL(e,t,n){return t.reduce((o,s)=>({...o,...jL(e,s,n)}),{})}function NL(e,t,n){return UL(e,t.keys,n)}function DL(e,t,n){const o=NL(e,t,n);return on(o)}function PL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Dp(e[s],t,Jn(n));return o}function kL(e,t,n){return PL(e.properties,t,n)}function LL(e,t,n){const o=kL(e,t,n);return on(o)}function $L(e,t){return e.map(n=>av(n,t))}function zL(e,t){return e.map(n=>av(n,t))}function qL(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function HL(e,t){const n=Zn(e,[Wn,"$id","required","properties"]),o=qL(e.properties,t);return Qr(o,n)}function QL(e){const t=e.reduce((n,o)=>DT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function av(e,t){return wi(e)?Ls($L(e.allOf,t)):Gr(e)?sn(zL(e.anyOf,t)):Pi(e)?HL(e,t):Qr({})}function Dp(e,t,n){const o=kn(t)?QL(t):t,s=Xn(t)?Ds(t):t,a=Nn(e),l=Nn(t);return oi(e)?LL(e,s,n):Oa(t)?VL(e,t,n):a&&l?Dr("Pick",[e,o],n):!a&&l?Dr("Pick",[e,o],n):a&&!l?Dr("Pick",[e,o],n):nt({...av(e,s),...n})}function GL(e,t,n){return{[t]:Dp(e,[t],Jn(n))}}function KL(e,t,n){return t.reduce((o,s)=>({...o,...GL(e,s,n)}),{})}function YL(e,t,n){return KL(e,t.keys,n)}function VL(e,t,n){const o=YL(e,t,n);return on(o)}function WL(e,t){return Dr("Partial",[Dr(e,t)])}function XL(e){return Dr("Partial",[Sf(e)])}function JL(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=ks(e[n]);return t}function ZL(e){const t=Zn(e,[Wn,"$id","required","properties"]),n=JL(e.properties);return Qr(n,t)}function jI(e){return e.map(t=>CB(t))}function CB(e){return Wu(e)?WL(e.target,e.parameters):Nn(e)?XL(e.$ref):wi(e)?Ls(jI(e.allOf)):Gr(e)?sn(jI(e.anyOf)):Pi(e)?ZL(e):Ap(e)||Af(e)||Zu(e)||Fa(e)||Mw(e)||el(e)||vf(e)||jw(e)||Ep(e)?e:Qr({})}function uv(e,t){return oi(e)?r$(e,t):nt({...CB(e),...t})}function e$(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=uv(e[o],Jn(t));return n}function t$(e,t){return e$(e.properties,t)}function r$(e,t){const n=t$(e,t);return on(n)}function n$(e,t){return Dr("Required",[Dr(e,t)])}function i$(e){return Dr("Required",[Sf(e)])}function o$(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Zn(e[n],[Ho]);return t}function s$(e){const t=Zn(e,[Wn,"$id","required","properties"]),n=o$(e.properties);return Qr(n,t)}function UI(e){return e.map(t=>FB(t))}function FB(e){return Wu(e)?n$(e.target,e.parameters):Nn(e)?i$(e.$ref):wi(e)?Ls(UI(e.allOf)):Gr(e)?sn(UI(e.anyOf)):Pi(e)?s$(e):Ap(e)||Af(e)||Zu(e)||Fa(e)||Mw(e)||el(e)||vf(e)||jw(e)||Ep(e)?e:Qr({})}function lv(e,t){return oi(e)?l$(e,t):nt({...FB(e),...t})}function a$(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=lv(e[o],t);return n}function u$(e,t){return a$(e.properties,t)}function l$(e,t){const n=u$(e,t);return on(n)}function c$(e,t){return t.map(n=>Nn(n)?cv(e,n.$ref):ei(e,n))}function cv(e,t){return t in e?Nn(e[t])?cv(e,e[t].$ref):ei(e,e[t]):yr()}function f$(e){return Rp(e[0])}function h$(e){return Bp(e[0],e[1])}function d$(e){return Xw(e[0])}function p$(e){return uv(e[0])}function y$(e){return Np(e[0],e[1])}function g$(e){return Dp(e[0],e[1])}function m$(e){return lv(e[0])}function b$(e,t,n){const o=c$(e,n);return t==="Awaited"?f$(o):t==="Index"?h$(o):t==="KeyOf"?d$(o):t==="Partial"?p$(o):t==="Omit"?y$(o):t==="Pick"?g$(o):t==="Required"?m$(o):yr()}function A$(e,t){return qw(ei(e,t))}function w$(e,t){return Hw(ei(e,t))}function v$(e,t,n){return Qw(Ff(e,t),ei(e,n))}function x$(e,t,n){return Ef(Ff(e,t),ei(e,n))}function E$(e,t){return Ls(Ff(e,t))}function S$(e,t){return Ww(ei(e,t))}function I$(e,t){return Qr(globalThis.Object.keys(t).reduce((n,o)=>({...n,[o]:ei(e,t[o])}),{}))}function _$(e,t){const[n,o]=[ei(e,SB(t)),ov(t)],s=Ow(t);return s.patternProperties[o]=n,s}function C$(e,t){return Nn(t)?{...cv(e,t.$ref),[Wn]:t[Wn]}:t}function F$(e,t){return rl(Ff(e,t))}function O$(e,t){return sn(Ff(e,t))}function Ff(e,t){return t.map(n=>ei(e,n))}function ei(e,t){return js(t)?nt(ei(e,Zn(t,[Ho])),t):Rw(t)?nt(ei(e,Zn(t,[bf])),t):ar(t)?nt(C$(e,t),t):Vu(t)?nt(A$(e,t.items),t):bp(t)?nt(w$(e,t.items),t):Wu(t)?nt(b$(e,t.target,t.parameters)):Xu(t)?nt(v$(e,t.parameters,t.returns),t):Ju(t)?nt(x$(e,t.parameters,t.returns),t):wi(t)?nt(E$(e,t.allOf),t):wp(t)?nt(S$(e,t.items),t):Pi(t)?nt(I$(e,t.properties),t):xp(t)?nt(_$(e,t)):Ba(t)?nt(F$(e,t.items||[]),t):Gr(t)?nt(O$(e,t.anyOf),t):t}function T$(e,t){return t in e?ei(e,e[t]):yr()}function B$(e){return globalThis.Object.getOwnPropertyNames(e).reduce((t,n)=>({...t,[n]:T$(e,n)}),{})}class R${constructor(t){const n=B$(t),o=this.WithIdentifiers(n);this.$defs=o}Import(t,n){const o={...this.$defs,[t]:nt(this.$defs[t],n)};return nt({[at]:"Import",$defs:o,$ref:t})}WithIdentifiers(t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:{...t[o],$id:o}}),{})}}function M$(e){return new R$(e)}function j$(e,t){return nt({[at]:"Not",not:e},t)}function U$(e,t){return Ju(e)?rl(e.parameters,t):yr()}let N$=0;function D$(e,t={}){_r(t.$id)&&(t.$id=`T${N$++}`);const n=Ow(e({[at]:"This",$ref:`${t.$id}`}));return n.$id=t.$id,nt({[mp]:"Recursive",...n},t)}function P$(e,t){const n=br(e)?new globalThis.RegExp(e):e;return nt({[at]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},t)}function k$(e){return wi(e)?e.allOf:Gr(e)?e.anyOf:Ba(e)?e.items??[]:[]}function L$(e){return k$(e)}function $$(e,t){return Ju(e)?nt(e.returns,t):yr(t)}class z${constructor(t){this.schema=t}Decode(t){return new q$(this.schema,t)}}class q${constructor(t,n){this.schema=t,this.decode=n}EncodeTransform(t,n){const a={Encode:l=>n[Wn].Encode(t(l)),Decode:l=>this.decode(n[Wn].Decode(l))};return{...n,[Wn]:a}}EncodeSchema(t,n){const o={Decode:this.decode,Encode:t};return{...n,[Wn]:o}}Encode(t){return ar(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}}function H$(e){return new z$(e)}function Q$(e={}){return nt({[at]:e[at]??"Unsafe"},e)}function G$(e){return nt({[at]:"Void",type:"void"},e)}const K$=Object.freeze(Object.defineProperty({__proto__:null,Any:tf,Argument:qD,Array:qw,AsyncIterator:Hw,Awaited:Rp,BigInt:Yw,Boolean:eB,Capitalize:vL,Composite:I5,Const:F5,Constructor:Qw,ConstructorParameters:O5,Date:cB,Enum:T5,Exclude:rv,Extends:tv,Extract:nv,Function:Ef,Index:Bp,InstanceType:Pk,Instantiate:cL,Integer:fL,Intersect:Ls,Iterator:Ww,KeyOf:Xw,Literal:Cr,Lowercase:xL,Mapped:GP,Module:M$,Never:yr,Not:j$,Null:fB,Number:Ua,Object:Qr,Omit:Np,Optional:ks,Parameters:U$,Partial:uv,Pick:Dp,Promise:oB,Readonly:Ps,ReadonlyOptional:xB,Record:EB,Recursive:D$,Ref:Sf,RegExp:P$,Required:lv,Rest:L$,ReturnType:$$,String:Ia,Symbol:hB,TemplateLiteral:rB,Transform:H$,Tuple:rl,Uint8Array:pB,Uncapitalize:EL,Undefined:dB,Union:sn,Unknown:Mp,Unsafe:Q$,Uppercase:SL,Void:G$},Symbol.toStringTag,{value:"Module"})),Ue=K$;function Y$(e){switch(e.errorType){case Ne.ArrayContains:return"Expected array to contain at least one matching value";case Ne.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case Ne.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case Ne.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case Ne.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case Ne.ArrayUniqueItems:return"Expected array elements to be unique";case Ne.Array:return"Expected array";case Ne.AsyncIterator:return"Expected AsyncIterator";case Ne.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case Ne.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case Ne.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case Ne.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case Ne.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case Ne.BigInt:return"Expected bigint";case Ne.Boolean:return"Expected boolean";case Ne.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case Ne.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case Ne.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case Ne.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case Ne.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case Ne.Date:return"Expected Date";case Ne.Function:return"Expected function";case Ne.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case Ne.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case Ne.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case Ne.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case Ne.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case Ne.Integer:return"Expected integer";case Ne.IntersectUnevaluatedProperties:return"Unexpected property";case Ne.Intersect:return"Expected all values to match";case Ne.Iterator:return"Expected Iterator";case Ne.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case Ne.Never:return"Never";case Ne.Not:return"Value should not match";case Ne.Null:return"Expected null";case Ne.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case Ne.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case Ne.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case Ne.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case Ne.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case Ne.Number:return"Expected number";case Ne.Object:return"Expected object";case Ne.ObjectAdditionalProperties:return"Unexpected property";case Ne.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case Ne.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case Ne.ObjectRequiredProperty:return"Expected required property";case Ne.Promise:return"Expected Promise";case Ne.RegExp:return"Expected string to match regular expression";case Ne.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case Ne.StringFormat:return`Expected string to match '${e.schema.format}' format`;case Ne.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case Ne.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case Ne.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case Ne.String:return"Expected string";case Ne.Symbol:return"Expected symbol";case Ne.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case Ne.Tuple:return"Expected tuple";case Ne.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case Ne.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case Ne.Uint8Array:return"Expected Uint8Array";case Ne.Undefined:return"Expected undefined";case Ne.Union:return"Expected union value";case Ne.Void:return"Expected void";case Ne.Kind:return`Expected kind '${e.schema[at]}'`;default:return"Unknown error type"}}let V$=Y$;function W$(){return V$}class X$ extends ii{constructor(t){super(`Unable to dereference schema with $id '${t.$ref}'`),this.schema=t}}function J$(e,t){const n=t.find(o=>o.$id===e.$ref);if(n===void 0)throw new X$(e);return Go(n,t)}function fv(e,t){return!Wi(e.$id)||t.some(n=>n.$id===e.$id)||t.push(e),t}function Go(e,t){return e[at]==="This"||e[at]==="Ref"?J$(e,t):e}class Z$ extends ii{constructor(t){super("Unable to hash value"),this.value=t}}var ti;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(ti||(ti={}));let _u=BigInt("14695981039346656037");const[ez,tz]=[BigInt("1099511628211"),BigInt("18446744073709551616")],rz=Array.from({length:256}).map((e,t)=>BigInt(t)),OB=new Float64Array(1),TB=new DataView(OB.buffer),BB=new Uint8Array(OB.buffer);function*nz(e){const t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let n=0;n<t;n++)yield e>>8*(t-1-n)&255}function iz(e){pn(ti.Array);for(const t of e)Qu(t)}function oz(e){pn(ti.Boolean),pn(e?1:0)}function sz(e){pn(ti.BigInt),TB.setBigInt64(0,e);for(const t of BB)pn(t)}function az(e){pn(ti.Date),Qu(e.getTime())}function uz(e){pn(ti.Null)}function lz(e){pn(ti.Number),TB.setFloat64(0,e);for(const t of BB)pn(t)}function cz(e){pn(ti.Object);for(const t of globalThis.Object.getOwnPropertyNames(e).sort())Qu(t),Qu(e[t])}function fz(e){pn(ti.String);for(let t=0;t<e.length;t++)for(const n of nz(e.charCodeAt(t)))pn(n)}function hz(e){pn(ti.Symbol),Qu(e.description)}function dz(e){pn(ti.Uint8Array);for(let t=0;t<e.length;t++)pn(e[t])}function pz(e){return pn(ti.Undefined)}function Qu(e){if(Lo(e))return iz(e);if(pp(e))return oz(e);if(yp(e))return sz(e);if(Tw(e))return az(e);if(dp(e))return uz();if(No(e))return lz(e);if(_a(e))return cz(e);if(Wi(e))return fz(e);if(gp(e))return hz(e);if(Bw(e))return dz(e);if(Ca(e))return pz();throw new Z$(e)}function pn(e){_u=_u^rz[e],_u=_u*ez%tz}function RB(e){return _u=BigInt("14695981039346656037"),Qu(e),_u}class yz extends ii{constructor(t){super("Unknown type"),this.schema=t}}function gz(e){return e[at]==="Any"||e[at]==="Unknown"}function Ct(e){return e!==void 0}function mz(e,t,n){return!0}function bz(e,t,n){return!0}function Az(e,t,n){if(!Lo(n)||Ct(e.minItems)&&!(n.length>=e.minItems)||Ct(e.maxItems)&&!(n.length<=e.maxItems)||!n.every(a=>zr(e.items,t,a))||e.uniqueItems===!0&&!(function(){const a=new Set;for(const l of n){const c=RB(l);if(a.has(c))return!1;a.add(c)}return!0})())return!1;if(!(Ct(e.contains)||No(e.minContains)||No(e.maxContains)))return!0;const o=Ct(e.contains)?e.contains:yr(),s=n.reduce((a,l)=>zr(o,t,l)?a+1:a,0);return!(s===0||No(e.minContains)&&s<e.minContains||No(e.maxContains)&&s>e.maxContains)}function wz(e,t,n){return TT(n)}function vz(e,t,n){return!(!yp(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.multipleOf)&&n%e.multipleOf!==BigInt(0))}function xz(e,t,n){return pp(n)}function Ez(e,t,n){return zr(e.returns,t,n.prototype)}function Sz(e,t,n){return!(!Tw(n)||Ct(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)||Ct(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)||Ct(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)||Ct(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)||Ct(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0)}function Iz(e,t,n){return jT(n)}function _z(e,t,n){const o=globalThis.Object.values(e.$defs),s=e.$defs[e.$ref];return zr(s,[...t,...o],n)}function Cz(e,t,n){return!(!MT(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.multipleOf)&&n%e.multipleOf!==0)}function Fz(e,t,n){const o=e.allOf.every(s=>zr(s,t,n));if(e.unevaluatedProperties===!1){const s=new RegExp(Vd(e)),a=Object.getOwnPropertyNames(n).every(l=>s.test(l));return o&&a}else if(Xn(e.unevaluatedProperties)){const s=new RegExp(Vd(e)),a=Object.getOwnPropertyNames(n).every(l=>s.test(l)||zr(e.unevaluatedProperties,t,n[l]));return o&&a}else return o}function Oz(e,t,n){return BT(n)}function Tz(e,t,n){return n===e.const}function Bz(e,t,n){return!1}function Rz(e,t,n){return!zr(e.not,t,n)}function Mz(e,t,n){return dp(n)}function jz(e,t,n){return!(!Un.IsNumberLike(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.multipleOf)&&n%e.multipleOf!==0)}function Uz(e,t,n){if(!Un.IsObjectLike(n)||Ct(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||Ct(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;const o=Object.getOwnPropertyNames(e.properties);for(const s of o){const a=e.properties[s];if(e.required&&e.required.includes(s)){if(!zr(a,t,n[s])||(_f(a)||gz(a))&&!(s in n))return!1}else if(Un.IsExactOptionalProperty(n,s)&&!zr(a,t,n[s]))return!1}if(e.additionalProperties===!1){const s=Object.getOwnPropertyNames(n);return e.required&&e.required.length===o.length&&s.length===o.length?!0:s.every(a=>o.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(n).every(a=>o.includes(a)||zr(e.additionalProperties,t,n[a])):!0}function Nz(e,t,n){return RT(n)}function Dz(e,t,n){if(!Un.IsRecordLike(n)||Ct(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||Ct(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;const[o,s]=Object.entries(e.patternProperties)[0],a=new RegExp(o),l=Object.entries(n).every(([f,p])=>a.test(f)?zr(s,t,p):!0),c=typeof e.additionalProperties=="object"?Object.entries(n).every(([f,p])=>a.test(f)?!0:zr(e.additionalProperties,t,p)):!0,h=e.additionalProperties===!1?Object.getOwnPropertyNames(n).every(f=>a.test(f)):!0;return l&&c&&h}function Pz(e,t,n){return zr(Go(e,t),t,n)}function kz(e,t,n){const o=new RegExp(e.source,e.flags);return Ct(e.minLength)&&!(n.length>=e.minLength)||Ct(e.maxLength)&&!(n.length<=e.maxLength)?!1:o.test(n)}function Lz(e,t,n){return!Wi(n)||Ct(e.minLength)&&!(n.length>=e.minLength)||Ct(e.maxLength)&&!(n.length<=e.maxLength)||Ct(e.pattern)&&!new RegExp(e.pattern).test(n)?!1:Ct(e.format)?KT(e.format)?YT(e.format)(n):!1:!0}function $z(e,t,n){return gp(n)}function zz(e,t,n){return Wi(n)&&new RegExp(e.pattern).test(n)}function qz(e,t,n){return zr(Go(e,t),t,n)}function Hz(e,t,n){if(!Lo(n)||e.items===void 0&&n.length!==0||n.length!==e.maxItems)return!1;if(!e.items)return!0;for(let o=0;o<e.items.length;o++)if(!zr(e.items[o],t,n[o]))return!1;return!0}function Qz(e,t,n){return Ca(n)}function Gz(e,t,n){return e.anyOf.some(o=>zr(o,t,n))}function Kz(e,t,n){return!(!Bw(n)||Ct(e.maxByteLength)&&!(n.length<=e.maxByteLength)||Ct(e.minByteLength)&&!(n.length>=e.minByteLength))}function Yz(e,t,n){return!0}function Vz(e,t,n){return Un.IsVoidLike(n)}function Wz(e,t,n){return zw(e[at])?WT(e[at])(e,n):!1}function zr(e,t,n){const o=Ct(e.$id)?fv(e,t):t,s=e;switch(s[at]){case"Any":return mz();case"Argument":return bz();case"Array":return Az(s,o,n);case"AsyncIterator":return wz(s,o,n);case"BigInt":return vz(s,o,n);case"Boolean":return xz(s,o,n);case"Constructor":return Ez(s,o,n);case"Date":return Sz(s,o,n);case"Function":return Iz(s,o,n);case"Import":return _z(s,o,n);case"Integer":return Cz(s,o,n);case"Intersect":return Fz(s,o,n);case"Iterator":return Oz(s,o,n);case"Literal":return Tz(s,o,n);case"Never":return Bz();case"Not":return Rz(s,o,n);case"Null":return Mz(s,o,n);case"Number":return jz(s,o,n);case"Object":return Uz(s,o,n);case"Promise":return Nz(s,o,n);case"Record":return Dz(s,o,n);case"Ref":return Pz(s,o,n);case"RegExp":return kz(s,o,n);case"String":return Lz(s,o,n);case"Symbol":return $z(s,o,n);case"TemplateLiteral":return zz(s,o,n);case"This":return qz(s,o,n);case"Tuple":return Hz(s,o,n);case"Undefined":return Qz(s,o,n);case"Union":return Gz(s,o,n);case"Uint8Array":return Kz(s,o,n);case"Unknown":return Yz();case"Void":return Vz(s,o,n);default:if(!zw(s[at]))throw new yz(s);return Wz(s,o,n)}}function hv(...e){return e.length===3?zr(e[0],e[1],e[2]):zr(e[0],[],e[1])}var Ne;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(Ne||(Ne={}));class Xz extends ii{constructor(t){super("Unknown type"),this.schema=t}}function Bo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function _t(e){return e!==void 0}class MB{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){const t=this.iterator.next();return t.done?void 0:t.value}}function ot(e,t,n,o,s=[]){return{type:e,schema:t,path:n,value:o,message:W$()({errorType:e,path:n,schema:t,value:o,errors:s}),errors:s}}function*Jz(e,t,n,o){}function*Zz(e,t,n,o){}function*e7(e,t,n,o){if(!Lo(o))return yield ot(Ne.Array,e,n,o);_t(e.minItems)&&!(o.length>=e.minItems)&&(yield ot(Ne.ArrayMinItems,e,n,o)),_t(e.maxItems)&&!(o.length<=e.maxItems)&&(yield ot(Ne.ArrayMaxItems,e,n,o));for(let l=0;l<o.length;l++)yield*qr(e.items,t,`${n}/${l}`,o[l]);if(e.uniqueItems===!0&&!(function(){const l=new Set;for(const c of o){const h=RB(c);if(l.has(h))return!1;l.add(h)}return!0})()&&(yield ot(Ne.ArrayUniqueItems,e,n,o)),!(_t(e.contains)||_t(e.minContains)||_t(e.maxContains)))return;const s=_t(e.contains)?e.contains:yr(),a=o.reduce((l,c,h)=>qr(s,t,`${n}${h}`,c).next().done===!0?l+1:l,0);a===0&&(yield ot(Ne.ArrayContains,e,n,o)),No(e.minContains)&&a<e.minContains&&(yield ot(Ne.ArrayMinContains,e,n,o)),No(e.maxContains)&&a>e.maxContains&&(yield ot(Ne.ArrayMaxContains,e,n,o))}function*t7(e,t,n,o){TT(o)||(yield ot(Ne.AsyncIterator,e,n,o))}function*r7(e,t,n,o){if(!yp(o))return yield ot(Ne.BigInt,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.BigIntExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.BigIntExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.BigIntMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.BigIntMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==BigInt(0)&&(yield ot(Ne.BigIntMultipleOf,e,n,o))}function*n7(e,t,n,o){pp(o)||(yield ot(Ne.Boolean,e,n,o))}function*i7(e,t,n,o){yield*qr(e.returns,t,n,o.prototype)}function*o7(e,t,n,o){if(!Tw(o))return yield ot(Ne.Date,e,n,o);_t(e.exclusiveMaximumTimestamp)&&!(o.getTime()<e.exclusiveMaximumTimestamp)&&(yield ot(Ne.DateExclusiveMaximumTimestamp,e,n,o)),_t(e.exclusiveMinimumTimestamp)&&!(o.getTime()>e.exclusiveMinimumTimestamp)&&(yield ot(Ne.DateExclusiveMinimumTimestamp,e,n,o)),_t(e.maximumTimestamp)&&!(o.getTime()<=e.maximumTimestamp)&&(yield ot(Ne.DateMaximumTimestamp,e,n,o)),_t(e.minimumTimestamp)&&!(o.getTime()>=e.minimumTimestamp)&&(yield ot(Ne.DateMinimumTimestamp,e,n,o)),_t(e.multipleOfTimestamp)&&o.getTime()%e.multipleOfTimestamp!==0&&(yield ot(Ne.DateMultipleOfTimestamp,e,n,o))}function*s7(e,t,n,o){jT(o)||(yield ot(Ne.Function,e,n,o))}function*a7(e,t,n,o){const s=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*qr(a,[...t,...s],n,o)}function*u7(e,t,n,o){if(!MT(o))return yield ot(Ne.Integer,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.IntegerExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.IntegerExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.IntegerMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.IntegerMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield ot(Ne.IntegerMultipleOf,e,n,o))}function*l7(e,t,n,o){let s=!1;for(const a of e.allOf)for(const l of qr(a,t,n,o))s=!0,yield l;if(s)return yield ot(Ne.Intersect,e,n,o);if(e.unevaluatedProperties===!1){const a=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))a.test(l)||(yield ot(Ne.IntersectUnevaluatedProperties,e,`${n}/${l}`,o))}if(typeof e.unevaluatedProperties=="object"){const a=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))if(!a.test(l)){const c=qr(e.unevaluatedProperties,t,`${n}/${l}`,o[l]).next();c.done||(yield c.value)}}}function*c7(e,t,n,o){BT(o)||(yield ot(Ne.Iterator,e,n,o))}function*f7(e,t,n,o){o!==e.const&&(yield ot(Ne.Literal,e,n,o))}function*h7(e,t,n,o){yield ot(Ne.Never,e,n,o)}function*d7(e,t,n,o){qr(e.not,t,n,o).next().done===!0&&(yield ot(Ne.Not,e,n,o))}function*p7(e,t,n,o){dp(o)||(yield ot(Ne.Null,e,n,o))}function*y7(e,t,n,o){if(!Un.IsNumberLike(o))return yield ot(Ne.Number,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.NumberExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.NumberExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.NumberMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.NumberMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield ot(Ne.NumberMultipleOf,e,n,o))}function*g7(e,t,n,o){if(!Un.IsObjectLike(o))return yield ot(Ne.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield ot(Ne.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield ot(Ne.ObjectMaxProperties,e,n,o));const s=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),l=Object.getOwnPropertyNames(o);for(const c of s)l.includes(c)||(yield ot(Ne.ObjectRequiredProperty,e.properties[c],`${n}/${Bo(c)}`,void 0));if(e.additionalProperties===!1)for(const c of l)a.includes(c)||(yield ot(Ne.ObjectAdditionalProperties,e,`${n}/${Bo(c)}`,o[c]));if(typeof e.additionalProperties=="object")for(const c of l)a.includes(c)||(yield*qr(e.additionalProperties,t,`${n}/${Bo(c)}`,o[c]));for(const c of a){const h=e.properties[c];e.required&&e.required.includes(c)?(yield*qr(h,t,`${n}/${Bo(c)}`,o[c]),_f(e)&&!(c in o)&&(yield ot(Ne.ObjectRequiredProperty,h,`${n}/${Bo(c)}`,void 0))):Un.IsExactOptionalProperty(o,c)&&(yield*qr(h,t,`${n}/${Bo(c)}`,o[c]))}}function*m7(e,t,n,o){RT(o)||(yield ot(Ne.Promise,e,n,o))}function*b7(e,t,n,o){if(!Un.IsRecordLike(o))return yield ot(Ne.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield ot(Ne.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield ot(Ne.ObjectMaxProperties,e,n,o));const[s,a]=Object.entries(e.patternProperties)[0],l=new RegExp(s);for(const[c,h]of Object.entries(o))l.test(c)&&(yield*qr(a,t,`${n}/${Bo(c)}`,h));if(typeof e.additionalProperties=="object")for(const[c,h]of Object.entries(o))l.test(c)||(yield*qr(e.additionalProperties,t,`${n}/${Bo(c)}`,h));if(e.additionalProperties===!1){for(const[c,h]of Object.entries(o))if(!l.test(c))return yield ot(Ne.ObjectAdditionalProperties,e,`${n}/${Bo(c)}`,h)}}function*A7(e,t,n,o){yield*qr(Go(e,t),t,n,o)}function*w7(e,t,n,o){if(!Wi(o))return yield ot(Ne.String,e,n,o);if(_t(e.minLength)&&!(o.length>=e.minLength)&&(yield ot(Ne.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield ot(Ne.StringMaxLength,e,n,o)),!new RegExp(e.source,e.flags).test(o))return yield ot(Ne.RegExp,e,n,o)}function*v7(e,t,n,o){if(!Wi(o))return yield ot(Ne.String,e,n,o);_t(e.minLength)&&!(o.length>=e.minLength)&&(yield ot(Ne.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield ot(Ne.StringMaxLength,e,n,o)),Wi(e.pattern)&&(new RegExp(e.pattern).test(o)||(yield ot(Ne.StringPattern,e,n,o))),Wi(e.format)&&(KT(e.format)?YT(e.format)(o)||(yield ot(Ne.StringFormat,e,n,o)):yield ot(Ne.StringFormatUnknown,e,n,o))}function*x7(e,t,n,o){gp(o)||(yield ot(Ne.Symbol,e,n,o))}function*E7(e,t,n,o){if(!Wi(o))return yield ot(Ne.String,e,n,o);new RegExp(e.pattern).test(o)||(yield ot(Ne.StringPattern,e,n,o))}function*S7(e,t,n,o){yield*qr(Go(e,t),t,n,o)}function*I7(e,t,n,o){if(!Lo(o))return yield ot(Ne.Tuple,e,n,o);if(e.items===void 0&&o.length!==0)return yield ot(Ne.TupleLength,e,n,o);if(o.length!==e.maxItems)return yield ot(Ne.TupleLength,e,n,o);if(e.items)for(let s=0;s<e.items.length;s++)yield*qr(e.items[s],t,`${n}/${s}`,o[s])}function*_7(e,t,n,o){Ca(o)||(yield ot(Ne.Undefined,e,n,o))}function*C7(e,t,n,o){if(hv(e,t,o))return;const s=e.anyOf.map(a=>new MB(qr(a,t,n,o)));yield ot(Ne.Union,e,n,o,s)}function*F7(e,t,n,o){if(!Bw(o))return yield ot(Ne.Uint8Array,e,n,o);_t(e.maxByteLength)&&!(o.length<=e.maxByteLength)&&(yield ot(Ne.Uint8ArrayMaxByteLength,e,n,o)),_t(e.minByteLength)&&!(o.length>=e.minByteLength)&&(yield ot(Ne.Uint8ArrayMinByteLength,e,n,o))}function*O7(e,t,n,o){}function*T7(e,t,n,o){Un.IsVoidLike(o)||(yield ot(Ne.Void,e,n,o))}function*B7(e,t,n,o){WT(e[at])(e,o)||(yield ot(Ne.Kind,e,n,o))}function*qr(e,t,n,o){const s=_t(e.$id)?[...t,e]:t,a=e;switch(a[at]){case"Any":return yield*Jz();case"Argument":return yield*Zz();case"Array":return yield*e7(a,s,n,o);case"AsyncIterator":return yield*t7(a,s,n,o);case"BigInt":return yield*r7(a,s,n,o);case"Boolean":return yield*n7(a,s,n,o);case"Constructor":return yield*i7(a,s,n,o);case"Date":return yield*o7(a,s,n,o);case"Function":return yield*s7(a,s,n,o);case"Import":return yield*a7(a,s,n,o);case"Integer":return yield*u7(a,s,n,o);case"Intersect":return yield*l7(a,s,n,o);case"Iterator":return yield*c7(a,s,n,o);case"Literal":return yield*f7(a,s,n,o);case"Never":return yield*h7(a,s,n,o);case"Not":return yield*d7(a,s,n,o);case"Null":return yield*p7(a,s,n,o);case"Number":return yield*y7(a,s,n,o);case"Object":return yield*g7(a,s,n,o);case"Promise":return yield*m7(a,s,n,o);case"Record":return yield*b7(a,s,n,o);case"Ref":return yield*A7(a,s,n,o);case"RegExp":return yield*w7(a,s,n,o);case"String":return yield*v7(a,s,n,o);case"Symbol":return yield*x7(a,s,n,o);case"TemplateLiteral":return yield*E7(a,s,n,o);case"This":return yield*S7(a,s,n,o);case"Tuple":return yield*I7(a,s,n,o);case"Undefined":return yield*_7(a,s,n,o);case"Union":return yield*C7(a,s,n,o);case"Uint8Array":return yield*F7(a,s,n,o);case"Unknown":return yield*O7();case"Void":return yield*T7(a,s,n,o);default:if(!zw(a[at]))throw new Xz(e);return yield*B7(a,s,n,o)}}function R7(...e){const t=e.length===3?qr(e[0],e[1],"",e[2]):qr(e[0],[],"",e[1]);return new MB(t)}class M7 extends ii{constructor(t,n,o){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=n,this.error=o}}class j7 extends ii{constructor(t,n,o,s){super(s instanceof Error?s.message:"Unknown error"),this.schema=t,this.path=n,this.value=o,this.error=s}}function sr(e,t,n){try{return ar(e)?e[Wn].Decode(n):n}catch(o){throw new j7(e,t,n,o)}}function U7(e,t,n,o){return Lo(o)?sr(e,n,o.map((s,a)=>ki(e.items,t,`${n}/${a}`,s))):sr(e,n,o)}function N7(e,t,n,o){if(!_a(o)||cD(o))return sr(e,n,o);const s=w5(e),a=s.map(p=>p[0]),l={...o};for(const[p,y]of s)p in l&&(l[p]=ki(y,t,`${n}/${p}`,l[p]));if(!ar(e.unevaluatedProperties))return sr(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.unevaluatedProperties,f={...l};for(const p of c)a.includes(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}function D7(e,t,n,o){const s=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref],l=ki(a,[...t,...s],n,o);return sr(e,n,l)}function P7(e,t,n,o){return sr(e,n,ki(e.not,t,n,o))}function k7(e,t,n,o){if(!_a(o))return sr(e,n,o);const s=nl(e),a={...o};for(const f of s)lD(a,f)&&(Ca(a[f])&&(!Ep(e.properties[f])||Un.IsExactOptionalProperty(a,f))||(a[f]=ki(e.properties[f],t,`${n}/${f}`,a[f])));if(!Xn(e.additionalProperties))return sr(e,n,a);const l=Object.getOwnPropertyNames(a),c=e.additionalProperties,h={...a};for(const f of l)s.includes(f)||(h[f]=sr(c,`${n}/${f}`,h[f]));return sr(e,n,h)}function L7(e,t,n,o){if(!_a(o))return sr(e,n,o);const s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),l={...o};for(const p of Object.getOwnPropertyNames(o))a.test(p)&&(l[p]=ki(e.patternProperties[s],t,`${n}/${p}`,l[p]));if(!Xn(e.additionalProperties))return sr(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.additionalProperties,f={...l};for(const p of c)a.test(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}function $7(e,t,n,o){const s=Go(e,t);return sr(e,n,ki(s,t,n,o))}function z7(e,t,n,o){const s=Go(e,t);return sr(e,n,ki(s,t,n,o))}function q7(e,t,n,o){return Lo(o)&&Lo(e.items)?sr(e,n,e.items.map((s,a)=>ki(s,t,`${n}/${a}`,o[a]))):sr(e,n,o)}function H7(e,t,n,o){for(const s of e.anyOf){if(!hv(s,t,o))continue;const a=ki(s,t,n,o);return sr(e,n,a)}return sr(e,n,o)}function ki(e,t,n,o){const s=fv(e,t),a=e;switch(e[at]){case"Array":return U7(a,s,n,o);case"Import":return D7(a,s,n,o);case"Intersect":return N7(a,s,n,o);case"Not":return P7(a,s,n,o);case"Object":return k7(a,s,n,o);case"Record":return L7(a,s,n,o);case"Ref":return $7(a,s,n,o);case"Symbol":return sr(a,n,o);case"This":return z7(a,s,n,o);case"Tuple":return q7(a,s,n,o);case"Union":return H7(a,s,n,o);default:return sr(a,n,o)}}function Q7(e,t,n){return ki(e,t,"",n)}function G7(e,t){return ar(e)||Pr(e.items,t)}function K7(e,t){return ar(e)||Pr(e.items,t)}function Y7(e,t){return ar(e)||Pr(e.returns,t)||e.parameters.some(n=>Pr(n,t))}function V7(e,t){return ar(e)||Pr(e.returns,t)||e.parameters.some(n=>Pr(n,t))}function W7(e,t){return ar(e)||ar(e.unevaluatedProperties)||e.allOf.some(n=>Pr(n,t))}function X7(e,t){const n=globalThis.Object.getOwnPropertyNames(e.$defs).reduce((s,a)=>[...s,e.$defs[a]],[]),o=e.$defs[e.$ref];return ar(e)||Pr(o,[...n,...t])}function J7(e,t){return ar(e)||Pr(e.items,t)}function Z7(e,t){return ar(e)||Pr(e.not,t)}function e9(e,t){return ar(e)||Object.values(e.properties).some(n=>Pr(n,t))||Xn(e.additionalProperties)&&Pr(e.additionalProperties,t)}function t9(e,t){return ar(e)||Pr(e.item,t)}function r9(e,t){const n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n];return ar(e)||Pr(o,t)||Xn(e.additionalProperties)&&ar(e.additionalProperties)}function n9(e,t){return ar(e)?!0:Pr(Go(e,t),t)}function i9(e,t){return ar(e)?!0:Pr(Go(e,t),t)}function o9(e,t){return ar(e)||!Ca(e.items)&&e.items.some(n=>Pr(n,t))}function s9(e,t){return ar(e)||e.anyOf.some(n=>Pr(n,t))}function Pr(e,t){const n=fv(e,t),o=e;if(e.$id&&qb.has(e.$id))return!1;switch(e.$id&&qb.add(e.$id),e[at]){case"Array":return G7(o,n);case"AsyncIterator":return K7(o,n);case"Constructor":return Y7(o,n);case"Function":return V7(o,n);case"Import":return X7(o,n);case"Intersect":return W7(o,n);case"Iterator":return J7(o,n);case"Not":return Z7(o,n);case"Object":return e9(o,n);case"Promise":return t9(o,n);case"Record":return r9(o,n);case"Ref":return n9(o,n);case"This":return i9(o,n);case"Tuple":return o9(o,n);case"Union":return s9(o,n);default:return ar(e)}}const qb=new Set;function a9(e,t){return qb.clear(),Pr(e,t)}function u9(...e){const[t,n,o]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!hv(t,n,o))throw new M7(t,o,R7(t,n,o).First());return a9(t,n)?Q7(t,n,o):o}var So={},Om={exports:{}},Tm={},Bm={},Rm={},Mm,NI;function dv(){return NI||(NI=1,Mm=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,n);if(c.value!==s||c.enumerable!==!0)return!1}return!0}),Mm}var jm,DI;function Pp(){if(DI)return jm;DI=1;var e=dv();return jm=function(){return e()&&!!Symbol.toStringTag},jm}var Um,PI;function pv(){return PI||(PI=1,Um=Object),Um}var Nm,kI;function l9(){return kI||(kI=1,Nm=Error),Nm}var Dm,LI;function c9(){return LI||(LI=1,Dm=EvalError),Dm}var Pm,$I;function f9(){return $I||($I=1,Pm=RangeError),Pm}var km,zI;function h9(){return zI||(zI=1,km=ReferenceError),km}var Lm,qI;function jB(){return qI||(qI=1,Lm=SyntaxError),Lm}var $m,HI;function Of(){return HI||(HI=1,$m=TypeError),$m}var zm,QI;function d9(){return QI||(QI=1,zm=URIError),zm}var qm,GI;function p9(){return GI||(GI=1,qm=Math.abs),qm}var Hm,KI;function y9(){return KI||(KI=1,Hm=Math.floor),Hm}var Qm,YI;function g9(){return YI||(YI=1,Qm=Math.max),Qm}var Gm,VI;function m9(){return VI||(VI=1,Gm=Math.min),Gm}var Km,WI;function b9(){return WI||(WI=1,Km=Math.pow),Km}var Ym,XI;function A9(){return XI||(XI=1,Ym=Math.round),Ym}var Vm,JI;function w9(){return JI||(JI=1,Vm=Number.isNaN||function(t){return t!==t}),Vm}var Wm,ZI;function v9(){if(ZI)return Wm;ZI=1;var e=w9();return Wm=function(n){return e(n)||n===0?n:n<0?-1:1},Wm}var Xm,e_;function x9(){return e_||(e_=1,Xm=Object.getOwnPropertyDescriptor),Xm}var Jm,t_;function sl(){if(t_)return Jm;t_=1;var e=x9();if(e)try{e([],"length")}catch{e=null}return Jm=e,Jm}var Zm,r_;function kp(){if(r_)return Zm;r_=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Zm=e,Zm}var e0,n_;function E9(){if(n_)return e0;n_=1;var e=typeof Symbol<"u"&&Symbol,t=dv();return e0=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},e0}var t0,i_;function UB(){return i_||(i_=1,t0=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),t0}var r0,o_;function NB(){if(o_)return r0;o_=1;var e=pv();return r0=e.getPrototypeOf||null,r0}var n0,s_;function S9(){if(s_)return n0;s_=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,o="[object Function]",s=function(h,f){for(var p=[],y=0;y<h.length;y+=1)p[y]=h[y];for(var g=0;g<f.length;g+=1)p[g+h.length]=f[g];return p},a=function(h,f){for(var p=[],y=f,g=0;y<h.length;y+=1,g+=1)p[g]=h[y];return p},l=function(c,h){for(var f="",p=0;p<c.length;p+=1)f+=c[p],p+1<c.length&&(f+=h);return f};return n0=function(h){var f=this;if(typeof f!="function"||t.apply(f)!==o)throw new TypeError(e+f);for(var p=a(arguments,1),y,g=function(){if(this instanceof y){var R=f.apply(this,s(p,arguments));return Object(R)===R?R:this}return f.apply(h,s(p,arguments))},b=n(0,f.length-p.length),w=[],F=0;F<b;F++)w[F]="$"+F;if(y=Function("binder","return function ("+l(w,",")+"){ return binder.apply(this,arguments); }")(g),f.prototype){var I=function(){};I.prototype=f.prototype,y.prototype=new I,I.prototype=null}return y},n0}var i0,a_;function Tf(){if(a_)return i0;a_=1;var e=S9();return i0=Function.prototype.bind||e,i0}var o0,u_;function yv(){return u_||(u_=1,o0=Function.prototype.call),o0}var s0,l_;function gv(){return l_||(l_=1,s0=Function.prototype.apply),s0}var a0,c_;function I9(){return c_||(c_=1,a0=typeof Reflect<"u"&&Reflect&&Reflect.apply),a0}var u0,f_;function DB(){if(f_)return u0;f_=1;var e=Tf(),t=gv(),n=yv(),o=I9();return u0=o||e.call(n,t),u0}var l0,h_;function mv(){if(h_)return l0;h_=1;var e=Tf(),t=Of(),n=yv(),o=DB();return l0=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return o(e,n,a)},l0}var c0,d_;function _9(){if(d_)return c0;d_=1;var e=mv(),t=sl(),n;try{n=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var o=!!n&&t&&t(Object.prototype,"__proto__"),s=Object,a=s.getPrototypeOf;return c0=o&&typeof o.get=="function"?e([o.get]):typeof a=="function"?function(c){return a(c==null?c:s(c))}:!1,c0}var f0,p_;function bv(){if(p_)return f0;p_=1;var e=UB(),t=NB(),n=_9();return f0=e?function(s){return e(s)}:t?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return t(s)}:n?function(s){return n(s)}:null,f0}var h0,y_;function PB(){if(y_)return h0;y_=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Tf();return h0=n.call(e,t),h0}var d0,g_;function Av(){if(g_)return d0;g_=1;var e,t=pv(),n=l9(),o=c9(),s=f9(),a=h9(),l=jB(),c=Of(),h=d9(),f=p9(),p=y9(),y=g9(),g=m9(),b=b9(),w=A9(),F=v9(),I=Function,R=function(J){try{return I('"use strict"; return ('+J+").constructor;")()}catch{}},A=sl(),E=kp(),M=function(){throw new c},T=A?(function(){try{return arguments.callee,M}catch{try{return A(arguments,"callee").get}catch{return M}}})():M,z=E9()(),L=bv(),k=NB(),j=UB(),U=gv(),$=yv(),N={},Z=typeof Uint8Array>"u"||!L?e:L(Uint8Array),re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":z&&L?L([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":I,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":z&&L?L(L([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!z||!L?e:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!z||!L?e:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&L?L(""[Symbol.iterator]()):e,"%Symbol%":z?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":Z,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":h,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":$,"%Function.prototype.apply%":U,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":k,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":y,"%Math.min%":g,"%Math.pow%":b,"%Math.round%":w,"%Math.sign%":F,"%Reflect.getPrototypeOf%":j};if(L)try{null.error}catch(J){var ie=L(L(J));re["%Error.prototype%"]=ie}var X=function J(O){var H;if(O==="%AsyncFunction%")H=R("async function () {}");else if(O==="%GeneratorFunction%")H=R("function* () {}");else if(O==="%AsyncGeneratorFunction%")H=R("async function* () {}");else if(O==="%AsyncGenerator%"){var Y=J("%AsyncGeneratorFunction%");Y&&(H=Y.prototype)}else if(O==="%AsyncIteratorPrototype%"){var se=J("%AsyncGenerator%");se&&L&&(H=L(se.prototype))}return re[O]=H,H},ae={__proto__:null,"%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"]},ye=Tf(),le=PB(),ee=ye.call($,Array.prototype.concat),G=ye.call(U,Array.prototype.splice),Q=ye.call($,String.prototype.replace),K=ye.call($,String.prototype.slice),W=ye.call($,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fe=/\\(\\)?/g,ue=function(O){var H=K(O,0,1),Y=K(O,-1);if(H==="%"&&Y!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(Y==="%"&&H!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var se=[];return Q(O,q,function(pe,te,_,v){se[se.length]=_?Q(v,fe,"$1"):te||pe}),se},ne=function(O,H){var Y=O,se;if(le(ae,Y)&&(se=ae[Y],Y="%"+se[0]+"%"),le(re,Y)){var pe=re[Y];if(pe===N&&(pe=X(Y)),typeof pe>"u"&&!H)throw new c("intrinsic "+O+" exists, but is not available. Please file an issue!");return{alias:se,name:Y,value:pe}}throw new l("intrinsic "+O+" does not exist!")};return d0=function(O,H){if(typeof O!="string"||O.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof H!="boolean")throw new c('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,O)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=ue(O),se=Y.length>0?Y[0]:"",pe=ne("%"+se+"%",H),te=pe.name,_=pe.value,v=!1,C=pe.alias;C&&(se=C[0],G(Y,ee([0,1],C)));for(var P=1,he=!0;P<Y.length;P+=1){var ce=Y[P],Se=K(ce,0,1),Be=K(ce,-1);if((Se==='"'||Se==="'"||Se==="`"||Be==='"'||Be==="'"||Be==="`")&&Se!==Be)throw new l("property names with quotes must have matching quotes");if((ce==="constructor"||!he)&&(v=!0),se+="."+ce,te="%"+se+"%",le(re,te))_=re[te];else if(_!=null){if(!(ce in _)){if(!H)throw new c("base intrinsic for "+O+" exists, but the property is not available.");return}if(A&&P+1>=Y.length){var de=A(_,ce);he=!!de,he&&"get"in de&&!("originalValue"in de.get)?_=de.get:_=_[ce]}else he=le(_,ce),_=_[ce];he&&!v&&(re[te]=_)}}return _},d0}var p0,m_;function al(){if(m_)return p0;m_=1;var e=Av(),t=mv(),n=t([e("%String.prototype.indexOf%")]);return p0=function(s,a){var l=e(s,!!a);return typeof l=="function"&&n(s,".prototype.")>-1?t([l]):l},p0}var y0,b_;function C9(){if(b_)return y0;b_=1;var e=Pp()(),t=al(),n=t("Object.prototype.toString"),o=function(c){return e&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:n(c)==="[object Arguments]"},s=function(c){return o(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&n(c)!=="[object Array]"&&"callee"in c&&n(c.callee)==="[object Function]"},a=(function(){return o(arguments)})();return o.isLegacyArguments=s,y0=a?o:s,y0}var g0,A_;function F9(){if(A_)return g0;A_=1;var e=al(),t=Pp()(),n=PB(),o=sl(),s;if(t){var a=e("RegExp.prototype.exec"),l={},c=function(){throw l},h={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(h[Symbol.toPrimitive]=c),s=function(g){if(!g||typeof g!="object")return!1;var b=o(g,"lastIndex"),w=b&&n(b,"value");if(!w)return!1;try{a(g,h)}catch(F){return F===l}}}else{var f=e("Object.prototype.toString"),p="[object RegExp]";s=function(g){return!g||typeof g!="object"&&typeof g!="function"?!1:f(g)===p}}return g0=s,g0}var m0,w_;function O9(){if(w_)return m0;w_=1;var e=al(),t=F9(),n=e("RegExp.prototype.exec"),o=Of();return m0=function(a){if(!t(a))throw new o("`regex` must be a RegExp");return function(c){return n(a,c)!==null}},m0}var b0,v_;function T9(){if(v_)return b0;v_=1;const e=(function*(){}).constructor;return b0=()=>e,b0}var A0,x_;function B9(){if(x_)return A0;x_=1;var e=al(),t=O9(),n=t(/^\s*(?:function)?\*/),o=Pp()(),s=bv(),a=e("Object.prototype.toString"),l=e("Function.prototype.toString"),c=T9();return A0=function(f){if(typeof f!="function")return!1;if(n(l(f)))return!0;if(!o){var p=a(f);return p==="[object GeneratorFunction]"}if(!s)return!1;var y=c();return y&&s(f)===y.prototype},A0}var w0,E_;function R9(){if(E_)return w0;E_=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,o;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw o}}),o={},t(function(){throw 42},null,n)}catch(A){A!==o&&(t=null)}else t=null;var s=/^\s*class\b/,a=function(E){try{var M=e.call(E);return s.test(M)}catch{return!1}},l=function(E){try{return a(E)?!1:(e.call(E),!0)}catch{return!1}},c=Object.prototype.toString,h="[object Object]",f="[object Function]",p="[object GeneratorFunction]",y="[object HTMLAllCollection]",g="[object HTML document.all class]",b="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,F=!(0 in[,]),I=function(){return!1};if(typeof document=="object"){var R=document.all;c.call(R)===c.call(document.all)&&(I=function(E){if((F||!E)&&(typeof E>"u"||typeof E=="object"))try{var M=c.call(E);return(M===y||M===g||M===b||M===h)&&E("")==null}catch{}return!1})}return w0=t?function(E){if(I(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{t(E,null,n)}catch(M){if(M!==o)return!1}return!a(E)&&l(E)}:function(E){if(I(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(w)return l(E);if(a(E))return!1;var M=c.call(E);return M!==f&&M!==p&&!/^\[object HTML/.test(M)?!1:l(E)},w0}var v0,S_;function M9(){if(S_)return v0;S_=1;var e=R9(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=function(h,f,p){for(var y=0,g=h.length;y<g;y++)n.call(h,y)&&(p==null?f(h[y],y,h):f.call(p,h[y],y,h))},s=function(h,f,p){for(var y=0,g=h.length;y<g;y++)p==null?f(h.charAt(y),y,h):f.call(p,h.charAt(y),y,h)},a=function(h,f,p){for(var y in h)n.call(h,y)&&(p==null?f(h[y],y,h):f.call(p,h[y],y,h))};function l(c){return t.call(c)==="[object Array]"}return v0=function(h,f,p){if(!e(f))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=p),l(h)?o(h,f,y):typeof h=="string"?s(h,f,y):a(h,f,y)},v0}var x0,I_;function j9(){return I_||(I_=1,x0=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),x0}var E0,__;function U9(){if(__)return E0;__=1;var e=j9(),t=typeof globalThis>"u"?af:globalThis;return E0=function(){for(var o=[],s=0;s<e.length;s++)typeof t[e[s]]=="function"&&(o[o.length]=e[s]);return o},E0}var S0={exports:{}},I0,C_;function kB(){if(C_)return I0;C_=1;var e=kp(),t=jB(),n=Of(),o=sl();return I0=function(a,l,c){if(!a||typeof a!="object"&&typeof a!="function")throw new n("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,g=!!o&&o(a,l);if(e)e(a,l,{configurable:p===null&&g?g.configurable:!p,enumerable:h===null&&g?g.enumerable:!h,value:c,writable:f===null&&g?g.writable:!f});else if(y||!h&&!f&&!p)a[l]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},I0}var _0,F_;function LB(){if(F_)return _0;F_=1;var e=kp(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},_0=t,_0}var C0,O_;function N9(){if(O_)return C0;O_=1;var e=Av(),t=kB(),n=LB()(),o=sl(),s=Of(),a=e("%Math.floor%");return C0=function(c,h){if(typeof c!="function")throw new s("`fn` is not a function");if(typeof h!="number"||h<0||h>4294967295||a(h)!==h)throw new s("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],p=!0,y=!0;if("length"in c&&o){var g=o(c,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(y=!1)}return(p||y||!f)&&(n?t(c,"length",h,!0,!0):t(c,"length",h)),c},C0}var F0,T_;function D9(){if(T_)return F0;T_=1;var e=Tf(),t=gv(),n=DB();return F0=function(){return n(e,t,arguments)},F0}var B_;function Lp(){return B_||(B_=1,(function(e){var t=N9(),n=kp(),o=mv(),s=D9();e.exports=function(l){var c=o(arguments),h=l.length-(arguments.length-1);return t(c,1+(h>0?h:0),!0)},n?n(e.exports,"apply",{value:s}):e.exports.apply=s})(S0)),S0.exports}var O0,R_;function $B(){if(R_)return O0;R_=1;var e=M9(),t=U9(),n=Lp(),o=al(),s=sl(),a=bv(),l=o("Object.prototype.toString"),c=Pp()(),h=typeof globalThis>"u"?af:globalThis,f=t(),p=o("String.prototype.slice"),y=o("Array.prototype.indexOf",!0)||function(I,R){for(var A=0;A<I.length;A+=1)if(I[A]===R)return A;return-1},g={__proto__:null};c&&s&&a?e(f,function(F){var I=new h[F];if(Symbol.toStringTag in I&&a){var R=a(I),A=s(R,Symbol.toStringTag);if(!A&&R){var E=a(R);A=s(E,Symbol.toStringTag)}g["$"+F]=n(A.get)}}):e(f,function(F){var I=new h[F],R=I.slice||I.set;R&&(g["$"+F]=n(R))});var b=function(I){var R=!1;return e(g,function(A,E){if(!R)try{"$"+A(I)===E&&(R=p(E,1))}catch{}}),R},w=function(I){var R=!1;return e(g,function(A,E){if(!R)try{A(I),R=p(E,1)}catch{}}),R};return O0=function(I){if(!I||typeof I!="object")return!1;if(!c){var R=p(l(I),8,-1);return y(f,R)>-1?R:R!=="Object"?!1:w(I)}return s?b(I):null},O0}var T0,M_;function P9(){if(M_)return T0;M_=1;var e=$B();return T0=function(n){return!!e(n)},T0}var j_;function k9(){return j_||(j_=1,(function(e){var t=C9(),n=B9(),o=$B(),s=P9();function a(P){return P.call.bind(P)}var l=typeof BigInt<"u",c=typeof Symbol<"u",h=a(Object.prototype.toString),f=a(Number.prototype.valueOf),p=a(String.prototype.valueOf),y=a(Boolean.prototype.valueOf);if(l)var g=a(BigInt.prototype.valueOf);if(c)var b=a(Symbol.prototype.valueOf);function w(P,he){if(typeof P!="object")return!1;try{return he(P),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=s;function F(P){return typeof Promise<"u"&&P instanceof Promise||P!==null&&typeof P=="object"&&typeof P.then=="function"&&typeof P.catch=="function"}e.isPromise=F;function I(P){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(P):s(P)||K(P)}e.isArrayBufferView=I;function R(P){return o(P)==="Uint8Array"}e.isUint8Array=R;function A(P){return o(P)==="Uint8ClampedArray"}e.isUint8ClampedArray=A;function E(P){return o(P)==="Uint16Array"}e.isUint16Array=E;function M(P){return o(P)==="Uint32Array"}e.isUint32Array=M;function T(P){return o(P)==="Int8Array"}e.isInt8Array=T;function z(P){return o(P)==="Int16Array"}e.isInt16Array=z;function L(P){return o(P)==="Int32Array"}e.isInt32Array=L;function k(P){return o(P)==="Float32Array"}e.isFloat32Array=k;function j(P){return o(P)==="Float64Array"}e.isFloat64Array=j;function U(P){return o(P)==="BigInt64Array"}e.isBigInt64Array=U;function $(P){return o(P)==="BigUint64Array"}e.isBigUint64Array=$;function N(P){return h(P)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function Z(P){return typeof Map>"u"?!1:N.working?N(P):P instanceof Map}e.isMap=Z;function re(P){return h(P)==="[object Set]"}re.working=typeof Set<"u"&&re(new Set);function ie(P){return typeof Set>"u"?!1:re.working?re(P):P instanceof Set}e.isSet=ie;function X(P){return h(P)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function ae(P){return typeof WeakMap>"u"?!1:X.working?X(P):P instanceof WeakMap}e.isWeakMap=ae;function ye(P){return h(P)==="[object WeakSet]"}ye.working=typeof WeakSet<"u"&&ye(new WeakSet);function le(P){return ye(P)}e.isWeakSet=le;function ee(P){return h(P)==="[object ArrayBuffer]"}ee.working=typeof ArrayBuffer<"u"&&ee(new ArrayBuffer);function G(P){return typeof ArrayBuffer>"u"?!1:ee.working?ee(P):P instanceof ArrayBuffer}e.isArrayBuffer=G;function Q(P){return h(P)==="[object DataView]"}Q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Q(new DataView(new ArrayBuffer(1),0,1));function K(P){return typeof DataView>"u"?!1:Q.working?Q(P):P instanceof DataView}e.isDataView=K;var W=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function q(P){return h(P)==="[object SharedArrayBuffer]"}function fe(P){return typeof W>"u"?!1:(typeof q.working>"u"&&(q.working=q(new W)),q.working?q(P):P instanceof W)}e.isSharedArrayBuffer=fe;function ue(P){return h(P)==="[object AsyncFunction]"}e.isAsyncFunction=ue;function ne(P){return h(P)==="[object Map Iterator]"}e.isMapIterator=ne;function J(P){return h(P)==="[object Set Iterator]"}e.isSetIterator=J;function O(P){return h(P)==="[object Generator]"}e.isGeneratorObject=O;function H(P){return h(P)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=H;function Y(P){return w(P,f)}e.isNumberObject=Y;function se(P){return w(P,p)}e.isStringObject=se;function pe(P){return w(P,y)}e.isBooleanObject=pe;function te(P){return l&&w(P,g)}e.isBigIntObject=te;function _(P){return c&&w(P,b)}e.isSymbolObject=_;function v(P){return Y(P)||se(P)||pe(P)||te(P)||_(P)}e.isBoxedPrimitive=v;function C(P){return typeof Uint8Array<"u"&&(G(P)||fe(P))}e.isAnyArrayBuffer=C,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(P){Object.defineProperty(e,P,{enumerable:!1,value:function(){throw new Error(P+" is not supported in userland")}})})})(Rm)),Rm}var B0,U_;function L9(){return U_||(U_=1,B0=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),B0}var ed={exports:{}},N_;function $9(){return N_||(N_=1,typeof Object.create=="function"?ed.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ed.exports=function(t,n){if(n){t.super_=n;var o=function(){};o.prototype=n.prototype,t.prototype=new o,t.prototype.constructor=t}}),ed.exports}var D_;function of(){return D_||(D_=1,(function(e){var t={},n=Object.getOwnPropertyDescriptors||function(W){for(var q=Object.keys(W),fe={},ue=0;ue<q.length;ue++)fe[q[ue]]=Object.getOwnPropertyDescriptor(W,q[ue]);return fe},o=/%[sdj%]/g;e.format=function(K){if(!z(K)){for(var W=[],q=0;q<arguments.length;q++)W.push(c(arguments[q]));return W.join(" ")}for(var q=1,fe=arguments,ue=fe.length,ne=String(K).replace(o,function(O){if(O==="%%")return"%";if(q>=ue)return O;switch(O){case"%s":return String(fe[q++]);case"%d":return Number(fe[q++]);case"%j":try{return JSON.stringify(fe[q++])}catch{return"[Circular]"}default:return O}}),J=fe[q];q<ue;J=fe[++q])E(J)||!U(J)?ne+=" "+J:ne+=" "+c(J);return ne},e.deprecate=function(K,W){if(typeof jt<"u"&&jt.noDeprecation===!0)return K;if(typeof jt>"u")return function(){return e.deprecate(K,W).apply(this,arguments)};var q=!1;function fe(){if(!q){if(jt.throwDeprecation)throw new Error(W);jt.traceDeprecation?console.trace(W):console.error(W),q=!0}return K.apply(this,arguments)}return fe};var s={},a=/^$/;if(t.NODE_DEBUG){var l=t.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+l+"$","i")}e.debuglog=function(K){if(K=K.toUpperCase(),!s[K])if(a.test(K)){var W=jt.pid;s[K]=function(){var q=e.format.apply(e,arguments);console.error("%s %d: %s",K,W,q)}}else s[K]=function(){};return s[K]};function c(K,W){var q={seen:[],stylize:f};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),A(W)?q.showHidden=W:W&&e._extend(q,W),k(q.showHidden)&&(q.showHidden=!1),k(q.depth)&&(q.depth=2),k(q.colors)&&(q.colors=!1),k(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=h),y(q,K,q.depth)}e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(K,W){var q=c.styles[W];return q?"\x1B["+c.colors[q][0]+"m"+K+"\x1B["+c.colors[q][1]+"m":K}function f(K,W){return K}function p(K){var W={};return K.forEach(function(q,fe){W[q]=!0}),W}function y(K,W,q){if(K.customInspect&&W&&Z(W.inspect)&&W.inspect!==e.inspect&&!(W.constructor&&W.constructor.prototype===W)){var fe=W.inspect(q,K);return z(fe)||(fe=y(K,fe,q)),fe}var ue=g(K,W);if(ue)return ue;var ne=Object.keys(W),J=p(ne);if(K.showHidden&&(ne=Object.getOwnPropertyNames(W)),N(W)&&(ne.indexOf("message")>=0||ne.indexOf("description")>=0))return b(W);if(ne.length===0){if(Z(W)){var O=W.name?": "+W.name:"";return K.stylize("[Function"+O+"]","special")}if(j(W))return K.stylize(RegExp.prototype.toString.call(W),"regexp");if($(W))return K.stylize(Date.prototype.toString.call(W),"date");if(N(W))return b(W)}var H="",Y=!1,se=["{","}"];if(R(W)&&(Y=!0,se=["[","]"]),Z(W)){var pe=W.name?": "+W.name:"";H=" [Function"+pe+"]"}if(j(W)&&(H=" "+RegExp.prototype.toString.call(W)),$(W)&&(H=" "+Date.prototype.toUTCString.call(W)),N(W)&&(H=" "+b(W)),ne.length===0&&(!Y||W.length==0))return se[0]+H+se[1];if(q<0)return j(W)?K.stylize(RegExp.prototype.toString.call(W),"regexp"):K.stylize("[Object]","special");K.seen.push(W);var te;return Y?te=w(K,W,q,J,ne):te=ne.map(function(_){return F(K,W,q,J,_,Y)}),K.seen.pop(),I(te,H,se)}function g(K,W){if(k(W))return K.stylize("undefined","undefined");if(z(W)){var q="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(q,"string")}if(T(W))return K.stylize(""+W,"number");if(A(W))return K.stylize(""+W,"boolean");if(E(W))return K.stylize("null","null")}function b(K){return"["+Error.prototype.toString.call(K)+"]"}function w(K,W,q,fe,ue){for(var ne=[],J=0,O=W.length;J<O;++J)le(W,String(J))?ne.push(F(K,W,q,fe,String(J),!0)):ne.push("");return ue.forEach(function(H){H.match(/^\d+$/)||ne.push(F(K,W,q,fe,H,!0))}),ne}function F(K,W,q,fe,ue,ne){var J,O,H;if(H=Object.getOwnPropertyDescriptor(W,ue)||{value:W[ue]},H.get?H.set?O=K.stylize("[Getter/Setter]","special"):O=K.stylize("[Getter]","special"):H.set&&(O=K.stylize("[Setter]","special")),le(fe,ue)||(J="["+ue+"]"),O||(K.seen.indexOf(H.value)<0?(E(q)?O=y(K,H.value,null):O=y(K,H.value,q-1),O.indexOf(`
62
+ `)>-1&&(ne?O=O.split(`
63
+ `).map(function(Y){return" "+Y}).join(`
64
+ `).slice(2):O=`
65
+ `+O.split(`
66
+ `).map(function(Y){return" "+Y}).join(`
67
+ `))):O=K.stylize("[Circular]","special")),k(J)){if(ne&&ue.match(/^\d+$/))return O;J=JSON.stringify(""+ue),J.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(J=J.slice(1,-1),J=K.stylize(J,"name")):(J=J.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),J=K.stylize(J,"string"))}return J+": "+O}function I(K,W,q){var fe=K.reduce(function(ue,ne){return ne.indexOf(`
68
+ `)>=0,ue+ne.replace(/\u001b\[\d\d?m/g,"").length+1},0);return fe>60?q[0]+(W===""?"":W+`
69
+ `)+" "+K.join(`,
70
+ `)+" "+q[1]:q[0]+W+" "+K.join(", ")+" "+q[1]}e.types=k9();function R(K){return Array.isArray(K)}e.isArray=R;function A(K){return typeof K=="boolean"}e.isBoolean=A;function E(K){return K===null}e.isNull=E;function M(K){return K==null}e.isNullOrUndefined=M;function T(K){return typeof K=="number"}e.isNumber=T;function z(K){return typeof K=="string"}e.isString=z;function L(K){return typeof K=="symbol"}e.isSymbol=L;function k(K){return K===void 0}e.isUndefined=k;function j(K){return U(K)&&ie(K)==="[object RegExp]"}e.isRegExp=j,e.types.isRegExp=j;function U(K){return typeof K=="object"&&K!==null}e.isObject=U;function $(K){return U(K)&&ie(K)==="[object Date]"}e.isDate=$,e.types.isDate=$;function N(K){return U(K)&&(ie(K)==="[object Error]"||K instanceof Error)}e.isError=N,e.types.isNativeError=N;function Z(K){return typeof K=="function"}e.isFunction=Z;function re(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}e.isPrimitive=re,e.isBuffer=L9();function ie(K){return Object.prototype.toString.call(K)}function X(K){return K<10?"0"+K.toString(10):K.toString(10)}var ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ye(){var K=new Date,W=[X(K.getHours()),X(K.getMinutes()),X(K.getSeconds())].join(":");return[K.getDate(),ae[K.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",ye(),e.format.apply(e,arguments))},e.inherits=$9(),e._extend=function(K,W){if(!W||!U(W))return K;for(var q=Object.keys(W),fe=q.length;fe--;)K[q[fe]]=W[q[fe]];return K};function le(K,W){return Object.prototype.hasOwnProperty.call(K,W)}var ee=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(ee&&W[ee]){var q=W[ee];if(typeof q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(q,ee,{value:q,enumerable:!1,writable:!1,configurable:!0}),q}function q(){for(var fe,ue,ne=new Promise(function(H,Y){fe=H,ue=Y}),J=[],O=0;O<arguments.length;O++)J.push(arguments[O]);J.push(function(H,Y){H?ue(H):fe(Y)});try{W.apply(this,J)}catch(H){ue(H)}return ne}return Object.setPrototypeOf(q,Object.getPrototypeOf(W)),ee&&Object.defineProperty(q,ee,{value:q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(q,n(W))},e.promisify.custom=ee;function G(K,W){if(!K){var q=new Error("Promise was rejected with a falsy value");q.reason=K,K=q}return W(K)}function Q(K){if(typeof K!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var q=[],fe=0;fe<arguments.length;fe++)q.push(arguments[fe]);var ue=q.pop();if(typeof ue!="function")throw new TypeError("The last argument must be of type Function");var ne=this,J=function(){return ue.apply(ne,arguments)};K.apply(this,q).then(function(O){jt.nextTick(J.bind(null,null,O))},function(O){jt.nextTick(G.bind(null,O,J))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(K)),Object.defineProperties(W,n(K)),W}e.callbackify=Q})(Bm)),Bm}var P_;function zB(){if(P_)return Tm;P_=1;function e(A){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},e(A)}function t(A,E,M){return Object.defineProperty(A,"prototype",{writable:!1}),A}function n(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function o(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),E&&s(A,E)}function s(A,E){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,z){return T.__proto__=z,T},s(A,E)}function a(A){var E=h();return function(){var T=f(A),z;if(E){var L=f(this).constructor;z=Reflect.construct(T,arguments,L)}else z=T.apply(this,arguments);return l(this,z)}}function l(A,E){if(E&&(e(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(A)}function c(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function h(){if(typeof Reflect>"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 f(A){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},f(A)}var p={},y,g;function b(A,E,M){M||(M=Error);function T(L,k,j){return typeof E=="string"?E:E(L,k,j)}var z=(function(L){o(j,L);var k=a(j);function j(U,$,N){var Z;return n(this,j),Z=k.call(this,T(U,$,N)),Z.code=A,Z}return t(j)})(M);p[A]=z}function w(A,E){if(Array.isArray(A)){var M=A.length;return A=A.map(function(T){return String(T)}),M>2?"one of ".concat(E," ").concat(A.slice(0,M-1).join(", "),", or ")+A[M-1]:M===2?"one of ".concat(E," ").concat(A[0]," or ").concat(A[1]):"of ".concat(E," ").concat(A[0])}else return"of ".concat(E," ").concat(String(A))}function F(A,E,M){return A.substr(0,E.length)===E}function I(A,E,M){return(M===void 0||M>A.length)&&(M=A.length),A.substring(M-E.length,M)===E}function R(A,E,M){return typeof M!="number"&&(M=0),M+E.length>A.length?!1:A.indexOf(E,M)!==-1}return b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",function(A,E,M){y===void 0&&(y=Hb()),y(typeof A=="string","'name' must be a string");var T;typeof E=="string"&&F(E,"not ")?(T="must not be",E=E.replace(/^not /,"")):T="must be";var z;if(I(A," argument"))z="The ".concat(A," ").concat(T," ").concat(w(E,"type"));else{var L=R(A,".")?"property":"argument";z='The "'.concat(A,'" ').concat(L," ").concat(T," ").concat(w(E,"type"))}return z+=". Received type ".concat(e(M)),z},TypeError),b("ERR_INVALID_ARG_VALUE",function(A,E){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";g===void 0&&(g=of());var T=g.inspect(E);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(A,"' ").concat(M,". Received ").concat(T)},TypeError),b("ERR_INVALID_RETURN_VALUE",function(A,E,M){var T;return M&&M.constructor&&M.constructor.name?T="instance of ".concat(M.constructor.name):T="type ".concat(e(M)),"Expected ".concat(A,' to be returned from the "').concat(E,'"')+" function but got ".concat(T,".")},TypeError),b("ERR_MISSING_ARGS",function(){for(var A=arguments.length,E=new Array(A),M=0;M<A;M++)E[M]=arguments[M];y===void 0&&(y=Hb()),y(E.length>0,"At least one arg needs to be specified");var T="The ",z=E.length;switch(E=E.map(function(L){return'"'.concat(L,'"')}),z){case 1:T+="".concat(E[0]," argument");break;case 2:T+="".concat(E[0]," and ").concat(E[1]," arguments");break;default:T+=E.slice(0,z-1).join(", "),T+=", and ".concat(E[z-1]," arguments");break}return"".concat(T," must be specified")},TypeError),Tm.codes=p,Tm}var R0,k_;function z9(){if(k_)return R0;k_=1;function e(le,ee){var G=Object.keys(le);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(le);ee&&(Q=Q.filter(function(K){return Object.getOwnPropertyDescriptor(le,K).enumerable})),G.push.apply(G,Q)}return G}function t(le){for(var ee=1;ee<arguments.length;ee++){var G=arguments[ee]!=null?arguments[ee]:{};ee%2?e(Object(G),!0).forEach(function(Q){n(le,Q,G[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(G)):e(Object(G)).forEach(function(Q){Object.defineProperty(le,Q,Object.getOwnPropertyDescriptor(G,Q))})}return le}function n(le,ee,G){return ee=l(ee),ee in le?Object.defineProperty(le,ee,{value:G,enumerable:!0,configurable:!0,writable:!0}):le[ee]=G,le}function o(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}function s(le,ee){for(var G=0;G<ee.length;G++){var Q=ee[G];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(le,l(Q.key),Q)}}function a(le,ee,G){return ee&&s(le.prototype,ee),Object.defineProperty(le,"prototype",{writable:!1}),le}function l(le){var ee=c(le,"string");return A(ee)==="symbol"?ee:String(ee)}function c(le,ee){if(A(le)!=="object"||le===null)return le;var G=le[Symbol.toPrimitive];if(G!==void 0){var Q=G.call(le,ee);if(A(Q)!=="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}function h(le,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ee&&ee.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),Object.defineProperty(le,"prototype",{writable:!1}),ee&&I(le,ee)}function f(le){var ee=w();return function(){var Q=R(le),K;if(ee){var W=R(this).constructor;K=Reflect.construct(Q,arguments,W)}else K=Q.apply(this,arguments);return p(this,K)}}function p(le,ee){if(ee&&(A(ee)==="object"||typeof ee=="function"))return ee;if(ee!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(le)}function y(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function g(le){var ee=typeof Map=="function"?new Map:void 0;return g=function(Q){if(Q===null||!F(Q))return Q;if(typeof Q!="function")throw new TypeError("Super expression must either be null or a function");if(typeof ee<"u"){if(ee.has(Q))return ee.get(Q);ee.set(Q,K)}function K(){return b(Q,arguments,R(this).constructor)}return K.prototype=Object.create(Q.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),I(K,Q)},g(le)}function b(le,ee,G){return w()?b=Reflect.construct.bind():b=function(K,W,q){var fe=[null];fe.push.apply(fe,W);var ue=Function.bind.apply(K,fe),ne=new ue;return q&&I(ne,q.prototype),ne},b.apply(null,arguments)}function w(){if(typeof Reflect>"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 F(le){return Function.toString.call(le).indexOf("[native code]")!==-1}function I(le,ee){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,K){return Q.__proto__=K,Q},I(le,ee)}function R(le){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},R(le)}function A(le){"@babel/helpers - typeof";return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},A(le)}var E=of(),M=E.inspect,T=zB(),z=T.codes.ERR_INVALID_ARG_TYPE;function L(le,ee,G){return(G===void 0||G>le.length)&&(G=le.length),le.substring(G-ee.length,G)===ee}function k(le,ee){if(ee=Math.floor(ee),le.length==0||ee==0)return"";var G=le.length*ee;for(ee=Math.floor(Math.log(ee)/Math.log(2));ee;)le+=le,ee--;return le+=le.substring(0,G-le.length),le}var j="",U="",$="",N="",Z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},re=10;function ie(le){var ee=Object.keys(le),G=Object.create(Object.getPrototypeOf(le));return ee.forEach(function(Q){G[Q]=le[Q]}),Object.defineProperty(G,"message",{value:le.message}),G}function X(le){return M(le,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ae(le,ee,G){var Q="",K="",W=0,q="",fe=!1,ue=X(le),ne=ue.split(`
71
+ `),J=X(ee).split(`
72
+ `),O=0,H="";if(G==="strictEqual"&&A(le)==="object"&&A(ee)==="object"&&le!==null&&ee!==null&&(G="strictEqualObject"),ne.length===1&&J.length===1&&ne[0]!==J[0]){var Y=ne[0].length+J[0].length;if(Y<=re){if((A(le)!=="object"||le===null)&&(A(ee)!=="object"||ee===null)&&(le!==0||ee!==0))return"".concat(Z[G],`
73
+
74
+ `)+"".concat(ne[0]," !== ").concat(J[0],`
75
+ `)}else if(G!=="strictEqualObject"){var se=jt.stderr&&jt.stderr.isTTY?jt.stderr.columns:80;if(Y<se){for(;ne[0][O]===J[0][O];)O++;O>2&&(H=`
76
+ `.concat(k(" ",O),"^"),O=0)}}}for(var pe=ne[ne.length-1],te=J[J.length-1];pe===te&&(O++<2?q=`
77
+ `.concat(pe).concat(q):Q=pe,ne.pop(),J.pop(),!(ne.length===0||J.length===0));)pe=ne[ne.length-1],te=J[J.length-1];var _=Math.max(ne.length,J.length);if(_===0){var v=ue.split(`
78
+ `);if(v.length>30)for(v[26]="".concat(j,"...").concat(N);v.length>27;)v.pop();return"".concat(Z.notIdentical,`
79
+
80
+ `).concat(v.join(`
81
+ `),`
82
+ `)}O>3&&(q=`
83
+ `.concat(j,"...").concat(N).concat(q),fe=!0),Q!==""&&(q=`
84
+ `.concat(Q).concat(q),Q="");var C=0,P=Z[G]+`
85
+ `.concat(U,"+ actual").concat(N," ").concat($,"- expected").concat(N),he=" ".concat(j,"...").concat(N," Lines skipped");for(O=0;O<_;O++){var ce=O-W;if(ne.length<O+1)ce>1&&O>2&&(ce>4?(K+=`
86
+ `.concat(j,"...").concat(N),fe=!0):ce>3&&(K+=`
87
+ `.concat(J[O-2]),C++),K+=`
88
+ `.concat(J[O-1]),C++),W=O,Q+=`
89
+ `.concat($,"-").concat(N," ").concat(J[O]),C++;else if(J.length<O+1)ce>1&&O>2&&(ce>4?(K+=`
90
+ `.concat(j,"...").concat(N),fe=!0):ce>3&&(K+=`
91
+ `.concat(ne[O-2]),C++),K+=`
92
+ `.concat(ne[O-1]),C++),W=O,K+=`
93
+ `.concat(U,"+").concat(N," ").concat(ne[O]),C++;else{var Se=J[O],Be=ne[O],de=Be!==Se&&(!L(Be,",")||Be.slice(0,-1)!==Se);de&&L(Se,",")&&Se.slice(0,-1)===Be&&(de=!1,Be+=","),de?(ce>1&&O>2&&(ce>4?(K+=`
94
+ `.concat(j,"...").concat(N),fe=!0):ce>3&&(K+=`
95
+ `.concat(ne[O-2]),C++),K+=`
96
+ `.concat(ne[O-1]),C++),W=O,K+=`
97
+ `.concat(U,"+").concat(N," ").concat(Be),Q+=`
98
+ `.concat($,"-").concat(N," ").concat(Se),C+=2):(K+=Q,Q="",(ce===1||O===0)&&(K+=`
99
+ `.concat(Be),C++))}if(C>20&&O<_-2)return"".concat(P).concat(he,`
100
+ `).concat(K,`
101
+ `).concat(j,"...").concat(N).concat(Q,`
102
+ `)+"".concat(j,"...").concat(N)}return"".concat(P).concat(fe?he:"",`
103
+ `).concat(K).concat(Q).concat(q).concat(H)}var ye=(function(le,ee){h(Q,le);var G=f(Q);function Q(K){var W;if(o(this,Q),A(K)!=="object"||K===null)throw new z("options","Object",K);var q=K.message,fe=K.operator,ue=K.stackStartFn,ne=K.actual,J=K.expected,O=Error.stackTraceLimit;if(Error.stackTraceLimit=0,q!=null)W=G.call(this,String(q));else if(jt.stderr&&jt.stderr.isTTY&&(jt.stderr&&jt.stderr.getColorDepth&&jt.stderr.getColorDepth()!==1?(j="\x1B[34m",U="\x1B[32m",N="\x1B[39m",$="\x1B[31m"):(j="",U="",N="",$="")),A(ne)==="object"&&ne!==null&&A(J)==="object"&&J!==null&&"stack"in ne&&ne instanceof Error&&"stack"in J&&J instanceof Error&&(ne=ie(ne),J=ie(J)),fe==="deepStrictEqual"||fe==="strictEqual")W=G.call(this,ae(ne,J,fe));else if(fe==="notDeepStrictEqual"||fe==="notStrictEqual"){var H=Z[fe],Y=X(ne).split(`
104
+ `);if(fe==="notStrictEqual"&&A(ne)==="object"&&ne!==null&&(H=Z.notStrictEqualObject),Y.length>30)for(Y[26]="".concat(j,"...").concat(N);Y.length>27;)Y.pop();Y.length===1?W=G.call(this,"".concat(H," ").concat(Y[0])):W=G.call(this,"".concat(H,`
105
+
106
+ `).concat(Y.join(`
107
+ `),`
108
+ `))}else{var se=X(ne),pe="",te=Z[fe];fe==="notDeepEqual"||fe==="notEqual"?(se="".concat(Z[fe],`
109
+
110
+ `).concat(se),se.length>1024&&(se="".concat(se.slice(0,1021),"..."))):(pe="".concat(X(J)),se.length>512&&(se="".concat(se.slice(0,509),"...")),pe.length>512&&(pe="".concat(pe.slice(0,509),"...")),fe==="deepEqual"||fe==="equal"?se="".concat(te,`
111
+
112
+ `).concat(se,`
113
+
114
+ should equal
115
+
116
+ `):pe=" ".concat(fe," ").concat(pe)),W=G.call(this,"".concat(se).concat(pe))}return Error.stackTraceLimit=O,W.generatedMessage=!q,Object.defineProperty(y(W),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),W.code="ERR_ASSERTION",W.actual=ne,W.expected=J,W.operator=fe,Error.captureStackTrace&&Error.captureStackTrace(y(W),ue),W.stack,W.name="AssertionError",p(W)}return a(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:ee,value:function(W,q){return M(this,t(t({},q),{},{customInspect:!1,depth:0}))}}]),Q})(g(Error),M.custom);return R0=ye,R0}var M0,L_;function qB(){if(L_)return M0;L_=1;var e=Object.prototype.toString;return M0=function(n){var o=e.call(n),s=o==="[object Arguments]";return s||(s=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&e.call(n.callee)==="[object Function]"),s},M0}var j0,$_;function q9(){if($_)return j0;$_=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=qB(),s=Object.prototype.propertyIsEnumerable,a=!s.call({toString:null},"toString"),l=s.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(g){var b=g.constructor;return b&&b.prototype===g},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=(function(){if(typeof window>"u")return!1;for(var g in window)try{if(!f["$"+g]&&t.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{h(window[g])}catch{return!0}}catch{return!0}return!1})(),y=function(g){if(typeof window>"u"||!p)return h(g);try{return h(g)}catch{return!1}};e=function(b){var w=b!==null&&typeof b=="object",F=n.call(b)==="[object Function]",I=o(b),R=w&&n.call(b)==="[object String]",A=[];if(!w&&!F&&!I)throw new TypeError("Object.keys called on a non-object");var E=l&&F;if(R&&b.length>0&&!t.call(b,0))for(var M=0;M<b.length;++M)A.push(String(M));if(I&&b.length>0)for(var T=0;T<b.length;++T)A.push(String(T));else for(var z in b)!(E&&z==="prototype")&&t.call(b,z)&&A.push(String(z));if(a)for(var L=y(b),k=0;k<c.length;++k)!(L&&c[k]==="constructor")&&t.call(b,c[k])&&A.push(c[k]);return A}}return j0=e,j0}var U0,z_;function HB(){if(z_)return U0;z_=1;var e=Array.prototype.slice,t=qB(),n=Object.keys,o=n?function(l){return n(l)}:q9(),s=Object.keys;return o.shim=function(){if(Object.keys){var l=(function(){var c=Object.keys(arguments);return c&&c.length===arguments.length})(1,2);l||(Object.keys=function(h){return t(h)?s(e.call(h)):s(h)})}else Object.keys=o;return Object.keys||o},U0=o,U0}var N0,q_;function H9(){if(q_)return N0;q_=1;var e=HB(),t=dv()(),n=al(),o=pv(),s=n("Array.prototype.push"),a=n("Object.prototype.propertyIsEnumerable"),l=t?o.getOwnPropertySymbols:null;return N0=function(h,f){if(h==null)throw new TypeError("target must be an object");var p=o(h);if(arguments.length===1)return p;for(var y=1;y<arguments.length;++y){var g=o(arguments[y]),b=e(g),w=t&&(o.getOwnPropertySymbols||l);if(w)for(var F=w(g),I=0;I<F.length;++I){var R=F[I];a(g,R)&&s(b,R)}for(var A=0;A<b.length;++A){var E=b[A];if(a(g,E)){var M=g[E];p[E]=M}}}return p},N0}var D0,H_;function Q9(){if(H_)return D0;H_=1;var e=H9(),t=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",s=o.split(""),a={},l=0;l<s.length;++l)a[s[l]]=s[l];var c=Object.assign({},a),h="";for(var f in c)h+=f;return o!==h},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return D0=function(){return!Object.assign||t()||n()?e:Object.assign},D0}var P0,Q_;function QB(){if(Q_)return P0;Q_=1;var e=function(t){return t!==t};return P0=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||e(n)&&e(o))},P0}var k0,G_;function wv(){if(G_)return k0;G_=1;var e=QB();return k0=function(){return typeof Object.is=="function"?Object.is:e},k0}var L0,K_;function G9(){if(K_)return L0;K_=1;var e=Av(),t=Lp(),n=t(e("String.prototype.indexOf"));return L0=function(s,a){var l=e(s,!!a);return typeof l=="function"&&n(s,".prototype.")>-1?t(l):l},L0}var $0,Y_;function $p(){if(Y_)return $0;Y_=1;var e=HB(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,s=kB(),a=function(f){return typeof f=="function"&&n.call(f)==="[object Function]"},l=LB()(),c=function(f,p,y,g){if(p in f){if(g===!0){if(f[p]===y)return}else if(!a(g)||!g())return}l?s(f,p,y,!0):s(f,p,y)},h=function(f,p){var y=arguments.length>2?arguments[2]:{},g=e(p);t&&(g=o.call(g,Object.getOwnPropertySymbols(p)));for(var b=0;b<g.length;b+=1)c(f,g[b],p[g[b]],y[g[b]])};return h.supportsDescriptors=!!l,$0=h,$0}var z0,V_;function K9(){if(V_)return z0;V_=1;var e=wv(),t=$p();return z0=function(){var o=e();return t(Object,{is:o},{is:function(){return Object.is!==o}}),o},z0}var q0,W_;function Y9(){if(W_)return q0;W_=1;var e=$p(),t=Lp(),n=QB(),o=wv(),s=K9(),a=t(o(),Object);return e(a,{getPolyfill:o,implementation:n,shim:s}),q0=a,q0}var H0,X_;function GB(){return X_||(X_=1,H0=function(t){return t!==t}),H0}var Q0,J_;function KB(){if(J_)return Q0;J_=1;var e=GB();return Q0=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},Q0}var G0,Z_;function V9(){if(Z_)return G0;Z_=1;var e=$p(),t=KB();return G0=function(){var o=t();return e(Number,{isNaN:o},{isNaN:function(){return Number.isNaN!==o}}),o},G0}var K0,eC;function W9(){if(eC)return K0;eC=1;var e=Lp(),t=$p(),n=GB(),o=KB(),s=V9(),a=e(o(),Number);return t(a,{getPolyfill:o,implementation:n,shim:s}),K0=a,K0}var Y0,tC;function X9(){if(tC)return Y0;tC=1;function e(de,ve){return a(de)||s(de,ve)||n(de,ve)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
117
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(de,ve){if(de){if(typeof de=="string")return o(de,ve);var x=Object.prototype.toString.call(de).slice(8,-1);if(x==="Object"&&de.constructor&&(x=de.constructor.name),x==="Map"||x==="Set")return Array.from(de);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return o(de,ve)}}function o(de,ve){(ve==null||ve>de.length)&&(ve=de.length);for(var x=0,B=new Array(ve);x<ve;x++)B[x]=de[x];return B}function s(de,ve){var x=de==null?null:typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(x!=null){var B,D,oe,me,xe=[],Ce=!0,we=!1;try{if(oe=(x=x.call(de)).next,ve!==0)for(;!(Ce=(B=oe.call(x)).done)&&(xe.push(B.value),xe.length!==ve);Ce=!0);}catch(Ie){we=!0,D=Ie}finally{try{if(!Ce&&x.return!=null&&(me=x.return(),Object(me)!==me))return}finally{if(we)throw D}}return xe}}function a(de){if(Array.isArray(de))return de}function l(de){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},l(de)}var c=/a/g.flags!==void 0,h=function(ve){var x=[];return ve.forEach(function(B){return x.push(B)}),x},f=function(ve){var x=[];return ve.forEach(function(B,D){return x.push([D,B])}),x},p=Object.is?Object.is:Y9(),y=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},g=Number.isNaN?Number.isNaN:W9();function b(de){return de.call.bind(de)}var w=b(Object.prototype.hasOwnProperty),F=b(Object.prototype.propertyIsEnumerable),I=b(Object.prototype.toString),R=of().types,A=R.isAnyArrayBuffer,E=R.isArrayBufferView,M=R.isDate,T=R.isMap,z=R.isRegExp,L=R.isSet,k=R.isNativeError,j=R.isBoxedPrimitive,U=R.isNumberObject,$=R.isStringObject,N=R.isBooleanObject,Z=R.isBigIntObject,re=R.isSymbolObject,ie=R.isFloat32Array,X=R.isFloat64Array;function ae(de){if(de.length===0||de.length>10)return!0;for(var ve=0;ve<de.length;ve++){var x=de.charCodeAt(ve);if(x<48||x>57)return!0}return de.length===10&&de>=Math.pow(2,32)}function ye(de){return Object.keys(de).filter(ae).concat(y(de).filter(Object.prototype.propertyIsEnumerable.bind(de)))}/*!
118
+ * The buffer module from node.js, for the browser.
119
+ *
120
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
121
+ * @license MIT
122
+ */function le(de,ve){if(de===ve)return 0;for(var x=de.length,B=ve.length,D=0,oe=Math.min(x,B);D<oe;++D)if(de[D]!==ve[D]){x=de[D],B=ve[D];break}return x<B?-1:B<x?1:0}var ee=!0,G=!1,Q=0,K=1,W=2,q=3;function fe(de,ve){return c?de.source===ve.source&&de.flags===ve.flags:RegExp.prototype.toString.call(de)===RegExp.prototype.toString.call(ve)}function ue(de,ve){if(de.byteLength!==ve.byteLength)return!1;for(var x=0;x<de.byteLength;x++)if(de[x]!==ve[x])return!1;return!0}function ne(de,ve){return de.byteLength!==ve.byteLength?!1:le(new Uint8Array(de.buffer,de.byteOffset,de.byteLength),new Uint8Array(ve.buffer,ve.byteOffset,ve.byteLength))===0}function J(de,ve){return de.byteLength===ve.byteLength&&le(new Uint8Array(de),new Uint8Array(ve))===0}function O(de,ve){return U(de)?U(ve)&&p(Number.prototype.valueOf.call(de),Number.prototype.valueOf.call(ve)):$(de)?$(ve)&&String.prototype.valueOf.call(de)===String.prototype.valueOf.call(ve):N(de)?N(ve)&&Boolean.prototype.valueOf.call(de)===Boolean.prototype.valueOf.call(ve):Z(de)?Z(ve)&&BigInt.prototype.valueOf.call(de)===BigInt.prototype.valueOf.call(ve):re(ve)&&Symbol.prototype.valueOf.call(de)===Symbol.prototype.valueOf.call(ve)}function H(de,ve,x,B){if(de===ve)return de!==0?!0:x?p(de,ve):!0;if(x){if(l(de)!=="object")return typeof de=="number"&&g(de)&&g(ve);if(l(ve)!=="object"||de===null||ve===null||Object.getPrototypeOf(de)!==Object.getPrototypeOf(ve))return!1}else{if(de===null||l(de)!=="object")return ve===null||l(ve)!=="object"?de==ve:!1;if(ve===null||l(ve)!=="object")return!1}var D=I(de),oe=I(ve);if(D!==oe)return!1;if(Array.isArray(de)){if(de.length!==ve.length)return!1;var me=ye(de),xe=ye(ve);return me.length!==xe.length?!1:se(de,ve,x,B,K,me)}if(D==="[object Object]"&&(!T(de)&&T(ve)||!L(de)&&L(ve)))return!1;if(M(de)){if(!M(ve)||Date.prototype.getTime.call(de)!==Date.prototype.getTime.call(ve))return!1}else if(z(de)){if(!z(ve)||!fe(de,ve))return!1}else if(k(de)||de instanceof Error){if(de.message!==ve.message||de.name!==ve.name)return!1}else if(E(de)){if(!x&&(ie(de)||X(de))){if(!ue(de,ve))return!1}else if(!ne(de,ve))return!1;var Ce=ye(de),we=ye(ve);return Ce.length!==we.length?!1:se(de,ve,x,B,Q,Ce)}else{if(L(de))return!L(ve)||de.size!==ve.size?!1:se(de,ve,x,B,W);if(T(de))return!T(ve)||de.size!==ve.size?!1:se(de,ve,x,B,q);if(A(de)){if(!J(de,ve))return!1}else if(j(de)&&!O(de,ve))return!1}return se(de,ve,x,B,Q)}function Y(de,ve){return ve.filter(function(x){return F(de,x)})}function se(de,ve,x,B,D,oe){if(arguments.length===5){oe=Object.keys(de);var me=Object.keys(ve);if(oe.length!==me.length)return!1}for(var xe=0;xe<oe.length;xe++)if(!w(ve,oe[xe]))return!1;if(x&&arguments.length===5){var Ce=y(de);if(Ce.length!==0){var we=0;for(xe=0;xe<Ce.length;xe++){var Ie=Ce[xe];if(F(de,Ie)){if(!F(ve,Ie))return!1;oe.push(Ie),we++}else if(F(ve,Ie))return!1}var He=y(ve);if(Ce.length!==He.length&&Y(ve,He).length!==we)return!1}else{var Ke=y(ve);if(Ke.length!==0&&Y(ve,Ke).length!==0)return!1}}if(oe.length===0&&(D===Q||D===K&&de.length===0||de.size===0))return!0;if(B===void 0)B={val1:new Map,val2:new Map,position:0};else{var We=B.val1.get(de);if(We!==void 0){var et=B.val2.get(ve);if(et!==void 0)return We===et}B.position++}B.val1.set(de,B.position),B.val2.set(ve,B.position);var gt=ce(de,ve,x,oe,B,D);return B.val1.delete(de),B.val2.delete(ve),gt}function pe(de,ve,x,B){for(var D=h(de),oe=0;oe<D.length;oe++){var me=D[oe];if(H(ve,me,x,B))return de.delete(me),!0}return!1}function te(de){switch(l(de)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":de=+de;case"number":if(g(de))return!1}return!0}function _(de,ve,x){var B=te(x);return B??(ve.has(B)&&!de.has(B))}function v(de,ve,x,B,D){var oe=te(x);if(oe!=null)return oe;var me=ve.get(oe);return me===void 0&&!ve.has(oe)||!H(B,me,!1,D)?!1:!de.has(oe)&&H(B,me,!1,D)}function C(de,ve,x,B){for(var D=null,oe=h(de),me=0;me<oe.length;me++){var xe=oe[me];if(l(xe)==="object"&&xe!==null)D===null&&(D=new Set),D.add(xe);else if(!ve.has(xe)){if(x||!_(de,ve,xe))return!1;D===null&&(D=new Set),D.add(xe)}}if(D!==null){for(var Ce=h(ve),we=0;we<Ce.length;we++){var Ie=Ce[we];if(l(Ie)==="object"&&Ie!==null){if(!pe(D,Ie,x,B))return!1}else if(!x&&!de.has(Ie)&&!pe(D,Ie,x,B))return!1}return D.size===0}return!0}function P(de,ve,x,B,D,oe){for(var me=h(de),xe=0;xe<me.length;xe++){var Ce=me[xe];if(H(x,Ce,D,oe)&&H(B,ve.get(Ce),D,oe))return de.delete(Ce),!0}return!1}function he(de,ve,x,B){for(var D=null,oe=f(de),me=0;me<oe.length;me++){var xe=e(oe[me],2),Ce=xe[0],we=xe[1];if(l(Ce)==="object"&&Ce!==null)D===null&&(D=new Set),D.add(Ce);else{var Ie=ve.get(Ce);if(Ie===void 0&&!ve.has(Ce)||!H(we,Ie,x,B)){if(x||!v(de,ve,Ce,we,B))return!1;D===null&&(D=new Set),D.add(Ce)}}}if(D!==null){for(var He=f(ve),Ke=0;Ke<He.length;Ke++){var We=e(He[Ke],2),et=We[0],gt=We[1];if(l(et)==="object"&&et!==null){if(!P(D,de,et,gt,x,B))return!1}else if(!x&&(!de.has(et)||!H(de.get(et),gt,!1,B))&&!P(D,de,et,gt,!1,B))return!1}return D.size===0}return!0}function ce(de,ve,x,B,D,oe){var me=0;if(oe===W){if(!C(de,ve,x,D))return!1}else if(oe===q){if(!he(de,ve,x,D))return!1}else if(oe===K)for(;me<de.length;me++)if(w(de,me)){if(!w(ve,me)||!H(de[me],ve[me],x,D))return!1}else{if(w(ve,me))return!1;for(var xe=Object.keys(de);me<xe.length;me++){var Ce=xe[me];if(!w(ve,Ce)||!H(de[Ce],ve[Ce],x,D))return!1}return xe.length===Object.keys(ve).length}for(me=0;me<B.length;me++){var we=B[me];if(!H(de[we],ve[we],x,D))return!1}return!0}function Se(de,ve){return H(de,ve,G)}function Be(de,ve){return H(de,ve,ee)}return Y0={isDeepEqual:Se,isDeepStrictEqual:Be},Y0}var rC;function Hb(){if(rC)return Om.exports;rC=1;function e(W){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},e(W)}function t(W,q,fe){return Object.defineProperty(W,"prototype",{writable:!1}),W}function n(W,q){if(!(W instanceof q))throw new TypeError("Cannot call a class as a function")}var o=zB(),s=o.codes,a=s.ERR_AMBIGUOUS_ARGUMENT,l=s.ERR_INVALID_ARG_TYPE,c=s.ERR_INVALID_ARG_VALUE,h=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,p=z9(),y=of(),g=y.inspect,b=of().types,w=b.isPromise,F=b.isRegExp,I=Q9()(),R=wv()(),A=G9()("RegExp.prototype.test"),E,M;function T(){var W=X9();E=W.isDeepEqual,M=W.isDeepStrictEqual}var z=!1,L=Om.exports=N,k={};function j(W){throw W.message instanceof Error?W.message:new p(W)}function U(W,q,fe,ue,ne){var J=arguments.length,O;if(J===0)O="Failed";else if(J===1)fe=W,W=void 0;else{if(z===!1){z=!0;var H=jt.emitWarning?jt.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}J===2&&(ue="!=")}if(fe instanceof Error)throw fe;var Y={actual:W,expected:q,operator:ue===void 0?"fail":ue,stackStartFn:ne||U};fe!==void 0&&(Y.message=fe);var se=new p(Y);throw O&&(se.message=O,se.generatedMessage=!0),se}L.fail=U,L.AssertionError=p;function $(W,q,fe,ue){if(!fe){var ne=!1;if(q===0)ne=!0,ue="No value argument passed to `assert.ok()`";else if(ue instanceof Error)throw ue;var J=new p({actual:fe,expected:!0,message:ue,operator:"==",stackStartFn:W});throw J.generatedMessage=ne,J}}function N(){for(var W=arguments.length,q=new Array(W),fe=0;fe<W;fe++)q[fe]=arguments[fe];$.apply(void 0,[N,q.length].concat(q))}L.ok=N,L.equal=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");q!=fe&&j({actual:q,expected:fe,message:ue,operator:"==",stackStartFn:W})},L.notEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");q==fe&&j({actual:q,expected:fe,message:ue,operator:"!=",stackStartFn:W})},L.deepEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");E===void 0&&T(),E(q,fe)||j({actual:q,expected:fe,message:ue,operator:"deepEqual",stackStartFn:W})},L.notDeepEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");E===void 0&&T(),E(q,fe)&&j({actual:q,expected:fe,message:ue,operator:"notDeepEqual",stackStartFn:W})},L.deepStrictEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");E===void 0&&T(),M(q,fe)||j({actual:q,expected:fe,message:ue,operator:"deepStrictEqual",stackStartFn:W})},L.notDeepStrictEqual=Z;function Z(W,q,fe){if(arguments.length<2)throw new f("actual","expected");E===void 0&&T(),M(W,q)&&j({actual:W,expected:q,message:fe,operator:"notDeepStrictEqual",stackStartFn:Z})}L.strictEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");R(q,fe)||j({actual:q,expected:fe,message:ue,operator:"strictEqual",stackStartFn:W})},L.notStrictEqual=function W(q,fe,ue){if(arguments.length<2)throw new f("actual","expected");R(q,fe)&&j({actual:q,expected:fe,message:ue,operator:"notStrictEqual",stackStartFn:W})};var re=t(function W(q,fe,ue){var ne=this;n(this,W),fe.forEach(function(J){J in q&&(ue!==void 0&&typeof ue[J]=="string"&&F(q[J])&&A(q[J],ue[J])?ne[J]=ue[J]:ne[J]=q[J])})});function ie(W,q,fe,ue,ne,J){if(!(fe in W)||!M(W[fe],q[fe])){if(!ue){var O=new re(W,ne),H=new re(q,ne,W),Y=new p({actual:O,expected:H,operator:"deepStrictEqual",stackStartFn:J});throw Y.actual=W,Y.expected=q,Y.operator=J.name,Y}j({actual:W,expected:q,message:ue,operator:J.name,stackStartFn:J})}}function X(W,q,fe,ue){if(typeof q!="function"){if(F(q))return A(q,W);if(arguments.length===2)throw new l("expected",["Function","RegExp"],q);if(e(W)!=="object"||W===null){var ne=new p({actual:W,expected:q,message:fe,operator:"deepStrictEqual",stackStartFn:ue});throw ne.operator=ue.name,ne}var J=Object.keys(q);if(q instanceof Error)J.push("name","message");else if(J.length===0)throw new c("error",q,"may not be an empty object");return E===void 0&&T(),J.forEach(function(O){typeof W[O]=="string"&&F(q[O])&&A(q[O],W[O])||ie(W,q,O,fe,J,ue)}),!0}return q.prototype!==void 0&&W instanceof q?!0:Error.isPrototypeOf(q)?!1:q.call({},W)===!0}function ae(W){if(typeof W!="function")throw new l("fn","Function",W);try{W()}catch(q){return q}return k}function ye(W){return w(W)||W!==null&&e(W)==="object"&&typeof W.then=="function"&&typeof W.catch=="function"}function le(W){return Promise.resolve().then(function(){var q;if(typeof W=="function"){if(q=W(),!ye(q))throw new h("instance of Promise","promiseFn",q)}else if(ye(W))q=W;else throw new l("promiseFn",["Function","Promise"],W);return Promise.resolve().then(function(){return q}).then(function(){return k}).catch(function(fe){return fe})})}function ee(W,q,fe,ue){if(typeof fe=="string"){if(arguments.length===4)throw new l("error",["Object","Error","Function","RegExp"],fe);if(e(q)==="object"&&q!==null){if(q.message===fe)throw new a("error/message",'The error message "'.concat(q.message,'" is identical to the message.'))}else if(q===fe)throw new a("error/message",'The error "'.concat(q,'" is identical to the message.'));ue=fe,fe=void 0}else if(fe!=null&&e(fe)!=="object"&&typeof fe!="function")throw new l("error",["Object","Error","Function","RegExp"],fe);if(q===k){var ne="";fe&&fe.name&&(ne+=" (".concat(fe.name,")")),ne+=ue?": ".concat(ue):".";var J=W.name==="rejects"?"rejection":"exception";j({actual:void 0,expected:fe,operator:W.name,message:"Missing expected ".concat(J).concat(ne),stackStartFn:W})}if(fe&&!X(q,fe,ue,W))throw q}function G(W,q,fe,ue){if(q!==k){if(typeof fe=="string"&&(ue=fe,fe=void 0),!fe||X(q,fe)){var ne=ue?": ".concat(ue):".",J=W.name==="doesNotReject"?"rejection":"exception";j({actual:q,expected:fe,operator:W.name,message:"Got unwanted ".concat(J).concat(ne,`
123
+ `)+'Actual message: "'.concat(q&&q.message,'"'),stackStartFn:W})}throw q}}L.throws=function W(q){for(var fe=arguments.length,ue=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ue[ne-1]=arguments[ne];ee.apply(void 0,[W,ae(q)].concat(ue))},L.rejects=function W(q){for(var fe=arguments.length,ue=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ue[ne-1]=arguments[ne];return le(q).then(function(J){return ee.apply(void 0,[W,J].concat(ue))})},L.doesNotThrow=function W(q){for(var fe=arguments.length,ue=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ue[ne-1]=arguments[ne];G.apply(void 0,[W,ae(q)].concat(ue))},L.doesNotReject=function W(q){for(var fe=arguments.length,ue=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ue[ne-1]=arguments[ne];return le(q).then(function(J){return G.apply(void 0,[W,J].concat(ue))})},L.ifError=function W(q){if(q!=null){var fe="ifError got unwanted exception: ";e(q)==="object"&&typeof q.message=="string"?q.message.length===0&&q.constructor?fe+=q.constructor.name:fe+=q.message:fe+=g(q);var ue=new p({actual:q,expected:null,operator:"ifError",message:fe,stackStartFn:W}),ne=q.stack;if(typeof ne=="string"){var J=ne.split(`
124
+ `);J.shift();for(var O=ue.stack.split(`
125
+ `),H=0;H<J.length;H++){var Y=O.indexOf(J[H]);if(Y!==-1){O=O.slice(0,Y);break}}ue.stack="".concat(O.join(`
126
+ `),`
127
+ `).concat(J.join(`
128
+ `))}throw ue}};function Q(W,q,fe,ue,ne){if(!F(q))throw new l("regexp","RegExp",q);var J=ne==="match";if(typeof W!="string"||A(q,W)!==J){if(fe instanceof Error)throw fe;var O=!fe;fe=fe||(typeof W!="string"?'The "string" argument must be of type string. Received type '+"".concat(e(W)," (").concat(g(W),")"):(J?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(q),`. Input:
129
+
130
+ `).concat(g(W),`
131
+ `));var H=new p({actual:W,expected:q,message:fe,operator:ne,stackStartFn:ue});throw H.generatedMessage=O,H}}L.match=function W(q,fe,ue){Q(q,fe,ue,W,"match")},L.doesNotMatch=function W(q,fe,ue){Q(q,fe,ue,W,"doesNotMatch")};function K(){for(var W=arguments.length,q=new Array(W),fe=0;fe<W;fe++)q[fe]=arguments[fe];$.apply(void 0,[K,q.length].concat(q))}return L.strict=I(K,L,{equal:L.strictEqual,deepEqual:L.deepStrictEqual,notEqual:L.notStrictEqual,notDeepEqual:L.notDeepStrictEqual}),L.strict.strict=L.strict,Om.exports}var V0,nC;function J9(){if(nC)return V0;nC=1;function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),o=0;o<n.length;o++)n[o]=255;for(var s=0;s<t.length;s++){var a=t.charAt(s),l=a.charCodeAt(0);if(n[l]!==255)throw new TypeError(a+" is ambiguous");n[l]=s}var c=t.length,h=t.charAt(0),f=Math.log(c)/Math.log(256),p=Math.log(256)/Math.log(c);function y(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var F=0,I=0,R=0,A=w.length;R!==A&&w[R]===0;)R++,F++;for(var E=(A-R)*p+1>>>0,M=new Uint8Array(E);R!==A;){for(var T=w[R],z=0,L=E-1;(T!==0||z<I)&&L!==-1;L--,z++)T+=256*M[L]>>>0,M[L]=T%c>>>0,T=T/c>>>0;if(T!==0)throw new Error("Non-zero carry");I=z,R++}for(var k=E-I;k!==E&&M[k]===0;)k++;for(var j=h.repeat(F);k<E;++k)j+=t.charAt(M[k]);return j}function g(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;for(var F=0,I=0,R=0;w[F]===h;)I++,F++;for(var A=(w.length-F)*f+1>>>0,E=new Uint8Array(A);w[F];){var M=w.charCodeAt(F);if(M>255)return;var T=n[M];if(T===255)return;for(var z=0,L=A-1;(T!==0||z<R)&&L!==-1;L--,z++)T+=c*E[L]>>>0,E[L]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");R=z,F++}for(var k=A-R;k!==A&&E[k]===0;)k++;for(var j=new Uint8Array(I+(A-k)),U=I;k!==A;)j[U++]=E[k++];return j}function b(w){var F=g(w);if(F)return F;throw new Error("Non-base"+c+" character")}return{encode:y,decodeUnsafe:g,decode:b}}return V0=e,V0}var un={exports:{}},W0,iC;function YB(){if(iC)return W0;iC=1,W0=t;class e extends Error{}e.prototype.name="AssertionError";function t(n,o){if(!n){var s=new e(o);throw Error.captureStackTrace&&Error.captureStackTrace(s,t),s}}return W0}var Fi={exports:{}},td={exports:{}},X0,oC;function Z9(){if(oC)return X0;oC=1;function e(o){return o.length}function t(o){const s=o.byteLength;let a="";for(let l=0;l<s;l++)a+=String.fromCharCode(o[l]);return a}function n(o,s){const a=o.byteLength;for(let l=0;l<a;l++)o[l]=s.charCodeAt(l);return a}return X0={byteLength:e,toString:t,write:n},X0}var J0,sC;function eq(){if(sC)return J0;sC=1;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let a=0;a<e.length;a++)t[e.charCodeAt(a)]=a;t[45]=62,t[95]=63;function n(a){let l=a.length;return a.charCodeAt(l-1)===61&&l--,l>1&&a.charCodeAt(l-1)===61&&l--,l*3>>>2}function o(a){const l=a.byteLength;let c="";for(let h=0;h<l;h+=3)c+=e[a[h]>>2]+e[(a[h]&3)<<4|a[h+1]>>4]+e[(a[h+1]&15)<<2|a[h+2]>>6]+e[a[h+2]&63];return l%3===2?c=c.substring(0,c.length-1)+"=":l%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function s(a,l){const c=a.byteLength;for(let h=0,f=0;f<c;h+=4){const p=t[l.charCodeAt(h)],y=t[l.charCodeAt(h+1)],g=t[l.charCodeAt(h+2)],b=t[l.charCodeAt(h+3)];a[f++]=p<<2|y>>4,a[f++]=(y&15)<<4|g>>2,a[f++]=(g&3)<<6|b&63}return c}return J0={byteLength:n,toString:o,write:s},J0}var Z0,aC;function tq(){if(aC)return Z0;aC=1;function e(s){return s.length>>>1}function t(s){const a=s.byteLength;s=new DataView(s.buffer,s.byteOffset,a);let l="",c=0;for(let h=a-a%4;c<h;c+=4)l+=s.getUint32(c).toString(16).padStart(8,"0");for(;c<a;c++)l+=s.getUint8(c).toString(16).padStart(2,"0");return l}function n(s,a){const l=s.byteLength;for(let c=0;c<l;c++){const h=o(a.charCodeAt(c*2)),f=o(a.charCodeAt(c*2+1));if(h===void 0||f===void 0)return s.subarray(0,c);s[c]=h<<4|f}return l}Z0={byteLength:e,toString:t,write:n};function o(s){if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-65+10;if(s>=97&&s<=102)return s-97+10}return Z0}var eb,uC;function rq(){if(uC)return eb;uC=1;function e(o){let s=0;for(let a=0,l=o.length;a<l;a++){const c=o.charCodeAt(a);if(c>=55296&&c<=56319&&a+1<l){const h=o.charCodeAt(a+1);if(h>=56320&&h<=57343){s+=4,a++;continue}}c<=127?s+=1:c<=2047?s+=2:s+=3}return s}let t;if(typeof TextDecoder<"u"){const o=new TextDecoder;t=function(a){return o.decode(a)}}else t=function(s){const a=s.byteLength;let l="",c=0;for(;c<a;){let h=s[c];if(h<=127){l+=String.fromCharCode(h),c++;continue}let f=0,p=0;if(h<=223?(f=1,p=h&31):h<=239?(f=2,p=h&15):h<=244&&(f=3,p=h&7),a-c-f>0){let y=0;for(;y<f;)h=s[c+y+1],p=p<<6|h&63,y+=1}else p=65533,f=a-c;l+=String.fromCodePoint(p),c+=f+1}return l};let n;if(typeof TextEncoder<"u"){const o=new TextEncoder;n=function(a,l){return o.encodeInto(l,a).written}}else n=function(s,a){const l=s.byteLength;let c=0,h=0;for(;c<a.length;){const f=a.codePointAt(c);if(f<=127){s[h++]=f,c++;continue}let p=0,y=0;for(f<=2047?(p=6,y=192):f<=65535?(p=12,y=224):f<=2097151&&(p=18,y=240),s[h++]=y|f>>p,p-=6;p>=0;)s[h++]=128|f>>p&63,p-=6;c+=f>=65536?2:1}return l};return eb={byteLength:e,toString:t,write:n},eb}var tb,lC;function nq(){if(lC)return tb;lC=1;function e(o){return o.length*2}function t(o){const s=o.byteLength;let a="";for(let l=0;l<s-1;l+=2)a+=String.fromCharCode(o[l]+o[l+1]*256);return a}function n(o,s){const a=o.byteLength;let l=a;for(let c=0;c<s.length&&!((l-=2)<0);++c){const h=s.charCodeAt(c),f=h>>8,p=h%256;o[c*2]=p,o[c*2+1]=f}return a}return tb={byteLength:e,toString:t,write:n},tb}var cC;function iq(){return cC||(cC=1,(function(e,t){const n=Z9(),o=eq(),s=tq(),a=rq(),l=nq(),c=new Uint8Array(Uint16Array.of(255).buffer)[0]===255;function h(_){switch(_){case"ascii":return n;case"base64":return o;case"hex":return s;case"utf8":case"utf-8":case void 0:case null:return a;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l;default:throw new Error(`Unknown encoding '${_}'`)}}function f(_){return _ instanceof Uint8Array}function p(_){try{return h(_),!0}catch{return!1}}function y(_,v,C){const P=new Uint8Array(_);return v!==void 0&&t.fill(P,v,0,P.byteLength,C),P}function g(_){return new Uint8Array(_)}function b(_){return new Uint8Array(_)}function w(_,v){return h(v).byteLength(_)}function F(_,v){if(_===v)return 0;const C=Math.min(_.byteLength,v.byteLength);_=new DataView(_.buffer,_.byteOffset,_.byteLength),v=new DataView(v.buffer,v.byteOffset,v.byteLength);let P=0;for(let he=C-C%4;P<he;P+=4){const ce=_.getUint32(P,c),Se=v.getUint32(P,c);if(ce!==Se)break}for(;P<C;P++){const he=_.getUint8(P),ce=v.getUint8(P);if(he<ce)return-1;if(he>ce)return 1}return _.byteLength>v.byteLength?1:_.byteLength<v.byteLength?-1:0}function I(_,v){v===void 0&&(v=_.reduce((he,ce)=>he+ce.byteLength,0));const C=new Uint8Array(v);let P=0;for(const he of _){if(P+he.byteLength>C.byteLength)return C.set(he.subarray(0,C.byteLength-P),P),C;C.set(he,P),P+=he.byteLength}return C}function R(_,v,C=0,P=0,he=_.byteLength){if(C<0&&(C=0),C>=v.byteLength)return 0;const ce=v.byteLength-C;if(P<0&&(P=0),P>=_.byteLength||he<=P)return 0;he>_.byteLength&&(he=_.byteLength),he-P>ce&&(he=P+ce);const Se=he-P;return _===v?v.copyWithin(C,P,he):((P!==0||he!==_.byteLength)&&(_=_.subarray(P,he)),v.set(_,C)),Se}function A(_,v){return _===v?!0:_.byteLength!==v.byteLength?!1:F(_,v)===0}function E(_,v,C=0,P=_.byteLength,he="utf8"){if(typeof v=="string"?typeof C=="string"?(he=C,C=0,P=_.byteLength):typeof P=="string"&&(he=P,P=_.byteLength):typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=+v),C<0&&(C=0),C>=_.byteLength||P<=C)return _;if(P>_.byteLength&&(P=_.byteLength),typeof v=="number")return _.fill(v,C,P);typeof v=="string"&&(v=t.from(v,he));const ce=v.byteLength;for(let Se=0,Be=P-C;Se<Be;++Se)_[Se+C]=v[Se%ce];return _}function M(_,v,C){return typeof _=="string"?T(_,v):Array.isArray(_)?z(_):ArrayBuffer.isView(_)?L(_):k(_,v,C)}function T(_,v){const C=h(v),P=new Uint8Array(C.byteLength(_));return C.write(P,_),P}function z(_){const v=new Uint8Array(_.length);return v.set(_),v}function L(_){const v=new Uint8Array(_.byteLength);return v.set(_),v}function k(_,v,C){return new Uint8Array(_,v,C)}function j(_,v,C,P){return U(_,v,C,P)!==-1}function U(_,v,C,P){return N(_,v,C,P,!0)}function $(_,v,C,P){return N(_,v,C,P,!1)}function N(_,v,C,P,he){if(_.byteLength===0)return-1;if(typeof C=="string"?(P=C,C=0):C===void 0?C=he?0:_.length-1:C<0&&(C+=_.byteLength),C>=_.byteLength){if(he)return-1;C=_.byteLength-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string")v=M(v,P);else if(typeof v=="number")return v=v&255,he?_.indexOf(v,C):_.lastIndexOf(v,C);if(v.byteLength===0)return-1;if(he){let ce=-1;for(let Se=C;Se<_.byteLength;Se++)if(_[Se]===v[ce===-1?0:Se-ce]){if(ce===-1&&(ce=Se),Se-ce+1===v.byteLength)return ce}else ce!==-1&&(Se-=Se-ce),ce=-1}else{C+v.byteLength>_.byteLength&&(C=_.byteLength-v.byteLength);for(let ce=C;ce>=0;ce--){let Se=!0;for(let Be=0;Be<v.byteLength;Be++)if(_[ce+Be]!==v[Be]){Se=!1;break}if(Se)return ce}}return-1}function Z(_,v,C){const P=_[v];_[v]=_[C],_[C]=P}function re(_){const v=_.byteLength;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let C=0;C<v;C+=2)Z(_,C,C+1);return _}function ie(_){const v=_.byteLength;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let C=0;C<v;C+=4)Z(_,C,C+3),Z(_,C+1,C+2);return _}function X(_){const v=_.byteLength;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let C=0;C<v;C+=8)Z(_,C,C+7),Z(_,C+1,C+6),Z(_,C+2,C+5),Z(_,C+3,C+4);return _}function ae(_){return _}function ye(_,v="utf8",C=0,P=_.byteLength){return arguments.length===1?a.toString(_):arguments.length===2?h(v).toString(_):(C<0&&(C=0),C>=_.byteLength||P<=C?"":(P>_.byteLength&&(P=_.byteLength),(C!==0||P!==_.byteLength)&&(_=_.subarray(C,P)),h(v).toString(_)))}function le(_,v,C,P,he){if(arguments.length===2)return a.write(_,v);typeof C=="string"?(he=C,C=0,P=_.byteLength):typeof P=="string"&&(he=P,P=_.byteLength-C),P=Math.min(P,t.byteLength(v,he));let ce=C;if(ce<0&&(ce=0),ce>=_.byteLength)return 0;let Se=C+P;return Se<=ce?0:(Se>_.byteLength&&(Se=_.byteLength),(ce!==0||Se!==_.byteLength)&&(_=_.subarray(ce,Se)),h(he).write(_,v))}function ee(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(v,!1)}function G(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(v,!0)}function Q(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(v,!1)}function K(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(v,!0)}function W(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getInt32(v,!1)}function q(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getInt32(v,!0)}function fe(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getUint32(v,!1)}function ue(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getUint32(v,!0)}function ne(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat64(C,v,!1),C+8}function J(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat64(C,v,!0),C+8}function O(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat32(C,v,!1),C+4}function H(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat32(C,v,!0),C+4}function Y(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setInt32(C,v,!1),C+4}function se(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setInt32(C,v,!0),C+4}function pe(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setUint32(C,v,!1),C+4}function te(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setUint32(C,v,!0),C+4}e.exports=t={isBuffer:f,isEncoding:p,alloc:y,allocUnsafe:g,allocUnsafeSlow:b,byteLength:w,compare:F,concat:I,copy:R,equals:A,fill:E,from:M,includes:j,indexOf:U,lastIndexOf:$,swap16:re,swap32:ie,swap64:X,toBuffer:ae,toString:ye,write:le,readDoubleBE:ee,readDoubleLE:G,readFloatBE:Q,readFloatLE:K,readInt32BE:W,readInt32LE:q,readUInt32BE:fe,readUInt32LE:ue,writeDoubleBE:ne,writeDoubleLE:J,writeFloatBE:O,writeFloatLE:H,writeInt32BE:Y,writeInt32LE:se,writeUInt32BE:pe,writeUInt32LE:te}})(td,td.exports)),td.exports}var rb,fC;function oq(){if(fC)return rb;fC=1;var e=(a,l)=>function(){return l||(0,a[Object.keys(a)[0]])((l={exports:{}}).exports,l),l.exports},t=(()=>{for(var a=new Uint8Array(128),l=0;l<64;l++)a[l<26?l+65:l<52?l+71:l<62?l-4:l*4-205]=l;return c=>{for(var h=c.length,f=new Uint8Array((h-(c[h-1]=="=")-(c[h-2]=="="))*3/4|0),p=0,y=0;p<h;){var g=a[c.charCodeAt(p++)],b=a[c.charCodeAt(p++)],w=a[c.charCodeAt(p++)],F=a[c.charCodeAt(p++)];f[y++]=g<<2|b>>4,f[y++]=b<<4|w>>2,f[y++]=w<<6|F}return f}})(),n=e({"wasm-binary:./blake2b.wat"(a,l){l.exports=t("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}}),o=n(),s=WebAssembly.compile(o);return rb=async a=>(await WebAssembly.instantiate(await s,a)).exports,rb}var hC;function sq(){if(hC)return Fi.exports;hC=1;var e=YB(),t=iq(),n=null,o=typeof WebAssembly<"u"&&oq()().then(w=>{n=w}),s=64,a=[];Fi.exports=g;var l=Fi.exports.BYTES_MIN=16,c=Fi.exports.BYTES_MAX=64;Fi.exports.BYTES=32;var h=Fi.exports.KEYBYTES_MIN=16,f=Fi.exports.KEYBYTES_MAX=64;Fi.exports.KEYBYTES=32;var p=Fi.exports.SALTBYTES=16,y=Fi.exports.PERSONALBYTES=16;function g(w,F,I,R,A){if(!(this instanceof g))return new g(w,F,I,R,A);if(!n)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");w||(w=32),A!==!0&&(e(w>=l,"digestLength must be at least "+l+", was given "+w),e(w<=c,"digestLength must be at most "+c+", was given "+w),F!=null&&(e(F instanceof Uint8Array,"key must be Uint8Array or Buffer"),e(F.length>=h,"key must be at least "+h+", was given "+F.length),e(F.length<=f,"key must be at least "+f+", was given "+F.length)),I!=null&&(e(I instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(I.length===p,"salt must be exactly "+p+", was given "+I.length)),R!=null&&(e(R instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(R.length===y,"personal must be exactly "+y+", was given "+R.length))),a.length||(a.push(s),s+=216),this.digestLength=w,this.finalized=!1,this.pointer=a.pop(),this._memory=new Uint8Array(n.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=F?F.length:0,this._memory[2]=1,this._memory[3]=1,I&&this._memory.set(I,32),R&&this._memory.set(R,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),n.blake2b_init(this.pointer,this.digestLength),F&&(this.update(F),this._memory.fill(0,s,s+F.length),this._memory[this.pointer+200]=128)}g.prototype._realloc=function(w){n.memory.grow(Math.max(0,Math.ceil(Math.abs(w-this._memory.length)/65536))),this._memory=new Uint8Array(n.memory.buffer)},g.prototype.update=function(w){return e(this.finalized===!1,"Hash instance finalized"),e(w instanceof Uint8Array,"input must be Uint8Array or Buffer"),s+w.length>this._memory.length&&this._realloc(s+w.length),this._memory.set(w,s),n.blake2b_update(this.pointer,s,s+w.length),this},g.prototype.digest=function(w){if(e(this.finalized===!1,"Hash instance finalized"),this.finalized=!0,a.push(this.pointer),n.blake2b_final(this.pointer),!w||w==="binary")return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if(typeof w=="string")return t.toString(this._memory,w,this.pointer+128,this.pointer+128+this.digestLength);e(w instanceof Uint8Array&&w.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var F=0;F<this.digestLength;F++)w[F]=this._memory[this.pointer+128+F];return w},g.prototype.final=g.prototype.digest,g.WASM=n,g.SUPPORTED=typeof WebAssembly<"u",g.ready=function(w){return w||(w=b),o?o.then(()=>w(),w):w(new Error("WebAssembly not supported"))},g.prototype.ready=g.ready,g.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},g.prototype.setPartialHash=function(w){this._memory.set(w,this.pointer)};function b(){}return Fi.exports}var dC;function aq(){if(dC)return un.exports;dC=1;var e=YB(),t=sq();function n(j,U,$){var N=j[U]+j[$],Z=j[U+1]+j[$+1];N>=4294967296&&Z++,j[U]=N,j[U+1]=Z}function o(j,U,$,N){var Z=j[U]+$;$<0&&(Z+=4294967296);var re=j[U+1]+N;Z>=4294967296&&re++,j[U]=Z,j[U+1]=re}function s(j,U){return j[U]^j[U+1]<<8^j[U+2]<<16^j[U+3]<<24}function a(j,U,$,N,Z,re){var ie=p[Z],X=p[Z+1],ae=p[re],ye=p[re+1];n(f,j,U),o(f,j,ie,X);var le=f[N]^f[j],ee=f[N+1]^f[j+1];f[N]=ee,f[N+1]=le,n(f,$,N),le=f[U]^f[$],ee=f[U+1]^f[$+1],f[U]=le>>>24^ee<<8,f[U+1]=ee>>>24^le<<8,n(f,j,U),o(f,j,ae,ye),le=f[N]^f[j],ee=f[N+1]^f[j+1],f[N]=le>>>16^ee<<16,f[N+1]=ee>>>16^le<<16,n(f,$,N),le=f[U]^f[$],ee=f[U+1]^f[$+1],f[U]=ee>>>31^le<<1,f[U+1]=le>>>31^ee<<1}var l=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],h=new Uint8Array(c.map(function(j){return j*2})),f=new Uint32Array(32),p=new Uint32Array(32);function y(j,U){var $=0;for($=0;$<16;$++)f[$]=j.h[$],f[$+16]=l[$];for(f[24]=f[24]^j.t,f[25]=f[25]^j.t/4294967296,U&&(f[28]=~f[28],f[29]=~f[29]),$=0;$<32;$++)p[$]=s(j.b,4*$);for($=0;$<12;$++)a(0,8,16,24,h[$*16+0],h[$*16+1]),a(2,10,18,26,h[$*16+2],h[$*16+3]),a(4,12,20,28,h[$*16+4],h[$*16+5]),a(6,14,22,30,h[$*16+6],h[$*16+7]),a(0,10,20,30,h[$*16+8],h[$*16+9]),a(2,12,22,24,h[$*16+10],h[$*16+11]),a(4,14,16,26,h[$*16+12],h[$*16+13]),a(6,8,18,28,h[$*16+14],h[$*16+15]);for($=0;$<16;$++)j.h[$]=j.h[$]^f[$]^f[$+16]}var g=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function b(j,U,$,N){g.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=j,g[0]=j,U&&(g[1]=U.length),g[2]=1,g[3]=1,$&&g.set($,32),N&&g.set(N,48);for(var Z=0;Z<16;Z++)this.h[Z]=l[Z]^s(g,Z*4);U&&(w(this,U),this.c=128)}b.prototype.update=function(j){return e(j instanceof Uint8Array,"input must be Uint8Array or Buffer"),w(this,j),this},b.prototype.digest=function(j){var U=!j||j==="binary"||j==="hex"?new Uint8Array(this.outlen):j;return e(U instanceof Uint8Array,'out must be "binary", "hex", Uint8Array, or Buffer'),e(U.length>=this.outlen,"out must have at least outlen bytes of space"),F(this,U),j==="hex"?I(U):U},b.prototype.final=b.prototype.digest,b.ready=function(j){t.ready(function(){j()})};function w(j,U){for(var $=0;$<U.length;$++)j.c===128&&(j.t+=j.c,y(j,!1),j.c=0),j.b[j.c++]=U[$]}function F(j,U){for(j.t+=j.c;j.c<128;)j.b[j.c++]=0;y(j,!0);for(var $=0;$<j.outlen;$++)U[$]=j.h[$>>2]>>8*($&3);return U}function I(j){for(var U="",$=0;$<j.length;$++)U+=R(j[$]);return U}function R(j){return j<16?"0"+j.toString(16):j.toString(16)}var A=b;un.exports=function(U,$,N,Z,re){return re!==!0&&(e(U>=E,"outlen must be at least "+E+", was given "+U),e(U<=M,"outlen must be at most "+M+", was given "+U),$!=null&&(e($ instanceof Uint8Array,"key must be Uint8Array or Buffer"),e($.length>=T,"key must be at least "+T+", was given "+$.length),e($.length<=z,"key must be at most "+z+", was given "+$.length)),N!=null&&(e(N instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(N.length===L,"salt must be exactly "+L+", was given "+N.length)),Z!=null&&(e(Z instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(Z.length===k,"personal must be exactly "+k+", was given "+Z.length))),new A(U,$,N,Z)},un.exports.ready=function(j){t.ready(function(){j()})},un.exports.WASM_SUPPORTED=t.SUPPORTED,un.exports.WASM_LOADED=!1;var E=un.exports.BYTES_MIN=16,M=un.exports.BYTES_MAX=64;un.exports.BYTES=32;var T=un.exports.KEYBYTES_MIN=16,z=un.exports.KEYBYTES_MAX=64;un.exports.KEYBYTES=32;var L=un.exports.SALTBYTES=16,k=un.exports.PERSONALBYTES=16;return t.ready(function(j){j||(un.exports.WASM_LOADED=!0,un.exports=t)}),un.exports}var pC;function uq(){if(pC)return So;pC=1;var e=So&&So.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(So,"__esModule",{value:!0}),So.encode=So.decode=void 0;const t=e(Hb()),n=e(J9()),o=e(aq()),s=(0,n.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),a=Nr.Buffer.from("SS58PRE"),l=Nr.Buffer.alloc(64);function c(y){let g=s.decodeUnsafe(y);if(g==null||g.length<3)throw p(y);let b=g[0],w,F;if(b<64)F=b,w=1;else if(b<128){let R=g[1],A=(b<<2|R>>6)&255,E=R&63;F=A|E<<8,w=2}else throw p(y);let I;switch(g.length-w){case 34:case 35:I=2;break;case 9:case 5:case 3:case 2:I=1;break;default:throw p(y)}f(g,I);for(let R=0;R<I;R++)if(l[R]!=g[g.length-I+R])throw p(y);return{prefix:F,bytes:g.subarray(w,g.length-I)}}So.decode=c;function h(y){let g=y.prefix;(0,t.default)(Number.isInteger(g)&&g>=0&&g<16384,"invalid prefix");let b=y.bytes.length,w;switch(b){case 1:case 2:case 4:case 8:w=1;break;case 32:case 33:w=2;break;default:(0,t.default)(!1,"invalid address length")}let F,I;g<64?(F=Nr.Buffer.allocUnsafe(1+w+b),F[0]=g,I=1):(F=Nr.Buffer.allocUnsafe(2+w+b),F[0]=(g&252)>>2|64,F[1]=g>>8|(g&3)<<6,I=2),F.set(y.bytes,I),f(F,w);for(let R=0;R<w;R++)F[I+b+R]=l[R];return s.encode(F)}So.encode=h;function f(y,g){let b=(0,o.default)(64);b.update(a),b.update(y.subarray(0,y.length-g)),b.digest(l)}function p(y){return new Error("Invalid ss58 address: "+y)}return So}var lq=uq();function cq(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let f=0;f<t.length;f++)t[f]=255;for(let f=0;f<e.length;f++){const p=e.charAt(f),y=p.charCodeAt(0);if(t[y]!==255)throw new TypeError(p+" is ambiguous");t[y]=f}const n=e.length,o=e.charAt(0),s=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function l(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";let p=0,y=0,g=0;const b=f.length;for(;g!==b&&f[g]===0;)g++,p++;const w=(b-g)*a+1>>>0,F=new Uint8Array(w);for(;g!==b;){let A=f[g],E=0;for(let M=w-1;(A!==0||E<y)&&M!==-1;M--,E++)A+=256*F[M]>>>0,F[M]=A%n>>>0,A=A/n>>>0;if(A!==0)throw new Error("Non-zero carry");y=E,g++}let I=w-y;for(;I!==w&&F[I]===0;)I++;let R=o.repeat(p);for(;I<w;++I)R+=e.charAt(F[I]);return R}function c(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;let p=0,y=0,g=0;for(;f[p]===o;)y++,p++;const b=(f.length-p)*s+1>>>0,w=new Uint8Array(b);for(;p<f.length;){const A=f.charCodeAt(p);if(A>255)return;let E=t[A];if(E===255)return;let M=0;for(let T=b-1;(E!==0||M<g)&&T!==-1;T--,M++)E+=n*w[T]>>>0,w[T]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");g=M,p++}let F=b-g;for(;F!==b&&w[F]===0;)F++;const I=new Uint8Array(y+(b-F));let R=y;for(;F!==b;)I[R++]=w[F++];return I}function h(f){const p=c(f);if(p)return p;throw new Error("Non-base"+n+" character")}return{encode:l,decodeUnsafe:c,decode:h}}var fq="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const ld=cq(fq);function hq(e){function t(a){var l=Uint8Array.from(a),c=e(l),h=l.length+4,f=new Uint8Array(h);return f.set(l,0),f.set(c.subarray(0,4),l.length),ld.encode(f)}function n(a){var l=a.slice(0,-4),c=a.slice(-4),h=e(l);if(!(c[0]^h[0]|c[1]^h[1]|c[2]^h[2]|c[3]^h[3]))return l}function o(a){var l=ld.decodeUnsafe(a);if(l!=null)return n(l)}function s(a){var l=ld.decode(a),c=n(l);if(c==null)throw new Error("Invalid checksum");return c}return{encode:t,decode:s,decodeUnsafe:o}}function dq(e){return xb(xb(e))}const zp=hq(dq);var aa={},yC;function pq(){if(yC)return aa;yC=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.bech32m=aa.bech32=void 0;const e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",t={};for(let f=0;f<e.length;f++){const p=e.charAt(f);t[p]=f}function n(f){const p=f>>25;return(f&33554431)<<5^-(p>>0&1)&996825010^-(p>>1&1)&642813549^-(p>>2&1)&513874426^-(p>>3&1)&1027748829^-(p>>4&1)&705979059}function o(f){let p=1;for(let y=0;y<f.length;++y){const g=f.charCodeAt(y);if(g<33||g>126)return"Invalid prefix ("+f+")";p=n(p)^g>>5}p=n(p);for(let y=0;y<f.length;++y){const g=f.charCodeAt(y);p=n(p)^g&31}return p}function s(f,p,y,g){let b=0,w=0;const F=(1<<y)-1,I=[];for(let R=0;R<f.length;++R)for(b=b<<p|f[R],w+=p;w>=y;)w-=y,I.push(b>>w&F);if(g)w>0&&I.push(b<<y-w&F);else{if(w>=p)return"Excess padding";if(b<<y-w&F)return"Non-zero padding"}return I}function a(f){return s(f,8,5,!0)}function l(f){const p=s(f,5,8,!1);if(Array.isArray(p))return p}function c(f){const p=s(f,5,8,!1);if(Array.isArray(p))return p;throw new Error(p)}function h(f){let p;f==="bech32"?p=1:p=734539939;function y(F,I,R){if(R=R||90,F.length+7+I.length>R)throw new TypeError("Exceeds length limit");F=F.toLowerCase();let A=o(F);if(typeof A=="string")throw new Error(A);let E=F+"1";for(let M=0;M<I.length;++M){const T=I[M];if(T>>5!==0)throw new Error("Non 5-bit word");A=n(A)^T,E+=e.charAt(T)}for(let M=0;M<6;++M)A=n(A);A^=p;for(let M=0;M<6;++M){const T=A>>(5-M)*5&31;E+=e.charAt(T)}return E}function g(F,I){if(I=I||90,F.length<8)return F+" too short";if(F.length>I)return"Exceeds length limit";const R=F.toLowerCase(),A=F.toUpperCase();if(F!==R&&F!==A)return"Mixed-case string "+F;F=R;const E=F.lastIndexOf("1");if(E===-1)return"No separator character for "+F;if(E===0)return"Missing prefix for "+F;const M=F.slice(0,E),T=F.slice(E+1);if(T.length<6)return"Data too short";let z=o(M);if(typeof z=="string")return z;const L=[];for(let k=0;k<T.length;++k){const j=T.charAt(k),U=t[j];if(U===void 0)return"Unknown character "+j;z=n(z)^U,!(k+6>=T.length)&&L.push(U)}return z!==p?"Invalid checksum for "+F:{prefix:M,words:L}}function b(F,I){const R=g(F,I);if(typeof R=="object")return R}function w(F,I){const R=g(F,I);if(typeof R=="object")return R;throw new Error(R)}return{decodeUnsafe:b,decode:w,encode:y,toWords:a,fromWordsUnsafe:l,fromWords:c}}return aa.bech32=h("bech32"),aa.bech32m=h("bech32m"),aa}var Qb=pq(),nb={exports:{}},gC;function yq(){return gC||(gC=1,(function(e){(function(){var t=typeof window=="object"?window:{},n=!t.HI_BASE32_NO_NODE_JS&&typeof jt=="object"&&jt.versions&&jt.versions.node;n&&(t=af);var o=!t.HI_BASE32_NO_COMMON_JS&&!0&&e.exports,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},l=[0,0,0,0,0,0,0,0],c=function(I,R){R.length>10&&(R="..."+R.substr(-10));var A=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+I+" bytes: "+R+" <-");throw A.position=I,A},h=function(I){for(var R="",A=I.length,E=0,M=0,T,z;E<A;){if(T=I[E++],T<=127){R+=String.fromCharCode(T);continue}else T>191&&T<=223?(z=T&31,M=1):T<=239?(z=T&15,M=2):T<=247?(z=T&7,M=3):c(E,R);for(var L=0;L<M;++L)T=I[E++],(T<128||T>191)&&c(E,R),z<<=6,z+=T&63;z>=55296&&z<=57343&&c(E,R),z>1114111&&c(E,R),z<=65535?R+=String.fromCharCode(z):(z-=65536,R+=String.fromCharCode((z>>10)+55296),R+=String.fromCharCode((z&1023)+56320))}return R},f=function(I){if(I==="")return[];if(!/^[A-Z2-7=]+$/.test(I))throw new Error("Invalid base32 characters");I=I.replace(/=/g,"");for(var R,A,E,M,T,z,L,k,j=[],U=0,$=I.length,N=0,Z=$>>3<<3;N<Z;)R=a[I.charAt(N++)],A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],z=a[I.charAt(N++)],L=a[I.charAt(N++)],k=a[I.charAt(N++)],j[U++]=(R<<3|A>>>2)&255,j[U++]=(A<<6|E<<1|M>>>4)&255,j[U++]=(M<<4|T>>>1)&255,j[U++]=(T<<7|z<<2|L>>>3)&255,j[U++]=(L<<5|k)&255;var re=$-Z;return re===2?(R=a[I.charAt(N++)],A=a[I.charAt(N++)],j[U++]=(R<<3|A>>>2)&255):re===4?(R=a[I.charAt(N++)],A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],j[U++]=(R<<3|A>>>2)&255,j[U++]=(A<<6|E<<1|M>>>4)&255):re===5?(R=a[I.charAt(N++)],A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],j[U++]=(R<<3|A>>>2)&255,j[U++]=(A<<6|E<<1|M>>>4)&255,j[U++]=(M<<4|T>>>1)&255):re===7&&(R=a[I.charAt(N++)],A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],z=a[I.charAt(N++)],L=a[I.charAt(N++)],j[U++]=(R<<3|A>>>2)&255,j[U++]=(A<<6|E<<1|M>>>4)&255,j[U++]=(M<<4|T>>>1)&255,j[U++]=(T<<7|z<<2|L>>>3)&255),j},p=function(I){for(var R,A,E,M,T,z="",L=I.length,k=0,j=parseInt(L/5)*5;k<j;)R=I.charCodeAt(k++),A=I.charCodeAt(k++),E=I.charCodeAt(k++),M=I.charCodeAt(k++),T=I.charCodeAt(k++),z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[(M<<3|T>>>5)&31]+s[T&31];var U=L-j;return U===1?(R=I.charCodeAt(k),z+=s[R>>>3]+s[R<<2&31]+"======"):U===2?(R=I.charCodeAt(k++),A=I.charCodeAt(k),z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(R=I.charCodeAt(k++),A=I.charCodeAt(k++),E=I.charCodeAt(k),z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[E<<1&31]+"==="):U===4&&(R=I.charCodeAt(k++),A=I.charCodeAt(k++),E=I.charCodeAt(k++),M=I.charCodeAt(k),z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[M<<3&31]+"="),z},y=function(I){var R,A,E,M,T,z,L=!1,k="",j=0,U,$=0,N=I.length;if(I==="")return k;do{for(l[0]=l[5],l[1]=l[6],l[2]=l[7],U=$;j<N&&U<5;++j)z=I.charCodeAt(j),z<128?l[U++]=z:z<2048?(l[U++]=192|z>>6,l[U++]=128|z&63):z<55296||z>=57344?(l[U++]=224|z>>12,l[U++]=128|z>>6&63,l[U++]=128|z&63):(z=65536+((z&1023)<<10|I.charCodeAt(++j)&1023),l[U++]=240|z>>18,l[U++]=128|z>>12&63,l[U++]=128|z>>6&63,l[U++]=128|z&63);$=U-5,j===N&&++j,j>N&&U<6&&(L=!0),R=l[0],U>4?(A=l[1],E=l[2],M=l[3],T=l[4],k+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[(M<<3|T>>>5)&31]+s[T&31]):U===1?k+=s[R>>>3]+s[R<<2&31]+"======":U===2?(A=l[1],k+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(A=l[1],E=l[2],k+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[E<<1&31]+"==="):(A=l[1],E=l[2],M=l[3],k+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[M<<3&31]+"=")}while(!L);return k},g=function(I){for(var R,A,E,M,T,z="",L=I.length,k=0,j=parseInt(L/5)*5;k<j;)R=I[k++],A=I[k++],E=I[k++],M=I[k++],T=I[k++],z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[(M<<3|T>>>5)&31]+s[T&31];var U=L-j;return U===1?(R=I[k],z+=s[R>>>3]+s[R<<2&31]+"======"):U===2?(R=I[k++],A=I[k],z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(R=I[k++],A=I[k++],E=I[k],z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[E<<1&31]+"==="):U===4&&(R=I[k++],A=I[k++],E=I[k++],M=I[k],z+=s[R>>>3]+s[(R<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|E>>>4)&31]+s[(E<<1|M>>>7)&31]+s[M>>>2&31]+s[M<<3&31]+"="),z},b=function(I,R){var A=typeof I!="string";return A&&I.constructor===ArrayBuffer&&(I=new Uint8Array(I)),A?g(I):R?p(I):y(I)},w=function(I,R){if(!R)return h(f(I));if(I==="")return"";if(!/^[A-Z2-7=]+$/.test(I))throw new Error("Invalid base32 characters");var A,E,M,T,z,L,k,j,U="",$=I.indexOf("=");$===-1&&($=I.length);for(var N=0,Z=$>>3<<3;N<Z;)A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],z=a[I.charAt(N++)],L=a[I.charAt(N++)],k=a[I.charAt(N++)],j=a[I.charAt(N++)],U+=String.fromCharCode((A<<3|E>>>2)&255)+String.fromCharCode((E<<6|M<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|L<<2|k>>>3)&255)+String.fromCharCode((k<<5|j)&255);var re=$-Z;return re===2?(A=a[I.charAt(N++)],E=a[I.charAt(N++)],U+=String.fromCharCode((A<<3|E>>>2)&255)):re===4?(A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],U+=String.fromCharCode((A<<3|E>>>2)&255)+String.fromCharCode((E<<6|M<<1|T>>>4)&255)):re===5?(A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],z=a[I.charAt(N++)],U+=String.fromCharCode((A<<3|E>>>2)&255)+String.fromCharCode((E<<6|M<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)):re===7&&(A=a[I.charAt(N++)],E=a[I.charAt(N++)],M=a[I.charAt(N++)],T=a[I.charAt(N++)],z=a[I.charAt(N++)],L=a[I.charAt(N++)],k=a[I.charAt(N++)],U+=String.fromCharCode((A<<3|E>>>2)&255)+String.fromCharCode((E<<6|M<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|L<<2|k>>>3)&255)),U},F={encode:b,decode:w};w.asBytes=f,o?e.exports=F:t.base32=F})()})(nb)),nb.exports}var gq=yq();const VB=tp(gq);var ib={exports:{}},mC;function mq(){return mC||(mC=1,(function(e){(function(){var t="input is invalid type",n="finalize already called",o=typeof window=="object",s=o?window:{};s.JS_SHA512_NO_WINDOW&&(o=!1);var a=!o&&typeof self=="object",l=!s.JS_SHA512_NO_NODE_JS&&typeof jt=="object"&&jt.versions&&jt.versions.node;l?s=af:a&&(s=self);var c=!s.JS_SHA512_NO_COMMON_JS&&!0&&e.exports,h=!s.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],y=[24,16,8,0],g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],b=["hex","array","digest","arrayBuffer"],w=[],F=Array.isArray;(s.JS_SHA512_NO_NODE_JS||!F)&&(F=function(j){return Object.prototype.toString.call(j)==="[object Array]"});var I=ArrayBuffer.isView;h&&(s.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!I)&&(I=function(j){return typeof j=="object"&&j.buffer&&j.buffer.constructor===ArrayBuffer});var R=function(j){var U=typeof j;if(U==="string")return[j,!0];if(U!=="object"||j===null)throw new Error(t);if(h&&j.constructor===ArrayBuffer)return[new Uint8Array(j),!1];if(!F(j)&&!I(j))throw new Error(t);return[j,!1]},A=function(j,U){return function($){return new z(U,!0).update($)[j]()}},E=function(j){var U=A("hex",j);U.create=function(){return new z(j)},U.update=function(Z){return U.create().update(Z)};for(var $=0;$<b.length;++$){var N=b[$];U[N]=A(N,j)}return U},M=function(j,U){return function($,N){return new L($,U,!0).update(N)[j]()}},T=function(j){var U=M("hex",j);U.create=function(Z){return new L(Z,j)},U.update=function(Z,re){return U.create(Z).update(re)};for(var $=0;$<b.length;++$){var N=b[$];U[N]=M(N,j)}return U};function z(j,U){U?(w[0]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=w[16]=w[17]=w[18]=w[19]=w[20]=w[21]=w[22]=w[23]=w[24]=w[25]=w[26]=w[27]=w[28]=w[29]=w[30]=w[31]=w[32]=0,this.blocks=w):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],j==384?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):j==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):j==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=j,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}z.prototype.update=function(j){if(this.finalized)throw new Error(n);var U=R(j);j=U[0];for(var $=U[1],N,Z=0,re,ie=j.length,X=this.blocks;Z<ie;){if(this.hashed&&(this.hashed=!1,X[0]=this.block,this.block=X[1]=X[2]=X[3]=X[4]=X[5]=X[6]=X[7]=X[8]=X[9]=X[10]=X[11]=X[12]=X[13]=X[14]=X[15]=X[16]=X[17]=X[18]=X[19]=X[20]=X[21]=X[22]=X[23]=X[24]=X[25]=X[26]=X[27]=X[28]=X[29]=X[30]=X[31]=X[32]=0),$)for(re=this.start;Z<ie&&re<128;++Z)N=j.charCodeAt(Z),N<128?X[re>>>2]|=N<<y[re++&3]:N<2048?(X[re>>>2]|=(192|N>>>6)<<y[re++&3],X[re>>>2]|=(128|N&63)<<y[re++&3]):N<55296||N>=57344?(X[re>>>2]|=(224|N>>>12)<<y[re++&3],X[re>>>2]|=(128|N>>>6&63)<<y[re++&3],X[re>>>2]|=(128|N&63)<<y[re++&3]):(N=65536+((N&1023)<<10|j.charCodeAt(++Z)&1023),X[re>>>2]|=(240|N>>>18)<<y[re++&3],X[re>>>2]|=(128|N>>>12&63)<<y[re++&3],X[re>>>2]|=(128|N>>>6&63)<<y[re++&3],X[re>>>2]|=(128|N&63)<<y[re++&3]);else for(re=this.start;Z<ie&&re<128;++Z)X[re>>>2]|=j[Z]<<y[re++&3];this.lastByteIndex=re,this.bytes+=re-this.start,re>=128?(this.block=X[32],this.start=re-128,this.hash(),this.hashed=!0):this.start=re}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var j=this.blocks,U=this.lastByteIndex;j[32]=this.block,j[U>>>2]|=p[U&3],this.block=j[32],U>=112&&(this.hashed||this.hash(),j[0]=this.block,j[1]=j[2]=j[3]=j[4]=j[5]=j[6]=j[7]=j[8]=j[9]=j[10]=j[11]=j[12]=j[13]=j[14]=j[15]=j[16]=j[17]=j[18]=j[19]=j[20]=j[21]=j[22]=j[23]=j[24]=j[25]=j[26]=j[27]=j[28]=j[29]=j[30]=j[31]=j[32]=0),j[30]=this.hBytes<<3|this.bytes>>>29,j[31]=this.bytes<<3,this.hash()}},z.prototype.hash=function(){var j=this.h0h,U=this.h0l,$=this.h1h,N=this.h1l,Z=this.h2h,re=this.h2l,ie=this.h3h,X=this.h3l,ae=this.h4h,ye=this.h4l,le=this.h5h,ee=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,q=this.blocks,fe,ue,ne,J,O,H,Y,se,pe,te,_,v,C,P,he,ce,Se,Be,de,ve,x,B,D,oe,me;for(fe=32;fe<160;fe+=2)ve=q[fe-30],x=q[fe-29],ue=(ve>>>1|x<<31)^(ve>>>8|x<<24)^ve>>>7,ne=(x>>>1|ve<<31)^(x>>>8|ve<<24)^(x>>>7|ve<<25),ve=q[fe-4],x=q[fe-3],J=(ve>>>19|x<<13)^(x>>>29|ve<<3)^ve>>>6,O=(x>>>19|ve<<13)^(ve>>>29|x<<3)^(x>>>6|ve<<26),ve=q[fe-32],x=q[fe-31],B=q[fe-14],D=q[fe-13],H=(D&65535)+(x&65535)+(ne&65535)+(O&65535),Y=(D>>>16)+(x>>>16)+(ne>>>16)+(O>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(ue&65535)+(J&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(ue>>>16)+(J>>>16)+(se>>>16),q[fe]=pe<<16|se&65535,q[fe+1]=Y<<16|H&65535;var xe=j,Ce=U,we=$,Ie=N,He=Z,Ke=re,We=ie,et=X,gt=ae,bt=ye,lt=le,yt=ee,tt=G,ft=Q,dt=K,At=W;for(ce=we&He,Se=Ie&Ke,fe=0;fe<160;fe+=8)ue=(xe>>>28|Ce<<4)^(Ce>>>2|xe<<30)^(Ce>>>7|xe<<25),ne=(Ce>>>28|xe<<4)^(xe>>>2|Ce<<30)^(xe>>>7|Ce<<25),J=(gt>>>14|bt<<18)^(gt>>>18|bt<<14)^(bt>>>9|gt<<23),O=(bt>>>14|gt<<18)^(bt>>>18|gt<<14)^(gt>>>9|bt<<23),te=xe&we,_=Ce&Ie,Be=te^xe&He^ce,de=_^Ce&Ke^Se,oe=gt&lt^~gt&tt,me=bt&yt^~bt&ft,ve=q[fe],x=q[fe+1],B=g[fe],D=g[fe+1],H=(D&65535)+(x&65535)+(me&65535)+(O&65535)+(At&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(At>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(oe&65535)+(J&65535)+(dt&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(oe>>>16)+(J>>>16)+(dt>>>16)+(se>>>16),ve=pe<<16|se&65535,x=Y<<16|H&65535,H=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(H>>>16),se=(Be&65535)+(ue&65535)+(Y>>>16),pe=(Be>>>16)+(ue>>>16)+(se>>>16),B=pe<<16|se&65535,D=Y<<16|H&65535,H=(et&65535)+(x&65535),Y=(et>>>16)+(x>>>16)+(H>>>16),se=(We&65535)+(ve&65535)+(Y>>>16),pe=(We>>>16)+(ve>>>16)+(se>>>16),dt=pe<<16|se&65535,At=Y<<16|H&65535,H=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(se>>>16),We=pe<<16|se&65535,et=Y<<16|H&65535,ue=(We>>>28|et<<4)^(et>>>2|We<<30)^(et>>>7|We<<25),ne=(et>>>28|We<<4)^(We>>>2|et<<30)^(We>>>7|et<<25),J=(dt>>>14|At<<18)^(dt>>>18|At<<14)^(At>>>9|dt<<23),O=(At>>>14|dt<<18)^(At>>>18|dt<<14)^(dt>>>9|At<<23),v=We&xe,C=et&Ce,Be=v^We&we^te,de=C^et&Ie^_,oe=dt&gt^~dt&lt,me=At&bt^~At&yt,ve=q[fe+2],x=q[fe+3],B=g[fe+2],D=g[fe+3],H=(D&65535)+(x&65535)+(me&65535)+(O&65535)+(ft&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(ft>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(oe&65535)+(J&65535)+(tt&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(oe>>>16)+(J>>>16)+(tt>>>16)+(se>>>16),ve=pe<<16|se&65535,x=Y<<16|H&65535,H=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(H>>>16),se=(Be&65535)+(ue&65535)+(Y>>>16),pe=(Be>>>16)+(ue>>>16)+(se>>>16),B=pe<<16|se&65535,D=Y<<16|H&65535,H=(Ke&65535)+(x&65535),Y=(Ke>>>16)+(x>>>16)+(H>>>16),se=(He&65535)+(ve&65535)+(Y>>>16),pe=(He>>>16)+(ve>>>16)+(se>>>16),tt=pe<<16|se&65535,ft=Y<<16|H&65535,H=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(se>>>16),He=pe<<16|se&65535,Ke=Y<<16|H&65535,ue=(He>>>28|Ke<<4)^(Ke>>>2|He<<30)^(Ke>>>7|He<<25),ne=(Ke>>>28|He<<4)^(He>>>2|Ke<<30)^(He>>>7|Ke<<25),J=(tt>>>14|ft<<18)^(tt>>>18|ft<<14)^(ft>>>9|tt<<23),O=(ft>>>14|tt<<18)^(ft>>>18|tt<<14)^(tt>>>9|ft<<23),P=He&We,he=Ke&et,Be=P^He&xe^v,de=he^Ke&Ce^C,oe=tt&dt^~tt&gt,me=ft&At^~ft&bt,ve=q[fe+4],x=q[fe+5],B=g[fe+4],D=g[fe+5],H=(D&65535)+(x&65535)+(me&65535)+(O&65535)+(yt&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(yt>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(oe&65535)+(J&65535)+(lt&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(oe>>>16)+(J>>>16)+(lt>>>16)+(se>>>16),ve=pe<<16|se&65535,x=Y<<16|H&65535,H=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(H>>>16),se=(Be&65535)+(ue&65535)+(Y>>>16),pe=(Be>>>16)+(ue>>>16)+(se>>>16),B=pe<<16|se&65535,D=Y<<16|H&65535,H=(Ie&65535)+(x&65535),Y=(Ie>>>16)+(x>>>16)+(H>>>16),se=(we&65535)+(ve&65535)+(Y>>>16),pe=(we>>>16)+(ve>>>16)+(se>>>16),lt=pe<<16|se&65535,yt=Y<<16|H&65535,H=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(se>>>16),we=pe<<16|se&65535,Ie=Y<<16|H&65535,ue=(we>>>28|Ie<<4)^(Ie>>>2|we<<30)^(Ie>>>7|we<<25),ne=(Ie>>>28|we<<4)^(we>>>2|Ie<<30)^(we>>>7|Ie<<25),J=(lt>>>14|yt<<18)^(lt>>>18|yt<<14)^(yt>>>9|lt<<23),O=(yt>>>14|lt<<18)^(yt>>>18|lt<<14)^(lt>>>9|yt<<23),ce=we&He,Se=Ie&Ke,Be=ce^we&We^P,de=Se^Ie&et^he,oe=lt&tt^~lt&dt,me=yt&ft^~yt&At,ve=q[fe+6],x=q[fe+7],B=g[fe+6],D=g[fe+7],H=(D&65535)+(x&65535)+(me&65535)+(O&65535)+(bt&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(bt>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(oe&65535)+(J&65535)+(gt&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(oe>>>16)+(J>>>16)+(gt>>>16)+(se>>>16),ve=pe<<16|se&65535,x=Y<<16|H&65535,H=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(H>>>16),se=(Be&65535)+(ue&65535)+(Y>>>16),pe=(Be>>>16)+(ue>>>16)+(se>>>16),B=pe<<16|se&65535,D=Y<<16|H&65535,H=(Ce&65535)+(x&65535),Y=(Ce>>>16)+(x>>>16)+(H>>>16),se=(xe&65535)+(ve&65535)+(Y>>>16),pe=(xe>>>16)+(ve>>>16)+(se>>>16),gt=pe<<16|se&65535,bt=Y<<16|H&65535,H=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(se>>>16),xe=pe<<16|se&65535,Ce=Y<<16|H&65535;H=(U&65535)+(Ce&65535),Y=(U>>>16)+(Ce>>>16)+(H>>>16),se=(j&65535)+(xe&65535)+(Y>>>16),pe=(j>>>16)+(xe>>>16)+(se>>>16),this.h0h=pe<<16|se&65535,this.h0l=Y<<16|H&65535,H=(N&65535)+(Ie&65535),Y=(N>>>16)+(Ie>>>16)+(H>>>16),se=($&65535)+(we&65535)+(Y>>>16),pe=($>>>16)+(we>>>16)+(se>>>16),this.h1h=pe<<16|se&65535,this.h1l=Y<<16|H&65535,H=(re&65535)+(Ke&65535),Y=(re>>>16)+(Ke>>>16)+(H>>>16),se=(Z&65535)+(He&65535)+(Y>>>16),pe=(Z>>>16)+(He>>>16)+(se>>>16),this.h2h=pe<<16|se&65535,this.h2l=Y<<16|H&65535,H=(X&65535)+(et&65535),Y=(X>>>16)+(et>>>16)+(H>>>16),se=(ie&65535)+(We&65535)+(Y>>>16),pe=(ie>>>16)+(We>>>16)+(se>>>16),this.h3h=pe<<16|se&65535,this.h3l=Y<<16|H&65535,H=(ye&65535)+(bt&65535),Y=(ye>>>16)+(bt>>>16)+(H>>>16),se=(ae&65535)+(gt&65535)+(Y>>>16),pe=(ae>>>16)+(gt>>>16)+(se>>>16),this.h4h=pe<<16|se&65535,this.h4l=Y<<16|H&65535,H=(ee&65535)+(yt&65535),Y=(ee>>>16)+(yt>>>16)+(H>>>16),se=(le&65535)+(lt&65535)+(Y>>>16),pe=(le>>>16)+(lt>>>16)+(se>>>16),this.h5h=pe<<16|se&65535,this.h5l=Y<<16|H&65535,H=(Q&65535)+(ft&65535),Y=(Q>>>16)+(ft>>>16)+(H>>>16),se=(G&65535)+(tt&65535)+(Y>>>16),pe=(G>>>16)+(tt>>>16)+(se>>>16),this.h6h=pe<<16|se&65535,this.h6l=Y<<16|H&65535,H=(W&65535)+(At&65535),Y=(W>>>16)+(At>>>16)+(H>>>16),se=(K&65535)+(dt&65535)+(Y>>>16),pe=(K>>>16)+(dt>>>16)+(se>>>16),this.h7h=pe<<16|se&65535,this.h7l=Y<<16|H&65535},z.prototype.hex=function(){this.finalize();var j=this.h0h,U=this.h0l,$=this.h1h,N=this.h1l,Z=this.h2h,re=this.h2l,ie=this.h3h,X=this.h3l,ae=this.h4h,ye=this.h4l,le=this.h5h,ee=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,q=this.bits,fe=f[j>>>28&15]+f[j>>>24&15]+f[j>>>20&15]+f[j>>>16&15]+f[j>>>12&15]+f[j>>>8&15]+f[j>>>4&15]+f[j&15]+f[U>>>28&15]+f[U>>>24&15]+f[U>>>20&15]+f[U>>>16&15]+f[U>>>12&15]+f[U>>>8&15]+f[U>>>4&15]+f[U&15]+f[$>>>28&15]+f[$>>>24&15]+f[$>>>20&15]+f[$>>>16&15]+f[$>>>12&15]+f[$>>>8&15]+f[$>>>4&15]+f[$&15]+f[N>>>28&15]+f[N>>>24&15]+f[N>>>20&15]+f[N>>>16&15]+f[N>>>12&15]+f[N>>>8&15]+f[N>>>4&15]+f[N&15]+f[Z>>>28&15]+f[Z>>>24&15]+f[Z>>>20&15]+f[Z>>>16&15]+f[Z>>>12&15]+f[Z>>>8&15]+f[Z>>>4&15]+f[Z&15]+f[re>>>28&15]+f[re>>>24&15]+f[re>>>20&15]+f[re>>>16&15]+f[re>>>12&15]+f[re>>>8&15]+f[re>>>4&15]+f[re&15]+f[ie>>>28&15]+f[ie>>>24&15]+f[ie>>>20&15]+f[ie>>>16&15]+f[ie>>>12&15]+f[ie>>>8&15]+f[ie>>>4&15]+f[ie&15];return q>=256&&(fe+=f[X>>>28&15]+f[X>>>24&15]+f[X>>>20&15]+f[X>>>16&15]+f[X>>>12&15]+f[X>>>8&15]+f[X>>>4&15]+f[X&15]),q>=384&&(fe+=f[ae>>>28&15]+f[ae>>>24&15]+f[ae>>>20&15]+f[ae>>>16&15]+f[ae>>>12&15]+f[ae>>>8&15]+f[ae>>>4&15]+f[ae&15]+f[ye>>>28&15]+f[ye>>>24&15]+f[ye>>>20&15]+f[ye>>>16&15]+f[ye>>>12&15]+f[ye>>>8&15]+f[ye>>>4&15]+f[ye&15]+f[le>>>28&15]+f[le>>>24&15]+f[le>>>20&15]+f[le>>>16&15]+f[le>>>12&15]+f[le>>>8&15]+f[le>>>4&15]+f[le&15]+f[ee>>>28&15]+f[ee>>>24&15]+f[ee>>>20&15]+f[ee>>>16&15]+f[ee>>>12&15]+f[ee>>>8&15]+f[ee>>>4&15]+f[ee&15]),q==512&&(fe+=f[G>>>28&15]+f[G>>>24&15]+f[G>>>20&15]+f[G>>>16&15]+f[G>>>12&15]+f[G>>>8&15]+f[G>>>4&15]+f[G&15]+f[Q>>>28&15]+f[Q>>>24&15]+f[Q>>>20&15]+f[Q>>>16&15]+f[Q>>>12&15]+f[Q>>>8&15]+f[Q>>>4&15]+f[Q&15]+f[K>>>28&15]+f[K>>>24&15]+f[K>>>20&15]+f[K>>>16&15]+f[K>>>12&15]+f[K>>>8&15]+f[K>>>4&15]+f[K&15]+f[W>>>28&15]+f[W>>>24&15]+f[W>>>20&15]+f[W>>>16&15]+f[W>>>12&15]+f[W>>>8&15]+f[W>>>4&15]+f[W&15]),fe},z.prototype.toString=z.prototype.hex,z.prototype.digest=function(){this.finalize();var j=this.h0h,U=this.h0l,$=this.h1h,N=this.h1l,Z=this.h2h,re=this.h2l,ie=this.h3h,X=this.h3l,ae=this.h4h,ye=this.h4l,le=this.h5h,ee=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,q=this.bits,fe=[j>>>24&255,j>>>16&255,j>>>8&255,j&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255,N>>>24&255,N>>>16&255,N>>>8&255,N&255,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255,re>>>24&255,re>>>16&255,re>>>8&255,re&255,ie>>>24&255,ie>>>16&255,ie>>>8&255,ie&255];return q>=256&&fe.push(X>>>24&255,X>>>16&255,X>>>8&255,X&255),q>=384&&fe.push(ae>>>24&255,ae>>>16&255,ae>>>8&255,ae&255,ye>>>24&255,ye>>>16&255,ye>>>8&255,ye&255,le>>>24&255,le>>>16&255,le>>>8&255,le&255,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee&255),q==512&&fe.push(G>>>24&255,G>>>16&255,G>>>8&255,G&255,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,K>>>24&255,K>>>16&255,K>>>8&255,K&255,W>>>24&255,W>>>16&255,W>>>8&255,W&255),fe},z.prototype.array=z.prototype.digest,z.prototype.arrayBuffer=function(){this.finalize();var j=this.bits,U=new ArrayBuffer(j/8),$=new DataView(U);return $.setUint32(0,this.h0h),$.setUint32(4,this.h0l),$.setUint32(8,this.h1h),$.setUint32(12,this.h1l),$.setUint32(16,this.h2h),$.setUint32(20,this.h2l),$.setUint32(24,this.h3h),j>=256&&$.setUint32(28,this.h3l),j>=384&&($.setUint32(32,this.h4h),$.setUint32(36,this.h4l),$.setUint32(40,this.h5h),$.setUint32(44,this.h5l)),j==512&&($.setUint32(48,this.h6h),$.setUint32(52,this.h6l),$.setUint32(56,this.h7h),$.setUint32(60,this.h7l)),U},z.prototype.clone=function(){var j=new z(this.bits,!1);return this.copyTo(j),j},z.prototype.copyTo=function(j){var U=0,$=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(U=0;U<$.length;++U)j[$[U]]=this[$[U]];for(U=0;U<this.blocks.length;++U)j.blocks[U]=this.blocks[U]};function L(j,U,$){var N,Z=R(j);if(j=Z[0],Z[1]){for(var re=[],ie=j.length,X=0,ae,N=0;N<ie;++N)ae=j.charCodeAt(N),ae<128?re[X++]=ae:ae<2048?(re[X++]=192|ae>>>6,re[X++]=128|ae&63):ae<55296||ae>=57344?(re[X++]=224|ae>>>12,re[X++]=128|ae>>>6&63,re[X++]=128|ae&63):(ae=65536+((ae&1023)<<10|j.charCodeAt(++N)&1023),re[X++]=240|ae>>>18,re[X++]=128|ae>>>12&63,re[X++]=128|ae>>>6&63,re[X++]=128|ae&63);j=re}j.length>128&&(j=new z(U,!0).update(j).array());for(var ye=[],le=[],N=0;N<128;++N){var ee=j[N]||0;ye[N]=92^ee,le[N]=54^ee}z.call(this,U,$),this.update(le),this.oKeyPad=ye,this.inner=!0,this.sharedMemory=$}L.prototype=new z,L.prototype.finalize=function(){if(z.prototype.finalize.call(this),this.inner){this.inner=!1;var j=this.array();z.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(j),z.prototype.finalize.call(this)}},L.prototype.clone=function(){var j=new L([],this.bits,!1);this.copyTo(j),j.inner=this.inner;for(var U=0;U<this.oKeyPad.length;++U)j.oKeyPad[U]=this.oKeyPad[U];return j};var k=E(512);k.sha512=k,k.sha384=E(384),k.sha512_256=E(256),k.sha512_224=E(224),k.sha512.hmac=T(512),k.sha384.hmac=T(384),k.sha512_256.hmac=T(256),k.sha512_224.hmac=T(224),c?e.exports=k:(s.sha512=k.sha512,s.sha384=k.sha384,s.sha512_256=k.sha512_256,s.sha512_224=k.sha512_224)})()})(ib)),ib.exports}var bq=mq();const Aq=tp(bq),WB="3.7.8",wq=WB,ul=typeof Nr.Buffer=="function",bC=typeof TextDecoder=="function"?new TextDecoder:void 0,AC=typeof TextEncoder=="function"?new TextEncoder:void 0,vq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",fc=Array.prototype.slice.call(vq),rd=(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(fc),xq=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,en=String.fromCharCode.bind(String),wC=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),XB=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),JB=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),ZB=e=>{let t,n,o,s,a="";const l=e.length%3;for(let c=0;c<e.length;){if((n=e.charCodeAt(c++))>255||(o=e.charCodeAt(c++))>255||(s=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|s,a+=fc[t>>18&63]+fc[t>>12&63]+fc[t>>6&63]+fc[t&63]}return l?a.slice(0,l-3)+"===".substring(l):a},vv=typeof btoa=="function"?e=>btoa(e):ul?e=>Nr.Buffer.from(e,"binary").toString("base64"):ZB,Gb=ul?e=>Nr.Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,s=e.length;o<s;o+=4096)n.push(en.apply(null,e.subarray(o,o+4096)));return vv(n.join(""))},cd=(e,t=!1)=>t?XB(Gb(e)):Gb(e),Eq=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?en(192|t>>>6)+en(128|t&63):en(224|t>>>12&15)+en(128|t>>>6&63)+en(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return en(240|t>>>18&7)+en(128|t>>>12&63)+en(128|t>>>6&63)+en(128|t&63)}},Sq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,e3=e=>e.replace(Sq,Eq),vC=ul?e=>Nr.Buffer.from(e,"utf8").toString("base64"):AC?e=>Gb(AC.encode(e)):e=>vv(e3(e)),Ru=(e,t=!1)=>t?XB(vC(e)):vC(e),xC=e=>Ru(e,!0),Iq=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_q=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return en((n>>>10)+55296)+en((n&1023)+56320);case 3:return en((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return en((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},t3=e=>e.replace(Iq,_q),r3=e=>{if(e=e.replace(/\s+/g,""),!xq.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n,o,s=[];for(let a=0;a<e.length;)t=rd[e.charAt(a++)]<<18|rd[e.charAt(a++)]<<12|(n=rd[e.charAt(a++)])<<6|(o=rd[e.charAt(a++)]),n===64?s.push(en(t>>16&255)):o===64?s.push(en(t>>16&255,t>>8&255)):s.push(en(t>>16&255,t>>8&255,t&255));return s.join("")},xv=typeof atob=="function"?e=>atob(JB(e)):ul?e=>Nr.Buffer.from(e,"base64").toString("binary"):r3,n3=ul?e=>wC(Nr.Buffer.from(e,"base64")):e=>wC(xv(e).split("").map(t=>t.charCodeAt(0))),i3=e=>n3(o3(e)),Cq=ul?e=>Nr.Buffer.from(e,"base64").toString("utf8"):bC?e=>bC.decode(n3(e)):e=>t3(xv(e)),o3=e=>JB(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Kb=e=>Cq(o3(e)),Fq=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},s3=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),a3=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,s3(n));e("fromBase64",function(){return Kb(this)}),e("toBase64",function(t){return Ru(this,t)}),e("toBase64URI",function(){return Ru(this,!0)}),e("toBase64URL",function(){return Ru(this,!0)}),e("toUint8Array",function(){return i3(this)})},u3=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,s3(n));e("toBase64",function(t){return cd(this,t)}),e("toBase64URI",function(){return cd(this,!0)}),e("toBase64URL",function(){return cd(this,!0)})},Oq=()=>{a3(),u3()},Tq={version:WB,VERSION:wq,atob:xv,atobPolyfill:r3,btoa:vv,btoaPolyfill:ZB,fromBase64:Kb,toBase64:Ru,encode:Ru,encodeURI:xC,encodeURL:xC,utob:e3,btou:t3,decode:Kb,isValid:Fq,fromUint8Array:cd,toUint8Array:i3,extendString:a3,extendUint8Array:u3,extendBuiltins:Oq},Da=e=>`${e} is malformed`,l3=e=>`${e} checksum is wrong`,Bq=32,EC=32,nd=36,c3=4,SC=58,IC=32,Rq=32,_C=Da("block hash"),Mq=Da("tx id"),ob=Da("address"),jq=l3("address");function Uq(e){return Uint8Array.from(Aq.sha512_256.array(e).slice(IC-c3,IC))}function Nq(e){if(typeof e!="string")throw new Error(`${ob}: expected string, got ${typeof e}, ${e}`);if(e.length!==SC)throw new Error(`${ob}: expected length ${SC}, got ${e.length}: ${e}`);const t=VB.decode.asBytes(e);if(t.length!==nd)throw new Error(`${ob}: expected byte length ${nd}, got ${t.length}`);const n=new Uint8Array(t.slice(0,nd-c3)),o=new Uint8Array(t.slice(Rq,nd)),s=Uq(n);if(!kq(s,o))throw new Error(jq);return!0}function Dq(e){const t=Tq.toUint8Array("3KYSrPgi16Cl3iLu3r+GaeZkBBrgNFbMB60jsrJtTdI=");if(t.length!==EC)throw new Error(`${Mq}: expected byte length ${EC}, got ${t.length}`);return!0}function Pq(e){const t=VB.decode.asBytes(e);if(t.length!==Bq)throw new Error(`${_C}: expected byte length ${_C}, got ${t.length}`);return!0}function kq(e,t){return e.length!==t.length?!1:Array.from(e).every((n,o)=>n===t[o])}const Lq=34,Yb=34,CC=36,$q=Da("block hash"),zq=Da("tx id"),qq=Da("address");function Hq(e){const t=zp.decode(e);if(t.length!==CC)throw new Error(`${qq}: expected byte length ${CC}, got ${t.length}`);return!0}function Qq(e){const t=zp.decode(e);if(t.length!==Yb)throw new Error(`${$q}: expected byte length ${Lq}, got ${t.length}`);return!0}function Gq(e){const t=zp.decode(e);if(t.length!==Yb)throw new Error(`${zq}: expected byte length ${Yb}, got ${t.length}`);return!0}function Kq({polynomial:e,numTables:t}){const n=new Uint32Array(256*t);for(let o=0;o<256;o++){let s=o;s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,n[o]=s}for(let o=256;o<n.length;o++){const s=n[o-256];n[o]=n[s&255]^s>>>8}return n}const Gi=Kq({polynomial:3988292384,numTables:8});function Yq(){return-1}function Vq(e,t){const n=t.byteLength,o=new DataView(t.buffer,t.byteOffset,n);let s=e,a=0;const l=-o.byteOffset&3;for(;a<l&&a<n;a++)s=Gi[(s^o.getUint8(a))&255]^s>>>8;if(a===n)return s;a=l;let c=n-a;for(;c>=8;a+=8,c-=8){s^=o.getUint32(a,!0);const h=o.getUint32(a+4,!0);s=Gi[0*256+(h>>>24&255)]^Gi[1*256+(h>>>16&255)]^Gi[2*256+(h>>>8&255)]^Gi[3*256+(h>>>0&255)]^Gi[4*256+(s>>>24&255)]^Gi[5*256+(s>>>16&255)]^Gi[6*256+(s>>>8&255)]^Gi[7*256+(s>>>0&255)]}for(let h=a;h<n;h++)s=Gi[(s^o.getUint8(h))&255]^s>>>8;return s}function Wq(e){return(e^-1)>>>0}function Xq(e){return Wq(Vq(Yq(),e))}const ua=Error,id=Error,sb="Unexpected end of buffer",Fu=class Fu{constructor(t){this.initialByte=t}CborInitialByte(t,n){this.initialByte=t<<5|n}static from(t){return new Fu(t)}getInitialByte(){return this.initialByte}getMajorType(){return this.initialByte>>5}getAdditionalInfo(){return this.initialByte&Fu.AdditionalInformationMask}};Fu.IndefiniteLengthBreakByte=255,Fu.AdditionalInformationMask=31;let Os=Fu;var jo,Oi,Jd,Mu,dr,Zd,Tt,f3,h3,d3,fd,Rn,Wb,p3,hd,hc,dc,la,Xb,ca;const Zr=class Zr{constructor(t){Et(this,Tt);Et(this,jo);Et(this,Oi,0);Et(this,Jd,new Array);Et(this,Mu,!1);Et(this,dr);Et(this,Zd,0);ht(this,jo,new Uint8Array(Nr.Buffer.from(t,"hex"))),ht(this,dr,{currentKeyOffset:null,frameOffset:0,itemsRead:0,type:null})}readStartArray(){var a;const t=Xe(this,Tt,hc).call(this,4);if(t.getAdditionalInfo()===31)return Xe(this,Tt,la).call(this,1),Xe(this,Tt,Xb).call(this,4),null;const n=Xe(this,Tt,ca).call(this),{length:o,bytesRead:s}=Xe(a=Zr,Rn,hd).call(a,t,n);return Xe(this,Tt,la).call(this,s),Xe(this,Tt,Xb).call(this,4,o),o}readTag(){const{tag:t,bytesRead:n}=Xe(this,Tt,p3).call(this);return Xe(this,Tt,la).call(this,n),ht(this,Mu,!0),t}readByteString(){var a;const t=Xe(this,Tt,hc).call(this,2);if(t.getAdditionalInfo()===31){const{val:l,encodingLength:c}=Xe(this,Tt,d3).call(this,2);return Xe(this,Tt,la).call(this,c),Xe(this,Tt,fd).call(this),l}const n=Xe(this,Tt,ca).call(this),{length:o,bytesRead:s}=Xe(a=Zr,Rn,hd).call(a,t,n);return Xe(this,Tt,h3).call(this,s+o),Xe(this,Tt,la).call(this,s+o),Xe(this,Tt,fd).call(this),n.slice(s,s+o)}readInt(){const t=Xe(this,Tt,f3).call(this);return Xe(this,Tt,la).call(this,t.bytesRead),Xe(this,Tt,fd).call(this),t.signedInt}static ensureReadCapacityInArray(t,n){if(t.length<n)throw new ua(sb)}};jo=new WeakMap,Oi=new WeakMap,Jd=new WeakMap,Mu=new WeakMap,dr=new WeakMap,Zd=new WeakMap,Tt=new WeakSet,f3=function(){var n,o;const t=Xe(this,Tt,hc).call(this);switch(t.getMajorType()){case 0:{const{unsignedInt:s,bytesRead:a}=Xe(n=Zr,Rn,dc).call(n,t,Xe(this,Tt,ca).call(this));return{bytesRead:a,signedInt:BigInt(s)}}case 1:{const{unsignedInt:s,bytesRead:a}=Xe(o=Zr,Rn,dc).call(o,t,Xe(this,Tt,ca).call(this));return{bytesRead:a,signedInt:BigInt(-1)-s}}default:throw new id(`Reader type mismatch, expected 0 or 1 but got ${t.getMajorType()}`)}},h3=function(t){if(Ae(this,jo).length-Ae(this,Oi)<t)throw new ua(sb)},d3=function(t){var c,h,f;const n=Xe(this,Tt,ca).call(this);let o=Nr.Buffer.from([]),s=0,a=1,l=Xe(c=Zr,Rn,Wb).call(c,n.slice(a),t);for(;l.getInitialByte()!==Os.IndefiniteLengthBreakByte;){const{length:p,bytesRead:y}=Xe(h=Zr,Rn,hd).call(h,l,n.slice(a)),g=y+Number(p);o=Nr.Buffer.concat([o,n.slice(a+(g-p),a+g)]),a+=g,l=Xe(f=Zr,Rn,Wb).call(f,n.slice(a),t)}return s=a+1,{encodingLength:s,val:new Uint8Array(o)}},fd=function(){++Ae(this,dr).itemsRead,ht(this,Mu,!1)},Rn=new WeakSet,Wb=function(t,n){Zr.ensureReadCapacityInArray(t,1);const o=Os.from(t[0]);if(o.getInitialByte()!==Os.IndefiniteLengthBreakByte&&o.getMajorType()!==n)throw new ua("Indefinite length string contains invalid data item");return o},p3=function(){var s;const t=Xe(this,Tt,hc).call(this,6),{unsignedInt:n,bytesRead:o}=Xe(s=Zr,Rn,dc).call(s,t,Xe(this,Tt,ca).call(this));return{bytesRead:o,tag:Number(n)}},hd=function(t,n){var a;const{unsignedInt:o,bytesRead:s}=Xe(a=Zr,Rn,dc).call(a,t,n);return{bytesRead:s,length:Number(o)}},hc=function(t){if(Ae(this,dr).definiteLength!==void 0&&Ae(this,dr).definiteLength-Ae(this,dr).itemsRead===0)throw new id("No more data items to read");if(Ae(this,Oi)===Ae(this,jo).length)throw Ae(this,dr).type===null&&Ae(this,dr).definiteLength===void 0&&Ae(this,Oi)>0?new id("End of root-level. No more data items to read"):new ua(sb);const n=Os.from(Ae(this,jo)[Ae(this,Oi)]);switch(Ae(this,dr).type){case 2:case 3:if(n.getInitialByte()===Os.IndefiniteLengthBreakByte||n.getMajorType()===Ae(this,dr).type&&n.getAdditionalInfo()!==31)break;throw new ua(`Indefinite length string contains invalid data item, ${n.getMajorType()}`)}if(t&&t!==n.getMajorType())throw new id(`Major type mismatch, expected type ${t} but got ${n.getMajorType()}`);return n},dc=function(t,n){if((t.getInitialByte()&Os.AdditionalInformationMask)<24)return{bytesRead:1,unsignedInt:BigInt(t.getAdditionalInfo())};switch(t.getAdditionalInfo()){case 24:return Zr.ensureReadCapacityInArray(n,2),{bytesRead:2,unsignedInt:BigInt(n[1])};case 25:{Zr.ensureReadCapacityInArray(n,3);const s=Nr.Buffer.from(n.slice(1)).readUInt16BE();return{bytesRead:3,unsignedInt:BigInt(s)}}case 26:{Zr.ensureReadCapacityInArray(n,5);const s=Nr.Buffer.from(n.slice(1)).readUInt32BE();return{bytesRead:5,unsignedInt:BigInt(s)}}case 27:{Zr.ensureReadCapacityInArray(n,9);const o=Nr.Buffer.from(n.slice(1,9));let s=BigInt(0);for(const a of o)s=(s<<BigInt(8))+BigInt(a);return{bytesRead:9,unsignedInt:s}}default:throw new ua("Invalid integer encoding")}},la=function(t){if(Ae(this,Oi)+t>Ae(this,jo).length)throw new ua("Buffer offset out of bounds");ht(this,Oi,Ae(this,Oi)+t),ht(this,Zd,0)},Xb=function(t,n){const o={currentKeyOffset:Ae(this,dr).currentKeyOffset,definiteLength:Ae(this,dr).definiteLength,frameOffset:Ae(this,dr).frameOffset,itemsRead:Ae(this,dr).itemsRead,type:Ae(this,dr).type};Ae(this,Jd).push(o),Ae(this,dr).type=t,Ae(this,dr).definiteLength=n,Ae(this,dr).itemsRead=0,Ae(this,dr).frameOffset=Ae(this,Oi),ht(this,Mu,!1),Ae(this,dr).currentKeyOffset=null},ca=function(){return Ae(this,jo).slice(Ae(this,Oi))},Et(Zr,Rn);let Vb=Zr;const Jq=l3("address");function Zq(e){return y3(ld.decode(e))}function y3(e){const t=new Vb(Nr.Buffer.from(e).toString("hex"));t.readStartArray(),t.readTag();const n=t.readByteString();if(Number(t.readInt())!==Xq(n))throw new Error(Jq);return!0}function eH(e){const t=Qb.bech32.decode(e,Number.MAX_SAFE_INTEGER/2),n=Qb.bech32.fromWords(t.words);if(!["addr","addr_test","stake","stake_test"].includes(t.prefix))return!1;switch(n[0]>>4){case 0:case 1:case 2:case 3:return n.length===57;case 4:case 5:{if(n.length<=29)return!1;let s=29;const a=Nr.Buffer.from(n),{bytesRead:l}=ab(a.subarray(s));s+=l;const{bytesRead:c}=ab(a.subarray(s));return s+=c,ab(a.subarray(s)),!0}case 6:case 7:return n.length===47;case 14:case 15:return n.length===47;case 8:return y3(new Uint8Array(n));default:throw new Error(Da("address"))}}const ab=e=>{let t=!0,n=0n,o=0;for(;t&&o<e.length;){const s=e[o];n<<=7n,n|=BigInt(s&127),t=(s&128)!==0,++o}return{bytesRead:o,value:n}};var Ir=(e=>(e[e.NONE=-1]="NONE",e[e.EVM=0]="EVM",e[e.CARDANO=1]="CARDANO",e[e.SUBSTRATE=2]="SUBSTRATE",e[e.ALGORAND=3]="ALGORAND",e[e.MINA=4]="MINA",e[e.MIDNIGHT=5]="MIDNIGHT",e[e.AVAIL=6]="AVAIL",e[e.POLKADOT=7]="POLKADOT",e))(Ir||{});function Di(e,t,n=()=>!0){try{return n(t(e))}catch{return!1}}ro("algorand-address",e=>Di(e,Nq));ro("algorand-blockhash",e=>Di(e,Dq));ro("algorand-txid",e=>Di(e,Pq));ro("mina-address",e=>Di(e,Hq));ro("mina-blockhash",e=>Di(e,Qq));ro("mina-txid",e=>Di(e,Gq));ro("cardano-address",e=>Di(e,Zq)||Di(e,eH));ro("ss58",e=>Di(e,lq.decode));ro("bs58check",e=>Di(e,zp.decode));ro("bech32",e=>Di(e,t=>Qb.bech32.decode(t,Number.MAX_SAFE_INTEGER/2)));function ln(e){return Ue.Transform(e).Decode(t=>t.toLowerCase()).Encode(t=>t.toLowerCase())}function FC(e){return Ue.Transform(e).Decode(t=>t.toUpperCase()).Encode(t=>t.toUpperCase())}const tn={Uint256:Ue.Transform(Ue.BigInt({maximum:115792089237316195423570985008687907853269984665640564039457584007913129639935n,minimum:0n})).Decode(e=>e.toString()).Encode(e=>BigInt(e)),Algorand:{BlockHash:Ue.Unsafe(Ue.String({format:"algorand-blockhash"})),TxHash:Ue.Unsafe(FC(Ue.String({format:"algorand-txid"}))),Address:Ue.Unsafe(FC(Ue.String({format:"algorand-address"})))},Substrate:{Address:Ue.Unsafe(Ue.String({format:"ss58"}))},Avail:{BlockHash:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:Ue.Unsafe(Ue.String({format:"ss58"}))},Cardano:{BlockHash:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{64}$/))),TxHash:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{64}$/))),Address:Ue.Unsafe(Ue.String({format:"cardano-address"})),Credential:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{64}$/))),PoolId:Ue.Unsafe(ln(Ue.String())),PolicyId:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{56}$/))),AssetName:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{64}$/))),Cip14Fingerprint:Ue.Unsafe(Ue.String()),AmountLovelace:Ue.Unsafe(Ue.RegExp(/^\d+$/))},Evm:{BlockHash:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),TxHash:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{40}$/))),Selector:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{8}$/))),FullSelector:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),Signature:Ue.Unsafe(Ue.RegExp(/^0x[a-fA-F0-9]{130}$/)),PrivateKey:Ue.Unsafe(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))},Midnight:{BlockHash:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),TxHash:Ue.Unsafe(ln(Ue.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:Ue.Unsafe(ln(Ue.RegExp(/^[a-fA-F0-9]{181}$/)))},Mina:{BlockHash:Ue.Unsafe(Ue.String({format:"mina-blockhash"})),TxHash:Ue.Unsafe(Ue.String({format:"mina-txid"})),Address:Ue.Unsafe(Ue.String({format:"mina-address"}))},Polkadot:{BlockHash:Ue.Unsafe(Ue.String({format:"mina-blockhash"})),TxHash:Ue.Unsafe(Ue.String({format:"mina-txid"})),Address:Ue.Unsafe(Ue.String({format:"mina-address"}))},Caip2:Ue.Unsafe(Ue.String()),TimestampMsStr:Ue.Unsafe(Ue.RegExp(/^\d+$/)),UnknownFormat:Ue.Unsafe(Ue.String()),Lowercase:ln(Ue.String()),TrueOrFalse:Ue.Transform(Ue.Union([Ue.Literal("T"),Ue.Literal("F")])).Decode(e=>e==="T").Encode(e=>e?"T":"F"),EvmAbiEvent:Ue.Unsafe(Ue.Any())},tH={[-1]:Ue.Literal("0x0"),0:tn.Evm.Address,1:tn.Cardano.Address,2:tn.Substrate.Address,6:tn.Avail.Address,3:tn.Algorand.Address,4:tn.Mina.Address,5:tn.Midnight.Address,7:tn.Polkadot.Address};Ue.Object({type:Ue.Literal(-1),address:Ue.Literal("0x0")}),Ue.Object({type:Ue.Literal(0),address:tn.Evm.Address}),Ue.Object({type:Ue.Literal(1),address:tn.Cardano.Address}),Ue.Object({type:Ue.Literal(2),address:tn.Substrate.Address}),Ue.Object({type:Ue.Literal(6),address:tn.Avail.Address}),Ue.Object({type:Ue.Literal(3),address:tn.Algorand.Address}),Ue.Object({type:Ue.Literal(4),address:tn.Mina.Address}),Ue.Object({type:Ue.Literal(5),address:tn.Midnight.Address}),Ue.Object({type:Ue.Literal(7),address:tn.Polkadot.Address});function Ev(e){return Object.fromEntries(Object.entries(e).map(([n,o])=>{const s=o.map(([l,c])=>c),a=Ue.Tuple([Ue.Literal(n),...s]);return[n,a]}))}function Io(e){return["userAddress",tH[e]]}const _o=[["userSignature",Ue.String()],["conciseInput",Ue.String()],["millisecondTimestamp",Ue.String()]],rH={[`${Ir.NONE}`]:[Io(Ir.NONE),..._o],[`${Ir.EVM}`]:[Io(Ir.EVM),..._o],[`${Ir.CARDANO}`]:[Io(Ir.CARDANO),..._o],[`${Ir.SUBSTRATE}`]:[Io(Ir.SUBSTRATE),..._o],[`${Ir.AVAIL}`]:[Io(Ir.AVAIL),..._o],[`${Ir.ALGORAND}`]:[Io(Ir.ALGORAND),..._o],[`${Ir.MINA}`]:[Io(Ir.MINA),..._o],[`${Ir.MIDNIGHT}`]:[Io(Ir.MIDNIGHT),..._o],[`${Ir.POLKADOT}`]:[Io(Ir.POLKADOT),..._o]};Ev(rH);const nH={batcherInput:"&B"},iH={[nH.batcherInput]:[["input",Ue.Array(Ue.String())]]};Ev(iH);const ub={createAccount:"&createAccount",linkAddress:"&linkAddress",unlinkAddress:"&unlinkAddress"},oH={[ub.createAccount]:[],[ub.linkAddress]:[["account_id",Ue.Number()],["signature_from_primary",Ue.String()],["primary_address_type",Ue.Number()],["new_address",Ue.String()],["signature_from_new_address",Ue.String()],["new_address_type",Ue.Number()],["is_new_primary",Ue.Boolean()]],[ub.unlinkAddress]:[["account_id",Ue.Number()],["signature_from_primary",Ue.String()],["primary_address_type",Ue.Number()],["target_address",Ue.String()],["target_address_type",Ue.Number()],["new_primary_address",Ue.String()],["new_primary_address_type",Ue.Number()]]};Ev(oH);var lb={exports:{}},OC;function sH(){return OC||(OC=1,(function(e){(function(){var t="input is invalid type",n="finalize already called",o=typeof window=="object",s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&typeof self=="object",l=!s.JS_SHA3_NO_NODE_JS&&typeof jt=="object"&&jt.versions&&jt.versions.node;l?s=af:a&&(s=self);for(var c=!s.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,h=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),p=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],g=[1,256,65536,16777216],b=[6,1536,393216,100663296],w=[0,8,16,24],F=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],I=[224,256,384,512],R=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136},M=s.JS_SHA3_NO_NODE_JS||!Array.isArray?function(O){return Object.prototype.toString.call(O)==="[object Array]"}:Array.isArray,T=h&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)?function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer}:ArrayBuffer.isView,z=function(O){var H=typeof O;if(H==="string")return[O,!0];if(H!=="object"||O===null)throw new Error(t);if(h&&O.constructor===ArrayBuffer)return[new Uint8Array(O),!1];if(!M(O)&&!T(O))throw new Error(t);return[O,!1]},L=function(O){return z(O)[0].length===0},k=function(O){for(var H=[],Y=0;Y<O.length;++Y)H[Y]=O[Y];return H},j=function(O,H,Y){return function(se){return new ue(O,H,O).update(se)[Y]()}},U=function(O,H,Y){return function(se,pe){return new ue(O,H,pe).update(se)[Y]()}},$=function(O,H,Y){return function(se,pe,te,_){return le["cshake"+O].update(se,pe,te,_)[Y]()}},N=function(O,H,Y){return function(se,pe,te,_){return le["kmac"+O].update(se,pe,te,_)[Y]()}},Z=function(O,H,Y,se){for(var pe=0;pe<A.length;++pe){var te=A[pe];O[te]=H(Y,se,te)}return O},re=function(O,H){var Y=j(O,H,"hex");return Y.create=function(){return new ue(O,H,O)},Y.update=function(se){return Y.create().update(se)},Z(Y,j,O,H)},ie=function(O,H){var Y=U(O,H,"hex");return Y.create=function(se){return new ue(O,H,se)},Y.update=function(se,pe){return Y.create(pe).update(se)},Z(Y,U,O,H)},X=function(O,H){var Y=E[O],se=$(O,H,"hex");return se.create=function(pe,te,_){return L(te)&&L(_)?le["shake"+O].create(pe):new ue(O,H,pe).bytepad([te,_],Y)},se.update=function(pe,te,_,v){return se.create(te,_,v).update(pe)},Z(se,$,O,H)},ae=function(O,H){var Y=E[O],se=N(O,H,"hex");return se.create=function(pe,te,_){return new ne(O,H,te).bytepad(["KMAC",_],Y).bytepad([pe],Y)},se.update=function(pe,te,_,v){return se.create(pe,_,v).update(te)},Z(se,N,O,H)},ye=[{name:"keccak",padding:g,bits:I,createMethod:re},{name:"sha3",padding:b,bits:I,createMethod:re},{name:"shake",padding:p,bits:R,createMethod:ie},{name:"cshake",padding:y,bits:R,createMethod:X},{name:"kmac",padding:y,bits:R,createMethod:ae}],le={},ee=[],G=0;G<ye.length;++G)for(var Q=ye[G],K=Q.bits,W=0;W<K.length;++W){var q=Q.name+"_"+K[W];if(ee.push(q),le[q]=Q.createMethod(K[W],Q.padding),Q.name!=="sha3"){var fe=Q.name+K[W];ee.push(fe),le[fe]=le[q]}}function ue(O,H,Y){this.blocks=[],this.s=[],this.padding=H,this.outputBits=Y,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(O<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Y>>5,this.extraBytes=(Y&31)>>3;for(var se=0;se<50;++se)this.s[se]=0}ue.prototype.update=function(O){if(this.finalized)throw new Error(n);var H=z(O);O=H[0];for(var Y=H[1],se=this.blocks,pe=this.byteCount,te=O.length,_=this.blockCount,v=0,C=this.s,P,he;v<te;){if(this.reset)for(this.reset=!1,se[0]=this.block,P=1;P<_+1;++P)se[P]=0;if(Y)for(P=this.start;v<te&&P<pe;++v)he=O.charCodeAt(v),he<128?se[P>>2]|=he<<w[P++&3]:he<2048?(se[P>>2]|=(192|he>>6)<<w[P++&3],se[P>>2]|=(128|he&63)<<w[P++&3]):he<55296||he>=57344?(se[P>>2]|=(224|he>>12)<<w[P++&3],se[P>>2]|=(128|he>>6&63)<<w[P++&3],se[P>>2]|=(128|he&63)<<w[P++&3]):(he=65536+((he&1023)<<10|O.charCodeAt(++v)&1023),se[P>>2]|=(240|he>>18)<<w[P++&3],se[P>>2]|=(128|he>>12&63)<<w[P++&3],se[P>>2]|=(128|he>>6&63)<<w[P++&3],se[P>>2]|=(128|he&63)<<w[P++&3]);else for(P=this.start;v<te&&P<pe;++v)se[P>>2]|=O[v]<<w[P++&3];if(this.lastByteIndex=P,P>=pe){for(this.start=P-pe,this.block=se[_],P=0;P<_;++P)C[P]^=se[P];J(C),this.reset=!0}else this.start=P}return this},ue.prototype.encode=function(O,H){var Y=O&255,se=1,pe=[Y];for(O=O>>8,Y=O&255;Y>0;)pe.unshift(Y),O=O>>8,Y=O&255,++se;return H?pe.push(se):pe.unshift(se),this.update(pe),pe.length},ue.prototype.encodeString=function(O){var H=z(O);O=H[0];var Y=H[1],se=0,pe=O.length;if(Y)for(var te=0;te<O.length;++te){var _=O.charCodeAt(te);_<128?se+=1:_<2048?se+=2:_<55296||_>=57344?se+=3:(_=65536+((_&1023)<<10|O.charCodeAt(++te)&1023),se+=4)}else se=pe;return se+=this.encode(se*8),this.update(O),se},ue.prototype.bytepad=function(O,H){for(var Y=this.encode(H),se=0;se<O.length;++se)Y+=this.encodeString(O[se]);var pe=(H-Y%H)%H,te=[];return te.length=pe,this.update(te),this},ue.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var O=this.blocks,H=this.lastByteIndex,Y=this.blockCount,se=this.s;if(O[H>>2]|=this.padding[H&3],this.lastByteIndex===this.byteCount)for(O[0]=O[Y],H=1;H<Y+1;++H)O[H]=0;for(O[Y-1]|=2147483648,H=0;H<Y;++H)se[H]^=O[H];J(se)}},ue.prototype.toString=ue.prototype.hex=function(){this.finalize();for(var O=this.blockCount,H=this.s,Y=this.outputBlocks,se=this.extraBytes,pe=0,te=0,_="",v;te<Y;){for(pe=0;pe<O&&te<Y;++pe,++te)v=H[pe],_+=f[v>>4&15]+f[v&15]+f[v>>12&15]+f[v>>8&15]+f[v>>20&15]+f[v>>16&15]+f[v>>28&15]+f[v>>24&15];te%O===0&&(H=k(H),J(H),pe=0)}return se&&(v=H[pe],_+=f[v>>4&15]+f[v&15],se>1&&(_+=f[v>>12&15]+f[v>>8&15]),se>2&&(_+=f[v>>20&15]+f[v>>16&15])),_},ue.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,H=this.s,Y=this.outputBlocks,se=this.extraBytes,pe=0,te=0,_=this.outputBits>>3,v;se?v=new ArrayBuffer(Y+1<<2):v=new ArrayBuffer(_);for(var C=new Uint32Array(v);te<Y;){for(pe=0;pe<O&&te<Y;++pe,++te)C[te]=H[pe];te%O===0&&(H=k(H),J(H))}return se&&(C[te]=H[pe],v=v.slice(0,_)),v},ue.prototype.buffer=ue.prototype.arrayBuffer,ue.prototype.digest=ue.prototype.array=function(){this.finalize();for(var O=this.blockCount,H=this.s,Y=this.outputBlocks,se=this.extraBytes,pe=0,te=0,_=[],v,C;te<Y;){for(pe=0;pe<O&&te<Y;++pe,++te)v=te<<2,C=H[pe],_[v]=C&255,_[v+1]=C>>8&255,_[v+2]=C>>16&255,_[v+3]=C>>24&255;te%O===0&&(H=k(H),J(H))}return se&&(v=te<<2,C=H[pe],_[v]=C&255,se>1&&(_[v+1]=C>>8&255),se>2&&(_[v+2]=C>>16&255)),_};function ne(O,H,Y){ue.call(this,O,H,Y)}ne.prototype=new ue,ne.prototype.finalize=function(){return this.encode(this.outputBits,!0),ue.prototype.finalize.call(this)};var J=function(O){var H,Y,se,pe,te,_,v,C,P,he,ce,Se,Be,de,ve,x,B,D,oe,me,xe,Ce,we,Ie,He,Ke,We,et,gt,bt,lt,yt,tt,ft,dt,At,Jt,Ar,be,_e,Ye,Ze,st,qt,rr,Br,$n,Rr,Ht,nr,Mr,jr,gn,xn,kr,wr,Wo,xi,Ei,Li,Si,ur,qs;for(se=0;se<48;se+=2)pe=O[0]^O[10]^O[20]^O[30]^O[40],te=O[1]^O[11]^O[21]^O[31]^O[41],_=O[2]^O[12]^O[22]^O[32]^O[42],v=O[3]^O[13]^O[23]^O[33]^O[43],C=O[4]^O[14]^O[24]^O[34]^O[44],P=O[5]^O[15]^O[25]^O[35]^O[45],he=O[6]^O[16]^O[26]^O[36]^O[46],ce=O[7]^O[17]^O[27]^O[37]^O[47],Se=O[8]^O[18]^O[28]^O[38]^O[48],Be=O[9]^O[19]^O[29]^O[39]^O[49],H=Se^(_<<1|v>>>31),Y=Be^(v<<1|_>>>31),O[0]^=H,O[1]^=Y,O[10]^=H,O[11]^=Y,O[20]^=H,O[21]^=Y,O[30]^=H,O[31]^=Y,O[40]^=H,O[41]^=Y,H=pe^(C<<1|P>>>31),Y=te^(P<<1|C>>>31),O[2]^=H,O[3]^=Y,O[12]^=H,O[13]^=Y,O[22]^=H,O[23]^=Y,O[32]^=H,O[33]^=Y,O[42]^=H,O[43]^=Y,H=_^(he<<1|ce>>>31),Y=v^(ce<<1|he>>>31),O[4]^=H,O[5]^=Y,O[14]^=H,O[15]^=Y,O[24]^=H,O[25]^=Y,O[34]^=H,O[35]^=Y,O[44]^=H,O[45]^=Y,H=C^(Se<<1|Be>>>31),Y=P^(Be<<1|Se>>>31),O[6]^=H,O[7]^=Y,O[16]^=H,O[17]^=Y,O[26]^=H,O[27]^=Y,O[36]^=H,O[37]^=Y,O[46]^=H,O[47]^=Y,H=he^(pe<<1|te>>>31),Y=ce^(te<<1|pe>>>31),O[8]^=H,O[9]^=Y,O[18]^=H,O[19]^=Y,O[28]^=H,O[29]^=Y,O[38]^=H,O[39]^=Y,O[48]^=H,O[49]^=Y,de=O[0],ve=O[1],Br=O[11]<<4|O[10]>>>28,$n=O[10]<<4|O[11]>>>28,et=O[20]<<3|O[21]>>>29,gt=O[21]<<3|O[20]>>>29,Li=O[31]<<9|O[30]>>>23,Si=O[30]<<9|O[31]>>>23,Ze=O[40]<<18|O[41]>>>14,st=O[41]<<18|O[40]>>>14,ft=O[2]<<1|O[3]>>>31,dt=O[3]<<1|O[2]>>>31,x=O[13]<<12|O[12]>>>20,B=O[12]<<12|O[13]>>>20,Rr=O[22]<<10|O[23]>>>22,Ht=O[23]<<10|O[22]>>>22,bt=O[33]<<13|O[32]>>>19,lt=O[32]<<13|O[33]>>>19,ur=O[42]<<2|O[43]>>>30,qs=O[43]<<2|O[42]>>>30,xn=O[5]<<30|O[4]>>>2,kr=O[4]<<30|O[5]>>>2,At=O[14]<<6|O[15]>>>26,Jt=O[15]<<6|O[14]>>>26,D=O[25]<<11|O[24]>>>21,oe=O[24]<<11|O[25]>>>21,nr=O[34]<<15|O[35]>>>17,Mr=O[35]<<15|O[34]>>>17,yt=O[45]<<29|O[44]>>>3,tt=O[44]<<29|O[45]>>>3,Ie=O[6]<<28|O[7]>>>4,He=O[7]<<28|O[6]>>>4,wr=O[17]<<23|O[16]>>>9,Wo=O[16]<<23|O[17]>>>9,Ar=O[26]<<25|O[27]>>>7,be=O[27]<<25|O[26]>>>7,me=O[36]<<21|O[37]>>>11,xe=O[37]<<21|O[36]>>>11,jr=O[47]<<24|O[46]>>>8,gn=O[46]<<24|O[47]>>>8,qt=O[8]<<27|O[9]>>>5,rr=O[9]<<27|O[8]>>>5,Ke=O[18]<<20|O[19]>>>12,We=O[19]<<20|O[18]>>>12,xi=O[29]<<7|O[28]>>>25,Ei=O[28]<<7|O[29]>>>25,_e=O[38]<<8|O[39]>>>24,Ye=O[39]<<8|O[38]>>>24,Ce=O[48]<<14|O[49]>>>18,we=O[49]<<14|O[48]>>>18,O[0]=de^~x&D,O[1]=ve^~B&oe,O[10]=Ie^~Ke&et,O[11]=He^~We&gt,O[20]=ft^~At&Ar,O[21]=dt^~Jt&be,O[30]=qt^~Br&Rr,O[31]=rr^~$n&Ht,O[40]=xn^~wr&xi,O[41]=kr^~Wo&Ei,O[2]=x^~D&me,O[3]=B^~oe&xe,O[12]=Ke^~et&bt,O[13]=We^~gt&lt,O[22]=At^~Ar&_e,O[23]=Jt^~be&Ye,O[32]=Br^~Rr&nr,O[33]=$n^~Ht&Mr,O[42]=wr^~xi&Li,O[43]=Wo^~Ei&Si,O[4]=D^~me&Ce,O[5]=oe^~xe&we,O[14]=et^~bt&yt,O[15]=gt^~lt&tt,O[24]=Ar^~_e&Ze,O[25]=be^~Ye&st,O[34]=Rr^~nr&jr,O[35]=Ht^~Mr&gn,O[44]=xi^~Li&ur,O[45]=Ei^~Si&qs,O[6]=me^~Ce&de,O[7]=xe^~we&ve,O[16]=bt^~yt&Ie,O[17]=lt^~tt&He,O[26]=_e^~Ze&ft,O[27]=Ye^~st&dt,O[36]=nr^~jr&qt,O[37]=Mr^~gn&rr,O[46]=Li^~ur&xn,O[47]=Si^~qs&kr,O[8]=Ce^~de&x,O[9]=we^~ve&B,O[18]=yt^~Ie&Ke,O[19]=tt^~He&We,O[28]=Ze^~ft&At,O[29]=st^~dt&Jt,O[38]=jr^~qt&Br,O[39]=gn^~rr&$n,O[48]=ur^~xn&wr,O[49]=qs^~kr&Wo,O[0]^=F[se],O[1]^=F[se+1]};if(c)e.exports=le;else for(G=0;G<ee.length;++G)s[ee[G]]=le[ee[G]]})()})(lb)),lb.exports}var aH=sH();const g3=tp(aH),{keccak_256:ZG}=g3;function m3(e,t,n,o,s,a=void 0){let l;switch(o){case Ir.EVM:l=u9(tn.Evm.Address,n);break;default:throw new Error("NYI: Unsupported wallet address type: "+o)}return(""+(a??"")+t+l+s).replace(/[^a-zA-Z0-9]/g,"-").toLocaleLowerCase()}const uH={EVM:0};async function lH(e,t,n=void 0){const o=Ki(t.privateKey),s=Ac({account:o,chain:vc,transport:wc()}),a=Date.now().toString(),l=o.address,c=uH.EVM,h=m3(null,a,l,c,e,n),f=await s.signMessage({account:o,message:h});return{addressType:c,address:l,signature:f,input:e,timestamp:a,target:n}}async function cH(e){const t=await fetch(CT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}async function od(e,t,n=void 0){console.log("🚀 Creating signed input for:",e);const o=await lH(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await cH(o);return console.log("🎉 Batcher response:",s),s}function fH(){const[e,t]=Ve.useState([]),[n,o]=Ve.useState(!0),[s,a]=Ve.useState(null),[l,c]=Ve.useState(10),[h,f]=Ve.useState(0),[p,y]=Ve.useState([void 0]),[g,b]=Ve.useState(!1),[w,F]=Ve.useState([]),[I,R]=Ve.useState(null),[A,E]=Ve.useState([]),[M,T]=Ve.useState(!1),[z,L]=Ve.useState(!1),[k,j]=Ve.useState(!1),[U,$]=Ve.useState(""),[N,Z]=Ve.useState(""),[re,ie]=Ve.useState(""),[X,ae]=Ve.useState(null),[ye,le]=Ve.useState(null),ee=(te,_,v)=>{const C=Date.now(),P={id:C,type:te,title:_,message:v};E(he=>[...he,P]),setTimeout(()=>{E(he=>he.filter(ce=>ce.id!==C))},5e3)},G=te=>{E(_=>_.filter(v=>v.id!==te))},Q=()=>{const te=_O(),_=Ki(te),v={id:Date.now().toString(),privateKey:te,address:_.address,name:`Wallet ${w.length+1}`};F(C=>[...C,v]),R(v),ee("success","Wallet Generated",`New wallet created: ${_.address.slice(0,6)}...${_.address.slice(-4)}`)},K=te=>{F(_=>_.filter(v=>v.id!==te)),(I==null?void 0:I.id)===te&&R(null)},W=async()=>{if(!I){ee("error","No Wallet","Please select a wallet first");return}j(!0);try{const _=JSON.stringify(["&createAccount"]);await od(_,I),ee("success","Account Created","Successfully created account! Use the refresh button to see updated addresses.")}catch(te){ee("error","Create Account Error",`Error creating account: ${te instanceof Error?te.message:"Unknown error"}`)}finally{j(!1)}},q=async()=>{if(!I){ee("error","No Wallet","Please select a wallet first");return}if(!X){ee("error","No Account","Please select an account ID");return}j(!0);try{const te=["&unlinkAddress",X.toString(),"","",""],_=JSON.stringify(te);await od(_,I),ee("success","Self Unlinked","Successfully unlinked self from account! Use the refresh button to see updated addresses.")}catch(te){ee("error","Unlink Self Error",`Error unlinking self: ${te instanceof Error?te.message:"Unknown error"}`)}finally{j(!1)}},fe=async()=>{if(!I){ee("error","No Wallet","Please select a wallet first");return}if(!X){ee("error","No Account","Please select an account ID");return}if(!re.trim()){ee("error","No Address","Please enter an address to unlink");return}const te=Ac({account:Ki(I.privateKey),chain:vc,transport:wc()});j(!0);const _=`unlink:${String(X)}:${re.toString().toLowerCase().trim()}:`,v=await te.signMessage({account:Ki(I.privateKey),message:_});try{const C=["&unlinkAddress",X.toString(),v,re.toString().toLowerCase().trim(),""],P=JSON.stringify(C);await od(P,I),ee("success","Address Unlinked","Successfully unlinked address from account! Use the refresh button to see updated addresses."),ie("")}catch(C){ee("error","Unlink Other Error",`Error unlinking address: ${C instanceof Error?C.message:"Unknown error"}`)}finally{j(!1)}},ue=async()=>{if(!I){ee("error","No Wallet","Please select a wallet first");return}if(!X){ee("error","No Account","Please select an account ID");return}if(!ye){ee("error","No Link Wallet","Please select a wallet to link");return}j(!0);try{const te=Ac({account:Ki(I.privateKey),chain:vc,transport:wc()}),_=Ac({account:Ki(ye.privateKey),chain:vc,transport:wc()}),v=`link:${X}:${ye.address.toString().toLowerCase().trim()}:false`,C=await te.signMessage({account:Ki(I.privateKey),message:v}),P=`link:${X}:${I.address.toString().toLowerCase().trim()}:false`,he=await _.signMessage({account:Ki(ye.privateKey),message:P}),ce=["&linkAddress",X.toString(),C,ye.address.toString().toLowerCase().trim(),he,"false"],Se=JSON.stringify(ce);await od(Se,I),ee("success","Address Linked","Successfully linked address to account! Use the refresh button to see updated addresses."),le(null)}catch(te){ee("error","Link Address Error",`Error linking address: ${te instanceof Error?te.message:"Unknown error"}`)}finally{j(!1)}},ne=async()=>{try{o(!0),a(null);const te=new URL(JN);te.searchParams.set("limit",String(l));const _=p[h];_&&te.searchParams.set("after",_);const v=await fetch(te.toString());if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);const C=await v.json(),P=C.data??[];t(P),C.pagination&&(b(C.pagination.hasMore??!1),C.pagination.nextCursor&&p.length===h+1&&y(he=>[...he,C.pagination.nextCursor]))}catch(te){console.error("Error fetching addresses:",te),a(te instanceof Error?te.message:"Unknown error")}finally{o(!1)}};Ve.useEffect(()=>{ne()},[l,h]);const J=e.reduce((te,_)=>{const v=te.find(C=>C.account_id===_.account_id);return v?(v.addresses.includes(_.address)||v.addresses.push(_.address),_.primary_address&&(v.hasPrimaryAddress=!0,v.primaryAddress=_.primary_address)):te.push({account_id:_.account_id,addresses:[_.address],hasPrimaryAddress:!!_.primary_address,primaryAddress:_.primary_address}),te},[]),O=[...new Set(J.map(te=>te.account_id).filter(te=>te!==null))],H=te=>{c(Number(te.target.value)),f(0),y([void 0])},Y=()=>{g&&f(te=>te+1)},se=()=>{f(te=>Math.max(0,te-1))},pe=()=>{f(0)};return n?Ee.jsx("div",{className:"addresses-loading",children:Ee.jsx("div",{className:"loading-text",children:"Loading addresses..."})}):s?Ee.jsx("div",{className:"addresses-error",children:Ee.jsxs("div",{className:"error-text",children:["Error loading addresses: ",s]})}):Ee.jsxs("div",{className:"addresses-table-container",children:[Ee.jsx("div",{style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"flex",flexDirection:"column",gap:"10px"},children:A.map(te=>Ee.jsxs("div",{style:{background:te.type==="success"?"#10b981":te.type==="error"?"#ef4444":"#3b82f6",color:"white",padding:"12px 16px",borderRadius:"8px",minWidth:"300px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",display:"flex",justifyContent:"space-between",alignItems:"flex-start",animation:"slideIn 0.3s ease-out"},children:[Ee.jsxs("div",{children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:te.title}),Ee.jsx("div",{style:{fontSize:"14px",opacity:.9},children:te.message})]}),Ee.jsx("button",{type:"button",onClick:()=>G(te.id),style:{background:"none",border:"none",color:"white",cursor:"pointer",fontSize:"18px",padding:"0",marginLeft:"12px",opacity:.7},children:"×"})]},te.id))}),Ee.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#f8fafc"},children:[Ee.jsxs("div",{onClick:()=>T(!M),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:M?0:"20px"},children:[Ee.jsx("h3",{style:{margin:0,color:"#333"},children:"Wallet Management"}),Ee.jsx("span",{style:{fontSize:"18px",color:"#666",transform:M?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!M&&Ee.jsxs(Ee.Fragment,{children:[Ee.jsx("div",{style:{marginBottom:"20px"},children:Ee.jsx("button",{type:"button",onClick:Q,style:{padding:"10px 16px",background:"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:"pointer",fontWeight:"600",fontSize:"14px"},children:"Generate New EVM Wallet"})}),w.length>0&&Ee.jsxs("div",{style:{marginBottom:"20px"},children:[Ee.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:"Available Wallets:"}),Ee.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:w.map(te=>Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px",border:(I==null?void 0:I.id)===te.id?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:(I==null?void 0:I.id)===te.id?"#f0fdf4":"white"},children:[Ee.jsx("input",{type:"radio",name:"selectedWallet",checked:(I==null?void 0:I.id)===te.id,onChange:()=>R(te),style:{margin:0}}),Ee.jsx("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#666",flex:"1"},children:te.name}),Ee.jsx("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#666",flex:"2"},children:te.address}),Ee.jsx("button",{type:"button",onClick:()=>K(te.id),style:{padding:"4px 8px",background:"#ef4444",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:"Remove"})]},te.id))})]})]})]}),I&&Ee.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#fef7ff"},children:[Ee.jsxs("div",{onClick:()=>L(!z),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:z?0:"20px"},children:[Ee.jsx("h3",{style:{margin:0,color:"#333"},children:"Account Commands"}),Ee.jsx("span",{style:{fontSize:"18px",color:"#666",transform:z?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!z&&Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("div",{style:{marginBottom:"20px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"10px",fontWeight:"600",fontSize:"16px"},children:"What would you like to do?"}),Ee.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:U==="create"?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:U==="create"?"#f0fdf4":"white",cursor:"pointer"},onClick:()=>$("create"),children:[Ee.jsx("input",{type:"radio",name:"action",checked:U==="create",onChange:()=>$("create"),style:{margin:0}}),Ee.jsxs("div",{style:{flex:"1"},children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"1. Create new account"}),Ee.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Can only create if not linked to any account"})]})]}),Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:U==="link"?"2px solid #3b82f6":"1px solid #ddd",borderRadius:"6px",background:U==="link"?"#eff6ff":"white",cursor:"pointer"},onClick:()=>$("link"),children:[Ee.jsx("input",{type:"radio",name:"action",checked:U==="link",onChange:()=>$("link"),style:{margin:0}}),Ee.jsxs("div",{style:{flex:"1"},children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"2. Link Account"}),Ee.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Only Account Primary can do this Action"})]})]}),Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:U==="unlink-other"?"2px solid #f59e0b":"1px solid #ddd",borderRadius:"6px",background:U==="unlink-other"?"#fffbeb":"white",cursor:"pointer"},onClick:()=>$("unlink-other"),children:[Ee.jsx("input",{type:"radio",name:"action",checked:U==="unlink-other",onChange:()=>$("unlink-other"),style:{margin:0}}),Ee.jsxs("div",{style:{flex:"1"},children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"3. Unlink Account"}),Ee.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Only Account Primary can do this Action"})]})]}),Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:U==="unlink-self"?"2px solid #ef4444":"1px solid #ddd",borderRadius:"6px",background:U==="unlink-self"?"#fef2f2":"white",cursor:"pointer"},onClick:()=>$("unlink-self"),children:[Ee.jsx("input",{type:"radio",name:"action",checked:U==="unlink-self",onChange:()=>$("unlink-self"),style:{margin:0}}),Ee.jsxs("div",{style:{flex:"1"},children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"4. Unlink Self"}),Ee.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Unlink self from account"})]})]})]})]}),U&&Ee.jsxs("div",{style:{marginTop:"20px",padding:"20px",background:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0"},children:[U==="create"&&Ee.jsxs("div",{children:[Ee.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Create New Account"}),Ee.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"This will create a new account with your selected wallet as the primary address."}),Ee.jsx("button",{type:"button",onClick:W,disabled:k,style:{padding:"10px 20px",background:k?"#ccc":"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:k?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:k?"Creating...":"Create Account"})]}),U==="link"&&Ee.jsxs("div",{children:[Ee.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Link Account"}),Ee.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Link a wallet to an existing account. You must be the primary address of the account, and the wallet to link must have a private key."}),Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),Ee.jsxs("select",{value:X||"",onChange:te=>ae(te.target.value?parseInt(te.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[Ee.jsx("option",{value:"",children:"-- Select Account ID --"}),O.map(te=>Ee.jsxs("option",{value:te,children:["Account ",te]},te))]})]}),Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Wallet to Link:"}),Ee.jsxs("select",{value:(ye==null?void 0:ye.id)||"",onChange:te=>{const _=w.find(v=>v.id===te.target.value);le(_||null)},style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"300px"},children:[Ee.jsx("option",{value:"",children:"-- Select a wallet to link --"}),w.filter(te=>te.id!==(I==null?void 0:I.id)).map(te=>Ee.jsxs("option",{value:te.id,children:[te.name," (",te.address,")"]},te.id))]})]}),Ee.jsx("button",{type:"button",onClick:ue,disabled:k||!X||!ye,style:{padding:"10px 20px",background:k||!X||!ye?"#ccc":"linear-gradient(45deg, #3b82f6, #1e3a8a)",color:"white",border:"none",borderRadius:"6px",cursor:k||!X||!ye?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:k?"Linking...":"Link Wallet"})]}),U==="unlink-other"&&Ee.jsxs("div",{children:[Ee.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Unlink Account"}),Ee.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Unlink a specific address from an account. You must be the primary address of the account."}),Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),Ee.jsxs("select",{value:X||"",onChange:te=>ae(te.target.value?parseInt(te.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[Ee.jsx("option",{value:"",children:"-- Select Account ID --"}),O.map(te=>Ee.jsxs("option",{value:te,children:["Account ",te]},te))]})]}),Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Address to Unlink:"}),Ee.jsx("input",{type:"text",value:re,onChange:te=>ie(te.target.value),placeholder:"Enter address to unlink",style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"300px"}})]}),Ee.jsx("button",{type:"button",onClick:fe,disabled:k||!X||!re.trim(),style:{padding:"10px 20px",background:k||!X||!re.trim()?"#ccc":"linear-gradient(45deg, #f59e0b, #92400e)",color:"white",border:"none",borderRadius:"6px",cursor:k||!X||!re.trim()?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:k?"Unlinking...":"Unlink Address"})]}),U==="unlink-self"&&Ee.jsxs("div",{children:[Ee.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Unlink Self"}),Ee.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Unlink yourself from an account. This will remove your address from the account."}),Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),Ee.jsxs("select",{value:X||"",onChange:te=>ae(te.target.value?parseInt(te.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[Ee.jsx("option",{value:"",children:"-- Select Account ID --"}),O.map(te=>Ee.jsxs("option",{value:te,children:["Account ",te]},te))]})]}),Ee.jsx("button",{type:"button",onClick:q,disabled:k||!X,style:{padding:"10px 20px",background:k||!X?"#ccc":"linear-gradient(45deg, #ef4444, #7f1d1d)",color:"white",border:"none",borderRadius:"6px",cursor:k||!X?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:k?"Unlinking...":"Unlink Self"})]})]})]})]}),Ee.jsxs("div",{className:"addresses-table-wrapper",children:[Ee.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"15px"},children:[Ee.jsx("h3",{style:{margin:0,color:"#333"},children:"Addresses"}),Ee.jsx("div",{className:"table-controls",children:Ee.jsxs("label",{children:["Rows per page:",Ee.jsxs("select",{value:l,onChange:H,children:[Ee.jsx("option",{value:10,children:"10"}),Ee.jsx("option",{value:20,children:"20"}),Ee.jsx("option",{value:50,children:"50"})]})]})})]}),n&&Ee.jsx("p",{children:"Loading..."}),s&&Ee.jsx("p",{className:"error",children:s}),!n&&!s&&Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("table",{className:"addresses-table",children:[Ee.jsx("thead",{children:Ee.jsxs("tr",{children:[Ee.jsx("th",{children:"Account ID"}),Ee.jsx("th",{children:"Addresses"})]})}),Ee.jsx("tbody",{children:J.map((te,_)=>Ee.jsxs("tr",{className:te.hasPrimaryAddress?"has-primary-address":"",children:[Ee.jsx("td",{className:"account-id-cell",children:Ee.jsx("div",{className:"account-id-content",children:te.account_id??"No Account ID"})}),Ee.jsx("td",{className:"addresses-cell",children:te.addresses.map((v,C)=>Ee.jsxs("div",{className:`address-item ${v===te.primaryAddress?"primary-address":""}`,title:v===te.primaryAddress?`${v} (Primary)`:v,children:[v,v===te.primaryAddress&&Ee.jsx("span",{className:"primary-badge",children:"Primary"})]},v))})]},te.account_id??`null-${_}`))})]}),Ee.jsxs("div",{className:"pagination-controls",children:[Ee.jsx("button",{type:"button",onClick:pe,disabled:h===0,children:"First"}),Ee.jsx("button",{type:"button",onClick:se,disabled:h===0,children:"Previous"}),Ee.jsx("button",{type:"button",onClick:Y,disabled:!g||e.length<l,children:"Next"})]})]})]}),J.length===0&&Ee.jsx("div",{className:"no-addresses",children:Ee.jsx("div",{className:"no-data-text",children:"No addresses found"})}),Ee.jsx("style",{children:`
132
+ @keyframes slideIn {
133
+ from {
134
+ transform: translateX(100%);
135
+ opacity: 0;
136
+ }
137
+ to {
138
+ transform: translateX(0);
139
+ opacity: 1;
140
+ }
141
+ }
142
+ `})]})}function cb({latestBlock:e,isConnected:t}){const[n,o]=Ve.useState(!1),[s,a]=Ve.useState(!1),[l,c]=Ve.useState(!1),[h,f]=Ve.useState(!1),p=()=>{o(!0)},y=()=>{o(!1)},g=()=>{a(!0)},b=()=>{a(!1)},w=()=>{c(!0)},F=()=>{c(!1)},I=()=>{f(!0)},R=()=>{f(!1)};return Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("header",{className:"header",children:[Ee.jsx("h1",{className:"title",children:"Paima Explorer"}),Ee.jsxs("div",{className:"header-right",children:[Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:p,children:"Batcher API"}),Ee.jsx("button",{type:"button",className:"node-api-button",onClick:g,children:"Paima Engine Node API"}),Ee.jsx("button",{type:"button",className:"documentation-button",onClick:w,children:"Documentation"}),Ee.jsx("button",{type:"button",className:"addresses-button",onClick:I,children:"Addresses"}),Ee.jsxs("div",{className:"block-info",children:[Ee.jsx("span",{children:"Latest Block:"}),Ee.jsx("span",{id:"latest-block",style:{backgroundColor:t?"rgba(76, 175, 80, 0.1)":"rgba(244, 67, 54, 0.1)",color:t?"#4caf50":"#f44336"},children:t?e.toLocaleString():"Connection Error"})]})]})]}),Ee.jsx(cc,{isOpen:n,onClose:y,title:"Batcher API Documentation",className:"api",url:xI,children:Ee.jsx("div",{className:"documentation-content",children:Ee.jsx("iframe",{src:xI,className:"documentation-iframe",title:"Batcher API Documentation"})})}),Ee.jsx(cc,{isOpen:s,onClose:b,title:"Paima Engine Node API Documentation",className:"api",url:EI,children:Ee.jsx("div",{className:"documentation-content",children:Ee.jsx("iframe",{src:EI,className:"documentation-iframe",title:"Paima Engine Node API Documentation"})})}),Ee.jsx(cc,{className:"docs",isOpen:l,onClose:F,title:"Documentation",url:SI,children:Ee.jsx("div",{className:"documentation-content",children:Ee.jsx("iframe",{src:SI,className:"documentation-iframe",title:"Documentation"})})}),Ee.jsx(cc,{className:"addresses",isOpen:h,onClose:R,title:"Addresses",children:Ee.jsx(fH,{})})]})}function hH(e){return e.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function dH({block:e,isNew:t=!1}){const[n,o]=Ve.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e.hash),o(!0),setTimeout(()=>o(!1),300),console.log(`📋 Copied to clipboard: ${e.hash}`)}catch(a){console.error("Failed to copy to clipboard:",a)}};return Ee.jsxs("div",{className:`block-item ${t?"new-block":""}`,onClick:s,style:{backgroundColor:n?"rgba(76, 175, 80, 0.2)":void 0,cursor:"pointer"},children:[Ee.jsxs("div",{className:"block-header",children:[Ee.jsxs("div",{className:"block-number",children:["Block #",e.number.toLocaleString()]}),Ee.jsx("div",{className:"block-timestamp",children:hH(e.timestamp)})]}),Ee.jsx("div",{className:"block-hash",children:e.hash})]})}function pH({title:e,blockTime:t,blocks:n,isMainColumn:o=!1,newBlockIndex:s}){const a=n.filter((l,c,h)=>c===h.findIndex(f=>f.number===l.number&&f.hash===l.hash));return Ee.jsxs("div",{className:`row ${o?"main-row":""}`,children:[Ee.jsxs("h2",{className:"row-title",children:[e,t?` - Block Time: ${t}`:""]}),Ee.jsx("div",{className:"blocks-list",children:a.length===0?Ee.jsx("div",{className:"block-item placeholder",children:"No Blocks Fetched"}):a.map((l,c)=>Ee.jsx(dH,{block:l,isNew:s===c},`${c}-${l.number}-${l.hash}`))})]})}function yH(e,t){if(t.blockTime)return`${t.blockTime/1e3}s`}function TC({chainConfigs:e,newBlockIndices:t}){return Ee.jsx("div",{className:"rows-container",children:Object.entries(e).map(([n,o])=>{const a=(o.type||"").toUpperCase()==="CARDANO"?[]:o.blocks;return Ee.jsx(pH,{title:o.name,blockTime:yH(n,o),blocks:a,isMainColumn:n==="paima",newBlockIndex:t[n]},n)})})}function gH(e,t){if(e==null)return"";if(t==="inputs"&&typeof e=="string")try{const n=JSON.parse(e);return`<code style="font-size: 0.75em; background: rgba(0,0,0,0.1); padding: 4px 6px; border-radius: 3px; display: block; white-space: pre-wrap; max-height: 80px; overflow-y: auto;">${JSON.stringify(n,null,1).replace(/\n/g,"<br>")}</code>`}catch{return e.toString()}if(typeof e=="string"&&e.startsWith("0x")&&e.length===42)return`<span class="address-cell" style="overflow: hidden; text-overflow: ellipsis;" title="${e}">${e}</span>`;if(typeof e=="string"&&/^\d+$/.test(e)&&e.length>10){const n=BigInt(e);return t&&t.toLowerCase().includes("balance")?`${(Number(n)/Math.pow(10,18)).toFixed(6)} ETH`:n.toString()}return e.toString()}function mH({title:e,data:t,pagination:n,onPrev:o,onNext:s,onFirst:a,onLimitChange:l}){const c=t&&t.rows&&t.fields&&t.rows.length>0,h=(t==null?void 0:t.fields)||[],f=(t==null?void 0:t.rows)||[],p=!!n&&n.hasMore&&f.length>=n.limit,y=!!n&&n.currentPage>0,g=!n||!y&&!p;return Ee.jsxs("div",{className:`primitive-table-container ${f.length>6?"has-scroll":""}`,children:[Ee.jsx("h3",{className:"primitive-table-title",children:e}),c?Ee.jsxs("table",{className:"primitive-table",children:[Ee.jsx("thead",{children:Ee.jsx("tr",{children:h.map(b=>Ee.jsx("th",{children:b.name.replace(/_/g," ").toUpperCase()},b.name))})}),Ee.jsx("tbody",{children:f.slice().reverse().map((b,w)=>Ee.jsx("tr",{children:h.map(F=>{const I=b[F.name],R=gH(I,F.name),A=I?I.toString():"";return Ee.jsx("td",{dangerouslySetInnerHTML:{__html:R},title:A.length>30?A:void 0},F.name)})},w))})]}):Ee.jsx("div",{className:"table-error",children:"No data available"}),n&&!g&&Ee.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:8},children:Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[Ee.jsx("button",{type:"button",onClick:a,disabled:!y,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:y?"white":"#f3f4f6",cursor:y?"pointer":"not-allowed"},children:"First"}),Ee.jsx("button",{type:"button",onClick:o,disabled:!y,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:y?"white":"#f3f4f6",cursor:y?"pointer":"not-allowed"},children:"Prev"}),Ee.jsx("button",{type:"button",onClick:s,disabled:!p,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:p?"white":"#f3f4f6",cursor:p?"pointer":"not-allowed"},children:"Next"})]})})]})}function fb({title:e,tables:t,isLoading:n=!1,children:o,pagination:s,onPrev:a,onNext:l,onFirst:c,onLimitChange:h}){const f=Object.entries(t);return Ee.jsxs("div",{className:"tables-section",children:[Ee.jsx("h2",{className:"section-title",children:e}),o,Ee.jsx("div",{className:"primitive-tables",children:f.length===0?Ee.jsxs("div",{className:"table-error",children:["No ",e.toLowerCase()," configured"]}):f.map(([p,y])=>Ee.jsx(mH,{title:p,data:y,pagination:s==null?void 0:s[p],onPrev:a?()=>a(p):void 0,onNext:l?()=>l(p):void 0,onFirst:c?()=>c(p):void 0,onLimitChange:h?g=>h(p,g):void 0},p))})]})}const bH={EVM:0};async function AH(e,t,n=void 0){const o=Ki(t.privateKey),s=Ac({account:o,chain:vc,transport:wc()}),a=Date.now().toString(),l=o.address,c=bH.EVM,h=m3(null,a,l,c,e,n),f=await s.signMessage({message:h});return{addressType:c,address:l,signature:f,input:e,timestamp:a,target:n}}async function wH(e){const t=await fetch(CT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}async function vH(e,t,n=void 0){console.log("🚀 Creating signed input for:",e);const o=await AH(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await wH(o);return console.log("🎉 Batcher response:",s),s}async function xH(){try{const e=await fetch(YN);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.json()}catch(e){throw console.error("Error fetching grammar:",e),e}}function EH(){const[e,t]=Ve.useState(""),[n,o]=Ve.useState({}),[s,a]=Ve.useState(!1),[l,c]=Ve.useState(null),[h,f]=Ve.useState([]),[p,y]=Ve.useState(!0),[g,b]=Ve.useState({}),[w,F]=Ve.useState(!0),[I,R]=Ve.useState(void 0),A=($,N,Z)=>{const re=Date.now(),ie={id:re,type:$,title:N,message:Z};f(X=>[...X,ie]),setTimeout(()=>{f(X=>X.filter(ae=>ae.id!==re))},5e3)};Ve.useEffect(()=>{(async()=>{try{F(!0);const N=await xH();b(N)}catch{A("error","Grammar Error","Failed to load grammar from server")}finally{F(!1)}})()},[]);const E=Object.keys(g),M=()=>{const $=_O(),N=Ki($),Z={privateKey:$,address:N.address};c(Z),A("success","Wallet Generated",`New wallet created: ${N.address.slice(0,6)}...${N.address.slice(-4)}`)},T=$=>{f(N=>N.filter(Z=>Z.id!==$))},z=$=>{t($),o({})},L=($,N)=>{o(Z=>({...Z,[$]:N}))},k=()=>{if(!e)return null;const $=[e],N=g[e];for(const[Z,re]of N){const ie=n[Z];if(ie!==void 0&&ie!=="")if(re.type==="integer")$.push(parseInt(ie)||0);else if(re.type==="object")try{$.push(typeof ie=="string"?JSON.parse(ie):ie)}catch{$.push(ie)}else $.push(ie)}return $},j=($,N)=>{const Z=n[$]||"";return N.type==="integer"?Ee.jsx("input",{type:"number",value:Z,onChange:re=>L($,re.target.value),placeholder:`Enter ${$}`,style:{padding:"8px",border:"1px solid #ccc",borderRadius:"4px",width:"200px"}}):N.type==="string"?Ee.jsx("input",{type:"text",value:Z,onChange:re=>L($,re.target.value),placeholder:`Enter ${$}`,style:{padding:"8px",border:"1px solid #ccc",borderRadius:"4px",width:"200px"}}):N.type==="object"?Ee.jsx("textarea",{value:typeof Z=="string"?Z:JSON.stringify(Z,null,2),onChange:re=>L($,re.target.value),placeholder:`Enter ${$} as JSON object`,rows:3,style:{padding:"8px",border:"1px solid #ccc",borderRadius:"4px",width:"300px",fontFamily:"monospace"}}):Ee.jsx("input",{type:"text",value:Z,onChange:re=>L($,re.target.value),placeholder:`Enter ${$}`,style:{padding:"8px",border:"1px solid #ccc",borderRadius:"4px",width:"200px"}})},U=async()=>{if(!e){A("error","Missing Type","Please select a type");return}if(!l){A("error","No Wallet","Please generate a wallet first");return}const $=k();if(!$){A("error","Invalid Input","Failed to build JSON array");return}a(!0);try{const N=JSON.stringify($);await vH(N,l,I),A("success","Success!","Successfully sent to batcher! Check console for details."),o({})}catch(N){A("error","Batcher Error",`Error sending to batcher: ${N instanceof Error?N.message:"Unknown error"}`)}finally{a(!1)}};return Ee.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",position:"relative"},children:[Ee.jsx("div",{style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"flex",flexDirection:"column",gap:"10px"},children:h.map($=>Ee.jsxs("div",{style:{background:$.type==="success"?"#10b981":$.type==="error"?"#ef4444":"#3b82f6",color:"white",padding:"12px 16px",borderRadius:"8px",minWidth:"300px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",display:"flex",justifyContent:"space-between",alignItems:"flex-start",animation:"slideIn 0.3s ease-out"},children:[Ee.jsxs("div",{children:[Ee.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:$.title}),Ee.jsx("div",{style:{fontSize:"14px",opacity:.9},children:$.message})]}),Ee.jsx("button",{onClick:()=>T($.id),style:{background:"none",border:"none",color:"white",cursor:"pointer",fontSize:"18px",padding:"0",marginLeft:"12px",opacity:.7},children:"×"})]},$.id))}),Ee.jsxs("div",{onClick:()=>y(!p),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginTop:0,marginBottom:p?0:"20px"},children:[Ee.jsx("h3",{style:{margin:0,color:"#333"},children:"Batcher Input"}),Ee.jsx("span",{style:{fontSize:"18px",color:"#666",transform:p?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!p&&Ee.jsxs(Ee.Fragment,{children:[w&&Ee.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"40px",color:"#666"},children:Ee.jsxs("div",{style:{textAlign:"center"},children:[Ee.jsx("div",{style:{fontSize:"16px",marginBottom:"10px"},children:"Loading grammar..."}),Ee.jsx("div",{style:{fontSize:"14px",opacity:.8},children:"Fetching available input types from server"})]})}),!w&&Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",padding:"15px",background:"#f8fafc",borderRadius:"6px",border:"1px solid #e2e8f0"},children:[Ee.jsx("button",{onClick:M,style:{padding:"10px 16px",background:"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:"pointer",fontWeight:"600",fontSize:"14px"},children:"Generate new EVM Wallet"}),Ee.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[Ee.jsx("span",{style:{fontSize:"14px",color:"#64748b",fontWeight:"500"},children:"Current Address:"}),Ee.jsx("span",{style:{fontSize:"14px",fontFamily:"monospace",background:l?"#e0f2fe":"#fef3c7",padding:"4px 8px",borderRadius:"4px",color:l?"#0369a1":"#92400e",border:`1px solid ${l?"#bae6fd":"#fde68a"}`},children:l?`${l.address.slice(0,6)}...${l.address.slice(-4)}`:"No wallet generated"})]})]}),Ee.jsxs("div",{style:{display:"flex",gap:"30px",alignItems:"flex-start"},children:[Ee.jsx("div",{style:{flex:"0 0 300px"},children:Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"25px",fontWeight:"600"},children:"Select Type:"}),Ee.jsxs("select",{value:e,onChange:$=>z($.target.value),disabled:s,style:{padding:"8px",border:"2px solid #19b17b",borderRadius:"4px",width:"100%"},children:[Ee.jsx("option",{value:"",children:"-- Select a type --"}),E.map($=>Ee.jsx("option",{value:$,children:$.charAt(0).toUpperCase()+$.slice(1)},$))]})]})}),e&&Ee.jsx("div",{style:{flex:"1",minWidth:"0"},children:Ee.jsxs("div",{style:{marginBottom:"15px"},children:[Ee.jsxs("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:["Parameters for ",e,":"]}),Ee.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"15px",alignItems:"flex-end"},children:g[e].map(([$,N])=>Ee.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[Ee.jsxs("label",{style:{marginBottom:"5px",fontWeight:"500",fontSize:"14px"},children:[$," (",N.type,"):"]}),j($,N)]},$))})]})})]}),e&&Ee.jsxs("div",{style:{marginTop:"20px",marginBottom:"15px"},children:[Ee.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"500"},children:"Preview JSON Array:"}),Ee.jsx("pre",{style:{background:"#f5f5f5",padding:"10px",borderRadius:"4px",border:"1px solid #ddd",fontSize:"12px",overflow:"auto"},children:JSON.stringify(k(),null,2)})]}),Ee.jsx("button",{onClick:U,disabled:s||!e||!l,style:{padding:"10px 20px",background:e&&l?"linear-gradient(45deg, #19b17b, #022418)":"#ccc",color:"white",border:"none",borderRadius:"8px",cursor:s||!e||!l?"not-allowed":"pointer",fontWeight:"600",opacity:s?.6:1},children:s?"Sending...":"Send to Batcher"}),Ee.jsx("style",{children:`
143
+ @keyframes slideIn {
144
+ from {
145
+ transform: translateX(100%);
146
+ opacity: 0;
147
+ }
148
+ to {
149
+ transform: translateX(0);
150
+ opacity: 1;
151
+ }
152
+ }
153
+ `})]})]})]})}function BC({isOpen:e,onClose:t,title:n,tableNames:o,selectedNames:s,onApply:a}){const l=Ve.useMemo(()=>new Set(s),[s]),[c,h]=Ve.useState(l);Ve.useEffect(()=>{h(new Set(s))},[s,e]);const f=b=>{h(w=>{const F=new Set(w);return F.has(b)?F.delete(b):F.add(b),F})},p=()=>h(new Set(o)),y=()=>h(new Set),g=()=>{a(Array.from(c)),t()};return Ee.jsx(cc,{isOpen:e,onClose:t,title:n,className:"table-selector",children:Ee.jsxs("div",{className:"table-selector-content",children:[Ee.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:p,children:"Select All"}),Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:y,children:"Deselect All"})]}),Ee.jsx("ul",{children:o.map(b=>Ee.jsx("li",{children:Ee.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8},children:[Ee.jsx("input",{type:"checkbox",checked:c.has(b),onChange:()=>f(b)}),b]})},b))}),Ee.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:g,children:"Apply"}),Ee.jsx("button",{type:"button",className:"documentation-button",onClick:t,children:"Cancel"})]})]})})}var lc={},RC;function SH(){if(RC)return lc;RC=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.assertNever=e;function e(t,n){if(typeof n=="string")throw new Error(n);if(typeof n=="function")throw new Error(n(t));if(n)return t;throw new Error("Unhandled discriminated union member: ".concat(JSON.stringify(t)))}return lc.default=e,lc}var IH=SH(),da=(e=>(e.PaimaEngine="paima-engine",e.Batcher="batcher",e))(da||{}),dd=(e=>(e.Batcher="batcher",e.Node="node",e.App="app",e))(dd||{});function _H(e){switch(e){case"batcher":return"batcher";case"node":return"paima-engine";case"app":return"paima-engine";default:IH.assertNever(e)}}function b3(e,t,n){return{path:[e,...[n].filter(o=>o),...t.fields.filter(o=>o.indexed).flatMap(o=>[o.hashed===!0?o.name.substring(0,o.name.length-4):o.name,{name:o.name,type:o.type}])],broker:_H(e),type:Ue.Object(t.fields.filter(o=>!o.indexed).reduce((o,s)=>(o[s.name]=s.type,o),{}))}}function Sv(e){for(const{name:t}of e.fields){const n=["$","/","+","#"];for(const o of n)if(t.includes(o))throw new Error(`Event ${e.name} has field ${t} with invalid character ${o}.`)}return e}function CH(e){return{name:e.name,fields:e.fields.flatMap(t=>{if(t.indexed===!1)return t;const n=Ue.Extends(t.type,Ue.String(),Ue.Literal(!0),Ue.Literal(!1)).const,o=Ue.Extends(t.type,Ue.Number(),Ue.Literal(!0),Ue.Literal(!1)).const;return n||o?t:[{indexed:!0,type:Ue.String(),name:`${t.name}Hash`,hashed:!0},{...t,indexed:!1}]})}}const{keccak_256:eK}=g3;function MC(e,t){const n=new Set(Object.keys(t)),o=e.map((c,h)=>[c,h]).filter(([c,h])=>typeof c=="object").map(([c,h])=>h),s=e.map((c,h)=>[c,h]).filter(([c,h])=>typeof c=="object"&&n.has(c.name)).map(([c,h])=>h).reverse();let a=[];const l=c=>{c===e.length-1?a.push("+"):a.push("#")};for(let c=0;c<e.length;c++){const h=e[c];if(s.length===0&&o.length>0&&c<o[o.length-1]&&c>=o[0]){l(c);break}if(typeof h=="string"){a.push(e[c]);continue}t[h.name]===void 0?a.push("+"):a.push(t[h.name]),s.length>0&&c===s[s.length-1]&&s.pop()}return a.join("/")}function FH(e){let t="";for(let n=0;n<e.length;n++){const o=e[n];n>0&&(t+="/"),typeof o=="string"?t+=o:t+=`+${o.name}`}return t}function OH(e){return e.filter(t=>typeof t!="string").map(t=>t.name)}var Iv=Object.defineProperty,TH=Object.getOwnPropertyDescriptor,BH=Object.getOwnPropertyNames,RH=Object.prototype.hasOwnProperty,Ln=(e,t)=>()=>(e&&(t=e(e=0)),t),qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ll=(e,t)=>{for(var n in t)Iv(e,n,{get:t[n],enumerable:!0})},MH=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of BH(t))!RH.call(e,s)&&s!==n&&Iv(e,s,{get:()=>t[s],enumerable:!(o=TH(t,s))||o.enumerable});return e},Vt=e=>MH(Iv({},"__esModule",{value:!0}),e),Pe=Ln(()=>{}),Dt={};ll(Dt,{_debugEnd:()=>B1,_debugProcess:()=>T1,_events:()=>G1,_eventsCount:()=>K1,_exiting:()=>g1,_fatalExceptions:()=>C1,_getActiveHandles:()=>I3,_getActiveRequests:()=>S3,_kill:()=>A1,_linkedBinding:()=>x3,_maxListeners:()=>Q1,_preload_modules:()=>q1,_rawDebug:()=>d1,_startProfilerIdleNotifier:()=>R1,_stopProfilerIdleNotifier:()=>M1,_tickCallback:()=>O1,abort:()=>D1,addListener:()=>Y1,allowedNodeEnvironmentFlags:()=>I1,arch:()=>Zb,argv:()=>r1,argv0:()=>z1,assert:()=>_3,binding:()=>a1,browser:()=>h1,chdir:()=>c1,config:()=>m1,cpuUsage:()=>pc,cwd:()=>l1,debugPort:()=>$1,default:()=>Cv,dlopen:()=>E3,domain:()=>y1,emit:()=>Z1,emitWarning:()=>s1,env:()=>t1,execArgv:()=>n1,execPath:()=>L1,exit:()=>E1,features:()=>_1,hasUncaughtExceptionCaptureCallback:()=>C3,hrtime:()=>pd,kill:()=>x1,listeners:()=>O3,memoryUsage:()=>v1,moduleLoadList:()=>p1,nextTick:()=>w3,off:()=>W1,on:()=>Co,once:()=>V1,openStdin:()=>S1,pid:()=>P1,platform:()=>e1,ppid:()=>k1,prependListener:()=>eA,prependOnceListener:()=>tA,reallyExit:()=>b1,release:()=>f1,removeAllListeners:()=>J1,removeListener:()=>X1,resourceUsage:()=>w1,setSourceMapsEnabled:()=>H1,setUncaughtExceptionCaptureCallback:()=>F1,stderr:()=>U1,stdin:()=>N1,stdout:()=>j1,title:()=>Jb,umask:()=>u1,uptime:()=>F3,version:()=>i1,versions:()=>o1});function _v(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function jH(){!ba||!pa||(ba=!1,pa.length?Yi=pa.concat(Yi):xc=-1,Yi.length&&A3())}function A3(){if(!ba){var e=setTimeout(jH,0);ba=!0;for(var t=Yi.length;t;){for(pa=Yi,Yi=[];++xc<t;)pa&&pa[xc].run();xc=-1,t=Yi.length}pa=null,ba=!1,clearTimeout(e)}}function w3(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Yi.push(new v3(e,t)),Yi.length===1&&!ba&&setTimeout(A3,0)}function v3(e,t){this.fun=e,this.array=t}function cn(){}function x3(e){_v("_linkedBinding")}function E3(e){_v("dlopen")}function S3(){return[]}function I3(){return[]}function _3(e,t){if(!e)throw new Error(t||"assertion error")}function C3(){return!1}function F3(){return Ro.now()/1e3}function pd(e){var t=Math.floor((Date.now()-Ro.now())*.001),n=Ro.now()*.001,o=Math.floor(n)+t,s=Math.floor(n%1*1e9);return e&&(o=o-e[0],s=s-e[1],s<0&&(o--,s+=yd)),[o,s]}function Co(){return Cv}function O3(e){return[]}var Yi,ba,pa,xc,Jb,Zb,e1,t1,r1,n1,i1,o1,s1,a1,u1,l1,c1,f1,h1,d1,p1,y1,g1,m1,b1,A1,pc,w1,v1,x1,E1,S1,I1,_1,C1,F1,O1,T1,B1,R1,M1,j1,U1,N1,D1,P1,k1,L1,$1,z1,q1,H1,Ro,hb,yd,Q1,G1,K1,Y1,V1,W1,X1,J1,Z1,eA,tA,Cv,UH=Ln(()=>{Pe(),Le(),ke(),Yi=[],ba=!1,xc=-1,v3.prototype.run=function(){this.fun.apply(null,this.array)},Jb="browser",Zb="x64",e1="browser",t1={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},r1=["/usr/bin/node"],n1=[],i1="v16.8.0",o1={},s1=function(e,t){console.warn((t?t+": ":"")+e)},a1=function(e){_v("binding")},u1=function(e){return 0},l1=function(){return"/"},c1=function(e){},f1={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},h1=!0,d1=cn,p1=[],y1={},g1=!1,m1={},b1=cn,A1=cn,pc=function(){return{}},w1=pc,v1=pc,x1=cn,E1=cn,S1=cn,I1={},_1={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},C1=cn,F1=cn,O1=cn,T1=cn,B1=cn,R1=cn,M1=cn,j1=void 0,U1=void 0,N1=void 0,D1=cn,P1=2,k1=1,L1="/bin/usr/node",$1=9229,z1="node",q1=[],H1=cn,Ro={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Ro.now===void 0&&(hb=Date.now(),Ro.timing&&Ro.timing.navigationStart&&(hb=Ro.timing.navigationStart),Ro.now=()=>Date.now()-hb),yd=1e9,pd.bigint=function(e){var t=pd(e);return typeof BigInt>"u"?t[0]*yd+t[1]:BigInt(t[0]*yd)+BigInt(t[1])},Q1=10,G1={},K1=0,Y1=Co,V1=Co,W1=Co,X1=Co,J1=Co,Z1=cn,eA=Co,tA=Co,Cv={version:i1,versions:o1,arch:Zb,platform:e1,browser:h1,release:f1,_rawDebug:d1,moduleLoadList:p1,binding:a1,_linkedBinding:x3,_events:G1,_eventsCount:K1,_maxListeners:Q1,on:Co,addListener:Y1,once:V1,off:W1,removeListener:X1,removeAllListeners:J1,emit:Z1,prependListener:eA,prependOnceListener:tA,listeners:O3,domain:y1,_exiting:g1,config:m1,dlopen:E3,uptime:F3,_getActiveRequests:S3,_getActiveHandles:I3,reallyExit:b1,_kill:A1,cpuUsage:pc,resourceUsage:w1,memoryUsage:v1,kill:x1,exit:E1,openStdin:S1,allowedNodeEnvironmentFlags:I1,assert:_3,features:_1,_fatalExceptions:C1,setUncaughtExceptionCaptureCallback:F1,hasUncaughtExceptionCaptureCallback:C3,emitWarning:s1,nextTick:w3,_tickCallback:O1,_debugProcess:T1,_debugEnd:B1,_startProfilerIdleNotifier:R1,_stopProfilerIdleNotifier:M1,stdout:j1,stdin:N1,stderr:U1,abort:D1,umask:u1,chdir:c1,cwd:l1,env:t1,title:Jb,argv:r1,execArgv:n1,pid:P1,ppid:k1,execPath:L1,debugPort:$1,hrtime:pd,argv0:z1,_preload_modules:q1,setSourceMapsEnabled:H1}}),ke=Ln(()=>{UH()});function NH(){if(rA)return xu;rA=!0,xu.byteLength=c,xu.toByteArray=f,xu.fromByteArray=g;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)e[s]=o[s],t[o.charCodeAt(s)]=s;t[45]=62,t[95]=63;function l(b){var w=b.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=b.indexOf("=");F===-1&&(F=w);var I=F===w?0:4-F%4;return[F,I]}function c(b){var w=l(b),F=w[0],I=w[1];return(F+I)*3/4-I}function h(b,w,F){return(w+F)*3/4-F}function f(b){var w,F=l(b),I=F[0],R=F[1],A=new n(h(b,I,R)),E=0,M=R>0?I-4:I,T;for(T=0;T<M;T+=4)w=t[b.charCodeAt(T)]<<18|t[b.charCodeAt(T+1)]<<12|t[b.charCodeAt(T+2)]<<6|t[b.charCodeAt(T+3)],A[E++]=w>>16&255,A[E++]=w>>8&255,A[E++]=w&255;return R===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[E++]=w&255),R===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[E++]=w>>8&255,A[E++]=w&255),A}function p(b){return e[b>>18&63]+e[b>>12&63]+e[b>>6&63]+e[b&63]}function y(b,w,F){for(var I,R=[],A=w;A<F;A+=3)I=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),R.push(p(I));return R.join("")}function g(b){for(var w,F=b.length,I=F%3,R=[],A=16383,E=0,M=F-I;E<M;E+=A)R.push(y(b,E,E+A>M?M:E+A));return I===1?(w=b[F-1],R.push(e[w>>2]+e[w<<4&63]+"==")):I===2&&(w=(b[F-2]<<8)+b[F-1],R.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),R.join("")}return xu}function DH(){return nA?yc:(nA=!0,yc.read=function(e,t,n,o,s){var a,l,c=s*8-o-1,h=(1<<c)-1,f=h>>1,p=-7,y=n?s-1:0,g=n?-1:1,b=e[t+y];for(y+=g,a=b&(1<<-p)-1,b>>=-p,p+=c;p>0;a=a*256+e[t+y],y+=g,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(a===0)a=1-f;else{if(a===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),a=a-f}return(b?-1:1)*l*Math.pow(2,a-o)},yc.write=function(e,t,n,o,s,a){var l,c,h,f=a*8-s-1,p=(1<<f)-1,y=p>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:a-1,w=o?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,l=p):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+y>=1?t+=g/h:t+=g*Math.pow(2,1-y),t*h>=2&&(l++,h/=2),l+y>=p?(c=0,l=p):l+y>=1?(c=(t*h-1)*Math.pow(2,s),l=l+y):(c=t*Math.pow(2,y-1)*Math.pow(2,s),l=0));s>=8;e[n+b]=c&255,b+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+b]=l&255,b+=w,l/=256,f-=8);e[n+b-w]|=F*128},yc)}function PH(){if(iA)return Es;iA=!0;let e=NH(),t=DH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Es.Buffer=l,Es.SlowBuffer=R,Es.INSPECT_MAX_BYTES=50;let o=2147483647;Es.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let x=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(x,B),x.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function a(x){if(x>o)throw new RangeError('The value "'+x+'" is invalid for option "size"');let B=new Uint8Array(x);return Object.setPrototypeOf(B,l.prototype),B}function l(x,B,D){if(typeof x=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(x)}return c(x,B,D)}l.poolSize=8192;function c(x,B,D){if(typeof x=="string")return y(x,B);if(ArrayBuffer.isView(x))return b(x);if(x==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(ce(x,ArrayBuffer)||x&&ce(x.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ce(x,SharedArrayBuffer)||x&&ce(x.buffer,SharedArrayBuffer)))return w(x,B,D);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let oe=x.valueOf&&x.valueOf();if(oe!=null&&oe!==x)return l.from(oe,B,D);let me=F(x);if(me)return me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return l.from(x[Symbol.toPrimitive]("string"),B,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}l.from=function(x,B,D){return c(x,B,D)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function h(x){if(typeof x!="number")throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function f(x,B,D){return h(x),x<=0?a(x):B!==void 0?typeof D=="string"?a(x).fill(B,D):a(x).fill(B):a(x)}l.alloc=function(x,B,D){return f(x,B,D)};function p(x){return h(x),a(x<0?0:I(x)|0)}l.allocUnsafe=function(x){return p(x)},l.allocUnsafeSlow=function(x){return p(x)};function y(x,B){if((typeof B!="string"||B==="")&&(B="utf8"),!l.isEncoding(B))throw new TypeError("Unknown encoding: "+B);let D=A(x,B)|0,oe=a(D),me=oe.write(x,B);return me!==D&&(oe=oe.slice(0,me)),oe}function g(x){let B=x.length<0?0:I(x.length)|0,D=a(B);for(let oe=0;oe<B;oe+=1)D[oe]=x[oe]&255;return D}function b(x){if(ce(x,Uint8Array)){let B=new Uint8Array(x);return w(B.buffer,B.byteOffset,B.byteLength)}return g(x)}function w(x,B,D){if(B<0||x.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(x.byteLength<B+(D||0))throw new RangeError('"length" is outside of buffer bounds');let oe;return B===void 0&&D===void 0?oe=new Uint8Array(x):D===void 0?oe=new Uint8Array(x,B):oe=new Uint8Array(x,B,D),Object.setPrototypeOf(oe,l.prototype),oe}function F(x){if(l.isBuffer(x)){let B=I(x.length)|0,D=a(B);return D.length===0||x.copy(D,0,0,B),D}if(x.length!==void 0)return typeof x.length!="number"||Se(x.length)?a(0):g(x);if(x.type==="Buffer"&&Array.isArray(x.data))return g(x.data)}function I(x){if(x>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return x|0}function R(x){return+x!=x&&(x=0),l.alloc(+x)}l.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==l.prototype},l.compare=function(x,B){if(ce(x,Uint8Array)&&(x=l.from(x,x.offset,x.byteLength)),ce(B,Uint8Array)&&(B=l.from(B,B.offset,B.byteLength)),!l.isBuffer(x)||!l.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===B)return 0;let D=x.length,oe=B.length;for(let me=0,xe=Math.min(D,oe);me<xe;++me)if(x[me]!==B[me]){D=x[me],oe=B[me];break}return D<oe?-1:oe<D?1:0},l.isEncoding=function(x){switch(String(x).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(x,B){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return l.alloc(0);let D;if(B===void 0)for(B=0,D=0;D<x.length;++D)B+=x[D].length;let oe=l.allocUnsafe(B),me=0;for(D=0;D<x.length;++D){let xe=x[D];if(ce(xe,Uint8Array))me+xe.length>oe.length?(l.isBuffer(xe)||(xe=l.from(xe)),xe.copy(oe,me)):Uint8Array.prototype.set.call(oe,xe,me);else if(l.isBuffer(xe))xe.copy(oe,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=xe.length}return oe};function A(x,B){if(l.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||ce(x,ArrayBuffer))return x.byteLength;if(typeof x!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);let D=x.length,oe=arguments.length>2&&arguments[2]===!0;if(!oe&&D===0)return 0;let me=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return _(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return P(x).length;default:if(me)return oe?-1:_(x).length;B=(""+B).toLowerCase(),me=!0}}l.byteLength=A;function E(x,B,D){let oe=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((D===void 0||D>this.length)&&(D=this.length),D<=0)||(D>>>=0,B>>>=0,D<=B))return"";for(x||(x="utf8");;)switch(x){case"hex":return ye(this,B,D);case"utf8":case"utf-8":return Z(this,B,D);case"ascii":return X(this,B,D);case"latin1":case"binary":return ae(this,B,D);case"base64":return N(this,B,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,B,D);default:if(oe)throw new TypeError("Unknown encoding: "+x);x=(x+"").toLowerCase(),oe=!0}}l.prototype._isBuffer=!0;function M(x,B,D){let oe=x[B];x[B]=x[D],x[D]=oe}l.prototype.swap16=function(){let x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<x;B+=2)M(this,B,B+1);return this},l.prototype.swap32=function(){let x=this.length;if(x%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<x;B+=4)M(this,B,B+3),M(this,B+1,B+2);return this},l.prototype.swap64=function(){let x=this.length;if(x%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<x;B+=8)M(this,B,B+7),M(this,B+1,B+6),M(this,B+2,B+5),M(this,B+3,B+4);return this},l.prototype.toString=function(){let x=this.length;return x===0?"":arguments.length===0?Z(this,0,x):E.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(x){if(!l.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x?!0:l.compare(this,x)===0},l.prototype.inspect=function(){let x="",B=Es.INSPECT_MAX_BYTES;return x=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(x+=" ... "),"<Buffer "+x+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(x,B,D,oe,me){if(ce(x,Uint8Array)&&(x=l.from(x,x.offset,x.byteLength)),!l.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(B===void 0&&(B=0),D===void 0&&(D=x?x.length:0),oe===void 0&&(oe=0),me===void 0&&(me=this.length),B<0||D>x.length||oe<0||me>this.length)throw new RangeError("out of range index");if(oe>=me&&B>=D)return 0;if(oe>=me)return-1;if(B>=D)return 1;if(B>>>=0,D>>>=0,oe>>>=0,me>>>=0,this===x)return 0;let xe=me-oe,Ce=D-B,we=Math.min(xe,Ce),Ie=this.slice(oe,me),He=x.slice(B,D);for(let Ke=0;Ke<we;++Ke)if(Ie[Ke]!==He[Ke]){xe=Ie[Ke],Ce=He[Ke];break}return xe<Ce?-1:Ce<xe?1:0};function T(x,B,D,oe,me){if(x.length===0)return-1;if(typeof D=="string"?(oe=D,D=0):D>2147483647?D=2147483647:D<-2147483648&&(D=-2147483648),D=+D,Se(D)&&(D=me?0:x.length-1),D<0&&(D=x.length+D),D>=x.length){if(me)return-1;D=x.length-1}else if(D<0)if(me)D=0;else return-1;if(typeof B=="string"&&(B=l.from(B,oe)),l.isBuffer(B))return B.length===0?-1:z(x,B,D,oe,me);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(x,B,D):Uint8Array.prototype.lastIndexOf.call(x,B,D):z(x,[B],D,oe,me);throw new TypeError("val must be string, number or Buffer")}function z(x,B,D,oe,me){let xe=1,Ce=x.length,we=B.length;if(oe!==void 0&&(oe=String(oe).toLowerCase(),oe==="ucs2"||oe==="ucs-2"||oe==="utf16le"||oe==="utf-16le")){if(x.length<2||B.length<2)return-1;xe=2,Ce/=2,we/=2,D/=2}function Ie(Ke,We){return xe===1?Ke[We]:Ke.readUInt16BE(We*xe)}let He;if(me){let Ke=-1;for(He=D;He<Ce;He++)if(Ie(x,He)===Ie(B,Ke===-1?0:He-Ke)){if(Ke===-1&&(Ke=He),He-Ke+1===we)return Ke*xe}else Ke!==-1&&(He-=He-Ke),Ke=-1}else for(D+we>Ce&&(D=Ce-we),He=D;He>=0;He--){let Ke=!0;for(let We=0;We<we;We++)if(Ie(x,He+We)!==Ie(B,We)){Ke=!1;break}if(Ke)return He}return-1}l.prototype.includes=function(x,B,D){return this.indexOf(x,B,D)!==-1},l.prototype.indexOf=function(x,B,D){return T(this,x,B,D,!0)},l.prototype.lastIndexOf=function(x,B,D){return T(this,x,B,D,!1)};function L(x,B,D,oe){D=Number(D)||0;let me=x.length-D;oe?(oe=Number(oe),oe>me&&(oe=me)):oe=me;let xe=B.length;oe>xe/2&&(oe=xe/2);let Ce;for(Ce=0;Ce<oe;++Ce){let we=parseInt(B.substr(Ce*2,2),16);if(Se(we))return Ce;x[D+Ce]=we}return Ce}function k(x,B,D,oe){return he(_(B,x.length-D),x,D,oe)}function j(x,B,D,oe){return he(v(B),x,D,oe)}function U(x,B,D,oe){return he(P(B),x,D,oe)}function $(x,B,D,oe){return he(C(B,x.length-D),x,D,oe)}l.prototype.write=function(x,B,D,oe){if(B===void 0)oe="utf8",D=this.length,B=0;else if(D===void 0&&typeof B=="string")oe=B,D=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(D)?(D=D>>>0,oe===void 0&&(oe="utf8")):(oe=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let me=this.length-B;if((D===void 0||D>me)&&(D=me),x.length>0&&(D<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");let xe=!1;for(;;)switch(oe){case"hex":return L(this,x,B,D);case"utf8":case"utf-8":return k(this,x,B,D);case"ascii":case"latin1":case"binary":return j(this,x,B,D);case"base64":return U(this,x,B,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,x,B,D);default:if(xe)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),xe=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(x,B,D){return B===0&&D===x.length?e.fromByteArray(x):e.fromByteArray(x.slice(B,D))}function Z(x,B,D){D=Math.min(x.length,D);let oe=[],me=B;for(;me<D;){let xe=x[me],Ce=null,we=xe>239?4:xe>223?3:xe>191?2:1;if(me+we<=D){let Ie,He,Ke,We;switch(we){case 1:xe<128&&(Ce=xe);break;case 2:Ie=x[me+1],(Ie&192)===128&&(We=(xe&31)<<6|Ie&63,We>127&&(Ce=We));break;case 3:Ie=x[me+1],He=x[me+2],(Ie&192)===128&&(He&192)===128&&(We=(xe&15)<<12|(Ie&63)<<6|He&63,We>2047&&(We<55296||We>57343)&&(Ce=We));break;case 4:Ie=x[me+1],He=x[me+2],Ke=x[me+3],(Ie&192)===128&&(He&192)===128&&(Ke&192)===128&&(We=(xe&15)<<18|(Ie&63)<<12|(He&63)<<6|Ke&63,We>65535&&We<1114112&&(Ce=We))}}Ce===null?(Ce=65533,we=1):Ce>65535&&(Ce-=65536,oe.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),oe.push(Ce),me+=we}return ie(oe)}let re=4096;function ie(x){let B=x.length;if(B<=re)return String.fromCharCode.apply(String,x);let D="",oe=0;for(;oe<B;)D+=String.fromCharCode.apply(String,x.slice(oe,oe+=re));return D}function X(x,B,D){let oe="";D=Math.min(x.length,D);for(let me=B;me<D;++me)oe+=String.fromCharCode(x[me]&127);return oe}function ae(x,B,D){let oe="";D=Math.min(x.length,D);for(let me=B;me<D;++me)oe+=String.fromCharCode(x[me]);return oe}function ye(x,B,D){let oe=x.length;(!B||B<0)&&(B=0),(!D||D<0||D>oe)&&(D=oe);let me="";for(let xe=B;xe<D;++xe)me+=Be[x[xe]];return me}function le(x,B,D){let oe=x.slice(B,D),me="";for(let xe=0;xe<oe.length-1;xe+=2)me+=String.fromCharCode(oe[xe]+oe[xe+1]*256);return me}l.prototype.slice=function(x,B){let D=this.length;x=~~x,B=B===void 0?D:~~B,x<0?(x+=D,x<0&&(x=0)):x>D&&(x=D),B<0?(B+=D,B<0&&(B=0)):B>D&&(B=D),B<x&&(B=x);let oe=this.subarray(x,B);return Object.setPrototypeOf(oe,l.prototype),oe};function ee(x,B,D){if(x%1!==0||x<0)throw new RangeError("offset is not uint");if(x+B>D)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(x,B,D){x=x>>>0,B=B>>>0,D||ee(x,B,this.length);let oe=this[x],me=1,xe=0;for(;++xe<B&&(me*=256);)oe+=this[x+xe]*me;return oe},l.prototype.readUintBE=l.prototype.readUIntBE=function(x,B,D){x=x>>>0,B=B>>>0,D||ee(x,B,this.length);let oe=this[x+--B],me=1;for(;B>0&&(me*=256);)oe+=this[x+--B]*me;return oe},l.prototype.readUint8=l.prototype.readUInt8=function(x,B){return x=x>>>0,B||ee(x,1,this.length),this[x]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(x,B){return x=x>>>0,B||ee(x,2,this.length),this[x]|this[x+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(x,B){return x=x>>>0,B||ee(x,2,this.length),this[x]<<8|this[x+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])},l.prototype.readBigUInt64LE=de(function(x){x=x>>>0,Y(x,"offset");let B=this[x],D=this[x+7];(B===void 0||D===void 0)&&se(x,this.length-8);let oe=B+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,me=this[++x]+this[++x]*2**8+this[++x]*2**16+D*2**24;return BigInt(oe)+(BigInt(me)<<BigInt(32))}),l.prototype.readBigUInt64BE=de(function(x){x=x>>>0,Y(x,"offset");let B=this[x],D=this[x+7];(B===void 0||D===void 0)&&se(x,this.length-8);let oe=B*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],me=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+D;return(BigInt(oe)<<BigInt(32))+BigInt(me)}),l.prototype.readIntLE=function(x,B,D){x=x>>>0,B=B>>>0,D||ee(x,B,this.length);let oe=this[x],me=1,xe=0;for(;++xe<B&&(me*=256);)oe+=this[x+xe]*me;return me*=128,oe>=me&&(oe-=Math.pow(2,8*B)),oe},l.prototype.readIntBE=function(x,B,D){x=x>>>0,B=B>>>0,D||ee(x,B,this.length);let oe=B,me=1,xe=this[x+--oe];for(;oe>0&&(me*=256);)xe+=this[x+--oe]*me;return me*=128,xe>=me&&(xe-=Math.pow(2,8*B)),xe},l.prototype.readInt8=function(x,B){return x=x>>>0,B||ee(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},l.prototype.readInt16LE=function(x,B){x=x>>>0,B||ee(x,2,this.length);let D=this[x]|this[x+1]<<8;return D&32768?D|4294901760:D},l.prototype.readInt16BE=function(x,B){x=x>>>0,B||ee(x,2,this.length);let D=this[x+1]|this[x]<<8;return D&32768?D|4294901760:D},l.prototype.readInt32LE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},l.prototype.readInt32BE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},l.prototype.readBigInt64LE=de(function(x){x=x>>>0,Y(x,"offset");let B=this[x],D=this[x+7];(B===void 0||D===void 0)&&se(x,this.length-8);let oe=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(D<<24);return(BigInt(oe)<<BigInt(32))+BigInt(B+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24)}),l.prototype.readBigInt64BE=de(function(x){x=x>>>0,Y(x,"offset");let B=this[x],D=this[x+7];(B===void 0||D===void 0)&&se(x,this.length-8);let oe=(B<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(oe)<<BigInt(32))+BigInt(this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+D)}),l.prototype.readFloatLE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),t.read(this,x,!0,23,4)},l.prototype.readFloatBE=function(x,B){return x=x>>>0,B||ee(x,4,this.length),t.read(this,x,!1,23,4)},l.prototype.readDoubleLE=function(x,B){return x=x>>>0,B||ee(x,8,this.length),t.read(this,x,!0,52,8)},l.prototype.readDoubleBE=function(x,B){return x=x>>>0,B||ee(x,8,this.length),t.read(this,x,!1,52,8)};function G(x,B,D,oe,me,xe){if(!l.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>me||B<xe)throw new RangeError('"value" argument is out of bounds');if(D+oe>x.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(x,B,D,oe){if(x=+x,B=B>>>0,D=D>>>0,!oe){let Ce=Math.pow(2,8*D)-1;G(this,x,B,D,Ce,0)}let me=1,xe=0;for(this[B]=x&255;++xe<D&&(me*=256);)this[B+xe]=x/me&255;return B+D},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(x,B,D,oe){if(x=+x,B=B>>>0,D=D>>>0,!oe){let Ce=Math.pow(2,8*D)-1;G(this,x,B,D,Ce,0)}let me=D-1,xe=1;for(this[B+me]=x&255;--me>=0&&(xe*=256);)this[B+me]=x/xe&255;return B+D},l.prototype.writeUint8=l.prototype.writeUInt8=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,1,255,0),this[B]=x&255,B+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,2,65535,0),this[B]=x&255,this[B+1]=x>>>8,B+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,2,65535,0),this[B]=x>>>8,this[B+1]=x&255,B+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,4,4294967295,0),this[B+3]=x>>>24,this[B+2]=x>>>16,this[B+1]=x>>>8,this[B]=x&255,B+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,4,4294967295,0),this[B]=x>>>24,this[B+1]=x>>>16,this[B+2]=x>>>8,this[B+3]=x&255,B+4};function Q(x,B,D,oe,me){H(B,oe,me,x,D,7);let xe=Number(B&BigInt(4294967295));x[D++]=xe,xe=xe>>8,x[D++]=xe,xe=xe>>8,x[D++]=xe,xe=xe>>8,x[D++]=xe;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,D}function K(x,B,D,oe,me){H(B,oe,me,x,D,7);let xe=Number(B&BigInt(4294967295));x[D+7]=xe,xe=xe>>8,x[D+6]=xe,xe=xe>>8,x[D+5]=xe,xe=xe>>8,x[D+4]=xe;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return x[D+3]=Ce,Ce=Ce>>8,x[D+2]=Ce,Ce=Ce>>8,x[D+1]=Ce,Ce=Ce>>8,x[D]=Ce,D+8}l.prototype.writeBigUInt64LE=de(function(x,B=0){return Q(this,x,B,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=de(function(x,B=0){return K(this,x,B,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(x,B,D,oe){if(x=+x,B=B>>>0,!oe){let we=Math.pow(2,8*D-1);G(this,x,B,D,we-1,-we)}let me=0,xe=1,Ce=0;for(this[B]=x&255;++me<D&&(xe*=256);)x<0&&Ce===0&&this[B+me-1]!==0&&(Ce=1),this[B+me]=(x/xe>>0)-Ce&255;return B+D},l.prototype.writeIntBE=function(x,B,D,oe){if(x=+x,B=B>>>0,!oe){let we=Math.pow(2,8*D-1);G(this,x,B,D,we-1,-we)}let me=D-1,xe=1,Ce=0;for(this[B+me]=x&255;--me>=0&&(xe*=256);)x<0&&Ce===0&&this[B+me+1]!==0&&(Ce=1),this[B+me]=(x/xe>>0)-Ce&255;return B+D},l.prototype.writeInt8=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,1,127,-128),x<0&&(x=255+x+1),this[B]=x&255,B+1},l.prototype.writeInt16LE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,2,32767,-32768),this[B]=x&255,this[B+1]=x>>>8,B+2},l.prototype.writeInt16BE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,2,32767,-32768),this[B]=x>>>8,this[B+1]=x&255,B+2},l.prototype.writeInt32LE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,4,2147483647,-2147483648),this[B]=x&255,this[B+1]=x>>>8,this[B+2]=x>>>16,this[B+3]=x>>>24,B+4},l.prototype.writeInt32BE=function(x,B,D){return x=+x,B=B>>>0,D||G(this,x,B,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[B]=x>>>24,this[B+1]=x>>>16,this[B+2]=x>>>8,this[B+3]=x&255,B+4},l.prototype.writeBigInt64LE=de(function(x,B=0){return Q(this,x,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=de(function(x,B=0){return K(this,x,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(x,B,D,oe,me,xe){if(D+oe>x.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function q(x,B,D,oe,me){return B=+B,D=D>>>0,me||W(x,B,D,4),t.write(x,B,D,oe,23,4),D+4}l.prototype.writeFloatLE=function(x,B,D){return q(this,x,B,!0,D)},l.prototype.writeFloatBE=function(x,B,D){return q(this,x,B,!1,D)};function fe(x,B,D,oe,me){return B=+B,D=D>>>0,me||W(x,B,D,8),t.write(x,B,D,oe,52,8),D+8}l.prototype.writeDoubleLE=function(x,B,D){return fe(this,x,B,!0,D)},l.prototype.writeDoubleBE=function(x,B,D){return fe(this,x,B,!1,D)},l.prototype.copy=function(x,B,D,oe){if(!l.isBuffer(x))throw new TypeError("argument should be a Buffer");if(D||(D=0),!oe&&oe!==0&&(oe=this.length),B>=x.length&&(B=x.length),B||(B=0),oe>0&&oe<D&&(oe=D),oe===D||x.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),x.length-B<oe-D&&(oe=x.length-B+D);let me=oe-D;return this===x&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,D,oe):Uint8Array.prototype.set.call(x,this.subarray(D,oe),B),me},l.prototype.fill=function(x,B,D,oe){if(typeof x=="string"){if(typeof B=="string"?(oe=B,B=0,D=this.length):typeof D=="string"&&(oe=D,D=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!l.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(x.length===1){let xe=x.charCodeAt(0);(oe==="utf8"&&xe<128||oe==="latin1")&&(x=xe)}}else typeof x=="number"?x=x&255:typeof x=="boolean"&&(x=Number(x));if(B<0||this.length<B||this.length<D)throw new RangeError("Out of range index");if(D<=B)return this;B=B>>>0,D=D===void 0?this.length:D>>>0,x||(x=0);let me;if(typeof x=="number")for(me=B;me<D;++me)this[me]=x;else{let xe=l.isBuffer(x)?x:l.from(x,oe),Ce=xe.length;if(Ce===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(me=0;me<D-B;++me)this[me+B]=xe[me%Ce]}return this};let ue={};function ne(x,B,D){ue[x]=class extends D{constructor(){super(),Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${x}]`,this.stack,delete this.name}get code(){return x}set code(oe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:oe,writable:!0})}toString(){return`${this.name} [${x}]: ${this.message}`}}}ne("ERR_BUFFER_OUT_OF_BOUNDS",function(x){return x?`${x} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ne("ERR_INVALID_ARG_TYPE",function(x,B){return`The "${x}" argument must be of type number. Received type ${typeof B}`},TypeError),ne("ERR_OUT_OF_RANGE",function(x,B,D){let oe=`The value of "${x}" is out of range.`,me=D;return Number.isInteger(D)&&Math.abs(D)>2**32?me=J(String(D)):typeof D=="bigint"&&(me=String(D),(D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))&&(me=J(me)),me+="n"),oe+=` It must be ${B}. Received ${me}`,oe},RangeError);function J(x){let B="",D=x.length,oe=x[0]==="-"?1:0;for(;D>=oe+4;D-=3)B=`_${x.slice(D-3,D)}${B}`;return`${x.slice(0,D)}${B}`}function O(x,B,D){Y(B,"offset"),(x[B]===void 0||x[B+D]===void 0)&&se(B,x.length-(D+1))}function H(x,B,D,oe,me,xe){if(x>D||x<B){let Ce=typeof B=="bigint"?"n":"",we;throw B===0||B===BigInt(0)?we=`>= 0${Ce} and < 2${Ce} ** ${(xe+1)*8}${Ce}`:we=`>= -(2${Ce} ** ${(xe+1)*8-1}${Ce}) and < 2 ** ${(xe+1)*8-1}${Ce}`,new ue.ERR_OUT_OF_RANGE("value",we,x)}O(oe,me,xe)}function Y(x,B){if(typeof x!="number")throw new ue.ERR_INVALID_ARG_TYPE(B,"number",x)}function se(x,B,D){throw Math.floor(x)!==x?(Y(x,D),new ue.ERR_OUT_OF_RANGE("offset","an integer",x)):B<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${B}`,x)}let pe=/[^+/0-9A-Za-z-_]/g;function te(x){if(x=x.split("=")[0],x=x.trim().replace(pe,""),x.length<2)return"";for(;x.length%4!==0;)x=x+"=";return x}function _(x,B){B=B||1/0;let D,oe=x.length,me=null,xe=[];for(let Ce=0;Ce<oe;++Ce){if(D=x.charCodeAt(Ce),D>55295&&D<57344){if(!me){if(D>56319){(B-=3)>-1&&xe.push(239,191,189);continue}else if(Ce+1===oe){(B-=3)>-1&&xe.push(239,191,189);continue}me=D;continue}if(D<56320){(B-=3)>-1&&xe.push(239,191,189),me=D;continue}D=(me-55296<<10|D-56320)+65536}else me&&(B-=3)>-1&&xe.push(239,191,189);if(me=null,D<128){if((B-=1)<0)break;xe.push(D)}else if(D<2048){if((B-=2)<0)break;xe.push(D>>6|192,D&63|128)}else if(D<65536){if((B-=3)<0)break;xe.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((B-=4)<0)break;xe.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw new Error("Invalid code point")}return xe}function v(x){let B=[];for(let D=0;D<x.length;++D)B.push(x.charCodeAt(D)&255);return B}function C(x,B){let D,oe,me,xe=[];for(let Ce=0;Ce<x.length&&!((B-=2)<0);++Ce)D=x.charCodeAt(Ce),oe=D>>8,me=D%256,xe.push(me),xe.push(oe);return xe}function P(x){return e.toByteArray(te(x))}function he(x,B,D,oe){let me;for(me=0;me<oe&&!(me+D>=B.length||me>=x.length);++me)B[me+D]=x[me];return me}function ce(x,B){return x instanceof B||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===B.name}function Se(x){return x!==x}let Be=(function(){let x="0123456789abcdef",B=new Array(256);for(let D=0;D<16;++D){let oe=D*16;for(let me=0;me<16;++me)B[oe+me]=x[D]+x[me]}return B})();function de(x){return typeof BigInt>"u"?ve:x}function ve(){throw new Error("BigInt not supported")}return Es}var xu,rA,yc,nA,Es,iA,kH=Ln(()=>{Pe(),Le(),ke(),xu={},rA=!1,yc={},nA=!1,Es={},iA=!1}),Kr={};ll(Kr,{Buffer:()=>Wd,INSPECT_MAX_BYTES:()=>T3,default:()=>Fo,kMaxLength:()=>B3});var Fo,Wd,T3,B3,Yr=Ln(()=>{Pe(),Le(),ke(),kH(),Fo=PH(),Fo.Buffer,Fo.SlowBuffer,Fo.INSPECT_MAX_BYTES,Fo.kMaxLength,Wd=Fo.Buffer,T3=Fo.INSPECT_MAX_BYTES,B3=Fo.kMaxLength}),Le=Ln(()=>{Yr()}),lr=qe((e,t)=>{Pe(),Le(),ke();var n=class extends Error{constructor(o){if(!Array.isArray(o))throw new TypeError(`Expected input to be an Array, got ${typeof o}`);let s="";for(let a=0;a<o.length;a++)s+=` ${o[a].stack}
154
+ `;super(s),this.name="AggregateError",this.errors=o}};t.exports={AggregateError:n,ArrayIsArray(o){return Array.isArray(o)},ArrayPrototypeIncludes(o,s){return o.includes(s)},ArrayPrototypeIndexOf(o,s){return o.indexOf(s)},ArrayPrototypeJoin(o,s){return o.join(s)},ArrayPrototypeMap(o,s){return o.map(s)},ArrayPrototypePop(o,s){return o.pop(s)},ArrayPrototypePush(o,s){return o.push(s)},ArrayPrototypeSlice(o,s,a){return o.slice(s,a)},Error,FunctionPrototypeCall(o,s,...a){return o.call(s,...a)},FunctionPrototypeSymbolHasInstance(o,s){return Function.prototype[Symbol.hasInstance].call(o,s)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(o,s){return Object.defineProperties(o,s)},ObjectDefineProperty(o,s,a){return Object.defineProperty(o,s,a)},ObjectGetOwnPropertyDescriptor(o,s){return Object.getOwnPropertyDescriptor(o,s)},ObjectKeys(o){return Object.keys(o)},ObjectSetPrototypeOf(o,s){return Object.setPrototypeOf(o,s)},Promise,PromisePrototypeCatch(o,s){return o.catch(s)},PromisePrototypeThen(o,s,a){return o.then(s,a)},PromiseReject(o){return Promise.reject(o)},PromiseResolve(o){return Promise.resolve(o)},ReflectApply:Reflect.apply,RegExpPrototypeTest(o,s){return o.test(s)},SafeSet:Set,String,StringPrototypeSlice(o,s,a){return o.slice(s,a)},StringPrototypeToLowerCase(o){return o.toLowerCase()},StringPrototypeToUpperCase(o){return o.toUpperCase()},StringPrototypeTrim(o){return o.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(o,s,a){return o.set(s,a)},Boolean,Uint8Array}}),R3=qe((e,t)=>{Pe(),Le(),ke(),t.exports={format(n,...o){return n.replace(/%([sdifj])/g,function(...[s,a]){let l=o.shift();return a==="f"?l.toFixed(6):a==="j"?JSON.stringify(l):a==="s"&&typeof l=="object"?`${l.constructor!==Object?l.constructor.name:""} {}`.trim():l.toString()})},inspect(n){switch(typeof n){case"string":if(n.includes("'"))if(n.includes('"')){if(!n.includes("`")&&!n.includes("${"))return`\`${n}\``}else return`"${n}"`;return`'${n}'`;case"number":return isNaN(n)?"NaN":Object.is(n,-0)?String(n):n;case"bigint":return`${String(n)}n`;case"boolean":case"undefined":return String(n);case"object":return"{}"}}}}),vn=qe((e,t)=>{Pe(),Le(),ke();var{format:n,inspect:o}=R3(),{AggregateError:s}=lr(),a=globalThis.AggregateError||s,l=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],h=/^([A-Z][a-z0-9]*)+$/,f="__node_internal_",p={};function y(A,E){if(!A)throw new p.ERR_INTERNAL_ASSERTION(E)}function g(A){let E="",M=A.length,T=A[0]==="-"?1:0;for(;M>=T+4;M-=3)E=`_${A.slice(M-3,M)}${E}`;return`${A.slice(0,M)}${E}`}function b(A,E,M){if(typeof E=="function")return y(E.length<=M.length,`Code: ${A}; The provided arguments length (${M.length}) does not match the required ones (${E.length}).`),E(...M);let T=(E.match(/%[dfijoOs]/g)||[]).length;return y(T===M.length,`Code: ${A}; The provided arguments length (${M.length}) does not match the required ones (${T}).`),M.length===0?E:n(E,...M)}function w(A,E,M){M||(M=Error);class T extends M{constructor(...L){super(b(A,E,L))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(T.prototype,{name:{value:M.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),T.prototype.code=A,T.prototype[l]=!0,p[A]=T}function F(A){let E=f+A.name;return Object.defineProperty(A,"name",{value:E}),A}function I(A,E){if(A&&E&&A!==E){if(Array.isArray(E.errors))return E.errors.push(A),E;let M=new a([E,A],E.message);return M.code=E.code,M}return A||E}var R=class extends Error{constructor(A="The operation was aborted",E=void 0){if(E!==void 0&&typeof E!="object")throw new p.ERR_INVALID_ARG_TYPE("options","Object",E);super(A,E),this.code="ABORT_ERR",this.name="AbortError"}};w("ERR_ASSERTION","%s",Error),w("ERR_INVALID_ARG_TYPE",(A,E,M)=>{y(typeof A=="string","'name' must be a string"),Array.isArray(E)||(E=[E]);let T="The ";A.endsWith(" argument")?T+=`${A} `:T+=`"${A}" ${A.includes(".")?"property":"argument"} `,T+="must be ";let z=[],L=[],k=[];for(let U of E)y(typeof U=="string","All expected entries have to be of type string"),c.includes(U)?z.push(U.toLowerCase()):h.test(U)?L.push(U):(y(U!=="object",'The value "object" should be written as "Object"'),k.push(U));if(L.length>0){let U=z.indexOf("object");U!==-1&&(z.splice(z,U,1),L.push("Object"))}if(z.length>0){switch(z.length){case 1:T+=`of type ${z[0]}`;break;case 2:T+=`one of type ${z[0]} or ${z[1]}`;break;default:{let U=z.pop();T+=`one of type ${z.join(", ")}, or ${U}`}}(L.length>0||k.length>0)&&(T+=" or ")}if(L.length>0){switch(L.length){case 1:T+=`an instance of ${L[0]}`;break;case 2:T+=`an instance of ${L[0]} or ${L[1]}`;break;default:{let U=L.pop();T+=`an instance of ${L.join(", ")}, or ${U}`}}k.length>0&&(T+=" or ")}switch(k.length){case 0:break;case 1:k[0].toLowerCase()!==k[0]&&(T+="an "),T+=`${k[0]}`;break;case 2:T+=`one of ${k[0]} or ${k[1]}`;break;default:{let U=k.pop();T+=`one of ${k.join(", ")}, or ${U}`}}if(M==null)T+=`. Received ${M}`;else if(typeof M=="function"&&M.name)T+=`. Received function ${M.name}`;else if(typeof M=="object"){var j;if((j=M.constructor)!==null&&j!==void 0&&j.name)T+=`. Received an instance of ${M.constructor.name}`;else{let U=o(M,{depth:-1});T+=`. Received ${U}`}}else{let U=o(M,{colors:!1});U.length>25&&(U=`${U.slice(0,25)}...`),T+=`. Received type ${typeof M} (${U})`}return T},TypeError),w("ERR_INVALID_ARG_VALUE",(A,E,M="is invalid")=>{let T=o(E);return T.length>128&&(T=T.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${M}. Received ${T}`},TypeError),w("ERR_INVALID_RETURN_VALUE",(A,E,M)=>{var T;let z=M!=null&&(T=M.constructor)!==null&&T!==void 0&&T.name?`instance of ${M.constructor.name}`:`type ${typeof M}`;return`Expected ${A} to be returned from the "${E}" function but got ${z}.`},TypeError),w("ERR_MISSING_ARGS",(...A)=>{y(A.length>0,"At least one arg needs to be specified");let E,M=A.length;switch(A=(Array.isArray(A)?A:[A]).map(T=>`"${T}"`).join(" or "),M){case 1:E+=`The ${A[0]} argument`;break;case 2:E+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let T=A.pop();E+=`The ${A.join(", ")}, and ${T} arguments`}break}return`${E} must be specified`},TypeError),w("ERR_OUT_OF_RANGE",(A,E,M)=>{y(E,'Missing "range" argument');let T;if(Number.isInteger(M)&&Math.abs(M)>2**32)T=g(String(M));else if(typeof M=="bigint"){T=String(M);let z=BigInt(2)**BigInt(32);(M>z||M<-z)&&(T=g(T)),T+="n"}else T=o(M);return`The value of "${A}" is out of range. It must be ${E}. Received ${T}`},RangeError),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),w("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),w("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),w("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),w("ERR_STREAM_WRITE_AFTER_END","write after end",Error),w("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:R,aggregateTwoErrors:F(I),hideStackFrames:F,codes:p}}),sf=qe((e,t)=>{Pe(),Le(),ke();var{AbortController:n,AbortSignal:o}=typeof self<"u"?self:typeof window<"u"?window:void 0;t.exports=n,t.exports.AbortSignal=o,t.exports.default=n}),$s={};ll($s,{EventEmitter:()=>M3,default:()=>Eu,defaultMaxListeners:()=>j3,init:()=>U3,listenerCount:()=>N3,on:()=>D3,once:()=>P3});function LH(){if(oA)return gc;oA=!0;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(M,T,z){return Function.prototype.apply.call(M,T,z)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:n=function(M){return Object.getOwnPropertyNames(M)};function o(M){console&&console.warn&&console.warn(M)}var s=Number.isNaN||function(M){return M!==M};function a(){a.init.call(this)}gc=a,gc.once=R,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(M){if(typeof M!="number"||M<0||s(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");l=M}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||s(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this};function h(M){return M._maxListeners===void 0?a.defaultMaxListeners:M._maxListeners}a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(M){for(var T=[],z=1;z<arguments.length;z++)T.push(arguments[z]);var L=M==="error",k=this._events;if(k!==void 0)L=L&&k.error===void 0;else if(!L)return!1;if(L){var j;if(T.length>0&&(j=T[0]),j instanceof Error)throw j;var U=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw U.context=j,U}var $=k[M];if($===void 0)return!1;if(typeof $=="function")t($,this,T);else for(var N=$.length,Z=w($,N),z=0;z<N;++z)t(Z[z],this,T);return!0};function f(M,T,z,L){var k,j,U;if(c(z),j=M._events,j===void 0?(j=M._events=Object.create(null),M._eventsCount=0):(j.newListener!==void 0&&(M.emit("newListener",T,z.listener?z.listener:z),j=M._events),U=j[T]),U===void 0)U=j[T]=z,++M._eventsCount;else if(typeof U=="function"?U=j[T]=L?[z,U]:[U,z]:L?U.unshift(z):U.push(z),k=h(M),k>0&&U.length>k&&!U.warned){U.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=M,$.type=T,$.count=U.length,o($)}return M}a.prototype.addListener=function(M,T){return f(this,M,T,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(M,T){return f(this,M,T,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(M,T,z){var L={fired:!1,wrapFn:void 0,target:M,type:T,listener:z},k=p.bind(L);return k.listener=z,L.wrapFn=k,k}a.prototype.once=function(M,T){return c(T),this.on(M,y(this,M,T)),this},a.prototype.prependOnceListener=function(M,T){return c(T),this.prependListener(M,y(this,M,T)),this},a.prototype.removeListener=function(M,T){var z,L,k,j,U;if(c(T),L=this._events,L===void 0)return this;if(z=L[M],z===void 0)return this;if(z===T||z.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete L[M],L.removeListener&&this.emit("removeListener",M,z.listener||T));else if(typeof z!="function"){for(k=-1,j=z.length-1;j>=0;j--)if(z[j]===T||z[j].listener===T){U=z[j].listener,k=j;break}if(k<0)return this;k===0?z.shift():F(z,k),z.length===1&&(L[M]=z[0]),L.removeListener!==void 0&&this.emit("removeListener",M,U||T)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(M){var T,z,L;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[M]),this;if(arguments.length===0){var k=Object.keys(z),j;for(L=0;L<k.length;++L)j=k[L],j!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=z[M],typeof T=="function")this.removeListener(M,T);else if(T!==void 0)for(L=T.length-1;L>=0;L--)this.removeListener(M,T[L]);return this};function g(M,T,z){var L=M._events;if(L===void 0)return[];var k=L[T];return k===void 0?[]:typeof k=="function"?z?[k.listener||k]:[k]:z?I(k):w(k,k.length)}a.prototype.listeners=function(M){return g(this,M,!0)},a.prototype.rawListeners=function(M){return g(this,M,!1)},a.listenerCount=function(M,T){return typeof M.listenerCount=="function"?M.listenerCount(T):b.call(M,T)},a.prototype.listenerCount=b;function b(M){var T=this._events;if(T!==void 0){var z=T[M];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function w(M,T){for(var z=new Array(T),L=0;L<T;++L)z[L]=M[L];return z}function F(M,T){for(;T+1<M.length;T++)M[T]=M[T+1];M.pop()}function I(M){for(var T=new Array(M.length),z=0;z<T.length;++z)T[z]=M[z].listener||M[z];return T}function R(M,T){return new Promise(function(z,L){function k(U){M.removeListener(T,j),L(U)}function j(){typeof M.removeListener=="function"&&M.removeListener("error",k),z([].slice.call(arguments))}E(M,T,j,{once:!0}),T!=="error"&&A(M,k,{once:!0})})}function A(M,T,z){typeof M.on=="function"&&E(M,"error",T,z)}function E(M,T,z,L){if(typeof M.on=="function")L.once?M.once(T,z):M.on(T,z);else if(typeof M.addEventListener=="function")M.addEventListener(T,function k(j){L.once&&M.removeEventListener(T,k),z(j)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return gc}var gc,oA,Eu,M3,j3,U3,N3,D3,P3,Pa=Ln(()=>{Pe(),Le(),ke(),gc={},oA=!1,Eu=LH(),Eu.once,Eu.once=function(e,t){return new Promise((n,o)=>{function s(...l){a!==void 0&&e.removeListener("error",a),n(l)}let a;t!=="error"&&(a=l=>{e.removeListener(name,s),o(l)},e.once("error",a)),e.once(t,s)})},Eu.on=function(e,t){let n=[],o=[],s=null,a=!1,l={async next(){let f=n.shift();if(f)return createIterResult(f,!1);if(s){let p=Promise.reject(s);return s=null,p}return a?createIterResult(void 0,!0):new Promise((p,y)=>o.push({resolve:p,reject:y}))},async return(){e.removeListener(t,c),e.removeListener("error",h),a=!0;for(let f of o)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){s=f,e.removeListener(t,c),e.removeListener("error",h)},[Symbol.asyncIterator](){return this}};return e.on(t,c),e.on("error",h),l;function c(...f){let p=o.shift();p?p.resolve(createIterResult(f,!1)):n.push(f)}function h(f){a=!0;let p=o.shift();p?p.reject(f):s=f,l.return()}},{EventEmitter:M3,defaultMaxListeners:j3,init:U3,listenerCount:N3,on:D3,once:P3}=Eu}),jn=qe((e,t)=>{Pe(),Le(),ke();var n=(Yr(),Vt(Kr)),{format:o,inspect:s}=R3(),{codes:{ERR_INVALID_ARG_TYPE:a}}=vn(),{kResistStopPropagation:l,AggregateError:c,SymbolDispose:h}=lr(),f=globalThis.AbortSignal||sf().AbortSignal,p=globalThis.AbortController||sf().AbortController,y=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||n.Blob,b=typeof g<"u"?function(I){return I instanceof g}:function(I){return!1},w=(I,R)=>{if(I!==void 0&&(I===null||typeof I!="object"||!("aborted"in I)))throw new a(R,"AbortSignal",I)},F=(I,R)=>{if(typeof I!="function")throw new a(R,"Function",I)};t.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(I){let R=!1;return function(...A){R||(R=!0,I.apply(this,A))}},createDeferredPromise:function(){let I,R;return{promise:new Promise((A,E)=>{I=A,R=E}),resolve:I,reject:R}},promisify(I){return new Promise((R,A)=>{I((E,...M)=>E?A(E):R(...M))})},debuglog(){return function(){}},format:o,inspect:s,types:{isAsyncFunction(I){return I instanceof y},isArrayBufferView(I){return ArrayBuffer.isView(I)}},isBlob:b,deprecate(I,R){return I},addAbortListener:(Pa(),Vt($s)).addAbortListener||function(I,R){if(I===void 0)throw new a("signal","AbortSignal",I);w(I,"signal"),F(R,"listener");let A;return I.aborted?queueMicrotask(()=>R()):(I.addEventListener("abort",R,{__proto__:null,once:!0,[l]:!0}),A=()=>{I.removeEventListener("abort",R)}),{__proto__:null,[h](){var E;(E=A)===null||E===void 0||E()}}},AbortSignalAny:f.any||function(I){if(I.length===1)return I[0];let R=new p,A=()=>R.abort();return I.forEach(E=>{w(E,"signals"),E.addEventListener("abort",A,{once:!0})}),R.signal.addEventListener("abort",()=>{I.forEach(E=>E.removeEventListener("abort",A))},{once:!0}),R.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Bf=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeJoin:s,ArrayPrototypeMap:a,NumberIsInteger:l,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:h,NumberMIN_SAFE_INTEGER:f,NumberParseInt:p,ObjectPrototypeHasOwnProperty:y,RegExpPrototypeExec:g,String:b,StringPrototypeToUpperCase:w,StringPrototypeTrim:F}=lr(),{hideStackFrames:I,codes:{ERR_SOCKET_BAD_PORT:R,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:E,ERR_OUT_OF_RANGE:M,ERR_UNKNOWN_SIGNAL:T}}=vn(),{normalizeEncoding:z}=jn(),{isAsyncFunction:L,isArrayBufferView:k}=jn().types,j={};function U(ce){return ce===(ce|0)}function $(ce){return ce===ce>>>0}var N=/^[0-7]+$/,Z="must be a 32-bit unsigned integer or an octal string";function re(ce,Se,Be){if(typeof ce>"u"&&(ce=Be),typeof ce=="string"){if(g(N,ce)===null)throw new E(Se,ce,Z);ce=p(ce,8)}return ae(ce,Se),ce}var ie=I((ce,Se,Be=f,de=h)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new M(Se,"an integer",ce);if(ce<Be||ce>de)throw new M(Se,`>= ${Be} && <= ${de}`,ce)}),X=I((ce,Se,Be=-2147483648,de=2147483647)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new M(Se,"an integer",ce);if(ce<Be||ce>de)throw new M(Se,`>= ${Be} && <= ${de}`,ce)}),ae=I((ce,Se,Be=!1)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new M(Se,"an integer",ce);let de=Be?1:0,ve=4294967295;if(ce<de||ce>ve)throw new M(Se,`>= ${de} && <= ${ve}`,ce)});function ye(ce,Se){if(typeof ce!="string")throw new A(Se,"string",ce)}function le(ce,Se,Be=void 0,de){if(typeof ce!="number")throw new A(Se,"number",ce);if(Be!=null&&ce<Be||de!=null&&ce>de||(Be!=null||de!=null)&&c(ce))throw new M(Se,`${Be!=null?`>= ${Be}`:""}${Be!=null&&de!=null?" && ":""}${de!=null?`<= ${de}`:""}`,ce)}var ee=I((ce,Se,Be)=>{if(!o(Be,ce)){let de="must be one of: "+s(a(Be,ve=>typeof ve=="string"?`'${ve}'`:b(ve)),", ");throw new E(Se,ce,de)}});function G(ce,Se){if(typeof ce!="boolean")throw new A(Se,"boolean",ce)}function Q(ce,Se,Be){return ce==null||!y(ce,Se)?Be:ce[Se]}var K=I((ce,Se,Be=null)=>{let de=Q(Be,"allowArray",!1),ve=Q(Be,"allowFunction",!1);if(!Q(Be,"nullable",!1)&&ce===null||!de&&n(ce)||typeof ce!="object"&&(!ve||typeof ce!="function"))throw new A(Se,"Object",ce)}),W=I((ce,Se)=>{if(ce!=null&&typeof ce!="object"&&typeof ce!="function")throw new A(Se,"a dictionary",ce)}),q=I((ce,Se,Be=0)=>{if(!n(ce))throw new A(Se,"Array",ce);if(ce.length<Be){let de=`must be longer than ${Be}`;throw new E(Se,ce,de)}});function fe(ce,Se){q(ce,Se);for(let Be=0;Be<ce.length;Be++)ye(ce[Be],`${Se}[${Be}]`)}function ue(ce,Se){q(ce,Se);for(let Be=0;Be<ce.length;Be++)G(ce[Be],`${Se}[${Be}]`)}function ne(ce,Se){q(ce,Se);for(let Be=0;Be<ce.length;Be++){let de=ce[Be],ve=`${Se}[${Be}]`;if(de==null)throw new A(ve,"AbortSignal",de);se(de,ve)}}function J(ce,Se="signal"){if(ye(ce,Se),j[ce]===void 0)throw j[w(ce)]!==void 0?new T(ce+" (signals must use all capital letters)"):new T(ce)}var O=I((ce,Se="buffer")=>{if(!k(ce))throw new A(Se,["Buffer","TypedArray","DataView"],ce)});function H(ce,Se){let Be=z(Se),de=ce.length;if(Be==="hex"&&de%2!==0)throw new E("encoding",Se,`is invalid for data of length ${de}`)}function Y(ce,Se="Port",Be=!0){if(typeof ce!="number"&&typeof ce!="string"||typeof ce=="string"&&F(ce).length===0||+ce!==+ce>>>0||ce>65535||ce===0&&!Be)throw new R(Se,ce,Be);return ce|0}var se=I((ce,Se)=>{if(ce!==void 0&&(ce===null||typeof ce!="object"||!("aborted"in ce)))throw new A(Se,"AbortSignal",ce)}),pe=I((ce,Se)=>{if(typeof ce!="function")throw new A(Se,"Function",ce)}),te=I((ce,Se)=>{if(typeof ce!="function"||L(ce))throw new A(Se,"Function",ce)}),_=I((ce,Se)=>{if(ce!==void 0)throw new A(Se,"undefined",ce)});function v(ce,Se,Be){if(!o(Be,ce))throw new A(Se,`('${s(Be,"|")}')`,ce)}var C=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function P(ce,Se){if(typeof ce>"u"||!g(C,ce))throw new E(Se,ce,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function he(ce){if(typeof ce=="string")return P(ce,"hints"),ce;if(n(ce)){let Se=ce.length,Be="";if(Se===0)return Be;for(let de=0;de<Se;de++){let ve=ce[de];P(ve,"hints"),Be+=ve,de!==Se-1&&(Be+=", ")}return Be}throw new E("hints",ce,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:U,isUint32:$,parseFileMode:re,validateArray:q,validateStringArray:fe,validateBooleanArray:ue,validateAbortSignalArray:ne,validateBoolean:G,validateBuffer:O,validateDictionary:W,validateEncoding:H,validateFunction:pe,validateInt32:X,validateInteger:ie,validateNumber:le,validateObject:K,validateOneOf:ee,validatePlainFunction:te,validatePort:Y,validateSignalName:J,validateString:ye,validateUint32:ae,validateUndefined:_,validateUnion:v,validateAbortSignal:se,validateLinkHeaderValue:he}}),ka=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports={},o,s;function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=a}catch{o=a}try{typeof clearTimeout=="function"?s=clearTimeout:s=l}catch{s=l}})();function c(R){if(o===setTimeout)return setTimeout(R,0);if((o===a||!o)&&setTimeout)return o=setTimeout,setTimeout(R,0);try{return o(R,0)}catch{try{return o.call(null,R,0)}catch{return o.call(this,R,0)}}}function h(R){if(s===clearTimeout)return clearTimeout(R);if((s===l||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(R);try{return s(R)}catch{try{return s.call(null,R)}catch{return s.call(this,R)}}}var f=[],p=!1,y,g=-1;function b(){!p||!y||(p=!1,y.length?f=y.concat(f):g=-1,f.length&&w())}function w(){if(!p){var R=c(b);p=!0;for(var A=f.length;A;){for(y=f,f=[];++g<A;)y&&y[g].run();g=-1,A=f.length}y=null,p=!1,h(R)}}n.nextTick=function(R){var A=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)A[E-1]=arguments[E];f.push(new F(R,A)),f.length===1&&!p&&c(w)};function F(R,A){this.fun=R,this.array=A}F.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function I(){}n.on=I,n.addListener=I,n.once=I,n.off=I,n.removeListener=I,n.removeAllListeners=I,n.emit=I,n.prependListener=I,n.prependOnceListener=I,n.listeners=function(R){return[]},n.binding=function(R){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(R){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}),Ko=qe((e,t)=>{Pe(),Le(),ke();var{SymbolAsyncIterator:n,SymbolIterator:o,SymbolFor:s}=lr(),a=s("nodejs.stream.destroyed"),l=s("nodejs.stream.errored"),c=s("nodejs.stream.readable"),h=s("nodejs.stream.writable"),f=s("nodejs.stream.disturbed"),p=s("nodejs.webstream.isClosedPromise"),y=s("nodejs.webstream.controllerErrorFunction");function g(Q,K=!1){var W;return!!(Q&&typeof Q.pipe=="function"&&typeof Q.on=="function"&&(!K||typeof Q.pause=="function"&&typeof Q.resume=="function")&&(!Q._writableState||((W=Q._readableState)===null||W===void 0?void 0:W.readable)!==!1)&&(!Q._writableState||Q._readableState))}function b(Q){var K;return!!(Q&&typeof Q.write=="function"&&typeof Q.on=="function"&&(!Q._readableState||((K=Q._writableState)===null||K===void 0?void 0:K.writable)!==!1))}function w(Q){return!!(Q&&typeof Q.pipe=="function"&&Q._readableState&&typeof Q.on=="function"&&typeof Q.write=="function")}function F(Q){return Q&&(Q._readableState||Q._writableState||typeof Q.write=="function"&&typeof Q.on=="function"||typeof Q.pipe=="function"&&typeof Q.on=="function")}function I(Q){return!!(Q&&!F(Q)&&typeof Q.pipeThrough=="function"&&typeof Q.getReader=="function"&&typeof Q.cancel=="function")}function R(Q){return!!(Q&&!F(Q)&&typeof Q.getWriter=="function"&&typeof Q.abort=="function")}function A(Q){return!!(Q&&!F(Q)&&typeof Q.readable=="object"&&typeof Q.writable=="object")}function E(Q){return I(Q)||R(Q)||A(Q)}function M(Q,K){return Q==null?!1:K===!0?typeof Q[n]=="function":K===!1?typeof Q[o]=="function":typeof Q[n]=="function"||typeof Q[o]=="function"}function T(Q){if(!F(Q))return null;let K=Q._writableState,W=Q._readableState,q=K||W;return!!(Q.destroyed||Q[a]||q!=null&&q.destroyed)}function z(Q){if(!b(Q))return null;if(Q.writableEnded===!0)return!0;let K=Q._writableState;return K!=null&&K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function L(Q,K){if(!b(Q))return null;if(Q.writableFinished===!0)return!0;let W=Q._writableState;return W!=null&&W.errored?!1:typeof(W==null?void 0:W.finished)!="boolean"?null:!!(W.finished||K===!1&&W.ended===!0&&W.length===0)}function k(Q){if(!g(Q))return null;if(Q.readableEnded===!0)return!0;let K=Q._readableState;return!K||K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function j(Q,K){if(!g(Q))return null;let W=Q._readableState;return W!=null&&W.errored?!1:typeof(W==null?void 0:W.endEmitted)!="boolean"?null:!!(W.endEmitted||K===!1&&W.ended===!0&&W.length===0)}function U(Q){return Q&&Q[c]!=null?Q[c]:typeof(Q==null?void 0:Q.readable)!="boolean"?null:T(Q)?!1:g(Q)&&Q.readable&&!j(Q)}function $(Q){return Q&&Q[h]!=null?Q[h]:typeof(Q==null?void 0:Q.writable)!="boolean"?null:T(Q)?!1:b(Q)&&Q.writable&&!z(Q)}function N(Q,K){return F(Q)?T(Q)?!0:!((K==null?void 0:K.readable)!==!1&&U(Q)||(K==null?void 0:K.writable)!==!1&&$(Q)):null}function Z(Q){var K,W;return F(Q)?Q.writableErrored?Q.writableErrored:(K=(W=Q._writableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function re(Q){var K,W;return F(Q)?Q.readableErrored?Q.readableErrored:(K=(W=Q._readableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function ie(Q){if(!F(Q))return null;if(typeof Q.closed=="boolean")return Q.closed;let K=Q._writableState,W=Q._readableState;return typeof(K==null?void 0:K.closed)=="boolean"||typeof(W==null?void 0:W.closed)=="boolean"?(K==null?void 0:K.closed)||(W==null?void 0:W.closed):typeof Q._closed=="boolean"&&X(Q)?Q._closed:null}function X(Q){return typeof Q._closed=="boolean"&&typeof Q._defaultKeepAlive=="boolean"&&typeof Q._removedConnection=="boolean"&&typeof Q._removedContLen=="boolean"}function ae(Q){return typeof Q._sent100=="boolean"&&X(Q)}function ye(Q){var K;return typeof Q._consuming=="boolean"&&typeof Q._dumped=="boolean"&&((K=Q.req)===null||K===void 0?void 0:K.upgradeOrConnect)===void 0}function le(Q){if(!F(Q))return null;let K=Q._writableState,W=Q._readableState,q=K||W;return!q&&ae(Q)||!!(q&&q.autoDestroy&&q.emitClose&&q.closed===!1)}function ee(Q){var K;return!!(Q&&((K=Q[f])!==null&&K!==void 0?K:Q.readableDidRead||Q.readableAborted))}function G(Q){var K,W,q,fe,ue,ne,J,O,H,Y;return!!(Q&&((K=(W=(q=(fe=(ue=(ne=Q[l])!==null&&ne!==void 0?ne:Q.readableErrored)!==null&&ue!==void 0?ue:Q.writableErrored)!==null&&fe!==void 0?fe:(J=Q._readableState)===null||J===void 0?void 0:J.errorEmitted)!==null&&q!==void 0?q:(O=Q._writableState)===null||O===void 0?void 0:O.errorEmitted)!==null&&W!==void 0?W:(H=Q._readableState)===null||H===void 0?void 0:H.errored)!==null&&K!==void 0?K:!((Y=Q._writableState)===null||Y===void 0)&&Y.errored))}t.exports={isDestroyed:T,kIsDestroyed:a,isDisturbed:ee,kIsDisturbed:f,isErrored:G,kIsErrored:l,isReadable:U,kIsReadable:c,kIsClosedPromise:p,kControllerErrorFunction:y,kIsWritable:h,isClosed:ie,isDuplexNodeStream:w,isFinished:N,isIterable:M,isReadableNodeStream:g,isReadableStream:I,isReadableEnded:k,isReadableFinished:j,isReadableErrored:re,isNodeStream:F,isWebStream:E,isWritable:$,isWritableNodeStream:b,isWritableStream:R,isWritableEnded:z,isWritableFinished:L,isWritableErrored:Z,isServerRequest:ye,isServerResponse:ae,willEmitClose:le,isTransformStream:A}}),zs=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{AbortError:o,codes:s}=vn(),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:l}=s,{kEmptyObject:c,once:h}=jn(),{validateAbortSignal:f,validateFunction:p,validateObject:y,validateBoolean:g}=Bf(),{Promise:b,PromisePrototypeThen:w,SymbolDispose:F}=lr(),{isClosed:I,isReadable:R,isReadableNodeStream:A,isReadableStream:E,isReadableFinished:M,isReadableErrored:T,isWritable:z,isWritableNodeStream:L,isWritableStream:k,isWritableFinished:j,isWritableErrored:U,isNodeStream:$,willEmitClose:N,kIsClosedPromise:Z}=Ko(),re;function ie(ee){return ee.setHeader&&typeof ee.abort=="function"}var X=()=>{};function ae(ee,G,Q){var K,W;if(arguments.length===2?(Q=G,G=c):G==null?G=c:y(G,"options"),p(Q,"callback"),f(G.signal,"options.signal"),Q=h(Q),E(ee)||k(ee))return ye(ee,G,Q);if(!$(ee))throw new a("stream",["ReadableStream","WritableStream","Stream"],ee);let q=(K=G.readable)!==null&&K!==void 0?K:A(ee),fe=(W=G.writable)!==null&&W!==void 0?W:L(ee),ue=ee._writableState,ne=ee._readableState,J=()=>{ee.writable||Y()},O=N(ee)&&A(ee)===q&&L(ee)===fe,H=j(ee,!1),Y=()=>{H=!0,ee.destroyed&&(O=!1),!(O&&(!ee.readable||q))&&(!q||se)&&Q.call(ee)},se=M(ee,!1),pe=()=>{se=!0,ee.destroyed&&(O=!1),!(O&&(!ee.writable||fe))&&(!fe||H)&&Q.call(ee)},te=ce=>{Q.call(ee,ce)},_=I(ee),v=()=>{_=!0;let ce=U(ee)||T(ee);if(ce&&typeof ce!="boolean")return Q.call(ee,ce);if(q&&!se&&A(ee,!0)&&!M(ee,!1))return Q.call(ee,new l);if(fe&&!H&&!j(ee,!1))return Q.call(ee,new l);Q.call(ee)},C=()=>{_=!0;let ce=U(ee)||T(ee);if(ce&&typeof ce!="boolean")return Q.call(ee,ce);Q.call(ee)},P=()=>{ee.req.on("finish",Y)};ie(ee)?(ee.on("complete",Y),O||ee.on("abort",v),ee.req?P():ee.on("request",P)):fe&&!ue&&(ee.on("end",J),ee.on("close",J)),!O&&typeof ee.aborted=="boolean"&&ee.on("aborted",v),ee.on("end",pe),ee.on("finish",Y),G.error!==!1&&ee.on("error",te),ee.on("close",v),_?n.nextTick(v):ue!=null&&ue.errorEmitted||ne!=null&&ne.errorEmitted?O||n.nextTick(C):(!q&&(!O||R(ee))&&(H||z(ee)===!1)||!fe&&(!O||z(ee))&&(se||R(ee)===!1)||ne&&ee.req&&ee.aborted)&&n.nextTick(C);let he=()=>{Q=X,ee.removeListener("aborted",v),ee.removeListener("complete",Y),ee.removeListener("abort",v),ee.removeListener("request",P),ee.req&&ee.req.removeListener("finish",Y),ee.removeListener("end",J),ee.removeListener("close",J),ee.removeListener("finish",Y),ee.removeListener("end",pe),ee.removeListener("error",te),ee.removeListener("close",v)};if(G.signal&&!_){let ce=()=>{let Se=Q;he(),Se.call(ee,new o(void 0,{cause:G.signal.reason}))};if(G.signal.aborted)n.nextTick(ce);else{re=re||jn().addAbortListener;let Se=re(G.signal,ce),Be=Q;Q=h((...de)=>{Se[F](),Be.apply(ee,de)})}}return he}function ye(ee,G,Q){let K=!1,W=X;if(G.signal)if(W=()=>{K=!0,Q.call(ee,new o(void 0,{cause:G.signal.reason}))},G.signal.aborted)n.nextTick(W);else{re=re||jn().addAbortListener;let fe=re(G.signal,W),ue=Q;Q=h((...ne)=>{fe[F](),ue.apply(ee,ne)})}let q=(...fe)=>{K||n.nextTick(()=>Q.apply(ee,fe))};return w(ee[Z].promise,q,q),X}function le(ee,G){var Q;let K=!1;return G===null&&(G=c),(Q=G)!==null&&Q!==void 0&&Q.cleanup&&(g(G.cleanup,"cleanup"),K=G.cleanup),new b((W,q)=>{let fe=ae(ee,G,ue=>{K&&fe(),ue?q(ue):W()})})}t.exports=ae,t.exports.finished=le}),cl=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:a}=vn(),{Symbol:l}=lr(),{kIsDestroyed:c,isDestroyed:h,isFinished:f,isServerRequest:p}=Ko(),y=l("kDestroy"),g=l("kConstruct");function b(N,Z,re){N&&(N.stack,Z&&!Z.errored&&(Z.errored=N),re&&!re.errored&&(re.errored=N))}function w(N,Z){let re=this._readableState,ie=this._writableState,X=ie||re;return ie!=null&&ie.destroyed||re!=null&&re.destroyed?(typeof Z=="function"&&Z(),this):(b(N,ie,re),ie&&(ie.destroyed=!0),re&&(re.destroyed=!0),X.constructed?F(this,N,Z):this.once(y,function(ae){F(this,o(ae,N),Z)}),this)}function F(N,Z,re){let ie=!1;function X(ae){if(ie)return;ie=!0;let ye=N._readableState,le=N._writableState;b(ae,le,ye),le&&(le.closed=!0),ye&&(ye.closed=!0),typeof re=="function"&&re(ae),ae?n.nextTick(I,N,ae):n.nextTick(R,N)}try{N._destroy(Z||null,X)}catch(ae){X(ae)}}function I(N,Z){A(N,Z),R(N)}function R(N){let Z=N._readableState,re=N._writableState;re&&(re.closeEmitted=!0),Z&&(Z.closeEmitted=!0),(re!=null&&re.emitClose||Z!=null&&Z.emitClose)&&N.emit("close")}function A(N,Z){let re=N._readableState,ie=N._writableState;ie!=null&&ie.errorEmitted||re!=null&&re.errorEmitted||(ie&&(ie.errorEmitted=!0),re&&(re.errorEmitted=!0),N.emit("error",Z))}function E(){let N=this._readableState,Z=this._writableState;N&&(N.constructed=!0,N.closed=!1,N.closeEmitted=!1,N.destroyed=!1,N.errored=null,N.errorEmitted=!1,N.reading=!1,N.ended=N.readable===!1,N.endEmitted=N.readable===!1),Z&&(Z.constructed=!0,Z.destroyed=!1,Z.closed=!1,Z.closeEmitted=!1,Z.errored=null,Z.errorEmitted=!1,Z.finalCalled=!1,Z.prefinished=!1,Z.ended=Z.writable===!1,Z.ending=Z.writable===!1,Z.finished=Z.writable===!1)}function M(N,Z,re){let ie=N._readableState,X=N._writableState;if(X!=null&&X.destroyed||ie!=null&&ie.destroyed)return this;ie!=null&&ie.autoDestroy||X!=null&&X.autoDestroy?N.destroy(Z):Z&&(Z.stack,X&&!X.errored&&(X.errored=Z),ie&&!ie.errored&&(ie.errored=Z),re?n.nextTick(A,N,Z):A(N,Z))}function T(N,Z){if(typeof N._construct!="function")return;let re=N._readableState,ie=N._writableState;re&&(re.constructed=!1),ie&&(ie.constructed=!1),N.once(g,Z),!(N.listenerCount(g)>1)&&n.nextTick(z,N)}function z(N){let Z=!1;function re(ie){if(Z){M(N,ie??new s);return}Z=!0;let X=N._readableState,ae=N._writableState,ye=ae||X;X&&(X.constructed=!0),ae&&(ae.constructed=!0),ye.destroyed?N.emit(y,ie):ie?M(N,ie,!0):n.nextTick(L,N)}try{N._construct(ie=>{n.nextTick(re,ie)})}catch(ie){n.nextTick(re,ie)}}function L(N){N.emit(g)}function k(N){return(N==null?void 0:N.setHeader)&&typeof N.abort=="function"}function j(N){N.emit("close")}function U(N,Z){N.emit("error",Z),n.nextTick(j,N)}function $(N,Z){!N||h(N)||(!Z&&!f(N)&&(Z=new a),p(N)?(N.socket=null,N.destroy(Z)):k(N)?N.abort():k(N.req)?N.req.abort():typeof N.destroy=="function"?N.destroy(Z):typeof N.close=="function"?N.close():Z?n.nextTick(U,N,Z):n.nextTick(j,N),N.destroyed||(N[c]=!0))}t.exports={construct:T,destroyer:$,destroy:w,undestroy:E,errorOrDestroy:M}}),Fv=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ObjectSetPrototypeOf:o}=lr(),{EventEmitter:s}=(Pa(),Vt($s));function a(c){s.call(this,c)}o(a.prototype,s.prototype),o(a,s),a.prototype.pipe=function(c,h){let f=this;function p(R){c.writable&&c.write(R)===!1&&f.pause&&f.pause()}f.on("data",p);function y(){f.readable&&f.resume&&f.resume()}c.on("drain",y),!c._isStdio&&(!h||h.end!==!1)&&(f.on("end",b),f.on("close",w));let g=!1;function b(){g||(g=!0,c.end())}function w(){g||(g=!0,typeof c.destroy=="function"&&c.destroy())}function F(R){I(),s.listenerCount(this,"error")===0&&this.emit("error",R)}l(f,"error",F),l(c,"error",F);function I(){f.removeListener("data",p),c.removeListener("drain",y),f.removeListener("end",b),f.removeListener("close",w),f.removeListener("error",F),c.removeListener("error",F),f.removeListener("end",I),f.removeListener("close",I),c.removeListener("close",I)}return f.on("end",I),f.on("close",I),c.on("close",I),c.emit("pipe",f),c};function l(c,h,f){if(typeof c.prependListener=="function")return c.prependListener(h,f);!c._events||!c._events[h]?c.on(h,f):n(c._events[h])?c._events[h].unshift(f):c._events[h]=[f,c._events[h]]}t.exports={Stream:a,prependListener:l}}),qp=qe((e,t)=>{Pe(),Le(),ke();var{SymbolDispose:n}=lr(),{AbortError:o,codes:s}=vn(),{isNodeStream:a,isWebStream:l,kControllerErrorFunction:c}=Ko(),h=zs(),{ERR_INVALID_ARG_TYPE:f}=s,p,y=(g,b)=>{if(typeof g!="object"||!("aborted"in g))throw new f(b,"AbortSignal",g)};t.exports.addAbortSignal=function(g,b){if(y(g,"signal"),!a(b)&&!l(b))throw new f("stream",["ReadableStream","WritableStream","Stream"],b);return t.exports.addAbortSignalNoValidate(g,b)},t.exports.addAbortSignalNoValidate=function(g,b){if(typeof g!="object"||!("aborted"in g))return b;let w=a(b)?()=>{b.destroy(new o(void 0,{cause:g.reason}))}:()=>{b[c](new o(void 0,{cause:g.reason}))};if(g.aborted)w();else{p=p||jn().addAbortListener;let F=p(g,w);h(b,F[n])}return b}}),$H=qe((e,t)=>{Pe(),Le(),ke();var{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:s,Uint8Array:a}=lr(),{Buffer:l}=(Yr(),Vt(Kr)),{inspect:c}=jn();t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(h){let f={data:h,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length}unshift(h){let f={data:h,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length}shift(){if(this.length===0)return;let h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}clear(){this.head=this.tail=null,this.length=0}join(h){if(this.length===0)return"";let f=this.head,p=""+f.data;for(;(f=f.next)!==null;)p+=h+f.data;return p}concat(h){if(this.length===0)return l.alloc(0);let f=l.allocUnsafe(h>>>0),p=this.head,y=0;for(;p;)s(f,p.data,y),y+=p.data.length,p=p.next;return f}consume(h,f){let p=this.head.data;if(h<p.length){let y=p.slice(0,h);return this.head.data=p.slice(h),y}return h===p.length?this.shift():f?this._getString(h):this._getBuffer(h)}first(){return this.head.data}*[o](){for(let h=this.head;h;h=h.next)yield h.data}_getString(h){let f="",p=this.head,y=0;do{let g=p.data;if(h>g.length)f+=g,h-=g.length;else{h===g.length?(f+=g,++y,p.next?this.head=p.next:this.head=this.tail=null):(f+=n(g,0,h),this.head=p,p.data=n(g,h));break}++y}while((p=p.next)!==null);return this.length-=y,f}_getBuffer(h){let f=l.allocUnsafe(h),p=h,y=this.head,g=0;do{let b=y.data;if(h>b.length)s(f,b,p-h),h-=b.length;else{h===b.length?(s(f,b,p-h),++g,y.next?this.head=y.next:this.head=this.tail=null):(s(f,new a(b.buffer,b.byteOffset,h),p-h),this.head=y,y.data=b.slice(h));break}++g}while((y=y.next)!==null);return this.length-=g,f}[Symbol.for("nodejs.util.inspect.custom")](h,f){return c(this,{...f,depth:0,customInspect:!1})}}}),Hp=qe((e,t)=>{Pe(),Le(),ke();var{MathFloor:n,NumberIsInteger:o}=lr(),{validateInteger:s}=Bf(),{ERR_INVALID_ARG_VALUE:a}=vn().codes,l=16*1024,c=16;function h(g,b,w){return g.highWaterMark!=null?g.highWaterMark:b?g[w]:null}function f(g){return g?c:l}function p(g,b){s(b,"value",0),g?c=b:l=b}function y(g,b,w,F){let I=h(b,F,w);if(I!=null){if(!o(I)||I<0){let R=F?`options.${w}`:"options.highWaterMark";throw new a(R,I)}return n(I)}return f(g.objectMode)}t.exports={getHighWaterMark:y,getDefaultHighWaterMark:f,setDefaultHighWaterMark:p}}),zH=qe((e,t)=>{Pe(),Le(),ke();var n=(Yr(),Vt(Kr)),o=n.Buffer;function s(l,c){for(var h in l)c[h]=l[h]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=a);function a(l,c,h){return o(l,c,h)}a.prototype=Object.create(o.prototype),s(o,a),a.from=function(l,c,h){if(typeof l=="number")throw new TypeError("Argument must not be a number");return o(l,c,h)},a.alloc=function(l,c,h){if(typeof l!="number")throw new TypeError("Argument must be a number");var f=o(l);return c!==void 0?typeof h=="string"?f.fill(c,h):f.fill(c):f.fill(0),f},a.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return o(l)},a.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(l)}}),qH=qe(e=>{Pe(),Le(),ke();var t=zH().Buffer,n=t.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(A){if(!A)return"utf8";for(var E;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(E)return;A=(""+A).toLowerCase(),E=!0}}function s(A){var E=o(A);if(typeof E!="string"&&(t.isEncoding===n||!n(A)))throw new Error("Unknown encoding: "+A);return E||A}e.StringDecoder=a;function a(A){this.encoding=s(A);var E;switch(this.encoding){case"utf16le":this.text=g,this.end=b,E=4;break;case"utf8":this.fillLast=f,E=4;break;case"base64":this.text=w,this.end=F,E=3;break;default:this.write=I,this.end=R;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(E)}a.prototype.write=function(A){if(A.length===0)return"";var E,M;if(this.lastNeed){if(E=this.fillLast(A),E===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<A.length?E?E+this.text(A,M):this.text(A,M):E||""},a.prototype.end=y,a.prototype.text=p,a.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function l(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function c(A,E,M){var T=E.length-1;if(T<M)return 0;var z=l(E[T]);return z>=0?(z>0&&(A.lastNeed=z-1),z):--T<M||z===-2?0:(z=l(E[T]),z>=0?(z>0&&(A.lastNeed=z-2),z):--T<M||z===-2?0:(z=l(E[T]),z>=0?(z>0&&(z===2?z=0:A.lastNeed=z-3),z):0))}function h(A,E,M){if((E[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return A.lastNeed=2,"�"}}function f(A){var E=this.lastTotal-this.lastNeed,M=h(this,A);if(M!==void 0)return M;if(this.lastNeed<=A.length)return A.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,E,0,A.length),this.lastNeed-=A.length}function p(A,E){var M=c(this,A,E);if(!this.lastNeed)return A.toString("utf8",E);this.lastTotal=M;var T=A.length-(M-this.lastNeed);return A.copy(this.lastChar,0,T),A.toString("utf8",E,T)}function y(A){var E=A&&A.length?this.write(A):"";return this.lastNeed?E+"�":E}function g(A,E){if((A.length-E)%2===0){var M=A.toString("utf16le",E);if(M){var T=M.charCodeAt(M.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",E,A.length-1)}function b(A){var E=A&&A.length?this.write(A):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,M)}return E}function w(A,E){var M=(A.length-E)%3;return M===0?A.toString("base64",E):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",E,A.length-M))}function F(A){var E=A&&A.length?this.write(A):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function I(A){return A.toString(this.encoding)}function R(A){return A&&A.length?this.write(A):""}}),k3=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{PromisePrototypeThen:o,SymbolAsyncIterator:s,SymbolIterator:a}=lr(),{Buffer:l}=(Yr(),Vt(Kr)),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:h}=vn().codes;function f(p,y,g){let b;if(typeof y=="string"||y instanceof l)return new p({objectMode:!0,...g,read(){this.push(y),this.push(null)}});let w;if(y&&y[s])w=!0,b=y[s]();else if(y&&y[a])w=!1,b=y[a]();else throw new c("iterable",["Iterable"],y);let F=new p({objectMode:!0,highWaterMark:1,...g}),I=!1;F._read=function(){I||(I=!0,A())},F._destroy=function(E,M){o(R(E),()=>n.nextTick(M,E),T=>n.nextTick(M,T||E))};async function R(E){let M=E!=null,T=typeof b.throw=="function";if(M&&T){let{value:z,done:L}=await b.throw(E);if(await z,L)return}if(typeof b.return=="function"){let{value:z}=await b.return();await z}}async function A(){for(;;){try{let{value:E,done:M}=w?await b.next():b.next();if(M)F.push(null);else{let T=E&&typeof E.then=="function"?await E:E;if(T===null)throw I=!1,new h;if(F.push(T))continue;I=!1}}catch(E){F.destroy(E)}break}}return F}t.exports=f}),Qp=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeIndexOf:o,NumberIsInteger:s,NumberIsNaN:a,NumberParseInt:l,ObjectDefineProperties:c,ObjectKeys:h,ObjectSetPrototypeOf:f,Promise:p,SafeSet:y,SymbolAsyncDispose:g,SymbolAsyncIterator:b,Symbol:w}=lr();t.exports=de,de.ReadableState=Be;var{EventEmitter:F}=(Pa(),Vt($s)),{Stream:I,prependListener:R}=Fv(),{Buffer:A}=(Yr(),Vt(Kr)),{addAbortSignal:E}=qp(),M=zs(),T=jn().debuglog("stream",be=>{T=be}),z=$H(),L=cl(),{getHighWaterMark:k,getDefaultHighWaterMark:j}=Hp(),{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:$,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:Z,ERR_STREAM_PUSH_AFTER_EOF:re,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:ie},AbortError:X}=vn(),{validateObject:ae}=Bf(),ye=w("kPaused"),{StringDecoder:le}=qH(),ee=k3();f(de.prototype,I.prototype),f(de,I);var G=()=>{},{errorOrDestroy:Q}=L,K=1,W=2,q=4,fe=8,ue=16,ne=32,J=64,O=128,H=256,Y=512,se=1024,pe=2048,te=4096,_=8192,v=16384,C=32768,P=65536,he=1<<17,ce=1<<18;function Se(be){return{enumerable:!1,get(){return(this.state&be)!==0},set(_e){_e?this.state|=be:this.state&=~be}}}c(Be.prototype,{objectMode:Se(K),ended:Se(W),endEmitted:Se(q),reading:Se(fe),constructed:Se(ue),sync:Se(ne),needReadable:Se(J),emittedReadable:Se(O),readableListening:Se(H),resumeScheduled:Se(Y),errorEmitted:Se(se),emitClose:Se(pe),autoDestroy:Se(te),destroyed:Se(_),closed:Se(v),closeEmitted:Se(C),multiAwaitDrain:Se(P),readingMore:Se(he),dataEmitted:Se(ce)});function Be(be,_e,Ye){typeof Ye!="boolean"&&(Ye=_e instanceof zo()),this.state=pe|te|ue|ne,be&&be.objectMode&&(this.state|=K),Ye&&be&&be.readableObjectMode&&(this.state|=K),this.highWaterMark=be?k(this,be,"readableHighWaterMark",Ye):j(!1),this.buffer=new z,this.length=0,this.pipes=[],this.flowing=null,this[ye]=null,be&&be.emitClose===!1&&(this.state&=~pe),be&&be.autoDestroy===!1&&(this.state&=~te),this.errored=null,this.defaultEncoding=be&&be.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,be&&be.encoding&&(this.decoder=new le(be.encoding),this.encoding=be.encoding)}function de(be){if(!(this instanceof de))return new de(be);let _e=this instanceof zo();this._readableState=new Be(be,this,_e),be&&(typeof be.read=="function"&&(this._read=be.read),typeof be.destroy=="function"&&(this._destroy=be.destroy),typeof be.construct=="function"&&(this._construct=be.construct),be.signal&&!_e&&E(be.signal,this)),I.call(this,be),L.construct(this,()=>{this._readableState.needReadable&&we(this,this._readableState)})}de.prototype.destroy=L.destroy,de.prototype._undestroy=L.undestroy,de.prototype._destroy=function(be,_e){_e(be)},de.prototype[F.captureRejectionSymbol]=function(be){this.destroy(be)},de.prototype[g]=function(){let be;return this.destroyed||(be=this.readableEnded?null:new X,this.destroy(be)),new p((_e,Ye)=>M(this,Ze=>Ze&&Ze!==be?Ye(Ze):_e(null)))},de.prototype.push=function(be,_e){return ve(this,be,_e,!1)},de.prototype.unshift=function(be,_e){return ve(this,be,_e,!0)};function ve(be,_e,Ye,Ze){T("readableAddChunk",_e);let st=be._readableState,qt;if((st.state&K)===0&&(typeof _e=="string"?(Ye=Ye||st.defaultEncoding,st.encoding!==Ye&&(Ze&&st.encoding?_e=A.from(_e,Ye).toString(st.encoding):(_e=A.from(_e,Ye),Ye=""))):_e instanceof A?Ye="":I._isUint8Array(_e)?(_e=I._uint8ArrayToBuffer(_e),Ye=""):_e!=null&&(qt=new $("chunk",["string","Buffer","Uint8Array"],_e))),qt)Q(be,qt);else if(_e===null)st.state&=~fe,me(be,st);else if((st.state&K)!==0||_e&&_e.length>0)if(Ze)if((st.state&q)!==0)Q(be,new ie);else{if(st.destroyed||st.errored)return!1;x(be,st,_e,!0)}else if(st.ended)Q(be,new re);else{if(st.destroyed||st.errored)return!1;st.state&=~fe,st.decoder&&!Ye?(_e=st.decoder.write(_e),st.objectMode||_e.length!==0?x(be,st,_e,!1):we(be,st)):x(be,st,_e,!1)}else Ze||(st.state&=~fe,we(be,st));return!st.ended&&(st.length<st.highWaterMark||st.length===0)}function x(be,_e,Ye,Ze){_e.flowing&&_e.length===0&&!_e.sync&&be.listenerCount("data")>0?((_e.state&P)!==0?_e.awaitDrainWriters.clear():_e.awaitDrainWriters=null,_e.dataEmitted=!0,be.emit("data",Ye)):(_e.length+=_e.objectMode?1:Ye.length,Ze?_e.buffer.unshift(Ye):_e.buffer.push(Ye),(_e.state&J)!==0&&xe(be)),we(be,_e)}de.prototype.isPaused=function(){let be=this._readableState;return be[ye]===!0||be.flowing===!1},de.prototype.setEncoding=function(be){let _e=new le(be);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;let Ye=this._readableState.buffer,Ze="";for(let st of Ye)Ze+=_e.write(st);return Ye.clear(),Ze!==""&&Ye.push(Ze),this._readableState.length=Ze.length,this};var B=1073741824;function D(be){if(be>B)throw new Z("size","<= 1GiB",be);return be--,be|=be>>>1,be|=be>>>2,be|=be>>>4,be|=be>>>8,be|=be>>>16,be++,be}function oe(be,_e){return be<=0||_e.length===0&&_e.ended?0:(_e.state&K)!==0?1:a(be)?_e.flowing&&_e.length?_e.buffer.first().length:_e.length:be<=_e.length?be:_e.ended?_e.length:0}de.prototype.read=function(be){T("read",be),be===void 0?be=NaN:s(be)||(be=l(be,10));let _e=this._readableState,Ye=be;if(be>_e.highWaterMark&&(_e.highWaterMark=D(be)),be!==0&&(_e.state&=~O),be===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return T("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?ft(this):xe(this),null;if(be=oe(be,_e),be===0&&_e.ended)return _e.length===0&&ft(this),null;let Ze=(_e.state&J)!==0;if(T("need readable",Ze),(_e.length===0||_e.length-be<_e.highWaterMark)&&(Ze=!0,T("length less than watermark",Ze)),_e.ended||_e.reading||_e.destroyed||_e.errored||!_e.constructed)Ze=!1,T("reading, ended or constructing",Ze);else if(Ze){T("do read"),_e.state|=fe|ne,_e.length===0&&(_e.state|=J);try{this._read(_e.highWaterMark)}catch(qt){Q(this,qt)}_e.state&=~ne,_e.reading||(be=oe(Ye,_e))}let st;return be>0?st=tt(be,_e):st=null,st===null?(_e.needReadable=_e.length<=_e.highWaterMark,be=0):(_e.length-=be,_e.multiAwaitDrain?_e.awaitDrainWriters.clear():_e.awaitDrainWriters=null),_e.length===0&&(_e.ended||(_e.needReadable=!0),Ye!==be&&_e.ended&&ft(this)),st!==null&&!_e.errorEmitted&&!_e.closeEmitted&&(_e.dataEmitted=!0,this.emit("data",st)),st};function me(be,_e){if(T("onEofChunk"),!_e.ended){if(_e.decoder){let Ye=_e.decoder.end();Ye&&Ye.length&&(_e.buffer.push(Ye),_e.length+=_e.objectMode?1:Ye.length)}_e.ended=!0,_e.sync?xe(be):(_e.needReadable=!1,_e.emittedReadable=!0,Ce(be))}}function xe(be){let _e=be._readableState;T("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(T("emitReadable",_e.flowing),_e.emittedReadable=!0,n.nextTick(Ce,be))}function Ce(be){let _e=be._readableState;T("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&!_e.errored&&(_e.length||_e.ended)&&(be.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,bt(be)}function we(be,_e){!_e.readingMore&&_e.constructed&&(_e.readingMore=!0,n.nextTick(Ie,be,_e))}function Ie(be,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){let Ye=_e.length;if(T("maybeReadMore read 0"),be.read(0),Ye===_e.length)break}_e.readingMore=!1}de.prototype._read=function(be){throw new N("_read()")},de.prototype.pipe=function(be,_e){let Ye=this,Ze=this._readableState;Ze.pipes.length===1&&(Ze.multiAwaitDrain||(Ze.multiAwaitDrain=!0,Ze.awaitDrainWriters=new y(Ze.awaitDrainWriters?[Ze.awaitDrainWriters]:[]))),Ze.pipes.push(be),T("pipe count=%d opts=%j",Ze.pipes.length,_e);let st=(!_e||_e.end!==!1)&&be!==n.stdout&&be!==n.stderr?rr:xn;Ze.endEmitted?n.nextTick(st):Ye.once("end",st),be.on("unpipe",qt);function qt(kr,wr){T("onunpipe"),kr===Ye&&wr&&wr.hasUnpiped===!1&&(wr.hasUnpiped=!0,Rr())}function rr(){T("onend"),be.end()}let Br,$n=!1;function Rr(){T("cleanup"),be.removeListener("close",jr),be.removeListener("finish",gn),Br&&be.removeListener("drain",Br),be.removeListener("error",Mr),be.removeListener("unpipe",qt),Ye.removeListener("end",rr),Ye.removeListener("end",xn),Ye.removeListener("data",nr),$n=!0,Br&&Ze.awaitDrainWriters&&(!be._writableState||be._writableState.needDrain)&&Br()}function Ht(){$n||(Ze.pipes.length===1&&Ze.pipes[0]===be?(T("false write response, pause",0),Ze.awaitDrainWriters=be,Ze.multiAwaitDrain=!1):Ze.pipes.length>1&&Ze.pipes.includes(be)&&(T("false write response, pause",Ze.awaitDrainWriters.size),Ze.awaitDrainWriters.add(be)),Ye.pause()),Br||(Br=He(Ye,be),be.on("drain",Br))}Ye.on("data",nr);function nr(kr){T("ondata");let wr=be.write(kr);T("dest.write",wr),wr===!1&&Ht()}function Mr(kr){if(T("onerror",kr),xn(),be.removeListener("error",Mr),be.listenerCount("error")===0){let wr=be._writableState||be._readableState;wr&&!wr.errorEmitted?Q(be,kr):be.emit("error",kr)}}R(be,"error",Mr);function jr(){be.removeListener("finish",gn),xn()}be.once("close",jr);function gn(){T("onfinish"),be.removeListener("close",jr),xn()}be.once("finish",gn);function xn(){T("unpipe"),Ye.unpipe(be)}return be.emit("pipe",Ye),be.writableNeedDrain===!0?Ht():Ze.flowing||(T("pipe resume"),Ye.resume()),be};function He(be,_e){return function(){let Ye=be._readableState;Ye.awaitDrainWriters===_e?(T("pipeOnDrain",1),Ye.awaitDrainWriters=null):Ye.multiAwaitDrain&&(T("pipeOnDrain",Ye.awaitDrainWriters.size),Ye.awaitDrainWriters.delete(_e)),(!Ye.awaitDrainWriters||Ye.awaitDrainWriters.size===0)&&be.listenerCount("data")&&be.resume()}}de.prototype.unpipe=function(be){let _e=this._readableState,Ye={hasUnpiped:!1};if(_e.pipes.length===0)return this;if(!be){let st=_e.pipes;_e.pipes=[],this.pause();for(let qt=0;qt<st.length;qt++)st[qt].emit("unpipe",this,{hasUnpiped:!1});return this}let Ze=o(_e.pipes,be);return Ze===-1?this:(_e.pipes.splice(Ze,1),_e.pipes.length===0&&this.pause(),be.emit("unpipe",this,Ye),this)},de.prototype.on=function(be,_e){let Ye=I.prototype.on.call(this,be,_e),Ze=this._readableState;return be==="data"?(Ze.readableListening=this.listenerCount("readable")>0,Ze.flowing!==!1&&this.resume()):be==="readable"&&!Ze.endEmitted&&!Ze.readableListening&&(Ze.readableListening=Ze.needReadable=!0,Ze.flowing=!1,Ze.emittedReadable=!1,T("on readable",Ze.length,Ze.reading),Ze.length?xe(this):Ze.reading||n.nextTick(We,this)),Ye},de.prototype.addListener=de.prototype.on,de.prototype.removeListener=function(be,_e){let Ye=I.prototype.removeListener.call(this,be,_e);return be==="readable"&&n.nextTick(Ke,this),Ye},de.prototype.off=de.prototype.removeListener,de.prototype.removeAllListeners=function(be){let _e=I.prototype.removeAllListeners.apply(this,arguments);return(be==="readable"||be===void 0)&&n.nextTick(Ke,this),_e};function Ke(be){let _e=be._readableState;_e.readableListening=be.listenerCount("readable")>0,_e.resumeScheduled&&_e[ye]===!1?_e.flowing=!0:be.listenerCount("data")>0?be.resume():_e.readableListening||(_e.flowing=null)}function We(be){T("readable nexttick read 0"),be.read(0)}de.prototype.resume=function(){let be=this._readableState;return be.flowing||(T("resume"),be.flowing=!be.readableListening,et(this,be)),be[ye]=!1,this};function et(be,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,n.nextTick(gt,be,_e))}function gt(be,_e){T("resume",_e.reading),_e.reading||be.read(0),_e.resumeScheduled=!1,be.emit("resume"),bt(be),_e.flowing&&!_e.reading&&be.read(0)}de.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ye]=!0,this};function bt(be){let _e=be._readableState;for(T("flow",_e.flowing);_e.flowing&&be.read()!==null;);}de.prototype.wrap=function(be){let _e=!1;be.on("data",Ze=>{!this.push(Ze)&&be.pause&&(_e=!0,be.pause())}),be.on("end",()=>{this.push(null)}),be.on("error",Ze=>{Q(this,Ze)}),be.on("close",()=>{this.destroy()}),be.on("destroy",()=>{this.destroy()}),this._read=()=>{_e&&be.resume&&(_e=!1,be.resume())};let Ye=h(be);for(let Ze=1;Ze<Ye.length;Ze++){let st=Ye[Ze];this[st]===void 0&&typeof be[st]=="function"&&(this[st]=be[st].bind(be))}return this},de.prototype[b]=function(){return lt(this)},de.prototype.iterator=function(be){return be!==void 0&&ae(be,"options"),lt(this,be)};function lt(be,_e){typeof be.read!="function"&&(be=de.wrap(be,{objectMode:!0}));let Ye=yt(be,_e);return Ye.stream=be,Ye}async function*yt(be,_e){let Ye=G;function Ze(rr){this===be?(Ye(),Ye=G):Ye=rr}be.on("readable",Ze);let st,qt=M(be,{writable:!1},rr=>{st=rr?U(st,rr):null,Ye(),Ye=G});try{for(;;){let rr=be.destroyed?null:be.read();if(rr!==null)yield rr;else{if(st)throw st;if(st===null)return;await new p(Ze)}}}catch(rr){throw st=U(st,rr),st}finally{(st||(_e==null?void 0:_e.destroyOnReturn)!==!1)&&(st===void 0||be._readableState.autoDestroy)?L.destroyer(be,null):(be.off("readable",Ze),qt())}}c(de.prototype,{readable:{__proto__:null,get(){let be=this._readableState;return!!be&&be.readable!==!1&&!be.destroyed&&!be.errorEmitted&&!be.endEmitted},set(be){this._readableState&&(this._readableState.readable=!!be)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(be){this._readableState&&(this._readableState.flowing=be)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(be){this._readableState&&(this._readableState.destroyed=be)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(Be.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[ye]!==!1},set(be){this[ye]=!!be}}}),de._fromList=tt;function tt(be,_e){if(_e.length===0)return null;let Ye;return _e.objectMode?Ye=_e.buffer.shift():!be||be>=_e.length?(_e.decoder?Ye=_e.buffer.join(""):_e.buffer.length===1?Ye=_e.buffer.first():Ye=_e.buffer.concat(_e.length),_e.buffer.clear()):Ye=_e.buffer.consume(be,_e.decoder),Ye}function ft(be){let _e=be._readableState;T("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,n.nextTick(dt,_e,be))}function dt(be,_e){if(T("endReadableNT",be.endEmitted,be.length),!be.errored&&!be.closeEmitted&&!be.endEmitted&&be.length===0){if(be.endEmitted=!0,_e.emit("end"),_e.writable&&_e.allowHalfOpen===!1)n.nextTick(At,_e);else if(be.autoDestroy){let Ye=_e._writableState;(!Ye||Ye.autoDestroy&&(Ye.finished||Ye.writable===!1))&&_e.destroy()}}}function At(be){be.writable&&!be.writableEnded&&!be.destroyed&&be.end()}de.from=function(be,_e){return ee(de,be,_e)};var Jt;function Ar(){return Jt===void 0&&(Jt={}),Jt}de.fromWeb=function(be,_e){return Ar().newStreamReadableFromReadableStream(be,_e)},de.toWeb=function(be,_e){return Ar().newReadableStreamFromStreamReadable(be,_e)},de.wrap=function(be,_e){var Ye,Ze;return new de({objectMode:(Ye=(Ze=be.readableObjectMode)!==null&&Ze!==void 0?Ze:be.objectMode)!==null&&Ye!==void 0?Ye:!0,..._e,destroy(st,qt){L.destroyer(be,st),qt(st)}}).wrap(be)}}),Ov=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeSlice:o,Error:s,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:l,ObjectDefineProperties:c,ObjectSetPrototypeOf:h,StringPrototypeToLowerCase:f,Symbol:p,SymbolHasInstance:y}=lr();t.exports=ae,ae.WritableState=ie;var{EventEmitter:g}=(Pa(),Vt($s)),b=Fv().Stream,{Buffer:w}=(Yr(),Vt(Kr)),F=cl(),{addAbortSignal:I}=qp(),{getHighWaterMark:R,getDefaultHighWaterMark:A}=Hp(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:M,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:z,ERR_STREAM_DESTROYED:L,ERR_STREAM_ALREADY_FINISHED:k,ERR_STREAM_NULL_VALUES:j,ERR_STREAM_WRITE_AFTER_END:U,ERR_UNKNOWN_ENCODING:$}=vn().codes,{errorOrDestroy:N}=F;h(ae.prototype,b.prototype),h(ae,b);function Z(){}var re=p("kOnFinished");function ie(te,_,v){typeof v!="boolean"&&(v=_ instanceof zo()),this.objectMode=!!(te&&te.objectMode),v&&(this.objectMode=this.objectMode||!!(te&&te.writableObjectMode)),this.highWaterMark=te?R(this,te,"writableHighWaterMark",v):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let C=!!(te&&te.decodeStrings===!1);this.decodeStrings=!C,this.defaultEncoding=te&&te.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=Q.bind(void 0,_),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,X(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!te||te.emitClose!==!1,this.autoDestroy=!te||te.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[re]=[]}function X(te){te.buffered=[],te.bufferedIndex=0,te.allBuffers=!0,te.allNoop=!0}ie.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},l(ie.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ae(te){let _=this instanceof zo();if(!_&&!a(ae,this))return new ae(te);this._writableState=new ie(te,this,_),te&&(typeof te.write=="function"&&(this._write=te.write),typeof te.writev=="function"&&(this._writev=te.writev),typeof te.destroy=="function"&&(this._destroy=te.destroy),typeof te.final=="function"&&(this._final=te.final),typeof te.construct=="function"&&(this._construct=te.construct),te.signal&&I(te.signal,this)),b.call(this,te),F.construct(this,()=>{let v=this._writableState;v.writing||fe(this,v),O(this,v)})}l(ae,y,{__proto__:null,value:function(te){return a(this,te)?!0:this!==ae?!1:te&&te._writableState instanceof ie}}),ae.prototype.pipe=function(){N(this,new z)};function ye(te,_,v,C){let P=te._writableState;if(typeof v=="function")C=v,v=P.defaultEncoding;else{if(!v)v=P.defaultEncoding;else if(v!=="buffer"&&!w.isEncoding(v))throw new $(v);typeof C!="function"&&(C=Z)}if(_===null)throw new j;if(!P.objectMode)if(typeof _=="string")P.decodeStrings!==!1&&(_=w.from(_,v),v="buffer");else if(_ instanceof w)v="buffer";else if(b._isUint8Array(_))_=b._uint8ArrayToBuffer(_),v="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],_);let he;return P.ending?he=new U:P.destroyed&&(he=new L("write")),he?(n.nextTick(C,he),N(te,he,!0),he):(P.pendingcb++,le(te,P,_,v,C))}ae.prototype.write=function(te,_,v){return ye(this,te,_,v)===!0},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){let te=this._writableState;te.corked&&(te.corked--,te.writing||fe(this,te))},ae.prototype.setDefaultEncoding=function(te){if(typeof te=="string"&&(te=f(te)),!w.isEncoding(te))throw new $(te);return this._writableState.defaultEncoding=te,this};function le(te,_,v,C,P){let he=_.objectMode?1:v.length;_.length+=he;let ce=_.length<_.highWaterMark;return ce||(_.needDrain=!0),_.writing||_.corked||_.errored||!_.constructed?(_.buffered.push({chunk:v,encoding:C,callback:P}),_.allBuffers&&C!=="buffer"&&(_.allBuffers=!1),_.allNoop&&P!==Z&&(_.allNoop=!1)):(_.writelen=he,_.writecb=P,_.writing=!0,_.sync=!0,te._write(v,C,_.onwrite),_.sync=!1),ce&&!_.errored&&!_.destroyed}function ee(te,_,v,C,P,he,ce){_.writelen=C,_.writecb=ce,_.writing=!0,_.sync=!0,_.destroyed?_.onwrite(new L("write")):v?te._writev(P,_.onwrite):te._write(P,he,_.onwrite),_.sync=!1}function G(te,_,v,C){--_.pendingcb,C(v),q(_),N(te,v)}function Q(te,_){let v=te._writableState,C=v.sync,P=v.writecb;if(typeof P!="function"){N(te,new T);return}v.writing=!1,v.writecb=null,v.length-=v.writelen,v.writelen=0,_?(_.stack,v.errored||(v.errored=_),te._readableState&&!te._readableState.errored&&(te._readableState.errored=_),C?n.nextTick(G,te,v,_,P):G(te,v,_,P)):(v.buffered.length>v.bufferedIndex&&fe(te,v),C?v.afterWriteTickInfo!==null&&v.afterWriteTickInfo.cb===P?v.afterWriteTickInfo.count++:(v.afterWriteTickInfo={count:1,cb:P,stream:te,state:v},n.nextTick(K,v.afterWriteTickInfo)):W(te,v,1,P))}function K({stream:te,state:_,count:v,cb:C}){return _.afterWriteTickInfo=null,W(te,_,v,C)}function W(te,_,v,C){for(!_.ending&&!te.destroyed&&_.length===0&&_.needDrain&&(_.needDrain=!1,te.emit("drain"));v-- >0;)_.pendingcb--,C();_.destroyed&&q(_),O(te,_)}function q(te){if(te.writing)return;for(let P=te.bufferedIndex;P<te.buffered.length;++P){var _;let{chunk:he,callback:ce}=te.buffered[P],Se=te.objectMode?1:he.length;te.length-=Se,ce((_=te.errored)!==null&&_!==void 0?_:new L("write"))}let v=te[re].splice(0);for(let P=0;P<v.length;P++){var C;v[P]((C=te.errored)!==null&&C!==void 0?C:new L("end"))}X(te)}function fe(te,_){if(_.corked||_.bufferProcessing||_.destroyed||!_.constructed)return;let{buffered:v,bufferedIndex:C,objectMode:P}=_,he=v.length-C;if(!he)return;let ce=C;if(_.bufferProcessing=!0,he>1&&te._writev){_.pendingcb-=he-1;let Se=_.allNoop?Z:de=>{for(let ve=ce;ve<v.length;++ve)v[ve].callback(de)},Be=_.allNoop&&ce===0?v:o(v,ce);Be.allBuffers=_.allBuffers,ee(te,_,!0,_.length,Be,"",Se),X(_)}else{do{let{chunk:Se,encoding:Be,callback:de}=v[ce];v[ce++]=null;let ve=P?1:Se.length;ee(te,_,!1,ve,Se,Be,de)}while(ce<v.length&&!_.writing);ce===v.length?X(_):ce>256?(v.splice(0,ce),_.bufferedIndex=0):_.bufferedIndex=ce}_.bufferProcessing=!1}ae.prototype._write=function(te,_,v){if(this._writev)this._writev([{chunk:te,encoding:_}],v);else throw new M("_write()")},ae.prototype._writev=null,ae.prototype.end=function(te,_,v){let C=this._writableState;typeof te=="function"?(v=te,te=null,_=null):typeof _=="function"&&(v=_,_=null);let P;if(te!=null){let he=ye(this,te,_);he instanceof s&&(P=he)}return C.corked&&(C.corked=1,this.uncork()),P||(!C.errored&&!C.ending?(C.ending=!0,O(this,C,!0),C.ended=!0):C.finished?P=new k("end"):C.destroyed&&(P=new L("end"))),typeof v=="function"&&(P||C.finished?n.nextTick(v,P):C[re].push(v)),this};function ue(te){return te.ending&&!te.destroyed&&te.constructed&&te.length===0&&!te.errored&&te.buffered.length===0&&!te.finished&&!te.writing&&!te.errorEmitted&&!te.closeEmitted}function ne(te,_){let v=!1;function C(P){if(v){N(te,P??T());return}if(v=!0,_.pendingcb--,P){let he=_[re].splice(0);for(let ce=0;ce<he.length;ce++)he[ce](P);N(te,P,_.sync)}else ue(_)&&(_.prefinished=!0,te.emit("prefinish"),_.pendingcb++,n.nextTick(H,te,_))}_.sync=!0,_.pendingcb++;try{te._final(C)}catch(P){C(P)}_.sync=!1}function J(te,_){!_.prefinished&&!_.finalCalled&&(typeof te._final=="function"&&!_.destroyed?(_.finalCalled=!0,ne(te,_)):(_.prefinished=!0,te.emit("prefinish")))}function O(te,_,v){ue(_)&&(J(te,_),_.pendingcb===0&&(v?(_.pendingcb++,n.nextTick((C,P)=>{ue(P)?H(C,P):P.pendingcb--},te,_)):ue(_)&&(_.pendingcb++,H(te,_))))}function H(te,_){_.pendingcb--,_.finished=!0;let v=_[re].splice(0);for(let C=0;C<v.length;C++)v[C]();if(te.emit("finish"),_.autoDestroy){let C=te._readableState;(!C||C.autoDestroy&&(C.endEmitted||C.readable===!1))&&te.destroy()}}c(ae.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(te){this._writableState&&(this._writableState.destroyed=te)}},writable:{__proto__:null,get(){let te=this._writableState;return!!te&&te.writable!==!1&&!te.destroyed&&!te.errored&&!te.ending&&!te.ended},set(te){this._writableState&&(this._writableState.writable=!!te)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let te=this._writableState;return te?!te.destroyed&&!te.ending&&te.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Y=F.destroy;ae.prototype.destroy=function(te,_){let v=this._writableState;return!v.destroyed&&(v.bufferedIndex<v.buffered.length||v[re].length)&&n.nextTick(q,v),Y.call(this,te,_),this},ae.prototype._undestroy=F.undestroy,ae.prototype._destroy=function(te,_){_(te)},ae.prototype[g.captureRejectionSymbol]=function(te){this.destroy(te)};var se;function pe(){return se===void 0&&(se={}),se}ae.fromWeb=function(te,_){return pe().newStreamWritableFromWritableStream(te,_)},ae.toWeb=function(te){return pe().newWritableStreamFromStreamWritable(te)}}),HH=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),o=(Yr(),Vt(Kr)),{isReadable:s,isWritable:a,isIterable:l,isNodeStream:c,isReadableNodeStream:h,isWritableNodeStream:f,isDuplexNodeStream:p,isReadableStream:y,isWritableStream:g}=Ko(),b=zs(),{AbortError:w,codes:{ERR_INVALID_ARG_TYPE:F,ERR_INVALID_RETURN_VALUE:I}}=vn(),{destroyer:R}=cl(),A=zo(),E=Qp(),M=Ov(),{createDeferredPromise:T}=jn(),z=k3(),L=globalThis.Blob||o.Blob,k=typeof L<"u"?function(re){return re instanceof L}:function(re){return!1},j=globalThis.AbortController||sf().AbortController,{FunctionPrototypeCall:U}=lr(),$=class extends A{constructor(re){super(re),(re==null?void 0:re.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(re==null?void 0:re.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function re(ie,X){if(p(ie))return ie;if(h(ie))return Z({readable:ie});if(f(ie))return Z({writable:ie});if(c(ie))return Z({writable:!1,readable:!1});if(y(ie))return Z({readable:E.fromWeb(ie)});if(g(ie))return Z({writable:M.fromWeb(ie)});if(typeof ie=="function"){let{value:ye,write:le,final:ee,destroy:G}=N(ie);if(l(ye))return z($,ye,{objectMode:!0,write:le,final:ee,destroy:G});let Q=ye==null?void 0:ye.then;if(typeof Q=="function"){let K,W=U(Q,ye,q=>{if(q!=null)throw new I("nully","body",q)},q=>{R(K,q)});return K=new $({objectMode:!0,readable:!1,write:le,final(q){ee(async()=>{try{await W,n.nextTick(q,null)}catch(fe){n.nextTick(q,fe)}})},destroy:G})}throw new I("Iterable, AsyncIterable or AsyncFunction",X,ye)}if(k(ie))return re(ie.arrayBuffer());if(l(ie))return z($,ie,{objectMode:!0,writable:!1});if(y(ie==null?void 0:ie.readable)&&g(ie==null?void 0:ie.writable))return $.fromWeb(ie);if(typeof(ie==null?void 0:ie.writable)=="object"||typeof(ie==null?void 0:ie.readable)=="object"){let ye=ie!=null&&ie.readable?h(ie==null?void 0:ie.readable)?ie==null?void 0:ie.readable:re(ie.readable):void 0,le=ie!=null&&ie.writable?f(ie==null?void 0:ie.writable)?ie==null?void 0:ie.writable:re(ie.writable):void 0;return Z({readable:ye,writable:le})}let ae=ie==null?void 0:ie.then;if(typeof ae=="function"){let ye;return U(ae,ie,le=>{le!=null&&ye.push(le),ye.push(null)},le=>{R(ye,le)}),ye=new $({objectMode:!0,writable:!1,read(){}})}throw new F(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],ie)};function N(re){let{promise:ie,resolve:X}=T(),ae=new j,ye=ae.signal;return{value:re((async function*(){for(;;){let le=ie;ie=null;let{chunk:ee,done:G,cb:Q}=await le;if(n.nextTick(Q),G)return;if(ye.aborted)throw new w(void 0,{cause:ye.reason});({promise:ie,resolve:X}=T()),yield ee}})(),{signal:ye}),write(le,ee,G){let Q=X;X=null,Q({chunk:le,done:!1,cb:G})},final(le){let ee=X;X=null,ee({done:!0,cb:le})},destroy(le,ee){ae.abort(),ee(le)}}}function Z(re){let ie=re.readable&&typeof re.readable.read!="function"?E.wrap(re.readable):re.readable,X=re.writable,ae=!!s(ie),ye=!!a(X),le,ee,G,Q,K;function W(q){let fe=Q;Q=null,fe?fe(q):q&&K.destroy(q)}return K=new $({readableObjectMode:!!(ie!=null&&ie.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:ae,writable:ye}),ye&&(b(X,q=>{ye=!1,q&&R(ie,q),W(q)}),K._write=function(q,fe,ue){X.write(q,fe)?ue():le=ue},K._final=function(q){X.end(),ee=q},X.on("drain",function(){if(le){let q=le;le=null,q()}}),X.on("finish",function(){if(ee){let q=ee;ee=null,q()}})),ae&&(b(ie,q=>{ae=!1,q&&R(ie,q),W(q)}),ie.on("readable",function(){if(G){let q=G;G=null,q()}}),ie.on("end",function(){K.push(null)}),K._read=function(){for(;;){let q=ie.read();if(q===null){G=K._read;return}if(!K.push(q))return}}),K._destroy=function(q,fe){!q&&Q!==null&&(q=new w),G=null,le=null,ee=null,Q===null?fe(q):(Q=fe,R(X,q),R(ie,q))},K}}),zo=qe((e,t)=>{Pe(),Le(),ke();var{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:s,ObjectSetPrototypeOf:a}=lr();t.exports=h;var l=Qp(),c=Ov();a(h.prototype,l.prototype),a(h,l);{let g=s(c.prototype);for(let b=0;b<g.length;b++){let w=g[b];h.prototype[w]||(h.prototype[w]=c.prototype[w])}}function h(g){if(!(this instanceof h))return new h(g);l.call(this,g),c.call(this,g),g?(this.allowHalfOpen=g.allowHalfOpen!==!1,g.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),g.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}n(h.prototype,{writable:{__proto__:null,...o(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(c.prototype,"writableLength")},writableFinished:{__proto__:null,...o(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(g){this._readableState&&this._writableState&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}});var f;function p(){return f===void 0&&(f={}),f}h.fromWeb=function(g,b){return p().newStreamDuplexFromReadableWritablePair(g,b)},h.toWeb=function(g){return p().newReadableWritablePairFromDuplex(g)};var y;h.from=function(g){return y||(y=HH()),y(g,"body")}}),L3=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n,Symbol:o}=lr();t.exports=h;var{ERR_METHOD_NOT_IMPLEMENTED:s}=vn().codes,a=zo(),{getHighWaterMark:l}=Hp();n(h.prototype,a.prototype),n(h,a);var c=o("kCallback");function h(y){if(!(this instanceof h))return new h(y);let g=y?l(this,y,"readableHighWaterMark",!0):null;g===0&&(y={...y,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:y.writableHighWaterMark||0}),a.call(this,y),this._readableState.sync=!1,this[c]=null,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",p)}function f(y){typeof this._flush=="function"&&!this.destroyed?this._flush((g,b)=>{if(g){y?y(g):this.destroy(g);return}b!=null&&this.push(b),this.push(null),y&&y()}):(this.push(null),y&&y())}function p(){this._final!==f&&f.call(this)}h.prototype._final=f,h.prototype._transform=function(y,g,b){throw new s("_transform()")},h.prototype._write=function(y,g,b){let w=this._readableState,F=this._writableState,I=w.length;this._transform(y,g,(R,A)=>{if(R){b(R);return}A!=null&&this.push(A),F.ended||I===w.length||w.length<w.highWaterMark?b():this[c]=b})},h.prototype._read=function(){if(this[c]){let y=this[c];this[c]=null,y()}}}),$3=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n}=lr();t.exports=s;var o=L3();n(s.prototype,o.prototype),n(s,o);function s(a){if(!(this instanceof s))return new s(a);o.call(this,a)}s.prototype._transform=function(a,l,c){c(null,a)}}),Tv=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayIsArray:o,Promise:s,SymbolAsyncIterator:a,SymbolDispose:l}=lr(),c=zs(),{once:h}=jn(),f=cl(),p=zo(),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:b,ERR_MISSING_ARGS:w,ERR_STREAM_DESTROYED:F,ERR_STREAM_PREMATURE_CLOSE:I},AbortError:R}=vn(),{validateFunction:A,validateAbortSignal:E}=Bf(),{isIterable:M,isReadable:T,isReadableNodeStream:z,isNodeStream:L,isTransformStream:k,isWebStream:j,isReadableStream:U,isReadableFinished:$}=Ko(),N=globalThis.AbortController||sf().AbortController,Z,re,ie;function X(q,fe,ue){let ne=!1;q.on("close",()=>{ne=!0});let J=c(q,{readable:fe,writable:ue},O=>{ne=!O});return{destroy:O=>{ne||(ne=!0,f.destroyer(q,O||new F("pipe")))},cleanup:J}}function ae(q){return A(q[q.length-1],"streams[stream.length - 1]"),q.pop()}function ye(q){if(M(q))return q;if(z(q))return le(q);throw new g("val",["Readable","Iterable","AsyncIterable"],q)}async function*le(q){re||(re=Qp()),yield*re.prototype[a].call(q)}async function ee(q,fe,ue,{end:ne}){let J,O=null,H=pe=>{if(pe&&(J=pe),O){let te=O;O=null,te()}},Y=()=>new s((pe,te)=>{J?te(J):O=()=>{J?te(J):pe()}});fe.on("drain",H);let se=c(fe,{readable:!1},H);try{fe.writableNeedDrain&&await Y();for await(let pe of q)fe.write(pe)||await Y();ne&&(fe.end(),await Y()),ue()}catch(pe){ue(J!==pe?y(J,pe):pe)}finally{se(),fe.off("drain",H)}}async function G(q,fe,ue,{end:ne}){k(fe)&&(fe=fe.writable);let J=fe.getWriter();try{for await(let O of q)await J.ready,J.write(O).catch(()=>{});await J.ready,ne&&await J.close(),ue()}catch(O){try{await J.abort(O),ue(O)}catch(H){ue(H)}}}function Q(...q){return K(q,h(ae(q)))}function K(q,fe,ue){if(q.length===1&&o(q[0])&&(q=q[0]),q.length<2)throw new w("streams");let ne=new N,J=ne.signal,O=ue==null?void 0:ue.signal,H=[];E(O,"options.signal");function Y(){P(new R)}ie=ie||jn().addAbortListener;let se;O&&(se=ie(O,Y));let pe,te,_=[],v=0;function C(Be){P(Be,--v===0)}function P(Be,de){var ve;if(Be&&(!pe||pe.code==="ERR_STREAM_PREMATURE_CLOSE")&&(pe=Be),!(!pe&&!de)){for(;_.length;)_.shift()(pe);(ve=se)===null||ve===void 0||ve[l](),ne.abort(),de&&(pe||H.forEach(x=>x()),n.nextTick(fe,pe,te))}}let he;for(let Be=0;Be<q.length;Be++){let de=q[Be],ve=Be<q.length-1,x=Be>0,B=ve||(ue==null?void 0:ue.end)!==!1,D=Be===q.length-1;if(L(de)){let oe=function(me){me&&me.name!=="AbortError"&&me.code!=="ERR_STREAM_PREMATURE_CLOSE"&&C(me)};if(B){let{destroy:me,cleanup:xe}=X(de,ve,x);_.push(me),T(de)&&D&&H.push(xe)}de.on("error",oe),T(de)&&D&&H.push(()=>{de.removeListener("error",oe)})}if(Be===0)if(typeof de=="function"){if(he=de({signal:J}),!M(he))throw new b("Iterable, AsyncIterable or Stream","source",he)}else M(de)||z(de)||k(de)?he=de:he=p.from(de);else if(typeof de=="function"){if(k(he)){var ce;he=ye((ce=he)===null||ce===void 0?void 0:ce.readable)}else he=ye(he);if(he=de(he,{signal:J}),ve){if(!M(he,!0))throw new b("AsyncIterable",`transform[${Be-1}]`,he)}else{var Se;Z||(Z=$3());let oe=new Z({objectMode:!0}),me=(Se=he)===null||Se===void 0?void 0:Se.then;if(typeof me=="function")v++,me.call(he,we=>{te=we,we!=null&&oe.write(we),B&&oe.end(),n.nextTick(C)},we=>{oe.destroy(we),n.nextTick(C,we)});else if(M(he,!0))v++,ee(he,oe,C,{end:B});else if(U(he)||k(he)){let we=he.readable||he;v++,ee(we,oe,C,{end:B})}else throw new b("AsyncIterable or Promise","destination",he);he=oe;let{destroy:xe,cleanup:Ce}=X(he,!1,!0);_.push(xe),D&&H.push(Ce)}}else if(L(de)){if(z(he)){v+=2;let oe=W(he,de,C,{end:B});T(de)&&D&&H.push(oe)}else if(k(he)||U(he)){let oe=he.readable||he;v++,ee(oe,de,C,{end:B})}else if(M(he))v++,ee(he,de,C,{end:B});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else if(j(de)){if(z(he))v++,G(ye(he),de,C,{end:B});else if(U(he)||M(he))v++,G(he,de,C,{end:B});else if(k(he))v++,G(he.readable,de,C,{end:B});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else he=p.from(de)}return(J!=null&&J.aborted||O!=null&&O.aborted)&&n.nextTick(Y),he}function W(q,fe,ue,{end:ne}){let J=!1;if(fe.on("close",()=>{J||ue(new I)}),q.pipe(fe,{end:!1}),ne){let O=function(){J=!0,fe.end()};$(q)?n.nextTick(O):q.once("end",O)}else ue();return c(q,{readable:!0,writable:!1},O=>{let H=q._readableState;O&&O.code==="ERR_STREAM_PREMATURE_CLOSE"&&H&&H.ended&&!H.errored&&!H.errorEmitted?q.once("end",ue).once("error",ue):ue(O)}),c(fe,{readable:!1,writable:!0},ue)}t.exports={pipelineImpl:K,pipeline:Q}}),z3=qe((e,t)=>{Pe(),Le(),ke();var{pipeline:n}=Tv(),o=zo(),{destroyer:s}=cl(),{isNodeStream:a,isReadable:l,isWritable:c,isWebStream:h,isTransformStream:f,isWritableStream:p,isReadableStream:y}=Ko(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:b,ERR_MISSING_ARGS:w}}=vn(),F=zs();t.exports=function(...I){if(I.length===0)throw new w("streams");if(I.length===1)return o.from(I[0]);let R=[...I];if(typeof I[0]=="function"&&(I[0]=o.from(I[0])),typeof I[I.length-1]=="function"){let N=I.length-1;I[N]=o.from(I[N])}for(let N=0;N<I.length;++N)if(!(!a(I[N])&&!h(I[N]))){if(N<I.length-1&&!(l(I[N])||y(I[N])||f(I[N])))throw new b(`streams[${N}]`,R[N],"must be readable");if(N>0&&!(c(I[N])||p(I[N])||f(I[N])))throw new b(`streams[${N}]`,R[N],"must be writable")}let A,E,M,T,z;function L(N){let Z=T;T=null,Z?Z(N):N?z.destroy(N):!$&&!U&&z.destroy()}let k=I[0],j=n(I,L),U=!!(c(k)||p(k)||f(k)),$=!!(l(j)||y(j)||f(j));if(z=new o({writableObjectMode:!!(k!=null&&k.writableObjectMode),readableObjectMode:!!(j!=null&&j.readableObjectMode),writable:U,readable:$}),U){if(a(k))z._write=function(Z,re,ie){k.write(Z,re)?ie():A=ie},z._final=function(Z){k.end(),E=Z},k.on("drain",function(){if(A){let Z=A;A=null,Z()}});else if(h(k)){let Z=(f(k)?k.writable:k).getWriter();z._write=async function(re,ie,X){try{await Z.ready,Z.write(re).catch(()=>{}),X()}catch(ae){X(ae)}},z._final=async function(re){try{await Z.ready,Z.close().catch(()=>{}),E=re}catch(ie){re(ie)}}}let N=f(j)?j.readable:j;F(N,()=>{if(E){let Z=E;E=null,Z()}})}if($){if(a(j))j.on("readable",function(){if(M){let N=M;M=null,N()}}),j.on("end",function(){z.push(null)}),z._read=function(){for(;;){let N=j.read();if(N===null){M=z._read;return}if(!z.push(N))return}};else if(h(j)){let N=(f(j)?j.readable:j).getReader();z._read=async function(){for(;;)try{let{value:Z,done:re}=await N.read();if(!z.push(Z))return;if(re){z.push(null);return}}catch{return}}}}return z._destroy=function(N,Z){!N&&T!==null&&(N=new g),M=null,A=null,E=null,T===null?Z(N):(T=Z,a(j)&&s(j,N))},z}}),QH=qe((e,t)=>{Pe(),Le(),ke();var n=globalThis.AbortController||sf().AbortController,{codes:{ERR_INVALID_ARG_VALUE:o,ERR_INVALID_ARG_TYPE:s,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:l},AbortError:c}=vn(),{validateAbortSignal:h,validateInteger:f,validateObject:p}=Bf(),y=lr().Symbol("kWeak"),g=lr().Symbol("kResistStopPropagation"),{finished:b}=zs(),w=z3(),{addAbortSignalNoValidate:F}=qp(),{isWritable:I,isNodeStream:R}=Ko(),{deprecate:A}=jn(),{ArrayPrototypePush:E,Boolean:M,MathFloor:T,Number:z,NumberIsNaN:L,Promise:k,PromiseReject:j,PromiseResolve:U,PromisePrototypeThen:$,Symbol:N}=lr(),Z=N("kEmpty"),re=N("kEof");function ie(O,H){if(H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal"),R(O)&&!I(O))throw new o("stream",O,"must be writable");let Y=w(this,O);return H!=null&&H.signal&&F(H.signal,Y),Y}function X(O,H){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal");let Y=1;(H==null?void 0:H.concurrency)!=null&&(Y=T(H.concurrency));let se=Y-1;return(H==null?void 0:H.highWaterMark)!=null&&(se=T(H.highWaterMark)),f(Y,"options.concurrency",1),f(se,"options.highWaterMark",0),se+=Y,(async function*(){let pe=jn().AbortSignalAny([H==null?void 0:H.signal].filter(M)),te=this,_=[],v={signal:pe},C,P,he=!1,ce=0;function Se(){he=!0,Be()}function Be(){ce-=1,de()}function de(){P&&!he&&ce<Y&&_.length<se&&(P(),P=null)}async function ve(){try{for await(let x of te){if(he)return;if(pe.aborted)throw new c;try{if(x=O(x,v),x===Z)continue;x=U(x)}catch(B){x=j(B)}ce+=1,$(x,Be,Se),_.push(x),C&&(C(),C=null),!he&&(_.length>=se||ce>=Y)&&await new k(B=>{P=B})}_.push(re)}catch(x){let B=j(x);$(B,Be,Se),_.push(B)}finally{he=!0,C&&(C(),C=null)}}ve();try{for(;;){for(;_.length>0;){let x=await _[0];if(x===re)return;if(pe.aborted)throw new c;x!==Z&&(yield x),_.shift(),de()}await new k(x=>{C=x})}}finally{he=!0,P&&(P(),P=null)}}).call(this)}function ae(O=void 0){return O!=null&&p(O,"options"),(O==null?void 0:O.signal)!=null&&h(O.signal,"options.signal"),(async function*(){let H=0;for await(let se of this){var Y;if(O!=null&&(Y=O.signal)!==null&&Y!==void 0&&Y.aborted)throw new c({cause:O.signal.reason});yield[H++,se]}}).call(this)}async function ye(O,H=void 0){for await(let Y of Q.call(this,O,H))return!0;return!1}async function le(O,H=void 0){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);return!await ye.call(this,async(...Y)=>!await O(...Y),H)}async function ee(O,H){for await(let Y of Q.call(this,O,H))return Y}async function G(O,H){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);async function Y(se,pe){return await O(se,pe),Z}for await(let se of X.call(this,Y,H));}function Q(O,H){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);async function Y(se,pe){return await O(se,pe)?se:Z}return X.call(this,Y,H)}var K=class extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function W(O,H,Y){var se;if(typeof O!="function")throw new s("reducer",["Function","AsyncFunction"],O);Y!=null&&p(Y,"options"),(Y==null?void 0:Y.signal)!=null&&h(Y.signal,"options.signal");let pe=arguments.length>1;if(Y!=null&&(se=Y.signal)!==null&&se!==void 0&&se.aborted){let P=new c(void 0,{cause:Y.signal.reason});throw this.once("error",()=>{}),await b(this.destroy(P)),P}let te=new n,_=te.signal;if(Y!=null&&Y.signal){let P={once:!0,[y]:this,[g]:!0};Y.signal.addEventListener("abort",()=>te.abort(),P)}let v=!1;try{for await(let P of this){var C;if(v=!0,Y!=null&&(C=Y.signal)!==null&&C!==void 0&&C.aborted)throw new c;pe?H=await O(H,P,{signal:_}):(H=P,pe=!0)}if(!v&&!pe)throw new K}finally{te.abort()}return H}async function q(O){O!=null&&p(O,"options"),(O==null?void 0:O.signal)!=null&&h(O.signal,"options.signal");let H=[];for await(let se of this){var Y;if(O!=null&&(Y=O.signal)!==null&&Y!==void 0&&Y.aborted)throw new c(void 0,{cause:O.signal.reason});E(H,se)}return H}function fe(O,H){let Y=X.call(this,O,H);return(async function*(){for await(let se of Y)yield*se}).call(this)}function ue(O){if(O=z(O),L(O))return 0;if(O<0)throw new l("number",">= 0",O);return O}function ne(O,H=void 0){return H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal"),O=ue(O),(async function*(){var Y;if(H!=null&&(Y=H.signal)!==null&&Y!==void 0&&Y.aborted)throw new c;for await(let pe of this){var se;if(H!=null&&(se=H.signal)!==null&&se!==void 0&&se.aborted)throw new c;O--<=0&&(yield pe)}}).call(this)}function J(O,H=void 0){return H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal"),O=ue(O),(async function*(){var Y;if(H!=null&&(Y=H.signal)!==null&&Y!==void 0&&Y.aborted)throw new c;for await(let pe of this){var se;if(H!=null&&(se=H.signal)!==null&&se!==void 0&&se.aborted)throw new c;if(O-- >0&&(yield pe),O<=0)return}}).call(this)}t.exports.streamReturningOperators={asIndexedPairs:A(ae,"readable.asIndexedPairs will be removed in a future version."),drop:ne,filter:Q,flatMap:fe,map:X,take:J,compose:ie},t.exports.promiseReturningOperators={every:le,forEach:G,reduce:W,toArray:q,some:ye,find:ee}}),q3=qe((e,t)=>{Pe(),Le(),ke();var{ArrayPrototypePop:n,Promise:o}=lr(),{isIterable:s,isNodeStream:a,isWebStream:l}=Ko(),{pipelineImpl:c}=Tv(),{finished:h}=zs();H3();function f(...p){return new o((y,g)=>{let b,w,F=p[p.length-1];if(F&&typeof F=="object"&&!a(F)&&!s(F)&&!l(F)){let I=n(p);b=I.signal,w=I.end}c(p,(I,R)=>{I?g(I):y(R)},{signal:b,end:w})})}t.exports={finished:h,pipeline:f}}),H3=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),{ObjectDefineProperty:o,ObjectKeys:s,ReflectApply:a}=lr(),{promisify:{custom:l}}=jn(),{streamReturningOperators:c,promiseReturningOperators:h}=QH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=vn(),p=z3(),{setDefaultHighWaterMark:y,getDefaultHighWaterMark:g}=Hp(),{pipeline:b}=Tv(),{destroyer:w}=cl(),F=zs(),I=q3(),R=Ko(),A=t.exports=Fv().Stream;A.isDestroyed=R.isDestroyed,A.isDisturbed=R.isDisturbed,A.isErrored=R.isErrored,A.isReadable=R.isReadable,A.isWritable=R.isWritable,A.Readable=Qp();for(let M of s(c)){let T=function(...L){if(new.target)throw f();return A.Readable.from(a(z,this,L))},z=c[M];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.length}),o(A.Readable.prototype,M,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}for(let M of s(h)){let T=function(...L){if(new.target)throw f();return a(z,this,L)},z=h[M];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.length}),o(A.Readable.prototype,M,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Ov(),A.Duplex=zo(),A.Transform=L3(),A.PassThrough=$3(),A.pipeline=b;var{addAbortSignal:E}=qp();A.addAbortSignal=E,A.finished=F,A.destroy=w,A.compose=p,A.setDefaultHighWaterMark=y,A.getDefaultHighWaterMark=g,o(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return I}}),o(b,l,{__proto__:null,enumerable:!0,get(){return I.pipeline}}),o(F,l,{__proto__:null,enumerable:!0,get(){return I.finished}}),A.Stream=A,A._isUint8Array=function(M){return M instanceof Uint8Array},A._uint8ArrayToBuffer=function(M){return n.from(M.buffer,M.byteOffset,M.byteLength)}}),La=qe((e,t)=>{Pe(),Le(),ke();var n=H3(),o=q3(),s=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=s,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get(){return o}}),t.exports.Stream=n.Stream,t.exports.default=t.exports}),GH=qe((e,t)=>{Pe(),Le(),ke(),typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var s=function(){};s.prototype=o.prototype,n.prototype=new s,n.prototype.constructor=n}}}),KH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),o=Symbol.for("BufferList");function s(a){if(!(this instanceof s))return new s(a);s._init.call(this,a)}s._init=function(a){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,a&&this.append(a)},s.prototype._new=function(a){return new s(a)},s.prototype._offset=function(a){if(a===0)return[0,0];let l=0;for(let c=0;c<this._bufs.length;c++){let h=l+this._bufs[c].length;if(a<h||c===this._bufs.length-1)return[c,a-l];l=h}},s.prototype._reverseOffset=function(a){let l=a[0],c=a[1];for(let h=0;h<l;h++)c+=this._bufs[h].length;return c},s.prototype.getBuffers=function(){return this._bufs},s.prototype.get=function(a){if(a>this.length||a<0)return;let l=this._offset(a);return this._bufs[l[0]][l[1]]},s.prototype.slice=function(a,l){return typeof a=="number"&&a<0&&(a+=this.length),typeof l=="number"&&l<0&&(l+=this.length),this.copy(null,0,a,l)},s.prototype.copy=function(a,l,c,h){if((typeof c!="number"||c<0)&&(c=0),(typeof h!="number"||h>this.length)&&(h=this.length),c>=this.length||h<=0)return a||n.alloc(0);let f=!!a,p=this._offset(c),y=h-c,g=y,b=f&&l||0,w=p[1];if(c===0&&h===this.length){if(!f)return this._bufs.length===1?this._bufs[0]:n.concat(this._bufs,this.length);for(let F=0;F<this._bufs.length;F++)this._bufs[F].copy(a,b),b+=this._bufs[F].length;return a}if(g<=this._bufs[p[0]].length-w)return f?this._bufs[p[0]].copy(a,l,w,w+g):this._bufs[p[0]].slice(w,w+g);f||(a=n.allocUnsafe(y));for(let F=p[0];F<this._bufs.length;F++){let I=this._bufs[F].length-w;if(g>I)this._bufs[F].copy(a,b,w),b+=I;else{this._bufs[F].copy(a,b,w,w+g),b+=I;break}g-=I,w&&(w=0)}return a.length>b?a.slice(0,b):a},s.prototype.shallowSlice=function(a,l){if(a=a||0,l=typeof l!="number"?this.length:l,a<0&&(a+=this.length),l<0&&(l+=this.length),a===l)return this._new();let c=this._offset(a),h=this._offset(l),f=this._bufs.slice(c[0],h[0]+1);return h[1]===0?f.pop():f[f.length-1]=f[f.length-1].slice(0,h[1]),c[1]!==0&&(f[0]=f[0].slice(c[1])),this._new(f)},s.prototype.toString=function(a,l,c){return this.slice(l,c).toString(a)},s.prototype.consume=function(a){if(a=Math.trunc(a),Number.isNaN(a)||a<=0)return this;for(;this._bufs.length;)if(a>=this._bufs[0].length)a-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(a),this.length-=a;break}return this},s.prototype.duplicate=function(){let a=this._new();for(let l=0;l<this._bufs.length;l++)a.append(this._bufs[l]);return a},s.prototype.append=function(a){return this._attach(a,s.prototype._appendBuffer)},s.prototype.prepend=function(a){return this._attach(a,s.prototype._prependBuffer,!0)},s.prototype._attach=function(a,l,c){if(a==null)return this;if(a.buffer)l.call(this,n.from(a.buffer,a.byteOffset,a.byteLength));else if(Array.isArray(a)){let[h,f]=c?[a.length-1,-1]:[0,1];for(let p=h;p>=0&&p<a.length;p+=f)this._attach(a[p],l,c)}else if(this._isBufferList(a)){let[h,f]=c?[a._bufs.length-1,-1]:[0,1];for(let p=h;p>=0&&p<a._bufs.length;p+=f)this._attach(a._bufs[p],l,c)}else typeof a=="number"&&(a=a.toString()),l.call(this,n.from(a));return this},s.prototype._appendBuffer=function(a){this._bufs.push(a),this.length+=a.length},s.prototype._prependBuffer=function(a){this._bufs.unshift(a),this.length+=a.length},s.prototype.indexOf=function(a,l,c){if(c===void 0&&typeof l=="string"&&(c=l,l=void 0),typeof a=="function"||Array.isArray(a))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof a=="number"?a=n.from([a]):typeof a=="string"?a=n.from(a,c):this._isBufferList(a)?a=a.slice():Array.isArray(a.buffer)?a=n.from(a.buffer,a.byteOffset,a.byteLength):n.isBuffer(a)||(a=n.from(a)),l=Number(l||0),isNaN(l)&&(l=0),l<0&&(l=this.length+l),l<0&&(l=0),a.length===0)return l>this.length?this.length:l;let h=this._offset(l),f=h[0],p=h[1];for(;f<this._bufs.length;f++){let y=this._bufs[f];for(;p<y.length;)if(y.length-p>=a.length){let g=y.indexOf(a,p);if(g!==-1)return this._reverseOffset([f,g]);p=y.length-a.length+1}else{let g=this._reverseOffset([f,p]);if(this._match(g,a))return g;p++}p=0}return-1},s.prototype._match=function(a,l){if(this.length-a<l.length)return!1;for(let c=0;c<l.length;c++)if(this.get(a+c)!==l[c])return!1;return!0},(function(){let a={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let l in a)(function(c){a[c]===null?s.prototype[c]=function(h,f){return this.slice(h,h+f)[c](0,f)}:s.prototype[c]=function(h=0){return this.slice(h,h+a[c])[c](0)}})(l)})(),s.prototype._isBufferList=function(a){return a instanceof s||s.isBufferList(a)},s.isBufferList=function(a){return a!=null&&a[o]},t.exports=s}),YH=qe((e,t)=>{Pe(),Le(),ke();var n=La().Duplex,o=GH(),s=KH();function a(l){if(!(this instanceof a))return new a(l);if(typeof l=="function"){this._callback=l;let c=(function(h){this._callback&&(this._callback(h),this._callback=null)}).bind(this);this.on("pipe",function(h){h.on("error",c)}),this.on("unpipe",function(h){h.removeListener("error",c)}),l=null}s._init.call(this,l),n.call(this)}o(a,n),Object.assign(a.prototype,s.prototype),a.prototype._new=function(l){return new a(l)},a.prototype._write=function(l,c,h){this._appendBuffer(l),typeof h=="function"&&h()},a.prototype._read=function(l){if(!this.length)return this.push(null);l=Math.min(l,this.length),this.push(this.slice(0,l)),this.consume(l)},a.prototype.end=function(l){n.prototype.end.call(this,l),this._callback&&(this._callback(null,this.slice()),this._callback=null)},a.prototype._destroy=function(l,c){this._bufs.length=0,this.length=0,c(l)},a.prototype._isBufferList=function(l){return l instanceof a||l instanceof s||a.isBufferList(l)},a.isBufferList=s.isBufferList,t.exports=a,t.exports.BufferListStream=a,t.exports.BufferList=s}),VH=qe((e,t)=>{Pe(),Le(),ke();var n=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};t.exports=n}),Q3=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports,{Buffer:o}=(Yr(),Vt(Kr));n.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},n.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},n.requiredHeaderFlagsErrors={};for(let a in n.requiredHeaderFlags){let l=n.requiredHeaderFlags[a];n.requiredHeaderFlagsErrors[a]="Invalid header flag bits, must be 0x"+l.toString(16)+" for "+n.types[a]+" packet"}n.codes={};for(let a in n.types){let l=n.types[a];n.codes[l]=a}n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=o.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=o.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=o.from([n.codes.connect<<n.CMD_SHIFT]),n.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},n.propertiesCodes={};for(let a in n.properties){let l=n.properties[a];n.propertiesCodes[l]=a}n.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function s(a){return[0,1,2].map(l=>[0,1].map(c=>[0,1].map(h=>{let f=o.alloc(1);return f.writeUInt8(n.codes[a]<<n.CMD_SHIFT|(c?n.DUP_MASK:0)|l<<n.QOS_SHIFT|h,0,!0),f})))}n.PUBLISH_HEADER=s("publish"),n.SUBSCRIBE_HEADER=s("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=s("unsubscribe"),n.ACKS={unsuback:s("unsuback"),puback:s("puback"),pubcomp:s("pubcomp"),pubrel:s("pubrel"),pubrec:s("pubrec")},n.SUBACK_HEADER=o.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=o.from([3]),n.VERSION4=o.from([4]),n.VERSION5=o.from([5]),n.VERSION131=o.from([131]),n.VERSION132=o.from([132]),n.QOS=[0,1,2].map(a=>o.from([a])),n.EMPTY={pingreq:o.from([n.codes.pingreq<<4,0]),pingresp:o.from([n.codes.pingresp<<4,0]),disconnect:o.from([n.codes.disconnect<<4,0])},n.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},n.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},n.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},n.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},n.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},n.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),WH=qe((e,t)=>{Pe(),Le(),ke();var n=1e3,o=n*60,s=o*60,a=s*24,l=a*7,c=a*365.25;t.exports=function(g,b){b=b||{};var w=typeof g;if(w==="string"&&g.length>0)return h(g);if(w==="number"&&isFinite(g))return b.long?p(g):f(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function h(g){if(g=String(g),!(g.length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(b){var w=parseFloat(b[1]),F=(b[2]||"ms").toLowerCase();switch(F){case"years":case"year":case"yrs":case"yr":case"y":return w*c;case"weeks":case"week":case"w":return w*l;case"days":case"day":case"d":return w*a;case"hours":case"hour":case"hrs":case"hr":case"h":return w*s;case"minutes":case"minute":case"mins":case"min":case"m":return w*o;case"seconds":case"second":case"secs":case"sec":case"s":return w*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return w;default:return}}}}function f(g){var b=Math.abs(g);return b>=a?Math.round(g/a)+"d":b>=s?Math.round(g/s)+"h":b>=o?Math.round(g/o)+"m":b>=n?Math.round(g/n)+"s":g+"ms"}function p(g){var b=Math.abs(g);return b>=a?y(g,b,a,"day"):b>=s?y(g,b,s,"hour"):b>=o?y(g,b,o,"minute"):b>=n?y(g,b,n,"second"):g+" ms"}function y(g,b,w,F){var I=b>=w*1.5;return Math.round(g/w)+" "+F+(I?"s":"")}}),XH=qe((e,t)=>{Pe(),Le(),ke();function n(o){a.debug=a,a.default=a,a.coerce=y,a.disable=f,a.enable=c,a.enabled=p,a.humanize=WH(),a.destroy=g,Object.keys(o).forEach(b=>{a[b]=o[b]}),a.names=[],a.skips=[],a.formatters={};function s(b){let w=0;for(let F=0;F<b.length;F++)w=(w<<5)-w+b.charCodeAt(F),w|=0;return a.colors[Math.abs(w)%a.colors.length]}a.selectColor=s;function a(b){let w,F=null,I,R;function A(...E){if(!A.enabled)return;let M=A,T=Number(new Date),z=T-(w||T);M.diff=z,M.prev=w,M.curr=T,w=T,E[0]=a.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let L=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(k,j)=>{if(k==="%%")return"%";L++;let U=a.formatters[j];if(typeof U=="function"){let $=E[L];k=U.call(M,$),E.splice(L,1),L--}return k}),a.formatArgs.call(M,E),(M.log||a.log).apply(M,E)}return A.namespace=b,A.useColors=a.useColors(),A.color=a.selectColor(b),A.extend=l,A.destroy=a.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>F!==null?F:(I!==a.namespaces&&(I=a.namespaces,R=a.enabled(b)),R),set:E=>{F=E}}),typeof a.init=="function"&&a.init(A),A}function l(b,w){let F=a(this.namespace+(typeof w>"u"?":":w)+b);return F.log=this.log,F}function c(b){a.save(b),a.namespaces=b,a.names=[],a.skips=[];let w=(typeof b=="string"?b:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of w)F[0]==="-"?a.skips.push(F.slice(1)):a.names.push(F)}function h(b,w){let F=0,I=0,R=-1,A=0;for(;F<b.length;)if(I<w.length&&(w[I]===b[F]||w[I]==="*"))w[I]==="*"?(R=I,A=F,I++):(F++,I++);else if(R!==-1)I=R+1,A++,F=A;else return!1;for(;I<w.length&&w[I]==="*";)I++;return I===w.length}function f(){let b=[...a.names,...a.skips.map(w=>"-"+w)].join(",");return a.enable(""),b}function p(b){for(let w of a.skips)if(h(b,w))return!1;for(let w of a.names)if(h(b,w))return!0;return!1}function y(b){return b instanceof Error?b.stack||b.message:b}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a.enable(a.load()),a}t.exports=n}),qo=qe((e,t)=>{Pe(),Le(),ke(),e.formatArgs=o,e.save=s,e.load=a,e.useColors=n,e.storage=l(),e.destroy=(()=>{let h=!1;return()=>{h||(h=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let h;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(h=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(h[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(h){if(h[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+h[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let f="color: "+this.color;h.splice(1,0,f,"color: inherit");let p=0,y=0;h[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(p++,g==="%c"&&(y=p))}),h.splice(y,0,f)}e.log=console.debug||console.log||(()=>{});function s(h){try{h?e.storage.setItem("debug",h):e.storage.removeItem("debug")}catch{}}function a(){let h;try{h=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!h&&typeof Dt<"u"&&"env"in Dt&&(h=Dt.env.DEBUG),h}function l(){try{return localStorage}catch{}}t.exports=XH()(e);var{formatters:c}=t.exports;c.j=function(h){try{return JSON.stringify(h)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}),JH=qe((e,t)=>{Pe(),Le(),ke();var n=YH(),{EventEmitter:o}=(Pa(),Vt($s)),s=VH(),a=Q3(),l=qo()("mqtt-packet:parser"),c=class sA extends o{constructor(){super(),this.parser=this.constructor.parser}static parser(f){return this instanceof sA?(this.settings=f||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new sA().parser(f)}_resetState(){l("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new s,this.error=null,this._list=n(),this._stateCounter=0}parse(f){for(this.error&&this._resetState(),this._list.append(f),l("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,l("parse: state complete. _stateCounter is now: %d",this._stateCounter),l("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return l("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let f=this._list.readUInt8(0),p=f>>a.CMD_SHIFT;this.packet.cmd=a.types[p];let y=f&15,g=a.requiredHeaderFlags[p];return g!=null&&y!==g?this._emitError(new Error(a.requiredHeaderFlagsErrors[p])):(this.packet.retain=(f&a.RETAIN_MASK)!==0,this.packet.qos=f>>a.QOS_SHIFT&a.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(f&a.DUP_MASK)!==0,l("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let f=this._parseVarByteNum(!0);return f&&(this.packet.length=f.value,this._list.consume(f.bytes)),l("_parseLength %d",f.value),!!f}_parsePayload(){l("_parsePayload: payload %O",this._list);let f=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}f=!0}return l("_parsePayload complete result: %s",f),f}_parseConnect(){l("_parseConnect");let f,p,y,g,b={},w=this.packet,F=this._parseString();if(F===null)return this._emitError(new Error("Cannot parse protocolId"));if(F!=="MQTT"&&F!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(w.protocolId=F,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(w.protocolVersion=this._list.readUInt8(this._pos),w.protocolVersion>=128&&(w.bridgeMode=!0,w.protocolVersion=w.protocolVersion-128),w.protocolVersion!==3&&w.protocolVersion!==4&&w.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));b.username=this._list.readUInt8(this._pos)&a.USERNAME_MASK,b.password=this._list.readUInt8(this._pos)&a.PASSWORD_MASK,b.will=this._list.readUInt8(this._pos)&a.WILL_FLAG_MASK;let I=!!(this._list.readUInt8(this._pos)&a.WILL_RETAIN_MASK),R=(this._list.readUInt8(this._pos)&a.WILL_QOS_MASK)>>a.WILL_QOS_SHIFT;if(b.will)w.will={},w.will.retain=I,w.will.qos=R;else{if(I)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(R)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(w.clean=(this._list.readUInt8(this._pos)&a.CLEAN_SESSION_MASK)!==0,this._pos++,w.keepalive=this._parseNum(),w.keepalive===-1)return this._emitError(new Error("Packet too short"));if(w.protocolVersion===5){let E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(w.properties=E)}let A=this._parseString();if(A===null)return this._emitError(new Error("Packet too short"));if(w.clientId=A,l("_parseConnect: packet.clientId: %s",w.clientId),b.will){if(w.protocolVersion===5){let E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(w.will.properties=E)}if(f=this._parseString(),f===null)return this._emitError(new Error("Cannot parse will topic"));if(w.will.topic=f,l("_parseConnect: packet.will.topic: %s",w.will.topic),p=this._parseBuffer(),p===null)return this._emitError(new Error("Cannot parse will payload"));w.will.payload=p,l("_parseConnect: packet.will.paylaod: %s",w.will.payload)}if(b.username){if(g=this._parseString(),g===null)return this._emitError(new Error("Cannot parse username"));w.username=g,l("_parseConnect: packet.username: %s",w.username)}if(b.password){if(y=this._parseBuffer(),y===null)return this._emitError(new Error("Cannot parse password"));w.password=y}return this.settings=w,l("_parseConnect: complete"),w}_parseConnack(){l("_parseConnack");let f=this.packet;if(this._list.length<1)return null;let p=this._list.readUInt8(this._pos++);if(p>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(f.sessionPresent=!!(p&a.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?f.reasonCode=this._list.readUInt8(this._pos++):f.reasonCode=0;else{if(this._list.length<2)return null;f.returnCode=this._list.readUInt8(this._pos++)}if(f.returnCode===-1||f.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let y=this._parseProperties();Object.getOwnPropertyNames(y).length&&(f.properties=y)}l("_parseConnack: complete")}_parsePublish(){l("_parsePublish");let f=this.packet;if(f.topic=this._parseString(),f.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(f.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}f.payload=this._list.slice(this._pos,f.length),l("_parsePublish: payload from buffer list: %o",f.payload)}}_parseSubscribe(){l("_parseSubscribe");let f=this.packet,p,y,g,b,w,F,I;if(f.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let R=this._parseProperties();Object.getOwnPropertyNames(R).length&&(f.properties=R)}if(f.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<f.length;){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=f.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(y=this._parseByte(),this.settings.protocolVersion===5){if(y&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(y&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(g=y&a.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(F=(y>>a.SUBSCRIBE_OPTIONS_NL_SHIFT&a.SUBSCRIBE_OPTIONS_NL_MASK)!==0,w=(y>>a.SUBSCRIBE_OPTIONS_RAP_SHIFT&a.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,b=y>>a.SUBSCRIBE_OPTIONS_RH_SHIFT&a.SUBSCRIBE_OPTIONS_RH_MASK,b>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));I={topic:p,qos:g},this.settings.protocolVersion===5?(I.nl=F,I.rap=w,I.rh=b):this.settings.bridgeMode&&(I.rh=0,I.rap=!0,I.nl=!0),l("_parseSubscribe: push subscription `%s` to subscription",I),f.subscriptions.push(I)}}}_parseSuback(){l("_parseSuback");let f=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}if(f.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let p=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!a.MQTT5_SUBACK_CODES[p])return this._emitError(new Error("Invalid suback code"))}else if(p>2&&p!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(p)}}}_parseUnsubscribe(){l("_parseUnsubscribe");let f=this.packet;if(f.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}if(f.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<f.length;){let p=this._parseString();if(p===null)return this._emitError(new Error("Cannot parse topic"));l("_parseUnsubscribe: push topic `%s` to unsubscriptions",p),f.unsubscriptions.push(p)}}}_parseUnsuback(){l("_parseUnsuback");let f=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&f.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(f.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let p=this._parseProperties();for(Object.getOwnPropertyNames(p).length&&(f.properties=p),f.granted=[];this._pos<this.packet.length;){let y=this._list.readUInt8(this._pos++);if(!a.MQTT5_UNSUBACK_CODES[y])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(y)}}}_parseConfirmation(){l("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let f=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(f.length>2){switch(f.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!a.MQTT5_PUBACK_PUBREC_CODES[f.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!a.MQTT5_PUBREL_PUBCOMP_CODES[f.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}l("_parseConfirmation: packet.reasonCode `%d`",f.reasonCode)}else f.reasonCode=0;if(f.length>3){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}}return!0}_parseDisconnect(){let f=this.packet;if(l("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(f.reasonCode=this._parseByte(),a.MQTT5_DISCONNECT_CODES[f.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):f.reasonCode=0;let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}return l("_parseDisconnect result: true"),!0}_parseAuth(){l("_parseAuth");let f=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(f.reasonCode=this._parseByte(),!a.MQTT5_AUTH_CODES[f.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let p=this._parseProperties();return Object.getOwnPropertyNames(p).length&&(f.properties=p),l("_parseAuth: result: true"),!0}_parseMessageId(){let f=this.packet;return f.messageId=this._parseNum(),f.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(l("_parseMessageId: packet.messageId %d",f.messageId),!0)}_parseString(f){let p=this._parseNum(),y=p+this._pos;if(p===-1||y>this._list.length||y>this.packet.length)return null;let g=this._list.toString("utf8",this._pos,y);return this._pos+=p,l("_parseString: result: %s",g),g}_parseStringPair(){return l("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let f=this._parseNum(),p=f+this._pos;if(f===-1||p>this._list.length||p>this.packet.length)return null;let y=this._list.slice(this._pos,p);return this._pos+=f,l("_parseBuffer: result: %o",y),y}_parseNum(){if(this._list.length-this._pos<2)return-1;let f=this._list.readUInt16BE(this._pos);return this._pos+=2,l("_parseNum: result: %s",f),f}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let f=this._list.readUInt32BE(this._pos);return this._pos+=4,l("_parse4ByteNum: result: %s",f),f}_parseVarByteNum(f){l("_parseVarByteNum");let p=4,y=0,g=1,b=0,w=!1,F,I=this._pos?this._pos:0;for(;y<p&&I+y<this._list.length;){if(F=this._list.readUInt8(I+y++),b+=g*(F&a.VARBYTEINT_MASK),g*=128,(F&a.VARBYTEINT_FIN_MASK)===0){w=!0;break}if(this._list.length<=y)break}return!w&&y===p&&this._list.length>=y&&this._emitError(new Error("Invalid variable byte integer")),I&&(this._pos+=y),w?f?w={bytes:y,value:b}:w=b:w=!1,l("_parseVarByteNum: result: %o",w),w}_parseByte(){let f;return this._pos<this._list.length&&(f=this._list.readUInt8(this._pos),this._pos++),l("_parseByte: result: %o",f),f}_parseByType(f){switch(l("_parseByType: type: %s",f),f){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){l("_parseProperties");let f=this._parseVarByteNum(),p=this._pos+f,y={};for(;this._pos<p;){let g=this._parseByte();if(!g)return this._emitError(new Error("Cannot parse property code type")),!1;let b=a.propertiesCodes[g];if(!b)return this._emitError(new Error("Unknown property")),!1;if(b==="userProperties"){y[b]||(y[b]=Object.create(null));let w=this._parseByType(a.propertiesTypes[b]);if(y[b][w.name])if(Array.isArray(y[b][w.name]))y[b][w.name].push(w.value);else{let F=y[b][w.name];y[b][w.name]=[F],y[b][w.name].push(w.value)}else y[b][w.name]=w.value;continue}y[b]?Array.isArray(y[b])?y[b].push(this._parseByType(a.propertiesTypes[b])):(y[b]=[y[b]],y[b].push(this._parseByType(a.propertiesTypes[b]))):y[b]=this._parseByType(a.propertiesTypes[b])}return y}_newPacket(){return l("_newPacket"),this.packet&&(this._list.consume(this.packet.length),l("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),l("_newPacket: new packet"),this.packet=new s,this._pos=0,!0}_emitError(f){l("_emitError",f),this.error=f,this.emit("error",f)}};t.exports=c}),ZH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),o=65536,s={},a=n.isBuffer(n.from([1,2]).subarray(0,1));function l(p){let y=n.allocUnsafe(2);return y.writeUInt8(p>>8,0),y.writeUInt8(p&255,1),y}function c(){for(let p=0;p<o;p++)s[p]=l(p)}function h(p){let y=0,g=0,b=n.allocUnsafe(4);do y=p%128|0,p=p/128|0,p>0&&(y=y|128),b.writeUInt8(y,g++);while(p>0&&g<4);return p>0&&(g=0),a?b.subarray(0,g):b.slice(0,g)}function f(p){let y=n.allocUnsafe(4);return y.writeUInt32BE(p,0),y}t.exports={cache:s,generateCache:c,generateNumber:l,genBufVariableByteInt:h,generate4ByteBuffer:f}}),eQ=qe((e,t)=>{Pe(),Le(),ke(),typeof Dt>"u"||!Dt.version||Dt.version.indexOf("v0.")===0||Dt.version.indexOf("v1.")===0&&Dt.version.indexOf("v1.8.")!==0?t.exports={nextTick:n}:t.exports=Dt;function n(o,s,a,l){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,h,f;switch(c){case 0:case 1:return Dt.nextTick(o);case 2:return Dt.nextTick(function(){o.call(null,s)});case 3:return Dt.nextTick(function(){o.call(null,s,a)});case 4:return Dt.nextTick(function(){o.call(null,s,a,l)});default:for(h=new Array(c-1),f=0;f<h.length;)h[f++]=arguments[f];return Dt.nextTick(function(){o.apply(null,h)})}}}),G3=qe((e,t)=>{Pe(),Le(),ke();var n=Q3(),{Buffer:o}=(Yr(),Vt(Kr)),s=o.allocUnsafe(0),a=o.from([0]),l=ZH(),c=eQ().nextTick,h=qo()("mqtt-packet:writeToStream"),f=l.cache,p=l.generateNumber,y=l.generateCache,g=l.genBufVariableByteInt,b=l.generate4ByteBuffer,w=ae,F=!0;function I(ue,ne,J){switch(h("generate called"),ne.cork&&(ne.cork(),c(R,ne)),F&&(F=!1,y()),h("generate: packet.cmd: %s",ue.cmd),ue.cmd){case"connect":return A(ue,ne);case"connack":return E(ue,ne,J);case"publish":return M(ue,ne,J);case"puback":case"pubrec":case"pubrel":case"pubcomp":return T(ue,ne,J);case"subscribe":return z(ue,ne,J);case"suback":return L(ue,ne,J);case"unsubscribe":return k(ue,ne,J);case"unsuback":return j(ue,ne,J);case"pingreq":case"pingresp":return U(ue,ne);case"disconnect":return $(ue,ne,J);case"auth":return N(ue,ne,J);default:return ne.destroy(new Error("Unknown command")),!1}}Object.defineProperty(I,"cacheNumbers",{get(){return w===ae},set(ue){ue?((!f||Object.keys(f).length===0)&&(F=!0),w=ae):(F=!1,w=ye)}});function R(ue){ue.uncork()}function A(ue,ne,J){let O=ue||{},H=O.protocolId||"MQTT",Y=O.protocolVersion||4,se=O.will,pe=O.clean,te=O.keepalive||0,_=O.clientId||"",v=O.username,C=O.password,P=O.properties;pe===void 0&&(pe=!0);let he=0;if(typeof H!="string"&&!o.isBuffer(H))return ne.destroy(new Error("Invalid protocolId")),!1;if(he+=H.length+2,Y!==3&&Y!==4&&Y!==5)return ne.destroy(new Error("Invalid protocol version")),!1;if(he+=1,(typeof _=="string"||o.isBuffer(_))&&(_||Y>=4)&&(_||pe))he+=o.byteLength(_)+2;else{if(Y<4)return ne.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(pe*1===0)return ne.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof te!="number"||te<0||te>65535||te%1!==0)return ne.destroy(new Error("Invalid keepalive")),!1;he+=2,he+=1;let ce,Se;if(Y===5){if(ce=G(ne,P),!ce)return!1;he+=ce.length}if(se){if(typeof se!="object")return ne.destroy(new Error("Invalid will")),!1;if(!se.topic||typeof se.topic!="string")return ne.destroy(new Error("Invalid will topic")),!1;if(he+=o.byteLength(se.topic)+2,he+=2,se.payload)if(se.payload.length>=0)typeof se.payload=="string"?he+=o.byteLength(se.payload):he+=se.payload.length;else return ne.destroy(new Error("Invalid will payload")),!1;if(Se={},Y===5){if(Se=G(ne,se.properties),!Se)return!1;he+=Se.length}}let Be=!1;if(v!=null)if(fe(v))Be=!0,he+=o.byteLength(v)+2;else return ne.destroy(new Error("Invalid username")),!1;if(C!=null){if(!Be)return ne.destroy(new Error("Username is required to use password")),!1;if(fe(C))he+=q(C)+2;else return ne.destroy(new Error("Invalid password")),!1}ne.write(n.CONNECT_HEADER),re(ne,he),ee(ne,H),O.bridgeMode&&(Y+=128),ne.write(Y===131?n.VERSION131:Y===132?n.VERSION132:Y===4?n.VERSION4:Y===5?n.VERSION5:n.VERSION3);let de=0;return de|=v!=null?n.USERNAME_MASK:0,de|=C!=null?n.PASSWORD_MASK:0,de|=se&&se.retain?n.WILL_RETAIN_MASK:0,de|=se&&se.qos?se.qos<<n.WILL_QOS_SHIFT:0,de|=se?n.WILL_FLAG_MASK:0,de|=pe?n.CLEAN_SESSION_MASK:0,ne.write(o.from([de])),w(ne,te),Y===5&&ce.write(),ee(ne,_),se&&(Y===5&&Se.write(),ie(ne,se.topic),ee(ne,se.payload)),v!=null&&ee(ne,v),C!=null&&ee(ne,C),!0}function E(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=O===5?H.reasonCode:H.returnCode,se=H.properties,pe=2;if(typeof Y!="number")return ne.destroy(new Error("Invalid return code")),!1;let te=null;if(O===5){if(te=G(ne,se),!te)return!1;pe+=te.length}return ne.write(n.CONNACK_HEADER),re(ne,pe),ne.write(H.sessionPresent?n.SESSIONPRESENT_HEADER:a),ne.write(o.from([Y])),te==null||te.write(),!0}function M(ue,ne,J){h("publish: packet: %o",ue);let O=J?J.protocolVersion:4,H=ue||{},Y=H.qos||0,se=H.retain?n.RETAIN_MASK:0,pe=H.topic,te=H.payload||s,_=H.messageId,v=H.properties,C=0;if(typeof pe=="string")C+=o.byteLength(pe)+2;else if(o.isBuffer(pe))C+=pe.length+2;else return ne.destroy(new Error("Invalid topic")),!1;if(o.isBuffer(te)?C+=te.length:C+=o.byteLength(te),Y&&typeof _!="number")return ne.destroy(new Error("Invalid messageId")),!1;Y&&(C+=2);let P=null;if(O===5){if(P=G(ne,v),!P)return!1;C+=P.length}return ne.write(n.PUBLISH_HEADER[Y][H.dup?1:0][se?1:0]),re(ne,C),w(ne,q(pe)),ne.write(pe),Y>0&&w(ne,_),P==null||P.write(),h("publish: payload: %o",te),ne.write(te)}function T(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.cmd||"puback",se=H.messageId,pe=H.dup&&Y==="pubrel"?n.DUP_MASK:0,te=0,_=H.reasonCode,v=H.properties,C=O===5?3:2;if(Y==="pubrel"&&(te=1),typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;let P=null;if(O===5&&typeof v=="object"){if(P=Q(ne,v,J,C),!P)return!1;C+=P.length}return ne.write(n.ACKS[Y][te][pe][0]),C===3&&(C+=_!==0?1:-1),re(ne,C),w(ne,se),O===5&&C!==2&&ne.write(o.from([_])),P!==null?P.write():C===4&&ne.write(o.from([0])),!0}function z(ue,ne,J){h("subscribe: packet: ");let O=J?J.protocolVersion:4,H=ue||{},Y=H.dup?n.DUP_MASK:0,se=H.messageId,pe=H.subscriptions,te=H.properties,_=0;if(typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;_+=2;let v=null;if(O===5){if(v=G(ne,te),!v)return!1;_+=v.length}if(typeof pe=="object"&&pe.length)for(let P=0;P<pe.length;P+=1){let he=pe[P].topic,ce=pe[P].qos;if(typeof he!="string")return ne.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof ce!="number")return ne.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(O===5){if(typeof(pe[P].nl||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(pe[P].rap||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let Se=pe[P].rh||0;if(typeof Se!="number"||Se>2)return ne.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}_+=o.byteLength(he)+2+1}else return ne.destroy(new Error("Invalid subscriptions")),!1;h("subscribe: writing to stream: %o",n.SUBSCRIBE_HEADER),ne.write(n.SUBSCRIBE_HEADER[1][Y?1:0][0]),re(ne,_),w(ne,se),v!==null&&v.write();let C=!0;for(let P of pe){let he=P.topic,ce=P.qos,Se=+P.nl,Be=+P.rap,de=P.rh,ve;ie(ne,he),ve=n.SUBSCRIBE_OPTIONS_QOS[ce],O===5&&(ve|=Se?n.SUBSCRIBE_OPTIONS_NL:0,ve|=Be?n.SUBSCRIBE_OPTIONS_RAP:0,ve|=de?n.SUBSCRIBE_OPTIONS_RH[de]:0),C=ne.write(o.from([ve]))}return C}function L(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.messageId,se=H.granted,pe=H.properties,te=0;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(te+=2,typeof se=="object"&&se.length)for(let v=0;v<se.length;v+=1){if(typeof se[v]!="number")return ne.destroy(new Error("Invalid qos vector")),!1;te+=1}else return ne.destroy(new Error("Invalid qos vector")),!1;let _=null;if(O===5){if(_=Q(ne,pe,J,te),!_)return!1;te+=_.length}return ne.write(n.SUBACK_HEADER),re(ne,te),w(ne,Y),_!==null&&_.write(),ne.write(o.from(se))}function k(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.messageId,se=H.dup?n.DUP_MASK:0,pe=H.unsubscriptions,te=H.properties,_=0;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(_+=2,typeof pe=="object"&&pe.length)for(let P=0;P<pe.length;P+=1){if(typeof pe[P]!="string")return ne.destroy(new Error("Invalid unsubscriptions")),!1;_+=o.byteLength(pe[P])+2}else return ne.destroy(new Error("Invalid unsubscriptions")),!1;let v=null;if(O===5){if(v=G(ne,te),!v)return!1;_+=v.length}ne.write(n.UNSUBSCRIBE_HEADER[1][se?1:0][0]),re(ne,_),w(ne,Y),v!==null&&v.write();let C=!0;for(let P=0;P<pe.length;P++)C=ie(ne,pe[P]);return C}function j(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.messageId,se=H.dup?n.DUP_MASK:0,pe=H.granted,te=H.properties,_=H.cmd,v=0,C=2;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(O===5)if(typeof pe=="object"&&pe.length)for(let he=0;he<pe.length;he+=1){if(typeof pe[he]!="number")return ne.destroy(new Error("Invalid qos vector")),!1;C+=1}else return ne.destroy(new Error("Invalid qos vector")),!1;let P=null;if(O===5){if(P=Q(ne,te,J,C),!P)return!1;C+=P.length}return ne.write(n.ACKS[_][v][se][0]),re(ne,C),w(ne,Y),P!==null&&P.write(),O===5&&ne.write(o.from(pe)),!0}function U(ue,ne,J){return ne.write(n.EMPTY[ue.cmd])}function $(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.reasonCode,se=H.properties,pe=O===5?1:0,te=null;if(O===5){if(te=Q(ne,se,J,pe),!te)return!1;pe+=te.length}return ne.write(o.from([n.codes.disconnect<<4])),re(ne,pe),O===5&&ne.write(o.from([Y])),te!==null&&te.write(),!0}function N(ue,ne,J){let O=J?J.protocolVersion:4,H=ue||{},Y=H.reasonCode,se=H.properties,pe=O===5?1:0;O!==5&&ne.destroy(new Error("Invalid mqtt version for auth packet"));let te=Q(ne,se,J,pe);return te?(pe+=te.length,ne.write(o.from([n.codes.auth<<4])),re(ne,pe),ne.write(o.from([Y])),te!==null&&te.write(),!0):!1}var Z={};function re(ue,ne){if(ne>n.VARBYTEINT_MAX)return ue.destroy(new Error(`Invalid variable byte integer: ${ne}`)),!1;let J=Z[ne];return J||(J=g(ne),ne<16384&&(Z[ne]=J)),h("writeVarByteInt: writing to stream: %o",J),ue.write(J)}function ie(ue,ne){let J=o.byteLength(ne);return w(ue,J),h("writeString: %s",ne),ue.write(ne,"utf8")}function X(ue,ne,J){ie(ue,ne),ie(ue,J)}function ae(ue,ne){return h("writeNumberCached: number: %d",ne),h("writeNumberCached: %o",f[ne]),ue.write(f[ne])}function ye(ue,ne){let J=p(ne);return h("writeNumberGenerated: %o",J),ue.write(J)}function le(ue,ne){let J=b(ne);return h("write4ByteNumber: %o",J),ue.write(J)}function ee(ue,ne){typeof ne=="string"?ie(ue,ne):ne?(w(ue,ne.length),ue.write(ne)):w(ue,0)}function G(ue,ne){if(typeof ne!="object"||ne.length!=null)return{length:1,write(){W(ue,{},0)}};let J=0;function O(H,Y){let se=n.propertiesTypes[H],pe=0;switch(se){case"byte":{if(typeof Y!="boolean")return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=2;break}case"int8":{if(typeof Y!="number"||Y<0||Y>255)return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=2;break}case"binary":{if(Y&&Y===null)return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=1+o.byteLength(Y)+2;break}case"int16":{if(typeof Y!="number"||Y<0||Y>65535)return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=3;break}case"int32":{if(typeof Y!="number"||Y<0||Y>4294967295)return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=5;break}case"var":{if(typeof Y!="number"||Y<0||Y>268435455)return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=1+o.byteLength(g(Y));break}case"string":{if(typeof Y!="string")return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=3+o.byteLength(Y.toString());break}case"pair":{if(typeof Y!="object")return ue.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=Object.getOwnPropertyNames(Y).reduce((te,_)=>{let v=Y[_];return Array.isArray(v)?te+=v.reduce((C,P)=>(C+=3+o.byteLength(_.toString())+2+o.byteLength(P.toString()),C),0):te+=3+o.byteLength(_.toString())+2+o.byteLength(Y[_].toString()),te},0);break}default:return ue.destroy(new Error(`Invalid property ${H}: ${Y}`)),!1}return pe}if(ne)for(let H in ne){let Y=0,se=0,pe=ne[H];if(pe!==void 0){if(Array.isArray(pe))for(let te=0;te<pe.length;te++){if(se=O(H,pe[te]),!se)return!1;Y+=se}else{if(se=O(H,pe),!se)return!1;Y=se}if(!Y)return!1;J+=Y}}return{length:o.byteLength(g(J))+J,write(){W(ue,ne,J)}}}function Q(ue,ne,J,O){let H=["reasonString","userProperties"],Y=J&&J.properties&&J.properties.maximumPacketSize?J.properties.maximumPacketSize:0,se=G(ue,ne);if(Y)for(;O+se.length>Y;){let pe=H.shift();if(pe&&ne[pe])delete ne[pe],se=G(ue,ne);else return!1}return se}function K(ue,ne,J){switch(n.propertiesTypes[ne]){case"byte":{ue.write(o.from([n.properties[ne]])),ue.write(o.from([+J]));break}case"int8":{ue.write(o.from([n.properties[ne]])),ue.write(o.from([J]));break}case"binary":{ue.write(o.from([n.properties[ne]])),ee(ue,J);break}case"int16":{ue.write(o.from([n.properties[ne]])),w(ue,J);break}case"int32":{ue.write(o.from([n.properties[ne]])),le(ue,J);break}case"var":{ue.write(o.from([n.properties[ne]])),re(ue,J);break}case"string":{ue.write(o.from([n.properties[ne]])),ie(ue,J);break}case"pair":{Object.getOwnPropertyNames(J).forEach(O=>{let H=J[O];Array.isArray(H)?H.forEach(Y=>{ue.write(o.from([n.properties[ne]])),X(ue,O.toString(),Y.toString())}):(ue.write(o.from([n.properties[ne]])),X(ue,O.toString(),H.toString()))});break}default:return ue.destroy(new Error(`Invalid property ${ne} value: ${J}`)),!1}}function W(ue,ne,J){re(ue,J);for(let O in ne)if(Object.prototype.hasOwnProperty.call(ne,O)&&ne[O]!=null){let H=ne[O];if(Array.isArray(H))for(let Y=0;Y<H.length;Y++)K(ue,O,H[Y]);else K(ue,O,H)}}function q(ue){return ue?ue instanceof o?ue.length:o.byteLength(ue):0}function fe(ue){return typeof ue=="string"||ue instanceof o}t.exports=I}),tQ=qe((e,t)=>{Pe(),Le(),ke();var n=G3(),{EventEmitter:o}=(Pa(),Vt($s)),{Buffer:s}=(Yr(),Vt(Kr));function a(c,h){let f=new l;return n(c,f,h),f.concat()}var l=class extends o{constructor(){super(),this._array=new Array(20),this._i=0}write(c){return this._array[this._i++]=c,!0}concat(){let c=0,h=new Array(this._array.length),f=this._array,p=0,y;for(y=0;y<f.length&&f[y]!==void 0;y++)typeof f[y]!="string"?h[y]=f[y].length:h[y]=s.byteLength(f[y]),c+=h[y];let g=s.allocUnsafe(c);for(y=0;y<f.length&&f[y]!==void 0;y++)typeof f[y]!="string"?(f[y].copy(g,p),p+=h[y]):(g.write(f[y],p),p+=h[y]);return g}destroy(c){c&&this.emit("error",c)}};t.exports=a}),rQ=qe(e=>{Pe(),Le(),ke(),e.parser=JH().parser,e.generate=tQ(),e.writeToStream=G3()}),nQ=qe((e,t)=>{Pe(),Le(),ke(),t.exports=o;function n(a){return a instanceof Wd?Wd.from(a):new a.constructor(a.buffer.slice(),a.byteOffset,a.length)}function o(a){if(a=a||{},a.circles)return s(a);let l=new Map;if(l.set(Date,y=>new Date(y)),l.set(Map,(y,g)=>new Map(h(Array.from(y),g))),l.set(Set,(y,g)=>new Set(h(Array.from(y),g))),a.constructorHandlers)for(let y of a.constructorHandlers)l.set(y[0],y[1]);let c=null;return a.proto?p:f;function h(y,g){let b=Object.keys(y),w=new Array(b.length);for(let F=0;F<b.length;F++){let I=b[F],R=y[I];typeof R!="object"||R===null?w[I]=R:R.constructor!==Object&&(c=l.get(R.constructor))?w[I]=c(R,g):ArrayBuffer.isView(R)?w[I]=n(R):w[I]=g(R)}return w}function f(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return h(y,f);if(y.constructor!==Object&&(c=l.get(y.constructor)))return c(y,f);let g={};for(let b in y){if(Object.hasOwnProperty.call(y,b)===!1)continue;let w=y[b];typeof w!="object"||w===null?g[b]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[b]=c(w,f):ArrayBuffer.isView(w)?g[b]=n(w):g[b]=f(w)}return g}function p(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return h(y,p);if(y.constructor!==Object&&(c=l.get(y.constructor)))return c(y,p);let g={};for(let b in y){let w=y[b];typeof w!="object"||w===null?g[b]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[b]=c(w,p):ArrayBuffer.isView(w)?g[b]=n(w):g[b]=p(w)}return g}}function s(a){let l=[],c=[],h=new Map;if(h.set(Date,b=>new Date(b)),h.set(Map,(b,w)=>new Map(p(Array.from(b),w))),h.set(Set,(b,w)=>new Set(p(Array.from(b),w))),a.constructorHandlers)for(let b of a.constructorHandlers)h.set(b[0],b[1]);let f=null;return a.proto?g:y;function p(b,w){let F=Object.keys(b),I=new Array(F.length);for(let R=0;R<F.length;R++){let A=F[R],E=b[A];if(typeof E!="object"||E===null)I[A]=E;else if(E.constructor!==Object&&(f=h.get(E.constructor)))I[A]=f(E,w);else if(ArrayBuffer.isView(E))I[A]=n(E);else{let M=l.indexOf(E);M!==-1?I[A]=c[M]:I[A]=w(E)}}return I}function y(b){if(typeof b!="object"||b===null)return b;if(Array.isArray(b))return p(b,y);if(b.constructor!==Object&&(f=h.get(b.constructor)))return f(b,y);let w={};l.push(b),c.push(w);for(let F in b){if(Object.hasOwnProperty.call(b,F)===!1)continue;let I=b[F];if(typeof I!="object"||I===null)w[F]=I;else if(I.constructor!==Object&&(f=h.get(I.constructor)))w[F]=f(I,y);else if(ArrayBuffer.isView(I))w[F]=n(I);else{let R=l.indexOf(I);R!==-1?w[F]=c[R]:w[F]=y(I)}}return l.pop(),c.pop(),w}function g(b){if(typeof b!="object"||b===null)return b;if(Array.isArray(b))return p(b,g);if(b.constructor!==Object&&(f=h.get(b.constructor)))return f(b,g);let w={};l.push(b),c.push(w);for(let F in b){let I=b[F];if(typeof I!="object"||I===null)w[F]=I;else if(I.constructor!==Object&&(f=h.get(I.constructor)))w[F]=f(I,g);else if(ArrayBuffer.isView(I))w[F]=n(I);else{let R=l.indexOf(I);R!==-1?w[F]=c[R]:w[F]=g(I)}}return l.pop(),c.pop(),w}}}),iQ=qe((e,t)=>{Pe(),Le(),ke(),t.exports=nQ()()}),oQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopic=t,e.validateTopics=n;function t(o){let s=o.split("/");for(let a=0;a<s.length;a++)if(s[a]!=="+"){if(s[a]==="#")return a===s.length-1;if(s[a].indexOf("+")!==-1||s[a].indexOf("#")!==-1)return!1}return!0}function n(o){if(o.length===0)return"empty_topic_list";for(let s=0;s<o.length;s++)if(!t(o[s]))return o[s];return null}}),K3=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=La(),n={objectMode:!0},o={clean:!0},s=class{constructor(a){rt(this,"options");rt(this,"_inflights");this.options=a||{},this.options={...o,...a},this._inflights=new Map}put(a,l){return this._inflights.set(a.messageId,a),l&&l(),this}createStream(){let a=new t.Readable(n),l=[],c=!1,h=0;return this._inflights.forEach((f,p)=>{l.push(f)}),a._read=()=>{!c&&h<l.length?a.push(l[h++]):a.push(null)},a.destroy=f=>{if(!c)return c=!0,setTimeout(()=>{a.emit("close")},0),a},a}del(a,l){let c=this._inflights.get(a.messageId);return c?(this._inflights.delete(a.messageId),l(null,c)):l&&l(new Error("missing packet")),this}get(a,l){let c=this._inflights.get(a.messageId);return c?l(null,c):l&&l(new Error("missing packet")),this}close(a){this.options.clean&&(this._inflights=null),a&&a()}};e.default=s}),sQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=[0,16,128,131,135,144,145,151,153],n=(o,s,a)=>{o.log("handlePublish: packet %o",s),a=typeof a<"u"?a:o.noop;let l=s.topic.toString(),c=s.payload,{qos:h}=s,{messageId:f}=s,{options:p}=o;if(o.options.protocolVersion===5){let y;if(s.properties&&(y=s.properties.topicAlias),typeof y<"u")if(l.length===0)if(y>0&&y<=65535){let g=o.topicAliasRecv.getTopicByAlias(y);if(g)l=g,o.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",l,y);else{o.log("handlePublish :: unregistered topic alias. alias: %d",y),o.emit("error",new Error("Received unregistered Topic Alias"));return}}else{o.log("handlePublish :: topic alias out of range. alias: %d",y),o.emit("error",new Error("Received Topic Alias is out of range"));return}else if(o.topicAliasRecv.put(l,y))o.log("handlePublish :: registered topic: %s - alias: %d",l,y);else{o.log("handlePublish :: topic alias out of range. alias: %d",y),o.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(o.log("handlePublish: qos %d",h),h){case 2:{p.customHandleAcks(l,c,s,(y,g)=>{if(typeof y=="number"&&(g=y,y=null),y)return o.emit("error",y);if(t.indexOf(g)===-1)return o.emit("error",new Error("Wrong reason code for pubrec"));g?o._sendPacket({cmd:"pubrec",messageId:f,reasonCode:g},a):o.incomingStore.put(s,()=>{o._sendPacket({cmd:"pubrec",messageId:f},a)})});break}case 1:{p.customHandleAcks(l,c,s,(y,g)=>{if(typeof y=="number"&&(g=y,y=null),y)return o.emit("error",y);if(t.indexOf(g)===-1)return o.emit("error",new Error("Wrong reason code for puback"));g||o.emit("message",l,c,s),o.handleMessage(s,b=>{if(b)return a&&a(b);o._sendPacket({cmd:"puback",messageId:f,reasonCode:g},a)})});break}case 0:o.emit("message",l,c,s),o.handleMessage(s,a);break;default:o.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=n}),aQ=qe((e,t)=>{t.exports={version:"5.14.1"}}),fl=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.ErrorWithSubackPacket=e.ErrorWithReasonCode=void 0,e.applyMixin=o;var t=class Y3 extends Error{constructor(l,c){super(l);rt(this,"code");this.code=c,Object.setPrototypeOf(this,Y3.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=t;var n=class V3 extends Error{constructor(l,c){super(l);rt(this,"packet");this.packet=c,Object.setPrototypeOf(this,V3.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};e.ErrorWithSubackPacket=n;function o(s,a,l=!1){let c=[a];for(;;){let h=c[0],f=Object.getPrototypeOf(h);if(f!=null&&f.prototype)c.unshift(f);else break}for(let h of c)for(let f of Object.getOwnPropertyNames(h.prototype))(l||f!=="constructor")&&Object.defineProperty(s.prototype,f,Object.getOwnPropertyDescriptor(h.prototype,f)??Object.create(null))}e.nextTick=typeof(Dt==null?void 0:Dt.nextTick)=="function"?Dt.nextTick:s=>{setTimeout(s,0)},e.MQTTJS_VERSION=aQ().version}),Gp=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var t=fl();e.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var n=(o,s)=>{let{messageId:a}=s,l=s.cmd,c=null,h=o.outgoing[a]?o.outgoing[a].cb:null,f=null;if(!h){o.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(o.log("_handleAck :: packet type",l),l){case"pubcomp":case"puback":{let p=s.reasonCode;p&&p>0&&p!==16?(f=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[p]}`,p),o._removeOutgoingAndStoreMessage(a,()=>{h(f,s)})):o._removeOutgoingAndStoreMessage(a,h);break}case"pubrec":{c={cmd:"pubrel",qos:2,messageId:a};let p=s.reasonCode;p&&p>0&&p!==16?(f=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[p]}`,p),o._removeOutgoingAndStoreMessage(a,()=>{h(f,s)})):o._sendPacket(c);break}case"suback":{delete o.outgoing[a],o.messageIdProvider.deallocate(a);let p=s.granted;for(let y=0;y<p.length;y++){let g=p[y];if((g&128)!==0){f=new Error(`Subscribe error: ${e.ReasonCodes[g]}`),f.code=g;let b=o.messageIdToTopic[a];b&&b.forEach(w=>{delete o._resubscribeTopics[w]})}}delete o.messageIdToTopic[a],o._invokeStoreProcessingQueue(),h(f,s);break}case"unsuback":{delete o.outgoing[a],o.messageIdProvider.deallocate(a),o._invokeStoreProcessingQueue(),h(null,s);break}default:o.emit("error",new Error("unrecognized packet type"))}o.disconnecting&&Object.keys(o.outgoing).length===0&&o.emit("outgoingEmpty")};e.default=n}),uQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=fl(),n=Gp(),o=(s,a)=>{let{options:l}=s,c=l.protocolVersion,h=c===5?a.reasonCode:a.returnCode;if(c!==5){let f=new t.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${c}`,h);s.emit("error",f);return}s.handleAuth(a,(f,p)=>{if(f){s.emit("error",f);return}if(h===24)s.reconnecting=!1,s._sendPacket(p);else{let y=new t.ErrorWithReasonCode(`Connection refused: ${n.ReasonCodes[h]}`,h);s.emit("error",y)}})};e.default=o}),lQ=qe(e=>{var b,w,F,I,R,A,E,M,T,z,L,k,j,U,$,N,Z,re,ie,X,ae,ye,le,ee,G,Q,K,W,q,aA,ue,ne,J,O,W3,Y,se,pe,Ss,Is,uA,gd,md,tr,lA,mc,_s,cA,ve;Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,n=new Set,o=typeof Dt=="object"&&Dt?Dt:{},s=(x,B,D,oe)=>{typeof o.emitWarning=="function"?o.emitWarning(x,B,D,oe):console.error(`[${D}] ${B}: ${x}`)},a=globalThis.AbortController,l=globalThis.AbortSignal;if(typeof a>"u"){l=class{constructor(){rt(this,"onabort");rt(this,"_onabort",[]);rt(this,"reason");rt(this,"aborted",!1)}addEventListener(D,oe){this._onabort.push(oe)}},a=class{constructor(){rt(this,"signal",new l);B()}abort(D){var oe,me;if(!this.signal.aborted){this.signal.reason=D,this.signal.aborted=!0;for(let xe of this.signal._onabort)xe(D);(me=(oe=this.signal).onabort)==null||me.call(oe,D)}}};let x=((b=o.env)==null?void 0:b.LRU_CACHE_IGNORE_AC_WARNING)!=="1",B=()=>{x&&(x=!1,s("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",B))}}var c=x=>!n.has(x),h=x=>x&&x===Math.floor(x)&&x>0&&isFinite(x),f=x=>h(x)?x<=Math.pow(2,8)?Uint8Array:x<=Math.pow(2,16)?Uint16Array:x<=Math.pow(2,32)?Uint32Array:x<=Number.MAX_SAFE_INTEGER?p:null:null,p=class extends Array{constructor(x){super(x),this.fill(0)}},y=(w=class{constructor(B,D){rt(this,"heap");rt(this,"length");if(!Ae(w,F))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new D(B),this.length=0}static create(B){let D=f(B);if(!D)return[];ht(w,F,!0);let oe=new w(B,D);return ht(w,F,!1),oe}push(B){this.heap[this.length++]=B}pop(){return this.heap[--this.length]}},F=new WeakMap,Et(w,F,!1),w),g=(ve=class{constructor(B){Et(this,q);Et(this,A);Et(this,E);Et(this,M);Et(this,T);Et(this,z);Et(this,L);rt(this,"ttl");rt(this,"ttlResolution");rt(this,"ttlAutopurge");rt(this,"updateAgeOnGet");rt(this,"updateAgeOnHas");rt(this,"allowStale");rt(this,"noDisposeOnSet");rt(this,"noUpdateTTL");rt(this,"maxEntrySize");rt(this,"sizeCalculation");rt(this,"noDeleteOnFetchRejection");rt(this,"noDeleteOnStaleGet");rt(this,"allowStaleOnFetchAbort");rt(this,"allowStaleOnFetchRejection");rt(this,"ignoreFetchAbort");Et(this,k);Et(this,j);Et(this,U);Et(this,$);Et(this,N);Et(this,Z);Et(this,re);Et(this,ie);Et(this,X);Et(this,ae);Et(this,ye);Et(this,le);Et(this,ee);Et(this,G);Et(this,Q);Et(this,K);Et(this,W);Et(this,ue,()=>{});Et(this,ne,()=>{});Et(this,J,()=>{});Et(this,O,()=>!1);Et(this,Y,B=>{});Et(this,se,(B,D,oe)=>{});Et(this,pe,(B,D,oe,me)=>{if(oe||me)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});rt(this,I,"LRUCache");let{max:D=0,ttl:oe,ttlResolution:me=1,ttlAutopurge:xe,updateAgeOnGet:Ce,updateAgeOnHas:we,allowStale:Ie,dispose:He,disposeAfter:Ke,noDisposeOnSet:We,noUpdateTTL:et,maxSize:gt=0,maxEntrySize:bt=0,sizeCalculation:lt,fetchMethod:yt,memoMethod:tt,noDeleteOnFetchRejection:ft,noDeleteOnStaleGet:dt,allowStaleOnFetchRejection:At,allowStaleOnFetchAbort:Jt,ignoreFetchAbort:Ar}=B;if(D!==0&&!h(D))throw new TypeError("max option must be a nonnegative integer");let be=D?f(D):Array;if(!be)throw new Error("invalid max value: "+D);if(ht(this,A,D),ht(this,E,gt),this.maxEntrySize=bt||Ae(this,E),this.sizeCalculation=lt,this.sizeCalculation){if(!Ae(this,E)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(tt!==void 0&&typeof tt!="function")throw new TypeError("memoMethod must be a function if defined");if(ht(this,L,tt),yt!==void 0&&typeof yt!="function")throw new TypeError("fetchMethod must be a function if specified");if(ht(this,z,yt),ht(this,K,!!yt),ht(this,U,new Map),ht(this,$,new Array(D).fill(void 0)),ht(this,N,new Array(D).fill(void 0)),ht(this,Z,new be(D)),ht(this,re,new be(D)),ht(this,ie,0),ht(this,X,0),ht(this,ae,y.create(D)),ht(this,k,0),ht(this,j,0),typeof He=="function"&&ht(this,M,He),typeof Ke=="function"?(ht(this,T,Ke),ht(this,ye,[])):(ht(this,T,void 0),ht(this,ye,void 0)),ht(this,Q,!!Ae(this,M)),ht(this,W,!!Ae(this,T)),this.noDisposeOnSet=!!We,this.noUpdateTTL=!!et,this.noDeleteOnFetchRejection=!!ft,this.allowStaleOnFetchRejection=!!At,this.allowStaleOnFetchAbort=!!Jt,this.ignoreFetchAbort=!!Ar,this.maxEntrySize!==0){if(Ae(this,E)!==0&&!h(Ae(this,E)))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Xe(this,q,W3).call(this)}if(this.allowStale=!!Ie,this.noDeleteOnStaleGet=!!dt,this.updateAgeOnGet=!!Ce,this.updateAgeOnHas=!!we,this.ttlResolution=h(me)||me===0?me:1,this.ttlAutopurge=!!xe,this.ttl=oe||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Xe(this,q,aA).call(this)}if(Ae(this,A)===0&&this.ttl===0&&Ae(this,E)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Ae(this,A)&&!Ae(this,E)){let _e="LRU_CACHE_UNBOUNDED";c(_e)&&(n.add(_e),s("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",_e,ve))}}static unsafeExposeInternals(B){return{starts:Ae(B,ee),ttls:Ae(B,G),sizes:Ae(B,le),keyMap:Ae(B,U),keyList:Ae(B,$),valList:Ae(B,N),next:Ae(B,Z),prev:Ae(B,re),get head(){return Ae(B,ie)},get tail(){return Ae(B,X)},free:Ae(B,ae),isBackgroundFetch:D=>{var oe;return Xe(oe=B,q,tr).call(oe,D)},backgroundFetch:(D,oe,me,xe)=>{var Ce;return Xe(Ce=B,q,md).call(Ce,D,oe,me,xe)},moveToTail:D=>{var oe;return Xe(oe=B,q,mc).call(oe,D)},indexes:D=>{var oe;return Xe(oe=B,q,Ss).call(oe,D)},rindexes:D=>{var oe;return Xe(oe=B,q,Is).call(oe,D)},isStale:D=>{var oe;return Ae(oe=B,O).call(oe,D)}}}get max(){return Ae(this,A)}get maxSize(){return Ae(this,E)}get calculatedSize(){return Ae(this,j)}get size(){return Ae(this,k)}get fetchMethod(){return Ae(this,z)}get memoMethod(){return Ae(this,L)}get dispose(){return Ae(this,M)}get disposeAfter(){return Ae(this,T)}getRemainingTTL(B){return Ae(this,U).has(B)?1/0:0}*entries(){for(let B of Xe(this,q,Ss).call(this))Ae(this,N)[B]!==void 0&&Ae(this,$)[B]!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield[Ae(this,$)[B],Ae(this,N)[B]])}*rentries(){for(let B of Xe(this,q,Is).call(this))Ae(this,N)[B]!==void 0&&Ae(this,$)[B]!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield[Ae(this,$)[B],Ae(this,N)[B]])}*keys(){for(let B of Xe(this,q,Ss).call(this)){let D=Ae(this,$)[B];D!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield D)}}*rkeys(){for(let B of Xe(this,q,Is).call(this)){let D=Ae(this,$)[B];D!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield D)}}*values(){for(let B of Xe(this,q,Ss).call(this))Ae(this,N)[B]!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield Ae(this,N)[B])}*rvalues(){for(let B of Xe(this,q,Is).call(this))Ae(this,N)[B]!==void 0&&!Xe(this,q,tr).call(this,Ae(this,N)[B])&&(yield Ae(this,N)[B])}[(R=Symbol.iterator,I=Symbol.toStringTag,R)](){return this.entries()}find(B,D={}){for(let oe of Xe(this,q,Ss).call(this)){let me=Ae(this,N)[oe],xe=Xe(this,q,tr).call(this,me)?me.__staleWhileFetching:me;if(xe!==void 0&&B(xe,Ae(this,$)[oe],this))return this.get(Ae(this,$)[oe],D)}}forEach(B,D=this){for(let oe of Xe(this,q,Ss).call(this)){let me=Ae(this,N)[oe],xe=Xe(this,q,tr).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&B.call(D,xe,Ae(this,$)[oe],this)}}rforEach(B,D=this){for(let oe of Xe(this,q,Is).call(this)){let me=Ae(this,N)[oe],xe=Xe(this,q,tr).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&B.call(D,xe,Ae(this,$)[oe],this)}}purgeStale(){let B=!1;for(let D of Xe(this,q,Is).call(this,{allowStale:!0}))Ae(this,O).call(this,D)&&(Xe(this,q,_s).call(this,Ae(this,$)[D],"expire"),B=!0);return B}info(B){let D=Ae(this,U).get(B);if(D===void 0)return;let oe=Ae(this,N)[D],me=Xe(this,q,tr).call(this,oe)?oe.__staleWhileFetching:oe;if(me===void 0)return;let xe={value:me};if(Ae(this,G)&&Ae(this,ee)){let Ce=Ae(this,G)[D],we=Ae(this,ee)[D];if(Ce&&we){let Ie=Ce-(t.now()-we);xe.ttl=Ie,xe.start=Date.now()}}return Ae(this,le)&&(xe.size=Ae(this,le)[D]),xe}dump(){let B=[];for(let D of Xe(this,q,Ss).call(this,{allowStale:!0})){let oe=Ae(this,$)[D],me=Ae(this,N)[D],xe=Xe(this,q,tr).call(this,me)?me.__staleWhileFetching:me;if(xe===void 0||oe===void 0)continue;let Ce={value:xe};if(Ae(this,G)&&Ae(this,ee)){Ce.ttl=Ae(this,G)[D];let we=t.now()-Ae(this,ee)[D];Ce.start=Math.floor(Date.now()-we)}Ae(this,le)&&(Ce.size=Ae(this,le)[D]),B.unshift([oe,Ce])}return B}load(B){this.clear();for(let[D,oe]of B){if(oe.start){let me=Date.now()-oe.start;oe.start=t.now()-me}this.set(D,oe.value,oe)}}set(B,D,oe={}){var et,gt,bt,lt,yt;if(D===void 0)return this.delete(B),this;let{ttl:me=this.ttl,start:xe,noDisposeOnSet:Ce=this.noDisposeOnSet,sizeCalculation:we=this.sizeCalculation,status:Ie}=oe,{noUpdateTTL:He=this.noUpdateTTL}=oe,Ke=Ae(this,pe).call(this,B,D,oe.size||0,we);if(this.maxEntrySize&&Ke>this.maxEntrySize)return Ie&&(Ie.set="miss",Ie.maxEntrySizeExceeded=!0),Xe(this,q,_s).call(this,B,"set"),this;let We=Ae(this,k)===0?void 0:Ae(this,U).get(B);if(We===void 0)We=Ae(this,k)===0?Ae(this,X):Ae(this,ae).length!==0?Ae(this,ae).pop():Ae(this,k)===Ae(this,A)?Xe(this,q,gd).call(this,!1):Ae(this,k),Ae(this,$)[We]=B,Ae(this,N)[We]=D,Ae(this,U).set(B,We),Ae(this,Z)[Ae(this,X)]=We,Ae(this,re)[We]=Ae(this,X),ht(this,X,We),Qh(this,k)._++,Ae(this,se).call(this,We,Ke,Ie),Ie&&(Ie.set="add"),He=!1;else{Xe(this,q,mc).call(this,We);let tt=Ae(this,N)[We];if(D!==tt){if(Ae(this,K)&&Xe(this,q,tr).call(this,tt)){tt.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:ft}=tt;ft!==void 0&&!Ce&&(Ae(this,Q)&&((et=Ae(this,M))==null||et.call(this,ft,B,"set")),Ae(this,W)&&((gt=Ae(this,ye))==null||gt.push([ft,B,"set"])))}else Ce||(Ae(this,Q)&&((bt=Ae(this,M))==null||bt.call(this,tt,B,"set")),Ae(this,W)&&((lt=Ae(this,ye))==null||lt.push([tt,B,"set"])));if(Ae(this,Y).call(this,We),Ae(this,se).call(this,We,Ke,Ie),Ae(this,N)[We]=D,Ie){Ie.set="replace";let ft=tt&&Xe(this,q,tr).call(this,tt)?tt.__staleWhileFetching:tt;ft!==void 0&&(Ie.oldValue=ft)}}else Ie&&(Ie.set="update")}if(me!==0&&!Ae(this,G)&&Xe(this,q,aA).call(this),Ae(this,G)&&(He||Ae(this,J).call(this,We,me,xe),Ie&&Ae(this,ne).call(this,Ie,We)),!Ce&&Ae(this,W)&&Ae(this,ye)){let tt=Ae(this,ye),ft;for(;ft=tt==null?void 0:tt.shift();)(yt=Ae(this,T))==null||yt.call(this,...ft)}return this}pop(){var B;try{for(;Ae(this,k);){let D=Ae(this,N)[Ae(this,ie)];if(Xe(this,q,gd).call(this,!0),Xe(this,q,tr).call(this,D)){if(D.__staleWhileFetching)return D.__staleWhileFetching}else if(D!==void 0)return D}}finally{if(Ae(this,W)&&Ae(this,ye)){let D=Ae(this,ye),oe;for(;oe=D==null?void 0:D.shift();)(B=Ae(this,T))==null||B.call(this,...oe)}}}has(B,D={}){let{updateAgeOnHas:oe=this.updateAgeOnHas,status:me}=D,xe=Ae(this,U).get(B);if(xe!==void 0){let Ce=Ae(this,N)[xe];if(Xe(this,q,tr).call(this,Ce)&&Ce.__staleWhileFetching===void 0)return!1;if(Ae(this,O).call(this,xe))me&&(me.has="stale",Ae(this,ne).call(this,me,xe));else return oe&&Ae(this,ue).call(this,xe),me&&(me.has="hit",Ae(this,ne).call(this,me,xe)),!0}else me&&(me.has="miss");return!1}peek(B,D={}){let{allowStale:oe=this.allowStale}=D,me=Ae(this,U).get(B);if(me===void 0||!oe&&Ae(this,O).call(this,me))return;let xe=Ae(this,N)[me];return Xe(this,q,tr).call(this,xe)?xe.__staleWhileFetching:xe}async fetch(B,D={}){let{allowStale:oe=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,ttl:Ce=this.ttl,noDisposeOnSet:we=this.noDisposeOnSet,size:Ie=0,sizeCalculation:He=this.sizeCalculation,noUpdateTTL:Ke=this.noUpdateTTL,noDeleteOnFetchRejection:We=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:et=this.allowStaleOnFetchRejection,ignoreFetchAbort:gt=this.ignoreFetchAbort,allowStaleOnFetchAbort:bt=this.allowStaleOnFetchAbort,context:lt,forceRefresh:yt=!1,status:tt,signal:ft}=D;if(!Ae(this,K))return tt&&(tt.fetch="get"),this.get(B,{allowStale:oe,updateAgeOnGet:me,noDeleteOnStaleGet:xe,status:tt});let dt={allowStale:oe,updateAgeOnGet:me,noDeleteOnStaleGet:xe,ttl:Ce,noDisposeOnSet:we,size:Ie,sizeCalculation:He,noUpdateTTL:Ke,noDeleteOnFetchRejection:We,allowStaleOnFetchRejection:et,allowStaleOnFetchAbort:bt,ignoreFetchAbort:gt,status:tt,signal:ft},At=Ae(this,U).get(B);if(At===void 0){tt&&(tt.fetch="miss");let Jt=Xe(this,q,md).call(this,B,At,dt,lt);return Jt.__returned=Jt}else{let Jt=Ae(this,N)[At];if(Xe(this,q,tr).call(this,Jt)){let Ye=oe&&Jt.__staleWhileFetching!==void 0;return tt&&(tt.fetch="inflight",Ye&&(tt.returnedStale=!0)),Ye?Jt.__staleWhileFetching:Jt.__returned=Jt}let Ar=Ae(this,O).call(this,At);if(!yt&&!Ar)return tt&&(tt.fetch="hit"),Xe(this,q,mc).call(this,At),me&&Ae(this,ue).call(this,At),tt&&Ae(this,ne).call(this,tt,At),Jt;let be=Xe(this,q,md).call(this,B,At,dt,lt),_e=be.__staleWhileFetching!==void 0&&oe;return tt&&(tt.fetch=Ar?"stale":"refresh",_e&&Ar&&(tt.returnedStale=!0)),_e?be.__staleWhileFetching:be.__returned=be}}async forceFetch(B,D={}){let oe=await this.fetch(B,D);if(oe===void 0)throw new Error("fetch() returned undefined");return oe}memo(B,D={}){let oe=Ae(this,L);if(!oe)throw new Error("no memoMethod provided to constructor");let{context:me,forceRefresh:xe,...Ce}=D,we=this.get(B,Ce);if(!xe&&we!==void 0)return we;let Ie=oe(B,we,{options:Ce,context:me});return this.set(B,Ie,Ce),Ie}get(B,D={}){let{allowStale:oe=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,status:Ce}=D,we=Ae(this,U).get(B);if(we!==void 0){let Ie=Ae(this,N)[we],He=Xe(this,q,tr).call(this,Ie);return Ce&&Ae(this,ne).call(this,Ce,we),Ae(this,O).call(this,we)?(Ce&&(Ce.get="stale"),He?(Ce&&oe&&Ie.__staleWhileFetching!==void 0&&(Ce.returnedStale=!0),oe?Ie.__staleWhileFetching:void 0):(xe||Xe(this,q,_s).call(this,B,"expire"),Ce&&oe&&(Ce.returnedStale=!0),oe?Ie:void 0)):(Ce&&(Ce.get="hit"),He?Ie.__staleWhileFetching:(Xe(this,q,mc).call(this,we),me&&Ae(this,ue).call(this,we),Ie))}else Ce&&(Ce.get="miss")}delete(B){return Xe(this,q,_s).call(this,B,"delete")}clear(){return Xe(this,q,cA).call(this,"delete")}},A=new WeakMap,E=new WeakMap,M=new WeakMap,T=new WeakMap,z=new WeakMap,L=new WeakMap,k=new WeakMap,j=new WeakMap,U=new WeakMap,$=new WeakMap,N=new WeakMap,Z=new WeakMap,re=new WeakMap,ie=new WeakMap,X=new WeakMap,ae=new WeakMap,ye=new WeakMap,le=new WeakMap,ee=new WeakMap,G=new WeakMap,Q=new WeakMap,K=new WeakMap,W=new WeakMap,q=new WeakSet,aA=function(){let B=new p(Ae(this,A)),D=new p(Ae(this,A));ht(this,G,B),ht(this,ee,D),ht(this,J,(xe,Ce,we=t.now())=>{if(D[xe]=Ce!==0?we:0,B[xe]=Ce,Ce!==0&&this.ttlAutopurge){let Ie=setTimeout(()=>{Ae(this,O).call(this,xe)&&Xe(this,q,_s).call(this,Ae(this,$)[xe],"expire")},Ce+1);Ie.unref&&Ie.unref()}}),ht(this,ue,xe=>{D[xe]=B[xe]!==0?t.now():0}),ht(this,ne,(xe,Ce)=>{if(B[Ce]){let we=B[Ce],Ie=D[Ce];if(!we||!Ie)return;xe.ttl=we,xe.start=Ie,xe.now=oe||me();let He=xe.now-Ie;xe.remainingTTL=we-He}});let oe=0,me=()=>{let xe=t.now();if(this.ttlResolution>0){oe=xe;let Ce=setTimeout(()=>oe=0,this.ttlResolution);Ce.unref&&Ce.unref()}return xe};this.getRemainingTTL=xe=>{let Ce=Ae(this,U).get(xe);if(Ce===void 0)return 0;let we=B[Ce],Ie=D[Ce];if(!we||!Ie)return 1/0;let He=(oe||me())-Ie;return we-He},ht(this,O,xe=>{let Ce=D[xe],we=B[xe];return!!we&&!!Ce&&(oe||me())-Ce>we})},ue=new WeakMap,ne=new WeakMap,J=new WeakMap,O=new WeakMap,W3=function(){let B=new p(Ae(this,A));ht(this,j,0),ht(this,le,B),ht(this,Y,D=>{ht(this,j,Ae(this,j)-B[D]),B[D]=0}),ht(this,pe,(D,oe,me,xe)=>{if(Xe(this,q,tr).call(this,oe))return 0;if(!h(me))if(xe){if(typeof xe!="function")throw new TypeError("sizeCalculation must be a function");if(me=xe(oe,D),!h(me))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return me}),ht(this,se,(D,oe,me)=>{if(B[D]=oe,Ae(this,E)){let xe=Ae(this,E)-B[D];for(;Ae(this,j)>xe;)Xe(this,q,gd).call(this,!0)}ht(this,j,Ae(this,j)+B[D]),me&&(me.entrySize=oe,me.totalCalculatedSize=Ae(this,j))})},Y=new WeakMap,se=new WeakMap,pe=new WeakMap,Ss=function*({allowStale:B=this.allowStale}={}){if(Ae(this,k))for(let D=Ae(this,X);!(!Xe(this,q,uA).call(this,D)||((B||!Ae(this,O).call(this,D))&&(yield D),D===Ae(this,ie)));)D=Ae(this,re)[D]},Is=function*({allowStale:B=this.allowStale}={}){if(Ae(this,k))for(let D=Ae(this,ie);!(!Xe(this,q,uA).call(this,D)||((B||!Ae(this,O).call(this,D))&&(yield D),D===Ae(this,X)));)D=Ae(this,Z)[D]},uA=function(B){return B!==void 0&&Ae(this,U).get(Ae(this,$)[B])===B},gd=function(B){var xe,Ce;let D=Ae(this,ie),oe=Ae(this,$)[D],me=Ae(this,N)[D];return Ae(this,K)&&Xe(this,q,tr).call(this,me)?me.__abortController.abort(new Error("evicted")):(Ae(this,Q)||Ae(this,W))&&(Ae(this,Q)&&((xe=Ae(this,M))==null||xe.call(this,me,oe,"evict")),Ae(this,W)&&((Ce=Ae(this,ye))==null||Ce.push([me,oe,"evict"]))),Ae(this,Y).call(this,D),B&&(Ae(this,$)[D]=void 0,Ae(this,N)[D]=void 0,Ae(this,ae).push(D)),Ae(this,k)===1?(ht(this,ie,ht(this,X,0)),Ae(this,ae).length=0):ht(this,ie,Ae(this,Z)[D]),Ae(this,U).delete(oe),Qh(this,k)._--,D},md=function(B,D,oe,me){let xe=D===void 0?void 0:Ae(this,N)[D];if(Xe(this,q,tr).call(this,xe))return xe;let Ce=new a,{signal:we}=oe;we==null||we.addEventListener("abort",()=>Ce.abort(we.reason),{signal:Ce.signal});let Ie={signal:Ce.signal,options:oe,context:me},He=(lt,yt=!1)=>{let{aborted:tt}=Ce.signal,ft=oe.ignoreFetchAbort&&lt!==void 0;if(oe.status&&(tt&&!yt?(oe.status.fetchAborted=!0,oe.status.fetchError=Ce.signal.reason,ft&&(oe.status.fetchAbortIgnored=!0)):oe.status.fetchResolved=!0),tt&&!ft&&!yt)return We(Ce.signal.reason);let dt=gt;return Ae(this,N)[D]===gt&&(lt===void 0?dt.__staleWhileFetching?Ae(this,N)[D]=dt.__staleWhileFetching:Xe(this,q,_s).call(this,B,"fetch"):(oe.status&&(oe.status.fetchUpdated=!0),this.set(B,lt,Ie.options))),lt},Ke=lt=>(oe.status&&(oe.status.fetchRejected=!0,oe.status.fetchError=lt),We(lt)),We=lt=>{let{aborted:yt}=Ce.signal,tt=yt&&oe.allowStaleOnFetchAbort,ft=tt||oe.allowStaleOnFetchRejection,dt=ft||oe.noDeleteOnFetchRejection,At=gt;if(Ae(this,N)[D]===gt&&(!dt||At.__staleWhileFetching===void 0?Xe(this,q,_s).call(this,B,"fetch"):tt||(Ae(this,N)[D]=At.__staleWhileFetching)),ft)return oe.status&&At.__staleWhileFetching!==void 0&&(oe.status.returnedStale=!0),At.__staleWhileFetching;if(At.__returned===At)throw lt},et=(lt,yt)=>{var ft;let tt=(ft=Ae(this,z))==null?void 0:ft.call(this,B,xe,Ie);tt&&tt instanceof Promise&&tt.then(dt=>lt(dt===void 0?void 0:dt),yt),Ce.signal.addEventListener("abort",()=>{(!oe.ignoreFetchAbort||oe.allowStaleOnFetchAbort)&&(lt(void 0),oe.allowStaleOnFetchAbort&&(lt=dt=>He(dt,!0)))})};oe.status&&(oe.status.fetchDispatched=!0);let gt=new Promise(et).then(He,Ke),bt=Object.assign(gt,{__abortController:Ce,__staleWhileFetching:xe,__returned:void 0});return D===void 0?(this.set(B,bt,{...Ie.options,status:void 0}),D=Ae(this,U).get(B)):Ae(this,N)[D]=bt,bt},tr=function(B){if(!Ae(this,K))return!1;let D=B;return!!D&&D instanceof Promise&&D.hasOwnProperty("__staleWhileFetching")&&D.__abortController instanceof a},lA=function(B,D){Ae(this,re)[D]=B,Ae(this,Z)[B]=D},mc=function(B){B!==Ae(this,X)&&(B===Ae(this,ie)?ht(this,ie,Ae(this,Z)[B]):Xe(this,q,lA).call(this,Ae(this,re)[B],Ae(this,Z)[B]),Xe(this,q,lA).call(this,Ae(this,X),B),ht(this,X,B))},_s=function(B,D){var me,xe,Ce,we;let oe=!1;if(Ae(this,k)!==0){let Ie=Ae(this,U).get(B);if(Ie!==void 0)if(oe=!0,Ae(this,k)===1)Xe(this,q,cA).call(this,D);else{Ae(this,Y).call(this,Ie);let He=Ae(this,N)[Ie];if(Xe(this,q,tr).call(this,He)?He.__abortController.abort(new Error("deleted")):(Ae(this,Q)||Ae(this,W))&&(Ae(this,Q)&&((me=Ae(this,M))==null||me.call(this,He,B,D)),Ae(this,W)&&((xe=Ae(this,ye))==null||xe.push([He,B,D]))),Ae(this,U).delete(B),Ae(this,$)[Ie]=void 0,Ae(this,N)[Ie]=void 0,Ie===Ae(this,X))ht(this,X,Ae(this,re)[Ie]);else if(Ie===Ae(this,ie))ht(this,ie,Ae(this,Z)[Ie]);else{let Ke=Ae(this,re)[Ie];Ae(this,Z)[Ke]=Ae(this,Z)[Ie];let We=Ae(this,Z)[Ie];Ae(this,re)[We]=Ae(this,re)[Ie]}Qh(this,k)._--,Ae(this,ae).push(Ie)}}if(Ae(this,W)&&((Ce=Ae(this,ye))!=null&&Ce.length)){let Ie=Ae(this,ye),He;for(;He=Ie==null?void 0:Ie.shift();)(we=Ae(this,T))==null||we.call(this,...He)}return oe},cA=function(B){var D,oe,me;for(let xe of Xe(this,q,Is).call(this,{allowStale:!0})){let Ce=Ae(this,N)[xe];if(Xe(this,q,tr).call(this,Ce))Ce.__abortController.abort(new Error("deleted"));else{let we=Ae(this,$)[xe];Ae(this,Q)&&((D=Ae(this,M))==null||D.call(this,Ce,we,B)),Ae(this,W)&&((oe=Ae(this,ye))==null||oe.push([Ce,we,B]))}}if(Ae(this,U).clear(),Ae(this,N).fill(void 0),Ae(this,$).fill(void 0),Ae(this,G)&&Ae(this,ee)&&(Ae(this,G).fill(0),Ae(this,ee).fill(0)),Ae(this,le)&&Ae(this,le).fill(0),ht(this,ie,0),ht(this,X,0),Ae(this,ae).length=0,ht(this,j,0),ht(this,k,0),Ae(this,W)&&Ae(this,ye)){let xe=Ae(this,ye),Ce;for(;Ce=xe==null?void 0:xe.shift();)(me=Ae(this,T))==null||me.call(this,...Ce)}},ve);e.LRUCache=g}),Yo=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0;var t=class{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}};e.ContainerIterator=t;var n=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};e.Base=n;var o=class extends n{};e.Container=o}),cQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Yo(),n=class extends t.Base{constructor(s=[]){super(),this.S=[];let a=this;s.forEach(function(l){a.push(l)})}clear(){this.i=0,this.S=[]}push(s){return this.S.push(s),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},o=n;e.default=o}),fQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Yo(),n=class extends t.Base{constructor(s=[]){super(),this.j=0,this.q=[];let a=this;s.forEach(function(l){a.push(l)})}clear(){this.q=[],this.i=this.j=0}push(s){let a=this.q.length;if(this.j/a>.5&&this.j+this.i>=a&&a>4096){let l=this.i;for(let c=0;c<l;++c)this.q[c]=this.q[this.j+c];this.j=0,this.q[this.i]=s}else this.q[this.j+this.i]=s;return++this.i}pop(){if(this.i===0)return;let s=this.q[this.j++];return this.i-=1,s}front(){if(this.i!==0)return this.q[this.j]}},o=n;e.default=o}),hQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Yo(),n=class extends t.Base{constructor(s=[],a=function(c,h){return c>h?-1:c<h?1:0},l=!0){if(super(),this.v=a,Array.isArray(s))this.C=l?[...s]:s;else{this.C=[];let h=this;s.forEach(function(f){h.C.push(f)})}this.i=this.C.length;let c=this.i>>1;for(let h=this.i-1>>1;h>=0;--h)this.k(h,c)}m(s){let a=this.C[s];for(;s>0;){let l=s-1>>1,c=this.C[l];if(this.v(c,a)<=0)break;this.C[s]=c,s=l}this.C[s]=a}k(s,a){let l=this.C[s];for(;s<a;){let c=s<<1|1,h=c+1,f=this.C[c];if(h<this.i&&this.v(f,this.C[h])>0&&(c=h,f=this.C[h]),this.v(f,l)>=0)break;this.C[s]=f,s=c}this.C[s]=l}clear(){this.i=0,this.C.length=0}push(s){this.C.push(s),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let s=this.C[0],a=this.C.pop();return this.i-=1,this.i&&(this.C[0]=a,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let a=this.C.indexOf(s);return a<0?!1:(a===0?this.pop():a===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(a,1,this.C.pop()),this.i-=1,this.m(a),this.k(a,this.i>>1)),!0)}updateItem(s){let a=this.C.indexOf(s);return a<0?!1:(this.m(a),this.k(a,this.i>>1),!0)}toArray(){return[...this.C]}},o=n;e.default=o}),Bv=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Yo(),n=class extends t.Container{},o=n;e.default=o}),Vo=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=t;function t(){throw new RangeError("Iterator access denied!")}}),X3=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var t=Yo(),n=Vo(),o=class extends t.ContainerIterator{constructor(s,a){super(a),this.o=s,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,n.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,n.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,n.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,n.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(s){this.container.setElementByPos(this.o,s)}};e.RandomIterator=o}),dQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=X3();function o(c){return c&&c.t?c:{default:c}}var s=class J3 extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new J3(this.o,this.container,this.iteratorType)}},a=class extends t.default{constructor(c=[],h=!0){if(super(),Array.isArray(c))this.J=h?[...c]:c,this.i=c.length;else{this.J=[];let f=this;c.forEach(function(p){f.pushBack(p)})}}clear(){this.i=0,this.J.length=0}begin(){return new s(0,this)}end(){return new s(this.i,this)}rBegin(){return new s(this.i-1,this,1)}rEnd(){return new s(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;return this.J[c]}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;return this.J.splice(c,1),this.i-=1,this.i}eraseElementByValue(c){let h=0;for(let f=0;f<this.i;++f)this.J[f]!==c&&(this.J[h++]=this.J[f]);return this.i=this.J.length=h,this.i}eraseElementByIterator(c){let h=c.o;return c=c.next(),this.eraseElementByPos(h),c}pushBack(c){return this.J.push(c),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(c,h){if(c<0||c>this.i-1)throw new RangeError;this.J[c]=h}insert(c,h,f=1){if(c<0||c>this.i)throw new RangeError;return this.J.splice(c,0,...new Array(f).fill(h)),this.i+=f,this.i}find(c){for(let h=0;h<this.i;++h)if(this.J[h]===c)return new s(h,this);return this.end()}reverse(){this.J.reverse()}unique(){let c=1;for(let h=1;h<this.i;++h)this.J[h]!==this.J[h-1]&&(this.J[c++]=this.J[h]);return this.i=this.J.length=c,this.i}sort(c){this.J.sort(c)}forEach(c){for(let h=0;h<this.i;++h)c(this.J[h],h,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},l=a;e.default=l}),pQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(Bv()),n=Yo(),o=Vo();function s(h){return h&&h.t?h:{default:h}}var a=class Z3 extends n.ContainerIterator{constructor(f,p,y,g){super(g),this.o=f,this.h=p,this.container=y,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l}set pointer(f){this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l=f}copy(){return new Z3(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let f=this;h.forEach(function(p){f.pushBack(p)})}V(h){let{L:f,B:p}=h;f.B=p,p.L=f,h===this.p&&(this.p=p),h===this._&&(this._=f),this.i-=1}G(h,f){let p=f.B,y={l:h,L:f,B:p};f.B=y,p.L=y,f===this.h&&(this.p=y),p===this.h&&(this._=y),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new a(this.p,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this._,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return f.l}eraseElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return this.V(f),this.i}eraseElementByValue(h){let f=this.p;for(;f!==this.h;)f.l===h&&this.V(f),f=f.B;return this.i}eraseElementByIterator(h){let f=h.o;return f===this.h&&(0,o.throwIteratorAccessError)(),h=h.next(),this.V(f),h}pushBack(h){return this.G(h,this._),this.i}popBack(){if(this.i===0)return;let h=this._.l;return this.V(this._),h}pushFront(h){return this.G(h,this.h),this.i}popFront(){if(this.i===0)return;let h=this.p.l;return this.V(this.p),h}setElementByPos(h,f){if(h<0||h>this.i-1)throw new RangeError;let p=this.p;for(;h--;)p=p.B;p.l=f}insert(h,f,p=1){if(h<0||h>this.i)throw new RangeError;if(p<=0)return this.i;if(h===0)for(;p--;)this.pushFront(f);else if(h===this.i)for(;p--;)this.pushBack(f);else{let y=this.p;for(let b=1;b<h;++b)y=y.B;let g=y.B;for(this.i+=p;p--;)y.B={l:f,L:y},y.B.L=y,y=y.B;y.B=g,g.L=y}return this.i}find(h){let f=this.p;for(;f!==this.h;){if(f.l===h)return new a(f,this.h,this);f=f.B}return this.end()}reverse(){if(this.i<=1)return;let h=this.p,f=this._,p=0;for(;p<<1<this.i;){let y=h.l;h.l=f.l,f.l=y,h=h.B,f=f.L,p+=1}}unique(){if(this.i<=1)return this.i;let h=this.p;for(;h!==this.h;){let f=h;for(;f.B!==this.h&&f.l===f.B.l;)f=f.B,this.i-=1;h.B=f.B,h.B.L=h,h=h.B}return this.i}sort(h){if(this.i<=1)return;let f=[];this.forEach(function(y){f.push(y)}),f.sort(h);let p=this.p;f.forEach(function(y){p.l=y,p=p.B})}merge(h){let f=this;if(this.i===0)h.forEach(function(p){f.pushBack(p)});else{let p=this.p;h.forEach(function(y){for(;p!==f.h&&p.l<=y;)p=p.B;f.G(y,p.L)})}return this.i}forEach(h){let f=this.p,p=0;for(;f!==this.h;)h(f.l,p++,this),f=f.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let h=this.p;for(;h!==this.h;)yield h.l,h=h.B}).bind(this)()}},c=l;e.default=c}),yQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=X3();function o(c){return c&&c.t?c:{default:c}}var s=class e6 extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new e6(this.o,this.container,this.iteratorType)}},a=class extends t.default{constructor(c=[],h=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let f=(()=>{if(typeof c.length=="number")return c.length;if(typeof c.size=="number")return c.size;if(typeof c.size=="function")return c.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=h,this.P=Math.max(Math.ceil(f/this.F),1);for(let g=0;g<this.P;++g)this.A.push(new Array(this.F));let p=Math.ceil(f/this.F);this.j=this.R=(this.P>>1)-(p>>1),this.D=this.N=this.F-f%this.F>>1;let y=this;c.forEach(function(g){y.pushBack(g)})}T(){let c=[],h=Math.max(this.P>>1,1);for(let f=0;f<h;++f)c[f]=new Array(this.F);for(let f=this.j;f<this.P;++f)c[c.length]=this.A[f];for(let f=0;f<this.R;++f)c[c.length]=this.A[f];c[c.length]=[...this.A[this.R]],this.j=h,this.R=c.length-1;for(let f=0;f<h;++f)c[c.length]=new Array(this.F);this.A=c,this.P=c.length}O(c){let h=this.D+c+1,f=h%this.F,p=f-1,y=this.j+(h-f)/this.F;return f===0&&(y-=1),y%=this.P,p<0&&(p+=this.F),{curNodeBucketIndex:y,curNodePointerIndex:p}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new s(0,this)}end(){return new s(this.i,this)}rBegin(){return new s(this.i-1,this,1)}rEnd(){return new s(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(c){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=c,this.i}popBack(){if(this.i===0)return;let c=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,c}pushFront(c){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=c,this.i}popFront(){if(this.i===0)return;let c=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,c}getElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;let{curNodeBucketIndex:h,curNodePointerIndex:f}=this.O(c);return this.A[h][f]}setElementByPos(c,h){if(c<0||c>this.i-1)throw new RangeError;let{curNodeBucketIndex:f,curNodePointerIndex:p}=this.O(c);this.A[f][p]=h}insert(c,h,f=1){if(c<0||c>this.i)throw new RangeError;if(c===0)for(;f--;)this.pushFront(h);else if(c===this.i)for(;f--;)this.pushBack(h);else{let p=[];for(let y=c;y<this.i;++y)p.push(this.getElementByPos(y));this.cut(c-1);for(let y=0;y<f;++y)this.pushBack(h);for(let y=0;y<p.length;++y)this.pushBack(p[y])}return this.i}cut(c){if(c<0)return this.clear(),0;let{curNodeBucketIndex:h,curNodePointerIndex:f}=this.O(c);return this.R=h,this.N=f,this.i=c+1,this.i}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;if(c===0)this.popFront();else if(c===this.i-1)this.popBack();else{let h=[];for(let p=c+1;p<this.i;++p)h.push(this.getElementByPos(p));this.cut(c),this.popBack();let f=this;h.forEach(function(p){f.pushBack(p)})}return this.i}eraseElementByValue(c){if(this.i===0)return 0;let h=[];for(let p=0;p<this.i;++p){let y=this.getElementByPos(p);y!==c&&h.push(y)}let f=h.length;for(let p=0;p<f;++p)this.setElementByPos(p,h[p]);return this.cut(f-1)}eraseElementByIterator(c){let h=c.o;return this.eraseElementByPos(h),c=c.next(),c}find(c){for(let h=0;h<this.i;++h)if(this.getElementByPos(h)===c)return new s(h,this);return this.end()}reverse(){let c=0,h=this.i-1;for(;c<h;){let f=this.getElementByPos(c);this.setElementByPos(c,this.getElementByPos(h)),this.setElementByPos(h,f),c+=1,h-=1}}unique(){if(this.i<=1)return this.i;let c=1,h=this.getElementByPos(0);for(let f=1;f<this.i;++f){let p=this.getElementByPos(f);p!==h&&(h=p,this.setElementByPos(c++,p))}for(;this.i>c;)this.popBack();return this.i}sort(c){let h=[];for(let f=0;f<this.i;++f)h.push(this.getElementByPos(f));h.sort(c);for(let f=0;f<this.i;++f)this.setElementByPos(f,h[f])}shrinkToFit(){if(this.i===0)return;let c=[];this.forEach(function(h){c.push(h)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let h=0;h<this.P;++h)this.A.push(new Array(this.F));for(let h=0;h<c.length;++h)this.pushBack(c[h])}forEach(c){for(let h=0;h<this.i;++h)c(this.getElementByPos(h),h,this)}[Symbol.iterator](){return(function*(){for(let c=0;c<this.i;++c)yield this.getElementByPos(c)}).bind(this)()}},l=a;e.default=l}),gQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var t=class{constructor(o,s){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=o,this.l=s}L(){let o=this;if(o.ee===1&&o.tt.tt===o)o=o.W;else if(o.U)for(o=o.U;o.W;)o=o.W;else{let s=o.tt;for(;s.U===o;)o=s,s=o.tt;o=s}return o}B(){let o=this;if(o.W){for(o=o.W;o.U;)o=o.U;return o}else{let s=o.tt;for(;s.W===o;)o=s,s=o.tt;return o.W!==s?s:o}}te(){let o=this.tt,s=this.W,a=s.U;return o.tt===this?o.tt=s:o.U===this?o.U=s:o.W=s,s.tt=o,s.U=this,this.tt=s,this.W=a,a&&(a.tt=this),s}se(){let o=this.tt,s=this.U,a=s.W;return o.tt===this?o.tt=s:o.U===this?o.U=s:o.W=s,s.tt=o,s.W=this,this.tt=s,this.U=a,a&&(a.tt=this),s}};e.TreeNode=t;var n=class extends t{constructor(){super(...arguments),this.rt=1}te(){let o=super.te();return this.ie(),o.ie(),o}se(){let o=super.se();return this.ie(),o.ie(),o}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};e.TreeNodeEnableIndex=n}),t6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=gQ(),n=Yo(),o=Vo(),s=class extends n.Container{constructor(l=function(h,f){return h<f?-1:h>f?1:0},c=!1){super(),this.Y=void 0,this.v=l,c?(this.re=t.TreeNodeEnableIndex,this.M=function(h,f,p){let y=this.ne(h,f,p);if(y){let g=y.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let b=this.he(y);if(b){let{parentNode:w,grandParent:F,curNode:I}=b;w.ie(),F.ie(),I.ie()}}return this.i},this.V=function(h){let f=this.fe(h);for(;f!==this.h;)f.rt-=1,f=f.tt}):(this.re=t.TreeNode,this.M=function(h,f,p){let y=this.ne(h,f,p);return y&&this.he(y),this.i},this.V=this.fe),this.h=new this.re}X(l,c){let h=this.h;for(;l;){let f=this.v(l.u,c);if(f<0)l=l.W;else if(f>0)h=l,l=l.U;else return l}return h}Z(l,c){let h=this.h;for(;l;)this.v(l.u,c)<=0?l=l.W:(h=l,l=l.U);return h}$(l,c){let h=this.h;for(;l;){let f=this.v(l.u,c);if(f<0)h=l,l=l.W;else if(f>0)l=l.U;else return l}return h}rr(l,c){let h=this.h;for(;l;)this.v(l.u,c)<0?(h=l,l=l.W):l=l.U;return h}ue(l){for(;;){let c=l.tt;if(c===this.h)return;if(l.ee===1){l.ee=0;return}if(l===c.U){let h=c.W;if(h.ee===1)h.ee=0,c.ee=1,c===this.Y?this.Y=c.te():c.te();else if(h.W&&h.W.ee===1){h.ee=c.ee,c.ee=0,h.W.ee=0,c===this.Y?this.Y=c.te():c.te();return}else h.U&&h.U.ee===1?(h.ee=1,h.U.ee=0,h.se()):(h.ee=1,l=c)}else{let h=c.U;if(h.ee===1)h.ee=0,c.ee=1,c===this.Y?this.Y=c.se():c.se();else if(h.U&&h.U.ee===1){h.ee=c.ee,c.ee=0,h.U.ee=0,c===this.Y?this.Y=c.se():c.se();return}else h.W&&h.W.ee===1?(h.ee=1,h.W.ee=0,h.te()):(h.ee=1,l=c)}}}fe(l){if(this.i===1)return this.clear(),this.h;let c=l;for(;c.U||c.W;){if(c.W)for(c=c.W;c.U;)c=c.U;else c=c.U;[l.u,c.u]=[c.u,l.u],[l.l,c.l]=[c.l,l.l],l=c}this.h.U===c?this.h.U=c.tt:this.h.W===c&&(this.h.W=c.tt),this.ue(c);let h=c.tt;return c===h.U?h.U=void 0:h.W=void 0,this.i-=1,this.Y.ee=0,h}oe(l,c){return l===void 0?!1:this.oe(l.U,c)||c(l)?!0:this.oe(l.W,c)}he(l){for(;;){let c=l.tt;if(c.ee===0)return;let h=c.tt;if(c===h.U){let f=h.W;if(f&&f.ee===1){if(f.ee=c.ee=0,h===this.Y)return;h.ee=1,l=h;continue}else if(l===c.W){if(l.ee=0,l.U&&(l.U.tt=c),l.W&&(l.W.tt=h),c.W=l.U,h.U=l.W,l.U=c,l.W=h,h===this.Y)this.Y=l,this.h.tt=l;else{let p=h.tt;p.U===h?p.U=l:p.W=l}return l.tt=h.tt,c.tt=l,h.tt=l,h.ee=1,{parentNode:c,grandParent:h,curNode:l}}else c.ee=0,h===this.Y?this.Y=h.se():h.se(),h.ee=1}else{let f=h.U;if(f&&f.ee===1){if(f.ee=c.ee=0,h===this.Y)return;h.ee=1,l=h;continue}else if(l===c.U){if(l.ee=0,l.U&&(l.U.tt=h),l.W&&(l.W.tt=c),h.W=l.U,c.U=l.W,l.U=h,l.W=c,h===this.Y)this.Y=l,this.h.tt=l;else{let p=h.tt;p.U===h?p.U=l:p.W=l}return l.tt=h.tt,c.tt=l,h.tt=l,h.ee=1,{parentNode:c,grandParent:h,curNode:l}}else c.ee=0,h===this.Y?this.Y=h.te():h.te(),h.ee=1}return}}ne(l,c,h){if(this.Y===void 0){this.i+=1,this.Y=new this.re(l,c),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let f,p=this.h.U,y=this.v(p.u,l);if(y===0){p.l=c;return}else if(y>0)p.U=new this.re(l,c),p.U.tt=p,f=p.U,this.h.U=f;else{let g=this.h.W,b=this.v(g.u,l);if(b===0){g.l=c;return}else if(b<0)g.W=new this.re(l,c),g.W.tt=g,f=g.W,this.h.W=f;else{if(h!==void 0){let w=h.o;if(w!==this.h){let F=this.v(w.u,l);if(F===0){w.l=c;return}else if(F>0){let I=w.L(),R=this.v(I.u,l);if(R===0){I.l=c;return}else R<0&&(f=new this.re(l,c),I.W===void 0?(I.W=f,f.tt=I):(w.U=f,f.tt=w))}}}if(f===void 0)for(f=this.Y;;){let w=this.v(f.u,l);if(w>0){if(f.U===void 0){f.U=new this.re(l,c),f.U.tt=f,f=f.U;break}f=f.U}else if(w<0){if(f.W===void 0){f.W=new this.re(l,c),f.W.tt=f,f=f.W;break}f=f.W}else{f.l=c;return}}}}return this.i+=1,f}I(l,c){for(;l;){let h=this.v(l.u,c);if(h<0)l=l.W;else if(h>0)l=l.U;else return l}return l||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(l,c){let h=l.o;if(h===this.h&&(0,o.throwIteratorAccessError)(),this.i===1)return h.u=c,!0;if(h===this.h.U)return this.v(h.B().u,c)>0?(h.u=c,!0):!1;if(h===this.h.W)return this.v(h.L().u,c)<0?(h.u=c,!0):!1;let f=h.L().u;if(this.v(f,c)>=0)return!1;let p=h.B().u;return this.v(p,c)<=0?!1:(h.u=c,!0)}eraseElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c=0,h=this;return this.oe(this.Y,function(f){return l===c?(h.V(f),!0):(c+=1,!1)}),this.i}eraseElementByKey(l){if(this.i===0)return!1;let c=this.I(this.Y,l);return c===this.h?!1:(this.V(c),!0)}eraseElementByIterator(l){let c=l.o;c===this.h&&(0,o.throwIteratorAccessError)();let h=c.W===void 0;return l.iteratorType===0?h&&l.next():(!h||c.U===void 0)&&l.next(),this.V(c),l}forEach(l){let c=0;for(let h of this)l(h,c++,this)}getElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c,h=0;for(let f of this){if(h===l){c=f;break}h+=1}return c}getHeight(){if(this.i===0)return 0;let l=function(c){return c?Math.max(l(c.U),l(c.W))+1:0};return l(this.Y)}},a=s;e.default=a}),r6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Yo(),n=Vo(),o=class extends t.ContainerIterator{constructor(a,l,c){super(c),this.o=a,this.h=l,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,n.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,n.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let a=this.o,l=this.h.tt;if(a===this.h)return l?l.rt-1:0;let c=0;for(a.U&&(c+=a.U.rt);a!==l;){let h=a.tt;a===h.W&&(c+=1,h.U&&(c+=h.U.rt)),a=h}return c}},s=o;e.default=s}),mQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(t6()),n=s(r6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var a=class n6 extends n.default{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new n6(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[],f,p){super(f,p);let y=this;h.forEach(function(g){y.insert(g)})}*K(h){h!==void 0&&(yield*this.K(h.U),yield h.u,yield*this.K(h.W))}begin(){return new a(this.h.U||this.h,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this.h.W||this.h,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(h,f){return this.M(h,void 0,f)}find(h){let f=this.I(this.Y,h);return new a(f,this.h,this)}lowerBound(h){let f=this.X(this.Y,h);return new a(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new a(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new a(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new a(f,this.h,this)}union(h){let f=this;return h.forEach(function(p){f.insert(p)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},c=l;e.default=c}),bQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(t6()),n=s(r6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var a=class i6 extends n.default{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let f=this;return new Proxy([],{get(p,y){if(y==="0")return f.o.u;if(y==="1")return f.o.l},set(p,y,g){if(y!=="1")throw new TypeError("props must be 1");return f.o.l=g,!0}})}copy(){return new i6(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[],f,p){super(f,p);let y=this;h.forEach(function(g){y.setElement(g[0],g[1])})}*K(h){h!==void 0&&(yield*this.K(h.U),yield[h.u,h.l],yield*this.K(h.W))}begin(){return new a(this.h.U||this.h,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this.h.W||this.h,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){if(this.i===0)return;let h=this.h.U;return[h.u,h.l]}back(){if(this.i===0)return;let h=this.h.W;return[h.u,h.l]}lowerBound(h){let f=this.X(this.Y,h);return new a(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new a(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new a(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new a(f,this.h,this)}setElement(h,f,p){return this.M(h,f,p)}find(h){let f=this.I(this.Y,h);return new a(f,this.h,this)}getElementByKey(h){return this.I(this.Y,h).l}union(h){let f=this;return h.forEach(function(p){f.setElement(p[0],p[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},c=l;e.default=c}),o6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=t;function t(n){let o=typeof n;return o==="object"&&n!==null||o==="function"}}),s6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t=Yo(),n=s(o6()),o=Vo();function s(c){return c&&c.t?c:{default:c}}var a=class extends t.ContainerIterator{constructor(c,h,f){super(f),this.o=c,this.h=h,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}};e.HashContainerIterator=a;var l=class extends t.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(c){let{L:h,B:f}=c;h.B=f,f.L=h,c===this.p&&(this.p=f),c===this._&&(this._=h),this.i-=1}M(c,h,f){f===void 0&&(f=(0,n.default)(c));let p;if(f){let y=c[this.HASH_TAG];if(y!==void 0)return this.H[y].l=h,this.i;Object.defineProperty(c,this.HASH_TAG,{value:this.H.length,configurable:!0}),p={u:c,l:h,L:this._,B:this.h},this.H.push(p)}else{let y=this.g[c];if(y)return y.l=h,this.i;p={u:c,l:h,L:this._,B:this.h},this.g[c]=p}return this.i===0?(this.p=p,this.h.B=p):this._.B=p,this._=p,this.h.L=p,++this.i}I(c,h){if(h===void 0&&(h=(0,n.default)(c)),h){let f=c[this.HASH_TAG];return f===void 0?this.h:this.H[f]}else return this.g[c]||this.h}clear(){let c=this.HASH_TAG;this.H.forEach(function(h){delete h.u[c]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(c,h){let f;if(h===void 0&&(h=(0,n.default)(c)),h){let p=c[this.HASH_TAG];if(p===void 0)return!1;delete c[this.HASH_TAG],f=this.H[p],delete this.H[p]}else{if(f=this.g[c],f===void 0)return!1;delete this.g[c]}return this.V(f),!0}eraseElementByIterator(c){let h=c.o;return h===this.h&&(0,o.throwIteratorAccessError)(),this.V(h),c.next()}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;let h=this.p;for(;c--;)h=h.B;return this.V(h),this.i}};e.HashContainer=l}),AQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s6(),n=Vo(),o=class a6 extends t.HashContainerIterator{constructor(c,h,f,p){super(c,h,p),this.container=f}get pointer(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o.u}copy(){return new a6(this.o,this.h,this.container,this.iteratorType)}},s=class extends t.HashContainer{constructor(l=[]){super();let c=this;l.forEach(function(h){c.insert(h)})}begin(){return new o(this.p,this.h,this)}end(){return new o(this.h,this.h,this)}rBegin(){return new o(this._,this.h,this,1)}rEnd(){return new o(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(l,c){return this.M(l,void 0,c)}getElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c=this.p;for(;l--;)c=c.B;return c.u}find(l,c){let h=this.I(l,c);return new o(h,this.h,this)}forEach(l){let c=0,h=this.p;for(;h!==this.h;)l(h.u,c++,this),h=h.B}[Symbol.iterator](){return(function*(){let l=this.p;for(;l!==this.h;)yield l.u,l=l.B}).bind(this)()}},a=s;e.default=a}),wQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s6(),n=s(o6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var a=class u6 extends t.HashContainerIterator{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let f=this;return new Proxy([],{get(p,y){if(y==="0")return f.o.u;if(y==="1")return f.o.l},set(p,y,g){if(y!=="1")throw new TypeError("props must be 1");return f.o.l=g,!0}})}copy(){return new u6(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.HashContainer{constructor(h=[]){super();let f=this;h.forEach(function(p){f.setElement(p[0],p[1])})}begin(){return new a(this.p,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this._,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(h,f,p){return this.M(h,f,p)}getElementByKey(h,f){if(f===void 0&&(f=(0,n.default)(h)),f){let y=h[this.HASH_TAG];return y!==void 0?this.H[y].l:void 0}let p=this.g[h];return p?p.l:void 0}getElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return[f.u,f.l]}find(h,f){let p=this.I(h,f);return new a(p,this.h,this)}forEach(h){let f=0,p=this.p;for(;p!==this.h;)h([p.u,p.l],f++,this),p=p.B}[Symbol.iterator](){return(function*(){let h=this.p;for(;h!==this.h;)yield[h.u,h.l],h=h.B}).bind(this)()}},c=l;e.default=c}),vQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return s.default}});var t=y(cQ()),n=y(fQ()),o=y(hQ()),s=y(dQ()),a=y(pQ()),l=y(yQ()),c=y(mQ()),h=y(bQ()),f=y(AQ()),p=y(wQ());function y(g){return g&&g.t?g:{default:g}}}),xQ=qe((e,t)=>{Pe(),Le(),ke();var n=vQ().OrderedSet,o=qo()("number-allocator:trace"),s=qo()("number-allocator:error");function a(c,h){this.low=c,this.high=h}a.prototype.equals=function(c){return this.low===c.low&&this.high===c.high},a.prototype.compare=function(c){return this.low<c.low&&this.high<c.low?-1:c.low<this.low&&c.high<this.low?1:0};function l(c,h){if(!(this instanceof l))return new l(c,h);this.min=c,this.max=h,this.ss=new n([],(f,p)=>f.compare(p)),o("Create"),this.clear()}l.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},l.prototype.alloc=function(){if(this.ss.size()===0)return o("alloc():empty"),null;let c=this.ss.begin(),h=c.pointer.low,f=c.pointer.high,p=h;return p+1<=f?this.ss.updateKeyByIterator(c,new a(h+1,f)):this.ss.eraseElementByPos(0),o("alloc():"+p),p},l.prototype.use=function(c){let h=new a(c,c),f=this.ss.lowerBound(h);if(!f.equals(this.ss.end())){let p=f.pointer.low,y=f.pointer.high;return f.pointer.equals(h)?(this.ss.eraseElementByIterator(f),o("use():"+c),!0):p>c?!1:p===c?(this.ss.updateKeyByIterator(f,new a(p+1,y)),o("use():"+c),!0):y===c?(this.ss.updateKeyByIterator(f,new a(p,y-1)),o("use():"+c),!0):(this.ss.updateKeyByIterator(f,new a(c+1,y)),this.ss.insert(new a(p,c-1)),o("use():"+c),!0)}return o("use():failed"),!1},l.prototype.free=function(c){if(c<this.min||c>this.max){s("free():"+c+" is out of range");return}let h=new a(c,c),f=this.ss.upperBound(h);if(f.equals(this.ss.end())){if(f.equals(this.ss.begin())){this.ss.insert(h);return}f.pre();let p=f.pointer.high;f.pointer.high+1===c?this.ss.updateKeyByIterator(f,new a(p,c)):this.ss.insert(h)}else if(f.equals(this.ss.begin()))if(c+1===f.pointer.low){let p=f.pointer.high;this.ss.updateKeyByIterator(f,new a(c,p))}else this.ss.insert(h);else{let p=f.pointer.low,y=f.pointer.high;f.pre();let g=f.pointer.low;f.pointer.high+1===c?c+1===p?(this.ss.eraseElementByIterator(f),this.ss.updateKeyByIterator(f,new a(g,y))):this.ss.updateKeyByIterator(f,new a(g,c)):c+1===p?(this.ss.eraseElementByIterator(f.next()),this.ss.insert(new a(c,y))):this.ss.insert(h)}o("free():"+c)},l.prototype.clear=function(){o("clear()"),this.ss.clear(),this.ss.insert(new a(this.min,this.max))},l.prototype.intervalCount=function(){return this.ss.size()},l.prototype.dump=function(){console.log("length:"+this.ss.size());for(let c of this.ss)console.log(c)},t.exports=l}),l6=qe((e,t)=>{Pe(),Le(),ke();var n=xQ();t.exports.NumberAllocator=n}),EQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=lQ(),n=l6(),o=class{constructor(s){rt(this,"aliasToTopic");rt(this,"topicToAlias");rt(this,"max");rt(this,"numberAllocator");rt(this,"length");s>0&&(this.aliasToTopic=new t.LRUCache({max:s}),this.topicToAlias={},this.numberAllocator=new n.NumberAllocator(1,s),this.max=s,this.length=0)}put(s,a){if(a===0||a>this.max)return!1;let l=this.aliasToTopic.get(a);return l&&delete this.topicToAlias[l],this.aliasToTopic.set(a,s),this.topicToAlias[s]=a,this.numberAllocator.use(a),this.length=this.aliasToTopic.size,!0}getTopicByAlias(s){return this.aliasToTopic.get(s)}getAliasByTopic(s){let a=this.topicToAlias[s];return typeof a<"u"&&this.aliasToTopic.get(a),a}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};e.default=o}),SQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0});var n=Gp(),o=t(EQ()),s=fl(),a=(l,c)=>{l.log("_handleConnack");let{options:h}=l,f=h.protocolVersion===5?c.reasonCode:c.returnCode;if(clearTimeout(l.connackTimer),delete l.topicAliasSend,c.properties){if(c.properties.topicAliasMaximum){if(c.properties.topicAliasMaximum>65535){l.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}c.properties.topicAliasMaximum>0&&(l.topicAliasSend=new o.default(c.properties.topicAliasMaximum))}c.properties.serverKeepAlive&&h.keepalive&&(h.keepalive=c.properties.serverKeepAlive),c.properties.maximumPacketSize&&(h.properties||(h.properties={}),h.properties.maximumPacketSize=c.properties.maximumPacketSize)}if(f===0)l.reconnecting=!1,l._onConnect(c);else if(f>0){let p=new s.ErrorWithReasonCode(`Connection refused: ${n.ReasonCodes[f]}`,f);l.emit("error",p),l.options.reconnectOnConnackError&&l._cleanUp(!0)}};e.default=a}),IQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(n,o,s)=>{n.log("handling pubrel packet");let a=typeof s<"u"?s:n.noop,{messageId:l}=o,c={cmd:"pubcomp",messageId:l};n.incomingStore.get(o,(h,f)=>{h?n._sendPacket(c,a):(n.emit("message",f.topic,f.payload,f),n.handleMessage(f,p=>{if(p)return a(p);n.incomingStore.del(f,n.noop),n._sendPacket(c,a)}))})};e.default=t}),_Q=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(sQ()),o=t(uQ()),s=t(SQ()),a=t(Gp()),l=t(IQ()),c=(h,f,p)=>{let{options:y}=h;if(y.protocolVersion===5&&y.properties&&y.properties.maximumPacketSize&&y.properties.maximumPacketSize<f.length)return h.emit("error",new Error(`exceeding packets size ${f.cmd}`)),h.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),h;switch(h.log("_handlePacket :: emitting packetreceive"),h.emit("packetreceive",f),f.cmd){case"publish":(0,n.default)(h,f,p);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":h.reschedulePing(),(0,a.default)(h,f),p();break;case"pubrel":h.reschedulePing(),(0,l.default)(h,f,p);break;case"connack":(0,s.default)(h,f),p();break;case"auth":h.reschedulePing(),(0,o.default)(h,f),p();break;case"pingresp":h.log("_handlePacket :: received pingresp"),h.reschedulePing(!0),p();break;case"disconnect":h.emit("disconnect",f),p();break;default:h.log("_handlePacket :: unknown command"),p();break}};e.default=c}),c6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{constructor(){rt(this,"nextId");this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let n=this.nextId++;return this.nextId===65536&&(this.nextId=1),n}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(n){return!0}deallocate(n){}clear(){}};e.default=t}),CQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{constructor(n){rt(this,"aliasToTopic");rt(this,"max");rt(this,"length");this.aliasToTopic={},this.max=n}put(n,o){return o===0||o>this.max?!1:(this.aliasToTopic[o]=n,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(n){return this.aliasToTopic[n]}clear(){this.aliasToTopic={}}};e.default=t}),FQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var n=t((Pa(),Vt($s))),o=fl(),s=class{};e.TypedEventEmitter=s,(0,o.applyMixin)(s,n.default)}),Kp=qe((e,t)=>{Pe(),Le(),ke();function n(o){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),OQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default;function o(s,a){if(n(s)!="object"||!s)return s;var l=s[Symbol.toPrimitive];if(l!==void 0){var c=l.call(s,a||"default");if(n(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(s)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),TQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default,o=OQ();function s(a){var l=o(a,"string");return n(l)=="symbol"?l:l+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),BQ=qe((e,t)=>{Pe(),Le(),ke();var n=TQ();function o(s,a,l){return(a=n(a))in s?Object.defineProperty(s,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[a]=l,s}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),RQ=qe((e,t)=>{Pe(),Le(),ke();function n(o){if(Array.isArray(o))return o}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),MQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){var a=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(a!=null){var l,c,h,f,p=[],y=!0,g=!1;try{if(h=(a=a.call(o)).next,s===0){if(Object(a)!==a)return;y=!1}else for(;!(y=(l=h.call(a)).done)&&(p.push(l.value),p.length!==s);y=!0);}catch(b){g=!0,c=b}finally{try{if(!y&&a.return!=null&&(f=a.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),jQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){(s==null||s>o.length)&&(s=o.length);for(var a=0,l=Array(s);a<s;a++)l[a]=o[a];return l}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),UQ=qe((e,t)=>{Pe(),Le(),ke();var n=jQ();function o(s,a){if(s){if(typeof s=="string")return n(s,a);var l={}.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?n(s,a):void 0}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),NQ=qe((e,t)=>{Pe(),Le(),ke();function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
155
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),DQ=qe((e,t)=>{Pe(),Le(),ke();var n=RQ(),o=MQ(),s=UQ(),a=NQ();function l(c,h){return n(c)||o(c,h)||s(c,h)||a()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports}),f6=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.fastUniqueNumbers={}))})(e,function(n){var o=function(b){return function(w){var F=b(w);return w.add(F),F}},s=function(b){return function(w,F){return b.set(w,F),F}},a=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,l=536870912,c=l*2,h=function(b,w){return function(F){var I=w.get(F),R=I===void 0?F.size:I<c?I+1:0;if(!F.has(R))return b(F,R);if(F.size<l){for(;F.has(R);)R=Math.floor(Math.random()*c);return b(F,R)}if(F.size>a)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;F.has(R);)R=Math.floor(Math.random()*a);return b(F,R)}},f=new WeakMap,p=s(f),y=h(p,f),g=o(y);n.addUniqueNumber=g,n.generateUniqueNumber=y})}),PQ=qe((e,t)=>{Pe(),Le(),ke();function n(s,a,l,c,h,f,p){try{var y=s[f](p),g=y.value}catch(b){return void l(b)}y.done?a(g):Promise.resolve(g).then(c,h)}function o(s){return function(){var a=this,l=arguments;return new Promise(function(c,h){var f=s.apply(a,l);function p(g){n(f,c,h,p,y,"next",g)}function y(g){n(f,c,h,p,y,"throw",g)}p(void 0)})}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),h6=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){this.v=o,this.k=s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),d6=qe((e,t)=>{Pe(),Le(),ke();function n(o,s,a,l){var c=Object.defineProperty;try{c({},"",{})}catch{c=0}t.exports=n=function(h,f,p,y){function g(b,w){n(h,b,function(F){return this._invoke(b,w,F)})}f?c?c(h,f,{value:p,enumerable:!y,configurable:!y,writable:!y}):h[f]=p:(g("next",0),g("throw",1),g("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(o,s,a,l)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),p6=qe((e,t)=>{Pe(),Le(),ke();var n=d6();function o(){var s,a,l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",h=l.toStringTag||"@@toStringTag";function f(R,A,E,M){var T=A&&A.prototype instanceof y?A:y,z=Object.create(T.prototype);return n(z,"_invoke",(function(L,k,j){var U,$,N,Z=0,re=j||[],ie=!1,X={p:0,n:0,v:s,a:ae,f:ae.bind(s,4),d:function(ye,le){return U=ye,$=0,N=s,X.n=le,p}};function ae(ye,le){for($=ye,N=le,a=0;!ie&&Z&&!ee&&a<re.length;a++){var ee,G=re[a],Q=X.p,K=G[2];ye>3?(ee=K===le)&&(N=G[($=G[4])?5:($=3,3)],G[4]=G[5]=s):G[0]<=Q&&((ee=ye<2&&Q<G[1])?($=0,X.v=le,X.n=G[1]):Q<K&&(ee=ye<3||G[0]>le||le>K)&&(G[4]=ye,G[5]=le,X.n=K,$=0))}if(ee||ye>1)return p;throw ie=!0,le}return function(ye,le,ee){if(Z>1)throw TypeError("Generator is already running");for(ie&&le===1&&ae(le,ee),$=le,N=ee;(a=$<2?s:N)||!ie;){U||($?$<3?($>1&&(X.n=-1),ae($,N)):X.n=N:X.v=N);try{if(Z=2,U){if($||(ye="next"),a=U[ye]){if(!(a=a.call(U,N)))throw TypeError("iterator result is not an object");if(!a.done)return a;N=a.value,$<2&&($=0)}else $===1&&(a=U.return)&&a.call(U),$<2&&(N=TypeError("The iterator does not provide a '"+ye+"' method"),$=1);U=s}else if((a=(ie=X.n<0)?N:L.call(k,X))!==p)break}catch(G){U=s,$=1,N=G}finally{Z=1}}return{value:a,done:ie}}})(R,E,M),!0),z}var p={};function y(){}function g(){}function b(){}a=Object.getPrototypeOf;var w=[][c]?a(a([][c]())):(n(a={},c,function(){return this}),a),F=b.prototype=y.prototype=Object.create(w);function I(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,b):(R.__proto__=b,n(R,h,"GeneratorFunction")),R.prototype=Object.create(F),R}return g.prototype=b,n(F,"constructor",b),n(b,"constructor",g),g.displayName="GeneratorFunction",n(b,h,"GeneratorFunction"),n(F),n(F,h,"Generator"),n(F,c,function(){return this}),n(F,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:f,m:I}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),y6=qe((e,t)=>{Pe(),Le(),ke();var n=h6(),o=d6();function s(a,l){function c(f,p,y,g){try{var b=a[f](p),w=b.value;return w instanceof n?l.resolve(w.v).then(function(F){c("next",F,y,g)},function(F){c("throw",F,y,g)}):l.resolve(w).then(function(F){b.value=F,y(b)},function(F){return c("throw",F,y,g)})}catch(F){g(F)}}var h;this.next||(o(s.prototype),o(s.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(f,p,y){function g(){return new l(function(b,w){c(f,y,b,w)})}return h=h?h.then(g,g):g()},!0)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),g6=qe((e,t)=>{Pe(),Le(),ke();var n=p6(),o=y6();function s(a,l,c,h,f){return new o(n().w(a,l,c,h),f||Promise)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),kQ=qe((e,t)=>{Pe(),Le(),ke();var n=g6();function o(s,a,l,c,h){var f=n(s,a,l,c,h);return f.next().then(function(p){return p.done?p.value:f.next()})}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),LQ=qe((e,t)=>{Pe(),Le(),ke();function n(o){var s=Object(o),a=[];for(var l in s)a.unshift(l);return function c(){for(;a.length;)if((l=a.pop())in s)return c.value=l,c.done=!1,c;return c.done=!0,c}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),$Q=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default;function o(s){if(s!=null){var a=s[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],l=0;if(a)return a.call(s);if(typeof s.next=="function")return s;if(!isNaN(s.length))return{next:function(){return s&&l>=s.length&&(s=void 0),{value:s&&s[l++],done:!s}}}}throw new TypeError(n(s)+" is not iterable")}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),zQ=qe((e,t)=>{Pe(),Le(),ke();var n=h6(),o=p6(),s=kQ(),a=g6(),l=y6(),c=LQ(),h=$Q();function f(){var p=o(),y=p.m(f),g=(Object.getPrototypeOf?Object.getPrototypeOf(y):y.__proto__).constructor;function b(I){var R=typeof I=="function"&&I.constructor;return!!R&&(R===g||(R.displayName||R.name)==="GeneratorFunction")}var w={throw:1,return:2,break:3,continue:3};function F(I){var R,A;return function(E){R||(R={stop:function(){return A(E.a,2)},catch:function(){return E.v},abrupt:function(M,T){return A(E.a,w[M],T)},delegateYield:function(M,T,z){return R.resultName=T,A(E.d,h(M),z)},finish:function(M){return A(E.f,M)}},A=function(M,T,z){E.p=R.prev,E.n=R.next;try{return M(T,z)}finally{R.next=E.n}}),R.resultName&&(R[R.resultName]=E.v,R.resultName=void 0),R.sent=E.v,R.next=E.n;try{return I.call(this,R)}finally{E.p=R.prev,E.n=R.next}}}return(t.exports=f=function(){return{wrap:function(I,R,A,E){return p.w(F(I),R,A,E&&E.reverse())},isGeneratorFunction:b,mark:p.m,awrap:function(I,R){return new n(I,R)},AsyncIterator:l,async:function(I,R,A,E,M){return(b(R)?a:s)(F(I),R,A,E,M)},keys:c,values:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports}),qQ=qe((e,t)=>{Pe(),Le(),ke();var n=zQ()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}),HQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,BQ(),DQ(),f6(),PQ(),qQ()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/slicedToArray","fast-unique-numbers","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.brokerFactory={},n._defineProperty,n._slicedToArray,n.fastUniqueNumbers,n._asyncToGenerator,n._regeneratorRuntime))})(e,function(n,o,s,a,l,c){var h=function(A){return typeof A.start=="function"},f=new WeakMap;function p(A,E){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);E&&(T=T.filter(function(z){return Object.getOwnPropertyDescriptor(A,z).enumerable})),M.push.apply(M,T)}return M}function y(A){for(var E=1;E<arguments.length;E++){var M=arguments[E]!=null?arguments[E]:{};E%2?p(Object(M),!0).forEach(function(T){o(A,T,M[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(M)):p(Object(M)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(M,T))})}return A}var g=function(A){return y(y({},A),{},{connect:function(E){var M=E.call;return l(c.mark(function T(){var z,L,k,j;return c.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return z=new MessageChannel,L=z.port1,k=z.port2,U.next=1,M("connect",{port:L},[L]);case 1:return j=U.sent,f.set(k,j),U.abrupt("return",k);case 2:case"end":return U.stop()}},T)}))},disconnect:function(E){var M=E.call;return(function(){var T=l(c.mark(function z(L){var k;return c.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(k=f.get(L),k!==void 0){j.next=1;break}throw new Error("The given port is not connected.");case 1:return j.next=2,M("disconnect",{portId:k});case 2:case"end":return j.stop()}},z)}));return function(z){return T.apply(this,arguments)}})()},isSupported:function(E){var M=E.call;return function(){return M("isSupported")}}})};function b(A,E){var M=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);E&&(T=T.filter(function(z){return Object.getOwnPropertyDescriptor(A,z).enumerable})),M.push.apply(M,T)}return M}function w(A){for(var E=1;E<arguments.length;E++){var M=arguments[E]!=null?arguments[E]:{};E%2?b(Object(M),!0).forEach(function(T){o(A,T,M[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(M)):b(Object(M)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(M,T))})}return A}var F=new WeakMap,I=function(A){if(F.has(A))return F.get(A);var E=new Map;return F.set(A,E),E},R=function(A){var E=g(A);return function(M){var T=I(M);M.addEventListener("message",function(re){var ie=re.data,X=ie.id;if(X!==null&&T.has(X)){var ae=T.get(X),ye=ae.reject,le=ae.resolve;T.delete(X),ie.error===void 0?le(ie.result):ye(new Error(ie.error.message))}}),h(M)&&M.start();for(var z=function(re){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(ae,ye){var le=a.generateUniqueNumber(T);T.set(le,{reject:ye,resolve:ae}),ie===null?M.postMessage({id:le,method:re},X):M.postMessage({id:le,method:re,params:ie},X)})},L=function(re,ie){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];M.postMessage({id:null,method:re,params:ie},X)},k={},j=0,U=Object.entries(E);j<U.length;j++){var $=s(U[j],2),N=$[0],Z=$[1];k=w(w({},k),{},o({},N,Z({call:z,notify:L})))}return w({},k)}};n.createBroker=R})}),QQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,Kp(),HQ(),f6()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/typeof","broker-factory","fast-unique-numbers"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.workerTimersBroker={},n._typeof,n.brokerFactory,n.fastUniqueNumbers))})(e,function(n,o,s,a){var l=new Map([[0,null]]),c=new Map([[0,null]]),h=s.createBroker({clearInterval:function(p){var y=p.call;return function(g){o(l.get(g))==="symbol"&&(l.set(g,null),y("clear",{timerId:g,timerType:"interval"}).then(function(){l.delete(g)}))}},clearTimeout:function(p){var y=p.call;return function(g){o(c.get(g))==="symbol"&&(c.set(g,null),y("clear",{timerId:g,timerType:"timeout"}).then(function(){c.delete(g)}))}},setInterval:function(p){var y=p.call;return function(g){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,F=new Array(w>2?w-2:0),I=2;I<w;I++)F[I-2]=arguments[I];var R=Symbol(),A=a.generateUniqueNumber(l);l.set(A,R);var E=function(){return y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"interval"}).then(function(){var M=l.get(A);if(M===void 0)throw new Error("The timer is in an undefined state.");M===R&&(g.apply(void 0,F),l.get(A)===R&&E())})};return E(),A}},setTimeout:function(p){var y=p.call;return function(g){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,F=new Array(w>2?w-2:0),I=2;I<w;I++)F[I-2]=arguments[I];var R=Symbol(),A=a.generateUniqueNumber(c);return c.set(A,R),y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"timeout"}).then(function(){var E=c.get(A);if(E===void 0)throw new Error("The timer is in an undefined state.");E===R&&(c.delete(A),g.apply(void 0,F))}),A}}}),f=function(p){var y=new Worker(p);return h(y)};n.load=f,n.wrap=h})}),GQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,QQ()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.workerTimers={},n.workerTimersBroker))})(e,function(n,o){var s=function(y,g){var b=null;return function(){if(b!==null)return b;var w=new Blob([g],{type:"application/javascript; charset=utf-8"}),F=URL.createObjectURL(w);return b=y(F),setTimeout(function(){return URL.revokeObjectURL(F)}),b}},a=`(()=>{var e={45:(e,t,r)=>{var n=r(738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,a,i=[],s=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},293:e=>{function t(e,t,r,n,o,u,a){try{var i=e[u](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,u){var a=e.apply(r,n);function i(e){t(a,o,u,i,s,"next",e)}function s(e){t(a,o,u,i,s,"throw",e)}i(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},389:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<u?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*u);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,s=r(i),c=a(s,i),f=t(c);e.addUniqueNumber=f,e.generateUniqueNumber=c}(t)},472:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return function(r){var o=t.get(r);if(void 0===o)return Promise.resolve(!1);var u=n(o,2),a=u[0],i=u[1];return e(a),t.delete(r),i(!1),Promise.resolve(!0)}},u=function(e,t){var r=function(n,o,u,a){var i=n-e.now();i>0?o.set(a,[t(r,i,n,o,u,a),u]):(o.delete(a),u(!0))};return r},a=function(e,t,r,n){return function(o,u,a){var i=o+u-t.timeOrigin,s=i-t.now();return new Promise((function(t){e.set(a,[r(n,s,i,e,t,a),t])}))}},i=new Map,s=o(globalThis.clearTimeout,i),c=new Map,f=o(globalThis.clearTimeout,c),l=u(performance,globalThis.setTimeout),p=a(i,performance,globalThis.setTimeout,l),d=a(c,performance,globalThis.setTimeout,l);r.createWorker(self,{clear:function(){var r=e(t.mark((function e(r){var n,o,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.timerId,o=r.timerType,e.next=1,"interval"===o?s(n):f(n);case 1:return u=e.sent,e.abrupt("return",{result:u});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),set:function(){var r=e(t.mark((function e(r){var n,o,u,a,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.delay,o=r.now,u=r.timerId,a=r.timerType,e.next=1,("interval"===a?p:d)(n,o,u);case 1:return i=e.sent,e.abrupt("return",{result:i});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},546:e=>{function t(r,n,o,u){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){if(r)a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n;else{var u=function(r,n){t(e,r,(function(e){return this._invoke(r,n,e)}))};u("next",0),u("throw",1),u("return",2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,u)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},623:function(e,t,r){!function(e,t,r,n,o){"use strict";var u={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},i=function(e){return a('The requested method called "'.concat(e,'" is not supported.'),u.METHOD_NOT_FOUND)},s=function(e){return a('The handler of the method called "'.concat(e,'" returned no required result.'),u.INTERNAL_ERROR)},c=function(e){return a('The handler of the method called "'.concat(e,'" returned an unexpected result.'),u.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),u.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark((function t(o){var u,a,f,l,p,d,v,x,y,b,h,m,_,g,w;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=o.data,a=u.id,f=u.method,l=u.params,p=n[f],t.prev=1,void 0!==p){t.next=2;break}throw i(f);case 2:if(void 0!==(d=void 0===l?p():p(l))){t.next=3;break}throw s(f);case 3:if(!(d instanceof Promise)){t.next=5;break}return t.next=4,d;case 4:g=t.sent,t.next=6;break;case 5:g=d;case 6:if(v=g,null!==a){t.next=8;break}if(void 0===v.result){t.next=7;break}throw c(f);case 7:t.next=10;break;case 8:if(void 0!==v.result){t.next=9;break}throw c(f);case 9:x=v.result,y=v.transferables,b=void 0===y?[]:y,e.postMessage({id:a,result:x},b);case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),h=w.message,m=w.status,_=void 0===m?-32603:m,e.postMessage({error:{code:_,message:h},id:a});case 12:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=new Map,y=function(e,n,u){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var u=e(r,n),a=o.generateUniqueNumber(x);return x.set(a,(function(){u(),r.close(),x.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p();case 1:if(!e.sent){e.next=5;break}if(!((t=u())instanceof Promise)){e.next=3;break}return e.next=2,t;case 2:o=e.sent,e.next=4;break;case 3:o=t;case 4:return n=o,e.abrupt("return",{result:n});case 5:return e.abrupt("return",{result:!1});case 6:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},b=function(e,t){var r=y(b,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener("message",n),function(){return e.removeEventListener("message",n)}};e.createWorker=b,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},633:(e,t,r)=>{var n=r(172),o=r(993),u=r(869),a=r(887),i=r(791),s=r(373),c=r(579);function f(){"use strict";var t=o(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,u){return t.resultName=o,r(n.d,c(e),u)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(p(t)?a:u)(v(e),t,r,n,o)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},693:(e,t,r)=>{var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var n=r(987),o=r(156),u=r(122),a=r(752);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:(e,t,r)=>{var n=r(172),o=r(546);e.exports=function e(t,r){function u(e,o,a,i){try{var s=t[e](o),c=s.value;return c instanceof n?r.resolve(c.v).then((function(e){u("next",e,a,i)}),(function(e){u("throw",e,a,i)})):r.resolve(c).then((function(e){s.value=e,a(s)}),(function(e){return u("throw",e,a,i)}))}catch(e){i(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),o(this,"_invoke",(function(e,t,n){function o(){return new r((function(t,r){u(e,n,t,r)}))}return a=a?a.then(o,o):o()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,o,u){var a=n(e,t,r,o,u);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,r)=>{var n=r(993),o=r(791);e.exports=function(e,t,r,u,a){return new o(n().w(e,t,r,u),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,r)=>{var n=r(546);function o(){var t,r,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",i=u.toStringTag||"@@toStringTag";function s(e,o,u,a){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,n,o){var u,a,i,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return u=e,a=0,i=t,p.n=r,c}};function d(e,n){for(a=e,i=n,r=0;!l&&s&&!o&&r<f.length;r++){var o,u=f[r],d=p.p,v=u[2];e>3?(o=v===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=t):u[0]<=d&&((o=e<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<v&&(o=e<3||u[0]>n||n>v)&&(u[4]=e,u[5]=n,p.n=v,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,i=v;(r=a<2?t:i)||!l;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(s=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=t}else if((r=(l=p.n<0)?i:e.call(n,p))!==c)break}catch(e){u=t,a=1,i=e}finally{s=1}}return{value:r,done:l}}}(e,u,a),!0),s}var c={};function f(){}function l(){}function p(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,(function(){return this})),r),v=p.prototype=f.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,n(v,"constructor",p),n(p,"constructor",l),l.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,a,(function(){return this})),n(v,"toString",(function(){return"[object Generator]"})),(e.exports=o=function(){return{w:s,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n].call(u.exports,u,u.exports,r),u.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,l=s(o.load,a),c=function(y){return l().clearInterval(y)},h=function(y){return l().clearTimeout(y)},f=function(){var y;return(y=l()).setInterval.apply(y,arguments)},p=function(){var y;return(y=l()).setTimeout.apply(y,arguments)};n.clearInterval=c,n.clearTimeout=h,n.setInterval=f,n.setTimeout=p})}),Yp=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var t=()=>{var a;return typeof window<"u"?typeof navigator<"u"&&((a=navigator.userAgent)==null?void 0:a.toLowerCase().indexOf(" electron/"))>-1&&(Dt!=null&&Dt.versions)?!Object.prototype.hasOwnProperty.call(Dt.versions,"electron"):typeof window.document<"u":!1},n=()=>{var a,l;return!!(typeof self=="object"&&((l=(a=self==null?void 0:self.constructor)==null?void 0:a.name)!=null&&l.includes("WorkerGlobalScope"))&&typeof Deno>"u")},o=()=>typeof navigator<"u"&&navigator.product==="ReactNative",s=t()||n()||o();e.isWebWorker=n(),e.isReactNativeBrowser=o(),e.default=s}),KQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(f,p,y,g){g===void 0&&(g=y);var b=Object.getOwnPropertyDescriptor(p,y);(!b||("get"in b?!p.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return p[y]}}),Object.defineProperty(f,g,b)}:function(f,p,y,g){g===void 0&&(g=y),f[g]=p[y]}),n=e&&e.__setModuleDefault||(Object.create?function(f,p){Object.defineProperty(f,"default",{enumerable:!0,value:p})}:function(f,p){f.default=p}),o=e&&e.__importStar||(function(){var f=function(p){return f=Object.getOwnPropertyNames||function(y){var g=[];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[g.length]=b);return g},f(p)};return function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var g=f(p),b=0;b<g.length;b++)g[b]!=="default"&&t(y,p,g[b]);return n(y,p),y}})();Object.defineProperty(e,"__esModule",{value:!0});var s=GQ(),a=o(Yp()),l={set:s.setInterval,clear:s.clearInterval},c={set:(f,p)=>setInterval(f,p),clear:f=>clearInterval(f)},h=f=>{switch(f){case"native":return c;case"worker":return l;case"auto":default:return a.default&&!a.isWebWorker&&!a.isReactNativeBrowser?l:c}};e.default=h}),m6=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(KQ()),o=class{constructor(s,a){rt(this,"_keepalive");rt(this,"timerId");rt(this,"timer");rt(this,"destroyed",!1);rt(this,"counter");rt(this,"client");rt(this,"_keepaliveTimeoutTimestamp");rt(this,"_intervalEvery");this.client=s,this.timer=typeof a=="object"&&"set"in a&&"clear"in a?a:(0,n.default)(a),this.setKeepalive(s.options.keepalive)}get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(s){if(s*=1e3,isNaN(s)||s<=0||s>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${s}`);this._keepalive=s,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${s}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let s=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+s,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};e.default=o}),fA=qe(e=>{var T;Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(z,L,k,j){j===void 0&&(j=k);var U=Object.getOwnPropertyDescriptor(L,k);(!U||("get"in U?!L.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return L[k]}}),Object.defineProperty(z,j,U)}:function(z,L,k,j){j===void 0&&(j=k),z[j]=L[k]}),n=e&&e.__setModuleDefault||(Object.create?function(z,L){Object.defineProperty(z,"default",{enumerable:!0,value:L})}:function(z,L){z.default=L}),o=e&&e.__importStar||(function(){var z=function(L){return z=Object.getOwnPropertyNames||function(k){var j=[];for(var U in k)Object.prototype.hasOwnProperty.call(k,U)&&(j[j.length]=U);return j},z(L)};return function(L){if(L&&L.__esModule)return L;var k={};if(L!=null)for(var j=z(L),U=0;U<j.length;U++)j[U]!=="default"&&t(k,L,j[U]);return n(k,L),k}})(),s=e&&e.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(e,"__esModule",{value:!0});var a=s(rQ()),l=La(),c=s(iQ()),h=s(qo()),f=o(oQ()),p=s(K3()),y=s(_Q()),g=s(c6()),b=s(CQ()),w=fl(),F=FQ(),I=s(m6()),R=o(Yp()),A=globalThis.setImmediate||((...z)=>{let L=z.shift();(0,w.nextTick)(()=>{L(...z)})}),E={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},M=(T=class extends F.TypedEventEmitter{constructor(k,j){super();rt(this,"connected");rt(this,"disconnecting");rt(this,"disconnected");rt(this,"reconnecting");rt(this,"incomingStore");rt(this,"outgoingStore");rt(this,"options");rt(this,"queueQoSZero");rt(this,"_reconnectCount");rt(this,"log");rt(this,"messageIdProvider");rt(this,"outgoing");rt(this,"messageIdToTopic");rt(this,"noop");rt(this,"keepaliveManager");rt(this,"stream");rt(this,"queue");rt(this,"streamBuilder");rt(this,"_resubscribeTopics");rt(this,"connackTimer");rt(this,"reconnectTimer");rt(this,"_storeProcessing");rt(this,"_packetIdsDuringStoreProcessing");rt(this,"_storeProcessingQueue");rt(this,"_firstConnection");rt(this,"topicAliasRecv");rt(this,"topicAliasSend");rt(this,"_deferredReconnect");rt(this,"connackPacket");this.options=j||{};for(let U in E)typeof this.options[U]>"u"?this.options[U]=E[U]:this.options[U]=j[U];this.log=this.options.log||(0,h.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",T.VERSION),R.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",R.default?"browser":"node"),this.log("MqttClient :: options.protocol",j.protocol),this.log("MqttClient :: options.protocolVersion",j.protocolVersion),this.log("MqttClient :: options.username",j.username),this.log("MqttClient :: options.keepalive",j.keepalive),this.log("MqttClient :: options.reconnectPeriod",j.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",j.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",j.properties?j.properties.topicAliasMaximum:void 0),this.options.clientId=typeof j.clientId=="string"?j.clientId:T.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=j.protocolVersion===5&&j.customHandleAcks?j.customHandleAcks:(...U)=>{U[3](null,0)},this.options.writeCache||(a.default.writeToStream.cacheNumbers=!1),this.streamBuilder=k,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new g.default:this.options.messageIdProvider,this.outgoingStore=j.outgoingStore||new p.default,this.incomingStore=j.incomingStore||new p.default,this.queueQoSZero=j.queueQoSZero===void 0?!0:j.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,j.properties&&j.properties.topicAliasMaximum>0&&(j.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new b.default(j.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:U}=this,$=()=>{let N=U.shift();this.log("deliver :: entry %o",N);let Z=null;if(!N){this._resubscribe();return}Z=N.packet,this.log("deliver :: call _sendPacket for %o",Z);let re=!0;Z.messageId&&Z.messageId!==0&&(this.messageIdProvider.register(Z.messageId)||(re=!1)),re?this._sendPacket(Z,ie=>{N.cb&&N.cb(ie),$()}):(this.log("messageId: %d has already used. The message is skipped and removed.",Z.messageId),$())};this.log("connect :: sending queued packets"),$()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}handleAuth(k,j){j()}handleMessage(k,j){j()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var X;let k=new l.Writable,j=a.default.parser(this.options),U=null,$=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),j.on("packet",ae=>{this.log("parser :: on packet push to packets array."),$.push(ae)});let N=()=>{this.log("work :: getting next packet in queue");let ae=$.shift();if(ae)this.log("work :: packet pulled from queue"),(0,y.default)(this,ae,Z);else{this.log("work :: no packets in queue");let ye=U;U=null,this.log("work :: done flag is %s",!!ye),ye&&ye()}},Z=()=>{if($.length)(0,w.nextTick)(N);else{let ae=U;U=null,ae()}};k._write=(ae,ye,le)=>{U=le,this.log("writable stream :: parsing buffer"),j.parse(ae),N()};let re=ae=>{this.log("streamErrorHandler :: error",ae.message),ae.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",ae)):this.noop(ae)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(k),this.stream.on("error",re),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let ie={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(ie.will={...this.options.will,payload:(X=this.options.will)==null?void 0:X.payload}),this.topicAliasRecv&&(ie.properties||(ie.properties={}),this.topicAliasRecv&&(ie.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(ie),j.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let ae={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(ae)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(k,j,U,$){this.log("publish :: message `%s` to topic `%s`",j,k);let{options:N}=this;typeof U=="function"&&($=U,U=null),U=U||{},U={qos:0,retain:!1,dup:!1,...U};let{qos:Z,retain:re,dup:ie,properties:X,cbStorePut:ae}=U;if(this._checkDisconnecting($))return this;let ye=()=>{let le=0;if((Z===1||Z===2)&&(le=this._nextId(),le===null))return this.log("No messageId left"),!1;let ee={cmd:"publish",topic:k,payload:j,qos:Z,retain:re,messageId:le,dup:ie};switch(N.protocolVersion===5&&(ee.properties=X),this.log("publish :: qos",Z),Z){case 1:case 2:this.outgoing[ee.messageId]={volatile:!1,cb:$||this.noop},this.log("MqttClient:publish: packet cmd: %s",ee.cmd),this._sendPacket(ee,void 0,ae);break;default:this.log("MqttClient:publish: packet cmd: %s",ee.cmd),this._sendPacket(ee,$,ae);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ye())&&this._storeProcessingQueue.push({invoke:ye,cbStorePut:U.cbStorePut,callback:$}),this}publishAsync(k,j,U){return new Promise(($,N)=>{this.publish(k,j,U,(Z,re)=>{Z?N(Z):$(re)})})}subscribe(k,j,U){let $=this.options.protocolVersion;typeof j=="function"&&(U=j),U=U||this.noop;let N=!1,Z=[];typeof k=="string"?(k=[k],Z=k):Array.isArray(k)?Z=k:typeof k=="object"&&(N=k.resubscribe,delete k.resubscribe,Z=Object.keys(k));let re=f.validateTopics(Z);if(re!==null)return A(U,new Error(`Invalid topic ${re}`)),this;if(this._checkDisconnecting(U))return this.log("subscribe: discconecting true"),this;let ie={qos:0};$===5&&(ie.nl=!1,ie.rap=!1,ie.rh=0),j={...ie,...j};let{properties:X}=j,ae=[],ye=(G,Q)=>{if(Q=Q||j,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,G)||this._resubscribeTopics[G].qos<Q.qos||N){let K={topic:G,qos:Q.qos};$===5&&(K.nl=Q.nl,K.rap=Q.rap,K.rh=Q.rh,K.properties=X),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",K.topic,K.qos),ae.push(K)}};if(Array.isArray(k)?k.forEach(G=>{this.log("subscribe: array topic %s",G),ye(G)}):Object.keys(k).forEach(G=>{this.log("subscribe: object topic %s, %o",G,k[G]),ye(G,k[G])}),!ae.length)return U(null,[]),this;let le=(G,Q)=>{let K={cmd:"subscribe",subscriptions:G,messageId:Q};if(X&&(K.properties=X),this.options.resubscribe){this.log("subscribe :: resubscribe true");let q=[];G.forEach(fe=>{if(this.options.reconnectPeriod>0){let ue={qos:fe.qos};$===5&&(ue.nl=fe.nl||!1,ue.rap=fe.rap||!1,ue.rh=fe.rh||0,ue.properties=fe.properties),this._resubscribeTopics[fe.topic]=ue,q.push(fe.topic)}}),this.messageIdToTopic[K.messageId]=q}let W=new Promise((q,fe)=>{this.outgoing[K.messageId]={volatile:!0,cb(ue,ne){if(!ue){let{granted:J}=ne;for(let O=0;O<J.length;O+=1)G[O].qos=J[O]}ue?fe(new w.ErrorWithSubackPacket(ue.message,ne)):q(ne)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(K),W},ee=()=>{let G=this.options.subscribeBatchSize??ae.length,Q=[];for(let K=0;K<ae.length;K+=G){let W=ae.slice(K,K+G),q=this._nextId();if(q===null)return this.log("No messageId left"),!1;Q.push(le(W,q))}return Promise.all(Q).then(K=>{U(null,ae,K.at(-1))}).catch(K=>{U(K,ae,K.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ee())&&this._storeProcessingQueue.push({invoke:ee,callback:U}),this}subscribeAsync(k,j){return new Promise((U,$)=>{this.subscribe(k,j,(N,Z)=>{N?$(N):U(Z)})})}unsubscribe(k,j,U){typeof k=="string"&&(k=[k]),typeof j=="function"&&(U=j),U=U||this.noop;let $=f.validateTopics(k);if($!==null)return A(U,new Error(`Invalid topic ${$}`)),this;if(this._checkDisconnecting(U))return this;let N=()=>{let Z=this._nextId();if(Z===null)return this.log("No messageId left"),!1;let re={cmd:"unsubscribe",messageId:Z,unsubscriptions:[]};return typeof k=="string"?re.unsubscriptions=[k]:Array.isArray(k)&&(re.unsubscriptions=k),this.options.resubscribe&&re.unsubscriptions.forEach(ie=>{delete this._resubscribeTopics[ie]}),typeof j=="object"&&j.properties&&(re.properties=j.properties),this.outgoing[re.messageId]={volatile:!0,cb:U},this.log("unsubscribe: call _sendPacket"),this._sendPacket(re),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!N())&&this._storeProcessingQueue.push({invoke:N,callback:U}),this}unsubscribeAsync(k,j){return new Promise((U,$)=>{this.unsubscribe(k,j,(N,Z)=>{N?$(N):U(Z)})})}end(k,j,U){this.log("end :: (%s)",this.options.clientId),(k==null||typeof k!="boolean")&&(U=U||j,j=k,k=!1),typeof j!="object"&&(U=U||j,j=null),this.log("end :: cb? %s",!!U),(!U||typeof U!="function")&&(U=this.noop);let $=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(Z=>{this.outgoingStore.close(re=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),U){let ie=Z||re;this.log("end :: closeStores: invoking callback with args"),U(ie)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},N=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,k),this._cleanUp(k,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,w.nextTick)($)},j)};return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!k&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,N,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),N()),this)}endAsync(k,j){return new Promise((U,$)=>{this.end(k,j,N=>{N?$(N):U()})})}removeOutgoingMessage(k){if(this.outgoing[k]){let{cb:j}=this.outgoing[k];this._removeOutgoingAndStoreMessage(k,()=>{j(new Error("Message removed"))})}return this}reconnect(k){this.log("client reconnect");let j=()=>{k?(this.options.incomingStore=k.incomingStore,this.options.outgoingStore=k.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=j:j(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(k=>{this.outgoing[k].volatile&&typeof this.outgoing[k].cb=="function"&&(this.outgoing[k].cb(new Error("Connection closed")),delete this.outgoing[k])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(k=>{typeof this.outgoing[k].cb=="function"&&(this.outgoing[k].cb(new Error("Connection closed")),delete this.outgoing[k])}))}_removeTopicAliasAndRecoverTopicName(k){let j;k.properties&&(j=k.properties.topicAlias);let U=k.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",j,U),U.length===0){if(typeof j>"u")return new Error("Unregistered Topic Alias");if(U=this.topicAliasSend.getTopicByAlias(j),typeof U>"u")return new Error("Unregistered Topic Alias");k.topic=U}j&&delete k.properties.topicAlias}_checkDisconnecting(k){return this.disconnecting&&(k&&k!==this.noop?k(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(k,j,U={}){if(j&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",j)),this.log("_cleanUp :: forced? %s",k),k)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let $={cmd:"disconnect",...U};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket($,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),A(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),j&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",j),j())}_storeAndSend(k,j,U){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",k.cmd);let $=k,N;if($.cmd==="publish"&&($=(0,c.default)(k),N=this._removeTopicAliasAndRecoverTopicName($),N))return j&&j(N);this.outgoingStore.put($,Z=>{if(Z)return j&&j(Z);U(),this._writePacket(k,j)})}_applyTopicAlias(k){if(this.options.protocolVersion===5&&k.cmd==="publish"){let j;k.properties&&(j=k.properties.topicAlias);let U=k.topic.toString();if(this.topicAliasSend)if(j){if(U.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",U,j),!this.topicAliasSend.put(U,j)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",U,j),new Error("Sending Topic Alias out of range")}else U.length!==0&&(this.options.autoAssignTopicAlias?(j=this.topicAliasSend.getAliasByTopic(U),j?(k.topic="",k.properties={...k.properties,topicAlias:j},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",U,j)):(j=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(U,j),k.properties={...k.properties,topicAlias:j},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",U,j))):this.options.autoUseTopicAlias&&(j=this.topicAliasSend.getAliasByTopic(U),j&&(k.topic="",k.properties={...k.properties,topicAlias:j},this.log("applyTopicAlias :: auto use topic: %s - alias: %d",U,j))));else if(j)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",U,j),new Error("Sending Topic Alias out of range")}}_noop(k){this.log("noop ::",k)}_writePacket(k,j){this.log("_writePacket :: packet: %O",k),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",k),this.log("_writePacket :: writing to stream");let U=a.default.writeToStream(k,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",U),!U&&j&&j!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",j)):j&&(this.log("_writePacket :: invoking cb"),j())}_sendPacket(k,j,U,$){this.log("_sendPacket :: (%s) :: start",this.options.clientId),U=U||this.noop,j=j||this.noop;let N=this._applyTopicAlias(k);if(N){j(N);return}if(!this.connected){if(k.cmd==="auth"){this._writePacket(k,j);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(k,j,U);return}if($){this._writePacket(k,j);return}switch(k.cmd){case"publish":break;case"pubrel":this._storeAndSend(k,j,U);return;default:this._writePacket(k,j);return}switch(k.qos){case 2:case 1:this._storeAndSend(k,j,U);break;case 0:default:this._writePacket(k,j);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(k,j,U){this.log("_storePacket :: packet: %o",k),this.log("_storePacket :: cb? %s",!!j),U=U||this.noop;let $=k;if($.cmd==="publish"){$=(0,c.default)(k);let Z=this._removeTopicAliasAndRecoverTopicName($);if(Z)return j&&j(Z)}let N=$.qos||0;N===0&&this.queueQoSZero||$.cmd!=="publish"?this.queue.push({packet:$,cb:j}):N>0?(j=this.outgoing[$.messageId]?this.outgoing[$.messageId].cb:null,this.outgoingStore.put($,Z=>{if(Z)return j&&j(Z);U()})):j&&j(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new I.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(k=!1){this.keepaliveManager&&this.options.keepalive&&(k||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let k=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&k.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let j=0;j<k.length;j++){let U={};U[k[j]]=this._resubscribeTopics[k[j]],U.resubscribe=!0,this.subscribe(U,{properties:U[k[j]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(k){if(this.disconnected){this.emit("connect",k);return}this.connackPacket=k,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let j=()=>{let U=this.outgoingStore.createStream(),$=()=>{U.destroy(),U=null,this._flushStoreProcessingQueue(),N()},N=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",$),U.on("error",re=>{N(),this._flushStoreProcessingQueue(),this.removeListener("close",$),this.emit("error",re)});let Z=()=>{if(!U)return;let re=U.read(1),ie;if(!re){U.once("readable",Z);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[re.messageId]){Z();return}!this.disconnecting&&!this.reconnectTimer?(ie=this.outgoing[re.messageId]?this.outgoing[re.messageId].cb:null,this.outgoing[re.messageId]={volatile:!1,cb(X,ae){ie&&ie(X,ae),Z()}},this._packetIdsDuringStoreProcessing[re.messageId]=!0,this.messageIdProvider.register(re.messageId)?this._sendPacket(re,void 0,void 0,!0):this.log("messageId: %d has already used.",re.messageId)):U.destroy&&U.destroy()};U.on("end",()=>{let re=!0;for(let ie in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[ie]){re=!1;break}this.removeListener("close",$),re?(N(),this._invokeAllStoreProcessingQueue(),this.emit("connect",k)):j()}),Z()};j()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let k=this._storeProcessingQueue[0];if(k&&k.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let k of this._storeProcessingQueue)k.cbStorePut&&k.cbStorePut(new Error("Connection closed")),k.callback&&k.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(k,j){delete this.outgoing[k],this.outgoingStore.del({messageId:k},(U,$)=>{j(U,$),this.messageIdProvider.deallocate(k),this._invokeStoreProcessingQueue()})}},rt(T,"VERSION",w.MQTTJS_VERSION),T);e.default=M}),YQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=l6(),n=class{constructor(){rt(this,"numberAllocator");rt(this,"lastId");this.numberAllocator=new t.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(o){return this.numberAllocator.use(o)}deallocate(o){this.numberAllocator.free(o)}clear(){this.numberAllocator.clear()}};e.default=n});function VQ(){if(hA)return bd;hA=!0;let e=2147483647,t=36,n=1,o=26,s=38,a=700,l=72,c=128,h="-",f=/^xn--/,p=/[^\0-\x7F]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=t-n,w=Math.floor,F=String.fromCharCode;function I(U){throw new RangeError(g[U])}function R(U,$){let N=[],Z=U.length;for(;Z--;)N[Z]=$(U[Z]);return N}function A(U,$){let N=U.split("@"),Z="";N.length>1&&(Z=N[0]+"@",U=N[1]),U=U.replace(y,".");let re=U.split("."),ie=R(re,$).join(".");return Z+ie}function E(U){let $=[],N=0,Z=U.length;for(;N<Z;){let re=U.charCodeAt(N++);if(re>=55296&&re<=56319&&N<Z){let ie=U.charCodeAt(N++);(ie&64512)==56320?$.push(((re&1023)<<10)+(ie&1023)+65536):($.push(re),N--)}else $.push(re)}return $}let M=U=>String.fromCodePoint(...U),T=function(U){return U>=48&&U<58?26+(U-48):U>=65&&U<91?U-65:U>=97&&U<123?U-97:t},z=function(U,$){return U+22+75*(U<26)-(($!=0)<<5)},L=function(U,$,N){let Z=0;for(U=N?w(U/a):U>>1,U+=w(U/$);U>b*o>>1;Z+=t)U=w(U/b);return w(Z+(b+1)*U/(U+s))},k=function(U){let $=[],N=U.length,Z=0,re=c,ie=l,X=U.lastIndexOf(h);X<0&&(X=0);for(let ae=0;ae<X;++ae)U.charCodeAt(ae)>=128&&I("not-basic"),$.push(U.charCodeAt(ae));for(let ae=X>0?X+1:0;ae<N;){let ye=Z;for(let ee=1,G=t;;G+=t){ae>=N&&I("invalid-input");let Q=T(U.charCodeAt(ae++));Q>=t&&I("invalid-input"),Q>w((e-Z)/ee)&&I("overflow"),Z+=Q*ee;let K=G<=ie?n:G>=ie+o?o:G-ie;if(Q<K)break;let W=t-K;ee>w(e/W)&&I("overflow"),ee*=W}let le=$.length+1;ie=L(Z-ye,le,ye==0),w(Z/le)>e-re&&I("overflow"),re+=w(Z/le),Z%=le,$.splice(Z++,0,re)}return String.fromCodePoint(...$)},j=function(U){let $=[];U=E(U);let N=U.length,Z=c,re=0,ie=l;for(let ye of U)ye<128&&$.push(F(ye));let X=$.length,ae=X;for(X&&$.push(h);ae<N;){let ye=e;for(let ee of U)ee>=Z&&ee<ye&&(ye=ee);let le=ae+1;ye-Z>w((e-re)/le)&&I("overflow"),re+=(ye-Z)*le,Z=ye;for(let ee of U)if(ee<Z&&++re>e&&I("overflow"),ee===Z){let G=re;for(let Q=t;;Q+=t){let K=Q<=ie?n:Q>=ie+o?o:Q-ie;if(G<K)break;let W=G-K,q=t-K;$.push(F(z(K+W%q,0))),G=w(W/q)}$.push(F(z(G,0))),ie=L(re,le,ae===X),re=0,++ae}++re,++Z}return $.join("")};return bd={version:"2.3.1",ucs2:{decode:E,encode:M},decode:k,encode:j,toASCII:function(U){return A(U,function($){return p.test($)?"xn--"+j($):$})},toUnicode:function(U){return A(U,function($){return f.test($)?k($.slice(4).toLowerCase()):$})}},bd}var bd,hA,Cs,WQ=Ln(()=>{Pe(),Le(),ke(),bd={},hA=!1,Cs=VQ(),Cs.decode,Cs.encode,Cs.toASCII,Cs.toUnicode,Cs.ucs2,Cs.version});function XQ(){return pA||(pA=!0,dA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),dA}function JQ(){return gA||(gA=!0,yA=Error),yA}function ZQ(){return bA||(bA=!0,mA=EvalError),mA}function eG(){return wA||(wA=!0,AA=RangeError),AA}function tG(){return xA||(xA=!0,vA=ReferenceError),vA}function b6(){return SA||(SA=!0,EA=SyntaxError),EA}function Rf(){return _A||(_A=!0,IA=TypeError),IA}function rG(){return FA||(FA=!0,CA=URIError),CA}function nG(){if(OA)return Ad;OA=!0;var e=typeof Symbol<"u"&&Symbol,t=XQ();return Ad=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Ad}function iG(){if(TA)return wd;TA=!0;var e={__proto__:null,foo:{}},t=Object;return wd=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},wd}function oG(){if(BA)return vd;BA=!0;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,o="[object Function]",s=function(c,h){for(var f=[],p=0;p<c.length;p+=1)f[p]=c[p];for(var y=0;y<h.length;y+=1)f[y+c.length]=h[y];return f},a=function(c,h){for(var f=[],p=h,y=0;p<c.length;p+=1,y+=1)f[y]=c[p];return f},l=function(c,h){for(var f="",p=0;p<c.length;p+=1)f+=c[p],p+1<c.length&&(f+=h);return f};return vd=function(c){var h=this;if(typeof h!="function"||t.apply(h)!==o)throw new TypeError(e+h);for(var f=a(arguments,1),p,y=function(){if(this instanceof p){var I=h.apply(this,s(f,arguments));return Object(I)===I?I:this}return h.apply(c,s(f,arguments))},g=n(0,h.length-f.length),b=[],w=0;w<g;w++)b[w]="$"+w;if(p=Function("binder","return function ("+l(b,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var F=function(){};F.prototype=h.prototype,p.prototype=new F,F.prototype=null}return p},vd}function Rv(){if(RA)return xd;RA=!0;var e=oG();return xd=Function.prototype.bind||e,xd}function sG(){if(MA)return Ed;MA=!0;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Rv();return Ed=n.call(e,t),Ed}function hl(){if(jA)return Sd;jA=!0;var e,t=JQ(),n=ZQ(),o=eG(),s=tG(),a=b6(),l=Rf(),c=rG(),h=Function,f=function(ae){try{return h('"use strict"; return ('+ae+").constructor;")()}catch{}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch{p=null}var y=function(){throw new l},g=p?(function(){try{return arguments.callee,y}catch{try{return p(arguments,"callee").get}catch{return y}}})():y,b=nG()(),w=iG()(),F=Object.getPrototypeOf||(w?function(ae){return ae.__proto__}:null),I={},R=typeof Uint8Array>"u"||!F?e:F(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":b&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&F?F(""[Symbol.iterator]()):e,"%Symbol%":b?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":g,"%TypedArray%":R,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(F)try{null.error}catch(ae){var E=F(F(ae));A["%Error.prototype%"]=E}var M=function ae(ye){var le;if(ye==="%AsyncFunction%")le=f("async function () {}");else if(ye==="%GeneratorFunction%")le=f("function* () {}");else if(ye==="%AsyncGeneratorFunction%")le=f("async function* () {}");else if(ye==="%AsyncGenerator%"){var ee=ae("%AsyncGeneratorFunction%");ee&&(le=ee.prototype)}else if(ye==="%AsyncIteratorPrototype%"){var G=ae("%AsyncGenerator%");G&&F&&(le=F(G.prototype))}return A[ye]=le,le},T={__proto__:null,"%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"]},z=Rv(),L=sG(),k=z.call(Function.call,Array.prototype.concat),j=z.call(Function.apply,Array.prototype.splice),U=z.call(Function.call,String.prototype.replace),$=z.call(Function.call,String.prototype.slice),N=z.call(Function.call,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ie=function(ae){var ye=$(ae,0,1),le=$(ae,-1);if(ye==="%"&&le!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(le==="%"&&ye!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ee=[];return U(ae,Z,function(G,Q,K,W){ee[ee.length]=K?U(W,re,"$1"):Q||G}),ee},X=function(ae,ye){var le=ae,ee;if(L(T,le)&&(ee=T[le],le="%"+ee[0]+"%"),L(A,le)){var G=A[le];if(G===I&&(G=M(le)),typeof G>"u"&&!ye)throw new l("intrinsic "+ae+" exists, but is not available. Please file an issue!");return{alias:ee,name:le,value:G}}throw new a("intrinsic "+ae+" does not exist!")};return Sd=function(ae,ye){if(typeof ae!="string"||ae.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ye!="boolean")throw new l('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,ae)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var le=ie(ae),ee=le.length>0?le[0]:"",G=X("%"+ee+"%",ye),Q=G.name,K=G.value,W=!1,q=G.alias;q&&(ee=q[0],j(le,k([0,1],q)));for(var fe=1,ue=!0;fe<le.length;fe+=1){var ne=le[fe],J=$(ne,0,1),O=$(ne,-1);if((J==='"'||J==="'"||J==="`"||O==='"'||O==="'"||O==="`")&&J!==O)throw new a("property names with quotes must have matching quotes");if((ne==="constructor"||!ue)&&(W=!0),ee+="."+ne,Q="%"+ee+"%",L(A,Q))K=A[Q];else if(K!=null){if(!(ne in K)){if(!ye)throw new l("base intrinsic for "+ae+" exists, but the property is not available.");return}if(p&&fe+1>=le.length){var H=p(K,ne);ue=!!H,ue&&"get"in H&&!("originalValue"in H.get)?K=H.get:K=K[ne]}else ue=L(K,ne),K=K[ne];ue&&!W&&(A[Q]=K)}}return K},Sd}function Mv(){if(UA)return Id;UA=!0;var e=hl(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Id=t,Id}function A6(){if(NA)return _d;NA=!0;var e=hl(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return _d=t,_d}function aG(){if(DA)return Cd;DA=!0;var e=Mv(),t=b6(),n=Rf(),o=A6();return Cd=function(s,a,l){if(!s||typeof s!="object"&&typeof s!="function")throw new n("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!o&&o(s,a);if(e)e(s,a,{configurable:f===null&&y?y.configurable:!f,enumerable:c===null&&y?y.enumerable:!c,value:l,writable:h===null&&y?y.writable:!h});else if(p||!c&&!h&&!f)s[a]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Cd}function uG(){if(PA)return Fd;PA=!0;var e=Mv(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Fd=t,Fd}function lG(){if(kA)return Od;kA=!0;var e=hl(),t=aG(),n=uG()(),o=A6(),s=Rf(),a=e("%Math.floor%");return Od=function(l,c){if(typeof l!="function")throw new s("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||a(c)!==c)throw new s("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],f=!0,p=!0;if("length"in l&&o){var y=o(l,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(p=!1)}return(f||p||!h)&&(n?t(l,"length",c,!0,!0):t(l,"length",c)),l},Od}function cG(){if(LA)return Su;LA=!0;var e=Rv(),t=hl(),n=lG(),o=Rf(),s=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(a,s),c=Mv(),h=t("%Math.max%");Su=function(p){if(typeof p!="function")throw new o("a function is required");var y=l(e,a,arguments);return n(y,1+h(0,p.length-(arguments.length-1)),!0)};var f=function(){return l(e,s,arguments)};return c?c(Su,"apply",{value:f}):Su.apply=f,Su}function fG(){if($A)return Td;$A=!0;var e=hl(),t=cG(),n=t(e("String.prototype.indexOf"));return Td=function(o,s){var a=e(o,!!s);return typeof a=="function"&&n(o,".prototype.")>-1?t(a):a},Td}var dA,pA,yA,gA,mA,bA,AA,wA,vA,xA,EA,SA,IA,_A,CA,FA,Ad,OA,wd,TA,vd,BA,xd,RA,Ed,MA,Sd,jA,Id,UA,_d,NA,Cd,DA,Fd,PA,Od,kA,Su,LA,Td,$A,hG=Ln(()=>{Pe(),Le(),ke(),dA={},pA=!1,yA={},gA=!1,mA={},bA=!1,AA={},wA=!1,vA={},xA=!1,EA={},SA=!1,IA={},_A=!1,CA={},FA=!1,Ad={},OA=!1,wd={},TA=!1,vd={},BA=!1,xd={},RA=!1,Ed={},MA=!1,Sd={},jA=!1,Id={},UA=!1,_d={},NA=!1,Cd={},DA=!1,Fd={},PA=!1,Od={},kA=!1,Su={},LA=!1,Td={},$A=!1});function jv(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function dG(){!Aa||!ya||(Aa=!1,ya.length?Vi=ya.concat(Vi):Ec=-1,Vi.length&&w6())}function w6(){if(!Aa){var e=setTimeout(dG,0);Aa=!0;for(var t=Vi.length;t;){for(ya=Vi,Vi=[];++Ec<t;)ya&&ya[Ec].run();Ec=-1,t=Vi.length}ya=null,Aa=!1,clearTimeout(e)}}function pG(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Vi.push(new v6(e,t)),Vi.length===1&&!Aa&&setTimeout(w6,0)}function v6(e,t){this.fun=e,this.array=t}function fn(){}function yG(e){jv("_linkedBinding")}function gG(e){jv("dlopen")}function mG(){return[]}function bG(){return[]}function AG(e,t){if(!e)throw new Error(t||"assertion error")}function wG(){return!1}function vG(){return Mo.now()/1e3}function db(e){var t=Math.floor((Date.now()-Mo.now())*.001),n=Mo.now()*.001,o=Math.floor(n)+t,s=Math.floor(n%1*1e9);return e&&(o=o-e[0],s=s-e[1],s<0&&(o--,s+=Bd)),[o,s]}function xs(){return Uv}function xG(e){return[]}var Vi,Aa,ya,Ec,jC,UC,NC,DC,PC,kC,LC,$C,zC,qC,HC,QC,GC,KC,YC,VC,WC,XC,JC,ZC,eF,sd,tF,rF,nF,iF,oF,sF,aF,uF,lF,cF,fF,hF,dF,pF,yF,gF,mF,bF,AF,wF,vF,xF,EF,SF,IF,Mo,pb,Bd,_F,CF,FF,OF,TF,BF,RF,MF,jF,UF,NF,Uv,x6=Ln(()=>{Pe(),Le(),ke(),Vi=[],Aa=!1,Ec=-1,v6.prototype.run=function(){this.fun.apply(null,this.array)},jC="browser",UC="x64",NC="browser",DC={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},PC=["/usr/bin/node"],kC=[],LC="v16.8.0",$C={},zC=function(e,t){console.warn((t?t+": ":"")+e)},qC=function(e){jv("binding")},HC=function(e){return 0},QC=function(){return"/"},GC=function(e){},KC={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},YC=fn,VC=[],WC={},XC=!1,JC={},ZC=fn,eF=fn,sd=function(){return{}},tF=sd,rF=sd,nF=fn,iF=fn,oF=fn,sF={},aF={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},uF=fn,lF=fn,cF=fn,fF=fn,hF=fn,dF=fn,pF=fn,yF=void 0,gF=void 0,mF=void 0,bF=fn,AF=2,wF=1,vF="/bin/usr/node",xF=9229,EF="node",SF=[],IF=fn,Mo={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Mo.now===void 0&&(pb=Date.now(),Mo.timing&&Mo.timing.navigationStart&&(pb=Mo.timing.navigationStart),Mo.now=()=>Date.now()-pb),Bd=1e9,db.bigint=function(e){var t=db(e);return typeof BigInt>"u"?t[0]*Bd+t[1]:BigInt(t[0]*Bd)+BigInt(t[1])},_F=10,CF={},FF=0,OF=xs,TF=xs,BF=xs,RF=xs,MF=xs,jF=fn,UF=xs,NF=xs,Uv={version:LC,versions:$C,arch:UC,platform:NC,release:KC,_rawDebug:YC,moduleLoadList:VC,binding:qC,_linkedBinding:yG,_events:CF,_eventsCount:FF,_maxListeners:_F,on:xs,addListener:OF,once:TF,off:BF,removeListener:RF,removeAllListeners:MF,emit:jF,prependListener:UF,prependOnceListener:NF,listeners:xG,domain:WC,_exiting:XC,config:JC,dlopen:gG,uptime:vG,_getActiveRequests:mG,_getActiveHandles:bG,reallyExit:ZC,_kill:eF,cpuUsage:sd,resourceUsage:tF,memoryUsage:rF,kill:nF,exit:iF,openStdin:oF,allowedNodeEnvironmentFlags:sF,assert:AG,features:aF,_fatalExceptions:uF,setUncaughtExceptionCaptureCallback:lF,hasUncaughtExceptionCaptureCallback:wG,emitWarning:zC,nextTick:pG,_tickCallback:cF,_debugProcess:fF,_debugEnd:hF,_startProfilerIdleNotifier:dF,_stopProfilerIdleNotifier:pF,stdout:yF,stdin:mF,stderr:gF,abort:bF,umask:HC,chdir:GC,cwd:QC,env:DC,title:jC,argv:PC,execArgv:kC,pid:AF,ppid:wF,execPath:vF,debugPort:xF,hrtime:db,argv0:EF,_preload_modules:SF,setSourceMapsEnabled:IF}});function EG(){if(zA)return Rd;zA=!0;var e=Uv;function t(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,l){for(var c="",h=0,f=-1,p=0,y,g=0;g<=a.length;++g){if(g<a.length)y=a.charCodeAt(g);else{if(y===47)break;y=47}if(y===47){if(!(f===g-1||p===1))if(f!==g-1&&p===2){if(c.length<2||h!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var b=c.lastIndexOf("/");if(b!==c.length-1){b===-1?(c="",h=0):(c=c.slice(0,b),h=c.length-1-c.lastIndexOf("/")),f=g,p=0;continue}}else if(c.length===2||c.length===1){c="",h=0,f=g,p=0;continue}}l&&(c.length>0?c+="/..":c="..",h=2)}else c.length>0?c+="/"+a.slice(f+1,g):c=a.slice(f+1,g),h=g-f-1;f=g,p=0}else y===46&&p!==-1?++p:p=-1}return c}function o(a,l){var c=l.dir||l.root,h=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+h:c+a+h:h}var s={resolve:function(){for(var a="",l=!1,c,h=arguments.length-1;h>=-1&&!l;h--){var f;h>=0?f=arguments[h]:(c===void 0&&(c=e.cwd()),f=c),t(f),f.length!==0&&(a=f+"/"+a,l=f.charCodeAt(0)===47)}return a=n(a,!l),l?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(a){if(t(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return a=n(a,!l),a.length===0&&!l&&(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return t(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];t(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":s.normalize(a)},relative:function(a,l){if(t(a),t(l),a===l||(a=s.resolve(a),l=s.resolve(l),a===l))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var h=a.length,f=h-c,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var y=l.length,g=y-p,b=f<g?f:g,w=-1,F=0;F<=b;++F){if(F===b){if(g>b){if(l.charCodeAt(p+F)===47)return l.slice(p+F+1);if(F===0)return l.slice(p+F)}else f>b&&(a.charCodeAt(c+F)===47?w=F:F===0&&(w=0));break}var I=a.charCodeAt(c+F),R=l.charCodeAt(p+F);if(I!==R)break;I===47&&(w=F)}var A="";for(F=c+w+1;F<=h;++F)(F===h||a.charCodeAt(F)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+l.slice(p+w):(p+=w,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(a){return a},dirname:function(a){if(t(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,f=!0,p=a.length-1;p>=1;--p)if(l=a.charCodeAt(p),l===47){if(!f){h=p;break}}else f=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');t(a);var c=0,h=-1,f=!0,p;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var y=l.length-1,g=-1;for(p=a.length-1;p>=0;--p){var b=a.charCodeAt(p);if(b===47){if(!f){c=p+1;break}}else g===-1&&(f=!1,g=p+1),y>=0&&(b===l.charCodeAt(y)?--y===-1&&(h=p):(y=-1,h=g))}return c===h?h=g:h===-1&&(h=a.length),a.slice(c,h)}else{for(p=a.length-1;p>=0;--p)if(a.charCodeAt(p)===47){if(!f){c=p+1;break}}else h===-1&&(f=!1,h=p+1);return h===-1?"":a.slice(c,h)}},extname:function(a){t(a);for(var l=-1,c=0,h=-1,f=!0,p=0,y=a.length-1;y>=0;--y){var g=a.charCodeAt(y);if(g===47){if(!f){c=y+1;break}continue}h===-1&&(f=!1,h=y+1),g===46?l===-1?l=y:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||h===-1||p===0||p===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return o("/",a)},parse:function(a){t(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c=a.charCodeAt(0),h=c===47,f;h?(l.root="/",f=1):f=0;for(var p=-1,y=0,g=-1,b=!0,w=a.length-1,F=0;w>=f;--w){if(c=a.charCodeAt(w),c===47){if(!b){y=w+1;break}continue}g===-1&&(b=!1,g=w+1),c===46?p===-1?p=w:F!==1&&(F=1):p!==-1&&(F=-1)}return p===-1||g===-1||F===0||F===1&&p===g-1&&p===y+1?g!==-1&&(y===0&&h?l.base=l.name=a.slice(1,g):l.base=l.name=a.slice(y,g)):(y===0&&h?(l.name=a.slice(1,p),l.base=a.slice(1,g)):(l.name=a.slice(y,p),l.base=a.slice(y,g)),l.ext=a.slice(p,g)),y>0?l.dir=a.slice(0,y-1):h&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return s.posix=s,Rd=s,Rd}var Rd,zA,qA,SG=Ln(()=>{Pe(),Le(),ke(),x6(),Rd={},zA=!1,qA=EG()}),E6={};ll(E6,{URL:()=>M6,Url:()=>F6,default:()=>hn,fileURLToPath:()=>I6,format:()=>O6,parse:()=>R6,pathToFileURL:()=>_6,resolve:()=>T6,resolveObject:()=>B6});function IG(){if(HA)return Md;HA=!0;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,o=e&&Map.prototype.forEach,s=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&a&&typeof a.get=="function"?a.get:null,c=s&&Set.prototype.forEach,h=typeof WeakMap=="function"&&WeakMap.prototype,f=h?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,y=p?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,b=g?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,F=Object.prototype.toString,I=Function.prototype.toString,R=String.prototype.match,A=String.prototype.slice,E=String.prototype.replace,M=String.prototype.toUpperCase,T=String.prototype.toLowerCase,z=RegExp.prototype.test,L=Array.prototype.concat,k=Array.prototype.join,j=Array.prototype.slice,U=Math.floor,$=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,re=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ie=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===re||!0)?Symbol.toStringTag:null,X=Object.prototype.propertyIsEnumerable,ae=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(we){return we.__proto__}:null);function ye(we,Ie){if(we===1/0||we===-1/0||we!==we||we&&we>-1e3&&we<1e3||z.call(/e/,Ie))return Ie;var He=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof we=="number"){var Ke=we<0?-U(-we):U(we);if(Ke!==we){var We=String(Ke),et=A.call(Ie,We.length+1);return E.call(We,He,"$&_")+"."+E.call(E.call(et,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(Ie,He,"$&_")}var le=C6,ee=le.custom,G=H(ee)?ee:null;Md=function we(Ie,He,Ke,We){var et=He||{};if(pe(et,"quoteStyle")&&et.quoteStyle!=="single"&&et.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(pe(et,"maxStringLength")&&(typeof et.maxStringLength=="number"?et.maxStringLength<0&&et.maxStringLength!==1/0:et.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var gt=pe(et,"customInspect")?et.customInspect:!0;if(typeof gt!="boolean"&&gt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(pe(et,"indent")&&et.indent!==null&&et.indent!==" "&&!(parseInt(et.indent,10)===et.indent&&et.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(pe(et,"numericSeparator")&&typeof et.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bt=et.numericSeparator;if(typeof Ie>"u")return"undefined";if(Ie===null)return"null";if(typeof Ie=="boolean")return Ie?"true":"false";if(typeof Ie=="string")return de(Ie,et);if(typeof Ie=="number"){if(Ie===0)return 1/0/Ie>0?"0":"-0";var lt=String(Ie);return bt?ye(Ie,lt):lt}if(typeof Ie=="bigint"){var yt=String(Ie)+"n";return bt?ye(Ie,yt):yt}var tt=typeof et.depth>"u"?5:et.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=tt&&tt>0&&typeof Ie=="object")return W(Ie)?"[Array]":"[Object]";var ft=me(et,Ke);if(typeof We>"u")We=[];else if(v(We,Ie)>=0)return"[Circular]";function dt(jr,gn,xn){if(gn&&(We=j.call(We),We.push(gn)),xn){var kr={depth:et.depth};return pe(et,"quoteStyle")&&(kr.quoteStyle=et.quoteStyle),we(jr,kr,Ke+1,We)}return we(jr,et,Ke+1,We)}if(typeof Ie=="function"&&!fe(Ie)){var At=_(Ie),Jt=Ce(Ie,dt);return"[Function"+(At?": "+At:" (anonymous)")+"]"+(Jt.length>0?" { "+k.call(Jt,", ")+" }":"")}if(H(Ie)){var Ar=re?E.call(String(Ie),/^(Symbol\(.*\))_[^)]*$/,"$1"):Z.call(Ie);return typeof Ie=="object"&&!re?x(Ar):Ar}if(Be(Ie)){for(var be="<"+T.call(String(Ie.nodeName)),_e=Ie.attributes||[],Ye=0;Ye<_e.length;Ye++)be+=" "+_e[Ye].name+"="+Q(K(_e[Ye].value),"double",et);return be+=">",Ie.childNodes&&Ie.childNodes.length&&(be+="..."),be+="</"+T.call(String(Ie.nodeName))+">",be}if(W(Ie)){if(Ie.length===0)return"[]";var Ze=Ce(Ie,dt);return ft&&!oe(Ze)?"["+xe(Ze,ft)+"]":"[ "+k.call(Ze,", ")+" ]"}if(ue(Ie)){var st=Ce(Ie,dt);return!("cause"in Error.prototype)&&"cause"in Ie&&!X.call(Ie,"cause")?"{ ["+String(Ie)+"] "+k.call(L.call("[cause]: "+dt(Ie.cause),st),", ")+" }":st.length===0?"["+String(Ie)+"]":"{ ["+String(Ie)+"] "+k.call(st,", ")+" }"}if(typeof Ie=="object"&&gt){if(G&&typeof Ie[G]=="function"&&le)return le(Ie,{depth:tt-Ke});if(gt!=="symbol"&&typeof Ie.inspect=="function")return Ie.inspect()}if(C(Ie)){var qt=[];return o&&o.call(Ie,function(jr,gn){qt.push(dt(gn,Ie,!0)+" => "+dt(jr,Ie))}),D("Map",n.call(Ie),qt,ft)}if(ce(Ie)){var rr=[];return c&&c.call(Ie,function(jr){rr.push(dt(jr,Ie))}),D("Set",l.call(Ie),rr,ft)}if(P(Ie))return B("WeakMap");if(Se(Ie))return B("WeakSet");if(he(Ie))return B("WeakRef");if(J(Ie))return x(dt(Number(Ie)));if(Y(Ie))return x(dt($.call(Ie)));if(O(Ie))return x(w.call(Ie));if(ne(Ie))return x(dt(String(Ie)));if(typeof window<"u"&&Ie===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ie===globalThis||typeof jd<"u"&&Ie===jd)return"{ [object globalThis] }";if(!q(Ie)&&!fe(Ie)){var Br=Ce(Ie,dt),$n=ae?ae(Ie)===Object.prototype:Ie instanceof Object||Ie.constructor===Object,Rr=Ie instanceof Object?"":"null prototype",Ht=!$n&&ie&&Object(Ie)===Ie&&ie in Ie?A.call(te(Ie),8,-1):Rr?"Object":"",nr=$n||typeof Ie.constructor!="function"?"":Ie.constructor.name?Ie.constructor.name+" ":"",Mr=nr+(Ht||Rr?"["+k.call(L.call([],Ht||[],Rr||[]),": ")+"] ":"");return Br.length===0?Mr+"{}":ft?Mr+"{"+xe(Br,ft)+"}":Mr+"{ "+k.call(Br,", ")+" }"}return String(Ie)};function Q(we,Ie,He){var Ke=(He.quoteStyle||Ie)==="double"?'"':"'";return Ke+we+Ke}function K(we){return E.call(String(we),/"/g,"&quot;")}function W(we){return te(we)==="[object Array]"&&(!ie||!(typeof we=="object"&&ie in we))}function q(we){return te(we)==="[object Date]"&&(!ie||!(typeof we=="object"&&ie in we))}function fe(we){return te(we)==="[object RegExp]"&&(!ie||!(typeof we=="object"&&ie in we))}function ue(we){return te(we)==="[object Error]"&&(!ie||!(typeof we=="object"&&ie in we))}function ne(we){return te(we)==="[object String]"&&(!ie||!(typeof we=="object"&&ie in we))}function J(we){return te(we)==="[object Number]"&&(!ie||!(typeof we=="object"&&ie in we))}function O(we){return te(we)==="[object Boolean]"&&(!ie||!(typeof we=="object"&&ie in we))}function H(we){if(re)return we&&typeof we=="object"&&we instanceof Symbol;if(typeof we=="symbol")return!0;if(!we||typeof we!="object"||!Z)return!1;try{return Z.call(we),!0}catch{}return!1}function Y(we){if(!we||typeof we!="object"||!$)return!1;try{return $.call(we),!0}catch{}return!1}var se=Object.prototype.hasOwnProperty||function(we){return we in(this||jd)};function pe(we,Ie){return se.call(we,Ie)}function te(we){return F.call(we)}function _(we){if(we.name)return we.name;var Ie=R.call(I.call(we),/^function\s*([\w$]+)/);return Ie?Ie[1]:null}function v(we,Ie){if(we.indexOf)return we.indexOf(Ie);for(var He=0,Ke=we.length;He<Ke;He++)if(we[He]===Ie)return He;return-1}function C(we){if(!n||!we||typeof we!="object")return!1;try{n.call(we);try{l.call(we)}catch{return!0}return we instanceof Map}catch{}return!1}function P(we){if(!f||!we||typeof we!="object")return!1;try{f.call(we,f);try{y.call(we,y)}catch{return!0}return we instanceof WeakMap}catch{}return!1}function he(we){if(!b||!we||typeof we!="object")return!1;try{return b.call(we),!0}catch{}return!1}function ce(we){if(!l||!we||typeof we!="object")return!1;try{l.call(we);try{n.call(we)}catch{return!0}return we instanceof Set}catch{}return!1}function Se(we){if(!y||!we||typeof we!="object")return!1;try{y.call(we,y);try{f.call(we,f)}catch{return!0}return we instanceof WeakSet}catch{}return!1}function Be(we){return!we||typeof we!="object"?!1:typeof HTMLElement<"u"&&we instanceof HTMLElement?!0:typeof we.nodeName=="string"&&typeof we.getAttribute=="function"}function de(we,Ie){if(we.length>Ie.maxStringLength){var He=we.length-Ie.maxStringLength,Ke="... "+He+" more character"+(He>1?"s":"");return de(A.call(we,0,Ie.maxStringLength),Ie)+Ke}var We=E.call(E.call(we,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ve);return Q(We,"single",Ie)}function ve(we){var Ie=we.charCodeAt(0),He={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ie];return He?"\\"+He:"\\x"+(Ie<16?"0":"")+M.call(Ie.toString(16))}function x(we){return"Object("+we+")"}function B(we){return we+" { ? }"}function D(we,Ie,He,Ke){var We=Ke?xe(He,Ke):k.call(He,", ");return we+" ("+Ie+") {"+We+"}"}function oe(we){for(var Ie=0;Ie<we.length;Ie++)if(v(we[Ie],`
156
+ `)>=0)return!1;return!0}function me(we,Ie){var He;if(we.indent===" ")He=" ";else if(typeof we.indent=="number"&&we.indent>0)He=k.call(Array(we.indent+1)," ");else return null;return{base:He,prev:k.call(Array(Ie+1),He)}}function xe(we,Ie){if(we.length===0)return"";var He=`
157
+ `+Ie.prev+Ie.base;return He+k.call(we,","+He)+`
158
+ `+Ie.prev}function Ce(we,Ie){var He=W(we),Ke=[];if(He){Ke.length=we.length;for(var We=0;We<we.length;We++)Ke[We]=pe(we,We)?Ie(we[We],we):""}var et=typeof N=="function"?N(we):[],gt;if(re){gt={};for(var bt=0;bt<et.length;bt++)gt["$"+et[bt]]=et[bt]}for(var lt in we)pe(we,lt)&&(He&&String(Number(lt))===lt&&lt<we.length||re&&gt["$"+lt]instanceof Symbol||(z.call(/[^\w$]/,lt)?Ke.push(Ie(lt,we)+": "+Ie(we[lt],we)):Ke.push(lt+": "+Ie(we[lt],we))));if(typeof N=="function")for(var yt=0;yt<et.length;yt++)X.call(we,et[yt])&&Ke.push("["+Ie(et[yt])+"]: "+Ie(we[et[yt]],we));return Ke}return Md}function _G(){if(QA)return Ud;QA=!0;var e=hl(),t=fG(),n=IG(),o=Rf(),s=e("%WeakMap%",!0),a=e("%Map%",!0),l=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),h=t("WeakMap.prototype.has",!0),f=t("Map.prototype.get",!0),p=t("Map.prototype.set",!0),y=t("Map.prototype.has",!0),g=function(I,R){for(var A=I,E;(E=A.next)!==null;A=E)if(E.key===R)return A.next=E.next,E.next=I.next,I.next=E,E},b=function(I,R){var A=g(I,R);return A&&A.value},w=function(I,R,A){var E=g(I,R);E?E.value=A:I.next={key:R,next:I.next,value:A}},F=function(I,R){return!!g(I,R)};return Ud=function(){var I,R,A,E={assert:function(M){if(!E.has(M))throw new o("Side channel does not contain "+n(M))},get:function(M){if(s&&M&&(typeof M=="object"||typeof M=="function")){if(I)return l(I,M)}else if(a){if(R)return f(R,M)}else if(A)return b(A,M)},has:function(M){if(s&&M&&(typeof M=="object"||typeof M=="function")){if(I)return h(I,M)}else if(a){if(R)return y(R,M)}else if(A)return F(A,M);return!1},set:function(M,T){s&&M&&(typeof M=="object"||typeof M=="function")?(I||(I=new s),c(I,M,T)):a?(R||(R=new a),p(R,M,T)):(A||(A={key:{},next:null}),w(A,M,T))}};return E},Ud}function Nv(){if(GA)return Nd;GA=!0;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Nd={default:n.RFC3986,formatters:{RFC1738:function(o){return e.call(o,t,"+")},RFC3986:function(o){return String(o)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Nd}function S6(){if(KA)return Dd;KA=!0;var e=Nv(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o=(function(){for(var I=[],R=0;R<256;++R)I.push("%"+((R<16?"0":"")+R.toString(16)).toUpperCase());return I})(),s=function(I){for(;I.length>1;){var R=I.pop(),A=R.obj[R.prop];if(n(A)){for(var E=[],M=0;M<A.length;++M)typeof A[M]<"u"&&E.push(A[M]);R.obj[R.prop]=E}}},a=function(I,R){for(var A=R&&R.plainObjects?Object.create(null):{},E=0;E<I.length;++E)typeof I[E]<"u"&&(A[E]=I[E]);return A},l=function I(R,A,E){if(!A)return R;if(typeof A!="object"){if(n(R))R.push(A);else if(R&&typeof R=="object")(E&&(E.plainObjects||E.allowPrototypes)||!t.call(Object.prototype,A))&&(R[A]=!0);else return[R,A];return R}if(!R||typeof R!="object")return[R].concat(A);var M=R;return n(R)&&!n(A)&&(M=a(R,E)),n(R)&&n(A)?(A.forEach(function(T,z){if(t.call(R,z)){var L=R[z];L&&typeof L=="object"&&T&&typeof T=="object"?R[z]=I(L,T,E):R.push(T)}else R[z]=T}),R):Object.keys(A).reduce(function(T,z){var L=A[z];return t.call(T,z)?T[z]=I(T[z],L,E):T[z]=L,T},M)},c=function(I,R){return Object.keys(R).reduce(function(A,E){return A[E]=R[E],A},I)},h=function(I,R,A){var E=I.replace(/\+/g," ");if(A==="iso-8859-1")return E.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(E)}catch{return E}},f=1024,p=function(I,R,A,E,M){if(I.length===0)return I;var T=I;if(typeof I=="symbol"?T=Symbol.prototype.toString.call(I):typeof I!="string"&&(T=String(I)),A==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(N){return"%26%23"+parseInt(N.slice(2),16)+"%3B"});for(var z="",L=0;L<T.length;L+=f){for(var k=T.length>=f?T.slice(L,L+f):T,j=[],U=0;U<k.length;++U){var $=k.charCodeAt(U);if($===45||$===46||$===95||$===126||$>=48&&$<=57||$>=65&&$<=90||$>=97&&$<=122||M===e.RFC1738&&($===40||$===41)){j[j.length]=k.charAt(U);continue}if($<128){j[j.length]=o[$];continue}if($<2048){j[j.length]=o[192|$>>6]+o[128|$&63];continue}if($<55296||$>=57344){j[j.length]=o[224|$>>12]+o[128|$>>6&63]+o[128|$&63];continue}U+=1,$=65536+(($&1023)<<10|k.charCodeAt(U)&1023),j[j.length]=o[240|$>>18]+o[128|$>>12&63]+o[128|$>>6&63]+o[128|$&63]}z+=j.join("")}return z},y=function(I){for(var R=[{obj:{o:I},prop:"o"}],A=[],E=0;E<R.length;++E)for(var M=R[E],T=M.obj[M.prop],z=Object.keys(T),L=0;L<z.length;++L){var k=z[L],j=T[k];typeof j=="object"&&j!==null&&A.indexOf(j)===-1&&(R.push({obj:T,prop:k}),A.push(j))}return s(R),I},g=function(I){return Object.prototype.toString.call(I)==="[object RegExp]"},b=function(I){return!I||typeof I!="object"?!1:!!(I.constructor&&I.constructor.isBuffer&&I.constructor.isBuffer(I))},w=function(I,R){return[].concat(I,R)},F=function(I,R){if(n(I)){for(var A=[],E=0;E<I.length;E+=1)A.push(R(I[E]));return A}return R(I)};return Dd={arrayToObject:a,assign:c,combine:w,compact:y,decode:h,encode:p,isBuffer:b,isRegExp:g,maybeMap:F,merge:l},Dd}function CG(){if(YA)return Pd;YA=!0;var e=_G(),t=S6(),n=Nv(),o=Object.prototype.hasOwnProperty,s={brackets:function(F){return F+"[]"},comma:"comma",indices:function(F,I){return F+"["+I+"]"},repeat:function(F){return F}},a=Array.isArray,l=Array.prototype.push,c=function(F,I){l.apply(F,a(I)?I:[I])},h=Date.prototype.toISOString,f=n.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:f,formatter:n.formatters[f],indices:!1,serializeDate:function(F){return h.call(F)},skipNulls:!1,strictNullHandling:!1},y=function(F){return typeof F=="string"||typeof F=="number"||typeof F=="boolean"||typeof F=="symbol"||typeof F=="bigint"},g={},b=function F(I,R,A,E,M,T,z,L,k,j,U,$,N,Z,re,ie,X,ae){for(var ye=I,le=ae,ee=0,G=!1;(le=le.get(g))!==void 0&&!G;){var Q=le.get(I);if(ee+=1,typeof Q<"u"){if(Q===ee)throw new RangeError("Cyclic object value");G=!0}typeof le.get(g)>"u"&&(ee=0)}if(typeof j=="function"?ye=j(R,ye):ye instanceof Date?ye=N(ye):A==="comma"&&a(ye)&&(ye=t.maybeMap(ye,function(te){return te instanceof Date?N(te):te})),ye===null){if(T)return k&&!ie?k(R,p.encoder,X,"key",Z):R;ye=""}if(y(ye)||t.isBuffer(ye)){if(k){var K=ie?R:k(R,p.encoder,X,"key",Z);return[re(K)+"="+re(k(ye,p.encoder,X,"value",Z))]}return[re(R)+"="+re(String(ye))]}var W=[];if(typeof ye>"u")return W;var q;if(A==="comma"&&a(ye))ie&&k&&(ye=t.maybeMap(ye,k)),q=[{value:ye.length>0?ye.join(",")||null:void 0}];else if(a(j))q=j;else{var fe=Object.keys(ye);q=U?fe.sort(U):fe}var ue=L?R.replace(/\./g,"%2E"):R,ne=E&&a(ye)&&ye.length===1?ue+"[]":ue;if(M&&a(ye)&&ye.length===0)return ne+"[]";for(var J=0;J<q.length;++J){var O=q[J],H=typeof O=="object"&&typeof O.value<"u"?O.value:ye[O];if(!(z&&H===null)){var Y=$&&L?O.replace(/\./g,"%2E"):O,se=a(ye)?typeof A=="function"?A(ne,Y):ne:ne+($?"."+Y:"["+Y+"]");ae.set(I,ee);var pe=e();pe.set(g,ae),c(W,F(H,se,A,E,M,T,z,L,A==="comma"&&ie&&a(ye)?null:k,j,U,$,N,Z,re,ie,X,pe))}}return W},w=function(F){if(!F)return p;if(typeof F.allowEmptyArrays<"u"&&typeof F.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof F.encodeDotInKeys<"u"&&typeof F.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(F.encoder!==null&&typeof F.encoder<"u"&&typeof F.encoder!="function")throw new TypeError("Encoder has to be a function.");var I=F.charset||p.charset;if(typeof F.charset<"u"&&F.charset!=="utf-8"&&F.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var R=n.default;if(typeof F.format<"u"){if(!o.call(n.formatters,F.format))throw new TypeError("Unknown format option provided.");R=F.format}var A=n.formatters[R],E=p.filter;(typeof F.filter=="function"||a(F.filter))&&(E=F.filter);var M;if(F.arrayFormat in s?M=F.arrayFormat:"indices"in F?M=F.indices?"indices":"repeat":M=p.arrayFormat,"commaRoundTrip"in F&&typeof F.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof F.allowDots>"u"?F.encodeDotInKeys===!0?!0:p.allowDots:!!F.allowDots;return{addQueryPrefix:typeof F.addQueryPrefix=="boolean"?F.addQueryPrefix:p.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof F.allowEmptyArrays=="boolean"?!!F.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:M,charset:I,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:p.charsetSentinel,commaRoundTrip:F.commaRoundTrip,delimiter:typeof F.delimiter>"u"?p.delimiter:F.delimiter,encode:typeof F.encode=="boolean"?F.encode:p.encode,encodeDotInKeys:typeof F.encodeDotInKeys=="boolean"?F.encodeDotInKeys:p.encodeDotInKeys,encoder:typeof F.encoder=="function"?F.encoder:p.encoder,encodeValuesOnly:typeof F.encodeValuesOnly=="boolean"?F.encodeValuesOnly:p.encodeValuesOnly,filter:E,format:R,formatter:A,serializeDate:typeof F.serializeDate=="function"?F.serializeDate:p.serializeDate,skipNulls:typeof F.skipNulls=="boolean"?F.skipNulls:p.skipNulls,sort:typeof F.sort=="function"?F.sort:null,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:p.strictNullHandling}};return Pd=function(F,I){var R=F,A=w(I),E,M;typeof A.filter=="function"?(M=A.filter,R=M("",R)):a(A.filter)&&(M=A.filter,E=M);var T=[];if(typeof R!="object"||R===null)return"";var z=s[A.arrayFormat],L=z==="comma"&&A.commaRoundTrip;E||(E=Object.keys(R)),A.sort&&E.sort(A.sort);for(var k=e(),j=0;j<E.length;++j){var U=E[j];A.skipNulls&&R[U]===null||c(T,b(R[U],U,z,L,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,k))}var $=T.join(A.delimiter),N=A.addQueryPrefix===!0?"?":"";return A.charsetSentinel&&(A.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),$.length>0?N+$:""},Pd}function FG(){if(VA)return kd;VA=!0;var e=S6(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},s=function(g){return g.replace(/&#(\d+);/g,function(b,w){return String.fromCharCode(parseInt(w,10))})},a=function(g,b){return g&&typeof g=="string"&&b.comma&&g.indexOf(",")>-1?g.split(","):g},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(g,b){var w={__proto__:null},F=b.ignoreQueryPrefix?g.replace(/^\?/,""):g;F=F.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var I=b.parameterLimit===1/0?void 0:b.parameterLimit,R=F.split(b.delimiter,I),A=-1,E,M=b.charset;if(b.charsetSentinel)for(E=0;E<R.length;++E)R[E].indexOf("utf8=")===0&&(R[E]===c?M="utf-8":R[E]===l&&(M="iso-8859-1"),A=E,E=R.length);for(E=0;E<R.length;++E)if(E!==A){var T=R[E],z=T.indexOf("]="),L=z===-1?T.indexOf("="):z+1,k,j;L===-1?(k=b.decoder(T,o.decoder,M,"key"),j=b.strictNullHandling?null:""):(k=b.decoder(T.slice(0,L),o.decoder,M,"key"),j=e.maybeMap(a(T.slice(L+1),b),function($){return b.decoder($,o.decoder,M,"value")})),j&&b.interpretNumericEntities&&M==="iso-8859-1"&&(j=s(j)),T.indexOf("[]=")>-1&&(j=n(j)?[j]:j);var U=t.call(w,k);U&&b.duplicates==="combine"?w[k]=e.combine(w[k],j):(!U||b.duplicates==="last")&&(w[k]=j)}return w},f=function(g,b,w,F){for(var I=F?b:a(b,w),R=g.length-1;R>=0;--R){var A,E=g[R];if(E==="[]"&&w.parseArrays)A=w.allowEmptyArrays&&(I===""||w.strictNullHandling&&I===null)?[]:[].concat(I);else{A=w.plainObjects?Object.create(null):{};var M=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,T=w.decodeDotInKeys?M.replace(/%2E/g,"."):M,z=parseInt(T,10);!w.parseArrays&&T===""?A={0:I}:!isNaN(z)&&E!==T&&String(z)===T&&z>=0&&w.parseArrays&&z<=w.arrayLimit?(A=[],A[z]=I):T!=="__proto__"&&(A[T]=I)}I=A}return I},p=function(g,b,w,F){if(g){var I=w.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g,R=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,E=w.depth>0&&R.exec(I),M=E?I.slice(0,E.index):I,T=[];if(M){if(!w.plainObjects&&t.call(Object.prototype,M)&&!w.allowPrototypes)return;T.push(M)}for(var z=0;w.depth>0&&(E=A.exec(I))!==null&&z<w.depth;){if(z+=1,!w.plainObjects&&t.call(Object.prototype,E[1].slice(1,-1))&&!w.allowPrototypes)return;T.push(E[1])}if(E){if(w.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+w.depth+" and strictDepth is true");T.push("["+I.slice(E.index)+"]")}return f(T,b,w,F)}},y=function(g){if(!g)return o;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=typeof g.charset>"u"?o.charset:g.charset,w=typeof g.duplicates>"u"?o.duplicates:g.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var F=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:o.allowDots:!!g.allowDots;return{allowDots:F,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:o.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:o.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:o.arrayLimit,charset:b,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:o.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:o.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:o.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:o.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:o.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:o.depth,duplicates:w,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:o.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:o.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:o.strictDepth,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:o.strictNullHandling}};return kd=function(g,b){var w=y(b);if(g===""||g===null||typeof g>"u")return w.plainObjects?Object.create(null):{};for(var F=typeof g=="string"?h(g,w):g,I=w.plainObjects?Object.create(null):{},R=Object.keys(F),A=0;A<R.length;++A){var E=R[A],M=p(E,F[E],w,typeof g=="string");I=e.merge(I,M,w)}return w.allowSparse===!0?I:e.compact(I)},kd}function OG(){if(WA)return Ld;WA=!0;var e=CG(),t=FG(),n=Nv();return Ld={formats:n,parse:t,stringify:e},Ld}function TG(){if(XA)return Fs;XA=!0;var e=Cs;function t(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r",`
159
+ `," "],l=["{","}","|","\\","^","`"].concat(a),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},I=OG();function R(T,z,L){if(T&&typeof T=="object"&&T instanceof t)return T;var k=new t;return k.parse(T,z,L),k}t.prototype.parse=function(T,z,L){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var k=T.indexOf("?"),j=k!==-1&&k<T.indexOf("#")?"?":"#",U=T.split(j),$=/\\/g;U[0]=U[0].replace($,"/"),T=U.join(j);var N=T;if(N=N.trim(),!L&&T.split("#").length===1){var Z=s.exec(N);if(Z)return this.path=N,this.href=N,this.pathname=Z[1],Z[2]?(this.search=Z[2],z?this.query=I.parse(this.search.substr(1)):this.query=this.search.substr(1)):z&&(this.search="",this.query={}),this}var re=n.exec(N);if(re){re=re[0];var ie=re.toLowerCase();this.protocol=ie,N=N.substr(re.length)}if(L||re||N.match(/^\/\/[^@/]+@[^@/]+/)){var X=N.substr(0,2)==="//";X&&!(re&&w[re])&&(N=N.substr(2),this.slashes=!0)}if(!w[re]&&(X||re&&!F[re])){for(var ae=-1,ye=0;ye<f.length;ye++){var le=N.indexOf(f[ye]);le!==-1&&(ae===-1||le<ae)&&(ae=le)}var ee,G;ae===-1?G=N.lastIndexOf("@"):G=N.lastIndexOf("@",ae),G!==-1&&(ee=N.slice(0,G),N=N.slice(G+1),this.auth=decodeURIComponent(ee)),ae=-1;for(var ye=0;ye<h.length;ye++){var le=N.indexOf(h[ye]);le!==-1&&(ae===-1||le<ae)&&(ae=le)}ae===-1&&(ae=N.length),this.host=N.slice(0,ae),N=N.slice(ae),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var K=this.hostname.split(/\./),ye=0,W=K.length;ye<W;ye++){var q=K[ye];if(q&&!q.match(y)){for(var fe="",ue=0,ne=q.length;ue<ne;ue++)q.charCodeAt(ue)>127?fe+="x":fe+=q[ue];if(!fe.match(y)){var J=K.slice(0,ye),O=K.slice(ye+1),H=q.match(g);H&&(J.push(H[1]),O.unshift(H[2])),O.length&&(N="/"+O.join(".")+N),this.hostname=J.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=e.toASCII(this.hostname));var Y=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+Y,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),N[0]!=="/"&&(N="/"+N))}if(!b[ie])for(var ye=0,W=c.length;ye<W;ye++){var pe=c[ye];if(N.indexOf(pe)!==-1){var te=encodeURIComponent(pe);te===pe&&(te=escape(pe)),N=N.split(pe).join(te)}}var _=N.indexOf("#");_!==-1&&(this.hash=N.substr(_),N=N.slice(0,_));var v=N.indexOf("?");if(v!==-1?(this.search=N.substr(v),this.query=N.substr(v+1),z&&(this.query=I.parse(this.query)),N=N.slice(0,v)):z&&(this.search="",this.query={}),N&&(this.pathname=N),F[ie]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Y=this.pathname||"",C=this.search||"";this.path=Y+C}return this.href=this.format(),this};function A(T){return typeof T=="string"&&(T=R(T)),T instanceof t?T.format():t.prototype.format.call(T)}t.prototype.format=function(){var T=this.auth||"";T&&(T=encodeURIComponent(T),T=T.replace(/%3A/i,":"),T+="@");var z=this.protocol||"",L=this.pathname||"",k=this.hash||"",j=!1,U="";this.host?j=T+this.host:this.hostname&&(j=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(j+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(U=I.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var $=this.search||U&&"?"+U||"";return z&&z.substr(-1)!==":"&&(z+=":"),this.slashes||(!z||F[z])&&j!==!1?(j="//"+(j||""),L&&L.charAt(0)!=="/"&&(L="/"+L)):j||(j=""),k&&k.charAt(0)!=="#"&&(k="#"+k),$&&$.charAt(0)!=="?"&&($="?"+$),L=L.replace(/[?#]/g,function(N){return encodeURIComponent(N)}),$=$.replace("#","%23"),z+j+L+$+k};function E(T,z){return R(T,!1,!0).resolve(z)}t.prototype.resolve=function(T){return this.resolveObject(R(T,!1,!0)).format()};function M(T,z){return T?R(T,!1,!0).resolveObject(z):z}return t.prototype.resolveObject=function(T){if(typeof T=="string"){var z=new t;z.parse(T,!1,!0),T=z}for(var L=new t,k=Object.keys(this),j=0;j<k.length;j++){var U=k[j];L[U]=this[U]}if(L.hash=T.hash,T.href==="")return L.href=L.format(),L;if(T.slashes&&!T.protocol){for(var $=Object.keys(T),N=0;N<$.length;N++){var Z=$[N];Z!=="protocol"&&(L[Z]=T[Z])}return F[L.protocol]&&L.hostname&&!L.pathname&&(L.pathname="/",L.path=L.pathname),L.href=L.format(),L}if(T.protocol&&T.protocol!==L.protocol){if(!F[T.protocol]){for(var re=Object.keys(T),ie=0;ie<re.length;ie++){var X=re[ie];L[X]=T[X]}return L.href=L.format(),L}if(L.protocol=T.protocol,!T.host&&!w[T.protocol]){for(var W=(T.pathname||"").split("/");W.length&&!(T.host=W.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),W[0]!==""&&W.unshift(""),W.length<2&&W.unshift(""),L.pathname=W.join("/")}else L.pathname=T.pathname;if(L.search=T.search,L.query=T.query,L.host=T.host||"",L.auth=T.auth,L.hostname=T.hostname||T.host,L.port=T.port,L.pathname||L.search){var ae=L.pathname||"",ye=L.search||"";L.path=ae+ye}return L.slashes=L.slashes||T.slashes,L.href=L.format(),L}var le=L.pathname&&L.pathname.charAt(0)==="/",ee=T.host||T.pathname&&T.pathname.charAt(0)==="/",G=ee||le||L.host&&T.pathname,Q=G,K=L.pathname&&L.pathname.split("/")||[],W=T.pathname&&T.pathname.split("/")||[],q=L.protocol&&!F[L.protocol];if(q&&(L.hostname="",L.port=null,L.host&&(K[0]===""?K[0]=L.host:K.unshift(L.host)),L.host="",T.protocol&&(T.hostname=null,T.port=null,T.host&&(W[0]===""?W[0]=T.host:W.unshift(T.host)),T.host=null),G=G&&(W[0]===""||K[0]==="")),ee)L.host=T.host||T.host===""?T.host:L.host,L.hostname=T.hostname||T.hostname===""?T.hostname:L.hostname,L.search=T.search,L.query=T.query,K=W;else if(W.length)K||(K=[]),K.pop(),K=K.concat(W),L.search=T.search,L.query=T.query;else if(T.search!=null){if(q){L.host=K.shift(),L.hostname=L.host;var fe=L.host&&L.host.indexOf("@")>0?L.host.split("@"):!1;fe&&(L.auth=fe.shift(),L.hostname=fe.shift(),L.host=L.hostname)}return L.search=T.search,L.query=T.query,(L.pathname!==null||L.search!==null)&&(L.path=(L.pathname?L.pathname:"")+(L.search?L.search:"")),L.href=L.format(),L}if(!K.length)return L.pathname=null,L.search?L.path="/"+L.search:L.path=null,L.href=L.format(),L;for(var ue=K.slice(-1)[0],ne=(L.host||T.host||K.length>1)&&(ue==="."||ue==="..")||ue==="",J=0,O=K.length;O>=0;O--)ue=K[O],ue==="."?K.splice(O,1):ue===".."?(K.splice(O,1),J++):J&&(K.splice(O,1),J--);if(!G&&!Q)for(;J--;J)K.unshift("..");G&&K[0]!==""&&(!K[0]||K[0].charAt(0)!=="/")&&K.unshift(""),ne&&K.join("/").substr(-1)!=="/"&&K.push("");var H=K[0]===""||K[0]&&K[0].charAt(0)==="/";if(q){L.hostname=H?"":K.length?K.shift():"",L.host=L.hostname;var fe=L.host&&L.host.indexOf("@")>0?L.host.split("@"):!1;fe&&(L.auth=fe.shift(),L.hostname=fe.shift(),L.host=L.hostname)}return G=G||L.host&&K.length,G&&!H&&K.unshift(""),K.length>0?L.pathname=K.join("/"):(L.pathname=null,L.path=null),(L.pathname!==null||L.search!==null)&&(L.path=(L.pathname?L.pathname:"")+(L.search?L.search:"")),L.auth=T.auth||L.auth,L.slashes=L.slashes||T.slashes,L.href=L.format(),L},t.prototype.parseHost=function(){var T=this.host,z=o.exec(T);z&&(z=z[0],z!==":"&&(this.port=z.substr(1)),T=T.substr(0,T.length-z.length)),T&&(this.hostname=T)},Fs.parse=R,Fs.resolve=E,Fs.resolveObject=M,Fs.format=A,Fs.Url=t,Fs}function I6(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Xd?BG(e):RG(e)}function BG(e){let t=e.hostname,n=e.pathname;for(let o=0;o<n.length;o++)if(n[o]==="%"){let s=n.codePointAt(o+2)||32;if(n[o+1]==="2"&&s===102||n[o+1]==="5"&&s===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(n=n.replace(P6,"\\"),n=decodeURIComponent(n),t!=="")return`\\\\${t}${n}`;{let o=n.codePointAt(1)|32,s=n[2];if(o<N6||o>D6||s!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return n.slice(1)}}function RG(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let t=e.pathname;for(let n=0;n<t.length;n++)if(t[n]==="%"){let o=t.codePointAt(n+2)||32;if(t[n+1]==="2"&&o===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(t)}function _6(e){let t=qA.resolve(e),n=e.charCodeAt(e.length-1);(n===U6||Xd&&n===j6)&&t[t.length-1]!==qA.sep&&(t+="/");let o=new URL("file://");return t.includes("%")&&(t=t.replace(k6,"%25")),!Xd&&t.includes("\\")&&(t=t.replace(L6,"%5C")),t.includes(`
160
+ `)&&(t=t.replace($6,"%0A")),t.includes("\r")&&(t=t.replace(z6,"%0D")),t.includes(" ")&&(t=t.replace(q6,"%09")),o.pathname=t,o}var C6,Md,HA,jd,Ud,QA,Nd,GA,Dd,KA,Pd,YA,kd,VA,Ld,WA,Fs,XA,hn,DF,F6,O6,T6,B6,R6,M6,j6,U6,N6,D6,Xd,P6,k6,L6,$6,z6,q6,MG=Ln(()=>{Pe(),Le(),ke(),WQ(),hG(),SG(),x6(),C6=Object.freeze(Object.create(null)),Md={},HA=!1,jd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:gR,Ud={},QA=!1,Nd={},GA=!1,Dd={},KA=!1,Pd={},YA=!1,kd={},VA=!1,Ld={},WA=!1,Fs={},XA=!1,hn=TG(),hn.parse,hn.resolve,hn.resolveObject,hn.format,hn.Url,DF=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,hn.URL=typeof URL<"u"?URL:null,hn.pathToFileURL=_6,hn.fileURLToPath=I6,F6=hn.Url,O6=hn.format,T6=hn.resolve,B6=hn.resolveObject,R6=hn.parse,M6=hn.URL,j6=92,U6=47,N6=97,D6=122,Xd=DF==="win32",P6=/\//g,k6=/%/g,L6=/\\/g,$6=/\n/g,z6=/\r/g,q6=/\t/g}),jG=qe((e,t)=>{Pe(),Le(),ke(),t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),Dv=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=void 0,e.writev=o;var t=La(),n=(Yr(),Vt(Kr));function o(a,l){let c=new Array(a.length);for(let h=0;h<a.length;h++)typeof a[h].chunk=="string"?c[h]=n.Buffer.from(a[h].chunk,"utf8"):c[h]=a[h].chunk;this._write(n.Buffer.concat(c),"binary",l)}var s=class extends t.Duplex{constructor(l,c,h){super({objectMode:!0});rt(this,"socket");rt(this,"proxy");rt(this,"isSocketOpen");rt(this,"writeQueue");this.proxy=c,this.socket=h,this.writeQueue=[],l.objectMode||(this._writev=o.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",f=>{!this.destroyed&&this.readable&&this.push(f)})}_read(l){this.proxy.read(l)}_write(l,c,h){this.isSocketOpen?this.writeToProxy(l,c,h):this.writeQueue.push({chunk:l,encoding:c,cb:h})}_final(l){this.writeQueue=[],this.proxy.end(l)}_destroy(l,c){this.writeQueue=[],this.proxy.destroy(),c(l)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(l,c,h){this.proxy.write(l,c)===!1?this.proxy.once("drain",h):h()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:l,encoding:c,cb:h}=this.writeQueue.shift();this.writeToProxy(l,c,h)}}};e.BufferedDuplex=s}),ad=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var n=(Yr(),Vt(Kr)),o=t(jG()),s=t(qo()),a=La(),l=t(Yp()),c=Dv(),h=(0,s.default)("mqttjs:ws"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function p(R,A){let E=`${R.protocol}://${R.hostname}:${R.port}${R.path}`;return typeof R.transformWsUrl=="function"&&(E=R.transformWsUrl(E,R,A)),E}function y(R){let A=R;return R.port||(R.protocol==="wss"?A.port=443:A.port=80),R.path||(A.path="/"),R.wsOptions||(A.wsOptions={}),!l.default&&!R.forceNativeWebSocket&&R.protocol==="wss"&&f.forEach(E=>{Object.prototype.hasOwnProperty.call(R,E)&&!Object.prototype.hasOwnProperty.call(R.wsOptions,E)&&(A.wsOptions[E]=R[E])}),A}function g(R){let A=y(R);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let E=new URL(document.URL);A.hostname=E.hostname,A.port||(A.port=Number(E.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function b(R,A,E){h("createWebSocket"),h(`protocol: ${E.protocolId} ${E.protocolVersion}`);let M=E.protocolId==="MQIsdp"&&E.protocolVersion===3?"mqttv3.1":"mqtt";h(`creating new Websocket for url: ${A} and protocol: ${M}`);let T;return E.createWebsocket?T=E.createWebsocket(A,[M],E):T=new o.default(A,[M],E.wsOptions),T}function w(R,A){let E=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",M=p(A,R),T;return A.createWebsocket?T=A.createWebsocket(M,[E],A):T=new WebSocket(M,[E]),T.binaryType="arraybuffer",T}var F=(R,A)=>{h("streamBuilder");let E=y(A);E.hostname=E.hostname||E.host||"localhost";let M=p(E,R),T=b(R,M,E),z=o.default.createWebSocketStream(T,E.wsOptions);return z.url=M,T.on("close",()=>{z.destroy()}),z};e.streamBuilder=F;var I=(R,A)=>{h("browserStreamBuilder");let E,M=g(A).browserBufferSize||1024*512,T=A.browserBufferTimeout||1e3,z=!A.objectMode,L=w(R,A),k=U(A,ie,X);A.objectMode||(k._writev=c.writev.bind(k)),k.on("close",()=>{L.close()});let j=typeof L.addEventListener<"u";L.readyState===L.OPEN?(E=k,E.socket=L):(E=new c.BufferedDuplex(A,k,L),j?L.addEventListener("open",$):L.onopen=$),j?(L.addEventListener("close",N),L.addEventListener("error",Z),L.addEventListener("message",re)):(L.onclose=N,L.onerror=Z,L.onmessage=re);function U(ae,ye,le){let ee=new a.Transform({objectMode:ae.objectMode});return ee._write=ye,ee._flush=le,ee}function $(){h("WebSocket onOpen"),E instanceof c.BufferedDuplex&&E.socketReady()}function N(ae){h("WebSocket onClose",ae),E.end(),E.destroy()}function Z(ae){h("WebSocket onError",ae);let ye=new Error("WebSocket error");ye.event=ae,E.destroy(ye)}async function re(ae){if(!k||!k.readable||!k.writable)return;let{data:ye}=ae;ye instanceof ArrayBuffer?ye=n.Buffer.from(ye):ye instanceof Blob?ye=n.Buffer.from(await new Response(ye).arrayBuffer()):ye=n.Buffer.from(ye,"utf8"),k.push(ye)}function ie(ae,ye,le){if(L.bufferedAmount>M){setTimeout(ie,T,ae,ye,le);return}z&&typeof ae=="string"&&(ae=n.Buffer.from(ae,"utf8"));try{L.send(ae)}catch(ee){return le(ee)}le()}function X(ae){L.close(),ae()}return E};e.browserStreamBuilder=I}),Pv={};ll(Pv,{Server:()=>or,Socket:()=>or,Stream:()=>or,_createServerHandle:()=>or,_normalizeArgs:()=>or,_setSimultaneousAccepts:()=>or,connect:()=>or,createConnection:()=>or,createServer:()=>or,default:()=>H6,isIP:()=>or,isIPv4:()=>or,isIPv6:()=>or});function or(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var H6,Q6=Ln(()=>{Pe(),Le(),ke(),H6={_createServerHandle:or,_normalizeArgs:or,_setSimultaneousAccepts:or,connect:or,createConnection:or,createServer:or,isIP:or,isIPv4:or,isIPv6:or,Server:or,Socket:or,Stream:or}}),G6=qe((e,t)=>{Pe(),Le(),ke(),t.exports={}}),PF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0});var n=t((Q6(),Vt(Pv))),o=t(qo()),s=t(G6()),a=(0,o.default)("mqttjs:tcp"),l=(c,h)=>{if(h.port=h.port||1883,h.hostname=h.hostname||h.host||"localhost",h.socksProxy)return(0,s.default)(h.hostname,h.port,h.socksProxy,{timeout:h.socksTimeout});let{port:f,path:p}=h,y=h.hostname;return a("port %d and host %s",f,y),n.default.createConnection({port:f,host:y,path:p})};e.default=l}),K6={};ll(K6,{default:()=>Y6});var Y6,UG=Ln(()=>{Pe(),Le(),ke(),Y6={}}),kF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0});var n=(UG(),Vt(K6)),o=t((Q6(),Vt(Pv))),s=t(qo()),a=t(G6()),l=(0,s.default)("mqttjs:tls");function c(f){let{host:p,port:y,socksProxy:g,...b}=f;if(g!==void 0){let w=(0,a.default)(p,y,g,{timeout:f.socksTimeout});return(0,n.connect)({...b,socket:w})}return(0,n.connect)(f)}var h=(f,p)=>{p.port=p.port||8883,p.host=p.hostname||p.host||"localhost",o.default.isIP(p.host)===0&&(p.servername=p.host),p.rejectUnauthorized=p.rejectUnauthorized!==!1,delete p.path,l("port %d host %s rejectUnauthorized %b",p.port,p.host,p.rejectUnauthorized);let y=c(p);y.on("secureConnect",()=>{p.rejectUnauthorized&&!y.authorized?y.emit("error",new Error("TLS not authorized")):y.removeListener("error",g)});function g(b){p.rejectUnauthorized&&f.emit("error",b),y.end()}return y.on("error",g),y};e.default=h}),LF=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Yr(),Vt(Kr)),n=La(),o=Dv(),s,a,l;function c(){let g=new n.Transform;return g._write=(b,w,F)=>{s.send({data:b.buffer,success(){F()},fail(I){F(new Error(I))}})},g._flush=b=>{s.close({success(){b()}})},g}function h(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function f(g,b){let w=g.protocol==="wxs"?"wss":"ws",F=`${w}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(F=`${w}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(F=g.transformWsUrl(F,g,b)),F}function p(){s.onOpen(()=>{l.socketReady()}),s.onMessage(g=>{let{data:b}=g;b instanceof ArrayBuffer?b=t.Buffer.from(b):b=t.Buffer.from(b,"utf8"),a.push(b)}),s.onClose(()=>{l.emit("close"),l.end(),l.destroy()}),s.onError(g=>{let b=new Error(g.errMsg);l.destroy(b)})}var y=(g,b)=>{if(b.hostname=b.hostname||b.host,!b.hostname)throw new Error("Could not determine host. Specify host manually.");let w=b.protocolId==="MQIsdp"&&b.protocolVersion===3?"mqttv3.1":"mqtt";h(b);let F=f(b,g);s=wx.connectSocket({url:F,protocols:[w]}),a=c(),l=new o.BufferedDuplex(b,a,s),l._destroy=(R,A)=>{s.close({success(){A&&A(R)}})};let I=l.destroy;return l.destroy=(R,A)=>(l.destroy=I,setTimeout(()=>{s.close({fail(){l._destroy(R,A)}})},0),l),p(),l};e.default=y}),$F=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Yr(),Vt(Kr)),n=La(),o=Dv(),s,a,l,c=!1;function h(){let b=new n.Transform;return b._write=(w,F,I)=>{s.sendSocketMessage({data:w.buffer,success(){I()},fail(){I(new Error)}})},b._flush=w=>{s.closeSocket({success(){w()}})},b}function f(b){b.hostname||(b.hostname="localhost"),b.path||(b.path="/"),b.wsOptions||(b.wsOptions={})}function p(b,w){let F=b.protocol==="alis"?"wss":"ws",I=`${F}://${b.hostname}${b.path}`;return b.port&&b.port!==80&&b.port!==443&&(I=`${F}://${b.hostname}:${b.port}${b.path}`),typeof b.transformWsUrl=="function"&&(I=b.transformWsUrl(I,b,w)),I}function y(){c||(c=!0,s.onSocketOpen(()=>{l.socketReady()}),s.onSocketMessage(b=>{if(typeof b.data=="string"){let w=t.Buffer.from(b.data,"base64");a.push(w)}else{let w=new FileReader;w.addEventListener("load",()=>{if(w.result instanceof ArrayBuffer){a.push(t.Buffer.from(w.result));return}a.push(t.Buffer.from(w.result,"utf-8"))}),w.readAsArrayBuffer(b.data)}}),s.onSocketClose(()=>{l.end(),l.destroy()}),s.onSocketError(b=>{l.destroy(b)}))}var g=(b,w)=>{if(w.hostname=w.hostname||w.host,!w.hostname)throw new Error("Could not determine host. Specify host manually.");let F=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";f(w);let I=p(w,b);return s=w.my,s.connectSocket({url:I,protocols:F}),a=h(),l=new o.BufferedDuplex(w,a,s),y(),l};e.default=g}),NG=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=p;var n=t(qo()),o=t((MG(),Vt(E6))),s=t(fA()),a=t(Yp());typeof(Dt==null?void 0:Dt.nextTick)!="function"&&(Dt.nextTick=setImmediate);var l=(0,n.default)("mqttjs"),c=null;function h(y){let g;if(y.auth)if(g=y.auth.match(/^(.+):(.+)$/),g){let[,b,w]=g;y.username=b,y.password=w}else y.username=y.auth}function f(y,g){var F,I,R;if(l("connecting to an MQTT broker..."),typeof y=="object"&&!g&&(g=y,y=""),g=g||{},y&&typeof y=="string"){let A=o.default.parse(y,!0),E={};if(A.port!=null&&(E.port=Number(A.port)),E.host=A.hostname,E.query=A.query,E.auth=A.auth,E.protocol=A.protocol,E.path=A.path,g={...E,...g},!g.protocol)throw new Error("Missing protocol");g.protocol=g.protocol.replace(/:$/,"")}if(g.unixSocket=g.unixSocket||((F=g.protocol)==null?void 0:F.includes("+unix")),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!((I=g.protocol)!=null&&I.startsWith("ws"))&&!((R=g.protocol)!=null&&R.startsWith("wx"))&&delete g.path,h(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),a.default||g.unixSocket?g.socksProxy=void 0:g.socksProxy===void 0&&typeof Dt<"u"&&(g.socksProxy=Dt.env.MQTTJS_SOCKS_PROXY),g.cert&&g.key)if(g.protocol){if(["mqtts","wss","wxs","alis"].indexOf(g.protocol)===-1)switch(g.protocol){case"mqtt":g.protocol="mqtts";break;case"ws":g.protocol="wss";break;case"wx":g.protocol="wxs";break;case"ali":g.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${g.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(c||(c={},!a.default&&!g.forceNativeWebSocket?(c.ws=ad().streamBuilder,c.wss=ad().streamBuilder,c.mqtt=PF().default,c.tcp=PF().default,c.ssl=kF().default,c.tls=c.ssl,c.mqtts=kF().default):(c.ws=ad().browserStreamBuilder,c.wss=ad().browserStreamBuilder,c.wx=LF().default,c.wxs=LF().default,c.ali=$F().default,c.alis=$F().default)),!c[g.protocol]){let A=["mqtts","wss"].indexOf(g.protocol)!==-1;g.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((E,M)=>A&&M%2===0?!1:typeof c[E]=="function")[0]}if(g.clean===!1&&!g.clientId)throw new Error("Missing clientId for unclean clients");g.protocol&&(g.defaultProtocol=g.protocol);function b(A){return g.servers&&((!A._reconnectCount||A._reconnectCount===g.servers.length)&&(A._reconnectCount=0),g.host=g.servers[A._reconnectCount].host,g.port=g.servers[A._reconnectCount].port,g.protocol=g.servers[A._reconnectCount].protocol?g.servers[A._reconnectCount].protocol:g.defaultProtocol,g.hostname=g.host,A._reconnectCount++),l("calling streambuilder for",g.protocol),c[g.protocol](A,g)}let w=new s.default(b,g);return w.on("error",()=>{}),w}function p(y,g,b=!0){return new Promise((w,F)=>{let I=f(y,g),R={connect:E=>{A(),w(I)},end:()=>{A(),w(I)},error:E=>{A(),I.end(),F(E)}};b===!1&&(R.close=()=>{R.error(new Error("Couldn't connect to server"))});function A(){Object.keys(R).forEach(E=>{I.off(E,R[E])})}Object.keys(R).forEach(E=>{I.on(E,R[E])})})}e.default=f}),zF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(b,w,F,I){I===void 0&&(I=F);var R=Object.getOwnPropertyDescriptor(w,F);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[F]}}),Object.defineProperty(b,I,R)}:function(b,w,F,I){I===void 0&&(I=F),b[I]=w[F]}),n=e&&e.__setModuleDefault||(Object.create?function(b,w){Object.defineProperty(b,"default",{enumerable:!0,value:w})}:function(b,w){b.default=w}),o=e&&e.__importStar||(function(){var b=function(w){return b=Object.getOwnPropertyNames||function(F){var I=[];for(var R in F)Object.prototype.hasOwnProperty.call(F,R)&&(I[I.length]=R);return I},b(w)};return function(w){if(w&&w.__esModule)return w;var F={};if(w!=null)for(var I=b(w),R=0;R<I.length;R++)I[R]!=="default"&&t(F,w,I[R]);return n(F,w),F}})(),s=e&&e.__exportStar||function(b,w){for(var F in b)F!=="default"&&!Object.prototype.hasOwnProperty.call(w,F)&&t(w,b,F)},a=e&&e.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var l=a(fA());e.MqttClient=l.default;var c=a(c6());e.DefaultMessageIdProvider=c.default;var h=a(YQ());e.UniqueMessageIdProvider=h.default;var f=a(K3());e.Store=f.default;var p=o(NG());e.connect=p.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return p.connectAsync}});var y=a(m6());e.KeepaliveManager=y.default,e.Client=l.default,s(fA(),e),s(fl(),e);var g=Gp();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),DG=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(l,c,h,f){f===void 0&&(f=h);var p=Object.getOwnPropertyDescriptor(c,h);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[h]}}),Object.defineProperty(l,f,p)}:function(l,c,h,f){f===void 0&&(f=h),l[f]=c[h]}),n=e&&e.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),o=e&&e.__importStar||(function(){var l=function(c){return l=Object.getOwnPropertyNames||function(h){var f=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[f.length]=p);return f},l(c)};return function(c){if(c&&c.__esModule)return c;var h={};if(c!=null)for(var f=l(c),p=0;p<f.length;p++)f[p]!=="default"&&t(h,c,f[p]);return n(h,c),h}})(),s=e&&e.__exportStar||function(l,c){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(c,h)&&t(c,l,h)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(zF());e.default=a,s(zF(),e)});const PG=DG();/*! Bundled license information:
161
+
162
+ @jspm/core/nodelibs/browser/chunk-DtuTasat.js:
163
+ (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
164
+
165
+ safe-buffer/index.js:
166
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
167
+
168
+ @babel/runtime/helpers/regenerator.js:
169
+ (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)
170
+ */var V6=(e=>(e.Posting="posting",e.Finalizing="finalizing",e.Finalized="finalized",e.Rejected="rejected",e))(V6||{});const kG=Sv({name:"BatcherHash",fields:[{name:"batch",type:Ue.String(),indexed:!0},{name:"status",type:Ue.Enum(V6),indexed:!0},{name:"blockHeight",type:Ue.Optional(Ue.Integer())},{name:"transactionHash",type:Ue.String()}]}),LG=Sv({name:"RollupBlock",fields:[{name:"block",type:Ue.Integer(),indexed:!0},{name:"timestamp",type:Ue.Optional(Ue.Integer())}]}),$G=Sv({name:"SyncChains",fields:[{name:"chain",type:Ue.String(),indexed:!0},{name:"block",type:Ue.Integer(),indexed:!0},{name:"rollup",type:Ue.Integer(),indexed:!1}]}),W6=[[dd.Batcher,kG],[dd.Node,LG],[dd.Node,$G]],zG=e=>{let t={};for(const n of e)t[n[1].name]=b3(n[0],n[1]);return t},qG=e=>{let t={};for(const n of e)t[n[1].name]=b3(n[0],CH(n[1]));return t},JA=zG(W6);qG(W6);let qF=0;async function HF(e){await Gu.Instance.subscribe({topic:JA.RollupBlock,filter:{block:void 0}},t=>{qF=Math.max(t.block,qF)})}var yb,QF;function HG(){if(QF)return yb;QF=1;var e="/",t="+",n="#";yb={matches:s,extract:l,exec:o,fill:a,clean:c};function o(h,f){return s(h,f)?l(h,f):null}function s(h,f){for(var p=h.split(e),y=f.split(e),g=p.length,b=y.length,w=g-1,F=0;F<g;F++){var I=p[F],R=I[0],A=y[F];if(!(!A&&!I)){if(!A&&I!==n)return!1;if(R===n)return F===w;if(R!==t&&I!==A)return!1}}return g===b}function a(h,f){for(var p=h.split(e),y=p.length,g=[],b=0;b<y;b++){var w=p[b],F=w[0],I=w.slice(1),R=f[I];if(F===n){R!==void 0&&g.push([].concat(R).join(e));break}else F===t?g.push(""+R):g.push(w)}return g.join(e)}function l(h,f){for(var p={},y=h.split(e),g=f.split(e),b=y.length,w=0;w<b;w++){var F=y[w],I=F[0];if(F.length!==1)if(I===n){p[F.slice(1)]=g.slice(w);break}else I===t&&(p[F.slice(1)]=g[w])}return p}function c(h){for(var f=h.split(e),p=f.length,y=[],g=0;g<p;g++){var b=f[g],w=b[0];w===n?y.push(n):w===t?y.push(t):y.push(b)}return y.join("/")}return yb}var GF=HG();const KF={MQTT_ENGINE_BROKER_URL:"ws://localhost:8883",MQTT_BATCHER_BROKER_URL:"ws://localhost:8884"},Oo=class Oo{constructor(){this.getClient.bind(this),this.setupClient.bind(this),this.connectPaimaEngine.bind(this),this.connectBatcher.bind(this)}async getClient(t){switch(t){case da.PaimaEngine:return await this.connectPaimaEngine();case da.Batcher:return await this.connectBatcher()}}async setupClient(t){const n=await PG.connectAsync(t);return n.on("message",(o,s)=>{for(const[a,l]of Object.entries(Gu.Instance.callbacksForTopic))for(const[c,h]of Object.entries(l))if(GF.matches(c,o))for(const f of Object.getOwnPropertySymbols(h).map(p=>h[p])){const p=JSON.parse(s.toString()),y=GF.extract(FH(f.event.path),o);f.callback({val:p,resolvedPath:y})}}),n}async connectPaimaEngine(){return Oo.clients.engine||(da.PaimaEngine,Oo.clients.engine=await this.setupClient(KF.MQTT_ENGINE_BROKER_URL),await HF()),Oo.clients.engine}async connectBatcher(){return Oo.clients.batcher||(da.Batcher,Oo.clients.batcher=await this.setupClient(KF.MQTT_BATCHER_BROKER_URL),await HF()),Oo.clients.batcher}};Oo.clients={};let Sc=Oo;const ep=class ep{constructor(){this.callbacksForTopic={[da.PaimaEngine]:{},[da.Batcher]:{}},this.symbolToSubscription={},this.subscribe.bind(this),this.subscribeExplicit.bind(this),this.unsubscribe.bind(this),this.sendMessage.bind(this),this.sendMessageExplicit.bind(this)}async subscribe(t,n){return await this.subscribeExplicit({topic:t.topic,filter:t.filter},({val:o,resolvedPath:s})=>n({...o,...s}))}async subscribeExplicit(t,n){const o=await new Sc().getClient(t.topic.broker),s=MC(t.topic.path,t.filter),a=async()=>{try{await o.subscribeAsync(s,{qos:2})}catch(h){console.log(`MQTT[${t.topic.broker}] ERROR`,h)}};o.connected?await a():await new Promise(h=>{o.on("connect",async()=>{await a(),h()})});const l=Symbol(s);this.symbolToSubscription[l]={broker:t.topic.broker,topic:s};const c=this.callbacksForTopic[t.topic.broker][s]??{};return c[l]={callback:n,event:t.topic},this.callbacksForTopic[t.topic.broker][s]=c,l}async unsubscribe(t){const{topic:n,broker:o}=this.symbolToSubscription[t];if(n==null){console.error("Subscription not found",t.description);return}delete this.symbolToSubscription[t];const s=this.callbacksForTopic[o][n];if(delete s[t],Object.keys(s).length-1===0){const l=await new Sc().getClient(o);delete this.callbacksForTopic[o][n];const c=async()=>{try{await l.unsubscribeAsync(n)}catch(h){console.log(`MQTT[${o}] ERROR`,h)}};l.connected?await c():await new Promise(h=>{l.on("connect",async()=>{await c(),h()})})}}async sendMessage(t,n){const o=new Set(OH(t.path)),s=Object.fromEntries(Object.entries(n).filter(([l,c])=>o.has(l))),a=Object.fromEntries(Object.entries(n).filter(([l,c])=>!o.has(l)));return await this.sendMessageExplicit({topic:t,filter:s},a)}async sendMessageExplicit(t,n){const o=await new Sc().getClient(t.topic.broker),s=MC(t.topic.path,t.filter);await o.publishAsync(s,JSON.stringify(n),{qos:2})}};ep.Instance=new ep;let Gu=ep;class Cu{constructor(){this.latestBlock={},this.initializationPromise=null}static get Instance(){return Cu._instance||(Cu._instance=new Cu),Cu._instance}async waitForBlock(t="__main__",n){await this.ensureInitialized();const o=t;let s=this.latestBlock[o]??0;const a=Number(n??s+1);for(;s<a;)await new Promise(l=>setTimeout(l,500)),s=this.latestBlock[o]??0}getLatestBlock(t="__main__"){return this.latestBlock[t]??0}ensureInitialized(){return this.initializationPromise||(this.initializationPromise=this.initBlockSubscription()),this.initializationPromise}async initBlockSubscription(){console.log("Initializing block subscriptions..."),this.latestBlock.__main__=0,await Promise.all([Gu.Instance.subscribe({topic:JA.RollupBlock,filter:{block:void 0}},t=>{const n=isNaN(this.latestBlock.__main__)?0:this.latestBlock.__main__;this.latestBlock.__main__=Math.max(Number(t.block),n)}),Gu.Instance.subscribe({topic:JA.SyncChains,filter:{chain:void 0,block:void 0}},t=>{const n=this.latestBlock[t.chain]||0;this.latestBlock[t.chain]=Math.max(t.block,n)})]),console.log("Block subscriptions initialized.")}}const YF=Cu.Instance;function gb(){return"0x"+Array.from({length:64},()=>Math.floor(Math.random()*16).toString(16)).join("")}let QG=1e3;const GG=async(e,t,n,o)=>{const s=t===n?`${vI}/${encodeURIComponent(e)}/blocks?page=${t}`:`${vI}/${encodeURIComponent(e)}/blocks?from=${t}&to=${n}`,a=await fetch(s);if(!a.ok)return console.warn(`Failed to fetch blocks ${t}-${n} for ${e}: ${a.status}`),[];const l=await a.json(),c=l==null?void 0:l.blocks;return!c||!Array.isArray(c)?[]:c.map(h=>KG(h,o,t)).filter(h=>h!==null)},VF={EVM:e=>({number:Number(e.number),hash:e.hash??"",timestamp:e.timestamp!=null?new Date(Number(e.timestamp)*1e3):new Date}),MIDNIGHT:e=>{var s,a;const t=(s=e==null?void 0:e.header)==null?void 0:s.number,n=t?parseInt(t,16):void 0;return{number:Number(e.height??(n!==void 0?n:void 0)),hash:e.hash??((a=e.header)==null?void 0:a.parentHash)??"",timestamp:new Date}},CARDANO:e=>{var t,n,o,s,a,l;return{number:Number(((n=(t=e.block)==null?void 0:t.header)==null?void 0:n.height)??((o=e.header)==null?void 0:o.height)),hash:((a=(s=e.block)==null?void 0:s.header)==null?void 0:a.hash)??((l=e.header)==null?void 0:l.hash)??"",timestamp:new Date(Number(e.timestamp??0))}},DEFAULT:(e,t)=>({number:Number(e.blockNumber??t),hash:e.hash??"",timestamp:e.received_at!=null?new Date(Number(e.received_at)):new Date}),AVAIL:e=>({number:Number(e.number),hash:e.hash??"",timestamp:e.received_at!=null?new Date(Number(e.received_at)):new Date})},KG=(e,t,n)=>{const s=(VF[t]??VF.DEFAULT)(e,n);return s.number==null||Number.isNaN(s.number)?null:s};function YG(){const[e,t]=Ve.useState({}),[n,o]=Ve.useState(!0),[s,a]=Ve.useState(null),[l,c]=Ve.useState({}),h=Ve.useRef(!1),f=Ve.useRef(!1),p=Ve.useRef(null),y=Ve.useRef({}),g=Ve.useCallback((A,E=e)=>{const M=E[A];if(!M)return;const T=M.rpcEndpoint?M.latestBlockNumber||0:M.currentBlock++,z=gb(),k={number:T,hash:z,timestamp:new Date};t(j=>{const U={...j},$=U[A];return $.blocks.some(Z=>Z.number===T)||($.blocks.unshift(k),$.blocks.length>20&&($.blocks=$.blocks.slice(0,20))),U}),c(j=>({...j,[A]:0})),setTimeout(()=>{c(j=>({...j,[A]:void 0}))},250)},[e]),b=Ve.useCallback(async()=>{o(!0),a(null);try{const A=await QN();QG=A.Paima.blockTime??1e3,t(A),console.log("✅ Loaded chain configs from API:",A)}catch(A){const E=A instanceof Error?A.message:"Unknown error";a(E),console.error("❌ Failed to load chain configs, using fallback:",E),t({})}finally{o(!1)}},[]),w=Ve.useCallback(A=>{t(E=>{const M={...E};return Object.keys(A).forEach(T=>{const z=M[T];if(z&&!z.rpcEndpoint){const L=[];for(let k=-5;k<0;k++){const j=z.currentBlock+k,U=gb(),$=new Date(Date.now()+k*(z.blockTime??1e3));L.push({number:j,hash:U,timestamp:$})}z.blocks=L.reverse(),z.currentBlock=z.currentBlock+1}}),M})},[]);Ve.useEffect(()=>{b()},[b]),Ve.useEffect(()=>{n||h.current||Object.keys(e).length!==0&&(w(e),h.current=!0)},[n]),Ve.useEffect(()=>{if(n||f.current||Object.keys(e).length===0)return;const A=[];return Object.keys(e).forEach(E=>{const M=e[E];if(!M.rpcEndpoint){const T=setInterval(()=>{g(E)},M.blockTime);A.push(T)}}),f.current=!0,()=>{A.forEach(E=>clearInterval(E)),f.current=!1}},[n]),Ve.useEffect(()=>{if(n)return;YF.waitForBlock("__main__");const A=setInterval(()=>{t(E=>{const M={...E};let T=!1;for(const z in M){const L=M[z],k=z==="Paima"?"__main__":L.protocolName||z,j=YF.getLatestBlock(k);if(j>(L.latestBlockNumber||0)&&(T=!0,L.previousLatestBlockNumber=L.latestBlockNumber||0,L.latestBlockNumber=j,L.isConnected=!0,L.previousLatestBlockNumber>0)){const U=gb(),N={number:j,hash:U,timestamp:new Date};L.blocks.some(re=>re.number===j)||(L.blocks.unshift(N),L.blocks.length>20&&(L.blocks=L.blocks.slice(0,20)),c(re=>({...re,[z]:0})),setTimeout(()=>{c(re=>({...re,[z]:void 0}))},500))}}return T?{...M}:E})},500);return()=>clearInterval(A)},[n]),Ve.useEffect(()=>{if(n||p.current!=null)return;const A=()=>{const T=Object.entries(e).filter(([L])=>L!=="Paima");let z=Number.POSITIVE_INFINITY;for(const[,L]of T)typeof L.blockTime=="number"&&L.blockTime>0&&L.blockTime<z&&(z=L.blockTime);return Number.isFinite(z)?Math.max(1e3,z):1e4},E=async()=>{try{const T=await fetch(GN);if(!T.ok)throw new Error(`block-heights HTTP ${T.status}`);const z=await T.json(),L=[];for(const[k,j]of Object.entries(e)){if(k==="Paima")continue;const U=j.protocolName;if(!U)continue;const $=z.find(Z=>Z.protocol_name===U);if(!$||$.synced_page==null)continue;const N=y.current[U]||0;if(!($.synced_page<=N))try{const Z=[],re=await GG(U,$.synced_page,$.synced_page,j.type);Z.push(...re),Z.length>0&&(L.push({key:k,blocks:Z}),y.current[U]=$.synced_page)}catch{}}L.length>0&&t(k=>{const j={...k};for(const U of L){const $=j[U.key];if(!$||!U.blocks||U.blocks.length===0)continue;const N=U.blocks.filter(Z=>!$.blocks.some(re=>re.number===Z.number));if(N.length>0){const Z=N.sort((re,ie)=>ie.number-re.number);$.blocks.unshift(...Z),$.blocks.length>20&&($.blocks=$.blocks.slice(0,20))}}return j})}catch{}};E();const M=A();return console.log(`[Explorer] Engine block-heights polling interval resolved to ${M} ms`),p.current=setInterval(E,M),()=>{p.current!=null&&(clearInterval(p.current),p.current=null)}},[n]);const F=e.Paima,I=(F==null?void 0:F.latestBlockNumber)||0,R=(F==null?void 0:F.isConnected)||!1;return{chainConfigs:e,newBlockIndices:l,latestBlock:I,isConnected:R,isLoadingConfig:n,configError:s}}function VG(){const[t,n]=Ve.useState([]),[o,s]=Ve.useState([]),[a,l]=Ve.useState({}),[c,h]=Ve.useState({}),[f,p]=Ve.useState({}),[y,g]=Ve.useState({}),[b,w]=Ve.useState({}),[F,I]=Ve.useState({}),[R,A]=Ve.useState({}),E=Ve.useRef(!1),M=Ve.useRef([]),T=Ve.useRef([]),z=Ve.useRef({}),L=Ve.useRef({}),k=Ve.useRef({}),j=Ve.useRef({}),U=Ve.useRef(new Set),$=Ve.useRef(new Set);Ve.useEffect(()=>{M.current=t},[t]),Ve.useEffect(()=>{T.current=o},[o]),Ve.useEffect(()=>{z.current=F},[F]),Ve.useEffect(()=>{L.current=R},[R]),Ve.useEffect(()=>{k.current=y},[y]),Ve.useEffect(()=>{j.current=b},[b]);const N=Ve.useCallback(J=>J.map(O=>({name:O.column_name,dataTypeID:25})),[]),Z=Ve.useCallback((J,O,H)=>{const Y=Array.isArray(J)?J:[];let se=[];return H&&H.length>0?se=N(H):Y.length>0&&(se=Object.keys(Y[0]).map(pe=>({name:pe,dataTypeID:25}))),{command:"SELECT",rowCount:Y.length,rows:Y,fields:se}},[N]),re=Ve.useCallback((J,O,H)=>{const Y=Array.isArray(J)?J:[];let se=[];return H&&H.length>0?se=N(H):Y.length>0&&(se=Object.keys(Y[0]).map(pe=>({name:pe,dataTypeID:25}))),{command:"SELECT",rowCount:Y.length,rows:Y,fields:se}},[N]),ie=Ve.useCallback(async J=>{try{if(U.current.has(J))return null;const O=z.current[J];if(O)return O;const H=await fetch(`${WN}/${J}`);if(!H.ok){if(H.status===404)return console.log(`🚫 Schema for primitive ${J} not found (404)`),U.current.add(J),null;throw new Error(`HTTP error! status: ${H.status}`)}const Y=await H.json();return console.log(`📋 Fetched schema for ${J}:`,Y),Y}catch(O){return console.error(`Error fetching schema for primitive ${J}:`,O),null}},[]),X=Ve.useCallback(async J=>{try{const O=await fetch(`${XN}/${J}`);if(!O.ok){if(O.status===404)return console.log(`🚫 Schema for table ${J} not found (404)`),null;throw new Error(`HTTP error! status: ${O.status}`)}const H=await O.json();return console.log(`📋 Fetched schema for ${J}:`,H),H}catch(O){return console.error(`Error fetching schema for table ${J}:`,O),null}},[]),ae=Ve.useCallback(async()=>{try{const J=await fetch(_T);if(!J.ok)throw new Error(`HTTP error! status: ${J.status}`);const O=await J.json();return console.log("📋 Fetched config:",O),O}catch(J){return console.error("Error fetching config:",J),null}},[]),ye=Ve.useCallback(async()=>{try{const J=await fetch(wI);if(!J.ok)throw new Error(`HTTP error! status: ${J.status}`);const O=await J.json();return console.log("📋 Fetched user table names:",O),O.map(H=>H.table_name)}catch(J){return console.error("Error fetching user table names:",J),[]}},[]),le=Ve.useCallback(J=>{const O=[];return!J||!Array.isArray(J)?O:(J.forEach(H=>{H.primitives&&Array.isArray(H.primitives)&&H.primitives.forEach(Y=>{Y.primitive&&Y.primitive.name&&Y.primitive.type!=="evm-rpc-paima-l2"&&O.push(Y.primitive.name)})}),[...new Set(O)])},[]),ee=Ve.useCallback(async(J,O,H)=>{try{if($.current.has(J))return null;const Y=H??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${KN}/${J}`);se.searchParams.set("limit",String(Y.limit));const pe=Y.cursors[Y.currentPage];pe&&se.searchParams.set("after",pe);const te=await fetch(se.toString());if(!te.ok){if(te.status===404)return console.log(`🚫 Primitive ${J} not found (404)`),$.current.add(J),null;throw new Error(`HTTP error! status: ${te.status}`)}const _=await te.json(),v=Array.isArray(_)?_:_.data??[],C=_.pagination;return C&&g(P=>{const he=[...P[J].cursors];return C.nextCursor&&he.length===P[J].currentPage+1&&he.push(C.nextCursor),{...P,[J]:{...P[J],hasMore:C.hasMore,cursors:he}}}),console.log(`📊 Fetched data for ${J}:`,v),Z(v,J,O)}catch(Y){return console.error(`Error fetching primitive data for ${J}:`,Y),null}},[Z]),G=Ve.useCallback(async(J,O,H)=>{try{const Y=H??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${wI}/${J}`);se.searchParams.set("limit",String(Y.limit));const pe=Y.cursors[Y.currentPage];pe&&se.searchParams.set("after",pe);const te=await fetch(se.toString());if(!te.ok){if(te.status===404)return console.log(`🚫 Table ${J} not found (404)`),null;throw new Error(`HTTP error! status: ${te.status}`)}const _=await te.json();console.log(`📊 Fetched table data for ${J}:`,_);const v=_.data??[],C=_.pagination;return C&&w(P=>{const he=[...P[J].cursors];return C.nextCursor&&he.length===P[J].currentPage+1&&he.push(C.nextCursor),{...P,[J]:{...P[J],hasMore:C.hasMore,cursors:he}}}),re(v,J,O)}catch(Y){return console.error(`Error fetching table data for ${J}:`,Y),null}},[re]),Q=Ve.useCallback(async()=>{try{const J=await fetch(VN);if(!J.ok)throw new Error(`HTTP error! status: ${J.status}`);const H=(await J.json()).data??[];console.log("📊 Fetched scheduled data:",H);const Y=[{name:"id",dataTypeID:23},{name:"from_address",dataTypeID:25},{name:"input_data",dataTypeID:25},{name:"primitive_name",dataTypeID:25},{name:"caip2",dataTypeID:25},{name:"contract_address",dataTypeID:25},{name:"origin_tx_hash",dataTypeID:25},{name:"future_block_height",dataTypeID:23},{name:"future_ms_timestamp",dataTypeID:25}];return{command:"SELECT",rowCount:H.length,rows:H,fields:Y}}catch(J){return console.error("Error fetching scheduled data:",J),null}},[]),K=Ve.useCallback(async()=>{if(!(M.current.length===0||!E.current))try{const J=M.current.map(async H=>{const Y=z.current[H],se=k.current[H],pe=await ee(H,Y,se);return{primitiveName:H,data:pe}}),O=await Promise.all(J);O.length>0&&l(H=>{const Y={...H};return O.forEach(({primitiveName:se,data:pe})=>{pe!==null&&(Y[se]=pe)}),Y})}catch(J){console.error("Error refreshing primitive data:",J)}},[ee]),W=Ve.useCallback(async()=>{if(!(!E.current||T.current.length===0))try{const J=T.current.map(async H=>{const Y=L.current[H],se=j.current[H],pe=await G(H,Y,se);return{tableName:H,data:pe}}),O=await Promise.all(J);O.length>0&&h(H=>{const Y={...H};return O.forEach(({tableName:se,data:pe})=>{pe!==null&&(Y[se]=pe)}),Y})}catch(J){console.error("Error refreshing user table data:",J)}},[G]),q=Ve.useCallback(async()=>{if(E.current)try{const J=await Q();J!==null&&p({scheduled_data:J})}catch(J){console.error("Error refreshing scheduled data:",J)}},[Q]),fe=Ve.useCallback(async()=>{console.log("📋 Initializing primitive tables...");try{const J=await ae();if(!J){console.error("Failed to fetch config");return}const O=le(J);if(n(O),console.log("📊 Found primitives:",O),O.length===0){console.log("No primitives found in config");return}const H=O.map(async v=>{const C=await ie(v);return{primitiveName:v,schema:C}}),Y=await Promise.all(H),se={};Y.forEach(({primitiveName:v,schema:C})=>{C&&(se[v]=C)}),I(se),g(v=>{const C={...v};return O.forEach(P=>{C[P]||(C[P]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),C});const pe=O.map(async v=>{const C=se[v],P=k.current[v]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},he=await ee(v,C,P);return{primitiveName:v,data:he}}),te=await Promise.all(pe),_={};te.forEach(({primitiveName:v,data:C})=>{_[v]=C}),l(_),console.log("✅ Primitive tables initialized")}catch(J){console.error("Error initializing primitive tables:",J)}},[ae,le,ie,ee]),ue=Ve.useCallback(async()=>{console.log("📋 Initializing state machine tables...");try{const J=await ye();if(s(J),J.length===0){console.log("No user tables found");return}const O=J.map(async _=>{const v=await X(_);return{tableName:_,schema:v}}),H=await Promise.all(O),Y={};H.forEach(({tableName:_,schema:v})=>{v&&(Y[_]=v)}),A(Y),w(_=>{const v={..._};return J.forEach(C=>{v[C]||(v[C]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),v});const se=J.map(async _=>{const v=Y[_],C=j.current[_]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},P=await G(_,v||void 0,C);return{tableName:_,data:P}}),pe=await Promise.all(se),te={};pe.forEach(({tableName:_,data:v})=>{te[_]=v}),h(te),console.log("✅ State machine tables initialized")}catch(J){console.error("Error initializing state machine tables:",J)}},[X,G,ye]),ne=Ve.useCallback(async()=>{console.log("📋 Initializing scheduled data...");try{const J=await Q();p({scheduled_data:J}),console.log("✅ Scheduled data initialized")}catch(J){console.error("Error initializing scheduled data:",J)}},[Q]);return Ve.useEffect(()=>{let J,O,H;return(async()=>{await Promise.all([fe(),ue(),ne()]),E.current=!0,J=setInterval(()=>{K()},5e3),setTimeout(()=>{W(),O=setInterval(()=>{W()},5e3)},1500),setTimeout(()=>{q(),H=setInterval(()=>{q()},5e3)},3e3)})(),()=>{J&&clearInterval(J),O&&clearInterval(O),H&&clearInterval(H)}},[]),{primitiveData:a,userTableData:c,scheduledData:f,primitiveNames:t,userTableNames:o,refreshPrimitiveData:K,refreshUserTableData:W,refreshScheduledData:q,primitivePagination:y,userTablePagination:b,setPrimitiveLimit:async(J,O)=>{const H={limit:O,cursors:[void 0],currentPage:0,hasMore:!1};g(pe=>({...pe,[J]:H}));const Y=z.current[J],se=await ee(J,Y,H);l(pe=>({...pe,[J]:se}))},nextPrimitivePage:async J=>{const O=k.current[J];if(!O||!O.hasMore)return;const H={...O,currentPage:O.currentPage+1};g(pe=>({...pe,[J]:H}));const Y=z.current[J],se=await ee(J,Y,H);l(pe=>({...pe,[J]:se}))},prevPrimitivePage:async J=>{const O=k.current[J];if(!O||O.currentPage===0)return;const H={...O,currentPage:O.currentPage-1};g(pe=>({...pe,[J]:H}));const Y=z.current[J],se=await ee(J,Y,H);l(pe=>({...pe,[J]:se}))},firstPrimitivePage:async J=>{const O=k.current[J];if(!O)return;const H={...O,cursors:[void 0],currentPage:0};g(pe=>({...pe,[J]:H}));const Y=z.current[J],se=await ee(J,Y,H);l(pe=>({...pe,[J]:se}))},setUserTableLimit:async(J,O)=>{const H={limit:O,cursors:[void 0],currentPage:0,hasMore:!1};w(pe=>({...pe,[J]:H}));const Y=L.current[J],se=await G(J,Y,H);h(pe=>({...pe,[J]:se}))},nextUserTablePage:async J=>{const O=j.current[J];if(!O||!O.hasMore)return;const H={...O,currentPage:O.currentPage+1};w(pe=>({...pe,[J]:H}));const Y=L.current[J],se=await G(J,Y,H);h(pe=>({...pe,[J]:se}))},prevUserTablePage:async J=>{const O=j.current[J];if(!O||O.currentPage===0)return;const H={...O,currentPage:O.currentPage-1};w(pe=>({...pe,[J]:H}));const Y=L.current[J],se=await G(J,Y,H);h(pe=>({...pe,[J]:se}))},firstUserTablePage:async J=>{const O=j.current[J];if(!O)return;const H={...O,cursors:[void 0],currentPage:0};w(pe=>({...pe,[J]:H}));const Y=L.current[J],se=await G(J,Y,H);h(pe=>({...pe,[J]:se}))}}}function WG(){const[e,t]=Ve.useState([]),[n,o]=Ve.useState([]),[s,a]=Ve.useState(!1),[l,c]=Ve.useState(!1),{chainConfigs:h,newBlockIndices:f,latestBlock:p,isConnected:y,isLoadingConfig:g,configError:b}=YG(),{primitiveData:w,userTableData:F,scheduledData:I,primitiveNames:R,userTableNames:A,primitivePagination:E,userTablePagination:M,nextPrimitivePage:T,prevPrimitivePage:z,firstPrimitivePage:L,setPrimitiveLimit:k,nextUserTablePage:j,prevUserTablePage:U,firstUserTablePage:$,setUserTableLimit:N}=VG();return Ve.useEffect(()=>{R.length>0&&e.length===0&&t(R)},[R,e]),Ve.useEffect(()=>{A.length>0&&n.length===0&&o([A[0]])},[A,n]),Ve.useEffect(()=>{const Z=re=>{console.error("Unhandled promise rejection:",re.reason)};return globalThis.addEventListener("unhandledrejection",Z),()=>{globalThis.removeEventListener("unhandledrejection",Z)}},[]),Ve.useEffect(()=>{const Z=re=>{re.key==="r"&&re.ctrlKey&&(re.preventDefault(),console.log("🔄 Manually refreshed (keyboard shortcut)"))};return document.addEventListener("keydown",Z),()=>{document.removeEventListener("keydown",Z)}},[]),g?Ee.jsxs("div",{className:"container",children:[Ee.jsx(cb,{latestBlock:p,isConnected:y}),Ee.jsx("div",{style:{padding:"20px",textAlign:"center",fontSize:"18px",color:"#667eea"},children:"🔄 Loading chain configurations..."})]}):b?Ee.jsxs("div",{className:"container",children:[Ee.jsx(cb,{latestBlock:p,isConnected:y}),Ee.jsxs("div",{style:{padding:"20px",textAlign:"center",fontSize:"16px",color:"#f44336",backgroundColor:"rgba(244, 67, 54, 0.1)",border:"1px solid rgba(244, 67, 54, 0.3)",borderRadius:"8px",margin:"20px"},children:["⚠️ Failed to load chain configurations: ",b,Ee.jsx("br",{}),Ee.jsx("small",{style:{color:"#666",marginTop:"8px",display:"block"},children:"Using fallback configuration. Some features may not work correctly."})]}),Ee.jsx(TC,{chainConfigs:h,newBlockIndices:f})]}):Ee.jsxs("div",{className:"container",children:[Ee.jsx(cb,{latestBlock:p,isConnected:y}),Ee.jsx(TC,{chainConfigs:h,newBlockIndices:f}),Ee.jsxs(fb,{title:"Primitive Data",tables:Object.fromEntries(Object.entries(w).filter(([Z])=>e.includes(Z))),pagination:E,onPrev:Z=>z(Z),onNext:Z=>T(Z),onFirst:Z=>L(Z),onLimitChange:(Z,re)=>k(Z,re),children:[Ee.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:()=>a(!0),children:"Select Primitives"})}),Ee.jsx(BC,{isOpen:s,onClose:()=>a(!1),title:"Select Primitives",tableNames:R,selectedNames:e,onApply:Z=>t(Z.length?Z:[R[0]].filter(Boolean))})]}),Ee.jsxs(fb,{title:"State Machine Tables",tables:Object.fromEntries(Object.entries(F).filter(([Z])=>n.includes(Z))),pagination:M,onPrev:Z=>U(Z),onNext:Z=>j(Z),onFirst:Z=>$(Z),onLimitChange:(Z,re)=>N(Z,re),children:[Ee.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:()=>c(!0),children:"Select Tables"})}),Ee.jsx(BC,{isOpen:l,onClose:()=>c(!1),title:"Select Custom Tables",tableNames:A,selectedNames:n,onApply:Z=>o(Z.length?Z:[A[0]].filter(Boolean))}),Ee.jsx(EH,{})]}),Ee.jsx(fb,{title:"Scheduled Data",tables:I})]})}ER.createRoot(document.getElementById("root")).render(Ee.jsx(Ve.StrictMode,{children:Ee.jsx(WG,{})}));