mqtt
Version:
A library for the MQTT protocol
2 lines • 369 kB
JavaScript
"use strict";var mqtt=(()=>{var as=Object.defineProperty;var Yb=Object.getOwnPropertyDescriptor;var Jb=Object.getOwnPropertyNames;var Xb=Object.prototype.hasOwnProperty;var ze=(t,e)=>()=>(t&&(e=t(t=0)),e);var j=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kr=(t,e)=>{for(var r in e)as(t,r,{get:e[r],enumerable:!0})},Zb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jb(e))!Xb.call(t,i)&&i!==r&&as(t,i,{get:()=>e[i],enumerable:!(n=Yb(e,i))||n.enumerable});return t};var me=t=>Zb(as({},"__esModule",{value:!0}),t);var A=ze(()=>{});var N={};Kr(N,{_debugEnd:()=>Kc,_debugProcess:()=>zc,_events:()=>ff,_eventsCount:()=>hf,_exiting:()=>Pc,_fatalExceptions:()=>$c,_getActiveHandles:()=>Cc,_getActiveRequests:()=>kc,_kill:()=>Mc,_linkedBinding:()=>xc,_maxListeners:()=>cf,_preload_modules:()=>af,_rawDebug:()=>Ac,_startProfilerIdleNotifier:()=>Qc,_stopProfilerIdleNotifier:()=>Yc,_tickCallback:()=>Gc,abort:()=>ef,addListener:()=>df,allowedNodeEnvironmentFlags:()=>jc,arch:()=>cc,argv:()=>dc,argv0:()=>sf,assert:()=>Fc,binding:()=>wc,browser:()=>Ec,chdir:()=>vc,config:()=>Oc,cpuUsage:()=>Ri,cwd:()=>_c,debugPort:()=>of,default:()=>Sf,dlopen:()=>Rc,domain:()=>Tc,emit:()=>wf,emitWarning:()=>bc,env:()=>hc,execArgv:()=>pc,execPath:()=>nf,exit:()=>Uc,features:()=>Wc,hasUncaughtExceptionCaptureCallback:()=>Vc,hrtime:()=>Oi,kill:()=>Lc,listeners:()=>vf,memoryUsage:()=>qc,moduleLoadList:()=>Ic,nextTick:()=>ac,off:()=>yf,on:()=>Nt,once:()=>pf,openStdin:()=>Dc,pid:()=>tf,platform:()=>fc,ppid:()=>rf,prependListener:()=>mf,prependOnceListener:()=>_f,reallyExit:()=>Bc,release:()=>Sc,removeAllListeners:()=>bf,removeListener:()=>gf,resourceUsage:()=>Nc,setSourceMapsEnabled:()=>uf,setUncaughtExceptionCaptureCallback:()=>Hc,stderr:()=>Xc,stdin:()=>Zc,stdout:()=>Jc,title:()=>lc,umask:()=>mc,uptime:()=>lf,version:()=>yc,versions:()=>gc});function cs(t){throw new Error("Node.js process "+t+" is not supported by JSPM core outside of Node.js")}function ew(){!Qr||!wr||(Qr=!1,wr.length?Mt=wr.concat(Mt):Pi=-1,Mt.length&&sc())}function sc(){if(!Qr){var t=setTimeout(ew,0);Qr=!0;for(var e=Mt.length;e;){for(wr=Mt,Mt=[];++Pi<e;)wr&&wr[Pi].run();Pi=-1,e=Mt.length}wr=null,Qr=!1,clearTimeout(t)}}function ac(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Mt.push(new uc(t,e)),Mt.length===1&&!Qr&&setTimeout(sc,0)}function uc(t,e){this.fun=t,this.array=e}function Ue(){}function xc(t){cs("_linkedBinding")}function Rc(t){cs("dlopen")}function kc(){return[]}function Cc(){return[]}function Fc(t,e){if(!t)throw new Error(e||"assertion error")}function Vc(){return!1}function lf(){return Jt.now()/1e3}function Oi(t){var e=Math.floor((Date.now()-Jt.now())*.001),r=Jt.now()*.001,n=Math.floor(r)+e,i=Math.floor(r%1*1e9);return t&&(n=n-t[0],i=i-t[1],i<0&&(n--,i+=ls)),[n,i]}function Nt(){return Sf}function vf(t){return[]}var Mt,Qr,wr,Pi,lc,cc,fc,hc,dc,pc,yc,gc,bc,wc,mc,_c,vc,Sc,Ec,Ac,Ic,Tc,Pc,Oc,Bc,Mc,Ri,Nc,qc,Lc,Uc,Dc,jc,Wc,$c,Hc,Gc,zc,Kc,Qc,Yc,Jc,Xc,Zc,ef,tf,rf,nf,of,sf,af,uf,Jt,us,ls,cf,ff,hf,df,pf,yf,gf,bf,wf,mf,_f,Sf,Ef=ze(()=>{A();x();I();Mt=[],Qr=!1,Pi=-1;uc.prototype.run=function(){this.fun.apply(null,this.array)};lc="browser",cc="x64",fc="browser",hc={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},dc=["/usr/bin/node"],pc=[],yc="v16.8.0",gc={},bc=function(t,e){console.warn((e?e+": ":"")+t)},wc=function(t){cs("binding")},mc=function(t){return 0},_c=function(){return"/"},vc=function(t){},Sc={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Ec=!0,Ac=Ue,Ic=[];Tc={},Pc=!1,Oc={};Bc=Ue,Mc=Ue,Ri=function(){return{}},Nc=Ri,qc=Ri,Lc=Ue,Uc=Ue,Dc=Ue,jc={};Wc={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},$c=Ue,Hc=Ue;Gc=Ue,zc=Ue,Kc=Ue,Qc=Ue,Yc=Ue,Jc=void 0,Xc=void 0,Zc=void 0,ef=Ue,tf=2,rf=1,nf="/bin/usr/node",of=9229,sf="node",af=[],uf=Ue,Jt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Jt.now===void 0&&(us=Date.now(),Jt.timing&&Jt.timing.navigationStart&&(us=Jt.timing.navigationStart),Jt.now=()=>Date.now()-us);ls=1e9;Oi.bigint=function(t){var e=Oi(t);return typeof BigInt>"u"?e[0]*ls+e[1]:BigInt(e[0]*ls)+BigInt(e[1])};cf=10,ff={},hf=0;df=Nt,pf=Nt,yf=Nt,gf=Nt,bf=Nt,wf=Ue,mf=Nt,_f=Nt;Sf={version:yc,versions:gc,arch:cc,platform:fc,browser:Ec,release:Sc,_rawDebug:Ac,moduleLoadList:Ic,binding:wc,_linkedBinding:xc,_events:ff,_eventsCount:hf,_maxListeners:cf,on:Nt,addListener:df,once:pf,off:yf,removeListener:gf,removeAllListeners:bf,emit:wf,prependListener:mf,prependOnceListener:_f,listeners:vf,domain:Tc,_exiting:Pc,config:Oc,dlopen:Rc,uptime:lf,_getActiveRequests:kc,_getActiveHandles:Cc,reallyExit:Bc,_kill:Mc,cpuUsage:Ri,resourceUsage:Nc,memoryUsage:qc,kill:Lc,exit:Uc,openStdin:Dc,allowedNodeEnvironmentFlags:jc,assert:Fc,features:Wc,_fatalExceptions:$c,setUncaughtExceptionCaptureCallback:Hc,hasUncaughtExceptionCaptureCallback:Vc,emitWarning:bc,nextTick:ac,_tickCallback:Gc,_debugProcess:zc,_debugEnd:Kc,_startProfilerIdleNotifier:Qc,_stopProfilerIdleNotifier:Yc,stdout:Jc,stdin:Zc,stderr:Xc,abort:ef,umask:mc,chdir:vc,cwd:_c,env:hc,title:lc,argv:dc,execArgv:pc,pid:tf,ppid:rf,execPath:nf,debugPort:of,hrtime:Oi,argv0:sf,_preload_modules:af,setSourceMapsEnabled:uf}});var I=ze(()=>{Ef()});function tw(){if(Af)return On;Af=!0,On.byteLength=a,On.toByteArray=f,On.fromByteArray=m;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)t[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function o(g){var P=g.length;if(P%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=g.indexOf("=");S===-1&&(S=P);var b=S===P?0:4-S%4;return[S,b]}function a(g){var P=o(g),S=P[0],b=P[1];return(S+b)*3/4-b}function c(g,P,S){return(P+S)*3/4-S}function f(g){var P,S=o(g),b=S[0],w=S[1],_=new r(c(g,b,w)),R=0,T=w>0?b-4:b,y;for(y=0;y<T;y+=4)P=e[g.charCodeAt(y)]<<18|e[g.charCodeAt(y+1)]<<12|e[g.charCodeAt(y+2)]<<6|e[g.charCodeAt(y+3)],_[R++]=P>>16&255,_[R++]=P>>8&255,_[R++]=P&255;return w===2&&(P=e[g.charCodeAt(y)]<<2|e[g.charCodeAt(y+1)]>>4,_[R++]=P&255),w===1&&(P=e[g.charCodeAt(y)]<<10|e[g.charCodeAt(y+1)]<<4|e[g.charCodeAt(y+2)]>>2,_[R++]=P>>8&255,_[R++]=P&255),_}function h(g){return t[g>>18&63]+t[g>>12&63]+t[g>>6&63]+t[g&63]}function d(g,P,S){for(var b,w=[],_=P;_<S;_+=3)b=(g[_]<<16&16711680)+(g[_+1]<<8&65280)+(g[_+2]&255),w.push(h(b));return w.join("")}function m(g){for(var P,S=g.length,b=S%3,w=[],_=16383,R=0,T=S-b;R<T;R+=_)w.push(d(g,R,R+_>T?T:R+_));return b===1?(P=g[S-1],w.push(t[P>>2]+t[P<<4&63]+"==")):b===2&&(P=(g[S-2]<<8)+g[S-1],w.push(t[P>>10]+t[P>>4&63]+t[P<<2&63]+"=")),w.join("")}return On}function rw(){if(If)return ki;If=!0;return ki.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,f=c>>1,h=-7,d=r?i-1:0,m=r?-1:1,g=t[e+d];for(d+=m,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+t[e+d],d+=m,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+t[e+d],d+=m,h-=8);if(s===0)s=1-f;else{if(s===c)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-f}return(g?-1:1)*o*Math.pow(2,s-n)},ki.write=function(t,e,r,n,i,s){var o,a,c,f=s*8-i-1,h=(1<<f)-1,d=h>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,P=n?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?e+=m/c:e+=m*Math.pow(2,1-d),e*c>=2&&(o++,c/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(e*c-1)*Math.pow(2,i),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;t[r+g]=a&255,g+=P,a/=256,i-=8);for(o=o<<i|a,f+=i;f>0;t[r+g]=o&255,g+=P,o/=256,f-=8);t[r+g-P]|=S*128},ki}function Tf(){if(xf)return mr;xf=!0;let t=tw(),e=rw(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mr.Buffer=o,mr.SlowBuffer=w,mr.INSPECT_MAX_BYTES=50;let n=2147483647;mr.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.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 i(){try{let p=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(p){if(p>n)throw new RangeError('The value "'+p+'" is invalid for option "size"');let u=new Uint8Array(p);return Object.setPrototypeOf(u,o.prototype),u}function o(p,u,l){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(p)}return a(p,u,l)}o.poolSize=8192;function a(p,u,l){if(typeof p=="string")return d(p,u);if(ArrayBuffer.isView(p))return g(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Ze(p,ArrayBuffer)||p&&Ze(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ze(p,SharedArrayBuffer)||p&&Ze(p.buffer,SharedArrayBuffer)))return P(p,u,l);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let E=p.valueOf&&p.valueOf();if(E!=null&&E!==p)return o.from(E,u,l);let C=S(p);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return o.from(p[Symbol.toPrimitive]("string"),u,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}o.from=function(p,u,l){return a(p,u,l)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function c(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function f(p,u,l){return c(p),p<=0?s(p):u!==void 0?typeof l=="string"?s(p).fill(u,l):s(p).fill(u):s(p)}o.alloc=function(p,u,l){return f(p,u,l)};function h(p){return c(p),s(p<0?0:b(p)|0)}o.allocUnsafe=function(p){return h(p)},o.allocUnsafeSlow=function(p){return h(p)};function d(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);let l=_(p,u)|0,E=s(l),C=E.write(p,u);return C!==l&&(E=E.slice(0,C)),E}function m(p){let u=p.length<0?0:b(p.length)|0,l=s(u);for(let E=0;E<u;E+=1)l[E]=p[E]&255;return l}function g(p){if(Ze(p,Uint8Array)){let u=new Uint8Array(p);return P(u.buffer,u.byteOffset,u.byteLength)}return m(p)}function P(p,u,l){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(l||0))throw new RangeError('"length" is outside of buffer bounds');let E;return u===void 0&&l===void 0?E=new Uint8Array(p):l===void 0?E=new Uint8Array(p,u):E=new Uint8Array(p,u,l),Object.setPrototypeOf(E,o.prototype),E}function S(p){if(o.isBuffer(p)){let u=b(p.length)|0,l=s(u);return l.length===0||p.copy(l,0,0,u),l}if(p.length!==void 0)return typeof p.length!="number"||Tn(p.length)?s(0):m(p);if(p.type==="Buffer"&&Array.isArray(p.data))return m(p.data)}function b(p){if(p>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return p|0}function w(p){return+p!=p&&(p=0),o.alloc(+p)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,l){if(Ze(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Ze(l,Uint8Array)&&(l=o.from(l,l.offset,l.byteLength)),!o.isBuffer(u)||!o.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===l)return 0;let E=u.length,C=l.length;for(let q=0,$=Math.min(E,C);q<$;++q)if(u[q]!==l[q]){E=u[q],C=l[q];break}return E<C?-1:C<E?1:0},o.isEncoding=function(u){switch(String(u).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}},o.concat=function(u,l){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);let E;if(l===void 0)for(l=0,E=0;E<u.length;++E)l+=u[E].length;let C=o.allocUnsafe(l),q=0;for(E=0;E<u.length;++E){let $=u[E];if(Ze($,Uint8Array))q+$.length>C.length?(o.isBuffer($)||($=o.from($)),$.copy(C,q)):Uint8Array.prototype.set.call(C,$,q);else if(o.isBuffer($))$.copy(C,q);else throw new TypeError('"list" argument must be an Array of Buffers');q+=$.length}return C};function _(p,u){if(o.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ze(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let l=p.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&l===0)return 0;let C=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Ct(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return Ii(p).length;default:if(C)return E?-1:Ct(p).length;u=(""+u).toLowerCase(),C=!0}}o.byteLength=_;function R(p,u,l){let E=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,u>>>=0,l<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return V(this,u,l);case"utf8":case"utf-8":return H(this,u,l);case"ascii":return ee(this,u,l);case"latin1":case"binary":return G(this,u,l);case"base64":return W(this,u,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,u,l);default:if(E)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function T(p,u,l){let E=p[u];p[u]=p[l],p[l]=E}o.prototype.swap16=function(){let u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<u;l+=2)T(this,l,l+1);return this},o.prototype.swap32=function(){let u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<u;l+=4)T(this,l,l+3),T(this,l+1,l+2);return this},o.prototype.swap64=function(){let u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<u;l+=8)T(this,l,l+7),T(this,l+1,l+6),T(this,l+2,l+5),T(this,l+3,l+4);return this},o.prototype.toString=function(){let u=this.length;return u===0?"":arguments.length===0?H(this,0,u):R.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){let u="",l=mr.INSPECT_MAX_BYTES;return u=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(u+=" ... "),"<Buffer "+u+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(u,l,E,C,q){if(Ze(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(l===void 0&&(l=0),E===void 0&&(E=u?u.length:0),C===void 0&&(C=0),q===void 0&&(q=this.length),l<0||E>u.length||C<0||q>this.length)throw new RangeError("out of range index");if(C>=q&&l>=E)return 0;if(C>=q)return-1;if(l>=E)return 1;if(l>>>=0,E>>>=0,C>>>=0,q>>>=0,this===u)return 0;let $=q-C,k=E-l,B=Math.min($,k),re=this.slice(C,q),ie=u.slice(l,E);for(let oe=0;oe<B;++oe)if(re[oe]!==ie[oe]){$=re[oe],k=ie[oe];break}return $<k?-1:k<$?1:0};function y(p,u,l,E,C){if(p.length===0)return-1;if(typeof l=="string"?(E=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Tn(l)&&(l=C?0:p.length-1),l<0&&(l=p.length+l),l>=p.length){if(C)return-1;l=p.length-1}else if(l<0)if(C)l=0;else return-1;if(typeof u=="string"&&(u=o.from(u,E)),o.isBuffer(u))return u.length===0?-1:O(p,u,l,E,C);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?C?Uint8Array.prototype.indexOf.call(p,u,l):Uint8Array.prototype.lastIndexOf.call(p,u,l):O(p,[u],l,E,C);throw new TypeError("val must be string, number or Buffer")}function O(p,u,l,E,C){let q=1,$=p.length,k=u.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(p.length<2||u.length<2)return-1;q=2,$/=2,k/=2,l/=2}function B(ie,oe){return q===1?ie[oe]:ie.readUInt16BE(oe*q)}let re;if(C){let ie=-1;for(re=l;re<$;re++)if(B(p,re)===B(u,ie===-1?0:re-ie)){if(ie===-1&&(ie=re),re-ie+1===k)return ie*q}else ie!==-1&&(re-=re-ie),ie=-1}else for(l+k>$&&(l=$-k),re=l;re>=0;re--){let ie=!0;for(let oe=0;oe<k;oe++)if(B(p,re+oe)!==B(u,oe)){ie=!1;break}if(ie)return re}return-1}o.prototype.includes=function(u,l,E){return this.indexOf(u,l,E)!==-1},o.prototype.indexOf=function(u,l,E){return y(this,u,l,E,!0)},o.prototype.lastIndexOf=function(u,l,E){return y(this,u,l,E,!1)};function v(p,u,l,E){l=Number(l)||0;let C=p.length-l;E?(E=Number(E),E>C&&(E=C)):E=C;let q=u.length;E>q/2&&(E=q/2);let $;for($=0;$<E;++$){let k=parseInt(u.substr($*2,2),16);if(Tn(k))return $;p[l+$]=k}return $}function M(p,u,l,E){return Vr(Ct(u,p.length-l),p,l,E)}function F(p,u,l,E){return Vr(Bt(u),p,l,E)}function U(p,u,l,E){return Vr(Ii(u),p,l,E)}function Q(p,u,l,E){return Vr(xn(u,p.length-l),p,l,E)}o.prototype.write=function(u,l,E,C){if(l===void 0)C="utf8",E=this.length,l=0;else if(E===void 0&&typeof l=="string")C=l,E=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(E)?(E=E>>>0,C===void 0&&(C="utf8")):(C=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let q=this.length-l;if((E===void 0||E>q)&&(E=q),u.length>0&&(E<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let $=!1;for(;;)switch(C){case"hex":return v(this,u,l,E);case"utf8":case"utf-8":return M(this,u,l,E);case"ascii":case"latin1":case"binary":return F(this,u,l,E);case"base64":return U(this,u,l,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,u,l,E);default:if($)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),$=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(p,u,l){return u===0&&l===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(u,l))}function H(p,u,l){l=Math.min(p.length,l);let E=[],C=u;for(;C<l;){let q=p[C],$=null,k=q>239?4:q>223?3:q>191?2:1;if(C+k<=l){let B,re,ie,oe;switch(k){case 1:q<128&&($=q);break;case 2:B=p[C+1],(B&192)===128&&(oe=(q&31)<<6|B&63,oe>127&&($=oe));break;case 3:B=p[C+1],re=p[C+2],(B&192)===128&&(re&192)===128&&(oe=(q&15)<<12|(B&63)<<6|re&63,oe>2047&&(oe<55296||oe>57343)&&($=oe));break;case 4:B=p[C+1],re=p[C+2],ie=p[C+3],(B&192)===128&&(re&192)===128&&(ie&192)===128&&(oe=(q&15)<<18|(B&63)<<12|(re&63)<<6|ie&63,oe>65535&&oe<1114112&&($=oe))}}$===null?($=65533,k=1):$>65535&&($-=65536,E.push($>>>10&1023|55296),$=56320|$&1023),E.push($),C+=k}return J(E)}let z=4096;function J(p){let u=p.length;if(u<=z)return String.fromCharCode.apply(String,p);let l="",E=0;for(;E<u;)l+=String.fromCharCode.apply(String,p.slice(E,E+=z));return l}function ee(p,u,l){let E="";l=Math.min(p.length,l);for(let C=u;C<l;++C)E+=String.fromCharCode(p[C]&127);return E}function G(p,u,l){let E="";l=Math.min(p.length,l);for(let C=u;C<l;++C)E+=String.fromCharCode(p[C]);return E}function V(p,u,l){let E=p.length;(!u||u<0)&&(u=0),(!l||l<0||l>E)&&(l=E);let C="";for(let q=u;q<l;++q)C+=Xo[p[q]];return C}function te(p,u,l){let E=p.slice(u,l),C="";for(let q=0;q<E.length-1;q+=2)C+=String.fromCharCode(E[q]+E[q+1]*256);return C}o.prototype.slice=function(u,l){let E=this.length;u=~~u,l=l===void 0?E:~~l,u<0?(u+=E,u<0&&(u=0)):u>E&&(u=E),l<0?(l+=E,l<0&&(l=0)):l>E&&(l=E),l<u&&(l=u);let C=this.subarray(u,l);return Object.setPrototypeOf(C,o.prototype),C};function Y(p,u,l){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>l)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,l,E){u=u>>>0,l=l>>>0,E||Y(u,l,this.length);let C=this[u],q=1,$=0;for(;++$<l&&(q*=256);)C+=this[u+$]*q;return C},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,l,E){u=u>>>0,l=l>>>0,E||Y(u,l,this.length);let C=this[u+--l],q=1;for(;l>0&&(q*=256);)C+=this[u+--l]*q;return C},o.prototype.readUint8=o.prototype.readUInt8=function(u,l){return u=u>>>0,l||Y(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,l){return u=u>>>0,l||Y(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,l){return u=u>>>0,l||Y(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readBigUInt64LE=at(function(u){u=u>>>0,xe(u,"offset");let l=this[u],E=this[u+7];(l===void 0||E===void 0)&&st(u,this.length-8);let C=l+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,q=this[++u]+this[++u]*2**8+this[++u]*2**16+E*2**24;return BigInt(C)+(BigInt(q)<<BigInt(32))}),o.prototype.readBigUInt64BE=at(function(u){u=u>>>0,xe(u,"offset");let l=this[u],E=this[u+7];(l===void 0||E===void 0)&&st(u,this.length-8);let C=l*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],q=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+E;return(BigInt(C)<<BigInt(32))+BigInt(q)}),o.prototype.readIntLE=function(u,l,E){u=u>>>0,l=l>>>0,E||Y(u,l,this.length);let C=this[u],q=1,$=0;for(;++$<l&&(q*=256);)C+=this[u+$]*q;return q*=128,C>=q&&(C-=Math.pow(2,8*l)),C},o.prototype.readIntBE=function(u,l,E){u=u>>>0,l=l>>>0,E||Y(u,l,this.length);let C=l,q=1,$=this[u+--C];for(;C>0&&(q*=256);)$+=this[u+--C]*q;return q*=128,$>=q&&($-=Math.pow(2,8*l)),$},o.prototype.readInt8=function(u,l){return u=u>>>0,l||Y(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,l){u=u>>>0,l||Y(u,2,this.length);let E=this[u]|this[u+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(u,l){u=u>>>0,l||Y(u,2,this.length);let E=this[u+1]|this[u]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readBigInt64LE=at(function(u){u=u>>>0,xe(u,"offset");let l=this[u],E=this[u+7];(l===void 0||E===void 0)&&st(u,this.length-8);let C=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(E<<24);return(BigInt(C)<<BigInt(32))+BigInt(l+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),o.prototype.readBigInt64BE=at(function(u){u=u>>>0,xe(u,"offset");let l=this[u],E=this[u+7];(l===void 0||E===void 0)&&st(u,this.length-8);let C=(l<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(C)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+E)}),o.prototype.readFloatLE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),e.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,l){return u=u>>>0,l||Y(u,4,this.length),e.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,l){return u=u>>>0,l||Y(u,8,this.length),e.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,l){return u=u>>>0,l||Y(u,8,this.length),e.read(this,u,!1,52,8)};function X(p,u,l,E,C,q){if(!o.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>C||u<q)throw new RangeError('"value" argument is out of bounds');if(l+E>p.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,l,E,C){if(u=+u,l=l>>>0,E=E>>>0,!C){let k=Math.pow(2,8*E)-1;X(this,u,l,E,k,0)}let q=1,$=0;for(this[l]=u&255;++$<E&&(q*=256);)this[l+$]=u/q&255;return l+E},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,l,E,C){if(u=+u,l=l>>>0,E=E>>>0,!C){let k=Math.pow(2,8*E)-1;X(this,u,l,E,k,0)}let q=E-1,$=1;for(this[l+q]=u&255;--q>=0&&($*=256);)this[l+q]=u/$&255;return l+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,1,255,0),this[l]=u&255,l+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,2,65535,0),this[l]=u&255,this[l+1]=u>>>8,l+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,2,65535,0),this[l]=u>>>8,this[l+1]=u&255,l+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,4,4294967295,0),this[l+3]=u>>>24,this[l+2]=u>>>16,this[l+1]=u>>>8,this[l]=u&255,l+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,4,4294967295,0),this[l]=u>>>24,this[l+1]=u>>>16,this[l+2]=u>>>8,this[l+3]=u&255,l+4};function ce(p,u,l,E,C){Oe(u,E,C,p,l,7);let q=Number(u&BigInt(4294967295));p[l++]=q,q=q>>8,p[l++]=q,q=q>>8,p[l++]=q,q=q>>8,p[l++]=q;let $=Number(u>>BigInt(32)&BigInt(4294967295));return p[l++]=$,$=$>>8,p[l++]=$,$=$>>8,p[l++]=$,$=$>>8,p[l++]=$,l}function Z(p,u,l,E,C){Oe(u,E,C,p,l,7);let q=Number(u&BigInt(4294967295));p[l+7]=q,q=q>>8,p[l+6]=q,q=q>>8,p[l+5]=q,q=q>>8,p[l+4]=q;let $=Number(u>>BigInt(32)&BigInt(4294967295));return p[l+3]=$,$=$>>8,p[l+2]=$,$=$>>8,p[l+1]=$,$=$>>8,p[l]=$,l+8}o.prototype.writeBigUInt64LE=at(function(u,l=0){return ce(this,u,l,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=at(function(u,l=0){return Z(this,u,l,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(u,l,E,C){if(u=+u,l=l>>>0,!C){let B=Math.pow(2,8*E-1);X(this,u,l,E,B-1,-B)}let q=0,$=1,k=0;for(this[l]=u&255;++q<E&&($*=256);)u<0&&k===0&&this[l+q-1]!==0&&(k=1),this[l+q]=(u/$>>0)-k&255;return l+E},o.prototype.writeIntBE=function(u,l,E,C){if(u=+u,l=l>>>0,!C){let B=Math.pow(2,8*E-1);X(this,u,l,E,B-1,-B)}let q=E-1,$=1,k=0;for(this[l+q]=u&255;--q>=0&&($*=256);)u<0&&k===0&&this[l+q+1]!==0&&(k=1),this[l+q]=(u/$>>0)-k&255;return l+E},o.prototype.writeInt8=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,1,127,-128),u<0&&(u=255+u+1),this[l]=u&255,l+1},o.prototype.writeInt16LE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,2,32767,-32768),this[l]=u&255,this[l+1]=u>>>8,l+2},o.prototype.writeInt16BE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,2,32767,-32768),this[l]=u>>>8,this[l+1]=u&255,l+2},o.prototype.writeInt32LE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,4,2147483647,-2147483648),this[l]=u&255,this[l+1]=u>>>8,this[l+2]=u>>>16,this[l+3]=u>>>24,l+4},o.prototype.writeInt32BE=function(u,l,E){return u=+u,l=l>>>0,E||X(this,u,l,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[l]=u>>>24,this[l+1]=u>>>16,this[l+2]=u>>>8,this[l+3]=u&255,l+4},o.prototype.writeBigInt64LE=at(function(u,l=0){return ce(this,u,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=at(function(u,l=0){return Z(this,u,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(p,u,l,E,C,q){if(l+E>p.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function he(p,u,l,E,C){return u=+u,l=l>>>0,C||ne(p,u,l,4),e.write(p,u,l,E,23,4),l+4}o.prototype.writeFloatLE=function(u,l,E){return he(this,u,l,!0,E)},o.prototype.writeFloatBE=function(u,l,E){return he(this,u,l,!1,E)};function be(p,u,l,E,C){return u=+u,l=l>>>0,C||ne(p,u,l,8),e.write(p,u,l,E,52,8),l+8}o.prototype.writeDoubleLE=function(u,l,E){return be(this,u,l,!0,E)},o.prototype.writeDoubleBE=function(u,l,E){return be(this,u,l,!1,E)},o.prototype.copy=function(u,l,E,C){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(E||(E=0),!C&&C!==0&&(C=this.length),l>=u.length&&(l=u.length),l||(l=0),C>0&&C<E&&(C=E),C===E||u.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),u.length-l<C-E&&(C=u.length-l+E);let q=C-E;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,E,C):Uint8Array.prototype.set.call(u,this.subarray(E,C),l),q},o.prototype.fill=function(u,l,E,C){if(typeof u=="string"){if(typeof l=="string"?(C=l,l=0,E=this.length):typeof E=="string"&&(C=E,E=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!o.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(u.length===1){let $=u.charCodeAt(0);(C==="utf8"&&$<128||C==="latin1")&&(u=$)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(l<0||this.length<l||this.length<E)throw new RangeError("Out of range index");if(E<=l)return this;l=l>>>0,E=E===void 0?this.length:E>>>0,u||(u=0);let q;if(typeof u=="number")for(q=l;q<E;++q)this[q]=u;else{let $=o.isBuffer(u)?u:o.from(u,C),k=$.length;if(k===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(q=0;q<E-l;++q)this[q+l]=$[q%k]}return this};let ye={};function Ae(p,u,l){ye[p]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}Ae("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ae("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),Ae("ERR_OUT_OF_RANGE",function(p,u,l){let E=`The value of "${p}" is out of range.`,C=l;return Number.isInteger(l)&&Math.abs(l)>2**32?C=_e(String(l)):typeof l=="bigint"&&(C=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(C=_e(C)),C+="n"),E+=` It must be ${u}. Received ${C}`,E},RangeError);function _e(p){let u="",l=p.length,E=p[0]==="-"?1:0;for(;l>=E+4;l-=3)u=`_${p.slice(l-3,l)}${u}`;return`${p.slice(0,l)}${u}`}function ve(p,u,l){xe(u,"offset"),(p[u]===void 0||p[u+l]===void 0)&&st(u,p.length-(l+1))}function Oe(p,u,l,E,C,q){if(p>l||p<u){let $=typeof u=="bigint"?"n":"",k;throw u===0||u===BigInt(0)?k=`>= 0${$} and < 2${$} ** ${(q+1)*8}${$}`:k=`>= -(2${$} ** ${(q+1)*8-1}${$}) and < 2 ** ${(q+1)*8-1}${$}`,new ye.ERR_OUT_OF_RANGE("value",k,p)}ve(E,C,q)}function xe(p,u){if(typeof p!="number")throw new ye.ERR_INVALID_ARG_TYPE(u,"number",p)}function st(p,u,l){throw Math.floor(p)!==p?(xe(p,l),new ye.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new ye.ERR_BUFFER_OUT_OF_BOUNDS:new ye.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}let Re=/[^+/0-9A-Za-z-_]/g;function Ne(p){if(p=p.split("=")[0],p=p.trim().replace(Re,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Ct(p,u){u=u||1/0;let l,E=p.length,C=null,q=[];for(let $=0;$<E;++$){if(l=p.charCodeAt($),l>55295&&l<57344){if(!C){if(l>56319){(u-=3)>-1&&q.push(239,191,189);continue}else if($+1===E){(u-=3)>-1&&q.push(239,191,189);continue}C=l;continue}if(l<56320){(u-=3)>-1&&q.push(239,191,189),C=l;continue}l=(C-55296<<10|l-56320)+65536}else C&&(u-=3)>-1&&q.push(239,191,189);if(C=null,l<128){if((u-=1)<0)break;q.push(l)}else if(l<2048){if((u-=2)<0)break;q.push(l>>6|192,l&63|128)}else if(l<65536){if((u-=3)<0)break;q.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((u-=4)<0)break;q.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return q}function Bt(p){let u=[];for(let l=0;l<p.length;++l)u.push(p.charCodeAt(l)&255);return u}function xn(p,u){let l,E,C,q=[];for(let $=0;$<p.length&&!((u-=2)<0);++$)l=p.charCodeAt($),E=l>>8,C=l%256,q.push(C),q.push(E);return q}function Ii(p){return t.toByteArray(Ne(p))}function Vr(p,u,l,E){let C;for(C=0;C<E&&!(C+l>=u.length||C>=p.length);++C)u[C+l]=p[C];return C}function Ze(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function Tn(p){return p!==p}let Xo=(function(){let p="0123456789abcdef",u=new Array(256);for(let l=0;l<16;++l){let E=l*16;for(let C=0;C<16;++C)u[E+C]=p[l]+p[C]}return u})();function at(p){return typeof BigInt>"u"?Zo:p}function Zo(){throw new Error("BigInt not supported")}return mr}var On,Af,ki,If,mr,xf,Pf=ze(()=>{A();x();I();On={},Af=!1;ki={},If=!1;mr={},xf=!1});var qe={};Kr(qe,{Buffer:()=>D,INSPECT_MAX_BYTES:()=>nw,default:()=>Xt,kMaxLength:()=>iw});var Xt,D,nw,iw,ke=ze(()=>{A();x();I();Pf();Xt=Tf();Xt.Buffer;Xt.SlowBuffer;Xt.INSPECT_MAX_BYTES;Xt.kMaxLength;D=Xt.Buffer,nw=Xt.INSPECT_MAX_BYTES,iw=Xt.kMaxLength});var x=ze(()=>{ke()});var Ee=j((IP,Of)=>{"use strict";A();x();I();var fs=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let n=0;n<e.length;n++)r+=` ${e[n].stack}
`;super(r),this.name="AggregateError",this.errors=e}};Of.exports={AggregateError:fs,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var hs=j((CP,Rf)=>{"use strict";A();x();I();Rf.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var De=j((DP,Bf)=>{"use strict";A();x();I();var{format:ow,inspect:Ci}=hs(),{AggregateError:sw}=Ee(),aw=globalThis.AggregateError||sw,uw=Symbol("kIsNodeError"),lw=["string","function","number","object","Function","Object","boolean","bigint","symbol"],cw=/^([A-Z][a-z0-9]*)+$/,fw="__node_internal_",Bi={};function _r(t,e){if(!t)throw new Bi.ERR_INTERNAL_ASSERTION(e)}function kf(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function hw(t,e,r){if(typeof e=="function")return _r(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return _r(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:ow(e,...r)}function Le(t,e,r){r||(r=Error);class n extends r{constructor(...s){super(hw(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[uw]=!0,Bi[t]=n}function Cf(t){let e=fw+t.name;return Object.defineProperty(t,"name",{value:e}),t}function dw(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new aw([e,t],e.message);return r.code=e.code,r}return t||e}var ds=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Bi.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};Le("ERR_ASSERTION","%s",Error);Le("ERR_INVALID_ARG_TYPE",(t,e,r)=>{_r(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],s=[],o=[];for(let c of e)_r(typeof c=="string","All expected entries have to be of type string"),lw.includes(c)?i.push(c.toLowerCase()):cw.test(c)?s.push(c):(_r(c!=="object",'The value "object" should be written as "Object"'),o.push(c));if(s.length>0){let c=i.indexOf("object");c!==-1&&(i.splice(i,c,1),s.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let c=i.pop();n+=`one of type ${i.join(", ")}, or ${c}`}}(s.length>0||o.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{let c=s.pop();n+=`an instance of ${s.join(", ")}, or ${c}`}}o.length>0&&(n+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(n+="an "),n+=`${o[0]}`;break;case 2:n+=`one of ${o[0]} or ${o[1]}`;break;default:{let c=o.pop();n+=`one of ${o.join(", ")}, or ${c}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)n+=`. Received an instance of ${r.constructor.name}`;else{let c=Ci(r,{depth:-1});n+=`. Received ${c}`}}else{let c=Ci(r,{colors:!1});c.length>25&&(c=`${c.slice(0,25)}...`),n+=`. Received type ${typeof r} (${c})`}return n},TypeError);Le("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Ci(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);Le("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;let i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);Le("ERR_MISSING_ARGS",(...t)=>{_r(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);Le("ERR_OUT_OF_RANGE",(t,e,r)=>{_r(e,'Missing "range" argument');let n;if(Number.isInteger(r)&&Math.abs(r)>2**32)n=kf(String(r));else if(typeof r=="bigint"){n=String(r);let i=BigInt(2)**BigInt(32);(r>i||r<-i)&&(n=kf(n)),n+="n"}else n=Ci(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);Le("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Le("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Le("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Le("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Le("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Le("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Le("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Le("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Le("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Le("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Le("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Bf.exports={AbortError:ds,aggregateTwoErrors:Cf(dw),hideStackFrames:Cf,codes:Bi}});var Yr=j((GP,Mi)=>{"use strict";A();x();I();var{AbortController:Mf,AbortSignal:pw}=typeof self<"u"?self:typeof window<"u"?window:void 0;Mi.exports=Mf;Mi.exports.AbortSignal=pw;Mi.exports.default=Mf});var Zt={};Kr(Zt,{EventEmitter:()=>gw,default:()=>Rn,defaultMaxListeners:()=>bw,init:()=>ww,listenerCount:()=>mw,on:()=>_w,once:()=>vw});function yw(){if(Nf)return Ni;Nf=!0;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(y,O,v){return Function.prototype.apply.call(y,O,v)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:r=function(y){return Object.getOwnPropertyNames(y)};function n(T){console&&console.warn&&console.warn(T)}var i=Number.isNaN||function(y){return y!==y};function s(){s.init.call(this)}Ni=s,Ni.once=w,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(T){if(typeof T!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(T){if(typeof T!="number"||T<0||i(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");o=T}}),s.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},s.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function c(T){return T._maxListeners===void 0?s.defaultMaxListeners:T._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(y){for(var O=[],v=1;v<arguments.length;v++)O.push(arguments[v]);var M=y==="error",F=this._events;if(F!==void 0)M=M&&F.error===void 0;else if(!M)return!1;if(M){var U;if(O.length>0&&(U=O[0]),U instanceof Error)throw U;var Q=new Error("Unhandled error."+(U?" ("+U.message+")":""));throw Q.context=U,Q}var W=F[y];if(W===void 0)return!1;if(typeof W=="function")e(W,this,O);else for(var H=W.length,z=P(W,H),v=0;v<H;++v)e(z[v],this,O);return!0};function f(T,y,O,v){var M,F,U;if(a(O),F=T._events,F===void 0?(F=T._events=Object.create(null),T._eventsCount=0):(F.newListener!==void 0&&(T.emit("newListener",y,O.listener?O.listener:O),F=T._events),U=F[y]),U===void 0)U=F[y]=O,++T._eventsCount;else if(typeof U=="function"?U=F[y]=v?[O,U]:[U,O]:v?U.unshift(O):U.push(O),M=c(T),M>0&&U.length>M&&!U.warned){U.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=T,Q.type=y,Q.count=U.length,n(Q)}return T}s.prototype.addListener=function(y,O){return f(this,y,O,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(y,O){return f(this,y,O,!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 d(T,y,O){var v={fired:!1,wrapFn:void 0,target:T,type:y,listener:O},M=h.bind(v);return M.listener=O,v.wrapFn=M,M}s.prototype.once=function(y,O){return a(O),this.on(y,d(this,y,O)),this},s.prototype.prependOnceListener=function(y,O){return a(O),this.prependListener(y,d(this,y,O)),this},s.prototype.removeListener=function(y,O){var v,M,F,U,Q;if(a(O),M=this._events,M===void 0)return this;if(v=M[y],v===void 0)return this;if(v===O||v.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete M[y],M.removeListener&&this.emit("removeListener",y,v.listener||O));else if(typeof v!="function"){for(F=-1,U=v.length-1;U>=0;U--)if(v[U]===O||v[U].listener===O){Q=v[U].listener,F=U;break}if(F<0)return this;F===0?v.shift():S(v,F),v.length===1&&(M[y]=v[0]),M.removeListener!==void 0&&this.emit("removeListener",y,Q||O)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(y){var O,v,M;if(v=this._events,v===void 0)return this;if(v.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):v[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete v[y]),this;if(arguments.length===0){var F=Object.keys(v),U;for(M=0;M<F.length;++M)U=F[M],U!=="removeListener"&&this.removeAllListeners(U);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=v[y],typeof O=="function")this.removeListener(y,O);else if(O!==void 0)for(M=O.length-1;M>=0;M--)this.removeListener(y,O[M]);return this};function m(T,y,O){var v=T._events;if(v===void 0)return[];var M=v[y];return M===void 0?[]:typeof M=="function"?O?[M.listener||M]:[M]:O?b(M):P(M,M.length)}s.prototype.listeners=function(y){return m(this,y,!0)},s.prototype.rawListeners=function(y){return m(this,y,!1)},s.listenerCount=function(T,y){return typeof T.listenerCount=="function"?T.listenerCount(y):g.call(T,y)},s.prototype.listenerCount=g;function g(T){var y=this._events;if(y!==void 0){var O=y[T];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function P(T,y){for(var O=new Array(y),v=0;v<y;++v)O[v]=T[v];return O}function S(T,y){for(;y+1<T.length;y++)T[y]=T[y+1];T.pop()}function b(T){for(var y=new Array(T.length),O=0;O<y.length;++O)y[O]=T[O].listener||T[O];return y}function w(T,y){return new Promise(function(O,v){function M(U){T.removeListener(y,F),v(U)}function F(){typeof T.removeListener=="function"&&T.removeListener("error",M),O([].slice.call(arguments))}R(T,y,F,{once:!0}),y!=="error"&&_(T,M,{once:!0})})}function _(T,y,O){typeof T.on=="function"&&R(T,"error",y,O)}function R(T,y,O,v){if(typeof T.on=="function")v.once?T.once(y,O):T.on(y,O);else if(typeof T.addEventListener=="function")T.addEventListener(y,function M(F){v.once&&T.removeEventListener(y,M),O(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof T)}return Ni}var Ni,Nf,Rn,gw,bw,ww,mw,_w,vw,er=ze(()=>{A();x();I();Ni={},Nf=!1;Rn=yw();Rn.once;Rn.once=function(t,e){return new Promise((r,n)=>{function i(...o){s!==void 0&&t.removeListener("error",s),r(o)}let s;e!=="error"&&(s=o=>{t.removeListener(name,i),n(o)},t.once("error",s)),t.once(e,i)})};Rn.on=function(t,e){let r=[],n=[],i=null,s=!1,o={async next(){let f=r.shift();if(f)return createIterResult(f,!1);if(i){let h=Promise.reject(i);return i=null,h}return s?createIterResult(void 0,!0):new Promise((h,d)=>n.push({resolve:h,reject:d}))},async return(){t.removeListener(e,a),t.removeListener("error",c),s=!0;for(let f of n)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){i=f,t.removeListener(e,a),t.removeListener("error",c)},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on("error",c),o;function a(...f){let h=n.shift();h?h.resolve(createIterResult(f,!1)):r.push(f)}function c(f){s=!0;let h=n.shift();h?h.reject(f):i=f,o.return()}};({EventEmitter:gw,defaultMaxListeners:bw,init:ww,listenerCount:mw,on:_w,once:vw}=Rn)});var $e=j((oO,ys)=>{"use strict";A();x();I();var Sw=(ke(),me(qe)),{format:Ew,inspect:Aw}=hs(),{codes:{ERR_INVALID_ARG_TYPE:ps}}=De(),{kResistStopPropagation:Iw,AggregateError:xw,SymbolDispose:Tw}=Ee(),Pw=globalThis.AbortSignal||Yr().AbortSignal,Ow=globalThis.AbortController||Yr().AbortController,Rw=Object.getPrototypeOf(async function(){}).constructor,qf=globalThis.Blob||Sw.Blob,kw=typeof qf<"u"?function(e){return e instanceof qf}:function(e){return!1},Lf=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new ps(e,"AbortSignal",t)},Cw=(t,e)=>{if(typeof t!="function")throw new ps(e,"Function",t)};ys.exports={AggregateError:xw,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format:Ew,inspect:Aw,types:{isAsyncFunction(t){return t instanceof Rw},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:kw,deprecate(t,e){return t},addAbortListener:(er(),me(Zt)).addAbortListener||