mqtt-json-rpc 3.0.0 → 3.0.2

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,4 +1,4 @@
1
- (function(tt,Ye){typeof exports=="object"&&typeof module<"u"?module.exports=Ye():typeof define=="function"&&define.amd?define(Ye):(tt=typeof globalThis<"u"?globalThis:tt||self,tt.MqttJsonRpc=Ye())})(this,(function(){"use strict";var tt={},Ye={};Ye.byteLength=Wo,Ye.toByteArray=$o,Ye.fromByteArray=Jo;for(var qe=[],Le=[],jo=typeof Uint8Array<"u"?Uint8Array:Array,Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=0,Go=Ft.length;rt<Go;++rt)qe[rt]=Ft[rt],Le[Ft.charCodeAt(rt)]=rt;Le[45]=62,Le[95]=63;function Bn(r){var s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=r.indexOf("=");l===-1&&(l=s);var w=l===s?0:4-l%4;return[l,w]}function Wo(r){var s=Bn(r),l=s[0],w=s[1];return(l+w)*3/4-w}function Ho(r,s,l){return(s+l)*3/4-l}function $o(r){var s,l=Bn(r),w=l[0],g=l[1],o=new jo(Ho(r,w,g)),a=0,p=g>0?w-4:w,m;for(m=0;m<p;m+=4)s=Le[r.charCodeAt(m)]<<18|Le[r.charCodeAt(m+1)]<<12|Le[r.charCodeAt(m+2)]<<6|Le[r.charCodeAt(m+3)],o[a++]=s>>16&255,o[a++]=s>>8&255,o[a++]=s&255;return g===2&&(s=Le[r.charCodeAt(m)]<<2|Le[r.charCodeAt(m+1)]>>4,o[a++]=s&255),g===1&&(s=Le[r.charCodeAt(m)]<<10|Le[r.charCodeAt(m+1)]<<4|Le[r.charCodeAt(m+2)]>>2,o[a++]=s>>8&255,o[a++]=s&255),o}function Yo(r){return qe[r>>18&63]+qe[r>>12&63]+qe[r>>6&63]+qe[r&63]}function Vo(r,s,l){for(var w,g=[],o=s;o<l;o+=3)w=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),g.push(Yo(w));return g.join("")}function Jo(r){for(var s,l=r.length,w=l%3,g=[],o=16383,a=0,p=l-w;a<p;a+=o)g.push(Vo(r,a,a+o>p?p:a+o));return w===1?(s=r[l-1],g.push(qe[s>>2]+qe[s<<4&63]+"==")):w===2&&(s=(r[l-2]<<8)+r[l-1],g.push(qe[s>>10]+qe[s>>4&63]+qe[s<<2&63]+"=")),g.join("")}var Ut={};Ut.read=function(r,s,l,w,g){var o,a,p=g*8-w-1,m=(1<<p)-1,b=m>>1,h=-7,x=l?g-1:0,N=l?-1:1,P=r[s+x];for(x+=N,o=P&(1<<-h)-1,P>>=-h,h+=p;h>0;o=o*256+r[s+x],x+=N,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=w;h>0;a=a*256+r[s+x],x+=N,h-=8);if(o===0)o=1-b;else{if(o===m)return a?NaN:(P?-1:1)*(1/0);a=a+Math.pow(2,w),o=o-b}return(P?-1:1)*a*Math.pow(2,o-w)},Ut.write=function(r,s,l,w,g,o){var a,p,m,b=o*8-g-1,h=(1<<b)-1,x=h>>1,N=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=w?0:o-1,E=w?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(p=isNaN(s)?1:0,a=h):(a=Math.floor(Math.log(s)/Math.LN2),s*(m=Math.pow(2,-a))<1&&(a--,m*=2),a+x>=1?s+=N/m:s+=N*Math.pow(2,1-x),s*m>=2&&(a++,m/=2),a+x>=h?(p=0,a=h):a+x>=1?(p=(s*m-1)*Math.pow(2,g),a=a+x):(p=s*Math.pow(2,x-1)*Math.pow(2,g),a=0));g>=8;r[l+P]=p&255,P+=E,p/=256,g-=8);for(a=a<<g|p,b+=g;b>0;r[l+P]=a&255,P+=E,a/=256,b-=8);r[l+P-E]|=k*128};(function(r){const s=Ye,l=Ut,w=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=h,r.SlowBuffer=v,r.INSPECT_MAX_BYTES=50;const g=2147483647;r.kMaxLength=g;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:p}=globalThis;h.TYPED_ARRAY_SUPPORT=m(),!h.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 m(){try{const d=new o(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,o.prototype),Object.setPrototypeOf(d,e),d.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function b(d){if(d>g)throw new RangeError('The value "'+d+'" is invalid for option "size"');const e=new o(d);return Object.setPrototypeOf(e,h.prototype),e}function h(d,e,n){if(typeof d=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(d)}return x(d,e,n)}h.poolSize=8192;function x(d,e,n){if(typeof d=="string")return k(d,e);if(a.isView(d))return R(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(Oe(d,a)||d&&Oe(d.buffer,a)||typeof p<"u"&&(Oe(d,p)||d&&Oe(d.buffer,p)))return L(d,e,n);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const I=d.valueOf&&d.valueOf();if(I!=null&&I!==d)return h.from(I,e,n);const Y=M(d);if(Y)return Y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return h.from(d[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}h.from=function(d,e,n){return x(d,e,n)},Object.setPrototypeOf(h.prototype,o.prototype),Object.setPrototypeOf(h,o);function N(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function P(d,e,n){return N(d),d<=0?b(d):e!==void 0?typeof n=="string"?b(d).fill(e,n):b(d).fill(e):b(d)}h.alloc=function(d,e,n){return P(d,e,n)};function E(d){return N(d),b(d<0?0:O(d)|0)}h.allocUnsafe=function(d){return E(d)},h.allocUnsafeSlow=function(d){return E(d)};function k(d,e){if((typeof e!="string"||e==="")&&(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=G(d,e)|0;let I=b(n);const Y=I.write(d,e);return Y!==n&&(I=I.slice(0,Y)),I}function j(d){const e=d.length<0?0:O(d.length)|0,n=b(e);for(let I=0;I<e;I+=1)n[I]=d[I]&255;return n}function R(d){if(Oe(d,o)){const e=new o(d);return L(e.buffer,e.byteOffset,e.byteLength)}return j(d)}function L(d,e,n){if(e<0||d.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(d.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let I;return e===void 0&&n===void 0?I=new o(d):n===void 0?I=new o(d,e):I=new o(d,e,n),Object.setPrototypeOf(I,h.prototype),I}function M(d){if(h.isBuffer(d)){const e=O(d.length)|0,n=b(e);return n.length===0||d.copy(n,0,0,e),n}if(d.length!==void 0)return typeof d.length!="number"||Ce(d.length)?b(0):j(d);if(d.type==="Buffer"&&Array.isArray(d.data))return j(d.data)}function O(d){if(d>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return d|0}function v(d){return+d!=d&&(d=0),h.alloc(+d)}h.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==h.prototype},h.compare=function(e,n){if(Oe(e,o)&&(e=h.from(e,e.offset,e.byteLength)),Oe(n,o)&&(n=h.from(n,n.offset,n.byteLength)),!h.isBuffer(e)||!h.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===n)return 0;let I=e.length,Y=n.length;for(let X=0,re=Math.min(I,Y);X<re;++X)if(e[X]!==n[X]){I=e[X],Y=n[X];break}return I<Y?-1:Y<I?1:0},h.isEncoding=function(e){switch(String(e).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}},h.concat=function(e,n){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return h.alloc(0);let I;if(n===void 0)for(n=0,I=0;I<e.length;++I)n+=e[I].length;const Y=h.allocUnsafe(n);let X=0;for(I=0;I<e.length;++I){let re=e[I];if(Oe(re,o))X+re.length>Y.length?(h.isBuffer(re)||(re=h.from(re)),re.copy(Y,X)):o.prototype.set.call(Y,re,X);else if(h.isBuffer(re))re.copy(Y,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=re.length}return Y};function G(d,e){if(h.isBuffer(d))return d.length;if(a.isView(d)||Oe(d,a))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);const n=d.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&n===0)return 0;let Y=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Ne(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Ae(d).length;default:if(Y)return I?-1:Ne(d).length;e=(""+e).toLowerCase(),Y=!0}}h.byteLength=G;function F(d,e,n){let I=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,e>>>=0,n<=e))return"";for(d||(d="utf8");;)switch(d){case"hex":return c(this,e,n);case"utf8":case"utf-8":return ae(this,e,n);case"ascii":return de(this,e,n);case"latin1":case"binary":return pe(this,e,n);case"base64":return oe(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n);default:if(I)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),I=!0}}h.prototype._isBuffer=!0;function z(d,e,n){const I=d[e];d[e]=d[n],d[n]=I}h.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<e;n+=2)z(this,n,n+1);return this},h.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<e;n+=4)z(this,n,n+3),z(this,n+1,n+2);return this},h.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<e;n+=8)z(this,n,n+7),z(this,n+1,n+6),z(this,n+2,n+5),z(this,n+3,n+4);return this},h.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?ae(this,0,e):F.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:h.compare(this,e)===0},h.prototype.inspect=function(){let e="";const n=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},w&&(h.prototype[w]=h.prototype.inspect),h.prototype.compare=function(e,n,I,Y,X){if(Oe(e,o)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(n===void 0&&(n=0),I===void 0&&(I=e?e.length:0),Y===void 0&&(Y=0),X===void 0&&(X=this.length),n<0||I>e.length||Y<0||X>this.length)throw new RangeError("out of range index");if(Y>=X&&n>=I)return 0;if(Y>=X)return-1;if(n>=I)return 1;if(n>>>=0,I>>>=0,Y>>>=0,X>>>=0,this===e)return 0;let re=X-Y,we=I-n;const Se=Math.min(re,we),Ie=this.slice(Y,X),Be=e.slice(n,I);for(let Ee=0;Ee<Se;++Ee)if(Ie[Ee]!==Be[Ee]){re=Ie[Ee],we=Be[Ee];break}return re<we?-1:we<re?1:0};function K(d,e,n,I,Y){if(d.length===0)return-1;if(typeof n=="string"?(I=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Ce(n)&&(n=Y?0:d.length-1),n<0&&(n=d.length+n),n>=d.length){if(Y)return-1;n=d.length-1}else if(n<0)if(Y)n=0;else return-1;if(typeof e=="string"&&(e=h.from(e,I)),h.isBuffer(e))return e.length===0?-1:ee(d,e,n,I,Y);if(typeof e=="number")return e=e&255,typeof o.prototype.indexOf=="function"?Y?o.prototype.indexOf.call(d,e,n):o.prototype.lastIndexOf.call(d,e,n):ee(d,[e],n,I,Y);throw new TypeError("val must be string, number or Buffer")}function ee(d,e,n,I,Y){let X=1,re=d.length,we=e.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(d.length<2||e.length<2)return-1;X=2,re/=2,we/=2,n/=2}function Se(Be,Ee){return X===1?Be[Ee]:Be.readUInt16BE(Ee*X)}let Ie;if(Y){let Be=-1;for(Ie=n;Ie<re;Ie++)if(Se(d,Ie)===Se(e,Be===-1?0:Ie-Be)){if(Be===-1&&(Be=Ie),Ie-Be+1===we)return Be*X}else Be!==-1&&(Ie-=Ie-Be),Be=-1}else for(n+we>re&&(n=re-we),Ie=n;Ie>=0;Ie--){let Be=!0;for(let Ee=0;Ee<we;Ee++)if(Se(d,Ie+Ee)!==Se(e,Ee)){Be=!1;break}if(Be)return Ie}return-1}h.prototype.includes=function(e,n,I){return this.indexOf(e,n,I)!==-1},h.prototype.indexOf=function(e,n,I){return K(this,e,n,I,!0)},h.prototype.lastIndexOf=function(e,n,I){return K(this,e,n,I,!1)};function Q(d,e,n,I){n=Number(n)||0;const Y=d.length-n;I?(I=Number(I),I>Y&&(I=Y)):I=Y;const X=e.length;I>X/2&&(I=X/2);let re;for(re=0;re<I;++re){const we=parseInt(e.substr(re*2,2),16);if(Ce(we))return re;d[n+re]=we}return re}function C(d,e,n,I){return Pe(Ne(e,d.length-n),d,n,I)}function U(d,e,n,I){return Pe(Me(e),d,n,I)}function J(d,e,n,I){return Pe(Ae(e),d,n,I)}function se(d,e,n,I){return Pe(_e(e,d.length-n),d,n,I)}h.prototype.write=function(e,n,I,Y){if(n===void 0)Y="utf8",I=this.length,n=0;else if(I===void 0&&typeof n=="string")Y=n,I=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(I)?(I=I>>>0,Y===void 0&&(Y="utf8")):(Y=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-n;if((I===void 0||I>X)&&(I=X),e.length>0&&(I<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");Y||(Y="utf8");let re=!1;for(;;)switch(Y){case"hex":return Q(this,e,n,I);case"utf8":case"utf-8":return C(this,e,n,I);case"ascii":case"latin1":case"binary":return U(this,e,n,I);case"base64":return J(this,e,n,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,e,n,I);default:if(re)throw new TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),re=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(d,e,n){return e===0&&n===d.length?s.fromByteArray(d):s.fromByteArray(d.slice(e,n))}function ae(d,e,n){n=Math.min(d.length,n);const I=[];let Y=e;for(;Y<n;){const X=d[Y];let re=null,we=X>239?4:X>223?3:X>191?2:1;if(Y+we<=n){let Se,Ie,Be,Ee;switch(we){case 1:X<128&&(re=X);break;case 2:Se=d[Y+1],(Se&192)===128&&(Ee=(X&31)<<6|Se&63,Ee>127&&(re=Ee));break;case 3:Se=d[Y+1],Ie=d[Y+2],(Se&192)===128&&(Ie&192)===128&&(Ee=(X&15)<<12|(Se&63)<<6|Ie&63,Ee>2047&&(Ee<55296||Ee>57343)&&(re=Ee));break;case 4:Se=d[Y+1],Ie=d[Y+2],Be=d[Y+3],(Se&192)===128&&(Ie&192)===128&&(Be&192)===128&&(Ee=(X&15)<<18|(Se&63)<<12|(Ie&63)<<6|Be&63,Ee>65535&&Ee<1114112&&(re=Ee))}}re===null?(re=65533,we=1):re>65535&&(re-=65536,I.push(re>>>10&1023|55296),re=56320|re&1023),I.push(re),Y+=we}return ce(I)}const fe=4096;function ce(d){const e=d.length;if(e<=fe)return String.fromCharCode.apply(String,d);let n="",I=0;for(;I<e;)n+=String.fromCharCode.apply(String,d.slice(I,I+=fe));return n}function de(d,e,n){let I="";n=Math.min(d.length,n);for(let Y=e;Y<n;++Y)I+=String.fromCharCode(d[Y]&127);return I}function pe(d,e,n){let I="";n=Math.min(d.length,n);for(let Y=e;Y<n;++Y)I+=String.fromCharCode(d[Y]);return I}function c(d,e,n){const I=d.length;(!e||e<0)&&(e=0),(!n||n<0||n>I)&&(n=I);let Y="";for(let X=e;X<n;++X)Y+=ke[d[X]];return Y}function A(d,e,n){const I=d.slice(e,n);let Y="";for(let X=0;X<I.length-1;X+=2)Y+=String.fromCharCode(I[X]+I[X+1]*256);return Y}h.prototype.slice=function(e,n){const I=this.length;e=~~e,n=n===void 0?I:~~n,e<0?(e+=I,e<0&&(e=0)):e>I&&(e=I),n<0?(n+=I,n<0&&(n=0)):n>I&&(n=I),n<e&&(n=e);const Y=this.subarray(e,n);return Object.setPrototypeOf(Y,h.prototype),Y};function _(d,e,n){if(d%1!==0||d<0)throw new RangeError("offset is not uint");if(d+e>n)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e],X=1,re=0;for(;++re<n&&(X*=256);)Y+=this[e+re]*X;return Y},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e+--n],X=1;for(;n>0&&(X*=256);)Y+=this[e+--n]*X;return Y},h.prototype.readUint8=h.prototype.readUInt8=function(e,n){return e=e>>>0,n||_(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,n){return e=e>>>0,n||_(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,n){return e=e>>>0,n||_(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,n){return e=e>>>0,n||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readBigUInt64LE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=n+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,X=this[++e]+this[++e]*2**8+this[++e]*2**16+I*2**24;return BigInt(Y)+(BigInt(X)<<BigInt(32))}),h.prototype.readBigUInt64BE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=n*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],X=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+I;return(BigInt(Y)<<BigInt(32))+BigInt(X)}),h.prototype.readIntLE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e],X=1,re=0;for(;++re<n&&(X*=256);)Y+=this[e+re]*X;return X*=128,Y>=X&&(Y-=Math.pow(2,8*n)),Y},h.prototype.readIntBE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=n,X=1,re=this[e+--Y];for(;Y>0&&(X*=256);)re+=this[e+--Y]*X;return X*=128,re>=X&&(re-=Math.pow(2,8*n)),re},h.prototype.readInt8=function(e,n){return e=e>>>0,n||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},h.prototype.readInt16LE=function(e,n){e=e>>>0,n||_(e,2,this.length);const I=this[e]|this[e+1]<<8;return I&32768?I|4294901760:I},h.prototype.readInt16BE=function(e,n){e=e>>>0,n||_(e,2,this.length);const I=this[e+1]|this[e]<<8;return I&32768?I|4294901760:I},h.prototype.readInt32LE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readBigInt64LE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(I<<24);return(BigInt(Y)<<BigInt(32))+BigInt(n+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),h.prototype.readBigInt64BE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=(n<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(Y)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+I)}),h.prototype.readFloatLE=function(e,n){return e=e>>>0,n||_(e,4,this.length),l.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,n){return e=e>>>0,n||_(e,4,this.length),l.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,n){return e=e>>>0,n||_(e,8,this.length),l.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,n){return e=e>>>0,n||_(e,8,this.length),l.read(this,e,!1,52,8)};function H(d,e,n,I,Y,X){if(!h.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>Y||e<X)throw new RangeError('"value" argument is out of bounds');if(n+I>d.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,n,I,Y){if(e=+e,n=n>>>0,I=I>>>0,!Y){const we=Math.pow(2,8*I)-1;H(this,e,n,I,we,0)}let X=1,re=0;for(this[n]=e&255;++re<I&&(X*=256);)this[n+re]=e/X&255;return n+I},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,n,I,Y){if(e=+e,n=n>>>0,I=I>>>0,!Y){const we=Math.pow(2,8*I)-1;H(this,e,n,I,we,0)}let X=I-1,re=1;for(this[n+X]=e&255;--X>=0&&(re*=256);)this[n+X]=e/re&255;return n+I},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,1,255,0),this[n]=e&255,n+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,65535,0),this[n]=e&255,this[n+1]=e>>>8,n+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,65535,0),this[n]=e>>>8,this[n+1]=e&255,n+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,4294967295,0),this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e&255,n+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,4294967295,0),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4};function T(d,e,n,I,Y){le(e,I,Y,d,n,7);let X=Number(e&BigInt(4294967295));d[n++]=X,X=X>>8,d[n++]=X,X=X>>8,d[n++]=X,X=X>>8,d[n++]=X;let re=Number(e>>BigInt(32)&BigInt(4294967295));return d[n++]=re,re=re>>8,d[n++]=re,re=re>>8,d[n++]=re,re=re>>8,d[n++]=re,n}function S(d,e,n,I,Y){le(e,I,Y,d,n,7);let X=Number(e&BigInt(4294967295));d[n+7]=X,X=X>>8,d[n+6]=X,X=X>>8,d[n+5]=X,X=X>>8,d[n+4]=X;let re=Number(e>>BigInt(32)&BigInt(4294967295));return d[n+3]=re,re=re>>8,d[n+2]=re,re=re>>8,d[n+1]=re,re=re>>8,d[n]=re,n+8}h.prototype.writeBigUInt64LE=Ue(function(e,n=0){return T(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ue(function(e,n=0){return S(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(e,n,I,Y){if(e=+e,n=n>>>0,!Y){const Se=Math.pow(2,8*I-1);H(this,e,n,I,Se-1,-Se)}let X=0,re=1,we=0;for(this[n]=e&255;++X<I&&(re*=256);)e<0&&we===0&&this[n+X-1]!==0&&(we=1),this[n+X]=(e/re>>0)-we&255;return n+I},h.prototype.writeIntBE=function(e,n,I,Y){if(e=+e,n=n>>>0,!Y){const Se=Math.pow(2,8*I-1);H(this,e,n,I,Se-1,-Se)}let X=I-1,re=1,we=0;for(this[n+X]=e&255;--X>=0&&(re*=256);)e<0&&we===0&&this[n+X+1]!==0&&(we=1),this[n+X]=(e/re>>0)-we&255;return n+I},h.prototype.writeInt8=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,1,127,-128),e<0&&(e=255+e+1),this[n]=e&255,n+1},h.prototype.writeInt16LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,32767,-32768),this[n]=e&255,this[n+1]=e>>>8,n+2},h.prototype.writeInt16BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,32767,-32768),this[n]=e>>>8,this[n+1]=e&255,n+2},h.prototype.writeInt32LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,2147483647,-2147483648),this[n]=e&255,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24,n+4},h.prototype.writeInt32BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4},h.prototype.writeBigInt64LE=Ue(function(e,n=0){return T(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ue(function(e,n=0){return S(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $(d,e,n,I,Y,X){if(n+I>d.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(d,e,n,I,Y){return e=+e,n=n>>>0,Y||$(d,e,n,4),l.write(d,e,n,I,23,4),n+4}h.prototype.writeFloatLE=function(e,n,I){return D(this,e,n,!0,I)},h.prototype.writeFloatBE=function(e,n,I){return D(this,e,n,!1,I)};function W(d,e,n,I,Y){return e=+e,n=n>>>0,Y||$(d,e,n,8),l.write(d,e,n,I,52,8),n+8}h.prototype.writeDoubleLE=function(e,n,I){return W(this,e,n,!0,I)},h.prototype.writeDoubleBE=function(e,n,I){return W(this,e,n,!1,I)},h.prototype.copy=function(e,n,I,Y){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(I||(I=0),!Y&&Y!==0&&(Y=this.length),n>=e.length&&(n=e.length),n||(n=0),Y>0&&Y<I&&(Y=I),Y===I||e.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("sourceEnd out of bounds");Y>this.length&&(Y=this.length),e.length-n<Y-I&&(Y=e.length-n+I);const X=Y-I;return this===e&&typeof o.prototype.copyWithin=="function"?this.copyWithin(n,I,Y):o.prototype.set.call(e,this.subarray(I,Y),n),X},h.prototype.fill=function(e,n,I,Y){if(typeof e=="string"){if(typeof n=="string"?(Y=n,n=0,I=this.length):typeof I=="string"&&(Y=I,I=this.length),Y!==void 0&&typeof Y!="string")throw new TypeError("encoding must be a string");if(typeof Y=="string"&&!h.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);if(e.length===1){const re=e.charCodeAt(0);(Y==="utf8"&&re<128||Y==="latin1")&&(e=re)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(n<0||this.length<n||this.length<I)throw new RangeError("Out of range index");if(I<=n)return this;n=n>>>0,I=I===void 0?this.length:I>>>0,e||(e=0);let X;if(typeof e=="number")for(X=n;X<I;++X)this[X]=e;else{const re=h.isBuffer(e)?e:h.from(e,Y),we=re.length;if(we===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(X=0;X<I-n;++X)this[X+n]=re[X%we]}return this};const u={};function f(d,e,n){u[d]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${d}]`,this.stack,delete this.name}get code(){return d}set code(Y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Y,writable:!0})}toString(){return`${this.name} [${d}]: ${this.message}`}}}f("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),f("ERR_INVALID_ARG_TYPE",function(d,e){return`The "${d}" argument must be of type number. Received type ${typeof e}`},TypeError),f("ERR_OUT_OF_RANGE",function(d,e,n){let I=`The value of "${d}" is out of range.`,Y=n;return Number.isInteger(n)&&Math.abs(n)>2**32?Y=q(String(n)):typeof n=="bigint"&&(Y=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(Y=q(Y)),Y+="n"),I+=` It must be ${e}. Received ${Y}`,I},RangeError);function q(d){let e="",n=d.length;const I=d[0]==="-"?1:0;for(;n>=I+4;n-=3)e=`_${d.slice(n-3,n)}${e}`;return`${d.slice(0,n)}${e}`}function ie(d,e,n){ue(e,"offset"),(d[e]===void 0||d[e+n]===void 0)&&he(e,d.length-(n+1))}function le(d,e,n,I,Y,X){if(d>n||d<e){const re=typeof e=="bigint"?"n":"";let we;throw e===0||e===BigInt(0)?we=`>= 0${re} and < 2${re} ** ${(X+1)*8}${re}`:we=`>= -(2${re} ** ${(X+1)*8-1}${re}) and < 2 ** ${(X+1)*8-1}${re}`,new u.ERR_OUT_OF_RANGE("value",we,d)}ie(I,Y,X)}function ue(d,e){if(typeof d!="number")throw new u.ERR_INVALID_ARG_TYPE(e,"number",d)}function he(d,e,n){throw Math.floor(d)!==d?(ue(d,n),new u.ERR_OUT_OF_RANGE("offset","an integer",d)):e<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,d)}const ye=/[^+/0-9A-Za-z-_]/g;function te(d){if(d=d.split("=")[0],d=d.trim().replace(ye,""),d.length<2)return"";for(;d.length%4!==0;)d=d+"=";return d}function Ne(d,e){e=e||1/0;let n;const I=d.length;let Y=null;const X=[];for(let re=0;re<I;++re){if(n=d.charCodeAt(re),n>55295&&n<57344){if(!Y){if(n>56319){(e-=3)>-1&&X.push(239,191,189);continue}else if(re+1===I){(e-=3)>-1&&X.push(239,191,189);continue}Y=n;continue}if(n<56320){(e-=3)>-1&&X.push(239,191,189),Y=n;continue}n=(Y-55296<<10|n-56320)+65536}else Y&&(e-=3)>-1&&X.push(239,191,189);if(Y=null,n<128){if((e-=1)<0)break;X.push(n)}else if(n<2048){if((e-=2)<0)break;X.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;X.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;X.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return X}function Me(d){const e=[];for(let n=0;n<d.length;++n)e.push(d.charCodeAt(n)&255);return e}function _e(d,e){let n,I,Y;const X=[];for(let re=0;re<d.length&&!((e-=2)<0);++re)n=d.charCodeAt(re),I=n>>8,Y=n%256,X.push(Y),X.push(I);return X}function Ae(d){return s.toByteArray(te(d))}function Pe(d,e,n,I){let Y;for(Y=0;Y<I&&!(Y+n>=e.length||Y>=d.length);++Y)e[Y+n]=d[Y];return Y}function Oe(d,e){return d instanceof e||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===e.name}function Ce(d){return d!==d}const ke=(function(){const d="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const I=n*16;for(let Y=0;Y<16;++Y)e[I+Y]=d[n]+d[Y]}return e})();function Ue(d){return typeof BigInt>"u"?Ke:d}function Ke(){throw new Error("BigInt not supported")}})(tt);const Ot=tt.Buffer;var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wt={exports:{}},zo=wt.exports,Tn;function Ko(){return Tn||(Tn=1,(function(r){(function(s,l,w){r.exports=w(s),r.exports.default=r.exports})(zo,"UUID",function(){const s=function(c,A,_,H,T,S){const $=function(D,W){let u=D.toString(16);return u.length<2&&(u="0"+u),W&&(u=u.toUpperCase()),u};for(let D=A;D<=_;D++)T[S++]=$(c[D],H);return T},l=function(c,A,_,H,T){for(let S=A;S<=_;S+=2)H[T++]=parseInt(c.substr(S,2),16)},w="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),g=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],o=function(c,A){let _="",H=0,T=0;for(;H<A;)if(T=T*256+c[H++],H%4===0){let S=52200625;for(;S>=1;){const $=Math.floor(T/S)%85;_+=w[$],S/=85}T=0}return _},a=function(c,A){const _=c.length;if(_%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof A>"u"&&(A=new Array(_*4/5));let H=0,T=0,S=0;for(;H<_;){const $=c.charCodeAt(H++)-32;if($<0||$>=g.length)break;if(S=S*85+g[$],H%5===0){let D=16777216;for(;D>=1;)A[T++]=Math.trunc(S/D%256),D/=256;S=0}}return A},p=function(c,A){const _={ibits:8,obits:8,obigendian:!0};for(const q in A)typeof _[q]<"u"&&(_[q]=A[q]);const H=[];let T=0,S,$,D=0,W,u=0;const f=c.length;for(;D===0&&($=c.charCodeAt(T++)),S=$>>_.ibits-(D+8)&255,D=(D+8)%_.ibits,_.obigendian?u===0?W=S<<_.obits-8:W|=S<<_.obits-8-u:u===0?W=S:W|=S<<u,u=(u+8)%_.obits,!(u===0&&(H.push(W),T>=f)););return H},m=function(c,A){const _={ibits:32,ibigendian:!0};for(const $ in A)typeof _[$]<"u"&&(_[$]=A[$]);let H="",T=4294967295;_.ibits<32&&(T=(1<<_.ibits)-1);const S=c.length;for(let $=0;$<S;$++){const D=c[$]&T;for(let W=0;W<_.ibits;W+=8)_.ibigendian?H+=String.fromCharCode(D>>_.ibits-8-W&255):H+=String.fromCharCode(D>>W&255)}return H},b=8,h=8,x=256,N=function(c,A,_,H,T,S,$,D){return[D,$,S,T,H,_,A,c]},P=function(){return N(0,0,0,0,0,0,0,0)},E=function(c){return c.slice(0)},k=function(c){const A=P();for(let _=0;_<b;_++)A[_]=Math.floor(c%x),c/=x;return A},j=function(c){let A=0;for(let _=b-1;_>=0;_--)A*=x,A+=c[_];return Math.floor(A)},R=function(c,A){let _=0;for(let H=0;H<b;H++)_+=c[H]+A[H],c[H]=Math.floor(_%x),_=Math.floor(_/x);return _},L=function(c,A){let _=0;for(let H=0;H<b;H++)_+=c[H]*A,c[H]=Math.floor(_%x),_=Math.floor(_/x);return _},M=function(c,A){let _,H;const T=new Array(b+b);for(_=0;_<b+b;_++)T[_]=0;let S;for(_=0;_<b;_++){for(S=0,H=0;H<b;H++)S+=c[_]*A[H]+T[_+H],T[_+H]=S%x,S/=x;for(;H<b+b-_;H++)S+=T[_+H],T[_+H]=S%x,S/=x}for(_=0;_<b;_++)c[_]=T[_];return T.slice(b,b+b)},O=function(c,A){for(let _=0;_<b;_++)c[_]&=A[_];return c},v=function(c,A){for(let _=0;_<b;_++)c[_]|=A[_];return c},G=function(c,A){const _=P(),H=Math.floor(A/h);for(let T=0;T<H;T++){let S;for(S=b-1-1;S>=0;S--)_[S+1]=_[S];for(_[0]=c[0],S=0;S<b-1;S++)c[S]=c[S+1];c[S]=0}return j(_)},F=function(c,A){if(A>b*h)throw new Error("ui64_ror: invalid number of bits to shift");const _=new Array(b+b);let H;for(H=0;H<b;H++)_[H+b]=c[H],_[H]=0;const T=Math.floor(A/h),S=A%h;for(H=T;H<b+b-1;H++)_[H-T]=(_[H]>>>S|_[H+1]<<h-S)&(1<<h)-1;for(_[b+b-1-T]=_[b+b-1]>>>S&(1<<h)-1,H=b+b-1-T+1;H<b+b;H++)_[H]=0;for(H=0;H<b;H++)c[H]=_[H+b];return _.slice(0,b)},z=function(c,A){if(A>b*h)throw new Error("ui64_rol: invalid number of bits to shift");const _=new Array(b+b);let H;for(H=0;H<b;H++)_[H+b]=0,_[H]=c[H];const T=Math.floor(A/h),S=A%h;for(H=b-1-T;H>0;H--)_[H+T]=(_[H]<<S|_[H-1]>>>h-S)&(1<<h)-1;for(_[0+T]=_[0]<<S&(1<<h)-1,H=0+T-1;H>=0;H--)_[H]=0;for(H=0;H<b;H++)c[H]=_[H];return _.slice(b,b+b)},K=function(c,A){for(let _=0;_<b;_++)c[_]^=A[_]},ee=function(c,A){const _=(c&65535)+(A&65535);return(c>>16)+(A>>16)+(_>>16)<<16|_&65535},Q=function(c,A){return c<<A&4294967295|c>>>32-A&4294967295},C=function(c,A){function _(f,q,ie,le){return f<20?q&ie|~q&le:f<40?q^ie^le:f<60?q&ie|q&le|ie&le:q^ie^le}function H(f){return f<20?1518500249:f<40?1859775393:f<60?-1894007588:-899497514}c[A>>5]|=128<<24-A%32,c[(A+64>>9<<4)+15]=A;const T=new Array(80);let S=1732584193,$=-271733879,D=-1732584194,W=271733878,u=-1009589776;for(let f=0;f<c.length;f+=16){const q=S,ie=$,le=D,ue=W,he=u;for(let ye=0;ye<80;ye++){ye<16?T[ye]=c[f+ye]:T[ye]=Q(T[ye-3]^T[ye-8]^T[ye-14]^T[ye-16],1);const te=ee(ee(Q(S,5),_(ye,$,D,W)),ee(ee(u,T[ye]),H(ye)));u=W,W=D,D=Q($,30),$=S,S=te}S=ee(S,q),$=ee($,ie),D=ee(D,le),W=ee(W,ue),u=ee(u,he)}return[S,$,D,W,u]},U=function(c){return m(C(p(c,{ibits:8,obits:32,obigendian:!0}),c.length*8),{ibits:32,ibigendian:!0})},J=function(c,A){function _(q,ie,le,ue,he,ye){return ee(Q(ee(ee(ie,q),ee(ue,ye)),he),le)}function H(q,ie,le,ue,he,ye,te){return _(ie&le|~ie&ue,q,ie,he,ye,te)}function T(q,ie,le,ue,he,ye,te){return _(ie&ue|le&~ue,q,ie,he,ye,te)}function S(q,ie,le,ue,he,ye,te){return _(ie^le^ue,q,ie,he,ye,te)}function $(q,ie,le,ue,he,ye,te){return _(le^(ie|~ue),q,ie,he,ye,te)}c[A>>5]|=128<<A%32,c[(A+64>>>9<<4)+14]=A;let D=1732584193,W=-271733879,u=-1732584194,f=271733878;for(let q=0;q<c.length;q+=16){const ie=D,le=W,ue=u,he=f;D=H(D,W,u,f,c[q+0],7,-680876936),f=H(f,D,W,u,c[q+1],12,-389564586),u=H(u,f,D,W,c[q+2],17,606105819),W=H(W,u,f,D,c[q+3],22,-1044525330),D=H(D,W,u,f,c[q+4],7,-176418897),f=H(f,D,W,u,c[q+5],12,1200080426),u=H(u,f,D,W,c[q+6],17,-1473231341),W=H(W,u,f,D,c[q+7],22,-45705983),D=H(D,W,u,f,c[q+8],7,1770035416),f=H(f,D,W,u,c[q+9],12,-1958414417),u=H(u,f,D,W,c[q+10],17,-42063),W=H(W,u,f,D,c[q+11],22,-1990404162),D=H(D,W,u,f,c[q+12],7,1804603682),f=H(f,D,W,u,c[q+13],12,-40341101),u=H(u,f,D,W,c[q+14],17,-1502002290),W=H(W,u,f,D,c[q+15],22,1236535329),D=T(D,W,u,f,c[q+1],5,-165796510),f=T(f,D,W,u,c[q+6],9,-1069501632),u=T(u,f,D,W,c[q+11],14,643717713),W=T(W,u,f,D,c[q+0],20,-373897302),D=T(D,W,u,f,c[q+5],5,-701558691),f=T(f,D,W,u,c[q+10],9,38016083),u=T(u,f,D,W,c[q+15],14,-660478335),W=T(W,u,f,D,c[q+4],20,-405537848),D=T(D,W,u,f,c[q+9],5,568446438),f=T(f,D,W,u,c[q+14],9,-1019803690),u=T(u,f,D,W,c[q+3],14,-187363961),W=T(W,u,f,D,c[q+8],20,1163531501),D=T(D,W,u,f,c[q+13],5,-1444681467),f=T(f,D,W,u,c[q+2],9,-51403784),u=T(u,f,D,W,c[q+7],14,1735328473),W=T(W,u,f,D,c[q+12],20,-1926607734),D=S(D,W,u,f,c[q+5],4,-378558),f=S(f,D,W,u,c[q+8],11,-2022574463),u=S(u,f,D,W,c[q+11],16,1839030562),W=S(W,u,f,D,c[q+14],23,-35309556),D=S(D,W,u,f,c[q+1],4,-1530992060),f=S(f,D,W,u,c[q+4],11,1272893353),u=S(u,f,D,W,c[q+7],16,-155497632),W=S(W,u,f,D,c[q+10],23,-1094730640),D=S(D,W,u,f,c[q+13],4,681279174),f=S(f,D,W,u,c[q+0],11,-358537222),u=S(u,f,D,W,c[q+3],16,-722521979),W=S(W,u,f,D,c[q+6],23,76029189),D=S(D,W,u,f,c[q+9],4,-640364487),f=S(f,D,W,u,c[q+12],11,-421815835),u=S(u,f,D,W,c[q+15],16,530742520),W=S(W,u,f,D,c[q+2],23,-995338651),D=$(D,W,u,f,c[q+0],6,-198630844),f=$(f,D,W,u,c[q+7],10,1126891415),u=$(u,f,D,W,c[q+14],15,-1416354905),W=$(W,u,f,D,c[q+5],21,-57434055),D=$(D,W,u,f,c[q+12],6,1700485571),f=$(f,D,W,u,c[q+3],10,-1894986606),u=$(u,f,D,W,c[q+10],15,-1051523),W=$(W,u,f,D,c[q+1],21,-2054922799),D=$(D,W,u,f,c[q+8],6,1873313359),f=$(f,D,W,u,c[q+15],10,-30611744),u=$(u,f,D,W,c[q+6],15,-1560198380),W=$(W,u,f,D,c[q+13],21,1309151649),D=$(D,W,u,f,c[q+4],6,-145523070),f=$(f,D,W,u,c[q+11],10,-1120210379),u=$(u,f,D,W,c[q+2],15,718787259),W=$(W,u,f,D,c[q+9],21,-343485551),D=ee(D,ie),W=ee(W,le),u=ee(u,ue),f=ee(f,he)}return[D,W,u,f]},se=function(c){return m(J(p(c,{ibits:8,obits:32,obigendian:!1}),c.length*8),{ibits:32,ibigendian:!1})},oe=function(c){this.mul=N(88,81,244,45,76,149,127,45),this.inc=N(20,5,123,126,247,103,129,79),this.mask=N(0,0,0,0,255,255,255,255),this.state=E(this.inc),this.next(),O(this.state,this.mask);let A;c!==void 0?c=k(c>>>0):typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.getRandomValues=="function"?(A=new Uint32Array(2),window.crypto.getRandomValues(A),c=v(k(A[0]>>>0),F(k(A[1]>>>0),32))):typeof globalThis=="object"&&typeof globalThis.crypto=="object"&&typeof globalThis.crypto.getRandomValues=="function"?(A=new Uint32Array(2),globalThis.crypto.getRandomValues(A),c=v(k(A[0]>>>0),F(k(A[1]>>>0),32))):(c=k(Math.random()*4294967295>>>0),v(c,F(k(new Date().getTime()),32))),v(this.state,c),this.next()};oe.prototype.next=function(){const c=E(this.state);M(this.state,this.mul),R(this.state,this.inc);const A=E(c);F(A,18),K(A,c),F(A,27);const _=E(c);F(_,59),O(A,this.mask);const H=j(_),T=E(A);return z(T,32-H),F(A,H),K(A,T),j(A)},oe.prototype.reseed=function(c){if(typeof c!="string")throw new Error("UUID: PCG: seed: invalid argument (string expected)");const A=C(p(c,{ibits:8,obits:32,obigendian:!0}),c.length*8);for(let _=0;_<A.length;_++)K(ae.state,k(A[_]>>>0))};const ae=new oe;oe.reseed=function(c){ae.reseed(c)};const fe=function(c,A){const _=[];for(let H=0;H<c;H++)_[H]=ae.next()%A;return _};let ce=0,de=0;const pe=function(){if(arguments.length===1&&typeof arguments[0]=="string")this.parse.apply(this,arguments);else if(arguments.length>=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(let c=0;c<16;c++)this[c]=0}};return typeof Uint8Array<"u"?pe.prototype=new Uint8Array(16):typeof Ot<"u"?pe.prototype=Ot.alloc(16):pe.prototype=new Array(16),pe.prototype.constructor=pe,pe.prototype.make=function(c){let A;const _=this;if(c===1){const T=new Date().getTime();T!==ce?de=0:de++,ce=T;const S=k(T);L(S,1e3*10),R(S,N(1,178,29,210,19,129,64,0)),de>0&&R(S,k(de));let $;$=G(S,8),_[3]=$&255,$=G(S,8),_[2]=$&255,$=G(S,8),_[1]=$&255,$=G(S,8),_[0]=$&255,$=G(S,8),_[5]=$&255,$=G(S,8),_[4]=$&255,$=G(S,8),_[7]=$&255,$=G(S,8),_[6]=$&15;const D=fe(2,255);_[8]=D[0],_[9]=D[1];const W=fe(6,255);for(W[0]|=3,A=0;A<6;A++)_[10+A]=W[A]}else if(c===4){const H=fe(16,255);for(A=0;A<16;A++)this[A]=H[A]}else if(c===3||c===5){let H="";const T=typeof arguments[1]=="object"&&arguments[1]instanceof pe?arguments[1]:new pe().parse(arguments[1]);for(A=0;A<16;A++)H+=String.fromCharCode(T[A]);H+=arguments[2];const S=c===3?se(H):U(H);for(A=0;A<16;A++)_[A]=S.charCodeAt(A)}else throw new Error("UUID: make: invalid version");return _[6]&=15,_[6]|=c<<4,_[8]&=63,_[8]|=128,_},pe.prototype.format=function(c){let A,_;if(c==="z85")A=o(this,16);else if(c==="b16")_=new Array(32),s(this,0,15,!0,_,0),A=_.join("");else if(c===void 0||c==="std")_=new Array(36),s(this,0,3,!1,_,0),_[8]="-",s(this,4,5,!1,_,9),_[13]="-",s(this,6,7,!1,_,14),_[18]="-",s(this,8,9,!1,_,19),_[23]="-",s(this,10,15,!1,_,24),A=_.join("");else throw new Error("UUID: format: invalid type argument");return A},pe.prototype.toString=function(c){return this.format(c)},pe.prototype.toJSON=function(){return this.format("std")},pe.prototype.parse=function(c,A){if(typeof c!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(A==="z85")a(c,this);else if(A==="b16")l(c,0,35,this,0);else if(A===void 0||A==="std"){const _={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(_[c]!==void 0)c=_[c];else if(!c.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');l(c,0,7,this,0),l(c,9,12,this,4),l(c,14,17,this,6),l(c,19,22,this,8),l(c,24,35,this,10)}return this},pe.prototype.export=function(){const c=new Array(16);for(let A=0;A<16;A++)c[A]=this[A];return c},pe.prototype.import=function(c){if(!(typeof c=="object"&&c instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(c.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(let A=0;A<16;A++){if(typeof c[A]!="number")throw new Error("UUID: import: invalid array element #"+A+" (type Number expected)");if(!(isFinite(c[A])&&Math.floor(c[A])===c[A]))throw new Error("UUID: import: invalid array element #"+A+" (Number with integer value expected)");if(!(c[A]>=0&&c[A]<=255))throw new Error("UUID: import: invalid array element #"+A+" (Number with integer value in range 0...255 expected)");this[A]=c[A]}return this},pe.prototype.compare=function(c){if(typeof c!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(c instanceof pe))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(let A=0;A<16;A++){if(this[A]<c[A])return-1;if(this[A]>c[A])return 1}return 0},pe.prototype.equal=function(c){return this.compare(c)===0},pe.prototype.fold=function(c){if(typeof c>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(c<1||c>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");const A=16/Math.pow(2,c),_=new Array(A);for(let H=0;H<A;H++){let T=0;for(let S=0;H+S<16;S+=A)T^=this[H+S];_[H]=T}return _},pe.PCG=oe,pe})})(wt)),wt.exports}var Xo=Ko();const xn=Rn(Xo);var mt={exports:{}},Fn;function Nt(){if(Fn)return mt.exports;Fn=1;var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(v,G,F){return Function.prototype.apply.call(v,G,F)},l;r&&typeof r.ownKeys=="function"?l=r.ownKeys:Object.getOwnPropertySymbols?l=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:l=function(v){return Object.getOwnPropertyNames(v)};function w(O){console&&console.warn&&console.warn(O)}var g=Number.isNaN||function(v){return v!==v};function o(){o.init.call(this)}mt.exports=o,mt.exports.once=R,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function p(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(O){if(typeof O!="number"||O<0||g(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");a=O}}),o.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},o.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||g(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function m(O){return O._maxListeners===void 0?o.defaultMaxListeners:O._maxListeners}o.prototype.getMaxListeners=function(){return m(this)},o.prototype.emit=function(v){for(var G=[],F=1;F<arguments.length;F++)G.push(arguments[F]);var z=v==="error",K=this._events;if(K!==void 0)z=z&&K.error===void 0;else if(!z)return!1;if(z){var ee;if(G.length>0&&(ee=G[0]),ee instanceof Error)throw ee;var Q=new Error("Unhandled error."+(ee?" ("+ee.message+")":""));throw Q.context=ee,Q}var C=K[v];if(C===void 0)return!1;if(typeof C=="function")s(C,this,G);else for(var U=C.length,J=E(C,U),F=0;F<U;++F)s(J[F],this,G);return!0};function b(O,v,G,F){var z,K,ee;if(p(G),K=O._events,K===void 0?(K=O._events=Object.create(null),O._eventsCount=0):(K.newListener!==void 0&&(O.emit("newListener",v,G.listener?G.listener:G),K=O._events),ee=K[v]),ee===void 0)ee=K[v]=G,++O._eventsCount;else if(typeof ee=="function"?ee=K[v]=F?[G,ee]:[ee,G]:F?ee.unshift(G):ee.push(G),z=m(O),z>0&&ee.length>z&&!ee.warned){ee.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+ee.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=O,Q.type=v,Q.count=ee.length,w(Q)}return O}o.prototype.addListener=function(v,G){return b(this,v,G,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(v,G){return b(this,v,G,!0)};function h(){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 x(O,v,G){var F={fired:!1,wrapFn:void 0,target:O,type:v,listener:G},z=h.bind(F);return z.listener=G,F.wrapFn=z,z}o.prototype.once=function(v,G){return p(G),this.on(v,x(this,v,G)),this},o.prototype.prependOnceListener=function(v,G){return p(G),this.prependListener(v,x(this,v,G)),this},o.prototype.removeListener=function(v,G){var F,z,K,ee,Q;if(p(G),z=this._events,z===void 0)return this;if(F=z[v],F===void 0)return this;if(F===G||F.listener===G)--this._eventsCount===0?this._events=Object.create(null):(delete z[v],z.removeListener&&this.emit("removeListener",v,F.listener||G));else if(typeof F!="function"){for(K=-1,ee=F.length-1;ee>=0;ee--)if(F[ee]===G||F[ee].listener===G){Q=F[ee].listener,K=ee;break}if(K<0)return this;K===0?F.shift():k(F,K),F.length===1&&(z[v]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",v,Q||G)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(v){var G,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[v]),this;if(arguments.length===0){var K=Object.keys(F),ee;for(z=0;z<K.length;++z)ee=K[z],ee!=="removeListener"&&this.removeAllListeners(ee);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(G=F[v],typeof G=="function")this.removeListener(v,G);else if(G!==void 0)for(z=G.length-1;z>=0;z--)this.removeListener(v,G[z]);return this};function N(O,v,G){var F=O._events;if(F===void 0)return[];var z=F[v];return z===void 0?[]:typeof z=="function"?G?[z.listener||z]:[z]:G?j(z):E(z,z.length)}o.prototype.listeners=function(v){return N(this,v,!0)},o.prototype.rawListeners=function(v){return N(this,v,!1)},o.listenerCount=function(O,v){return typeof O.listenerCount=="function"?O.listenerCount(v):P.call(O,v)},o.prototype.listenerCount=P;function P(O){var v=this._events;if(v!==void 0){var G=v[O];if(typeof G=="function")return 1;if(G!==void 0)return G.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(O,v){for(var G=new Array(v),F=0;F<v;++F)G[F]=O[F];return G}function k(O,v){for(;v+1<O.length;v++)O[v]=O[v+1];O.pop()}function j(O){for(var v=new Array(O.length),G=0;G<v.length;++G)v[G]=O[G].listener||O[G];return v}function R(O,v){return new Promise(function(G,F){function z(ee){O.removeListener(v,K),F(ee)}function K(){typeof O.removeListener=="function"&&O.removeListener("error",z),G([].slice.call(arguments))}M(O,v,K,{once:!0}),v!=="error"&&L(O,z,{once:!0})})}function L(O,v,G){typeof O.on=="function"&&M(O,"error",v,G)}function M(O,v,G,F){if(typeof O.on=="function")F.once?O.once(v,G):O.on(v,G);else if(typeof O.addEventListener=="function")O.addEventListener(v,function z(K){F.once&&O.removeEventListener(v,z),G(K)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O)}return mt.exports}var bt={exports:{}},Un;function Ze(){return Un||(Un=1,typeof Object.create=="function"?bt.exports=function(s,l){l&&(s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:bt.exports=function(s,l){if(l){s.super_=l;var w=function(){};w.prototype=l.prototype,s.prototype=new w,s.prototype.constructor=s}}),bt.exports}function Zo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var On={exports:{}},Fe=On.exports={},je,Ge;function Mt(){throw new Error("setTimeout has not been defined")}function Pt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?je=setTimeout:je=Mt}catch{je=Mt}try{typeof clearTimeout=="function"?Ge=clearTimeout:Ge=Pt}catch{Ge=Pt}})();function Nn(r){if(je===setTimeout)return setTimeout(r,0);if((je===Mt||!je)&&setTimeout)return je=setTimeout,setTimeout(r,0);try{return je(r,0)}catch{try{return je.call(null,r,0)}catch{return je.call(this,r,0)}}}function Qo(r){if(Ge===clearTimeout)return clearTimeout(r);if((Ge===Pt||!Ge)&&clearTimeout)return Ge=clearTimeout,clearTimeout(r);try{return Ge(r)}catch{try{return Ge.call(null,r)}catch{return Ge.call(this,r)}}}var He=[],nt=!1,Qe,Et=-1;function es(){!nt||!Qe||(nt=!1,Qe.length?He=Qe.concat(He):Et=-1,He.length&&Mn())}function Mn(){if(!nt){var r=Nn(es);nt=!0;for(var s=He.length;s;){for(Qe=He,He=[];++Et<s;)Qe&&Qe[Et].run();Et=-1,s=He.length}Qe=null,nt=!1,Qo(r)}}Fe.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];He.push(new Pn(r,s)),He.length===1&&!nt&&Nn(Mn)};function Pn(r,s){this.fun=r,this.array=s}Pn.prototype.run=function(){this.fun.apply(null,this.array)},Fe.title="browser",Fe.browser=!0,Fe.env={},Fe.argv=[],Fe.version="",Fe.versions={};function $e(){}Fe.on=$e,Fe.addListener=$e,Fe.once=$e,Fe.off=$e,Fe.removeListener=$e,Fe.removeAllListeners=$e,Fe.emit=$e,Fe.prependListener=$e,Fe.prependOnceListener=$e,Fe.listeners=function(r){return[]},Fe.binding=function(r){throw new Error("process.binding is not supported")},Fe.cwd=function(){return"/"},Fe.chdir=function(r){throw new Error("process.chdir is not supported")},Fe.umask=function(){return 0};var ts=On.exports;const me=Zo(ts);var Lt,Ln;function Cn(){return Ln||(Ln=1,Lt=Nt().EventEmitter),Lt}var Ct={},Dn;function De(){return Dn||(Dn=1,(function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var s={},l={};l.byteLength=h,l.toByteArray=N,l.fromByteArray=k;for(var w=[],g=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,m=a.length;p<m;++p)w[p]=a[p],g[a.charCodeAt(p)]=p;g[45]=62,g[95]=63;function b(L){var M=L.length;if(M%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=L.indexOf("=");O===-1&&(O=M);var v=O===M?0:4-O%4;return[O,v]}function h(L){var M=b(L),O=M[0],v=M[1];return(O+v)*3/4-v}function x(L,M,O){return(M+O)*3/4-O}function N(L){var M,O=b(L),v=O[0],G=O[1],F=new o(x(L,v,G)),z=0,K=G>0?v-4:v,ee;for(ee=0;ee<K;ee+=4)M=g[L.charCodeAt(ee)]<<18|g[L.charCodeAt(ee+1)]<<12|g[L.charCodeAt(ee+2)]<<6|g[L.charCodeAt(ee+3)],F[z++]=M>>16&255,F[z++]=M>>8&255,F[z++]=M&255;return G===2&&(M=g[L.charCodeAt(ee)]<<2|g[L.charCodeAt(ee+1)]>>4,F[z++]=M&255),G===1&&(M=g[L.charCodeAt(ee)]<<10|g[L.charCodeAt(ee+1)]<<4|g[L.charCodeAt(ee+2)]>>2,F[z++]=M>>8&255,F[z++]=M&255),F}function P(L){return w[L>>18&63]+w[L>>12&63]+w[L>>6&63]+w[L&63]}function E(L,M,O){for(var v,G=[],F=M;F<O;F+=3)v=(L[F]<<16&16711680)+(L[F+1]<<8&65280)+(L[F+2]&255),G.push(P(v));return G.join("")}function k(L){for(var M,O=L.length,v=O%3,G=[],F=16383,z=0,K=O-v;z<K;z+=F)G.push(E(L,z,z+F>K?K:z+F));return v===1?(M=L[O-1],G.push(w[M>>2]+w[M<<4&63]+"==")):v===2&&(M=(L[O-2]<<8)+L[O-1],G.push(w[M>>10]+w[M>>4&63]+w[M<<2&63]+"=")),G.join("")}var j={};j.read=function(L,M,O,v,G){var F,z,K=G*8-v-1,ee=(1<<K)-1,Q=ee>>1,C=-7,U=O?G-1:0,J=O?-1:1,se=L[M+U];for(U+=J,F=se&(1<<-C)-1,se>>=-C,C+=K;C>0;F=F*256+L[M+U],U+=J,C-=8);for(z=F&(1<<-C)-1,F>>=-C,C+=v;C>0;z=z*256+L[M+U],U+=J,C-=8);if(F===0)F=1-Q;else{if(F===ee)return z?NaN:(se?-1:1)*(1/0);z=z+Math.pow(2,v),F=F-Q}return(se?-1:1)*z*Math.pow(2,F-v)},j.write=function(L,M,O,v,G,F){var z,K,ee,Q=F*8-G-1,C=(1<<Q)-1,U=C>>1,J=G===23?Math.pow(2,-24)-Math.pow(2,-77):0,se=v?0:F-1,oe=v?1:-1,ae=M<0||M===0&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===1/0?(K=isNaN(M)?1:0,z=C):(z=Math.floor(Math.log(M)/Math.LN2),M*(ee=Math.pow(2,-z))<1&&(z--,ee*=2),z+U>=1?M+=J/ee:M+=J*Math.pow(2,1-U),M*ee>=2&&(z++,ee/=2),z+U>=C?(K=0,z=C):z+U>=1?(K=(M*ee-1)*Math.pow(2,G),z=z+U):(K=M*Math.pow(2,U-1)*Math.pow(2,G),z=0));G>=8;L[O+se]=K&255,se+=oe,K/=256,G-=8);for(z=z<<G|K,Q+=G;Q>0;L[O+se]=z&255,se+=oe,z/=256,Q-=8);L[O+se-oe]|=ae*128};(function(L){const M=l,O=j,v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;L.Buffer=C,L.SlowBuffer=A,L.INSPECT_MAX_BYTES=50;const G=2147483647;L.kMaxLength=G;const{Uint8Array:F,ArrayBuffer:z,SharedArrayBuffer:K}=globalThis;C.TYPED_ARRAY_SUPPORT=ee(),!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 ee(){try{const y=new F(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,F.prototype),Object.setPrototypeOf(y,t),y.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 Q(y){if(y>G)throw new RangeError('The value "'+y+'" is invalid for option "size"');const t=new F(y);return Object.setPrototypeOf(t,C.prototype),t}function C(y,t,i){if(typeof y=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return oe(y)}return U(y,t,i)}C.poolSize=8192;function U(y,t,i){if(typeof y=="string")return ae(y,t);if(z.isView(y))return ce(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(We(y,z)||y&&We(y.buffer,z)||typeof K<"u"&&(We(y,K)||y&&We(y.buffer,K)))return de(y,t,i);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=y.valueOf&&y.valueOf();if(B!=null&&B!==y)return C.from(B,t,i);const V=pe(y);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return C.from(y[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}C.from=function(y,t,i){return U(y,t,i)},Object.setPrototypeOf(C.prototype,F.prototype),Object.setPrototypeOf(C,F);function J(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function se(y,t,i){return J(y),y<=0?Q(y):t!==void 0?typeof i=="string"?Q(y).fill(t,i):Q(y).fill(t):Q(y)}C.alloc=function(y,t,i){return se(y,t,i)};function oe(y){return J(y),Q(y<0?0:c(y)|0)}C.allocUnsafe=function(y){return oe(y)},C.allocUnsafeSlow=function(y){return oe(y)};function ae(y,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const i=_(y,t)|0;let B=Q(i);const V=B.write(y,t);return V!==i&&(B=B.slice(0,V)),B}function fe(y){const t=y.length<0?0:c(y.length)|0,i=Q(t);for(let B=0;B<t;B+=1)i[B]=y[B]&255;return i}function ce(y){if(We(y,F)){const t=new F(y);return de(t.buffer,t.byteOffset,t.byteLength)}return fe(y)}function de(y,t,i){if(t<0||y.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');let B;return t===void 0&&i===void 0?B=new F(y):i===void 0?B=new F(y,t):B=new F(y,t,i),Object.setPrototypeOf(B,C.prototype),B}function pe(y){if(C.isBuffer(y)){const t=c(y.length)|0,i=Q(t);return i.length===0||y.copy(i,0,0,t),i}if(y.length!==void 0)return typeof y.length!="number"||In(y.length)?Q(0):fe(y);if(y.type==="Buffer"&&Array.isArray(y.data))return fe(y.data)}function c(y){if(y>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return y|0}function A(y){return+y!=y&&(y=0),C.alloc(+y)}C.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==C.prototype},C.compare=function(t,i){if(We(t,F)&&(t=C.from(t,t.offset,t.byteLength)),We(i,F)&&(i=C.from(i,i.offset,i.byteLength)),!C.isBuffer(t)||!C.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===i)return 0;let B=t.length,V=i.length;for(let Z=0,ne=Math.min(B,V);Z<ne;++Z)if(t[Z]!==i[Z]){B=t[Z],V=i[Z];break}return B<V?-1:V<B?1:0},C.isEncoding=function(t){switch(String(t).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(t,i){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return C.alloc(0);let B;if(i===void 0)for(i=0,B=0;B<t.length;++B)i+=t[B].length;const V=C.allocUnsafe(i);let Z=0;for(B=0;B<t.length;++B){let ne=t[B];if(We(ne,F))Z+ne.length>V.length?(C.isBuffer(ne)||(ne=C.from(ne)),ne.copy(V,Z)):F.prototype.set.call(V,ne,Z);else if(C.isBuffer(ne))ne.copy(V,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=ne.length}return V};function _(y,t){if(C.isBuffer(y))return y.length;if(z.isView(y)||We(y,z))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);const i=y.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&i===0)return 0;let V=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Se(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Ee(y).length;default:if(V)return B?-1:Se(y).length;t=(""+t).toLowerCase(),V=!0}}C.byteLength=_;function H(y,t,i){let B=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,t>>>=0,i<=t))return"";for(y||(y="utf8");;)switch(y){case"hex":return Ne(this,t,i);case"utf8":case"utf-8":return le(this,t,i);case"ascii":return ye(this,t,i);case"latin1":case"binary":return te(this,t,i);case"base64":return ie(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,t,i);default:if(B)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),B=!0}}C.prototype._isBuffer=!0;function T(y,t,i){const B=y[t];y[t]=y[i],y[i]=B}C.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<t;i+=2)T(this,i,i+1);return this},C.prototype.swap32=function(){const t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<t;i+=4)T(this,i,i+3),T(this,i+1,i+2);return this},C.prototype.swap64=function(){const t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<t;i+=8)T(this,i,i+7),T(this,i+1,i+6),T(this,i+2,i+5),T(this,i+3,i+4);return this},C.prototype.toString=function(){const t=this.length;return t===0?"":arguments.length===0?le(this,0,t):H.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(t){if(!C.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:C.compare(this,t)===0},C.prototype.inspect=function(){let t="";const i=L.INSPECT_MAX_BYTES;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},v&&(C.prototype[v]=C.prototype.inspect),C.prototype.compare=function(t,i,B,V,Z){if(We(t,F)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(i===void 0&&(i=0),B===void 0&&(B=t?t.length:0),V===void 0&&(V=0),Z===void 0&&(Z=this.length),i<0||B>t.length||V<0||Z>this.length)throw new RangeError("out of range index");if(V>=Z&&i>=B)return 0;if(V>=Z)return-1;if(i>=B)return 1;if(i>>>=0,B>>>=0,V>>>=0,Z>>>=0,this===t)return 0;let ne=Z-V,be=B-i;const Te=Math.min(ne,be),Re=this.slice(V,Z),xe=t.slice(i,B);for(let ve=0;ve<Te;++ve)if(Re[ve]!==xe[ve]){ne=Re[ve],be=xe[ve];break}return ne<be?-1:be<ne?1:0};function S(y,t,i,B,V){if(y.length===0)return-1;if(typeof i=="string"?(B=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,In(i)&&(i=V?0:y.length-1),i<0&&(i=y.length+i),i>=y.length){if(V)return-1;i=y.length-1}else if(i<0)if(V)i=0;else return-1;if(typeof t=="string"&&(t=C.from(t,B)),C.isBuffer(t))return t.length===0?-1:$(y,t,i,B,V);if(typeof t=="number")return t=t&255,typeof F.prototype.indexOf=="function"?V?F.prototype.indexOf.call(y,t,i):F.prototype.lastIndexOf.call(y,t,i):$(y,[t],i,B,V);throw new TypeError("val must be string, number or Buffer")}function $(y,t,i,B,V){let Z=1,ne=y.length,be=t.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(y.length<2||t.length<2)return-1;Z=2,ne/=2,be/=2,i/=2}function Te(xe,ve){return Z===1?xe[ve]:xe.readUInt16BE(ve*Z)}let Re;if(V){let xe=-1;for(Re=i;Re<ne;Re++)if(Te(y,Re)===Te(t,xe===-1?0:Re-xe)){if(xe===-1&&(xe=Re),Re-xe+1===be)return xe*Z}else xe!==-1&&(Re-=Re-xe),xe=-1}else for(i+be>ne&&(i=ne-be),Re=i;Re>=0;Re--){let xe=!0;for(let ve=0;ve<be;ve++)if(Te(y,Re+ve)!==Te(t,ve)){xe=!1;break}if(xe)return Re}return-1}C.prototype.includes=function(t,i,B){return this.indexOf(t,i,B)!==-1},C.prototype.indexOf=function(t,i,B){return S(this,t,i,B,!0)},C.prototype.lastIndexOf=function(t,i,B){return S(this,t,i,B,!1)};function D(y,t,i,B){i=Number(i)||0;const V=y.length-i;B?(B=Number(B),B>V&&(B=V)):B=V;const Z=t.length;B>Z/2&&(B=Z/2);let ne;for(ne=0;ne<B;++ne){const be=parseInt(t.substr(ne*2,2),16);if(In(be))return ne;y[i+ne]=be}return ne}function W(y,t,i,B){return xt(Se(t,y.length-i),y,i,B)}function u(y,t,i,B){return xt(Ie(t),y,i,B)}function f(y,t,i,B){return xt(Ee(t),y,i,B)}function q(y,t,i,B){return xt(Be(t,y.length-i),y,i,B)}C.prototype.write=function(t,i,B,V){if(i===void 0)V="utf8",B=this.length,i=0;else if(B===void 0&&typeof i=="string")V=i,B=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(B)?(B=B>>>0,V===void 0&&(V="utf8")):(V=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Z=this.length-i;if((B===void 0||B>Z)&&(B=Z),t.length>0&&(B<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let ne=!1;for(;;)switch(V){case"hex":return D(this,t,i,B);case"utf8":case"utf-8":return W(this,t,i,B);case"ascii":case"latin1":case"binary":return u(this,t,i,B);case"base64":return f(this,t,i,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,i,B);default:if(ne)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),ne=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(y,t,i){return t===0&&i===y.length?M.fromByteArray(y):M.fromByteArray(y.slice(t,i))}function le(y,t,i){i=Math.min(y.length,i);const B=[];let V=t;for(;V<i;){const Z=y[V];let ne=null,be=Z>239?4:Z>223?3:Z>191?2:1;if(V+be<=i){let Te,Re,xe,ve;switch(be){case 1:Z<128&&(ne=Z);break;case 2:Te=y[V+1],(Te&192)===128&&(ve=(Z&31)<<6|Te&63,ve>127&&(ne=ve));break;case 3:Te=y[V+1],Re=y[V+2],(Te&192)===128&&(Re&192)===128&&(ve=(Z&15)<<12|(Te&63)<<6|Re&63,ve>2047&&(ve<55296||ve>57343)&&(ne=ve));break;case 4:Te=y[V+1],Re=y[V+2],xe=y[V+3],(Te&192)===128&&(Re&192)===128&&(xe&192)===128&&(ve=(Z&15)<<18|(Te&63)<<12|(Re&63)<<6|xe&63,ve>65535&&ve<1114112&&(ne=ve))}}ne===null?(ne=65533,be=1):ne>65535&&(ne-=65536,B.push(ne>>>10&1023|55296),ne=56320|ne&1023),B.push(ne),V+=be}return he(B)}const ue=4096;function he(y){const t=y.length;if(t<=ue)return String.fromCharCode.apply(String,y);let i="",B=0;for(;B<t;)i+=String.fromCharCode.apply(String,y.slice(B,B+=ue));return i}function ye(y,t,i){let B="";i=Math.min(y.length,i);for(let V=t;V<i;++V)B+=String.fromCharCode(y[V]&127);return B}function te(y,t,i){let B="";i=Math.min(y.length,i);for(let V=t;V<i;++V)B+=String.fromCharCode(y[V]);return B}function Ne(y,t,i){const B=y.length;(!t||t<0)&&(t=0),(!i||i<0||i>B)&&(i=B);let V="";for(let Z=t;Z<i;++Z)V+=ua[y[Z]];return V}function Me(y,t,i){const B=y.slice(t,i);let V="";for(let Z=0;Z<B.length-1;Z+=2)V+=String.fromCharCode(B[Z]+B[Z+1]*256);return V}C.prototype.slice=function(t,i){const B=this.length;t=~~t,i=i===void 0?B:~~i,t<0?(t+=B,t<0&&(t=0)):t>B&&(t=B),i<0?(i+=B,i<0&&(i=0)):i>B&&(i=B),i<t&&(i=t);const V=this.subarray(t,i);return Object.setPrototypeOf(V,C.prototype),V};function _e(y,t,i){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+t>i)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t],Z=1,ne=0;for(;++ne<i&&(Z*=256);)V+=this[t+ne]*Z;return V},C.prototype.readUintBE=C.prototype.readUIntBE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t+--i],Z=1;for(;i>0&&(Z*=256);)V+=this[t+--i]*Z;return V},C.prototype.readUint8=C.prototype.readUInt8=function(t,i){return t=t>>>0,i||_e(t,1,this.length),this[t]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(t,i){return t=t>>>0,i||_e(t,2,this.length),this[t]|this[t+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(t,i){return t=t>>>0,i||_e(t,2,this.length),this[t]<<8|this[t+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},C.prototype.readBigUInt64LE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=i+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,Z=this[++t]+this[++t]*2**8+this[++t]*2**16+B*2**24;return BigInt(V)+(BigInt(Z)<<BigInt(32))}),C.prototype.readBigUInt64BE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=i*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],Z=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+B;return(BigInt(V)<<BigInt(32))+BigInt(Z)}),C.prototype.readIntLE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t],Z=1,ne=0;for(;++ne<i&&(Z*=256);)V+=this[t+ne]*Z;return Z*=128,V>=Z&&(V-=Math.pow(2,8*i)),V},C.prototype.readIntBE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=i,Z=1,ne=this[t+--V];for(;V>0&&(Z*=256);)ne+=this[t+--V]*Z;return Z*=128,ne>=Z&&(ne-=Math.pow(2,8*i)),ne},C.prototype.readInt8=function(t,i){return t=t>>>0,i||_e(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},C.prototype.readInt16LE=function(t,i){t=t>>>0,i||_e(t,2,this.length);const B=this[t]|this[t+1]<<8;return B&32768?B|4294901760:B},C.prototype.readInt16BE=function(t,i){t=t>>>0,i||_e(t,2,this.length);const B=this[t+1]|this[t]<<8;return B&32768?B|4294901760:B},C.prototype.readInt32LE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},C.prototype.readInt32BE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},C.prototype.readBigInt64LE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(B<<24);return(BigInt(V)<<BigInt(32))+BigInt(i+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),C.prototype.readBigInt64BE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=(i<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(V)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+B)}),C.prototype.readFloatLE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),O.read(this,t,!0,23,4)},C.prototype.readFloatBE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),O.read(this,t,!1,23,4)},C.prototype.readDoubleLE=function(t,i){return t=t>>>0,i||_e(t,8,this.length),O.read(this,t,!0,52,8)},C.prototype.readDoubleBE=function(t,i){return t=t>>>0,i||_e(t,8,this.length),O.read(this,t,!1,52,8)};function Ae(y,t,i,B,V,Z){if(!C.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>V||t<Z)throw new RangeError('"value" argument is out of bounds');if(i+B>y.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(t,i,B,V){if(t=+t,i=i>>>0,B=B>>>0,!V){const be=Math.pow(2,8*B)-1;Ae(this,t,i,B,be,0)}let Z=1,ne=0;for(this[i]=t&255;++ne<B&&(Z*=256);)this[i+ne]=t/Z&255;return i+B},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(t,i,B,V){if(t=+t,i=i>>>0,B=B>>>0,!V){const be=Math.pow(2,8*B)-1;Ae(this,t,i,B,be,0)}let Z=B-1,ne=1;for(this[i+Z]=t&255;--Z>=0&&(ne*=256);)this[i+Z]=t/ne&255;return i+B},C.prototype.writeUint8=C.prototype.writeUInt8=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,1,255,0),this[i]=t&255,i+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,65535,0),this[i]=t&255,this[i+1]=t>>>8,i+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=t&255,i+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255,i+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4};function Pe(y,t,i,B,V){I(t,B,V,y,i,7);let Z=Number(t&BigInt(4294967295));y[i++]=Z,Z=Z>>8,y[i++]=Z,Z=Z>>8,y[i++]=Z,Z=Z>>8,y[i++]=Z;let ne=Number(t>>BigInt(32)&BigInt(4294967295));return y[i++]=ne,ne=ne>>8,y[i++]=ne,ne=ne>>8,y[i++]=ne,ne=ne>>8,y[i++]=ne,i}function Oe(y,t,i,B,V){I(t,B,V,y,i,7);let Z=Number(t&BigInt(4294967295));y[i+7]=Z,Z=Z>>8,y[i+6]=Z,Z=Z>>8,y[i+5]=Z,Z=Z>>8,y[i+4]=Z;let ne=Number(t>>BigInt(32)&BigInt(4294967295));return y[i+3]=ne,ne=ne>>8,y[i+2]=ne,ne=ne>>8,y[i+1]=ne,ne=ne>>8,y[i]=ne,i+8}C.prototype.writeBigUInt64LE=Xe(function(t,i=0){return Pe(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=Xe(function(t,i=0){return Oe(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(t,i,B,V){if(t=+t,i=i>>>0,!V){const Te=Math.pow(2,8*B-1);Ae(this,t,i,B,Te-1,-Te)}let Z=0,ne=1,be=0;for(this[i]=t&255;++Z<B&&(ne*=256);)t<0&&be===0&&this[i+Z-1]!==0&&(be=1),this[i+Z]=(t/ne>>0)-be&255;return i+B},C.prototype.writeIntBE=function(t,i,B,V){if(t=+t,i=i>>>0,!V){const Te=Math.pow(2,8*B-1);Ae(this,t,i,B,Te-1,-Te)}let Z=B-1,ne=1,be=0;for(this[i+Z]=t&255;--Z>=0&&(ne*=256);)t<0&&be===0&&this[i+Z+1]!==0&&(be=1),this[i+Z]=(t/ne>>0)-be&255;return i+B},C.prototype.writeInt8=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=t&255,i+1},C.prototype.writeInt16LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,32767,-32768),this[i]=t&255,this[i+1]=t>>>8,i+2},C.prototype.writeInt16BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=t&255,i+2},C.prototype.writeInt32LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,2147483647,-2147483648),this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},C.prototype.writeInt32BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4},C.prototype.writeBigInt64LE=Xe(function(t,i=0){return Pe(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=Xe(function(t,i=0){return Oe(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ce(y,t,i,B,V,Z){if(i+B>y.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function ke(y,t,i,B,V){return t=+t,i=i>>>0,V||Ce(y,t,i,4),O.write(y,t,i,B,23,4),i+4}C.prototype.writeFloatLE=function(t,i,B){return ke(this,t,i,!0,B)},C.prototype.writeFloatBE=function(t,i,B){return ke(this,t,i,!1,B)};function Ue(y,t,i,B,V){return t=+t,i=i>>>0,V||Ce(y,t,i,8),O.write(y,t,i,B,52,8),i+8}C.prototype.writeDoubleLE=function(t,i,B){return Ue(this,t,i,!0,B)},C.prototype.writeDoubleBE=function(t,i,B){return Ue(this,t,i,!1,B)},C.prototype.copy=function(t,i,B,V){if(!C.isBuffer(t))throw new TypeError("argument should be a Buffer");if(B||(B=0),!V&&V!==0&&(V=this.length),i>=t.length&&(i=t.length),i||(i=0),V>0&&V<B&&(V=B),V===B||t.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),t.length-i<V-B&&(V=t.length-i+B);const Z=V-B;return this===t&&typeof F.prototype.copyWithin=="function"?this.copyWithin(i,B,V):F.prototype.set.call(t,this.subarray(B,V),i),Z},C.prototype.fill=function(t,i,B,V){if(typeof t=="string"){if(typeof i=="string"?(V=i,i=0,B=this.length):typeof B=="string"&&(V=B,B=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!C.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(t.length===1){const ne=t.charCodeAt(0);(V==="utf8"&&ne<128||V==="latin1")&&(t=ne)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(i<0||this.length<i||this.length<B)throw new RangeError("Out of range index");if(B<=i)return this;i=i>>>0,B=B===void 0?this.length:B>>>0,t||(t=0);let Z;if(typeof t=="number")for(Z=i;Z<B;++Z)this[Z]=t;else{const ne=C.isBuffer(t)?t:C.from(t,V),be=ne.length;if(be===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(Z=0;Z<B-i;++Z)this[Z+i]=ne[Z%be]}return this};const Ke={};function d(y,t,i){Ke[y]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}d("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),d("ERR_INVALID_ARG_TYPE",function(y,t){return`The "${y}" argument must be of type number. Received type ${typeof t}`},TypeError),d("ERR_OUT_OF_RANGE",function(y,t,i){let B=`The value of "${y}" is out of range.`,V=i;return Number.isInteger(i)&&Math.abs(i)>2**32?V=e(String(i)):typeof i=="bigint"&&(V=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(V=e(V)),V+="n"),B+=` It must be ${t}. Received ${V}`,B},RangeError);function e(y){let t="",i=y.length;const B=y[0]==="-"?1:0;for(;i>=B+4;i-=3)t=`_${y.slice(i-3,i)}${t}`;return`${y.slice(0,i)}${t}`}function n(y,t,i){Y(t,"offset"),(y[t]===void 0||y[t+i]===void 0)&&X(t,y.length-(i+1))}function I(y,t,i,B,V,Z){if(y>i||y<t){const ne=typeof t=="bigint"?"n":"";let be;throw t===0||t===BigInt(0)?be=`>= 0${ne} and < 2${ne} ** ${(Z+1)*8}${ne}`:be=`>= -(2${ne} ** ${(Z+1)*8-1}${ne}) and < 2 ** ${(Z+1)*8-1}${ne}`,new Ke.ERR_OUT_OF_RANGE("value",be,y)}n(B,V,Z)}function Y(y,t){if(typeof y!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",y)}function X(y,t,i){throw Math.floor(y)!==y?(Y(y,i),new Ke.ERR_OUT_OF_RANGE("offset","an integer",y)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,y)}const re=/[^+/0-9A-Za-z-_]/g;function we(y){if(y=y.split("=")[0],y=y.trim().replace(re,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function Se(y,t){t=t||1/0;let i;const B=y.length;let V=null;const Z=[];for(let ne=0;ne<B;++ne){if(i=y.charCodeAt(ne),i>55295&&i<57344){if(!V){if(i>56319){(t-=3)>-1&&Z.push(239,191,189);continue}else if(ne+1===B){(t-=3)>-1&&Z.push(239,191,189);continue}V=i;continue}if(i<56320){(t-=3)>-1&&Z.push(239,191,189),V=i;continue}i=(V-55296<<10|i-56320)+65536}else V&&(t-=3)>-1&&Z.push(239,191,189);if(V=null,i<128){if((t-=1)<0)break;Z.push(i)}else if(i<2048){if((t-=2)<0)break;Z.push(i>>6|192,i&63|128)}else if(i<65536){if((t-=3)<0)break;Z.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((t-=4)<0)break;Z.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return Z}function Ie(y){const t=[];for(let i=0;i<y.length;++i)t.push(y.charCodeAt(i)&255);return t}function Be(y,t){let i,B,V;const Z=[];for(let ne=0;ne<y.length&&!((t-=2)<0);++ne)i=y.charCodeAt(ne),B=i>>8,V=i%256,Z.push(V),Z.push(B);return Z}function Ee(y){return M.toByteArray(we(y))}function xt(y,t,i,B){let V;for(V=0;V<B&&!(V+i>=t.length||V>=y.length);++V)t[V+i]=y[V];return V}function We(y,t){return y instanceof t||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===t.name}function In(y){return y!==y}const ua=(function(){const y="0123456789abcdef",t=new Array(256);for(let i=0;i<16;++i){const B=i*16;for(let V=0;V<16;++V)t[B+V]=y[i]+y[V]}return t})();function Xe(y){return typeof BigInt>"u"?fa:y}function fa(){throw new Error("BigInt not supported")}})(s);const R=s.Buffer;r.Blob=s.Blob,r.BlobOptions=s.BlobOptions,r.Buffer=s.Buffer,r.File=s.File,r.FileOptions=s.FileOptions,r.INSPECT_MAX_BYTES=s.INSPECT_MAX_BYTES,r.SlowBuffer=s.SlowBuffer,r.TranscodeEncoding=s.TranscodeEncoding,r.atob=s.atob,r.btoa=s.btoa,r.constants=s.constants,r.default=R,r.isAscii=s.isAscii,r.isUtf8=s.isUtf8,r.kMaxLength=s.kMaxLength,r.kStringMaxLength=s.kStringMaxLength,r.resolveObjectURL=s.resolveObjectURL,r.transcode=s.transcode})(Ct)),Ct}var Dt={},kt={},qt,kn;function qn(){return kn||(kn=1,qt=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),w=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(w)!=="[object Symbol]")return!1;var g=42;s[l]=g;for(var o in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var a=Object.getOwnPropertySymbols(s);if(a.length!==1||a[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(s,l);if(p.value!==g||p.enumerable!==!0)return!1}return!0}),qt}var jt,jn;function _t(){if(jn)return jt;jn=1;var r=qn();return jt=function(){return r()&&!!Symbol.toStringTag},jt}var Gt,Gn;function Wn(){return Gn||(Gn=1,Gt=Object),Gt}var Wt,Hn;function rs(){return Hn||(Hn=1,Wt=Error),Wt}var Ht,$n;function ns(){return $n||($n=1,Ht=EvalError),Ht}var $t,Yn;function is(){return Yn||(Yn=1,$t=RangeError),$t}var Yt,Vn;function os(){return Vn||(Vn=1,Yt=ReferenceError),Yt}var Vt,Jn;function zn(){return Jn||(Jn=1,Vt=SyntaxError),Vt}var Jt,Kn;function ft(){return Kn||(Kn=1,Jt=TypeError),Jt}var zt,Xn;function ss(){return Xn||(Xn=1,zt=URIError),zt}var Kt,Zn;function as(){return Zn||(Zn=1,Kt=Math.abs),Kt}var Xt,Qn;function us(){return Qn||(Qn=1,Xt=Math.floor),Xt}var Zt,ei;function fs(){return ei||(ei=1,Zt=Math.max),Zt}var Qt,ti;function ls(){return ti||(ti=1,Qt=Math.min),Qt}var er,ri;function cs(){return ri||(ri=1,er=Math.pow),er}var tr,ni;function hs(){return ni||(ni=1,tr=Math.round),tr}var rr,ii;function ps(){return ii||(ii=1,rr=Number.isNaN||function(s){return s!==s}),rr}var nr,oi;function ds(){if(oi)return nr;oi=1;var r=ps();return nr=function(l){return r(l)||l===0?l:l<0?-1:1},nr}var ir,si;function ys(){return si||(si=1,ir=Object.getOwnPropertyDescriptor),ir}var or,ai;function it(){if(ai)return or;ai=1;var r=ys();if(r)try{r([],"length")}catch{r=null}return or=r,or}var sr,ui;function vt(){if(ui)return sr;ui=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return sr=r,sr}var ar,fi;function gs(){if(fi)return ar;fi=1;var r=typeof Symbol<"u"&&Symbol,s=qn();return ar=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},ar}var ur,li;function ci(){return li||(li=1,ur=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ur}var fr,hi;function pi(){if(hi)return fr;hi=1;var r=Wn();return fr=r.getPrototypeOf||null,fr}var lr,di;function ws(){if(di)return lr;di=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,l=Math.max,w="[object Function]",g=function(m,b){for(var h=[],x=0;x<m.length;x+=1)h[x]=m[x];for(var N=0;N<b.length;N+=1)h[N+m.length]=b[N];return h},o=function(m,b){for(var h=[],x=b,N=0;x<m.length;x+=1,N+=1)h[N]=m[x];return h},a=function(p,m){for(var b="",h=0;h<p.length;h+=1)b+=p[h],h+1<p.length&&(b+=m);return b};return lr=function(m){var b=this;if(typeof b!="function"||s.apply(b)!==w)throw new TypeError(r+b);for(var h=o(arguments,1),x,N=function(){if(this instanceof x){var R=b.apply(this,g(h,arguments));return Object(R)===R?R:this}return b.apply(m,g(h,arguments))},P=l(0,b.length-h.length),E=[],k=0;k<P;k++)E[k]="$"+k;if(x=Function("binder","return function ("+a(E,",")+"){ return binder.apply(this,arguments); }")(N),b.prototype){var j=function(){};j.prototype=b.prototype,x.prototype=new j,j.prototype=null}return x},lr}var cr,yi;function lt(){if(yi)return cr;yi=1;var r=ws();return cr=Function.prototype.bind||r,cr}var hr,gi;function pr(){return gi||(gi=1,hr=Function.prototype.call),hr}var dr,wi;function yr(){return wi||(wi=1,dr=Function.prototype.apply),dr}var gr,mi;function ms(){return mi||(mi=1,gr=typeof Reflect<"u"&&Reflect&&Reflect.apply),gr}var wr,bi;function Ei(){if(bi)return wr;bi=1;var r=lt(),s=yr(),l=pr(),w=ms();return wr=w||r.call(l,s),wr}var mr,_i;function br(){if(_i)return mr;_i=1;var r=lt(),s=ft(),l=pr(),w=Ei();return mr=function(o){if(o.length<1||typeof o[0]!="function")throw new s("a function is required");return w(r,l,o)},mr}var Er,vi;function bs(){if(vi)return Er;vi=1;var r=br(),s=it(),l;try{l=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var w=!!l&&s&&s(Object.prototype,"__proto__"),g=Object,o=g.getPrototypeOf;return Er=w&&typeof w.get=="function"?r([w.get]):typeof o=="function"?function(p){return o(p==null?p:g(p))}:!1,Er}var _r,Ai;function vr(){if(Ai)return _r;Ai=1;var r=ci(),s=pi(),l=bs();return _r=r?function(g){return r(g)}:s?function(g){if(!g||typeof g!="object"&&typeof g!="function")throw new TypeError("getProto: not an object");return s(g)}:l?function(g){return l(g)}:null,_r}var Ar,Si;function Ii(){if(Si)return Ar;Si=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,l=lt();return Ar=l.call(r,s),Ar}var Sr,Bi;function Ri(){if(Bi)return Sr;Bi=1;var r,s=Wn(),l=rs(),w=ns(),g=is(),o=os(),a=zn(),p=ft(),m=ss(),b=as(),h=us(),x=fs(),N=ls(),P=cs(),E=hs(),k=ds(),j=Function,R=function(D){try{return j('"use strict"; return ('+D+").constructor;")()}catch{}},L=it(),M=vt(),O=function(){throw new p},v=L?(function(){try{return arguments.callee,O}catch{try{return L(arguments,"callee").get}catch{return O}}})():O,G=gs()(),F=vr(),z=pi(),K=ci(),ee=yr(),Q=pr(),C={},U=typeof Uint8Array>"u"||!F?r:F(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":G&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l,"%eval%":eval,"%EvalError%":w,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":j,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G&&F?F(F([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G||!F?r:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":L,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":g,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G||!F?r:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G&&F?F(""[Symbol.iterator]()):r,"%Symbol%":G?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":v,"%TypedArray%":U,"%TypeError%":p,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":z,"%Math.abs%":b,"%Math.floor%":h,"%Math.max%":x,"%Math.min%":N,"%Math.pow%":P,"%Math.round%":E,"%Math.sign%":k,"%Reflect.getPrototypeOf%":K};if(F)try{null.error}catch(D){var se=F(F(D));J["%Error.prototype%"]=se}var oe=function D(W){var u;if(W==="%AsyncFunction%")u=R("async function () {}");else if(W==="%GeneratorFunction%")u=R("function* () {}");else if(W==="%AsyncGeneratorFunction%")u=R("async function* () {}");else if(W==="%AsyncGenerator%"){var f=D("%AsyncGeneratorFunction%");f&&(u=f.prototype)}else if(W==="%AsyncIteratorPrototype%"){var q=D("%AsyncGenerator%");q&&F&&(u=F(q.prototype))}return J[W]=u,u},ae={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fe=lt(),ce=Ii(),de=fe.call(Q,Array.prototype.concat),pe=fe.call(ee,Array.prototype.splice),c=fe.call(Q,String.prototype.replace),A=fe.call(Q,String.prototype.slice),_=fe.call(Q,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,S=function(W){var u=A(W,0,1),f=A(W,-1);if(u==="%"&&f!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(f==="%"&&u!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var q=[];return c(W,H,function(ie,le,ue,he){q[q.length]=ue?c(he,T,"$1"):le||ie}),q},$=function(W,u){var f=W,q;if(ce(ae,f)&&(q=ae[f],f="%"+q[0]+"%"),ce(J,f)){var ie=J[f];if(ie===C&&(ie=oe(f)),typeof ie>"u"&&!u)throw new p("intrinsic "+W+" exists, but is not available. Please file an issue!");return{alias:q,name:f,value:ie}}throw new a("intrinsic "+W+" does not exist!")};return Sr=function(W,u){if(typeof W!="string"||W.length===0)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof u!="boolean")throw new p('"allowMissing" argument must be a boolean');if(_(/^%?[^%]*%?$/,W)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var f=S(W),q=f.length>0?f[0]:"",ie=$("%"+q+"%",u),le=ie.name,ue=ie.value,he=!1,ye=ie.alias;ye&&(q=ye[0],pe(f,de([0,1],ye)));for(var te=1,Ne=!0;te<f.length;te+=1){var Me=f[te],_e=A(Me,0,1),Ae=A(Me,-1);if((_e==='"'||_e==="'"||_e==="`"||Ae==='"'||Ae==="'"||Ae==="`")&&_e!==Ae)throw new a("property names with quotes must have matching quotes");if((Me==="constructor"||!Ne)&&(he=!0),q+="."+Me,le="%"+q+"%",ce(J,le))ue=J[le];else if(ue!=null){if(!(Me in ue)){if(!u)throw new p("base intrinsic for "+W+" exists, but the property is not available.");return}if(L&&te+1>=f.length){var Pe=L(ue,Me);Ne=!!Pe,Ne&&"get"in Pe&&!("originalValue"in Pe.get)?ue=Pe.get:ue=ue[Me]}else Ne=ce(ue,Me),ue=ue[Me];Ne&&!he&&(J[le]=ue)}}return ue},Sr}var Ir,Ti;function ct(){if(Ti)return Ir;Ti=1;var r=Ri(),s=br(),l=s([r("%String.prototype.indexOf%")]);return Ir=function(g,o){var a=r(g,!!o);return typeof a=="function"&&l(g,".prototype.")>-1?s([a]):a},Ir}var Br,xi;function Es(){if(xi)return Br;xi=1;var r=_t()(),s=ct(),l=s("Object.prototype.toString"),w=function(p){return r&&p&&typeof p=="object"&&Symbol.toStringTag in p?!1:l(p)==="[object Arguments]"},g=function(p){return w(p)?!0:p!==null&&typeof p=="object"&&"length"in p&&typeof p.length=="number"&&p.length>=0&&l(p)!=="[object Array]"&&"callee"in p&&l(p.callee)==="[object Function]"},o=(function(){return w(arguments)})();return w.isLegacyArguments=g,Br=o?w:g,Br}var Rr,Fi;function _s(){if(Fi)return Rr;Fi=1;var r=ct(),s=_t()(),l=Ii(),w=it(),g;if(s){var o=r("RegExp.prototype.exec"),a={},p=function(){throw a},m={toString:p,valueOf:p};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=p),g=function(N){if(!N||typeof N!="object")return!1;var P=w(N,"lastIndex"),E=P&&l(P,"value");if(!E)return!1;try{o(N,m)}catch(k){return k===a}}}else{var b=r("Object.prototype.toString"),h="[object RegExp]";g=function(N){return!N||typeof N!="object"&&typeof N!="function"?!1:b(N)===h}}return Rr=g,Rr}var Tr,Ui;function vs(){if(Ui)return Tr;Ui=1;var r=ct(),s=_s(),l=r("RegExp.prototype.exec"),w=ft();return Tr=function(o){if(!s(o))throw new w("`regex` must be a RegExp");return function(p){return l(o,p)!==null}},Tr}var xr,Oi;function As(){if(Oi)return xr;Oi=1;const r=function*(){}.constructor;return xr=()=>r,xr}var Fr,Ni;function Ss(){if(Ni)return Fr;Ni=1;var r=ct(),s=vs(),l=s(/^\s*(?:function)?\*/),w=_t()(),g=vr(),o=r("Object.prototype.toString"),a=r("Function.prototype.toString"),p=As();return Fr=function(b){if(typeof b!="function")return!1;if(l(a(b)))return!0;if(!w){var h=o(b);return h==="[object GeneratorFunction]"}if(!g)return!1;var x=p();return x&&g(b)===x.prototype},Fr}var Ur,Mi;function Is(){if(Mi)return Ur;Mi=1;var r=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l,w;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{l=Object.defineProperty({},"length",{get:function(){throw w}}),w={},s(function(){throw 42},null,l)}catch(L){L!==w&&(s=null)}else s=null;var g=/^\s*class\b/,o=function(M){try{var O=r.call(M);return g.test(O)}catch{return!1}},a=function(M){try{return o(M)?!1:(r.call(M),!0)}catch{return!1}},p=Object.prototype.toString,m="[object Object]",b="[object Function]",h="[object GeneratorFunction]",x="[object HTMLAllCollection]",N="[object HTML document.all class]",P="[object HTMLCollection]",E=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),j=function(){return!1};if(typeof document=="object"){var R=document.all;p.call(R)===p.call(document.all)&&(j=function(M){if((k||!M)&&(typeof M>"u"||typeof M=="object"))try{var O=p.call(M);return(O===x||O===N||O===P||O===m)&&M("")==null}catch{}return!1})}return Ur=s?function(M){if(j(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{s(M,null,l)}catch(O){if(O!==w)return!1}return!o(M)&&a(M)}:function(M){if(j(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(E)return a(M);if(o(M))return!1;var O=p.call(M);return O!==b&&O!==h&&!/^\[object HTML/.test(O)?!1:a(M)},Ur}var Or,Pi;function Bs(){if(Pi)return Or;Pi=1;var r=Is(),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,w=function(m,b,h){for(var x=0,N=m.length;x<N;x++)l.call(m,x)&&(h==null?b(m[x],x,m):b.call(h,m[x],x,m))},g=function(m,b,h){for(var x=0,N=m.length;x<N;x++)h==null?b(m.charAt(x),x,m):b.call(h,m.charAt(x),x,m)},o=function(m,b,h){for(var x in m)l.call(m,x)&&(h==null?b(m[x],x,m):b.call(h,m[x],x,m))};function a(p){return s.call(p)==="[object Array]"}return Or=function(m,b,h){if(!r(b))throw new TypeError("iterator must be a function");var x;arguments.length>=3&&(x=h),a(m)?w(m,b,x):typeof m=="string"?g(m,b,x):o(m,b,x)},Or}var Nr,Li;function Rs(){return Li||(Li=1,Nr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Nr}var Mr,Ci;function Ts(){if(Ci)return Mr;Ci=1;var r=Rs(),s=typeof globalThis>"u"?Ve:globalThis;return Mr=function(){for(var w=[],g=0;g<r.length;g++)typeof s[r[g]]=="function"&&(w[w.length]=r[g]);return w},Mr}var Pr={exports:{}},Lr,Di;function xs(){if(Di)return Lr;Di=1;var r=vt(),s=zn(),l=ft(),w=it();return Lr=function(o,a,p){if(!o||typeof o!="object"&&typeof o!="function")throw new l("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new l("`loose`, if provided, must be a boolean");var m=arguments.length>3?arguments[3]:null,b=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,x=arguments.length>6?arguments[6]:!1,N=!!w&&w(o,a);if(r)r(o,a,{configurable:h===null&&N?N.configurable:!h,enumerable:m===null&&N?N.enumerable:!m,value:p,writable:b===null&&N?N.writable:!b});else if(x||!m&&!b&&!h)o[a]=p;else throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Lr}var Cr,ki;function Fs(){if(ki)return Cr;ki=1;var r=vt(),s=function(){return!!r};return s.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},Cr=s,Cr}var Dr,qi;function Us(){if(qi)return Dr;qi=1;var r=Ri(),s=xs(),l=Fs()(),w=it(),g=ft(),o=r("%Math.floor%");return Dr=function(p,m){if(typeof p!="function")throw new g("`fn` is not a function");if(typeof m!="number"||m<0||m>4294967295||o(m)!==m)throw new g("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],h=!0,x=!0;if("length"in p&&w){var N=w(p,"length");N&&!N.configurable&&(h=!1),N&&!N.writable&&(x=!1)}return(h||x||!b)&&(l?s(p,"length",m,!0,!0):s(p,"length",m)),p},Dr}var kr,ji;function Os(){if(ji)return kr;ji=1;var r=lt(),s=yr(),l=Ei();return kr=function(){return l(r,s,arguments)},kr}var Gi;function Ns(){return Gi||(Gi=1,(function(r){var s=Us(),l=vt(),w=br(),g=Os();r.exports=function(a){var p=w(arguments),m=a.length-(arguments.length-1);return s(p,1+(m>0?m:0),!0)},l?l(r.exports,"apply",{value:g}):r.exports.apply=g})(Pr)),Pr.exports}var qr,Wi;function Hi(){if(Wi)return qr;Wi=1;var r=Bs(),s=Ts(),l=Ns(),w=ct(),g=it(),o=vr(),a=w("Object.prototype.toString"),p=_t()(),m=typeof globalThis>"u"?Ve:globalThis,b=s(),h=w("String.prototype.slice"),x=w("Array.prototype.indexOf",!0)||function(j,R){for(var L=0;L<j.length;L+=1)if(j[L]===R)return L;return-1},N={__proto__:null};p&&g&&o?r(b,function(k){var j=new m[k];if(Symbol.toStringTag in j&&o){var R=o(j),L=g(R,Symbol.toStringTag);if(!L&&R){var M=o(R);L=g(M,Symbol.toStringTag)}N["$"+k]=l(L.get)}}):r(b,function(k){var j=new m[k],R=j.slice||j.set;R&&(N["$"+k]=l(R))});var P=function(j){var R=!1;return r(N,function(L,M){if(!R)try{"$"+L(j)===M&&(R=h(M,1))}catch{}}),R},E=function(j){var R=!1;return r(N,function(L,M){if(!R)try{L(j),R=h(M,1)}catch{}}),R};return qr=function(j){if(!j||typeof j!="object")return!1;if(!p){var R=h(a(j),8,-1);return x(b,R)>-1?R:R!=="Object"?!1:E(j)}return g?P(j):null},qr}var jr,$i;function Ms(){if($i)return jr;$i=1;var r=Hi();return jr=function(l){return!!r(l)},jr}var Yi;function Ps(){return Yi||(Yi=1,(function(r){var s=Es(),l=Ss(),w=Hi(),g=Ms();function o(te){return te.call.bind(te)}var a=typeof BigInt<"u",p=typeof Symbol<"u",m=o(Object.prototype.toString),b=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),x=o(Boolean.prototype.valueOf);if(a)var N=o(BigInt.prototype.valueOf);if(p)var P=o(Symbol.prototype.valueOf);function E(te,Ne){if(typeof te!="object")return!1;try{return Ne(te),!0}catch{return!1}}r.isArgumentsObject=s,r.isGeneratorFunction=l,r.isTypedArray=g;function k(te){return typeof Promise<"u"&&te instanceof Promise||te!==null&&typeof te=="object"&&typeof te.then=="function"&&typeof te.catch=="function"}r.isPromise=k;function j(te){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(te):g(te)||A(te)}r.isArrayBufferView=j;function R(te){return w(te)==="Uint8Array"}r.isUint8Array=R;function L(te){return w(te)==="Uint8ClampedArray"}r.isUint8ClampedArray=L;function M(te){return w(te)==="Uint16Array"}r.isUint16Array=M;function O(te){return w(te)==="Uint32Array"}r.isUint32Array=O;function v(te){return w(te)==="Int8Array"}r.isInt8Array=v;function G(te){return w(te)==="Int16Array"}r.isInt16Array=G;function F(te){return w(te)==="Int32Array"}r.isInt32Array=F;function z(te){return w(te)==="Float32Array"}r.isFloat32Array=z;function K(te){return w(te)==="Float64Array"}r.isFloat64Array=K;function ee(te){return w(te)==="BigInt64Array"}r.isBigInt64Array=ee;function Q(te){return w(te)==="BigUint64Array"}r.isBigUint64Array=Q;function C(te){return m(te)==="[object Map]"}C.working=typeof Map<"u"&&C(new Map);function U(te){return typeof Map>"u"?!1:C.working?C(te):te instanceof Map}r.isMap=U;function J(te){return m(te)==="[object Set]"}J.working=typeof Set<"u"&&J(new Set);function se(te){return typeof Set>"u"?!1:J.working?J(te):te instanceof Set}r.isSet=se;function oe(te){return m(te)==="[object WeakMap]"}oe.working=typeof WeakMap<"u"&&oe(new WeakMap);function ae(te){return typeof WeakMap>"u"?!1:oe.working?oe(te):te instanceof WeakMap}r.isWeakMap=ae;function fe(te){return m(te)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function ce(te){return fe(te)}r.isWeakSet=ce;function de(te){return m(te)==="[object ArrayBuffer]"}de.working=typeof ArrayBuffer<"u"&&de(new ArrayBuffer);function pe(te){return typeof ArrayBuffer>"u"?!1:de.working?de(te):te instanceof ArrayBuffer}r.isArrayBuffer=pe;function c(te){return m(te)==="[object DataView]"}c.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&c(new DataView(new ArrayBuffer(1),0,1));function A(te){return typeof DataView>"u"?!1:c.working?c(te):te instanceof DataView}r.isDataView=A;var _=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function H(te){return m(te)==="[object SharedArrayBuffer]"}function T(te){return typeof _>"u"?!1:(typeof H.working>"u"&&(H.working=H(new _)),H.working?H(te):te instanceof _)}r.isSharedArrayBuffer=T;function S(te){return m(te)==="[object AsyncFunction]"}r.isAsyncFunction=S;function $(te){return m(te)==="[object Map Iterator]"}r.isMapIterator=$;function D(te){return m(te)==="[object Set Iterator]"}r.isSetIterator=D;function W(te){return m(te)==="[object Generator]"}r.isGeneratorObject=W;function u(te){return m(te)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=u;function f(te){return E(te,b)}r.isNumberObject=f;function q(te){return E(te,h)}r.isStringObject=q;function ie(te){return E(te,x)}r.isBooleanObject=ie;function le(te){return a&&E(te,N)}r.isBigIntObject=le;function ue(te){return p&&E(te,P)}r.isSymbolObject=ue;function he(te){return f(te)||q(te)||ie(te)||le(te)||ue(te)}r.isBoxedPrimitive=he;function ye(te){return typeof Uint8Array<"u"&&(pe(te)||T(te))}r.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(te){Object.defineProperty(r,te,{enumerable:!1,value:function(){throw new Error(te+" is not supported in userland")}})})})(kt)),kt}var Gr,Vi;function Ls(){return Vi||(Vi=1,Gr=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Gr}var Ji;function zi(){return Ji||(Ji=1,(function(r){var s=Object.getOwnPropertyDescriptors||function(A){for(var _=Object.keys(A),H={},T=0;T<_.length;T++)H[_[T]]=Object.getOwnPropertyDescriptor(A,_[T]);return H},l=/%[sdj%]/g;r.format=function(c){if(!v(c)){for(var A=[],_=0;_<arguments.length;_++)A.push(a(arguments[_]));return A.join(" ")}for(var _=1,H=arguments,T=H.length,S=String(c).replace(l,function(D){if(D==="%%")return"%";if(_>=T)return D;switch(D){case"%s":return String(H[_++]);case"%d":return Number(H[_++]);case"%j":try{return JSON.stringify(H[_++])}catch{return"[Circular]"}default:return D}}),$=H[_];_<T;$=H[++_])L($)||!K($)?S+=" "+$:S+=" "+a($);return S},r.deprecate=function(c,A){if(typeof me<"u"&&me.noDeprecation===!0)return c;if(typeof me>"u")return function(){return r.deprecate(c,A).apply(this,arguments)};var _=!1;function H(){if(!_){if(me.throwDeprecation)throw new Error(A);me.traceDeprecation?console.trace(A):console.error(A),_=!0}return c.apply(this,arguments)}return H};var w={},g=/^$/;if(me.env.NODE_DEBUG){var o=me.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+o+"$","i")}r.debuglog=function(c){if(c=c.toUpperCase(),!w[c])if(g.test(c)){var A=me.pid;w[c]=function(){var _=r.format.apply(r,arguments);console.error("%s %d: %s",c,A,_)}}else w[c]=function(){};return w[c]};function a(c,A){var _={seen:[],stylize:m};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),R(A)?_.showHidden=A:A&&r._extend(_,A),F(_.showHidden)&&(_.showHidden=!1),F(_.depth)&&(_.depth=2),F(_.colors)&&(_.colors=!1),F(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=p),h(_,c,_.depth)}r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function p(c,A){var _=a.styles[A];return _?"\x1B["+a.colors[_][0]+"m"+c+"\x1B["+a.colors[_][1]+"m":c}function m(c,A){return c}function b(c){var A={};return c.forEach(function(_,H){A[_]=!0}),A}function h(c,A,_){if(c.customInspect&&A&&C(A.inspect)&&A.inspect!==r.inspect&&!(A.constructor&&A.constructor.prototype===A)){var H=A.inspect(_,c);return v(H)||(H=h(c,H,_)),H}var T=x(c,A);if(T)return T;var S=Object.keys(A),$=b(S);if(c.showHidden&&(S=Object.getOwnPropertyNames(A)),Q(A)&&(S.indexOf("message")>=0||S.indexOf("description")>=0))return N(A);if(S.length===0){if(C(A)){var D=A.name?": "+A.name:"";return c.stylize("[Function"+D+"]","special")}if(z(A))return c.stylize(RegExp.prototype.toString.call(A),"regexp");if(ee(A))return c.stylize(Date.prototype.toString.call(A),"date");if(Q(A))return N(A)}var W="",u=!1,f=["{","}"];if(j(A)&&(u=!0,f=["[","]"]),C(A)){var q=A.name?": "+A.name:"";W=" [Function"+q+"]"}if(z(A)&&(W=" "+RegExp.prototype.toString.call(A)),ee(A)&&(W=" "+Date.prototype.toUTCString.call(A)),Q(A)&&(W=" "+N(A)),S.length===0&&(!u||A.length==0))return f[0]+W+f[1];if(_<0)return z(A)?c.stylize(RegExp.prototype.toString.call(A),"regexp"):c.stylize("[Object]","special");c.seen.push(A);var ie;return u?ie=P(c,A,_,$,S):ie=S.map(function(le){return E(c,A,_,$,le,u)}),c.seen.pop(),k(ie,W,f)}function x(c,A){if(F(A))return c.stylize("undefined","undefined");if(v(A)){var _="'"+JSON.stringify(A).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(_,"string")}if(O(A))return c.stylize(""+A,"number");if(R(A))return c.stylize(""+A,"boolean");if(L(A))return c.stylize("null","null")}function N(c){return"["+Error.prototype.toString.call(c)+"]"}function P(c,A,_,H,T){for(var S=[],$=0,D=A.length;$<D;++$)fe(A,String($))?S.push(E(c,A,_,H,String($),!0)):S.push("");return T.forEach(function(W){W.match(/^\d+$/)||S.push(E(c,A,_,H,W,!0))}),S}function E(c,A,_,H,T,S){var $,D,W;if(W=Object.getOwnPropertyDescriptor(A,T)||{value:A[T]},W.get?W.set?D=c.stylize("[Getter/Setter]","special"):D=c.stylize("[Getter]","special"):W.set&&(D=c.stylize("[Setter]","special")),fe(H,T)||($="["+T+"]"),D||(c.seen.indexOf(W.value)<0?(L(_)?D=h(c,W.value,null):D=h(c,W.value,_-1),D.indexOf(`
1
+ (function(tt,Ye){typeof exports=="object"&&typeof module<"u"?module.exports=Ye():typeof define=="function"&&define.amd?define(Ye):(tt=typeof globalThis<"u"?globalThis:tt||self,tt.MqttJsonRpc=Ye())})(this,(function(){"use strict";var tt={},Ye={};Ye.byteLength=Wo,Ye.toByteArray=$o,Ye.fromByteArray=Jo;for(var qe=[],Le=[],jo=typeof Uint8Array<"u"?Uint8Array:Array,Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=0,Go=Ft.length;rt<Go;++rt)qe[rt]=Ft[rt],Le[Ft.charCodeAt(rt)]=rt;Le[45]=62,Le[95]=63;function Bn(r){var s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=r.indexOf("=");l===-1&&(l=s);var g=l===s?0:4-l%4;return[l,g]}function Wo(r){var s=Bn(r),l=s[0],g=s[1];return(l+g)*3/4-g}function Ho(r,s,l){return(s+l)*3/4-l}function $o(r){var s,l=Bn(r),g=l[0],w=l[1],o=new jo(Ho(r,g,w)),a=0,p=w>0?g-4:g,m;for(m=0;m<p;m+=4)s=Le[r.charCodeAt(m)]<<18|Le[r.charCodeAt(m+1)]<<12|Le[r.charCodeAt(m+2)]<<6|Le[r.charCodeAt(m+3)],o[a++]=s>>16&255,o[a++]=s>>8&255,o[a++]=s&255;return w===2&&(s=Le[r.charCodeAt(m)]<<2|Le[r.charCodeAt(m+1)]>>4,o[a++]=s&255),w===1&&(s=Le[r.charCodeAt(m)]<<10|Le[r.charCodeAt(m+1)]<<4|Le[r.charCodeAt(m+2)]>>2,o[a++]=s>>8&255,o[a++]=s&255),o}function Yo(r){return qe[r>>18&63]+qe[r>>12&63]+qe[r>>6&63]+qe[r&63]}function Vo(r,s,l){for(var g,w=[],o=s;o<l;o+=3)g=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),w.push(Yo(g));return w.join("")}function Jo(r){for(var s,l=r.length,g=l%3,w=[],o=16383,a=0,p=l-g;a<p;a+=o)w.push(Vo(r,a,a+o>p?p:a+o));return g===1?(s=r[l-1],w.push(qe[s>>2]+qe[s<<4&63]+"==")):g===2&&(s=(r[l-2]<<8)+r[l-1],w.push(qe[s>>10]+qe[s>>4&63]+qe[s<<2&63]+"=")),w.join("")}var Ut={};Ut.read=function(r,s,l,g,w){var o,a,p=w*8-g-1,m=(1<<p)-1,b=m>>1,h=-7,x=l?w-1:0,N=l?-1:1,L=r[s+x];for(x+=N,o=L&(1<<-h)-1,L>>=-h,h+=p;h>0;o=o*256+r[s+x],x+=N,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=g;h>0;a=a*256+r[s+x],x+=N,h-=8);if(o===0)o=1-b;else{if(o===m)return a?NaN:(L?-1:1)*(1/0);a=a+Math.pow(2,g),o=o-b}return(L?-1:1)*a*Math.pow(2,o-g)},Ut.write=function(r,s,l,g,w,o){var a,p,m,b=o*8-w-1,h=(1<<b)-1,x=h>>1,N=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=g?0:o-1,E=g?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(p=isNaN(s)?1:0,a=h):(a=Math.floor(Math.log(s)/Math.LN2),s*(m=Math.pow(2,-a))<1&&(a--,m*=2),a+x>=1?s+=N/m:s+=N*Math.pow(2,1-x),s*m>=2&&(a++,m/=2),a+x>=h?(p=0,a=h):a+x>=1?(p=(s*m-1)*Math.pow(2,w),a=a+x):(p=s*Math.pow(2,x-1)*Math.pow(2,w),a=0));w>=8;r[l+L]=p&255,L+=E,p/=256,w-=8);for(a=a<<w|p,b+=w;b>0;r[l+L]=a&255,L+=E,a/=256,b-=8);r[l+L-E]|=k*128};(function(r){const s=Ye,l=Ut,g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=h,r.SlowBuffer=v,r.INSPECT_MAX_BYTES=50;const w=2147483647;r.kMaxLength=w;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:p}=globalThis;h.TYPED_ARRAY_SUPPORT=m(),!h.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 m(){try{const d=new o(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,o.prototype),Object.setPrototypeOf(d,e),d.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function b(d){if(d>w)throw new RangeError('The value "'+d+'" is invalid for option "size"');const e=new o(d);return Object.setPrototypeOf(e,h.prototype),e}function h(d,e,n){if(typeof d=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(d)}return x(d,e,n)}h.poolSize=8192;function x(d,e,n){if(typeof d=="string")return k(d,e);if(a.isView(d))return R(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(Oe(d,a)||d&&Oe(d.buffer,a)||typeof p<"u"&&(Oe(d,p)||d&&Oe(d.buffer,p)))return M(d,e,n);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const I=d.valueOf&&d.valueOf();if(I!=null&&I!==d)return h.from(I,e,n);const Y=P(d);if(Y)return Y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return h.from(d[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}h.from=function(d,e,n){return x(d,e,n)},Object.setPrototypeOf(h.prototype,o.prototype),Object.setPrototypeOf(h,o);function N(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function L(d,e,n){return N(d),d<=0?b(d):e!==void 0?typeof n=="string"?b(d).fill(e,n):b(d).fill(e):b(d)}h.alloc=function(d,e,n){return L(d,e,n)};function E(d){return N(d),b(d<0?0:O(d)|0)}h.allocUnsafe=function(d){return E(d)},h.allocUnsafeSlow=function(d){return E(d)};function k(d,e){if((typeof e!="string"||e==="")&&(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=G(d,e)|0;let I=b(n);const Y=I.write(d,e);return Y!==n&&(I=I.slice(0,Y)),I}function j(d){const e=d.length<0?0:O(d.length)|0,n=b(e);for(let I=0;I<e;I+=1)n[I]=d[I]&255;return n}function R(d){if(Oe(d,o)){const e=new o(d);return M(e.buffer,e.byteOffset,e.byteLength)}return j(d)}function M(d,e,n){if(e<0||d.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(d.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let I;return e===void 0&&n===void 0?I=new o(d):n===void 0?I=new o(d,e):I=new o(d,e,n),Object.setPrototypeOf(I,h.prototype),I}function P(d){if(h.isBuffer(d)){const e=O(d.length)|0,n=b(e);return n.length===0||d.copy(n,0,0,e),n}if(d.length!==void 0)return typeof d.length!="number"||Ce(d.length)?b(0):j(d);if(d.type==="Buffer"&&Array.isArray(d.data))return j(d.data)}function O(d){if(d>=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return d|0}function v(d){return+d!=d&&(d=0),h.alloc(+d)}h.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==h.prototype},h.compare=function(e,n){if(Oe(e,o)&&(e=h.from(e,e.offset,e.byteLength)),Oe(n,o)&&(n=h.from(n,n.offset,n.byteLength)),!h.isBuffer(e)||!h.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===n)return 0;let I=e.length,Y=n.length;for(let X=0,re=Math.min(I,Y);X<re;++X)if(e[X]!==n[X]){I=e[X],Y=n[X];break}return I<Y?-1:Y<I?1:0},h.isEncoding=function(e){switch(String(e).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}},h.concat=function(e,n){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return h.alloc(0);let I;if(n===void 0)for(n=0,I=0;I<e.length;++I)n+=e[I].length;const Y=h.allocUnsafe(n);let X=0;for(I=0;I<e.length;++I){let re=e[I];if(Oe(re,o))X+re.length>Y.length?(h.isBuffer(re)||(re=h.from(re)),re.copy(Y,X)):o.prototype.set.call(Y,re,X);else if(h.isBuffer(re))re.copy(Y,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=re.length}return Y};function G(d,e){if(h.isBuffer(d))return d.length;if(a.isView(d)||Oe(d,a))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);const n=d.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&n===0)return 0;let Y=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Ne(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Ae(d).length;default:if(Y)return I?-1:Ne(d).length;e=(""+e).toLowerCase(),Y=!0}}h.byteLength=G;function F(d,e,n){let I=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,e>>>=0,n<=e))return"";for(d||(d="utf8");;)switch(d){case"hex":return c(this,e,n);case"utf8":case"utf-8":return ae(this,e,n);case"ascii":return de(this,e,n);case"latin1":case"binary":return pe(this,e,n);case"base64":return oe(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n);default:if(I)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),I=!0}}h.prototype._isBuffer=!0;function z(d,e,n){const I=d[e];d[e]=d[n],d[n]=I}h.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<e;n+=2)z(this,n,n+1);return this},h.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<e;n+=4)z(this,n,n+3),z(this,n+1,n+2);return this},h.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<e;n+=8)z(this,n,n+7),z(this,n+1,n+6),z(this,n+2,n+5),z(this,n+3,n+4);return this},h.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?ae(this,0,e):F.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:h.compare(this,e)===0},h.prototype.inspect=function(){let e="";const n=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},g&&(h.prototype[g]=h.prototype.inspect),h.prototype.compare=function(e,n,I,Y,X){if(Oe(e,o)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(n===void 0&&(n=0),I===void 0&&(I=e?e.length:0),Y===void 0&&(Y=0),X===void 0&&(X=this.length),n<0||I>e.length||Y<0||X>this.length)throw new RangeError("out of range index");if(Y>=X&&n>=I)return 0;if(Y>=X)return-1;if(n>=I)return 1;if(n>>>=0,I>>>=0,Y>>>=0,X>>>=0,this===e)return 0;let re=X-Y,we=I-n;const Se=Math.min(re,we),Ie=this.slice(Y,X),Be=e.slice(n,I);for(let Ee=0;Ee<Se;++Ee)if(Ie[Ee]!==Be[Ee]){re=Ie[Ee],we=Be[Ee];break}return re<we?-1:we<re?1:0};function K(d,e,n,I,Y){if(d.length===0)return-1;if(typeof n=="string"?(I=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Ce(n)&&(n=Y?0:d.length-1),n<0&&(n=d.length+n),n>=d.length){if(Y)return-1;n=d.length-1}else if(n<0)if(Y)n=0;else return-1;if(typeof e=="string"&&(e=h.from(e,I)),h.isBuffer(e))return e.length===0?-1:ee(d,e,n,I,Y);if(typeof e=="number")return e=e&255,typeof o.prototype.indexOf=="function"?Y?o.prototype.indexOf.call(d,e,n):o.prototype.lastIndexOf.call(d,e,n):ee(d,[e],n,I,Y);throw new TypeError("val must be string, number or Buffer")}function ee(d,e,n,I,Y){let X=1,re=d.length,we=e.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(d.length<2||e.length<2)return-1;X=2,re/=2,we/=2,n/=2}function Se(Be,Ee){return X===1?Be[Ee]:Be.readUInt16BE(Ee*X)}let Ie;if(Y){let Be=-1;for(Ie=n;Ie<re;Ie++)if(Se(d,Ie)===Se(e,Be===-1?0:Ie-Be)){if(Be===-1&&(Be=Ie),Ie-Be+1===we)return Be*X}else Be!==-1&&(Ie-=Ie-Be),Be=-1}else for(n+we>re&&(n=re-we),Ie=n;Ie>=0;Ie--){let Be=!0;for(let Ee=0;Ee<we;Ee++)if(Se(d,Ie+Ee)!==Se(e,Ee)){Be=!1;break}if(Be)return Ie}return-1}h.prototype.includes=function(e,n,I){return this.indexOf(e,n,I)!==-1},h.prototype.indexOf=function(e,n,I){return K(this,e,n,I,!0)},h.prototype.lastIndexOf=function(e,n,I){return K(this,e,n,I,!1)};function Q(d,e,n,I){n=Number(n)||0;const Y=d.length-n;I?(I=Number(I),I>Y&&(I=Y)):I=Y;const X=e.length;I>X/2&&(I=X/2);let re;for(re=0;re<I;++re){const we=parseInt(e.substr(re*2,2),16);if(Ce(we))return re;d[n+re]=we}return re}function C(d,e,n,I){return Pe(Ne(e,d.length-n),d,n,I)}function U(d,e,n,I){return Pe(Me(e),d,n,I)}function J(d,e,n,I){return Pe(Ae(e),d,n,I)}function se(d,e,n,I){return Pe(_e(e,d.length-n),d,n,I)}h.prototype.write=function(e,n,I,Y){if(n===void 0)Y="utf8",I=this.length,n=0;else if(I===void 0&&typeof n=="string")Y=n,I=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(I)?(I=I>>>0,Y===void 0&&(Y="utf8")):(Y=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-n;if((I===void 0||I>X)&&(I=X),e.length>0&&(I<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");Y||(Y="utf8");let re=!1;for(;;)switch(Y){case"hex":return Q(this,e,n,I);case"utf8":case"utf-8":return C(this,e,n,I);case"ascii":case"latin1":case"binary":return U(this,e,n,I);case"base64":return J(this,e,n,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,e,n,I);default:if(re)throw new TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),re=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(d,e,n){return e===0&&n===d.length?s.fromByteArray(d):s.fromByteArray(d.slice(e,n))}function ae(d,e,n){n=Math.min(d.length,n);const I=[];let Y=e;for(;Y<n;){const X=d[Y];let re=null,we=X>239?4:X>223?3:X>191?2:1;if(Y+we<=n){let Se,Ie,Be,Ee;switch(we){case 1:X<128&&(re=X);break;case 2:Se=d[Y+1],(Se&192)===128&&(Ee=(X&31)<<6|Se&63,Ee>127&&(re=Ee));break;case 3:Se=d[Y+1],Ie=d[Y+2],(Se&192)===128&&(Ie&192)===128&&(Ee=(X&15)<<12|(Se&63)<<6|Ie&63,Ee>2047&&(Ee<55296||Ee>57343)&&(re=Ee));break;case 4:Se=d[Y+1],Ie=d[Y+2],Be=d[Y+3],(Se&192)===128&&(Ie&192)===128&&(Be&192)===128&&(Ee=(X&15)<<18|(Se&63)<<12|(Ie&63)<<6|Be&63,Ee>65535&&Ee<1114112&&(re=Ee))}}re===null?(re=65533,we=1):re>65535&&(re-=65536,I.push(re>>>10&1023|55296),re=56320|re&1023),I.push(re),Y+=we}return ce(I)}const fe=4096;function ce(d){const e=d.length;if(e<=fe)return String.fromCharCode.apply(String,d);let n="",I=0;for(;I<e;)n+=String.fromCharCode.apply(String,d.slice(I,I+=fe));return n}function de(d,e,n){let I="";n=Math.min(d.length,n);for(let Y=e;Y<n;++Y)I+=String.fromCharCode(d[Y]&127);return I}function pe(d,e,n){let I="";n=Math.min(d.length,n);for(let Y=e;Y<n;++Y)I+=String.fromCharCode(d[Y]);return I}function c(d,e,n){const I=d.length;(!e||e<0)&&(e=0),(!n||n<0||n>I)&&(n=I);let Y="";for(let X=e;X<n;++X)Y+=ke[d[X]];return Y}function A(d,e,n){const I=d.slice(e,n);let Y="";for(let X=0;X<I.length-1;X+=2)Y+=String.fromCharCode(I[X]+I[X+1]*256);return Y}h.prototype.slice=function(e,n){const I=this.length;e=~~e,n=n===void 0?I:~~n,e<0?(e+=I,e<0&&(e=0)):e>I&&(e=I),n<0?(n+=I,n<0&&(n=0)):n>I&&(n=I),n<e&&(n=e);const Y=this.subarray(e,n);return Object.setPrototypeOf(Y,h.prototype),Y};function _(d,e,n){if(d%1!==0||d<0)throw new RangeError("offset is not uint");if(d+e>n)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e],X=1,re=0;for(;++re<n&&(X*=256);)Y+=this[e+re]*X;return Y},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e+--n],X=1;for(;n>0&&(X*=256);)Y+=this[e+--n]*X;return Y},h.prototype.readUint8=h.prototype.readUInt8=function(e,n){return e=e>>>0,n||_(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,n){return e=e>>>0,n||_(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,n){return e=e>>>0,n||_(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,n){return e=e>>>0,n||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readBigUInt64LE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=n+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,X=this[++e]+this[++e]*2**8+this[++e]*2**16+I*2**24;return BigInt(Y)+(BigInt(X)<<BigInt(32))}),h.prototype.readBigUInt64BE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=n*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],X=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+I;return(BigInt(Y)<<BigInt(32))+BigInt(X)}),h.prototype.readIntLE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=this[e],X=1,re=0;for(;++re<n&&(X*=256);)Y+=this[e+re]*X;return X*=128,Y>=X&&(Y-=Math.pow(2,8*n)),Y},h.prototype.readIntBE=function(e,n,I){e=e>>>0,n=n>>>0,I||_(e,n,this.length);let Y=n,X=1,re=this[e+--Y];for(;Y>0&&(X*=256);)re+=this[e+--Y]*X;return X*=128,re>=X&&(re-=Math.pow(2,8*n)),re},h.prototype.readInt8=function(e,n){return e=e>>>0,n||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},h.prototype.readInt16LE=function(e,n){e=e>>>0,n||_(e,2,this.length);const I=this[e]|this[e+1]<<8;return I&32768?I|4294901760:I},h.prototype.readInt16BE=function(e,n){e=e>>>0,n||_(e,2,this.length);const I=this[e+1]|this[e]<<8;return I&32768?I|4294901760:I},h.prototype.readInt32LE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,n){return e=e>>>0,n||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readBigInt64LE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(I<<24);return(BigInt(Y)<<BigInt(32))+BigInt(n+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),h.prototype.readBigInt64BE=Ue(function(e){e=e>>>0,ue(e,"offset");const n=this[e],I=this[e+7];(n===void 0||I===void 0)&&he(e,this.length-8);const Y=(n<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(Y)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+I)}),h.prototype.readFloatLE=function(e,n){return e=e>>>0,n||_(e,4,this.length),l.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,n){return e=e>>>0,n||_(e,4,this.length),l.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,n){return e=e>>>0,n||_(e,8,this.length),l.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,n){return e=e>>>0,n||_(e,8,this.length),l.read(this,e,!1,52,8)};function H(d,e,n,I,Y,X){if(!h.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>Y||e<X)throw new RangeError('"value" argument is out of bounds');if(n+I>d.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,n,I,Y){if(e=+e,n=n>>>0,I=I>>>0,!Y){const we=Math.pow(2,8*I)-1;H(this,e,n,I,we,0)}let X=1,re=0;for(this[n]=e&255;++re<I&&(X*=256);)this[n+re]=e/X&255;return n+I},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,n,I,Y){if(e=+e,n=n>>>0,I=I>>>0,!Y){const we=Math.pow(2,8*I)-1;H(this,e,n,I,we,0)}let X=I-1,re=1;for(this[n+X]=e&255;--X>=0&&(re*=256);)this[n+X]=e/re&255;return n+I},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,1,255,0),this[n]=e&255,n+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,65535,0),this[n]=e&255,this[n+1]=e>>>8,n+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,65535,0),this[n]=e>>>8,this[n+1]=e&255,n+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,4294967295,0),this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e&255,n+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,4294967295,0),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4};function T(d,e,n,I,Y){le(e,I,Y,d,n,7);let X=Number(e&BigInt(4294967295));d[n++]=X,X=X>>8,d[n++]=X,X=X>>8,d[n++]=X,X=X>>8,d[n++]=X;let re=Number(e>>BigInt(32)&BigInt(4294967295));return d[n++]=re,re=re>>8,d[n++]=re,re=re>>8,d[n++]=re,re=re>>8,d[n++]=re,n}function S(d,e,n,I,Y){le(e,I,Y,d,n,7);let X=Number(e&BigInt(4294967295));d[n+7]=X,X=X>>8,d[n+6]=X,X=X>>8,d[n+5]=X,X=X>>8,d[n+4]=X;let re=Number(e>>BigInt(32)&BigInt(4294967295));return d[n+3]=re,re=re>>8,d[n+2]=re,re=re>>8,d[n+1]=re,re=re>>8,d[n]=re,n+8}h.prototype.writeBigUInt64LE=Ue(function(e,n=0){return T(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ue(function(e,n=0){return S(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(e,n,I,Y){if(e=+e,n=n>>>0,!Y){const Se=Math.pow(2,8*I-1);H(this,e,n,I,Se-1,-Se)}let X=0,re=1,we=0;for(this[n]=e&255;++X<I&&(re*=256);)e<0&&we===0&&this[n+X-1]!==0&&(we=1),this[n+X]=(e/re>>0)-we&255;return n+I},h.prototype.writeIntBE=function(e,n,I,Y){if(e=+e,n=n>>>0,!Y){const Se=Math.pow(2,8*I-1);H(this,e,n,I,Se-1,-Se)}let X=I-1,re=1,we=0;for(this[n+X]=e&255;--X>=0&&(re*=256);)e<0&&we===0&&this[n+X+1]!==0&&(we=1),this[n+X]=(e/re>>0)-we&255;return n+I},h.prototype.writeInt8=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,1,127,-128),e<0&&(e=255+e+1),this[n]=e&255,n+1},h.prototype.writeInt16LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,32767,-32768),this[n]=e&255,this[n+1]=e>>>8,n+2},h.prototype.writeInt16BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,2,32767,-32768),this[n]=e>>>8,this[n+1]=e&255,n+2},h.prototype.writeInt32LE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,2147483647,-2147483648),this[n]=e&255,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24,n+4},h.prototype.writeInt32BE=function(e,n,I){return e=+e,n=n>>>0,I||H(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4},h.prototype.writeBigInt64LE=Ue(function(e,n=0){return T(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ue(function(e,n=0){return S(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $(d,e,n,I,Y,X){if(n+I>d.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(d,e,n,I,Y){return e=+e,n=n>>>0,Y||$(d,e,n,4),l.write(d,e,n,I,23,4),n+4}h.prototype.writeFloatLE=function(e,n,I){return D(this,e,n,!0,I)},h.prototype.writeFloatBE=function(e,n,I){return D(this,e,n,!1,I)};function W(d,e,n,I,Y){return e=+e,n=n>>>0,Y||$(d,e,n,8),l.write(d,e,n,I,52,8),n+8}h.prototype.writeDoubleLE=function(e,n,I){return W(this,e,n,!0,I)},h.prototype.writeDoubleBE=function(e,n,I){return W(this,e,n,!1,I)},h.prototype.copy=function(e,n,I,Y){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(I||(I=0),!Y&&Y!==0&&(Y=this.length),n>=e.length&&(n=e.length),n||(n=0),Y>0&&Y<I&&(Y=I),Y===I||e.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("sourceEnd out of bounds");Y>this.length&&(Y=this.length),e.length-n<Y-I&&(Y=e.length-n+I);const X=Y-I;return this===e&&typeof o.prototype.copyWithin=="function"?this.copyWithin(n,I,Y):o.prototype.set.call(e,this.subarray(I,Y),n),X},h.prototype.fill=function(e,n,I,Y){if(typeof e=="string"){if(typeof n=="string"?(Y=n,n=0,I=this.length):typeof I=="string"&&(Y=I,I=this.length),Y!==void 0&&typeof Y!="string")throw new TypeError("encoding must be a string");if(typeof Y=="string"&&!h.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);if(e.length===1){const re=e.charCodeAt(0);(Y==="utf8"&&re<128||Y==="latin1")&&(e=re)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(n<0||this.length<n||this.length<I)throw new RangeError("Out of range index");if(I<=n)return this;n=n>>>0,I=I===void 0?this.length:I>>>0,e||(e=0);let X;if(typeof e=="number")for(X=n;X<I;++X)this[X]=e;else{const re=h.isBuffer(e)?e:h.from(e,Y),we=re.length;if(we===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(X=0;X<I-n;++X)this[X+n]=re[X%we]}return this};const u={};function f(d,e,n){u[d]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${d}]`,this.stack,delete this.name}get code(){return d}set code(Y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Y,writable:!0})}toString(){return`${this.name} [${d}]: ${this.message}`}}}f("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),f("ERR_INVALID_ARG_TYPE",function(d,e){return`The "${d}" argument must be of type number. Received type ${typeof e}`},TypeError),f("ERR_OUT_OF_RANGE",function(d,e,n){let I=`The value of "${d}" is out of range.`,Y=n;return Number.isInteger(n)&&Math.abs(n)>2**32?Y=q(String(n)):typeof n=="bigint"&&(Y=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(Y=q(Y)),Y+="n"),I+=` It must be ${e}. Received ${Y}`,I},RangeError);function q(d){let e="",n=d.length;const I=d[0]==="-"?1:0;for(;n>=I+4;n-=3)e=`_${d.slice(n-3,n)}${e}`;return`${d.slice(0,n)}${e}`}function ie(d,e,n){ue(e,"offset"),(d[e]===void 0||d[e+n]===void 0)&&he(e,d.length-(n+1))}function le(d,e,n,I,Y,X){if(d>n||d<e){const re=typeof e=="bigint"?"n":"";let we;throw e===0||e===BigInt(0)?we=`>= 0${re} and < 2${re} ** ${(X+1)*8}${re}`:we=`>= -(2${re} ** ${(X+1)*8-1}${re}) and < 2 ** ${(X+1)*8-1}${re}`,new u.ERR_OUT_OF_RANGE("value",we,d)}ie(I,Y,X)}function ue(d,e){if(typeof d!="number")throw new u.ERR_INVALID_ARG_TYPE(e,"number",d)}function he(d,e,n){throw Math.floor(d)!==d?(ue(d,n),new u.ERR_OUT_OF_RANGE("offset","an integer",d)):e<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,d)}const ye=/[^+/0-9A-Za-z-_]/g;function te(d){if(d=d.split("=")[0],d=d.trim().replace(ye,""),d.length<2)return"";for(;d.length%4!==0;)d=d+"=";return d}function Ne(d,e){e=e||1/0;let n;const I=d.length;let Y=null;const X=[];for(let re=0;re<I;++re){if(n=d.charCodeAt(re),n>55295&&n<57344){if(!Y){if(n>56319){(e-=3)>-1&&X.push(239,191,189);continue}else if(re+1===I){(e-=3)>-1&&X.push(239,191,189);continue}Y=n;continue}if(n<56320){(e-=3)>-1&&X.push(239,191,189),Y=n;continue}n=(Y-55296<<10|n-56320)+65536}else Y&&(e-=3)>-1&&X.push(239,191,189);if(Y=null,n<128){if((e-=1)<0)break;X.push(n)}else if(n<2048){if((e-=2)<0)break;X.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;X.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;X.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return X}function Me(d){const e=[];for(let n=0;n<d.length;++n)e.push(d.charCodeAt(n)&255);return e}function _e(d,e){let n,I,Y;const X=[];for(let re=0;re<d.length&&!((e-=2)<0);++re)n=d.charCodeAt(re),I=n>>8,Y=n%256,X.push(Y),X.push(I);return X}function Ae(d){return s.toByteArray(te(d))}function Pe(d,e,n,I){let Y;for(Y=0;Y<I&&!(Y+n>=e.length||Y>=d.length);++Y)e[Y+n]=d[Y];return Y}function Oe(d,e){return d instanceof e||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===e.name}function Ce(d){return d!==d}const ke=(function(){const d="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const I=n*16;for(let Y=0;Y<16;++Y)e[I+Y]=d[n]+d[Y]}return e})();function Ue(d){return typeof BigInt>"u"?Ke:d}function Ke(){throw new Error("BigInt not supported")}})(tt);const Ot=tt.Buffer;var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wt={exports:{}},zo=wt.exports,Tn;function Ko(){return Tn||(Tn=1,(function(r){(function(s,l,g){r.exports=g(s),r.exports.default=r.exports})(zo,"UUID",function(){const s=function(c,A,_,H,T,S){const $=function(D,W){let u=D.toString(16);return u.length<2&&(u="0"+u),W&&(u=u.toUpperCase()),u};for(let D=A;D<=_;D++)T[S++]=$(c[D],H);return T},l=function(c,A,_,H,T){for(let S=A;S<=_;S+=2)H[T++]=parseInt(c.substr(S,2),16)},g="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),w=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],o=function(c,A){let _="",H=0,T=0;for(;H<A;)if(T=T*256+c[H++],H%4===0){let S=52200625;for(;S>=1;){const $=Math.floor(T/S)%85;_+=g[$],S/=85}T=0}return _},a=function(c,A){const _=c.length;if(_%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof A>"u"&&(A=new Array(_*4/5));let H=0,T=0,S=0;for(;H<_;){const $=c.charCodeAt(H++)-32;if($<0||$>=w.length)break;if(S=S*85+w[$],H%5===0){let D=16777216;for(;D>=1;)A[T++]=Math.trunc(S/D%256),D/=256;S=0}}return A},p=function(c,A){const _={ibits:8,obits:8,obigendian:!0};for(const q in A)typeof _[q]<"u"&&(_[q]=A[q]);const H=[];let T=0,S,$,D=0,W,u=0;const f=c.length;for(;D===0&&($=c.charCodeAt(T++)),S=$>>_.ibits-(D+8)&255,D=(D+8)%_.ibits,_.obigendian?u===0?W=S<<_.obits-8:W|=S<<_.obits-8-u:u===0?W=S:W|=S<<u,u=(u+8)%_.obits,!(u===0&&(H.push(W),T>=f)););return H},m=function(c,A){const _={ibits:32,ibigendian:!0};for(const $ in A)typeof _[$]<"u"&&(_[$]=A[$]);let H="",T=4294967295;_.ibits<32&&(T=(1<<_.ibits)-1);const S=c.length;for(let $=0;$<S;$++){const D=c[$]&T;for(let W=0;W<_.ibits;W+=8)_.ibigendian?H+=String.fromCharCode(D>>_.ibits-8-W&255):H+=String.fromCharCode(D>>W&255)}return H},b=8,h=8,x=256,N=function(c,A,_,H,T,S,$,D){return[D,$,S,T,H,_,A,c]},L=function(){return N(0,0,0,0,0,0,0,0)},E=function(c){return c.slice(0)},k=function(c){const A=L();for(let _=0;_<b;_++)A[_]=Math.floor(c%x),c/=x;return A},j=function(c){let A=0;for(let _=b-1;_>=0;_--)A*=x,A+=c[_];return Math.floor(A)},R=function(c,A){let _=0;for(let H=0;H<b;H++)_+=c[H]+A[H],c[H]=Math.floor(_%x),_=Math.floor(_/x);return _},M=function(c,A){let _=0;for(let H=0;H<b;H++)_+=c[H]*A,c[H]=Math.floor(_%x),_=Math.floor(_/x);return _},P=function(c,A){let _,H;const T=new Array(b+b);for(_=0;_<b+b;_++)T[_]=0;let S;for(_=0;_<b;_++){for(S=0,H=0;H<b;H++)S+=c[_]*A[H]+T[_+H],T[_+H]=S%x,S/=x;for(;H<b+b-_;H++)S+=T[_+H],T[_+H]=S%x,S/=x}for(_=0;_<b;_++)c[_]=T[_];return T.slice(b,b+b)},O=function(c,A){for(let _=0;_<b;_++)c[_]&=A[_];return c},v=function(c,A){for(let _=0;_<b;_++)c[_]|=A[_];return c},G=function(c,A){const _=L(),H=Math.floor(A/h);for(let T=0;T<H;T++){let S;for(S=b-1-1;S>=0;S--)_[S+1]=_[S];for(_[0]=c[0],S=0;S<b-1;S++)c[S]=c[S+1];c[S]=0}return j(_)},F=function(c,A){if(A>b*h)throw new Error("ui64_ror: invalid number of bits to shift");const _=new Array(b+b);let H;for(H=0;H<b;H++)_[H+b]=c[H],_[H]=0;const T=Math.floor(A/h),S=A%h;for(H=T;H<b+b-1;H++)_[H-T]=(_[H]>>>S|_[H+1]<<h-S)&(1<<h)-1;for(_[b+b-1-T]=_[b+b-1]>>>S&(1<<h)-1,H=b+b-1-T+1;H<b+b;H++)_[H]=0;for(H=0;H<b;H++)c[H]=_[H+b];return _.slice(0,b)},z=function(c,A){if(A>b*h)throw new Error("ui64_rol: invalid number of bits to shift");const _=new Array(b+b);let H;for(H=0;H<b;H++)_[H+b]=0,_[H]=c[H];const T=Math.floor(A/h),S=A%h;for(H=b-1-T;H>0;H--)_[H+T]=(_[H]<<S|_[H-1]>>>h-S)&(1<<h)-1;for(_[0+T]=_[0]<<S&(1<<h)-1,H=0+T-1;H>=0;H--)_[H]=0;for(H=0;H<b;H++)c[H]=_[H];return _.slice(b,b+b)},K=function(c,A){for(let _=0;_<b;_++)c[_]^=A[_]},ee=function(c,A){const _=(c&65535)+(A&65535);return(c>>16)+(A>>16)+(_>>16)<<16|_&65535},Q=function(c,A){return c<<A&4294967295|c>>>32-A&4294967295},C=function(c,A){function _(f,q,ie,le){return f<20?q&ie|~q&le:f<40?q^ie^le:f<60?q&ie|q&le|ie&le:q^ie^le}function H(f){return f<20?1518500249:f<40?1859775393:f<60?-1894007588:-899497514}c[A>>5]|=128<<24-A%32,c[(A+64>>9<<4)+15]=A;const T=new Array(80);let S=1732584193,$=-271733879,D=-1732584194,W=271733878,u=-1009589776;for(let f=0;f<c.length;f+=16){const q=S,ie=$,le=D,ue=W,he=u;for(let ye=0;ye<80;ye++){ye<16?T[ye]=c[f+ye]:T[ye]=Q(T[ye-3]^T[ye-8]^T[ye-14]^T[ye-16],1);const te=ee(ee(Q(S,5),_(ye,$,D,W)),ee(ee(u,T[ye]),H(ye)));u=W,W=D,D=Q($,30),$=S,S=te}S=ee(S,q),$=ee($,ie),D=ee(D,le),W=ee(W,ue),u=ee(u,he)}return[S,$,D,W,u]},U=function(c){return m(C(p(c,{ibits:8,obits:32,obigendian:!0}),c.length*8),{ibits:32,ibigendian:!0})},J=function(c,A){function _(q,ie,le,ue,he,ye){return ee(Q(ee(ee(ie,q),ee(ue,ye)),he),le)}function H(q,ie,le,ue,he,ye,te){return _(ie&le|~ie&ue,q,ie,he,ye,te)}function T(q,ie,le,ue,he,ye,te){return _(ie&ue|le&~ue,q,ie,he,ye,te)}function S(q,ie,le,ue,he,ye,te){return _(ie^le^ue,q,ie,he,ye,te)}function $(q,ie,le,ue,he,ye,te){return _(le^(ie|~ue),q,ie,he,ye,te)}c[A>>5]|=128<<A%32,c[(A+64>>>9<<4)+14]=A;let D=1732584193,W=-271733879,u=-1732584194,f=271733878;for(let q=0;q<c.length;q+=16){const ie=D,le=W,ue=u,he=f;D=H(D,W,u,f,c[q+0],7,-680876936),f=H(f,D,W,u,c[q+1],12,-389564586),u=H(u,f,D,W,c[q+2],17,606105819),W=H(W,u,f,D,c[q+3],22,-1044525330),D=H(D,W,u,f,c[q+4],7,-176418897),f=H(f,D,W,u,c[q+5],12,1200080426),u=H(u,f,D,W,c[q+6],17,-1473231341),W=H(W,u,f,D,c[q+7],22,-45705983),D=H(D,W,u,f,c[q+8],7,1770035416),f=H(f,D,W,u,c[q+9],12,-1958414417),u=H(u,f,D,W,c[q+10],17,-42063),W=H(W,u,f,D,c[q+11],22,-1990404162),D=H(D,W,u,f,c[q+12],7,1804603682),f=H(f,D,W,u,c[q+13],12,-40341101),u=H(u,f,D,W,c[q+14],17,-1502002290),W=H(W,u,f,D,c[q+15],22,1236535329),D=T(D,W,u,f,c[q+1],5,-165796510),f=T(f,D,W,u,c[q+6],9,-1069501632),u=T(u,f,D,W,c[q+11],14,643717713),W=T(W,u,f,D,c[q+0],20,-373897302),D=T(D,W,u,f,c[q+5],5,-701558691),f=T(f,D,W,u,c[q+10],9,38016083),u=T(u,f,D,W,c[q+15],14,-660478335),W=T(W,u,f,D,c[q+4],20,-405537848),D=T(D,W,u,f,c[q+9],5,568446438),f=T(f,D,W,u,c[q+14],9,-1019803690),u=T(u,f,D,W,c[q+3],14,-187363961),W=T(W,u,f,D,c[q+8],20,1163531501),D=T(D,W,u,f,c[q+13],5,-1444681467),f=T(f,D,W,u,c[q+2],9,-51403784),u=T(u,f,D,W,c[q+7],14,1735328473),W=T(W,u,f,D,c[q+12],20,-1926607734),D=S(D,W,u,f,c[q+5],4,-378558),f=S(f,D,W,u,c[q+8],11,-2022574463),u=S(u,f,D,W,c[q+11],16,1839030562),W=S(W,u,f,D,c[q+14],23,-35309556),D=S(D,W,u,f,c[q+1],4,-1530992060),f=S(f,D,W,u,c[q+4],11,1272893353),u=S(u,f,D,W,c[q+7],16,-155497632),W=S(W,u,f,D,c[q+10],23,-1094730640),D=S(D,W,u,f,c[q+13],4,681279174),f=S(f,D,W,u,c[q+0],11,-358537222),u=S(u,f,D,W,c[q+3],16,-722521979),W=S(W,u,f,D,c[q+6],23,76029189),D=S(D,W,u,f,c[q+9],4,-640364487),f=S(f,D,W,u,c[q+12],11,-421815835),u=S(u,f,D,W,c[q+15],16,530742520),W=S(W,u,f,D,c[q+2],23,-995338651),D=$(D,W,u,f,c[q+0],6,-198630844),f=$(f,D,W,u,c[q+7],10,1126891415),u=$(u,f,D,W,c[q+14],15,-1416354905),W=$(W,u,f,D,c[q+5],21,-57434055),D=$(D,W,u,f,c[q+12],6,1700485571),f=$(f,D,W,u,c[q+3],10,-1894986606),u=$(u,f,D,W,c[q+10],15,-1051523),W=$(W,u,f,D,c[q+1],21,-2054922799),D=$(D,W,u,f,c[q+8],6,1873313359),f=$(f,D,W,u,c[q+15],10,-30611744),u=$(u,f,D,W,c[q+6],15,-1560198380),W=$(W,u,f,D,c[q+13],21,1309151649),D=$(D,W,u,f,c[q+4],6,-145523070),f=$(f,D,W,u,c[q+11],10,-1120210379),u=$(u,f,D,W,c[q+2],15,718787259),W=$(W,u,f,D,c[q+9],21,-343485551),D=ee(D,ie),W=ee(W,le),u=ee(u,ue),f=ee(f,he)}return[D,W,u,f]},se=function(c){return m(J(p(c,{ibits:8,obits:32,obigendian:!1}),c.length*8),{ibits:32,ibigendian:!1})},oe=function(c){this.mul=N(88,81,244,45,76,149,127,45),this.inc=N(20,5,123,126,247,103,129,79),this.mask=N(0,0,0,0,255,255,255,255),this.state=E(this.inc),this.next(),O(this.state,this.mask);let A;c!==void 0?c=k(c>>>0):typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.getRandomValues=="function"?(A=new Uint32Array(2),window.crypto.getRandomValues(A),c=v(k(A[0]>>>0),F(k(A[1]>>>0),32))):typeof globalThis=="object"&&typeof globalThis.crypto=="object"&&typeof globalThis.crypto.getRandomValues=="function"?(A=new Uint32Array(2),globalThis.crypto.getRandomValues(A),c=v(k(A[0]>>>0),F(k(A[1]>>>0),32))):(c=k(Math.random()*4294967295>>>0),v(c,F(k(new Date().getTime()),32))),v(this.state,c),this.next()};oe.prototype.next=function(){const c=E(this.state);P(this.state,this.mul),R(this.state,this.inc);const A=E(c);F(A,18),K(A,c),F(A,27);const _=E(c);F(_,59),O(A,this.mask);const H=j(_),T=E(A);return z(T,32-H),F(A,H),K(A,T),j(A)},oe.prototype.reseed=function(c){if(typeof c!="string")throw new Error("UUID: PCG: seed: invalid argument (string expected)");const A=C(p(c,{ibits:8,obits:32,obigendian:!0}),c.length*8);for(let _=0;_<A.length;_++)K(ae.state,k(A[_]>>>0))};const ae=new oe;oe.reseed=function(c){ae.reseed(c)};const fe=function(c,A){const _=[];for(let H=0;H<c;H++)_[H]=ae.next()%A;return _};let ce=0,de=0;const pe=function(){if(arguments.length===1&&typeof arguments[0]=="string")this.parse.apply(this,arguments);else if(arguments.length>=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(let c=0;c<16;c++)this[c]=0}};return typeof Uint8Array<"u"?pe.prototype=new Uint8Array(16):typeof Ot<"u"?pe.prototype=Ot.alloc(16):pe.prototype=new Array(16),pe.prototype.constructor=pe,pe.prototype.make=function(c){let A;const _=this;if(c===1){const T=new Date().getTime();T!==ce?de=0:de++,ce=T;const S=k(T);M(S,1e3*10),R(S,N(1,178,29,210,19,129,64,0)),de>0&&R(S,k(de));let $;$=G(S,8),_[3]=$&255,$=G(S,8),_[2]=$&255,$=G(S,8),_[1]=$&255,$=G(S,8),_[0]=$&255,$=G(S,8),_[5]=$&255,$=G(S,8),_[4]=$&255,$=G(S,8),_[7]=$&255,$=G(S,8),_[6]=$&15;const D=fe(2,255);_[8]=D[0],_[9]=D[1];const W=fe(6,255);for(W[0]|=3,A=0;A<6;A++)_[10+A]=W[A]}else if(c===4){const H=fe(16,255);for(A=0;A<16;A++)this[A]=H[A]}else if(c===3||c===5){let H="";const T=typeof arguments[1]=="object"&&arguments[1]instanceof pe?arguments[1]:new pe().parse(arguments[1]);for(A=0;A<16;A++)H+=String.fromCharCode(T[A]);H+=arguments[2];const S=c===3?se(H):U(H);for(A=0;A<16;A++)_[A]=S.charCodeAt(A)}else throw new Error("UUID: make: invalid version");return _[6]&=15,_[6]|=c<<4,_[8]&=63,_[8]|=128,_},pe.prototype.format=function(c){let A,_;if(c==="z85")A=o(this,16);else if(c==="b16")_=new Array(32),s(this,0,15,!0,_,0),A=_.join("");else if(c===void 0||c==="std")_=new Array(36),s(this,0,3,!1,_,0),_[8]="-",s(this,4,5,!1,_,9),_[13]="-",s(this,6,7,!1,_,14),_[18]="-",s(this,8,9,!1,_,19),_[23]="-",s(this,10,15,!1,_,24),A=_.join("");else throw new Error("UUID: format: invalid type argument");return A},pe.prototype.toString=function(c){return this.format(c)},pe.prototype.toJSON=function(){return this.format("std")},pe.prototype.parse=function(c,A){if(typeof c!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(A==="z85")a(c,this);else if(A==="b16")l(c,0,35,this,0);else if(A===void 0||A==="std"){const _={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(_[c]!==void 0)c=_[c];else if(!c.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');l(c,0,7,this,0),l(c,9,12,this,4),l(c,14,17,this,6),l(c,19,22,this,8),l(c,24,35,this,10)}return this},pe.prototype.export=function(){const c=new Array(16);for(let A=0;A<16;A++)c[A]=this[A];return c},pe.prototype.import=function(c){if(!(typeof c=="object"&&c instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(c.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(let A=0;A<16;A++){if(typeof c[A]!="number")throw new Error("UUID: import: invalid array element #"+A+" (type Number expected)");if(!(isFinite(c[A])&&Math.floor(c[A])===c[A]))throw new Error("UUID: import: invalid array element #"+A+" (Number with integer value expected)");if(!(c[A]>=0&&c[A]<=255))throw new Error("UUID: import: invalid array element #"+A+" (Number with integer value in range 0...255 expected)");this[A]=c[A]}return this},pe.prototype.compare=function(c){if(typeof c!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(c instanceof pe))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(let A=0;A<16;A++){if(this[A]<c[A])return-1;if(this[A]>c[A])return 1}return 0},pe.prototype.equal=function(c){return this.compare(c)===0},pe.prototype.fold=function(c){if(typeof c>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(c<1||c>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");const A=16/Math.pow(2,c),_=new Array(A);for(let H=0;H<A;H++){let T=0;for(let S=0;H+S<16;S+=A)T^=this[H+S];_[H]=T}return _},pe.PCG=oe,pe})})(wt)),wt.exports}var Xo=Ko();const xn=Rn(Xo);var mt={exports:{}},Fn;function Nt(){if(Fn)return mt.exports;Fn=1;var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(v,G,F){return Function.prototype.apply.call(v,G,F)},l;r&&typeof r.ownKeys=="function"?l=r.ownKeys:Object.getOwnPropertySymbols?l=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:l=function(v){return Object.getOwnPropertyNames(v)};function g(O){console&&console.warn&&console.warn(O)}var w=Number.isNaN||function(v){return v!==v};function o(){o.init.call(this)}mt.exports=o,mt.exports.once=R,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function p(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(O){if(typeof O!="number"||O<0||w(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");a=O}}),o.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},o.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||w(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function m(O){return O._maxListeners===void 0?o.defaultMaxListeners:O._maxListeners}o.prototype.getMaxListeners=function(){return m(this)},o.prototype.emit=function(v){for(var G=[],F=1;F<arguments.length;F++)G.push(arguments[F]);var z=v==="error",K=this._events;if(K!==void 0)z=z&&K.error===void 0;else if(!z)return!1;if(z){var ee;if(G.length>0&&(ee=G[0]),ee instanceof Error)throw ee;var Q=new Error("Unhandled error."+(ee?" ("+ee.message+")":""));throw Q.context=ee,Q}var C=K[v];if(C===void 0)return!1;if(typeof C=="function")s(C,this,G);else for(var U=C.length,J=E(C,U),F=0;F<U;++F)s(J[F],this,G);return!0};function b(O,v,G,F){var z,K,ee;if(p(G),K=O._events,K===void 0?(K=O._events=Object.create(null),O._eventsCount=0):(K.newListener!==void 0&&(O.emit("newListener",v,G.listener?G.listener:G),K=O._events),ee=K[v]),ee===void 0)ee=K[v]=G,++O._eventsCount;else if(typeof ee=="function"?ee=K[v]=F?[G,ee]:[ee,G]:F?ee.unshift(G):ee.push(G),z=m(O),z>0&&ee.length>z&&!ee.warned){ee.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+ee.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=O,Q.type=v,Q.count=ee.length,g(Q)}return O}o.prototype.addListener=function(v,G){return b(this,v,G,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(v,G){return b(this,v,G,!0)};function h(){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 x(O,v,G){var F={fired:!1,wrapFn:void 0,target:O,type:v,listener:G},z=h.bind(F);return z.listener=G,F.wrapFn=z,z}o.prototype.once=function(v,G){return p(G),this.on(v,x(this,v,G)),this},o.prototype.prependOnceListener=function(v,G){return p(G),this.prependListener(v,x(this,v,G)),this},o.prototype.removeListener=function(v,G){var F,z,K,ee,Q;if(p(G),z=this._events,z===void 0)return this;if(F=z[v],F===void 0)return this;if(F===G||F.listener===G)--this._eventsCount===0?this._events=Object.create(null):(delete z[v],z.removeListener&&this.emit("removeListener",v,F.listener||G));else if(typeof F!="function"){for(K=-1,ee=F.length-1;ee>=0;ee--)if(F[ee]===G||F[ee].listener===G){Q=F[ee].listener,K=ee;break}if(K<0)return this;K===0?F.shift():k(F,K),F.length===1&&(z[v]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",v,Q||G)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(v){var G,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[v]),this;if(arguments.length===0){var K=Object.keys(F),ee;for(z=0;z<K.length;++z)ee=K[z],ee!=="removeListener"&&this.removeAllListeners(ee);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(G=F[v],typeof G=="function")this.removeListener(v,G);else if(G!==void 0)for(z=G.length-1;z>=0;z--)this.removeListener(v,G[z]);return this};function N(O,v,G){var F=O._events;if(F===void 0)return[];var z=F[v];return z===void 0?[]:typeof z=="function"?G?[z.listener||z]:[z]:G?j(z):E(z,z.length)}o.prototype.listeners=function(v){return N(this,v,!0)},o.prototype.rawListeners=function(v){return N(this,v,!1)},o.listenerCount=function(O,v){return typeof O.listenerCount=="function"?O.listenerCount(v):L.call(O,v)},o.prototype.listenerCount=L;function L(O){var v=this._events;if(v!==void 0){var G=v[O];if(typeof G=="function")return 1;if(G!==void 0)return G.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(O,v){for(var G=new Array(v),F=0;F<v;++F)G[F]=O[F];return G}function k(O,v){for(;v+1<O.length;v++)O[v]=O[v+1];O.pop()}function j(O){for(var v=new Array(O.length),G=0;G<v.length;++G)v[G]=O[G].listener||O[G];return v}function R(O,v){return new Promise(function(G,F){function z(ee){O.removeListener(v,K),F(ee)}function K(){typeof O.removeListener=="function"&&O.removeListener("error",z),G([].slice.call(arguments))}P(O,v,K,{once:!0}),v!=="error"&&M(O,z,{once:!0})})}function M(O,v,G){typeof O.on=="function"&&P(O,"error",v,G)}function P(O,v,G,F){if(typeof O.on=="function")F.once?O.once(v,G):O.on(v,G);else if(typeof O.addEventListener=="function")O.addEventListener(v,function z(K){F.once&&O.removeEventListener(v,z),G(K)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O)}return mt.exports}var bt={exports:{}},Un;function Ze(){return Un||(Un=1,typeof Object.create=="function"?bt.exports=function(s,l){l&&(s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:bt.exports=function(s,l){if(l){s.super_=l;var g=function(){};g.prototype=l.prototype,s.prototype=new g,s.prototype.constructor=s}}),bt.exports}function Zo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var On={exports:{}},Fe=On.exports={},je,Ge;function Mt(){throw new Error("setTimeout has not been defined")}function Pt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?je=setTimeout:je=Mt}catch{je=Mt}try{typeof clearTimeout=="function"?Ge=clearTimeout:Ge=Pt}catch{Ge=Pt}})();function Nn(r){if(je===setTimeout)return setTimeout(r,0);if((je===Mt||!je)&&setTimeout)return je=setTimeout,setTimeout(r,0);try{return je(r,0)}catch{try{return je.call(null,r,0)}catch{return je.call(this,r,0)}}}function Qo(r){if(Ge===clearTimeout)return clearTimeout(r);if((Ge===Pt||!Ge)&&clearTimeout)return Ge=clearTimeout,clearTimeout(r);try{return Ge(r)}catch{try{return Ge.call(null,r)}catch{return Ge.call(this,r)}}}var He=[],nt=!1,Qe,Et=-1;function es(){!nt||!Qe||(nt=!1,Qe.length?He=Qe.concat(He):Et=-1,He.length&&Mn())}function Mn(){if(!nt){var r=Nn(es);nt=!0;for(var s=He.length;s;){for(Qe=He,He=[];++Et<s;)Qe&&Qe[Et].run();Et=-1,s=He.length}Qe=null,nt=!1,Qo(r)}}Fe.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];He.push(new Pn(r,s)),He.length===1&&!nt&&Nn(Mn)};function Pn(r,s){this.fun=r,this.array=s}Pn.prototype.run=function(){this.fun.apply(null,this.array)},Fe.title="browser",Fe.browser=!0,Fe.env={},Fe.argv=[],Fe.version="",Fe.versions={};function $e(){}Fe.on=$e,Fe.addListener=$e,Fe.once=$e,Fe.off=$e,Fe.removeListener=$e,Fe.removeAllListeners=$e,Fe.emit=$e,Fe.prependListener=$e,Fe.prependOnceListener=$e,Fe.listeners=function(r){return[]},Fe.binding=function(r){throw new Error("process.binding is not supported")},Fe.cwd=function(){return"/"},Fe.chdir=function(r){throw new Error("process.chdir is not supported")},Fe.umask=function(){return 0};var ts=On.exports;const me=Zo(ts);var Lt,Ln;function Cn(){return Ln||(Ln=1,Lt=Nt().EventEmitter),Lt}var Ct={},Dn;function De(){return Dn||(Dn=1,(function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var s={},l={};l.byteLength=h,l.toByteArray=N,l.fromByteArray=k;for(var g=[],w=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,m=a.length;p<m;++p)g[p]=a[p],w[a.charCodeAt(p)]=p;w[45]=62,w[95]=63;function b(M){var P=M.length;if(P%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=M.indexOf("=");O===-1&&(O=P);var v=O===P?0:4-O%4;return[O,v]}function h(M){var P=b(M),O=P[0],v=P[1];return(O+v)*3/4-v}function x(M,P,O){return(P+O)*3/4-O}function N(M){var P,O=b(M),v=O[0],G=O[1],F=new o(x(M,v,G)),z=0,K=G>0?v-4:v,ee;for(ee=0;ee<K;ee+=4)P=w[M.charCodeAt(ee)]<<18|w[M.charCodeAt(ee+1)]<<12|w[M.charCodeAt(ee+2)]<<6|w[M.charCodeAt(ee+3)],F[z++]=P>>16&255,F[z++]=P>>8&255,F[z++]=P&255;return G===2&&(P=w[M.charCodeAt(ee)]<<2|w[M.charCodeAt(ee+1)]>>4,F[z++]=P&255),G===1&&(P=w[M.charCodeAt(ee)]<<10|w[M.charCodeAt(ee+1)]<<4|w[M.charCodeAt(ee+2)]>>2,F[z++]=P>>8&255,F[z++]=P&255),F}function L(M){return g[M>>18&63]+g[M>>12&63]+g[M>>6&63]+g[M&63]}function E(M,P,O){for(var v,G=[],F=P;F<O;F+=3)v=(M[F]<<16&16711680)+(M[F+1]<<8&65280)+(M[F+2]&255),G.push(L(v));return G.join("")}function k(M){for(var P,O=M.length,v=O%3,G=[],F=16383,z=0,K=O-v;z<K;z+=F)G.push(E(M,z,z+F>K?K:z+F));return v===1?(P=M[O-1],G.push(g[P>>2]+g[P<<4&63]+"==")):v===2&&(P=(M[O-2]<<8)+M[O-1],G.push(g[P>>10]+g[P>>4&63]+g[P<<2&63]+"=")),G.join("")}var j={};j.read=function(M,P,O,v,G){var F,z,K=G*8-v-1,ee=(1<<K)-1,Q=ee>>1,C=-7,U=O?G-1:0,J=O?-1:1,se=M[P+U];for(U+=J,F=se&(1<<-C)-1,se>>=-C,C+=K;C>0;F=F*256+M[P+U],U+=J,C-=8);for(z=F&(1<<-C)-1,F>>=-C,C+=v;C>0;z=z*256+M[P+U],U+=J,C-=8);if(F===0)F=1-Q;else{if(F===ee)return z?NaN:(se?-1:1)*(1/0);z=z+Math.pow(2,v),F=F-Q}return(se?-1:1)*z*Math.pow(2,F-v)},j.write=function(M,P,O,v,G,F){var z,K,ee,Q=F*8-G-1,C=(1<<Q)-1,U=C>>1,J=G===23?Math.pow(2,-24)-Math.pow(2,-77):0,se=v?0:F-1,oe=v?1:-1,ae=P<0||P===0&&1/P<0?1:0;for(P=Math.abs(P),isNaN(P)||P===1/0?(K=isNaN(P)?1:0,z=C):(z=Math.floor(Math.log(P)/Math.LN2),P*(ee=Math.pow(2,-z))<1&&(z--,ee*=2),z+U>=1?P+=J/ee:P+=J*Math.pow(2,1-U),P*ee>=2&&(z++,ee/=2),z+U>=C?(K=0,z=C):z+U>=1?(K=(P*ee-1)*Math.pow(2,G),z=z+U):(K=P*Math.pow(2,U-1)*Math.pow(2,G),z=0));G>=8;M[O+se]=K&255,se+=oe,K/=256,G-=8);for(z=z<<G|K,Q+=G;Q>0;M[O+se]=z&255,se+=oe,z/=256,Q-=8);M[O+se-oe]|=ae*128};(function(M){const P=l,O=j,v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;M.Buffer=C,M.SlowBuffer=A,M.INSPECT_MAX_BYTES=50;const G=2147483647;M.kMaxLength=G;const{Uint8Array:F,ArrayBuffer:z,SharedArrayBuffer:K}=globalThis;C.TYPED_ARRAY_SUPPORT=ee(),!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 ee(){try{const y=new F(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,F.prototype),Object.setPrototypeOf(y,t),y.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 Q(y){if(y>G)throw new RangeError('The value "'+y+'" is invalid for option "size"');const t=new F(y);return Object.setPrototypeOf(t,C.prototype),t}function C(y,t,i){if(typeof y=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return oe(y)}return U(y,t,i)}C.poolSize=8192;function U(y,t,i){if(typeof y=="string")return ae(y,t);if(z.isView(y))return ce(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(We(y,z)||y&&We(y.buffer,z)||typeof K<"u"&&(We(y,K)||y&&We(y.buffer,K)))return de(y,t,i);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=y.valueOf&&y.valueOf();if(B!=null&&B!==y)return C.from(B,t,i);const V=pe(y);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return C.from(y[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}C.from=function(y,t,i){return U(y,t,i)},Object.setPrototypeOf(C.prototype,F.prototype),Object.setPrototypeOf(C,F);function J(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function se(y,t,i){return J(y),y<=0?Q(y):t!==void 0?typeof i=="string"?Q(y).fill(t,i):Q(y).fill(t):Q(y)}C.alloc=function(y,t,i){return se(y,t,i)};function oe(y){return J(y),Q(y<0?0:c(y)|0)}C.allocUnsafe=function(y){return oe(y)},C.allocUnsafeSlow=function(y){return oe(y)};function ae(y,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const i=_(y,t)|0;let B=Q(i);const V=B.write(y,t);return V!==i&&(B=B.slice(0,V)),B}function fe(y){const t=y.length<0?0:c(y.length)|0,i=Q(t);for(let B=0;B<t;B+=1)i[B]=y[B]&255;return i}function ce(y){if(We(y,F)){const t=new F(y);return de(t.buffer,t.byteOffset,t.byteLength)}return fe(y)}function de(y,t,i){if(t<0||y.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');let B;return t===void 0&&i===void 0?B=new F(y):i===void 0?B=new F(y,t):B=new F(y,t,i),Object.setPrototypeOf(B,C.prototype),B}function pe(y){if(C.isBuffer(y)){const t=c(y.length)|0,i=Q(t);return i.length===0||y.copy(i,0,0,t),i}if(y.length!==void 0)return typeof y.length!="number"||In(y.length)?Q(0):fe(y);if(y.type==="Buffer"&&Array.isArray(y.data))return fe(y.data)}function c(y){if(y>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return y|0}function A(y){return+y!=y&&(y=0),C.alloc(+y)}C.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==C.prototype},C.compare=function(t,i){if(We(t,F)&&(t=C.from(t,t.offset,t.byteLength)),We(i,F)&&(i=C.from(i,i.offset,i.byteLength)),!C.isBuffer(t)||!C.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===i)return 0;let B=t.length,V=i.length;for(let Z=0,ne=Math.min(B,V);Z<ne;++Z)if(t[Z]!==i[Z]){B=t[Z],V=i[Z];break}return B<V?-1:V<B?1:0},C.isEncoding=function(t){switch(String(t).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(t,i){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return C.alloc(0);let B;if(i===void 0)for(i=0,B=0;B<t.length;++B)i+=t[B].length;const V=C.allocUnsafe(i);let Z=0;for(B=0;B<t.length;++B){let ne=t[B];if(We(ne,F))Z+ne.length>V.length?(C.isBuffer(ne)||(ne=C.from(ne)),ne.copy(V,Z)):F.prototype.set.call(V,ne,Z);else if(C.isBuffer(ne))ne.copy(V,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=ne.length}return V};function _(y,t){if(C.isBuffer(y))return y.length;if(z.isView(y)||We(y,z))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);const i=y.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&i===0)return 0;let V=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Se(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Ee(y).length;default:if(V)return B?-1:Se(y).length;t=(""+t).toLowerCase(),V=!0}}C.byteLength=_;function H(y,t,i){let B=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,t>>>=0,i<=t))return"";for(y||(y="utf8");;)switch(y){case"hex":return Ne(this,t,i);case"utf8":case"utf-8":return le(this,t,i);case"ascii":return ye(this,t,i);case"latin1":case"binary":return te(this,t,i);case"base64":return ie(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,t,i);default:if(B)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),B=!0}}C.prototype._isBuffer=!0;function T(y,t,i){const B=y[t];y[t]=y[i],y[i]=B}C.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<t;i+=2)T(this,i,i+1);return this},C.prototype.swap32=function(){const t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<t;i+=4)T(this,i,i+3),T(this,i+1,i+2);return this},C.prototype.swap64=function(){const t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<t;i+=8)T(this,i,i+7),T(this,i+1,i+6),T(this,i+2,i+5),T(this,i+3,i+4);return this},C.prototype.toString=function(){const t=this.length;return t===0?"":arguments.length===0?le(this,0,t):H.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(t){if(!C.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:C.compare(this,t)===0},C.prototype.inspect=function(){let t="";const i=M.INSPECT_MAX_BYTES;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},v&&(C.prototype[v]=C.prototype.inspect),C.prototype.compare=function(t,i,B,V,Z){if(We(t,F)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(i===void 0&&(i=0),B===void 0&&(B=t?t.length:0),V===void 0&&(V=0),Z===void 0&&(Z=this.length),i<0||B>t.length||V<0||Z>this.length)throw new RangeError("out of range index");if(V>=Z&&i>=B)return 0;if(V>=Z)return-1;if(i>=B)return 1;if(i>>>=0,B>>>=0,V>>>=0,Z>>>=0,this===t)return 0;let ne=Z-V,be=B-i;const Te=Math.min(ne,be),Re=this.slice(V,Z),xe=t.slice(i,B);for(let ve=0;ve<Te;++ve)if(Re[ve]!==xe[ve]){ne=Re[ve],be=xe[ve];break}return ne<be?-1:be<ne?1:0};function S(y,t,i,B,V){if(y.length===0)return-1;if(typeof i=="string"?(B=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,In(i)&&(i=V?0:y.length-1),i<0&&(i=y.length+i),i>=y.length){if(V)return-1;i=y.length-1}else if(i<0)if(V)i=0;else return-1;if(typeof t=="string"&&(t=C.from(t,B)),C.isBuffer(t))return t.length===0?-1:$(y,t,i,B,V);if(typeof t=="number")return t=t&255,typeof F.prototype.indexOf=="function"?V?F.prototype.indexOf.call(y,t,i):F.prototype.lastIndexOf.call(y,t,i):$(y,[t],i,B,V);throw new TypeError("val must be string, number or Buffer")}function $(y,t,i,B,V){let Z=1,ne=y.length,be=t.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(y.length<2||t.length<2)return-1;Z=2,ne/=2,be/=2,i/=2}function Te(xe,ve){return Z===1?xe[ve]:xe.readUInt16BE(ve*Z)}let Re;if(V){let xe=-1;for(Re=i;Re<ne;Re++)if(Te(y,Re)===Te(t,xe===-1?0:Re-xe)){if(xe===-1&&(xe=Re),Re-xe+1===be)return xe*Z}else xe!==-1&&(Re-=Re-xe),xe=-1}else for(i+be>ne&&(i=ne-be),Re=i;Re>=0;Re--){let xe=!0;for(let ve=0;ve<be;ve++)if(Te(y,Re+ve)!==Te(t,ve)){xe=!1;break}if(xe)return Re}return-1}C.prototype.includes=function(t,i,B){return this.indexOf(t,i,B)!==-1},C.prototype.indexOf=function(t,i,B){return S(this,t,i,B,!0)},C.prototype.lastIndexOf=function(t,i,B){return S(this,t,i,B,!1)};function D(y,t,i,B){i=Number(i)||0;const V=y.length-i;B?(B=Number(B),B>V&&(B=V)):B=V;const Z=t.length;B>Z/2&&(B=Z/2);let ne;for(ne=0;ne<B;++ne){const be=parseInt(t.substr(ne*2,2),16);if(In(be))return ne;y[i+ne]=be}return ne}function W(y,t,i,B){return xt(Se(t,y.length-i),y,i,B)}function u(y,t,i,B){return xt(Ie(t),y,i,B)}function f(y,t,i,B){return xt(Ee(t),y,i,B)}function q(y,t,i,B){return xt(Be(t,y.length-i),y,i,B)}C.prototype.write=function(t,i,B,V){if(i===void 0)V="utf8",B=this.length,i=0;else if(B===void 0&&typeof i=="string")V=i,B=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(B)?(B=B>>>0,V===void 0&&(V="utf8")):(V=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Z=this.length-i;if((B===void 0||B>Z)&&(B=Z),t.length>0&&(B<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let ne=!1;for(;;)switch(V){case"hex":return D(this,t,i,B);case"utf8":case"utf-8":return W(this,t,i,B);case"ascii":case"latin1":case"binary":return u(this,t,i,B);case"base64":return f(this,t,i,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,i,B);default:if(ne)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),ne=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(y,t,i){return t===0&&i===y.length?P.fromByteArray(y):P.fromByteArray(y.slice(t,i))}function le(y,t,i){i=Math.min(y.length,i);const B=[];let V=t;for(;V<i;){const Z=y[V];let ne=null,be=Z>239?4:Z>223?3:Z>191?2:1;if(V+be<=i){let Te,Re,xe,ve;switch(be){case 1:Z<128&&(ne=Z);break;case 2:Te=y[V+1],(Te&192)===128&&(ve=(Z&31)<<6|Te&63,ve>127&&(ne=ve));break;case 3:Te=y[V+1],Re=y[V+2],(Te&192)===128&&(Re&192)===128&&(ve=(Z&15)<<12|(Te&63)<<6|Re&63,ve>2047&&(ve<55296||ve>57343)&&(ne=ve));break;case 4:Te=y[V+1],Re=y[V+2],xe=y[V+3],(Te&192)===128&&(Re&192)===128&&(xe&192)===128&&(ve=(Z&15)<<18|(Te&63)<<12|(Re&63)<<6|xe&63,ve>65535&&ve<1114112&&(ne=ve))}}ne===null?(ne=65533,be=1):ne>65535&&(ne-=65536,B.push(ne>>>10&1023|55296),ne=56320|ne&1023),B.push(ne),V+=be}return he(B)}const ue=4096;function he(y){const t=y.length;if(t<=ue)return String.fromCharCode.apply(String,y);let i="",B=0;for(;B<t;)i+=String.fromCharCode.apply(String,y.slice(B,B+=ue));return i}function ye(y,t,i){let B="";i=Math.min(y.length,i);for(let V=t;V<i;++V)B+=String.fromCharCode(y[V]&127);return B}function te(y,t,i){let B="";i=Math.min(y.length,i);for(let V=t;V<i;++V)B+=String.fromCharCode(y[V]);return B}function Ne(y,t,i){const B=y.length;(!t||t<0)&&(t=0),(!i||i<0||i>B)&&(i=B);let V="";for(let Z=t;Z<i;++Z)V+=ua[y[Z]];return V}function Me(y,t,i){const B=y.slice(t,i);let V="";for(let Z=0;Z<B.length-1;Z+=2)V+=String.fromCharCode(B[Z]+B[Z+1]*256);return V}C.prototype.slice=function(t,i){const B=this.length;t=~~t,i=i===void 0?B:~~i,t<0?(t+=B,t<0&&(t=0)):t>B&&(t=B),i<0?(i+=B,i<0&&(i=0)):i>B&&(i=B),i<t&&(i=t);const V=this.subarray(t,i);return Object.setPrototypeOf(V,C.prototype),V};function _e(y,t,i){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+t>i)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t],Z=1,ne=0;for(;++ne<i&&(Z*=256);)V+=this[t+ne]*Z;return V},C.prototype.readUintBE=C.prototype.readUIntBE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t+--i],Z=1;for(;i>0&&(Z*=256);)V+=this[t+--i]*Z;return V},C.prototype.readUint8=C.prototype.readUInt8=function(t,i){return t=t>>>0,i||_e(t,1,this.length),this[t]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(t,i){return t=t>>>0,i||_e(t,2,this.length),this[t]|this[t+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(t,i){return t=t>>>0,i||_e(t,2,this.length),this[t]<<8|this[t+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},C.prototype.readBigUInt64LE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=i+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,Z=this[++t]+this[++t]*2**8+this[++t]*2**16+B*2**24;return BigInt(V)+(BigInt(Z)<<BigInt(32))}),C.prototype.readBigUInt64BE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=i*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],Z=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+B;return(BigInt(V)<<BigInt(32))+BigInt(Z)}),C.prototype.readIntLE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=this[t],Z=1,ne=0;for(;++ne<i&&(Z*=256);)V+=this[t+ne]*Z;return Z*=128,V>=Z&&(V-=Math.pow(2,8*i)),V},C.prototype.readIntBE=function(t,i,B){t=t>>>0,i=i>>>0,B||_e(t,i,this.length);let V=i,Z=1,ne=this[t+--V];for(;V>0&&(Z*=256);)ne+=this[t+--V]*Z;return Z*=128,ne>=Z&&(ne-=Math.pow(2,8*i)),ne},C.prototype.readInt8=function(t,i){return t=t>>>0,i||_e(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},C.prototype.readInt16LE=function(t,i){t=t>>>0,i||_e(t,2,this.length);const B=this[t]|this[t+1]<<8;return B&32768?B|4294901760:B},C.prototype.readInt16BE=function(t,i){t=t>>>0,i||_e(t,2,this.length);const B=this[t+1]|this[t]<<8;return B&32768?B|4294901760:B},C.prototype.readInt32LE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},C.prototype.readInt32BE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},C.prototype.readBigInt64LE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(B<<24);return(BigInt(V)<<BigInt(32))+BigInt(i+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),C.prototype.readBigInt64BE=Xe(function(t){t=t>>>0,Y(t,"offset");const i=this[t],B=this[t+7];(i===void 0||B===void 0)&&X(t,this.length-8);const V=(i<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(V)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+B)}),C.prototype.readFloatLE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),O.read(this,t,!0,23,4)},C.prototype.readFloatBE=function(t,i){return t=t>>>0,i||_e(t,4,this.length),O.read(this,t,!1,23,4)},C.prototype.readDoubleLE=function(t,i){return t=t>>>0,i||_e(t,8,this.length),O.read(this,t,!0,52,8)},C.prototype.readDoubleBE=function(t,i){return t=t>>>0,i||_e(t,8,this.length),O.read(this,t,!1,52,8)};function Ae(y,t,i,B,V,Z){if(!C.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>V||t<Z)throw new RangeError('"value" argument is out of bounds');if(i+B>y.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(t,i,B,V){if(t=+t,i=i>>>0,B=B>>>0,!V){const be=Math.pow(2,8*B)-1;Ae(this,t,i,B,be,0)}let Z=1,ne=0;for(this[i]=t&255;++ne<B&&(Z*=256);)this[i+ne]=t/Z&255;return i+B},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(t,i,B,V){if(t=+t,i=i>>>0,B=B>>>0,!V){const be=Math.pow(2,8*B)-1;Ae(this,t,i,B,be,0)}let Z=B-1,ne=1;for(this[i+Z]=t&255;--Z>=0&&(ne*=256);)this[i+Z]=t/ne&255;return i+B},C.prototype.writeUint8=C.prototype.writeUInt8=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,1,255,0),this[i]=t&255,i+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,65535,0),this[i]=t&255,this[i+1]=t>>>8,i+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=t&255,i+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255,i+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4};function Pe(y,t,i,B,V){I(t,B,V,y,i,7);let Z=Number(t&BigInt(4294967295));y[i++]=Z,Z=Z>>8,y[i++]=Z,Z=Z>>8,y[i++]=Z,Z=Z>>8,y[i++]=Z;let ne=Number(t>>BigInt(32)&BigInt(4294967295));return y[i++]=ne,ne=ne>>8,y[i++]=ne,ne=ne>>8,y[i++]=ne,ne=ne>>8,y[i++]=ne,i}function Oe(y,t,i,B,V){I(t,B,V,y,i,7);let Z=Number(t&BigInt(4294967295));y[i+7]=Z,Z=Z>>8,y[i+6]=Z,Z=Z>>8,y[i+5]=Z,Z=Z>>8,y[i+4]=Z;let ne=Number(t>>BigInt(32)&BigInt(4294967295));return y[i+3]=ne,ne=ne>>8,y[i+2]=ne,ne=ne>>8,y[i+1]=ne,ne=ne>>8,y[i]=ne,i+8}C.prototype.writeBigUInt64LE=Xe(function(t,i=0){return Pe(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=Xe(function(t,i=0){return Oe(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(t,i,B,V){if(t=+t,i=i>>>0,!V){const Te=Math.pow(2,8*B-1);Ae(this,t,i,B,Te-1,-Te)}let Z=0,ne=1,be=0;for(this[i]=t&255;++Z<B&&(ne*=256);)t<0&&be===0&&this[i+Z-1]!==0&&(be=1),this[i+Z]=(t/ne>>0)-be&255;return i+B},C.prototype.writeIntBE=function(t,i,B,V){if(t=+t,i=i>>>0,!V){const Te=Math.pow(2,8*B-1);Ae(this,t,i,B,Te-1,-Te)}let Z=B-1,ne=1,be=0;for(this[i+Z]=t&255;--Z>=0&&(ne*=256);)t<0&&be===0&&this[i+Z+1]!==0&&(be=1),this[i+Z]=(t/ne>>0)-be&255;return i+B},C.prototype.writeInt8=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=t&255,i+1},C.prototype.writeInt16LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,32767,-32768),this[i]=t&255,this[i+1]=t>>>8,i+2},C.prototype.writeInt16BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=t&255,i+2},C.prototype.writeInt32LE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,2147483647,-2147483648),this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},C.prototype.writeInt32BE=function(t,i,B){return t=+t,i=i>>>0,B||Ae(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4},C.prototype.writeBigInt64LE=Xe(function(t,i=0){return Pe(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=Xe(function(t,i=0){return Oe(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ce(y,t,i,B,V,Z){if(i+B>y.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function ke(y,t,i,B,V){return t=+t,i=i>>>0,V||Ce(y,t,i,4),O.write(y,t,i,B,23,4),i+4}C.prototype.writeFloatLE=function(t,i,B){return ke(this,t,i,!0,B)},C.prototype.writeFloatBE=function(t,i,B){return ke(this,t,i,!1,B)};function Ue(y,t,i,B,V){return t=+t,i=i>>>0,V||Ce(y,t,i,8),O.write(y,t,i,B,52,8),i+8}C.prototype.writeDoubleLE=function(t,i,B){return Ue(this,t,i,!0,B)},C.prototype.writeDoubleBE=function(t,i,B){return Ue(this,t,i,!1,B)},C.prototype.copy=function(t,i,B,V){if(!C.isBuffer(t))throw new TypeError("argument should be a Buffer");if(B||(B=0),!V&&V!==0&&(V=this.length),i>=t.length&&(i=t.length),i||(i=0),V>0&&V<B&&(V=B),V===B||t.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),t.length-i<V-B&&(V=t.length-i+B);const Z=V-B;return this===t&&typeof F.prototype.copyWithin=="function"?this.copyWithin(i,B,V):F.prototype.set.call(t,this.subarray(B,V),i),Z},C.prototype.fill=function(t,i,B,V){if(typeof t=="string"){if(typeof i=="string"?(V=i,i=0,B=this.length):typeof B=="string"&&(V=B,B=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!C.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(t.length===1){const ne=t.charCodeAt(0);(V==="utf8"&&ne<128||V==="latin1")&&(t=ne)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(i<0||this.length<i||this.length<B)throw new RangeError("Out of range index");if(B<=i)return this;i=i>>>0,B=B===void 0?this.length:B>>>0,t||(t=0);let Z;if(typeof t=="number")for(Z=i;Z<B;++Z)this[Z]=t;else{const ne=C.isBuffer(t)?t:C.from(t,V),be=ne.length;if(be===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(Z=0;Z<B-i;++Z)this[Z+i]=ne[Z%be]}return this};const Ke={};function d(y,t,i){Ke[y]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}d("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),d("ERR_INVALID_ARG_TYPE",function(y,t){return`The "${y}" argument must be of type number. Received type ${typeof t}`},TypeError),d("ERR_OUT_OF_RANGE",function(y,t,i){let B=`The value of "${y}" is out of range.`,V=i;return Number.isInteger(i)&&Math.abs(i)>2**32?V=e(String(i)):typeof i=="bigint"&&(V=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(V=e(V)),V+="n"),B+=` It must be ${t}. Received ${V}`,B},RangeError);function e(y){let t="",i=y.length;const B=y[0]==="-"?1:0;for(;i>=B+4;i-=3)t=`_${y.slice(i-3,i)}${t}`;return`${y.slice(0,i)}${t}`}function n(y,t,i){Y(t,"offset"),(y[t]===void 0||y[t+i]===void 0)&&X(t,y.length-(i+1))}function I(y,t,i,B,V,Z){if(y>i||y<t){const ne=typeof t=="bigint"?"n":"";let be;throw t===0||t===BigInt(0)?be=`>= 0${ne} and < 2${ne} ** ${(Z+1)*8}${ne}`:be=`>= -(2${ne} ** ${(Z+1)*8-1}${ne}) and < 2 ** ${(Z+1)*8-1}${ne}`,new Ke.ERR_OUT_OF_RANGE("value",be,y)}n(B,V,Z)}function Y(y,t){if(typeof y!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",y)}function X(y,t,i){throw Math.floor(y)!==y?(Y(y,i),new Ke.ERR_OUT_OF_RANGE("offset","an integer",y)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,y)}const re=/[^+/0-9A-Za-z-_]/g;function we(y){if(y=y.split("=")[0],y=y.trim().replace(re,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function Se(y,t){t=t||1/0;let i;const B=y.length;let V=null;const Z=[];for(let ne=0;ne<B;++ne){if(i=y.charCodeAt(ne),i>55295&&i<57344){if(!V){if(i>56319){(t-=3)>-1&&Z.push(239,191,189);continue}else if(ne+1===B){(t-=3)>-1&&Z.push(239,191,189);continue}V=i;continue}if(i<56320){(t-=3)>-1&&Z.push(239,191,189),V=i;continue}i=(V-55296<<10|i-56320)+65536}else V&&(t-=3)>-1&&Z.push(239,191,189);if(V=null,i<128){if((t-=1)<0)break;Z.push(i)}else if(i<2048){if((t-=2)<0)break;Z.push(i>>6|192,i&63|128)}else if(i<65536){if((t-=3)<0)break;Z.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((t-=4)<0)break;Z.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return Z}function Ie(y){const t=[];for(let i=0;i<y.length;++i)t.push(y.charCodeAt(i)&255);return t}function Be(y,t){let i,B,V;const Z=[];for(let ne=0;ne<y.length&&!((t-=2)<0);++ne)i=y.charCodeAt(ne),B=i>>8,V=i%256,Z.push(V),Z.push(B);return Z}function Ee(y){return P.toByteArray(we(y))}function xt(y,t,i,B){let V;for(V=0;V<B&&!(V+i>=t.length||V>=y.length);++V)t[V+i]=y[V];return V}function We(y,t){return y instanceof t||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===t.name}function In(y){return y!==y}const ua=(function(){const y="0123456789abcdef",t=new Array(256);for(let i=0;i<16;++i){const B=i*16;for(let V=0;V<16;++V)t[B+V]=y[i]+y[V]}return t})();function Xe(y){return typeof BigInt>"u"?fa:y}function fa(){throw new Error("BigInt not supported")}})(s);const R=s.Buffer;r.Blob=s.Blob,r.BlobOptions=s.BlobOptions,r.Buffer=s.Buffer,r.File=s.File,r.FileOptions=s.FileOptions,r.INSPECT_MAX_BYTES=s.INSPECT_MAX_BYTES,r.SlowBuffer=s.SlowBuffer,r.TranscodeEncoding=s.TranscodeEncoding,r.atob=s.atob,r.btoa=s.btoa,r.constants=s.constants,r.default=R,r.isAscii=s.isAscii,r.isUtf8=s.isUtf8,r.kMaxLength=s.kMaxLength,r.kStringMaxLength=s.kStringMaxLength,r.resolveObjectURL=s.resolveObjectURL,r.transcode=s.transcode})(Ct)),Ct}var Dt={},kt={},qt,kn;function qn(){return kn||(kn=1,qt=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),g=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(g)!=="[object Symbol]")return!1;var w=42;s[l]=w;for(var o in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var a=Object.getOwnPropertySymbols(s);if(a.length!==1||a[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(s,l);if(p.value!==w||p.enumerable!==!0)return!1}return!0}),qt}var jt,jn;function _t(){if(jn)return jt;jn=1;var r=qn();return jt=function(){return r()&&!!Symbol.toStringTag},jt}var Gt,Gn;function Wn(){return Gn||(Gn=1,Gt=Object),Gt}var Wt,Hn;function rs(){return Hn||(Hn=1,Wt=Error),Wt}var Ht,$n;function ns(){return $n||($n=1,Ht=EvalError),Ht}var $t,Yn;function is(){return Yn||(Yn=1,$t=RangeError),$t}var Yt,Vn;function os(){return Vn||(Vn=1,Yt=ReferenceError),Yt}var Vt,Jn;function zn(){return Jn||(Jn=1,Vt=SyntaxError),Vt}var Jt,Kn;function ft(){return Kn||(Kn=1,Jt=TypeError),Jt}var zt,Xn;function ss(){return Xn||(Xn=1,zt=URIError),zt}var Kt,Zn;function as(){return Zn||(Zn=1,Kt=Math.abs),Kt}var Xt,Qn;function us(){return Qn||(Qn=1,Xt=Math.floor),Xt}var Zt,ei;function fs(){return ei||(ei=1,Zt=Math.max),Zt}var Qt,ti;function ls(){return ti||(ti=1,Qt=Math.min),Qt}var er,ri;function cs(){return ri||(ri=1,er=Math.pow),er}var tr,ni;function hs(){return ni||(ni=1,tr=Math.round),tr}var rr,ii;function ps(){return ii||(ii=1,rr=Number.isNaN||function(s){return s!==s}),rr}var nr,oi;function ds(){if(oi)return nr;oi=1;var r=ps();return nr=function(l){return r(l)||l===0?l:l<0?-1:1},nr}var ir,si;function ys(){return si||(si=1,ir=Object.getOwnPropertyDescriptor),ir}var or,ai;function it(){if(ai)return or;ai=1;var r=ys();if(r)try{r([],"length")}catch{r=null}return or=r,or}var sr,ui;function vt(){if(ui)return sr;ui=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return sr=r,sr}var ar,fi;function gs(){if(fi)return ar;fi=1;var r=typeof Symbol<"u"&&Symbol,s=qn();return ar=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},ar}var ur,li;function ci(){return li||(li=1,ur=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ur}var fr,hi;function pi(){if(hi)return fr;hi=1;var r=Wn();return fr=r.getPrototypeOf||null,fr}var lr,di;function ws(){if(di)return lr;di=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,l=Math.max,g="[object Function]",w=function(m,b){for(var h=[],x=0;x<m.length;x+=1)h[x]=m[x];for(var N=0;N<b.length;N+=1)h[N+m.length]=b[N];return h},o=function(m,b){for(var h=[],x=b,N=0;x<m.length;x+=1,N+=1)h[N]=m[x];return h},a=function(p,m){for(var b="",h=0;h<p.length;h+=1)b+=p[h],h+1<p.length&&(b+=m);return b};return lr=function(m){var b=this;if(typeof b!="function"||s.apply(b)!==g)throw new TypeError(r+b);for(var h=o(arguments,1),x,N=function(){if(this instanceof x){var R=b.apply(this,w(h,arguments));return Object(R)===R?R:this}return b.apply(m,w(h,arguments))},L=l(0,b.length-h.length),E=[],k=0;k<L;k++)E[k]="$"+k;if(x=Function("binder","return function ("+a(E,",")+"){ return binder.apply(this,arguments); }")(N),b.prototype){var j=function(){};j.prototype=b.prototype,x.prototype=new j,j.prototype=null}return x},lr}var cr,yi;function lt(){if(yi)return cr;yi=1;var r=ws();return cr=Function.prototype.bind||r,cr}var hr,gi;function pr(){return gi||(gi=1,hr=Function.prototype.call),hr}var dr,wi;function yr(){return wi||(wi=1,dr=Function.prototype.apply),dr}var gr,mi;function ms(){return mi||(mi=1,gr=typeof Reflect<"u"&&Reflect&&Reflect.apply),gr}var wr,bi;function Ei(){if(bi)return wr;bi=1;var r=lt(),s=yr(),l=pr(),g=ms();return wr=g||r.call(l,s),wr}var mr,_i;function br(){if(_i)return mr;_i=1;var r=lt(),s=ft(),l=pr(),g=Ei();return mr=function(o){if(o.length<1||typeof o[0]!="function")throw new s("a function is required");return g(r,l,o)},mr}var Er,vi;function bs(){if(vi)return Er;vi=1;var r=br(),s=it(),l;try{l=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var g=!!l&&s&&s(Object.prototype,"__proto__"),w=Object,o=w.getPrototypeOf;return Er=g&&typeof g.get=="function"?r([g.get]):typeof o=="function"?function(p){return o(p==null?p:w(p))}:!1,Er}var _r,Ai;function vr(){if(Ai)return _r;Ai=1;var r=ci(),s=pi(),l=bs();return _r=r?function(w){return r(w)}:s?function(w){if(!w||typeof w!="object"&&typeof w!="function")throw new TypeError("getProto: not an object");return s(w)}:l?function(w){return l(w)}:null,_r}var Ar,Si;function Ii(){if(Si)return Ar;Si=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,l=lt();return Ar=l.call(r,s),Ar}var Sr,Bi;function Ri(){if(Bi)return Sr;Bi=1;var r,s=Wn(),l=rs(),g=ns(),w=is(),o=os(),a=zn(),p=ft(),m=ss(),b=as(),h=us(),x=fs(),N=ls(),L=cs(),E=hs(),k=ds(),j=Function,R=function(D){try{return j('"use strict"; return ('+D+").constructor;")()}catch{}},M=it(),P=vt(),O=function(){throw new p},v=M?(function(){try{return arguments.callee,O}catch{try{return M(arguments,"callee").get}catch{return O}}})():O,G=gs()(),F=vr(),z=pi(),K=ci(),ee=yr(),Q=pr(),C={},U=typeof Uint8Array>"u"||!F?r:F(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":G&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l,"%eval%":eval,"%EvalError%":g,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":j,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G&&F?F(F([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G||!F?r:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":M,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":w,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G||!F?r:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G&&F?F(""[Symbol.iterator]()):r,"%Symbol%":G?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":v,"%TypedArray%":U,"%TypeError%":p,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":P,"%Object.getPrototypeOf%":z,"%Math.abs%":b,"%Math.floor%":h,"%Math.max%":x,"%Math.min%":N,"%Math.pow%":L,"%Math.round%":E,"%Math.sign%":k,"%Reflect.getPrototypeOf%":K};if(F)try{null.error}catch(D){var se=F(F(D));J["%Error.prototype%"]=se}var oe=function D(W){var u;if(W==="%AsyncFunction%")u=R("async function () {}");else if(W==="%GeneratorFunction%")u=R("function* () {}");else if(W==="%AsyncGeneratorFunction%")u=R("async function* () {}");else if(W==="%AsyncGenerator%"){var f=D("%AsyncGeneratorFunction%");f&&(u=f.prototype)}else if(W==="%AsyncIteratorPrototype%"){var q=D("%AsyncGenerator%");q&&F&&(u=F(q.prototype))}return J[W]=u,u},ae={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fe=lt(),ce=Ii(),de=fe.call(Q,Array.prototype.concat),pe=fe.call(ee,Array.prototype.splice),c=fe.call(Q,String.prototype.replace),A=fe.call(Q,String.prototype.slice),_=fe.call(Q,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,S=function(W){var u=A(W,0,1),f=A(W,-1);if(u==="%"&&f!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(f==="%"&&u!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var q=[];return c(W,H,function(ie,le,ue,he){q[q.length]=ue?c(he,T,"$1"):le||ie}),q},$=function(W,u){var f=W,q;if(ce(ae,f)&&(q=ae[f],f="%"+q[0]+"%"),ce(J,f)){var ie=J[f];if(ie===C&&(ie=oe(f)),typeof ie>"u"&&!u)throw new p("intrinsic "+W+" exists, but is not available. Please file an issue!");return{alias:q,name:f,value:ie}}throw new a("intrinsic "+W+" does not exist!")};return Sr=function(W,u){if(typeof W!="string"||W.length===0)throw new p("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof u!="boolean")throw new p('"allowMissing" argument must be a boolean');if(_(/^%?[^%]*%?$/,W)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var f=S(W),q=f.length>0?f[0]:"",ie=$("%"+q+"%",u),le=ie.name,ue=ie.value,he=!1,ye=ie.alias;ye&&(q=ye[0],pe(f,de([0,1],ye)));for(var te=1,Ne=!0;te<f.length;te+=1){var Me=f[te],_e=A(Me,0,1),Ae=A(Me,-1);if((_e==='"'||_e==="'"||_e==="`"||Ae==='"'||Ae==="'"||Ae==="`")&&_e!==Ae)throw new a("property names with quotes must have matching quotes");if((Me==="constructor"||!Ne)&&(he=!0),q+="."+Me,le="%"+q+"%",ce(J,le))ue=J[le];else if(ue!=null){if(!(Me in ue)){if(!u)throw new p("base intrinsic for "+W+" exists, but the property is not available.");return}if(M&&te+1>=f.length){var Pe=M(ue,Me);Ne=!!Pe,Ne&&"get"in Pe&&!("originalValue"in Pe.get)?ue=Pe.get:ue=ue[Me]}else Ne=ce(ue,Me),ue=ue[Me];Ne&&!he&&(J[le]=ue)}}return ue},Sr}var Ir,Ti;function ct(){if(Ti)return Ir;Ti=1;var r=Ri(),s=br(),l=s([r("%String.prototype.indexOf%")]);return Ir=function(w,o){var a=r(w,!!o);return typeof a=="function"&&l(w,".prototype.")>-1?s([a]):a},Ir}var Br,xi;function Es(){if(xi)return Br;xi=1;var r=_t()(),s=ct(),l=s("Object.prototype.toString"),g=function(p){return r&&p&&typeof p=="object"&&Symbol.toStringTag in p?!1:l(p)==="[object Arguments]"},w=function(p){return g(p)?!0:p!==null&&typeof p=="object"&&"length"in p&&typeof p.length=="number"&&p.length>=0&&l(p)!=="[object Array]"&&"callee"in p&&l(p.callee)==="[object Function]"},o=(function(){return g(arguments)})();return g.isLegacyArguments=w,Br=o?g:w,Br}var Rr,Fi;function _s(){if(Fi)return Rr;Fi=1;var r=ct(),s=_t()(),l=Ii(),g=it(),w;if(s){var o=r("RegExp.prototype.exec"),a={},p=function(){throw a},m={toString:p,valueOf:p};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=p),w=function(N){if(!N||typeof N!="object")return!1;var L=g(N,"lastIndex"),E=L&&l(L,"value");if(!E)return!1;try{o(N,m)}catch(k){return k===a}}}else{var b=r("Object.prototype.toString"),h="[object RegExp]";w=function(N){return!N||typeof N!="object"&&typeof N!="function"?!1:b(N)===h}}return Rr=w,Rr}var Tr,Ui;function vs(){if(Ui)return Tr;Ui=1;var r=ct(),s=_s(),l=r("RegExp.prototype.exec"),g=ft();return Tr=function(o){if(!s(o))throw new g("`regex` must be a RegExp");return function(p){return l(o,p)!==null}},Tr}var xr,Oi;function As(){if(Oi)return xr;Oi=1;const r=function*(){}.constructor;return xr=()=>r,xr}var Fr,Ni;function Ss(){if(Ni)return Fr;Ni=1;var r=ct(),s=vs(),l=s(/^\s*(?:function)?\*/),g=_t()(),w=vr(),o=r("Object.prototype.toString"),a=r("Function.prototype.toString"),p=As();return Fr=function(b){if(typeof b!="function")return!1;if(l(a(b)))return!0;if(!g){var h=o(b);return h==="[object GeneratorFunction]"}if(!w)return!1;var x=p();return x&&w(b)===x.prototype},Fr}var Ur,Mi;function Is(){if(Mi)return Ur;Mi=1;var r=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l,g;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{l=Object.defineProperty({},"length",{get:function(){throw g}}),g={},s(function(){throw 42},null,l)}catch(M){M!==g&&(s=null)}else s=null;var w=/^\s*class\b/,o=function(P){try{var O=r.call(P);return w.test(O)}catch{return!1}},a=function(P){try{return o(P)?!1:(r.call(P),!0)}catch{return!1}},p=Object.prototype.toString,m="[object Object]",b="[object Function]",h="[object GeneratorFunction]",x="[object HTMLAllCollection]",N="[object HTML document.all class]",L="[object HTMLCollection]",E=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),j=function(){return!1};if(typeof document=="object"){var R=document.all;p.call(R)===p.call(document.all)&&(j=function(P){if((k||!P)&&(typeof P>"u"||typeof P=="object"))try{var O=p.call(P);return(O===x||O===N||O===L||O===m)&&P("")==null}catch{}return!1})}return Ur=s?function(P){if(j(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{s(P,null,l)}catch(O){if(O!==g)return!1}return!o(P)&&a(P)}:function(P){if(j(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(E)return a(P);if(o(P))return!1;var O=p.call(P);return O!==b&&O!==h&&!/^\[object HTML/.test(O)?!1:a(P)},Ur}var Or,Pi;function Bs(){if(Pi)return Or;Pi=1;var r=Is(),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,g=function(m,b,h){for(var x=0,N=m.length;x<N;x++)l.call(m,x)&&(h==null?b(m[x],x,m):b.call(h,m[x],x,m))},w=function(m,b,h){for(var x=0,N=m.length;x<N;x++)h==null?b(m.charAt(x),x,m):b.call(h,m.charAt(x),x,m)},o=function(m,b,h){for(var x in m)l.call(m,x)&&(h==null?b(m[x],x,m):b.call(h,m[x],x,m))};function a(p){return s.call(p)==="[object Array]"}return Or=function(m,b,h){if(!r(b))throw new TypeError("iterator must be a function");var x;arguments.length>=3&&(x=h),a(m)?g(m,b,x):typeof m=="string"?w(m,b,x):o(m,b,x)},Or}var Nr,Li;function Rs(){return Li||(Li=1,Nr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Nr}var Mr,Ci;function Ts(){if(Ci)return Mr;Ci=1;var r=Rs(),s=typeof globalThis>"u"?Ve:globalThis;return Mr=function(){for(var g=[],w=0;w<r.length;w++)typeof s[r[w]]=="function"&&(g[g.length]=r[w]);return g},Mr}var Pr={exports:{}},Lr,Di;function xs(){if(Di)return Lr;Di=1;var r=vt(),s=zn(),l=ft(),g=it();return Lr=function(o,a,p){if(!o||typeof o!="object"&&typeof o!="function")throw new l("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new l("`loose`, if provided, must be a boolean");var m=arguments.length>3?arguments[3]:null,b=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,x=arguments.length>6?arguments[6]:!1,N=!!g&&g(o,a);if(r)r(o,a,{configurable:h===null&&N?N.configurable:!h,enumerable:m===null&&N?N.enumerable:!m,value:p,writable:b===null&&N?N.writable:!b});else if(x||!m&&!b&&!h)o[a]=p;else throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Lr}var Cr,ki;function Fs(){if(ki)return Cr;ki=1;var r=vt(),s=function(){return!!r};return s.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},Cr=s,Cr}var Dr,qi;function Us(){if(qi)return Dr;qi=1;var r=Ri(),s=xs(),l=Fs()(),g=it(),w=ft(),o=r("%Math.floor%");return Dr=function(p,m){if(typeof p!="function")throw new w("`fn` is not a function");if(typeof m!="number"||m<0||m>4294967295||o(m)!==m)throw new w("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],h=!0,x=!0;if("length"in p&&g){var N=g(p,"length");N&&!N.configurable&&(h=!1),N&&!N.writable&&(x=!1)}return(h||x||!b)&&(l?s(p,"length",m,!0,!0):s(p,"length",m)),p},Dr}var kr,ji;function Os(){if(ji)return kr;ji=1;var r=lt(),s=yr(),l=Ei();return kr=function(){return l(r,s,arguments)},kr}var Gi;function Ns(){return Gi||(Gi=1,(function(r){var s=Us(),l=vt(),g=br(),w=Os();r.exports=function(a){var p=g(arguments),m=a.length-(arguments.length-1);return s(p,1+(m>0?m:0),!0)},l?l(r.exports,"apply",{value:w}):r.exports.apply=w})(Pr)),Pr.exports}var qr,Wi;function Hi(){if(Wi)return qr;Wi=1;var r=Bs(),s=Ts(),l=Ns(),g=ct(),w=it(),o=vr(),a=g("Object.prototype.toString"),p=_t()(),m=typeof globalThis>"u"?Ve:globalThis,b=s(),h=g("String.prototype.slice"),x=g("Array.prototype.indexOf",!0)||function(j,R){for(var M=0;M<j.length;M+=1)if(j[M]===R)return M;return-1},N={__proto__:null};p&&w&&o?r(b,function(k){var j=new m[k];if(Symbol.toStringTag in j&&o){var R=o(j),M=w(R,Symbol.toStringTag);if(!M&&R){var P=o(R);M=w(P,Symbol.toStringTag)}if(M&&M.get){var O=l(M.get);N["$"+k]=O}}}):r(b,function(k){var j=new m[k],R=j.slice||j.set;if(R){var M=l(R);N["$"+k]=M}});var L=function(j){var R=!1;return r(N,function(M,P){if(!R)try{"$"+M(j)===P&&(R=h(P,1))}catch{}}),R},E=function(j){var R=!1;return r(N,function(M,P){if(!R)try{M(j),R=h(P,1)}catch{}}),R};return qr=function(j){if(!j||typeof j!="object")return!1;if(!p){var R=h(a(j),8,-1);return x(b,R)>-1?R:R!=="Object"?!1:E(j)}return w?L(j):null},qr}var jr,$i;function Ms(){if($i)return jr;$i=1;var r=Hi();return jr=function(l){return!!r(l)},jr}var Yi;function Ps(){return Yi||(Yi=1,(function(r){var s=Es(),l=Ss(),g=Hi(),w=Ms();function o(te){return te.call.bind(te)}var a=typeof BigInt<"u",p=typeof Symbol<"u",m=o(Object.prototype.toString),b=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),x=o(Boolean.prototype.valueOf);if(a)var N=o(BigInt.prototype.valueOf);if(p)var L=o(Symbol.prototype.valueOf);function E(te,Ne){if(typeof te!="object")return!1;try{return Ne(te),!0}catch{return!1}}r.isArgumentsObject=s,r.isGeneratorFunction=l,r.isTypedArray=w;function k(te){return typeof Promise<"u"&&te instanceof Promise||te!==null&&typeof te=="object"&&typeof te.then=="function"&&typeof te.catch=="function"}r.isPromise=k;function j(te){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(te):w(te)||A(te)}r.isArrayBufferView=j;function R(te){return g(te)==="Uint8Array"}r.isUint8Array=R;function M(te){return g(te)==="Uint8ClampedArray"}r.isUint8ClampedArray=M;function P(te){return g(te)==="Uint16Array"}r.isUint16Array=P;function O(te){return g(te)==="Uint32Array"}r.isUint32Array=O;function v(te){return g(te)==="Int8Array"}r.isInt8Array=v;function G(te){return g(te)==="Int16Array"}r.isInt16Array=G;function F(te){return g(te)==="Int32Array"}r.isInt32Array=F;function z(te){return g(te)==="Float32Array"}r.isFloat32Array=z;function K(te){return g(te)==="Float64Array"}r.isFloat64Array=K;function ee(te){return g(te)==="BigInt64Array"}r.isBigInt64Array=ee;function Q(te){return g(te)==="BigUint64Array"}r.isBigUint64Array=Q;function C(te){return m(te)==="[object Map]"}C.working=typeof Map<"u"&&C(new Map);function U(te){return typeof Map>"u"?!1:C.working?C(te):te instanceof Map}r.isMap=U;function J(te){return m(te)==="[object Set]"}J.working=typeof Set<"u"&&J(new Set);function se(te){return typeof Set>"u"?!1:J.working?J(te):te instanceof Set}r.isSet=se;function oe(te){return m(te)==="[object WeakMap]"}oe.working=typeof WeakMap<"u"&&oe(new WeakMap);function ae(te){return typeof WeakMap>"u"?!1:oe.working?oe(te):te instanceof WeakMap}r.isWeakMap=ae;function fe(te){return m(te)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function ce(te){return fe(te)}r.isWeakSet=ce;function de(te){return m(te)==="[object ArrayBuffer]"}de.working=typeof ArrayBuffer<"u"&&de(new ArrayBuffer);function pe(te){return typeof ArrayBuffer>"u"?!1:de.working?de(te):te instanceof ArrayBuffer}r.isArrayBuffer=pe;function c(te){return m(te)==="[object DataView]"}c.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&c(new DataView(new ArrayBuffer(1),0,1));function A(te){return typeof DataView>"u"?!1:c.working?c(te):te instanceof DataView}r.isDataView=A;var _=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function H(te){return m(te)==="[object SharedArrayBuffer]"}function T(te){return typeof _>"u"?!1:(typeof H.working>"u"&&(H.working=H(new _)),H.working?H(te):te instanceof _)}r.isSharedArrayBuffer=T;function S(te){return m(te)==="[object AsyncFunction]"}r.isAsyncFunction=S;function $(te){return m(te)==="[object Map Iterator]"}r.isMapIterator=$;function D(te){return m(te)==="[object Set Iterator]"}r.isSetIterator=D;function W(te){return m(te)==="[object Generator]"}r.isGeneratorObject=W;function u(te){return m(te)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=u;function f(te){return E(te,b)}r.isNumberObject=f;function q(te){return E(te,h)}r.isStringObject=q;function ie(te){return E(te,x)}r.isBooleanObject=ie;function le(te){return a&&E(te,N)}r.isBigIntObject=le;function ue(te){return p&&E(te,L)}r.isSymbolObject=ue;function he(te){return f(te)||q(te)||ie(te)||le(te)||ue(te)}r.isBoxedPrimitive=he;function ye(te){return typeof Uint8Array<"u"&&(pe(te)||T(te))}r.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(te){Object.defineProperty(r,te,{enumerable:!1,value:function(){throw new Error(te+" is not supported in userland")}})})})(kt)),kt}var Gr,Vi;function Ls(){return Vi||(Vi=1,Gr=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Gr}var Ji;function zi(){return Ji||(Ji=1,(function(r){var s=Object.getOwnPropertyDescriptors||function(A){for(var _=Object.keys(A),H={},T=0;T<_.length;T++)H[_[T]]=Object.getOwnPropertyDescriptor(A,_[T]);return H},l=/%[sdj%]/g;r.format=function(c){if(!v(c)){for(var A=[],_=0;_<arguments.length;_++)A.push(a(arguments[_]));return A.join(" ")}for(var _=1,H=arguments,T=H.length,S=String(c).replace(l,function(D){if(D==="%%")return"%";if(_>=T)return D;switch(D){case"%s":return String(H[_++]);case"%d":return Number(H[_++]);case"%j":try{return JSON.stringify(H[_++])}catch{return"[Circular]"}default:return D}}),$=H[_];_<T;$=H[++_])M($)||!K($)?S+=" "+$:S+=" "+a($);return S},r.deprecate=function(c,A){if(typeof me<"u"&&me.noDeprecation===!0)return c;if(typeof me>"u")return function(){return r.deprecate(c,A).apply(this,arguments)};var _=!1;function H(){if(!_){if(me.throwDeprecation)throw new Error(A);me.traceDeprecation?console.trace(A):console.error(A),_=!0}return c.apply(this,arguments)}return H};var g={},w=/^$/;if(me.env.NODE_DEBUG){var o=me.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),w=new RegExp("^"+o+"$","i")}r.debuglog=function(c){if(c=c.toUpperCase(),!g[c])if(w.test(c)){var A=me.pid;g[c]=function(){var _=r.format.apply(r,arguments);console.error("%s %d: %s",c,A,_)}}else g[c]=function(){};return g[c]};function a(c,A){var _={seen:[],stylize:m};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),R(A)?_.showHidden=A:A&&r._extend(_,A),F(_.showHidden)&&(_.showHidden=!1),F(_.depth)&&(_.depth=2),F(_.colors)&&(_.colors=!1),F(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=p),h(_,c,_.depth)}r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function p(c,A){var _=a.styles[A];return _?"\x1B["+a.colors[_][0]+"m"+c+"\x1B["+a.colors[_][1]+"m":c}function m(c,A){return c}function b(c){var A={};return c.forEach(function(_,H){A[_]=!0}),A}function h(c,A,_){if(c.customInspect&&A&&C(A.inspect)&&A.inspect!==r.inspect&&!(A.constructor&&A.constructor.prototype===A)){var H=A.inspect(_,c);return v(H)||(H=h(c,H,_)),H}var T=x(c,A);if(T)return T;var S=Object.keys(A),$=b(S);if(c.showHidden&&(S=Object.getOwnPropertyNames(A)),Q(A)&&(S.indexOf("message")>=0||S.indexOf("description")>=0))return N(A);if(S.length===0){if(C(A)){var D=A.name?": "+A.name:"";return c.stylize("[Function"+D+"]","special")}if(z(A))return c.stylize(RegExp.prototype.toString.call(A),"regexp");if(ee(A))return c.stylize(Date.prototype.toString.call(A),"date");if(Q(A))return N(A)}var W="",u=!1,f=["{","}"];if(j(A)&&(u=!0,f=["[","]"]),C(A)){var q=A.name?": "+A.name:"";W=" [Function"+q+"]"}if(z(A)&&(W=" "+RegExp.prototype.toString.call(A)),ee(A)&&(W=" "+Date.prototype.toUTCString.call(A)),Q(A)&&(W=" "+N(A)),S.length===0&&(!u||A.length==0))return f[0]+W+f[1];if(_<0)return z(A)?c.stylize(RegExp.prototype.toString.call(A),"regexp"):c.stylize("[Object]","special");c.seen.push(A);var ie;return u?ie=L(c,A,_,$,S):ie=S.map(function(le){return E(c,A,_,$,le,u)}),c.seen.pop(),k(ie,W,f)}function x(c,A){if(F(A))return c.stylize("undefined","undefined");if(v(A)){var _="'"+JSON.stringify(A).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return c.stylize(_,"string")}if(O(A))return c.stylize(""+A,"number");if(R(A))return c.stylize(""+A,"boolean");if(M(A))return c.stylize("null","null")}function N(c){return"["+Error.prototype.toString.call(c)+"]"}function L(c,A,_,H,T){for(var S=[],$=0,D=A.length;$<D;++$)fe(A,String($))?S.push(E(c,A,_,H,String($),!0)):S.push("");return T.forEach(function(W){W.match(/^\d+$/)||S.push(E(c,A,_,H,W,!0))}),S}function E(c,A,_,H,T,S){var $,D,W;if(W=Object.getOwnPropertyDescriptor(A,T)||{value:A[T]},W.get?W.set?D=c.stylize("[Getter/Setter]","special"):D=c.stylize("[Getter]","special"):W.set&&(D=c.stylize("[Setter]","special")),fe(H,T)||($="["+T+"]"),D||(c.seen.indexOf(W.value)<0?(M(_)?D=h(c,W.value,null):D=h(c,W.value,_-1),D.indexOf(`
2
2
  `)>-1&&(S?D=D.split(`
3
3
  `).map(function(u){return" "+u}).join(`
4
4
  `).slice(2):D=`
@@ -7,13 +7,13 @@
7
7
  `))):D=c.stylize("[Circular]","special")),F($)){if(S&&T.match(/^\d+$/))return D;$=JSON.stringify(""+T),$.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($=$.slice(1,-1),$=c.stylize($,"name")):($=$.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$=c.stylize($,"string"))}return $+": "+D}function k(c,A,_){var H=c.reduce(function(T,S){return S.indexOf(`
8
8
  `)>=0,T+S.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?_[0]+(A===""?"":A+`
9
9
  `)+" "+c.join(`,
10
- `)+" "+_[1]:_[0]+A+" "+c.join(", ")+" "+_[1]}r.types=Ps();function j(c){return Array.isArray(c)}r.isArray=j;function R(c){return typeof c=="boolean"}r.isBoolean=R;function L(c){return c===null}r.isNull=L;function M(c){return c==null}r.isNullOrUndefined=M;function O(c){return typeof c=="number"}r.isNumber=O;function v(c){return typeof c=="string"}r.isString=v;function G(c){return typeof c=="symbol"}r.isSymbol=G;function F(c){return c===void 0}r.isUndefined=F;function z(c){return K(c)&&J(c)==="[object RegExp]"}r.isRegExp=z,r.types.isRegExp=z;function K(c){return typeof c=="object"&&c!==null}r.isObject=K;function ee(c){return K(c)&&J(c)==="[object Date]"}r.isDate=ee,r.types.isDate=ee;function Q(c){return K(c)&&(J(c)==="[object Error]"||c instanceof Error)}r.isError=Q,r.types.isNativeError=Q;function C(c){return typeof c=="function"}r.isFunction=C;function U(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}r.isPrimitive=U,r.isBuffer=Ls();function J(c){return Object.prototype.toString.call(c)}function se(c){return c<10?"0"+c.toString(10):c.toString(10)}var oe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ae(){var c=new Date,A=[se(c.getHours()),se(c.getMinutes()),se(c.getSeconds())].join(":");return[c.getDate(),oe[c.getMonth()],A].join(" ")}r.log=function(){console.log("%s - %s",ae(),r.format.apply(r,arguments))},r.inherits=Ze(),r._extend=function(c,A){if(!A||!K(A))return c;for(var _=Object.keys(A),H=_.length;H--;)c[_[H]]=A[_[H]];return c};function fe(c,A){return Object.prototype.hasOwnProperty.call(c,A)}var ce=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(A){if(typeof A!="function")throw new TypeError('The "original" argument must be of type Function');if(ce&&A[ce]){var _=A[ce];if(typeof _!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,ce,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var H,T,S=new Promise(function(W,u){H=W,T=u}),$=[],D=0;D<arguments.length;D++)$.push(arguments[D]);$.push(function(W,u){W?T(W):H(u)});try{A.apply(this,$)}catch(W){T(W)}return S}return Object.setPrototypeOf(_,Object.getPrototypeOf(A)),ce&&Object.defineProperty(_,ce,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,s(A))},r.promisify.custom=ce;function de(c,A){if(!c){var _=new Error("Promise was rejected with a falsy value");_.reason=c,c=_}return A(c)}function pe(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');function A(){for(var _=[],H=0;H<arguments.length;H++)_.push(arguments[H]);var T=_.pop();if(typeof T!="function")throw new TypeError("The last argument must be of type Function");var S=this,$=function(){return T.apply(S,arguments)};c.apply(this,_).then(function(D){me.nextTick($.bind(null,null,D))},function(D){me.nextTick(de.bind(null,D,$))})}return Object.setPrototypeOf(A,Object.getPrototypeOf(c)),Object.defineProperties(A,s(c)),A}r.callbackify=pe})(Dt)),Dt}var Wr,Ki;function Cs(){if(Ki)return Wr;Ki=1;function r(E,k){var j=Object.keys(E);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(E);k&&(R=R.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),j.push.apply(j,R)}return j}function s(E){for(var k=1;k<arguments.length;k++){var j=arguments[k]!=null?arguments[k]:{};k%2?r(Object(j),!0).forEach(function(R){l(E,R,j[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(j)):r(Object(j)).forEach(function(R){Object.defineProperty(E,R,Object.getOwnPropertyDescriptor(j,R))})}return E}function l(E,k,j){return k=a(k),k in E?Object.defineProperty(E,k,{value:j,enumerable:!0,configurable:!0,writable:!0}):E[k]=j,E}function w(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function g(E,k){for(var j=0;j<k.length;j++){var R=k[j];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(E,a(R.key),R)}}function o(E,k,j){return k&&g(E.prototype,k),Object.defineProperty(E,"prototype",{writable:!1}),E}function a(E){var k=p(E,"string");return typeof k=="symbol"?k:String(k)}function p(E,k){if(typeof E!="object"||E===null)return E;var j=E[Symbol.toPrimitive];if(j!==void 0){var R=j.call(E,k);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(E)}var m=De(),b=m.Buffer,h=zi(),x=h.inspect,N=x&&x.custom||"inspect";function P(E,k,j){b.prototype.copy.call(E,k,j)}return Wr=(function(){function E(){w(this,E),this.head=null,this.tail=null,this.length=0}return o(E,[{key:"push",value:function(j){var R={data:j,next:null};this.length>0?this.tail.next=R:this.head=R,this.tail=R,++this.length}},{key:"unshift",value:function(j){var R={data:j,next:this.head};this.length===0&&(this.tail=R),this.head=R,++this.length}},{key:"shift",value:function(){if(this.length!==0){var j=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,j}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(j){if(this.length===0)return"";for(var R=this.head,L=""+R.data;R=R.next;)L+=j+R.data;return L}},{key:"concat",value:function(j){if(this.length===0)return b.alloc(0);for(var R=b.allocUnsafe(j>>>0),L=this.head,M=0;L;)P(L.data,R,M),M+=L.data.length,L=L.next;return R}},{key:"consume",value:function(j,R){var L;return j<this.head.data.length?(L=this.head.data.slice(0,j),this.head.data=this.head.data.slice(j)):j===this.head.data.length?L=this.shift():L=R?this._getString(j):this._getBuffer(j),L}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(j){var R=this.head,L=1,M=R.data;for(j-=M.length;R=R.next;){var O=R.data,v=j>O.length?O.length:j;if(v===O.length?M+=O:M+=O.slice(0,j),j-=v,j===0){v===O.length?(++L,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=O.slice(v));break}++L}return this.length-=L,M}},{key:"_getBuffer",value:function(j){var R=b.allocUnsafe(j),L=this.head,M=1;for(L.data.copy(R),j-=L.data.length;L=L.next;){var O=L.data,v=j>O.length?O.length:j;if(O.copy(R,R.length-j,0,v),j-=v,j===0){v===O.length?(++M,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=O.slice(v));break}++M}return this.length-=M,R}},{key:N,value:function(j,R){return x(this,s(s({},R),{},{depth:0,customInspect:!1}))}}]),E})(),Wr}var Hr,Xi;function Zi(){if(Xi)return Hr;Xi=1;function r(a,p){var m=this,b=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return b||h?(p?p(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,me.nextTick(g,this,a)):me.nextTick(g,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(x){!p&&x?m._writableState?m._writableState.errorEmitted?me.nextTick(l,m):(m._writableState.errorEmitted=!0,me.nextTick(s,m,x)):me.nextTick(s,m,x):p?(me.nextTick(l,m),p(x)):me.nextTick(l,m)}),this)}function s(a,p){g(a,p),l(a)}function l(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function w(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function g(a,p){a.emit("error",p)}function o(a,p){var m=a._readableState,b=a._writableState;m&&m.autoDestroy||b&&b.autoDestroy?a.destroy(p):a.emit("error",p)}return Hr={destroy:r,undestroy:w,errorOrDestroy:o},Hr}var $r={},Qi;function ot(){if(Qi)return $r;Qi=1;function r(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,p.__proto__=m}var s={};function l(p,m,b){b||(b=Error);function h(N,P,E){return typeof m=="string"?m:m(N,P,E)}var x=(function(N){r(P,N);function P(E,k,j){return N.call(this,h(E,k,j))||this}return P})(b);x.prototype.name=b.name,x.prototype.code=p,s[p]=x}function w(p,m){if(Array.isArray(p)){var b=p.length;return p=p.map(function(h){return String(h)}),b>2?"one of ".concat(m," ").concat(p.slice(0,b-1).join(", "),", or ")+p[b-1]:b===2?"one of ".concat(m," ").concat(p[0]," or ").concat(p[1]):"of ".concat(m," ").concat(p[0])}else return"of ".concat(m," ").concat(String(p))}function g(p,m,b){return p.substr(0,m.length)===m}function o(p,m,b){return(b===void 0||b>p.length)&&(b=p.length),p.substring(b-m.length,b)===m}function a(p,m,b){return typeof b!="number"&&(b=0),b+m.length>p.length?!1:p.indexOf(m,b)!==-1}return l("ERR_INVALID_OPT_VALUE",function(p,m){return'The value "'+m+'" is invalid for option "'+p+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(p,m,b){var h;typeof m=="string"&&g(m,"not ")?(h="must not be",m=m.replace(/^not /,"")):h="must be";var x;if(o(p," argument"))x="The ".concat(p," ").concat(h," ").concat(w(m,"type"));else{var N=a(p,".")?"property":"argument";x='The "'.concat(p,'" ').concat(N," ").concat(h," ").concat(w(m,"type"))}return x+=". Received type ".concat(typeof b),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(p){return"The "+p+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(p){return"Cannot call "+p+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(p){return"Unknown encoding: "+p},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$r.codes=s,$r}var Yr,eo;function to(){if(eo)return Yr;eo=1;var r=ot().codes.ERR_INVALID_OPT_VALUE;function s(w,g,o){return w.highWaterMark!=null?w.highWaterMark:g?w[o]:null}function l(w,g,o,a){var p=s(g,a,o);if(p!=null){if(!(isFinite(p)&&Math.floor(p)===p)||p<0){var m=a?o:"highWaterMark";throw new r(m,p)}return Math.floor(p)}return w.objectMode?16:16*1024}return Yr={getHighWaterMark:l},Yr}var Vr,ro;function Ds(){if(ro)return Vr;ro=1,Vr=r;function r(l,w){if(s("noDeprecation"))return l;var g=!1;function o(){if(!g){if(s("throwDeprecation"))throw new Error(w);s("traceDeprecation")?console.trace(w):console.warn(w),g=!0}return l.apply(this,arguments)}return o}function s(l){try{if(!Ve.localStorage)return!1}catch{return!1}var w=Ve.localStorage[l];return w==null?!1:String(w).toLowerCase()==="true"}return Vr}var Jr,no;function io(){if(no)return Jr;no=1,Jr=z;function r(T){var S=this;this.next=null,this.entry=null,this.finish=function(){H(S,T)}}var s;z.WritableState=G;var l={deprecate:Ds()},w=Cn(),g=De().Buffer,o=(typeof Ve<"u"?Ve:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(T){return g.from(T)}function p(T){return g.isBuffer(T)||T instanceof o}var m=Zi(),b=to(),h=b.getHighWaterMark,x=ot().codes,N=x.ERR_INVALID_ARG_TYPE,P=x.ERR_METHOD_NOT_IMPLEMENTED,E=x.ERR_MULTIPLE_CALLBACK,k=x.ERR_STREAM_CANNOT_PIPE,j=x.ERR_STREAM_DESTROYED,R=x.ERR_STREAM_NULL_VALUES,L=x.ERR_STREAM_WRITE_AFTER_END,M=x.ERR_UNKNOWN_ENCODING,O=m.errorOrDestroy;Ze()(z,w);function v(){}function G(T,S,$){s=s||st(),T=T||{},typeof $!="boolean"&&($=S instanceof s),this.objectMode=!!T.objectMode,$&&(this.objectMode=this.objectMode||!!T.writableObjectMode),this.highWaterMark=h(this,T,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var D=T.decodeStrings===!1;this.decodeStrings=!D,this.defaultEncoding=T.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){oe(S,W)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var S=this.bufferedRequest,$=[];S;)$.push(S),S=S.next;return $},(function(){try{Object.defineProperty(G.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(S){return F.call(this,S)?!0:this!==z?!1:S&&S._writableState instanceof G}})):F=function(S){return S instanceof this};function z(T){s=s||st();var S=this instanceof s;if(!S&&!F.call(z,this))return new z(T);this._writableState=new G(T,this,S),this.writable=!0,T&&(typeof T.write=="function"&&(this._write=T.write),typeof T.writev=="function"&&(this._writev=T.writev),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.final=="function"&&(this._final=T.final)),w.call(this)}z.prototype.pipe=function(){O(this,new k)};function K(T,S){var $=new L;O(T,$),me.nextTick(S,$)}function ee(T,S,$,D){var W;return $===null?W=new R:typeof $!="string"&&!S.objectMode&&(W=new N("chunk",["string","Buffer"],$)),W?(O(T,W),me.nextTick(D,W),!1):!0}z.prototype.write=function(T,S,$){var D=this._writableState,W=!1,u=!D.objectMode&&p(T);return u&&!g.isBuffer(T)&&(T=a(T)),typeof S=="function"&&($=S,S=null),u?S="buffer":S||(S=D.defaultEncoding),typeof $!="function"&&($=v),D.ending?K(this,$):(u||ee(this,D,T,$))&&(D.pendingcb++,W=C(this,D,u,T,S,$)),W},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var T=this._writableState;T.corked&&(T.corked--,!T.writing&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&ce(this,T))},z.prototype.setDefaultEncoding=function(S){if(typeof S=="string"&&(S=S.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((S+"").toLowerCase())>-1))throw new M(S);return this._writableState.defaultEncoding=S,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(T,S,$){return!T.objectMode&&T.decodeStrings!==!1&&typeof S=="string"&&(S=g.from(S,$)),S}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(T,S,$,D,W,u){if(!$){var f=Q(S,D,W);D!==f&&($=!0,W="buffer",D=f)}var q=S.objectMode?1:D.length;S.length+=q;var ie=S.length<S.highWaterMark;if(ie||(S.needDrain=!0),S.writing||S.corked){var le=S.lastBufferedRequest;S.lastBufferedRequest={chunk:D,encoding:W,isBuf:$,callback:u,next:null},le?le.next=S.lastBufferedRequest:S.bufferedRequest=S.lastBufferedRequest,S.bufferedRequestCount+=1}else U(T,S,!1,q,D,W,u);return ie}function U(T,S,$,D,W,u,f){S.writelen=D,S.writecb=f,S.writing=!0,S.sync=!0,S.destroyed?S.onwrite(new j("write")):$?T._writev(W,S.onwrite):T._write(W,u,S.onwrite),S.sync=!1}function J(T,S,$,D,W){--S.pendingcb,$?(me.nextTick(W,D),me.nextTick(A,T,S),T._writableState.errorEmitted=!0,O(T,D)):(W(D),T._writableState.errorEmitted=!0,O(T,D),A(T,S))}function se(T){T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0}function oe(T,S){var $=T._writableState,D=$.sync,W=$.writecb;if(typeof W!="function")throw new E;if(se($),S)J(T,$,D,S,W);else{var u=de($)||T.destroyed;!u&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&ce(T,$),D?me.nextTick(ae,T,$,u,W):ae(T,$,u,W)}}function ae(T,S,$,D){$||fe(T,S),S.pendingcb--,D(),A(T,S)}function fe(T,S){S.length===0&&S.needDrain&&(S.needDrain=!1,T.emit("drain"))}function ce(T,S){S.bufferProcessing=!0;var $=S.bufferedRequest;if(T._writev&&$&&$.next){var D=S.bufferedRequestCount,W=new Array(D),u=S.corkedRequestsFree;u.entry=$;for(var f=0,q=!0;$;)W[f]=$,$.isBuf||(q=!1),$=$.next,f+=1;W.allBuffers=q,U(T,S,!0,S.length,W,"",u.finish),S.pendingcb++,S.lastBufferedRequest=null,u.next?(S.corkedRequestsFree=u.next,u.next=null):S.corkedRequestsFree=new r(S),S.bufferedRequestCount=0}else{for(;$;){var ie=$.chunk,le=$.encoding,ue=$.callback,he=S.objectMode?1:ie.length;if(U(T,S,!1,he,ie,le,ue),$=$.next,S.bufferedRequestCount--,S.writing)break}$===null&&(S.lastBufferedRequest=null)}S.bufferedRequest=$,S.bufferProcessing=!1}z.prototype._write=function(T,S,$){$(new P("_write()"))},z.prototype._writev=null,z.prototype.end=function(T,S,$){var D=this._writableState;return typeof T=="function"?($=T,T=null,S=null):typeof S=="function"&&($=S,S=null),T!=null&&this.write(T,S),D.corked&&(D.corked=1,this.uncork()),D.ending||_(this,D,$),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(T){return T.ending&&T.length===0&&T.bufferedRequest===null&&!T.finished&&!T.writing}function pe(T,S){T._final(function($){S.pendingcb--,$&&O(T,$),S.prefinished=!0,T.emit("prefinish"),A(T,S)})}function c(T,S){!S.prefinished&&!S.finalCalled&&(typeof T._final=="function"&&!S.destroyed?(S.pendingcb++,S.finalCalled=!0,me.nextTick(pe,T,S)):(S.prefinished=!0,T.emit("prefinish")))}function A(T,S){var $=de(S);if($&&(c(T,S),S.pendingcb===0&&(S.finished=!0,T.emit("finish"),S.autoDestroy))){var D=T._readableState;(!D||D.autoDestroy&&D.endEmitted)&&T.destroy()}return $}function _(T,S,$){S.ending=!0,A(T,S),$&&(S.finished?me.nextTick($):T.once("finish",$)),S.ended=!0,T.writable=!1}function H(T,S,$){var D=T.entry;for(T.entry=null;D;){var W=D.callback;S.pendingcb--,W($),D=D.next}S.corkedRequestsFree.next=T}return Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(S){this._writableState&&(this._writableState.destroyed=S)}}),z.prototype.destroy=m.destroy,z.prototype._undestroy=m.undestroy,z.prototype._destroy=function(T,S){S(T)},Jr}var zr,oo;function st(){if(oo)return zr;oo=1;var r=Object.keys||function(b){var h=[];for(var x in b)h.push(x);return h};zr=a;var s=po(),l=io();Ze()(a,s);for(var w=r(l.prototype),g=0;g<w.length;g++){var o=w[g];a.prototype[o]||(a.prototype[o]=l.prototype[o])}function a(b){if(!(this instanceof a))return new a(b);s.call(this,b),l.call(this,b),this.allowHalfOpen=!0,b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p(){this._writableState.ended||me.nextTick(m,this)}function m(b){b.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=h,this._writableState.destroyed=h)}}),zr}var Kr={},At={exports:{}};var so;function ks(){return so||(so=1,(function(r,s){var l=De(),w=l.Buffer;function g(a,p){for(var m in a)p[m]=a[m]}w.from&&w.alloc&&w.allocUnsafe&&w.allocUnsafeSlow?r.exports=l:(g(l,s),s.Buffer=o);function o(a,p,m){return w(a,p,m)}o.prototype=Object.create(w.prototype),g(w,o),o.from=function(a,p,m){if(typeof a=="number")throw new TypeError("Argument must not be a number");return w(a,p,m)},o.alloc=function(a,p,m){if(typeof a!="number")throw new TypeError("Argument must be a number");var b=w(a);return p!==void 0?typeof m=="string"?b.fill(p,m):b.fill(p):b.fill(0),b},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return w(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(a)}})(At,At.exports)),At.exports}var ao;function uo(){if(ao)return Kr;ao=1;var r=ks().Buffer,s=r.isEncoding||function(R){switch(R=""+R,R&&R.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 l(R){if(!R)return"utf8";for(var L;;)switch(R){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 R;default:if(L)return;R=(""+R).toLowerCase(),L=!0}}function w(R){var L=l(R);if(typeof L!="string"&&(r.isEncoding===s||!s(R)))throw new Error("Unknown encoding: "+R);return L||R}Kr.StringDecoder=g;function g(R){this.encoding=w(R);var L;switch(this.encoding){case"utf16le":this.text=x,this.end=N,L=4;break;case"utf8":this.fillLast=m,L=4;break;case"base64":this.text=P,this.end=E,L=3;break;default:this.write=k,this.end=j;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(L)}g.prototype.write=function(R){if(R.length===0)return"";var L,M;if(this.lastNeed){if(L=this.fillLast(R),L===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<R.length?L?L+this.text(R,M):this.text(R,M):L||""},g.prototype.end=h,g.prototype.text=b,g.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length};function o(R){return R<=127?0:R>>5===6?2:R>>4===14?3:R>>3===30?4:R>>6===2?-1:-2}function a(R,L,M){var O=L.length-1;if(O<M)return 0;var v=o(L[O]);return v>=0?(v>0&&(R.lastNeed=v-1),v):--O<M||v===-2?0:(v=o(L[O]),v>=0?(v>0&&(R.lastNeed=v-2),v):--O<M||v===-2?0:(v=o(L[O]),v>=0?(v>0&&(v===2?v=0:R.lastNeed=v-3),v):0))}function p(R,L,M){if((L[0]&192)!==128)return R.lastNeed=0,"�";if(R.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return R.lastNeed=1,"�";if(R.lastNeed>2&&L.length>2&&(L[2]&192)!==128)return R.lastNeed=2,"�"}}function m(R){var L=this.lastTotal-this.lastNeed,M=p(this,R);if(M!==void 0)return M;if(this.lastNeed<=R.length)return R.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,L,0,R.length),this.lastNeed-=R.length}function b(R,L){var M=a(this,R,L);if(!this.lastNeed)return R.toString("utf8",L);this.lastTotal=M;var O=R.length-(M-this.lastNeed);return R.copy(this.lastChar,0,O),R.toString("utf8",L,O)}function h(R){var L=R&&R.length?this.write(R):"";return this.lastNeed?L+"�":L}function x(R,L){if((R.length-L)%2===0){var M=R.toString("utf16le",L);if(M){var O=M.charCodeAt(M.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",L,R.length-1)}function N(R){var L=R&&R.length?this.write(R):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,M)}return L}function P(R,L){var M=(R.length-L)%3;return M===0?R.toString("base64",L):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",L,R.length-M))}function E(R){var L=R&&R.length?this.write(R):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function k(R){return R.toString(this.encoding)}function j(R){return R&&R.length?this.write(R):""}return Kr}var Xr,fo;function Zr(){if(fo)return Xr;fo=1;var r=ot().codes.ERR_STREAM_PREMATURE_CLOSE;function s(o){var a=!1;return function(){if(!a){a=!0;for(var p=arguments.length,m=new Array(p),b=0;b<p;b++)m[b]=arguments[b];o.apply(this,m)}}}function l(){}function w(o){return o.setHeader&&typeof o.abort=="function"}function g(o,a,p){if(typeof a=="function")return g(o,null,a);a||(a={}),p=s(p||l);var m=a.readable||a.readable!==!1&&o.readable,b=a.writable||a.writable!==!1&&o.writable,h=function(){o.writable||N()},x=o._writableState&&o._writableState.finished,N=function(){b=!1,x=!0,m||p.call(o)},P=o._readableState&&o._readableState.endEmitted,E=function(){m=!1,P=!0,b||p.call(o)},k=function(M){p.call(o,M)},j=function(){var M;if(m&&!P)return(!o._readableState||!o._readableState.ended)&&(M=new r),p.call(o,M);if(b&&!x)return(!o._writableState||!o._writableState.ended)&&(M=new r),p.call(o,M)},R=function(){o.req.on("finish",N)};return w(o)?(o.on("complete",N),o.on("abort",j),o.req?R():o.on("request",R)):b&&!o._writableState&&(o.on("end",h),o.on("close",h)),o.on("end",E),o.on("finish",N),a.error!==!1&&o.on("error",k),o.on("close",j),function(){o.removeListener("complete",N),o.removeListener("abort",j),o.removeListener("request",R),o.req&&o.req.removeListener("finish",N),o.removeListener("end",h),o.removeListener("close",h),o.removeListener("finish",N),o.removeListener("end",E),o.removeListener("error",k),o.removeListener("close",j)}}return Xr=g,Xr}var Qr,lo;function qs(){if(lo)return Qr;lo=1;var r;function s(M,O,v){return O=l(O),O in M?Object.defineProperty(M,O,{value:v,enumerable:!0,configurable:!0,writable:!0}):M[O]=v,M}function l(M){var O=w(M,"string");return typeof O=="symbol"?O:String(O)}function w(M,O){if(typeof M!="object"||M===null)return M;var v=M[Symbol.toPrimitive];if(v!==void 0){var G=v.call(M,O);if(typeof G!="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(M)}var g=Zr(),o=Symbol("lastResolve"),a=Symbol("lastReject"),p=Symbol("error"),m=Symbol("ended"),b=Symbol("lastPromise"),h=Symbol("handlePromise"),x=Symbol("stream");function N(M,O){return{value:M,done:O}}function P(M){var O=M[o];if(O!==null){var v=M[x].read();v!==null&&(M[b]=null,M[o]=null,M[a]=null,O(N(v,!1)))}}function E(M){me.nextTick(P,M)}function k(M,O){return function(v,G){M.then(function(){if(O[m]){v(N(void 0,!0));return}O[h](v,G)},G)}}var j=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((r={get stream(){return this[x]},next:function(){var O=this,v=this[p];if(v!==null)return Promise.reject(v);if(this[m])return Promise.resolve(N(void 0,!0));if(this[x].destroyed)return new Promise(function(K,ee){me.nextTick(function(){O[p]?ee(O[p]):K(N(void 0,!0))})});var G=this[b],F;if(G)F=new Promise(k(G,this));else{var z=this[x].read();if(z!==null)return Promise.resolve(N(z,!1));F=new Promise(this[h])}return this[b]=F,F}},s(r,Symbol.asyncIterator,function(){return this}),s(r,"return",function(){var O=this;return new Promise(function(v,G){O[x].destroy(null,function(F){if(F){G(F);return}v(N(void 0,!0))})})}),r),j),L=function(O){var v,G=Object.create(R,(v={},s(v,x,{value:O,writable:!0}),s(v,o,{value:null,writable:!0}),s(v,a,{value:null,writable:!0}),s(v,p,{value:null,writable:!0}),s(v,m,{value:O._readableState.endEmitted,writable:!0}),s(v,h,{value:function(z,K){var ee=G[x].read();ee?(G[b]=null,G[o]=null,G[a]=null,z(N(ee,!1))):(G[o]=z,G[a]=K)},writable:!0}),v));return G[b]=null,g(O,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=G[a];z!==null&&(G[b]=null,G[o]=null,G[a]=null,z(F)),G[p]=F;return}var K=G[o];K!==null&&(G[b]=null,G[o]=null,G[a]=null,K(N(void 0,!0))),G[m]=!0}),O.on("readable",E.bind(null,G)),G};return Qr=L,Qr}var en,co;function js(){return co||(co=1,en=function(){throw new Error("Readable.from is not available in the browser")}),en}var tn,ho;function po(){if(ho)return tn;ho=1,tn=K;var r;K.ReadableState=z,Nt().EventEmitter;var s=function(f,q){return f.listeners(q).length},l=Cn(),w=De().Buffer,g=(typeof Ve<"u"?Ve:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(u){return w.from(u)}function a(u){return w.isBuffer(u)||u instanceof g}var p=zi(),m;p&&p.debuglog?m=p.debuglog("stream"):m=function(){};var b=Cs(),h=Zi(),x=to(),N=x.getHighWaterMark,P=ot().codes,E=P.ERR_INVALID_ARG_TYPE,k=P.ERR_STREAM_PUSH_AFTER_EOF,j=P.ERR_METHOD_NOT_IMPLEMENTED,R=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,L,M,O;Ze()(K,l);var v=h.errorOrDestroy,G=["error","close","destroy","pause","resume"];function F(u,f,q){if(typeof u.prependListener=="function")return u.prependListener(f,q);!u._events||!u._events[f]?u.on(f,q):Array.isArray(u._events[f])?u._events[f].unshift(q):u._events[f]=[q,u._events[f]]}function z(u,f,q){r=r||st(),u=u||{},typeof q!="boolean"&&(q=f instanceof r),this.objectMode=!!u.objectMode,q&&(this.objectMode=this.objectMode||!!u.readableObjectMode),this.highWaterMark=N(this,u,"readableHighWaterMark",q),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=u.emitClose!==!1,this.autoDestroy=!!u.autoDestroy,this.destroyed=!1,this.defaultEncoding=u.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,u.encoding&&(L||(L=uo().StringDecoder),this.decoder=new L(u.encoding),this.encoding=u.encoding)}function K(u){if(r=r||st(),!(this instanceof K))return new K(u);var f=this instanceof r;this._readableState=new z(u,this,f),this.readable=!0,u&&(typeof u.read=="function"&&(this._read=u.read),typeof u.destroy=="function"&&(this._destroy=u.destroy)),l.call(this)}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(f){this._readableState&&(this._readableState.destroyed=f)}}),K.prototype.destroy=h.destroy,K.prototype._undestroy=h.undestroy,K.prototype._destroy=function(u,f){f(u)},K.prototype.push=function(u,f){var q=this._readableState,ie;return q.objectMode?ie=!0:typeof u=="string"&&(f=f||q.defaultEncoding,f!==q.encoding&&(u=w.from(u,f),f=""),ie=!0),ee(this,u,f,!1,ie)},K.prototype.unshift=function(u){return ee(this,u,null,!0,!1)};function ee(u,f,q,ie,le){m("readableAddChunk",f);var ue=u._readableState;if(f===null)ue.reading=!1,oe(u,ue);else{var he;if(le||(he=C(ue,f)),he)v(u,he);else if(ue.objectMode||f&&f.length>0)if(typeof f!="string"&&!ue.objectMode&&Object.getPrototypeOf(f)!==w.prototype&&(f=o(f)),ie)ue.endEmitted?v(u,new R):Q(u,ue,f,!0);else if(ue.ended)v(u,new k);else{if(ue.destroyed)return!1;ue.reading=!1,ue.decoder&&!q?(f=ue.decoder.write(f),ue.objectMode||f.length!==0?Q(u,ue,f,!1):ce(u,ue)):Q(u,ue,f,!1)}else ie||(ue.reading=!1,ce(u,ue))}return!ue.ended&&(ue.length<ue.highWaterMark||ue.length===0)}function Q(u,f,q,ie){f.flowing&&f.length===0&&!f.sync?(f.awaitDrain=0,u.emit("data",q)):(f.length+=f.objectMode?1:q.length,ie?f.buffer.unshift(q):f.buffer.push(q),f.needReadable&&ae(u)),ce(u,f)}function C(u,f){var q;return!a(f)&&typeof f!="string"&&f!==void 0&&!u.objectMode&&(q=new E("chunk",["string","Buffer","Uint8Array"],f)),q}K.prototype.isPaused=function(){return this._readableState.flowing===!1},K.prototype.setEncoding=function(u){L||(L=uo().StringDecoder);var f=new L(u);this._readableState.decoder=f,this._readableState.encoding=this._readableState.decoder.encoding;for(var q=this._readableState.buffer.head,ie="";q!==null;)ie+=f.write(q.data),q=q.next;return this._readableState.buffer.clear(),ie!==""&&this._readableState.buffer.push(ie),this._readableState.length=ie.length,this};var U=1073741824;function J(u){return u>=U?u=U:(u--,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u++),u}function se(u,f){return u<=0||f.length===0&&f.ended?0:f.objectMode?1:u!==u?f.flowing&&f.length?f.buffer.head.data.length:f.length:(u>f.highWaterMark&&(f.highWaterMark=J(u)),u<=f.length?u:f.ended?f.length:(f.needReadable=!0,0))}K.prototype.read=function(u){m("read",u),u=parseInt(u,10);var f=this._readableState,q=u;if(u!==0&&(f.emittedReadable=!1),u===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return m("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?$(this):ae(this),null;if(u=se(u,f),u===0&&f.ended)return f.length===0&&$(this),null;var ie=f.needReadable;m("need readable",ie),(f.length===0||f.length-u<f.highWaterMark)&&(ie=!0,m("length less than watermark",ie)),f.ended||f.reading?(ie=!1,m("reading or ended",ie)):ie&&(m("do read"),f.reading=!0,f.sync=!0,f.length===0&&(f.needReadable=!0),this._read(f.highWaterMark),f.sync=!1,f.reading||(u=se(q,f)));var le;return u>0?le=S(u,f):le=null,le===null?(f.needReadable=f.length<=f.highWaterMark,u=0):(f.length-=u,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),q!==u&&f.ended&&$(this)),le!==null&&this.emit("data",le),le};function oe(u,f){if(m("onEofChunk"),!f.ended){if(f.decoder){var q=f.decoder.end();q&&q.length&&(f.buffer.push(q),f.length+=f.objectMode?1:q.length)}f.ended=!0,f.sync?ae(u):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,fe(u)))}}function ae(u){var f=u._readableState;m("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(m("emitReadable",f.flowing),f.emittedReadable=!0,me.nextTick(fe,u))}function fe(u){var f=u._readableState;m("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(u.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,T(u)}function ce(u,f){f.readingMore||(f.readingMore=!0,me.nextTick(de,u,f))}function de(u,f){for(;!f.reading&&!f.ended&&(f.length<f.highWaterMark||f.flowing&&f.length===0);){var q=f.length;if(m("maybeReadMore read 0"),u.read(0),q===f.length)break}f.readingMore=!1}K.prototype._read=function(u){v(this,new j("_read()"))},K.prototype.pipe=function(u,f){var q=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=u;break;case 1:ie.pipes=[ie.pipes,u];break;default:ie.pipes.push(u);break}ie.pipesCount+=1,m("pipe count=%d opts=%j",ie.pipesCount,f);var le=(!f||f.end!==!1)&&u!==me.stdout&&u!==me.stderr,ue=le?ye:Ce;ie.endEmitted?me.nextTick(ue):q.once("end",ue),u.on("unpipe",he);function he(ke,Ue){m("onunpipe"),ke===q&&Ue&&Ue.hasUnpiped===!1&&(Ue.hasUnpiped=!0,Me())}function ye(){m("onend"),u.end()}var te=pe(q);u.on("drain",te);var Ne=!1;function Me(){m("cleanup"),u.removeListener("close",Pe),u.removeListener("finish",Oe),u.removeListener("drain",te),u.removeListener("error",Ae),u.removeListener("unpipe",he),q.removeListener("end",ye),q.removeListener("end",Ce),q.removeListener("data",_e),Ne=!0,ie.awaitDrain&&(!u._writableState||u._writableState.needDrain)&&te()}q.on("data",_e);function _e(ke){m("ondata");var Ue=u.write(ke);m("dest.write",Ue),Ue===!1&&((ie.pipesCount===1&&ie.pipes===u||ie.pipesCount>1&&W(ie.pipes,u)!==-1)&&!Ne&&(m("false write response, pause",ie.awaitDrain),ie.awaitDrain++),q.pause())}function Ae(ke){m("onerror",ke),Ce(),u.removeListener("error",Ae),s(u,"error")===0&&v(u,ke)}F(u,"error",Ae);function Pe(){u.removeListener("finish",Oe),Ce()}u.once("close",Pe);function Oe(){m("onfinish"),u.removeListener("close",Pe),Ce()}u.once("finish",Oe);function Ce(){m("unpipe"),q.unpipe(u)}return u.emit("pipe",q),ie.flowing||(m("pipe resume"),q.resume()),u};function pe(u){return function(){var q=u._readableState;m("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&s(u,"data")&&(q.flowing=!0,T(u))}}K.prototype.unpipe=function(u){var f=this._readableState,q={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return u&&u!==f.pipes?this:(u||(u=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,u&&u.emit("unpipe",this,q),this);if(!u){var ie=f.pipes,le=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var ue=0;ue<le;ue++)ie[ue].emit("unpipe",this,{hasUnpiped:!1});return this}var he=W(f.pipes,u);return he===-1?this:(f.pipes.splice(he,1),f.pipesCount-=1,f.pipesCount===1&&(f.pipes=f.pipes[0]),u.emit("unpipe",this,q),this)},K.prototype.on=function(u,f){var q=l.prototype.on.call(this,u,f),ie=this._readableState;return u==="data"?(ie.readableListening=this.listenerCount("readable")>0,ie.flowing!==!1&&this.resume()):u==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,m("on readable",ie.length,ie.reading),ie.length?ae(this):ie.reading||me.nextTick(A,this)),q},K.prototype.addListener=K.prototype.on,K.prototype.removeListener=function(u,f){var q=l.prototype.removeListener.call(this,u,f);return u==="readable"&&me.nextTick(c,this),q},K.prototype.removeAllListeners=function(u){var f=l.prototype.removeAllListeners.apply(this,arguments);return(u==="readable"||u===void 0)&&me.nextTick(c,this),f};function c(u){var f=u._readableState;f.readableListening=u.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:u.listenerCount("data")>0&&u.resume()}function A(u){m("readable nexttick read 0"),u.read(0)}K.prototype.resume=function(){var u=this._readableState;return u.flowing||(m("resume"),u.flowing=!u.readableListening,_(this,u)),u.paused=!1,this};function _(u,f){f.resumeScheduled||(f.resumeScheduled=!0,me.nextTick(H,u,f))}function H(u,f){m("resume",f.reading),f.reading||u.read(0),f.resumeScheduled=!1,u.emit("resume"),T(u),f.flowing&&!f.reading&&u.read(0)}K.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function T(u){var f=u._readableState;for(m("flow",f.flowing);f.flowing&&u.read()!==null;);}K.prototype.wrap=function(u){var f=this,q=this._readableState,ie=!1;u.on("end",function(){if(m("wrapped end"),q.decoder&&!q.ended){var he=q.decoder.end();he&&he.length&&f.push(he)}f.push(null)}),u.on("data",function(he){if(m("wrapped data"),q.decoder&&(he=q.decoder.write(he)),!(q.objectMode&&he==null)&&!(!q.objectMode&&(!he||!he.length))){var ye=f.push(he);ye||(ie=!0,u.pause())}});for(var le in u)this[le]===void 0&&typeof u[le]=="function"&&(this[le]=(function(ye){return function(){return u[ye].apply(u,arguments)}})(le));for(var ue=0;ue<G.length;ue++)u.on(G[ue],this.emit.bind(this,G[ue]));return this._read=function(he){m("wrapped _read",he),ie&&(ie=!1,u.resume())},this},typeof Symbol=="function"&&(K.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=qs()),M(this)}),Object.defineProperty(K.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(K.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(K.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){this._readableState&&(this._readableState.flowing=f)}}),K._fromList=S,Object.defineProperty(K.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function S(u,f){if(f.length===0)return null;var q;return f.objectMode?q=f.buffer.shift():!u||u>=f.length?(f.decoder?q=f.buffer.join(""):f.buffer.length===1?q=f.buffer.first():q=f.buffer.concat(f.length),f.buffer.clear()):q=f.buffer.consume(u,f.decoder),q}function $(u){var f=u._readableState;m("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,me.nextTick(D,f,u))}function D(u,f){if(m("endReadableNT",u.endEmitted,u.length),!u.endEmitted&&u.length===0&&(u.endEmitted=!0,f.readable=!1,f.emit("end"),u.autoDestroy)){var q=f._writableState;(!q||q.autoDestroy&&q.finished)&&f.destroy()}}typeof Symbol=="function"&&(K.from=function(u,f){return O===void 0&&(O=js()),O(K,u,f)});function W(u,f){for(var q=0,ie=u.length;q<ie;q++)if(u[q]===f)return q;return-1}return tn}var rn,yo;function go(){if(yo)return rn;yo=1,rn=p;var r=ot().codes,s=r.ERR_METHOD_NOT_IMPLEMENTED,l=r.ERR_MULTIPLE_CALLBACK,w=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=r.ERR_TRANSFORM_WITH_LENGTH_0,o=st();Ze()(p,o);function a(h,x){var N=this._transformState;N.transforming=!1;var P=N.writecb;if(P===null)return this.emit("error",new l);N.writechunk=null,N.writecb=null,x!=null&&this.push(x),P(h);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}function p(h){if(!(this instanceof p))return new p(h);o.call(this,h),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",m)}function m(){var h=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(x,N){b(h,x,N)}):b(this,null,null)}p.prototype.push=function(h,x){return this._transformState.needTransform=!1,o.prototype.push.call(this,h,x)},p.prototype._transform=function(h,x,N){N(new s("_transform()"))},p.prototype._write=function(h,x,N){var P=this._transformState;if(P.writecb=N,P.writechunk=h,P.writeencoding=x,!P.transforming){var E=this._readableState;(P.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},p.prototype._read=function(h){var x=this._transformState;x.writechunk!==null&&!x.transforming?(x.transforming=!0,this._transform(x.writechunk,x.writeencoding,x.afterTransform)):x.needTransform=!0},p.prototype._destroy=function(h,x){o.prototype._destroy.call(this,h,function(N){x(N)})};function b(h,x,N){if(x)return h.emit("error",x);if(N!=null&&h.push(N),h._writableState.length)throw new g;if(h._transformState.transforming)throw new w;return h.push(null)}return rn}var nn,wo;function Gs(){if(wo)return nn;wo=1,nn=s;var r=go();Ze()(s,r);function s(l){if(!(this instanceof s))return new s(l);r.call(this,l)}return s.prototype._transform=function(l,w,g){g(null,l)},nn}var on,mo;function Ws(){if(mo)return on;mo=1;var r;function s(N){var P=!1;return function(){P||(P=!0,N.apply(void 0,arguments))}}var l=ot().codes,w=l.ERR_MISSING_ARGS,g=l.ERR_STREAM_DESTROYED;function o(N){if(N)throw N}function a(N){return N.setHeader&&typeof N.abort=="function"}function p(N,P,E,k){k=s(k);var j=!1;N.on("close",function(){j=!0}),r===void 0&&(r=Zr()),r(N,{readable:P,writable:E},function(L){if(L)return k(L);j=!0,k()});var R=!1;return function(L){if(!j&&!R){if(R=!0,a(N))return N.abort();if(typeof N.destroy=="function")return N.destroy();k(L||new g("pipe"))}}}function m(N){N()}function b(N,P){return N.pipe(P)}function h(N){return!N.length||typeof N[N.length-1]!="function"?o:N.pop()}function x(){for(var N=arguments.length,P=new Array(N),E=0;E<N;E++)P[E]=arguments[E];var k=h(P);if(Array.isArray(P[0])&&(P=P[0]),P.length<2)throw new w("streams");var j,R=P.map(function(L,M){var O=M<P.length-1,v=M>0;return p(L,O,v,function(G){j||(j=G),G&&R.forEach(m),!O&&(R.forEach(m),k(j))})});return P.reduce(b)}return on=x,on}var sn,bo;function at(){if(bo)return sn;bo=1,sn=l;var r=Nt().EventEmitter,s=Ze();s(l,r),l.Readable=po(),l.Writable=io(),l.Duplex=st(),l.Transform=go(),l.PassThrough=Gs(),l.finished=Zr(),l.pipeline=Ws(),l.Stream=l;function l(){r.call(this)}return l.prototype.pipe=function(w,g){var o=this;function a(P){w.writable&&w.write(P)===!1&&o.pause&&o.pause()}o.on("data",a);function p(){o.readable&&o.resume&&o.resume()}w.on("drain",p),!w._isStdio&&(!g||g.end!==!1)&&(o.on("end",b),o.on("close",h));var m=!1;function b(){m||(m=!0,w.end())}function h(){m||(m=!0,typeof w.destroy=="function"&&w.destroy())}function x(P){if(N(),r.listenerCount(this,"error")===0)throw P}o.on("error",x),w.on("error",x);function N(){o.removeListener("data",a),w.removeListener("drain",p),o.removeListener("end",b),o.removeListener("close",h),o.removeListener("error",x),w.removeListener("error",x),o.removeListener("end",N),o.removeListener("close",N),w.removeListener("close",N)}return o.on("end",N),o.on("close",N),w.on("close",N),w.emit("pipe",o),w},sn}var an={},un,Eo;function ut(){if(Eo)return un;Eo=1;const r=at(),{Buffer:s}=De(),l=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class w extends r.Transform{constructor(o,a,p={}){let m=null,b=null;switch(typeof o){case"object":s.isBuffer(o)?m=o:o&&(p=o);break;case"string":m=o;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof a){case"object":a&&(p=a);break;case"string":b=a;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!p||typeof p!="object")throw new TypeError("Invalid options");m==null&&(m=p.input),b==null&&(b=p.inputEncoding),delete p.input,delete p.inputEncoding;const h=p.watchPipe==null?!0:p.watchPipe;delete p.watchPipe;const x=!!p.readError;delete p.readError,super(p),this.readError=x,h&&this.on("pipe",N=>{const P=N._readableState.objectMode;if(this.length>0&&P!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=P,this._writableState.objectMode=P}),m!=null&&this.end(m,b)}static isNoFilter(o){return o instanceof this}static compare(o,a){if(!(o instanceof this))throw new TypeError("Arguments must be NoFilters");return o===a?0:o.compare(a)}static concat(o,a){if(!Array.isArray(o))throw new TypeError("list argument must be an Array of NoFilters");if(o.length===0||a===0)return s.alloc(0);a==null&&(a=o.reduce((h,x)=>{if(!(x instanceof w))throw new TypeError("list argument must be an Array of NoFilters");return h+x.length},0));let p=!0,m=!0;const b=o.map(h=>{if(!(h instanceof w))throw new TypeError("list argument must be an Array of NoFilters");const x=h.slice();return s.isBuffer(x)?m=!1:p=!1,x});if(p)return s.concat(b,a);if(m)return[].concat(...b).slice(0,a);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(o,a,p){!this._readableState.objectMode&&!s.isBuffer(o)&&(o=s.from(o,a)),this.push(o),p()}_bufArray(){let o=this._readableState.buffer;if(!Array.isArray(o)){let a=o.head;for(o=[];a!=null;)o.push(a.data),a=a.next}return o}read(o){const a=super.read(o);if(a!=null){if(this.emit("read",a),this.readError&&a.length<o)throw new Error(`Read ${a.length}, wanted ${o}`)}else if(this.readError)throw new Error(`No data available, wanted ${o}`);return a}readFull(o){let a=null,p=null,m=null;return new Promise((b,h)=>{if(this.length>=o){b(this.read(o));return}if(this.writableFinished){h(new Error(`Stream finished before ${o} bytes were available`));return}a=x=>{this.length>=o&&b(this.read(o))},p=()=>{h(new Error(`Stream finished before ${o} bytes were available`))},m=h,this.on("readable",a),this.on("error",m),this.on("finish",p)}).finally(()=>{a&&(this.removeListener("readable",a),this.removeListener("error",m),this.removeListener("finish",p))})}promise(o){let a=!1;return new Promise((p,m)=>{this.on("finish",()=>{const b=this.read();o!=null&&!a&&(a=!0,o(null,b)),p(b)}),this.on("error",b=>{o!=null&&!a&&(a=!0,o(b)),m(b)})})}compare(o){if(!(o instanceof w))throw new TypeError("Arguments must be NoFilters");if(this===o)return 0;const a=this.slice(),p=o.slice();if(s.isBuffer(a)&&s.isBuffer(p))return a.compare(p);throw new Error("Cannot compare streams in object mode")}equals(o){return this.compare(o)===0}slice(o,a){if(this._readableState.objectMode)return this._bufArray().slice(o,a);const p=this._bufArray();switch(p.length){case 0:return s.alloc(0);case 1:return p[0].slice(o,a);default:return s.concat(p).slice(o,a)}}get(o){return this.slice()[o]}toJSON(){const o=this.slice();return s.isBuffer(o)?o.toJSON():o}toString(o,a,p){const m=this.slice(a,p);return s.isBuffer(m)?!o||o==="utf8"?l.decode(m):m.toString(o):JSON.stringify(m)}[Symbol.for("nodejs.util.inspect.custom")](o,a){const m=this._bufArray().map(b=>s.isBuffer(b)?a.stylize(b.toString("hex"),"string"):JSON.stringify(b)).join(", ");return`${this.constructor.name} [${m}]`}get length(){return this._readableState.length}writeBigInt(o){let a=o.toString(16);if(o<0){const p=BigInt(Math.floor(a.length/2));o=(BigInt(1)<<p*BigInt(8))+o,a=o.toString(16)}return a.length%2&&(a=`0${a}`),this.push(s.from(a,"hex"))}readUBigInt(o){const a=this.read(o);return s.isBuffer(a)?BigInt(`0x${a.toString("hex")}`):null}readBigInt(o){const a=this.read(o);if(!s.isBuffer(a))return null;let p=BigInt(`0x${a.toString("hex")}`);if(a[0]&128){const m=BigInt(1)<<BigInt(a.length)*BigInt(8);p-=m}return p}writeUInt8(o){const a=s.from([o]);return this.push(a)}writeUInt16LE(o){const a=s.alloc(2);return a.writeUInt16LE(o),this.push(a)}writeUInt16BE(o){const a=s.alloc(2);return a.writeUInt16BE(o),this.push(a)}writeUInt32LE(o){const a=s.alloc(4);return a.writeUInt32LE(o),this.push(a)}writeUInt32BE(o){const a=s.alloc(4);return a.writeUInt32BE(o),this.push(a)}writeInt8(o){const a=s.from([o]);return this.push(a)}writeInt16LE(o){const a=s.alloc(2);return a.writeUInt16LE(o),this.push(a)}writeInt16BE(o){const a=s.alloc(2);return a.writeUInt16BE(o),this.push(a)}writeInt32LE(o){const a=s.alloc(4);return a.writeUInt32LE(o),this.push(a)}writeInt32BE(o){const a=s.alloc(4);return a.writeUInt32BE(o),this.push(a)}writeFloatLE(o){const a=s.alloc(4);return a.writeFloatLE(o),this.push(a)}writeFloatBE(o){const a=s.alloc(4);return a.writeFloatBE(o),this.push(a)}writeDoubleLE(o){const a=s.alloc(8);return a.writeDoubleLE(o),this.push(a)}writeDoubleBE(o){const a=s.alloc(8);return a.writeDoubleBE(o),this.push(a)}writeBigInt64LE(o){const a=s.alloc(8);return a.writeBigInt64LE(o),this.push(a)}writeBigInt64BE(o){const a=s.alloc(8);return a.writeBigInt64BE(o),this.push(a)}writeBigUInt64LE(o){const a=s.alloc(8);return a.writeBigUInt64LE(o),this.push(a)}writeBigUInt64BE(o){const a=s.alloc(8);return a.writeBigUInt64BE(o),this.push(a)}readUInt8(){const o=this.read(1);return s.isBuffer(o)?o.readUInt8():null}readUInt16LE(){const o=this.read(2);return s.isBuffer(o)?o.readUInt16LE():null}readUInt16BE(){const o=this.read(2);return s.isBuffer(o)?o.readUInt16BE():null}readUInt32LE(){const o=this.read(4);return s.isBuffer(o)?o.readUInt32LE():null}readUInt32BE(){const o=this.read(4);return s.isBuffer(o)?o.readUInt32BE():null}readInt8(){const o=this.read(1);return s.isBuffer(o)?o.readInt8():null}readInt16LE(){const o=this.read(2);return s.isBuffer(o)?o.readInt16LE():null}readInt16BE(){const o=this.read(2);return s.isBuffer(o)?o.readInt16BE():null}readInt32LE(){const o=this.read(4);return s.isBuffer(o)?o.readInt32LE():null}readInt32BE(){const o=this.read(4);return s.isBuffer(o)?o.readInt32BE():null}readFloatLE(){const o=this.read(4);return s.isBuffer(o)?o.readFloatLE():null}readFloatBE(){const o=this.read(4);return s.isBuffer(o)?o.readFloatBE():null}readDoubleLE(){const o=this.read(8);return s.isBuffer(o)?o.readDoubleLE():null}readDoubleBE(){const o=this.read(8);return s.isBuffer(o)?o.readDoubleBE():null}readBigInt64LE(){const o=this.read(8);return s.isBuffer(o)?o.readBigInt64LE():null}readBigInt64BE(){const o=this.read(8);return s.isBuffer(o)?o.readBigInt64BE():null}readBigUInt64LE(){const o=this.read(8);return s.isBuffer(o)?o.readBigUInt64LE():null}readBigUInt64BE(){const o=this.read(8);return s.isBuffer(o)?o.readBigUInt64BE():null}}return un=w,un}var fn={},_o;function Je(){return _o||(_o=1,(function(r){r.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},r.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},r.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},r.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},r.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},r.SHIFT32=4294967296,r.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(r.SHIFT32)}})(fn)),fn}var vo;function ht(){return vo||(vo=1,(function(r){const{Buffer:s}=De(),l=ut(),w=at(),g=Je(),{NUMBYTES:o,SHIFT32:a,BI:p,SYMS:m}=g,b=2097151,h=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});r.utf8=P=>h.decode(P),r.utf8.checksUTF8=!0;function x(P){return P instanceof w.Readable?!0:["read","on","pipe"].every(E=>typeof P[E]=="function")}r.isBufferish=function(E){return E&&typeof E=="object"&&(s.isBuffer(E)||E instanceof Uint8Array||E instanceof Uint8ClampedArray||E instanceof ArrayBuffer||E instanceof DataView)},r.bufferishToBuffer=function(E){return s.isBuffer(E)?E:ArrayBuffer.isView(E)?s.from(E.buffer,E.byteOffset,E.byteLength):E instanceof ArrayBuffer?s.from(E):null},r.parseCBORint=function(E,k){switch(E){case o.ONE:return k.readUInt8(0);case o.TWO:return k.readUInt16BE(0);case o.FOUR:return k.readUInt32BE(0);case o.EIGHT:{const j=k.readUInt32BE(0),R=k.readUInt32BE(4);return j>b?BigInt(j)*p.SHIFT32+BigInt(R):j*a+R}default:throw new Error(`Invalid additional info for int: ${E}`)}},r.writeHalf=function(E,k){const j=s.allocUnsafe(4);j.writeFloatBE(k,0);const R=j.readUInt32BE(0);if((R&8191)!==0)return!1;let L=R>>16&32768;const M=R>>23&255,O=R&8388607;if(M>=113&&M<=142)L+=(M-112<<10)+(O>>13);else if(M>=103&&M<113){if(O&(1<<126-M)-1)return!1;L+=O+8388608>>126-M}else return!1;return E.writeUInt16BE(L),!0},r.parseHalf=function(E){const k=E[0]&128?-1:1,j=(E[0]&124)>>2,R=(E[0]&3)<<8|E[1];if(j){if(j===31)return k*(R?NaN:1/0)}else return k*5960464477539063e-23*R;return k*2**(j-25)*(1024+R)},r.parseCBORfloat=function(E){switch(E.length){case 2:return r.parseHalf(E);case 4:return E.readFloatBE(0);case 8:return E.readDoubleBE(0);default:throw new Error(`Invalid float size: ${E.length}`)}},r.hex=function(E){return s.from(E.replace(/^0x/,""),"hex")},r.bin=function(E){E=E.replace(/\s/g,"");let k=0,j=E.length%8||8;const R=[];for(;j<=E.length;)R.push(parseInt(E.slice(k,j),2)),k=j,j+=8;return s.from(R)},r.arrayEqual=function(E,k){return E==null&&k==null?!0:E==null||k==null?!1:E.length===k.length&&E.every((j,R)=>j===k[R])},r.bufferToBigInt=function(E){return BigInt(`0x${E.toString("hex")}`)},r.cborValueToString=function(E,k=-1){switch(typeof E){case"symbol":{switch(E){case m.NULL:return"null";case m.UNDEFINED:return"undefined";case m.BREAK:return"BREAK"}if(E.description)return E.description;const R=E.toString().match(/^Symbol\((?<name>.*)\)/);return R&&R.groups.name?R.groups.name:"Symbol"}case"string":return JSON.stringify(E);case"bigint":return E.toString();case"number":{const j=Object.is(E,-0)?"-0":String(E);return k>0?`${j}_${k}`:j}case"object":{if(!E)return"null";const j=r.bufferishToBuffer(E);if(j){const R=j.toString("hex");return k===-1/0?R:`h'${R}'`}return E&&typeof E[Symbol.for("nodejs.util.inspect.custom")]=="function"?E[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(E)?"[]":"{}"}}return String(E)},r.guessEncoding=function(E,k){if(typeof E=="string")return new l(E,k??"hex");const j=r.bufferishToBuffer(E);if(j)return new l(j);if(x(E))return E;throw new Error("Unknown input type")};const N={"=":"","+":"-","/":"_"};r.base64url=function(E){return r.bufferishToBuffer(E).toString("base64").replace(/[=+/]/g,k=>N[k])},r.base64=function(E){return r.bufferishToBuffer(E).toString("base64")},r.isBigEndian=function(){const E=new Uint8Array(4),k=new Uint32Array(E.buffer);return!((k[0]=1)&E[0])}})(an)),an}var ln,Ao;function Hs(){if(Ao)return ln;Ao=1;const r=at(),s=ut();class l extends r.Transform{constructor(g){super(g),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new s,this.__restart()}_transform(g,o,a){for(this.bs.write(g);this.bs.length>=this.__needed;){let p=null;const m=this.__needed===null?void 0:this.bs.read(this.__needed);try{p=this.__parser.next(m)}catch(b){return a(b)}this.__needed&&(this.__fresh=!1),p.done?(this.push(p.value),this.__restart()):this.__needed=p.value||1/0}return a()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(g){g(this.__fresh?null:new Error("unexpected end of input"))}}return ln=l,ln}var cn,So;function Io(){if(So)return cn;So=1;const r=Je(),s=ht(),l=Symbol("INTERNAL_JSON");function w(P,E){if(s.isBufferish(P))P.toJSON=E;else if(Array.isArray(P))for(const k of P)w(k,E);else if(P&&typeof P=="object"&&(!(P instanceof N)||P.tag<21||P.tag>23))for(const k of Object.values(P))w(k,E)}function g(){return s.base64(this)}function o(){return s.base64url(this)}function a(){return this.toString("hex")}function p(P,E,k,j){const R=new DataView(P),[L,M]={2:[R.getUint16,R.setUint16],4:[R.getUint32,R.setUint32],8:[R.getBigUint64,R.setBigUint64]}[E],O=k+j;for(let v=k;v<O;v+=E)M.call(R,v,L.call(R,v,!0))}const m={0:P=>new Date(P),1:P=>new Date(P*1e3),2:P=>s.bufferToBigInt(P),3:P=>r.BI.MINUS_ONE-s.bufferToBigInt(P),21:(P,E)=>(s.isBufferish(P)?E[l]=o:w(P,o),E),22:(P,E)=>(s.isBufferish(P)?E[l]=g:w(P,g),E),23:(P,E)=>(s.isBufferish(P)?E[l]=a:w(P,a),E),32:P=>new URL(P),33:(P,E)=>{if(!P.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const k=P.length%4;if(k===1)throw new Error("Invalid base64url length");if(k===2){if("AQgw".indexOf(P[P.length-1])===-1)throw new Error("Invalid base64 padding")}else if(k===3&&"AEIMQUYcgkosw048".indexOf(P[P.length-1])===-1)throw new Error("Invalid base64 padding");return E},34:(P,E)=>{const k=P.match(/^[a-zA-Z0-9+/]+(?<padding>={0,2})$/);if(!k)throw new Error("Invalid base64 characters");if(P.length%4!==0)throw new Error("Invalid base64 length");if(k.groups.padding==="="){if("AQgw".indexOf(P[P.length-2])===-1)throw new Error("Invalid base64 padding")}else if(k.groups.padding==="=="&&"AEIMQUYcgkosw048".indexOf(P[P.length-3])===-1)throw new Error("Invalid base64 padding");return E},35:P=>new RegExp(P),258:P=>new Set(P)},b={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};typeof BigUint64Array<"u"&&(b[67]=BigUint64Array,b[71]=BigUint64Array),typeof BigInt64Array<"u"&&(b[75]=BigInt64Array,b[79]=BigInt64Array);function h(P,E){if(!s.isBufferish(P))throw new TypeError("val not a buffer");const{tag:k}=E,j=b[k];if(!j)throw new Error(`Invalid typed array tag: ${k}`);const R=k&4,M=2**(((k&16)>>4)+(k&3));!R!==s.isBigEndian()&&M>1&&p(P.buffer,M,P.byteOffset,P.byteLength);const O=P.buffer.slice(P.byteOffset,P.byteOffset+P.byteLength);return new j(O)}for(const P of Object.keys(b))m[P]=h;let x={};class N{constructor(E,k,j){if(this.tag=E,this.value=k,this.err=j,typeof this.tag!="number")throw new Error(`Invalid tag type (${typeof this.tag})`);if(this.tag<0||(this.tag|0)!==this.tag)throw new Error(`Tag must be a positive integer: ${this.tag}`)}toJSON(){if(this[l])return this[l].call(this.value);const E={tag:this.tag,value:this.value};return this.err&&(E.err=this.err),E}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(E){return E._pushTag(this.tag),E.pushAny(this.value)}convert(E){let k=E?.[this.tag];if(k===null)return this;if(typeof k!="function"&&(k=N.TAGS[this.tag],typeof k!="function"))return this;try{return k.call(this,this.value,this)}catch(j){return j&&j.message&&j.message.length>0?this.err=j.message:this.err=j,this}}static get TAGS(){return x}static set TAGS(E){x=E}static reset(){N.TAGS={...m}}}return N.INTERNAL_JSON=l,N.reset(),cn=N,cn}var hn,Bo;function Ro(){if(Bo)return hn;Bo=1;const{MT:r,SIMPLE:s,SYMS:l}=Je();class w{constructor(o){if(typeof o!="number")throw new Error(`Invalid Simple type: ${typeof o}`);if(o<0||o>255||(o|0)!==o)throw new Error(`value must be a small positive integer: ${o}`);this.value=o}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](o,a){return`simple(${this.value})`}encodeCBOR(o){return o._pushInt(this.value,r.SIMPLE_FLOAT)}static isSimple(o){return o instanceof w}static decode(o,a=!0,p=!1){switch(o){case s.FALSE:return!1;case s.TRUE:return!0;case s.NULL:return a?null:l.NULL;case s.UNDEFINED:return a?void 0:l.UNDEFINED;case-1:if(!a||!p)throw new Error("Invalid BREAK");return l.BREAK;default:return new w(o)}}}return hn=w,hn}var pn,To;function St(){if(To)return pn;To=1;const r=Hs(),s=Io(),l=Ro(),w=ht(),g=ut(),o=Je(),{MT:a,NUMBYTES:p,SYMS:m,BI:b}=o,{Buffer:h}=De(),x=Symbol("count"),N=Symbol("major type"),P=Symbol("error"),E=Symbol("not found");function k(O,v,G){const F=[];return F[x]=G,F[m.PARENT]=O,F[N]=v,F}function j(O,v){const G=new g;return G[x]=-1,G[m.PARENT]=O,G[N]=v,G}class R extends Error{constructor(v,G){super(`Unexpected data: 0x${v.toString(16)}`),this.name="UnexpectedDataError",this.byte=v,this.value=G}}function L(O,v){switch(typeof O){case"function":return{options:{},cb:O};case"string":return{options:{encoding:O},cb:v};case"object":return{options:O||{},cb:v};default:throw new TypeError("Unknown option type")}}class M extends r{constructor(v={}){const{tags:G={},max_depth:F=-1,preferMap:z=!1,preferWeb:K=!1,required:ee=!1,encoding:Q="hex",extendedResults:C=!1,preventDuplicateKeys:U=!1,...J}=v;super({defaultEncoding:Q,...J}),this.running=!0,this.max_depth=F,this.tags=G,this.preferMap=z,this.preferWeb=K,this.extendedResults=C,this.required=ee,this.preventDuplicateKeys=U,C&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new g)}static nullcheck(v){switch(v){case m.NULL:return null;case m.UNDEFINED:return;case E:throw new Error("Value not found");default:return v}}static decodeFirstSync(v,G={}){if(v==null)throw new TypeError("input required");({options:G}=L(G));const{encoding:F="hex",...z}=G,K=new M(z),ee=w.guessEncoding(v,F),Q=K._parse();let C=Q.next();for(;!C.done;){const J=ee.read(C.value);if(J==null||J.length!==C.value)throw new Error("Insufficient data");K.extendedResults&&K.valueBytes.write(J),C=Q.next(J)}let U=null;if(K.extendedResults)U=C.value,U.unused=ee.read();else if(U=M.nullcheck(C.value),ee.length>0){const J=ee.read(1);throw ee.unshift(J),new R(J[0],U)}return U}static decodeAllSync(v,G={}){if(v==null)throw new TypeError("input required");({options:G}=L(G));const{encoding:F="hex",...z}=G,K=new M(z),ee=w.guessEncoding(v,F),Q=[];for(;ee.length>0;){const C=K._parse();let U=C.next();for(;!U.done;){const J=ee.read(U.value);if(J==null||J.length!==U.value)throw new Error("Insufficient data");K.extendedResults&&K.valueBytes.write(J),U=C.next(J)}Q.push(M.nullcheck(U.value))}return Q}static decodeFirst(v,G={},F=null){if(v==null)throw new TypeError("input required");({options:G,cb:F}=L(G,F));const{encoding:z="hex",required:K=!1,...ee}=G,Q=new M(ee);let C=E;const U=w.guessEncoding(v,z),J=new Promise((se,oe)=>{Q.on("data",ae=>{C=M.nullcheck(ae),Q.close()}),Q.once("error",ae=>Q.extendedResults&&ae instanceof R?(C.unused=Q.bs.slice(),se(C)):(C!==E&&(ae.value=C),C=P,Q.close(),oe(ae))),Q.once("end",()=>{switch(C){case E:return K?oe(new Error("No CBOR found")):se(C);case P:return;default:return se(C)}})});return typeof F=="function"&&J.then(se=>F(null,se),F),U.pipe(Q),J}static decodeAll(v,G={},F=null){if(v==null)throw new TypeError("input required");({options:G,cb:F}=L(G,F));const{encoding:z="hex",...K}=G,ee=new M(K),Q=[];ee.on("data",U=>Q.push(M.nullcheck(U)));const C=new Promise((U,J)=>{ee.on("error",J),ee.on("end",()=>U(Q))});return typeof F=="function"&&C.then(U=>F(void 0,U),U=>F(U,void 0)),w.guessEncoding(v,z).pipe(ee),C}close(){this.running=!1,this.__fresh=!0}_onRead(v){this.valueBytes.write(v)}*_parse(){let v=null,G=0,F=null;for(;;){if(this.max_depth>=0&&G>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[z]=yield 1;if(!this.running)throw this.bs.unshift(h.from([z])),new R(z);const K=z>>5,ee=z&31,Q=v?.[N],C=v?.length;switch(ee){case p.ONE:this.emit("more-bytes",K,1,Q,C),[F]=yield 1;break;case p.TWO:case p.FOUR:case p.EIGHT:{const J=1<<ee-24;this.emit("more-bytes",K,J,Q,C);const se=yield J;F=K===a.SIMPLE_FLOAT?se:w.parseCBORint(ee,se);break}case 28:case 29:case 30:throw this.running=!1,new Error(`Additional info not implemented: ${ee}`);case p.INDEFINITE:switch(K){case a.POS_INT:case a.NEG_INT:case a.TAG:throw new Error(`Invalid indefinite encoding for MT ${K}`)}F=-1;break;default:F=ee}switch(K){case a.POS_INT:break;case a.NEG_INT:F===Number.MAX_SAFE_INTEGER?F=b.NEG_MAX:F=typeof F=="bigint"?b.MINUS_ONE-F:-1-F;break;case a.BYTE_STRING:case a.UTF8_STRING:switch(F){case 0:this.emit("start-string",K,F,Q,C),K===a.UTF8_STRING?F="":F=this.preferWeb?new Uint8Array(0):h.allocUnsafe(0);break;case-1:this.emit("start",K,m.STREAM,Q,C),v=j(v,K),G++;continue;default:this.emit("start-string",K,F,Q,C),F=yield F,K===a.UTF8_STRING?F=w.utf8(F):this.preferWeb&&(F=new Uint8Array(F.buffer,F.byteOffset,F.length))}break;case a.ARRAY:case a.MAP:switch(F){case 0:K===a.MAP?F=this.preferMap?new Map:{}:F=[];break;case-1:this.emit("start",K,m.STREAM,Q,C),v=k(v,K,-1),G++;continue;default:this.emit("start",K,F,Q,C),v=k(v,K,F*(K-3)),G++;continue}break;case a.TAG:this.emit("start",K,F,Q,C),v=k(v,K,1),v.push(F),G++;continue;case a.SIMPLE_FLOAT:if(typeof F=="number"){if(ee===p.ONE&&F<32)throw new Error(`Invalid two-byte encoding of simple value ${F}`);const J=v!=null;F=l.decode(F,J,J&&v[x]<0)}else F=w.parseCBORfloat(F)}this.emit("value",F,Q,C,ee);let U=!1;for(;v!=null;){if(F===m.BREAK)v[x]=1;else if(Array.isArray(v))v.push(F);else{const se=v[N];if(se!=null&&se!==K)throw this.running=!1,new Error("Invalid major type in indefinite encoding");v.write(F)}if(--v[x]!==0){U=!0;break}if(--G,delete v[x],Array.isArray(v))switch(v[N]){case a.ARRAY:F=v;break;case a.MAP:{let se=!this.preferMap;if(v.length%2!==0)throw new Error(`Invalid map length: ${v.length}`);for(let oe=0,ae=v.length;se&&oe<ae;oe+=2)if(typeof v[oe]!="string"||v[oe]==="__proto__"){se=!1;break}if(se){F={};for(let oe=0,ae=v.length;oe<ae;oe+=2){if(this.preventDuplicateKeys&&Object.prototype.hasOwnProperty.call(F,v[oe]))throw new Error("Duplicate keys in a map");F[v[oe]]=v[oe+1]}}else{F=new Map;for(let oe=0,ae=v.length;oe<ae;oe+=2){if(this.preventDuplicateKeys&&F.has(v[oe]))throw new Error("Duplicate keys in a map");F.set(v[oe],v[oe+1])}}break}case a.TAG:{F=new s(v[0],v[1]).convert(this.tags);break}}else if(v instanceof g)switch(v[N]){case a.BYTE_STRING:F=v.slice(),this.preferWeb&&(F=new Uint8Array(F.buffer,F.byteOffset,F.length));break;case a.UTF8_STRING:F=v.toString("utf-8");break}this.emit("stop",v[N]);const J=v;v=v[m.PARENT],delete J[m.PARENT],delete J[N]}if(!U){if(this.extendedResults){const J=this.valueBytes.slice(),se={value:M.nullcheck(F),bytes:J,length:J.length};return this.valueBytes=new g,se}return F}}}}return M.NOT_FOUND=E,pn=M,pn}var dn,xo;function $s(){if(xo)return dn;xo=1;const r=at(),s=ht(),l=St(),w=ut(),{MT:g,NUMBYTES:o,SYMS:a}=Je(),{Buffer:p}=De();function m(x){return x>1?"s":""}function b(x,N){switch(typeof x){case"function":return{options:{},cb:x};case"string":return{options:{encoding:x},cb:N};case"number":return{options:{max_depth:x},cb:N};case"object":return{options:x||{},cb:N};default:throw new TypeError("Unknown option type")}}class h extends r.Transform{constructor(N={}){const{depth:P=1,max_depth:E=10,no_summary:k=!1,tags:j={},preferWeb:R,encoding:L,...M}=N;super({...M,readableObjectMode:!1,writableObjectMode:!1}),this.depth=P,this.max_depth=E,this.all=new w,j[24]||(j[24]=this._tag_24.bind(this)),this.parser=new l({tags:j,max_depth:E,preferWeb:R,encoding:L}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),k||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(N){const P=new h({depth:this.depth+1,no_summary:!0});P.on("data",E=>this.push(E)),P.on("error",E=>this.emit("error",E)),P.end(N)}_transform(N,P,E){this.parser.write(N,P,E)}_flush(N){return this.parser._flush(N)}static comment(N,P={},E=null){if(N==null)throw new Error("input required");({options:P,cb:E}=b(P,E));const k=new w,{encoding:j="hex",...R}=P,L=new h(R);let M=null;return typeof E=="function"?(L.on("end",()=>{E(null,k.toString("utf8"))}),L.on("error",E)):M=new Promise((O,v)=>{L.on("end",()=>{O(k.toString("utf8"))}),L.on("error",v)}),L.pipe(k),s.guessEncoding(N,j).pipe(L),M}_on_error(N){this.push("ERROR: "),this.push(N.toString()),this.push(`
11
- `)}_on_read(N){this.all.write(N);const P=N.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(P);let E=(this.max_depth-this.depth)*2-P.length;E<1&&(E=1),this.push(new Array(E+1).join(" ")),this.push("-- ")}_on_more(N,P,E,k){let j="";switch(this.depth++,N){case g.POS_INT:j="Positive number,";break;case g.NEG_INT:j="Negative number,";break;case g.ARRAY:j="Array, length";break;case g.MAP:j="Map, count";break;case g.BYTE_STRING:j="Bytes, length";break;case g.UTF8_STRING:j="String, length";break;case g.SIMPLE_FLOAT:P===1?j="Simple value,":j="Float,";break}this.push(`${j} next ${P} byte${m(P)}
12
- `)}_on_start_string(N,P,E,k){let j="";switch(this.depth++,N){case g.BYTE_STRING:j=`Bytes, length: ${P}`;break;case g.UTF8_STRING:j=`String, length: ${P.toString()}`;break}this.push(`${j}
13
- `)}_on_start(N,P,E,k){switch(this.depth++,E){case g.ARRAY:this.push(`[${k}], `);break;case g.MAP:k%2?this.push(`{Val:${Math.floor(k/2)}}, `):this.push(`{Key:${Math.floor(k/2)}}, `);break}switch(N){case g.TAG:this.push(`Tag #${P}`),P===24&&this.push(" Encoded CBOR data item");break;case g.ARRAY:P===a.STREAM?this.push("Array (streaming)"):this.push(`Array, ${P} item${m(P)}`);break;case g.MAP:P===a.STREAM?this.push("Map (streaming)"):this.push(`Map, ${P} pair${m(P)}`);break;case g.BYTE_STRING:this.push("Bytes (streaming)");break;case g.UTF8_STRING:this.push("String (streaming)");break}this.push(`
14
- `)}_on_stop(N){this.depth--}_on_value(N,P,E,k){if(N!==a.BREAK)switch(P){case g.ARRAY:this.push(`[${E}], `);break;case g.MAP:E%2?this.push(`{Val:${Math.floor(E/2)}}, `):this.push(`{Key:${Math.floor(E/2)}}, `);break}const j=s.cborValueToString(N,-1/0);switch(typeof N=="string"||p.isBuffer(N)?(N.length>0&&(this.push(j),this.push(`
10
+ `)+" "+_[1]:_[0]+A+" "+c.join(", ")+" "+_[1]}r.types=Ps();function j(c){return Array.isArray(c)}r.isArray=j;function R(c){return typeof c=="boolean"}r.isBoolean=R;function M(c){return c===null}r.isNull=M;function P(c){return c==null}r.isNullOrUndefined=P;function O(c){return typeof c=="number"}r.isNumber=O;function v(c){return typeof c=="string"}r.isString=v;function G(c){return typeof c=="symbol"}r.isSymbol=G;function F(c){return c===void 0}r.isUndefined=F;function z(c){return K(c)&&J(c)==="[object RegExp]"}r.isRegExp=z,r.types.isRegExp=z;function K(c){return typeof c=="object"&&c!==null}r.isObject=K;function ee(c){return K(c)&&J(c)==="[object Date]"}r.isDate=ee,r.types.isDate=ee;function Q(c){return K(c)&&(J(c)==="[object Error]"||c instanceof Error)}r.isError=Q,r.types.isNativeError=Q;function C(c){return typeof c=="function"}r.isFunction=C;function U(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||typeof c=="symbol"||typeof c>"u"}r.isPrimitive=U,r.isBuffer=Ls();function J(c){return Object.prototype.toString.call(c)}function se(c){return c<10?"0"+c.toString(10):c.toString(10)}var oe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ae(){var c=new Date,A=[se(c.getHours()),se(c.getMinutes()),se(c.getSeconds())].join(":");return[c.getDate(),oe[c.getMonth()],A].join(" ")}r.log=function(){console.log("%s - %s",ae(),r.format.apply(r,arguments))},r.inherits=Ze(),r._extend=function(c,A){if(!A||!K(A))return c;for(var _=Object.keys(A),H=_.length;H--;)c[_[H]]=A[_[H]];return c};function fe(c,A){return Object.prototype.hasOwnProperty.call(c,A)}var ce=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(A){if(typeof A!="function")throw new TypeError('The "original" argument must be of type Function');if(ce&&A[ce]){var _=A[ce];if(typeof _!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,ce,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var H,T,S=new Promise(function(W,u){H=W,T=u}),$=[],D=0;D<arguments.length;D++)$.push(arguments[D]);$.push(function(W,u){W?T(W):H(u)});try{A.apply(this,$)}catch(W){T(W)}return S}return Object.setPrototypeOf(_,Object.getPrototypeOf(A)),ce&&Object.defineProperty(_,ce,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,s(A))},r.promisify.custom=ce;function de(c,A){if(!c){var _=new Error("Promise was rejected with a falsy value");_.reason=c,c=_}return A(c)}function pe(c){if(typeof c!="function")throw new TypeError('The "original" argument must be of type Function');function A(){for(var _=[],H=0;H<arguments.length;H++)_.push(arguments[H]);var T=_.pop();if(typeof T!="function")throw new TypeError("The last argument must be of type Function");var S=this,$=function(){return T.apply(S,arguments)};c.apply(this,_).then(function(D){me.nextTick($.bind(null,null,D))},function(D){me.nextTick(de.bind(null,D,$))})}return Object.setPrototypeOf(A,Object.getPrototypeOf(c)),Object.defineProperties(A,s(c)),A}r.callbackify=pe})(Dt)),Dt}var Wr,Ki;function Cs(){if(Ki)return Wr;Ki=1;function r(E,k){var j=Object.keys(E);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(E);k&&(R=R.filter(function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable})),j.push.apply(j,R)}return j}function s(E){for(var k=1;k<arguments.length;k++){var j=arguments[k]!=null?arguments[k]:{};k%2?r(Object(j),!0).forEach(function(R){l(E,R,j[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(j)):r(Object(j)).forEach(function(R){Object.defineProperty(E,R,Object.getOwnPropertyDescriptor(j,R))})}return E}function l(E,k,j){return k=a(k),k in E?Object.defineProperty(E,k,{value:j,enumerable:!0,configurable:!0,writable:!0}):E[k]=j,E}function g(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function w(E,k){for(var j=0;j<k.length;j++){var R=k[j];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(E,a(R.key),R)}}function o(E,k,j){return k&&w(E.prototype,k),Object.defineProperty(E,"prototype",{writable:!1}),E}function a(E){var k=p(E,"string");return typeof k=="symbol"?k:String(k)}function p(E,k){if(typeof E!="object"||E===null)return E;var j=E[Symbol.toPrimitive];if(j!==void 0){var R=j.call(E,k);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(E)}var m=De(),b=m.Buffer,h=zi(),x=h.inspect,N=x&&x.custom||"inspect";function L(E,k,j){b.prototype.copy.call(E,k,j)}return Wr=(function(){function E(){g(this,E),this.head=null,this.tail=null,this.length=0}return o(E,[{key:"push",value:function(j){var R={data:j,next:null};this.length>0?this.tail.next=R:this.head=R,this.tail=R,++this.length}},{key:"unshift",value:function(j){var R={data:j,next:this.head};this.length===0&&(this.tail=R),this.head=R,++this.length}},{key:"shift",value:function(){if(this.length!==0){var j=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,j}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(j){if(this.length===0)return"";for(var R=this.head,M=""+R.data;R=R.next;)M+=j+R.data;return M}},{key:"concat",value:function(j){if(this.length===0)return b.alloc(0);for(var R=b.allocUnsafe(j>>>0),M=this.head,P=0;M;)L(M.data,R,P),P+=M.data.length,M=M.next;return R}},{key:"consume",value:function(j,R){var M;return j<this.head.data.length?(M=this.head.data.slice(0,j),this.head.data=this.head.data.slice(j)):j===this.head.data.length?M=this.shift():M=R?this._getString(j):this._getBuffer(j),M}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(j){var R=this.head,M=1,P=R.data;for(j-=P.length;R=R.next;){var O=R.data,v=j>O.length?O.length:j;if(v===O.length?P+=O:P+=O.slice(0,j),j-=v,j===0){v===O.length?(++M,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=O.slice(v));break}++M}return this.length-=M,P}},{key:"_getBuffer",value:function(j){var R=b.allocUnsafe(j),M=this.head,P=1;for(M.data.copy(R),j-=M.data.length;M=M.next;){var O=M.data,v=j>O.length?O.length:j;if(O.copy(R,R.length-j,0,v),j-=v,j===0){v===O.length?(++P,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=O.slice(v));break}++P}return this.length-=P,R}},{key:N,value:function(j,R){return x(this,s(s({},R),{},{depth:0,customInspect:!1}))}}]),E})(),Wr}var Hr,Xi;function Zi(){if(Xi)return Hr;Xi=1;function r(a,p){var m=this,b=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return b||h?(p?p(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,me.nextTick(w,this,a)):me.nextTick(w,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(x){!p&&x?m._writableState?m._writableState.errorEmitted?me.nextTick(l,m):(m._writableState.errorEmitted=!0,me.nextTick(s,m,x)):me.nextTick(s,m,x):p?(me.nextTick(l,m),p(x)):me.nextTick(l,m)}),this)}function s(a,p){w(a,p),l(a)}function l(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function w(a,p){a.emit("error",p)}function o(a,p){var m=a._readableState,b=a._writableState;m&&m.autoDestroy||b&&b.autoDestroy?a.destroy(p):a.emit("error",p)}return Hr={destroy:r,undestroy:g,errorOrDestroy:o},Hr}var $r={},Qi;function ot(){if(Qi)return $r;Qi=1;function r(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,p.__proto__=m}var s={};function l(p,m,b){b||(b=Error);function h(N,L,E){return typeof m=="string"?m:m(N,L,E)}var x=(function(N){r(L,N);function L(E,k,j){return N.call(this,h(E,k,j))||this}return L})(b);x.prototype.name=b.name,x.prototype.code=p,s[p]=x}function g(p,m){if(Array.isArray(p)){var b=p.length;return p=p.map(function(h){return String(h)}),b>2?"one of ".concat(m," ").concat(p.slice(0,b-1).join(", "),", or ")+p[b-1]:b===2?"one of ".concat(m," ").concat(p[0]," or ").concat(p[1]):"of ".concat(m," ").concat(p[0])}else return"of ".concat(m," ").concat(String(p))}function w(p,m,b){return p.substr(0,m.length)===m}function o(p,m,b){return(b===void 0||b>p.length)&&(b=p.length),p.substring(b-m.length,b)===m}function a(p,m,b){return typeof b!="number"&&(b=0),b+m.length>p.length?!1:p.indexOf(m,b)!==-1}return l("ERR_INVALID_OPT_VALUE",function(p,m){return'The value "'+m+'" is invalid for option "'+p+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(p,m,b){var h;typeof m=="string"&&w(m,"not ")?(h="must not be",m=m.replace(/^not /,"")):h="must be";var x;if(o(p," argument"))x="The ".concat(p," ").concat(h," ").concat(g(m,"type"));else{var N=a(p,".")?"property":"argument";x='The "'.concat(p,'" ').concat(N," ").concat(h," ").concat(g(m,"type"))}return x+=". Received type ".concat(typeof b),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(p){return"The "+p+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(p){return"Cannot call "+p+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(p){return"Unknown encoding: "+p},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$r.codes=s,$r}var Yr,eo;function to(){if(eo)return Yr;eo=1;var r=ot().codes.ERR_INVALID_OPT_VALUE;function s(g,w,o){return g.highWaterMark!=null?g.highWaterMark:w?g[o]:null}function l(g,w,o,a){var p=s(w,a,o);if(p!=null){if(!(isFinite(p)&&Math.floor(p)===p)||p<0){var m=a?o:"highWaterMark";throw new r(m,p)}return Math.floor(p)}return g.objectMode?16:16*1024}return Yr={getHighWaterMark:l},Yr}var Vr,ro;function Ds(){if(ro)return Vr;ro=1,Vr=r;function r(l,g){if(s("noDeprecation"))return l;var w=!1;function o(){if(!w){if(s("throwDeprecation"))throw new Error(g);s("traceDeprecation")?console.trace(g):console.warn(g),w=!0}return l.apply(this,arguments)}return o}function s(l){try{if(!Ve.localStorage)return!1}catch{return!1}var g=Ve.localStorage[l];return g==null?!1:String(g).toLowerCase()==="true"}return Vr}var Jr,no;function io(){if(no)return Jr;no=1,Jr=z;function r(T){var S=this;this.next=null,this.entry=null,this.finish=function(){H(S,T)}}var s;z.WritableState=G;var l={deprecate:Ds()},g=Cn(),w=De().Buffer,o=(typeof Ve<"u"?Ve:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(T){return w.from(T)}function p(T){return w.isBuffer(T)||T instanceof o}var m=Zi(),b=to(),h=b.getHighWaterMark,x=ot().codes,N=x.ERR_INVALID_ARG_TYPE,L=x.ERR_METHOD_NOT_IMPLEMENTED,E=x.ERR_MULTIPLE_CALLBACK,k=x.ERR_STREAM_CANNOT_PIPE,j=x.ERR_STREAM_DESTROYED,R=x.ERR_STREAM_NULL_VALUES,M=x.ERR_STREAM_WRITE_AFTER_END,P=x.ERR_UNKNOWN_ENCODING,O=m.errorOrDestroy;Ze()(z,g);function v(){}function G(T,S,$){s=s||st(),T=T||{},typeof $!="boolean"&&($=S instanceof s),this.objectMode=!!T.objectMode,$&&(this.objectMode=this.objectMode||!!T.writableObjectMode),this.highWaterMark=h(this,T,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var D=T.decodeStrings===!1;this.decodeStrings=!D,this.defaultEncoding=T.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){oe(S,W)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var S=this.bufferedRequest,$=[];S;)$.push(S),S=S.next;return $},(function(){try{Object.defineProperty(G.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(S){return F.call(this,S)?!0:this!==z?!1:S&&S._writableState instanceof G}})):F=function(S){return S instanceof this};function z(T){s=s||st();var S=this instanceof s;if(!S&&!F.call(z,this))return new z(T);this._writableState=new G(T,this,S),this.writable=!0,T&&(typeof T.write=="function"&&(this._write=T.write),typeof T.writev=="function"&&(this._writev=T.writev),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.final=="function"&&(this._final=T.final)),g.call(this)}z.prototype.pipe=function(){O(this,new k)};function K(T,S){var $=new M;O(T,$),me.nextTick(S,$)}function ee(T,S,$,D){var W;return $===null?W=new R:typeof $!="string"&&!S.objectMode&&(W=new N("chunk",["string","Buffer"],$)),W?(O(T,W),me.nextTick(D,W),!1):!0}z.prototype.write=function(T,S,$){var D=this._writableState,W=!1,u=!D.objectMode&&p(T);return u&&!w.isBuffer(T)&&(T=a(T)),typeof S=="function"&&($=S,S=null),u?S="buffer":S||(S=D.defaultEncoding),typeof $!="function"&&($=v),D.ending?K(this,$):(u||ee(this,D,T,$))&&(D.pendingcb++,W=C(this,D,u,T,S,$)),W},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var T=this._writableState;T.corked&&(T.corked--,!T.writing&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&ce(this,T))},z.prototype.setDefaultEncoding=function(S){if(typeof S=="string"&&(S=S.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((S+"").toLowerCase())>-1))throw new P(S);return this._writableState.defaultEncoding=S,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(T,S,$){return!T.objectMode&&T.decodeStrings!==!1&&typeof S=="string"&&(S=w.from(S,$)),S}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(T,S,$,D,W,u){if(!$){var f=Q(S,D,W);D!==f&&($=!0,W="buffer",D=f)}var q=S.objectMode?1:D.length;S.length+=q;var ie=S.length<S.highWaterMark;if(ie||(S.needDrain=!0),S.writing||S.corked){var le=S.lastBufferedRequest;S.lastBufferedRequest={chunk:D,encoding:W,isBuf:$,callback:u,next:null},le?le.next=S.lastBufferedRequest:S.bufferedRequest=S.lastBufferedRequest,S.bufferedRequestCount+=1}else U(T,S,!1,q,D,W,u);return ie}function U(T,S,$,D,W,u,f){S.writelen=D,S.writecb=f,S.writing=!0,S.sync=!0,S.destroyed?S.onwrite(new j("write")):$?T._writev(W,S.onwrite):T._write(W,u,S.onwrite),S.sync=!1}function J(T,S,$,D,W){--S.pendingcb,$?(me.nextTick(W,D),me.nextTick(A,T,S),T._writableState.errorEmitted=!0,O(T,D)):(W(D),T._writableState.errorEmitted=!0,O(T,D),A(T,S))}function se(T){T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0}function oe(T,S){var $=T._writableState,D=$.sync,W=$.writecb;if(typeof W!="function")throw new E;if(se($),S)J(T,$,D,S,W);else{var u=de($)||T.destroyed;!u&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&ce(T,$),D?me.nextTick(ae,T,$,u,W):ae(T,$,u,W)}}function ae(T,S,$,D){$||fe(T,S),S.pendingcb--,D(),A(T,S)}function fe(T,S){S.length===0&&S.needDrain&&(S.needDrain=!1,T.emit("drain"))}function ce(T,S){S.bufferProcessing=!0;var $=S.bufferedRequest;if(T._writev&&$&&$.next){var D=S.bufferedRequestCount,W=new Array(D),u=S.corkedRequestsFree;u.entry=$;for(var f=0,q=!0;$;)W[f]=$,$.isBuf||(q=!1),$=$.next,f+=1;W.allBuffers=q,U(T,S,!0,S.length,W,"",u.finish),S.pendingcb++,S.lastBufferedRequest=null,u.next?(S.corkedRequestsFree=u.next,u.next=null):S.corkedRequestsFree=new r(S),S.bufferedRequestCount=0}else{for(;$;){var ie=$.chunk,le=$.encoding,ue=$.callback,he=S.objectMode?1:ie.length;if(U(T,S,!1,he,ie,le,ue),$=$.next,S.bufferedRequestCount--,S.writing)break}$===null&&(S.lastBufferedRequest=null)}S.bufferedRequest=$,S.bufferProcessing=!1}z.prototype._write=function(T,S,$){$(new L("_write()"))},z.prototype._writev=null,z.prototype.end=function(T,S,$){var D=this._writableState;return typeof T=="function"?($=T,T=null,S=null):typeof S=="function"&&($=S,S=null),T!=null&&this.write(T,S),D.corked&&(D.corked=1,this.uncork()),D.ending||_(this,D,$),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(T){return T.ending&&T.length===0&&T.bufferedRequest===null&&!T.finished&&!T.writing}function pe(T,S){T._final(function($){S.pendingcb--,$&&O(T,$),S.prefinished=!0,T.emit("prefinish"),A(T,S)})}function c(T,S){!S.prefinished&&!S.finalCalled&&(typeof T._final=="function"&&!S.destroyed?(S.pendingcb++,S.finalCalled=!0,me.nextTick(pe,T,S)):(S.prefinished=!0,T.emit("prefinish")))}function A(T,S){var $=de(S);if($&&(c(T,S),S.pendingcb===0&&(S.finished=!0,T.emit("finish"),S.autoDestroy))){var D=T._readableState;(!D||D.autoDestroy&&D.endEmitted)&&T.destroy()}return $}function _(T,S,$){S.ending=!0,A(T,S),$&&(S.finished?me.nextTick($):T.once("finish",$)),S.ended=!0,T.writable=!1}function H(T,S,$){var D=T.entry;for(T.entry=null;D;){var W=D.callback;S.pendingcb--,W($),D=D.next}S.corkedRequestsFree.next=T}return Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(S){this._writableState&&(this._writableState.destroyed=S)}}),z.prototype.destroy=m.destroy,z.prototype._undestroy=m.undestroy,z.prototype._destroy=function(T,S){S(T)},Jr}var zr,oo;function st(){if(oo)return zr;oo=1;var r=Object.keys||function(b){var h=[];for(var x in b)h.push(x);return h};zr=a;var s=po(),l=io();Ze()(a,s);for(var g=r(l.prototype),w=0;w<g.length;w++){var o=g[w];a.prototype[o]||(a.prototype[o]=l.prototype[o])}function a(b){if(!(this instanceof a))return new a(b);s.call(this,b),l.call(this,b),this.allowHalfOpen=!0,b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p(){this._writableState.ended||me.nextTick(m,this)}function m(b){b.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=h,this._writableState.destroyed=h)}}),zr}var Kr={},At={exports:{}};var so;function ks(){return so||(so=1,(function(r,s){var l=De(),g=l.Buffer;function w(a,p){for(var m in a)p[m]=a[m]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?r.exports=l:(w(l,s),s.Buffer=o);function o(a,p,m){return g(a,p,m)}o.prototype=Object.create(g.prototype),w(g,o),o.from=function(a,p,m){if(typeof a=="number")throw new TypeError("Argument must not be a number");return g(a,p,m)},o.alloc=function(a,p,m){if(typeof a!="number")throw new TypeError("Argument must be a number");var b=g(a);return p!==void 0?typeof m=="string"?b.fill(p,m):b.fill(p):b.fill(0),b},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return g(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(a)}})(At,At.exports)),At.exports}var ao;function uo(){if(ao)return Kr;ao=1;var r=ks().Buffer,s=r.isEncoding||function(R){switch(R=""+R,R&&R.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 l(R){if(!R)return"utf8";for(var M;;)switch(R){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 R;default:if(M)return;R=(""+R).toLowerCase(),M=!0}}function g(R){var M=l(R);if(typeof M!="string"&&(r.isEncoding===s||!s(R)))throw new Error("Unknown encoding: "+R);return M||R}Kr.StringDecoder=w;function w(R){this.encoding=g(R);var M;switch(this.encoding){case"utf16le":this.text=x,this.end=N,M=4;break;case"utf8":this.fillLast=m,M=4;break;case"base64":this.text=L,this.end=E,M=3;break;default:this.write=k,this.end=j;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(M)}w.prototype.write=function(R){if(R.length===0)return"";var M,P;if(this.lastNeed){if(M=this.fillLast(R),M===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P<R.length?M?M+this.text(R,P):this.text(R,P):M||""},w.prototype.end=h,w.prototype.text=b,w.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length};function o(R){return R<=127?0:R>>5===6?2:R>>4===14?3:R>>3===30?4:R>>6===2?-1:-2}function a(R,M,P){var O=M.length-1;if(O<P)return 0;var v=o(M[O]);return v>=0?(v>0&&(R.lastNeed=v-1),v):--O<P||v===-2?0:(v=o(M[O]),v>=0?(v>0&&(R.lastNeed=v-2),v):--O<P||v===-2?0:(v=o(M[O]),v>=0?(v>0&&(v===2?v=0:R.lastNeed=v-3),v):0))}function p(R,M,P){if((M[0]&192)!==128)return R.lastNeed=0,"�";if(R.lastNeed>1&&M.length>1){if((M[1]&192)!==128)return R.lastNeed=1,"�";if(R.lastNeed>2&&M.length>2&&(M[2]&192)!==128)return R.lastNeed=2,"�"}}function m(R){var M=this.lastTotal-this.lastNeed,P=p(this,R);if(P!==void 0)return P;if(this.lastNeed<=R.length)return R.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,M,0,R.length),this.lastNeed-=R.length}function b(R,M){var P=a(this,R,M);if(!this.lastNeed)return R.toString("utf8",M);this.lastTotal=P;var O=R.length-(P-this.lastNeed);return R.copy(this.lastChar,0,O),R.toString("utf8",M,O)}function h(R){var M=R&&R.length?this.write(R):"";return this.lastNeed?M+"�":M}function x(R,M){if((R.length-M)%2===0){var P=R.toString("utf16le",M);if(P){var O=P.charCodeAt(P.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",M,R.length-1)}function N(R){var M=R&&R.length?this.write(R):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,P)}return M}function L(R,M){var P=(R.length-M)%3;return P===0?R.toString("base64",M):(this.lastNeed=3-P,this.lastTotal=3,P===1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",M,R.length-P))}function E(R){var M=R&&R.length?this.write(R):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function k(R){return R.toString(this.encoding)}function j(R){return R&&R.length?this.write(R):""}return Kr}var Xr,fo;function Zr(){if(fo)return Xr;fo=1;var r=ot().codes.ERR_STREAM_PREMATURE_CLOSE;function s(o){var a=!1;return function(){if(!a){a=!0;for(var p=arguments.length,m=new Array(p),b=0;b<p;b++)m[b]=arguments[b];o.apply(this,m)}}}function l(){}function g(o){return o.setHeader&&typeof o.abort=="function"}function w(o,a,p){if(typeof a=="function")return w(o,null,a);a||(a={}),p=s(p||l);var m=a.readable||a.readable!==!1&&o.readable,b=a.writable||a.writable!==!1&&o.writable,h=function(){o.writable||N()},x=o._writableState&&o._writableState.finished,N=function(){b=!1,x=!0,m||p.call(o)},L=o._readableState&&o._readableState.endEmitted,E=function(){m=!1,L=!0,b||p.call(o)},k=function(P){p.call(o,P)},j=function(){var P;if(m&&!L)return(!o._readableState||!o._readableState.ended)&&(P=new r),p.call(o,P);if(b&&!x)return(!o._writableState||!o._writableState.ended)&&(P=new r),p.call(o,P)},R=function(){o.req.on("finish",N)};return g(o)?(o.on("complete",N),o.on("abort",j),o.req?R():o.on("request",R)):b&&!o._writableState&&(o.on("end",h),o.on("close",h)),o.on("end",E),o.on("finish",N),a.error!==!1&&o.on("error",k),o.on("close",j),function(){o.removeListener("complete",N),o.removeListener("abort",j),o.removeListener("request",R),o.req&&o.req.removeListener("finish",N),o.removeListener("end",h),o.removeListener("close",h),o.removeListener("finish",N),o.removeListener("end",E),o.removeListener("error",k),o.removeListener("close",j)}}return Xr=w,Xr}var Qr,lo;function qs(){if(lo)return Qr;lo=1;var r;function s(P,O,v){return O=l(O),O in P?Object.defineProperty(P,O,{value:v,enumerable:!0,configurable:!0,writable:!0}):P[O]=v,P}function l(P){var O=g(P,"string");return typeof O=="symbol"?O:String(O)}function g(P,O){if(typeof P!="object"||P===null)return P;var v=P[Symbol.toPrimitive];if(v!==void 0){var G=v.call(P,O);if(typeof G!="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(P)}var w=Zr(),o=Symbol("lastResolve"),a=Symbol("lastReject"),p=Symbol("error"),m=Symbol("ended"),b=Symbol("lastPromise"),h=Symbol("handlePromise"),x=Symbol("stream");function N(P,O){return{value:P,done:O}}function L(P){var O=P[o];if(O!==null){var v=P[x].read();v!==null&&(P[b]=null,P[o]=null,P[a]=null,O(N(v,!1)))}}function E(P){me.nextTick(L,P)}function k(P,O){return function(v,G){P.then(function(){if(O[m]){v(N(void 0,!0));return}O[h](v,G)},G)}}var j=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((r={get stream(){return this[x]},next:function(){var O=this,v=this[p];if(v!==null)return Promise.reject(v);if(this[m])return Promise.resolve(N(void 0,!0));if(this[x].destroyed)return new Promise(function(K,ee){me.nextTick(function(){O[p]?ee(O[p]):K(N(void 0,!0))})});var G=this[b],F;if(G)F=new Promise(k(G,this));else{var z=this[x].read();if(z!==null)return Promise.resolve(N(z,!1));F=new Promise(this[h])}return this[b]=F,F}},s(r,Symbol.asyncIterator,function(){return this}),s(r,"return",function(){var O=this;return new Promise(function(v,G){O[x].destroy(null,function(F){if(F){G(F);return}v(N(void 0,!0))})})}),r),j),M=function(O){var v,G=Object.create(R,(v={},s(v,x,{value:O,writable:!0}),s(v,o,{value:null,writable:!0}),s(v,a,{value:null,writable:!0}),s(v,p,{value:null,writable:!0}),s(v,m,{value:O._readableState.endEmitted,writable:!0}),s(v,h,{value:function(z,K){var ee=G[x].read();ee?(G[b]=null,G[o]=null,G[a]=null,z(N(ee,!1))):(G[o]=z,G[a]=K)},writable:!0}),v));return G[b]=null,w(O,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=G[a];z!==null&&(G[b]=null,G[o]=null,G[a]=null,z(F)),G[p]=F;return}var K=G[o];K!==null&&(G[b]=null,G[o]=null,G[a]=null,K(N(void 0,!0))),G[m]=!0}),O.on("readable",E.bind(null,G)),G};return Qr=M,Qr}var en,co;function js(){return co||(co=1,en=function(){throw new Error("Readable.from is not available in the browser")}),en}var tn,ho;function po(){if(ho)return tn;ho=1,tn=K;var r;K.ReadableState=z,Nt().EventEmitter;var s=function(f,q){return f.listeners(q).length},l=Cn(),g=De().Buffer,w=(typeof Ve<"u"?Ve:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(u){return g.from(u)}function a(u){return g.isBuffer(u)||u instanceof w}var p=zi(),m;p&&p.debuglog?m=p.debuglog("stream"):m=function(){};var b=Cs(),h=Zi(),x=to(),N=x.getHighWaterMark,L=ot().codes,E=L.ERR_INVALID_ARG_TYPE,k=L.ERR_STREAM_PUSH_AFTER_EOF,j=L.ERR_METHOD_NOT_IMPLEMENTED,R=L.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,M,P,O;Ze()(K,l);var v=h.errorOrDestroy,G=["error","close","destroy","pause","resume"];function F(u,f,q){if(typeof u.prependListener=="function")return u.prependListener(f,q);!u._events||!u._events[f]?u.on(f,q):Array.isArray(u._events[f])?u._events[f].unshift(q):u._events[f]=[q,u._events[f]]}function z(u,f,q){r=r||st(),u=u||{},typeof q!="boolean"&&(q=f instanceof r),this.objectMode=!!u.objectMode,q&&(this.objectMode=this.objectMode||!!u.readableObjectMode),this.highWaterMark=N(this,u,"readableHighWaterMark",q),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=u.emitClose!==!1,this.autoDestroy=!!u.autoDestroy,this.destroyed=!1,this.defaultEncoding=u.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,u.encoding&&(M||(M=uo().StringDecoder),this.decoder=new M(u.encoding),this.encoding=u.encoding)}function K(u){if(r=r||st(),!(this instanceof K))return new K(u);var f=this instanceof r;this._readableState=new z(u,this,f),this.readable=!0,u&&(typeof u.read=="function"&&(this._read=u.read),typeof u.destroy=="function"&&(this._destroy=u.destroy)),l.call(this)}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(f){this._readableState&&(this._readableState.destroyed=f)}}),K.prototype.destroy=h.destroy,K.prototype._undestroy=h.undestroy,K.prototype._destroy=function(u,f){f(u)},K.prototype.push=function(u,f){var q=this._readableState,ie;return q.objectMode?ie=!0:typeof u=="string"&&(f=f||q.defaultEncoding,f!==q.encoding&&(u=g.from(u,f),f=""),ie=!0),ee(this,u,f,!1,ie)},K.prototype.unshift=function(u){return ee(this,u,null,!0,!1)};function ee(u,f,q,ie,le){m("readableAddChunk",f);var ue=u._readableState;if(f===null)ue.reading=!1,oe(u,ue);else{var he;if(le||(he=C(ue,f)),he)v(u,he);else if(ue.objectMode||f&&f.length>0)if(typeof f!="string"&&!ue.objectMode&&Object.getPrototypeOf(f)!==g.prototype&&(f=o(f)),ie)ue.endEmitted?v(u,new R):Q(u,ue,f,!0);else if(ue.ended)v(u,new k);else{if(ue.destroyed)return!1;ue.reading=!1,ue.decoder&&!q?(f=ue.decoder.write(f),ue.objectMode||f.length!==0?Q(u,ue,f,!1):ce(u,ue)):Q(u,ue,f,!1)}else ie||(ue.reading=!1,ce(u,ue))}return!ue.ended&&(ue.length<ue.highWaterMark||ue.length===0)}function Q(u,f,q,ie){f.flowing&&f.length===0&&!f.sync?(f.awaitDrain=0,u.emit("data",q)):(f.length+=f.objectMode?1:q.length,ie?f.buffer.unshift(q):f.buffer.push(q),f.needReadable&&ae(u)),ce(u,f)}function C(u,f){var q;return!a(f)&&typeof f!="string"&&f!==void 0&&!u.objectMode&&(q=new E("chunk",["string","Buffer","Uint8Array"],f)),q}K.prototype.isPaused=function(){return this._readableState.flowing===!1},K.prototype.setEncoding=function(u){M||(M=uo().StringDecoder);var f=new M(u);this._readableState.decoder=f,this._readableState.encoding=this._readableState.decoder.encoding;for(var q=this._readableState.buffer.head,ie="";q!==null;)ie+=f.write(q.data),q=q.next;return this._readableState.buffer.clear(),ie!==""&&this._readableState.buffer.push(ie),this._readableState.length=ie.length,this};var U=1073741824;function J(u){return u>=U?u=U:(u--,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u++),u}function se(u,f){return u<=0||f.length===0&&f.ended?0:f.objectMode?1:u!==u?f.flowing&&f.length?f.buffer.head.data.length:f.length:(u>f.highWaterMark&&(f.highWaterMark=J(u)),u<=f.length?u:f.ended?f.length:(f.needReadable=!0,0))}K.prototype.read=function(u){m("read",u),u=parseInt(u,10);var f=this._readableState,q=u;if(u!==0&&(f.emittedReadable=!1),u===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return m("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?$(this):ae(this),null;if(u=se(u,f),u===0&&f.ended)return f.length===0&&$(this),null;var ie=f.needReadable;m("need readable",ie),(f.length===0||f.length-u<f.highWaterMark)&&(ie=!0,m("length less than watermark",ie)),f.ended||f.reading?(ie=!1,m("reading or ended",ie)):ie&&(m("do read"),f.reading=!0,f.sync=!0,f.length===0&&(f.needReadable=!0),this._read(f.highWaterMark),f.sync=!1,f.reading||(u=se(q,f)));var le;return u>0?le=S(u,f):le=null,le===null?(f.needReadable=f.length<=f.highWaterMark,u=0):(f.length-=u,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),q!==u&&f.ended&&$(this)),le!==null&&this.emit("data",le),le};function oe(u,f){if(m("onEofChunk"),!f.ended){if(f.decoder){var q=f.decoder.end();q&&q.length&&(f.buffer.push(q),f.length+=f.objectMode?1:q.length)}f.ended=!0,f.sync?ae(u):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,fe(u)))}}function ae(u){var f=u._readableState;m("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(m("emitReadable",f.flowing),f.emittedReadable=!0,me.nextTick(fe,u))}function fe(u){var f=u._readableState;m("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(u.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,T(u)}function ce(u,f){f.readingMore||(f.readingMore=!0,me.nextTick(de,u,f))}function de(u,f){for(;!f.reading&&!f.ended&&(f.length<f.highWaterMark||f.flowing&&f.length===0);){var q=f.length;if(m("maybeReadMore read 0"),u.read(0),q===f.length)break}f.readingMore=!1}K.prototype._read=function(u){v(this,new j("_read()"))},K.prototype.pipe=function(u,f){var q=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=u;break;case 1:ie.pipes=[ie.pipes,u];break;default:ie.pipes.push(u);break}ie.pipesCount+=1,m("pipe count=%d opts=%j",ie.pipesCount,f);var le=(!f||f.end!==!1)&&u!==me.stdout&&u!==me.stderr,ue=le?ye:Ce;ie.endEmitted?me.nextTick(ue):q.once("end",ue),u.on("unpipe",he);function he(ke,Ue){m("onunpipe"),ke===q&&Ue&&Ue.hasUnpiped===!1&&(Ue.hasUnpiped=!0,Me())}function ye(){m("onend"),u.end()}var te=pe(q);u.on("drain",te);var Ne=!1;function Me(){m("cleanup"),u.removeListener("close",Pe),u.removeListener("finish",Oe),u.removeListener("drain",te),u.removeListener("error",Ae),u.removeListener("unpipe",he),q.removeListener("end",ye),q.removeListener("end",Ce),q.removeListener("data",_e),Ne=!0,ie.awaitDrain&&(!u._writableState||u._writableState.needDrain)&&te()}q.on("data",_e);function _e(ke){m("ondata");var Ue=u.write(ke);m("dest.write",Ue),Ue===!1&&((ie.pipesCount===1&&ie.pipes===u||ie.pipesCount>1&&W(ie.pipes,u)!==-1)&&!Ne&&(m("false write response, pause",ie.awaitDrain),ie.awaitDrain++),q.pause())}function Ae(ke){m("onerror",ke),Ce(),u.removeListener("error",Ae),s(u,"error")===0&&v(u,ke)}F(u,"error",Ae);function Pe(){u.removeListener("finish",Oe),Ce()}u.once("close",Pe);function Oe(){m("onfinish"),u.removeListener("close",Pe),Ce()}u.once("finish",Oe);function Ce(){m("unpipe"),q.unpipe(u)}return u.emit("pipe",q),ie.flowing||(m("pipe resume"),q.resume()),u};function pe(u){return function(){var q=u._readableState;m("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&s(u,"data")&&(q.flowing=!0,T(u))}}K.prototype.unpipe=function(u){var f=this._readableState,q={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return u&&u!==f.pipes?this:(u||(u=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,u&&u.emit("unpipe",this,q),this);if(!u){var ie=f.pipes,le=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var ue=0;ue<le;ue++)ie[ue].emit("unpipe",this,{hasUnpiped:!1});return this}var he=W(f.pipes,u);return he===-1?this:(f.pipes.splice(he,1),f.pipesCount-=1,f.pipesCount===1&&(f.pipes=f.pipes[0]),u.emit("unpipe",this,q),this)},K.prototype.on=function(u,f){var q=l.prototype.on.call(this,u,f),ie=this._readableState;return u==="data"?(ie.readableListening=this.listenerCount("readable")>0,ie.flowing!==!1&&this.resume()):u==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,m("on readable",ie.length,ie.reading),ie.length?ae(this):ie.reading||me.nextTick(A,this)),q},K.prototype.addListener=K.prototype.on,K.prototype.removeListener=function(u,f){var q=l.prototype.removeListener.call(this,u,f);return u==="readable"&&me.nextTick(c,this),q},K.prototype.removeAllListeners=function(u){var f=l.prototype.removeAllListeners.apply(this,arguments);return(u==="readable"||u===void 0)&&me.nextTick(c,this),f};function c(u){var f=u._readableState;f.readableListening=u.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:u.listenerCount("data")>0&&u.resume()}function A(u){m("readable nexttick read 0"),u.read(0)}K.prototype.resume=function(){var u=this._readableState;return u.flowing||(m("resume"),u.flowing=!u.readableListening,_(this,u)),u.paused=!1,this};function _(u,f){f.resumeScheduled||(f.resumeScheduled=!0,me.nextTick(H,u,f))}function H(u,f){m("resume",f.reading),f.reading||u.read(0),f.resumeScheduled=!1,u.emit("resume"),T(u),f.flowing&&!f.reading&&u.read(0)}K.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function T(u){var f=u._readableState;for(m("flow",f.flowing);f.flowing&&u.read()!==null;);}K.prototype.wrap=function(u){var f=this,q=this._readableState,ie=!1;u.on("end",function(){if(m("wrapped end"),q.decoder&&!q.ended){var he=q.decoder.end();he&&he.length&&f.push(he)}f.push(null)}),u.on("data",function(he){if(m("wrapped data"),q.decoder&&(he=q.decoder.write(he)),!(q.objectMode&&he==null)&&!(!q.objectMode&&(!he||!he.length))){var ye=f.push(he);ye||(ie=!0,u.pause())}});for(var le in u)this[le]===void 0&&typeof u[le]=="function"&&(this[le]=(function(ye){return function(){return u[ye].apply(u,arguments)}})(le));for(var ue=0;ue<G.length;ue++)u.on(G[ue],this.emit.bind(this,G[ue]));return this._read=function(he){m("wrapped _read",he),ie&&(ie=!1,u.resume())},this},typeof Symbol=="function"&&(K.prototype[Symbol.asyncIterator]=function(){return P===void 0&&(P=qs()),P(this)}),Object.defineProperty(K.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(K.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(K.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){this._readableState&&(this._readableState.flowing=f)}}),K._fromList=S,Object.defineProperty(K.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function S(u,f){if(f.length===0)return null;var q;return f.objectMode?q=f.buffer.shift():!u||u>=f.length?(f.decoder?q=f.buffer.join(""):f.buffer.length===1?q=f.buffer.first():q=f.buffer.concat(f.length),f.buffer.clear()):q=f.buffer.consume(u,f.decoder),q}function $(u){var f=u._readableState;m("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,me.nextTick(D,f,u))}function D(u,f){if(m("endReadableNT",u.endEmitted,u.length),!u.endEmitted&&u.length===0&&(u.endEmitted=!0,f.readable=!1,f.emit("end"),u.autoDestroy)){var q=f._writableState;(!q||q.autoDestroy&&q.finished)&&f.destroy()}}typeof Symbol=="function"&&(K.from=function(u,f){return O===void 0&&(O=js()),O(K,u,f)});function W(u,f){for(var q=0,ie=u.length;q<ie;q++)if(u[q]===f)return q;return-1}return tn}var rn,yo;function go(){if(yo)return rn;yo=1,rn=p;var r=ot().codes,s=r.ERR_METHOD_NOT_IMPLEMENTED,l=r.ERR_MULTIPLE_CALLBACK,g=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,w=r.ERR_TRANSFORM_WITH_LENGTH_0,o=st();Ze()(p,o);function a(h,x){var N=this._transformState;N.transforming=!1;var L=N.writecb;if(L===null)return this.emit("error",new l);N.writechunk=null,N.writecb=null,x!=null&&this.push(x),L(h);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}function p(h){if(!(this instanceof p))return new p(h);o.call(this,h),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",m)}function m(){var h=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(x,N){b(h,x,N)}):b(this,null,null)}p.prototype.push=function(h,x){return this._transformState.needTransform=!1,o.prototype.push.call(this,h,x)},p.prototype._transform=function(h,x,N){N(new s("_transform()"))},p.prototype._write=function(h,x,N){var L=this._transformState;if(L.writecb=N,L.writechunk=h,L.writeencoding=x,!L.transforming){var E=this._readableState;(L.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},p.prototype._read=function(h){var x=this._transformState;x.writechunk!==null&&!x.transforming?(x.transforming=!0,this._transform(x.writechunk,x.writeencoding,x.afterTransform)):x.needTransform=!0},p.prototype._destroy=function(h,x){o.prototype._destroy.call(this,h,function(N){x(N)})};function b(h,x,N){if(x)return h.emit("error",x);if(N!=null&&h.push(N),h._writableState.length)throw new w;if(h._transformState.transforming)throw new g;return h.push(null)}return rn}var nn,wo;function Gs(){if(wo)return nn;wo=1,nn=s;var r=go();Ze()(s,r);function s(l){if(!(this instanceof s))return new s(l);r.call(this,l)}return s.prototype._transform=function(l,g,w){w(null,l)},nn}var on,mo;function Ws(){if(mo)return on;mo=1;var r;function s(N){var L=!1;return function(){L||(L=!0,N.apply(void 0,arguments))}}var l=ot().codes,g=l.ERR_MISSING_ARGS,w=l.ERR_STREAM_DESTROYED;function o(N){if(N)throw N}function a(N){return N.setHeader&&typeof N.abort=="function"}function p(N,L,E,k){k=s(k);var j=!1;N.on("close",function(){j=!0}),r===void 0&&(r=Zr()),r(N,{readable:L,writable:E},function(M){if(M)return k(M);j=!0,k()});var R=!1;return function(M){if(!j&&!R){if(R=!0,a(N))return N.abort();if(typeof N.destroy=="function")return N.destroy();k(M||new w("pipe"))}}}function m(N){N()}function b(N,L){return N.pipe(L)}function h(N){return!N.length||typeof N[N.length-1]!="function"?o:N.pop()}function x(){for(var N=arguments.length,L=new Array(N),E=0;E<N;E++)L[E]=arguments[E];var k=h(L);if(Array.isArray(L[0])&&(L=L[0]),L.length<2)throw new g("streams");var j,R=L.map(function(M,P){var O=P<L.length-1,v=P>0;return p(M,O,v,function(G){j||(j=G),G&&R.forEach(m),!O&&(R.forEach(m),k(j))})});return L.reduce(b)}return on=x,on}var sn,bo;function at(){if(bo)return sn;bo=1,sn=l;var r=Nt().EventEmitter,s=Ze();s(l,r),l.Readable=po(),l.Writable=io(),l.Duplex=st(),l.Transform=go(),l.PassThrough=Gs(),l.finished=Zr(),l.pipeline=Ws(),l.Stream=l;function l(){r.call(this)}return l.prototype.pipe=function(g,w){var o=this;function a(L){g.writable&&g.write(L)===!1&&o.pause&&o.pause()}o.on("data",a);function p(){o.readable&&o.resume&&o.resume()}g.on("drain",p),!g._isStdio&&(!w||w.end!==!1)&&(o.on("end",b),o.on("close",h));var m=!1;function b(){m||(m=!0,g.end())}function h(){m||(m=!0,typeof g.destroy=="function"&&g.destroy())}function x(L){if(N(),r.listenerCount(this,"error")===0)throw L}o.on("error",x),g.on("error",x);function N(){o.removeListener("data",a),g.removeListener("drain",p),o.removeListener("end",b),o.removeListener("close",h),o.removeListener("error",x),g.removeListener("error",x),o.removeListener("end",N),o.removeListener("close",N),g.removeListener("close",N)}return o.on("end",N),o.on("close",N),g.on("close",N),g.emit("pipe",o),g},sn}var an={},un,Eo;function ut(){if(Eo)return un;Eo=1;const r=at(),{Buffer:s}=De(),l=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class g extends r.Transform{constructor(o,a,p={}){let m=null,b=null;switch(typeof o){case"object":s.isBuffer(o)?m=o:o&&(p=o);break;case"string":m=o;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof a){case"object":a&&(p=a);break;case"string":b=a;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!p||typeof p!="object")throw new TypeError("Invalid options");m==null&&(m=p.input),b==null&&(b=p.inputEncoding),delete p.input,delete p.inputEncoding;const h=p.watchPipe==null?!0:p.watchPipe;delete p.watchPipe;const x=!!p.readError;delete p.readError,super(p),this.readError=x,h&&this.on("pipe",N=>{const L=N._readableState.objectMode;if(this.length>0&&L!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=L,this._writableState.objectMode=L}),m!=null&&this.end(m,b)}static isNoFilter(o){return o instanceof this}static compare(o,a){if(!(o instanceof this))throw new TypeError("Arguments must be NoFilters");return o===a?0:o.compare(a)}static concat(o,a){if(!Array.isArray(o))throw new TypeError("list argument must be an Array of NoFilters");if(o.length===0||a===0)return s.alloc(0);a==null&&(a=o.reduce((h,x)=>{if(!(x instanceof g))throw new TypeError("list argument must be an Array of NoFilters");return h+x.length},0));let p=!0,m=!0;const b=o.map(h=>{if(!(h instanceof g))throw new TypeError("list argument must be an Array of NoFilters");const x=h.slice();return s.isBuffer(x)?m=!1:p=!1,x});if(p)return s.concat(b,a);if(m)return[].concat(...b).slice(0,a);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(o,a,p){!this._readableState.objectMode&&!s.isBuffer(o)&&(o=s.from(o,a)),this.push(o),p()}_bufArray(){let o=this._readableState.buffer;if(!Array.isArray(o)){let a=o.head;for(o=[];a!=null;)o.push(a.data),a=a.next}return o}read(o){const a=super.read(o);if(a!=null){if(this.emit("read",a),this.readError&&a.length<o)throw new Error(`Read ${a.length}, wanted ${o}`)}else if(this.readError)throw new Error(`No data available, wanted ${o}`);return a}readFull(o){let a=null,p=null,m=null;return new Promise((b,h)=>{if(this.length>=o){b(this.read(o));return}if(this.writableFinished){h(new Error(`Stream finished before ${o} bytes were available`));return}a=x=>{this.length>=o&&b(this.read(o))},p=()=>{h(new Error(`Stream finished before ${o} bytes were available`))},m=h,this.on("readable",a),this.on("error",m),this.on("finish",p)}).finally(()=>{a&&(this.removeListener("readable",a),this.removeListener("error",m),this.removeListener("finish",p))})}promise(o){let a=!1;return new Promise((p,m)=>{this.on("finish",()=>{const b=this.read();o!=null&&!a&&(a=!0,o(null,b)),p(b)}),this.on("error",b=>{o!=null&&!a&&(a=!0,o(b)),m(b)})})}compare(o){if(!(o instanceof g))throw new TypeError("Arguments must be NoFilters");if(this===o)return 0;const a=this.slice(),p=o.slice();if(s.isBuffer(a)&&s.isBuffer(p))return a.compare(p);throw new Error("Cannot compare streams in object mode")}equals(o){return this.compare(o)===0}slice(o,a){if(this._readableState.objectMode)return this._bufArray().slice(o,a);const p=this._bufArray();switch(p.length){case 0:return s.alloc(0);case 1:return p[0].slice(o,a);default:return s.concat(p).slice(o,a)}}get(o){return this.slice()[o]}toJSON(){const o=this.slice();return s.isBuffer(o)?o.toJSON():o}toString(o,a,p){const m=this.slice(a,p);return s.isBuffer(m)?!o||o==="utf8"?l.decode(m):m.toString(o):JSON.stringify(m)}[Symbol.for("nodejs.util.inspect.custom")](o,a){const m=this._bufArray().map(b=>s.isBuffer(b)?a.stylize(b.toString("hex"),"string"):JSON.stringify(b)).join(", ");return`${this.constructor.name} [${m}]`}get length(){return this._readableState.length}writeBigInt(o){let a=o.toString(16);if(o<0){const p=BigInt(Math.floor(a.length/2));o=(BigInt(1)<<p*BigInt(8))+o,a=o.toString(16)}return a.length%2&&(a=`0${a}`),this.push(s.from(a,"hex"))}readUBigInt(o){const a=this.read(o);return s.isBuffer(a)?BigInt(`0x${a.toString("hex")}`):null}readBigInt(o){const a=this.read(o);if(!s.isBuffer(a))return null;let p=BigInt(`0x${a.toString("hex")}`);if(a[0]&128){const m=BigInt(1)<<BigInt(a.length)*BigInt(8);p-=m}return p}writeUInt8(o){const a=s.from([o]);return this.push(a)}writeUInt16LE(o){const a=s.alloc(2);return a.writeUInt16LE(o),this.push(a)}writeUInt16BE(o){const a=s.alloc(2);return a.writeUInt16BE(o),this.push(a)}writeUInt32LE(o){const a=s.alloc(4);return a.writeUInt32LE(o),this.push(a)}writeUInt32BE(o){const a=s.alloc(4);return a.writeUInt32BE(o),this.push(a)}writeInt8(o){const a=s.from([o]);return this.push(a)}writeInt16LE(o){const a=s.alloc(2);return a.writeUInt16LE(o),this.push(a)}writeInt16BE(o){const a=s.alloc(2);return a.writeUInt16BE(o),this.push(a)}writeInt32LE(o){const a=s.alloc(4);return a.writeUInt32LE(o),this.push(a)}writeInt32BE(o){const a=s.alloc(4);return a.writeUInt32BE(o),this.push(a)}writeFloatLE(o){const a=s.alloc(4);return a.writeFloatLE(o),this.push(a)}writeFloatBE(o){const a=s.alloc(4);return a.writeFloatBE(o),this.push(a)}writeDoubleLE(o){const a=s.alloc(8);return a.writeDoubleLE(o),this.push(a)}writeDoubleBE(o){const a=s.alloc(8);return a.writeDoubleBE(o),this.push(a)}writeBigInt64LE(o){const a=s.alloc(8);return a.writeBigInt64LE(o),this.push(a)}writeBigInt64BE(o){const a=s.alloc(8);return a.writeBigInt64BE(o),this.push(a)}writeBigUInt64LE(o){const a=s.alloc(8);return a.writeBigUInt64LE(o),this.push(a)}writeBigUInt64BE(o){const a=s.alloc(8);return a.writeBigUInt64BE(o),this.push(a)}readUInt8(){const o=this.read(1);return s.isBuffer(o)?o.readUInt8():null}readUInt16LE(){const o=this.read(2);return s.isBuffer(o)?o.readUInt16LE():null}readUInt16BE(){const o=this.read(2);return s.isBuffer(o)?o.readUInt16BE():null}readUInt32LE(){const o=this.read(4);return s.isBuffer(o)?o.readUInt32LE():null}readUInt32BE(){const o=this.read(4);return s.isBuffer(o)?o.readUInt32BE():null}readInt8(){const o=this.read(1);return s.isBuffer(o)?o.readInt8():null}readInt16LE(){const o=this.read(2);return s.isBuffer(o)?o.readInt16LE():null}readInt16BE(){const o=this.read(2);return s.isBuffer(o)?o.readInt16BE():null}readInt32LE(){const o=this.read(4);return s.isBuffer(o)?o.readInt32LE():null}readInt32BE(){const o=this.read(4);return s.isBuffer(o)?o.readInt32BE():null}readFloatLE(){const o=this.read(4);return s.isBuffer(o)?o.readFloatLE():null}readFloatBE(){const o=this.read(4);return s.isBuffer(o)?o.readFloatBE():null}readDoubleLE(){const o=this.read(8);return s.isBuffer(o)?o.readDoubleLE():null}readDoubleBE(){const o=this.read(8);return s.isBuffer(o)?o.readDoubleBE():null}readBigInt64LE(){const o=this.read(8);return s.isBuffer(o)?o.readBigInt64LE():null}readBigInt64BE(){const o=this.read(8);return s.isBuffer(o)?o.readBigInt64BE():null}readBigUInt64LE(){const o=this.read(8);return s.isBuffer(o)?o.readBigUInt64LE():null}readBigUInt64BE(){const o=this.read(8);return s.isBuffer(o)?o.readBigUInt64BE():null}}return un=g,un}var fn={},_o;function Je(){return _o||(_o=1,(function(r){r.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},r.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},r.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},r.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},r.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},r.SHIFT32=4294967296,r.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(r.SHIFT32)}})(fn)),fn}var vo;function ht(){return vo||(vo=1,(function(r){const{Buffer:s}=De(),l=ut(),g=at(),w=Je(),{NUMBYTES:o,SHIFT32:a,BI:p,SYMS:m}=w,b=2097151,h=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});r.utf8=L=>h.decode(L),r.utf8.checksUTF8=!0;function x(L){return L instanceof g.Readable?!0:["read","on","pipe"].every(E=>typeof L[E]=="function")}r.isBufferish=function(E){return E&&typeof E=="object"&&(s.isBuffer(E)||E instanceof Uint8Array||E instanceof Uint8ClampedArray||E instanceof ArrayBuffer||E instanceof DataView)},r.bufferishToBuffer=function(E){return s.isBuffer(E)?E:ArrayBuffer.isView(E)?s.from(E.buffer,E.byteOffset,E.byteLength):E instanceof ArrayBuffer?s.from(E):null},r.parseCBORint=function(E,k){switch(E){case o.ONE:return k.readUInt8(0);case o.TWO:return k.readUInt16BE(0);case o.FOUR:return k.readUInt32BE(0);case o.EIGHT:{const j=k.readUInt32BE(0),R=k.readUInt32BE(4);return j>b?BigInt(j)*p.SHIFT32+BigInt(R):j*a+R}default:throw new Error(`Invalid additional info for int: ${E}`)}},r.writeHalf=function(E,k){const j=s.allocUnsafe(4);j.writeFloatBE(k,0);const R=j.readUInt32BE(0);if((R&8191)!==0)return!1;let M=R>>16&32768;const P=R>>23&255,O=R&8388607;if(P>=113&&P<=142)M+=(P-112<<10)+(O>>13);else if(P>=103&&P<113){if(O&(1<<126-P)-1)return!1;M+=O+8388608>>126-P}else return!1;return E.writeUInt16BE(M),!0},r.parseHalf=function(E){const k=E[0]&128?-1:1,j=(E[0]&124)>>2,R=(E[0]&3)<<8|E[1];if(j){if(j===31)return k*(R?NaN:1/0)}else return k*5960464477539063e-23*R;return k*2**(j-25)*(1024+R)},r.parseCBORfloat=function(E){switch(E.length){case 2:return r.parseHalf(E);case 4:return E.readFloatBE(0);case 8:return E.readDoubleBE(0);default:throw new Error(`Invalid float size: ${E.length}`)}},r.hex=function(E){return s.from(E.replace(/^0x/,""),"hex")},r.bin=function(E){E=E.replace(/\s/g,"");let k=0,j=E.length%8||8;const R=[];for(;j<=E.length;)R.push(parseInt(E.slice(k,j),2)),k=j,j+=8;return s.from(R)},r.arrayEqual=function(E,k){return E==null&&k==null?!0:E==null||k==null?!1:E.length===k.length&&E.every((j,R)=>j===k[R])},r.bufferToBigInt=function(E){return BigInt(`0x${E.toString("hex")}`)},r.cborValueToString=function(E,k=-1){switch(typeof E){case"symbol":{switch(E){case m.NULL:return"null";case m.UNDEFINED:return"undefined";case m.BREAK:return"BREAK"}if(E.description)return E.description;const R=E.toString().match(/^Symbol\((?<name>.*)\)/);return R&&R.groups.name?R.groups.name:"Symbol"}case"string":return JSON.stringify(E);case"bigint":return E.toString();case"number":{const j=Object.is(E,-0)?"-0":String(E);return k>0?`${j}_${k}`:j}case"object":{if(!E)return"null";const j=r.bufferishToBuffer(E);if(j){const R=j.toString("hex");return k===-1/0?R:`h'${R}'`}return E&&typeof E[Symbol.for("nodejs.util.inspect.custom")]=="function"?E[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(E)?"[]":"{}"}}return String(E)},r.guessEncoding=function(E,k){if(typeof E=="string")return new l(E,k??"hex");const j=r.bufferishToBuffer(E);if(j)return new l(j);if(x(E))return E;throw new Error("Unknown input type")};const N={"=":"","+":"-","/":"_"};r.base64url=function(E){return r.bufferishToBuffer(E).toString("base64").replace(/[=+/]/g,k=>N[k])},r.base64=function(E){return r.bufferishToBuffer(E).toString("base64")},r.isBigEndian=function(){const E=new Uint8Array(4),k=new Uint32Array(E.buffer);return!((k[0]=1)&E[0])}})(an)),an}var ln,Ao;function Hs(){if(Ao)return ln;Ao=1;const r=at(),s=ut();class l extends r.Transform{constructor(w){super(w),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new s,this.__restart()}_transform(w,o,a){for(this.bs.write(w);this.bs.length>=this.__needed;){let p=null;const m=this.__needed===null?void 0:this.bs.read(this.__needed);try{p=this.__parser.next(m)}catch(b){return a(b)}this.__needed&&(this.__fresh=!1),p.done?(this.push(p.value),this.__restart()):this.__needed=p.value||1/0}return a()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(w){w(this.__fresh?null:new Error("unexpected end of input"))}}return ln=l,ln}var cn,So;function Io(){if(So)return cn;So=1;const r=Je(),s=ht(),l=Symbol("INTERNAL_JSON");function g(L,E){if(s.isBufferish(L))L.toJSON=E;else if(Array.isArray(L))for(const k of L)g(k,E);else if(L&&typeof L=="object"&&(!(L instanceof N)||L.tag<21||L.tag>23))for(const k of Object.values(L))g(k,E)}function w(){return s.base64(this)}function o(){return s.base64url(this)}function a(){return this.toString("hex")}function p(L,E,k,j){const R=new DataView(L),[M,P]={2:[R.getUint16,R.setUint16],4:[R.getUint32,R.setUint32],8:[R.getBigUint64,R.setBigUint64]}[E],O=k+j;for(let v=k;v<O;v+=E)P.call(R,v,M.call(R,v,!0))}const m={0:L=>new Date(L),1:L=>new Date(L*1e3),2:L=>s.bufferToBigInt(L),3:L=>r.BI.MINUS_ONE-s.bufferToBigInt(L),21:(L,E)=>(s.isBufferish(L)?E[l]=o:g(L,o),E),22:(L,E)=>(s.isBufferish(L)?E[l]=w:g(L,w),E),23:(L,E)=>(s.isBufferish(L)?E[l]=a:g(L,a),E),32:L=>new URL(L),33:(L,E)=>{if(!L.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const k=L.length%4;if(k===1)throw new Error("Invalid base64url length");if(k===2){if("AQgw".indexOf(L[L.length-1])===-1)throw new Error("Invalid base64 padding")}else if(k===3&&"AEIMQUYcgkosw048".indexOf(L[L.length-1])===-1)throw new Error("Invalid base64 padding");return E},34:(L,E)=>{const k=L.match(/^[a-zA-Z0-9+/]+(?<padding>={0,2})$/);if(!k)throw new Error("Invalid base64 characters");if(L.length%4!==0)throw new Error("Invalid base64 length");if(k.groups.padding==="="){if("AQgw".indexOf(L[L.length-2])===-1)throw new Error("Invalid base64 padding")}else if(k.groups.padding==="=="&&"AEIMQUYcgkosw048".indexOf(L[L.length-3])===-1)throw new Error("Invalid base64 padding");return E},35:L=>new RegExp(L),258:L=>new Set(L)},b={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};typeof BigUint64Array<"u"&&(b[67]=BigUint64Array,b[71]=BigUint64Array),typeof BigInt64Array<"u"&&(b[75]=BigInt64Array,b[79]=BigInt64Array);function h(L,E){if(!s.isBufferish(L))throw new TypeError("val not a buffer");const{tag:k}=E,j=b[k];if(!j)throw new Error(`Invalid typed array tag: ${k}`);const R=k&4,P=2**(((k&16)>>4)+(k&3));!R!==s.isBigEndian()&&P>1&&p(L.buffer,P,L.byteOffset,L.byteLength);const O=L.buffer.slice(L.byteOffset,L.byteOffset+L.byteLength);return new j(O)}for(const L of Object.keys(b))m[L]=h;let x={};class N{constructor(E,k,j){if(this.tag=E,this.value=k,this.err=j,typeof this.tag!="number")throw new Error(`Invalid tag type (${typeof this.tag})`);if(this.tag<0||(this.tag|0)!==this.tag)throw new Error(`Tag must be a positive integer: ${this.tag}`)}toJSON(){if(this[l])return this[l].call(this.value);const E={tag:this.tag,value:this.value};return this.err&&(E.err=this.err),E}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(E){return E._pushTag(this.tag),E.pushAny(this.value)}convert(E){let k=E?.[this.tag];if(k===null)return this;if(typeof k!="function"&&(k=N.TAGS[this.tag],typeof k!="function"))return this;try{return k.call(this,this.value,this)}catch(j){return j&&j.message&&j.message.length>0?this.err=j.message:this.err=j,this}}static get TAGS(){return x}static set TAGS(E){x=E}static reset(){N.TAGS={...m}}}return N.INTERNAL_JSON=l,N.reset(),cn=N,cn}var hn,Bo;function Ro(){if(Bo)return hn;Bo=1;const{MT:r,SIMPLE:s,SYMS:l}=Je();class g{constructor(o){if(typeof o!="number")throw new Error(`Invalid Simple type: ${typeof o}`);if(o<0||o>255||(o|0)!==o)throw new Error(`value must be a small positive integer: ${o}`);this.value=o}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](o,a){return`simple(${this.value})`}encodeCBOR(o){return o._pushInt(this.value,r.SIMPLE_FLOAT)}static isSimple(o){return o instanceof g}static decode(o,a=!0,p=!1){switch(o){case s.FALSE:return!1;case s.TRUE:return!0;case s.NULL:return a?null:l.NULL;case s.UNDEFINED:return a?void 0:l.UNDEFINED;case-1:if(!a||!p)throw new Error("Invalid BREAK");return l.BREAK;default:return new g(o)}}}return hn=g,hn}var pn,To;function St(){if(To)return pn;To=1;const r=Hs(),s=Io(),l=Ro(),g=ht(),w=ut(),o=Je(),{MT:a,NUMBYTES:p,SYMS:m,BI:b}=o,{Buffer:h}=De(),x=Symbol("count"),N=Symbol("major type"),L=Symbol("error"),E=Symbol("not found");function k(O,v,G){const F=[];return F[x]=G,F[m.PARENT]=O,F[N]=v,F}function j(O,v){const G=new w;return G[x]=-1,G[m.PARENT]=O,G[N]=v,G}class R extends Error{constructor(v,G){super(`Unexpected data: 0x${v.toString(16)}`),this.name="UnexpectedDataError",this.byte=v,this.value=G}}function M(O,v){switch(typeof O){case"function":return{options:{},cb:O};case"string":return{options:{encoding:O},cb:v};case"object":return{options:O||{},cb:v};default:throw new TypeError("Unknown option type")}}class P extends r{constructor(v={}){const{tags:G={},max_depth:F=-1,preferMap:z=!1,preferWeb:K=!1,required:ee=!1,encoding:Q="hex",extendedResults:C=!1,preventDuplicateKeys:U=!1,...J}=v;super({defaultEncoding:Q,...J}),this.running=!0,this.max_depth=F,this.tags=G,this.preferMap=z,this.preferWeb=K,this.extendedResults=C,this.required=ee,this.preventDuplicateKeys=U,C&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new w)}static nullcheck(v){switch(v){case m.NULL:return null;case m.UNDEFINED:return;case E:throw new Error("Value not found");default:return v}}static decodeFirstSync(v,G={}){if(v==null)throw new TypeError("input required");({options:G}=M(G));const{encoding:F="hex",...z}=G,K=new P(z),ee=g.guessEncoding(v,F),Q=K._parse();let C=Q.next();for(;!C.done;){const J=ee.read(C.value);if(J==null||J.length!==C.value)throw new Error("Insufficient data");K.extendedResults&&K.valueBytes.write(J),C=Q.next(J)}let U=null;if(K.extendedResults)U=C.value,U.unused=ee.read();else if(U=P.nullcheck(C.value),ee.length>0){const J=ee.read(1);throw ee.unshift(J),new R(J[0],U)}return U}static decodeAllSync(v,G={}){if(v==null)throw new TypeError("input required");({options:G}=M(G));const{encoding:F="hex",...z}=G,K=new P(z),ee=g.guessEncoding(v,F),Q=[];for(;ee.length>0;){const C=K._parse();let U=C.next();for(;!U.done;){const J=ee.read(U.value);if(J==null||J.length!==U.value)throw new Error("Insufficient data");K.extendedResults&&K.valueBytes.write(J),U=C.next(J)}Q.push(P.nullcheck(U.value))}return Q}static decodeFirst(v,G={},F=null){if(v==null)throw new TypeError("input required");({options:G,cb:F}=M(G,F));const{encoding:z="hex",required:K=!1,...ee}=G,Q=new P(ee);let C=E;const U=g.guessEncoding(v,z),J=new Promise((se,oe)=>{Q.on("data",ae=>{C=P.nullcheck(ae),Q.close()}),Q.once("error",ae=>Q.extendedResults&&ae instanceof R?(C.unused=Q.bs.slice(),se(C)):(C!==E&&(ae.value=C),C=L,Q.close(),oe(ae))),Q.once("end",()=>{switch(C){case E:return K?oe(new Error("No CBOR found")):se(C);case L:return;default:return se(C)}})});return typeof F=="function"&&J.then(se=>F(null,se),F),U.pipe(Q),J}static decodeAll(v,G={},F=null){if(v==null)throw new TypeError("input required");({options:G,cb:F}=M(G,F));const{encoding:z="hex",...K}=G,ee=new P(K),Q=[];ee.on("data",U=>Q.push(P.nullcheck(U)));const C=new Promise((U,J)=>{ee.on("error",J),ee.on("end",()=>U(Q))});return typeof F=="function"&&C.then(U=>F(void 0,U),U=>F(U,void 0)),g.guessEncoding(v,z).pipe(ee),C}close(){this.running=!1,this.__fresh=!0}_onRead(v){this.valueBytes.write(v)}*_parse(){let v=null,G=0,F=null;for(;;){if(this.max_depth>=0&&G>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[z]=yield 1;if(!this.running)throw this.bs.unshift(h.from([z])),new R(z);const K=z>>5,ee=z&31,Q=v?.[N],C=v?.length;switch(ee){case p.ONE:this.emit("more-bytes",K,1,Q,C),[F]=yield 1;break;case p.TWO:case p.FOUR:case p.EIGHT:{const J=1<<ee-24;this.emit("more-bytes",K,J,Q,C);const se=yield J;F=K===a.SIMPLE_FLOAT?se:g.parseCBORint(ee,se);break}case 28:case 29:case 30:throw this.running=!1,new Error(`Additional info not implemented: ${ee}`);case p.INDEFINITE:switch(K){case a.POS_INT:case a.NEG_INT:case a.TAG:throw new Error(`Invalid indefinite encoding for MT ${K}`)}F=-1;break;default:F=ee}switch(K){case a.POS_INT:break;case a.NEG_INT:F===Number.MAX_SAFE_INTEGER?F=b.NEG_MAX:F=typeof F=="bigint"?b.MINUS_ONE-F:-1-F;break;case a.BYTE_STRING:case a.UTF8_STRING:switch(F){case 0:this.emit("start-string",K,F,Q,C),K===a.UTF8_STRING?F="":F=this.preferWeb?new Uint8Array(0):h.allocUnsafe(0);break;case-1:this.emit("start",K,m.STREAM,Q,C),v=j(v,K),G++;continue;default:this.emit("start-string",K,F,Q,C),F=yield F,K===a.UTF8_STRING?F=g.utf8(F):this.preferWeb&&(F=new Uint8Array(F.buffer,F.byteOffset,F.length))}break;case a.ARRAY:case a.MAP:switch(F){case 0:K===a.MAP?F=this.preferMap?new Map:{}:F=[];break;case-1:this.emit("start",K,m.STREAM,Q,C),v=k(v,K,-1),G++;continue;default:this.emit("start",K,F,Q,C),v=k(v,K,F*(K-3)),G++;continue}break;case a.TAG:this.emit("start",K,F,Q,C),v=k(v,K,1),v.push(F),G++;continue;case a.SIMPLE_FLOAT:if(typeof F=="number"){if(ee===p.ONE&&F<32)throw new Error(`Invalid two-byte encoding of simple value ${F}`);const J=v!=null;F=l.decode(F,J,J&&v[x]<0)}else F=g.parseCBORfloat(F)}this.emit("value",F,Q,C,ee);let U=!1;for(;v!=null;){if(F===m.BREAK)v[x]=1;else if(Array.isArray(v))v.push(F);else{const se=v[N];if(se!=null&&se!==K)throw this.running=!1,new Error("Invalid major type in indefinite encoding");v.write(F)}if(--v[x]!==0){U=!0;break}if(--G,delete v[x],Array.isArray(v))switch(v[N]){case a.ARRAY:F=v;break;case a.MAP:{let se=!this.preferMap;if(v.length%2!==0)throw new Error(`Invalid map length: ${v.length}`);for(let oe=0,ae=v.length;se&&oe<ae;oe+=2)if(typeof v[oe]!="string"||v[oe]==="__proto__"){se=!1;break}if(se){F={};for(let oe=0,ae=v.length;oe<ae;oe+=2){if(this.preventDuplicateKeys&&Object.prototype.hasOwnProperty.call(F,v[oe]))throw new Error("Duplicate keys in a map");F[v[oe]]=v[oe+1]}}else{F=new Map;for(let oe=0,ae=v.length;oe<ae;oe+=2){if(this.preventDuplicateKeys&&F.has(v[oe]))throw new Error("Duplicate keys in a map");F.set(v[oe],v[oe+1])}}break}case a.TAG:{F=new s(v[0],v[1]).convert(this.tags);break}}else if(v instanceof w)switch(v[N]){case a.BYTE_STRING:F=v.slice(),this.preferWeb&&(F=new Uint8Array(F.buffer,F.byteOffset,F.length));break;case a.UTF8_STRING:F=v.toString("utf-8");break}this.emit("stop",v[N]);const J=v;v=v[m.PARENT],delete J[m.PARENT],delete J[N]}if(!U){if(this.extendedResults){const J=this.valueBytes.slice(),se={value:P.nullcheck(F),bytes:J,length:J.length};return this.valueBytes=new w,se}return F}}}}return P.NOT_FOUND=E,pn=P,pn}var dn,xo;function $s(){if(xo)return dn;xo=1;const r=at(),s=ht(),l=St(),g=ut(),{MT:w,NUMBYTES:o,SYMS:a}=Je(),{Buffer:p}=De();function m(x){return x>1?"s":""}function b(x,N){switch(typeof x){case"function":return{options:{},cb:x};case"string":return{options:{encoding:x},cb:N};case"number":return{options:{max_depth:x},cb:N};case"object":return{options:x||{},cb:N};default:throw new TypeError("Unknown option type")}}class h extends r.Transform{constructor(N={}){const{depth:L=1,max_depth:E=10,no_summary:k=!1,tags:j={},preferWeb:R,encoding:M,...P}=N;super({...P,readableObjectMode:!1,writableObjectMode:!1}),this.depth=L,this.max_depth=E,this.all=new g,j[24]||(j[24]=this._tag_24.bind(this)),this.parser=new l({tags:j,max_depth:E,preferWeb:R,encoding:M}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),k||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(N){const L=new h({depth:this.depth+1,no_summary:!0});L.on("data",E=>this.push(E)),L.on("error",E=>this.emit("error",E)),L.end(N)}_transform(N,L,E){this.parser.write(N,L,E)}_flush(N){return this.parser._flush(N)}static comment(N,L={},E=null){if(N==null)throw new Error("input required");({options:L,cb:E}=b(L,E));const k=new g,{encoding:j="hex",...R}=L,M=new h(R);let P=null;return typeof E=="function"?(M.on("end",()=>{E(null,k.toString("utf8"))}),M.on("error",E)):P=new Promise((O,v)=>{M.on("end",()=>{O(k.toString("utf8"))}),M.on("error",v)}),M.pipe(k),s.guessEncoding(N,j).pipe(M),P}_on_error(N){this.push("ERROR: "),this.push(N.toString()),this.push(`
11
+ `)}_on_read(N){this.all.write(N);const L=N.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(L);let E=(this.max_depth-this.depth)*2-L.length;E<1&&(E=1),this.push(new Array(E+1).join(" ")),this.push("-- ")}_on_more(N,L,E,k){let j="";switch(this.depth++,N){case w.POS_INT:j="Positive number,";break;case w.NEG_INT:j="Negative number,";break;case w.ARRAY:j="Array, length";break;case w.MAP:j="Map, count";break;case w.BYTE_STRING:j="Bytes, length";break;case w.UTF8_STRING:j="String, length";break;case w.SIMPLE_FLOAT:L===1?j="Simple value,":j="Float,";break}this.push(`${j} next ${L} byte${m(L)}
12
+ `)}_on_start_string(N,L,E,k){let j="";switch(this.depth++,N){case w.BYTE_STRING:j=`Bytes, length: ${L}`;break;case w.UTF8_STRING:j=`String, length: ${L.toString()}`;break}this.push(`${j}
13
+ `)}_on_start(N,L,E,k){switch(this.depth++,E){case w.ARRAY:this.push(`[${k}], `);break;case w.MAP:k%2?this.push(`{Val:${Math.floor(k/2)}}, `):this.push(`{Key:${Math.floor(k/2)}}, `);break}switch(N){case w.TAG:this.push(`Tag #${L}`),L===24&&this.push(" Encoded CBOR data item");break;case w.ARRAY:L===a.STREAM?this.push("Array (streaming)"):this.push(`Array, ${L} item${m(L)}`);break;case w.MAP:L===a.STREAM?this.push("Map (streaming)"):this.push(`Map, ${L} pair${m(L)}`);break;case w.BYTE_STRING:this.push("Bytes (streaming)");break;case w.UTF8_STRING:this.push("String (streaming)");break}this.push(`
14
+ `)}_on_stop(N){this.depth--}_on_value(N,L,E,k){if(N!==a.BREAK)switch(L){case w.ARRAY:this.push(`[${E}], `);break;case w.MAP:E%2?this.push(`{Val:${Math.floor(E/2)}}, `):this.push(`{Key:${Math.floor(E/2)}}, `);break}const j=s.cborValueToString(N,-1/0);switch(typeof N=="string"||p.isBuffer(N)?(N.length>0&&(this.push(j),this.push(`
15
15
  `)),this.depth--):(this.push(j),this.push(`
16
16
  `)),k){case o.ONE:case o.TWO:case o.FOUR:case o.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push(`
17
- `)}}return dn=h,dn}var yn,Fo;function Ys(){if(Fo)return yn;Fo=1;const r=at(),s=St(),l=ht(),w=ut(),{MT:g,SYMS:o}=Je();function a(m,b){switch(typeof m){case"function":return{options:{},cb:m};case"string":return{options:{encoding:m},cb:b};case"object":return{options:m||{},cb:b};default:throw new TypeError("Unknown option type")}}class p extends r.Transform{constructor(b={}){const{separator:h=`
18
- `,stream_errors:x=!1,tags:N,max_depth:P,preferWeb:E,encoding:k,...j}=b;super({...j,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=h,this.stream_errors=x,this.parser=new s({tags:N,max_depth:P,preferWeb:E,encoding:k}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(b,h,x){this.parser.write(b,h,x)}_flush(b){this.parser._flush(h=>this.stream_errors?(h&&this._on_error(h),b()):b(h))}static diagnose(b,h={},x=null){if(b==null)throw new TypeError("input required");({options:h,cb:x}=a(h,x));const{encoding:N="hex",...P}=h,E=new w,k=new p(P);let j=null;return typeof x=="function"?(k.on("end",()=>x(null,E.toString("utf8"))),k.on("error",x)):j=new Promise((R,L)=>{k.on("end",()=>R(E.toString("utf8"))),k.on("error",L)}),k.pipe(E),l.guessEncoding(b,N).pipe(k),j}_on_error(b){this.stream_errors?this.push(b.toString()):this.emit("error",b)}_on_more(b,h,x,N){b===g.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[h])}_fore(b,h){switch(b){case g.BYTE_STRING:case g.UTF8_STRING:case g.ARRAY:h>0&&this.push(", ");break;case g.MAP:h>0&&(h%2?this.push(": "):this.push(", "))}}_on_value(b,h,x){if(b===o.BREAK)return;this._fore(h,x);const N=this.float_bytes;this.float_bytes=-1,this.push(l.cborValueToString(b,N))}_on_start(b,h,x,N){switch(this._fore(x,N),b){case g.TAG:this.push(`${h}(`);break;case g.ARRAY:this.push("[");break;case g.MAP:this.push("{");break;case g.BYTE_STRING:case g.UTF8_STRING:this.push("(");break}h===o.STREAM&&this.push("_ ")}_on_stop(b){switch(b){case g.TAG:this.push(")");break;case g.ARRAY:this.push("]");break;case g.MAP:this.push("}");break;case g.BYTE_STRING:case g.UTF8_STRING:this.push(")");break}}_on_data(){this.push(this.separator)}}return yn=p,yn}var gn,Uo;function wn(){if(Uo)return gn;Uo=1;const r=at(),s=ut(),l=ht(),w=Je(),{MT:g,NUMBYTES:o,SHIFT32:a,SIMPLE:p,SYMS:m,TAG:b,BI:h}=w,{Buffer:x}=De(),N=g.SIMPLE_FLOAT<<5|o.TWO,P=g.SIMPLE_FLOAT<<5|o.FOUR,E=g.SIMPLE_FLOAT<<5|o.EIGHT,k=g.SIMPLE_FLOAT<<5|p.TRUE,j=g.SIMPLE_FLOAT<<5|p.FALSE,R=g.SIMPLE_FLOAT<<5|p.UNDEFINED,L=g.SIMPLE_FLOAT<<5|p.NULL,M=x.from([255]),O=x.from("f97e00","hex"),v=x.from("f9fc00","hex"),G=x.from("f97c00","hex"),F=x.from("f98000","hex"),z={};let K={};function ee(C){if(!C)return"number";switch(C.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${C}"`)}class Q extends r.Transform{constructor(U={}){const{canonical:J=!1,encodeUndefined:se,disallowUndefinedKeys:oe=!1,dateType:ae="number",collapseBigIntegers:fe=!1,detectLoops:ce=!1,omitUndefinedProperties:de=!1,genTypes:pe=[],...c}=U;if(super({...c,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=J,this.encodeUndefined=se,this.disallowUndefinedKeys=oe,this.dateType=ee(ae),this.collapseBigIntegers=this.canonical?!0:fe,this.detectLoops=void 0,typeof ce=="boolean")ce&&(this.detectLoops=new WeakSet);else if(ce instanceof WeakSet)this.detectLoops=ce;else throw new TypeError("detectLoops must be boolean or WeakSet");if(this.omitUndefinedProperties=de,this.semanticTypes={...Q.SEMANTIC_TYPES},Array.isArray(pe))for(let A=0,_=pe.length;A<_;A+=2)this.addSemanticType(pe[A],pe[A+1]);else for(const[A,_]of Object.entries(pe))this.addSemanticType(A,_)}_transform(U,J,se){const oe=this.pushAny(U);se(oe===!1?new Error("Push Error"):void 0)}_flush(U){U()}_pushUInt8(U){const J=x.allocUnsafe(1);return J.writeUInt8(U,0),this.push(J)}_pushUInt16BE(U){const J=x.allocUnsafe(2);return J.writeUInt16BE(U,0),this.push(J)}_pushUInt32BE(U){const J=x.allocUnsafe(4);return J.writeUInt32BE(U,0),this.push(J)}_pushFloatBE(U){const J=x.allocUnsafe(4);return J.writeFloatBE(U,0),this.push(J)}_pushDoubleBE(U){const J=x.allocUnsafe(8);return J.writeDoubleBE(U,0),this.push(J)}_pushNaN(){return this.push(O)}_pushInfinity(U){const J=U<0?v:G;return this.push(J)}_pushFloat(U){if(this.canonical){const J=x.allocUnsafe(2);if(l.writeHalf(J,U))return this._pushUInt8(N)&&this.push(J)}return Math.fround(U)===U?this._pushUInt8(P)&&this._pushFloatBE(U):this._pushUInt8(E)&&this._pushDoubleBE(U)}_pushInt(U,J,se){const oe=J<<5;if(U<24)return this._pushUInt8(oe|U);if(U<=255)return this._pushUInt8(oe|o.ONE)&&this._pushUInt8(U);if(U<=65535)return this._pushUInt8(oe|o.TWO)&&this._pushUInt16BE(U);if(U<=4294967295)return this._pushUInt8(oe|o.FOUR)&&this._pushUInt32BE(U);let ae=Number.MAX_SAFE_INTEGER;return J===g.NEG_INT&&ae--,U<=ae?this._pushUInt8(oe|o.EIGHT)&&this._pushUInt32BE(Math.floor(U/a))&&this._pushUInt32BE(U%a):J===g.NEG_INT?this._pushFloat(se):this._pushFloat(U)}_pushIntNum(U){return Object.is(U,-0)?this.push(F):U<0?this._pushInt(-U-1,g.NEG_INT,U):this._pushInt(U,g.POS_INT)}_pushNumber(U){return isNaN(U)?this._pushNaN():isFinite(U)?Math.round(U)===U?this._pushIntNum(U):this._pushFloat(U):this._pushInfinity(U)}_pushString(U){const J=x.byteLength(U,"utf8");return this._pushInt(J,g.UTF8_STRING)&&this.push(U,"utf8")}_pushBoolean(U){return this._pushUInt8(U?k:j)}_pushUndefined(U){switch(typeof this.encodeUndefined){case"undefined":return this._pushUInt8(R);case"function":return this.pushAny(this.encodeUndefined(U));case"object":{const J=l.bufferishToBuffer(this.encodeUndefined);if(J)return this.push(J)}}return this.pushAny(this.encodeUndefined)}_pushNull(U){return this._pushUInt8(L)}_pushTag(U){return this._pushInt(U,g.TAG)}_pushJSBigint(U){let J=g.POS_INT,se=b.POS_BIGINT;if(U<0&&(U=-U+h.MINUS_ONE,J=g.NEG_INT,se=b.NEG_BIGINT),this.collapseBigIntegers&&U<=h.MAXINT64)return U<=4294967295?this._pushInt(Number(U),J):this._pushUInt8(J<<5|o.EIGHT)&&this._pushUInt32BE(Number(U/h.SHIFT32))&&this._pushUInt32BE(Number(U%h.SHIFT32));let oe=U.toString(16);oe.length%2&&(oe=`0${oe}`);const ae=x.from(oe,"hex");return this._pushTag(se)&&Q._pushBuffer(this,ae)}_pushObject(U,J){if(!U)return this._pushNull(U);if(J={indefinite:!1,skipTypes:!1,...J},!J.indefinite&&this.detectLoops){if(this.detectLoops.has(U))throw new Error(`Loop detected while CBOR encoding.
19
- Call removeLoopDetectors before resuming.`);this.detectLoops.add(U)}if(!J.skipTypes){const fe=U.encodeCBOR;if(typeof fe=="function")return fe.call(U,this);const ce=this.semanticTypes[U.constructor.name];if(ce)return ce.call(U,this,U)}const se=Object.keys(U).filter(fe=>{const ce=typeof U[fe];return ce!=="function"&&(!this.omitUndefinedProperties||ce!=="undefined")}),oe={};if(this.canonical&&se.sort((fe,ce)=>{const de=oe[fe]||(oe[fe]=Q.encode(fe)),pe=oe[ce]||(oe[ce]=Q.encode(ce));return de.compare(pe)}),J.indefinite){if(!this._pushUInt8(g.MAP<<5|o.INDEFINITE))return!1}else if(!this._pushInt(se.length,g.MAP))return!1;let ae=null;for(let fe=0,ce=se.length;fe<ce;fe++){const de=se[fe];if(this.canonical&&(ae=oe[de])){if(!this.push(ae))return!1}else if(!this._pushString(de))return!1;if(!this.pushAny(U[de]))return!1}if(J.indefinite){if(!this.push(M))return!1}else this.detectLoops&&this.detectLoops.delete(U);return!0}_encodeAll(U){const J=new s({highWaterMark:this.readableHighWaterMark});this.pipe(J);for(const se of U)this.pushAny(se);return this.end(),J.read()}addSemanticType(U,J){const se=typeof U=="string"?U:U.name,oe=this.semanticTypes[se];if(J){if(typeof J!="function")throw new TypeError("fun must be of type function");this.semanticTypes[se]=J}else oe&&delete this.semanticTypes[se];return oe}pushAny(U){switch(typeof U){case"number":return this._pushNumber(U);case"bigint":return this._pushJSBigint(U);case"string":return this._pushString(U);case"boolean":return this._pushBoolean(U);case"undefined":return this._pushUndefined(U);case"object":return this._pushObject(U);case"symbol":switch(U){case m.NULL:return this._pushNull(null);case m.UNDEFINED:return this._pushUndefined(void 0);default:throw new TypeError(`Unknown symbol: ${U.toString()}`)}default:throw new TypeError(`Unknown type: ${typeof U}, ${typeof U.toString=="function"?U.toString():""}`)}}static pushArray(U,J,se){se={indefinite:!1,...se};const oe=J.length;if(se.indefinite){if(!U._pushUInt8(g.ARRAY<<5|o.INDEFINITE))return!1}else if(!U._pushInt(oe,g.ARRAY))return!1;for(let ae=0;ae<oe;ae++)if(!U.pushAny(J[ae]))return!1;return!(se.indefinite&&!U.push(M))}removeLoopDetectors(){return this.detectLoops?(this.detectLoops=new WeakSet,!0):!1}static _pushDate(U,J){switch(U.dateType){case"string":return U._pushTag(b.DATE_STRING)&&U._pushString(J.toISOString());case"int":return U._pushTag(b.DATE_EPOCH)&&U._pushIntNum(Math.round(J.getTime()/1e3));case"float":return U._pushTag(b.DATE_EPOCH)&&U._pushFloat(J.getTime()/1e3);default:return U._pushTag(b.DATE_EPOCH)&&U.pushAny(J.getTime()/1e3)}}static _pushBuffer(U,J){return U._pushInt(J.length,g.BYTE_STRING)&&U.push(J)}static _pushNoFilter(U,J){return Q._pushBuffer(U,J.slice())}static _pushRegexp(U,J){return U._pushTag(b.REGEXP)&&U.pushAny(J.source)}static _pushSet(U,J){if(!U._pushTag(b.SET)||!U._pushInt(J.size,g.ARRAY))return!1;for(const se of J)if(!U.pushAny(se))return!1;return!0}static _pushURL(U,J){return U._pushTag(b.URI)&&U.pushAny(J.toString())}static _pushBoxed(U,J){return U.pushAny(J.valueOf())}static _pushMap(U,J,se){se={indefinite:!1,...se};let oe=[...J.entries()];if(U.omitUndefinedProperties&&(oe=oe.filter(([ae,fe])=>fe!==void 0)),se.indefinite){if(!U._pushUInt8(g.MAP<<5|o.INDEFINITE))return!1}else if(!U._pushInt(oe.length,g.MAP))return!1;if(U.canonical){const ae=new Q({genTypes:U.semanticTypes,canonical:U.canonical,detectLoops:!!U.detectLoops,dateType:U.dateType,disallowUndefinedKeys:U.disallowUndefinedKeys,collapseBigIntegers:U.collapseBigIntegers}),fe=new s({highWaterMark:U.readableHighWaterMark});ae.pipe(fe),oe.sort(([ce],[de])=>{ae.pushAny(ce);const pe=fe.read();ae.pushAny(de);const c=fe.read();return pe.compare(c)});for(const[ce,de]of oe){if(U.disallowUndefinedKeys&&typeof ce>"u")throw new Error("Invalid Map key: undefined");if(!(U.pushAny(ce)&&U.pushAny(de)))return!1}}else for(const[ae,fe]of oe){if(U.disallowUndefinedKeys&&typeof ae>"u")throw new Error("Invalid Map key: undefined");if(!(U.pushAny(ae)&&U.pushAny(fe)))return!1}return!(se.indefinite&&!U.push(M))}static _pushTypedArray(U,J){let se=64,oe=J.BYTES_PER_ELEMENT;const{name:ae}=J.constructor;return ae.startsWith("Float")?(se|=16,oe/=2):ae.includes("U")||(se|=8),(ae.includes("Clamped")||oe!==1&&!l.isBigEndian())&&(se|=4),se|={1:0,2:1,4:2,8:3}[oe],U._pushTag(se)?Q._pushBuffer(U,x.from(J.buffer,J.byteOffset,J.byteLength)):!1}static _pushArrayBuffer(U,J){return Q._pushBuffer(U,x.from(J))}static encodeIndefinite(U,J,se={}){if(J==null){if(this==null)throw new Error("No object to encode");J=this}const{chunkSize:oe=4096}=se;let ae=!0;const fe=typeof J;let ce=null;if(fe==="string"){ae=ae&&U._pushUInt8(g.UTF8_STRING<<5|o.INDEFINITE);let de=0;for(;de<J.length;){const pe=de+oe;ae=ae&&U._pushString(J.slice(de,pe)),de=pe}ae=ae&&U.push(M)}else if(ce=l.bufferishToBuffer(J)){ae=ae&&U._pushUInt8(g.BYTE_STRING<<5|o.INDEFINITE);let de=0;for(;de<ce.length;){const pe=de+oe;ae=ae&&Q._pushBuffer(U,ce.slice(de,pe)),de=pe}ae=ae&&U.push(M)}else if(Array.isArray(J))ae=ae&&Q.pushArray(U,J,{indefinite:!0});else if(J instanceof Map)ae=ae&&Q._pushMap(U,J,{indefinite:!0});else{if(fe!=="object")throw new Error("Invalid indefinite encoding");ae=ae&&U._pushObject(J,{indefinite:!0,skipTypes:!0})}return ae}static encode(...U){return new Q()._encodeAll(U)}static encodeCanonical(...U){return new Q({canonical:!0})._encodeAll(U)}static encodeOne(U,J){return new Q(J)._encodeAll([U])}static encodeAsync(U,J){return new Promise((se,oe)=>{const ae=[],fe=new Q(J);fe.on("data",ce=>ae.push(ce)),fe.on("error",oe),fe.on("finish",()=>se(x.concat(ae))),fe.pushAny(U),fe.end()})}static get SEMANTIC_TYPES(){return K}static set SEMANTIC_TYPES(U){K=U}static reset(){Q.SEMANTIC_TYPES={...z}}}return Object.assign(z,{Array:Q.pushArray,Date:Q._pushDate,Buffer:Q._pushBuffer,[x.name]:Q._pushBuffer,Map:Q._pushMap,NoFilter:Q._pushNoFilter,[s.name]:Q._pushNoFilter,RegExp:Q._pushRegexp,Set:Q._pushSet,ArrayBuffer:Q._pushArrayBuffer,Uint8ClampedArray:Q._pushTypedArray,Uint8Array:Q._pushTypedArray,Uint16Array:Q._pushTypedArray,Uint32Array:Q._pushTypedArray,Int8Array:Q._pushTypedArray,Int16Array:Q._pushTypedArray,Int32Array:Q._pushTypedArray,Float32Array:Q._pushTypedArray,Float64Array:Q._pushTypedArray,URL:Q._pushURL,Boolean:Q._pushBoxed,Number:Q._pushBoxed,String:Q._pushBoxed}),typeof BigUint64Array<"u"&&(z[BigUint64Array.name]=Q._pushTypedArray),typeof BigInt64Array<"u"&&(z[BigInt64Array.name]=Q._pushTypedArray),Q.reset(),gn=Q,gn}var mn,Oo;function Vs(){if(Oo)return mn;Oo=1;const{Buffer:r}=De(),s=wn(),l=St(),{MT:w}=Je();class g extends Map{constructor(a){super(a)}static _encode(a){return s.encodeCanonical(a).toString("base64")}static _decode(a){return l.decodeFirstSync(a,"base64")}get(a){return super.get(g._encode(a))}set(a,p){return super.set(g._encode(a),p)}delete(a){return super.delete(g._encode(a))}has(a){return super.has(g._encode(a))}*keys(){for(const a of super.keys())yield g._decode(a)}*entries(){for(const a of super.entries())yield[g._decode(a[0]),a[1]]}[Symbol.iterator](){return this.entries()}forEach(a,p=this){if(typeof a!="function")throw new TypeError("Must be function");for(const m of super.entries())a.call(p,m[1],g._decode(m[0]),this)}encodeCBOR(a){if(!a._pushInt(this.size,w.MAP))return!1;if(a.canonical){const p=Array.from(super.entries()).map(m=>[r.from(m[0],"base64"),m[1]]);p.sort((m,b)=>m[0].compare(b[0]));for(const m of p)if(!(a.push(m[0])&&a.pushAny(m[1])))return!1}else for(const p of super.entries())if(!(a.push(r.from(p[0],"base64"))&&a.pushAny(p[1])))return!1;return!0}}return mn=g,mn}var bn,No;function Js(){if(No)return bn;No=1;class r{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(l){const w=this.map.get(l);if(w)return w.length>1?w[0]||this.recording?w[1]:(w[0]=!0,r.FIRST):this.recording?(w.push(this.count++),w[1]):r.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(l,[!1]),r.NEVER}}return r.NEVER=-1,r.FIRST=-2,bn=r,bn}var En,Mo;function zs(){if(Mo)return En;Mo=1;const r=wn(),s=Js(),{Buffer:l}=De();class w extends r{constructor(o){super(o),this.valueSharing=new s}_pushObject(o,a){if(o!==null){const p=this.valueSharing.check(o);switch(p){case s.FIRST:this._pushTag(28);break;case s.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(p)}}return super._pushObject(o,a)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...o){const a=new w;a.on("data",()=>{});for(const p of o)a.pushAny(p);return a.stopRecording(),a.removeAllListeners("data"),a._encodeAll(o)}static encodeCanonical(...o){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(o,a){const p=new w(a);return p.on("data",()=>{}),p.pushAny(o),p.stopRecording(),p.removeAllListeners("data"),p._encodeAll([o])}static encodeAsync(o,a){return new Promise((p,m)=>{const b=[],h=new w(a);h.on("data",()=>{}),h.on("error",m),h.on("finish",()=>p(l.concat(b))),h.pushAny(o),h.stopRecording(),h.removeAllListeners("data"),h.on("data",x=>b.push(x)),h.pushAny(o),h.end()})}}return En=w,En}var _n,Po;function Ks(){if(Po)return _n;Po=1;const r=$s(),s=Ys(),l=St(),w=wn(),g=Ro(),o=Io(),a=Vs(),p=zs();return _n={Commented:r,Diagnose:s,Decoder:l,Encoder:w,Simple:g,Tagged:o,Map:a,SharedValueEncoder:p,comment:r.comment,decodeAll:l.decodeAll,decodeFirst:l.decodeFirst,decodeAllSync:l.decodeAllSync,decodeFirstSync:l.decodeFirstSync,diagnose:s.diagnose,encode:w.encode,encodeCanonical:w.encodeCanonical,encodeOne:w.encodeOne,encodeAsync:w.encodeAsync,decode:l.decodeFirstSync,leveldb:{decode:l.decodeFirstSync,encode:w.encode,buffer:!0,name:"cbor"},reset(){w.reset(),o.reset()}},_n}var Xs=Ks();const Lo=Rn(Xs),It=Object.prototype.hasOwnProperty,vn=typeof Number.isSafeInteger=="function"?Number.isSafeInteger:function(r){return typeof r=="number"&&isFinite(r)&&r===Math.floor(r)&&Math.abs(r)<=9007199254740991};class et{constructor(){this.jsonrpc="2.0"}serialize(){return JSON.stringify(this)}}et.VERSION="2.0";class Bt extends et{constructor(s,l,w){super(),this.id=s,this.method=l,w!==void 0&&(this.params=w)}}class Rt extends et{constructor(s,l){super(),this.method=s,l!==void 0&&(this.params=l)}}class pt extends et{constructor(s,l){super(),this.id=s,this.result=l}}class dt extends et{constructor(s,l){super(),this.id=s,this.error=l,this.id=s,this.error=l}}class yt{constructor(s,l){this.payload=s,this.type=l,this.payload=s,this.type=l}}class ge{constructor(s,l,w){this.message=s,this.code=vn(l)?l:0,w!=null&&(this.data=w)}}ge.invalidRequest=function(r){return new ge("Invalid request",-32600,r)},ge.methodNotFound=function(r){return new ge("Method not found",-32601,r)},ge.invalidParams=function(r){return new ge("Invalid params",-32602,r)},ge.internalError=function(r){return new ge("Internal error",-32603,r)},ge.parseError=function(r){return new ge("Parse error",-32700,r)};function Zs(r,s,l){const w=new Bt(r,s,l);return ze(w,!0),w}function Qs(r,s){const l=new Rt(r,s);return ze(l,!0),l}function ea(r,s){const l=new pt(r,s);return ze(l,!0),l}function ta(r,s){const l=new dt(r,s);return ze(l,!0),l}function Co(r){if(!Tt(r))return new yt(ge.invalidRequest(r),"invalid");let s;try{s=JSON.parse(r)}catch{return new yt(ge.parseError(r),"invalid")}return Do(s)}function Do(r){if(!Array.isArray(r))return An(r);if(r.length===0)return new yt(ge.invalidRequest(r),"invalid");const s=[];for(let l=0,w=r.length;l<w;l++)s[l]=An(r[l]);return s}const ra=Co;function An(r){let s=null,l=null,w="invalid";if(r==null||r.jsonrpc!==et.VERSION)s=ge.invalidRequest(r),w="invalid";else if(It.call(r,"id")){if(It.call(r,"method")){const g=r;l=new Bt(g.id,g.method,g.params),s=ze(l),w="request"}else if(It.call(r,"result")){const g=r;l=new pt(g.id,g.result),s=ze(l),w="success"}else if(It.call(r,"error")){const g=r;if(w="error",g.error==null)s=ge.internalError(g);else{const o=new ge(g.error.message,g.error.code,g.error.data);o.message!==g.error.message||o.code!==g.error.code?s=ge.internalError(g):(l=new dt(g.id,o),s=ze(l))}}}else{const g=r;l=new Rt(g.method,g.params),s=ze(l),w="notification"}return s==null&&l!=null?new yt(l,w):new yt(s??ge.invalidRequest(r),"invalid")}function ze(r,s){let l=null;if(r instanceof Bt?(l=Sn(r.id),l==null&&(l=ko(r.method)),l==null&&(l=qo(r.params))):r instanceof Rt?(l=ko(r.method),l==null&&(l=qo(r.params))):r instanceof pt?(l=Sn(r.id),l==null&&(l=na(r.result))):r instanceof dt&&(l=Sn(r.id,!0),l==null&&(l=ia(r.error))),s&&l!=null)throw l;return l}function Sn(r,s){return s&&r===null||Tt(r)||vn(r)?null:ge.internalError('"id" must be provided, a string or an integer.')}function ko(r){return Tt(r)?null:ge.invalidRequest(r)}function na(r){return r===void 0?ge.internalError("Result must exist for success Response objects"):null}function qo(r){if(r===void 0)return null;if(Array.isArray(r)||oa(r))try{return JSON.stringify(r),null}catch{return ge.parseError(r)}return ge.invalidParams(r)}function ia(r){return r instanceof ge?vn(r.code)?Tt(r.message)?null:ge.internalError("Message must exist or must be a string."):ge.internalError("Invalid error code. It must be an integer."):ge.internalError("Error must be an instance of JsonRpcError")}function Tt(r){return r!==""&&typeof r=="string"}function oa(r){return r!=null&&typeof r=="object"&&!Array.isArray(r)}const gt={JsonRpc:et,JsonRpcError:ge,request:Zs,notification:Qs,success:ea,error:ta,parse:Co,parseObject:An,parseJsonRpcObject:Do,parseJsonRpcString:ra};class sa{constructor(s){this.type=s}encode(s){let l;if(this.type==="cbor")try{l=Lo.encode(s)}catch{throw new Error("failed to encode CBOR format")}else if(this.type==="json")try{l=JSON.stringify(s)}catch{throw new Error("failed to encode JSON format")}else throw new Error("invalid format");return l}decode(s){let l;if(this.type==="cbor"&&typeof s=="object"&&s instanceof Ot)try{l=Lo.decode(s)}catch{throw new Error("failed to decode CBOR format")}else if(this.type==="json"&&typeof s=="string")try{l=JSON.parse(s)}catch{throw new Error("failed to decode JSON format")}else throw new Error("invalid format or wrong data type");return l}}class aa{constructor(s,l={}){this.mqtt=s,this.registry=new Map,this.requests=new Map,this.subscriptions=new Map,this.options={clientId:new xn(1).format("std"),codec:"cbor",timeout:10*1e3,topicEventNoticeMake:(w,g)=>g?`${w}/event-notice/${g}`:`${w}/event-notice`,topicServiceRequestMake:(w,g)=>g?`${w}/service-request/${g}`:`${w}/service-request`,topicServiceResponseMake:(w,g)=>g?`${w}/service-response/${g}`:`${w}/service-response`,topicEventNoticeMatch:w=>{const g=w.match(/^(.+?)\/event-notice(?:\/(.+))?$/);return g?{name:g[1],clientId:g[2]}:null},topicServiceRequestMatch:w=>{const g=w.match(/^(.+?)\/service-request(?:\/(.+))?$/);return g?{name:g[1],clientId:g[2]}:null},topicServiceResponseMatch:w=>{const g=w.match(/^(.+?)\/service-response\/(.+)$/);return g?{name:g[1],clientId:g[2]}:null},...l},this.codec=new sa(this.options.codec),this.mqtt.on("message",(w,g)=>{this._onMessage(w,g)})}async _subscribeTopic(s,l={}){return new Promise((w,g)=>{this.mqtt.subscribe(s,{qos:2,...l},(o,a)=>{o?g(o):w()})})}async _unsubscribeTopic(s){return new Promise((l,w)=>{this.mqtt.unsubscribe(s,(g,o)=>{g?w(g):l()})})}async subscribe(s,...l){let w={},g=l[0];if(l.length===2&&typeof l[0]=="object"&&(w=l[0],g=l[1]),this.registry.has(s))throw new Error(`subscribe: event "${s}" already subscribed`);const o=this.options.topicEventNoticeMake(s),a=this.options.topicEventNoticeMake(s,this.options.clientId);await Promise.all([this._subscribeTopic(o,{qos:0,...w}),this._subscribeTopic(a,{qos:0,...w})]).catch(b=>{throw this._unsubscribeTopic(o).catch(()=>{}),this._unsubscribeTopic(a).catch(()=>{}),b}),this.registry.set(s,g);const p=this;return{async unsubscribe(){if(!p.registry.has(s))throw new Error(`unsubscribe: event "${s}" not subscribed`);return p.registry.delete(s),Promise.all([p._unsubscribeTopic(o),p._unsubscribeTopic(a)]).then(()=>{})}}}async register(s,...l){let w={},g=l[0];if(l.length===2&&typeof l[0]=="object"&&(w=l[0],g=l[1]),this.registry.has(s))throw new Error(`register: service "${s}" already registered`);const o=this.options.topicServiceRequestMake(s),a=this.options.topicServiceRequestMake(s,this.options.clientId);await Promise.all([this._subscribeTopic(o,{qos:2,...w}),this._subscribeTopic(a,{qos:2,...w})]).catch(b=>{throw this._unsubscribeTopic(o).catch(()=>{}),this._unsubscribeTopic(a).catch(()=>{}),b}),this.registry.set(s,g);const p=this;return{async unregister(){if(!p.registry.has(s))throw new Error(`unregister: service "${s}" not registered`);return p.registry.delete(s),Promise.all([p._unsubscribeTopic(o),p._unsubscribeTopic(a)]).then(()=>{})}}}_isIClientPublishOptions(s){if(typeof s!="object")return!1;const l=["qos","retain","dup","properties","cbStorePut"];return Object.keys(s).every(w=>l.includes(w))}clientId(s){return{__clientId:s}}_getClientId(s){return s.__clientId}_isClientId(s){return typeof s=="object"&&s!==null&&"__clientId"in s&&typeof s.__clientId=="string"}_parseCallArgs(s){let l,w={},g=s;return s.length>=2&&this._isClientId(s[0])&&this._isIClientPublishOptions(s[1])?(l=this._getClientId(s[0]),w=s[1],g=s.slice(2)):s.length>=1&&this._isClientId(s[0])?(l=this._getClientId(s[0]),g=s.slice(1)):s.length>=1&&this._isIClientPublishOptions(s[0])&&(w=s[0],g=s.slice(1)),{clientId:l,options:w,params:g}}emit(s,...l){const{clientId:w,options:g,params:o}=this._parseCallArgs(l),a=this.options.topicEventNoticeMake(s,w),p=gt.notification(s,o),m=this.codec.encode(p);this.mqtt.publish(a,m,{qos:2,...g})}call(s,...l){const{clientId:w,options:g,params:o}=this._parseCallArgs(l),a=`${this.options.clientId}:${new xn(1).format("std")}`;this._responseSubscribe(s,{qos:g.qos??2});const p=new Promise((x,N)=>{let P=setTimeout(()=>{this.requests.delete(a),this._responseUnsubscribe(s),P=null,N(new Error("communication timeout"))},this.options.timeout);this.requests.set(a,{service:s,callback:(E,k)=>{P!==null&&(clearTimeout(P),P=null),E?N(E):x(k)}})}),m=gt.request(a,s,o),b=this.options.topicServiceRequestMake(s,w),h=this.codec.encode(m);return this.mqtt.publish(b,h,{qos:2,...g},x=>{const N=this.requests.get(a);x&&N!==void 0&&(this.requests.delete(a),this._responseUnsubscribe(s),N.callback(x,void 0))}),p}_responseSubscribe(s,l={qos:2}){const w=this.options.topicServiceResponseMake(s,this.options.clientId);this.subscriptions.has(w)||(this.subscriptions.set(w,0),this.mqtt.subscribe(w,l,g=>{g&&this.mqtt.emit("error",g)})),this.subscriptions.set(w,this.subscriptions.get(w)+1)}_responseUnsubscribe(s){const l=this.options.topicServiceResponseMake(s,this.options.clientId);this.subscriptions.has(l)&&(this.subscriptions.set(l,this.subscriptions.get(l)-1),this.subscriptions.get(l)===0&&(this.subscriptions.delete(l),this.mqtt.unsubscribe(l,w=>{w&&this.mqtt.emit("error",w)})))}_onMessage(s,l){let w=null,g=null,o=null;if((w=this.options.topicEventNoticeMatch(s))===null&&(g=this.options.topicServiceRequestMatch(s))===null&&(o=this.options.topicServiceResponseMatch(s))===null)return;const a=w?.clientId??g?.clientId??o?.clientId;if(a!==void 0&&a!==this.options.clientId)return;let p;try{let h=l;this.options.codec==="json"&&(h=l.toString());const x=this.codec.decode(h);p=gt.parseObject(x)}catch(h){const x=h instanceof ge?new Error(`failed to parse JSON-RPC message: ${h.message}`):new Error("failed to parse JSON-RPC message");this.mqtt.emit("error",x);return}const m=h=>typeof h=="string"?h:String(h),b=h=>h===void 0?[]:typeof h=="object"&&Array.isArray(h)?Array.from(h):[];if(p.type==="notification"&&p.payload instanceof Rt){const h=p.payload.method,x=this.registry.get(h),N=b(p.payload.params);x?.(...N)}else if(p.type==="request"&&p.payload instanceof Bt){const h=m(p.payload.id),x=p.payload.method,N=this.registry.get(x);let P;if(N!==void 0){const E=b(p.payload.params);P=Promise.resolve().then(()=>N(...E))}else P=Promise.reject(ge.methodNotFound({method:x,id:h}));P.then(E=>gt.success(h,E),E=>{let k;switch(typeof E){case"undefined":k=new ge("undefined error",0);break;case"string":k=new ge(E,-1);break;case"number":k=new ge("application error",E);break;case"bigint":k=new ge("application error",Number(E));break;case"object":E===null?k=new ge("undefined error",0):E instanceof ge?k=E:E instanceof Error?k=new ge(E.toString(),-100,E):k=new ge("application error",-100,E);break;default:k=new ge("unspecified error",0,{data:E});break}return gt.error(h,k)}).then(E=>{const k=h.match(/^(.+):.+$/);if(k===null)throw new Error("invalid request id format");const j=k[1],R=this.codec.encode(E),L=this.options.topicServiceResponseMake(x,j);this.mqtt.publish(L,R,{qos:2})}).catch(E=>{this.mqtt.emit("error",E)})}else if(p.type==="success"&&p.payload instanceof pt||p.type==="error"&&p.payload instanceof dt){const h=m(p.payload.id),x=this.requests.get(h);x!==void 0&&(p.type==="success"&&p.payload instanceof pt?x.callback(void 0,p.payload.result):p.type==="error"&&p.payload instanceof dt&&x.callback(p.payload.error,void 0),this.requests.delete(h),this._responseUnsubscribe(x.service))}}}return aa}));
17
+ `)}}return dn=h,dn}var yn,Fo;function Ys(){if(Fo)return yn;Fo=1;const r=at(),s=St(),l=ht(),g=ut(),{MT:w,SYMS:o}=Je();function a(m,b){switch(typeof m){case"function":return{options:{},cb:m};case"string":return{options:{encoding:m},cb:b};case"object":return{options:m||{},cb:b};default:throw new TypeError("Unknown option type")}}class p extends r.Transform{constructor(b={}){const{separator:h=`
18
+ `,stream_errors:x=!1,tags:N,max_depth:L,preferWeb:E,encoding:k,...j}=b;super({...j,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=h,this.stream_errors=x,this.parser=new s({tags:N,max_depth:L,preferWeb:E,encoding:k}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(b,h,x){this.parser.write(b,h,x)}_flush(b){this.parser._flush(h=>this.stream_errors?(h&&this._on_error(h),b()):b(h))}static diagnose(b,h={},x=null){if(b==null)throw new TypeError("input required");({options:h,cb:x}=a(h,x));const{encoding:N="hex",...L}=h,E=new g,k=new p(L);let j=null;return typeof x=="function"?(k.on("end",()=>x(null,E.toString("utf8"))),k.on("error",x)):j=new Promise((R,M)=>{k.on("end",()=>R(E.toString("utf8"))),k.on("error",M)}),k.pipe(E),l.guessEncoding(b,N).pipe(k),j}_on_error(b){this.stream_errors?this.push(b.toString()):this.emit("error",b)}_on_more(b,h,x,N){b===w.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[h])}_fore(b,h){switch(b){case w.BYTE_STRING:case w.UTF8_STRING:case w.ARRAY:h>0&&this.push(", ");break;case w.MAP:h>0&&(h%2?this.push(": "):this.push(", "))}}_on_value(b,h,x){if(b===o.BREAK)return;this._fore(h,x);const N=this.float_bytes;this.float_bytes=-1,this.push(l.cborValueToString(b,N))}_on_start(b,h,x,N){switch(this._fore(x,N),b){case w.TAG:this.push(`${h}(`);break;case w.ARRAY:this.push("[");break;case w.MAP:this.push("{");break;case w.BYTE_STRING:case w.UTF8_STRING:this.push("(");break}h===o.STREAM&&this.push("_ ")}_on_stop(b){switch(b){case w.TAG:this.push(")");break;case w.ARRAY:this.push("]");break;case w.MAP:this.push("}");break;case w.BYTE_STRING:case w.UTF8_STRING:this.push(")");break}}_on_data(){this.push(this.separator)}}return yn=p,yn}var gn,Uo;function wn(){if(Uo)return gn;Uo=1;const r=at(),s=ut(),l=ht(),g=Je(),{MT:w,NUMBYTES:o,SHIFT32:a,SIMPLE:p,SYMS:m,TAG:b,BI:h}=g,{Buffer:x}=De(),N=w.SIMPLE_FLOAT<<5|o.TWO,L=w.SIMPLE_FLOAT<<5|o.FOUR,E=w.SIMPLE_FLOAT<<5|o.EIGHT,k=w.SIMPLE_FLOAT<<5|p.TRUE,j=w.SIMPLE_FLOAT<<5|p.FALSE,R=w.SIMPLE_FLOAT<<5|p.UNDEFINED,M=w.SIMPLE_FLOAT<<5|p.NULL,P=x.from([255]),O=x.from("f97e00","hex"),v=x.from("f9fc00","hex"),G=x.from("f97c00","hex"),F=x.from("f98000","hex"),z={};let K={};function ee(C){if(!C)return"number";switch(C.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${C}"`)}class Q extends r.Transform{constructor(U={}){const{canonical:J=!1,encodeUndefined:se,disallowUndefinedKeys:oe=!1,dateType:ae="number",collapseBigIntegers:fe=!1,detectLoops:ce=!1,omitUndefinedProperties:de=!1,genTypes:pe=[],...c}=U;if(super({...c,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=J,this.encodeUndefined=se,this.disallowUndefinedKeys=oe,this.dateType=ee(ae),this.collapseBigIntegers=this.canonical?!0:fe,this.detectLoops=void 0,typeof ce=="boolean")ce&&(this.detectLoops=new WeakSet);else if(ce instanceof WeakSet)this.detectLoops=ce;else throw new TypeError("detectLoops must be boolean or WeakSet");if(this.omitUndefinedProperties=de,this.semanticTypes={...Q.SEMANTIC_TYPES},Array.isArray(pe))for(let A=0,_=pe.length;A<_;A+=2)this.addSemanticType(pe[A],pe[A+1]);else for(const[A,_]of Object.entries(pe))this.addSemanticType(A,_)}_transform(U,J,se){const oe=this.pushAny(U);se(oe===!1?new Error("Push Error"):void 0)}_flush(U){U()}_pushUInt8(U){const J=x.allocUnsafe(1);return J.writeUInt8(U,0),this.push(J)}_pushUInt16BE(U){const J=x.allocUnsafe(2);return J.writeUInt16BE(U,0),this.push(J)}_pushUInt32BE(U){const J=x.allocUnsafe(4);return J.writeUInt32BE(U,0),this.push(J)}_pushFloatBE(U){const J=x.allocUnsafe(4);return J.writeFloatBE(U,0),this.push(J)}_pushDoubleBE(U){const J=x.allocUnsafe(8);return J.writeDoubleBE(U,0),this.push(J)}_pushNaN(){return this.push(O)}_pushInfinity(U){const J=U<0?v:G;return this.push(J)}_pushFloat(U){if(this.canonical){const J=x.allocUnsafe(2);if(l.writeHalf(J,U))return this._pushUInt8(N)&&this.push(J)}return Math.fround(U)===U?this._pushUInt8(L)&&this._pushFloatBE(U):this._pushUInt8(E)&&this._pushDoubleBE(U)}_pushInt(U,J,se){const oe=J<<5;if(U<24)return this._pushUInt8(oe|U);if(U<=255)return this._pushUInt8(oe|o.ONE)&&this._pushUInt8(U);if(U<=65535)return this._pushUInt8(oe|o.TWO)&&this._pushUInt16BE(U);if(U<=4294967295)return this._pushUInt8(oe|o.FOUR)&&this._pushUInt32BE(U);let ae=Number.MAX_SAFE_INTEGER;return J===w.NEG_INT&&ae--,U<=ae?this._pushUInt8(oe|o.EIGHT)&&this._pushUInt32BE(Math.floor(U/a))&&this._pushUInt32BE(U%a):J===w.NEG_INT?this._pushFloat(se):this._pushFloat(U)}_pushIntNum(U){return Object.is(U,-0)?this.push(F):U<0?this._pushInt(-U-1,w.NEG_INT,U):this._pushInt(U,w.POS_INT)}_pushNumber(U){return isNaN(U)?this._pushNaN():isFinite(U)?Math.round(U)===U?this._pushIntNum(U):this._pushFloat(U):this._pushInfinity(U)}_pushString(U){const J=x.byteLength(U,"utf8");return this._pushInt(J,w.UTF8_STRING)&&this.push(U,"utf8")}_pushBoolean(U){return this._pushUInt8(U?k:j)}_pushUndefined(U){switch(typeof this.encodeUndefined){case"undefined":return this._pushUInt8(R);case"function":return this.pushAny(this.encodeUndefined(U));case"object":{const J=l.bufferishToBuffer(this.encodeUndefined);if(J)return this.push(J)}}return this.pushAny(this.encodeUndefined)}_pushNull(U){return this._pushUInt8(M)}_pushTag(U){return this._pushInt(U,w.TAG)}_pushJSBigint(U){let J=w.POS_INT,se=b.POS_BIGINT;if(U<0&&(U=-U+h.MINUS_ONE,J=w.NEG_INT,se=b.NEG_BIGINT),this.collapseBigIntegers&&U<=h.MAXINT64)return U<=4294967295?this._pushInt(Number(U),J):this._pushUInt8(J<<5|o.EIGHT)&&this._pushUInt32BE(Number(U/h.SHIFT32))&&this._pushUInt32BE(Number(U%h.SHIFT32));let oe=U.toString(16);oe.length%2&&(oe=`0${oe}`);const ae=x.from(oe,"hex");return this._pushTag(se)&&Q._pushBuffer(this,ae)}_pushObject(U,J){if(!U)return this._pushNull(U);if(J={indefinite:!1,skipTypes:!1,...J},!J.indefinite&&this.detectLoops){if(this.detectLoops.has(U))throw new Error(`Loop detected while CBOR encoding.
19
+ Call removeLoopDetectors before resuming.`);this.detectLoops.add(U)}if(!J.skipTypes){const fe=U.encodeCBOR;if(typeof fe=="function")return fe.call(U,this);const ce=this.semanticTypes[U.constructor.name];if(ce)return ce.call(U,this,U)}const se=Object.keys(U).filter(fe=>{const ce=typeof U[fe];return ce!=="function"&&(!this.omitUndefinedProperties||ce!=="undefined")}),oe={};if(this.canonical&&se.sort((fe,ce)=>{const de=oe[fe]||(oe[fe]=Q.encode(fe)),pe=oe[ce]||(oe[ce]=Q.encode(ce));return de.compare(pe)}),J.indefinite){if(!this._pushUInt8(w.MAP<<5|o.INDEFINITE))return!1}else if(!this._pushInt(se.length,w.MAP))return!1;let ae=null;for(let fe=0,ce=se.length;fe<ce;fe++){const de=se[fe];if(this.canonical&&(ae=oe[de])){if(!this.push(ae))return!1}else if(!this._pushString(de))return!1;if(!this.pushAny(U[de]))return!1}if(J.indefinite){if(!this.push(P))return!1}else this.detectLoops&&this.detectLoops.delete(U);return!0}_encodeAll(U){const J=new s({highWaterMark:this.readableHighWaterMark});this.pipe(J);for(const se of U)this.pushAny(se);return this.end(),J.read()}addSemanticType(U,J){const se=typeof U=="string"?U:U.name,oe=this.semanticTypes[se];if(J){if(typeof J!="function")throw new TypeError("fun must be of type function");this.semanticTypes[se]=J}else oe&&delete this.semanticTypes[se];return oe}pushAny(U){switch(typeof U){case"number":return this._pushNumber(U);case"bigint":return this._pushJSBigint(U);case"string":return this._pushString(U);case"boolean":return this._pushBoolean(U);case"undefined":return this._pushUndefined(U);case"object":return this._pushObject(U);case"symbol":switch(U){case m.NULL:return this._pushNull(null);case m.UNDEFINED:return this._pushUndefined(void 0);default:throw new TypeError(`Unknown symbol: ${U.toString()}`)}default:throw new TypeError(`Unknown type: ${typeof U}, ${typeof U.toString=="function"?U.toString():""}`)}}static pushArray(U,J,se){se={indefinite:!1,...se};const oe=J.length;if(se.indefinite){if(!U._pushUInt8(w.ARRAY<<5|o.INDEFINITE))return!1}else if(!U._pushInt(oe,w.ARRAY))return!1;for(let ae=0;ae<oe;ae++)if(!U.pushAny(J[ae]))return!1;return!(se.indefinite&&!U.push(P))}removeLoopDetectors(){return this.detectLoops?(this.detectLoops=new WeakSet,!0):!1}static _pushDate(U,J){switch(U.dateType){case"string":return U._pushTag(b.DATE_STRING)&&U._pushString(J.toISOString());case"int":return U._pushTag(b.DATE_EPOCH)&&U._pushIntNum(Math.round(J.getTime()/1e3));case"float":return U._pushTag(b.DATE_EPOCH)&&U._pushFloat(J.getTime()/1e3);default:return U._pushTag(b.DATE_EPOCH)&&U.pushAny(J.getTime()/1e3)}}static _pushBuffer(U,J){return U._pushInt(J.length,w.BYTE_STRING)&&U.push(J)}static _pushNoFilter(U,J){return Q._pushBuffer(U,J.slice())}static _pushRegexp(U,J){return U._pushTag(b.REGEXP)&&U.pushAny(J.source)}static _pushSet(U,J){if(!U._pushTag(b.SET)||!U._pushInt(J.size,w.ARRAY))return!1;for(const se of J)if(!U.pushAny(se))return!1;return!0}static _pushURL(U,J){return U._pushTag(b.URI)&&U.pushAny(J.toString())}static _pushBoxed(U,J){return U.pushAny(J.valueOf())}static _pushMap(U,J,se){se={indefinite:!1,...se};let oe=[...J.entries()];if(U.omitUndefinedProperties&&(oe=oe.filter(([ae,fe])=>fe!==void 0)),se.indefinite){if(!U._pushUInt8(w.MAP<<5|o.INDEFINITE))return!1}else if(!U._pushInt(oe.length,w.MAP))return!1;if(U.canonical){const ae=new Q({genTypes:U.semanticTypes,canonical:U.canonical,detectLoops:!!U.detectLoops,dateType:U.dateType,disallowUndefinedKeys:U.disallowUndefinedKeys,collapseBigIntegers:U.collapseBigIntegers}),fe=new s({highWaterMark:U.readableHighWaterMark});ae.pipe(fe),oe.sort(([ce],[de])=>{ae.pushAny(ce);const pe=fe.read();ae.pushAny(de);const c=fe.read();return pe.compare(c)});for(const[ce,de]of oe){if(U.disallowUndefinedKeys&&typeof ce>"u")throw new Error("Invalid Map key: undefined");if(!(U.pushAny(ce)&&U.pushAny(de)))return!1}}else for(const[ae,fe]of oe){if(U.disallowUndefinedKeys&&typeof ae>"u")throw new Error("Invalid Map key: undefined");if(!(U.pushAny(ae)&&U.pushAny(fe)))return!1}return!(se.indefinite&&!U.push(P))}static _pushTypedArray(U,J){let se=64,oe=J.BYTES_PER_ELEMENT;const{name:ae}=J.constructor;return ae.startsWith("Float")?(se|=16,oe/=2):ae.includes("U")||(se|=8),(ae.includes("Clamped")||oe!==1&&!l.isBigEndian())&&(se|=4),se|={1:0,2:1,4:2,8:3}[oe],U._pushTag(se)?Q._pushBuffer(U,x.from(J.buffer,J.byteOffset,J.byteLength)):!1}static _pushArrayBuffer(U,J){return Q._pushBuffer(U,x.from(J))}static encodeIndefinite(U,J,se={}){if(J==null){if(this==null)throw new Error("No object to encode");J=this}const{chunkSize:oe=4096}=se;let ae=!0;const fe=typeof J;let ce=null;if(fe==="string"){ae=ae&&U._pushUInt8(w.UTF8_STRING<<5|o.INDEFINITE);let de=0;for(;de<J.length;){const pe=de+oe;ae=ae&&U._pushString(J.slice(de,pe)),de=pe}ae=ae&&U.push(P)}else if(ce=l.bufferishToBuffer(J)){ae=ae&&U._pushUInt8(w.BYTE_STRING<<5|o.INDEFINITE);let de=0;for(;de<ce.length;){const pe=de+oe;ae=ae&&Q._pushBuffer(U,ce.slice(de,pe)),de=pe}ae=ae&&U.push(P)}else if(Array.isArray(J))ae=ae&&Q.pushArray(U,J,{indefinite:!0});else if(J instanceof Map)ae=ae&&Q._pushMap(U,J,{indefinite:!0});else{if(fe!=="object")throw new Error("Invalid indefinite encoding");ae=ae&&U._pushObject(J,{indefinite:!0,skipTypes:!0})}return ae}static encode(...U){return new Q()._encodeAll(U)}static encodeCanonical(...U){return new Q({canonical:!0})._encodeAll(U)}static encodeOne(U,J){return new Q(J)._encodeAll([U])}static encodeAsync(U,J){return new Promise((se,oe)=>{const ae=[],fe=new Q(J);fe.on("data",ce=>ae.push(ce)),fe.on("error",oe),fe.on("finish",()=>se(x.concat(ae))),fe.pushAny(U),fe.end()})}static get SEMANTIC_TYPES(){return K}static set SEMANTIC_TYPES(U){K=U}static reset(){Q.SEMANTIC_TYPES={...z}}}return Object.assign(z,{Array:Q.pushArray,Date:Q._pushDate,Buffer:Q._pushBuffer,[x.name]:Q._pushBuffer,Map:Q._pushMap,NoFilter:Q._pushNoFilter,[s.name]:Q._pushNoFilter,RegExp:Q._pushRegexp,Set:Q._pushSet,ArrayBuffer:Q._pushArrayBuffer,Uint8ClampedArray:Q._pushTypedArray,Uint8Array:Q._pushTypedArray,Uint16Array:Q._pushTypedArray,Uint32Array:Q._pushTypedArray,Int8Array:Q._pushTypedArray,Int16Array:Q._pushTypedArray,Int32Array:Q._pushTypedArray,Float32Array:Q._pushTypedArray,Float64Array:Q._pushTypedArray,URL:Q._pushURL,Boolean:Q._pushBoxed,Number:Q._pushBoxed,String:Q._pushBoxed}),typeof BigUint64Array<"u"&&(z[BigUint64Array.name]=Q._pushTypedArray),typeof BigInt64Array<"u"&&(z[BigInt64Array.name]=Q._pushTypedArray),Q.reset(),gn=Q,gn}var mn,Oo;function Vs(){if(Oo)return mn;Oo=1;const{Buffer:r}=De(),s=wn(),l=St(),{MT:g}=Je();class w extends Map{constructor(a){super(a)}static _encode(a){return s.encodeCanonical(a).toString("base64")}static _decode(a){return l.decodeFirstSync(a,"base64")}get(a){return super.get(w._encode(a))}set(a,p){return super.set(w._encode(a),p)}delete(a){return super.delete(w._encode(a))}has(a){return super.has(w._encode(a))}*keys(){for(const a of super.keys())yield w._decode(a)}*entries(){for(const a of super.entries())yield[w._decode(a[0]),a[1]]}[Symbol.iterator](){return this.entries()}forEach(a,p=this){if(typeof a!="function")throw new TypeError("Must be function");for(const m of super.entries())a.call(p,m[1],w._decode(m[0]),this)}encodeCBOR(a){if(!a._pushInt(this.size,g.MAP))return!1;if(a.canonical){const p=Array.from(super.entries()).map(m=>[r.from(m[0],"base64"),m[1]]);p.sort((m,b)=>m[0].compare(b[0]));for(const m of p)if(!(a.push(m[0])&&a.pushAny(m[1])))return!1}else for(const p of super.entries())if(!(a.push(r.from(p[0],"base64"))&&a.pushAny(p[1])))return!1;return!0}}return mn=w,mn}var bn,No;function Js(){if(No)return bn;No=1;class r{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(l){const g=this.map.get(l);if(g)return g.length>1?g[0]||this.recording?g[1]:(g[0]=!0,r.FIRST):this.recording?(g.push(this.count++),g[1]):r.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(l,[!1]),r.NEVER}}return r.NEVER=-1,r.FIRST=-2,bn=r,bn}var En,Mo;function zs(){if(Mo)return En;Mo=1;const r=wn(),s=Js(),{Buffer:l}=De();class g extends r{constructor(o){super(o),this.valueSharing=new s}_pushObject(o,a){if(o!==null){const p=this.valueSharing.check(o);switch(p){case s.FIRST:this._pushTag(28);break;case s.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(p)}}return super._pushObject(o,a)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...o){const a=new g;a.on("data",()=>{});for(const p of o)a.pushAny(p);return a.stopRecording(),a.removeAllListeners("data"),a._encodeAll(o)}static encodeCanonical(...o){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(o,a){const p=new g(a);return p.on("data",()=>{}),p.pushAny(o),p.stopRecording(),p.removeAllListeners("data"),p._encodeAll([o])}static encodeAsync(o,a){return new Promise((p,m)=>{const b=[],h=new g(a);h.on("data",()=>{}),h.on("error",m),h.on("finish",()=>p(l.concat(b))),h.pushAny(o),h.stopRecording(),h.removeAllListeners("data"),h.on("data",x=>b.push(x)),h.pushAny(o),h.end()})}}return En=g,En}var _n,Po;function Ks(){if(Po)return _n;Po=1;const r=$s(),s=Ys(),l=St(),g=wn(),w=Ro(),o=Io(),a=Vs(),p=zs();return _n={Commented:r,Diagnose:s,Decoder:l,Encoder:g,Simple:w,Tagged:o,Map:a,SharedValueEncoder:p,comment:r.comment,decodeAll:l.decodeAll,decodeFirst:l.decodeFirst,decodeAllSync:l.decodeAllSync,decodeFirstSync:l.decodeFirstSync,diagnose:s.diagnose,encode:g.encode,encodeCanonical:g.encodeCanonical,encodeOne:g.encodeOne,encodeAsync:g.encodeAsync,decode:l.decodeFirstSync,leveldb:{decode:l.decodeFirstSync,encode:g.encode,buffer:!0,name:"cbor"},reset(){g.reset(),o.reset()}},_n}var Xs=Ks();const Lo=Rn(Xs),It=Object.prototype.hasOwnProperty,vn=typeof Number.isSafeInteger=="function"?Number.isSafeInteger:function(r){return typeof r=="number"&&isFinite(r)&&r===Math.floor(r)&&Math.abs(r)<=9007199254740991};class et{constructor(){this.jsonrpc="2.0"}serialize(){return JSON.stringify(this)}}et.VERSION="2.0";class Bt extends et{constructor(s,l,g){super(),this.id=s,this.method=l,g!==void 0&&(this.params=g)}}class Rt extends et{constructor(s,l){super(),this.method=s,l!==void 0&&(this.params=l)}}class pt extends et{constructor(s,l){super(),this.id=s,this.result=l}}class dt extends et{constructor(s,l){super(),this.id=s,this.error=l,this.id=s,this.error=l}}class yt{constructor(s,l){this.payload=s,this.type=l,this.payload=s,this.type=l}}class ge{constructor(s,l,g){this.message=s,this.code=vn(l)?l:0,g!=null&&(this.data=g)}}ge.invalidRequest=function(r){return new ge("Invalid request",-32600,r)},ge.methodNotFound=function(r){return new ge("Method not found",-32601,r)},ge.invalidParams=function(r){return new ge("Invalid params",-32602,r)},ge.internalError=function(r){return new ge("Internal error",-32603,r)},ge.parseError=function(r){return new ge("Parse error",-32700,r)};function Zs(r,s,l){const g=new Bt(r,s,l);return ze(g,!0),g}function Qs(r,s){const l=new Rt(r,s);return ze(l,!0),l}function ea(r,s){const l=new pt(r,s);return ze(l,!0),l}function ta(r,s){const l=new dt(r,s);return ze(l,!0),l}function Co(r){if(!Tt(r))return new yt(ge.invalidRequest(r),"invalid");let s;try{s=JSON.parse(r)}catch{return new yt(ge.parseError(r),"invalid")}return Do(s)}function Do(r){if(!Array.isArray(r))return An(r);if(r.length===0)return new yt(ge.invalidRequest(r),"invalid");const s=[];for(let l=0,g=r.length;l<g;l++)s[l]=An(r[l]);return s}const ra=Co;function An(r){let s=null,l=null,g="invalid";if(r==null||r.jsonrpc!==et.VERSION)s=ge.invalidRequest(r),g="invalid";else if(It.call(r,"id")){if(It.call(r,"method")){const w=r;l=new Bt(w.id,w.method,w.params),s=ze(l),g="request"}else if(It.call(r,"result")){const w=r;l=new pt(w.id,w.result),s=ze(l),g="success"}else if(It.call(r,"error")){const w=r;if(g="error",w.error==null)s=ge.internalError(w);else{const o=new ge(w.error.message,w.error.code,w.error.data);o.message!==w.error.message||o.code!==w.error.code?s=ge.internalError(w):(l=new dt(w.id,o),s=ze(l))}}}else{const w=r;l=new Rt(w.method,w.params),s=ze(l),g="notification"}return s==null&&l!=null?new yt(l,g):new yt(s??ge.invalidRequest(r),"invalid")}function ze(r,s){let l=null;if(r instanceof Bt?(l=Sn(r.id),l==null&&(l=ko(r.method)),l==null&&(l=qo(r.params))):r instanceof Rt?(l=ko(r.method),l==null&&(l=qo(r.params))):r instanceof pt?(l=Sn(r.id),l==null&&(l=na(r.result))):r instanceof dt&&(l=Sn(r.id,!0),l==null&&(l=ia(r.error))),s&&l!=null)throw l;return l}function Sn(r,s){return s&&r===null||Tt(r)||vn(r)?null:ge.internalError('"id" must be provided, a string or an integer.')}function ko(r){return Tt(r)?null:ge.invalidRequest(r)}function na(r){return r===void 0?ge.internalError("Result must exist for success Response objects"):null}function qo(r){if(r===void 0)return null;if(Array.isArray(r)||oa(r))try{return JSON.stringify(r),null}catch{return ge.parseError(r)}return ge.invalidParams(r)}function ia(r){return r instanceof ge?vn(r.code)?Tt(r.message)?null:ge.internalError("Message must exist or must be a string."):ge.internalError("Invalid error code. It must be an integer."):ge.internalError("Error must be an instance of JsonRpcError")}function Tt(r){return r!==""&&typeof r=="string"}function oa(r){return r!=null&&typeof r=="object"&&!Array.isArray(r)}const gt={JsonRpc:et,JsonRpcError:ge,request:Zs,notification:Qs,success:ea,error:ta,parse:Co,parseObject:An,parseJsonRpcObject:Do,parseJsonRpcString:ra};class sa{constructor(s){this.type=s}encode(s){let l;if(this.type==="cbor")try{l=Lo.encode(s)}catch(g){throw new Error("failed to encode CBOR format",{cause:g})}else if(this.type==="json")try{l=JSON.stringify(s)}catch(g){throw new Error("failed to encode JSON format",{cause:g})}else throw new Error("invalid format");return l}decode(s){let l;if(this.type==="cbor"&&typeof s=="object"&&s instanceof Ot)try{l=Lo.decode(s)}catch(g){throw new Error("failed to decode CBOR format",{cause:g})}else if(this.type==="json"&&typeof s=="string")try{l=JSON.parse(s)}catch(g){throw new Error("failed to decode JSON format",{cause:g})}else throw new Error("invalid format or wrong data type");return l}}class aa{constructor(s,l={}){this.mqtt=s,this.registry=new Map,this.requests=new Map,this.subscriptions=new Map,this.options={clientId:new xn(1).format("std"),codec:"cbor",timeout:10*1e3,topicEventNoticeMake:(g,w)=>w?`${g}/event-notice/${w}`:`${g}/event-notice`,topicServiceRequestMake:(g,w)=>w?`${g}/service-request/${w}`:`${g}/service-request`,topicServiceResponseMake:(g,w)=>w?`${g}/service-response/${w}`:`${g}/service-response`,topicEventNoticeMatch:g=>{const w=g.match(/^(.+?)\/event-notice(?:\/(.+))?$/);return w?{name:w[1],clientId:w[2]}:null},topicServiceRequestMatch:g=>{const w=g.match(/^(.+?)\/service-request(?:\/(.+))?$/);return w?{name:w[1],clientId:w[2]}:null},topicServiceResponseMatch:g=>{const w=g.match(/^(.+?)\/service-response\/(.+)$/);return w?{name:w[1],clientId:w[2]}:null},...l},this.codec=new sa(this.options.codec),this.mqtt.on("message",(g,w)=>{this._onMessage(g,w)})}async _subscribeTopic(s,l={}){return new Promise((g,w)=>{this.mqtt.subscribe(s,{qos:2,...l},(o,a)=>{o?w(o):g()})})}async _unsubscribeTopic(s){return new Promise((l,g)=>{this.mqtt.unsubscribe(s,(w,o)=>{w?g(w):l()})})}async subscribe(s,...l){let g={},w=l[0];if(l.length===2&&typeof l[0]=="object"&&(g=l[0],w=l[1]),this.registry.has(s))throw new Error(`subscribe: event "${s}" already subscribed`);const o=this.options.topicEventNoticeMake(s),a=this.options.topicEventNoticeMake(s,this.options.clientId);await Promise.all([this._subscribeTopic(o,{qos:0,...g}),this._subscribeTopic(a,{qos:0,...g})]).catch(b=>{throw this._unsubscribeTopic(o).catch(()=>{}),this._unsubscribeTopic(a).catch(()=>{}),b}),this.registry.set(s,w);const p=this;return{async unsubscribe(){if(!p.registry.has(s))throw new Error(`unsubscribe: event "${s}" not subscribed`);return p.registry.delete(s),Promise.all([p._unsubscribeTopic(o),p._unsubscribeTopic(a)]).then(()=>{})}}}async register(s,...l){let g={},w=l[0];if(l.length===2&&typeof l[0]=="object"&&(g=l[0],w=l[1]),this.registry.has(s))throw new Error(`register: service "${s}" already registered`);const o=this.options.topicServiceRequestMake(s),a=this.options.topicServiceRequestMake(s,this.options.clientId);await Promise.all([this._subscribeTopic(o,{qos:2,...g}),this._subscribeTopic(a,{qos:2,...g})]).catch(b=>{throw this._unsubscribeTopic(o).catch(()=>{}),this._unsubscribeTopic(a).catch(()=>{}),b}),this.registry.set(s,w);const p=this;return{async unregister(){if(!p.registry.has(s))throw new Error(`unregister: service "${s}" not registered`);return p.registry.delete(s),Promise.all([p._unsubscribeTopic(o),p._unsubscribeTopic(a)]).then(()=>{})}}}_isIClientPublishOptions(s){if(typeof s!="object")return!1;const l=["qos","retain","dup","properties","cbStorePut"];return Object.keys(s).every(g=>l.includes(g))}clientId(s){return{__clientId:s}}_getClientId(s){return s.__clientId}_isClientId(s){return typeof s=="object"&&s!==null&&"__clientId"in s&&typeof s.__clientId=="string"}_parseCallArgs(s){let l,g={},w=s;return s.length>=2&&this._isClientId(s[0])&&this._isIClientPublishOptions(s[1])?(l=this._getClientId(s[0]),g=s[1],w=s.slice(2)):s.length>=1&&this._isClientId(s[0])?(l=this._getClientId(s[0]),w=s.slice(1)):s.length>=1&&this._isIClientPublishOptions(s[0])&&(g=s[0],w=s.slice(1)),{clientId:l,options:g,params:w}}emit(s,...l){const{clientId:g,options:w,params:o}=this._parseCallArgs(l),a=this.options.topicEventNoticeMake(s,g),p=gt.notification(s,o),m=this.codec.encode(p);this.mqtt.publish(a,m,{qos:2,...w})}call(s,...l){const{clientId:g,options:w,params:o}=this._parseCallArgs(l),a=`${this.options.clientId}:${new xn(1).format("std")}`;this._responseSubscribe(s,{qos:w.qos??2});const p=new Promise((x,N)=>{let L=setTimeout(()=>{this.requests.delete(a),this._responseUnsubscribe(s),L=null,N(new Error("communication timeout"))},this.options.timeout);this.requests.set(a,{service:s,callback:(E,k)=>{L!==null&&(clearTimeout(L),L=null),E?N(E):x(k)}})}),m=gt.request(a,s,o),b=this.options.topicServiceRequestMake(s,g),h=this.codec.encode(m);return this.mqtt.publish(b,h,{qos:2,...w},x=>{const N=this.requests.get(a);x&&N!==void 0&&(this.requests.delete(a),this._responseUnsubscribe(s),N.callback(x,void 0))}),p}_responseSubscribe(s,l={qos:2}){const g=this.options.topicServiceResponseMake(s,this.options.clientId);this.subscriptions.has(g)||(this.subscriptions.set(g,0),this.mqtt.subscribe(g,l,w=>{w&&this.mqtt.emit("error",w)})),this.subscriptions.set(g,this.subscriptions.get(g)+1)}_responseUnsubscribe(s){const l=this.options.topicServiceResponseMake(s,this.options.clientId);this.subscriptions.has(l)&&(this.subscriptions.set(l,this.subscriptions.get(l)-1),this.subscriptions.get(l)===0&&(this.subscriptions.delete(l),this.mqtt.unsubscribe(l,g=>{g&&this.mqtt.emit("error",g)})))}_onMessage(s,l){let g=null,w=null,o=null;if((g=this.options.topicEventNoticeMatch(s))===null&&(w=this.options.topicServiceRequestMatch(s))===null&&(o=this.options.topicServiceResponseMatch(s))===null)return;const a=g?.clientId??w?.clientId??o?.clientId;if(a!==void 0&&a!==this.options.clientId)return;let p;try{let h=l;this.options.codec==="json"&&(h=l.toString());const x=this.codec.decode(h);p=gt.parseObject(x)}catch(h){const x=h instanceof ge?new Error(`failed to parse JSON-RPC message: ${h.message}`):new Error("failed to parse JSON-RPC message");this.mqtt.emit("error",x);return}const m=h=>typeof h=="string"?h:String(h),b=h=>h===void 0?[]:typeof h=="object"&&Array.isArray(h)?Array.from(h):[];if(p.type==="notification"&&p.payload instanceof Rt){const h=p.payload.method,x=this.registry.get(h),N=b(p.payload.params);x?.(...N)}else if(p.type==="request"&&p.payload instanceof Bt){const h=m(p.payload.id),x=p.payload.method,N=this.registry.get(x);let L;if(N!==void 0){const E=b(p.payload.params);L=Promise.resolve().then(()=>N(...E))}else L=Promise.reject(ge.methodNotFound({method:x,id:h}));L.then(E=>gt.success(h,E),E=>{let k;switch(typeof E){case"undefined":k=new ge("undefined error",0);break;case"string":k=new ge(E,-1);break;case"number":k=new ge("application error",E);break;case"bigint":k=new ge("application error",Number(E));break;case"object":E===null?k=new ge("undefined error",0):E instanceof ge?k=E:E instanceof Error?k=new ge(E.toString(),-100,E):k=new ge("application error",-100,E);break;default:k=new ge("unspecified error",0,{data:E});break}return gt.error(h,k)}).then(E=>{const k=h.match(/^(.+):.+$/);if(k===null)throw new Error("invalid request id format");const j=k[1],R=this.codec.encode(E),M=this.options.topicServiceResponseMake(x,j);this.mqtt.publish(M,R,{qos:2})}).catch(E=>{this.mqtt.emit("error",E)})}else if(p.type==="success"&&p.payload instanceof pt||p.type==="error"&&p.payload instanceof dt){const h=m(p.payload.id),x=this.requests.get(h);x!==void 0&&(p.type==="success"&&p.payload instanceof pt?x.callback(void 0,p.payload.result):p.type==="error"&&p.payload instanceof dt&&x.callback(p.payload.error,void 0),this.requests.delete(h),this._responseUnsubscribe(x.service))}}}return aa}));