@paimaexample/explorer 0.3.108 → 0.3.110
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.
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
var aR=Object.defineProperty;var F2=e=>{throw TypeError(e)};var uR=(e,t,n)=>t in e?aR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>uR(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 u of s)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();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 lR(){if(O2)return ec;O2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,s,u){var l=null;if(u!==void 0&&(l=""+u),s.key!==void 0&&(l=""+s.key),"key"in s){u={};for(var c in s)c!=="key"&&(u[c]=s[c])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:l,ref:s!==void 0?s:null,props:u}}return ec.Fragment=t,ec.jsx=n,ec.jsxs=n,ec}var T2;function cR(){return T2||(T2=1,nm.exports=lR()),nm.exports}var Ee=cR(),im={exports:{}},om={},tc={},B2;function fR(){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,u=o.length;s<u;++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 S=F===w?0:4-F%4;return[F,S]}function c(b){var w=l(b),F=w[0],S=w[1];return(F+S)*3/4-S}function h(b,w,F){return(w+F)*3/4-F}function f(b){var w,F=l(b),S=F[0],M=F[1],A=new n(h(b,S,M)),I=0,R=M>0?S-4:S,T;for(T=0;T<R;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[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=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 S,M=[],A=w;A<F;A+=3)S=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),M.push(p(S));return M.join("")}function g(b){for(var w,F=b.length,S=F%3,M=[],A=16383,I=0,R=F-S;I<R;I+=A)M.push(y(b,I,I+A>R?R:I+A));return S===1?(w=b[F-1],M.push(e[w>>2]+e[w<<4&63]+"==")):S===2&&(w=(b[F-2]<<8)+b[F-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return tc}var Gh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var R2;function hR(){return R2||(R2=1,Gh.read=function(e,t,n,o,s){var u,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,u=b&(1<<-p)-1,b>>=-p,p+=c;p>0;u=u*256+e[t+y],y+=g,p-=8);for(l=u&(1<<-p)-1,u>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(u===0)u=1-f;else{if(u===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(b?-1:1)*l*Math.pow(2,u-o)},Gh.write=function(e,t,n,o,s,u){var l,c,h,f=u*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:u-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 dR(){return M2||(M2=1,(function(e){var t=fR(),n=hR(),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=u(),!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 u(){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=S(_);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:M(_)|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=I(_,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:M(_.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 S(_){if(c.isBuffer(_)){var v=M(_.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 M(_){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 I(_,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 ie(_).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:ie(_).length;v=(""+v).toLowerCase(),he=!0}}c.byteLength=I;function R(_,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 ue(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):R.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:k(_,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):k(_,[v],C,P,he);throw new TypeError("val must be string, number or Buffer")}function k(_,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 L(_,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(ie(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 L(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 ne=4096;function X(_){var v=_.length;if(v<=ne)return String.fromCharCode.apply(String,_);for(var C="",P=0;P<v;)C+=String.fromCharCode.apply(String,_.slice(P,P+=ne));return C}function ue(_,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 ae(_){if(_=_.split("=")[0],_=_.trim().replace(fe,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function ie(_,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(ae(_))}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=dR(),Kh={exports:{}},j2;function pR(){return j2||(j2=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={exports:{}},o=n.exports={},s,u;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"?u=clearTimeout:u=c}catch{u=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(u===clearTimeout)return clearTimeout(le);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(le);try{return u(le)}catch{try{return u.call(null,le)}catch{return u.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 S(le,ee)),p.length===1&&!y&&h(F)};function S(le,ee){this.fun=le,this.array=ee}S.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function M(){}o.on=M,o.addListener=M,o.once=M,o.off=M,o.removeListener=M,o.removeAllListeners=M,o.emit=M,o.prependListener=M,o.prependOnceListener=M,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 I=n.exports.browser,R=A,T=n.exports.binding,z=A,k=1,L={},j=A,U=A,$=A,N=A,Z=A,re="browser",ne="browser",X="browser",ue=[],ye={nextTick:n.exports.nextTick,title:n.exports.title,browser:I,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:R,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:k,features:L,kill:j,dlopen:U,uptime:$,memoryUsage:N,uvCounters:Z,platform:re,arch:ne,execPath:X,execArgv:ue};t.addListener=n.exports.addListener,t.arch=ne,t.argv=n.exports.argv,t.binding=T,t.browser=I,t.chdir=n.exports.chdir,t.cwd=n.exports.cwd,t.default=ye,t.dlopen=U,t.emit=n.exports.emit,t.emitWarning=R,t.env=n.exports.env,t.execArgv=ue,t.execPath=X,t.exit=z,t.features=L,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=k,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 yR=pR();const jt=tp(yR);var gR=(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),mR=gR,wt={},U2;function bR(){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"),u=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,S={};function M(G,Q,K){this.props=G,this.context=Q,this.refs=S,this.updater=K||w}M.prototype.isReactComponent={},M.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")},M.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function A(){}A.prototype=M.prototype;function I(G,Q,K){this.props=G,this.context=Q,this.refs=S,this.updater=K||w}var R=I.prototype=new A;R.constructor=I,F(R,M.prototype),R.isPureReactComponent=!0;var T=Array.isArray;function z(){}var k={H:null,A:null,T:null,S:null},L=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 ne(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 ae=!1;if(G===null)ae=!0;else switch(fe){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(G.$$typeof){case e:case t:ae=!0;break;case p:return ae=G._init,X(ae(G._payload),Q,K,W,q)}}if(ae)return q=q(G),ae=W===""?"."+re(G,0):W,T(q)?(K="",ae!=null&&(K=ae.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,"$&/")+"/")+ae)),Q.push(q)),1;ae=0;var ie=W===""?".":W+":";if(T(G))for(var J=0;J<G.length;J++)W=G[J],fe=ie+re(W,J),ae+=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=ie+re(W,J++),ae+=X(W,Q,K,fe,q);else if(fe==="object"){if(typeof G.then=="function")return X(ne(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 ae}function ue(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:ue,forEach:function(G,Q,K){ue(G,function(){Q.apply(this,arguments)},K)},count:function(G){var Q=0;return ue(G,function(){Q++}),Q},toArray:function(G){return ue(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=M,wt.Fragment=n,wt.Profiler=s,wt.PureComponent=I,wt.StrictMode=o,wt.Suspense=h,wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,wt.__COMPILER_RUNTIME={__proto__:null,c:function(G){return k.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)!L.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 ae=Array(fe),ie=0;ie<fe;ie++)ae[ie]=arguments[ie+2];W.children=ae}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:u,_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)L.call(Q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(q[W]=Q[W]);var ae=arguments.length-2;if(ae===1)q.children=K;else if(1<ae){for(var ie=Array(ae),J=0;J<ae;J++)ie[J]=arguments[J+2];q.children=ie}if(G&&G.defaultProps)for(W in ae=G.defaultProps,ae)q[W]===void 0&&(q[W]=ae[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=k.T,K={};k.T=K;try{var W=G(),q=k.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),k.T=Q}},wt.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},wt.use=function(G){return k.H.use(G)},wt.useActionState=function(G,Q,K){return k.H.useActionState(G,Q,K)},wt.useCallback=function(G,Q){return k.H.useCallback(G,Q)},wt.useContext=function(G){return k.H.useContext(G)},wt.useDebugValue=function(){},wt.useDeferredValue=function(G,Q){return k.H.useDeferredValue(G,Q)},wt.useEffect=function(G,Q){return k.H.useEffect(G,Q)},wt.useEffectEvent=function(G){return k.H.useEffectEvent(G)},wt.useId=function(){return k.H.useId()},wt.useImperativeHandle=function(G,Q,K){return k.H.useImperativeHandle(G,Q,K)},wt.useInsertionEffect=function(G,Q){return k.H.useInsertionEffect(G,Q)},wt.useLayoutEffect=function(G,Q){return k.H.useLayoutEffect(G,Q)},wt.useMemo=function(G,Q){return k.H.useMemo(G,Q)},wt.useOptimistic=function(G,Q){return k.H.useOptimistic(G,Q)},wt.useReducer=function(G,Q,K){return k.H.useReducer(G,Q,K)},wt.useRef=function(G){return k.H.useRef(G)},wt.useState=function(G){return k.H.useState(G)},wt.useSyncExternalStore=function(G,Q,K){return k.H.useSyncExternalStore(G,Q,K)},wt.useTransition=function(){return k.H.useTransition()},wt.version="19.2.0",wt}var N2;function ZA(){return N2||(N2=1,im.exports=bR()),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 AR(){return D2||(D2=1,(function(e){function t(X,ue){var ye=X.length;X.push(ue);e:for(;0<ye;){var le=ye-1>>>1,ee=X[le];if(0<s(ee,ue))X[le]=ue,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 ue=X[0],ye=X.pop();if(ye!==ue){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 ue}function s(X,ue){var ye=X.sortIndex-ue.sortIndex;return ye!==0?ye:X.id-ue.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.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,S=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function R(X){for(var ue=n(f);ue!==null;){if(ue.callback===null)o(f);else if(ue.startTime<=X)o(f),ue.sortIndex=ue.expirationTime,t(h,ue);else break;ue=n(f)}}function T(X){if(F=!1,R(X),!w)if(n(h)!==null)w=!0,z||(z=!0,N());else{var ue=n(f);ue!==null&&ne(T,ue.startTime-X)}}var z=!1,k=-1,L=5,j=-1;function U(){return S?!0:!(e.unstable_now()-j<L)}function $(){if(S=!1,z){var X=e.unstable_now();j=X;var ue=!0;try{e:{w=!1,F&&(F=!1,A(k),k=-1),b=!0;var ye=g;try{t:{for(R(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,R(X),ue=!0;break t}y===n(h)&&o(h),R(X)}else o(h);y=n(h)}if(y!==null)ue=!0;else{var G=n(f);G!==null&&ne(T,G.startTime-X),ue=!1}}break e}finally{y=null,g=ye,b=!1}ue=void 0}}finally{ue?N():z=!1}}}var N;if(typeof I=="function")N=function(){I($)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,re=Z.port2;Z.port1.onmessage=$,N=function(){re.postMessage(null)}}else N=function(){M($,0)};function ne(X,ue){k=M(function(){X(e.unstable_now())},ue)}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"):L=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 ue=3;break;default:ue=g}var ye=g;g=ue;try{return X()}finally{g=ye}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(X,ue){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ye=g;g=X;try{return ue()}finally{g=ye}},e.unstable_scheduleCallback=function(X,ue,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:ue,priorityLevel:X,startTime:ye,expirationTime:ee,sortIndex:-1},ye>le?(X.sortIndex=ye,t(f,X),n(h)===null&&X===n(f)&&(F?(A(k),k=-1):F=!0,ne(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 ue=g;return function(){var ye=g;g=ue;try{return X.apply(this,arguments)}finally{g=ye}}}})(um)),um}var P2;function wR(){return P2||(P2=1,am.exports=AR()),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 vR(){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 u(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 u(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=vR(),lm.exports}var $2;function xR(){if($2)return rc;$2=1;var e=wR(),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 a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}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 u(r){var i=r,a=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(a=i.return),r=i.return;while(r)}return i.tag===3?a: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(u(r)!==r)throw Error(o(188))}function f(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(o(188));return i!==r?null:r}for(var a=r,d=i;;){var m=a.return;if(m===null)break;var E=m.alternate;if(E===null){if(d=m.return,d!==null){a=d;continue}break}if(m.child===E.child){for(E=m.child;E;){if(E===a)return h(m),r;if(E===d)return h(m),i;E=E.sibling}throw Error(o(188))}if(a.return!==d.return)a=m,d=E;else{for(var V=!1,ge=m.child;ge;){if(ge===a){V=!0,a=m,d=E;break}if(ge===d){V=!0,d=m,a=E;break}ge=ge.sibling}if(!V){for(ge=E.child;ge;){if(ge===a){V=!0,a=E,d=m;break}if(ge===d){V=!0,d=E,a=m;break}ge=ge.sibling}if(!V)throw Error(o(189))}}if(a.alternate!==d)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?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"),S=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),I=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),L=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 M:return"Profiler";case S: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 I:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case R:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case k:return i=r.displayName||null,i!==null?i:re(r.type)||"Memo";case L:i=r._payload,r=r._init;try{return re(r(i))}catch{}}return null}var ne=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=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),ae=G(null);function ie(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(ae,r);var i=W.current,a=JS(i,r.type);i!==a&&(K(q,r),K(W,a))}function H(r){q.current===r&&(Q(W),Q(q)),ae.current===r&&(Q(ae),Wl._currentValue=ye)}var Y,se;function pe(r){if(Y===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Y=i&&i[1]||"",se=-1<a.stack.indexOf(`
|
|
31
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
32
|
-
`+Y+r+se}var te=!1;function _(r,i){if(!r||te)return"";te=!0;var a=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 E=d.DetermineComponentFrameRoot(),V=E[0],ge=E[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=a}return(a=r?r.displayName||r.name:"")?pe(a):""}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="",a=null;do i+=v(r,a),a=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,a){var d=r.pendingLanes;if(d===0)return 0;var m=0,E=r.suspendedLanes,V=r.pingedLanes;r=r.warmLanes;var ge=d&134217727;return ge!==0?(d=ge&~E,d!==0?m=tt(d):(V&=ge,V!==0?m=tt(V):a||(a=ge&~r,a!==0&&(m=tt(a))))):(ge=d&~E,ge!==0?m=tt(ge):V!==0?m=tt(V):a||(a=d&~r,a!==0&&(m=tt(a)))),m===0?0:i!==0&&i!==m&&(i&E)===0&&(E=m&-m,a=i&-i,E>=a||E===32&&(a&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=[],a=0;31>a;a++)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,a,d,m,E){var V=r.pendingLanes;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=a,r.entangledLanes&=a,r.errorRecoveryDisabledLanes&=a,r.shellSuspendCounter=0;var ge=r.entanglements,Fe=r.expirationTimes,Me=r.hiddenUpdates;for(a=V&~a;0<a;){var ze=31-Ke(a),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)}a&=~Ge}d!==0&&Ye(r,d,0),E!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=E&~(V&~i))}function Ye(r,i,a){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-Ke(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|a&261930}function Ze(r,i){var a=r.entangledLanes|=i;for(r=r.entanglements;a;){var d=31-Ke(a),m=1<<d;m&i|r[d]&i&&(r[d]|=i),a&=~m}}function st(r,i){var a=i&-i;return a=(a&42)!==0?1:qt(a),(a&(r.suspendedLanes|i))!==0?0:a}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=ue.p;return r!==0?r:(r=window.event,r===void 0?32:v2(r.type))}function $n(r,i){var a=ue.p;try{return ue.p=r,i()}finally{ue.p=a}}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 a=r.parentNode;a;){if(i=a[Mr]||a[Ht]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(r=o2(r);r!==null;){if(a=r[Ht])return a;r=o2(r)}return i}r=a,a=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 J6=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 Z6(r){return P.call($v,r)?!0:P.call(Lv,r)?!1:J6.test(r)?$v[r]=!0:(Lv[r]=!0,!1)}function Mf(r,i,a){if(Z6(i))if(a===null)r.removeAttribute(i);else{switch(typeof a){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,""+a)}}function jf(r,i,a){if(a===null)r.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+a)}}function no(r,i,a,d){if(d===null)r.removeAttribute(a);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttributeNS(i,a,""+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 e8(r,i,a){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,E=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(V){a=""+V,E.call(this,V)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return a},setValue:function(V){a=""+V},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Vp(r){if(!r._valueTracker){var i=zv(r)?"checked":"value";r._valueTracker=e8(r,i,""+r[i])}}function qv(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),d="";return r&&(d=zv(r)?r.checked?"true":"false":r.value),r=d,r!==a?(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 t8=/[\n"\\]/g;function ai(r){return r.replace(t8,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Wp(r,i,a,d,m,E,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)):a!=null?Xp(r,V,si(a)):d!=null&&r.removeAttribute("value"),m==null&&E!=null&&(r.defaultChecked=!!E),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,a,d,m,E,V,ge){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(r.type=E),i!=null||a!=null){if(!(E!=="submit"&&E!=="reset"||i!=null)){Vp(r);return}a=a!=null?""+si(a):"",i=i!=null?""+si(i):a,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,a){i==="number"&&Uf(r.ownerDocument)===r||r.defaultValue===""+a||(r.defaultValue=""+a)}function za(r,i,a,d){if(r=r.options,i){i={};for(var m=0;m<a.length;m++)i["$"+a[m]]=!0;for(a=0;a<r.length;a++)m=i.hasOwnProperty("$"+r[a].value),r[a].selected!==m&&(r[a].selected=m),m&&d&&(r[a].defaultSelected=!0)}else{for(a=""+si(a),i=null,m=0;m<r.length;m++){if(r[m].value===a){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,a){if(i!=null&&(i=""+si(i),i!==r.value&&(r.value=i),a==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=a!=null?""+si(a):""}function Gv(r,i,a,d){if(i==null){if(d!=null){if(a!=null)throw Error(o(92));if(ne(d)){if(1<d.length)throw Error(o(93));d=d[0]}a=d}a==null&&(a=""),i=a}a=si(i),r.defaultValue=a,d=r.textContent,d===a&&d!==""&&d!==null&&(r.value=d),Vp(r)}function qa(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var r8=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,a){var d=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,a):typeof a!="number"||a===0||r8.has(i)?i==="float"?r.cssFloat=a:r[i]=(""+a).trim():r[i]=a+"px"}function Yv(r,i,a){if(i!=null&&typeof i!="object")throw Error(o(62));if(r=r.style,a!=null){for(var d in a)!a.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)&&a[m]!==d&&Kv(r,m,d)}else for(var E in i)i.hasOwnProperty(E)&&Kv(r,E,i[E])}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 n8=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"]]),i8=/^[\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 i8.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 a=r[nr]||null;e:switch(r=i.stateNode,i.type){case"input":if(Wp(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ai(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var d=a[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<a.length;i++)d=a[i],d.form===r.form&&qv(d)}break e;case"textarea":Qv(r,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&za(r,!!a.multiple,i,!1)}}}var ty=!1;function Wv(r,i,a){if(ty)return r(i,a);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 a=r.stateNode;if(a===null)return null;var d=a[nr]||null;if(d===null)return null;a=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(a&&typeof a!="function")throw Error(o(231,i,typeof a));return a}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,a=i.length,d,m="value"in Xo?Xo.value:Xo.textContent,E=m.length;for(r=0;r<a&&i[r]===m[r];r++);var V=a-r;for(d=1;d<=V&&i[a-d]===m[E-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(a,d,m,E,V){this._reactName=a,this._targetInst=m,this.type=d,this.nativeEvent=E,this.target=V,this.currentTarget=null;for(var ge in r)r.hasOwnProperty(ge)&&(a=r[ge],this[ge]=a?a(E):E[ge]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?kf:Jv,this.isPropagationStopped=Jv,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.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}),o8=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),s8=y({},$f,{dataTransfer:0}),a8=En(s8),u8=y({},yl,{relatedTarget:0}),sy=En(u8),l8=y({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),c8=En(l8),f8=y({},Qs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),h8=En(f8),d8=y({},Qs,{data:0}),ex=En(d8),p8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y8={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"},g8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m8(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=g8[r])?!!i[r]:!1}function ay(){return m8}var b8=y({},yl,{key:function(r){if(r.key){var i=p8[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"?y8[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}}),A8=En(b8),w8=y({},$f,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=En(w8),v8=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ay}),x8=En(v8),E8=y({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),S8=En(E8),I8=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}),_8=En(I8),C8=y({},Qs,{newState:0,oldState:0}),F8=En(C8),O8=[9,13,27,32],uy=oo&&"CompositionEvent"in window,ml=null;oo&&"documentMode"in document&&(ml=document.documentMode);var T8=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 O8.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 B8(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 R8(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 M8={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"?!!M8[r.type]:i==="textarea"}function ux(r,i,a,d){Ha?Qa?Qa.push(d):Qa=[d]:Ha=d,i=Th(i,"onChange"),0<i.length&&(a=new Lf("onChange","change",null,a,d),r.push({event:a,listeners:i}))}var bl=null,Al=null;function j8(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(j8,i)}}function U8(r,i,a){r==="focusin"?(hx(),bl=i,Al=a,bl.attachEvent("onpropertychange",dx)):r==="focusout"&&hx()}function N8(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return zf(Al)}function D8(r,i){if(r==="click")return zf(i)}function P8(r,i){if(r==="input"||r==="change")return zf(i)}function k8(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zn=typeof Object.is=="function"?Object.is:k8;function wl(r,i){if(zn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var a=Object.keys(r),d=Object.keys(i);if(a.length!==d.length)return!1;for(d=0;d<a.length;d++){var m=a[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 a=px(r);r=0;for(var d;a;){if(a.nodeType===3){if(d=r+a.textContent.length,r<=i&&d>=i)return{node:a,offset:i-r};r=d}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=px(a)}}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 a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)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 L8=oo&&"documentMode"in document&&11>=document.documentMode,Ka=null,hy=null,vl=null,dy=!1;function bx(r,i,a){var d=a.window===a?a.document:a.nodeType===9?a:a.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,a),r.push({event:i,listeners:d}),i.target=Ka)))}function Gs(r,i){var a={};return a[r.toLowerCase()]=i.toLowerCase(),a["Webkit"+r]="webkit"+i,a["Moz"+r]="moz"+i,a}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],a;for(a in i)if(i.hasOwnProperty(a)&&a in Ax)return py[r]=i[a];return r}var vx=Ks("animationend"),xx=Ks("animationiteration"),Ex=Ks("animationstart"),$8=Ks("transitionrun"),z8=Ks("transitionstart"),q8=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 a=ui[i];ui[i++]=null;var d=ui[i];ui[i++]=null;var m=ui[i];ui[i++]=null;var E=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}E!==0&&_x(a,m,E)}}function Qf(r,i,a,d){ui[Va++]=r,ui[Va++]=i,ui[Va++]=a,ui[Va++]=d,gy|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function my(r,i,a,d){return Qf(r,i,a,d),Gf(r)}function Ys(r,i){return Qf(r,null,null,i),Gf(r)}function _x(r,i,a){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a);for(var m=!1,E=r.return;E!==null;)E.childLanes|=a,d=E.alternate,d!==null&&(d.childLanes|=a),E.tag===22&&(r=E.stateNode,r===null||r._visibility&1||(m=!0)),r=E,E=E.return;return r.tag===3?(E=r.stateNode,m&&i!==null&&(m=31-Ke(a),r=E.hiddenUpdates,d=r[m],d===null?r[m]=[i]:d.push(i),i.lane=a|536870912),E):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 H8(r,i,a,d){this.tag=r,this.key=a,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,a,d){return new H8(r,i,a,d)}function by(r){return r=r.prototype,!(!r||!r.isReactComponent)}function so(r,i){var a=r.alternate;return a===null?(a=qn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&65011712,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a.refCleanup=r.refCleanup,a}function Cx(r,i){r.flags&=65011714;var a=r.alternate;return a===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=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,i=a.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Kf(r,i,a,d,m,E){var V=0;if(d=r,typeof r=="function")by(r)&&(V=1);else if(typeof r=="string")V=V4(r,a,W.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=qn(31,a,i,m),r.elementType=j,r.lanes=E,r;case F:return Vs(a.children,m,E,i);case S:V=8,m|=24;break;case M:return r=qn(12,a,i,m|2),r.elementType=M,r.lanes=E,r;case T:return r=qn(13,a,i,m),r.elementType=T,r.lanes=E,r;case z:return r=qn(19,a,i,m),r.elementType=z,r.lanes=E,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case I:V=10;break e;case A:V=9;break e;case R:V=11;break e;case k:V=14;break e;case L:V=16,d=null;break e}V=29,a=Error(o(130,r===null?"null":typeof r,"")),d=null}return i=qn(V,a,i,m),i.elementType=r,i.type=d,i.lanes=E,i}function Vs(r,i,a,d){return r=qn(7,r,d,i),r.lanes=a,r}function Ay(r,i,a){return r=qn(6,r,null,i),r.lanes=a,r}function Fx(r){var i=qn(18,null,null,0);return i.stateNode=r,i}function wy(r,i,a){return i=qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,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 a=Ox.get(r);return a!==void 0?a:(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,a){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),a+=1;var E=32-Ke(i)+m;if(30<E){var V=m-m%5;E=(d&(1<<V)-1).toString(32),d>>=V,m-=V,$i=1<<32-Ke(i)+m|a<<m|d,zi=E+r}else $i=1<<E|a<<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,a=r.type,d=r.memoizedProps;switch(i[Ht]=r,i[nr]=d,a){case"dialog":It("cancel",i),It("close",i);break;case"iframe":case"object":case"embed":It("load",i);break;case"video":case"audio":for(a=0;a<Ql.length;a++)It(Ql[a],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)}a=d.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||d.suppressHydrationWarning===!0||VS(i.textContent,a)?(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,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=r.type,a=!(a!=="form"&&a!=="button")||$g(r.type,r.memoizedProps)),a=!a),a&&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,a){K(Iy,i._currentValue),i._currentValue=a}function lo(r){r._currentValue=Iy.current,Q(Iy)}function _y(r,i,a){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===a)break;r=r.return}}function Cy(r,i,a,d){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var E=m.dependencies;if(E!==null){var V=m.child;E=E.firstContext;e:for(;E!==null;){var ge=E;E=m;for(var Fe=0;Fe<i.length;Fe++)if(ge.context===i[Fe]){E.lanes|=a,ge=E.alternate,ge!==null&&(ge.lanes|=a),_y(E.return,a,r),d||(V=null);break e}E=ge.next}}else if(m.tag===18){if(V=m.return,V===null)throw Error(o(341));V.lanes|=a,E=V.alternate,E!==null&&(E.lanes|=a),_y(V,a,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,a,d){r=null;for(var m=i,E=!1;m!==null;){if(!E){if((m.flags&524288)!==0)E=!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===ae.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,a,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 a=i._currentValue;if(i={context:i,memoizedValue:a,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 a}var Q8=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(a,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(a){return a()})}},G8=e.unstable_scheduleCallback,K8=e.unstable_NormalPriority,vr={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fy(){return{controller:new Q8,data:new Map,refCount:0}}function Sl(r){r.refCount--,r.refCount===0&&G8(K8,function(){r.controller.abort()})}var Il=null,Oy=0,tu=0,ru=null;function Y8(r,i){if(Il===null){var a=Il=[];Oy=0,tu=Rg(),ru={status:"pending",value:void 0,then:function(d){a.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 V8(r,i){var a=[],d={status:"pending",value:null,reason:null,then:function(m){a.push(m)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var m=0;m<a.length;m++)(0,a[m])(i)},function(m){for(d.status="rejected",d.reason=m,m=0;m<a.length;m++)(0,a[m])(void 0)}),d}var Nx=X.S;X.S=function(r,i){AS=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Y8(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,a){switch(a=r[a],a===void 0?r.push(i):a!==i&&(i.then(io,io),i=a),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(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ta=a,nu):a}}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 a(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 E(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===L&&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 L:return Oe=ea(Oe),Ge(Te,Oe,Re)}if(ne(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===I)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 L:return Re=ea(Re),je(Te,Oe,Re,Qe)}if(ne(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===I)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 L:return Qe=ea(Qe),De(Te,Oe,Re,Qe,pt)}if(ne(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===I)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=E(Nt,Oe,xt),Ut===null?pt=Nt:Ut.sibling=Nt,Ut=Nt,ct=Ot}if(xt===Re.length)return a(Te,ct),Mt&&ao(Te,xt),pt;if(ct===null){for(;xt<Re.length;xt++)ct=Ge(Te,Re[xt],Qe),ct!==null&&(Oe=E(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=E(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=E(As,Oe,xt),Ut===null?pt=As:Ut.sibling=As,Ut=As,ct=Ot}if(Nt.done)return a(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=E(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=E(Nt,Oe,xt),Ut===null?pt=Nt:Ut.sibling=Nt,Ut=Nt);return r&&ct.forEach(function(sR){return i(Te,sR)}),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){a(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===L&&ea(pt)===Oe.type){a(Te,Oe.sibling),Qe=m(Oe,Re.props),Cl(Qe,Re),Qe.return=Te,Te=Qe;break e}a(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){a(Te,Oe.sibling),Qe=m(Oe,Re.children||[]),Qe.return=Te,Te=Qe;break e}else{a(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 L:return Re=ea(Re),Kt(Te,Oe,Re,Qe)}if(ne(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===I)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?(a(Te,Oe.sibling),Qe=m(Oe,Re),Qe.return=Te,Te=Qe):(a(Te,Oe),Qe=Ay(Re,Te.mode,Qe),Qe.return=Te,Te=Qe),V(Te)):a(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,a){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,a),i}return Qf(r,d,i,a),Gf(r)}function Fl(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,a|=d,i.lanes=a,Ze(r,a)}}function jy(r,i){var a=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,a===d)){var m=null,E=null;if(a=a.firstBaseUpdate,a!==null){do{var V={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};E===null?m=E=V:E=E.next=V,a=a.next}while(a!==null);E===null?m=E=i:E=E.next=i}else m=E=i;a={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:E,shared:d.shared,callbacks:d.callbacks},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}var Uy=!1;function Ol(){if(Uy){var r=ru;if(r!==null)throw r}}function Tl(r,i,a,d){Uy=!1;var m=r.updateQueue;rs=!1;var E=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?E=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(E!==null){var Ge=m.baseState;V=0,ze=Me=Fe=null,ge=E;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=a;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,E===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 a=r.callbacks;if(a!==null)for(r.callbacks=null,r=0;r<a.length;r++)Hx(a[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 a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Hg(a)||Qg(a)))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,W8=0;function fr(){throw Error(o(321))}function ky(r,i){if(i===null)return!1;for(var a=0;a<i.length&&a<r.length;a++)if(!zn(r[a],i[a]))return!1;return!0}function Ly(r,i,a,d,m,E){return co=E,vt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,X.H=r===null||r.memoizedState===null?TE:tg,na=!1,E=a(d,m),na=!1,su&&(E=Vx(i,a,d,m)),Yx(r),E}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,a,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 E=r.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}X.H=BE,E=i(a,d)}while(su);return E}function X8(){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,a){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~a}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===I)return Wr(r)}throw Error(o(438,String(r)))}function Hy(r){var i=null,a=vt.updateQueue;if(a!==null&&(i=a.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}),a===null&&(a=sh(),vt.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(r),d=0;d<r;d++)a[d]=U;return i.index++,a}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,a){var d=r.queue;if(d===null)throw Error(o(311));d.lastRenderedReducer=a;var m=r.baseQueue,E=d.pending;if(E!==null){if(m!==null){var V=m.next;m.next=E.next,E.next=V}i.baseQueue=m=E,d.pending=null}if(E=r.baseState,m===null)r.memoizedState=E;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=E):Fe=Fe.next=Ge,vt.lanes|=je,ls|=je;Ge=Me.action,na&&a(E,Ge),E=Me.hasEagerState?Me.eagerState:a(E,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=E):Fe=Fe.next=je,vt.lanes|=Ge,ls|=Ge;Me=Me.next}while(Me!==null&&Me!==i);if(Fe===null?V=E:Fe.next=ge,!zn(E,r.memoizedState)&&(Er=!0,ze&&(a=ru,a!==null)))throw a;r.memoizedState=E,r.baseState=V,r.baseQueue=Fe,d.lastRenderedState=E}return m===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Gy(r){var i=mr(),a=i.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=a.dispatch,m=a.pending,E=i.memoizedState;if(m!==null){a.pending=null;var V=m=m.next;do E=r(E,V.action),V=V.next;while(V!==m);zn(E,i.memoizedState)||(Er=!0),i.memoizedState=E,i.baseQueue===null&&(i.baseState=E),a.lastRenderedState=E}return[E,d]}function Wx(r,i,a){var d=vt,m=mr(),E=Mt;if(E){if(a===void 0)throw Error(o(407));a=a()}else a=i();var V=!zn((Qt||m).memoizedState,a);if(V&&(m.memoizedState=a,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,a,i),null),Wt===null)throw Error(o(349));E||(co&127)!==0||Xx(d,i,a)}return a}function Xx(r,i,a){r.flags|=16384,r={getSnapshot:i,value:a},i=vt.updateQueue,i===null?(i=sh(),vt.updateQueue=i,i.stores=[r]):(a=i.stores,a===null?i.stores=[r]:a.push(r))}function Jx(r,i,a,d){i.value=a,i.getSnapshot=d,eE(i)&&tE(r)}function Zx(r,i,a){return a(function(){eE(i)&&tE(r)})}function eE(r){var i=r.getSnapshot;r=r.value;try{var a=i();return!zn(r,a)}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 a=r;if(r=a(),na){He(!0);try{a()}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,a,d){return r.baseState=a,Qy(r,Qt,typeof d=="function"?d:fo)}function J8(r,i,a,d,m){if(fh(r))throw Error(o(485));if(r=i.action,r!==null){var E={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(V){E.listeners.push(V)}};X.T!==null?a(!0):E.isTransition=!1,d(E),a=i.pending,a===null?(E.next=i.pending=E,nE(i,E)):(E.next=a.next,i.pending=a.next=E)}}function nE(r,i){var a=i.action,d=i.payload,m=r.state;if(i.isTransition){var E=X.T,V={};X.T=V;try{var ge=a(m,d),Fe=X.S;Fe!==null&&Fe(V,ge),iE(r,i,ge)}catch(Me){Yy(r,i,Me)}finally{E!==null&&V.types!==null&&(E.types=V.types),X.T=E}}else try{E=a(m,d),iE(r,i,E)}catch(Me){Yy(r,i,Me)}}function iE(r,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(d){oE(r,i,d)},function(d){return Yy(r,i,d)}):oE(r,i,a)}function oE(r,i,a){i.status="fulfilled",i.value=a,sE(i),r.state=a,i=r.pending,i!==null&&(a=i.next,a===i?r.pending=null:(a=a.next,i.next=a,nE(r,a)))}function Yy(r,i,a){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=a,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 a=Wt.formState;if(a!==null){e:{var d=vt;if(Mt){if(Zt){t:{for(var m=Zt,E=hi;m.nodeType!==8;){if(!E){m=null;break t}if(m=pi(m.nextSibling),m===null){m=null;break t}}E=m.data,m=E==="F!"||E==="F"?m:null}if(m){Zt=pi(m.nextSibling),d=m.data==="F!";break e}}es(d)}d=!1}d&&(i=a[0])}}return a=mn(),a.memoizedState=a.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aE,lastRenderedState:i},a.queue=d,a=CE.bind(null,vt,d),d.dispatch=a,d=Ky(!1),E=eg.bind(null,vt,!1,d.queue),d=mn(),m={state:i,dispatch:null,action:r,pending:null},d.queue=m,a=J8.bind(null,vt,m,E,a),m.dispatch=a,d.memoizedState=r,[i,a,!1]}function lE(r){var i=mr();return cE(i,Qt,r)}function cE(r,i,a){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,E=m.dispatch;return a!==i.memoizedState&&(vt.flags|=2048,uu(9,{destroy:void 0},Z8.bind(null,m,a),null)),[d,E,r]}function Z8(r,i){r.action=i}function fE(r){var i=mr(),a=Qt;if(a!==null)return cE(i,a,r);mr(),i=i.memoizedState,a=mr();var d=a.queue.dispatch;return a.memoizedState=r,[i,d,!1]}function uu(r,i,a,d){return r={tag:r,create:a,deps:d,inst:i,next:null},i=vt.updateQueue,i===null&&(i=sh(),vt.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=r.next=r:(d=a.next,a.next=r,r.next=d,i.lastEffect=r),r}function hE(){return mr().memoizedState}function lh(r,i,a,d){var m=mn();vt.flags|=r,m.memoizedState=uu(1|i,{destroy:void 0},a,d===void 0?null:d)}function ch(r,i,a,d){var m=mr();d=d===void 0?null:d;var E=m.memoizedState.inst;Qt!==null&&d!==null&&ky(d,Qt.memoizedState.deps)?m.memoizedState=uu(i,E,a,d):(vt.flags|=r,m.memoizedState=uu(1|i,E,a,d))}function dE(r,i){lh(8390656,8,r,i)}function Vy(r,i){ch(2048,8,r,i)}function e4(r){vt.flags|=4;var i=vt.updateQueue;if(i===null)i=sh(),vt.updateQueue=i,i.events=[r];else{var a=i.events;a===null?i.events=[r]:a.push(r)}}function pE(r){var i=mr().memoizedState;return e4({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 a=i(r);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function bE(r,i,a){a=a!=null?a.concat([r]):null,ch(4,4,mE.bind(null,i,r),a)}function Wy(){}function AE(r,i){var a=mr();i=i===void 0?null:i;var d=a.memoizedState;return i!==null&&ky(i,d[1])?d[0]:(a.memoizedState=[r,i],r)}function wE(r,i){var a=mr();i=i===void 0?null:i;var d=a.memoizedState;if(i!==null&&ky(i,d[1]))return d[0];if(d=r(),na){He(!0);try{r()}finally{He(!1)}}return a.memoizedState=[d,i],d}function Xy(r,i,a){return a===void 0||(co&1073741824)!==0&&(Ft&261930)===0?r.memoizedState=i:(r.memoizedState=a,r=vS(),vt.lanes|=r,ls|=r,a)}function vE(r,i,a,d){return zn(a,i)?a:ou.current!==null?(r=Xy(r,a,d),zn(r,i)||(Er=!0),r):(co&42)===0||(co&1073741824)!==0&&(Ft&261930)===0?(Er=!0,r.memoizedState=a):(r=vS(),vt.lanes|=r,ls|=r,i)}function xE(r,i,a,d,m){var E=ue.p;ue.p=E!==0&&8>E?E:8;var V=X.T,ge={};X.T=ge,eg(r,!1,i,a);try{var Fe=m(),Me=X.S;if(Me!==null&&Me(ge,Fe),Fe!==null&&typeof Fe=="object"&&typeof Fe.then=="function"){var ze=V8(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{ue.p=E,V!==null&&ge.types!==null&&(V.types=ge.types),X.T=V}}function t4(){}function Jy(r,i,a,d){if(r.tag!==5)throw Error(o(476));var m=EE(r).queue;xE(r,m,i,ye,a===null?t4:function(){return SE(r),a(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 a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:a},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 r4(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var a=Yn();r=ns(a);var d=is(i,r,a);d!==null&&(Fn(d,i,a),Fl(d,i,a)),i={cache:Fy()},r.payload=i;return}i=i.return}}function n4(r,i,a){var d=Yn();a={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fh(r)?FE(i,a):(a=my(r,i,a,d),a!==null&&(Fn(a,r,d),OE(a,i,d)))}function CE(r,i,a){var d=Yn();Ml(r,i,a,d)}function Ml(r,i,a,d){var m={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(fh(r))FE(i,m);else{var E=r.alternate;if(r.lanes===0&&(E===null||E.lanes===0)&&(E=i.lastRenderedReducer,E!==null))try{var V=i.lastRenderedState,ge=E(V,a);if(m.hasEagerState=!0,m.eagerState=ge,zn(ge,V))return Qf(r,i,m,0),Wt===null&&Hf(),!1}catch{}finally{}if(a=my(r,i,m,d),a!==null)return Fn(a,r,d),OE(a,i,d),!0}return!1}function eg(r,i,a,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,a,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 a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function OE(r,i,a){if((a&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,a|=d,i.lanes=a,Ze(r,a)}}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,a){a=a!=null?a.concat([r]):null,lh(4194308,4,mE.bind(null,i,r),a)},useLayoutEffect:function(r,i){return lh(4194308,4,r,i)},useInsertionEffect:function(r,i){lh(4,2,r,i)},useMemo:function(r,i){var a=mn();i=i===void 0?null:i;var d=r();if(na){He(!0);try{r()}finally{He(!1)}}return a.memoizedState=[d,i],d},useReducer:function(r,i,a){var d=mn();if(a!==void 0){var m=a(i);if(na){He(!0);try{a(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=n4.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,a=CE.bind(null,vt,i);return i.dispatch=a,[r.memoizedState,a]},useDebugValue:Wy,useDeferredValue:function(r,i){var a=mn();return Xy(a,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,a){var d=vt,m=mn();if(Mt){if(a===void 0)throw Error(o(407));a=a()}else{if(a=i(),Wt===null)throw Error(o(349));(Ft&127)!==0||Xx(d,i,a)}m.memoizedState=a;var E={value:a,getSnapshot:i};return m.queue=E,dE(Zx.bind(null,d,E,r),[r]),d.flags|=2048,uu(9,{destroy:void 0},Jx.bind(null,d,E,a,i),null),a},useId:function(){var r=mn(),i=Wt.identifierPrefix;if(Mt){var a=zi,d=$i;a=(d&~(1<<32-Ke(d)-1)).toString(32)+a,i="_"+i+"R_"+a,a=oh++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=W8++,i="_"+i+"r_"+a.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Zy,useFormState:uE,useActionState:uE,useOptimistic:function(r){var i=mn();i.memoizedState=i.baseState=r;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=eg.bind(null,vt,!0,a),a.dispatch=i,[r,i]},useMemoCache:Hy,useCacheRefresh:function(){return mn().memoizedState=r4.bind(null,vt)},useEffectEvent:function(r){var i=mn(),a={impl:r};return i.memoizedState=a,function(){if((Pt&2)!==0)throw Error(o(440));return a.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 a=mr();return vE(a,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 a=mr();return rE(a,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 a=mr();return Qt===null?Xy(a,r,i):vE(a,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 a=mr();return Qt!==null?rE(a,Qt,r,i):(a.baseState=r,[r,a.queue.dispatch])},useMemoCache:Hy,useCacheRefresh:_E};BE.useEffectEvent=pE;function rg(r,i,a,d){i=r.memoizedState,a=a(d,i),a=a==null?i:y({},i,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var ng={enqueueSetState:function(r,i,a){r=r._reactInternals;var d=Yn(),m=ns(d);m.payload=i,a!=null&&(m.callback=a),i=is(r,m,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueReplaceState:function(r,i,a){r=r._reactInternals;var d=Yn(),m=ns(d);m.tag=1,m.payload=i,a!=null&&(m.callback=a),i=is(r,m,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var a=Yn(),d=ns(a);d.tag=2,i!=null&&(d.callback=i),i=is(r,d,a),i!==null&&(Fn(i,r,a),Fl(i,r,a))}};function RE(r,i,a,d,m,E,V){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,E,V):i.prototype&&i.prototype.isPureReactComponent?!wl(a,d)||!wl(m,E):!0}function ME(r,i,a,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,d),i.state!==r&&ng.enqueueReplaceState(i,i.state,null)}function ia(r,i){var a=i;if("ref"in i){a={};for(var d in i)d!=="ref"&&(a[d]=i[d])}if(r=r.defaultProps){a===i&&(a=y({},a));for(var m in r)a[m]===void 0&&(a[m]=r[m])}return a}function jE(r){qf(r)}function UE(r){console.error(r)}function NE(r){qf(r)}function hh(r,i){try{var a=r.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function DE(r,i,a){try{var d=r.onCaughtError;d(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ig(r,i,a){return a=ns(a),a.tag=3,a.payload={element:null},a.callback=function(){hh(r,i)},a}function PE(r){return r=ns(r),r.tag=3,r}function kE(r,i,a,d){var m=a.type.getDerivedStateFromError;if(typeof m=="function"){var E=d.value;r.payload=function(){return m(E)},r.callback=function(){DE(i,a,d)}}var V=a.stateNode;V!==null&&typeof V.componentDidCatch=="function"&&(r.callback=function(){DE(i,a,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 i4(r,i,a,d,m){if(a.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=a.alternate,i!==null&&eu(i,a,m,!0),a=Hn.current,a!==null){switch(a.tag){case 31:case 13:return di===null?Sh():a.alternate===null&&hr===0&&(hr=3),a.flags&=-257,a.flags|=65536,a.lanes=m,d===Zf?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([d]):i.add(d),Og(r,d,m)),!1;case 22:return a.flags|=65536,d===Zf?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([d]):a.add(d)),Og(r,d,m)),!1}throw Error(o(435,a.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,a)))):(d!==Ey&&(i=Error(o(423),{cause:d}),El(li(i,a))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,d=li(d,a),m=ig(r.stateNode,d,m),jy(r,m),hr!==4&&(hr=2)),!1;var E=Error(o(520),{cause:d});if(E=li(E,a),zl===null?zl=[E]:zl.push(E),hr!==4&&(hr=2),i===null)return!0;d=li(d,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,r=m&-m,a.lanes|=r,r=ig(a.stateNode,d,r),jy(a,r),!1;case 1:if(i=a.type,E=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(cs===null||!cs.has(E))))return a.flags|=65536,m&=-m,a.lanes|=m,m=PE(m),kE(m,r,a,d),jy(a,m),!1}a=a.return}while(a!==null);return!1}var og=Error(o(461)),Er=!1;function Xr(r,i,a,d){i.child=r===null?qx(i,null,a,d):ra(i,r.child,a,d)}function LE(r,i,a,d,m){a=a.render;var E=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,a,V,E,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,a,d,m){if(r===null){var E=a.type;return typeof E=="function"&&!by(E)&&E.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=E,zE(r,i,E,d,m)):(r=Kf(a.type,null,d,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(E=r.child,!dg(r,m)){var V=E.memoizedProps;if(a=a.compare,a=a!==null?a:wl,a(V,d)&&r.ref===i.ref)return ho(r,i,m)}return i.flags|=1,r=so(E,d),r.ref=i.ref,r.return=i,i.child=r}function zE(r,i,a,d,m){if(r!==null){var E=r.memoizedProps;if(wl(E,d)&&r.ref===i.ref)if(Er=!1,i.pendingProps=d=E,dg(r,m))(r.flags&131072)!==0&&(Er=!0);else return i.lanes=r.lanes,ho(r,i,m)}return sg(r,i,a,d,m)}function qE(r,i,a,d){var m=d.children,E=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(E=E!==null?E.baseLanes|a:a,r!==null){for(d=i.child=r.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;d=m&~E}else d=0,i.child=null;return HE(r,i,E,a,d)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Xf(i,E!==null?E.cachePool:null),E!==null?Gx(i,E):Ny(),Kx(i);else return d=i.lanes=536870912,HE(r,i,E!==null?E.baseLanes|a:a,a,d)}else E!==null?(Xf(i,E.cachePool),Gx(i,E),ss(),i.memoizedState=null):(r!==null&&Xf(i,null),Ny(),ss());return Xr(r,i,m,a),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,a,d,m){var E=Ty();return E=E===null?null:{parent:vr._currentValue,pool:E},i.memoizedState={baseLanes:a,cachePool:E},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,a){return ra(i,r.child,null,a),r=dh(i,i.pendingProps),r.flags|=2,Qn(i),i.memoizedState=null,r}function o4(r,i,a){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},a=Fx(r),a.return=i,i.child=a,Vr=i,Zt=null)):r=null,r===null)throw es(i);return i.lanes=536870912,null}return dh(i,d)}var E=r.memoizedState;if(E!==null){var V=E.dehydrated;if(Py(i),m)if(i.flags&256)i.flags&=-257,i=QE(r,i,a);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,a,!1),m=(a&r.childLanes)!==0,Er||m){if(d=Wt,d!==null&&(V=st(d,a),V!==0&&V!==E.retryLane))throw E.retryLane=V,Ys(r,V),Fn(d,r,V),og;Sh(),i=QE(r,i,a)}else r=E.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 a=i.ref;if(a===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(r===null||r.ref!==a)&&(i.flags|=4194816)}}function sg(r,i,a,d,m){return Js(i),a=Ly(r,i,a,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,a,m),i.child)}function GE(r,i,a,d,m,E){return Js(i),i.updateQueue=null,a=Vx(i,d,a,m),Yx(r),d=$y(),r!==null&&!Er?(zy(r,i,E),ho(r,i,E)):(Mt&&d&&vy(i),i.flags|=1,Xr(r,i,a,E),i.child)}function KE(r,i,a,d,m){if(Js(i),i.stateNode===null){var E=Wa,V=a.contextType;typeof V=="object"&&V!==null&&(E=Wr(V)),E=new a(d,E),i.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=ng,i.stateNode=E,E._reactInternals=i,E=i.stateNode,E.props=d,E.state=i.memoizedState,E.refs={},Ry(i),V=a.contextType,E.context=typeof V=="object"&&V!==null?Wr(V):Wa,E.state=i.memoizedState,V=a.getDerivedStateFromProps,typeof V=="function"&&(rg(i,a,V,d),E.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(V=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),V!==E.state&&ng.enqueueReplaceState(E,E.state,null),Tl(i,d,E,m),Ol(),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){E=i.stateNode;var ge=i.memoizedProps,Fe=ia(a,ge);E.props=Fe;var Me=E.context,ze=a.contextType;V=Wa,typeof ze=="object"&&ze!==null&&(V=Wr(ze));var Ge=a.getDerivedStateFromProps;ze=typeof Ge=="function"||typeof E.getSnapshotBeforeUpdate=="function",ge=i.pendingProps!==ge,ze||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(ge||Me!==V)&&ME(i,E,d,V),rs=!1;var je=i.memoizedState;E.state=je,Tl(i,d,E,m),Ol(),Me=i.memoizedState,ge||je!==Me||rs?(typeof Ge=="function"&&(rg(i,a,Ge,d),Me=i.memoizedState),(Fe=rs||RE(i,a,Fe,d,je,Me,V))?(ze||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(i.flags|=4194308)):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=Me),E.props=d,E.state=Me,E.context=V,d=Fe):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{E=i.stateNode,My(r,i),V=i.memoizedProps,ze=ia(a,V),E.props=ze,Ge=i.pendingProps,je=E.context,Me=a.contextType,Fe=Wa,typeof Me=="object"&&Me!==null&&(Fe=Wr(Me)),ge=a.getDerivedStateFromProps,(Me=typeof ge=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(V!==Ge||je!==Fe)&&ME(i,E,d,Fe),rs=!1,je=i.memoizedState,E.state=je,Tl(i,d,E,m),Ol();var De=i.memoizedState;V!==Ge||je!==De||rs||r!==null&&r.dependencies!==null&&Vf(r.dependencies)?(typeof ge=="function"&&(rg(i,a,ge,d),De=i.memoizedState),(ze=rs||RE(i,a,ze,d,je,De,Fe)||r!==null&&r.dependencies!==null&&Vf(r.dependencies))?(Me||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(d,De,Fe),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(d,De,Fe)),typeof E.componentDidUpdate=="function"&&(i.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof E.componentDidUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=De),E.props=d,E.state=De,E.context=Fe,d=ze):(typeof E.componentDidUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&je===r.memoizedState||(i.flags|=1024),d=!1)}return E=d,ph(r,i),d=(i.flags&128)!==0,E||d?(E=i.stateNode,a=d&&typeof a.getDerivedStateFromError!="function"?null:E.render(),i.flags|=1,r!==null&&d?(i.child=ra(i,r.child,null,m),i.child=ra(i,null,a,m)):Xr(r,i,a,m),i.memoizedState=E.state,r=i.child):r=ho(r,i,m),r}function YE(r,i,a,d){return Ws(),i.flags|=256,Xr(r,i,a,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,a){return r=r!==null?r.childLanes&~a:0,i&&(r|=Kn),r}function VE(r,i,a){var d=i.pendingProps,m=!1,E=(i.flags&128)!==0,V;if((V=E)||(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},a=Fx(r),a.return=i,i.child=a,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,a,null),ge.return=i,d.return=i,ge.sibling=d,i.child=ge,d=i.child,d.memoizedState=ug(a),d.childLanes=lg(r,V,a),i.memoizedState=ag,Ul(null,d)):(os(i),cg(i,ge))}var Fe=r.memoizedState;if(Fe!==null&&(ge=Fe.dehydrated,ge!==null)){if(E)i.flags&256?(os(i),i.flags&=-257,i=fg(r,i,a)):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,a,null),ge.flags|=2,d.return=i,ge.return=i,d.sibling=ge,i.child=d,ra(i,r.child,null,a),d=i.child,d.memoizedState=ug(a),d.childLanes=lg(r,V,a),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,a)}else if(Er||eu(r,i,a,!1),V=(a&r.childLanes)!==0,Er||V){if(V=Wt,V!==null&&(d=st(V,a),d!==0&&d!==Fe.retryLane))throw Fe.retryLane=d,Ys(r,d),Fn(V,r,d),og;Hg(ge)||Sh(),i=fg(r,i,a)}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,a,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(a):(m=ge.cachePool,m!==null?(Fe=vr._currentValue,m=m.parent!==Fe?{parent:Fe,pool:Fe}:m):m=Dx(),ge={baseLanes:ge.baseLanes|a,cachePool:m}),d.memoizedState=ge,d.childLanes=lg(r,V,a),i.memoizedState=ag,Ul(r.child,d)):(os(i),a=r.child,r=a.sibling,a=so(a,{mode:"visible",children:d.children}),a.return=i,a.sibling=null,r!==null&&(V=i.deletions,V===null?(i.deletions=[r],i.flags|=16):V.push(r)),i.child=a,i.memoizedState=null,a)}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,a){return ra(i,r.child,null,a),r=cg(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function WE(r,i,a){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),_y(r.return,i,a)}function hg(r,i,a,d,m,E){var V=r.memoizedState;V===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:a,tailMode:m,treeForkCount:E}:(V.isBackwards=i,V.rendering=null,V.renderingStartTime=0,V.last=d,V.tail=a,V.tailMode=m,V.treeForkCount=E)}function XE(r,i,a){var d=i.pendingProps,m=d.revealOrder,E=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,a),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,a,i);else if(r.tag===19)WE(r,a,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(a=i.child,m=null;a!==null;)r=a.alternate,r!==null&&nh(r)===null&&(m=a),a=a.sibling;a=m,a===null?(m=i.child,i.child=null):(m=a.sibling,a.sibling=null),hg(i,!1,m,a,E,d);break;case"backwards":case"unstable_legacy-backwards":for(a=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=a,a=m,m=r}hg(i,!0,a,null,E,d);break;case"together":hg(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function ho(r,i,a){if(r!==null&&(i.dependencies=r.dependencies),ls|=i.lanes,(a&i.childLanes)===0)if(r!==null){if(eu(r,i,a,!1),(a&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,a=so(r,r.pendingProps),i.child=a,a.return=i;r.sibling!==null;)r=r.sibling,a=a.sibling=so(r,r.pendingProps),a.return=i;a.sibling=null}return i.child}function dg(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Vf(r)))}function s4(r,i,a){switch(i.tag){case 3:ie(i,i.stateNode.containerInfo),ts(i,vr,r.memoizedState.cache),Ws();break;case 27:case 5:O(i);break;case 4:ie(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):(a&i.child.childLanes)!==0?VE(r,i,a):(os(i),r=ho(r,i,a),r!==null?r.sibling:null);os(i);break;case 19:var m=(r.flags&128)!==0;if(d=(a&i.childLanes)!==0,d||(eu(r,i,a,!1),d=(a&i.childLanes)!==0),m){if(d)return XE(r,i,a);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,a,i.pendingProps);case 24:ts(i,vr,r.memoizedState.cache)}return ho(r,i,a)}function JE(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps)Er=!0;else{if(!dg(r,a)&&(i.flags&128)===0)return Er=!1,s4(r,i,a);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,a)):(i.tag=0,i=sg(null,i,r,d,a));else{if(r!=null){var m=r.$$typeof;if(m===R){i.tag=11,i=LE(null,i,r,d,a);break e}else if(m===k){i.tag=14,i=$E(null,i,r,d,a);break e}}throw i=re(r)||r,Error(o(306,i,""))}}return i;case 0:return sg(r,i,i.type,i.pendingProps,a);case 1:return d=i.type,m=ia(d,i.pendingProps),KE(r,i,d,m,a);case 3:e:{if(ie(i,i.stateNode.containerInfo),r===null)throw Error(o(387));d=i.pendingProps;var E=i.memoizedState;m=E.element,My(r,i),Tl(i,d,null,a);var V=i.memoizedState;if(d=V.cache,ts(i,vr,d),d!==E.cache&&Cy(i,[vr],a,!0),Ol(),d=V.element,E.isDehydrated)if(E={element:d,isDehydrated:!1,cache:V.cache},i.updateQueue.baseState=E,i.memoizedState=E,i.flags&256){i=YE(r,i,d,a);break e}else if(d!==m){m=li(Error(o(424)),i),El(m),i=YE(r,i,d,a);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,a=qx(i,null,d,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ws(),d===m){i=ho(r,i,a);break e}Xr(r,i,d,a)}i=i.child}return i;case 26:return ph(r,i),r===null?(a=l2(i.type,null,i.pendingProps,null))?i.memoizedState=a:Mt||(a=i.type,r=i.pendingProps,d=Bh(fe.current).createElement(a),d[Ht]=i,d[nr]=r,Jr(d,a,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,a),ph(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Mt&&((m=d=Zt)&&(d=N4(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,E=i.pendingProps,V=r!==null?r.memoizedProps:null,d=E.children,$g(m,E)?d=null:V!==null&&$g(m,V)&&(i.flags|=32),i.memoizedState!==null&&(m=Ly(r,i,X8,null,null,a),Wl._currentValue=m),ph(r,i),Xr(r,i,d,a),i.child;case 6:return r===null&&Mt&&((r=a=Zt)&&(a=D4(a,i.pendingProps,hi),a!==null?(i.stateNode=a,Vr=i,Zt=null,r=!0):r=!1),r||es(i)),null;case 13:return VE(r,i,a);case 4:return ie(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=ra(i,null,d,a):Xr(r,i,d,a),i.child;case 11:return LE(r,i,i.type,i.pendingProps,a);case 7:return Xr(r,i,i.pendingProps,a),i.child;case 8:return Xr(r,i,i.pendingProps.children,a),i.child;case 12:return Xr(r,i,i.pendingProps.children,a),i.child;case 10:return d=i.pendingProps,ts(i,i.type,d.value),Xr(r,i,d.children,a),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,a),i.child;case 14:return $E(r,i,i.type,i.pendingProps,a);case 15:return zE(r,i,i.type,i.pendingProps,a);case 19:return XE(r,i,a);case 31:return o4(r,i,a);case 22:return qE(r,i,a,i.pendingProps);case 24:return Js(i),d=Wr(vr),r===null?(m=Ty(),m===null&&(m=Wt,E=Fy(),m.pooledCache=E,E.refCount++,E!==null&&(m.pooledCacheLanes|=a),m=E),i.memoizedState={parent:d,cache:m},Ry(i),ts(i,vr,m)):((r.lanes&a)!==0&&(My(r,i),Tl(i,null,null,a),Ol()),m=r.memoizedState,E=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=E.cache,ts(i,vr,d),d!==m.cache&&Cy(i,[vr],a,!0))),Xr(r,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function po(r){r.flags|=4}function pg(r,i,a,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 a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.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,a=0,d=0;if(i)for(var m=r.child;m!==null;)a|=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;)a|=m.lanes|m.childLanes,d|=m.subtreeFlags,d|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=d,r.childLanes=a,i}function a4(r,i,a){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 a=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),lo(vr),J(),a.pendingContext&&(a.context=a.pendingContext,a.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,E=i.memoizedState;return r===null?(po(i),E!==null?(er(i),ZE(i,E)):(er(i),pg(i,m,null,d,a))):E?E!==r.memoizedState?(po(i),er(i),ZE(i,E)):(er(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&po(i),er(i),pg(i,m,r,d,a)),null;case 27:if(H(i),a=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,a),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(E=W.current,Za(i))Rx(i);else{var V=Bh(fe.current);switch(E){case 1:E=V.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:E=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":E=V.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":E=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":E=V.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof d.is=="string"?V.createElement("select",{is:d.is}):V.createElement("select"),d.multiple?E.multiple=!0:d.size&&(E.size=d.size);break;default:E=typeof d.is=="string"?V.createElement(m,{is:d.is}):V.createElement(m)}}E[Ht]=i,E[nr]=d;e:for(V=i.child;V!==null;){if(V.tag===5||V.tag===6)E.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=E;e:switch(Jr(E,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,a),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,a=i.memoizedProps,d=null,m=Vr,m!==null)switch(m.tag){case 27:case 5:d=m.memoizedProps}r[Ht]=i,r=!!(r.nodeValue===a||d!==null&&d.suppressHydrationWarning===!0||VS(r.nodeValue,a)),r||es(i,!0)}else r=Bh(r).createTextNode(d),r[Ht]=i,i.stateNode=r}return er(i),null;case 31:if(a=i.memoizedState,r===null||r.memoizedState!==null){if(d=Za(i),a!==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 a=Sy(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=a),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=a,i):(a=d!==null,r=r!==null&&r.memoizedState!==null,a&&(d=i.child,m=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(m=d.alternate.memoizedState.cachePool.pool),E=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(E=d.memoizedState.cachePool.pool),E!==m&&(d.flags|=2048)),a!==r&&a&&(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,E=d.rendering,E===null)if(m)Nl(d,!1);else{if(hr!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(E=nh(r),E!==null){for(i.flags|=128,Nl(d,!1),r=E.updateQueue,i.updateQueue=r,gh(i,r),i.subtreeFlags=0,r=a,a=i.child;a!==null;)Cx(a,r),a=a.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(E),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"&&!E.alternate&&!Mt)return er(i),null}else 2*de()-d.renderingStartTime>vh&&a!==536870912&&(i.flags|=128,m=!0,Nl(d,!1),i.lanes=4194304);d.isBackwards?(E.sibling=i.child,i.child=E):(r=d.last,r!==null?r.sibling=E:i.child=E,d.last=E)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=de(),r.sibling=null,a=gr.current,K(gr,m?a&1|2:a&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?(a&536870912)!==0&&(i.flags&128)===0&&(er(i),i.subtreeFlags&6&&(i.flags|=8192)):er(i),a=i.updateQueue,a!==null&&gh(i,a.retryQueue),a=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==a&&(i.flags|=2048),r!==null&&Q(Zs),null;case 24:return a=null,r!==null&&(a=r.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),lo(vr),er(i),null;case 25:return null;case 30:return null}throw Error(o(156,i.tag))}function u4(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 a=i.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var m=d.next;a=m;do{if((a.tag&r)===r){d=void 0;var E=a.create,V=a.inst;d=E(),V.destroy=d}a=a.next}while(a!==m)}}catch(ge){Lt(i,i.return,ge)}}function as(r,i,a){try{var d=i.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var E=m.next;d=E;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=a,Me=ge;try{Me()}catch(ze){Lt(m,Fe,ze)}}}d=d.next}while(d!==E)}}catch(ze){Lt(i,i.return,ze)}}function tS(r){var i=r.updateQueue;if(i!==null){var a=r.stateNode;try{Qx(i,a)}catch(d){Lt(r,r.return,d)}}}function rS(r,i,a){a.props=ia(r.type,r.memoizedProps),a.state=r.memoizedState;try{a.componentWillUnmount()}catch(d){Lt(r,i,d)}}function Pl(r,i){try{var a=r.ref;if(a!==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 a=="function"?r.refCleanup=a(d):a.current=d}}catch(m){Lt(r,i,m)}}function qi(r,i){var a=r.ref,d=r.refCleanup;if(a!==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 a=="function")try{a(null)}catch(m){Lt(r,i,m)}else a.current=null}function nS(r){var i=r.type,a=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&d.focus();break e;case"img":a.src?d.src=a.src:a.srcSet&&(d.srcset=a.srcSet)}}catch(m){Lt(r,r.return,m)}}function yg(r,i,a){try{var d=r.stateNode;T4(d,r.type,a,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,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(r,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(r),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=io));else if(d!==4&&(d===27&&ps(r.type)&&(a=r.stateNode,i=null),r=r.child,r!==null))for(mg(r,i,a),r=r.sibling;r!==null;)mg(r,i,a),r=r.sibling}function mh(r,i,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(d!==4&&(d===27&&ps(r.type)&&(a=r.stateNode),r=r.child,r!==null))for(mh(r,i,a),r=r.sibling;r!==null;)mh(r,i,a),r=r.sibling}function oS(r){var i=r.stateNode,a=r.memoizedProps;try{for(var d=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Jr(i,d,a),i[Ht]=r,i[nr]=a}catch(E){Lt(r,r.return,E)}}var yo=!1,Sr=!1,bg=!1,sS=typeof WeakSet=="function"?WeakSet:Set,Lr=null;function l4(r,i){if(r=r.containerInfo,kg=Ph,r=mx(r),fy(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var d=a.getSelection&&a.getSelection();if(d&&d.rangeCount!==0){a=d.anchorNode;var m=d.anchorOffset,E=d.focusNode;d=d.focusOffset;try{a.nodeType,E.nodeType}catch{a=null;break e}var V=0,ge=-1,Fe=-1,Me=0,ze=0,Ge=r,je=null;t:for(;;){for(var De;Ge!==a||m!==0&&Ge.nodeType!==3||(ge=V+m),Ge!==E||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===a&&++Me===m&&(ge=V),je===E&&++ze===d&&(Fe=V),(De=Ge.nextSibling)!==null)break;Ge=je,je=Ge.parentNode}Ge=De}a=ge===-1||Fe===-1?null:{start:ge,end:Fe}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lg={focusedElem:r,selectionRange:a},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,E=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(a=0;a<r.length;a++)m=r[a],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&E!==null){r=void 0,a=i,m=E.memoizedProps,E=E.memoizedState,d=a.stateNode;try{var ut=ia(a.type,m);r=d.getSnapshotBeforeUpdate(ut,E),d.__reactInternalSnapshotBeforeUpdate=r}catch(mt){Lt(a,a.return,mt)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,a=r.nodeType,a===9)qg(r);else if(a===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,a){var d=a.flags;switch(a.tag){case 0:case 11:case 15:mo(r,a),d&4&&Dl(5,a);break;case 1:if(mo(r,a),d&4)if(r=a.stateNode,i===null)try{r.componentDidMount()}catch(V){Lt(a,a.return,V)}else{var m=ia(a.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(V){Lt(a,a.return,V)}}d&64&&tS(a),d&512&&Pl(a,a.return);break;case 3:if(mo(r,a),d&64&&(r=a.updateQueue,r!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Qx(r,i)}catch(V){Lt(a,a.return,V)}}break;case 27:i===null&&d&4&&oS(a);case 26:case 5:mo(r,a),i===null&&d&4&&nS(a),d&512&&Pl(a,a.return);break;case 12:mo(r,a);break;case 31:mo(r,a),d&4&&cS(r,a);break;case 13:mo(r,a),d&4&&fS(r,a),d&64&&(r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(a=b4.bind(null,a),P4(r,a))));break;case 22:if(d=a.memoizedState!==null||yo,!d){i=i!==null&&i.memoizedState!==null||Sr,m=yo;var E=Sr;yo=d,(Sr=i)&&!E?bo(r,a,(a.subtreeFlags&8772)!==0):mo(r,a),yo=m,Sr=E}break;case 30:break;default:mo(r,a)}}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,a){for(a=a.child;a!==null;)lS(r,i,a),a=a.sibling}function lS(r,i,a){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(we,a)}catch{}switch(a.tag){case 26:Sr||qi(a,i),go(r,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Sr||qi(a,i);var d=ir,m=Sn;ps(a.type)&&(ir=a.stateNode,Sn=!1),go(r,i,a),Kl(a.stateNode),ir=d,Sn=m;break;case 5:Sr||qi(a,i);case 6:if(d=ir,m=Sn,ir=null,go(r,i,a),ir=d,Sn=m,ir!==null)if(Sn)try{(ir.nodeType===9?ir.body:ir.nodeName==="HTML"?ir.ownerDocument.body:ir).removeChild(a.stateNode)}catch(E){Lt(a,i,E)}else try{ir.removeChild(a.stateNode)}catch(E){Lt(a,i,E)}break;case 18:ir!==null&&(Sn?(r=ir,t2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.stateNode),wu(r)):t2(ir,a.stateNode));break;case 4:d=ir,m=Sn,ir=a.stateNode.containerInfo,Sn=!0,go(r,i,a),ir=d,Sn=m;break;case 0:case 11:case 14:case 15:as(2,a,i),Sr||as(4,a,i),go(r,i,a);break;case 1:Sr||(qi(a,i),d=a.stateNode,typeof d.componentWillUnmount=="function"&&rS(a,i,d)),go(r,i,a);break;case 21:go(r,i,a);break;case 22:Sr=(d=Sr)||a.memoizedState!==null,go(r,i,a),Sr=d;break;default:go(r,i,a)}}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(a){Lt(i,i.return,a)}}}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(a){Lt(i,i.return,a)}}function c4(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 a=c4(r);i.forEach(function(d){if(!a.has(d)){a.add(d);var m=A4.bind(null,r,d);d.then(m,m)}})}function In(r,i){var a=i.deletions;if(a!==null)for(var d=0;d<a.length;d++){var m=a[d],E=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(E,V,m),ir=null,Sn=!1,E=m.alternate,E!==null&&(E.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 a=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||a===null||qi(a,a.return)),d&64&&yo&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(a=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=a===null?d:a.concat(d))));break;case 26:var m=_i;if(In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.return)),d&4){var E=a!==null?a.memoizedState:null;if(d=r.memoizedState,a===null)if(d===null)if(r.stateNode===null){e:{d=r.type,a=r.memoizedProps,m=m.ownerDocument||m;t:switch(d){case"title":E=m.getElementsByTagName("title")[0],(!E||E[wr]||E[Ht]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=m.createElement(d),m.head.insertBefore(E,m.querySelector("head > title"))),Jr(E,d,a),E[Ht]=r,ur(E),d=E;break e;case"link":var V=h2("link","href",m).get(d+(a.href||""));if(V){for(var ge=0;ge<V.length;ge++)if(E=V[ge],E.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&E.getAttribute("rel")===(a.rel==null?null:a.rel)&&E.getAttribute("title")===(a.title==null?null:a.title)&&E.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){V.splice(ge,1);break t}}E=m.createElement(d),Jr(E,d,a),m.head.appendChild(E);break;case"meta":if(V=h2("meta","content",m).get(d+(a.content||""))){for(ge=0;ge<V.length;ge++)if(E=V[ge],E.getAttribute("content")===(a.content==null?null:""+a.content)&&E.getAttribute("name")===(a.name==null?null:a.name)&&E.getAttribute("property")===(a.property==null?null:a.property)&&E.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&E.getAttribute("charset")===(a.charSet==null?null:a.charSet)){V.splice(ge,1);break t}}E=m.createElement(d),Jr(E,d,a),m.head.appendChild(E);break;default:throw Error(o(468,d))}E[Ht]=r,ur(E),d=E}r.stateNode=d}else d2(m,r.type,r.stateNode);else r.stateNode=f2(m,d,r.memoizedProps);else E!==d?(E===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):E.count--,d===null?d2(m,r.type,r.stateNode):f2(m,d,r.memoizedProps)):d===null&&r.stateNode!==null&&yg(r,r.memoizedProps,a.memoizedProps)}break;case 27:In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.return)),a!==null&&d&4&&yg(r,r.memoizedProps,a.memoizedProps);break;case 5:if(In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.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,a!==null?a.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,a=r.stateNode;try{a.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&&a!==null&&a.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!=(a!==null&&a.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=a!==null&&a.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&&(a===null||Fe||yo||Sr||oa(r)),a=null,i=r;;){if(i.tag===5||i.tag===26){if(a===null){Fe=a=i;try{if(E=Fe.stateNode,m)V=E.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(a===null){Fe=i;try{Fe.stateNode.nodeValue=m?"":Fe.memoizedProps}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===18){if(a===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;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(a=d.retryQueue,a!==null&&(d.retryQueue=null,bh(r,a))));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 a,d=r.return;d!==null;){if(iS(d)){a=d;break}d=d.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var m=a.stateNode,E=gg(r);mh(r,E,m);break;case 5:var V=a.stateNode;a.flags&32&&(qa(V,""),a.flags&=-33);var ge=gg(r);mh(r,ge,V);break;case 3:case 4:var Fe=a.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 a=i.stateNode;typeof a.componentWillUnmount=="function"&&rS(i,i.return,a),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,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,m=r,E=i,V=E.flags;switch(E.tag){case 0:case 11:case 15:bo(m,E,a),Dl(4,E);break;case 1:if(bo(m,E,a),d=E,m=d.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(Me){Lt(d,d.return,Me)}if(d=E,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)}}a&&V&64&&tS(E),Pl(E,E.return);break;case 27:oS(E);case 26:case 5:bo(m,E,a),a&&d===null&&V&4&&nS(E),Pl(E,E.return);break;case 12:bo(m,E,a);break;case 31:bo(m,E,a),a&&V&4&&cS(m,E);break;case 13:bo(m,E,a),a&&V&4&&fS(m,E);break;case 22:E.memoizedState===null&&bo(m,E,a),Pl(E,E.return);break;case 30:break;default:bo(m,E,a)}i=i.sibling}}function Ag(r,i){var a=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==a&&(r!=null&&r.refCount++,a!=null&&Sl(a))}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,a,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pS(r,i,a,d),i=i.sibling}function pS(r,i,a,d){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Ci(r,i,a,d),m&2048&&Dl(9,i);break;case 1:Ci(r,i,a,d);break;case 3:Ci(r,i,a,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,a,d),r=i.stateNode;try{var E=i.memoizedProps,V=E.id,ge=E.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,a,d);break;case 31:Ci(r,i,a,d);break;case 13:Ci(r,i,a,d);break;case 23:break;case 22:E=i.stateNode,V=i.alternate,i.memoizedState!==null?E._visibility&2?Ci(r,i,a,d):kl(r,i):E._visibility&2?Ci(r,i,a,d):(E._visibility|=2,lu(r,i,a,d,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Ag(V,i);break;case 24:Ci(r,i,a,d),m&2048&&wg(i.alternate,i);break;default:Ci(r,i,a,d)}}function lu(r,i,a,d,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var E=r,V=i,ge=a,Fe=d,Me=V.flags;switch(V.tag){case 0:case 11:case 15:lu(E,V,ge,Fe,m),Dl(8,V);break;case 23:break;case 22:var ze=V.stateNode;V.memoizedState!==null?ze._visibility&2?lu(E,V,ge,Fe,m):kl(E,V):(ze._visibility|=2,lu(E,V,ge,Fe,m)),m&&Me&2048&&Ag(V.alternate,V);break;case 24:lu(E,V,ge,Fe,m),m&&Me&2048&&wg(V.alternate,V);break;default:lu(E,V,ge,Fe,m)}i=i.sibling}}function kl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=r,d=i,m=d.flags;switch(d.tag){case 22:kl(a,d),m&2048&&Ag(d.alternate,d);break;case 24:kl(a,d),m&2048&&wg(d.alternate,d);break;default:kl(a,d)}i=i.sibling}}var Ll=8192;function cu(r,i,a){if(r.subtreeFlags&Ll)for(r=r.child;r!==null;)yS(r,i,a),r=r.sibling}function yS(r,i,a){switch(r.tag){case 26:cu(r,i,a),r.flags&Ll&&r.memoizedState!==null&&W4(a,_i,r.memoizedState,r.memoizedProps);break;case 5:cu(r,i,a);break;case 3:case 4:var d=_i;_i=Rh(r.stateNode.containerInfo),cu(r,i,a),_i=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Ll,Ll=16777216,cu(r,i,a),Ll=d):cu(r,i,a));break;default:cu(r,i,a)}}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 a=0;a<i.length;a++){var d=i[a];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 a=0;a<i.length;a++){var d=i[a];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:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,Ah(i));break;default:Ah(i)}r=r.sibling}}function bS(r,i){for(;Lr!==null;){var a=Lr;switch(a.tag){case 0:case 11:case 15:as(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var d=a.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Sl(a.memoizedState.cache)}if(d=a.child,d!==null)d.return=a,Lr=d;else e:for(a=r;Lr!==null;){d=Lr;var m=d.sibling,E=d.return;if(uS(d),d===a){Lr=null;break e}if(m!==null){m.return=E,Lr=m;break e}Lr=E}}}var f4={getCacheForType:function(r){var i=Wr(vr),a=i.data.get(r);return a===void 0&&(a=r(),i.data.set(r,a)),a},cacheSignal:function(){return Wr(vr).controller.signal}},h4=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,a){(r===Wt&&(kt===2||kt===9)||r.cancelPendingCommit!==null)&&(pu(r,0),hs(r,Ft,Kn,!1)),be(r,a),((Pt&2)===0||r!==Wt)&&(r===Wt&&((Pt&2)===0&&(sa|=a),hr===4&&hs(r,Ft,Kn,!1)),Hi(r))}function xS(r,i,a){if((Pt&6)!==0)throw Error(o(327));var d=!a&&(i&127)===0&&(i&r.expiredLanes)===0||dt(r,i),m=d?y4(r,i):Fg(r,i,!0),E=d;do{if(m===0){fu&&!d&&hs(r,i,0,!1);break}else{if(a=r.current.alternate,E&&!d4(a)){m=Fg(r,i,!1),E=!1;continue}if(m===2){if(E=i,r.errorRecoveryDisabledLanes&E)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|=E,sa|=E,m=4;break e}E=Cn,Cn=m,E!==null&&(Cn===null?Cn=E:Cn.push.apply(Cn,E))}m=V}if(E=!1,m!==2)continue}}if(m===1){pu(r,0),hs(r,i,0,!0);break}e:{switch(d=r,E=m,E){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,a,Cn,xh,Eg,i,Kn,sa,hu,us,E,"Throttled",-0,0),m);break e}ES(d,a,Cn,xh,Eg,i,Kn,sa,hu,us,E,null,-0,0)}}break}while(!0);Hi(r)}function ES(r,i,a,d,m,E,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,E,Ge);var ut=(E&62914560)===E?wh-de():(E&4194048)===E?AS-de():0;if(ut=X4(Ge,ut),ut!==null){wo=E,r.cancelPendingCommit=ut(BS.bind(null,r,i,E,a,d,m,V,ge,Fe,ze,Ge,null,je,De)),hs(r,E,V,!Me);return}}BS(r,i,E,a,d,m,V,ge,Fe)}function d4(r){for(var i=r;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var d=0;d<a.length;d++){var m=a[d],E=m.getSnapshot;m=m.value;try{if(!zn(E(),m))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;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,a,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 E=31-Ke(m),V=1<<E;d[E]=-1,m&=~V}a!==0&&Ye(r,a,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 a=r.timeoutHandle;a!==-1&&(r.timeoutHandle=-1,M4(a)),a=r.cancelPendingCommit,a!==null&&(r.cancelPendingCommit=null,a()),wo=0,Cg(),Wt=r,St=a=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),E=1<<m;i|=r[m],d&=~E}return Ao=i,Hf(),a}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=f4,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,a){var d=Pt;Pt|=2;var m=_S(),E=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),a&&fu){V=0;break e}break;default:Me=kt,kt=0,Gn=null,yu(r,ge,Fe,Me)}}p4(),V=hr;break}catch(ze){SS(r,ze)}while(!0);return i&&r.shellSuspendCounter++,uo=Xs=null,Pt=d,X.H=m,X.A=E,St===null&&(Wt=null,Ft=0,Hf()),V}function p4(){for(;St!==null;)FS(St)}function y4(r,i){var a=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 E=Gn;t:switch(kt){case 1:kt=0,Gn=null,yu(r,i,E,1);break;case 2:case 9:if(Px(E)){kt=0,Gn=null,OS(i);break}i=function(){kt!==2&&kt!==9||Wt!==r||(kt=7),Hi(r)},E.then(i,i);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Px(E)?(kt=0,Gn=null,OS(i)):(kt=0,Gn=null,yu(r,i,E,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,E,5);break;case 6:kt=0,Gn=null,yu(r,i,E,6);break;case 8:Cg(),hr=6;break e;default:throw Error(o(462))}}g4();break}catch(ze){SS(r,ze)}while(!0);return uo=Xs=null,X.H=d,X.A=m,Pt=a,St!==null?0:(Wt=null,Ft=0,Hf(),hr)}function g4(){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,a=i.alternate;switch(i.tag){case 15:case 0:i=GE(a,i,i.pendingProps,i.type,void 0,Ft);break;case 11:i=GE(a,i,i.pendingProps,i.type.render,i.ref,Ft);break;case 5:qy(i);default:eS(a,i),i=St=Cx(i,Ao),i=JE(a,i,Ao)}r.memoizedProps=r.pendingProps,i===null?Ih(r):St=i}function yu(r,i,a,d){uo=Xs=null,qy(i),iu=null,_l=0;var m=i.return;try{if(i4(r,m,i,a,Ft)){hr=1,hh(r,li(a,r.current)),St=null;return}}catch(E){if(m!==null)throw St=m,E;hr=1,hh(r,li(a,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 a=a4(i.alternate,i,Ao);if(a!==null){St=a;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 a=u4(r.alternate,r);if(a!==null){a.flags&=32767,St=a;return}if(a=r.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(r=r.sibling,r!==null)){St=r;return}St=r=a}while(r!==null);hr=6,St=null}function BS(r,i,a,d,m,E,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(E=i.lanes|i.childLanes,E|=gy,_e(r,a,E,V,ge,Fe),r===Wt&&(St=Wt=null,Ft=0),du=i,fs=r,wo=a,Sg=E,Ig=m,wS=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,w4(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=ue.p,ue.p=2,V=Pt,Pt|=4;try{l4(r,i,a)}finally{Pt=V,ue.p=m,X.T=d}}Ur=1,RS(),MS(),jS()}}function RS(){if(Ur===1){Ur=0;var r=fs,i=du,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=X.T,X.T=null;var d=ue.p;ue.p=2;var m=Pt;Pt|=4;try{hS(i,r);var E=Lg,V=mx(r.containerInfo),ge=E.focusedElem,Fe=E.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,ue.p=d,X.T=a}}r.current=i,Ur=2}}function MS(){if(Ur===2){Ur=0;var r=fs,i=du,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=X.T,X.T=null;var d=ue.p;ue.p=2;var m=Pt;Pt|=4;try{aS(r,i.alternate,i)}finally{Pt=m,ue.p=d,X.T=a}}Ur=3}}function jS(){if(Ur===4||Ur===3){Ur=0,Be();var r=fs,i=du,a=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(a),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=ue.p,ue.p=2,X.T=null;try{for(var E=r.onRecoverableError,V=0;V<d.length;V++){var ge=d[V];E(ge.value,{componentStack:ge.stack})}}finally{X.T=i,ue.p=m}}(wo&3)!==0&&_h(),Hi(r),m=r.pendingLanes,(a&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 a=rr(wo),d=X.T,m=ue.p;try{ue.p=32>a?32:a,X.T=null,a=Ig,Ig=null;var E=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(E.current),pS(E,E.current,V,a),Pt=ge,Hl(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot=="function")try{Ie.onPostCommitFiberRoot(we,E)}catch{}return!0}finally{ue.p=m,X.T=d,US(r,i)}}function DS(r,i,a){i=li(a,i),i=ig(r.stateNode,i,2),r=is(r,i,2),r!==null&&(be(r,2),Hi(r))}function Lt(r,i,a){if(r.tag===3)DS(r,r,a);else for(;i!==null;){if(i.tag===3){DS(i,r,a);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(a,r),a=PE(2),d=is(i,a,2),d!==null&&(kE(a,d,i,r),be(d,2),Hi(d));break}}i=i.return}}function Og(r,i,a){var d=r.pingCache;if(d===null){d=r.pingCache=new h4;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(a)||(vg=!0,m.add(a),r=m4.bind(null,r,i,a),i.then(r,r))}function m4(r,i,a){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&a,r.warmLanes&=~a,Wt===r&&(Ft&a)===a&&(hr===4||hr===3&&(Ft&62914560)===Ft&&300>de()-wh?(Pt&2)===0&&pu(r,0):xg|=a,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 b4(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),PS(r,a)}function A4(r,i){var a=0;switch(r.tag){case 31:case 13:var d=r.stateNode,m=r.memoizedState;m!==null&&(a=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,a)}function w4(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,x4())}function Hl(r,i){if(!Bg&&Fh){Bg=!0;do for(var a=!1,d=Ch;d!==null;){if(r!==0){var m=d.pendingLanes;if(m===0)var E=0;else{var V=d.suspendedLanes,ge=d.pingedLanes;E=(1<<31-Ke(42|r)+1)-1,E&=m&~(V&~ge),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(a=!0,zS(d,E))}else E=Ft,E=ft(d,d===Wt?E:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(E&3)===0||dt(d,E)||(a=!0,zS(d,E));d=d.next}while(a);Bg=!1}}function v4(){kS()}function kS(){Fh=Tg=!1;var r=0;ds!==0&&R4()&&(r=ds);for(var i=de(),a=null,d=Ch;d!==null;){var m=d.next,E=LS(d,i);E===0?(d.next=null,a===null?Ch=m:a.next=m,m===null&&(gu=a)):(a=d,(r!==0||(E&3)!==0)&&(Fh=!0)),d=m}Ur!==0&&Ur!==5||Hl(r),ds!==0&&(ds=0)}function LS(r,i){for(var a=r.suspendedLanes,d=r.pingedLanes,m=r.expirationTimes,E=r.pendingLanes&-62914561;0<E;){var V=31-Ke(E),ge=1<<V,Fe=m[V];Fe===-1?((ge&a)===0||(ge&d)!==0)&&(m[V]=At(ge,i)):Fe<=i&&(r.expiredLanes|=ge),E&=~ge}if(i=Wt,a=Ft,a=ft(r,r===i?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,a===0||r===i&&(kt===2||kt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&ce(d),r.callbackNode=null,r.callbackPriority=0;if((a&3)===0||dt(r,a)){if(i=a&-a,i===r.callbackPriority)return i;switch(d!==null&&ce(d),rr(a)){case 2:case 8:a=B;break;case 32:a=D;break;case 268435456:a=me;break;default:a=D}return d=$S.bind(null,r),a=he(a,d),r.callbackPriority=i,r.callbackNode=a,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 a=r.callbackNode;if(_h()&&r.callbackNode!==a)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===a?$S.bind(null,r):null)}function zS(r,i){if(_h())return null;xS(r,i,!0)}function x4(){j4(function(){(Pt&6)!==0?he(x,v4):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 a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,r.id&&a.setAttribute("form",r.id),i.parentNode.insertBefore(a,i),r=new FormData(r),a.parentNode.removeChild(a),r}function E4(r,i,a,d,m){if(i==="submit"&&a&&a.stateNode===m){var E=qS((m[nr]||null).action),V=d.submitter;V&&(i=(i=V[nr]||null)?qS(i.formAction):V.getAttribute("formAction"),i!==null&&(E=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(a,{pending:!0,data:Fe,method:m.method,action:E},null,Fe)}}else typeof E=="function"&&(ge.preventDefault(),Fe=V?HS(m,V):new FormData(m),Jy(a,{pending:!0,data:Fe,method:m.method,action:E},E,Fe))},currentTarget:m}]})}}for(var Mg=0;Mg<yy.length;Mg++){var jg=yy[Mg],S4=jg.toLowerCase(),I4=jg[0].toUpperCase()+jg.slice(1);Ii(S4,"on"+I4)}Ii(vx,"onAnimationEnd"),Ii(xx,"onAnimationIteration"),Ii(Ex,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii($8,"onTransitionRun"),Ii(z8,"onTransitionStart"),Ii(q8,"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(" "),_4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function QS(r,i){i=(i&4)!==0;for(var a=0;a<r.length;a++){var d=r[a],m=d.event;d=d.listeners;e:{var E=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!==E&&m.isPropagationStopped())break e;E=ge,m.currentTarget=Me;try{E(m)}catch(ze){qf(ze)}m.currentTarget=null,E=Fe}else for(V=0;V<d.length;V++){if(ge=d[V],Fe=ge.instance,Me=ge.currentTarget,ge=ge.listener,Fe!==E&&m.isPropagationStopped())break e;E=ge,m.currentTarget=Me;try{E(m)}catch(ze){qf(ze)}m.currentTarget=null,E=Fe}}}}function It(r,i){var a=i[jr];a===void 0&&(a=i[jr]=new Set);var d=r+"__bubble";a.has(d)||(GS(i,r,2,!1),a.add(d))}function Ug(r,i,a){var d=0;i&&(d|=4),GS(a,r,d,i)}var Oh="_reactListening"+Math.random().toString(36).slice(2);function Ng(r){if(!r[Oh]){r[Oh]=!0,qs.forEach(function(a){a!=="selectionchange"&&(_4.has(a)||Ug(a,!1,r),Ug(a,!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,a,d){switch(v2(i)){case 2:var m=eR;break;case 8:m=tR;break;default:m=Xg}a=m.bind(null,i,a,r),m=void 0,!ry||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),d?m!==void 0?r.addEventListener(i,a,{capture:!0,passive:m}):r.addEventListener(i,a,!0):m!==void 0?r.addEventListener(i,a,{passive:m}):r.addEventListener(i,a,!1)}function Dg(r,i,a,d,m){var E=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=E=V;continue e}ge=ge.parentNode}}d=d.return}Wv(function(){var Me=E,ze=ey(a),Ge=[];e:{var je=Ix.get(r);if(je!==void 0){var De=Lf,ut=r;switch(r){case"keypress":if(Pf(a)===0)break e;case"keydown":case"keyup":De=A8;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(a.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=a8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":De=x8;break;case vx:case xx:case Ex:De=c8;break;case Sx:De=S8;break;case"scroll":case"scrollend":De=o8;break;case"wheel":De=_8;break;case"copy":case"cut":case"paste":De=h8;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=F8}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,a,ze),Ge.push({event:je,listeners:mt}))}}if((i&7)===0){e:{if(je=r==="mouseover"||r==="pointerover",De=r==="mouseout"||r==="pointerout",je&&a!==Zp&&(ut=a.relatedTarget||a.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=a.relatedTarget||a.toElement,De=Me,ut=ut?xi(ut):null,ut!==null&&(Kt=u(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,a,ze),je.target=Kt,je.relatedTarget=Re,Qe=null,xi(ze)===Me&&(mt=new mt(Te,Oe+"enter",ut,a,ze),mt.target=Re,mt.relatedTarget=Kt,Qe=mt),Kt=Qe,De&&ut)t:{for(mt=C4,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=P8;else{Ut=N8;var ct=U8}else De=je.nodeName,!De||De.toLowerCase()!=="input"||je.type!=="checkbox"&&je.type!=="radio"?Me&&Jp(Me.elementType)&&(Ut=lx):Ut=D8;if(Ut&&(Ut=Ut(r,Me))){ux(Ge,Ut,a,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,a,ze);break;case"selectionchange":if(L8)break;case"keydown":case"keyup":bx(Ge,a,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,a)&&(Ot="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Ot="onCompositionStart");Ot&&(rx&&a.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,a,ze),Ge.push({event:Ot,listeners:ct}),xt?Ot.data=xt:(xt=sx(a),xt!==null&&(Ot.data=xt)))),(xt=T8?B8(r,a):R8(r,a))&&(Ot=Th(Me,"onBeforeInput"),0<Ot.length&&(ct=new ex("onBeforeInput","beforeinput",null,a,ze),Ge.push({event:ct,listeners:Ot}),ct.data=xt)),E4(Ge,r,Me,a,ze)}QS(Ge,i)})}function Gl(r,i,a){return{instance:r,listener:i,currentTarget:a}}function Th(r,i){for(var a=i+"Capture",d=[];r!==null;){var m=r,E=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||E===null||(m=dl(r,a),m!=null&&d.unshift(Gl(r,m,E)),m=dl(r,i),m!=null&&d.push(Gl(r,m,E))),r.tag===3)return d;r=r.return}return[]}function C4(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,a,d,m){for(var E=i._reactName,V=[];a!==null&&a!==d;){var ge=a,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(a,E),Me!=null&&V.unshift(Gl(a,Me,Fe))):m||(Me=dl(a,E),Me!=null&&V.push(Gl(a,Me,Fe)))),a=a.return}V.length!==0&&r.push({event:i,listeners:V})}var F4=/\r\n?/g,O4=/\u0000|\uFFFD/g;function YS(r){return(typeof r=="string"?r:""+r).replace(F4,`
|
|
38
|
-
`).replace(O4,"")}function VS(r,i){return i=YS(i),YS(r)===i}function Gt(r,i,a,d,m,E){switch(a){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,a,d);break;case"style":Yv(r,d,E);break;case"data":if(i!=="object"){jf(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||a!=="href")){r.removeAttribute(a);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(a);break}d=Nf(""+d),r.setAttribute(a,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(a,"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 E=="function"&&(a==="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(a);break}d=Nf(""+d),r.setAttribute(a,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(a=d.__html,a!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=a}}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}a=Nf(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+d):r.removeAttribute(a);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(a,""):r.removeAttribute(a);break;case"capture":case"download":d===!0?r.setAttribute(a,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(a,d):r.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(a,d):r.removeAttribute(a);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(a):r.setAttribute(a,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<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=n8.get(a)||a,Mf(r,a,d))}}function Pg(r,i,a,d,m,E){switch(a){case"style":Yv(r,d,E);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(o(61));if(a=d.__html,a!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=a}}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(a))e:{if(a[0]==="o"&&a[1]==="n"&&(m=a.endsWith("Capture"),i=a.slice(2,m?a.length-7:void 0),E=r[nr]||null,E=E!=null?E[a]:null,typeof E=="function"&&r.removeEventListener(i,E,m),typeof d=="function")){typeof E!="function"&&E!==null&&(a in r?r[a]=null:r.hasAttribute(a)&&r.removeAttribute(a)),r.addEventListener(i,d,m);break e}a in r?r[a]=d:d===!0?r.setAttribute(a,""):Mf(r,a,d)}}}function Jr(r,i,a){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,E;for(E in a)if(a.hasOwnProperty(E)){var V=a[E];if(V!=null)switch(E){case"src":d=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,E,V,a,null)}}m&&Gt(r,i,"srcSet",a.srcSet,a,null),d&&Gt(r,i,"src",a.src,a,null);return;case"input":It("invalid",r);var ge=E=V=m=null,Fe=null,Me=null;for(d in a)if(a.hasOwnProperty(d)){var ze=a[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":E=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,a,null)}}Hv(r,E,ge,Fe,Me,V,m,!1);return;case"select":It("invalid",r),d=V=E=null;for(m in a)if(a.hasOwnProperty(m)&&(ge=a[m],ge!=null))switch(m){case"value":E=ge;break;case"defaultValue":V=ge;break;case"multiple":d=ge;default:Gt(r,i,m,ge,a,null)}i=E,a=V,r.multiple=!!d,i!=null?za(r,!!d,i,!1):a!=null&&za(r,!!d,a,!0);return;case"textarea":It("invalid",r),E=m=d=null;for(V in a)if(a.hasOwnProperty(V)&&(ge=a[V],ge!=null))switch(V){case"value":d=ge;break;case"defaultValue":m=ge;break;case"children":E=ge;break;case"dangerouslySetInnerHTML":if(ge!=null)throw Error(o(91));break;default:Gt(r,i,V,ge,a,null)}Gv(r,d,m,E);return;case"option":for(Fe in a)if(a.hasOwnProperty(Fe)&&(d=a[Fe],d!=null))switch(Fe){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Gt(r,i,Fe,d,a,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 a)if(a.hasOwnProperty(Me)&&(d=a[Me],d!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,Me,d,a,null)}return;default:if(Jp(i)){for(ze in a)a.hasOwnProperty(ze)&&(d=a[ze],d!==void 0&&Pg(r,i,ze,d,a,void 0));return}}for(ge in a)a.hasOwnProperty(ge)&&(d=a[ge],d!=null&&Gt(r,i,ge,d,a,null))}function T4(r,i,a,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,E=null,V=null,ge=null,Fe=null,Me=null,ze=null;for(De in a){var Ge=a[De];if(a.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=a[je],d.hasOwnProperty(je)&&(De!=null||Ge!=null))switch(je){case"type":E=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,E,m);return;case"select":De=V=ge=je=null;for(E in a)if(Fe=a[E],a.hasOwnProperty(E)&&Fe!=null)switch(E){case"value":break;case"multiple":De=Fe;default:d.hasOwnProperty(E)||Gt(r,i,E,null,d,Fe)}for(m in d)if(E=d[m],Fe=a[m],d.hasOwnProperty(m)&&(E!=null||Fe!=null))switch(m){case"value":je=E;break;case"defaultValue":ge=E;break;case"multiple":V=E;default:E!==Fe&&Gt(r,i,m,E,d,Fe)}i=ge,a=V,d=De,je!=null?za(r,!!a,je,!1):!!d!=!!a&&(i!=null?za(r,!!a,i,!0):za(r,!!a,a?[]:"",!1));return;case"textarea":De=je=null;for(ge in a)if(m=a[ge],a.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],E=a[V],d.hasOwnProperty(V)&&(m!=null||E!=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!==E&&Gt(r,i,V,m,d,E)}Qv(r,je,De);return;case"option":for(var ut in a)if(je=a[ut],a.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=a[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 a)je=a[mt],a.hasOwnProperty(mt)&&je!=null&&!d.hasOwnProperty(mt)&&Gt(r,i,mt,null,d,je);for(Me in d)if(je=d[Me],De=a[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 a)je=a[Kt],a.hasOwnProperty(Kt)&&je!==void 0&&!d.hasOwnProperty(Kt)&&Pg(r,i,Kt,void 0,d,je);for(ze in d)je=d[ze],De=a[ze],!d.hasOwnProperty(ze)||je===De||je===void 0&&De===void 0||Pg(r,i,ze,je,d,De);return}}for(var Te in a)je=a[Te],a.hasOwnProperty(Te)&&je!=null&&!d.hasOwnProperty(Te)&&Gt(r,i,Te,null,d,je);for(Ge in d)je=d[Ge],De=a[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 B4(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,a=performance.getEntriesByType("resource"),d=0;d<a.length;d++){var m=a[d],E=m.transferSize,V=m.initiatorType,ge=m.duration;if(E&&ge&&WS(V)){for(V=0,ge=m.responseEnd,d+=1;d<a.length;d++){var Fe=a[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*(E+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 R4(){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,M4=typeof clearTimeout=="function"?clearTimeout:void 0,e2=typeof Promise=="function"?Promise:void 0,j4=typeof queueMicrotask=="function"?queueMicrotask:typeof e2<"u"?function(r){return e2.resolve(null).then(r).catch(U4)}:ZS;function U4(r){setTimeout(function(){throw r})}function ps(r){return r==="head"}function t2(r,i){var a=i,d=0;do{var m=a.nextSibling;if(r.removeChild(a),m&&m.nodeType===8)if(a=m.data,a==="/$"||a==="/&"){if(d===0){r.removeChild(m),wu(i);return}d--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")d++;else if(a==="html")Kl(r.ownerDocument.documentElement);else if(a==="head"){a=r.ownerDocument.head,Kl(a);for(var E=a.firstChild;E;){var V=E.nextSibling,ge=E.nodeName;E[wr]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&E.rel.toLowerCase()==="stylesheet"||a.removeChild(E),E=V}}else a==="body"&&Kl(r.ownerDocument.body);a=m}while(a);wu(i)}function r2(r,i){var a=r;r=0;do{var d=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(r===0)break;r--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||r++;a=d}while(a)}function qg(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qg(a),Wo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}r.removeChild(a)}}function N4(r,i,a,d){for(;r.nodeType===1;){var m=a;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(E=r.getAttribute("rel"),E==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(E!==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(E=r.getAttribute("src"),(E!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&E&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var E=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===E)return r}else return r;if(r=pi(r.nextSibling),r===null)break}return null}function D4(r,i,a){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(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 P4(r,i){var a=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||a.readyState!=="loading")i();else{var d=function(){i(),a.removeEventListener("DOMContentLoaded",d)};a.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 a=r.data;if(a==="/$"||a==="/&"){if(i===0)return pi(r.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}r=r.nextSibling}return null}function o2(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return r;i--}else a!=="/$"&&a!=="/&"||i++}r=r.previousSibling}return null}function s2(r,i,a){switch(i=Bh(a),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=ue.d;ue.d={f:k4,r:L4,D:$4,C:z4,L:q4,m:H4,X:G4,S:Q4,M:K4};function k4(){var r=vo.f(),i=Eh();return r||i}function L4(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,a){var d=mu;if(d&&typeof i=="string"&&i){var m=ai(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof a=="string"&&(m+='[crossorigin="'+a+'"]'),a2.has(m)||(a2.add(m),r={rel:r,crossOrigin:a,href:i},d.querySelector(m)===null&&(i=d.createElement("link"),Jr(i,"link",r),ur(i),d.head.appendChild(i)))}}function $4(r){vo.D(r),u2("dns-prefetch",r,null)}function z4(r,i){vo.C(r,i),u2("preconnect",r,i)}function q4(r,i,a){vo.L(r,i,a);var d=mu;if(d&&r&&i){var m='link[rel="preload"][as="'+ai(i)+'"]';i==="image"&&a&&a.imageSrcSet?(m+='[imagesrcset="'+ai(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(m+='[imagesizes="'+ai(a.imageSizes)+'"]')):m+='[href="'+ai(r)+'"]';var E=m;switch(i){case"style":E=bu(r);break;case"script":E=Au(r)}yi.has(E)||(r=y({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:r,as:i},a),yi.set(E,r),d.querySelector(m)!==null||i==="style"&&d.querySelector(Yl(E))||i==="script"&&d.querySelector(Vl(E))||(i=d.createElement("link"),Jr(i,"link",r),ur(i),d.head.appendChild(i)))}}function H4(r,i){vo.m(r,i);var a=mu;if(a&&r){var d=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+ai(d)+'"][href="'+ai(r)+'"]',E=m;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Au(r)}if(!yi.has(E)&&(r=y({rel:"modulepreload",href:r},i),yi.set(E,r),a.querySelector(m)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Vl(E)))return}d=a.createElement("link"),Jr(d,"link",r),ur(d),a.head.appendChild(d)}}}function Q4(r,i,a){vo.S(r,i,a);var d=mu;if(d&&r){var m=Si(d).hoistableStyles,E=bu(r);i=i||"default";var V=m.get(E);if(!V){var ge={loading:0,preload:null};if(V=d.querySelector(Yl(E)))ge.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},a),(a=yi.get(E))&&Kg(r,a);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(E,V)}}}function G4(r,i){vo.X(r,i);var a=mu;if(a&&r){var d=Si(a).hoistableScripts,m=Au(r),E=d.get(m);E||(E=a.querySelector(Vl(m)),E||(r=y({src:r,async:!0},i),(i=yi.get(m))&&Yg(r,i),E=a.createElement("script"),ur(E),Jr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(m,E))}}function K4(r,i){vo.M(r,i);var a=mu;if(a&&r){var d=Si(a).hoistableScripts,m=Au(r),E=d.get(m);E||(E=a.querySelector(Vl(m)),E||(r=y({src:r,async:!0,type:"module"},i),(i=yi.get(m))&&Yg(r,i),E=a.createElement("script"),ur(E),Jr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(m,E))}}function l2(r,i,a,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 a.precedence=="string"&&typeof a.href=="string"?(i=bu(a.href),a=Si(m).hoistableStyles,d=a.get(i),d||(d={type:"style",instance:null,count:0,state:null},a.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){r=bu(a.href);var E=Si(m).hoistableStyles,V=E.get(r);if(V||(m=m.ownerDocument||m,V={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(r,V),(E=m.querySelector(Yl(r)))&&!E._p&&(V.instance=E,V.state.loading=5),yi.has(r)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},yi.set(r,a),E||Y4(m,r,a,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=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Au(a),a=Si(m).hoistableScripts,d=a.get(i),d||(d={type:"script",instance:null,count:0,state:null},a.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 Y4(r,i,a,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",a),ur(i),r.head.appendChild(i))}function Au(r){return'[src="'+ai(r)+'"]'}function Vl(r){return"script[async]"+r}function f2(r,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+ai(a.href)+'"]');if(d)return i.instance=d,ur(d),d;var m=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),ur(d),Jr(d,"style",m),Mh(d,a.precedence,r),i.instance=d;case"stylesheet":m=bu(a.href);var E=r.querySelector(Yl(m));if(E)return i.state.loading|=4,i.instance=E,ur(E),E;d=c2(a),(m=yi.get(m))&&Kg(d,m),E=(r.ownerDocument||r).createElement("link"),ur(E);var V=E;return V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Jr(E,"link",d),i.state.loading|=4,Mh(E,a.precedence,r),i.instance=E;case"script":return E=Au(a.src),(m=r.querySelector(Vl(E)))?(i.instance=m,ur(m),m):(d=a,(m=yi.get(E))&&(d=y({},a),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,a.precedence,r));return i.instance}function Mh(r,i,a){for(var d=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=d.length?d[d.length-1]:null,E=m,V=0;V<d.length;V++){var ge=d[V];if(ge.dataset.precedence===i)E=ge;else if(E!==m)break}E?E.parentNode.insertBefore(r,E.nextSibling):(i=a.nodeType===9?a.head:a,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,a){if(jh===null){var d=new Map,m=jh=new Map;m.set(a,d)}else m=jh,d=m.get(a),d||(d=new Map,m.set(a,d));if(d.has(r))return d;for(d.set(r,null),a=a.getElementsByTagName(r),m=0;m<a.length;m++){var E=a[m];if(!(E[wr]||E[Ht]||r==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var V=E.getAttribute(i)||"";V=r+V;var ge=d.get(V);ge?ge.push(E):d.set(V,[E])}}return d}function d2(r,i,a){r=r.ownerDocument||r,r.head.insertBefore(a,i==="title"?r.querySelector("head > title"):null)}function V4(r,i,a){if(a===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 W4(r,i,a,d){if(a.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var m=bu(d.href),E=i.querySelector(Yl(m));if(E){i=E._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Uh.bind(r),i.then(r,r)),a.state.loading|=4,a.instance=E,ur(E);return}E=i.ownerDocument||i,d=c2(d),(m=yi.get(m))&&Kg(d,m),E=E.createElement("link"),ur(E);var V=E;V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Jr(E,"link",d),a.instance=E}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(r.count++,a=Uh.bind(r),i.addEventListener("load",a),i.addEventListener("error",a))}}var Vg=0;function X4(r,i){return r.stylesheets&&r.count===0&&Dh(r,r.stylesheets),0<r.count||0<r.imgCount?function(a){var d=setTimeout(function(){if(r.stylesheets&&Dh(r,r.stylesheets),r.unsuspend){var E=r.unsuspend;r.unsuspend=null,E()}},6e4+i);0<r.imgBytes&&Vg===0&&(Vg=62500*B4());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Dh(r,r.stylesheets),r.unsuspend)){var E=r.unsuspend;r.unsuspend=null,E()}},(r.imgBytes>Vg?50:800)+i);return r.unsuspend=a,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(J4,r),Nh=null,Uh.call(r))}function J4(r,i){if(!(i.state.loading&4)){var a=Nh.get(r);if(a)var d=a.get(null);else{a=new Map,Nh.set(r,a);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<m.length;E++){var V=m[E];(V.nodeName==="LINK"||V.getAttribute("media")!=="not all")&&(a.set(V.dataset.precedence,V),d=V)}d&&a.set(null,d)}m=i.instance,V=m.getAttribute("data-precedence"),E=a.get(V)||d,E===d&&a.set(null,m),a.set(V,m),this.count++,d=Uh.bind(this),m.addEventListener("load",d),m.addEventListener("error",d),E?E.parentNode.insertBefore(m,E.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var Wl={$$typeof:I,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function Z4(r,i,a,d,m,E,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=E,this.onRecoverableError=V,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Fe,this.incompleteTransitions=new Map}function y2(r,i,a,d,m,E,V,ge,Fe,Me,ze,Ge){return r=new Z4(r,i,a,V,Fe,Me,ze,Ge,ge),i=1,E===!0&&(i|=24),E=qn(3,null,null,i),r.current=E,E.stateNode=r,i=Fy(),i.refCount++,r.pooledCache=i,i.refCount++,E.memoizedState={element:d,isDehydrated:a,cache:i},Ry(E),r}function g2(r){return r?(r=Wa,r):Wa}function m2(r,i,a,d,m,E){m=g2(m),d.context===null?d.context=m:d.pendingContext=m,d=ns(i),d.payload={element:a},E=E===void 0?null:E,E!==null&&(d.callback=E),a=is(r,d,i),a!==null&&(Fn(a,r,i),Fl(a,r,i))}function b2(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<i?a: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 a=Ys(r,i);a!==null&&Fn(a,r,i),Wg(r,i)}}var Ph=!0;function eR(r,i,a,d){var m=X.T;X.T=null;var E=ue.p;try{ue.p=2,Xg(r,i,a,d)}finally{ue.p=E,X.T=m}}function tR(r,i,a,d){var m=X.T;X.T=null;var E=ue.p;try{ue.p=8,Xg(r,i,a,d)}finally{ue.p=E,X.T=m}}function Xg(r,i,a,d){if(Ph){var m=Jg(d);if(m===null)Dg(r,i,d,kh,a),x2(r,d);else if(nR(m,r,i,a,d))d.stopPropagation();else if(x2(r,d),i&4&&-1<rR.indexOf(r)){for(;m!==null;){var E=Ei(m);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var V=tt(E.pendingLanes);if(V!==0){var ge=E;for(ge.pendingLanes|=2,ge.entangledLanes|=2;V;){var Fe=1<<31-Ke(V);ge.entanglements[1]|=Fe,V&=~Fe}Hi(E),(Pt&6)===0&&(vh=de()+500,Hl(0))}}break;case 31:case 13:ge=Ys(E,2),ge!==null&&Fn(ge,E,2),Eh(),Wg(E,2)}if(E=Jg(d),E===null&&Dg(r,i,d,kh,a),E===m)break;m=E}m!==null&&d.stopPropagation()}else Dg(r,i,d,null,a)}}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=u(r);if(i===null)r=null;else{var a=i.tag;if(a===13){if(r=l(i),r!==null)return r;r=null}else if(a===31){if(r=c(i),r!==null)return r;r=null}else if(a===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=[],rR="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,a,d,m,E){return r===null||r.nativeEvent!==E?(r={blockedOn:i,domEventName:a,eventSystemFlags:d,nativeEvent:E,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 nR(r,i,a,d,m){switch(i){case"focusin":return ys=Zl(ys,r,i,a,d,m),!0;case"dragenter":return gs=Zl(gs,r,i,a,d,m),!0;case"mouseover":return ms=Zl(ms,r,i,a,d,m),!0;case"pointerover":var E=m.pointerId;return Xl.set(E,Zl(Xl.get(E)||null,r,i,a,d,m)),!0;case"gotpointercapture":return E=m.pointerId,Jl.set(E,Zl(Jl.get(E)||null,r,i,a,d,m)),!0}return!1}function E2(r){var i=xi(r.target);if(i!==null){var a=u(i);if(a!==null){if(i=a.tag,i===13){if(i=l(a),i!==null){r.blockedOn=i,$n(r.priority,function(){w2(a)});return}}else if(i===31){if(i=c(a),i!==null){r.blockedOn=i,$n(r.priority,function(){w2(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.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 a=Jg(r.nativeEvent);if(a===null){a=r.nativeEvent;var d=new a.constructor(a.type,a);Zp=d,a.target.dispatchEvent(d),Zp=null}else return i=Ei(a),i!==null&&A2(i),r.blockedOn=a,!1;i.shift()}return!0}function S2(r,i,a){Lh(r)&&a.delete(i)}function iR(){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,iR)))}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 a=r[i],d=r[i+1],m=r[i+2];if(typeof d!="function"){if(Zg(d||a)===null)continue;break}var E=Ei(a);E!==null&&(r.splice(i,3),i-=3,Jy(E,{pending:!0,data:m,method:a.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 a=0;a<bs.length;a++){var d=bs[a];d.blockedOn===r&&(d.blockedOn=null)}for(;0<bs.length&&(a=bs[0],a.blockedOn===null);)E2(a),a.blockedOn===null&&bs.shift();if(a=(r.ownerDocument||r).$$reactFormReplay,a!=null)for(d=0;d<a.length;d+=3){var m=a[d],E=a[d+1],V=m[nr]||null;if(typeof E=="function")V||I2(a);else if(V){var ge=null;if(E&&E.hasAttribute("formAction")){if(m=E,V=E[nr]||null)ge=V.formAction;else if(Zg(m)!==null)continue}else ge=V.action;typeof ge=="function"?a[d+1]=ge:(a.splice(d,3),d-=3),I2(a)}}}function _2(){function r(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(V){return m=V})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),d||setTimeout(a,20)}function a(){if(!d&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.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(a,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 a=i.current,d=Yn();m2(a,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 a=0;a<bs.length&&i!==0&&i<bs[a].priority;a++);bs.splice(a,0,r),a===0&&E2(r)}};var C2=t.version;if(C2!=="19.2.0")throw Error(o(527,C2,"19.2.0"));ue.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 oR={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(oR),Ie=Hh}catch{}}return rc.createRoot=function(r,i){if(!s(r))throw Error(o(299));var a=!1,d="",m=jE,E=UE,V=NE;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(V=i.onRecoverableError)),i=y2(r,1,!1,null,null,a,d,null,m,E,V,_2),r[Mr]=i.current,Ng(r),new tm(i)},rc.hydrateRoot=function(r,i,a){if(!s(r))throw Error(o(299));var d=!1,m="",E=jE,V=UE,ge=NE,Fe=null;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(E=a.onUncaughtError),a.onCaughtError!==void 0&&(V=a.onCaughtError),a.onRecoverableError!==void 0&&(ge=a.onRecoverableError),a.formState!==void 0&&(Fe=a.formState)),i=y2(r,1,!0,i,a??null,d,m,Fe,E,V,ge,_2),i.context=g2(null),a=i.current,d=Yn(),d=qt(d),m=ns(d),m.callback=null,is(a,m,d),a=d,i.current.lanes=a,be(i,a),Hi(i),r[Mr]=i.current,Ng(r),new qh(i)},rc.version="19.2.0",rc}var z2;function ER(){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=xR(),sm.exports}var SR=ER(),IR=WF();function cc({isOpen:e,onClose:t,title:n,children:o,className:s,url:u}){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;u&&((h=globalThis==null?void 0:globalThis.open)==null||h.call(globalThis,u,"_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:[u&&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?IR.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 _R(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(!_R(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 CR(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 FR(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 OR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function TR(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function BR(e){for(let t=0;t<e.length;t++)e[t]=TR(e[t]);return e}const q2=OR?e=>e:BR;function RR(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=RR(e)),wa(e),e}function MR(...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 u=e[o];n.set(u,s),s+=u.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 jR(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",UR=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+=UR[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,u=0;s<n;s++,u+=2){const l=H2(e.charCodeAt(u)),c=H2(e.charCodeAt(u+1));if(l===void 0||c===void 0){const h=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+u)}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(u){throw new Error(e+" must be hex string or Uint8Array, cause: "+u)}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 u=e[o];n.set(u,s),s+=u.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 NR(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 DR(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),u=0;const l=()=>{o.fill(1),s.fill(0),u=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(u++>=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 PR={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,u,l)=>{const c=PR[u];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 "+u+", got "+h)};for(const[s,u]of Object.entries(t))o(s,u,!1);for(const[s,u]of Object.entries(n))o(s,u,!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 u=e(n,...o);return t.set(n,u),u}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tn=BigInt(0),bn=BigInt(1),fa=BigInt(2),kR=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,u=bn;for(;n!==Tn;){const c=o/n,h=o%n,f=s-u*c;o=n,n=h,s=u,u=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 LR(e,t){const n=(e.ORDER-iO)/oO,o=e.mul(t,fa),s=e.pow(o,n),u=e.mul(t,s),l=e.mul(e.mul(u,fa),s),c=e.mul(u,e.sub(l,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function $R(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 u=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,u),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 S=bn<<BigInt(p-w-1),M=h.pow(y,S);p=w,y=h.sqr(M),g=h.mul(g,y),b=h.mul(b,M)}return b}}function zR(e){return e%nO===kR?sO:e%oO===iO?LR:$R(e)}const qR=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function HR(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=qR.reduce((o,s)=>(o[s]="function",o),t);return ip(e,n)}function QR(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),u=e.inv(s);return t.reduceRight((l,c,h)=>e.is0(c)?l:(o[h]=e.mul(l,o[h]),e.mul(l,c)),u),o}function K2(e,t){const n=(e.ORDER-bn)/fa,o=e.pow(t,n),s=e.eql(o,e.ONE),u=e.eql(o,e.ZERO),l=e.eql(o,e.neg(e.ONE));if(!s&&!u&&!l)throw new Error("invalid Legendre symbol result");return s?1:u?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:u}=uO(e,t);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const c=Object.freeze({ORDER:e,isLE:n,BITS:s,BYTES:u,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)=>QR(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=zR(e)),l(c,h))),toBytes:h=>n?rO(h,u):lf(h,u),fromBytes:h=>{if(h.length!==u)throw new Error("Field.fromBytes: expected "+u+" 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 GR(e,t,n=!1){const o=e.length,s=lO(t),u=cO(t);if(o<16||o<u||o>1024)throw new Error("expected "+u+"-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 KR(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const s=BigInt(32),u=BigInt(4294967295),l=Number(n>>s&u),c=Number(n&u),h=o?4:0,f=o?0:4;e.setUint32(t+h,l,o),e.setUint32(t+f,c,o)}function YR(e,t,n){return e&t^~e&n}function VR(e,t,n){return e&t^e&n^t&n}class WR 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,u=t.length;for(let l=0;l<u;){const c=Math.min(s-this.pos,u-l);if(c===s){const h=cm(t);for(;s<=u-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:u}=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;KR(o,s-8,BigInt(this.length*8),u),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],u)}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:u,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=u,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 XR(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 JR(e,t=!1){const n=e.length;let o=new Uint32Array(n),s=new Uint32Array(n);for(let u=0;u<n;u++){const{h:l,l:c}=XR(e[u],t);[o[u],s[u]]=[l,c]}return[o,s]}const ZR=(e,t,n)=>e<<n|t>>>32-n,eM=(e,t,n)=>t<<n|e>>>32-n,tM=(e,t,n)=>t<<n-32|e>>>64-n,rM=(e,t,n)=>e<<n-32|t>>>64-n,nM=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 iM extends WR{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:u,F:l,G:c,H:h}=this;return[t,n,o,s,u,l,c,h]}set(t,n,o,s,u,l,c,h){this.A=t|0,this.B=n|0,this.C=o|0,this.D=s|0,this.E=u|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:u,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+YR(c,h,f)+nM[y]+vs[y]|0,F=(Qi(o,2)^Qi(o,13)^Qi(o,22))+VR(o,s,u)|0;p=f,f=h,h=c,c=l+b|0,l=u,u=s,s=o,o=b+F|0}o=o+this.A|0,s=s+this.B|0,u=u+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,u,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 iM);class hO extends ew{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,CR(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,u=new Uint8Array(s);u.set(o.length>s?t.create().update(o).digest():o);for(let l=0;l<u.length;l++)u[l]^=54;this.iHash.update(u),this.oHash=t.create();for(let l=0;l<u.length;l++)u[l]^=106;this.oHash.update(u),Uu(u)}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:u,blockLen:l,outputLen:c}=this;return t=t,t.finished=s,t.destroyed=u,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,u=np(e),l=BigInt(e);return{windows:n,windowSize:o,mask:u,maxNumber:s,shiftBy:l}}function W2(e,t,n){const{windowSize:o,mask:s,maxNumber:u,shiftBy:l}=n;let c=Number(e&s),h=e>>l;c>o&&(c-=u,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 oM(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 sM(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 aM(e,t){return{constTimeNegate:dm,hasPrecomputes(n){return gm(n)!==1},unsafeLadder(n,o,s=e.ZERO){let u=n;for(;o>V2;)o&Ab&&(s=s.add(u)),u=u.double(),o>>=Ab;return s},precomputeWindow(n,o){const{windows:s,windowSize:u}=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<u;p++)h=h.add(c),l.push(h);c=h.double()}return l},wNAF(n,o,s){let u=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])):u=u.add(dm(g,o[p]))}return{p:u,f:l}},wNAFUnsafe(n,o,s,u=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];u=u.add(y?g.negate():g)}}return u},getPrecomputes(n,o,s){let u=ym.get(o);return u||(u=this.precomputeWindow(o,n),n!==1&&ym.set(o,s(u))),u},wNAFCached(n,o,s){const u=gm(n);return this.wNAF(u,this.getPrecomputes(u,n,s),o)},wNAFCachedUnsafe(n,o,s,u){const l=gm(n);return l===1?this.unsafeLadder(n,o,u):this.wNAFUnsafe(l,this.getPrecomputes(l,n,s),o,u)},setWindowSize(n,o){pO(o,t),yO.set(n,o),ym.delete(n)}}}function uM(e,t,n,o){oM(n,e),sM(o,t);const s=n.length,u=o.length;if(s!==u)throw new Error("arrays of points and scalars must have equal length");const l=e.ZERO,c=NR(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<u;F++){const S=o[F],M=Number(S>>BigInt(b)&f);p[M]=p[M].add(n[F])}let w=l;for(let F=p.length-1,S=l;F>0;F--)S=S.add(p[F]),w=w.add(S);if(g=g.add(w),b!==0)for(let F=0;F<h;F++)g=g.double()}return g}function gO(e){return HR(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 lM(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 cM extends Error{constructor(t=""){super(t)}}const To={Err:cM,_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 u=o>127?Yh(s.length/2|128):"";return Yh(e)+u+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++],u=!!(s&128);let l=0;if(!u)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:u,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,u),{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)),u=o+s;return t.encode(48,u)}};function mm(e,t){return Cc(lf(e,t))}const Uo=BigInt(0),$r=BigInt(1);BigInt(2);const bm=BigInt(3),fM=BigInt(4);function hM(e){const t=lM(e),{Fp:n}=t,o=iw(t.n,t.nBitLength),s=t.toBytes||((I,R,T)=>{const z=R.toAffine();return zd(Uint8Array.from([4]),n.toBytes(z.x),n.toBytes(z.y))}),u=t.fromBytes||(I=>{const R=I.subarray(1),T=n.fromBytes(R.subarray(0,n.BYTES)),z=n.fromBytes(R.subarray(n.BYTES,2*n.BYTES));return{x:T,y:z}});function l(I){const{a:R,b:T}=t,z=n.sqr(I),k=n.mul(z,I);return n.add(n.add(k,n.mul(I,R)),T)}function c(I,R){const T=n.sqr(R),z=l(I);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),fM),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(I){return nw(I,$r,t.n)}function y(I){const{allowedPrivateKeyLengths:R,nByteLength:T,wrapPrivateKey:z,n:k}=t;if(R&&typeof I!="bigint"){if(uf(I)&&(I=Cc(I)),typeof I!="string"||!R.includes(I.length))throw new Error("invalid private key");I=I.padStart(T*2,"0")}let L;try{L=typeof I=="bigint"?I:ga(mi("private key",I,T))}catch{throw new Error("invalid private key, expected hex or "+T+" bytes, got "+typeof I)}return z&&(L=On(L,k)),Ou("private key",L,$r,k),L}function g(I){if(!(I instanceof F))throw new Error("ProjectivePoint expected")}const b=G2((I,R)=>{const{px:T,py:z,pz:k}=I;if(n.eql(k,n.ONE))return{x:T,y:z};const L=I.is0();R==null&&(R=L?n.ONE:n.inv(k));const j=n.mul(T,R),U=n.mul(z,R),$=n.mul(k,R);if(L)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(I=>{if(I.is0()){if(t.allowInfinityPoint&&!n.is0(I.py))return;throw new Error("bad point: ZERO")}const{x:R,y:T}=I.toAffine();if(!n.isValid(R)||!n.isValid(T))throw new Error("bad point: x or y not FE");if(!c(R,T))throw new Error("bad point: equation left != right");if(!I.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class F{constructor(R,T,z){if(R==null||!n.isValid(R))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=R,this.py=T,this.pz=z,Object.freeze(this)}static fromAffine(R){const{x:T,y:z}=R||{};if(!R||!n.isValid(T)||!n.isValid(z))throw new Error("invalid affine point");if(R instanceof F)throw new Error("projective point not allowed");const k=L=>n.eql(L,n.ZERO);return k(T)&&k(z)?F.ZERO:new F(T,z,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){const T=aO(n,R.map(z=>z.pz));return R.map((z,k)=>z.toAffine(T[k])).map(F.fromAffine)}static fromHex(R){const T=F.fromAffine(u(mi("pointHex",R)));return T.assertValidity(),T}static fromPrivateKey(R){return F.BASE.multiply(y(R))}static msm(R,T){return uM(F,o,R,T)}_setWindowSize(R){A.setWindowSize(this,R)}assertValidity(){w(this)}hasEvenY(){const{y:R}=this.toAffine();if(n.isOdd)return!n.isOdd(R);throw new Error("Field doesn't support isOdd")}equals(R){g(R);const{px:T,py:z,pz:k}=this,{px:L,py:j,pz:U}=R,$=n.eql(n.mul(T,U),n.mul(L,k)),N=n.eql(n.mul(z,U),n.mul(j,k));return $&&N}negate(){return new F(this.px,n.neg(this.py),this.pz)}double(){const{a:R,b:T}=t,z=n.mul(T,bm),{px:k,py:L,pz:j}=this;let U=n.ZERO,$=n.ZERO,N=n.ZERO,Z=n.mul(k,k),re=n.mul(L,L),ne=n.mul(j,j),X=n.mul(k,L);return X=n.add(X,X),N=n.mul(k,j),N=n.add(N,N),U=n.mul(R,N),$=n.mul(z,ne),$=n.add(U,$),U=n.sub(re,$),$=n.add(re,$),$=n.mul(U,$),U=n.mul(X,U),N=n.mul(z,N),ne=n.mul(R,ne),X=n.sub(Z,ne),X=n.mul(R,X),X=n.add(X,N),N=n.add(Z,Z),Z=n.add(N,Z),Z=n.add(Z,ne),Z=n.mul(Z,X),$=n.add($,Z),ne=n.mul(L,j),ne=n.add(ne,ne),Z=n.mul(ne,X),U=n.sub(U,Z),N=n.mul(ne,re),N=n.add(N,N),N=n.add(N,N),new F(U,$,N)}add(R){g(R);const{px:T,py:z,pz:k}=this,{px:L,py:j,pz:U}=R;let $=n.ZERO,N=n.ZERO,Z=n.ZERO;const re=t.a,ne=n.mul(t.b,bm);let X=n.mul(T,L),ue=n.mul(z,j),ye=n.mul(k,U),le=n.add(T,z),ee=n.add(L,j);le=n.mul(le,ee),ee=n.add(X,ue),le=n.sub(le,ee),ee=n.add(T,k);let G=n.add(L,U);return ee=n.mul(ee,G),G=n.add(X,ye),ee=n.sub(ee,G),G=n.add(z,k),$=n.add(j,U),G=n.mul(G,$),$=n.add(ue,ye),G=n.sub(G,$),Z=n.mul(re,ee),$=n.mul(ne,ye),Z=n.add($,Z),$=n.sub(ue,Z),Z=n.add(ue,Z),N=n.mul($,Z),ue=n.add(X,X),ue=n.add(ue,X),ye=n.mul(re,ye),ee=n.mul(ne,ee),ue=n.add(ue,ye),ye=n.sub(X,ye),ye=n.mul(re,ye),ee=n.add(ee,ye),X=n.mul(ue,ee),N=n.add(N,X),X=n.mul(G,ee),$=n.mul(le,$),$=n.sub($,X),X=n.mul(le,ue),Z=n.mul(G,Z),Z=n.add(Z,X),new F($,N,Z)}subtract(R){return this.add(R.negate())}is0(){return this.equals(F.ZERO)}wNAF(R){return A.wNAFCached(this,R,F.normalizeZ)}multiplyUnsafe(R){const{endo:T,n:z}=t;Ou("scalar",R,Uo,z);const k=F.ZERO;if(R===Uo)return k;if(this.is0()||R===$r)return this;if(!T||A.hasPrecomputes(this))return A.wNAFCachedUnsafe(this,R,F.normalizeZ);let{k1neg:L,k1:j,k2neg:U,k2:$}=T.splitScalar(R),N=k,Z=k,re=this;for(;j>Uo||$>Uo;)j&$r&&(N=N.add(re)),$&$r&&(Z=Z.add(re)),re=re.double(),j>>=$r,$>>=$r;return L&&(N=N.negate()),U&&(Z=Z.negate()),Z=new F(n.mul(Z.px,T.beta),Z.py,Z.pz),N.add(Z)}multiply(R){const{endo:T,n:z}=t;Ou("scalar",R,$r,z);let k,L;if(T){const{k1neg:j,k1:U,k2neg:$,k2:N}=T.splitScalar(R);let{p:Z,f:re}=this.wNAF(U),{p:ne,f:X}=this.wNAF(N);Z=A.constTimeNegate(j,Z),ne=A.constTimeNegate($,ne),ne=new F(n.mul(ne.px,T.beta),ne.py,ne.pz),k=Z.add(ne),L=re.add(X)}else{const{p:j,f:U}=this.wNAF(R);k=j,L=U}return F.normalizeZ([k,L])[0]}multiplyAndAddUnsafe(R,T,z){const k=F.BASE,L=(U,$)=>$===Uo||$===$r||!U.equals(k)?U.multiplyUnsafe($):U.multiply($),j=L(this,T).add(L(R,z));return j.is0()?void 0:j}toAffine(R){return b(this,R)}isTorsionFree(){const{h:R,isTorsionFree:T}=t;if(R===$r)return!0;if(T)return T(F,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:R,clearCofactor:T}=t;return R===$r?this:T?T(F,this):this.multiplyUnsafe(t.h)}toRawBytes(R=!0){return _c("isCompressed",R),this.assertValidity(),s(F,this,R)}toHex(R=!0){return _c("isCompressed",R),Cc(this.toRawBytes(R))}}F.BASE=new F(t.Gx,t.Gy,n.ONE),F.ZERO=new F(n.ZERO,n.ONE,n.ZERO);const{endo:S,nBitLength:M}=t,A=aM(F,S?Math.ceil(M/2):M);return{CURVE:t,ProjectivePoint:F,normPrivateKeyToScalar:y,weierstrassEquation:l,isWithinCurveOrder:p}}function dM(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 pM(e){const t=dM(e),{Fp:n,n:o,nByteLength:s,nBitLength:u}=t,l=n.BYTES+1,c=2*n.BYTES+1;function h(ne){return On(ne,o)}function f(ne){return bb(ne,o)}const{ProjectivePoint:p,normPrivateKeyToScalar:y,weierstrassEquation:g,isWithinCurveOrder:b}=hM({...t,toBytes(ne,X,ue){const ye=X.toAffine(),le=n.toBytes(ye.x),ee=zd;return _c("isCompressed",ue),ue?ee(Uint8Array.from([X.hasEvenY()?2:3]),le):ee(Uint8Array.from([4]),le,n.toBytes(ye.y))},fromBytes(ne){const X=ne.length,ue=ne[0],ye=ne.subarray(1);if(X===l&&(ue===2||ue===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(ue&1)===1!==Q&&(G=n.neg(G)),{x:le,y:G}}else if(X===c&&ue===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(ne){const X=o>>$r;return ne>X}function F(ne){return w(ne)?h(-ne):ne}const S=(ne,X,ue)=>ga(ne.slice(X,ue));class M{constructor(X,ue,ye){Ou("r",X,$r,o),Ou("s",ue,$r,o),this.r=X,this.s=ue,ye!=null&&(this.recovery=ye),Object.freeze(this)}static fromCompact(X){const ue=s;return X=mi("compactSignature",X,ue*2),new M(S(X,0,ue),S(X,ue,2*ue))}static fromDER(X){const{r:ue,s:ye}=To.toSig(mi("DER",X));return new M(ue,ye)}assertValidity(){}addRecoveryBit(X){return new M(this.r,this.s,X)}recoverPublicKey(X){const{r:ue,s:ye,recovery:le}=this,ee=k(mi("msgHash",X));if(le==null||![0,1,2,3].includes(le))throw new Error("recovery id invalid");const G=le===2||le===3?ue+t.n:ue;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),ae=p.BASE.multiplyAndAddUnsafe(K,q,fe);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new M(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(ne){try{return y(ne),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const ne=cO(t.n);return GR(t.randomBytes(ne),t.n)},precompute(ne=8,X=p.BASE){return X._setWindowSize(ne),X.multiply(BigInt(3)),X}};function I(ne,X=!0){return p.fromPrivateKey(ne).toRawBytes(X)}function R(ne){if(typeof ne=="bigint")return!1;if(ne instanceof p)return!0;const ue=mi("key",ne).length,ye=n.BYTES,le=ye+1,ee=2*ye+1;if(!(t.allowedPrivateKeyLengths||s===le))return ue===le||ue===ee}function T(ne,X,ue=!0){if(R(ne)===!0)throw new Error("first arg must be private key");if(R(X)===!1)throw new Error("second arg must be public key");return p.fromHex(X).multiply(y(ne)).toRawBytes(ue)}const z=t.bits2int||function(ne){if(ne.length>8192)throw new Error("input is too large");const X=ga(ne),ue=ne.length*8-u;return ue>0?X>>BigInt(ue):X},k=t.bits2int_modN||function(ne){return h(z(ne))},L=np(u);function j(ne){return Ou("num < 2^"+u,ne,Uo,L),lf(ne,s)}function U(ne,X,ue=$){if(["recovered","canonical"].some(J=>J in ue))throw new Error("sign() legacy options not supported");const{hash:ye,randomBytes:le}=t;let{lowS:ee,prehash:G,extraEntropy:Q}=ue;ee==null&&(ee=!0),ne=mi("msgHash",ne),X2(ue),G&&(ne=mi("prehashed msgHash",ye(ne)));const K=k(ne),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),ae=K;function ie(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(ae+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 M(se,_,te)}return{seed:fe,k2sig:ie}}const $={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function Z(ne,X,ue=$){const{seed:ye,k2sig:le}=U(ne,X,ue),ee=t;return DR(ee.hash.outputLen,ee.nByteLength,ee.hmac)(ye,le)}p.BASE._setWindowSize(8);function re(ne,X,ue,ye=N){var te;const le=ne;X=mi("msgHash",X),ue=mi("publicKey",ue);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 M(le.r,le.s)),K){try{Q!=="compact"&&(q=M.fromDER(le))}catch(_){if(!(_ instanceof To.Err))throw _}!q&&Q!=="der"&&(q=M.fromCompact(le))}fe=p.fromHex(ue)}catch{return!1}if(!q||ee&&q.hasHighS())return!1;G&&(X=t.hash(X));const{r:ae,s:ie}=q,J=k(X),O=f(ie),H=h(J*O),Y=h(ae*O),se=(te=p.BASE.multiplyAndAddUnsafe(fe,H,Y))==null?void 0:te.toAffine();return se?h(se.x)===ae:!1}return{CURVE:t,getPublicKey:I,getSharedSecret:T,sign:Z,verify:re,ProjectivePoint:p,Signature:M,utils:A}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function yM(e){return{hash:e,hmac:(t,...n)=>dO(e,t,MR(...n)),randomBytes:jR}}function gM(e,t){const n=o=>pM({...e,...yM(o)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const mO=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),J2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),mM=BigInt(0),bM=BigInt(1),wb=BigInt(2),Z2=(e,t)=>(e+t/wb)/t;function AM(e){const t=mO,n=BigInt(3),o=BigInt(6),s=BigInt(11),u=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,u,t)*w%t,S=gi(F,c,t)*F%t,M=gi(S,h,t)*S%t,A=gi(M,c,t)*F%t,I=gi(A,n,t)*p%t,R=gi(I,l,t)*w%t,T=gi(R,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:AM}),cf=gM({a:mM,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=-bM*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),u=n,l=BigInt("0x100000000000000000000000000000000"),c=Z2(u*e,t),h=Z2(-o*e,t);let f=On(e-c*n-h*s,t),p=On(-c*o-h*u,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),wM=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:cf},Symbol.toStringTag,{value:"Module"})),bO="2.38.6";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,u=(c=nc.getDocsUrl)==null?void 0:c.call(nc,{...n,docsPath:s}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...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:u}){super(`Number "${u}" is not in safe ${s?`${s*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class vM 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 xM 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}):EM(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 EM(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 u=t==="right";o[u?s:n-s-1]=e[u?s:e.length-s-1]}return o}const SM=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+=SM[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 u;o?n?u=(1n<<BigInt(o)*8n-1n)-1n:u=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(u=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof u=="bigint"&&n?-u-1n:0;if(u&&s>u||s<l){const h=typeof e=="bigint"?"n":"";throw new wO({max:u?`${u}${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 IM=new TextEncoder;function Nu(e,t={}){const n=IM.encode(e);return dn(n,t)}const _M=new TextEncoder;function ow(e,t={}){return typeof e=="number"||typeof e=="bigint"?FM(e,t):typeof e=="boolean"?CM(e,t):ko(e)?Bi(e,t):SO(e,t)}function CM(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,u=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}").`);u[l]=h*16+f}return u}function FM(e,t){const n=it(e,t);return Bi(n)}function SO(e,t={}){const n=_M.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 xM({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,u=(1n<<BigInt(s)*8n-1n)-1n;return o<=u?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 OM({r:e,s:t,to:n="hex",v:o,yParity:s}){const u=(()=>{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()}${u===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 TM=BigInt(0),ic=BigInt(1),BM=BigInt(2),RM=BigInt(7),MM=BigInt(256),jM=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=TM;for(let u=0;u<7;u++)t=(t<<ic^(t>>RM)*jM)%MM,t&BM&&(s^=ic<<(ic<<BigInt(u))-ic);OO.push(s)}const TO=JR(OO,!0),UM=TO[0],NM=TO[1],rI=(e,t,n)=>n>32?tM(e,t,n):ZR(e,t,n),nI=(e,t,n)=>n>32?rM(e,t,n):eM(e,t,n);function DM(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],u=e[3];for(let l=0;l<24;l++){const c=FO[l],h=rI(s,u,c),f=nI(s,u,c),p=CO[l];s=e[p],u=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]^=UM[o],e[1]^=NM[o]}Uu(n)}class sw extends ew{constructor(t,n,o,s=!1,u=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=u,Ic(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=FR(this.state)}clone(){return this._cloneInto()}keccak(){q2(this.state32),DM(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 u=0;u<s;){const l=Math.min(n-this.pos,s-u);for(let c=0;c<l;c++)o[this.pos++]^=t[u++];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,u=t.length;s<u;){this.posOut>=o&&this.keccak();const l=Math.min(o-this.posOut,u-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:u,enableXOF:l}=this;return t||(t=new sw(n,o,s,l,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=o,t.outputLen=s,t.enableXOF=l,t.destroyed=this.destroyed,t}}const PM=(e,t,n)=>JF(()=>new sw(t,e,n)),kM=PM(1,136,256/8);function Vn(e,t){const n=t||"hex",o=kM(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 u=`0x${s.join("")}`;return Am.set(`${e}.${t}`,u),u}function LM(e,t){if(!Hr(e,{strict:!1}))throw new An({address:e});return hf(e,t)}const $M=/^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=$M.test(e)?e.toLowerCase()===e?!0:n?hf(e)===e:!0:!1;return wm.set(o,s),s}function zM(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:u}=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:u?28n:27n,yParity:u};return n==="bytes"||n==="hex"?OM({...l,to:n}):l}function Zi(e){return typeof e[0]=="string"?Rs(e):qM(e)}function qM(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 HM extends Je{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class QM extends Je{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const GM={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 QM({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new HM({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(GM);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)?KM(e.map(t=>RO(t))):YM(e)}function KM(e){const t=e.reduce((s,u)=>s+u.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:u}of e)u(s)}}}function YM(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,u=Vn(Rs(["0x05",va([t?it(t):"0x",s,n?it(n):"0x"])]));return o==="bytes"?Bi(u):u}async function VM(e){const{chainId:t,nonce:n,privateKey:o,to:s="object"}=e,u=e.contractAddress??e.address,l=await df({hash:jO({address:u,chainId:t,nonce:n}),privateKey:o,to:s});return s==="object"?{address:u,chainId:t,nonce:n,...l}:l}const WM=`Ethereum Signed Message:
|
|
40
|
-
`;function XM(e){const t=typeof e=="string"?Nu(e):typeof e.raw=="string"?e.raw:dn(e.raw),n=Nu(`${WM}${pr(t)}`);return Zi([n,t])}function JM(e,t){return Vn(XM(e),t)}async function ZM({message:e,privateKey:t}){return await df({hash:JM(e),privateKey:t,to:"hex"})}const ej={gwei:9,wei:18},tj={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,u]=[n.slice(0,n.length-t),n.slice(n.length-t)];return u=u.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${u?`.${u}`:""}`}function NO(e,t="wei"){return UO(e,ej[t])}function Ti(e,t="wei"){return UO(e,tj[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 rj 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 nj extends Je{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class ij 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 oj 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 sj extends Je{constructor(t,{account:n,docsPath:o,chain:s,data:u,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:u,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:u}){let l="Transaction";o&&u!==void 0&&(l=`Transaction at block time "${o}" at index "${u}"`),t&&u!==void 0&&(l=`Transaction at block hash "${t}" at index "${u}"`),n&&u!==void 0&&(l=`Transaction at block number "${n}" at index "${u}"`),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 kO extends Je{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class aj extends Je{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function uj(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:o,nonce:s,...u}=n,l=n.address;t.push([o?Xi(o):"0x",l,s?Xi(s):"0x",...pf({},u)])}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(u=>Bi(u)):e.blobs,s=[];for(const u of o)s.push(Uint8Array.from(t.blobToKzgCommitment(u)));return n==="bytes"?s:s.map(u=>dn(u))}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,u=[];for(let l=0;l<o.length;l++){const c=o[l],h=s[l];u.push(Uint8Array.from(t.computeBlobKzgProof(c,h)))}return n==="bytes"?u:u.map(l=>dn(l))}const xb=fO;function lj(e,t){return xb(ko(e,{strict:!1})?ow(e):e)}function cj(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=lj(t);return s.set([n],0),o==="bytes"?s:dn(s)}function LO(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const u of t)s.push(cj({commitment:u,to:o,version:n}));return s}const oI=6,$O=32,cw=4096,zO=$O*cw,sI=zO*oI-1-1*cw*oI,qO=1;class fj extends Je{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class HO extends Je{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class hj extends Je{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class dj extends Je{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${qO}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function pj(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 HO;if(o>sI)throw new fj({maxSize:sI,size:o});const s=[];let u=!0,l=0;for(;u;){const c=aw(new Uint8Array(zO));let h=0;for(;h<cw;){const f=n.slice(l,l+($O-1));if(c.pushByte(0),c.pushBytes(f),f.length<31){c.pushByte(128),u=!1;break}h++,l+=31}s.push(c)}return t==="bytes"?s.map(c=>c.bytes):s.map(c=>dn(c.bytes))}function QO(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??pj({data:t,to:o}),u=e.commitments??uw({blobs:s,kzg:n,to:o}),l=e.proofs??lw({blobs:s,commitments:u,kzg:n,to:o}),c=[];for(let h=0;h<s.length;h++)c.push({blob:s[h],commitment:u[h],proof:l[h]});return c}const sp=2n**256n-1n;class yj 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 gj 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}):YO(e,t,n,{strict:o})}function GO(e,t){if(typeof t=="number"&&t>0&&t>pr(e)-1)throw new vO({offset:t,position:"start",size:pr(e)})}function KO(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 YO(e,t,n,{strict:o}={}){GO(e,t);const s=e.slice(t,n);return o&&KO(s,t,n),s}function Bb(e,t,n,{strict:o}={}){GO(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&KO(s,t,n),s}function mj(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 bj(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new HO;for(const n of t){const o=pr(n),s=Ji(Oc(n,0,1));if(o!==32)throw new hj({hash:n,size:o});if(s!==qO)throw new dj({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 Aj(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(t<=0)throw new ap({chainId:t});if(u&&!Hr(u))throw new An({address:u});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 wj(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(u&&!Hr(u))throw new An({address:u});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 VO(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 ij({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 u=0;u<s.length;u++)if(s[u].length-2!==64)throw new oj({storageKey:s[u]});if(!Hr(o,{strict:!1}))throw new An({address:o});t.push([o,s])}return t}function vj(e,t){const n=VO(e);return n==="eip1559"?Sj(e,t):n==="eip2930"?Ij(e,t):n==="eip4844"?Ej(e,t):n==="eip7702"?xj(e,t):_j(e,t)}function xj(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:u,to:l,value:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;mj(e);const g=up(p),b=uj(n);return Rs(["0x04",va([it(o),u?it(u):"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 Ej(e,t){const{chainId:n,gas:o,nonce:s,to:u,value:l,maxFeePerBlobGas:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;bj(e);let g=e.blobVersionedHashes,b=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof b>"u")){const I=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>dn(z)),R=e.kzg,T=uw({blobs:I,kzg:R});if(typeof g>"u"&&(g=LO({commitments:T})),typeof b>"u"){const z=lw({blobs:I,commitments:T,kzg:R});b=QO({blobs:I,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",u??"0x",l?it(l):"0x",y??"0x",w,c?it(c):"0x",g??[],...pf(e,t)],S=[],M=[],A=[];if(b)for(let I=0;I<b.length;I++){const{blob:R,commitment:T,proof:z}=b[I];S.push(R),M.push(T),A.push(z)}return Rs(["0x03",va(b?[F,S,M,A]:F)])}function Sj(e,t){const{chainId:n,gas:o,nonce:s,to:u,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",u??"0x",l?it(l):"0x",p??"0x",y,...pf(e,t)];return Rs(["0x02",va(g)])}function Ij(e,t){const{chainId:n,gas:o,data:s,nonce:u,to:l,value:c,accessList:h,gasPrice:f}=e;Aj(e);const p=up(h),y=[it(n),u?it(u):"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 _j(e,t){const{chainId:n=0,gas:o,data:s,nonce:u,to:l,value:c,gasPrice:h}=e;wj(e);let f=[u?it(u):"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 nj({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 u=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),u==="0x00"?"0x":u,l==="0x00"?"0x":l]}async function Cj(e){const{privateKey:t,transaction:n,serializer:o=vj}=e,s=n.type==="eip4844"?{...n,sidecars:!1}:n,u=await df({hash:Vn(await o(s)),privateKey:t});return await o(n,u)}function Du(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new kj(e.type);return`${e.name}(${dw(e.inputs,{includeName:t})})`}function dw(e,{includeName:t=!1}={}){return e?e.map(n=>Fj(n,{includeName:t})).join(t?", ":","):""}function Fj(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 Oj 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 Tj 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 Bj 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 Rj 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 Mj 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 WO 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 jj 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 Uj extends Je{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class Nj 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 Dj 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 Pj extends Je{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
56
|
-
`),{name:"InvalidArrayError"})}}class kj extends Je{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
57
|
-
`),{name:"InvalidDefinitionTypeError"})}}const Lj=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,XO=/^(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 Mj({expectedLength:e.length,givenLength:t.length});const n=$j({params:e,values:t}),o=gw(n);return o.length===0?"0x":o}function $j({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 qj(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return Yj(t,{param:e});if(e.type==="address")return zj(t);if(e.type==="bool")return Qj(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=XO.exec(e.type)??[];return Gj(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return Hj(t,{param:e});if(e.type==="string")return Kj(t);throw new Nj(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function gw(e){let t=0;for(let u=0;u<e.length;u++){const{dynamic:l,encoded:c}=e[u];l?t+=32:t+=pr(c)}const n=[],o=[];let s=0;for(let u=0;u<e.length;u++){const{dynamic:l,encoded:c}=e[u];l?(n.push(it(t+s,{size:32})),o.push(c),s+=pr(c)):n.push(c)}return Zi([...n,...o])}function zj(e){if(!Hr(e))throw new An({address:e});return{dynamic:!1,encoded:Ts(e.toLowerCase())}}function qj(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new Pj(e);if(!o&&e.length!==t)throw new Bj({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const u=[];for(let l=0;l<e.length;l++){const c=yw({param:n,value:e[l]});c.dynamic&&(s=!0),u.push(c)}if(o||s){const l=gw(u);if(o){const c=it(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?Zi([c,l]):c}}if(s)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:Zi(u.map(({encoded:l})=>l))}}function Hj(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 Rj({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Ts(e,{dir:"right"})}}function Qj(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 Gj(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 Kj(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 Yj(e,{param:t}){let n=!1;const o=[];for(let s=0;s<t.components.length;s++){const u=t.components[s],l=Array.isArray(e)?s:u.name,c=yw({param:u,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 Vj extends Je{constructor({domain:t}){super(`Invalid domain "${Mn(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Wj 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 Xj extends Je{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Jj(e){const{domain:t,message:n,primaryType:o,types:s}=e,u=(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?u(s.EIP712Domain,t):{}:{},c=(()=>{if(o!=="EIP712Domain")return u(s[o],n)})();return Mn({domain:l,message:c,primaryType:o,types:s})}function JO(e){const{domain:t,message:n,primaryType:o,types:s}=e,u=(l,c)=>{for(const h of l){const{name:f,type:p}=h,y=c[f],g=p.match(XO);if(g&&(typeof y=="number"||typeof y=="bigint")){const[F,S,M]=g;it(y,{signed:S==="int",size:Number.parseInt(M,10)/8})}if(p==="address"&&typeof y=="string"&&!Hr(y))throw new An({address:y});const b=p.match(Lj);if(b){const[F,S]=b;if(S&&pr(y)!==Number.parseInt(S,10))throw new Uj({expectedSize:Number.parseInt(S,10),givenSize:pr(y)})}const w=s[p];w&&(Zj(p),u(w,y))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new Vj({domain:t});u(s.EIP712Domain,t)}if(o!=="EIP712Domain")if(s[o])u(s[o],n);else throw new Wj({primaryType:o,types:s})}function ZO({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 Zj(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Xj({type:e})}function eU(e){const{domain:t={},message:n,primaryType:o}=e,s={EIP712Domain:ZO({domain:t}),...e.types};JO({domain:t,message:n,primaryType:o,types:s});const u=["0x1901"];return t&&u.push(tU({domain:t,types:s})),o!=="EIP712Domain"&&u.push(eT({data:n,primaryType:o,types:s})),Vn(Zi(u))}function tU({domain:e,types:t}){return eT({data:e,primaryType:"EIP712Domain",types:t})}function eT({data:e,primaryType:t,types:n}){const o=tT({data:e,primaryType:t,types:n});return Vn(o)}function tT({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],s=[rU({primaryType:t,types:n})];for(const u of n[t]){const[l,c]=nT({types:n,name:u.name,type:u.type,value:e[u.name]});o.push(l),s.push(c)}return lp(o,s)}function rU({primaryType:e,types:t}){const n=Xi(nU({primaryType:e,types:t}));return Vn(n)}function nU({primaryType:e,types:t}){let n="";const o=rT({primaryType:e,types:t});o.delete(e);const s=[e,...Array.from(o).sort()];for(const u of s)n+=`${u}(${t[u].map(({name:l,type:c})=>`${c} ${l}`).join(",")})`;return n}function rT({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 u of t[s])rT({primaryType:u.type,types:t},n);return n}function nT({types:e,name:t,type:n,value:o}){if(e[n]!==void 0)return[{type:"bytes32"},Vn(tT({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("[")),u=o.map(l=>nT({name:t,type:s,types:e,value:l}));return[{type:"bytes32"},Vn(lp(u.map(([l])=>l),u.map(([,l])=>l)))]}return[{type:n},o]}async function iU(e){const{privateKey:t,...n}=e;return await df({hash:eU(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{...zM({address:s,nonceManager:n,async sign({hash:l}){return df({hash:l,privateKey:e,to:"hex"})},async signAuthorization(l){return VM({...l,privateKey:e})},async signMessage({message:l}){return ZM({message:l,privateKey:e})},async signTransaction(l,{serializer:c}={}){return Cj({privateKey:e,transaction:l,serializer:c})},async signTypedData(l){return iU({...l,privateKey:e})}}),publicKey:o,source:"privateKey"}}function wn(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}function oU(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 u=e.components[s];t+=Rb(u),s<n-1&&(t+=", ")}const o=oU(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 sU(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:u=>t(e,u)}const aU=e=>Vn(ow(e));function uU(e){return aU(e)}function lU(e){let t=!0,n="",o=0,s="",u=!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===")"){u=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=c,n+=c}}if(!u)throw new Je("Unable to normalize signature.");return s}const cU=e=>{const t=typeof e=="string"?e:sU(e);return lU(t)};function iT(e){return uU(cU(e))}const fU=iT,bw=e=>Oc(iT(e),0,4);function oT(e){const{abi:t,args:n=[],name:o}=e,s=ko(o,{strict:!1}),u=t.filter(c=>s?c.type==="function"?bw(c)===o:c.type==="event"?fU(c)===o:!1:"name"in c&&c.name===o);if(u.length===0)return;if(u.length===1)return u[0];let l;for(const c of u){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=sT(c.inputs,l.inputs,n);if(f)throw new jj({abiItem:c,type:f[0]},{abiItem:l,type:f[1]})}l=c}}return l||u[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,u)=>Mb(Object.values(e)[u],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 sT(e,t,n){for(const o in e){const s=e[o],u=t[o];if(s.type==="tuple"&&u.type==="tuple"&&"components"in s&&"components"in u)return sT(s.components,u.components,n[o]);const l=[s.type,u.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 hU(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const u=oT({abi:t,args:n,name:o});if(!u)throw new uI(o,{docsPath:cI});s=u}if(s.type!=="function")throw new uI(void 0,{docsPath:cI});return{abi:[s],functionName:bw(Du(s))}}function aT(e){const{args:t}=e,{abi:n,functionName:o}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:hU(e)})(),s=n[0],u=o,l="inputs"in s&&s.inputs?lp(s.inputs,t??[]):void 0;return Rs([u,l??"0x"])}const dU={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."},pU={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},yU={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function gU(e,t={}){typeof t.size<"u"&&to(e,{size:t.size});const n=dn(e,t);return Ri(n,t)}function mU(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 vM(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 bU(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 AU(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 Tj({data:typeof t=="string"?t:dn(t),params:e,size:pr(t)});let s=0;const u=[];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,u.push(h)}return u}function Tu(e,t,{staticPosition:n}){const o=mw(t.type);if(o){const[s,u]=o;return vU(e,{...t,type:u},{length:s,staticPosition:n})}if(t.type==="tuple")return IU(e,t,{staticPosition:n});if(t.type==="address")return wU(e);if(t.type==="bool")return xU(e);if(t.type.startsWith("bytes"))return EU(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return SU(e,t);if(t.type==="string")return _U(e,{staticPosition:n});throw new Dj(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const fI=32,jb=32;function wU(e){const t=e.readBytes(32);return[hf(dn(YO(t,-20))),32]}function vU(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 u=[];for(let l=0;l<n;++l){const[c,h]=Tu(e,t,{staticPosition:o+s});s+=h,u.push(c)}return[u,s]}function xU(e){return[mU(e.readBytes(32),{size:32}),32]}function EU(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 SU(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?gU(s,{signed:n}):Po(s,{signed:n}),32]}function IU(e,t,{staticPosition:n}){const o=t.components.length===0||t.components.some(({name:l})=>!l),s=o?[]:{};let u=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+u);const[p,y]=Tu(e,f,{staticPosition:c});u+=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,u+=f}return[s,u]}function _U(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 u=e.readBytes(s,32),l=bU(Bs(u));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 CU(e){const{abi:t,data:n}=e,o=Oc(n,0,4);if(o==="0x")throw new pw;const u=[...t||[],pU,yU].find(l=>l.type==="error"&&o===bw(Du(l)));if(!u)throw new WO(o,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?AU(u.inputs,Oc(n,4)):void 0,errorName:u.name}}function uT({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,u)=>`${o&&s.name?`${s.name}: `:""}${typeof t[u]=="object"?Mn(t[u]):t[u]}`).join(", ")})`}class FU extends Je{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class OU extends Je{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}const TU=e=>e,Aw=e=>e;class BU extends Je{constructor(t,{abi:n,args:o,contractAddress:s,docsPath:u,functionName:l,sender:c}){const h=oT({abi:n,args:o,name:l}),f=h?uT({abiItem:h,args:o,includeFunctionName:!1,includeName:!1}):void 0,p=h?Du(h,{includeName:!0}):void 0,y=op({address:s&&TU(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:u,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 RU extends Je{constructor({abi:t,data:n,functionName:o,message:s}){let u,l,c,h;if(n&&n!=="0x")try{l=CU({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=dU[b]}else{const b=p?Du(p,{includeName:!0}):void 0,w=p&&g?uT({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){u=p}else s&&(h=s);let f;u instanceof WO&&(f=u.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:u,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 MU 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 jU 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:u,url:l}){super("HTTP request failed.",{cause:n,details:o,metaMessages:[u&&`Status: ${u}`,`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=u,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 UU=-1;class Pn extends Je{constructor(t,{code:n,docsPath:o,metaMessages:s,name:u,shortMessage:l}){super(l,{cause:t,docsPath:o,metaMessages:s||(t==null?void 0:t.metaMessages),name:u||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=u||t.name,this.code=t instanceof ww?t.code:n??UU}}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 NU extends Pn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const DU=3;function PU(e,{abi:t,address:n,args:o,docsPath:s,functionName:u,sender:l}){const c=e instanceof jU?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 MU({functionName:u}):[DU,Ea.code].includes(h)&&(f||p||y||g)?new RU({abi:t,data:typeof f=="object"?f.data:f,functionName:u,message:c instanceof ww?p:g??y}):e;return new BU(b,{abi:t,args:o,contractAddress:n,docsPath:s,functionName:u,sender:l})}const kU="modulepreload",LU=function(e){return"/"+e},dI={},$U=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=LU(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":kU,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 u(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"&&u(c.reason);return t().catch(u)})};async function zU({hash:e,signature:t}){const n=ko(e)?e:Xi(e),{secp256k1:o}=await $U(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>wM);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 qU({hash:e,signature:t}){return BO(await zU({hash:e,signature:t}))}async function vw(e){const{authorization:t,signature:n}=e;return qU({hash:jO(t),signature:n??t})}class HU extends Je{constructor(t,{account:n,docsPath:o,chain:s,data:u,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:u,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 lT(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 QU(e,{docsPath:t,...n}){const o=(()=>{const s=lT(e,n);return s instanceof fw?e:s})();return new HU(o,{docsPath:t,...n})}function xw(e,{format:t}){if(!t)return{};const n={};function o(u){const l=Object.keys(u);for(const c of l)c in e&&(n[c]=e[c]),u[c]&&typeof u[c]=="object"&&!Array.isArray(u[c])&&o(u[c])}const s=t(e||{});return o(s),n}const GU={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function cp(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=KU(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),e.account&&(n.from=e.account.address),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=GU[e.type]),typeof e.value<"u"&&(n.value=it(e.value)),n}function KU(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 YU(e){const{balance:t,nonce:n,state:o,stateDiff:s,code:u}=e,l={};if(u!==void 0&&(l.code=u),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 OU;l.stateDiff=yI(s)}return l}function VU(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 FU({address:n});t[n]=YU(o)}return t}function yf(e){const{account:t,gasPrice:n,maxFeePerGas:o,maxPriorityFeePerGas:s,to:u}=e,l=t?wn(t):void 0;if(l&&!Hr(l.address))throw new An({address:l.address});if(u&&!Hr(u))throw new An({address:u});if(typeof n<"u"&&(typeof o<"u"||typeof s<"u"))throw new rj;if(o&&o>sp)throw new xa({maxFeePerGas:o});if(s&&o&&s>o)throw new Fc({maxFeePerGas:o,maxPriorityFeePerGas:s})}class WU 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 XU extends Je{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ti(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class cT 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 fT={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function hT(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?fT[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=JU(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 JU(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 ZU(e,t){const n=(e.transactions??[]).map(o=>typeof o=="string"?o:hT(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 u=s??!1,l=n!==void 0?it(n):void 0;let c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,u]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[l||o,u]},{dedupe:!!l}),!c)throw new cT({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)||ZU)(c,"getBlock")}async function dT(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function eN(e,t){var u,l;const{block:n,chain:o=e.chain,request:s}=t||{};try{const c=((u=o==null?void 0:o.fees)==null?void 0:u.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,dT,"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:u="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 WU;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:u});if(w!==null)return w}if(u==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new Ew;const w=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await eN(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,dT,"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:u,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 S(){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 M=await S();g.nonce=await h.consume({address:y.address,chainId:M,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 M=uw({blobs:o,kzg:l});if(f.includes("blobVersionedHashes")){const A=LO({commitments:M,to:"hex"});g.blobVersionedHashes=A}if(f.includes("sidecars")){const A=lw({blobs:o,commitments:M,kzg:l}),I=QO({blobs:o,commitments:M,proofs:A,to:"hex"});g.sidecars=I}}if(f.includes("chainId")&&(g.chainId=await S()),(f.includes("fees")||f.includes("type"))&&typeof p>"u")try{g.type=VO(g)}catch{let M=mI.get(e.uid);if(typeof M>"u"){const A=await w();M=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",mI.set(e.uid,M)}g.type=M?"eip1559":"legacy"}if(f.includes("fees"))if(g.type!=="legacy"&&g.type!=="eip2930"){if(typeof g.maxFeePerGas>"u"||typeof g.maxPriorityFeePerGas>"u"){const M=await w(),{maxFeePerGas:A,maxPriorityFeePerGas:I}=await gI(e,{block:M,chain:s,request:g});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<I)throw new XU({maxPriorityFeePerGas:I});g.maxPriorityFeePerGas=I,g.maxFeePerGas=A}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new Ew;if(typeof t.gasPrice>"u"){const M=await w(),{gasPrice:A}=await gI(e,{block:M,chain:s,request:g,type:"legacy"});g.gasPrice=A}}return f.includes("gas")&&typeof u>"u"&&(g.gas=await Yt(e,tN,"estimateGas")({...g,account:y,prepare:(y==null?void 0:y.type)==="local"?[]:["blobVersionedHashes"]})),yf(g),delete g.parameters,g}async function tN(e,t){var l,c,h;const{account:n=e.account,prepare:o=!0}=t,s=n?wn(n):void 0,u=(()=>{if(Array.isArray(o))return o;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const{accessList:f,authorizationList:p,blobs:y,blobVersionedHashes:g,blockNumber:b,blockTag:w,data:F,gas:S,gasPrice:M,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:R,nonce:T,value:z,stateOverride:k,...L}=o?await fp(e,{...t,parameters:u}):t,U=(typeof b=="bigint"?it(b):void 0)||w,$=VU(k),N=await(async()=>{if(L.to)return L.to;if(p&&p.length>0)return await vw({authorization:p[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`")})})();yf(t);const Z=(h=(c=(l=e.chain)==null?void 0:l.formatters)==null?void 0:c.transactionRequest)==null?void 0:h.format,ne=(Z||cp)({...xw(L,{format:Z}),account:s,accessList:f,authorizationList:p,blobs:y,blobVersionedHashes:g,data:F,gas:S,gasPrice:M,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:R,nonce:T,to:N,value:z},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:$?[ne,U??e.experimental_blockTag??"latest",$]:U?[ne,U]:[ne]}))}catch(f){throw QU(f,{...t,account:s,chain:e.chain})}}function rN(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 nN(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 iN(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 Oj({docsPath:xm});if(!("inputs"in s))throw new aI({docsPath:xm});if(!s.inputs||s.inputs.length===0)throw new aI({docsPath:xm});const u=lp(s.inputs,n);return Rs([o,u])}function Iw(){let e=()=>{},t=()=>{};return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}const Em=new Map;function oN({fn:e,id:t,shouldSplitBatch:n,wait:o=0,sort:s}){const u=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]))&&u(),h().length>0?(f({args:p,resolve:g,reject:b}),y):(f({args:p,resolve:g,reject:b}),setTimeout(u,o),y)}}}const Sm=new Map,bI=new Map;let sN=0;function qd(e,t,n){const o=++sN,s=()=>Sm.get(e)||[],u=()=>{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(()=>{})}u()},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 pT(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let s=!0;const u=()=>s=!1;return(async()=>{let c;t&&(c=await e({unpoll:u}));const h=await(n==null?void 0:n(c))??o;await Ub(h);const f=async()=>{s&&(await e({unpoll:u}),await Ub(o),f())};f()})(),u}const aN=new Map,uN=new Map;function lN(e){const t=(s,u)=>({clear:()=>u.delete(s),get:()=>u.get(s),set:l=>u.set(s,l)}),n=t(e,aN),o=t(e,uN);return{clear:()=>{n.clear(),o.clear()},promise:n,response:o}}async function cN(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const o=lN(t),s=o.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let u=o.promise.get();u||(u=e(),o.promise.set(u));try{const l=await u;return o.response.set({created:new Date,data:l}),l}finally{o.promise.clear()}}const fN=e=>`blockNumber.${e}`;async function hN(e,{cacheTime:t=e.cacheTime}={}){const n=await cN(()=>e.request({method:"eth_blockNumber"}),{cacheKey:fN(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 gj;if(t!==e.id)throw new yj({chain:e,currentChainId:t})}function Cw(e,{docsPath:t,...n}){const o=(()=>{const s=lT(e,n);return s instanceof fw?e:s})();return new sj(o,{docsPath:t,...n})}async function yT(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,I,R,T;const{account:n=e.account,chain:o=e.chain,accessList:s,authorizationList:u,blobs:l,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,type:w,value:F,...S}=t;if(typeof n>"u")throw new Ms({docsPath:"/docs/actions/wallet/sendTransaction"});const M=n?wn(n):null;try{yf(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&u&&u.length>0)return await vw({authorization:u[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`.")})})();if((M==null?void 0:M.type)==="json-rpc"||M===null){let k;o!==null&&(k=await Yt(e,Yu,"getChainId")({}),_w({currentChainId:k,chain:o}));const L=(R=(I=(A=e.chain)==null?void 0:A.formatters)==null?void 0:I.transactionRequest)==null?void 0:R.format,U=(L||cp)({...xw(S,{format:L}),accessList:s,account:M,authorizationList:u,blobs:l,chainId:k,data:c,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(ne=>(Im.set(e.uid,!0),ne)).catch(ne=>{const X=ne;throw X.name==="MethodNotFoundRpcError"||X.name==="MethodNotSupportedRpcError"?(Im.set(e.uid,!1),re):X});throw re}}if((M==null?void 0:M.type)==="local"){const k=await Yt(e,fp,"prepareTransactionRequest")({account:M,accessList:s,authorizationList:u,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,nonceManager:M.nonceManager,parameters:[...Sw,"sidecars"],type:w,value:F,...S,to:z}),L=(T=o==null?void 0:o.serializers)==null?void 0:T.transaction,j=await M.signTransaction(k,{serializer:L});return await Yt(e,yT,"sendRawTransaction")({serializedTransaction:j})}throw(M==null?void 0:M.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:M==null?void 0:M.type})}catch(z){throw z instanceof ma?z:Cw(z,{...t,account:M,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,u){const{abi:l,account:c=n.account,address:h,args:f,dataSuffix:p,functionName:y,...g}=u;if(typeof c>"u")throw new Ms({docsPath:"/docs/contract/writeContract"});const b=c?wn(c):null,w=aT({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 PU(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 dN 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,u)=>{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});u(f)}};l()})}const gT={"0x0":"reverted","0x1":"success"};function mT(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=>nN(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Ji(e.transactionIndex):null,status:e.status?gT[e.status]:null,type:e.type?fT[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const bT="0x5792579257925792579257925792579257925792579257925792579257925792",AT=it(0,{size:32});async function wT(e,t){const{account:n=e.account,capabilities:o,chain:s=e.chain,experimental_fallback:u,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?aT({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(u&&(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")||b.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){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 M="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Lu(new Je(M,{details:M}))}const w=[];for(const M of y){const A=hp(e,{account:p,chain:s,data:M.data,to:M.to,value:M.value?Ri(M.value):void 0});w.push(A),l>0&&await new Promise(I=>setTimeout(I,l))}const F=await Promise.allSettled(w);if(F.every(M=>M.status==="rejected"))throw F[0].reason;const S=F.map(M=>M.status==="fulfilled"?M.value:AT);return{id:Zi([...S,it(s.id,{size:32}),bT])}}throw Cw(g,{...t,account:p,chain:t.chain})}}async function vT(e,t){async function n(p){if(p.endsWith(bT.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(S=>AT.slice(2)!==S?e.request({method:"eth_getTransactionReceipt",params:[`0x${S}`]},{dedupe:!0}):void 0)),F=w.some(S=>S===null)?100:w.every(S=>(S==null?void 0:S.status)==="0x1")?200:w.every(S=>(S==null?void 0:S.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:u,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:(u==null?void 0:u.map(p=>({...p,blockNumber:Ri(p.blockNumber),gasUsed:Ri(p.gasUsed),status:gT[p.status]})))??[],statusCode:f,status:h,version:l}}async function xT(e,t){const{id:n,pollingInterval:o=e.pollingInterval,status:s=({statusCode:F})=>F===200||F>=300,retryCount:u=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 S=pT(async()=>{const M=A=>{clearTimeout(b),S(),A(),w()};try{const A=await Hd(async()=>{const I=await Yt(e,vT,"getCallsStatus")({id:n});if(h&&I.status==="failure")throw new dN(I);return I},{retryCount:u,delay:l});if(!s(A))return;M(()=>F.resolve(A))}catch(A){M(()=>F.reject(A))}},{interval:o,emitOnBegin:!0});return S});return b=c?setTimeout(()=>{w(),clearTimeout(b),g(new pN({id:n}))},c):void 0,await p}class pN 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 ET(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 yN(e){const{batch:t,chain:n,ccipRead:o,key:s="base",name:u="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}),S={...b,...F},M={account:g,batch:t,cacheTime:y,ccipRead:o,chain:n,key:s,name:u,pollingInterval:p,request:w,transport:S,type:l,uid:ET(),...c?{experimental_blockTag:c}:{}};function A(I){return R=>{const T=R(I);for(const k in M)delete T[k];const z={...I,...T};return Object.assign(z,{extend:A(z)})}}return Object.assign(M,{extend:A(M)})}const Jh=new ff(8192);function gN(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 mN(e,t={}){return async(n,o={})=>{var y;const{dedupe:s=!1,methods:u,retryDelay:l=150,retryCount:c=3,uid:h}={...t,...o},{method:f}=n;if((y=u==null?void 0:u.exclude)!=null&&y.includes(f))throw new ha(new Error("method not supported"),{method:f});if(u!=null&&u.include&&!u.include.includes(f))throw new ha(new Error("method not supported"),{method:f});const p=s?Nu(`${h}.${Mn(n)}`):void 0;return gN(()=>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 NU(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})=>bN(g)}),{enabled:s,id:p})}}function bN(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 AN(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function wN(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:o}){return new Promise((s,u)=>{(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"&&u(t),u(c)}finally{clearTimeout(l)}})()})}function vN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const AI=vN();function xN(e,t={}){return{async request(n){var g;const{body:o,fetchFn:s=t.fetchFn??fetch,onRequest:u=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 wN(async({signal:F})=>{const S={...h,body:Array.isArray(o)?Mn(o.map(R=>({jsonrpc:"2.0",id:R.id??AI.take(),...R}))):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)},M=new Request(e,S),A=await(u==null?void 0:u(M,S))??{...S,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 EN(e,{blockHash:t,blockNumber:n,blockTag:o,hash:s,index:u}){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(u)]},{dedupe:!0}):h=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||l,it(u)]},{dedupe:!!c}),!h)throw new DO({blockHash:t,blockNumber:n,blockTag:l,hash:s,index:u});return(((g=(y=(p=e.chain)==null?void 0:p.formatters)==null?void 0:y.transaction)==null?void 0:g.format)||hT)(h,"getTransaction")}async function _m(e,{hash:t}){var s,u,l;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new PO({hash:t});return(((l=(u=(s=e.chain)==null?void 0:s.formatters)==null?void 0:u.transactionReceipt)==null?void 0:l.format)||mT)(n,"getTransactionReceipt")}function SN(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:o,onError:s,poll:u,pollingInterval:l=e.pollingInterval}){const c=typeof u<"u"?u:!(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=>pT(async()=>{var b;try{const w=await Yt(e,hN,"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 M=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return M?M.value:e.transport}return e.transport})(),{unsubscribe:S}=await F.subscribe({params:["newHeads"],onData(M){var I;if(!b)return;const A=Ri((I=M.result)==null?void 0:I.number);g.onBlockNumber(A,h),h=A},onError(M){var A;(A=g.onError)==null||A.call(g,M)}});w=S,b||w()}catch(F){s==null||s(F)}})(),()=>w()})})()}async function IN(e,t){const{checkReplacement:n=!0,confirmations:o=1,hash:s,onReplaced:u,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,S;const{promise:M,resolve:A,reject:I}=Iw(),R=h?setTimeout(()=>{S==null||S(),F==null||F(),I(new aj({hash:s}))},h):void 0;return F=qd(f,{onReplaced:u,resolve:A,reject:I},async T=>{if(b=await Yt(e,_m,"getTransactionReceipt")({hash:s}).catch(()=>{}),b&&o<=1){clearTimeout(R),T.resolve(b),F==null||F();return}S=Yt(e,SN,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(z){const k=j=>{clearTimeout(R),S==null||S(),j(),F==null||F()};let L=z;if(!w)try{if(b){if(o>1&&(!b.blockNumber||L-b.blockNumber+1n<o))return;k(()=>T.resolve(b));return}if(n&&!y&&(w=!0,await Hd(async()=>{y=await Yt(e,EN,"getTransaction")({hash:s}),y.blockNumber&&(L=y.blockNumber)},{delay:c,retryCount:l}),w=!1),b=await Yt(e,_m,"getTransactionReceipt")({hash:s}),o>1&&(!b.blockNumber||L-b.blockNumber+1n<o))return;k(()=>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:L,includeTransactions:!0}),{delay:c,retryCount:l,shouldRetry:({error:Z})=>Z instanceof cT});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||L-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"),k(()=>{var Z;(Z=T.onReplaced)==null||Z.call(T,{reason:N,replacedTransaction:g,transaction:$,transactionReceipt:b}),T.resolve(b)})}catch(U){k(()=>T.reject(U))}}else k(()=>T.reject(j))}}})}),M}async function ST(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:o}){var c,h,f;const s=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,it(o)]:[t]},{retryCount:0}),l=(((f=(h=(c=e.chain)==null?void 0:c.formatters)==null?void 0:h.transactionReceipt)==null?void 0:f.format)||mT)(s);if(l.status==="reverted"&&n)throw new kO({receipt:l});return l}async function _N(e,{chain:t}){const{id:n,name:o,nativeCurrency:s,rpcUrls:u,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:it(n),chainName:o,nativeCurrency:s,rpcUrls:u.default.http,blockExplorerUrls:l?Object.values(l).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}function CN(e,t){const{abi:n,args:o,bytecode:s,...u}=t,l=iN({abi:n,args:o,bytecode:s});return hp(e,{...u,...u.authorizationList?{to:null}:{},data:l})}async function FN(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 ON(e,t={}){const{account:n=e.account,chainId:o}=t,s=n?wn(n):void 0,u=o?[s==null?void 0:s.address,[it(o)]]:[s==null?void 0:s.address],l=await e.request({method:"wallet_getCapabilities",params:u}),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 TN(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function IT(e,t){var h;const{account:n=e.account,chainId:o,nonce:s}=t;if(!n)throw new Ms({docsPath:"/docs/eip7702/prepareAuthorization"});const u=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:u.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&rN(l.address,u.address))&&(c.nonce+=1)),c}async function BN(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>LM(n))}async function RN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function MN(e,t){const{chain:n=e.chain}=t,o=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),s=await wT(e,t);return await xT(e,{...t,id:s.id,timeout:o})}const Cm=new ff(128);async function _T(e,t){var T,z,k,L;const{account:n=e.account,chain:o=e.chain,accessList:s,authorizationList:u,blobs:l,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,pollingInterval:w,throwOnReceiptRevert:F,type:S,value:M,...A}=t,I=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 R=n?wn(n):null;try{yf(t);const j=await(async()=>{if(t.to)return t.to;if(t.to!==null&&u&&u.length>0)return await vw({authorization:u[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 U;o!==null&&(U=await Yt(e,Yu,"getChainId")({}),_w({currentChainId:U,chain:o}));const $=(k=(z=(T=e.chain)==null?void 0:T.formatters)==null?void 0:z.transactionRequest)==null?void 0:k.format,Z=($||cp)({...xw(A,{format:$}),accessList:s,account:R,authorizationList:u,blobs:l,chainId:U,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,to:j,type:S,value:M},"sendTransaction"),re=Cm.get(e.uid),ne=re?"wallet_sendTransaction":"eth_sendTransaction",X=await(async()=>{try{return await e.request({method:ne,params:[Z]},{retryCount:0})}catch(ye){if(re===!1)throw ye;const le=ye;if(le.name==="InvalidInputRpcError"||le.name==="InvalidParamsRpcError"||le.name==="MethodNotFoundRpcError"||le.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[Z]},{retryCount:0}).then(ee=>(Cm.set(e.uid,!0),ee)).catch(ee=>{const G=ee;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Cm.set(e.uid,!1),le):G});throw le}})(),ue=await Yt(e,IN,"waitForTransactionReceipt")({checkReplacement:!1,hash:X,pollingInterval:w,timeout:I});if(F&&ue.status==="reverted")throw new kO({receipt:ue});return ue}if((R==null?void 0:R.type)==="local"){const U=await Yt(e,fp,"prepareTransactionRequest")({account:R,accessList:s,authorizationList:u,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:S,value:M,...A,to:j}),$=(L=o==null?void 0:o.serializers)==null?void 0:L.transaction,N=await R.signTransaction(U,{serializer:$});return await Yt(e,ST,"sendRawTransactionSync")({serializedTransaction:N,throwOnReceiptRevert:F})}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/sendTransactionSync",type:R==null?void 0:R.type})}catch(j){throw j instanceof ma?j:Cw(j,{...t,account:R,chain:t.chain||void 0})}}async function jN(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function UN(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 IT(e,t);return o.signAuthorization(s)}async function NN(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 DN(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 u=wn(n);yf({account:u,...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 u.signTransaction?u.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,account:u},"signTransaction"),chainId:it(l),from:u.address}]},{retryCount:0})}async function PN(e,t){const{account:n=e.account,domain:o,message:s,primaryType:u}=t;if(!n)throw new Ms({docsPath:"/docs/actions/wallet/signTypedData"});const l=wn(n),c={EIP712Domain:ZO({domain:o}),...t.types};if(JO({domain:o,message:s,primaryType:u,types:c}),l.signTypedData)return l.signTypedData({domain:o,message:s,primaryType:u,types:c});const h=Jj({domain:o,message:s,primaryType:u,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,h]},{retryCount:0})}async function kN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:it(t)}]},{retryCount:0})}async function LN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function $N(e,t){return Xc.internal(e,_T,"sendTransactionSync",t)}function zN(e){return{addChain:t=>_N(e,t),deployContract:t=>CN(e,t),getAddresses:()=>FN(e),getCallsStatus:t=>vT(e,t),getCapabilities:t=>ON(e,t),getChainId:()=>Yu(e),getPermissions:()=>TN(e),prepareAuthorization:t=>IT(e,t),prepareTransactionRequest:t=>fp(e,t),requestAddresses:()=>BN(e),requestPermissions:t=>RN(e,t),sendCalls:t=>wT(e,t),sendCallsSync:t=>MN(e,t),sendRawTransaction:t=>yT(e,t),sendRawTransactionSync:t=>ST(e,t),sendTransaction:t=>hp(e,t),sendTransactionSync:t=>_T(e,t),showCallsStatus:t=>jN(e,t),signAuthorization:t=>UN(e,t),signMessage:t=>NN(e,t),signTransaction:t=>DN(e,t),signTypedData:t=>PN(e,t),switchChain:t=>kN(e,t),waitForCallsStatus:t=>xT(e,t),watchAsset:t=>LN(e,t),writeContract:t=>Xc(e,t),writeContractSync:t=>$N(e,t)}}function Ac(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return yN({...e,key:t,name:n,transport:o,type:"walletClient"}).extend(zN)}function qN({key:e,methods:t,name:n,request:o,retryCount:s=3,retryDelay:u=150,timeout:l,type:c},h){const f=ET();return{config:{key:e,methods:t,name:n,request:o,retryCount:s,retryDelay:u,timeout:l,type:c},request:mN(o,{methods:t,retryCount:s,retryDelay:u,uid:f}),value:h}}class HN 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:u="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:S=0}=typeof n=="object"?n:{},M=t.retryCount??b,A=w??t.timeout??1e4,I=g==null?void 0:g.rpcUrls.default.http[0];if(!I)throw new HN;const R=xN(I,{fetchFn:o,fetchOptions:s,onRequest:h,onResponse:f,timeout:A});return qN({key:u,methods:l,name:c,async request({method:T,params:z}){const k={method:T,params:z},{schedule:L}=oN({id:I,wait:S,shouldSplitBatch(N){return N.length>F},fn:N=>R.request({body:N}),sort:(N,Z)=>N.id-Z.id}),j=async N=>n?L(N):[await R.request({body:N})],[{error:U,result:$}]=await j(k);if(y)return{error:U,result:$};if(U)throw new ww({body:k,error:U,url:I});return $},retryCount:M,retryDelay:p,timeout:A,type:"http"},{fetchOptions:s,url:I})}}const vc=AN({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),ni={EFFECTSTREAM_API_PORT:"9999",BATCHER_PORT:"3334"},sc={evm:"#4caf50",evmParallel:"#ff9800",cardano:"#2196f3",midnight:"#9c27b0"};function QN(e){const t={};return e.filter(o=>o.networkType!=="ntp").forEach((o,s)=>{var y,g,b;const u=o.network,l=o.syncProtocol;let c=u.name;u.type==="evm"&&u.chainId?c=`evm_${u.chainId}`:u.type==="evm"&&u.id&&(c=`evm_${u.id}`),t[c]&&(c=`${c}_${s}`);let h;u.type==="evm"?(b=(g=(y=u.rpcUrls)==null?void 0:y.default)==null?void 0:g.http)!=null&&b[0]?h=u.rpcUrls.default.http[0]:l.chainUri&&(h=l.chainUri):(u.type==="midnight"||u.type==="avail"||u.type==="cardano")&&(h=u.nodeUrl);let f=sc.evm;u.type==="cardano"?f=sc.cardano:u.type==="midnight"?f=sc.midnight:u.name.toLowerCase().includes("arbitrum")?f=sc.evm:(u.name.toLowerCase().includes("ethereum")||u.name.toLowerCase().includes("l1"))&&(f=sc.evmParallel);const p={type:u.type.toUpperCase(),name:u.name,blockTime:u.blockTimeMS??l.pollingInterval??void 0,color:f,blocks:[],currentBlock:u.type==="evm"?5e5:1e5,rpcEndpoint:h,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1,protocolName:l.name};t[c]=p}),t}async function GN(){var s;const e=await fetch(CT);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json(),n=QN(t);return{Paima:{type:"EVM",name:"Paima Engine",blockTime:((s=t.find(u=>u.syncProtocol.name==="mainNtp"))==null?void 0:s.network.blockTimeMS)??1e3,color:"#667eea",blocks:[],currentBlock:1e6,rpcEndpoint:`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/rpc/evm`,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1},...n}}const CT="http://127.0.0.1:9999/config",KN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/block-heights`,YN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/primitives`,wI=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/tables`,VN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/grammar`,WN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/scheduled-data`,XN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/primitives-schema`,JN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/table-schema`,vI=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/sync-protocols`,FT=`http://localhost:${ni.BATCHER_PORT}/send-input`,xI=`http://localhost:${ni.BATCHER_PORT}/documentation`,EI=`http://localhost:${ni.EFFECTSTREAM_API_PORT}/documentation`,SI="https://effectstream.github.io/docs/",ZN=`http://127.0.0.1:${ni.EFFECTSTREAM_API_PORT}/addresses`;function eD(e){return Fr(e)&&!kn(e)&&!mf(e)&&Symbol.asyncIterator in e}function kn(e){return Array.isArray(e)}function OT(e){return typeof e=="bigint"}function gf(e){return typeof e=="boolean"}function Fw(e){return e instanceof globalThis.Date}function tD(e){return typeof e=="function"}function rD(e){return Fr(e)&&!kn(e)&&!mf(e)&&Symbol.iterator in e}function nD(e){return e===null}function eo(e){return typeof e=="number"}function Fr(e){return typeof e=="object"&&e!==null}function TT(e){return e instanceof globalThis.RegExp}function br(e){return typeof e=="string"}function iD(e){return typeof e=="symbol"}function mf(e){return e instanceof globalThis.Uint8Array}function _r(e){return e===void 0}function oD(e){return e.map(t=>Qd(t))}function sD(e){return new Date(e.getTime())}function aD(e){return new Uint8Array(e)}function uD(e){return new RegExp(e.source,e.flags)}function lD(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)?oD(e):Fw(e)?sD(e):mf(e)?aD(e):TT(e)?uD(e):Fr(e)?lD(e):e}function Jn(e){return Qd(e)}function Ow(e,t){return Jn(t===void 0?e:{...t,...e})}function BT(e){return _a(e)&&globalThis.Symbol.asyncIterator in e}function RT(e){return _a(e)&&globalThis.Symbol.iterator in e}function MT(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 cD(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 jT(e){return globalThis.Number.isInteger(e)}function yp(e){return typeof e=="bigint"}function Wi(e){return typeof e=="string"}function UT(e){return typeof e=="function"}function gp(e){return typeof e=="symbol"}function fD(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 u(l){const c=Ca(l);return e.AllowNullVoid?c||l===null:c}e.IsVoidLike=u})(Un||(Un={}));function hD(e){return globalThis.Object.freeze(e).map(t=>Gd(t))}function dD(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)?hD(e):Fw(e)?e:mf(e)?e:TT(e)?e:Fr(e)?dD(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 NT(e){return Bt(e,"Any")}function DT(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 pD(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 PT(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 yD(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 kT(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 gD(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 mD(e){return Bt(e,"Uint8Array")}function bD(e){return Bt(e,"Unknown")}function AD(e){return Bt(e,"Unsafe")}function wD(e){return Bt(e,"Void")}function vD(e){return Fr(e)&&at in e&&br(e[at])}function Xn(e){return NT(e)||DT(e)||Vu(e)||Af(e)||Ap(e)||bp(e)||Wu(e)||Xu(e)||pD(e)||Ju(e)||Zu(e)||wi(e)||wp(e)||Fa(e)||Oa(e)||oi(e)||wf(e)||yD(e)||Mw(e)||el(e)||Pi(e)||vp(e)||xp(e)||Nn(e)||kT(e)||vf(e)||jw(e)||Ta(e)||gD(e)||Ba(e)||Ep(e)||Gr(e)||mD(e)||bD(e)||AD(e)||wD(e)||vD(e)}const xD=["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 LT(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 $T(e){return Nw(e)||nn(e)}function ac(e){return _r(e)||OT(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 ED(e){return _r(e)||br(e)&&Uw(e)&<(e)}function SD(e){return _r(e)||br(e)&&Uw(e)}function zT(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 ID(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)&&zT(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 _D(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 qT(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)&&!RD(t))&&zt(e.type)&&(Nw(e.unevaluatedProperties)||zT(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 HT(e){return Us(e)&&br(e.const)}function QT(e){return Us(e)&&eo(e.const)}function GT(e){return Us(e)&&gf(e.const)}function Us(e){return Rt(e,"Literal")&&zt(e.$id)&&CD(e.const)}function CD(e){return gf(e)||eo(e)||br(e)}function FD(e){return Rt(e,"MappedKey")&&kn(e.keys)&&e.keys.every(t=>eo(t)||br(t))}function OD(e){return Rt(e,"MappedResult")&&qT(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)&&qT(e.properties)&&$T(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)&&$T(e.additionalProperties)&&Fr(e.patternProperties)&&(t=>{const n=Object.getOwnPropertyNames(t.patternProperties);return n.length===1&<(n[0])&&Fr(t.patternProperties)&&nn(t.patternProperties[n[0]])})(e)}function TD(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)&&ED(e.pattern)&&SD(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 BD(e){return Rt(e,"This")&&zt(e.$id)&&br(e.$ref)}function RD(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 MD(e){return Rt(e,"Unsafe")}function Op(e){return Rt(e,"Void")&&e.type==="void"&&zt(e.$id)}function jD(e){return Fr(e)&&at in e&&br(e[at])&&!xD.includes(e[at])}function nn(e){return Fr(e)&&(Mi(e)||ID(e)||Ra(e)||Ma(e)||Sp(e)||Dw(e)||_D(e)||Ip(e)||_p(e)||Cp(e)||Qo(e)||ja(e)||Pw(e)||Us(e)||FD(e)||OD(e)||Ns(e)||$u(e)||kw(e)||Bn(e)||cr(e)||Lw(e)||rn(e)||TD(e)||Jc(e)||ji(e)||Zc(e)||ef(e)||BD(e)||Fp(e)||Sa(e)||$o(e)||xf(e)||Ui(e)||MD(e)||Op(e)||jD(e))}const UD="(true|false)",ud="(0|[1-9][0-9]*)",KT="(.*)",ND="(?!.*)",zu=`^${ud}$`,qu=`^${KT}$`,DD=`^${ND}$`,$w=new Map;function YT(e){return $w.has(e)}function ro(e,t){$w.set(e,t)}function VT(e){return $w.get(e)}const WT=new Map;function zw(e){return WT.has(e)}function XT(e){return WT.get(e)}function PD(e,t){return e.includes(t)}function kD(e){return[...new Set(e)]}function LD(e,t){return e.filter(n=>t.includes(n))}function $D(e,t){return e.reduce((n,o)=>LD(n,o),t)}function zD(e){return e.length===1?e[0]:e.length>1?$D(e.slice(1),e[0]):[]}function qD(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 HD(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 QD(e,t){const{[t]:n,...o}=e;return o}function Zn(e,t){return t.reduce((n,o)=>QD(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 GD(e){return e.some(t=>js(t))}function II(e){return e.map(t=>js(t)?KD(t):t)}function KD(e){return Zn(e,[Ho])}function YD(e,t){return GD(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):YD(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 VD(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 JT(e,t){return Gw(e,t,"|")}function WD(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 XD(e){return e.slice(1,e.length-1)}function JD(e){let t=0;for(let n=0;n<e.length;n++)if(Do(e,n)&&(t+=1),rf(e,n)&&(t-=1),JT(e,n)&&t===0)return!0;return!1}function ZD(e){for(let t=0;t<e.length;t++)if(Do(e,t))return!0;return!1}function eP(e){let[t,n]=[0,0];const o=[];for(let u=0;u<e.length;u++)if(Do(e,u)&&(t+=1),rf(e,u)&&(t-=1),JT(e,u)&&t===0){const l=e.slice(n,u);l.length>0&&o.push(Hu(l)),n=u+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 tP(e){function t(s,u){if(!Do(s,u))throw new _I("TemplateLiteralParser: Index must point to open parens");let l=0;for(let c=u;c<s.length;c++)if(Do(s,c)&&(l+=1),rf(s,c)&&(l-=1),l===0)return[u,c];throw new _I("TemplateLiteralParser: Unclosed group parens in expression")}function n(s,u){for(let l=u;l<s.length;l++)if(Do(s,l))return[u,l];return[u,s.length]}const o=[];for(let s=0;s<e.length;s++)if(Do(e,s)){const[u,l]=t(e,s),c=e.slice(u,l+1);o.push(Hu(c)),s=l}else{const[u,l]=n(e,s),c=e.slice(u,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 WD(e)?Hu(XD(e)):JD(e)?eP(e):ZD(e)?tP(e):{type:"const",const:VD(e)}}function Kw(e){return Hu(e.slice(1,e.length-1))}class rP extends ii{}function nP(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 iP(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 oP(e){return e.type==="const"&&e.const===".*"}function nf(e){return nP(e)||oP(e)?!1:iP(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 rP("Unknown expression type")})()}function sP(e){const t=Kw(e.pattern);return nf(t)}class aP extends ii{}function*ZT(e){if(e.length===1)return yield*e[0];for(const t of e[0])for(const n of ZT(e.slice(1)))yield`${t}${n}`}function*uP(e){return yield*ZT(e.expr.map(t=>[...Tp(t)]))}function*lP(e){for(const t of e.expr)yield*Tp(t)}function*cP(e){return yield e.const}function*Tp(e){return e.type==="and"?yield*uP(e):e.type==="or"?yield*lP(e):e.type==="const"?yield*cP(e):(()=>{throw new aP("Unknown expression")})()}function eB(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 tB(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*fP(e){const t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield tB():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*hP(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=fP(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=hP(e.slice(t));return yield*[n,...o]}yield Cr(e)}function dP(e){return[...Pb(e)]}class pP extends ii{}function yP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rB(e,t){return Ta(e)?e.pattern.slice(1,e.pattern.length-1):Gr(e)?`(${e.anyOf.map(n=>rB(n,t)).join("|")})`:el(e)?`${t}${ud}`:Zu(e)?`${t}${ud}`:Ap(e)?`${t}${ud}`:vf(e)?`${t}${KT}`:Fa(e)?`${t}${yP(e.const.toString())}`:Af(e)?`${t}${UD}`:(()=>{throw new pP(`Unexpected Kind '${e[at]}'`)})()}function CI(e){return`^${e.map(t=>rB(t,"")).join("")}$`}function Yd(e){const n=eB(e).map(o=>Cr(o));return tl(n)}function nB(e,t){const n=br(e)?CI(dP(e)):CI(e);return nt({[at]:"TemplateLiteral",type:"string",pattern:n},t)}function gP(e){return eB(e).map(n=>n.toString())}function mP(e){const t=[];for(const n of e)t.push(...Ds(n));return t}function bP(e){return[e.toString()]}function Ds(e){return[...new Set(Ta(e)?gP(e):Gr(e)?mP(e.anyOf):Fa(e)?bP(e.const):el(e)?["[number]"]:Zu(e)?["[number]"]:[])]}function AP(e,t,n){const o={};for(const s of Object.getOwnPropertyNames(t))o[s]=Bp(e,Ds(t[s]),n);return o}function wP(e,t,n){return AP(e,t.properties,n)}function vP(e,t,n){const o=wP(e,t,n);return on(o)}function iB(e,t){return e.map(n=>oB(n,t))}function xP(e){return e.filter(t=>!wf(t))}function EP(e,t){return uB(xP(iB(e,t)))}function SP(e){return e.some(t=>wf(t))?[]:e}function IP(e,t){return tl(SP(iB(e,t)))}function _P(e,t){return t in e?e[t]:t==="[number]"?tl(e):yr()}function CP(e,t){return t==="[number]"?e:yr()}function FP(e,t){return t in e?e[t]:yr()}function oB(e,t){return wi(e)?EP(e.allOf,t):Gr(e)?IP(e.anyOf,t):Ba(e)?_P(e.items??[],t):Vu(e)?CP(e.items,t):Pi(e)?FP(e.properties,t):yr()}function Vw(e,t){return t.map(n=>oB(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)?vP(e,t,n):Oa(t)?RP(e,t,n):nt(Xn(t)?FI(e,Ds(t)):FI(e,t),n)}function OP(e,t,n){return{[t]:Bp(e,[t],Jn(n))}}function TP(e,t,n){return t.reduce((o,s)=>({...o,...OP(e,s,n)}),{})}function BP(e,t,n){return TP(e,t.keys,n)}function RP(e,t,n){const o=BP(e,t,n);return on(o)}function Ww(e,t){return nt({[at]:"Iterator",type:"Iterator",items:e},t)}function MP(e){const t=[];for(let n in e)js(e[n])||t.push(n);return t}function jP(e,t){const n=MP(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=jP;function sB(e,t){return nt({[at]:"Promise",type:"Promise",item:e},t)}function UP(e){return nt(Zn(e,[bf]))}function NP(e){return nt({...e,[bf]:"Readonly"})}function DP(e,t){return t===!1?UP(e):NP(e)}function Ps(e,t){const n=t??!0;return oi(e)?LP(e,n):DP(e,n)}function PP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Ps(e[o],t);return n}function kP(e,t){return PP(e.properties,t)}function LP(e,t){const n=kP(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 aB(e,t){return e in t?bi(e,t[e]):on(t)}function $P(e){return{[e]:Cr(e)}}function zP(e){const t={};for(const n of e)t[n]=Cr(n);return t}function qP(e,t){return PD(t,e)?$P(e):zP(t)}function HP(e,t){const n=qP(e,t);return aB(e,n)}function uc(e,t){return t.map(n=>bi(e,n))}function QP(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)?aB(e,t.properties):Oa(t)?HP(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(QP(e,t.properties),n):Vu(t)?qw(bi(e,t.items),n):vp(t)?sB(bi(e,t.item),n):t}function GP(e,t){const n={};for(const o of e)n[o]=bi(o,t);return n}function KP(e,t,n){const o=Xn(e)?Ds(e):e,s=t({[at]:"MappedKey",keys:o}),u=GP(o,s);return Qr(u,n)}function YP(e){return nt(Zn(e,[Ho]))}function VP(e){return nt({...e,[Ho]:"Optional"})}function WP(e,t){return t===!1?YP(e):VP(e)}function ks(e,t){const n=t??!0;return oi(e)?ZP(e,n):WP(e,n)}function XP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=ks(e[o],t);return n}function JP(e,t){return XP(e.properties,t)}function ZP(e,t){const n=JP(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 e5(e){return e.every(t=>js(t))}function t5(e){return Zn(e,[Ho])}function OI(e){return e.map(t=>js(t)?t5(t):t)}function r5(e,t){return e5(e)?ks(kb(OI(e),t)):kb(OI(e),t)}function uB(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 r5(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 n5(e,t){return Dr("Awaited",[Dr(e,t)])}function i5(e){return Dr("Awaited",[Sf(e)])}function o5(e){return Ls(lB(e))}function s5(e){return sn(lB(e))}function a5(e){return Rp(e)}function lB(e){return e.map(t=>Rp(t))}function Rp(e,t){return nt(Wu(e)?n5(e.target,e.parameters):wi(e)?o5(e.allOf):Gr(e)?s5(e.anyOf):vp(e)?a5(e.item):Nn(e)?i5(e.$ref):e,t)}function cB(e){const t=[];for(const n of e)t.push(nl(n));return t}function u5(e){const t=cB(e);return qD(t)}function l5(e){const t=cB(e);return zD(t)}function c5(e){return e.map((t,n)=>n.toString())}function f5(e){return["[number]"]}function h5(e){return globalThis.Object.getOwnPropertyNames(e)}function d5(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)?u5(e.allOf):Gr(e)?l5(e.anyOf):Ba(e)?c5(e.items??[]):Vu(e)?f5(e.items):Pi(e)?h5(e.properties):xp(e)?d5(e.patternProperties):[]}let Lb=!1;function Vd(e){Lb=!0;const t=nl(e);return Lb=!1,`^(${t.map(o=>`(${o})`).join("|")})$`}function p5(e,t){return Dr("KeyOf",[Dr(e,t)])}function y5(e){return Dr("KeyOf",[Sf(e)])}function g5(e,t){const n=nl(e),o=m5(n),s=tl(o);return nt(s,t)}function m5(e){return e.map(t=>t==="[number]"?Ua():Cr(t))}function Xw(e,t){return Wu(e)?p5(e.target,e.parameters):Nn(e)?y5(e.$ref):oi(e)?w5(e,t):g5(e,t)}function b5(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Xw(e[o],Jn(t));return n}function A5(e,t){return b5(e.properties,t)}function w5(e,t){const n=A5(e,t);return on(n)}function v5(e){const t=nl(e),n=Vw(e,t);return t.map((o,s)=>[t[s],n[s]])}function x5(e){const t=[];for(const n of e)t.push(...nl(n));return kD(t)}function E5(e){return e.filter(t=>!wf(t))}function S5(e,t){const n=[];for(const o of e)n.push(...Vw(o,[t]));return E5(n)}function I5(e,t){const n={};for(const o of t)n[o]=uB(S5(e,o));return n}function _5(e,t){const n=x5(e),o=I5(e,n);return Qr(o,t)}function fB(e){return nt({[at]:"Date",type:"Date"},e)}function hB(e){return nt({[at]:"Null",type:"null"},e)}function dB(e){return nt({[at]:"Symbol",type:"symbol"},e)}function pB(e){return nt({[at]:"Undefined",type:"undefined"},e)}function yB(e){return nt({[at]:"Uint8Array",type:"Uint8Array"},e)}function Mp(e){return nt({[at]:"Unknown"},e)}function C5(e){return e.map(t=>Jw(t,!1))}function F5(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 eD(e)||rD(e)?Zh(tf(),t):kn(e)?Ps(rl(C5(e))):mf(e)?yB():Fw(e)?fB():Fr(e)?Zh(Qr(F5(e)),t):tD(e)?Zh(Ef([],Mp()),t):_r(e)?pB():nD(e)?hB():iD(e)?dB():OT(e)?Yw():eo(e)||gf(e)||br(e)?Cr(e):Qr({})}function O5(e,t){return nt(Jw(e,!0),t)}function T5(e,t){return Xu(e)?rl(e.parameters,t):yr(t)}function B5(e,t){if(_r(e))throw new Error("Enum undefined or empty");const n=globalThis.Object.getOwnPropertyNames(e).filter(u=>isNaN(u)).map(u=>e[u]),s=[...new Set(n)].map(u=>Cr(u));return sn(s,{...t,[mp]:"Enum"})}class R5 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 R5(e)}function Or(e){return Ns(e)||ja(e)||$o(e)||Ui(e)||Mi(e)}function Tr(e,t){return Ns(t)?bB():ja(t)?jp(e,t):$o(t)?ev(e,t):Ui(t)?xB():Mi(t)?Zw():il("StructuralRight")}function Zw(e,t){return $e.True}function M5(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 j5(e,t){return Ui(e)?$e.False:Mi(e)?$e.Union:Ns(e)?$e.True:$e.False}function U5(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 N5(e,t){return Or(t)?Tr(e,t):Dw(t)?Ai($t(e.items,t.items)):$e.False}function D5(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 gB(e,t){return GT(e)||Ma(e)?$e.True:$e.False}function P5(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 k5(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 L5(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 $5(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 mB(e,t){return Us(e)&&eo(e.const)||Bn(e)||Qo(e)?$e.True:$e.False}function z5(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 q5(e,t){return e.allOf.some(n=>$t(n,t)===$e.True)?$e.True:$e.False}function H5(e,t){return Or(t)?Tr(e,t):Pw(t)?Ai($t(e.items,t.items)):$e.False}function Q5(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)?vB(e):Bn(t)?AB(e):Qo(t)?mB(e):Ma(t)?gB(e):$e.False}function bB(e,t){return $e.False}function G5(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 K5(e,t){return $u(e)?$t(TI(e),t):$u(t)?$t(e,TI(t)):il("Invalid fallthrough for Not")}function Y5(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 AB(e,t){return QT(e)||Bn(e)||Qo(e)?$e.True:$e.False}function V5(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 W5(e){return Dn(e,0)}function X5(e){return Dn(e,0)}function J5(e){return Up(e)}function Z5(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){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 tk(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 wB(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)||HT(e)&&BI(t)||QT(e)&&Fm(t)||GT(e)&&MI(t)||Zc(e)&&RI(t)||Sp(e)&&W5(t)||ji(e)&&BI(t)||Zc(e)&&RI(t)||Bn(e)&&Fm(t)||Qo(e)&&Fm(t)||Ma(e)&&MI(t)||xf(e)&&J5(t)||_p(e)&&X5(t)||Ip(e)&&ek(t)||Cp(e)&&Z5(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 rk(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(wB(e.properties[n],t.properties[n])===$e.False)return $e.False}return $e.True})():$e.False}function nk(e,t){return Or(t)?Tr(e,t):cr(t)&&tk(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 HT(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(wB(o,e.properties[s])===$e.False)return $e.False;return $e.True})():$e.False}function ik(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?$t(zb(e),zb(t)):$e.False}function ok(e,t){const n=Jc(e)?Ia():e,o=Jc(t)?Ia():t;return $t(n,o)}function vB(e,t){return Us(e)&&br(e.const)||ji(e)?$e.True:$e.False}function sk(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 ak(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 uk(e,t){return ef(e)?$t(Yd(e),t):ef(t)?$t(e,Yd(t)):il("Invalid fallthrough for TemplateLiteral")}function lk(e,t){return Ra(t)&&e.items!==void 0&&e.items.every(n=>$t(n,t.items)===$e.True)}function ck(e,t){return Ns(e)?$e.True:Ui(e)?$e.False:Mi(e)?$e.Union:$e.False}function fk(e,t){return Or(t)?Tr(e,t):cr(t)&&Up(t)||Ra(t)&&lk(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 hk(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 dk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Op(t)?gk(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 pk(e,t){return e.anyOf.every(n=>$t(n,t)===$e.True)?$e.True:$e.False}function xB(e,t){return $e.True}function yk(e,t){return Ns(t)?bB():ja(t)?jp(e,t):$o(t)?ev(e,t):Mi(t)?Zw():ji(t)?vB(e):Bn(t)?AB(e):Qo(t)?mB(e):Ma(t)?gB(e):Ra(t)?j5(e):Fp(t)?ck(e):cr(t)?yn(e,t):Ui(t)?$e.True:$e.False}function gk(e,t){return Sa(e)||Sa(e)?$e.True:$e.False}function mk(e,t){return ja(t)?jp(e,t):$o(t)?ev(e,t):Ui(t)?xB():Mi(t)?Zw():cr(t)?yn(e,t):Op(t)?$e.True:$e.False}function $t(e,t){return ef(e)||ef(t)?uk(e,t):Jc(e)||Jc(t)?ok(e,t):$u(e)||$u(t)?K5(e,t):Mi(e)?M5(e,t):Ra(e)?U5(e,t):Sp(e)?D5(e,t):Ma(e)?P5(e,t):Dw(e)?N5(e,t):Ip(e)?k5(e,t):_p(e)?L5(e,t):Cp(e)?$5(e,t):Qo(e)?z5(e,t):ja(e)?q5(e,t):Pw(e)?H5(e,t):Us(e)?Q5(e,t):Ns(e)?G5():kw(e)?Y5(e,t):Bn(e)?V5(e,t):cr(e)?rk(e,t):rn(e)?ik(e,t):ji(e)?sk(e,t):Zc(e)?ak(e,t):Fp(e)?fk(e,t):Lw(e)?nk(e,t):xf(e)?hk(e,t):Sa(e)?dk(e,t):$o(e)?pk(e,t):Ui(e)?yk(e,t):Op(e)?mk(e,t):il(`Unknown left type operand '${e[at]}'`)}function If(e,t){return $t(e,t)}function bk(e,t,n,o,s){const u={};for(const l of globalThis.Object.getOwnPropertyNames(e))u[l]=tv(e[l],t,n,o,Jn(s));return u}function Ak(e,t,n,o,s){return bk(e.properties,t,n,o,s)}function wk(e,t,n,o,s){const u=Ak(e,t,n,o,s);return on(u)}function vk(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)?wk(e,t,n,o,s):Oa(e)?nt(Ik(e,t,n,o,s)):nt(vk(e,t,n,o),s)}function xk(e,t,n,o,s){return{[e]:tv(Cr(e),t,n,o,Jn(s))}}function Ek(e,t,n,o,s){return e.reduce((u,l)=>({...u,...xk(l,t,n,o,s)}),{})}function Sk(e,t,n,o,s){return Ek(e.keys,t,n,o,s)}function Ik(e,t,n,o,s){const u=Sk(e,t,n,o,s);return on(u)}function _k(e){return e.allOf.every(t=>_f(t))}function Ck(e){return e.anyOf.some(t=>_f(t))}function Fk(e){return!_f(e.not)}function _f(e){return e[at]==="Intersect"?_k(e):e[at]==="Union"?Ck(e):e[at]==="Not"?Fk(e):e[at]==="Undefined"}function Ok(e,t){return rv(Yd(e),t)}function Tk(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(Ok(e,t),n):oi(e)?nt(Mk(e,t),n):nt(Gr(e)?Tk(e.anyOf,t):If(e,t)!==$e.False?yr():e,n)}function Bk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=rv(e[o],t);return n}function Rk(e,t){return Bk(e.properties,t)}function Mk(e,t){const n=Rk(e,t);return on(n)}function jk(e,t){return nv(Yd(e),t)}function Uk(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(jk(e,t),n):oi(e)?nt(Pk(e,t),n):nt(Gr(e)?Uk(e.anyOf,t):If(e,t)!==$e.False?e:yr(),n)}function Nk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=nv(e[o],t);return n}function Dk(e,t){return Nk(e.properties,t)}function Pk(e,t){const n=Dk(e,t);return on(n)}function kk(e,t){return Xu(e)?nt(e.returns,t):yr(t)}function EB(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 Lk(e,t,n){return sP(e)?iv(Ds(e),t,n):Na(e.pattern,t,n)}function $k(e,t,n){return iv(Ds(sn(e)),t,n)}function zk(e,t,n){return iv([e.toString()],t,n)}function qk(e,t,n){return Na(e.source,t,n)}function Hk(e,t,n){const o=_r(e.pattern)?qu:e.pattern;return Na(o,t,n)}function Qk(e,t,n){return Na(qu,t,n)}function Gk(e,t,n){return Na(DD,t,n)}function Kk(e,t,n){return Qr({true:t,false:t},n)}function Yk(e,t,n){return Na(zu,t,n)}function Vk(e,t,n){return Na(zu,t,n)}function SB(e,t,n={}){return Gr(e)?$k(e.anyOf,t,n):Ta(e)?Lk(e,t,n):Fa(e)?zk(e.const,t,n):Af(e)?Kk(e,t,n):Zu(e)?Yk(e,t,n):el(e)?Vk(e,t,n):kT(e)?qk(e,t,n):vf(e)?Hk(e,t,n):NT(e)?Qk(e,t,n):wf(e)?Gk(e,t,n):yr(n)}function ov(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function Wk(e){const t=ov(e);return t===qu?Ia():t===zu?Ua():Ia({pattern:t})}function IB(e){return e.patternProperties[ov(e)]}function Xk(e,t){return t.parameters=Cf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Jk(e,t){return t.parameters=Cf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Zk(e,t){return t.allOf=Cf(e,t.allOf),t}function eL(e,t){return t.anyOf=Cf(e,t.anyOf),t}function tL(e,t){return _r(t.items)||(t.items=Cf(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.items=Ni(e,t.items),t}function oL(e,t){return t.item=Ni(e,t.item),t}function sL(e,t){const n=cL(e,t.properties);return{...t,...Qr(n)}}function aL(e,t){const n=Ni(e,Wk(t)),o=Ni(e,IB(t)),s=SB(n,o);return{...t,...s}}function uL(e,t){return t.index in e?e[t.index]:Mp()}function lL(e,t){const n=Rw(t),o=js(t),s=Ni(e,t);return n&&o?EB(s):n&&!o?Ps(s):!n&&o?ks(s):s}function cL(e,t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:lL(e,t[o])}),{})}function Cf(e,t){return t.map(n=>Ni(e,n))}function Ni(e,t){return Xu(t)?Xk(e,t):Ju(t)?Jk(e,t):wi(t)?Zk(e,t):Gr(t)?eL(e,t):Ba(t)?tL(e,t):Vu(t)?rL(e,t):bp(t)?nL(e,t):wp(t)?iL(e,t):vp(t)?oL(e,t):Pi(t)?sL(e,t):xp(t)?aL(e,t):DT(t)?uL(e,t):t}function fL(e,t){return Ni(t,Ow(e))}function hL(e){return nt({[at]:"Integer",type:"integer"},e)}function dL(e,t,n){return{[e]:ol(Cr(e),t,Jn(n))}}function pL(e,t,n){return e.reduce((s,u)=>({...s,...dL(u,t,n)}),{})}function yL(e,t,n){return pL(e.keys,t,n)}function gL(e,t,n){const o=yL(e,t,n);return on(o)}function mL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),n].join("")}function bL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),n].join("")}function AL(e){return e.toUpperCase()}function wL(e){return e.toLowerCase()}function vL(e,t,n){const o=Kw(e.pattern);if(!nf(o))return{...e,pattern:_B(e.pattern,t)};const l=[...Tp(o)].map(f=>Cr(f)),c=CB(l,t),h=sn(c);return nB([h],n)}function _B(e,t){return typeof e=="string"?t==="Uncapitalize"?mL(e):t==="Capitalize"?bL(e):t==="Uppercase"?AL(e):t==="Lowercase"?wL(e):e:e.toString()}function CB(e,t){return e.map(n=>ol(n,t))}function ol(e,t,n={}){return Oa(e)?gL(e,t,n):Ta(e)?vL(e,t,n):Gr(e)?sn(CB(e.anyOf,t),n):Fa(e)?Cr(_B(e.const,t),n):nt(e,n)}function xL(e,t={}){return ol(e,"Capitalize",t)}function EL(e,t={}){return ol(e,"Lowercase",t)}function SL(e,t={}){return ol(e,"Uncapitalize",t)}function IL(e,t={}){return ol(e,"Uppercase",t)}function _L(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Np(e[s],t,Jn(n));return o}function CL(e,t,n){return _L(e.properties,t,n)}function FL(e,t,n){const o=CL(e,t,n);return on(o)}function OL(e,t){return e.map(n=>sv(n,t))}function TL(e,t){return e.map(n=>sv(n,t))}function BL(e,t){const{[t]:n,...o}=e;return o}function RL(e,t){return t.reduce((n,o)=>BL(n,o),e)}function ML(e,t){const n=Zn(e,[Wn,"$id","required","properties"]),o=RL(e.properties,t);return Qr(o,n)}function jL(e){const t=e.reduce((n,o)=>PT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function sv(e,t){return wi(e)?Ls(OL(e.allOf,t)):Gr(e)?sn(TL(e.anyOf,t)):Pi(e)?ML(e,t):Qr({})}function Np(e,t,n){const o=kn(t)?jL(t):t,s=Xn(t)?Ds(t):t,u=Nn(e),l=Nn(t);return oi(e)?FL(e,s,n):Oa(t)?PL(e,t,n):u&&l?Dr("Omit",[e,o],n):!u&&l?Dr("Omit",[e,o],n):u&&!l?Dr("Omit",[e,o],n):nt({...sv(e,s),...n})}function UL(e,t,n){return{[t]:Np(e,[t],Jn(n))}}function NL(e,t,n){return t.reduce((o,s)=>({...o,...UL(e,s,n)}),{})}function DL(e,t,n){return NL(e,t.keys,n)}function PL(e,t,n){const o=DL(e,t,n);return on(o)}function kL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Dp(e[s],t,Jn(n));return o}function LL(e,t,n){return kL(e.properties,t,n)}function $L(e,t,n){const o=LL(e,t,n);return on(o)}function zL(e,t){return e.map(n=>av(n,t))}function qL(e,t){return e.map(n=>av(n,t))}function HL(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function QL(e,t){const n=Zn(e,[Wn,"$id","required","properties"]),o=HL(e.properties,t);return Qr(o,n)}function GL(e){const t=e.reduce((n,o)=>PT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function av(e,t){return wi(e)?Ls(zL(e.allOf,t)):Gr(e)?sn(qL(e.anyOf,t)):Pi(e)?QL(e,t):Qr({})}function Dp(e,t,n){const o=kn(t)?GL(t):t,s=Xn(t)?Ds(t):t,u=Nn(e),l=Nn(t);return oi(e)?$L(e,s,n):Oa(t)?WL(e,t,n):u&&l?Dr("Pick",[e,o],n):!u&&l?Dr("Pick",[e,o],n):u&&!l?Dr("Pick",[e,o],n):nt({...av(e,s),...n})}function KL(e,t,n){return{[t]:Dp(e,[t],Jn(n))}}function YL(e,t,n){return t.reduce((o,s)=>({...o,...KL(e,s,n)}),{})}function VL(e,t,n){return YL(e,t.keys,n)}function WL(e,t,n){const o=VL(e,t,n);return on(o)}function XL(e,t){return Dr("Partial",[Dr(e,t)])}function JL(e){return Dr("Partial",[Sf(e)])}function ZL(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=ks(e[n]);return t}function e$(e){const t=Zn(e,[Wn,"$id","required","properties"]),n=ZL(e.properties);return Qr(n,t)}function jI(e){return e.map(t=>FB(t))}function FB(e){return Wu(e)?XL(e.target,e.parameters):Nn(e)?JL(e.$ref):wi(e)?Ls(jI(e.allOf)):Gr(e)?sn(jI(e.anyOf)):Pi(e)?e$(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)?n$(e,t):nt({...FB(e),...t})}function t$(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=uv(e[o],Jn(t));return n}function r$(e,t){return t$(e.properties,t)}function n$(e,t){const n=r$(e,t);return on(n)}function i$(e,t){return Dr("Required",[Dr(e,t)])}function o$(e){return Dr("Required",[Sf(e)])}function s$(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Zn(e[n],[Ho]);return t}function a$(e){const t=Zn(e,[Wn,"$id","required","properties"]),n=s$(e.properties);return Qr(n,t)}function UI(e){return e.map(t=>OB(t))}function OB(e){return Wu(e)?i$(e.target,e.parameters):Nn(e)?o$(e.$ref):wi(e)?Ls(UI(e.allOf)):Gr(e)?sn(UI(e.anyOf)):Pi(e)?a$(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)?c$(e,t):nt({...OB(e),...t})}function u$(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=lv(e[o],t);return n}function l$(e,t){return u$(e.properties,t)}function c$(e,t){const n=l$(e,t);return on(n)}function f$(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 h$(e){return Rp(e[0])}function d$(e){return Bp(e[0],e[1])}function p$(e){return Xw(e[0])}function y$(e){return uv(e[0])}function g$(e){return Np(e[0],e[1])}function m$(e){return Dp(e[0],e[1])}function b$(e){return lv(e[0])}function A$(e,t,n){const o=f$(e,n);return t==="Awaited"?h$(o):t==="Index"?d$(o):t==="KeyOf"?p$(o):t==="Partial"?y$(o):t==="Omit"?g$(o):t==="Pick"?m$(o):t==="Required"?b$(o):yr()}function w$(e,t){return qw(ei(e,t))}function v$(e,t){return Hw(ei(e,t))}function x$(e,t,n){return Qw(Ff(e,t),ei(e,n))}function E$(e,t,n){return Ef(Ff(e,t),ei(e,n))}function S$(e,t){return Ls(Ff(e,t))}function I$(e,t){return Ww(ei(e,t))}function _$(e,t){return Qr(globalThis.Object.keys(t).reduce((n,o)=>({...n,[o]:ei(e,t[o])}),{}))}function C$(e,t){const[n,o]=[ei(e,IB(t)),ov(t)],s=Ow(t);return s.patternProperties[o]=n,s}function F$(e,t){return Nn(t)?{...cv(e,t.$ref),[Wn]:t[Wn]}:t}function O$(e,t){return rl(Ff(e,t))}function T$(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(F$(e,t),t):Vu(t)?nt(w$(e,t.items),t):bp(t)?nt(v$(e,t.items),t):Wu(t)?nt(A$(e,t.target,t.parameters)):Xu(t)?nt(x$(e,t.parameters,t.returns),t):Ju(t)?nt(E$(e,t.parameters,t.returns),t):wi(t)?nt(S$(e,t.allOf),t):wp(t)?nt(I$(e,t.items),t):Pi(t)?nt(_$(e,t.properties),t):xp(t)?nt(C$(e,t)):Ba(t)?nt(O$(e,t.items||[]),t):Gr(t)?nt(T$(e,t.anyOf),t):t}function B$(e,t){return t in e?ei(e,e[t]):yr()}function R$(e){return globalThis.Object.getOwnPropertyNames(e).reduce((t,n)=>({...t,[n]:B$(e,n)}),{})}class M${constructor(t){const n=R$(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 j$(e){return new M$(e)}function U$(e,t){return nt({[at]:"Not",not:e},t)}function N$(e,t){return Ju(e)?rl(e.parameters,t):yr()}let D$=0;function P$(e,t={}){_r(t.$id)&&(t.$id=`T${D$++}`);const n=Ow(e({[at]:"This",$ref:`${t.$id}`}));return n.$id=t.$id,nt({[mp]:"Recursive",...n},t)}function k$(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 L$(e){return wi(e)?e.allOf:Gr(e)?e.anyOf:Ba(e)?e.items??[]:[]}function $$(e){return L$(e)}function z$(e,t){return Ju(e)?nt(e.returns,t):yr(t)}class q${constructor(t){this.schema=t}Decode(t){return new H$(this.schema,t)}}class H${constructor(t,n){this.schema=t,this.decode=n}EncodeTransform(t,n){const u={Encode:l=>n[Wn].Encode(t(l)),Decode:l=>this.decode(n[Wn].Decode(l))};return{...n,[Wn]:u}}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 Q$(e){return new q$(e)}function G$(e={}){return nt({[at]:e[at]??"Unsafe"},e)}function K$(e){return nt({[at]:"Void",type:"void"},e)}const Y$=Object.freeze(Object.defineProperty({__proto__:null,Any:tf,Argument:HD,Array:qw,AsyncIterator:Hw,Awaited:Rp,BigInt:Yw,Boolean:tB,Capitalize:xL,Composite:_5,Const:O5,Constructor:Qw,ConstructorParameters:T5,Date:fB,Enum:B5,Exclude:rv,Extends:tv,Extract:nv,Function:Ef,Index:Bp,InstanceType:kk,Instantiate:fL,Integer:hL,Intersect:Ls,Iterator:Ww,KeyOf:Xw,Literal:Cr,Lowercase:EL,Mapped:KP,Module:j$,Never:yr,Not:U$,Null:hB,Number:Ua,Object:Qr,Omit:Np,Optional:ks,Parameters:N$,Partial:uv,Pick:Dp,Promise:sB,Readonly:Ps,ReadonlyOptional:EB,Record:SB,Recursive:P$,Ref:Sf,RegExp:k$,Required:lv,Rest:$$,ReturnType:z$,String:Ia,Symbol:dB,TemplateLiteral:nB,Transform:Q$,Tuple:rl,Uint8Array:yB,Uncapitalize:SL,Undefined:pB,Union:sn,Unknown:Mp,Unsafe:G$,Uppercase:IL,Void:K$},Symbol.toStringTag,{value:"Module"})),Ue=Y$;function V$(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 W$=V$;function X$(){return W$}class J$ extends ii{constructor(t){super(`Unable to dereference schema with $id '${t.$ref}'`),this.schema=t}}function Z$(e,t){const n=t.find(o=>o.$id===e.$ref);if(n===void 0)throw new J$(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"?Z$(e,t):e}class ez 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[tz,rz]=[BigInt("1099511628211"),BigInt("18446744073709551616")],nz=Array.from({length:256}).map((e,t)=>BigInt(t)),TB=new Float64Array(1),BB=new DataView(TB.buffer),RB=new Uint8Array(TB.buffer);function*iz(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 oz(e){pn(ti.Array);for(const t of e)Qu(t)}function sz(e){pn(ti.Boolean),pn(e?1:0)}function az(e){pn(ti.BigInt),BB.setBigInt64(0,e);for(const t of RB)pn(t)}function uz(e){pn(ti.Date),Qu(e.getTime())}function lz(e){pn(ti.Null)}function cz(e){pn(ti.Number),BB.setFloat64(0,e);for(const t of RB)pn(t)}function fz(e){pn(ti.Object);for(const t of globalThis.Object.getOwnPropertyNames(e).sort())Qu(t),Qu(e[t])}function hz(e){pn(ti.String);for(let t=0;t<e.length;t++)for(const n of iz(e.charCodeAt(t)))pn(n)}function dz(e){pn(ti.Symbol),Qu(e.description)}function pz(e){pn(ti.Uint8Array);for(let t=0;t<e.length;t++)pn(e[t])}function yz(e){return pn(ti.Undefined)}function Qu(e){if(Lo(e))return oz(e);if(pp(e))return sz(e);if(yp(e))return az(e);if(Tw(e))return uz(e);if(dp(e))return lz();if(No(e))return cz(e);if(_a(e))return fz(e);if(Wi(e))return hz(e);if(gp(e))return dz(e);if(Bw(e))return pz(e);if(Ca(e))return yz();throw new ez(e)}function pn(e){_u=_u^nz[e],_u=_u*tz%rz}function MB(e){return _u=BigInt("14695981039346656037"),Qu(e),_u}class gz extends ii{constructor(t){super("Unknown type"),this.schema=t}}function mz(e){return e[at]==="Any"||e[at]==="Unknown"}function Ct(e){return e!==void 0}function bz(e,t,n){return!0}function Az(e,t,n){return!0}function wz(e,t,n){if(!Lo(n)||Ct(e.minItems)&&!(n.length>=e.minItems)||Ct(e.maxItems)&&!(n.length<=e.maxItems)||!n.every(u=>zr(e.items,t,u))||e.uniqueItems===!0&&!(function(){const u=new Set;for(const l of n){const c=MB(l);if(u.has(c))return!1;u.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((u,l)=>zr(o,t,l)?u+1:u,0);return!(s===0||No(e.minContains)&&s<e.minContains||No(e.maxContains)&&s>e.maxContains)}function vz(e,t,n){return BT(n)}function xz(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 Ez(e,t,n){return pp(n)}function Sz(e,t,n){return zr(e.returns,t,n.prototype)}function Iz(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 _z(e,t,n){return UT(n)}function Cz(e,t,n){const o=globalThis.Object.values(e.$defs),s=e.$defs[e.$ref];return zr(s,[...t,...o],n)}function Fz(e,t,n){return!(!jT(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 Oz(e,t,n){const o=e.allOf.every(s=>zr(s,t,n));if(e.unevaluatedProperties===!1){const s=new RegExp(Vd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l));return o&&u}else if(Xn(e.unevaluatedProperties)){const s=new RegExp(Vd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l)||zr(e.unevaluatedProperties,t,n[l]));return o&&u}else return o}function Tz(e,t,n){return RT(n)}function Bz(e,t,n){return n===e.const}function Rz(e,t,n){return!1}function Mz(e,t,n){return!zr(e.not,t,n)}function jz(e,t,n){return dp(n)}function Uz(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 Nz(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 u=e.properties[s];if(e.required&&e.required.includes(s)){if(!zr(u,t,n[s])||(_f(u)||mz(u))&&!(s in n))return!1}else if(Un.IsExactOptionalProperty(n,s)&&!zr(u,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(u=>o.includes(u))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(n).every(u=>o.includes(u)||zr(e.additionalProperties,t,n[u])):!0}function Dz(e,t,n){return MT(n)}function Pz(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],u=new RegExp(o),l=Object.entries(n).every(([f,p])=>u.test(f)?zr(s,t,p):!0),c=typeof e.additionalProperties=="object"?Object.entries(n).every(([f,p])=>u.test(f)?!0:zr(e.additionalProperties,t,p)):!0,h=e.additionalProperties===!1?Object.getOwnPropertyNames(n).every(f=>u.test(f)):!0;return l&&c&&h}function kz(e,t,n){return zr(Go(e,t),t,n)}function Lz(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 $z(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)?YT(e.format)?VT(e.format)(n):!1:!0}function zz(e,t,n){return gp(n)}function qz(e,t,n){return Wi(n)&&new RegExp(e.pattern).test(n)}function Hz(e,t,n){return zr(Go(e,t),t,n)}function Qz(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 Gz(e,t,n){return Ca(n)}function Kz(e,t,n){return e.anyOf.some(o=>zr(o,t,n))}function Yz(e,t,n){return!(!Bw(n)||Ct(e.maxByteLength)&&!(n.length<=e.maxByteLength)||Ct(e.minByteLength)&&!(n.length>=e.minByteLength))}function Vz(e,t,n){return!0}function Wz(e,t,n){return Un.IsVoidLike(n)}function Xz(e,t,n){return zw(e[at])?XT(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 bz();case"Argument":return Az();case"Array":return wz(s,o,n);case"AsyncIterator":return vz(s,o,n);case"BigInt":return xz(s,o,n);case"Boolean":return Ez(s,o,n);case"Constructor":return Sz(s,o,n);case"Date":return Iz(s,o,n);case"Function":return _z(s,o,n);case"Import":return Cz(s,o,n);case"Integer":return Fz(s,o,n);case"Intersect":return Oz(s,o,n);case"Iterator":return Tz(s,o,n);case"Literal":return Bz(s,o,n);case"Never":return Rz();case"Not":return Mz(s,o,n);case"Null":return jz(s,o,n);case"Number":return Uz(s,o,n);case"Object":return Nz(s,o,n);case"Promise":return Dz(s,o,n);case"Record":return Pz(s,o,n);case"Ref":return kz(s,o,n);case"RegExp":return Lz(s,o,n);case"String":return $z(s,o,n);case"Symbol":return zz(s,o,n);case"TemplateLiteral":return qz(s,o,n);case"This":return Hz(s,o,n);case"Tuple":return Qz(s,o,n);case"Undefined":return Gz(s,o,n);case"Union":return Kz(s,o,n);case"Uint8Array":return Yz(s,o,n);case"Unknown":return Vz();case"Void":return Wz(s,o,n);default:if(!zw(s[at]))throw new gz(s);return Xz(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 Jz 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 jB{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:X$()({errorType:e,path:n,schema:t,value:o,errors:s}),errors:s}}function*Zz(e,t,n,o){}function*e7(e,t,n,o){}function*t7(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=MB(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(),u=o.reduce((l,c,h)=>qr(s,t,`${n}${h}`,c).next().done===!0?l+1:l,0);u===0&&(yield ot(Ne.ArrayContains,e,n,o)),No(e.minContains)&&u<e.minContains&&(yield ot(Ne.ArrayMinContains,e,n,o)),No(e.maxContains)&&u>e.maxContains&&(yield ot(Ne.ArrayMaxContains,e,n,o))}function*r7(e,t,n,o){BT(o)||(yield ot(Ne.AsyncIterator,e,n,o))}function*n7(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*i7(e,t,n,o){pp(o)||(yield ot(Ne.Boolean,e,n,o))}function*o7(e,t,n,o){yield*qr(e.returns,t,n,o.prototype)}function*s7(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*a7(e,t,n,o){UT(o)||(yield ot(Ne.Function,e,n,o))}function*u7(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref];yield*qr(u,[...t,...s],n,o)}function*l7(e,t,n,o){if(!jT(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*c7(e,t,n,o){let s=!1;for(const u of e.allOf)for(const l of qr(u,t,n,o))s=!0,yield l;if(s)return yield ot(Ne.Intersect,e,n,o);if(e.unevaluatedProperties===!1){const u=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))u.test(l)||(yield ot(Ne.IntersectUnevaluatedProperties,e,`${n}/${l}`,o))}if(typeof e.unevaluatedProperties=="object"){const u=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))if(!u.test(l)){const c=qr(e.unevaluatedProperties,t,`${n}/${l}`,o[l]).next();c.done||(yield c.value)}}}function*f7(e,t,n,o){RT(o)||(yield ot(Ne.Iterator,e,n,o))}function*h7(e,t,n,o){o!==e.const&&(yield ot(Ne.Literal,e,n,o))}function*d7(e,t,n,o){yield ot(Ne.Never,e,n,o)}function*p7(e,t,n,o){qr(e.not,t,n,o).next().done===!0&&(yield ot(Ne.Not,e,n,o))}function*y7(e,t,n,o){dp(o)||(yield ot(Ne.Null,e,n,o))}function*g7(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*m7(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:[],u=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)u.includes(c)||(yield ot(Ne.ObjectAdditionalProperties,e,`${n}/${Bo(c)}`,o[c]));if(typeof e.additionalProperties=="object")for(const c of l)u.includes(c)||(yield*qr(e.additionalProperties,t,`${n}/${Bo(c)}`,o[c]));for(const c of u){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*b7(e,t,n,o){MT(o)||(yield ot(Ne.Promise,e,n,o))}function*A7(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,u]=Object.entries(e.patternProperties)[0],l=new RegExp(s);for(const[c,h]of Object.entries(o))l.test(c)&&(yield*qr(u,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*w7(e,t,n,o){yield*qr(Go(e,t),t,n,o)}function*v7(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*x7(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)&&(YT(e.format)?VT(e.format)(o)||(yield ot(Ne.StringFormat,e,n,o)):yield ot(Ne.StringFormatUnknown,e,n,o))}function*E7(e,t,n,o){gp(o)||(yield ot(Ne.Symbol,e,n,o))}function*S7(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*I7(e,t,n,o){yield*qr(Go(e,t),t,n,o)}function*_7(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*C7(e,t,n,o){Ca(o)||(yield ot(Ne.Undefined,e,n,o))}function*F7(e,t,n,o){if(hv(e,t,o))return;const s=e.anyOf.map(u=>new jB(qr(u,t,n,o)));yield ot(Ne.Union,e,n,o,s)}function*O7(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*T7(e,t,n,o){}function*B7(e,t,n,o){Un.IsVoidLike(o)||(yield ot(Ne.Void,e,n,o))}function*R7(e,t,n,o){XT(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,u=e;switch(u[at]){case"Any":return yield*Zz();case"Argument":return yield*e7();case"Array":return yield*t7(u,s,n,o);case"AsyncIterator":return yield*r7(u,s,n,o);case"BigInt":return yield*n7(u,s,n,o);case"Boolean":return yield*i7(u,s,n,o);case"Constructor":return yield*o7(u,s,n,o);case"Date":return yield*s7(u,s,n,o);case"Function":return yield*a7(u,s,n,o);case"Import":return yield*u7(u,s,n,o);case"Integer":return yield*l7(u,s,n,o);case"Intersect":return yield*c7(u,s,n,o);case"Iterator":return yield*f7(u,s,n,o);case"Literal":return yield*h7(u,s,n,o);case"Never":return yield*d7(u,s,n,o);case"Not":return yield*p7(u,s,n,o);case"Null":return yield*y7(u,s,n,o);case"Number":return yield*g7(u,s,n,o);case"Object":return yield*m7(u,s,n,o);case"Promise":return yield*b7(u,s,n,o);case"Record":return yield*A7(u,s,n,o);case"Ref":return yield*w7(u,s,n,o);case"RegExp":return yield*v7(u,s,n,o);case"String":return yield*x7(u,s,n,o);case"Symbol":return yield*E7(u,s,n,o);case"TemplateLiteral":return yield*S7(u,s,n,o);case"This":return yield*I7(u,s,n,o);case"Tuple":return yield*_7(u,s,n,o);case"Undefined":return yield*C7(u,s,n,o);case"Union":return yield*F7(u,s,n,o);case"Uint8Array":return yield*O7(u,s,n,o);case"Unknown":return yield*T7();case"Void":return yield*B7(u,s,n,o);default:if(!zw(u[at]))throw new Jz(e);return yield*R7(u,s,n,o)}}function M7(...e){const t=e.length===3?qr(e[0],e[1],"",e[2]):qr(e[0],[],"",e[1]);return new jB(t)}class j7 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 U7 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 U7(e,t,n,o)}}function N7(e,t,n,o){return Lo(o)?sr(e,n,o.map((s,u)=>ki(e.items,t,`${n}/${u}`,s))):sr(e,n,o)}function D7(e,t,n,o){if(!_a(o)||fD(o))return sr(e,n,o);const s=v5(e),u=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)u.includes(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}function P7(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref],l=ki(u,[...t,...s],n,o);return sr(e,n,l)}function k7(e,t,n,o){return sr(e,n,ki(e.not,t,n,o))}function L7(e,t,n,o){if(!_a(o))return sr(e,n,o);const s=nl(e),u={...o};for(const f of s)cD(u,f)&&(Ca(u[f])&&(!Ep(e.properties[f])||Un.IsExactOptionalProperty(u,f))||(u[f]=ki(e.properties[f],t,`${n}/${f}`,u[f])));if(!Xn(e.additionalProperties))return sr(e,n,u);const l=Object.getOwnPropertyNames(u),c=e.additionalProperties,h={...u};for(const f of l)s.includes(f)||(h[f]=sr(c,`${n}/${f}`,h[f]));return sr(e,n,h)}function $7(e,t,n,o){if(!_a(o))return sr(e,n,o);const s=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(s),l={...o};for(const p of Object.getOwnPropertyNames(o))u.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)u.test(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}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){const s=Go(e,t);return sr(e,n,ki(s,t,n,o))}function H7(e,t,n,o){return Lo(o)&&Lo(e.items)?sr(e,n,e.items.map((s,u)=>ki(s,t,`${n}/${u}`,o[u]))):sr(e,n,o)}function Q7(e,t,n,o){for(const s of e.anyOf){if(!hv(s,t,o))continue;const u=ki(s,t,n,o);return sr(e,n,u)}return sr(e,n,o)}function ki(e,t,n,o){const s=fv(e,t),u=e;switch(e[at]){case"Array":return N7(u,s,n,o);case"Import":return P7(u,s,n,o);case"Intersect":return D7(u,s,n,o);case"Not":return k7(u,s,n,o);case"Object":return L7(u,s,n,o);case"Record":return $7(u,s,n,o);case"Ref":return z7(u,s,n,o);case"Symbol":return sr(u,n,o);case"This":return q7(u,s,n,o);case"Tuple":return H7(u,s,n,o);case"Union":return Q7(u,s,n,o);default:return sr(u,n,o)}}function G7(e,t,n){return ki(e,t,"",n)}function K7(e,t){return ar(e)||Pr(e.items,t)}function Y7(e,t){return ar(e)||Pr(e.items,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)||Pr(e.returns,t)||e.parameters.some(n=>Pr(n,t))}function X7(e,t){return ar(e)||ar(e.unevaluatedProperties)||e.allOf.some(n=>Pr(n,t))}function J7(e,t){const n=globalThis.Object.getOwnPropertyNames(e.$defs).reduce((s,u)=>[...s,e.$defs[u]],[]),o=e.$defs[e.$ref];return ar(e)||Pr(o,[...n,...t])}function Z7(e,t){return ar(e)||Pr(e.items,t)}function e9(e,t){return ar(e)||Pr(e.not,t)}function t9(e,t){return ar(e)||Object.values(e.properties).some(n=>Pr(n,t))||Xn(e.additionalProperties)&&Pr(e.additionalProperties,t)}function r9(e,t){return ar(e)||Pr(e.item,t)}function n9(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 i9(e,t){return ar(e)?!0:Pr(Go(e,t),t)}function o9(e,t){return ar(e)?!0:Pr(Go(e,t),t)}function s9(e,t){return ar(e)||!Ca(e.items)&&e.items.some(n=>Pr(n,t))}function a9(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 K7(o,n);case"AsyncIterator":return Y7(o,n);case"Constructor":return V7(o,n);case"Function":return W7(o,n);case"Import":return J7(o,n);case"Intersect":return X7(o,n);case"Iterator":return Z7(o,n);case"Not":return e9(o,n);case"Object":return t9(o,n);case"Promise":return r9(o,n);case"Record":return n9(o,n);case"Ref":return i9(o,n);case"This":return o9(o,n);case"Tuple":return s9(o,n);case"Union":return a9(o,n);default:return ar(e)}}const qb=new Set;function u9(e,t){return qb.clear(),Pr(e,t)}function l9(...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 j7(t,o,M7(t,n,o).First());return u9(t,n)?G7(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 u 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 c9(){return kI||(kI=1,Nm=Error),Nm}var Dm,LI;function f9(){return LI||(LI=1,Dm=EvalError),Dm}var Pm,$I;function h9(){return $I||($I=1,Pm=RangeError),Pm}var km,zI;function d9(){return zI||(zI=1,km=ReferenceError),km}var Lm,qI;function UB(){return qI||(qI=1,Lm=SyntaxError),Lm}var $m,HI;function Of(){return HI||(HI=1,$m=TypeError),$m}var zm,QI;function p9(){return QI||(QI=1,zm=URIError),zm}var qm,GI;function y9(){return GI||(GI=1,qm=Math.abs),qm}var Hm,KI;function g9(){return KI||(KI=1,Hm=Math.floor),Hm}var Qm,YI;function m9(){return YI||(YI=1,Qm=Math.max),Qm}var Gm,VI;function b9(){return VI||(VI=1,Gm=Math.min),Gm}var Km,WI;function A9(){return WI||(WI=1,Km=Math.pow),Km}var Ym,XI;function w9(){return XI||(XI=1,Ym=Math.round),Ym}var Vm,JI;function v9(){return JI||(JI=1,Vm=Number.isNaN||function(t){return t!==t}),Vm}var Wm,ZI;function x9(){if(ZI)return Wm;ZI=1;var e=v9();return Wm=function(n){return e(n)||n===0?n:n<0?-1:1},Wm}var Xm,e_;function E9(){return e_||(e_=1,Xm=Object.getOwnPropertyDescriptor),Xm}var Jm,t_;function sl(){if(t_)return Jm;t_=1;var e=E9();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 S9(){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 NB(){return i_||(i_=1,t0=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),t0}var r0,o_;function DB(){if(o_)return r0;o_=1;var e=pv();return r0=e.getPrototypeOf||null,r0}var n0,s_;function I9(){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},u=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=u(arguments,1),y,g=function(){if(this instanceof y){var M=f.apply(this,s(p,arguments));return Object(M)===M?M: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 S=function(){};S.prototype=f.prototype,y.prototype=new S,S.prototype=null}return y},n0}var i0,a_;function Tf(){if(a_)return i0;a_=1;var e=I9();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 _9(){return c_||(c_=1,a0=typeof Reflect<"u"&&Reflect&&Reflect.apply),a0}var u0,f_;function PB(){if(f_)return u0;f_=1;var e=Tf(),t=gv(),n=yv(),o=_9();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=PB();return l0=function(u){if(u.length<1||typeof u[0]!="function")throw new t("a function is required");return o(e,n,u)},l0}var c0,d_;function C9(){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,u=s.getPrototypeOf;return c0=o&&typeof o.get=="function"?e([o.get]):typeof u=="function"?function(c){return u(c==null?c:s(c))}:!1,c0}var f0,p_;function bv(){if(p_)return f0;p_=1;var e=NB(),t=DB(),n=C9();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 kB(){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=c9(),o=f9(),s=h9(),u=d9(),l=UB(),c=Of(),h=p9(),f=y9(),p=g9(),y=m9(),g=b9(),b=A9(),w=w9(),F=x9(),S=Function,M=function(J){try{return S('"use strict"; return ('+J+").constructor;")()}catch{}},A=sl(),I=kp(),R=function(){throw new c},T=A?(function(){try{return arguments.callee,R}catch{try{return A(arguments,"callee").get}catch{return R}}})():R,z=S9()(),k=bv(),L=DB(),j=NB(),U=gv(),$=yv(),N={},Z=typeof Uint8Array>"u"||!k?e:k(Uint8Array),re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":z&&k?k([][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%":S,"%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&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!z||!k?e:k(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%":u,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!z||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&k?k(""[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%":I,"%Object.getPrototypeOf%":L,"%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(k)try{null.error}catch(J){var ne=k(k(J));re["%Error.prototype%"]=ne}var X=function J(O){var H;if(O==="%AsyncFunction%")H=M("async function () {}");else if(O==="%GeneratorFunction%")H=M("function* () {}");else if(O==="%AsyncGeneratorFunction%")H=M("async function* () {}");else if(O==="%AsyncGenerator%"){var Y=J("%AsyncGeneratorFunction%");Y&&(H=Y.prototype)}else if(O==="%AsyncIteratorPrototype%"){var se=J("%AsyncGenerator%");se&&k&&(H=k(se.prototype))}return re[O]=H,H},ue={__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=kB(),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,ae=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},ie=function(O,H){var Y=O,se;if(le(ue,Y)&&(se=ue[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=ae(O),se=Y.length>0?Y[0]:"",pe=ie("%"+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,u){var l=e(s,!!u);return typeof l=="function"&&n(s,".prototype.")>-1?t([l]):l},p0}var y0,b_;function F9(){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]"},u=(function(){return o(arguments)})();return o.isLegacyArguments=s,y0=u?o:s,y0}var g0,A_;function O9(){if(A_)return g0;A_=1;var e=al(),t=Pp()(),n=kB(),o=sl(),s;if(t){var u=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{u(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 T9(){if(w_)return m0;w_=1;var e=al(),t=O9(),n=e("RegExp.prototype.exec"),o=Of();return m0=function(u){if(!t(u))throw new o("`regex` must be a RegExp");return function(c){return n(u,c)!==null}},m0}var b0,v_;function B9(){if(v_)return b0;v_=1;const e=(function*(){}).constructor;return b0=()=>e,b0}var A0,x_;function R9(){if(x_)return A0;x_=1;var e=al(),t=T9(),n=t(/^\s*(?:function)?\*/),o=Pp()(),s=bv(),u=e("Object.prototype.toString"),l=e("Function.prototype.toString"),c=B9();return A0=function(f){if(typeof f!="function")return!1;if(n(l(f)))return!0;if(!o){var p=u(f);return p==="[object GeneratorFunction]"}if(!s)return!1;var y=c();return y&&s(f)===y.prototype},A0}var w0,E_;function M9(){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/,u=function(I){try{var R=e.call(I);return s.test(R)}catch{return!1}},l=function(I){try{return u(I)?!1:(e.call(I),!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[,]),S=function(){return!1};if(typeof document=="object"){var M=document.all;c.call(M)===c.call(document.all)&&(S=function(I){if((F||!I)&&(typeof I>"u"||typeof I=="object"))try{var R=c.call(I);return(R===y||R===g||R===b||R===h)&&I("")==null}catch{}return!1})}return w0=t?function(I){if(S(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;try{t(I,null,n)}catch(R){if(R!==o)return!1}return!u(I)&&l(I)}:function(I){if(S(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;if(w)return l(I);if(u(I))return!1;var R=c.call(I);return R!==f&&R!==p&&!/^\[object HTML/.test(R)?!1:l(I)},w0}var v0,S_;function j9(){if(S_)return v0;S_=1;var e=M9(),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)},u=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):u(h,f,y)},v0}var x0,I_;function U9(){return I_||(I_=1,x0=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),x0}var E0,__;function N9(){if(__)return E0;__=1;var e=U9(),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 LB(){if(C_)return I0;C_=1;var e=kp(),t=UB(),n=Of(),o=sl();return I0=function(u,l,c){if(!u||typeof u!="object"&&typeof u!="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(u,l);if(e)e(u,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)u[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 $B(){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 D9(){if(O_)return C0;O_=1;var e=Av(),t=LB(),n=$B()(),o=sl(),s=Of(),u=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||u(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 P9(){if(T_)return F0;T_=1;var e=Tf(),t=gv(),n=PB();return F0=function(){return n(e,t,arguments)},F0}var B_;function Lp(){return B_||(B_=1,(function(e){var t=D9(),n=kp(),o=mv(),s=P9();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 zB(){if(R_)return O0;R_=1;var e=j9(),t=N9(),n=Lp(),o=al(),s=sl(),u=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(S,M){for(var A=0;A<S.length;A+=1)if(S[A]===M)return A;return-1},g={__proto__:null};c&&s&&u?e(f,function(F){var S=new h[F];if(Symbol.toStringTag in S&&u){var M=u(S),A=s(M,Symbol.toStringTag);if(!A&&M){var I=u(M);A=s(I,Symbol.toStringTag)}g["$"+F]=n(A.get)}}):e(f,function(F){var S=new h[F],M=S.slice||S.set;M&&(g["$"+F]=n(M))});var b=function(S){var M=!1;return e(g,function(A,I){if(!M)try{"$"+A(S)===I&&(M=p(I,1))}catch{}}),M},w=function(S){var M=!1;return e(g,function(A,I){if(!M)try{A(S),M=p(I,1)}catch{}}),M};return O0=function(S){if(!S||typeof S!="object")return!1;if(!c){var M=p(l(S),8,-1);return y(f,M)>-1?M:M!=="Object"?!1:w(S)}return s?b(S):null},O0}var T0,M_;function k9(){if(M_)return T0;M_=1;var e=zB();return T0=function(n){return!!e(n)},T0}var j_;function L9(){return j_||(j_=1,(function(e){var t=F9(),n=R9(),o=zB(),s=k9();function u(P){return P.call.bind(P)}var l=typeof BigInt<"u",c=typeof Symbol<"u",h=u(Object.prototype.toString),f=u(Number.prototype.valueOf),p=u(String.prototype.valueOf),y=u(Boolean.prototype.valueOf);if(l)var g=u(BigInt.prototype.valueOf);if(c)var b=u(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 S(P){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(P):s(P)||K(P)}e.isArrayBufferView=S;function M(P){return o(P)==="Uint8Array"}e.isUint8Array=M;function A(P){return o(P)==="Uint8ClampedArray"}e.isUint8ClampedArray=A;function I(P){return o(P)==="Uint16Array"}e.isUint16Array=I;function R(P){return o(P)==="Uint32Array"}e.isUint32Array=R;function T(P){return o(P)==="Int8Array"}e.isInt8Array=T;function z(P){return o(P)==="Int16Array"}e.isInt16Array=z;function k(P){return o(P)==="Int32Array"}e.isInt32Array=k;function L(P){return o(P)==="Float32Array"}e.isFloat32Array=L;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 ne(P){return typeof Set>"u"?!1:re.working?re(P):P instanceof Set}e.isSet=ne;function X(P){return h(P)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function ue(P){return typeof WeakMap>"u"?!1:X.working?X(P):P instanceof WeakMap}e.isWeakMap=ue;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 ae(P){return h(P)==="[object AsyncFunction]"}e.isAsyncFunction=ae;function ie(P){return h(P)==="[object Map Iterator]"}e.isMapIterator=ie;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 $9(){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 z9(){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={},ae=0;ae<q.length;ae++)fe[q[ae]]=Object.getOwnPropertyDescriptor(W,q[ae]);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,ae=fe.length,ie=String(K).replace(o,function(O){if(O==="%%")return"%";if(q>=ae)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<ae;J=fe[++q])I(J)||!U(J)?ie+=" "+J:ie+=" "+c(J);return ie},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={},u=/^$/;if(t.NODE_DEBUG){var l=t.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+l+"$","i")}e.debuglog=function(K){if(K=K.toUpperCase(),!s[K])if(u.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),L(q.showHidden)&&(q.showHidden=!1),L(q.depth)&&(q.depth=2),L(q.colors)&&(q.colors=!1),L(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 ae=g(K,W);if(ae)return ae;var ie=Object.keys(W),J=p(ie);if(K.showHidden&&(ie=Object.getOwnPropertyNames(W)),N(W)&&(ie.indexOf("message")>=0||ie.indexOf("description")>=0))return b(W);if(ie.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(M(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)),ie.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,ie):te=ie.map(function(_){return F(K,W,q,J,_,Y)}),K.seen.pop(),S(te,H,se)}function g(K,W){if(L(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(I(W))return K.stylize("null","null")}function b(K){return"["+Error.prototype.toString.call(K)+"]"}function w(K,W,q,fe,ae){for(var ie=[],J=0,O=W.length;J<O;++J)le(W,String(J))?ie.push(F(K,W,q,fe,String(J),!0)):ie.push("");return ae.forEach(function(H){H.match(/^\d+$/)||ie.push(F(K,W,q,fe,H,!0))}),ie}function F(K,W,q,fe,ae,ie){var J,O,H;if(H=Object.getOwnPropertyDescriptor(W,ae)||{value:W[ae]},H.get?H.set?O=K.stylize("[Getter/Setter]","special"):O=K.stylize("[Getter]","special"):H.set&&(O=K.stylize("[Setter]","special")),le(fe,ae)||(J="["+ae+"]"),O||(K.seen.indexOf(H.value)<0?(I(q)?O=y(K,H.value,null):O=y(K,H.value,q-1),O.indexOf(`
|
|
62
|
-
`)>-1&&(ie?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")),L(J)){if(ie&&ae.match(/^\d+$/))return O;J=JSON.stringify(""+ae),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 S(K,W,q){var fe=K.reduce(function(ae,ie){return ie.indexOf(`
|
|
68
|
-
`)>=0,ae+ie.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=L9();function M(K){return Array.isArray(K)}e.isArray=M;function A(K){return typeof K=="boolean"}e.isBoolean=A;function I(K){return K===null}e.isNull=I;function R(K){return K==null}e.isNullOrUndefined=R;function T(K){return typeof K=="number"}e.isNumber=T;function z(K){return typeof K=="string"}e.isString=z;function k(K){return typeof K=="symbol"}e.isSymbol=k;function L(K){return K===void 0}e.isUndefined=L;function j(K){return U(K)&&ne(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)&&ne(K)==="[object Date]"}e.isDate=$,e.types.isDate=$;function N(K){return U(K)&&(ne(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=$9();function ne(K){return Object.prototype.toString.call(K)}function X(K){return K<10?"0"+K.toString(10):K.toString(10)}var ue=["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(),ue[K.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",ye(),e.format.apply(e,arguments))},e.inherits=z9(),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,ae,ie=new Promise(function(H,Y){fe=H,ae=Y}),J=[],O=0;O<arguments.length;O++)J.push(arguments[O]);J.push(function(H,Y){H?ae(H):fe(Y)});try{W.apply(this,J)}catch(H){ae(H)}return ie}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 ae=q.pop();if(typeof ae!="function")throw new TypeError("The last argument must be of type Function");var ie=this,J=function(){return ae.apply(ie,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 qB(){if(P_)return Tm;P_=1;function e(A){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},e(A)}function t(A,I,R){return Object.defineProperty(A,"prototype",{writable:!1}),A}function n(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function o(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&s(A,I)}function s(A,I){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,z){return T.__proto__=z,T},s(A,I)}function u(A){var I=h();return function(){var T=f(A),z;if(I){var k=f(this).constructor;z=Reflect.construct(T,arguments,k)}else z=T.apply(this,arguments);return l(this,z)}}function l(A,I){if(I&&(e(I)==="object"||typeof I=="function"))return I;if(I!==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(R){return R.__proto__||Object.getPrototypeOf(R)},f(A)}var p={},y,g;function b(A,I,R){R||(R=Error);function T(k,L,j){return typeof I=="string"?I:I(k,L,j)}var z=(function(k){o(j,k);var L=u(j);function j(U,$,N){var Z;return n(this,j),Z=L.call(this,T(U,$,N)),Z.code=A,Z}return t(j)})(R);p[A]=z}function w(A,I){if(Array.isArray(A)){var R=A.length;return A=A.map(function(T){return String(T)}),R>2?"one of ".concat(I," ").concat(A.slice(0,R-1).join(", "),", or ")+A[R-1]:R===2?"one of ".concat(I," ").concat(A[0]," or ").concat(A[1]):"of ".concat(I," ").concat(A[0])}else return"of ".concat(I," ").concat(String(A))}function F(A,I,R){return A.substr(0,I.length)===I}function S(A,I,R){return(R===void 0||R>A.length)&&(R=A.length),A.substring(R-I.length,R)===I}function M(A,I,R){return typeof R!="number"&&(R=0),R+I.length>A.length?!1:A.indexOf(I,R)!==-1}return b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",function(A,I,R){y===void 0&&(y=Hb()),y(typeof A=="string","'name' must be a string");var T;typeof I=="string"&&F(I,"not ")?(T="must not be",I=I.replace(/^not /,"")):T="must be";var z;if(S(A," argument"))z="The ".concat(A," ").concat(T," ").concat(w(I,"type"));else{var k=M(A,".")?"property":"argument";z='The "'.concat(A,'" ').concat(k," ").concat(T," ").concat(w(I,"type"))}return z+=". Received type ".concat(e(R)),z},TypeError),b("ERR_INVALID_ARG_VALUE",function(A,I){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";g===void 0&&(g=of());var T=g.inspect(I);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(A,"' ").concat(R,". Received ").concat(T)},TypeError),b("ERR_INVALID_RETURN_VALUE",function(A,I,R){var T;return R&&R.constructor&&R.constructor.name?T="instance of ".concat(R.constructor.name):T="type ".concat(e(R)),"Expected ".concat(A,' to be returned from the "').concat(I,'"')+" function but got ".concat(T,".")},TypeError),b("ERR_MISSING_ARGS",function(){for(var A=arguments.length,I=new Array(A),R=0;R<A;R++)I[R]=arguments[R];y===void 0&&(y=Hb()),y(I.length>0,"At least one arg needs to be specified");var T="The ",z=I.length;switch(I=I.map(function(k){return'"'.concat(k,'"')}),z){case 1:T+="".concat(I[0]," argument");break;case 2:T+="".concat(I[0]," and ").concat(I[1]," arguments");break;default:T+=I.slice(0,z-1).join(", "),T+=", and ".concat(I[z-1]," arguments");break}return"".concat(T," must be specified")},TypeError),Tm.codes=p,Tm}var R0,k_;function q9(){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 u(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&&S(le,ee)}function f(le){var ee=w();return function(){var Q=M(le),K;if(ee){var W=M(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,M(this).constructor)}return K.prototype=Object.create(Q.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),S(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 ae=Function.bind.apply(K,fe),ie=new ae;return q&&S(ie,q.prototype),ie},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 S(le,ee){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,K){return Q.__proto__=K,Q},S(le,ee)}function M(le){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},M(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 I=of(),R=I.inspect,T=qB(),z=T.codes.ERR_INVALID_ARG_TYPE;function k(le,ee,G){return(G===void 0||G>le.length)&&(G=le.length),le.substring(G-ee.length,G)===ee}function L(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 ne(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 R(le,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ue(le,ee,G){var Q="",K="",W=0,q="",fe=!1,ae=X(le),ie=ae.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"),ie.length===1&&J.length===1&&ie[0]!==J[0]){var Y=ie[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(ie[0]," !== ").concat(J[0],`
|
|
75
|
-
`)}else if(G!=="strictEqualObject"){var se=jt.stderr&&jt.stderr.isTTY?jt.stderr.columns:80;if(Y<se){for(;ie[0][O]===J[0][O];)O++;O>2&&(H=`
|
|
76
|
-
`.concat(L(" ",O),"^"),O=0)}}}for(var pe=ie[ie.length-1],te=J[J.length-1];pe===te&&(O++<2?q=`
|
|
77
|
-
`.concat(pe).concat(q):Q=pe,ie.pop(),J.pop(),!(ie.length===0||J.length===0));)pe=ie[ie.length-1],te=J[J.length-1];var _=Math.max(ie.length,J.length);if(_===0){var v=ae.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(ie.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(ie[O-2]),C++),K+=`
|
|
92
|
-
`.concat(ie[O-1]),C++),W=O,K+=`
|
|
93
|
-
`.concat(U,"+").concat(N," ").concat(ie[O]),C++;else{var Se=J[O],Be=ie[O],de=Be!==Se&&(!k(Be,",")||Be.slice(0,-1)!==Se);de&&k(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(ie[O-2]),C++),K+=`
|
|
96
|
-
`.concat(ie[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,ae=K.stackStartFn,ie=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(ie)==="object"&&ie!==null&&A(J)==="object"&&J!==null&&"stack"in ie&&ie instanceof Error&&"stack"in J&&J instanceof Error&&(ie=ne(ie),J=ne(J)),fe==="deepStrictEqual"||fe==="strictEqual")W=G.call(this,ue(ie,J,fe));else if(fe==="notDeepStrictEqual"||fe==="notStrictEqual"){var H=Z[fe],Y=X(ie).split(`
|
|
104
|
-
`);if(fe==="notStrictEqual"&&A(ie)==="object"&&ie!==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(ie),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=ie,W.expected=J,W.operator=fe,Error.captureStackTrace&&Error.captureStackTrace(y(W),ae),W.stack,W.name="AssertionError",p(W)}return u(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:ee,value:function(W,q){return R(this,t(t({},q),{},{customInspect:!1,depth:0}))}}]),Q})(g(Error),R.custom);return R0=ye,R0}var M0,L_;function HB(){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 H9(){if($_)return j0;$_=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=HB(),s=Object.prototype.propertyIsEnumerable,u=!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]",S=o(b),M=w&&n.call(b)==="[object String]",A=[];if(!w&&!F&&!S)throw new TypeError("Object.keys called on a non-object");var I=l&&F;if(M&&b.length>0&&!t.call(b,0))for(var R=0;R<b.length;++R)A.push(String(R));if(S&&b.length>0)for(var T=0;T<b.length;++T)A.push(String(T));else for(var z in b)!(I&&z==="prototype")&&t.call(b,z)&&A.push(String(z));if(u)for(var k=y(b),L=0;L<c.length;++L)!(k&&c[L]==="constructor")&&t.call(b,c[L])&&A.push(c[L]);return A}}return j0=e,j0}var U0,z_;function QB(){if(z_)return U0;z_=1;var e=Array.prototype.slice,t=HB(),n=Object.keys,o=n?function(l){return n(l)}:H9(),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 Q9(){if(q_)return N0;q_=1;var e=QB(),t=dv()(),n=al(),o=pv(),s=n("Array.prototype.push"),u=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),S=0;S<F.length;++S){var M=F[S];u(g,M)&&s(b,M)}for(var A=0;A<b.length;++A){var I=b[A];if(u(g,I)){var R=g[I];p[I]=R}}}return p},N0}var D0,H_;function G9(){if(H_)return D0;H_=1;var e=Q9(),t=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",s=o.split(""),u={},l=0;l<s.length;++l)u[s[l]]=s[l];var c=Object.assign({},u),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 GB(){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=GB();return k0=function(){return typeof Object.is=="function"?Object.is:e},k0}var L0,K_;function K9(){if(K_)return L0;K_=1;var e=Av(),t=Lp(),n=t(e("String.prototype.indexOf"));return L0=function(s,u){var l=e(s,!!u);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=QB(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,s=LB(),u=function(f){return typeof f=="function"&&n.call(f)==="[object Function]"},l=$B()(),c=function(f,p,y,g){if(p in f){if(g===!0){if(f[p]===y)return}else if(!u(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 Y9(){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 V9(){if(W_)return q0;W_=1;var e=$p(),t=Lp(),n=GB(),o=wv(),s=Y9(),u=t(o(),Object);return e(u,{getPolyfill:o,implementation:n,shim:s}),q0=u,q0}var H0,X_;function KB(){return X_||(X_=1,H0=function(t){return t!==t}),H0}var Q0,J_;function YB(){if(J_)return Q0;J_=1;var e=KB();return Q0=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},Q0}var G0,Z_;function W9(){if(Z_)return G0;Z_=1;var e=$p(),t=YB();return G0=function(){var o=t();return e(Number,{isNaN:o},{isNaN:function(){return Number.isNaN!==o}}),o},G0}var K0,eC;function X9(){if(eC)return K0;eC=1;var e=Lp(),t=$p(),n=KB(),o=YB(),s=W9(),u=e(o(),Number);return t(u,{getPolyfill:o,implementation:n,shim:s}),K0=u,K0}var Y0,tC;function J9(){if(tC)return Y0;tC=1;function e(de,ve){return u(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 u(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:V9(),y=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},g=Number.isNaN?Number.isNaN:X9();function b(de){return de.call.bind(de)}var w=b(Object.prototype.hasOwnProperty),F=b(Object.prototype.propertyIsEnumerable),S=b(Object.prototype.toString),M=of().types,A=M.isAnyArrayBuffer,I=M.isArrayBufferView,R=M.isDate,T=M.isMap,z=M.isRegExp,k=M.isSet,L=M.isNativeError,j=M.isBoxedPrimitive,U=M.isNumberObject,$=M.isStringObject,N=M.isBooleanObject,Z=M.isBigIntObject,re=M.isSymbolObject,ne=M.isFloat32Array,X=M.isFloat64Array;function ue(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(ue).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 ae(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 ie(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=S(de),oe=S(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)||!k(de)&&k(ve)))return!1;if(R(de)){if(!R(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(L(de)||de instanceof Error){if(de.message!==ve.message||de.name!==ve.name)return!1}else if(I(de)){if(!x&&(ne(de)||X(de))){if(!ae(de,ve))return!1}else if(!ie(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(k(de))return!k(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=qB(),s=o.codes,u=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=q9(),y=of(),g=y.inspect,b=of().types,w=b.isPromise,F=b.isRegExp,S=G9()(),M=wv()(),A=K9()("RegExp.prototype.test"),I,R;function T(){var W=J9();I=W.isDeepEqual,R=W.isDeepStrictEqual}var z=!1,k=Om.exports=N,L={};function j(W){throw W.message instanceof Error?W.message:new p(W)}function U(W,q,fe,ae,ie){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&&(ae="!=")}if(fe instanceof Error)throw fe;var Y={actual:W,expected:q,operator:ae===void 0?"fail":ae,stackStartFn:ie||U};fe!==void 0&&(Y.message=fe);var se=new p(Y);throw O&&(se.message=O,se.generatedMessage=!0),se}k.fail=U,k.AssertionError=p;function $(W,q,fe,ae){if(!fe){var ie=!1;if(q===0)ie=!0,ae="No value argument passed to `assert.ok()`";else if(ae instanceof Error)throw ae;var J=new p({actual:fe,expected:!0,message:ae,operator:"==",stackStartFn:W});throw J.generatedMessage=ie,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))}k.ok=N,k.equal=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");q!=fe&&j({actual:q,expected:fe,message:ae,operator:"==",stackStartFn:W})},k.notEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");q==fe&&j({actual:q,expected:fe,message:ae,operator:"!=",stackStartFn:W})},k.deepEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I(q,fe)||j({actual:q,expected:fe,message:ae,operator:"deepEqual",stackStartFn:W})},k.notDeepEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I(q,fe)&&j({actual:q,expected:fe,message:ae,operator:"notDeepEqual",stackStartFn:W})},k.deepStrictEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R(q,fe)||j({actual:q,expected:fe,message:ae,operator:"deepStrictEqual",stackStartFn:W})},k.notDeepStrictEqual=Z;function Z(W,q,fe){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R(W,q)&&j({actual:W,expected:q,message:fe,operator:"notDeepStrictEqual",stackStartFn:Z})}k.strictEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");M(q,fe)||j({actual:q,expected:fe,message:ae,operator:"strictEqual",stackStartFn:W})},k.notStrictEqual=function W(q,fe,ae){if(arguments.length<2)throw new f("actual","expected");M(q,fe)&&j({actual:q,expected:fe,message:ae,operator:"notStrictEqual",stackStartFn:W})};var re=t(function W(q,fe,ae){var ie=this;n(this,W),fe.forEach(function(J){J in q&&(ae!==void 0&&typeof ae[J]=="string"&&F(q[J])&&A(q[J],ae[J])?ie[J]=ae[J]:ie[J]=q[J])})});function ne(W,q,fe,ae,ie,J){if(!(fe in W)||!R(W[fe],q[fe])){if(!ae){var O=new re(W,ie),H=new re(q,ie,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:ae,operator:J.name,stackStartFn:J})}}function X(W,q,fe,ae){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 ie=new p({actual:W,expected:q,message:fe,operator:"deepStrictEqual",stackStartFn:ae});throw ie.operator=ae.name,ie}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 I===void 0&&T(),J.forEach(function(O){typeof W[O]=="string"&&F(q[O])&&A(q[O],W[O])||ne(W,q,O,fe,J,ae)}),!0}return q.prototype!==void 0&&W instanceof q?!0:Error.isPrototypeOf(q)?!1:q.call({},W)===!0}function ue(W){if(typeof W!="function")throw new l("fn","Function",W);try{W()}catch(q){return q}return L}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 L}).catch(function(fe){return fe})})}function ee(W,q,fe,ae){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 u("error/message",'The error message "'.concat(q.message,'" is identical to the message.'))}else if(q===fe)throw new u("error/message",'The error "'.concat(q,'" is identical to the message.'));ae=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===L){var ie="";fe&&fe.name&&(ie+=" (".concat(fe.name,")")),ie+=ae?": ".concat(ae):".";var J=W.name==="rejects"?"rejection":"exception";j({actual:void 0,expected:fe,operator:W.name,message:"Missing expected ".concat(J).concat(ie),stackStartFn:W})}if(fe&&!X(q,fe,ae,W))throw q}function G(W,q,fe,ae){if(q!==L){if(typeof fe=="string"&&(ae=fe,fe=void 0),!fe||X(q,fe)){var ie=ae?": ".concat(ae):".",J=W.name==="doesNotReject"?"rejection":"exception";j({actual:q,expected:fe,operator:W.name,message:"Got unwanted ".concat(J).concat(ie,`
|
|
123
|
-
`)+'Actual message: "'.concat(q&&q.message,'"'),stackStartFn:W})}throw q}}k.throws=function W(q){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ie=1;ie<fe;ie++)ae[ie-1]=arguments[ie];ee.apply(void 0,[W,ue(q)].concat(ae))},k.rejects=function W(q){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ie=1;ie<fe;ie++)ae[ie-1]=arguments[ie];return le(q).then(function(J){return ee.apply(void 0,[W,J].concat(ae))})},k.doesNotThrow=function W(q){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ie=1;ie<fe;ie++)ae[ie-1]=arguments[ie];G.apply(void 0,[W,ue(q)].concat(ae))},k.doesNotReject=function W(q){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ie=1;ie<fe;ie++)ae[ie-1]=arguments[ie];return le(q).then(function(J){return G.apply(void 0,[W,J].concat(ae))})},k.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 ae=new p({actual:q,expected:null,operator:"ifError",message:fe,stackStartFn:W}),ie=q.stack;if(typeof ie=="string"){var J=ie.split(`
|
|
124
|
-
`);J.shift();for(var O=ae.stack.split(`
|
|
125
|
-
`),H=0;H<J.length;H++){var Y=O.indexOf(J[H]);if(Y!==-1){O=O.slice(0,Y);break}}ae.stack="".concat(O.join(`
|
|
126
|
-
`),`
|
|
127
|
-
`).concat(J.join(`
|
|
128
|
-
`))}throw ae}};function Q(W,q,fe,ae,ie){if(!F(q))throw new l("regexp","RegExp",q);var J=ie==="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:ie,stackStartFn:ae});throw H.generatedMessage=O,H}}k.match=function W(q,fe,ae){Q(q,fe,ae,W,"match")},k.doesNotMatch=function W(q,fe,ae){Q(q,fe,ae,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 k.strict=S(K,k,{equal:k.strictEqual,deepEqual:k.deepStrictEqual,notEqual:k.notStrictEqual,notDeepEqual:k.notDeepStrictEqual}),k.strict.strict=k.strict,Om.exports}var V0,nC;function Z9(){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 u=t.charAt(s),l=u.charCodeAt(0);if(n[l]!==255)throw new TypeError(u+" 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,S=0,M=0,A=w.length;M!==A&&w[M]===0;)M++,F++;for(var I=(A-M)*p+1>>>0,R=new Uint8Array(I);M!==A;){for(var T=w[M],z=0,k=I-1;(T!==0||z<S)&&k!==-1;k--,z++)T+=256*R[k]>>>0,R[k]=T%c>>>0,T=T/c>>>0;if(T!==0)throw new Error("Non-zero carry");S=z,M++}for(var L=I-S;L!==I&&R[L]===0;)L++;for(var j=h.repeat(F);L<I;++L)j+=t.charAt(R[L]);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,S=0,M=0;w[F]===h;)S++,F++;for(var A=(w.length-F)*f+1>>>0,I=new Uint8Array(A);w[F];){var R=w.charCodeAt(F);if(R>255)return;var T=n[R];if(T===255)return;for(var z=0,k=A-1;(T!==0||z<M)&&k!==-1;k--,z++)T+=c*I[k]>>>0,I[k]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");M=z,F++}for(var L=A-M;L!==A&&I[L]===0;)L++;for(var j=new Uint8Array(S+(A-L)),U=S;L!==A;)j[U++]=I[L++];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 VB(){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 eq(){if(oC)return X0;oC=1;function e(o){return o.length}function t(o){const s=o.byteLength;let u="";for(let l=0;l<s;l++)u+=String.fromCharCode(o[l]);return u}function n(o,s){const u=o.byteLength;for(let l=0;l<u;l++)o[l]=s.charCodeAt(l);return u}return X0={byteLength:e,toString:t,write:n},X0}var J0,sC;function tq(){if(sC)return J0;sC=1;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=u;t[45]=62,t[95]=63;function n(u){let l=u.length;return u.charCodeAt(l-1)===61&&l--,l>1&&u.charCodeAt(l-1)===61&&l--,l*3>>>2}function o(u){const l=u.byteLength;let c="";for(let h=0;h<l;h+=3)c+=e[u[h]>>2]+e[(u[h]&3)<<4|u[h+1]>>4]+e[(u[h+1]&15)<<2|u[h+2]>>6]+e[u[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(u,l){const c=u.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)];u[f++]=p<<2|y>>4,u[f++]=(y&15)<<4|g>>2,u[f++]=(g&3)<<6|b&63}return c}return J0={byteLength:n,toString:o,write:s},J0}var Z0,aC;function rq(){if(aC)return Z0;aC=1;function e(s){return s.length>>>1}function t(s){const u=s.byteLength;s=new DataView(s.buffer,s.byteOffset,u);let l="",c=0;for(let h=u-u%4;c<h;c+=4)l+=s.getUint32(c).toString(16).padStart(8,"0");for(;c<u;c++)l+=s.getUint8(c).toString(16).padStart(2,"0");return l}function n(s,u){const l=s.byteLength;for(let c=0;c<l;c++){const h=o(u.charCodeAt(c*2)),f=o(u.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 nq(){if(uC)return eb;uC=1;function e(o){let s=0;for(let u=0,l=o.length;u<l;u++){const c=o.charCodeAt(u);if(c>=55296&&c<=56319&&u+1<l){const h=o.charCodeAt(u+1);if(h>=56320&&h<=57343){s+=4,u++;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(u){return o.decode(u)}}else t=function(s){const u=s.byteLength;let l="",c=0;for(;c<u;){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),u-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=u-c;l+=String.fromCodePoint(p),c+=f+1}return l};let n;if(typeof TextEncoder<"u"){const o=new TextEncoder;n=function(u,l){return o.encodeInto(l,u).written}}else n=function(s,u){const l=s.byteLength;let c=0,h=0;for(;c<u.length;){const f=u.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 iq(){if(lC)return tb;lC=1;function e(o){return o.length*2}function t(o){const s=o.byteLength;let u="";for(let l=0;l<s-1;l+=2)u+=String.fromCharCode(o[l]+o[l+1]*256);return u}function n(o,s){const u=o.byteLength;let l=u;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 u}return tb={byteLength:e,toString:t,write:n},tb}var cC;function oq(){return cC||(cC=1,(function(e,t){const n=eq(),o=tq(),s=rq(),u=nq(),l=iq(),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 u;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 S(_,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 M(_,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 I(_,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 R(_,v,C){return typeof _=="string"?T(_,v):Array.isArray(_)?z(_):ArrayBuffer.isView(_)?k(_):L(_,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 k(_){const v=new Uint8Array(_.byteLength);return v.set(_),v}function L(_,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=R(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 ne(_){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 ue(_){return _}function ye(_,v="utf8",C=0,P=_.byteLength){return arguments.length===1?u.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 u.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 ae(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getUint32(v,!0)}function ie(_,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:S,copy:M,equals:A,fill:I,from:R,includes:j,indexOf:U,lastIndexOf:$,swap16:re,swap32:ne,swap64:X,toBuffer:ue,toString:ye,write:le,readDoubleBE:ee,readDoubleLE:G,readFloatBE:Q,readFloatLE:K,readInt32BE:W,readInt32LE:q,readUInt32BE:fe,readUInt32LE:ae,writeDoubleBE:ie,writeDoubleLE:J,writeFloatBE:O,writeFloatLE:H,writeInt32BE:Y,writeInt32LE:se,writeUInt32BE:pe,writeUInt32LE:te}})(td,td.exports)),td.exports}var rb,fC;function sq(){if(fC)return rb;fC=1;var e=(u,l)=>function(){return l||(0,u[Object.keys(u)[0]])((l={exports:{}}).exports,l),l.exports},t=(()=>{for(var u=new Uint8Array(128),l=0;l<64;l++)u[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=u[c.charCodeAt(p++)],b=u[c.charCodeAt(p++)],w=u[c.charCodeAt(p++)],F=u[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"(u,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 u=>(await WebAssembly.instantiate(await s,u)).exports,rb}var hC;function aq(){if(hC)return Fi.exports;hC=1;var e=VB(),t=oq(),n=null,o=typeof WebAssembly<"u"&&sq()().then(w=>{n=w}),s=64,u=[];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,S,M,A){if(!(this instanceof g))return new g(w,F,S,M,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)),S!=null&&(e(S instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(S.length===p,"salt must be exactly "+p+", was given "+S.length)),M!=null&&(e(M instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(M.length===y,"personal must be exactly "+y+", was given "+M.length))),u.length||(u.push(s),s+=216),this.digestLength=w,this.finalized=!1,this.pointer=u.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,S&&this._memory.set(S,32),M&&this._memory.set(M,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,u.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 uq(){if(dC)return un.exports;dC=1;var e=VB(),t=aq();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 u(j,U,$,N,Z,re){var ne=p[Z],X=p[Z+1],ue=p[re],ye=p[re+1];n(f,j,U),o(f,j,ne,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,ue,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;$++)u(0,8,16,24,h[$*16+0],h[$*16+1]),u(2,10,18,26,h[$*16+2],h[$*16+3]),u(4,12,20,28,h[$*16+4],h[$*16+5]),u(6,14,22,30,h[$*16+6],h[$*16+7]),u(0,10,20,30,h[$*16+8],h[$*16+9]),u(2,12,22,24,h[$*16+10],h[$*16+11]),u(4,14,16,26,h[$*16+12],h[$*16+13]),u(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"?S(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 S(j){for(var U="",$=0;$<j.length;$++)U+=M(j[$]);return U}function M(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>=I,"outlen must be at least "+I+", was given "+U),e(U<=R,"outlen must be at most "+R+", 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===k,"salt must be exactly "+k+", was given "+N.length)),Z!=null&&(e(Z instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(Z.length===L,"personal must be exactly "+L+", 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 I=un.exports.BYTES_MIN=16,R=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 k=un.exports.SALTBYTES=16,L=un.exports.PERSONALBYTES=16;return t.ready(function(j){j||(un.exports.WASM_LOADED=!0,un.exports=t)}),un.exports}var pC;function lq(){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(Z9()),o=e(uq()),s=(0,n.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),u=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 M=g[1],A=(b<<2|M>>6)&255,I=M&63;F=A|I<<8,w=2}else throw p(y);let S;switch(g.length-w){case 34:case 35:S=2;break;case 9:case 5:case 3:case 2:S=1;break;default:throw p(y)}f(g,S);for(let M=0;M<S;M++)if(l[M]!=g[g.length-S+M])throw p(y);return{prefix:F,bytes:g.subarray(w,g.length-S)}}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,S;g<64?(F=Nr.Buffer.allocUnsafe(1+w+b),F[0]=g,S=1):(F=Nr.Buffer.allocUnsafe(2+w+b),F[0]=(g&252)>>2|64,F[1]=g>>8|(g&3)<<6,S=2),F.set(y.bytes,S),f(F,w);for(let M=0;M<w;M++)F[S+b+M]=l[M];return s.encode(F)}So.encode=h;function f(y,g){let b=(0,o.default)(64);b.update(u),b.update(y.subarray(0,y.length-g)),b.digest(l)}function p(y){return new Error("Invalid ss58 address: "+y)}return So}var cq=lq();function fq(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),u=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)*u+1>>>0,F=new Uint8Array(w);for(;g!==b;){let A=f[g],I=0;for(let R=w-1;(A!==0||I<y)&&R!==-1;R--,I++)A+=256*F[R]>>>0,F[R]=A%n>>>0,A=A/n>>>0;if(A!==0)throw new Error("Non-zero carry");y=I,g++}let S=w-y;for(;S!==w&&F[S]===0;)S++;let M=o.repeat(p);for(;S<w;++S)M+=e.charAt(F[S]);return M}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 I=t[A];if(I===255)return;let R=0;for(let T=b-1;(I!==0||R<g)&&T!==-1;T--,R++)I+=n*w[T]>>>0,w[T]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");g=R,p++}let F=b-g;for(;F!==b&&w[F]===0;)F++;const S=new Uint8Array(y+(b-F));let M=y;for(;F!==b;)S[M++]=w[F++];return S}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 hq="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const ld=fq(hq);function dq(e){function t(u){var l=Uint8Array.from(u),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(u){var l=u.slice(0,-4),c=u.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(u){var l=ld.decodeUnsafe(u);if(l!=null)return n(l)}function s(u){var l=ld.decode(u),c=n(l);if(c==null)throw new Error("Invalid checksum");return c}return{encode:t,decode:s,decodeUnsafe:o}}function pq(e){return xb(xb(e))}const zp=dq(pq);var aa={},yC;function yq(){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,S=[];for(let M=0;M<f.length;++M)for(b=b<<p|f[M],w+=p;w>=y;)w-=y,S.push(b>>w&F);if(g)w>0&&S.push(b<<y-w&F);else{if(w>=p)return"Excess padding";if(b<<y-w&F)return"Non-zero padding"}return S}function u(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,S,M){if(M=M||90,F.length+7+S.length>M)throw new TypeError("Exceeds length limit");F=F.toLowerCase();let A=o(F);if(typeof A=="string")throw new Error(A);let I=F+"1";for(let R=0;R<S.length;++R){const T=S[R];if(T>>5!==0)throw new Error("Non 5-bit word");A=n(A)^T,I+=e.charAt(T)}for(let R=0;R<6;++R)A=n(A);A^=p;for(let R=0;R<6;++R){const T=A>>(5-R)*5&31;I+=e.charAt(T)}return I}function g(F,S){if(S=S||90,F.length<8)return F+" too short";if(F.length>S)return"Exceeds length limit";const M=F.toLowerCase(),A=F.toUpperCase();if(F!==M&&F!==A)return"Mixed-case string "+F;F=M;const I=F.lastIndexOf("1");if(I===-1)return"No separator character for "+F;if(I===0)return"Missing prefix for "+F;const R=F.slice(0,I),T=F.slice(I+1);if(T.length<6)return"Data too short";let z=o(R);if(typeof z=="string")return z;const k=[];for(let L=0;L<T.length;++L){const j=T.charAt(L),U=t[j];if(U===void 0)return"Unknown character "+j;z=n(z)^U,!(L+6>=T.length)&&k.push(U)}return z!==p?"Invalid checksum for "+F:{prefix:R,words:k}}function b(F,S){const M=g(F,S);if(typeof M=="object")return M}function w(F,S){const M=g(F,S);if(typeof M=="object")return M;throw new Error(M)}return{decodeUnsafe:b,decode:w,encode:y,toWords:u,fromWordsUnsafe:l,fromWords:c}}return aa.bech32=h("bech32"),aa.bech32m=h("bech32m"),aa}var Qb=yq(),nb={exports:{}},gC;function gq(){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(""),u={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(S,M){M.length>10&&(M="..."+M.substr(-10));var A=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+S+" bytes: "+M+" <-");throw A.position=S,A},h=function(S){for(var M="",A=S.length,I=0,R=0,T,z;I<A;){if(T=S[I++],T<=127){M+=String.fromCharCode(T);continue}else T>191&&T<=223?(z=T&31,R=1):T<=239?(z=T&15,R=2):T<=247?(z=T&7,R=3):c(I,M);for(var k=0;k<R;++k)T=S[I++],(T<128||T>191)&&c(I,M),z<<=6,z+=T&63;z>=55296&&z<=57343&&c(I,M),z>1114111&&c(I,M),z<=65535?M+=String.fromCharCode(z):(z-=65536,M+=String.fromCharCode((z>>10)+55296),M+=String.fromCharCode((z&1023)+56320))}return M},f=function(S){if(S==="")return[];if(!/^[A-Z2-7=]+$/.test(S))throw new Error("Invalid base32 characters");S=S.replace(/=/g,"");for(var M,A,I,R,T,z,k,L,j=[],U=0,$=S.length,N=0,Z=$>>3<<3;N<Z;)M=u[S.charAt(N++)],A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],z=u[S.charAt(N++)],k=u[S.charAt(N++)],L=u[S.charAt(N++)],j[U++]=(M<<3|A>>>2)&255,j[U++]=(A<<6|I<<1|R>>>4)&255,j[U++]=(R<<4|T>>>1)&255,j[U++]=(T<<7|z<<2|k>>>3)&255,j[U++]=(k<<5|L)&255;var re=$-Z;return re===2?(M=u[S.charAt(N++)],A=u[S.charAt(N++)],j[U++]=(M<<3|A>>>2)&255):re===4?(M=u[S.charAt(N++)],A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],j[U++]=(M<<3|A>>>2)&255,j[U++]=(A<<6|I<<1|R>>>4)&255):re===5?(M=u[S.charAt(N++)],A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],j[U++]=(M<<3|A>>>2)&255,j[U++]=(A<<6|I<<1|R>>>4)&255,j[U++]=(R<<4|T>>>1)&255):re===7&&(M=u[S.charAt(N++)],A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],z=u[S.charAt(N++)],k=u[S.charAt(N++)],j[U++]=(M<<3|A>>>2)&255,j[U++]=(A<<6|I<<1|R>>>4)&255,j[U++]=(R<<4|T>>>1)&255,j[U++]=(T<<7|z<<2|k>>>3)&255),j},p=function(S){for(var M,A,I,R,T,z="",k=S.length,L=0,j=parseInt(k/5)*5;L<j;)M=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L++),R=S.charCodeAt(L++),T=S.charCodeAt(L++),z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31];var U=k-j;return U===1?(M=S.charCodeAt(L),z+=s[M>>>3]+s[M<<2&31]+"======"):U===2?(M=S.charCodeAt(L++),A=S.charCodeAt(L),z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(M=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L),z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):U===4&&(M=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L++),R=S.charCodeAt(L),z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"="),z},y=function(S){var M,A,I,R,T,z,k=!1,L="",j=0,U,$=0,N=S.length;if(S==="")return L;do{for(l[0]=l[5],l[1]=l[6],l[2]=l[7],U=$;j<N&&U<5;++j)z=S.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|S.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&&(k=!0),M=l[0],U>4?(A=l[1],I=l[2],R=l[3],T=l[4],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31]):U===1?L+=s[M>>>3]+s[M<<2&31]+"======":U===2?(A=l[1],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(A=l[1],I=l[2],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):(A=l[1],I=l[2],R=l[3],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"=")}while(!k);return L},g=function(S){for(var M,A,I,R,T,z="",k=S.length,L=0,j=parseInt(k/5)*5;L<j;)M=S[L++],A=S[L++],I=S[L++],R=S[L++],T=S[L++],z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31];var U=k-j;return U===1?(M=S[L],z+=s[M>>>3]+s[M<<2&31]+"======"):U===2?(M=S[L++],A=S[L],z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):U===3?(M=S[L++],A=S[L++],I=S[L],z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):U===4&&(M=S[L++],A=S[L++],I=S[L++],R=S[L],z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"="),z},b=function(S,M){var A=typeof S!="string";return A&&S.constructor===ArrayBuffer&&(S=new Uint8Array(S)),A?g(S):M?p(S):y(S)},w=function(S,M){if(!M)return h(f(S));if(S==="")return"";if(!/^[A-Z2-7=]+$/.test(S))throw new Error("Invalid base32 characters");var A,I,R,T,z,k,L,j,U="",$=S.indexOf("=");$===-1&&($=S.length);for(var N=0,Z=$>>3<<3;N<Z;)A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],z=u[S.charAt(N++)],k=u[S.charAt(N++)],L=u[S.charAt(N++)],j=u[S.charAt(N++)],U+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|k<<2|L>>>3)&255)+String.fromCharCode((L<<5|j)&255);var re=$-Z;return re===2?(A=u[S.charAt(N++)],I=u[S.charAt(N++)],U+=String.fromCharCode((A<<3|I>>>2)&255)):re===4?(A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],U+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)):re===5?(A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],z=u[S.charAt(N++)],U+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)):re===7&&(A=u[S.charAt(N++)],I=u[S.charAt(N++)],R=u[S.charAt(N++)],T=u[S.charAt(N++)],z=u[S.charAt(N++)],k=u[S.charAt(N++)],L=u[S.charAt(N++)],U+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|k<<2|L>>>3)&255)),U},F={encode:b,decode:w};w.asBytes=f,o?e.exports=F:t.base32=F})()})(nb)),nb.exports}var mq=gq();const WB=tp(mq);var ib={exports:{}},mC;function bq(){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 u=!o&&typeof self=="object",l=!s.JS_SHA512_NO_NODE_JS&&typeof jt=="object"&&jt.versions&&jt.versions.node;l?s=af:u&&(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 S=ArrayBuffer.isView;h&&(s.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!S)&&(S=function(j){return typeof j=="object"&&j.buffer&&j.buffer.constructor===ArrayBuffer});var M=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)&&!S(j))throw new Error(t);return[j,!1]},A=function(j,U){return function($){return new z(U,!0).update($)[j]()}},I=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},R=function(j,U){return function($,N){return new k($,U,!0).update(N)[j]()}},T=function(j){var U=R("hex",j);U.create=function(Z){return new k(Z,j)},U.update=function(Z,re){return U.create(Z).update(re)};for(var $=0;$<b.length;++$){var N=b[$];U[N]=R(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=M(j);j=U[0];for(var $=U[1],N,Z=0,re,ne=j.length,X=this.blocks;Z<ne;){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<ne&&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<ne&&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,ne=this.h3h,X=this.h3l,ue=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,ae,ie,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],ae=(ve>>>1|x<<31)^(ve>>>8|x<<24)^ve>>>7,ie=(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)+(ie&65535)+(O&65535),Y=(D>>>16)+(x>>>16)+(ie>>>16)+(O>>>16)+(H>>>16),se=(B&65535)+(ve&65535)+(ae&65535)+(J&65535)+(Y>>>16),pe=(B>>>16)+(ve>>>16)+(ae>>>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=ne,et=X,gt=ue,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)ae=(xe>>>28|Ce<<4)^(Ce>>>2|xe<<30)^(Ce>>>7|xe<<25),ie=(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<^~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)+(ie&65535),Y=(de>>>16)+(ie>>>16)+(H>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),pe=(Be>>>16)+(ae>>>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,ae=(We>>>28|et<<4)^(et>>>2|We<<30)^(et>>>7|We<<25),ie=(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>^~dt<,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)+(ie&65535),Y=(de>>>16)+(ie>>>16)+(H>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),pe=(Be>>>16)+(ae>>>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,ae=(He>>>28|Ke<<4)^(Ke>>>2|He<<30)^(Ke>>>7|He<<25),ie=(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>,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)+(ie&65535),Y=(de>>>16)+(ie>>>16)+(H>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),pe=(Be>>>16)+(ae>>>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,ae=(we>>>28|Ie<<4)^(Ie>>>2|we<<30)^(Ie>>>7|we<<25),ie=(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)+(ie&65535),Y=(de>>>16)+(ie>>>16)+(H>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),pe=(Be>>>16)+(ae>>>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=(ne&65535)+(We&65535)+(Y>>>16),pe=(ne>>>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=(ue&65535)+(gt&65535)+(Y>>>16),pe=(ue>>>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,ne=this.h3h,X=this.h3l,ue=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[ne>>>28&15]+f[ne>>>24&15]+f[ne>>>20&15]+f[ne>>>16&15]+f[ne>>>12&15]+f[ne>>>8&15]+f[ne>>>4&15]+f[ne&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[ue>>>28&15]+f[ue>>>24&15]+f[ue>>>20&15]+f[ue>>>16&15]+f[ue>>>12&15]+f[ue>>>8&15]+f[ue>>>4&15]+f[ue&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,ne=this.h3h,X=this.h3l,ue=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,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255];return q>=256&&fe.push(X>>>24&255,X>>>16&255,X>>>8&255,X&255),q>=384&&fe.push(ue>>>24&255,ue>>>16&255,ue>>>8&255,ue&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 k(j,U,$){var N,Z=M(j);if(j=Z[0],Z[1]){for(var re=[],ne=j.length,X=0,ue,N=0;N<ne;++N)ue=j.charCodeAt(N),ue<128?re[X++]=ue:ue<2048?(re[X++]=192|ue>>>6,re[X++]=128|ue&63):ue<55296||ue>=57344?(re[X++]=224|ue>>>12,re[X++]=128|ue>>>6&63,re[X++]=128|ue&63):(ue=65536+((ue&1023)<<10|j.charCodeAt(++N)&1023),re[X++]=240|ue>>>18,re[X++]=128|ue>>>12&63,re[X++]=128|ue>>>6&63,re[X++]=128|ue&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=$}k.prototype=new z,k.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)}},k.prototype.clone=function(){var j=new k([],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 L=I(512);L.sha512=L,L.sha384=I(384),L.sha512_256=I(256),L.sha512_224=I(224),L.sha512.hmac=T(512),L.sha384.hmac=T(384),L.sha512_256.hmac=T(256),L.sha512_224.hmac=T(224),c?e.exports=L:(s.sha512=L.sha512,s.sha384=L.sha384,s.sha512_256=L.sha512_256,s.sha512_224=L.sha512_224)})()})(ib)),ib.exports}var Aq=bq();const wq=tp(Aq),XB="3.7.8",vq=XB,ul=typeof Nr.Buffer=="function",bC=typeof TextDecoder=="function"?new TextDecoder:void 0,AC=typeof TextEncoder=="function"?new TextEncoder:void 0,xq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",fc=Array.prototype.slice.call(xq),rd=(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(fc),Eq=/^(?:[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)),JB=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),ZB=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),e3=e=>{let t,n,o,s,u="";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,u+=fc[t>>18&63]+fc[t>>12&63]+fc[t>>6&63]+fc[t&63]}return l?u.slice(0,l-3)+"===".substring(l):u},vv=typeof btoa=="function"?e=>btoa(e):ul?e=>Nr.Buffer.from(e,"binary").toString("base64"):e3,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?JB(Gb(e)):Gb(e),Sq=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)}},Iq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t3=e=>e.replace(Iq,Sq),vC=ul?e=>Nr.Buffer.from(e,"utf8").toString("base64"):AC?e=>Gb(AC.encode(e)):e=>vv(t3(e)),Ru=(e,t=!1)=>t?JB(vC(e)):vC(e),xC=e=>Ru(e,!0),_q=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Cq=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))}},r3=e=>e.replace(_q,Cq),n3=e=>{if(e=e.replace(/\s+/g,""),!Eq.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n,o,s=[];for(let u=0;u<e.length;)t=rd[e.charAt(u++)]<<18|rd[e.charAt(u++)]<<12|(n=rd[e.charAt(u++)])<<6|(o=rd[e.charAt(u++)]),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(ZB(e)):ul?e=>Nr.Buffer.from(e,"base64").toString("binary"):n3,i3=ul?e=>wC(Nr.Buffer.from(e,"base64")):e=>wC(xv(e).split("").map(t=>t.charCodeAt(0))),o3=e=>i3(s3(e)),Fq=ul?e=>Nr.Buffer.from(e,"base64").toString("utf8"):bC?e=>bC.decode(i3(e)):e=>r3(xv(e)),s3=e=>ZB(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Kb=e=>Fq(s3(e)),Oq=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)},a3=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),u3=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,a3(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 o3(this)})},l3=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,a3(n));e("toBase64",function(t){return cd(this,t)}),e("toBase64URI",function(){return cd(this,!0)}),e("toBase64URL",function(){return cd(this,!0)})},Tq=()=>{u3(),l3()},Bq={version:XB,VERSION:vq,atob:xv,atobPolyfill:n3,btoa:vv,btoaPolyfill:e3,fromBase64:Kb,toBase64:Ru,encode:Ru,encodeURI:xC,encodeURL:xC,utob:t3,btou:r3,decode:Kb,isValid:Oq,fromUint8Array:cd,toUint8Array:o3,extendString:u3,extendUint8Array:l3,extendBuiltins:Tq},Da=e=>`${e} is malformed`,c3=e=>`${e} checksum is wrong`,Rq=32,EC=32,nd=36,f3=4,SC=58,IC=32,Mq=32,_C=Da("block hash"),jq=Da("tx id"),ob=Da("address"),Uq=c3("address");function Nq(e){return Uint8Array.from(wq.sha512_256.array(e).slice(IC-f3,IC))}function Dq(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=WB.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-f3)),o=new Uint8Array(t.slice(Mq,nd)),s=Nq(n);if(!Lq(s,o))throw new Error(Uq);return!0}function Pq(e){const t=Bq.toUint8Array("3KYSrPgi16Cl3iLu3r+GaeZkBBrgNFbMB60jsrJtTdI=");if(t.length!==EC)throw new Error(`${jq}: expected byte length ${EC}, got ${t.length}`);return!0}function kq(e){const t=WB.decode.asBytes(e);if(t.length!==Rq)throw new Error(`${_C}: expected byte length ${_C}, got ${t.length}`);return!0}function Lq(e,t){return e.length!==t.length?!1:Array.from(e).every((n,o)=>n===t[o])}const $q=34,Yb=34,CC=36,zq=Da("block hash"),qq=Da("tx id"),Hq=Da("address");function Qq(e){const t=zp.decode(e);if(t.length!==CC)throw new Error(`${Hq}: expected byte length ${CC}, got ${t.length}`);return!0}function Gq(e){const t=zp.decode(e);if(t.length!==Yb)throw new Error(`${zq}: expected byte length ${$q}, got ${t.length}`);return!0}function Kq(e){const t=zp.decode(e);if(t.length!==Yb)throw new Error(`${qq}: expected byte length ${Yb}, got ${t.length}`);return!0}function Yq({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=Yq({polynomial:3988292384,numTables:8});function Vq(){return-1}function Wq(e,t){const n=t.byteLength,o=new DataView(t.buffer,t.byteOffset,n);let s=e,u=0;const l=-o.byteOffset&3;for(;u<l&&u<n;u++)s=Gi[(s^o.getUint8(u))&255]^s>>>8;if(u===n)return s;u=l;let c=n-u;for(;c>=8;u+=8,c-=8){s^=o.getUint32(u,!0);const h=o.getUint32(u+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=u;h<n;h++)s=Gi[(s^o.getUint8(h))&255]^s>>>8;return s}function Xq(e){return(e^-1)>>>0}function Jq(e){return Xq(Wq(Vq(),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,h3,d3,p3,fd,Rn,Wb,y3,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 u;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(u=Zr,Rn,hd).call(u,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,y3).call(this);return Xe(this,Tt,la).call(this,n),ht(this,Mu,!0),t}readByteString(){var u;const t=Xe(this,Tt,hc).call(this,2);if(t.getAdditionalInfo()===31){const{val:l,encodingLength:c}=Xe(this,Tt,p3).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(u=Zr,Rn,hd).call(u,t,n);return Xe(this,Tt,d3).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,h3).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,h3=function(){var n,o;const t=Xe(this,Tt,hc).call(this);switch(t.getMajorType()){case 0:{const{unsignedInt:s,bytesRead:u}=Xe(n=Zr,Rn,dc).call(n,t,Xe(this,Tt,ca).call(this));return{bytesRead:u,signedInt:BigInt(s)}}case 1:{const{unsignedInt:s,bytesRead:u}=Xe(o=Zr,Rn,dc).call(o,t,Xe(this,Tt,ca).call(this));return{bytesRead:u,signedInt:BigInt(-1)-s}}default:throw new id(`Reader type mismatch, expected 0 or 1 but got ${t.getMajorType()}`)}},d3=function(t){if(Ae(this,jo).length-Ae(this,Oi)<t)throw new ua(sb)},p3=function(t){var c,h,f;const n=Xe(this,Tt,ca).call(this);let o=Nr.Buffer.from([]),s=0,u=1,l=Xe(c=Zr,Rn,Wb).call(c,n.slice(u),t);for(;l.getInitialByte()!==Os.IndefiniteLengthBreakByte;){const{length:p,bytesRead:y}=Xe(h=Zr,Rn,hd).call(h,l,n.slice(u)),g=y+Number(p);o=Nr.Buffer.concat([o,n.slice(u+(g-p),u+g)]),u+=g,l=Xe(f=Zr,Rn,Wb).call(f,n.slice(u),t)}return s=u+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},y3=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 u;const{unsignedInt:o,bytesRead:s}=Xe(u=Zr,Rn,dc).call(u,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 u of o)s=(s<<BigInt(8))+BigInt(u);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 Zq=c3("address");function eH(e){return g3(ld.decode(e))}function g3(e){const t=new Vb(Nr.Buffer.from(e).toString("hex"));t.readStartArray(),t.readTag();const n=t.readByteString();if(Number(t.readInt())!==Jq(n))throw new Error(Zq);return!0}function tH(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 u=Nr.Buffer.from(n),{bytesRead:l}=ab(u.subarray(s));s+=l;const{bytesRead:c}=ab(u.subarray(s));return s+=c,ab(u.subarray(s)),!0}case 6:case 7:return n.length===47;case 14:case 15:return n.length===47;case 8:return g3(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,Dq));ro("algorand-blockhash",e=>Di(e,Pq));ro("algorand-txid",e=>Di(e,kq));ro("mina-address",e=>Di(e,Qq));ro("mina-blockhash",e=>Di(e,Gq));ro("mina-txid",e=>Di(e,Kq));ro("cardano-address",e=>Di(e,eH)||Di(e,tH));ro("ss58",e=>Di(e,cq.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())},rH={[-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),u=Ue.Tuple([Ue.Literal(n),...s]);return[n,u]}))}function Io(e){return["userAddress",rH[e]]}const _o=[["userSignature",Ue.String()],["conciseInput",Ue.String()],["millisecondTimestamp",Ue.String()]],nH={[`${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(nH);const iH={batcherInput:"&B"},oH={[iH.batcherInput]:[["input",Ue.Array(Ue.String())]]};Ev(oH);const ub={createAccount:"&createAccount",linkAddress:"&linkAddress",unlinkAddress:"&unlinkAddress"},sH={[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(sH);var lb={exports:{}},OC;function aH(){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 u=!o&&typeof self=="object",l=!s.JS_SHA3_NO_NODE_JS&&typeof jt=="object"&&jt.versions&&jt.versions.node;l?s=af:u&&(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],S=[224,256,384,512],M=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],I={128:168,256:136},R=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(!R(O)&&!T(O))throw new Error(t);return[O,!1]},k=function(O){return z(O)[0].length===0},L=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 ae(O,H,O).update(se)[Y]()}},U=function(O,H,Y){return function(se,pe){return new ae(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 ae(O,H,O)},Y.update=function(se){return Y.create().update(se)},Z(Y,j,O,H)},ne=function(O,H){var Y=U(O,H,"hex");return Y.create=function(se){return new ae(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=I[O],se=$(O,H,"hex");return se.create=function(pe,te,_){return k(te)&&k(_)?le["shake"+O].create(pe):new ae(O,H,pe).bytepad([te,_],Y)},se.update=function(pe,te,_,v){return se.create(te,_,v).update(pe)},Z(se,$,O,H)},ue=function(O,H){var Y=I[O],se=N(O,H,"hex");return se.create=function(pe,te,_){return new ie(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:S,createMethod:re},{name:"sha3",padding:b,bits:S,createMethod:re},{name:"shake",padding:p,bits:M,createMethod:ne},{name:"cshake",padding:y,bits:M,createMethod:X},{name:"kmac",padding:y,bits:M,createMethod:ue}],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 ae(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}ae.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},ae.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},ae.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},ae.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},ae.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)}},ae.prototype.toString=ae.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=L(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])),_},ae.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=L(H),J(H))}return se&&(C[te]=H[pe],v=v.slice(0,_)),v},ae.prototype.buffer=ae.prototype.arrayBuffer,ae.prototype.digest=ae.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=L(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 ie(O,H,Y){ae.call(this,O,H,Y)}ie.prototype=new ae,ie.prototype.finalize=function(){return this.encode(this.outputBits,!0),ae.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>,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<,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 uH=aH();const m3=tp(uH),{keccak_256:eK}=m3;function b3(e,t,n,o,s,u=void 0){let l;switch(o){case Ir.EVM:l=l9(tn.Evm.Address,n);break;default:throw new Error("NYI: Unsupported wallet address type: "+o)}return(""+(u??"")+t+l+s).replace(/[^a-zA-Z0-9]/g,"-").toLocaleLowerCase()}const lH={EVM:0};async function cH(e,t,n=void 0){const o=Ki(t.privateKey),s=Ac({account:o,chain:vc,transport:wc()}),u=Date.now().toString(),l=o.address,c=lH.EVM,h=b3(null,u,l,c,e,n),f=await s.signMessage({account:o,message:h});return{addressType:c,address:l,signature:f,input:e,timestamp:u,target:n}}async function fH(e){const t=await fetch(FT,{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 cH(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await fH(o);return console.log("🎉 Batcher response:",s),s}function hH(){const[e,t]=Ve.useState([]),[n,o]=Ve.useState(!0),[s,u]=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([]),[S,M]=Ve.useState(null),[A,I]=Ve.useState([]),[R,T]=Ve.useState(!1),[z,k]=Ve.useState(!1),[L,j]=Ve.useState(!1),[U,$]=Ve.useState(""),[N,Z]=Ve.useState(""),[re,ne]=Ve.useState(""),[X,ue]=Ve.useState(null),[ye,le]=Ve.useState(null),ee=(te,_,v)=>{const C=Date.now(),P={id:C,type:te,title:_,message:v};I(he=>[...he,P]),setTimeout(()=>{I(he=>he.filter(ce=>ce.id!==C))},5e3)},G=te=>{I(_=>_.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]),M(v),ee("success","Wallet Generated",`New wallet created: ${_.address.slice(0,6)}...${_.address.slice(-4)}`)},K=te=>{F(_=>_.filter(v=>v.id!==te)),(S==null?void 0:S.id)===te&&M(null)},W=async()=>{if(!S){ee("error","No Wallet","Please select a wallet first");return}j(!0);try{const _=JSON.stringify(["&createAccount"]);await od(_,S),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(!S){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(_,S),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(!S){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(S.privateKey),chain:vc,transport:wc()});j(!0);const _=`unlink:${String(X)}:${re.toString().toLowerCase().trim()}:`,v=await te.signMessage({account:Ki(S.privateKey),message:_});try{const C=["&unlinkAddress",X.toString(),v,re.toString().toLowerCase().trim(),""],P=JSON.stringify(C);await od(P,S),ee("success","Address Unlinked","Successfully unlinked address from account! Use the refresh button to see updated addresses."),ne("")}catch(C){ee("error","Unlink Other Error",`Error unlinking address: ${C instanceof Error?C.message:"Unknown error"}`)}finally{j(!1)}},ae=async()=>{if(!S){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(S.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(S.privateKey),message:v}),P=`link:${X}:${S.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,S),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)}},ie=async()=>{try{o(!0),u(null);const te=new URL(ZN);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),u(te instanceof Error?te.message:"Unknown error")}finally{o(!1)}};Ve.useEffect(()=>{ie()},[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(!R),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:R?0:"20px"},children:[Ee.jsx("h3",{style:{margin:0,color:"#333"},children:"Wallet Management"}),Ee.jsx("span",{style:{fontSize:"18px",color:"#666",transform:R?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!R&&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:(S==null?void 0:S.id)===te.id?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:(S==null?void 0:S.id)===te.id?"#f0fdf4":"white"},children:[Ee.jsx("input",{type:"radio",name:"selectedWallet",checked:(S==null?void 0:S.id)===te.id,onChange:()=>M(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))})]})]})]}),S&&Ee.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#fef7ff"},children:[Ee.jsxs("div",{onClick:()=>k(!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:L,style:{padding:"10px 20px",background:L?"#ccc":"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:L?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"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=>ue(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!==(S==null?void 0:S.id)).map(te=>Ee.jsxs("option",{value:te.id,children:[te.name," (",te.address,")"]},te.id))]})]}),Ee.jsx("button",{type:"button",onClick:ae,disabled:L||!X||!ye,style:{padding:"10px 20px",background:L||!X||!ye?"#ccc":"linear-gradient(45deg, #3b82f6, #1e3a8a)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X||!ye?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"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=>ue(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=>ne(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:L||!X||!re.trim(),style:{padding:"10px 20px",background:L||!X||!re.trim()?"#ccc":"linear-gradient(45deg, #f59e0b, #92400e)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X||!re.trim()?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"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=>ue(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:L||!X,style:{padding:"10px 20px",background:L||!X?"#ccc":"linear-gradient(45deg, #ef4444, #7f1d1d)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"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,u]=Ve.useState(!1),[l,c]=Ve.useState(!1),[h,f]=Ve.useState(!1),p=()=>{o(!0)},y=()=>{o(!1)},g=()=>{u(!0)},b=()=>{u(!1)},w=()=>{c(!0)},F=()=>{c(!1)},S=()=>{f(!0)},M=()=>{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:S,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:M,title:"Addresses",children:Ee.jsx(hH,{})})]})}function dH(e){return e.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function pH({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(u){console.error("Failed to copy to clipboard:",u)}};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:dH(e.timestamp)})]}),Ee.jsx("div",{className:"block-hash",children:e.hash})]})}function yH({title:e,blockTime:t,blocks:n,isMainColumn:o=!1,newBlockIndex:s}){const u=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:u.length===0?Ee.jsx("div",{className:"block-item placeholder",children:"No Blocks Fetched"}):u.map((l,c)=>Ee.jsx(pH,{block:l,isNew:s===c},`${c}-${l.number}-${l.hash}`))})]})}function gH(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 u=(o.type||"").toUpperCase()==="CARDANO"?[]:o.blocks;return Ee.jsx(yH,{title:o.name,blockTime:gH(n,o),blocks:u,isMainColumn:n==="paima",newBlockIndex:t[n]},n)})})}function mH(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 bH({title:e,data:t,pagination:n,onPrev:o,onNext:s,onFirst:u,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 S=b[F.name],M=mH(S,F.name),A=S?S.toString():"";return Ee.jsx("td",{dangerouslySetInnerHTML:{__html:M},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:u,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:u,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(bH,{title:p,data:y,pagination:s==null?void 0:s[p],onPrev:u?()=>u(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 AH={EVM:0};async function wH(e,t,n=void 0){const o=Ki(t.privateKey),s=Ac({account:o,chain:vc,transport:wc()}),u=Date.now().toString(),l=o.address,c=AH.EVM,h=b3(null,u,l,c,e,n),f=await s.signMessage({message:h});return{addressType:c,address:l,signature:f,input:e,timestamp:u,target:n}}async function vH(e){const t=await fetch(FT,{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 xH(e,t,n=void 0){console.log("🚀 Creating signed input for:",e);const o=await wH(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await vH(o);return console.log("🎉 Batcher response:",s),s}async function EH(){try{const e=await fetch(VN);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 SH(){const[e,t]=Ve.useState(""),[n,o]=Ve.useState({}),[s,u]=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),[S,M]=Ve.useState(void 0),A=($,N,Z)=>{const re=Date.now(),ne={id:re,type:$,title:N,message:Z};f(X=>[...X,ne]),setTimeout(()=>{f(X=>X.filter(ue=>ue.id!==re))},5e3)};Ve.useEffect(()=>{(async()=>{try{F(!0);const N=await EH();b(N)}catch{A("error","Grammar Error","Failed to load grammar from server")}finally{F(!1)}})()},[]);const I=Object.keys(g),R=()=>{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({})},k=($,N)=>{o(Z=>({...Z,[$]:N}))},L=()=>{if(!e)return null;const $=[e],N=g[e];for(const[Z,re]of N){const ne=n[Z];if(ne!==void 0&&ne!=="")if(re.type==="integer")$.push(parseInt(ne)||0);else if(re.type==="object")try{$.push(typeof ne=="string"?JSON.parse(ne):ne)}catch{$.push(ne)}else $.push(ne)}return $},j=($,N)=>{const Z=n[$]||"";return N.type==="integer"?Ee.jsx("input",{type:"number",value:Z,onChange:re=>k($,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=>k($,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=>k($,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=>k($,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 $=L();if(!$){A("error","Invalid Input","Failed to build JSON array");return}u(!0);try{const N=JSON.stringify($);await xH(N,l,S),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{u(!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:R,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 --"}),I.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(L(),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:u}){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=()=>{u(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 IH(){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 _H=IH(),da=(e=>(e.PaimaEngine="effectstream-engine",e.Batcher="batcher",e))(da||{}),dd=(e=>(e.Batcher="batcher",e.Node="node",e.App="app",e))(dd||{});function CH(e){switch(e){case"batcher":return"batcher";case"node":return"effectstream-engine";case"app":return"effectstream-engine";default:_H.assertNever(e)}}function A3(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:CH(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 FH(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:tK}=m3;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 u=[];const l=c=>{c===e.length-1?u.push("+"):u.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"){u.push(e[c]);continue}t[h.name]===void 0?u.push("+"):u.push(t[h.name]),s.length>0&&c===s[s.length-1]&&s.pop()}return u.join("/")}function OH(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 TH(e){return e.filter(t=>typeof t!="string").map(t=>t.name)}var Iv=Object.defineProperty,BH=Object.getOwnPropertyDescriptor,RH=Object.getOwnPropertyNames,MH=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})},jH=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of RH(t))!MH.call(e,s)&&s!==n&&Iv(e,s,{get:()=>t[s],enumerable:!(o=BH(t,s))||o.enumerable});return e},Vt=e=>jH(Iv({},"__esModule",{value:!0}),e),Pe=Ln(()=>{}),Dt={};ll(Dt,{_debugEnd:()=>B1,_debugProcess:()=>T1,_events:()=>G1,_eventsCount:()=>K1,_exiting:()=>g1,_fatalExceptions:()=>C1,_getActiveHandles:()=>_3,_getActiveRequests:()=>I3,_kill:()=>A1,_linkedBinding:()=>E3,_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:()=>C3,binding:()=>a1,browser:()=>h1,chdir:()=>c1,config:()=>m1,cpuUsage:()=>pc,cwd:()=>l1,debugPort:()=>$1,default:()=>Cv,dlopen:()=>S3,domain:()=>y1,emit:()=>Z1,emitWarning:()=>s1,env:()=>t1,execArgv:()=>n1,execPath:()=>L1,exit:()=>E1,features:()=>_1,hasUncaughtExceptionCaptureCallback:()=>F3,hrtime:()=>pd,kill:()=>x1,listeners:()=>T3,memoryUsage:()=>v1,moduleLoadList:()=>p1,nextTick:()=>v3,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:()=>O3,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 UH(){!ba||!pa||(ba=!1,pa.length?Yi=pa.concat(Yi):xc=-1,Yi.length&&w3())}function w3(){if(!ba){var e=setTimeout(UH,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 v3(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 x3(e,t)),Yi.length===1&&!ba&&setTimeout(w3,0)}function x3(e,t){this.fun=e,this.array=t}function cn(){}function E3(e){_v("_linkedBinding")}function S3(e){_v("dlopen")}function I3(){return[]}function _3(){return[]}function C3(e,t){if(!e)throw new Error(t||"assertion error")}function F3(){return!1}function O3(){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 T3(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,NH=Ln(()=>{Pe(),Le(),ke(),Yi=[],ba=!1,xc=-1,x3.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:E3,_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:T3,domain:y1,_exiting:g1,config:m1,dlopen:S3,uptime:O3,_getActiveRequests:I3,_getActiveHandles:_3,reallyExit:b1,_kill:A1,cpuUsage:pc,resourceUsage:w1,memoryUsage:v1,kill:x1,exit:E1,openStdin:S1,allowedNodeEnvironmentFlags:I1,assert:C3,features:_1,_fatalExceptions:C1,setUncaughtExceptionCaptureCallback:F1,hasUncaughtExceptionCaptureCallback:F3,emitWarning:s1,nextTick:v3,_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(()=>{NH()});function DH(){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,u=o.length;s<u;++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 S=F===w?0:4-F%4;return[F,S]}function c(b){var w=l(b),F=w[0],S=w[1];return(F+S)*3/4-S}function h(b,w,F){return(w+F)*3/4-F}function f(b){var w,F=l(b),S=F[0],M=F[1],A=new n(h(b,S,M)),I=0,R=M>0?S-4:S,T;for(T=0;T<R;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[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=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 S,M=[],A=w;A<F;A+=3)S=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),M.push(p(S));return M.join("")}function g(b){for(var w,F=b.length,S=F%3,M=[],A=16383,I=0,R=F-S;I<R;I+=A)M.push(y(b,I,I+A>R?R:I+A));return S===1?(w=b[F-1],M.push(e[w>>2]+e[w<<4&63]+"==")):S===2&&(w=(b[F-2]<<8)+b[F-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return xu}function PH(){return nA?yc:(nA=!0,yc.read=function(e,t,n,o,s){var u,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,u=b&(1<<-p)-1,b>>=-p,p+=c;p>0;u=u*256+e[t+y],y+=g,p-=8);for(l=u&(1<<-p)-1,u>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(u===0)u=1-f;else{if(u===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(b?-1:1)*l*Math.pow(2,u-o)},yc.write=function(e,t,n,o,s,u){var l,c,h,f=u*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:u-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 kH(){if(iA)return Es;iA=!0;let e=DH(),t=PH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Es.Buffer=l,Es.SlowBuffer=M,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 u(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?u(x):B!==void 0?typeof D=="string"?u(x).fill(B,D):u(x).fill(B):u(x)}l.alloc=function(x,B,D){return f(x,B,D)};function p(x){return h(x),u(x<0?0:S(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=u(D),me=oe.write(x,B);return me!==D&&(oe=oe.slice(0,me)),oe}function g(x){let B=x.length<0?0:S(x.length)|0,D=u(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=S(x.length)|0,D=u(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)?u(0):g(x);if(x.type==="Buffer"&&Array.isArray(x.data))return g(x.data)}function S(x){if(x>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return x|0}function M(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 I(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 ue(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 R(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)R(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)R(this,B,B+3),R(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)R(this,B,B+7),R(this,B+1,B+6),R(this,B+2,B+5),R(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):I.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 k(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 L(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 k(this,x,B,D);case"utf8":case"utf-8":return L(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 ne(oe)}let re=4096;function ne(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 ue(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 ae={};function ie(x,B,D){ae[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}`}}}ie("ERR_BUFFER_OUT_OF_BOUNDS",function(x){return x?`${x} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ie("ERR_INVALID_ARG_TYPE",function(x,B){return`The "${x}" argument must be of type number. Received type ${typeof B}`},TypeError),ie("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 ae.ERR_OUT_OF_RANGE("value",we,x)}O(oe,me,xe)}function Y(x,B){if(typeof x!="number")throw new ae.ERR_INVALID_ARG_TYPE(B,"number",x)}function se(x,B,D){throw Math.floor(x)!==x?(Y(x,D),new ae.ERR_OUT_OF_RANGE("offset","an integer",x)):B<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.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,LH=Ln(()=>{Pe(),Le(),ke(),xu={},rA=!1,yc={},nA=!1,Es={},iA=!1}),Kr={};ll(Kr,{Buffer:()=>Wd,INSPECT_MAX_BYTES:()=>B3,default:()=>Fo,kMaxLength:()=>R3});var Fo,Wd,B3,R3,Yr=Ln(()=>{Pe(),Le(),ke(),LH(),Fo=kH(),Fo.Buffer,Fo.SlowBuffer,Fo.INSPECT_MAX_BYTES,Fo.kMaxLength,Wd=Fo.Buffer,B3=Fo.INSPECT_MAX_BYTES,R3=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 u=0;u<o.length;u++)s+=` ${o[u].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,u){return o.slice(s,u)},Error,FunctionPrototypeCall(o,s,...u){return o.call(s,...u)},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,u){return Object.defineProperty(o,s,u)},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,u){return o.then(s,u)},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,u){return o.slice(s,u)},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,u){return o.set(s,u)},Boolean,Uint8Array}}),M3=qe((e,t)=>{Pe(),Le(),ke(),t.exports={format(n,...o){return n.replace(/%([sdifj])/g,function(...[s,u]){let l=o.shift();return u==="f"?l.toFixed(6):u==="j"?JSON.stringify(l):u==="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}=M3(),{AggregateError:s}=lr(),u=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,I){if(!A)throw new p.ERR_INTERNAL_ASSERTION(I)}function g(A){let I="",R=A.length,T=A[0]==="-"?1:0;for(;R>=T+4;R-=3)I=`_${A.slice(R-3,R)}${I}`;return`${A.slice(0,R)}${I}`}function b(A,I,R){if(typeof I=="function")return y(I.length<=R.length,`Code: ${A}; The provided arguments length (${R.length}) does not match the required ones (${I.length}).`),I(...R);let T=(I.match(/%[dfijoOs]/g)||[]).length;return y(T===R.length,`Code: ${A}; The provided arguments length (${R.length}) does not match the required ones (${T}).`),R.length===0?I:n(I,...R)}function w(A,I,R){R||(R=Error);class T extends R{constructor(...k){super(b(A,I,k))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(T.prototype,{name:{value:R.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 I=f+A.name;return Object.defineProperty(A,"name",{value:I}),A}function S(A,I){if(A&&I&&A!==I){if(Array.isArray(I.errors))return I.errors.push(A),I;let R=new u([I,A],I.message);return R.code=I.code,R}return A||I}var M=class extends Error{constructor(A="The operation was aborted",I=void 0){if(I!==void 0&&typeof I!="object")throw new p.ERR_INVALID_ARG_TYPE("options","Object",I);super(A,I),this.code="ABORT_ERR",this.name="AbortError"}};w("ERR_ASSERTION","%s",Error),w("ERR_INVALID_ARG_TYPE",(A,I,R)=>{y(typeof A=="string","'name' must be a string"),Array.isArray(I)||(I=[I]);let T="The ";A.endsWith(" argument")?T+=`${A} `:T+=`"${A}" ${A.includes(".")?"property":"argument"} `,T+="must be ";let z=[],k=[],L=[];for(let U of I)y(typeof U=="string","All expected entries have to be of type string"),c.includes(U)?z.push(U.toLowerCase()):h.test(U)?k.push(U):(y(U!=="object",'The value "object" should be written as "Object"'),L.push(U));if(k.length>0){let U=z.indexOf("object");U!==-1&&(z.splice(z,U,1),k.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}`}}(k.length>0||L.length>0)&&(T+=" or ")}if(k.length>0){switch(k.length){case 1:T+=`an instance of ${k[0]}`;break;case 2:T+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let U=k.pop();T+=`an instance of ${k.join(", ")}, or ${U}`}}L.length>0&&(T+=" or ")}switch(L.length){case 0:break;case 1:L[0].toLowerCase()!==L[0]&&(T+="an "),T+=`${L[0]}`;break;case 2:T+=`one of ${L[0]} or ${L[1]}`;break;default:{let U=L.pop();T+=`one of ${L.join(", ")}, or ${U}`}}if(R==null)T+=`. Received ${R}`;else if(typeof R=="function"&&R.name)T+=`. Received function ${R.name}`;else if(typeof R=="object"){var j;if((j=R.constructor)!==null&&j!==void 0&&j.name)T+=`. Received an instance of ${R.constructor.name}`;else{let U=o(R,{depth:-1});T+=`. Received ${U}`}}else{let U=o(R,{colors:!1});U.length>25&&(U=`${U.slice(0,25)}...`),T+=`. Received type ${typeof R} (${U})`}return T},TypeError),w("ERR_INVALID_ARG_VALUE",(A,I,R="is invalid")=>{let T=o(I);return T.length>128&&(T=T.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${R}. Received ${T}`},TypeError),w("ERR_INVALID_RETURN_VALUE",(A,I,R)=>{var T;let z=R!=null&&(T=R.constructor)!==null&&T!==void 0&&T.name?`instance of ${R.constructor.name}`:`type ${typeof R}`;return`Expected ${A} to be returned from the "${I}" function but got ${z}.`},TypeError),w("ERR_MISSING_ARGS",(...A)=>{y(A.length>0,"At least one arg needs to be specified");let I,R=A.length;switch(A=(Array.isArray(A)?A:[A]).map(T=>`"${T}"`).join(" or "),R){case 1:I+=`The ${A[0]} argument`;break;case 2:I+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let T=A.pop();I+=`The ${A.join(", ")}, and ${T} arguments`}break}return`${I} must be specified`},TypeError),w("ERR_OUT_OF_RANGE",(A,I,R)=>{y(I,'Missing "range" argument');let T;if(Number.isInteger(R)&&Math.abs(R)>2**32)T=g(String(R));else if(typeof R=="bigint"){T=String(R);let z=BigInt(2)**BigInt(32);(R>z||R<-z)&&(T=g(T)),T+="n"}else T=o(R);return`The value of "${A}" is out of range. It must be ${I}. 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:M,aggregateTwoErrors:F(S),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:()=>j3,default:()=>Eu,defaultMaxListeners:()=>U3,init:()=>N3,listenerCount:()=>D3,on:()=>P3,once:()=>k3});function $H(){if(oA)return gc;oA=!0;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(R,T,z){return Function.prototype.apply.call(R,T,z)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(R){return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R))}:n=function(R){return Object.getOwnPropertyNames(R)};function o(R){console&&console.warn&&console.warn(R)}var s=Number.isNaN||function(R){return R!==R};function u(){u.init.call(this)}gc=u,gc.once=M,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var l=10;function c(R){if(typeof R!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof R)}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(R){if(typeof R!="number"||R<0||s(R))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+R+".");l=R}}),u.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},u.prototype.setMaxListeners=function(R){if(typeof R!="number"||R<0||s(R))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+R+".");return this._maxListeners=R,this};function h(R){return R._maxListeners===void 0?u.defaultMaxListeners:R._maxListeners}u.prototype.getMaxListeners=function(){return h(this)},u.prototype.emit=function(R){for(var T=[],z=1;z<arguments.length;z++)T.push(arguments[z]);var k=R==="error",L=this._events;if(L!==void 0)k=k&&L.error===void 0;else if(!k)return!1;if(k){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 $=L[R];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(R,T,z,k){var L,j,U;if(c(z),j=R._events,j===void 0?(j=R._events=Object.create(null),R._eventsCount=0):(j.newListener!==void 0&&(R.emit("newListener",T,z.listener?z.listener:z),j=R._events),U=j[T]),U===void 0)U=j[T]=z,++R._eventsCount;else if(typeof U=="function"?U=j[T]=k?[z,U]:[U,z]:k?U.unshift(z):U.push(z),L=h(R),L>0&&U.length>L&&!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=R,$.type=T,$.count=U.length,o($)}return R}u.prototype.addListener=function(R,T){return f(this,R,T,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(R,T){return f(this,R,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(R,T,z){var k={fired:!1,wrapFn:void 0,target:R,type:T,listener:z},L=p.bind(k);return L.listener=z,k.wrapFn=L,L}u.prototype.once=function(R,T){return c(T),this.on(R,y(this,R,T)),this},u.prototype.prependOnceListener=function(R,T){return c(T),this.prependListener(R,y(this,R,T)),this},u.prototype.removeListener=function(R,T){var z,k,L,j,U;if(c(T),k=this._events,k===void 0)return this;if(z=k[R],z===void 0)return this;if(z===T||z.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete k[R],k.removeListener&&this.emit("removeListener",R,z.listener||T));else if(typeof z!="function"){for(L=-1,j=z.length-1;j>=0;j--)if(z[j]===T||z[j].listener===T){U=z[j].listener,L=j;break}if(L<0)return this;L===0?z.shift():F(z,L),z.length===1&&(k[R]=z[0]),k.removeListener!==void 0&&this.emit("removeListener",R,U||T)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(R){var T,z,k;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[R]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[R]),this;if(arguments.length===0){var L=Object.keys(z),j;for(k=0;k<L.length;++k)j=L[k],j!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=z[R],typeof T=="function")this.removeListener(R,T);else if(T!==void 0)for(k=T.length-1;k>=0;k--)this.removeListener(R,T[k]);return this};function g(R,T,z){var k=R._events;if(k===void 0)return[];var L=k[T];return L===void 0?[]:typeof L=="function"?z?[L.listener||L]:[L]:z?S(L):w(L,L.length)}u.prototype.listeners=function(R){return g(this,R,!0)},u.prototype.rawListeners=function(R){return g(this,R,!1)},u.listenerCount=function(R,T){return typeof R.listenerCount=="function"?R.listenerCount(T):b.call(R,T)},u.prototype.listenerCount=b;function b(R){var T=this._events;if(T!==void 0){var z=T[R];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function w(R,T){for(var z=new Array(T),k=0;k<T;++k)z[k]=R[k];return z}function F(R,T){for(;T+1<R.length;T++)R[T]=R[T+1];R.pop()}function S(R){for(var T=new Array(R.length),z=0;z<T.length;++z)T[z]=R[z].listener||R[z];return T}function M(R,T){return new Promise(function(z,k){function L(U){R.removeListener(T,j),k(U)}function j(){typeof R.removeListener=="function"&&R.removeListener("error",L),z([].slice.call(arguments))}I(R,T,j,{once:!0}),T!=="error"&&A(R,L,{once:!0})})}function A(R,T,z){typeof R.on=="function"&&I(R,"error",T,z)}function I(R,T,z,k){if(typeof R.on=="function")k.once?R.once(T,z):R.on(T,z);else if(typeof R.addEventListener=="function")R.addEventListener(T,function L(j){k.once&&R.removeEventListener(T,L),z(j)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof R)}return gc}var gc,oA,Eu,j3,U3,N3,D3,P3,k3,Pa=Ln(()=>{Pe(),Le(),ke(),gc={},oA=!1,Eu=$H(),Eu.once,Eu.once=function(e,t){return new Promise((n,o)=>{function s(...l){u!==void 0&&e.removeListener("error",u),n(l)}let u;t!=="error"&&(u=l=>{e.removeListener(name,s),o(l)},e.once("error",u)),e.once(t,s)})},Eu.on=function(e,t){let n=[],o=[],s=null,u=!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 u?createIterResult(void 0,!0):new Promise((p,y)=>o.push({resolve:p,reject:y}))},async return(){e.removeListener(t,c),e.removeListener("error",h),u=!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){u=!0;let p=o.shift();p?p.reject(f):s=f,l.return()}},{EventEmitter:j3,defaultMaxListeners:U3,init:N3,listenerCount:D3,on:P3,once:k3}=Eu}),jn=qe((e,t)=>{Pe(),Le(),ke();var n=(Yr(),Vt(Kr)),{format:o,inspect:s}=M3(),{codes:{ERR_INVALID_ARG_TYPE:u}}=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(S){return S instanceof g}:function(S){return!1},w=(S,M)=>{if(S!==void 0&&(S===null||typeof S!="object"||!("aborted"in S)))throw new u(M,"AbortSignal",S)},F=(S,M)=>{if(typeof S!="function")throw new u(M,"Function",S)};t.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(S){let M=!1;return function(...A){M||(M=!0,S.apply(this,A))}},createDeferredPromise:function(){let S,M;return{promise:new Promise((A,I)=>{S=A,M=I}),resolve:S,reject:M}},promisify(S){return new Promise((M,A)=>{S((I,...R)=>I?A(I):M(...R))})},debuglog(){return function(){}},format:o,inspect:s,types:{isAsyncFunction(S){return S instanceof y},isArrayBufferView(S){return ArrayBuffer.isView(S)}},isBlob:b,deprecate(S,M){return S},addAbortListener:(Pa(),Vt($s)).addAbortListener||function(S,M){if(S===void 0)throw new u("signal","AbortSignal",S);w(S,"signal"),F(M,"listener");let A;return S.aborted?queueMicrotask(()=>M()):(S.addEventListener("abort",M,{__proto__:null,once:!0,[l]:!0}),A=()=>{S.removeEventListener("abort",M)}),{__proto__:null,[h](){var I;(I=A)===null||I===void 0||I()}}},AbortSignalAny:f.any||function(S){if(S.length===1)return S[0];let M=new p,A=()=>M.abort();return S.forEach(I=>{w(I,"signals"),I.addEventListener("abort",A,{once:!0})}),M.signal.addEventListener("abort",()=>{S.forEach(I=>I.removeEventListener("abort",A))},{once:!0}),M.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:u,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:S,codes:{ERR_SOCKET_BAD_PORT:M,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:I,ERR_OUT_OF_RANGE:R,ERR_UNKNOWN_SIGNAL:T}}=vn(),{normalizeEncoding:z}=jn(),{isAsyncFunction:k,isArrayBufferView:L}=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 I(Se,ce,Z);ce=p(ce,8)}return ue(ce,Se),ce}var ne=S((ce,Se,Be=f,de=h)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new R(Se,"an integer",ce);if(ce<Be||ce>de)throw new R(Se,`>= ${Be} && <= ${de}`,ce)}),X=S((ce,Se,Be=-2147483648,de=2147483647)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new R(Se,"an integer",ce);if(ce<Be||ce>de)throw new R(Se,`>= ${Be} && <= ${de}`,ce)}),ue=S((ce,Se,Be=!1)=>{if(typeof ce!="number")throw new A(Se,"number",ce);if(!l(ce))throw new R(Se,"an integer",ce);let de=Be?1:0,ve=4294967295;if(ce<de||ce>ve)throw new R(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 R(Se,`${Be!=null?`>= ${Be}`:""}${Be!=null&&de!=null?" && ":""}${de!=null?`<= ${de}`:""}`,ce)}var ee=S((ce,Se,Be)=>{if(!o(Be,ce)){let de="must be one of: "+s(u(Be,ve=>typeof ve=="string"?`'${ve}'`:b(ve)),", ");throw new I(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=S((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=S((ce,Se)=>{if(ce!=null&&typeof ce!="object"&&typeof ce!="function")throw new A(Se,"a dictionary",ce)}),q=S((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 I(Se,ce,de)}});function fe(ce,Se){q(ce,Se);for(let Be=0;Be<ce.length;Be++)ye(ce[Be],`${Se}[${Be}]`)}function ae(ce,Se){q(ce,Se);for(let Be=0;Be<ce.length;Be++)G(ce[Be],`${Se}[${Be}]`)}function ie(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=S((ce,Se="buffer")=>{if(!L(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 I("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 M(Se,ce,Be);return ce|0}var se=S((ce,Se)=>{if(ce!==void 0&&(ce===null||typeof ce!="object"||!("aborted"in ce)))throw new A(Se,"AbortSignal",ce)}),pe=S((ce,Se)=>{if(typeof ce!="function")throw new A(Se,"Function",ce)}),te=S((ce,Se)=>{if(typeof ce!="function"||k(ce))throw new A(Se,"Function",ce)}),_=S((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 I(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 I("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:ae,validateAbortSignalArray:ie,validateBoolean:G,validateBuffer:O,validateDictionary:W,validateEncoding:H,validateFunction:pe,validateInt32:X,validateInteger:ne,validateNumber:le,validateObject:K,validateOneOf:ee,validatePlainFunction:te,validatePort:Y,validateSignalName:J,validateString:ye,validateUint32:ue,validateUndefined:_,validateUnion:v,validateAbortSignal:se,validateLinkHeaderValue:he}}),ka=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports={},o,s;function u(){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=u}catch{o=u}try{typeof clearTimeout=="function"?s=clearTimeout:s=l}catch{s=l}})();function c(M){if(o===setTimeout)return setTimeout(M,0);if((o===u||!o)&&setTimeout)return o=setTimeout,setTimeout(M,0);try{return o(M,0)}catch{try{return o.call(null,M,0)}catch{return o.call(this,M,0)}}}function h(M){if(s===clearTimeout)return clearTimeout(M);if((s===l||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(M);try{return s(M)}catch{try{return s.call(null,M)}catch{return s.call(this,M)}}}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 M=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(M)}}n.nextTick=function(M){var A=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)A[I-1]=arguments[I];f.push(new F(M,A)),f.length===1&&!p&&c(w)};function F(M,A){this.fun=M,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 S(){}n.on=S,n.addListener=S,n.once=S,n.off=S,n.removeListener=S,n.removeAllListeners=S,n.emit=S,n.prependListener=S,n.prependOnceListener=S,n.listeners=function(M){return[]},n.binding=function(M){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(M){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(),u=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 S(Q){return!!(Q&&!F(Q)&&typeof Q.pipeThrough=="function"&&typeof Q.getReader=="function"&&typeof Q.cancel=="function")}function M(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 I(Q){return S(Q)||M(Q)||A(Q)}function R(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[u]||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 k(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 L(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 ne(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 ue(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&&ue(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,ae,ie,J,O,H,Y;return!!(Q&&((K=(W=(q=(fe=(ae=(ie=Q[l])!==null&&ie!==void 0?ie:Q.readableErrored)!==null&&ae!==void 0?ae: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:u,isDisturbed:ee,kIsDisturbed:f,isErrored:G,kIsErrored:l,isReadable:U,kIsReadable:c,kIsClosedPromise:p,kControllerErrorFunction:y,kIsWritable:h,isClosed:ne,isDuplexNodeStream:w,isFinished:N,isIterable:R,isReadableNodeStream:g,isReadableStream:S,isReadableEnded:L,isReadableFinished:j,isReadableErrored:re,isNodeStream:F,isWebStream:I,isWritable:$,isWritableNodeStream:b,isWritableStream:M,isWritableEnded:z,isWritableFinished:k,isWritableErrored:Z,isServerRequest:ye,isServerResponse:ue,willEmitClose:le,isTransformStream:A}}),zs=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{AbortError:o,codes:s}=vn(),{ERR_INVALID_ARG_TYPE:u,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:S,isReadable:M,isReadableNodeStream:A,isReadableStream:I,isReadableFinished:R,isReadableErrored:T,isWritable:z,isWritableNodeStream:k,isWritableStream:L,isWritableFinished:j,isWritableErrored:U,isNodeStream:$,willEmitClose:N,kIsClosedPromise:Z}=Ko(),re;function ne(ee){return ee.setHeader&&typeof ee.abort=="function"}var X=()=>{};function ue(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),I(ee)||L(ee))return ye(ee,G,Q);if(!$(ee))throw new u("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:k(ee),ae=ee._writableState,ie=ee._readableState,J=()=>{ee.writable||Y()},O=N(ee)&&A(ee)===q&&k(ee)===fe,H=j(ee,!1),Y=()=>{H=!0,ee.destroyed&&(O=!1),!(O&&(!ee.readable||q))&&(!q||se)&&Q.call(ee)},se=R(ee,!1),pe=()=>{se=!0,ee.destroyed&&(O=!1),!(O&&(!ee.writable||fe))&&(!fe||H)&&Q.call(ee)},te=ce=>{Q.call(ee,ce)},_=S(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)&&!R(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)};ne(ee)?(ee.on("complete",Y),O||ee.on("abort",v),ee.req?P():ee.on("request",P)):fe&&!ae&&(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):ae!=null&&ae.errorEmitted||ie!=null&&ie.errorEmitted?O||n.nextTick(C):(!q&&(!O||M(ee))&&(H||z(ee)===!1)||!fe&&(!O||z(ee))&&(se||M(ee)===!1)||ie&&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),ae=Q;Q=h((...ie)=>{fe[F](),ae.apply(ee,ie)})}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=ue(ee,G,ae=>{K&&fe(),ae?q(ae):W()})})}t.exports=ue,t.exports.finished=le}),cl=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:u}=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,ne=this._writableState,X=ne||re;return ne!=null&&ne.destroyed||re!=null&&re.destroyed?(typeof Z=="function"&&Z(),this):(b(N,ne,re),ne&&(ne.destroyed=!0),re&&(re.destroyed=!0),X.constructed?F(this,N,Z):this.once(y,function(ue){F(this,o(ue,N),Z)}),this)}function F(N,Z,re){let ne=!1;function X(ue){if(ne)return;ne=!0;let ye=N._readableState,le=N._writableState;b(ue,le,ye),le&&(le.closed=!0),ye&&(ye.closed=!0),typeof re=="function"&&re(ue),ue?n.nextTick(S,N,ue):n.nextTick(M,N)}try{N._destroy(Z||null,X)}catch(ue){X(ue)}}function S(N,Z){A(N,Z),M(N)}function M(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,ne=N._writableState;ne!=null&&ne.errorEmitted||re!=null&&re.errorEmitted||(ne&&(ne.errorEmitted=!0),re&&(re.errorEmitted=!0),N.emit("error",Z))}function I(){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 R(N,Z,re){let ne=N._readableState,X=N._writableState;if(X!=null&&X.destroyed||ne!=null&&ne.destroyed)return this;ne!=null&&ne.autoDestroy||X!=null&&X.autoDestroy?N.destroy(Z):Z&&(Z.stack,X&&!X.errored&&(X.errored=Z),ne&&!ne.errored&&(ne.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,ne=N._writableState;re&&(re.constructed=!1),ne&&(ne.constructed=!1),N.once(g,Z),!(N.listenerCount(g)>1)&&n.nextTick(z,N)}function z(N){let Z=!1;function re(ne){if(Z){R(N,ne??new s);return}Z=!0;let X=N._readableState,ue=N._writableState,ye=ue||X;X&&(X.constructed=!0),ue&&(ue.constructed=!0),ye.destroyed?N.emit(y,ne):ne?R(N,ne,!0):n.nextTick(k,N)}try{N._construct(ne=>{n.nextTick(re,ne)})}catch(ne){n.nextTick(re,ne)}}function k(N){N.emit(g)}function L(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 u),p(N)?(N.socket=null,N.destroy(Z)):L(N)?N.abort():L(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:I,errorOrDestroy:R}}),Fv=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ObjectSetPrototypeOf:o}=lr(),{EventEmitter:s}=(Pa(),Vt($s));function u(c){s.call(this,c)}o(u.prototype,s.prototype),o(u,s),u.prototype.pipe=function(c,h){let f=this;function p(M){c.writable&&c.write(M)===!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(M){S(),s.listenerCount(this,"error")===0&&this.emit("error",M)}l(f,"error",F),l(c,"error",F);function S(){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",S),f.removeListener("close",S),c.removeListener("close",S)}return f.on("end",S),f.on("close",S),c.on("close",S),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:u,prependListener:l}}),qp=qe((e,t)=>{Pe(),Le(),ke();var{SymbolDispose:n}=lr(),{AbortError:o,codes:s}=vn(),{isNodeStream:u,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"),!u(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=u(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}}),zH=qe((e,t)=>{Pe(),Le(),ke();var{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:s,Uint8Array:u}=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 u(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:u}=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 S=h(b,F,w);if(S!=null){if(!o(S)||S<0){let M=F?`options.${w}`:"options.highWaterMark";throw new u(M,S)}return n(S)}return f(g.objectMode)}t.exports={getHighWaterMark:y,getDefaultHighWaterMark:f,setDefaultHighWaterMark:p}}),qH=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=u);function u(l,c,h){return o(l,c,h)}u.prototype=Object.create(o.prototype),s(o,u),u.from=function(l,c,h){if(typeof l=="number")throw new TypeError("Argument must not be a number");return o(l,c,h)},u.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},u.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return o(l)},u.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(l)}}),HH=qe(e=>{Pe(),Le(),ke();var t=qH().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 I;;)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(I)return;A=(""+A).toLowerCase(),I=!0}}function s(A){var I=o(A);if(typeof I!="string"&&(t.isEncoding===n||!n(A)))throw new Error("Unknown encoding: "+A);return I||A}e.StringDecoder=u;function u(A){this.encoding=s(A);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=b,I=4;break;case"utf8":this.fillLast=f,I=4;break;case"base64":this.text=w,this.end=F,I=3;break;default:this.write=S,this.end=M;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(I)}u.prototype.write=function(A){if(A.length===0)return"";var I,R;if(this.lastNeed){if(I=this.fillLast(A),I===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R<A.length?I?I+this.text(A,R):this.text(A,R):I||""},u.prototype.end=y,u.prototype.text=p,u.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,I,R){var T=I.length-1;if(T<R)return 0;var z=l(I[T]);return z>=0?(z>0&&(A.lastNeed=z-1),z):--T<R||z===-2?0:(z=l(I[T]),z>=0?(z>0&&(A.lastNeed=z-2),z):--T<R||z===-2?0:(z=l(I[T]),z>=0?(z>0&&(z===2?z=0:A.lastNeed=z-3),z):0))}function h(A,I,R){if((I[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&I.length>1){if((I[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&I.length>2&&(I[2]&192)!==128)return A.lastNeed=2,"�"}}function f(A){var I=this.lastTotal-this.lastNeed,R=h(this,A);if(R!==void 0)return R;if(this.lastNeed<=A.length)return A.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,I,0,A.length),this.lastNeed-=A.length}function p(A,I){var R=c(this,A,I);if(!this.lastNeed)return A.toString("utf8",I);this.lastTotal=R;var T=A.length-(R-this.lastNeed);return A.copy(this.lastChar,0,T),A.toString("utf8",I,T)}function y(A){var I=A&&A.length?this.write(A):"";return this.lastNeed?I+"�":I}function g(A,I){if((A.length-I)%2===0){var R=A.toString("utf16le",I);if(R){var T=R.charCodeAt(R.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],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",I,A.length-1)}function b(A){var I=A&&A.length?this.write(A):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,R)}return I}function w(A,I){var R=(A.length-I)%3;return R===0?A.toString("base64",I):(this.lastNeed=3-R,this.lastTotal=3,R===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",I,A.length-R))}function F(A){var I=A&&A.length?this.write(A):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function S(A){return A.toString(this.encoding)}function M(A){return A&&A.length?this.write(A):""}}),L3=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{PromisePrototypeThen:o,SymbolAsyncIterator:s,SymbolIterator:u}=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[u])w=!1,b=y[u]();else throw new c("iterable",["Iterable"],y);let F=new p({objectMode:!0,highWaterMark:1,...g}),S=!1;F._read=function(){S||(S=!0,A())},F._destroy=function(I,R){o(M(I),()=>n.nextTick(R,I),T=>n.nextTick(R,T||I))};async function M(I){let R=I!=null,T=typeof b.throw=="function";if(R&&T){let{value:z,done:k}=await b.throw(I);if(await z,k)return}if(typeof b.return=="function"){let{value:z}=await b.return();await z}}async function A(){for(;;){try{let{value:I,done:R}=w?await b.next():b.next();if(R)F.push(null);else{let T=I&&typeof I.then=="function"?await I:I;if(T===null)throw S=!1,new h;if(F.push(T))continue;S=!1}}catch(I){F.destroy(I)}break}}return F}t.exports=f}),Qp=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeIndexOf:o,NumberIsInteger:s,NumberIsNaN:u,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:S,prependListener:M}=Fv(),{Buffer:A}=(Yr(),Vt(Kr)),{addAbortSignal:I}=qp(),R=zs(),T=jn().debuglog("stream",be=>{T=be}),z=zH(),k=cl(),{getHighWaterMark:L,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:ne},AbortError:X}=vn(),{validateObject:ue}=Bf(),ye=w("kPaused"),{StringDecoder:le}=HH(),ee=L3();f(de.prototype,S.prototype),f(de,S);var G=()=>{},{errorOrDestroy:Q}=k,K=1,W=2,q=4,fe=8,ae=16,ie=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(ae),sync:Se(ie),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|ae|ie,be&&be.objectMode&&(this.state|=K),Ye&&be&&be.readableObjectMode&&(this.state|=K),this.highWaterMark=be?L(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&&I(be.signal,this)),S.call(this,be),k.construct(this,()=>{this._readableState.needReadable&&we(this,this._readableState)})}de.prototype.destroy=k.destroy,de.prototype._undestroy=k.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)=>R(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="":S._isUint8Array(_e)?(_e=S._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 ne);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:u(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|ie,_e.length===0&&(_e.state|=J);try{this._read(_e.highWaterMark)}catch(qt){Q(this,qt)}_e.state&=~ie,_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)}}M(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=S.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=S.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=S.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&&ue(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=R(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)?k.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){k.destroyer(be,st),qt(st)}}).wrap(be)}}),Ov=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeSlice:o,Error:s,FunctionPrototypeSymbolHasInstance:u,ObjectDefineProperty:l,ObjectDefineProperties:c,ObjectSetPrototypeOf:h,StringPrototypeToLowerCase:f,Symbol:p,SymbolHasInstance:y}=lr();t.exports=ue,ue.WritableState=ne;var{EventEmitter:g}=(Pa(),Vt($s)),b=Fv().Stream,{Buffer:w}=(Yr(),Vt(Kr)),F=cl(),{addAbortSignal:S}=qp(),{getHighWaterMark:M,getDefaultHighWaterMark:A}=Hp(),{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:R,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:z,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:L,ERR_STREAM_NULL_VALUES:j,ERR_STREAM_WRITE_AFTER_END:U,ERR_UNKNOWN_ENCODING:$}=vn().codes,{errorOrDestroy:N}=F;h(ue.prototype,b.prototype),h(ue,b);function Z(){}var re=p("kOnFinished");function ne(te,_,v){typeof v!="boolean"&&(v=_ instanceof zo()),this.objectMode=!!(te&&te.objectMode),v&&(this.objectMode=this.objectMode||!!(te&&te.writableObjectMode)),this.highWaterMark=te?M(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}ne.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},l(ne.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ue(te){let _=this instanceof zo();if(!_&&!u(ue,this))return new ue(te);this._writableState=new ne(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&&S(te.signal,this)),b.call(this,te),F.construct(this,()=>{let v=this._writableState;v.writing||fe(this,v),O(this,v)})}l(ue,y,{__proto__:null,value:function(te){return u(this,te)?!0:this!==ue?!1:te&&te._writableState instanceof ne}}),ue.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 I("chunk",["string","Buffer","Uint8Array"],_);let he;return P.ending?he=new U:P.destroyed&&(he=new k("write")),he?(n.nextTick(C,he),N(te,he,!0),he):(P.pendingcb++,le(te,P,_,v,C))}ue.prototype.write=function(te,_,v){return ye(this,te,_,v)===!0},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){let te=this._writableState;te.corked&&(te.corked--,te.writing||fe(this,te))},ue.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 k("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 k("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 k("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}ue.prototype._write=function(te,_,v){if(this._writev)this._writev([{chunk:te,encoding:_}],v);else throw new R("_write()")},ue.prototype._writev=null,ue.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 L("end"):C.destroyed&&(P=new k("end"))),typeof v=="function"&&(P||C.finished?n.nextTick(v,P):C[re].push(v)),this};function ae(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 ie(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 ae(_)&&(_.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,ie(te,_)):(_.prefinished=!0,te.emit("prefinish")))}function O(te,_,v){ae(_)&&(J(te,_),_.pendingcb===0&&(v?(_.pendingcb++,n.nextTick((C,P)=>{ae(P)?H(C,P):P.pendingcb--},te,_)):ae(_)&&(_.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(ue.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;ue.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},ue.prototype._undestroy=F.undestroy,ue.prototype._destroy=function(te,_){_(te)},ue.prototype[g.captureRejectionSymbol]=function(te){this.destroy(te)};var se;function pe(){return se===void 0&&(se={}),se}ue.fromWeb=function(te,_){return pe().newStreamWritableFromWritableStream(te,_)},ue.toWeb=function(te){return pe().newWritableStreamFromStreamWritable(te)}}),QH=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),o=(Yr(),Vt(Kr)),{isReadable:s,isWritable:u,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:S}}=vn(),{destroyer:M}=cl(),A=zo(),I=Qp(),R=Ov(),{createDeferredPromise:T}=jn(),z=L3(),k=globalThis.Blob||o.Blob,L=typeof k<"u"?function(re){return re instanceof k}: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(ne,X){if(p(ne))return ne;if(h(ne))return Z({readable:ne});if(f(ne))return Z({writable:ne});if(c(ne))return Z({writable:!1,readable:!1});if(y(ne))return Z({readable:I.fromWeb(ne)});if(g(ne))return Z({writable:R.fromWeb(ne)});if(typeof ne=="function"){let{value:ye,write:le,final:ee,destroy:G}=N(ne);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 S("nully","body",q)},q=>{M(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 S("Iterable, AsyncIterable or AsyncFunction",X,ye)}if(L(ne))return re(ne.arrayBuffer());if(l(ne))return z($,ne,{objectMode:!0,writable:!1});if(y(ne==null?void 0:ne.readable)&&g(ne==null?void 0:ne.writable))return $.fromWeb(ne);if(typeof(ne==null?void 0:ne.writable)=="object"||typeof(ne==null?void 0:ne.readable)=="object"){let ye=ne!=null&&ne.readable?h(ne==null?void 0:ne.readable)?ne==null?void 0:ne.readable:re(ne.readable):void 0,le=ne!=null&&ne.writable?f(ne==null?void 0:ne.writable)?ne==null?void 0:ne.writable:re(ne.writable):void 0;return Z({readable:ye,writable:le})}let ue=ne==null?void 0:ne.then;if(typeof ue=="function"){let ye;return U(ue,ne,le=>{le!=null&&ye.push(le),ye.push(null)},le=>{M(ye,le)}),ye=new $({objectMode:!0,writable:!1,read(){}})}throw new F(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],ne)};function N(re){let{promise:ne,resolve:X}=T(),ue=new j,ye=ue.signal;return{value:re((async function*(){for(;;){let le=ne;ne=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:ne,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){ue.abort(),ee(le)}}}function Z(re){let ne=re.readable&&typeof re.readable.read!="function"?I.wrap(re.readable):re.readable,X=re.writable,ue=!!s(ne),ye=!!u(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:!!(ne!=null&&ne.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:ue,writable:ye}),ye&&(b(X,q=>{ye=!1,q&&M(ne,q),W(q)}),K._write=function(q,fe,ae){X.write(q,fe)?ae():le=ae},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()}})),ue&&(b(ne,q=>{ue=!1,q&&M(ne,q),W(q)}),ne.on("readable",function(){if(G){let q=G;G=null,q()}}),ne.on("end",function(){K.push(null)}),K._read=function(){for(;;){let q=ne.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,M(X,q),M(ne,q))},K}}),zo=qe((e,t)=>{Pe(),Le(),ke();var{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:s,ObjectSetPrototypeOf:u}=lr();t.exports=h;var l=Qp(),c=Ov();u(h.prototype,l.prototype),u(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=QH()),y(g,"body")}}),$3=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n,Symbol:o}=lr();t.exports=h;var{ERR_METHOD_NOT_IMPLEMENTED:s}=vn().codes,u=zo(),{getHighWaterMark:l}=Hp();n(h.prototype,u.prototype),n(h,u);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}),u.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,S=w.length;this._transform(y,g,(M,A)=>{if(M){b(M);return}A!=null&&this.push(A),F.ended||S===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()}}}),z3=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n}=lr();t.exports=s;var o=$3();n(s.prototype,o.prototype),n(s,o);function s(u){if(!(this instanceof s))return new s(u);o.call(this,u)}s.prototype._transform=function(u,l,c){c(null,u)}}),Tv=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayIsArray:o,Promise:s,SymbolAsyncIterator:u,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:S},AbortError:M}=vn(),{validateFunction:A,validateAbortSignal:I}=Bf(),{isIterable:R,isReadable:T,isReadableNodeStream:z,isNodeStream:k,isTransformStream:L,isWebStream:j,isReadableStream:U,isReadableFinished:$}=Ko(),N=globalThis.AbortController||sf().AbortController,Z,re,ne;function X(q,fe,ae){let ie=!1;q.on("close",()=>{ie=!0});let J=c(q,{readable:fe,writable:ae},O=>{ie=!O});return{destroy:O=>{ie||(ie=!0,f.destroyer(q,O||new F("pipe")))},cleanup:J}}function ue(q){return A(q[q.length-1],"streams[stream.length - 1]"),q.pop()}function ye(q){if(R(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[u].call(q)}async function ee(q,fe,ae,{end:ie}){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();ie&&(fe.end(),await Y()),ae()}catch(pe){ae(J!==pe?y(J,pe):pe)}finally{se(),fe.off("drain",H)}}async function G(q,fe,ae,{end:ie}){L(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,ie&&await J.close(),ae()}catch(O){try{await J.abort(O),ae(O)}catch(H){ae(H)}}}function Q(...q){return K(q,h(ue(q)))}function K(q,fe,ae){if(q.length===1&&o(q[0])&&(q=q[0]),q.length<2)throw new w("streams");let ie=new N,J=ie.signal,O=ae==null?void 0:ae.signal,H=[];I(O,"options.signal");function Y(){P(new M)}ne=ne||jn().addAbortListener;let se;O&&(se=ne(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](),ie.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||(ae==null?void 0:ae.end)!==!1,D=Be===q.length-1;if(k(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}),!R(he))throw new b("Iterable, AsyncIterable or Stream","source",he)}else R(de)||z(de)||L(de)?he=de:he=p.from(de);else if(typeof de=="function"){if(L(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(!R(he,!0))throw new b("AsyncIterable",`transform[${Be-1}]`,he)}else{var Se;Z||(Z=z3());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(R(he,!0))v++,ee(he,oe,C,{end:B});else if(U(he)||L(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(k(de)){if(z(he)){v+=2;let oe=W(he,de,C,{end:B});T(de)&&D&&H.push(oe)}else if(L(he)||U(he)){let oe=he.readable||he;v++,ee(oe,de,C,{end:B})}else if(R(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)||R(he))v++,G(he,de,C,{end:B});else if(L(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,ae,{end:ie}){let J=!1;if(fe.on("close",()=>{J||ae(new S)}),q.pipe(fe,{end:!1}),ie){let O=function(){J=!0,fe.end()};$(q)?n.nextTick(O):q.once("end",O)}else ae();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",ae).once("error",ae):ae(O)}),c(fe,{readable:!1,writable:!0},ae)}t.exports={pipelineImpl:K,pipeline:Q}}),q3=qe((e,t)=>{Pe(),Le(),ke();var{pipeline:n}=Tv(),o=zo(),{destroyer:s}=cl(),{isNodeStream:u,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(...S){if(S.length===0)throw new w("streams");if(S.length===1)return o.from(S[0]);let M=[...S];if(typeof S[0]=="function"&&(S[0]=o.from(S[0])),typeof S[S.length-1]=="function"){let N=S.length-1;S[N]=o.from(S[N])}for(let N=0;N<S.length;++N)if(!(!u(S[N])&&!h(S[N]))){if(N<S.length-1&&!(l(S[N])||y(S[N])||f(S[N])))throw new b(`streams[${N}]`,M[N],"must be readable");if(N>0&&!(c(S[N])||p(S[N])||f(S[N])))throw new b(`streams[${N}]`,M[N],"must be writable")}let A,I,R,T,z;function k(N){let Z=T;T=null,Z?Z(N):N?z.destroy(N):!$&&!U&&z.destroy()}let L=S[0],j=n(S,k),U=!!(c(L)||p(L)||f(L)),$=!!(l(j)||y(j)||f(j));if(z=new o({writableObjectMode:!!(L!=null&&L.writableObjectMode),readableObjectMode:!!(j!=null&&j.readableObjectMode),writable:U,readable:$}),U){if(u(L))z._write=function(Z,re,ne){L.write(Z,re)?ne():A=ne},z._final=function(Z){L.end(),I=Z},L.on("drain",function(){if(A){let Z=A;A=null,Z()}});else if(h(L)){let Z=(f(L)?L.writable:L).getWriter();z._write=async function(re,ne,X){try{await Z.ready,Z.write(re).catch(()=>{}),X()}catch(ue){X(ue)}},z._final=async function(re){try{await Z.ready,Z.close().catch(()=>{}),I=re}catch(ne){re(ne)}}}let N=f(j)?j.readable:j;F(N,()=>{if(I){let Z=I;I=null,Z()}})}if($){if(u(j))j.on("readable",function(){if(R){let N=R;R=null,N()}}),j.on("end",function(){z.push(null)}),z._read=function(){for(;;){let N=j.read();if(N===null){R=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),R=null,A=null,I=null,T===null?Z(N):(T=Z,u(j)&&s(j,N))},z}}),GH=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:u,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=q3(),{addAbortSignalNoValidate:F}=qp(),{isWritable:S,isNodeStream:M}=Ko(),{deprecate:A}=jn(),{ArrayPrototypePush:I,Boolean:R,MathFloor:T,Number:z,NumberIsNaN:k,Promise:L,PromiseReject:j,PromiseResolve:U,PromisePrototypeThen:$,Symbol:N}=lr(),Z=N("kEmpty"),re=N("kEof");function ne(O,H){if(H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal"),M(O)&&!S(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(R)),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 L(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 L(x=>{C=x})}}finally{he=!0,P&&(P(),P=null)}}).call(this)}function ue(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 u{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});I(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 ae(O){if(O=z(O),k(O))return 0;if(O<0)throw new l("number",">= 0",O);return O}function ie(O,H=void 0){return H!=null&&p(H,"options"),(H==null?void 0:H.signal)!=null&&h(H.signal,"options.signal"),O=ae(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=ae(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(ue,"readable.asIndexedPairs will be removed in a future version."),drop:ie,filter:Q,flatMap:fe,map:X,take:J,compose:ne},t.exports.promiseReturningOperators={every:le,forEach:G,reduce:W,toArray:q,some:ye,find:ee}}),H3=qe((e,t)=>{Pe(),Le(),ke();var{ArrayPrototypePop:n,Promise:o}=lr(),{isIterable:s,isNodeStream:u,isWebStream:l}=Ko(),{pipelineImpl:c}=Tv(),{finished:h}=zs();Q3();function f(...p){return new o((y,g)=>{let b,w,F=p[p.length-1];if(F&&typeof F=="object"&&!u(F)&&!s(F)&&!l(F)){let S=n(p);b=S.signal,w=S.end}c(p,(S,M)=>{S?g(S):y(M)},{signal:b,end:w})})}t.exports={finished:h,pipeline:f}}),Q3=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),{ObjectDefineProperty:o,ObjectKeys:s,ReflectApply:u}=lr(),{promisify:{custom:l}}=jn(),{streamReturningOperators:c,promiseReturningOperators:h}=GH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=vn(),p=q3(),{setDefaultHighWaterMark:y,getDefaultHighWaterMark:g}=Hp(),{pipeline:b}=Tv(),{destroyer:w}=cl(),F=zs(),S=H3(),M=Ko(),A=t.exports=Fv().Stream;A.isDestroyed=M.isDestroyed,A.isDisturbed=M.isDisturbed,A.isErrored=M.isErrored,A.isReadable=M.isReadable,A.isWritable=M.isWritable,A.Readable=Qp();for(let R of s(c)){let T=function(...k){if(new.target)throw f();return A.Readable.from(u(z,this,k))},z=c[R];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.length}),o(A.Readable.prototype,R,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}for(let R of s(h)){let T=function(...k){if(new.target)throw f();return u(z,this,k)},z=h[R];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.length}),o(A.Readable.prototype,R,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Ov(),A.Duplex=zo(),A.Transform=$3(),A.PassThrough=z3(),A.pipeline=b;var{addAbortSignal:I}=qp();A.addAbortSignal=I,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 S}}),o(b,l,{__proto__:null,enumerable:!0,get(){return S.pipeline}}),o(F,l,{__proto__:null,enumerable:!0,get(){return S.finished}}),A.Stream=A,A._isUint8Array=function(R){return R instanceof Uint8Array},A._uint8ArrayToBuffer=function(R){return n.from(R.buffer,R.byteOffset,R.byteLength)}}),La=qe((e,t)=>{Pe(),Le(),ke();var n=Q3(),o=H3(),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}),KH=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}}}),YH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),o=Symbol.for("BufferList");function s(u){if(!(this instanceof s))return new s(u);s._init.call(this,u)}s._init=function(u){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,u&&this.append(u)},s.prototype._new=function(u){return new s(u)},s.prototype._offset=function(u){if(u===0)return[0,0];let l=0;for(let c=0;c<this._bufs.length;c++){let h=l+this._bufs[c].length;if(u<h||c===this._bufs.length-1)return[c,u-l];l=h}},s.prototype._reverseOffset=function(u){let l=u[0],c=u[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(u){if(u>this.length||u<0)return;let l=this._offset(u);return this._bufs[l[0]][l[1]]},s.prototype.slice=function(u,l){return typeof u=="number"&&u<0&&(u+=this.length),typeof l=="number"&&l<0&&(l+=this.length),this.copy(null,0,u,l)},s.prototype.copy=function(u,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 u||n.alloc(0);let f=!!u,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(u,b),b+=this._bufs[F].length;return u}if(g<=this._bufs[p[0]].length-w)return f?this._bufs[p[0]].copy(u,l,w,w+g):this._bufs[p[0]].slice(w,w+g);f||(u=n.allocUnsafe(y));for(let F=p[0];F<this._bufs.length;F++){let S=this._bufs[F].length-w;if(g>S)this._bufs[F].copy(u,b,w),b+=S;else{this._bufs[F].copy(u,b,w,w+g),b+=S;break}g-=S,w&&(w=0)}return u.length>b?u.slice(0,b):u},s.prototype.shallowSlice=function(u,l){if(u=u||0,l=typeof l!="number"?this.length:l,u<0&&(u+=this.length),l<0&&(l+=this.length),u===l)return this._new();let c=this._offset(u),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(u,l,c){return this.slice(l,c).toString(u)},s.prototype.consume=function(u){if(u=Math.trunc(u),Number.isNaN(u)||u<=0)return this;for(;this._bufs.length;)if(u>=this._bufs[0].length)u-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(u),this.length-=u;break}return this},s.prototype.duplicate=function(){let u=this._new();for(let l=0;l<this._bufs.length;l++)u.append(this._bufs[l]);return u},s.prototype.append=function(u){return this._attach(u,s.prototype._appendBuffer)},s.prototype.prepend=function(u){return this._attach(u,s.prototype._prependBuffer,!0)},s.prototype._attach=function(u,l,c){if(u==null)return this;if(u.buffer)l.call(this,n.from(u.buffer,u.byteOffset,u.byteLength));else if(Array.isArray(u)){let[h,f]=c?[u.length-1,-1]:[0,1];for(let p=h;p>=0&&p<u.length;p+=f)this._attach(u[p],l,c)}else if(this._isBufferList(u)){let[h,f]=c?[u._bufs.length-1,-1]:[0,1];for(let p=h;p>=0&&p<u._bufs.length;p+=f)this._attach(u._bufs[p],l,c)}else typeof u=="number"&&(u=u.toString()),l.call(this,n.from(u));return this},s.prototype._appendBuffer=function(u){this._bufs.push(u),this.length+=u.length},s.prototype._prependBuffer=function(u){this._bufs.unshift(u),this.length+=u.length},s.prototype.indexOf=function(u,l,c){if(c===void 0&&typeof l=="string"&&(c=l,l=void 0),typeof u=="function"||Array.isArray(u))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof u=="number"?u=n.from([u]):typeof u=="string"?u=n.from(u,c):this._isBufferList(u)?u=u.slice():Array.isArray(u.buffer)?u=n.from(u.buffer,u.byteOffset,u.byteLength):n.isBuffer(u)||(u=n.from(u)),l=Number(l||0),isNaN(l)&&(l=0),l<0&&(l=this.length+l),l<0&&(l=0),u.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>=u.length){let g=y.indexOf(u,p);if(g!==-1)return this._reverseOffset([f,g]);p=y.length-u.length+1}else{let g=this._reverseOffset([f,p]);if(this._match(g,u))return g;p++}p=0}return-1},s.prototype._match=function(u,l){if(this.length-u<l.length)return!1;for(let c=0;c<l.length;c++)if(this.get(u+c)!==l[c])return!1;return!0},(function(){let u={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 u)(function(c){u[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+u[c])[c](0)}})(l)})(),s.prototype._isBufferList=function(u){return u instanceof s||s.isBufferList(u)},s.isBufferList=function(u){return u!=null&&u[o]},t.exports=s}),VH=qe((e,t)=>{Pe(),Le(),ke();var n=La().Duplex,o=KH(),s=YH();function u(l){if(!(this instanceof u))return new u(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(u,n),Object.assign(u.prototype,s.prototype),u.prototype._new=function(l){return new u(l)},u.prototype._write=function(l,c,h){this._appendBuffer(l),typeof h=="function"&&h()},u.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)},u.prototype.end=function(l){n.prototype.end.call(this,l),this._callback&&(this._callback(null,this.slice()),this._callback=null)},u.prototype._destroy=function(l,c){this._bufs.length=0,this.length=0,c(l)},u.prototype._isBufferList=function(l){return l instanceof u||l instanceof s||u.isBufferList(l)},u.isBufferList=s.isBufferList,t.exports=u,t.exports.BufferListStream=u,t.exports.BufferList=s}),WH=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}),G3=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 u in n.requiredHeaderFlags){let l=n.requiredHeaderFlags[u];n.requiredHeaderFlagsErrors[u]="Invalid header flag bits, must be 0x"+l.toString(16)+" for "+n.types[u]+" packet"}n.codes={};for(let u in n.types){let l=n.types[u];n.codes[l]=u}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 u in n.properties){let l=n.properties[u];n.propertiesCodes[l]=u}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(u){return[0,1,2].map(l=>[0,1].map(c=>[0,1].map(h=>{let f=o.alloc(1);return f.writeUInt8(n.codes[u]<<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(u=>o.from([u])),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"}}),XH=qe((e,t)=>{Pe(),Le(),ke();var n=1e3,o=n*60,s=o*60,u=s*24,l=u*7,c=u*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*u;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>=u?Math.round(g/u)+"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>=u?y(g,b,u,"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 S=b>=w*1.5;return Math.round(g/w)+" "+F+(S?"s":"")}}),JH=qe((e,t)=>{Pe(),Le(),ke();function n(o){u.debug=u,u.default=u,u.coerce=y,u.disable=f,u.enable=c,u.enabled=p,u.humanize=XH(),u.destroy=g,Object.keys(o).forEach(b=>{u[b]=o[b]}),u.names=[],u.skips=[],u.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 u.colors[Math.abs(w)%u.colors.length]}u.selectColor=s;function u(b){let w,F=null,S,M;function A(...I){if(!A.enabled)return;let R=A,T=Number(new Date),z=T-(w||T);R.diff=z,R.prev=w,R.curr=T,w=T,I[0]=u.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let k=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(L,j)=>{if(L==="%%")return"%";k++;let U=u.formatters[j];if(typeof U=="function"){let $=I[k];L=U.call(R,$),I.splice(k,1),k--}return L}),u.formatArgs.call(R,I),(R.log||u.log).apply(R,I)}return A.namespace=b,A.useColors=u.useColors(),A.color=u.selectColor(b),A.extend=l,A.destroy=u.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>F!==null?F:(S!==u.namespaces&&(S=u.namespaces,M=u.enabled(b)),M),set:I=>{F=I}}),typeof u.init=="function"&&u.init(A),A}function l(b,w){let F=u(this.namespace+(typeof w>"u"?":":w)+b);return F.log=this.log,F}function c(b){u.save(b),u.namespaces=b,u.names=[],u.skips=[];let w=(typeof b=="string"?b:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of w)F[0]==="-"?u.skips.push(F.slice(1)):u.names.push(F)}function h(b,w){let F=0,S=0,M=-1,A=0;for(;F<b.length;)if(S<w.length&&(w[S]===b[F]||w[S]==="*"))w[S]==="*"?(M=S,A=F,S++):(F++,S++);else if(M!==-1)S=M+1,A++,F=A;else return!1;for(;S<w.length&&w[S]==="*";)S++;return S===w.length}function f(){let b=[...u.names,...u.skips.map(w=>"-"+w)].join(",");return u.enable(""),b}function p(b){for(let w of u.skips)if(h(b,w))return!1;for(let w of u.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 u.enable(u.load()),u}t.exports=n}),qo=qe((e,t)=>{Pe(),Le(),ke(),e.formatArgs=o,e.save=s,e.load=u,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 u(){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=JH()(e);var{formatters:c}=t.exports;c.j=function(h){try{return JSON.stringify(h)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}),ZH=qe((e,t)=>{Pe(),Le(),ke();var n=VH(),{EventEmitter:o}=(Pa(),Vt($s)),s=WH(),u=G3(),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>>u.CMD_SHIFT;this.packet.cmd=u.types[p];let y=f&15,g=u.requiredHeaderFlags[p];return g!=null&&y!==g?this._emitError(new Error(u.requiredHeaderFlagsErrors[p])):(this.packet.retain=(f&u.RETAIN_MASK)!==0,this.packet.qos=f>>u.QOS_SHIFT&u.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(f&u.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)&u.USERNAME_MASK,b.password=this._list.readUInt8(this._pos)&u.PASSWORD_MASK,b.will=this._list.readUInt8(this._pos)&u.WILL_FLAG_MASK;let S=!!(this._list.readUInt8(this._pos)&u.WILL_RETAIN_MASK),M=(this._list.readUInt8(this._pos)&u.WILL_QOS_MASK)>>u.WILL_QOS_SHIFT;if(b.will)w.will={},w.will.retain=S,w.will.qos=M;else{if(S)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(M)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)&u.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 I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(w.properties=I)}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 I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(w.will.properties=I)}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&u.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,S;if(f.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let M=this._parseProperties();Object.getOwnPropertyNames(M).length&&(f.properties=M)}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&u.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(F=(y>>u.SUBSCRIBE_OPTIONS_NL_SHIFT&u.SUBSCRIBE_OPTIONS_NL_MASK)!==0,w=(y>>u.SUBSCRIBE_OPTIONS_RAP_SHIFT&u.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,b=y>>u.SUBSCRIBE_OPTIONS_RH_SHIFT&u.SUBSCRIBE_OPTIONS_RH_MASK,b>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));S={topic:p,qos:g},this.settings.protocolVersion===5?(S.nl=F,S.rap=w,S.rh=b):this.settings.bridgeMode&&(S.rh=0,S.rap=!0,S.nl=!0),l("_parseSubscribe: push subscription `%s` to subscription",S),f.subscriptions.push(S)}}}_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(!u.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(!u.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(!u.MQTT5_PUBACK_PUBREC_CODES[f.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!u.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(),u.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(),!u.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,S=this._pos?this._pos:0;for(;y<p&&S+y<this._list.length;){if(F=this._list.readUInt8(S+y++),b+=g*(F&u.VARBYTEINT_MASK),g*=128,(F&u.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")),S&&(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=u.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(u.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(u.propertiesTypes[b])):(y[b]=[y[b]],y[b].push(this._parseByType(u.propertiesTypes[b]))):y[b]=this._parseByType(u.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}),eQ=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),o=65536,s={},u=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),u?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}}),tQ=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,u,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,u)});case 4:return Dt.nextTick(function(){o.call(null,s,u,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)})}}}),K3=qe((e,t)=>{Pe(),Le(),ke();var n=G3(),{Buffer:o}=(Yr(),Vt(Kr)),s=o.allocUnsafe(0),u=o.from([0]),l=eQ(),c=tQ().nextTick,h=qo()("mqtt-packet:writeToStream"),f=l.cache,p=l.generateNumber,y=l.generateCache,g=l.genBufVariableByteInt,b=l.generate4ByteBuffer,w=ue,F=!0;function S(ae,ie,J){switch(h("generate called"),ie.cork&&(ie.cork(),c(M,ie)),F&&(F=!1,y()),h("generate: packet.cmd: %s",ae.cmd),ae.cmd){case"connect":return A(ae,ie);case"connack":return I(ae,ie,J);case"publish":return R(ae,ie,J);case"puback":case"pubrec":case"pubrel":case"pubcomp":return T(ae,ie,J);case"subscribe":return z(ae,ie,J);case"suback":return k(ae,ie,J);case"unsubscribe":return L(ae,ie,J);case"unsuback":return j(ae,ie,J);case"pingreq":case"pingresp":return U(ae,ie);case"disconnect":return $(ae,ie,J);case"auth":return N(ae,ie,J);default:return ie.destroy(new Error("Unknown command")),!1}}Object.defineProperty(S,"cacheNumbers",{get(){return w===ue},set(ae){ae?((!f||Object.keys(f).length===0)&&(F=!0),w=ue):(F=!1,w=ye)}});function M(ae){ae.uncork()}function A(ae,ie,J){let O=ae||{},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 ie.destroy(new Error("Invalid protocolId")),!1;if(he+=H.length+2,Y!==3&&Y!==4&&Y!==5)return ie.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 ie.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(pe*1===0)return ie.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 ie.destroy(new Error("Invalid keepalive")),!1;he+=2,he+=1;let ce,Se;if(Y===5){if(ce=G(ie,P),!ce)return!1;he+=ce.length}if(se){if(typeof se!="object")return ie.destroy(new Error("Invalid will")),!1;if(!se.topic||typeof se.topic!="string")return ie.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 ie.destroy(new Error("Invalid will payload")),!1;if(Se={},Y===5){if(Se=G(ie,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 ie.destroy(new Error("Invalid username")),!1;if(C!=null){if(!Be)return ie.destroy(new Error("Username is required to use password")),!1;if(fe(C))he+=q(C)+2;else return ie.destroy(new Error("Invalid password")),!1}ie.write(n.CONNECT_HEADER),re(ie,he),ee(ie,H),O.bridgeMode&&(Y+=128),ie.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,ie.write(o.from([de])),w(ie,te),Y===5&&ce.write(),ee(ie,_),se&&(Y===5&&Se.write(),ne(ie,se.topic),ee(ie,se.payload)),v!=null&&ee(ie,v),C!=null&&ee(ie,C),!0}function I(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},Y=O===5?H.reasonCode:H.returnCode,se=H.properties,pe=2;if(typeof Y!="number")return ie.destroy(new Error("Invalid return code")),!1;let te=null;if(O===5){if(te=G(ie,se),!te)return!1;pe+=te.length}return ie.write(n.CONNACK_HEADER),re(ie,pe),ie.write(H.sessionPresent?n.SESSIONPRESENT_HEADER:u),ie.write(o.from([Y])),te==null||te.write(),!0}function R(ae,ie,J){h("publish: packet: %o",ae);let O=J?J.protocolVersion:4,H=ae||{},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 ie.destroy(new Error("Invalid topic")),!1;if(o.isBuffer(te)?C+=te.length:C+=o.byteLength(te),Y&&typeof _!="number")return ie.destroy(new Error("Invalid messageId")),!1;Y&&(C+=2);let P=null;if(O===5){if(P=G(ie,v),!P)return!1;C+=P.length}return ie.write(n.PUBLISH_HEADER[Y][H.dup?1:0][se?1:0]),re(ie,C),w(ie,q(pe)),ie.write(pe),Y>0&&w(ie,_),P==null||P.write(),h("publish: payload: %o",te),ie.write(te)}function T(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},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 ie.destroy(new Error("Invalid messageId")),!1;let P=null;if(O===5&&typeof v=="object"){if(P=Q(ie,v,J,C),!P)return!1;C+=P.length}return ie.write(n.ACKS[Y][te][pe][0]),C===3&&(C+=_!==0?1:-1),re(ie,C),w(ie,se),O===5&&C!==2&&ie.write(o.from([_])),P!==null?P.write():C===4&&ie.write(o.from([0])),!0}function z(ae,ie,J){h("subscribe: packet: ");let O=J?J.protocolVersion:4,H=ae||{},Y=H.dup?n.DUP_MASK:0,se=H.messageId,pe=H.subscriptions,te=H.properties,_=0;if(typeof se!="number")return ie.destroy(new Error("Invalid messageId")),!1;_+=2;let v=null;if(O===5){if(v=G(ie,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 ie.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof ce!="number")return ie.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(O===5){if(typeof(pe[P].nl||!1)!="boolean")return ie.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(pe[P].rap||!1)!="boolean")return ie.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let Se=pe[P].rh||0;if(typeof Se!="number"||Se>2)return ie.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}_+=o.byteLength(he)+2+1}else return ie.destroy(new Error("Invalid subscriptions")),!1;h("subscribe: writing to stream: %o",n.SUBSCRIBE_HEADER),ie.write(n.SUBSCRIBE_HEADER[1][Y?1:0][0]),re(ie,_),w(ie,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;ne(ie,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=ie.write(o.from([ve]))}return C}function k(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},Y=H.messageId,se=H.granted,pe=H.properties,te=0;if(typeof Y!="number")return ie.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 ie.destroy(new Error("Invalid qos vector")),!1;te+=1}else return ie.destroy(new Error("Invalid qos vector")),!1;let _=null;if(O===5){if(_=Q(ie,pe,J,te),!_)return!1;te+=_.length}return ie.write(n.SUBACK_HEADER),re(ie,te),w(ie,Y),_!==null&&_.write(),ie.write(o.from(se))}function L(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},Y=H.messageId,se=H.dup?n.DUP_MASK:0,pe=H.unsubscriptions,te=H.properties,_=0;if(typeof Y!="number")return ie.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 ie.destroy(new Error("Invalid unsubscriptions")),!1;_+=o.byteLength(pe[P])+2}else return ie.destroy(new Error("Invalid unsubscriptions")),!1;let v=null;if(O===5){if(v=G(ie,te),!v)return!1;_+=v.length}ie.write(n.UNSUBSCRIBE_HEADER[1][se?1:0][0]),re(ie,_),w(ie,Y),v!==null&&v.write();let C=!0;for(let P=0;P<pe.length;P++)C=ne(ie,pe[P]);return C}function j(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},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 ie.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 ie.destroy(new Error("Invalid qos vector")),!1;C+=1}else return ie.destroy(new Error("Invalid qos vector")),!1;let P=null;if(O===5){if(P=Q(ie,te,J,C),!P)return!1;C+=P.length}return ie.write(n.ACKS[_][v][se][0]),re(ie,C),w(ie,Y),P!==null&&P.write(),O===5&&ie.write(o.from(pe)),!0}function U(ae,ie,J){return ie.write(n.EMPTY[ae.cmd])}function $(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},Y=H.reasonCode,se=H.properties,pe=O===5?1:0,te=null;if(O===5){if(te=Q(ie,se,J,pe),!te)return!1;pe+=te.length}return ie.write(o.from([n.codes.disconnect<<4])),re(ie,pe),O===5&&ie.write(o.from([Y])),te!==null&&te.write(),!0}function N(ae,ie,J){let O=J?J.protocolVersion:4,H=ae||{},Y=H.reasonCode,se=H.properties,pe=O===5?1:0;O!==5&&ie.destroy(new Error("Invalid mqtt version for auth packet"));let te=Q(ie,se,J,pe);return te?(pe+=te.length,ie.write(o.from([n.codes.auth<<4])),re(ie,pe),ie.write(o.from([Y])),te!==null&&te.write(),!0):!1}var Z={};function re(ae,ie){if(ie>n.VARBYTEINT_MAX)return ae.destroy(new Error(`Invalid variable byte integer: ${ie}`)),!1;let J=Z[ie];return J||(J=g(ie),ie<16384&&(Z[ie]=J)),h("writeVarByteInt: writing to stream: %o",J),ae.write(J)}function ne(ae,ie){let J=o.byteLength(ie);return w(ae,J),h("writeString: %s",ie),ae.write(ie,"utf8")}function X(ae,ie,J){ne(ae,ie),ne(ae,J)}function ue(ae,ie){return h("writeNumberCached: number: %d",ie),h("writeNumberCached: %o",f[ie]),ae.write(f[ie])}function ye(ae,ie){let J=p(ie);return h("writeNumberGenerated: %o",J),ae.write(J)}function le(ae,ie){let J=b(ie);return h("write4ByteNumber: %o",J),ae.write(J)}function ee(ae,ie){typeof ie=="string"?ne(ae,ie):ie?(w(ae,ie.length),ae.write(ie)):w(ae,0)}function G(ae,ie){if(typeof ie!="object"||ie.length!=null)return{length:1,write(){W(ae,{},0)}};let J=0;function O(H,Y){let se=n.propertiesTypes[H],pe=0;switch(se){case"byte":{if(typeof Y!="boolean")return ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=2;break}case"int8":{if(typeof Y!="number"||Y<0||Y>255)return ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=2;break}case"binary":{if(Y&&Y===null)return ae.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 ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=3;break}case"int32":{if(typeof Y!="number"||Y<0||Y>4294967295)return ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=5;break}case"var":{if(typeof Y!="number"||Y<0||Y>268435455)return ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=1+o.byteLength(g(Y));break}case"string":{if(typeof Y!="string")return ae.destroy(new Error(`Invalid ${H}: ${Y}`)),!1;pe+=3+o.byteLength(Y.toString());break}case"pair":{if(typeof Y!="object")return ae.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 ae.destroy(new Error(`Invalid property ${H}: ${Y}`)),!1}return pe}if(ie)for(let H in ie){let Y=0,se=0,pe=ie[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(ae,ie,J)}}}function Q(ae,ie,J,O){let H=["reasonString","userProperties"],Y=J&&J.properties&&J.properties.maximumPacketSize?J.properties.maximumPacketSize:0,se=G(ae,ie);if(Y)for(;O+se.length>Y;){let pe=H.shift();if(pe&&ie[pe])delete ie[pe],se=G(ae,ie);else return!1}return se}function K(ae,ie,J){switch(n.propertiesTypes[ie]){case"byte":{ae.write(o.from([n.properties[ie]])),ae.write(o.from([+J]));break}case"int8":{ae.write(o.from([n.properties[ie]])),ae.write(o.from([J]));break}case"binary":{ae.write(o.from([n.properties[ie]])),ee(ae,J);break}case"int16":{ae.write(o.from([n.properties[ie]])),w(ae,J);break}case"int32":{ae.write(o.from([n.properties[ie]])),le(ae,J);break}case"var":{ae.write(o.from([n.properties[ie]])),re(ae,J);break}case"string":{ae.write(o.from([n.properties[ie]])),ne(ae,J);break}case"pair":{Object.getOwnPropertyNames(J).forEach(O=>{let H=J[O];Array.isArray(H)?H.forEach(Y=>{ae.write(o.from([n.properties[ie]])),X(ae,O.toString(),Y.toString())}):(ae.write(o.from([n.properties[ie]])),X(ae,O.toString(),H.toString()))});break}default:return ae.destroy(new Error(`Invalid property ${ie} value: ${J}`)),!1}}function W(ae,ie,J){re(ae,J);for(let O in ie)if(Object.prototype.hasOwnProperty.call(ie,O)&&ie[O]!=null){let H=ie[O];if(Array.isArray(H))for(let Y=0;Y<H.length;Y++)K(ae,O,H[Y]);else K(ae,O,H)}}function q(ae){return ae?ae instanceof o?ae.length:o.byteLength(ae):0}function fe(ae){return typeof ae=="string"||ae instanceof o}t.exports=S}),rQ=qe((e,t)=>{Pe(),Le(),ke();var n=K3(),{EventEmitter:o}=(Pa(),Vt($s)),{Buffer:s}=(Yr(),Vt(Kr));function u(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=u}),nQ=qe(e=>{Pe(),Le(),ke(),e.parser=ZH().parser,e.generate=rQ(),e.writeToStream=K3()}),iQ=qe((e,t)=>{Pe(),Le(),ke(),t.exports=o;function n(u){return u instanceof Wd?Wd.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}function o(u){if(u=u||{},u.circles)return s(u);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))),u.constructorHandlers)for(let y of u.constructorHandlers)l.set(y[0],y[1]);let c=null;return u.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 S=b[F],M=y[S];typeof M!="object"||M===null?w[S]=M:M.constructor!==Object&&(c=l.get(M.constructor))?w[S]=c(M,g):ArrayBuffer.isView(M)?w[S]=n(M):w[S]=g(M)}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(u){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))),u.constructorHandlers)for(let b of u.constructorHandlers)h.set(b[0],b[1]);let f=null;return u.proto?g:y;function p(b,w){let F=Object.keys(b),S=new Array(F.length);for(let M=0;M<F.length;M++){let A=F[M],I=b[A];if(typeof I!="object"||I===null)S[A]=I;else if(I.constructor!==Object&&(f=h.get(I.constructor)))S[A]=f(I,w);else if(ArrayBuffer.isView(I))S[A]=n(I);else{let R=l.indexOf(I);R!==-1?S[A]=c[R]:S[A]=w(I)}}return S}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 S=b[F];if(typeof S!="object"||S===null)w[F]=S;else if(S.constructor!==Object&&(f=h.get(S.constructor)))w[F]=f(S,y);else if(ArrayBuffer.isView(S))w[F]=n(S);else{let M=l.indexOf(S);M!==-1?w[F]=c[M]:w[F]=y(S)}}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 S=b[F];if(typeof S!="object"||S===null)w[F]=S;else if(S.constructor!==Object&&(f=h.get(S.constructor)))w[F]=f(S,g);else if(ArrayBuffer.isView(S))w[F]=n(S);else{let M=l.indexOf(S);M!==-1?w[F]=c[M]:w[F]=g(S)}}return l.pop(),c.pop(),w}}}),oQ=qe((e,t)=>{Pe(),Le(),ke(),t.exports=iQ()()}),sQ=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 u=0;u<s.length;u++)if(s[u]!=="+"){if(s[u]==="#")return u===s.length-1;if(s[u].indexOf("+")!==-1||s[u].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}}),Y3=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=La(),n={objectMode:!0},o={clean:!0},s=class{constructor(u){rt(this,"options");rt(this,"_inflights");this.options=u||{},this.options={...o,...u},this._inflights=new Map}put(u,l){return this._inflights.set(u.messageId,u),l&&l(),this}createStream(){let u=new t.Readable(n),l=[],c=!1,h=0;return this._inflights.forEach((f,p)=>{l.push(f)}),u._read=()=>{!c&&h<l.length?u.push(l[h++]):u.push(null)},u.destroy=f=>{if(!c)return c=!0,setTimeout(()=>{u.emit("close")},0),u},u}del(u,l){let c=this._inflights.get(u.messageId);return c?(this._inflights.delete(u.messageId),l(null,c)):l&&l(new Error("missing packet")),this}get(u,l){let c=this._inflights.get(u.messageId);return c?l(null,c):l&&l(new Error("missing packet")),this}close(u){this.options.clean&&(this._inflights=null),u&&u()}};e.default=s}),aQ=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,u)=>{o.log("handlePublish: packet %o",s),u=typeof u<"u"?u: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},u):o.incomingStore.put(s,()=>{o._sendPacket({cmd:"pubrec",messageId:f},u)})});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 u&&u(b);o._sendPacket({cmd:"puback",messageId:f,reasonCode:g},u)})});break}case 0:o.emit("message",l,c,s),o.handleMessage(s,u);break;default:o.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=n}),uQ=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 V3 extends Error{constructor(l,c){super(l);rt(this,"code");this.code=c,Object.setPrototypeOf(this,V3.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=t;var n=class W3 extends Error{constructor(l,c){super(l);rt(this,"packet");this.packet=c,Object.setPrototypeOf(this,W3.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};e.ErrorWithSubackPacket=n;function o(s,u,l=!1){let c=[u];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=uQ().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:u}=s,l=s.cmd,c=null,h=o.outgoing[u]?o.outgoing[u].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(u,()=>{h(f,s)})):o._removeOutgoingAndStoreMessage(u,h);break}case"pubrec":{c={cmd:"pubrel",qos:2,messageId:u};let p=s.reasonCode;p&&p>0&&p!==16?(f=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[p]}`,p),o._removeOutgoingAndStoreMessage(u,()=>{h(f,s)})):o._sendPacket(c);break}case"suback":{delete o.outgoing[u],o.messageIdProvider.deallocate(u);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[u];b&&b.forEach(w=>{delete o._resubscribeTopics[w]})}}delete o.messageIdToTopic[u],o._invokeStoreProcessingQueue(),h(f,s);break}case"unsuback":{delete o.outgoing[u],o.messageIdProvider.deallocate(u),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}),lQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=fl(),n=Gp(),o=(s,u)=>{let{options:l}=s,c=l.protocolVersion,h=c===5?u.reasonCode:u.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(u,(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}),cQ=qe(e=>{var b,w,F,S,M,A,I,R,T,z,k,L,j,U,$,N,Z,re,ne,X,ue,ye,le,ee,G,Q,K,W,q,aA,ae,ie,J,O,X3,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}`)},u=globalThis.AbortController,l=globalThis.AbortSignal;if(typeof u>"u"){l=class{constructor(){rt(this,"onabort");rt(this,"_onabort",[]);rt(this,"reason");rt(this,"aborted",!1)}addEventListener(D,oe){this._onabort.push(oe)}},u=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,I);Et(this,R);Et(this,T);Et(this,z);Et(this,k);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,L);Et(this,j);Et(this,U);Et(this,$);Et(this,N);Et(this,Z);Et(this,re);Et(this,ne);Et(this,X);Et(this,ue);Et(this,ye);Et(this,le);Et(this,ee);Et(this,G);Et(this,Q);Et(this,K);Et(this,W);Et(this,ae,()=>{});Et(this,ie,()=>{});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,S,"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,I,gt),this.maxEntrySize=bt||Ae(this,I),this.sizeCalculation=lt,this.sizeCalculation){if(!Ae(this,I)&&!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,k,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,ne,0),ht(this,X,0),ht(this,ue,y.create(D)),ht(this,L,0),ht(this,j,0),typeof He=="function"&&ht(this,R,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,R)),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,I)!==0&&!h(Ae(this,I)))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,X3).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,I)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Ae(this,A)&&!Ae(this,I)){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,ne)},get tail(){return Ae(B,X)},free:Ae(B,ue),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,I)}get calculatedSize(){return Ae(this,j)}get size(){return Ae(this,L)}get fetchMethod(){return Ae(this,z)}get memoMethod(){return Ae(this,k)}get dispose(){return Ae(this,R)}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])}[(M=Symbol.iterator,S=Symbol.toStringTag,M)](){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,L)===0?void 0:Ae(this,U).get(B);if(We===void 0)We=Ae(this,L)===0?Ae(this,X):Ae(this,ue).length!==0?Ae(this,ue).pop():Ae(this,L)===Ae(this,A)?Xe(this,q,gd).call(this,!1):Ae(this,L),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,L)._++,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,R))==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,R))==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,ie).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,L);){let D=Ae(this,N)[Ae(this,ne)];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,ie).call(this,me,xe));else return oe&&Ae(this,ae).call(this,xe),me&&(me.has="hit",Ae(this,ie).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,ae).call(this,At),tt&&Ae(this,ie).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,k);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,ie).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,ae).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,I=new WeakMap,R=new WeakMap,T=new WeakMap,z=new WeakMap,k=new WeakMap,L=new WeakMap,j=new WeakMap,U=new WeakMap,$=new WeakMap,N=new WeakMap,Z=new WeakMap,re=new WeakMap,ne=new WeakMap,X=new WeakMap,ue=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,ae,xe=>{D[xe]=B[xe]!==0?t.now():0}),ht(this,ie,(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})},ae=new WeakMap,ie=new WeakMap,J=new WeakMap,O=new WeakMap,X3=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,I)){let xe=Ae(this,I)-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,L))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,ne)));)D=Ae(this,re)[D]},Is=function*({allowStale:B=this.allowStale}={}){if(Ae(this,L))for(let D=Ae(this,ne);!(!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,ne),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,R))==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,ue).push(D)),Ae(this,L)===1?(ht(this,ne,ht(this,X,0)),Ae(this,ue).length=0):ht(this,ne,Ae(this,Z)[D]),Ae(this,U).delete(oe),Qh(this,L)._--,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 u,{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&<!==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 u},lA=function(B,D){Ae(this,re)[D]=B,Ae(this,Z)[B]=D},mc=function(B){B!==Ae(this,X)&&(B===Ae(this,ne)?ht(this,ne,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,L)!==0){let Ie=Ae(this,U).get(B);if(Ie!==void 0)if(oe=!0,Ae(this,L)===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,R))==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,ne))ht(this,ne,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,L)._--,Ae(this,ue).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,R))==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,ne,0),ht(this,X,0),Ae(this,ue).length=0,ht(this,j,0),ht(this,L,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}),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.S=[];let u=this;s.forEach(function(l){u.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}),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=[]){super(),this.j=0,this.q=[];let u=this;s.forEach(function(l){u.push(l)})}clear(){this.q=[],this.i=this.j=0}push(s){let u=this.q.length;if(this.j/u>.5&&this.j+this.i>=u&&u>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}),dQ=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=[],u=function(c,h){return c>h?-1:c<h?1:0},l=!0){if(super(),this.v=u,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 u=this.C[s];for(;s>0;){let l=s-1>>1,c=this.C[l];if(this.v(c,u)<=0)break;this.C[s]=c,s=l}this.C[s]=u}k(s,u){let l=this.C[s];for(;s<u;){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],u=this.C.pop();return this.i-=1,this.i&&(this.C[0]=u,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let u=this.C.indexOf(s);return u<0?!1:(u===0?this.pop():u===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(u,1,this.C.pop()),this.i-=1,this.m(u),this.k(u,this.i>>1)),!0)}updateItem(s){let u=this.C.indexOf(s);return u<0?!1:(this.m(u),this.k(u,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!")}}),J3=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,u){super(u),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}),pQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=J3();function o(c){return c&&c.t?c:{default:c}}var s=class Z3 extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new Z3(this.o,this.container,this.iteratorType)}},u=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=u;e.default=l}),yQ=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 u=class e6 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 e6(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 u(this.p,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this._,this.h,this,1)}rEnd(){return new u(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 u(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}),gQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=J3();function o(c){return c&&c.t?c:{default:c}}var s=class t6 extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new t6(this.o,this.container,this.iteratorType)}},u=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=u;e.default=l}),mQ=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,u=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=u,u&&(u.tt=this),s}se(){let o=this.tt,s=this.U,u=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=u,u&&(u.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}),r6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=mQ(),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:S}=b;w.ie(),F.ie(),S.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 S=w.L(),M=this.v(S.u,l);if(M===0){S.l=c;return}else M<0&&(f=new this.re(l,c),S.W===void 0?(S.W=f,f.tt=S):(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)}},u=s;e.default=u}),n6=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(u,l,c){super(c),this.o=u,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 u=this.o,l=this.h.tt;if(u===this.h)return l?l.rt-1:0;let c=0;for(u.U&&(c+=u.U.rt);u!==l;){let h=u.tt;u===h.W&&(c+=1,h.U&&(c+=h.U.rt)),u=h}return c}},s=o;e.default=s}),bQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(r6()),n=s(n6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var u=class i6 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 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.insert(g)})}*K(h){h!==void 0&&(yield*this.K(h.U),yield h.u,yield*this.K(h.W))}begin(){return new u(this.h.U||this.h,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this.h.W||this.h,this.h,this,1)}rEnd(){return new u(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 u(f,this.h,this)}lowerBound(h){let f=this.X(this.Y,h);return new u(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new u(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new u(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new u(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}),AQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(r6()),n=s(n6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var u=class o6 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 o6(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 u(this.h.U||this.h,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this.h.W||this.h,this.h,this,1)}rEnd(){return new u(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 u(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new u(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new u(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new u(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 u(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}),s6=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"}}),a6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t=Yo(),n=s(s6()),o=Vo();function s(c){return c&&c.t?c:{default:c}}var u=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=u;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}),wQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=a6(),n=Vo(),o=class u6 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 u6(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)()}},u=s;e.default=u}),vQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=a6(),n=s(s6()),o=Vo();function s(h){return h&&h.t?h:{default:h}}var u=class l6 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 l6(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 u(this.p,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this._,this.h,this,1)}rEnd(){return new u(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 u(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}),xQ=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 u.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(fQ()),n=y(hQ()),o=y(dQ()),s=y(pQ()),u=y(yQ()),l=y(gQ()),c=y(bQ()),h=y(AQ()),f=y(wQ()),p=y(vQ());function y(g){return g&&g.t?g:{default:g}}}),EQ=qe((e,t)=>{Pe(),Le(),ke();var n=xQ().OrderedSet,o=qo()("number-allocator:trace"),s=qo()("number-allocator:error");function u(c,h){this.low=c,this.high=h}u.prototype.equals=function(c){return this.low===c.low&&this.high===c.high},u.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 u(h+1,f)):this.ss.eraseElementByPos(0),o("alloc():"+p),p},l.prototype.use=function(c){let h=new u(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 u(p+1,y)),o("use():"+c),!0):y===c?(this.ss.updateKeyByIterator(f,new u(p,y-1)),o("use():"+c),!0):(this.ss.updateKeyByIterator(f,new u(c+1,y)),this.ss.insert(new u(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 u(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 u(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 u(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 u(g,y))):this.ss.updateKeyByIterator(f,new u(g,c)):c+1===p?(this.ss.eraseElementByIterator(f.next()),this.ss.insert(new u(c,y))):this.ss.insert(h)}o("free():"+c)},l.prototype.clear=function(){o("clear()"),this.ss.clear(),this.ss.insert(new u(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}),c6=qe((e,t)=>{Pe(),Le(),ke();var n=EQ();t.exports.NumberAllocator=n}),SQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=cQ(),n=c6(),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,u){if(u===0||u>this.max)return!1;let l=this.aliasToTopic.get(u);return l&&delete this.topicToAlias[l],this.aliasToTopic.set(u,s),this.topicToAlias[s]=u,this.numberAllocator.use(u),this.length=this.aliasToTopic.size,!0}getTopicByAlias(s){return this.aliasToTopic.get(s)}getAliasByTopic(s){let u=this.topicToAlias[s];return typeof u<"u"&&this.aliasToTopic.get(u),u}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}),IQ=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(SQ()),s=fl(),u=(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=u}),_Q=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(n,o,s)=>{n.log("handling pubrel packet");let u=typeof s<"u"?s:n.noop,{messageId:l}=o,c={cmd:"pubcomp",messageId:l};n.incomingStore.get(o,(h,f)=>{h?n._sendPacket(c,u):(n.emit("message",f.topic,f.payload,f),n.handleMessage(f,p=>{if(p)return u(p);n.incomingStore.del(f,n.noop),n._sendPacket(c,u)}))})};e.default=t}),CQ=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(aQ()),o=t(lQ()),s=t(IQ()),u=t(Gp()),l=t(_Q()),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,u.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}),f6=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}),FQ=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}),OQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};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}),TQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default;function o(s,u){if(n(s)!="object"||!s)return s;var l=s[Symbol.toPrimitive];if(l!==void 0){var c=l.call(s,u||"default");if(n(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(s)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),BQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default,o=TQ();function s(u){var l=o(u,"string");return n(l)=="symbol"?l:l+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),RQ=qe((e,t)=>{Pe(),Le(),ke();var n=BQ();function o(s,u,l){return(u=n(u))in s?Object.defineProperty(s,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[u]=l,s}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),MQ=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}),jQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){var u=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(u!=null){var l,c,h,f,p=[],y=!0,g=!1;try{if(h=(u=u.call(o)).next,s===0){if(Object(u)!==u)return;y=!1}else for(;!(y=(l=h.call(u)).done)&&(p.push(l.value),p.length!==s);y=!0);}catch(b){g=!0,c=b}finally{try{if(!y&&u.return!=null&&(f=u.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),UQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){(s==null||s>o.length)&&(s=o.length);for(var u=0,l=Array(s);u<s;u++)l[u]=o[u];return l}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),NQ=qe((e,t)=>{Pe(),Le(),ke();var n=UQ();function o(s,u){if(s){if(typeof s=="string")return n(s,u);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,u):void 0}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),DQ=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}),PQ=qe((e,t)=>{Pe(),Le(),ke();var n=MQ(),o=jQ(),s=NQ(),u=DQ();function l(c,h){return n(c)||o(c,h)||s(c,h)||u()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports}),h6=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}},u=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,l=536870912,c=l*2,h=function(b,w){return function(F){var S=w.get(F),M=S===void 0?F.size:S<c?S+1:0;if(!F.has(M))return b(F,M);if(F.size<l){for(;F.has(M);)M=Math.floor(Math.random()*c);return b(F,M)}if(F.size>u)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;F.has(M);)M=Math.floor(Math.random()*u);return b(F,M)}},f=new WeakMap,p=s(f),y=h(p,f),g=o(y);n.addUniqueNumber=g,n.generateUniqueNumber=y})}),kQ=qe((e,t)=>{Pe(),Le(),ke();function n(s,u,l,c,h,f,p){try{var y=s[f](p),g=y.value}catch(b){return void l(b)}y.done?u(g):Promise.resolve(g).then(c,h)}function o(s){return function(){var u=this,l=arguments;return new Promise(function(c,h){var f=s.apply(u,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}),d6=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}),p6=qe((e,t)=>{Pe(),Le(),ke();function n(o,s,u,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,u,l)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),y6=qe((e,t)=>{Pe(),Le(),ke();var n=p6();function o(){var s,u,l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",h=l.toStringTag||"@@toStringTag";function f(M,A,I,R){var T=A&&A.prototype instanceof y?A:y,z=Object.create(T.prototype);return n(z,"_invoke",(function(k,L,j){var U,$,N,Z=0,re=j||[],ne=!1,X={p:0,n:0,v:s,a:ue,f:ue.bind(s,4),d:function(ye,le){return U=ye,$=0,N=s,X.n=le,p}};function ue(ye,le){for($=ye,N=le,u=0;!ne&&Z&&!ee&&u<re.length;u++){var ee,G=re[u],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 ne=!0,le}return function(ye,le,ee){if(Z>1)throw TypeError("Generator is already running");for(ne&&le===1&&ue(le,ee),$=le,N=ee;(u=$<2?s:N)||!ne;){U||($?$<3?($>1&&(X.n=-1),ue($,N)):X.n=N:X.v=N);try{if(Z=2,U){if($||(ye="next"),u=U[ye]){if(!(u=u.call(U,N)))throw TypeError("iterator result is not an object");if(!u.done)return u;N=u.value,$<2&&($=0)}else $===1&&(u=U.return)&&u.call(U),$<2&&(N=TypeError("The iterator does not provide a '"+ye+"' method"),$=1);U=s}else if((u=(ne=X.n<0)?N:k.call(L,X))!==p)break}catch(G){U=s,$=1,N=G}finally{Z=1}}return{value:u,done:ne}}})(M,I,R),!0),z}var p={};function y(){}function g(){}function b(){}u=Object.getPrototypeOf;var w=[][c]?u(u([][c]())):(n(u={},c,function(){return this}),u),F=b.prototype=y.prototype=Object.create(w);function S(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,b):(M.__proto__=b,n(M,h,"GeneratorFunction")),M.prototype=Object.create(F),M}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:S}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),g6=qe((e,t)=>{Pe(),Le(),ke();var n=d6(),o=p6();function s(u,l){function c(f,p,y,g){try{var b=u[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}),m6=qe((e,t)=>{Pe(),Le(),ke();var n=y6(),o=g6();function s(u,l,c,h,f){return new o(n().w(u,l,c,h),f||Promise)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),LQ=qe((e,t)=>{Pe(),Le(),ke();var n=m6();function o(s,u,l,c,h){var f=n(s,u,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}),$Q=qe((e,t)=>{Pe(),Le(),ke();function n(o){var s=Object(o),u=[];for(var l in s)u.unshift(l);return function c(){for(;u.length;)if((l=u.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}),zQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default;function o(s){if(s!=null){var u=s[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],l=0;if(u)return u.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}),qQ=qe((e,t)=>{Pe(),Le(),ke();var n=d6(),o=y6(),s=LQ(),u=m6(),l=g6(),c=$Q(),h=zQ();function f(){var p=o(),y=p.m(f),g=(Object.getPrototypeOf?Object.getPrototypeOf(y):y.__proto__).constructor;function b(S){var M=typeof S=="function"&&S.constructor;return!!M&&(M===g||(M.displayName||M.name)==="GeneratorFunction")}var w={throw:1,return:2,break:3,continue:3};function F(S){var M,A;return function(I){M||(M={stop:function(){return A(I.a,2)},catch:function(){return I.v},abrupt:function(R,T){return A(I.a,w[R],T)},delegateYield:function(R,T,z){return M.resultName=T,A(I.d,h(R),z)},finish:function(R){return A(I.f,R)}},A=function(R,T,z){I.p=M.prev,I.n=M.next;try{return R(T,z)}finally{M.next=I.n}}),M.resultName&&(M[M.resultName]=I.v,M.resultName=void 0),M.sent=I.v,M.next=I.n;try{return S.call(this,M)}finally{I.p=M.prev,I.n=M.next}}}return(t.exports=f=function(){return{wrap:function(S,M,A,I){return p.w(F(S),M,A,I&&I.reverse())},isGeneratorFunction:b,mark:p.m,awrap:function(S,M){return new n(S,M)},AsyncIterator:l,async:function(S,M,A,I,R){return(b(M)?u:s)(F(S),M,A,I,R)},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}),HQ=qe((e,t)=>{Pe(),Le(),ke();var n=qQ()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}),QQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,RQ(),PQ(),h6(),kQ(),HQ()):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,u,l,c){var h=function(A){return typeof A.start=="function"},f=new WeakMap;function p(A,I){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);I&&(T=T.filter(function(z){return Object.getOwnPropertyDescriptor(A,z).enumerable})),R.push.apply(R,T)}return R}function y(A){for(var I=1;I<arguments.length;I++){var R=arguments[I]!=null?arguments[I]:{};I%2?p(Object(R),!0).forEach(function(T){o(A,T,R[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):p(Object(R)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(R,T))})}return A}var g=function(A){return y(y({},A),{},{connect:function(I){var R=I.call;return l(c.mark(function T(){var z,k,L,j;return c.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return z=new MessageChannel,k=z.port1,L=z.port2,U.next=1,R("connect",{port:k},[k]);case 1:return j=U.sent,f.set(L,j),U.abrupt("return",L);case 2:case"end":return U.stop()}},T)}))},disconnect:function(I){var R=I.call;return(function(){var T=l(c.mark(function z(k){var L;return c.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(L=f.get(k),L!==void 0){j.next=1;break}throw new Error("The given port is not connected.");case 1:return j.next=2,R("disconnect",{portId:L});case 2:case"end":return j.stop()}},z)}));return function(z){return T.apply(this,arguments)}})()},isSupported:function(I){var R=I.call;return function(){return R("isSupported")}}})};function b(A,I){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);I&&(T=T.filter(function(z){return Object.getOwnPropertyDescriptor(A,z).enumerable})),R.push.apply(R,T)}return R}function w(A){for(var I=1;I<arguments.length;I++){var R=arguments[I]!=null?arguments[I]:{};I%2?b(Object(R),!0).forEach(function(T){o(A,T,R[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):b(Object(R)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(R,T))})}return A}var F=new WeakMap,S=function(A){if(F.has(A))return F.get(A);var I=new Map;return F.set(A,I),I},M=function(A){var I=g(A);return function(R){var T=S(R);R.addEventListener("message",function(re){var ne=re.data,X=ne.id;if(X!==null&&T.has(X)){var ue=T.get(X),ye=ue.reject,le=ue.resolve;T.delete(X),ne.error===void 0?le(ne.result):ye(new Error(ne.error.message))}}),h(R)&&R.start();for(var z=function(re){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(ue,ye){var le=u.generateUniqueNumber(T);T.set(le,{reject:ye,resolve:ue}),ne===null?R.postMessage({id:le,method:re},X):R.postMessage({id:le,method:re,params:ne},X)})},k=function(re,ne){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];R.postMessage({id:null,method:re,params:ne},X)},L={},j=0,U=Object.entries(I);j<U.length;j++){var $=s(U[j],2),N=$[0],Z=$[1];L=w(w({},L),{},o({},N,Z({call:z,notify:k})))}return w({},L)}};n.createBroker=M})}),GQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,Kp(),QQ(),h6()):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,u){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),S=2;S<w;S++)F[S-2]=arguments[S];var M=Symbol(),A=u.generateUniqueNumber(l);l.set(A,M);var I=function(){return y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"interval"}).then(function(){var R=l.get(A);if(R===void 0)throw new Error("The timer is in an undefined state.");R===M&&(g.apply(void 0,F),l.get(A)===M&&I())})};return I(),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),S=2;S<w;S++)F[S-2]=arguments[S];var M=Symbol(),A=u.generateUniqueNumber(c);return c.set(A,M),y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"timeout"}).then(function(){var I=c.get(A);if(I===void 0)throw new Error("The timer is in an undefined state.");I===M&&(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})}),KQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,GQ()):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}},u=`(()=>{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,u),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 u;return typeof window<"u"?typeof navigator<"u"&&((u=navigator.userAgent)==null?void 0:u.toLowerCase().indexOf(" electron/"))>-1&&(Dt!=null&&Dt.versions)?!Object.prototype.hasOwnProperty.call(Dt.versions,"electron"):typeof window.document<"u":!1},n=()=>{var u,l;return!!(typeof self=="object"&&((l=(u=self==null?void 0:self.constructor)==null?void 0:u.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}),YQ=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=KQ(),u=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 u.default&&!u.isWebWorker&&!u.isReactNativeBrowser?l:c}};e.default=h}),b6=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(YQ()),o=class{constructor(s,u){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 u=="object"&&"set"in u&&"clear"in u?u:(0,n.default)(u),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,k,L,j){j===void 0&&(j=L);var U=Object.getOwnPropertyDescriptor(k,L);(!U||("get"in U?!k.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return k[L]}}),Object.defineProperty(z,j,U)}:function(z,k,L,j){j===void 0&&(j=L),z[j]=k[L]}),n=e&&e.__setModuleDefault||(Object.create?function(z,k){Object.defineProperty(z,"default",{enumerable:!0,value:k})}:function(z,k){z.default=k}),o=e&&e.__importStar||(function(){var z=function(k){return z=Object.getOwnPropertyNames||function(L){var j=[];for(var U in L)Object.prototype.hasOwnProperty.call(L,U)&&(j[j.length]=U);return j},z(k)};return function(k){if(k&&k.__esModule)return k;var L={};if(k!=null)for(var j=z(k),U=0;U<j.length;U++)j[U]!=="default"&&t(L,k,j[U]);return n(L,k),L}})(),s=e&&e.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(nQ()),l=La(),c=s(oQ()),h=s(qo()),f=o(sQ()),p=s(Y3()),y=s(CQ()),g=s(f6()),b=s(FQ()),w=fl(),F=OQ(),S=s(b6()),M=o(Yp()),A=globalThis.setImmediate||((...z)=>{let k=z.shift();(0,w.nextTick)(()=>{k(...z)})}),I={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},R=(T=class extends F.TypedEventEmitter{constructor(L,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 I)typeof this.options[U]>"u"?this.options[U]=I[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),M.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",M.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||(u.default.writeToStream.cacheNumbers=!1),this.streamBuilder=L,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,ne=>{N.cb&&N.cb(ne),$()}):(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(L,j){j()}handleMessage(L,j){j()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var X;let L=new l.Writable,j=u.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",ue=>{this.log("parser :: on packet push to packets array."),$.push(ue)});let N=()=>{this.log("work :: getting next packet in queue");let ue=$.shift();if(ue)this.log("work :: packet pulled from queue"),(0,y.default)(this,ue,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 ue=U;U=null,ue()}};L._write=(ue,ye,le)=>{U=le,this.log("writable stream :: parsing buffer"),j.parse(ue),N()};let re=ue=>{this.log("streamErrorHandler :: error",ue.message),ue.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",ue)):this.noop(ue)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(L),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 ne={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&&(ne.will={...this.options.will,payload:(X=this.options.will)==null?void 0:X.payload}),this.topicAliasRecv&&(ne.properties||(ne.properties={}),this.topicAliasRecv&&(ne.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(ne),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 ue={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(ue)}}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(L,j,U,$){this.log("publish :: message `%s` to topic `%s`",j,L);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:ne,properties:X,cbStorePut:ue}=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:L,payload:j,qos:Z,retain:re,messageId:le,dup:ne};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,ue);break;default:this.log("MqttClient:publish: packet cmd: %s",ee.cmd),this._sendPacket(ee,$,ue);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ye())&&this._storeProcessingQueue.push({invoke:ye,cbStorePut:U.cbStorePut,callback:$}),this}publishAsync(L,j,U){return new Promise(($,N)=>{this.publish(L,j,U,(Z,re)=>{Z?N(Z):$(re)})})}subscribe(L,j,U){let $=this.options.protocolVersion;typeof j=="function"&&(U=j),U=U||this.noop;let N=!1,Z=[];typeof L=="string"?(L=[L],Z=L):Array.isArray(L)?Z=L:typeof L=="object"&&(N=L.resubscribe,delete L.resubscribe,Z=Object.keys(L));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 ne={qos:0};$===5&&(ne.nl=!1,ne.rap=!1,ne.rh=0),j={...ne,...j};let{properties:X}=j,ue=[],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),ue.push(K)}};if(Array.isArray(L)?L.forEach(G=>{this.log("subscribe: array topic %s",G),ye(G)}):Object.keys(L).forEach(G=>{this.log("subscribe: object topic %s, %o",G,L[G]),ye(G,L[G])}),!ue.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 ae={qos:fe.qos};$===5&&(ae.nl=fe.nl||!1,ae.rap=fe.rap||!1,ae.rh=fe.rh||0,ae.properties=fe.properties),this._resubscribeTopics[fe.topic]=ae,q.push(fe.topic)}}),this.messageIdToTopic[K.messageId]=q}let W=new Promise((q,fe)=>{this.outgoing[K.messageId]={volatile:!0,cb(ae,ie){if(!ae){let{granted:J}=ie;for(let O=0;O<J.length;O+=1)G[O].qos=J[O]}ae?fe(new w.ErrorWithSubackPacket(ae.message,ie)):q(ie)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(K),W},ee=()=>{let G=this.options.subscribeBatchSize??ue.length,Q=[];for(let K=0;K<ue.length;K+=G){let W=ue.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,ue,K.at(-1))}).catch(K=>{U(K,ue,K.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ee())&&this._storeProcessingQueue.push({invoke:ee,callback:U}),this}subscribeAsync(L,j){return new Promise((U,$)=>{this.subscribe(L,j,(N,Z)=>{N?$(N):U(Z)})})}unsubscribe(L,j,U){typeof L=="string"&&(L=[L]),typeof j=="function"&&(U=j),U=U||this.noop;let $=f.validateTopics(L);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 L=="string"?re.unsubscriptions=[L]:Array.isArray(L)&&(re.unsubscriptions=L),this.options.resubscribe&&re.unsubscriptions.forEach(ne=>{delete this._resubscribeTopics[ne]}),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(L,j){return new Promise((U,$)=>{this.unsubscribe(L,j,(N,Z)=>{N?$(N):U(Z)})})}end(L,j,U){this.log("end :: (%s)",this.options.clientId),(L==null||typeof L!="boolean")&&(U=U||j,j=L,L=!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 ne=Z||re;this.log("end :: closeStores: invoking callback with args"),U(ne)}})}),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,L),this._cleanUp(L,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,w.nextTick)($)},j)};return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!L&&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(L,j){return new Promise((U,$)=>{this.end(L,j,N=>{N?$(N):U()})})}removeOutgoingMessage(L){if(this.outgoing[L]){let{cb:j}=this.outgoing[L];this._removeOutgoingAndStoreMessage(L,()=>{j(new Error("Message removed"))})}return this}reconnect(L){this.log("client reconnect");let j=()=>{L?(this.options.incomingStore=L.incomingStore,this.options.outgoingStore=L.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(L=>{this.outgoing[L].volatile&&typeof this.outgoing[L].cb=="function"&&(this.outgoing[L].cb(new Error("Connection closed")),delete this.outgoing[L])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(L=>{typeof this.outgoing[L].cb=="function"&&(this.outgoing[L].cb(new Error("Connection closed")),delete this.outgoing[L])}))}_removeTopicAliasAndRecoverTopicName(L){let j;L.properties&&(j=L.properties.topicAlias);let U=L.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");L.topic=U}j&&delete L.properties.topicAlias}_checkDisconnecting(L){return this.disconnecting&&(L&&L!==this.noop?L(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(L,j,U={}){if(j&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",j)),this.log("_cleanUp :: forced? %s",L),L)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(L,j,U){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",L.cmd);let $=L,N;if($.cmd==="publish"&&($=(0,c.default)(L),N=this._removeTopicAliasAndRecoverTopicName($),N))return j&&j(N);this.outgoingStore.put($,Z=>{if(Z)return j&&j(Z);U(),this._writePacket(L,j)})}_applyTopicAlias(L){if(this.options.protocolVersion===5&&L.cmd==="publish"){let j;L.properties&&(j=L.properties.topicAlias);let U=L.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?(L.topic="",L.properties={...L.properties,topicAlias:j},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",U,j)):(j=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(U,j),L.properties={...L.properties,topicAlias:j},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",U,j))):this.options.autoUseTopicAlias&&(j=this.topicAliasSend.getAliasByTopic(U),j&&(L.topic="",L.properties={...L.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(L){this.log("noop ::",L)}_writePacket(L,j){this.log("_writePacket :: packet: %O",L),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",L),this.log("_writePacket :: writing to stream");let U=u.default.writeToStream(L,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(L,j,U,$){this.log("_sendPacket :: (%s) :: start",this.options.clientId),U=U||this.noop,j=j||this.noop;let N=this._applyTopicAlias(L);if(N){j(N);return}if(!this.connected){if(L.cmd==="auth"){this._writePacket(L,j);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(L,j,U);return}if($){this._writePacket(L,j);return}switch(L.cmd){case"publish":break;case"pubrel":this._storeAndSend(L,j,U);return;default:this._writePacket(L,j);return}switch(L.qos){case 2:case 1:this._storeAndSend(L,j,U);break;case 0:default:this._writePacket(L,j);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(L,j,U){this.log("_storePacket :: packet: %o",L),this.log("_storePacket :: cb? %s",!!j),U=U||this.noop;let $=L;if($.cmd==="publish"){$=(0,c.default)(L);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 S.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(L=!1){this.keepaliveManager&&this.options.keepalive&&(L||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 L=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&L.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let j=0;j<L.length;j++){let U={};U[L[j]]=this._resubscribeTopics[L[j]],U.resubscribe=!0,this.subscribe(U,{properties:U[L[j]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(L){if(this.disconnected){this.emit("connect",L);return}this.connackPacket=L,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),ne;if(!re){U.once("readable",Z);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[re.messageId]){Z();return}!this.disconnecting&&!this.reconnectTimer?(ne=this.outgoing[re.messageId]?this.outgoing[re.messageId].cb:null,this.outgoing[re.messageId]={volatile:!1,cb(X,ue){ne&&ne(X,ue),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 ne in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[ne]){re=!1;break}this.removeListener("close",$),re?(N(),this._invokeAllStoreProcessingQueue(),this.emit("connect",L)):j()}),Z()};j()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let L=this._storeProcessingQueue[0];if(L&&L.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let L of this._storeProcessingQueue)L.cbStorePut&&L.cbStorePut(new Error("Connection closed")),L.callback&&L.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(L,j){delete this.outgoing[L],this.outgoingStore.del({messageId:L},(U,$)=>{j(U,$),this.messageIdProvider.deallocate(L),this._invokeStoreProcessingQueue()})}},rt(T,"VERSION",w.MQTTJS_VERSION),T);e.default=R}),VQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=c6(),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 WQ(){if(hA)return bd;hA=!0;let e=2147483647,t=36,n=1,o=26,s=38,u=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 S(U){throw new RangeError(g[U])}function M(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("."),ne=M(re,$).join(".");return Z+ne}function I(U){let $=[],N=0,Z=U.length;for(;N<Z;){let re=U.charCodeAt(N++);if(re>=55296&&re<=56319&&N<Z){let ne=U.charCodeAt(N++);(ne&64512)==56320?$.push(((re&1023)<<10)+(ne&1023)+65536):($.push(re),N--)}else $.push(re)}return $}let R=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)},k=function(U,$,N){let Z=0;for(U=N?w(U/u):U>>1,U+=w(U/$);U>b*o>>1;Z+=t)U=w(U/b);return w(Z+(b+1)*U/(U+s))},L=function(U){let $=[],N=U.length,Z=0,re=c,ne=l,X=U.lastIndexOf(h);X<0&&(X=0);for(let ue=0;ue<X;++ue)U.charCodeAt(ue)>=128&&S("not-basic"),$.push(U.charCodeAt(ue));for(let ue=X>0?X+1:0;ue<N;){let ye=Z;for(let ee=1,G=t;;G+=t){ue>=N&&S("invalid-input");let Q=T(U.charCodeAt(ue++));Q>=t&&S("invalid-input"),Q>w((e-Z)/ee)&&S("overflow"),Z+=Q*ee;let K=G<=ne?n:G>=ne+o?o:G-ne;if(Q<K)break;let W=t-K;ee>w(e/W)&&S("overflow"),ee*=W}let le=$.length+1;ne=k(Z-ye,le,ye==0),w(Z/le)>e-re&&S("overflow"),re+=w(Z/le),Z%=le,$.splice(Z++,0,re)}return String.fromCodePoint(...$)},j=function(U){let $=[];U=I(U);let N=U.length,Z=c,re=0,ne=l;for(let ye of U)ye<128&&$.push(F(ye));let X=$.length,ue=X;for(X&&$.push(h);ue<N;){let ye=e;for(let ee of U)ee>=Z&&ee<ye&&(ye=ee);let le=ue+1;ye-Z>w((e-re)/le)&&S("overflow"),re+=(ye-Z)*le,Z=ye;for(let ee of U)if(ee<Z&&++re>e&&S("overflow"),ee===Z){let G=re;for(let Q=t;;Q+=t){let K=Q<=ne?n:Q>=ne+o?o:Q-ne;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))),ne=k(re,le,ue===X),re=0,++ue}++re,++Z}return $.join("")};return bd={version:"2.3.1",ucs2:{decode:I,encode:R},decode:L,encode:j,toASCII:function(U){return A(U,function($){return p.test($)?"xn--"+j($):$})},toUnicode:function(U){return A(U,function($){return f.test($)?L($.slice(4).toLowerCase()):$})}},bd}var bd,hA,Cs,XQ=Ln(()=>{Pe(),Le(),ke(),bd={},hA=!1,Cs=WQ(),Cs.decode,Cs.encode,Cs.toASCII,Cs.toUnicode,Cs.ucs2,Cs.version});function JQ(){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 u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==o||u.enumerable!==!0)return!1}return!0}),dA}function ZQ(){return gA||(gA=!0,yA=Error),yA}function eG(){return bA||(bA=!0,mA=EvalError),mA}function tG(){return wA||(wA=!0,AA=RangeError),AA}function rG(){return xA||(xA=!0,vA=ReferenceError),vA}function A6(){return SA||(SA=!0,EA=SyntaxError),EA}function Rf(){return _A||(_A=!0,IA=TypeError),IA}function nG(){return FA||(FA=!0,CA=URIError),CA}function iG(){if(OA)return Ad;OA=!0;var e=typeof Symbol<"u"&&Symbol,t=JQ();return Ad=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Ad}function oG(){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 sG(){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},u=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=u(arguments,1),p,y=function(){if(this instanceof p){var S=h.apply(this,s(f,arguments));return Object(S)===S?S: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=sG();return xd=Function.prototype.bind||e,xd}function aG(){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=ZQ(),n=eG(),o=tG(),s=rG(),u=A6(),l=Rf(),c=nG(),h=Function,f=function(ue){try{return h('"use strict"; return ('+ue+").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=iG()(),w=oG()(),F=Object.getPrototypeOf||(w?function(ue){return ue.__proto__}:null),S={},M=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%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%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%":S,"%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%":u,"%ThrowTypeError%":g,"%TypedArray%":M,"%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(ue){var I=F(F(ue));A["%Error.prototype%"]=I}var R=function ue(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=ue("%AsyncGeneratorFunction%");ee&&(le=ee.prototype)}else if(ye==="%AsyncIteratorPrototype%"){var G=ue("%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(),k=aG(),L=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,ne=function(ue){var ye=$(ue,0,1),le=$(ue,-1);if(ye==="%"&&le!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(le==="%"&&ye!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var ee=[];return U(ue,Z,function(G,Q,K,W){ee[ee.length]=K?U(W,re,"$1"):Q||G}),ee},X=function(ue,ye){var le=ue,ee;if(k(T,le)&&(ee=T[le],le="%"+ee[0]+"%"),k(A,le)){var G=A[le];if(G===S&&(G=R(le)),typeof G>"u"&&!ye)throw new l("intrinsic "+ue+" exists, but is not available. Please file an issue!");return{alias:ee,name:le,value:G}}throw new u("intrinsic "+ue+" does not exist!")};return Sd=function(ue,ye){if(typeof ue!="string"||ue.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(/^%?[^%]*%?$/,ue)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var le=ne(ue),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,L([0,1],q)));for(var fe=1,ae=!0;fe<le.length;fe+=1){var ie=le[fe],J=$(ie,0,1),O=$(ie,-1);if((J==='"'||J==="'"||J==="`"||O==='"'||O==="'"||O==="`")&&J!==O)throw new u("property names with quotes must have matching quotes");if((ie==="constructor"||!ae)&&(W=!0),ee+="."+ie,Q="%"+ee+"%",k(A,Q))K=A[Q];else if(K!=null){if(!(ie in K)){if(!ye)throw new l("base intrinsic for "+ue+" exists, but the property is not available.");return}if(p&&fe+1>=le.length){var H=p(K,ie);ae=!!H,ae&&"get"in H&&!("originalValue"in H.get)?K=H.get:K=K[ie]}else ae=k(K,ie),K=K[ie];ae&&!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 w6(){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 uG(){if(DA)return Cd;DA=!0;var e=Mv(),t=A6(),n=Rf(),o=w6();return Cd=function(s,u,l){if(!s||typeof s!="object"&&typeof s!="function")throw new n("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="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,u);if(e)e(s,u,{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[u]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Cd}function lG(){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 cG(){if(kA)return Od;kA=!0;var e=hl(),t=uG(),n=lG()(),o=w6(),s=Rf(),u=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||u(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 fG(){if(LA)return Su;LA=!0;var e=Rv(),t=hl(),n=cG(),o=Rf(),s=t("%Function.prototype.apply%"),u=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(u,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,u,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 hG(){if($A)return Td;$A=!0;var e=hl(),t=fG(),n=t(e("String.prototype.indexOf"));return Td=function(o,s){var u=e(o,!!s);return typeof u=="function"&&n(o,".prototype.")>-1?t(u):u},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,dG=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 pG(){!Aa||!ya||(Aa=!1,ya.length?Vi=ya.concat(Vi):Ec=-1,Vi.length&&v6())}function v6(){if(!Aa){var e=setTimeout(pG,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 yG(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 x6(e,t)),Vi.length===1&&!Aa&&setTimeout(v6,0)}function x6(e,t){this.fun=e,this.array=t}function fn(){}function gG(e){jv("_linkedBinding")}function mG(e){jv("dlopen")}function bG(){return[]}function AG(){return[]}function wG(e,t){if(!e)throw new Error(t||"assertion error")}function vG(){return!1}function xG(){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 EG(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,E6=Ln(()=>{Pe(),Le(),ke(),Vi=[],Aa=!1,Ec=-1,x6.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:gG,_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:EG,domain:WC,_exiting:XC,config:JC,dlopen:mG,uptime:xG,_getActiveRequests:bG,_getActiveHandles:AG,reallyExit:ZC,_kill:eF,cpuUsage:sd,resourceUsage:tF,memoryUsage:rF,kill:nF,exit:iF,openStdin:oF,allowedNodeEnvironmentFlags:sF,assert:wG,features:aF,_fatalExceptions:uF,setUncaughtExceptionCaptureCallback:lF,hasUncaughtExceptionCaptureCallback:vG,emitWarning:zC,nextTick:yG,_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 SG(){if(zA)return Rd;zA=!0;var e=Uv;function t(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function n(u,l){for(var c="",h=0,f=-1,p=0,y,g=0;g<=u.length;++g){if(g<u.length)y=u.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+="/"+u.slice(f+1,g):c=u.slice(f+1,g),h=g-f-1;f=g,p=0}else y===46&&p!==-1?++p:p=-1}return c}function o(u,l){var c=l.dir||l.root,h=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+h:c+u+h:h}var s={resolve:function(){for(var u="",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&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=n(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(u){if(t(u),u.length===0)return".";var l=u.charCodeAt(0)===47,c=u.charCodeAt(u.length-1)===47;return u=n(u,!l),u.length===0&&!l&&(u="."),u.length>0&&c&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return t(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l<arguments.length;++l){var c=arguments[l];t(c),c.length>0&&(u===void 0?u=c:u+="/"+c)}return u===void 0?".":s.normalize(u)},relative:function(u,l){if(t(u),t(l),u===l||(u=s.resolve(u),l=s.resolve(l),u===l))return"";for(var c=1;c<u.length&&u.charCodeAt(c)===47;++c);for(var h=u.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&&(u.charCodeAt(c+F)===47?w=F:F===0&&(w=0));break}var S=u.charCodeAt(c+F),M=l.charCodeAt(p+F);if(S!==M)break;S===47&&(w=F)}var A="";for(F=c+w+1;F<=h;++F)(F===h||u.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(u){return u},dirname:function(u){if(t(u),u.length===0)return".";for(var l=u.charCodeAt(0),c=l===47,h=-1,f=!0,p=u.length-1;p>=1;--p)if(l=u.charCodeAt(p),l===47){if(!f){h=p;break}}else f=!1;return h===-1?c?"/":".":c&&h===1?"//":u.slice(0,h)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');t(u);var c=0,h=-1,f=!0,p;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var y=l.length-1,g=-1;for(p=u.length-1;p>=0;--p){var b=u.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=u.length),u.slice(c,h)}else{for(p=u.length-1;p>=0;--p)if(u.charCodeAt(p)===47){if(!f){c=p+1;break}}else h===-1&&(f=!1,h=p+1);return h===-1?"":u.slice(c,h)}},extname:function(u){t(u);for(var l=-1,c=0,h=-1,f=!0,p=0,y=u.length-1;y>=0;--y){var g=u.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?"":u.slice(l,h)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return o("/",u)},parse:function(u){t(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var c=u.charCodeAt(0),h=c===47,f;h?(l.root="/",f=1):f=0;for(var p=-1,y=0,g=-1,b=!0,w=u.length-1,F=0;w>=f;--w){if(c=u.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=u.slice(1,g):l.base=l.name=u.slice(y,g)):(y===0&&h?(l.name=u.slice(1,p),l.base=u.slice(1,g)):(l.name=u.slice(y,p),l.base=u.slice(y,g)),l.ext=u.slice(p,g)),y>0?l.dir=u.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,IG=Ln(()=>{Pe(),Le(),ke(),E6(),Rd={},zA=!1,qA=SG()}),S6={};ll(S6,{URL:()=>j6,Url:()=>O6,default:()=>hn,fileURLToPath:()=>_6,format:()=>T6,parse:()=>M6,pathToFileURL:()=>C6,resolve:()=>B6,resolveObject:()=>R6});function _G(){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,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&u&&typeof u.get=="function"?u.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,S=Function.prototype.toString,M=String.prototype.match,A=String.prototype.slice,I=String.prototype.replace,R=String.prototype.toUpperCase,T=String.prototype.toLowerCase,z=RegExp.prototype.test,k=Array.prototype.concat,L=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",ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===re||!0)?Symbol.toStringTag:null,X=Object.prototype.propertyIsEnumerable,ue=(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 I.call(We,He,"$&_")+"."+I.call(I.call(et,/([0-9]{3})/g,"$&_"),/_$/,"")}}return I.call(Ie,He,"$&_")}var le=F6,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"&>!=="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?" { "+L.call(Jt,", ")+" }":"")}if(H(Ie)){var Ar=re?I.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)+"]":"[ "+L.call(Ze,", ")+" ]"}if(ae(Ie)){var st=Ce(Ie,dt);return!("cause"in Error.prototype)&&"cause"in Ie&&!X.call(Ie,"cause")?"{ ["+String(Ie)+"] "+L.call(k.call("[cause]: "+dt(Ie.cause),st),", ")+" }":st.length===0?"["+String(Ie)+"]":"{ ["+String(Ie)+"] "+L.call(st,", ")+" }"}if(typeof Ie=="object"&>){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(ie(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=ue?ue(Ie)===Object.prototype:Ie instanceof Object||Ie.constructor===Object,Rr=Ie instanceof Object?"":"null prototype",Ht=!$n&&ne&&Object(Ie)===Ie&&ne 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?"["+L.call(k.call([],Ht||[],Rr||[]),": ")+"] ":"");return Br.length===0?Mr+"{}":ft?Mr+"{"+xe(Br,ft)+"}":Mr+"{ "+L.call(Br,", ")+" }"}return String(Ie)};function Q(we,Ie,He){var Ke=(He.quoteStyle||Ie)==="double"?'"':"'";return Ke+we+Ke}function K(we){return I.call(String(we),/"/g,""")}function W(we){return te(we)==="[object Array]"&&(!ne||!(typeof we=="object"&&ne in we))}function q(we){return te(we)==="[object Date]"&&(!ne||!(typeof we=="object"&&ne in we))}function fe(we){return te(we)==="[object RegExp]"&&(!ne||!(typeof we=="object"&&ne in we))}function ae(we){return te(we)==="[object Error]"&&(!ne||!(typeof we=="object"&&ne in we))}function ie(we){return te(we)==="[object String]"&&(!ne||!(typeof we=="object"&&ne in we))}function J(we){return te(we)==="[object Number]"&&(!ne||!(typeof we=="object"&&ne in we))}function O(we){return te(we)==="[object Boolean]"&&(!ne||!(typeof we=="object"&&ne 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=M.call(S.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=I.call(I.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":"")+R.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):L.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=L.call(Array(we.indent+1)," ");else return null;return{base:He,prev:L.call(Array(Ie+1),He)}}function xe(we,Ie){if(we.length===0)return"";var He=`
|
|
157
|
-
`+Ie.prev+Ie.base;return He+L.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&<<we.length||re&>["$"+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 CG(){if(QA)return Ud;QA=!0;var e=hl(),t=hG(),n=_G(),o=Rf(),s=e("%WeakMap%",!0),u=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(S,M){for(var A=S,I;(I=A.next)!==null;A=I)if(I.key===M)return A.next=I.next,I.next=S.next,S.next=I,I},b=function(S,M){var A=g(S,M);return A&&A.value},w=function(S,M,A){var I=g(S,M);I?I.value=A:S.next={key:M,next:S.next,value:A}},F=function(S,M){return!!g(S,M)};return Ud=function(){var S,M,A,I={assert:function(R){if(!I.has(R))throw new o("Side channel does not contain "+n(R))},get:function(R){if(s&&R&&(typeof R=="object"||typeof R=="function")){if(S)return l(S,R)}else if(u){if(M)return f(M,R)}else if(A)return b(A,R)},has:function(R){if(s&&R&&(typeof R=="object"||typeof R=="function")){if(S)return h(S,R)}else if(u){if(M)return y(M,R)}else if(A)return F(A,R);return!1},set:function(R,T){s&&R&&(typeof R=="object"||typeof R=="function")?(S||(S=new s),c(S,R,T)):u?(M||(M=new u),p(M,R,T)):(A||(A={key:{},next:null}),w(A,R,T))}};return I},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 I6(){if(KA)return Dd;KA=!0;var e=Nv(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o=(function(){for(var S=[],M=0;M<256;++M)S.push("%"+((M<16?"0":"")+M.toString(16)).toUpperCase());return S})(),s=function(S){for(;S.length>1;){var M=S.pop(),A=M.obj[M.prop];if(n(A)){for(var I=[],R=0;R<A.length;++R)typeof A[R]<"u"&&I.push(A[R]);M.obj[M.prop]=I}}},u=function(S,M){for(var A=M&&M.plainObjects?Object.create(null):{},I=0;I<S.length;++I)typeof S[I]<"u"&&(A[I]=S[I]);return A},l=function S(M,A,I){if(!A)return M;if(typeof A!="object"){if(n(M))M.push(A);else if(M&&typeof M=="object")(I&&(I.plainObjects||I.allowPrototypes)||!t.call(Object.prototype,A))&&(M[A]=!0);else return[M,A];return M}if(!M||typeof M!="object")return[M].concat(A);var R=M;return n(M)&&!n(A)&&(R=u(M,I)),n(M)&&n(A)?(A.forEach(function(T,z){if(t.call(M,z)){var k=M[z];k&&typeof k=="object"&&T&&typeof T=="object"?M[z]=S(k,T,I):M.push(T)}else M[z]=T}),M):Object.keys(A).reduce(function(T,z){var k=A[z];return t.call(T,z)?T[z]=S(T[z],k,I):T[z]=k,T},R)},c=function(S,M){return Object.keys(M).reduce(function(A,I){return A[I]=M[I],A},S)},h=function(S,M,A){var I=S.replace(/\+/g," ");if(A==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},f=1024,p=function(S,M,A,I,R){if(S.length===0)return S;var T=S;if(typeof S=="symbol"?T=Symbol.prototype.toString.call(S):typeof S!="string"&&(T=String(S)),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="",k=0;k<T.length;k+=f){for(var L=T.length>=f?T.slice(k,k+f):T,j=[],U=0;U<L.length;++U){var $=L.charCodeAt(U);if($===45||$===46||$===95||$===126||$>=48&&$<=57||$>=65&&$<=90||$>=97&&$<=122||R===e.RFC1738&&($===40||$===41)){j[j.length]=L.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|L.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(S){for(var M=[{obj:{o:S},prop:"o"}],A=[],I=0;I<M.length;++I)for(var R=M[I],T=R.obj[R.prop],z=Object.keys(T),k=0;k<z.length;++k){var L=z[k],j=T[L];typeof j=="object"&&j!==null&&A.indexOf(j)===-1&&(M.push({obj:T,prop:L}),A.push(j))}return s(M),S},g=function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},b=function(S){return!S||typeof S!="object"?!1:!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},w=function(S,M){return[].concat(S,M)},F=function(S,M){if(n(S)){for(var A=[],I=0;I<S.length;I+=1)A.push(M(S[I]));return A}return M(S)};return Dd={arrayToObject:u,assign:c,combine:w,compact:y,decode:h,encode:p,isBuffer:b,isRegExp:g,maybeMap:F,merge:l},Dd}function FG(){if(YA)return Pd;YA=!0;var e=CG(),t=I6(),n=Nv(),o=Object.prototype.hasOwnProperty,s={brackets:function(F){return F+"[]"},comma:"comma",indices:function(F,S){return F+"["+S+"]"},repeat:function(F){return F}},u=Array.isArray,l=Array.prototype.push,c=function(F,S){l.apply(F,u(S)?S:[S])},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(S,M,A,I,R,T,z,k,L,j,U,$,N,Z,re,ne,X,ue){for(var ye=S,le=ue,ee=0,G=!1;(le=le.get(g))!==void 0&&!G;){var Q=le.get(S);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(M,ye):ye instanceof Date?ye=N(ye):A==="comma"&&u(ye)&&(ye=t.maybeMap(ye,function(te){return te instanceof Date?N(te):te})),ye===null){if(T)return L&&!ne?L(M,p.encoder,X,"key",Z):M;ye=""}if(y(ye)||t.isBuffer(ye)){if(L){var K=ne?M:L(M,p.encoder,X,"key",Z);return[re(K)+"="+re(L(ye,p.encoder,X,"value",Z))]}return[re(M)+"="+re(String(ye))]}var W=[];if(typeof ye>"u")return W;var q;if(A==="comma"&&u(ye))ne&&L&&(ye=t.maybeMap(ye,L)),q=[{value:ye.length>0?ye.join(",")||null:void 0}];else if(u(j))q=j;else{var fe=Object.keys(ye);q=U?fe.sort(U):fe}var ae=k?M.replace(/\./g,"%2E"):M,ie=I&&u(ye)&&ye.length===1?ae+"[]":ae;if(R&&u(ye)&&ye.length===0)return ie+"[]";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=$&&k?O.replace(/\./g,"%2E"):O,se=u(ye)?typeof A=="function"?A(ie,Y):ie:ie+($?"."+Y:"["+Y+"]");ue.set(S,ee);var pe=e();pe.set(g,ue),c(W,F(H,se,A,I,R,T,z,k,A==="comma"&&ne&&u(ye)?null:L,j,U,$,N,Z,re,ne,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 S=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 M=n.default;if(typeof F.format<"u"){if(!o.call(n.formatters,F.format))throw new TypeError("Unknown format option provided.");M=F.format}var A=n.formatters[M],I=p.filter;(typeof F.filter=="function"||u(F.filter))&&(I=F.filter);var R;if(F.arrayFormat in s?R=F.arrayFormat:"indices"in F?R=F.indices?"indices":"repeat":R=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:R,charset:S,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:I,format:M,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,S){var M=F,A=w(S),I,R;typeof A.filter=="function"?(R=A.filter,M=R("",M)):u(A.filter)&&(R=A.filter,I=R);var T=[];if(typeof M!="object"||M===null)return"";var z=s[A.arrayFormat],k=z==="comma"&&A.commaRoundTrip;I||(I=Object.keys(M)),A.sort&&I.sort(A.sort);for(var L=e(),j=0;j<I.length;++j){var U=I[j];A.skipNulls&&M[U]===null||c(T,b(M[U],U,z,k,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,L))}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 OG(){if(VA)return kd;VA=!0;var e=I6(),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))})},u=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 S=b.parameterLimit===1/0?void 0:b.parameterLimit,M=F.split(b.delimiter,S),A=-1,I,R=b.charset;if(b.charsetSentinel)for(I=0;I<M.length;++I)M[I].indexOf("utf8=")===0&&(M[I]===c?R="utf-8":M[I]===l&&(R="iso-8859-1"),A=I,I=M.length);for(I=0;I<M.length;++I)if(I!==A){var T=M[I],z=T.indexOf("]="),k=z===-1?T.indexOf("="):z+1,L,j;k===-1?(L=b.decoder(T,o.decoder,R,"key"),j=b.strictNullHandling?null:""):(L=b.decoder(T.slice(0,k),o.decoder,R,"key"),j=e.maybeMap(u(T.slice(k+1),b),function($){return b.decoder($,o.decoder,R,"value")})),j&&b.interpretNumericEntities&&R==="iso-8859-1"&&(j=s(j)),T.indexOf("[]=")>-1&&(j=n(j)?[j]:j);var U=t.call(w,L);U&&b.duplicates==="combine"?w[L]=e.combine(w[L],j):(!U||b.duplicates==="last")&&(w[L]=j)}return w},f=function(g,b,w,F){for(var S=F?b:u(b,w),M=g.length-1;M>=0;--M){var A,I=g[M];if(I==="[]"&&w.parseArrays)A=w.allowEmptyArrays&&(S===""||w.strictNullHandling&&S===null)?[]:[].concat(S);else{A=w.plainObjects?Object.create(null):{};var R=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,T=w.decodeDotInKeys?R.replace(/%2E/g,"."):R,z=parseInt(T,10);!w.parseArrays&&T===""?A={0:S}:!isNaN(z)&&I!==T&&String(z)===T&&z>=0&&w.parseArrays&&z<=w.arrayLimit?(A=[],A[z]=S):T!=="__proto__"&&(A[T]=S)}S=A}return S},p=function(g,b,w,F){if(g){var S=w.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g,M=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,I=w.depth>0&&M.exec(S),R=I?S.slice(0,I.index):S,T=[];if(R){if(!w.plainObjects&&t.call(Object.prototype,R)&&!w.allowPrototypes)return;T.push(R)}for(var z=0;w.depth>0&&(I=A.exec(S))!==null&&z<w.depth;){if(z+=1,!w.plainObjects&&t.call(Object.prototype,I[1].slice(1,-1))&&!w.allowPrototypes)return;T.push(I[1])}if(I){if(w.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+w.depth+" and strictDepth is true");T.push("["+S.slice(I.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,S=w.plainObjects?Object.create(null):{},M=Object.keys(F),A=0;A<M.length;++A){var I=M[A],R=p(I,F[I],w,typeof g=="string");S=e.merge(S,R,w)}return w.allowSparse===!0?S:e.compact(S)},kd}function TG(){if(WA)return Ld;WA=!0;var e=FG(),t=OG(),n=Nv();return Ld={formats:n,parse:t,stringify:e},Ld}function BG(){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]*)?$/,u=["<",">",'"',"`"," ","\r",`
|
|
159
|
-
`," "],l=["{","}","|","\\","^","`"].concat(u),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},S=TG();function M(T,z,k){if(T&&typeof T=="object"&&T instanceof t)return T;var L=new t;return L.parse(T,z,k),L}t.prototype.parse=function(T,z,k){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var L=T.indexOf("?"),j=L!==-1&&L<T.indexOf("#")?"?":"#",U=T.split(j),$=/\\/g;U[0]=U[0].replace($,"/"),T=U.join(j);var N=T;if(N=N.trim(),!k&&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=S.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 ne=re.toLowerCase();this.protocol=ne,N=N.substr(re.length)}if(k||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 ue=-1,ye=0;ye<f.length;ye++){var le=N.indexOf(f[ye]);le!==-1&&(ue===-1||le<ue)&&(ue=le)}var ee,G;ue===-1?G=N.lastIndexOf("@"):G=N.lastIndexOf("@",ue),G!==-1&&(ee=N.slice(0,G),N=N.slice(G+1),this.auth=decodeURIComponent(ee)),ue=-1;for(var ye=0;ye<h.length;ye++){var le=N.indexOf(h[ye]);le!==-1&&(ue===-1||le<ue)&&(ue=le)}ue===-1&&(ue=N.length),this.host=N.slice(0,ue),N=N.slice(ue),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="",ae=0,ie=q.length;ae<ie;ae++)q.charCodeAt(ae)>127?fe+="x":fe+=q[ae];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[ne])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=S.parse(this.query)),N=N.slice(0,v)):z&&(this.search="",this.query={}),N&&(this.pathname=N),F[ne]&&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=M(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||"",k=this.pathname||"",L=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=S.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||""),k&&k.charAt(0)!=="/"&&(k="/"+k)):j||(j=""),L&&L.charAt(0)!=="#"&&(L="#"+L),$&&$.charAt(0)!=="?"&&($="?"+$),k=k.replace(/[?#]/g,function(N){return encodeURIComponent(N)}),$=$.replace("#","%23"),z+j+k+$+L};function I(T,z){return M(T,!1,!0).resolve(z)}t.prototype.resolve=function(T){return this.resolveObject(M(T,!1,!0)).format()};function R(T,z){return T?M(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 k=new t,L=Object.keys(this),j=0;j<L.length;j++){var U=L[j];k[U]=this[U]}if(k.hash=T.hash,T.href==="")return k.href=k.format(),k;if(T.slashes&&!T.protocol){for(var $=Object.keys(T),N=0;N<$.length;N++){var Z=$[N];Z!=="protocol"&&(k[Z]=T[Z])}return F[k.protocol]&&k.hostname&&!k.pathname&&(k.pathname="/",k.path=k.pathname),k.href=k.format(),k}if(T.protocol&&T.protocol!==k.protocol){if(!F[T.protocol]){for(var re=Object.keys(T),ne=0;ne<re.length;ne++){var X=re[ne];k[X]=T[X]}return k.href=k.format(),k}if(k.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(""),k.pathname=W.join("/")}else k.pathname=T.pathname;if(k.search=T.search,k.query=T.query,k.host=T.host||"",k.auth=T.auth,k.hostname=T.hostname||T.host,k.port=T.port,k.pathname||k.search){var ue=k.pathname||"",ye=k.search||"";k.path=ue+ye}return k.slashes=k.slashes||T.slashes,k.href=k.format(),k}var le=k.pathname&&k.pathname.charAt(0)==="/",ee=T.host||T.pathname&&T.pathname.charAt(0)==="/",G=ee||le||k.host&&T.pathname,Q=G,K=k.pathname&&k.pathname.split("/")||[],W=T.pathname&&T.pathname.split("/")||[],q=k.protocol&&!F[k.protocol];if(q&&(k.hostname="",k.port=null,k.host&&(K[0]===""?K[0]=k.host:K.unshift(k.host)),k.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)k.host=T.host||T.host===""?T.host:k.host,k.hostname=T.hostname||T.hostname===""?T.hostname:k.hostname,k.search=T.search,k.query=T.query,K=W;else if(W.length)K||(K=[]),K.pop(),K=K.concat(W),k.search=T.search,k.query=T.query;else if(T.search!=null){if(q){k.host=K.shift(),k.hostname=k.host;var fe=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;fe&&(k.auth=fe.shift(),k.hostname=fe.shift(),k.host=k.hostname)}return k.search=T.search,k.query=T.query,(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.href=k.format(),k}if(!K.length)return k.pathname=null,k.search?k.path="/"+k.search:k.path=null,k.href=k.format(),k;for(var ae=K.slice(-1)[0],ie=(k.host||T.host||K.length>1)&&(ae==="."||ae==="..")||ae==="",J=0,O=K.length;O>=0;O--)ae=K[O],ae==="."?K.splice(O,1):ae===".."?(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(""),ie&&K.join("/").substr(-1)!=="/"&&K.push("");var H=K[0]===""||K[0]&&K[0].charAt(0)==="/";if(q){k.hostname=H?"":K.length?K.shift():"",k.host=k.hostname;var fe=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;fe&&(k.auth=fe.shift(),k.hostname=fe.shift(),k.host=k.hostname)}return G=G||k.host&&K.length,G&&!H&&K.unshift(""),K.length>0?k.pathname=K.join("/"):(k.pathname=null,k.path=null),(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.auth=T.auth||k.auth,k.slashes=k.slashes||T.slashes,k.href=k.format(),k},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=M,Fs.resolve=I,Fs.resolveObject=R,Fs.format=A,Fs.Url=t,Fs}function _6(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?RG(e):MG(e)}function RG(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(k6,"\\"),n=decodeURIComponent(n),t!=="")return`\\\\${t}${n}`;{let o=n.codePointAt(1)|32,s=n[2];if(o<D6||o>P6||s!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return n.slice(1)}}function MG(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 C6(e){let t=qA.resolve(e),n=e.charCodeAt(e.length-1);(n===N6||Xd&&n===U6)&&t[t.length-1]!==qA.sep&&(t+="/");let o=new URL("file://");return t.includes("%")&&(t=t.replace(L6,"%25")),!Xd&&t.includes("\\")&&(t=t.replace($6,"%5C")),t.includes(`
|
|
160
|
-
`)&&(t=t.replace(z6,"%0A")),t.includes("\r")&&(t=t.replace(q6,"%0D")),t.includes(" ")&&(t=t.replace(H6,"%09")),o.pathname=t,o}var F6,Md,HA,jd,Ud,QA,Nd,GA,Dd,KA,Pd,YA,kd,VA,Ld,WA,Fs,XA,hn,DF,O6,T6,B6,R6,M6,j6,U6,N6,D6,P6,Xd,k6,L6,$6,z6,q6,H6,jG=Ln(()=>{Pe(),Le(),ke(),XQ(),dG(),IG(),E6(),F6=Object.freeze(Object.create(null)),Md={},HA=!1,jd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:mR,Ud={},QA=!1,Nd={},GA=!1,Dd={},KA=!1,Pd={},YA=!1,kd={},VA=!1,Ld={},WA=!1,Fs={},XA=!1,hn=BG(),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=C6,hn.fileURLToPath=_6,O6=hn.Url,T6=hn.format,B6=hn.resolve,R6=hn.resolveObject,M6=hn.parse,j6=hn.URL,U6=92,N6=47,D6=97,P6=122,Xd=DF==="win32",k6=/\//g,L6=/%/g,$6=/\\/g,z6=/\n/g,q6=/\r/g,H6=/\t/g}),UG=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(u,l){let c=new Array(u.length);for(let h=0;h<u.length;h++)typeof u[h].chunk=="string"?c[h]=n.Buffer.from(u[h].chunk,"utf8"):c[h]=u[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(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var n=(Yr(),Vt(Kr)),o=t(UG()),s=t(qo()),u=La(),l=t(Yp()),c=Dv(),h=(0,s.default)("mqttjs:ws"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function p(M,A){let I=`${M.protocol}://${M.hostname}:${M.port}${M.path}`;return typeof M.transformWsUrl=="function"&&(I=M.transformWsUrl(I,M,A)),I}function y(M){let A=M;return M.port||(M.protocol==="wss"?A.port=443:A.port=80),M.path||(A.path="/"),M.wsOptions||(A.wsOptions={}),!l.default&&!M.forceNativeWebSocket&&M.protocol==="wss"&&f.forEach(I=>{Object.prototype.hasOwnProperty.call(M,I)&&!Object.prototype.hasOwnProperty.call(M.wsOptions,I)&&(A.wsOptions[I]=M[I])}),A}function g(M){let A=y(M);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let I=new URL(document.URL);A.hostname=I.hostname,A.port||(A.port=Number(I.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function b(M,A,I){h("createWebSocket"),h(`protocol: ${I.protocolId} ${I.protocolVersion}`);let R=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt";h(`creating new Websocket for url: ${A} and protocol: ${R}`);let T;return I.createWebsocket?T=I.createWebsocket(A,[R],I):T=new o.default(A,[R],I.wsOptions),T}function w(M,A){let I=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",R=p(A,M),T;return A.createWebsocket?T=A.createWebsocket(R,[I],A):T=new WebSocket(R,[I]),T.binaryType="arraybuffer",T}var F=(M,A)=>{h("streamBuilder");let I=y(A);I.hostname=I.hostname||I.host||"localhost";let R=p(I,M),T=b(M,R,I),z=o.default.createWebSocketStream(T,I.wsOptions);return z.url=R,T.on("close",()=>{z.destroy()}),z};e.streamBuilder=F;var S=(M,A)=>{h("browserStreamBuilder");let I,R=g(A).browserBufferSize||1024*512,T=A.browserBufferTimeout||1e3,z=!A.objectMode,k=w(M,A),L=U(A,ne,X);A.objectMode||(L._writev=c.writev.bind(L)),L.on("close",()=>{k.close()});let j=typeof k.addEventListener<"u";k.readyState===k.OPEN?(I=L,I.socket=k):(I=new c.BufferedDuplex(A,L,k),j?k.addEventListener("open",$):k.onopen=$),j?(k.addEventListener("close",N),k.addEventListener("error",Z),k.addEventListener("message",re)):(k.onclose=N,k.onerror=Z,k.onmessage=re);function U(ue,ye,le){let ee=new u.Transform({objectMode:ue.objectMode});return ee._write=ye,ee._flush=le,ee}function $(){h("WebSocket onOpen"),I instanceof c.BufferedDuplex&&I.socketReady()}function N(ue){h("WebSocket onClose",ue),I.end(),I.destroy()}function Z(ue){h("WebSocket onError",ue);let ye=new Error("WebSocket error");ye.event=ue,I.destroy(ye)}async function re(ue){if(!L||!L.readable||!L.writable)return;let{data:ye}=ue;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"),L.push(ye)}function ne(ue,ye,le){if(k.bufferedAmount>R){setTimeout(ne,T,ue,ye,le);return}z&&typeof ue=="string"&&(ue=n.Buffer.from(ue,"utf8"));try{k.send(ue)}catch(ee){return le(ee)}le()}function X(ue){k.close(),ue()}return I};e.browserStreamBuilder=S}),Pv={};ll(Pv,{Server:()=>or,Socket:()=>or,Stream:()=>or,_createServerHandle:()=>or,_normalizeArgs:()=>or,_setSimultaneousAccepts:()=>or,connect:()=>or,createConnection:()=>or,createServer:()=>or,default:()=>Q6,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 Q6,G6=Ln(()=>{Pe(),Le(),ke(),Q6={_createServerHandle:or,_normalizeArgs:or,_setSimultaneousAccepts:or,connect:or,createConnection:or,createServer:or,isIP:or,isIPv4:or,isIPv6:or,Server:or,Socket:or,Stream:or}}),K6=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((G6(),Vt(Pv))),o=t(qo()),s=t(K6()),u=(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 u("port %d and host %s",f,y),n.default.createConnection({port:f,host:y,path:p})};e.default=l}),Y6={};ll(Y6,{default:()=>V6});var V6,NG=Ln(()=>{Pe(),Le(),ke(),V6={}}),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=(NG(),Vt(Y6)),o=t((G6(),Vt(Pv))),s=t(qo()),u=t(K6()),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,u.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,u,l;function c(){let g=new n.Transform;return g._write=(b,w,F)=>{s.send({data:b.buffer,success(){F()},fail(S){F(new Error(S))}})},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"),u.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]}),u=c(),l=new o.BufferedDuplex(b,u,s),l._destroy=(M,A)=>{s.close({success(){A&&A(M)}})};let S=l.destroy;return l.destroy=(M,A)=>(l.destroy=S,setTimeout(()=>{s.close({fail(){l._destroy(M,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,u,l,c=!1;function h(){let b=new n.Transform;return b._write=(w,F,S)=>{s.sendSocketMessage({data:w.buffer,success(){S()},fail(){S(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",S=`${F}://${b.hostname}${b.path}`;return b.port&&b.port!==80&&b.port!==443&&(S=`${F}://${b.hostname}:${b.port}${b.path}`),typeof b.transformWsUrl=="function"&&(S=b.transformWsUrl(S,b,w)),S}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");u.push(w)}else{let w=new FileReader;w.addEventListener("load",()=>{if(w.result instanceof ArrayBuffer){u.push(t.Buffer.from(w.result));return}u.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 S=p(w,b);return s=w.my,s.connectSocket({url:S,protocols:F}),u=h(),l=new o.BufferedDuplex(w,u,s),y(),l};e.default=g}),DG=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((jG(),Vt(S6))),s=t(fA()),u=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,S,M;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),I={};if(A.port!=null&&(I.port=Number(A.port)),I.host=A.hostname,I.query=A.query,I.auth=A.auth,I.protocol=A.protocol,I.path=A.path,g={...I,...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",""):!((S=g.protocol)!=null&&S.startsWith("ws"))&&!((M=g.protocol)!=null&&M.startsWith("wx"))&&delete g.path,h(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),u.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={},!u.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((I,R)=>A&&R%2===0?!1:typeof c[I]=="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 S=f(y,g),M={connect:I=>{A(),w(S)},end:()=>{A(),w(S)},error:I=>{A(),S.end(),F(I)}};b===!1&&(M.close=()=>{M.error(new Error("Couldn't connect to server"))});function A(){Object.keys(M).forEach(I=>{S.off(I,M[I])})}Object.keys(M).forEach(I=>{S.on(I,M[I])})})}e.default=f}),zF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(b,w,F,S){S===void 0&&(S=F);var M=Object.getOwnPropertyDescriptor(w,F);(!M||("get"in M?!w.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return w[F]}}),Object.defineProperty(b,S,M)}:function(b,w,F,S){S===void 0&&(S=F),b[S]=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 S=[];for(var M in F)Object.prototype.hasOwnProperty.call(F,M)&&(S[S.length]=M);return S},b(w)};return function(w){if(w&&w.__esModule)return w;var F={};if(w!=null)for(var S=b(w),M=0;M<S.length;M++)S[M]!=="default"&&t(F,w,S[M]);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)},u=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=u(fA());e.MqttClient=l.default;var c=u(f6());e.DefaultMessageIdProvider=c.default;var h=u(VQ());e.UniqueMessageIdProvider=h.default;var f=u(Y3());e.Store=f.default;var p=o(DG());e.connect=p.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return p.connectAsync}});var y=u(b6());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}})}),PG=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 u=o(zF());e.default=u,s(zF(),e)});const kG=PG();/*! 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 W6=(e=>(e.Posting="posting",e.Finalizing="finalizing",e.Finalized="finalized",e.Rejected="rejected",e))(W6||{});const LG=Sv({name:"BatcherHash",fields:[{name:"batch",type:Ue.String(),indexed:!0},{name:"status",type:Ue.Enum(W6),indexed:!0},{name:"blockHeight",type:Ue.Optional(Ue.Integer())},{name:"transactionHash",type:Ue.String()}]}),$G=Sv({name:"RollupBlock",fields:[{name:"block",type:Ue.Integer(),indexed:!0},{name:"timestamp",type:Ue.Optional(Ue.Integer())}]}),zG=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}]}),X6=[[dd.Batcher,LG],[dd.Node,$G],[dd.Node,zG]],qG=e=>{let t={};for(const n of e)t[n[1].name]=A3(n[0],n[1]);return t},HG=e=>{let t={};for(const n of e)t[n[1].name]=A3(n[0],FH(n[1]));return t},JA=qG(X6);HG(X6);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 QG(){if(QF)return yb;QF=1;var e="/",t="+",n="#";yb={matches:s,extract:l,exec:o,fill:u,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 S=p[F],M=S[0],A=y[F];if(!(!A&&!S)){if(!A&&S!==n)return!1;if(M===n)return F===w;if(M!==t&&S!==A)return!1}}return g===b}function u(h,f){for(var p=h.split(e),y=p.length,g=[],b=0;b<y;b++){var w=p[b],F=w[0],S=w.slice(1),M=f[S];if(F===n){M!==void 0&&g.push([].concat(M).join(e));break}else F===t?g.push(""+M):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],S=F[0];if(F.length!==1)if(S===n){p[F.slice(1)]=g.slice(w);break}else S===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=QG();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 kG.connectAsync(t);return n.on("message",(o,s)=>{for(const[u,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(OH(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),u=async()=>{try{await o.subscribeAsync(s,{qos:2})}catch(h){console.log(`MQTT[${t.topic.broker}] ERROR`,h)}};o.connected?await u():await new Promise(h=>{o.on("connect",async()=>{await u(),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(TH(t.path)),s=Object.fromEntries(Object.entries(n).filter(([l,c])=>o.has(l))),u=Object.fromEntries(Object.entries(n).filter(([l,c])=>!o.has(l)));return await this.sendMessageExplicit({topic:t,filter:s},u)}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 u=Number(n??s+1);for(;s<u;)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 GG=1e3;const KG=async(e,t,n,o)=>{const s=t===n?`${vI}/${encodeURIComponent(e)}/blocks?page=${t}`:`${vI}/${encodeURIComponent(e)}/blocks?from=${t}&to=${n}`,u=await fetch(s);if(!u.ok)return console.warn(`Failed to fetch blocks ${t}-${n} for ${e}: ${u.status}`),[];const l=await u.json(),c=l==null?void 0:l.blocks;return!c||!Array.isArray(c)?[]:c.map(h=>YG(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,u;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??((u=e.header)==null?void 0:u.parentHash)??"",timestamp:new Date}},CARDANO:e=>{var t,n,o,s,u,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:((u=(s=e.block)==null?void 0:s.header)==null?void 0:u.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})},YG=(e,t,n)=>{const s=(VF[t]??VF.DEFAULT)(e,n);return s.number==null||Number.isNaN(s.number)?null:s};function VG(){const[e,t]=Ve.useState({}),[n,o]=Ve.useState(!0),[s,u]=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,I=e)=>{const R=I[A];if(!R)return;const T=R.rpcEndpoint?R.latestBlockNumber||0:R.currentBlock++,z=gb(),L={number:T,hash:z,timestamp:new Date};t(j=>{const U={...j},$=U[A];return $.blocks.some(Z=>Z.number===T)||($.blocks.unshift(L),$.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),u(null);try{const A=await GN();GG=A.Paima.blockTime??1e3,t(A),console.log("✅ Loaded chain configs from API:",A)}catch(A){const I=A instanceof Error?A.message:"Unknown error";u(I),console.error("❌ Failed to load chain configs, using fallback:",I),t({})}finally{o(!1)}},[]),w=Ve.useCallback(A=>{t(I=>{const R={...I};return Object.keys(A).forEach(T=>{const z=R[T];if(z&&!z.rpcEndpoint){const k=[];for(let L=-5;L<0;L++){const j=z.currentBlock+L,U=gb(),$=new Date(Date.now()+L*(z.blockTime??1e3));k.push({number:j,hash:U,timestamp:$})}z.blocks=k.reverse(),z.currentBlock=z.currentBlock+1}}),R})},[]);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(I=>{const R=e[I];if(!R.rpcEndpoint){const T=setInterval(()=>{g(I)},R.blockTime);A.push(T)}}),f.current=!0,()=>{A.forEach(I=>clearInterval(I)),f.current=!1}},[n]),Ve.useEffect(()=>{if(n)return;YF.waitForBlock("__main__");const A=setInterval(()=>{t(I=>{const R={...I};let T=!1;for(const z in R){const k=R[z],L=z==="Paima"?"__main__":k.protocolName||z,j=YF.getLatestBlock(L);if(j>(k.latestBlockNumber||0)&&(T=!0,k.previousLatestBlockNumber=k.latestBlockNumber||0,k.latestBlockNumber=j,k.isConnected=!0,k.previousLatestBlockNumber>0)){const U=gb(),N={number:j,hash:U,timestamp:new Date};k.blocks.some(re=>re.number===j)||(k.blocks.unshift(N),k.blocks.length>20&&(k.blocks=k.blocks.slice(0,20)),c(re=>({...re,[z]:0})),setTimeout(()=>{c(re=>({...re,[z]:void 0}))},500))}}return T?{...R}:I})},500);return()=>clearInterval(A)},[n]),Ve.useEffect(()=>{if(n||p.current!=null)return;const A=()=>{const T=Object.entries(e).filter(([k])=>k!=="Paima");let z=Number.POSITIVE_INFINITY;for(const[,k]of T)typeof k.blockTime=="number"&&k.blockTime>0&&k.blockTime<z&&(z=k.blockTime);return Number.isFinite(z)?Math.max(1e3,z):1e4},I=async()=>{try{const T=await fetch(KN);if(!T.ok)throw new Error(`block-heights HTTP ${T.status}`);const z=await T.json(),k=[];for(const[L,j]of Object.entries(e)){if(L==="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 KG(U,$.synced_page,$.synced_page,j.type);Z.push(...re),Z.length>0&&(k.push({key:L,blocks:Z}),y.current[U]=$.synced_page)}catch{}}k.length>0&&t(L=>{const j={...L};for(const U of k){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,ne)=>ne.number-re.number);$.blocks.unshift(...Z),$.blocks.length>20&&($.blocks=$.blocks.slice(0,20))}}return j})}catch{}};I();const R=A();return console.log(`[Explorer] Engine block-heights polling interval resolved to ${R} ms`),p.current=setInterval(I,R),()=>{p.current!=null&&(clearInterval(p.current),p.current=null)}},[n]);const F=e.Paima,S=(F==null?void 0:F.latestBlockNumber)||0,M=(F==null?void 0:F.isConnected)||!1;return{chainConfigs:e,newBlockIndices:l,latestBlock:S,isConnected:M,isLoadingConfig:n,configError:s}}function WG(){const[t,n]=Ve.useState([]),[o,s]=Ve.useState([]),[u,l]=Ve.useState({}),[c,h]=Ve.useState({}),[f,p]=Ve.useState({}),[y,g]=Ve.useState({}),[b,w]=Ve.useState({}),[F,S]=Ve.useState({}),[M,A]=Ve.useState({}),I=Ve.useRef(!1),R=Ve.useRef([]),T=Ve.useRef([]),z=Ve.useRef({}),k=Ve.useRef({}),L=Ve.useRef({}),j=Ve.useRef({}),U=Ve.useRef(new Set),$=Ve.useRef(new Set);Ve.useEffect(()=>{R.current=t},[t]),Ve.useEffect(()=>{T.current=o},[o]),Ve.useEffect(()=>{z.current=F},[F]),Ve.useEffect(()=>{k.current=M},[M]),Ve.useEffect(()=>{L.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]),ne=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(`${XN}/${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(`${JN}/${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}},[]),ue=Ve.useCallback(async()=>{try{const J=await fetch(CT);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-effectstream-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(`${YN}/${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(WN);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(!(R.current.length===0||!I.current))try{const J=R.current.map(async H=>{const Y=z.current[H],se=L.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(!(!I.current||T.current.length===0))try{const J=T.current.map(async H=>{const Y=k.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(I.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 ue();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 ne(v);return{primitiveName:v,schema:C}}),Y=await Promise.all(H),se={};Y.forEach(({primitiveName:v,schema:C})=>{C&&(se[v]=C)}),S(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=L.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)}},[ue,le,ne,ee]),ae=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]),ie=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(),ae(),ie()]),I.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:u,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=L.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=L.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=L.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=k.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=k.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=k.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=k.current[J],se=await G(J,Y,H);h(pe=>({...pe,[J]:se}))}}}function XG(){const[e,t]=Ve.useState([]),[n,o]=Ve.useState([]),[s,u]=Ve.useState(!1),[l,c]=Ve.useState(!1),{chainConfigs:h,newBlockIndices:f,latestBlock:p,isConnected:y,isLoadingConfig:g,configError:b}=VG(),{primitiveData:w,userTableData:F,scheduledData:S,primitiveNames:M,userTableNames:A,primitivePagination:I,userTablePagination:R,nextPrimitivePage:T,prevPrimitivePage:z,firstPrimitivePage:k,setPrimitiveLimit:L,nextUserTablePage:j,prevUserTablePage:U,firstUserTablePage:$,setUserTableLimit:N}=WG();return Ve.useEffect(()=>{M.length>0&&e.length===0&&t(M)},[M,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:I,onPrev:Z=>z(Z),onNext:Z=>T(Z),onFirst:Z=>k(Z),onLimitChange:(Z,re)=>L(Z,re),children:[Ee.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:Ee.jsx("button",{type:"button",className:"batcher-api-button",onClick:()=>u(!0),children:"Select Primitives"})}),Ee.jsx(BC,{isOpen:s,onClose:()=>u(!1),title:"Select Primitives",tableNames:M,selectedNames:e,onApply:Z=>t(Z.length?Z:[M[0]].filter(Boolean))})]}),Ee.jsxs(fb,{title:"State Machine Tables",tables:Object.fromEntries(Object.entries(F).filter(([Z])=>n.includes(Z))),pagination:R,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(SH,{})]}),Ee.jsx(fb,{title:"Scheduled Data",tables:S})]})}SR.createRoot(document.getElementById("root")).render(Ee.jsx(Ve.StrictMode,{children:Ee.jsx(XG,{})}));
|