UNPKG

@logback4js/twitter

Version:
7 lines 734 kB
(function(ut,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(ut=typeof globalThis<"u"?globalThis:ut||self,x(ut.TwitterAppenders={}))})(this,function(exports){"use strict";var pt=Object.defineProperty;var vt=(ut,x,M)=>x in ut?pt(ut,x,{enumerable:!0,configurable:!0,writable:!0,value:M}):ut[x]=M;var ct=(ut,x,M)=>vt(ut,typeof x!="symbol"?x+"":x,M);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dist$1={},auth={},OAuth2User={},cryptoBrowserify={};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var browser$e={exports:{}},process=browser$e.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(x){if(cachedSetTimeout===setTimeout)return setTimeout(x,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(x,0);try{return cachedSetTimeout(x,0)}catch{try{return cachedSetTimeout.call(null,x,0)}catch{return cachedSetTimeout.call(this,x,0)}}}function runClearTimeout(x){if(cachedClearTimeout===clearTimeout)return clearTimeout(x);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(x);try{return cachedClearTimeout(x)}catch{try{return cachedClearTimeout.call(null,x)}catch{return cachedClearTimeout.call(this,x)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var x=runTimeout(cleanUpNextTick);draining=!0;for(var M=queue.length;M;){for(currentQueue=queue,queue=[];++queueIndex<M;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,M=queue.length}currentQueue=null,draining=!1,runClearTimeout(x)}}process.nextTick=function(x){var M=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)M[E-1]=arguments[E];queue.push(new Item(x,M)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(x,M){this.fun=x,this.array=M}Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={};function noop(){}process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(x){return[]},process.binding=function(x){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(x){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};var browserExports=browser$e.exports;const process$1=getDefaultExportFromCjs(browserExports);var browser$d={exports:{}},safeBuffer$1={exports:{}},dist={},hasRequiredDist$1;function requireDist$1(){return hasRequiredDist$1||(hasRequiredDist$1=1,function(x){Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var M={},E={};E.byteLength=l,E.toByteArray=b,E.fromByteArray=R;for(var p=[],q=[],f=typeof Uint8Array<"u"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=_.length;y<m;++y)p[y]=_[y],q[_.charCodeAt(y)]=y;q[45]=62,q[95]=63;function g(k){var N=k.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=k.indexOf("=");F===-1&&(F=N);var Z=F===N?0:4-F%4;return[F,Z]}function l(k){var N=g(k),F=N[0],Z=N[1];return(F+Z)*3/4-Z}function v(k,N,F){return(N+F)*3/4-F}function b(k){var N,F=g(k),Z=F[0],Y=F[1],ne=new f(v(k,Z,Y)),fe=0,Q=Y>0?Z-4:Z,le;for(le=0;le<Q;le+=4)N=q[k.charCodeAt(le)]<<18|q[k.charCodeAt(le+1)]<<12|q[k.charCodeAt(le+2)]<<6|q[k.charCodeAt(le+3)],ne[fe++]=N>>16&255,ne[fe++]=N>>8&255,ne[fe++]=N&255;return Y===2&&(N=q[k.charCodeAt(le)]<<2|q[k.charCodeAt(le+1)]>>4,ne[fe++]=N&255),Y===1&&(N=q[k.charCodeAt(le)]<<10|q[k.charCodeAt(le+1)]<<4|q[k.charCodeAt(le+2)]>>2,ne[fe++]=N>>8&255,ne[fe++]=N&255),ne}function S(k){return p[k>>18&63]+p[k>>12&63]+p[k>>6&63]+p[k&63]}function B(k,N,F){for(var Z,Y=[],ne=N;ne<F;ne+=3)Z=(k[ne]<<16&16711680)+(k[ne+1]<<8&65280)+(k[ne+2]&255),Y.push(S(Z));return Y.join("")}function R(k){for(var N,F=k.length,Z=F%3,Y=[],ne=16383,fe=0,Q=F-Z;fe<Q;fe+=ne)Y.push(B(k,fe,fe+ne>Q?Q:fe+ne));return Z===1?(N=k[F-1],Y.push(p[N>>2]+p[N<<4&63]+"==")):Z===2&&(N=(k[F-2]<<8)+k[F-1],Y.push(p[N>>10]+p[N>>4&63]+p[N<<2&63]+"=")),Y.join("")}var P={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */P.read=function(k,N,F,Z,Y){var ne,fe,Q=Y*8-Z-1,le=(1<<Q)-1,c=le>>1,e=-7,r=F?Y-1:0,n=F?-1:1,a=k[N+r];for(r+=n,ne=a&(1<<-e)-1,a>>=-e,e+=Q;e>0;ne=ne*256+k[N+r],r+=n,e-=8);for(fe=ne&(1<<-e)-1,ne>>=-e,e+=Z;e>0;fe=fe*256+k[N+r],r+=n,e-=8);if(ne===0)ne=1-c;else{if(ne===le)return fe?NaN:(a?-1:1)*(1/0);fe=fe+Math.pow(2,Z),ne=ne-c}return(a?-1:1)*fe*Math.pow(2,ne-Z)},P.write=function(k,N,F,Z,Y,ne){var fe,Q,le,c=ne*8-Y-1,e=(1<<c)-1,r=e>>1,n=Y===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=Z?0:ne-1,s=Z?1:-1,u=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(Q=isNaN(N)?1:0,fe=e):(fe=Math.floor(Math.log(N)/Math.LN2),N*(le=Math.pow(2,-fe))<1&&(fe--,le*=2),fe+r>=1?N+=n/le:N+=n*Math.pow(2,1-r),N*le>=2&&(fe++,le/=2),fe+r>=e?(Q=0,fe=e):fe+r>=1?(Q=(N*le-1)*Math.pow(2,Y),fe=fe+r):(Q=N*Math.pow(2,r-1)*Math.pow(2,Y),fe=0));Y>=8;k[F+a]=Q&255,a+=s,Q/=256,Y-=8);for(fe=fe<<Y|Q,c+=Y;c>0;k[F+a]=fe&255,a+=s,fe/=256,c-=8);k[F+a-s]|=u*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */(function(k){const N=E,F=P,Z=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;k.Buffer=e,k.SlowBuffer=A,k.INSPECT_MAX_BYTES=50;const Y=2147483647;k.kMaxLength=Y;const{Uint8Array:ne,ArrayBuffer:fe,SharedArrayBuffer:Q}=globalThis;e.TYPED_ARRAY_SUPPORT=le(),!e.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 le(){try{const j=new ne(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,ne.prototype),Object.setPrototypeOf(j,T),j.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function c(j){if(j>Y)throw new RangeError('The value "'+j+'" is invalid for option "size"');const T=new ne(j);return Object.setPrototypeOf(T,e.prototype),T}function e(j,T,D){if(typeof j=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(j)}return r(j,T,D)}e.poolSize=8192;function r(j,T,D){if(typeof j=="string")return u(j,T);if(fe.isView(j))return o(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(Te(j,fe)||j&&Te(j.buffer,fe)||typeof Q<"u"&&(Te(j,Q)||j&&Te(j.buffer,Q)))return t(j,T,D);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const W=j.valueOf&&j.valueOf();if(W!=null&&W!==j)return e.from(W,T,D);const re=h(j);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return e.from(j[Symbol.toPrimitive]("string"),T,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}e.from=function(j,T,D){return r(j,T,D)},Object.setPrototypeOf(e.prototype,ne.prototype),Object.setPrototypeOf(e,ne);function n(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function a(j,T,D){return n(j),j<=0?c(j):T!==void 0?typeof D=="string"?c(j).fill(T,D):c(j).fill(T):c(j)}e.alloc=function(j,T,D){return a(j,T,D)};function s(j){return n(j),c(j<0?0:w(j)|0)}e.allocUnsafe=function(j){return s(j)},e.allocUnsafeSlow=function(j){return s(j)};function u(j,T){if((typeof T!="string"||T==="")&&(T="utf8"),!e.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const D=L(j,T)|0;let W=c(D);const re=W.write(j,T);return re!==D&&(W=W.slice(0,re)),W}function d(j){const T=j.length<0?0:w(j.length)|0,D=c(T);for(let W=0;W<T;W+=1)D[W]=j[W]&255;return D}function o(j){if(Te(j,ne)){const T=new ne(j);return t(T.buffer,T.byteOffset,T.byteLength)}return d(j)}function t(j,T,D){if(T<0||j.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<T+(D||0))throw new RangeError('"length" is outside of buffer bounds');let W;return T===void 0&&D===void 0?W=new ne(j):D===void 0?W=new ne(j,T):W=new ne(j,T,D),Object.setPrototypeOf(W,e.prototype),W}function h(j){if(e.isBuffer(j)){const T=w(j.length)|0,D=c(T);return D.length===0||j.copy(D,0,0,T),D}if(j.length!==void 0)return typeof j.length!="number"||Ge(j.length)?c(0):d(j);if(j.type==="Buffer"&&Array.isArray(j.data))return d(j.data)}function w(j){if(j>=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return j|0}function A(j){return+j!=j&&(j=0),e.alloc(+j)}e.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==e.prototype},e.compare=function(T,D){if(Te(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),Te(D,ne)&&(D=e.from(D,D.offset,D.byteLength)),!e.isBuffer(T)||!e.isBuffer(D))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===D)return 0;let W=T.length,re=D.length;for(let pe=0,oe=Math.min(W,re);pe<oe;++pe)if(T[pe]!==D[pe]){W=T[pe],re=D[pe];break}return W<re?-1:re<W?1:0},e.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}},e.concat=function(T,D){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return e.alloc(0);let W;if(D===void 0)for(D=0,W=0;W<T.length;++W)D+=T[W].length;const re=e.allocUnsafe(D);let pe=0;for(W=0;W<T.length;++W){let oe=T[W];if(Te(oe,ne))pe+oe.length>re.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(re,pe)):ne.prototype.set.call(re,oe,pe);else if(e.isBuffer(oe))oe.copy(re,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=oe.length}return re};function L(j,T){if(e.isBuffer(j))return j.length;if(fe.isView(j)||Te(j,fe))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const D=j.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&D===0)return 0;let re=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return Le(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return Oe(j).length;default:if(re)return W?-1:Le(j).length;T=(""+T).toLowerCase(),re=!0}}e.byteLength=L;function V(j,T,D){let W=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((D===void 0||D>this.length)&&(D=this.length),D<=0)||(D>>>=0,T>>>=0,D<=T))return"";for(j||(j="utf8");;)switch(j){case"hex":return Fe(this,T,D);case"utf8":case"utf-8":return ue(this,T,D);case"ascii":return me(this,T,D);case"latin1":case"binary":return se(this,T,D);case"base64":return Ie(this,T,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,T,D);default:if(W)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),W=!0}}e.prototype._isBuffer=!0;function G(j,T,D){const W=j[T];j[T]=j[D],j[D]=W}e.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 D=0;D<T;D+=2)G(this,D,D+1);return this},e.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 D=0;D<T;D+=4)G(this,D,D+3),G(this,D+1,D+2);return this},e.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 D=0;D<T;D+=8)G(this,D,D+7),G(this,D+1,D+6),G(this,D+2,D+5),G(this,D+3,D+4);return this},e.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?ue(this,0,T):V.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(T){if(!e.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:e.compare(this,T)===0},e.prototype.inspect=function(){let T="";const D=k.INSPECT_MAX_BYTES;return T=this.toString("hex",0,D).replace(/(.{2})/g,"$1 ").trim(),this.length>D&&(T+=" ... "),"<Buffer "+T+">"},Z&&(e.prototype[Z]=e.prototype.inspect),e.prototype.compare=function(T,D,W,re,pe){if(Te(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),!e.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(D===void 0&&(D=0),W===void 0&&(W=T?T.length:0),re===void 0&&(re=0),pe===void 0&&(pe=this.length),D<0||W>T.length||re<0||pe>this.length)throw new RangeError("out of range index");if(re>=pe&&D>=W)return 0;if(re>=pe)return-1;if(D>=W)return 1;if(D>>>=0,W>>>=0,re>>>=0,pe>>>=0,this===T)return 0;let oe=pe-re,Me=W-D;const Ne=Math.min(oe,Me),ge=this.slice(re,pe),Be=T.slice(D,W);for(let De=0;De<Ne;++De)if(ge[De]!==Be[De]){oe=ge[De],Me=Be[De];break}return oe<Me?-1:Me<oe?1:0};function C(j,T,D,W,re){if(j.length===0)return-1;if(typeof D=="string"?(W=D,D=0):D>2147483647?D=2147483647:D<-2147483648&&(D=-2147483648),D=+D,Ge(D)&&(D=re?0:j.length-1),D<0&&(D=j.length+D),D>=j.length){if(re)return-1;D=j.length-1}else if(D<0)if(re)D=0;else return-1;if(typeof T=="string"&&(T=e.from(T,W)),e.isBuffer(T))return T.length===0?-1:H(j,T,D,W,re);if(typeof T=="number")return T=T&255,typeof ne.prototype.indexOf=="function"?re?ne.prototype.indexOf.call(j,T,D):ne.prototype.lastIndexOf.call(j,T,D):H(j,[T],D,W,re);throw new TypeError("val must be string, number or Buffer")}function H(j,T,D,W,re){let pe=1,oe=j.length,Me=T.length;if(W!==void 0&&(W=String(W).toLowerCase(),W==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(j.length<2||T.length<2)return-1;pe=2,oe/=2,Me/=2,D/=2}function Ne(Be,De){return pe===1?Be[De]:Be.readUInt16BE(De*pe)}let ge;if(re){let Be=-1;for(ge=D;ge<oe;ge++)if(Ne(j,ge)===Ne(T,Be===-1?0:ge-Be)){if(Be===-1&&(Be=ge),ge-Be+1===Me)return Be*pe}else Be!==-1&&(ge-=ge-Be),Be=-1}else for(D+Me>oe&&(D=oe-Me),ge=D;ge>=0;ge--){let Be=!0;for(let De=0;De<Me;De++)if(Ne(j,ge+De)!==Ne(T,De)){Be=!1;break}if(Be)return ge}return-1}e.prototype.includes=function(T,D,W){return this.indexOf(T,D,W)!==-1},e.prototype.indexOf=function(T,D,W){return C(this,T,D,W,!0)},e.prototype.lastIndexOf=function(T,D,W){return C(this,T,D,W,!1)};function J(j,T,D,W){D=Number(D)||0;const re=j.length-D;W?(W=Number(W),W>re&&(W=re)):W=re;const pe=T.length;W>pe/2&&(W=pe/2);let oe;for(oe=0;oe<W;++oe){const Me=parseInt(T.substr(oe*2,2),16);if(Ge(Me))return oe;j[D+oe]=Me}return oe}function ee(j,T,D,W){return qe(Le(T,j.length-D),j,D,W)}function X(j,T,D,W){return qe(be(T),j,D,W)}function z(j,T,D,W){return qe(Oe(T),j,D,W)}function ie(j,T,D,W){return qe(Se(T,j.length-D),j,D,W)}e.prototype.write=function(T,D,W,re){if(D===void 0)re="utf8",W=this.length,D=0;else if(W===void 0&&typeof D=="string")re=D,W=this.length,D=0;else if(isFinite(D))D=D>>>0,isFinite(W)?(W=W>>>0,re===void 0&&(re="utf8")):(re=W,W=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-D;if((W===void 0||W>pe)&&(W=pe),T.length>0&&(W<0||D<0)||D>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let oe=!1;for(;;)switch(re){case"hex":return J(this,T,D,W);case"utf8":case"utf-8":return ee(this,T,D,W);case"ascii":case"latin1":case"binary":return X(this,T,D,W);case"base64":return z(this,T,D,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,T,D,W);default:if(oe)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ie(j,T,D){return T===0&&D===j.length?N.fromByteArray(j):N.fromByteArray(j.slice(T,D))}function ue(j,T,D){D=Math.min(j.length,D);const W=[];let re=T;for(;re<D;){const pe=j[re];let oe=null,Me=pe>239?4:pe>223?3:pe>191?2:1;if(re+Me<=D){let Ne,ge,Be,De;switch(Me){case 1:pe<128&&(oe=pe);break;case 2:Ne=j[re+1],(Ne&192)===128&&(De=(pe&31)<<6|Ne&63,De>127&&(oe=De));break;case 3:Ne=j[re+1],ge=j[re+2],(Ne&192)===128&&(ge&192)===128&&(De=(pe&15)<<12|(Ne&63)<<6|ge&63,De>2047&&(De<55296||De>57343)&&(oe=De));break;case 4:Ne=j[re+1],ge=j[re+2],Be=j[re+3],(Ne&192)===128&&(ge&192)===128&&(Be&192)===128&&(De=(pe&15)<<18|(Ne&63)<<12|(ge&63)<<6|Be&63,De>65535&&De<1114112&&(oe=De))}}oe===null?(oe=65533,Me=1):oe>65535&&(oe-=65536,W.push(oe>>>10&1023|55296),oe=56320|oe&1023),W.push(oe),re+=Me}return Pe(W)}const he=4096;function Pe(j){const T=j.length;if(T<=he)return String.fromCharCode.apply(String,j);let D="",W=0;for(;W<T;)D+=String.fromCharCode.apply(String,j.slice(W,W+=he));return D}function me(j,T,D){let W="";D=Math.min(j.length,D);for(let re=T;re<D;++re)W+=String.fromCharCode(j[re]&127);return W}function se(j,T,D){let W="";D=Math.min(j.length,D);for(let re=T;re<D;++re)W+=String.fromCharCode(j[re]);return W}function Fe(j,T,D){const W=j.length;(!T||T<0)&&(T=0),(!D||D<0||D>W)&&(D=W);let re="";for(let pe=T;pe<D;++pe)re+=Re[j[pe]];return re}function ce(j,T,D){const W=j.slice(T,D);let re="";for(let pe=0;pe<W.length-1;pe+=2)re+=String.fromCharCode(W[pe]+W[pe+1]*256);return re}e.prototype.slice=function(T,D){const W=this.length;T=~~T,D=D===void 0?W:~~D,T<0?(T+=W,T<0&&(T=0)):T>W&&(T=W),D<0?(D+=W,D<0&&(D=0)):D>W&&(D=W),D<T&&(D=T);const re=this.subarray(T,D);return Object.setPrototypeOf(re,e.prototype),re};function ye(j,T,D){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+T>D)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(T,D,W){T=T>>>0,D=D>>>0,W||ye(T,D,this.length);let re=this[T],pe=1,oe=0;for(;++oe<D&&(pe*=256);)re+=this[T+oe]*pe;return re},e.prototype.readUintBE=e.prototype.readUIntBE=function(T,D,W){T=T>>>0,D=D>>>0,W||ye(T,D,this.length);let re=this[T+--D],pe=1;for(;D>0&&(pe*=256);)re+=this[T+--D]*pe;return re},e.prototype.readUint8=e.prototype.readUInt8=function(T,D){return T=T>>>0,D||ye(T,1,this.length),this[T]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(T,D){return T=T>>>0,D||ye(T,2,this.length),this[T]|this[T+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(T,D){return T=T>>>0,D||ye(T,2,this.length),this[T]<<8|this[T+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},e.prototype.readBigUInt64LE=$e(function(T){T=T>>>0,te(T,"offset");const D=this[T],W=this[T+7];(D===void 0||W===void 0)&&de(T,this.length-8);const re=D+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,pe=this[++T]+this[++T]*2**8+this[++T]*2**16+W*2**24;return BigInt(re)+(BigInt(pe)<<BigInt(32))}),e.prototype.readBigUInt64BE=$e(function(T){T=T>>>0,te(T,"offset");const D=this[T],W=this[T+7];(D===void 0||W===void 0)&&de(T,this.length-8);const re=D*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],pe=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+W;return(BigInt(re)<<BigInt(32))+BigInt(pe)}),e.prototype.readIntLE=function(T,D,W){T=T>>>0,D=D>>>0,W||ye(T,D,this.length);let re=this[T],pe=1,oe=0;for(;++oe<D&&(pe*=256);)re+=this[T+oe]*pe;return pe*=128,re>=pe&&(re-=Math.pow(2,8*D)),re},e.prototype.readIntBE=function(T,D,W){T=T>>>0,D=D>>>0,W||ye(T,D,this.length);let re=D,pe=1,oe=this[T+--re];for(;re>0&&(pe*=256);)oe+=this[T+--re]*pe;return pe*=128,oe>=pe&&(oe-=Math.pow(2,8*D)),oe},e.prototype.readInt8=function(T,D){return T=T>>>0,D||ye(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},e.prototype.readInt16LE=function(T,D){T=T>>>0,D||ye(T,2,this.length);const W=this[T]|this[T+1]<<8;return W&32768?W|4294901760:W},e.prototype.readInt16BE=function(T,D){T=T>>>0,D||ye(T,2,this.length);const W=this[T+1]|this[T]<<8;return W&32768?W|4294901760:W},e.prototype.readInt32LE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},e.prototype.readInt32BE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},e.prototype.readBigInt64LE=$e(function(T){T=T>>>0,te(T,"offset");const D=this[T],W=this[T+7];(D===void 0||W===void 0)&&de(T,this.length-8);const re=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(W<<24);return(BigInt(re)<<BigInt(32))+BigInt(D+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),e.prototype.readBigInt64BE=$e(function(T){T=T>>>0,te(T,"offset");const D=this[T],W=this[T+7];(D===void 0||W===void 0)&&de(T,this.length-8);const re=(D<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(re)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+W)}),e.prototype.readFloatLE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),F.read(this,T,!0,23,4)},e.prototype.readFloatBE=function(T,D){return T=T>>>0,D||ye(T,4,this.length),F.read(this,T,!1,23,4)},e.prototype.readDoubleLE=function(T,D){return T=T>>>0,D||ye(T,8,this.length),F.read(this,T,!0,52,8)},e.prototype.readDoubleBE=function(T,D){return T=T>>>0,D||ye(T,8,this.length),F.read(this,T,!1,52,8)};function Ce(j,T,D,W,re,pe){if(!e.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>re||T<pe)throw new RangeError('"value" argument is out of bounds');if(D+W>j.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(T,D,W,re){if(T=+T,D=D>>>0,W=W>>>0,!re){const Me=Math.pow(2,8*W)-1;Ce(this,T,D,W,Me,0)}let pe=1,oe=0;for(this[D]=T&255;++oe<W&&(pe*=256);)this[D+oe]=T/pe&255;return D+W},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(T,D,W,re){if(T=+T,D=D>>>0,W=W>>>0,!re){const Me=Math.pow(2,8*W)-1;Ce(this,T,D,W,Me,0)}let pe=W-1,oe=1;for(this[D+pe]=T&255;--pe>=0&&(oe*=256);)this[D+pe]=T/oe&255;return D+W},e.prototype.writeUint8=e.prototype.writeUInt8=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,1,255,0),this[D]=T&255,D+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,2,65535,0),this[D]=T&255,this[D+1]=T>>>8,D+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,2,65535,0),this[D]=T>>>8,this[D+1]=T&255,D+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,4,4294967295,0),this[D+3]=T>>>24,this[D+2]=T>>>16,this[D+1]=T>>>8,this[D]=T&255,D+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,4,4294967295,0),this[D]=T>>>24,this[D+1]=T>>>16,this[D+2]=T>>>8,this[D+3]=T&255,D+4};function ve(j,T,D,W,re){K(T,W,re,j,D,7);let pe=Number(T&BigInt(4294967295));j[D++]=pe,pe=pe>>8,j[D++]=pe,pe=pe>>8,j[D++]=pe,pe=pe>>8,j[D++]=pe;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return j[D++]=oe,oe=oe>>8,j[D++]=oe,oe=oe>>8,j[D++]=oe,oe=oe>>8,j[D++]=oe,D}function xe(j,T,D,W,re){K(T,W,re,j,D,7);let pe=Number(T&BigInt(4294967295));j[D+7]=pe,pe=pe>>8,j[D+6]=pe,pe=pe>>8,j[D+5]=pe,pe=pe>>8,j[D+4]=pe;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return j[D+3]=oe,oe=oe>>8,j[D+2]=oe,oe=oe>>8,j[D+1]=oe,oe=oe>>8,j[D]=oe,D+8}e.prototype.writeBigUInt64LE=$e(function(T,D=0){return ve(this,T,D,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=$e(function(T,D=0){return xe(this,T,D,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(T,D,W,re){if(T=+T,D=D>>>0,!re){const Ne=Math.pow(2,8*W-1);Ce(this,T,D,W,Ne-1,-Ne)}let pe=0,oe=1,Me=0;for(this[D]=T&255;++pe<W&&(oe*=256);)T<0&&Me===0&&this[D+pe-1]!==0&&(Me=1),this[D+pe]=(T/oe>>0)-Me&255;return D+W},e.prototype.writeIntBE=function(T,D,W,re){if(T=+T,D=D>>>0,!re){const Ne=Math.pow(2,8*W-1);Ce(this,T,D,W,Ne-1,-Ne)}let pe=W-1,oe=1,Me=0;for(this[D+pe]=T&255;--pe>=0&&(oe*=256);)T<0&&Me===0&&this[D+pe+1]!==0&&(Me=1),this[D+pe]=(T/oe>>0)-Me&255;return D+W},e.prototype.writeInt8=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,1,127,-128),T<0&&(T=255+T+1),this[D]=T&255,D+1},e.prototype.writeInt16LE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,2,32767,-32768),this[D]=T&255,this[D+1]=T>>>8,D+2},e.prototype.writeInt16BE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,2,32767,-32768),this[D]=T>>>8,this[D+1]=T&255,D+2},e.prototype.writeInt32LE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,4,2147483647,-2147483648),this[D]=T&255,this[D+1]=T>>>8,this[D+2]=T>>>16,this[D+3]=T>>>24,D+4},e.prototype.writeInt32BE=function(T,D,W){return T=+T,D=D>>>0,W||Ce(this,T,D,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[D]=T>>>24,this[D+1]=T>>>16,this[D+2]=T>>>8,this[D+3]=T&255,D+4},e.prototype.writeBigInt64LE=$e(function(T,D=0){return ve(this,T,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=$e(function(T,D=0){return xe(this,T,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ue(j,T,D,W,re,pe){if(D+W>j.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function _e(j,T,D,W,re){return T=+T,D=D>>>0,re||Ue(j,T,D,4),F.write(j,T,D,W,23,4),D+4}e.prototype.writeFloatLE=function(T,D,W){return _e(this,T,D,!0,W)},e.prototype.writeFloatBE=function(T,D,W){return _e(this,T,D,!1,W)};function Ee(j,T,D,W,re){return T=+T,D=D>>>0,re||Ue(j,T,D,8),F.write(j,T,D,W,52,8),D+8}e.prototype.writeDoubleLE=function(T,D,W){return Ee(this,T,D,!0,W)},e.prototype.writeDoubleBE=function(T,D,W){return Ee(this,T,D,!1,W)},e.prototype.copy=function(T,D,W,re){if(!e.isBuffer(T))throw new TypeError("argument should be a Buffer");if(W||(W=0),!re&&re!==0&&(re=this.length),D>=T.length&&(D=T.length),D||(D=0),re>0&&re<W&&(re=W),re===W||T.length===0||this.length===0)return 0;if(D<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),T.length-D<re-W&&(re=T.length-D+W);const pe=re-W;return this===T&&typeof ne.prototype.copyWithin=="function"?this.copyWithin(D,W,re):ne.prototype.set.call(T,this.subarray(W,re),D),pe},e.prototype.fill=function(T,D,W,re){if(typeof T=="string"){if(typeof D=="string"?(re=D,D=0,W=this.length):typeof W=="string"&&(re=W,W=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!e.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(T.length===1){const oe=T.charCodeAt(0);(re==="utf8"&&oe<128||re==="latin1")&&(T=oe)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(D<0||this.length<D||this.length<W)throw new RangeError("Out of range index");if(W<=D)return this;D=D>>>0,W=W===void 0?this.length:W>>>0,T||(T=0);let pe;if(typeof T=="number")for(pe=D;pe<W;++pe)this[pe]=T;else{const oe=e.isBuffer(T)?T:e.from(T,re),Me=oe.length;if(Me===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(pe=0;pe<W-D;++pe)this[pe+D]=oe[pe%Me]}return this};const je={};function U(j,T,D){je[j]=class extends D{constructor(){super(),Object.defineProperty(this,"message",{value:T.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(re){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:re,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(j,T){return`The "${j}" argument must be of type number. Received type ${typeof T}`},TypeError),U("ERR_OUT_OF_RANGE",function(j,T,D){let W=`The value of "${j}" is out of range.`,re=D;return Number.isInteger(D)&&Math.abs(D)>2**32?re=I(String(D)):typeof D=="bigint"&&(re=String(D),(D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))&&(re=I(re)),re+="n"),W+=` It must be ${T}. Received ${re}`,W},RangeError);function I(j){let T="",D=j.length;const W=j[0]==="-"?1:0;for(;D>=W+4;D-=3)T=`_${j.slice(D-3,D)}${T}`;return`${j.slice(0,D)}${T}`}function O(j,T,D){te(T,"offset"),(j[T]===void 0||j[T+D]===void 0)&&de(T,j.length-(D+1))}function K(j,T,D,W,re,pe){if(j>D||j<T){const oe=typeof T=="bigint"?"n":"";let Me;throw T===0||T===BigInt(0)?Me=`>= 0${oe} and < 2${oe} ** ${(pe+1)*8}${oe}`:Me=`>= -(2${oe} ** ${(pe+1)*8-1}${oe}) and < 2 ** ${(pe+1)*8-1}${oe}`,new je.ERR_OUT_OF_RANGE("value",Me,j)}O(W,re,pe)}function te(j,T){if(typeof j!="number")throw new je.ERR_INVALID_ARG_TYPE(T,"number",j)}function de(j,T,D){throw Math.floor(j)!==j?(te(j,D),new je.ERR_OUT_OF_RANGE("offset","an integer",j)):T<0?new je.ERR_BUFFER_OUT_OF_BOUNDS:new je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${T}`,j)}const ae=/[^+/0-9A-Za-z-_]/g;function we(j){if(j=j.split("=")[0],j=j.trim().replace(ae,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function Le(j,T){T=T||1/0;let D;const W=j.length;let re=null;const pe=[];for(let oe=0;oe<W;++oe){if(D=j.charCodeAt(oe),D>55295&&D<57344){if(!re){if(D>56319){(T-=3)>-1&&pe.push(239,191,189);continue}else if(oe+1===W){(T-=3)>-1&&pe.push(239,191,189);continue}re=D;continue}if(D<56320){(T-=3)>-1&&pe.push(239,191,189),re=D;continue}D=(re-55296<<10|D-56320)+65536}else re&&(T-=3)>-1&&pe.push(239,191,189);if(re=null,D<128){if((T-=1)<0)break;pe.push(D)}else if(D<2048){if((T-=2)<0)break;pe.push(D>>6|192,D&63|128)}else if(D<65536){if((T-=3)<0)break;pe.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((T-=4)<0)break;pe.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw new Error("Invalid code point")}return pe}function be(j){const T=[];for(let D=0;D<j.length;++D)T.push(j.charCodeAt(D)&255);return T}function Se(j,T){let D,W,re;const pe=[];for(let oe=0;oe<j.length&&!((T-=2)<0);++oe)D=j.charCodeAt(oe),W=D>>8,re=D%256,pe.push(re),pe.push(W);return pe}function Oe(j){return N.toByteArray(we(j))}function qe(j,T,D,W){let re;for(re=0;re<W&&!(re+D>=T.length||re>=j.length);++re)T[re+D]=j[re];return re}function Te(j,T){return j instanceof T||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===T.name}function Ge(j){return j!==j}const Re=function(){const j="0123456789abcdef",T=new Array(256);for(let D=0;D<16;++D){const W=D*16;for(let re=0;re<16;++re)T[W+re]=j[D]+j[re]}return T}();function $e(j){return typeof BigInt>"u"?Ke:j}function Ke(){throw new Error("BigInt not supported")}})(M);const $=M.Buffer;x.Blob=M.Blob,x.BlobOptions=M.BlobOptions,x.Buffer=M.Buffer,x.File=M.File,x.FileOptions=M.FileOptions,x.INSPECT_MAX_BYTES=M.INSPECT_MAX_BYTES,x.SlowBuffer=M.SlowBuffer,x.TranscodeEncoding=M.TranscodeEncoding,x.atob=M.atob,x.btoa=M.btoa,x.constants=M.constants,x.default=$,x.isAscii=M.isAscii,x.isUtf8=M.isUtf8,x.kMaxLength=M.kMaxLength,x.kStringMaxLength=M.kStringMaxLength,x.resolveObjectURL=M.resolveObjectURL,x.transcode=M.transcode}(dist)),dist}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(x,M){var E=requireDist$1(),p=E.Buffer;function q(_,y){for(var m in _)y[m]=_[m]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?x.exports=E:(q(E,M),M.Buffer=f);function f(_,y,m){return p(_,y,m)}f.prototype=Object.create(p.prototype),q(p,f),f.from=function(_,y,m){if(typeof _=="number")throw new TypeError("Argument must not be a number");return p(_,y,m)},f.alloc=function(_,y,m){if(typeof _!="number")throw new TypeError("Argument must be a number");var g=p(_);return y!==void 0?typeof m=="string"?g.fill(y,m):g.fill(y):g.fill(0),g},f.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return p(_)},f.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer(_)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var hasRequiredBrowser$d;function requireBrowser$d(){if(hasRequiredBrowser$d)return browser$d.exports;hasRequiredBrowser$d=1;var x=65536,M=4294967295;function E(){throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`)}var p=requireSafeBuffer$1().Buffer,q=commonjsGlobal.crypto||commonjsGlobal.msCrypto;q&&q.getRandomValues?browser$d.exports=f:browser$d.exports=E;function f(_,y){if(_>M)throw new RangeError("requested too many random bytes");var m=p.allocUnsafe(_);if(_>0)if(_>x)for(var g=0;g<_;g+=x)q.getRandomValues(m.slice(g,g+x));else q.getRandomValues(m);return typeof y=="function"?process$1.nextTick(function(){y(null,m)}):m}return browser$d.exports}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(M,E){E&&(M.super_=E,M.prototype=Object.create(E.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(M,E){if(E){M.super_=E;var p=function(){};p.prototype=E.prototype,M.prototype=new p,M.prototype.constructor=M}}),inherits_browser.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var x=typeof Reflect=="object"?Reflect:null,M=x&&typeof x.apply=="function"?x.apply:function(Z,Y,ne){return Function.prototype.apply.call(Z,Y,ne)},E;x&&typeof x.ownKeys=="function"?E=x.ownKeys:Object.getOwnPropertySymbols?E=function(Z){return Object.getOwnPropertyNames(Z).concat(Object.getOwnPropertySymbols(Z))}:E=function(Z){return Object.getOwnPropertyNames(Z)};function p(F){console&&console.warn&&console.warn(F)}var q=Number.isNaN||function(Z){return Z!==Z};function f(){f.init.call(this)}events.exports=f,events.exports.once=$,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var _=10;function y(F){if(typeof F!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof F)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(F){if(typeof F!="number"||F<0||q(F))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+F+".");_=F}}),f.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},f.prototype.setMaxListeners=function(Z){if(typeof Z!="number"||Z<0||q(Z))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Z+".");return this._maxListeners=Z,this};function m(F){return F._maxListeners===void 0?f.defaultMaxListeners:F._maxListeners}f.prototype.getMaxListeners=function(){return m(this)},f.prototype.emit=function(Z){for(var Y=[],ne=1;ne<arguments.length;ne++)Y.push(arguments[ne]);var fe=Z==="error",Q=this._events;if(Q!==void 0)fe=fe&&Q.error===void 0;else if(!fe)return!1;if(fe){var le;if(Y.length>0&&(le=Y[0]),le instanceof Error)throw le;var c=new Error("Unhandled error."+(le?" ("+le.message+")":""));throw c.context=le,c}var e=Q[Z];if(e===void 0)return!1;if(typeof e=="function")M(e,this,Y);else for(var r=e.length,n=B(e,r),ne=0;ne<r;++ne)M(n[ne],this,Y);return!0};function g(F,Z,Y,ne){var fe,Q,le;if(y(Y),Q=F._events,Q===void 0?(Q=F._events=Object.create(null),F._eventsCount=0):(Q.newListener!==void 0&&(F.emit("newListener",Z,Y.listener?Y.listener:Y),Q=F._events),le=Q[Z]),le===void 0)le=Q[Z]=Y,++F._eventsCount;else if(typeof le=="function"?le=Q[Z]=ne?[Y,le]:[le,Y]:ne?le.unshift(Y):le.push(Y),fe=m(F),fe>0&&le.length>fe&&!le.warned){le.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+String(Z)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=F,c.type=Z,c.count=le.length,p(c)}return F}f.prototype.addListener=function(Z,Y){return g(this,Z,Y,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(Z,Y){return g(this,Z,Y,!0)};function l(){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 v(F,Z,Y){var ne={fired:!1,wrapFn:void 0,target:F,type:Z,listener:Y},fe=l.bind(ne);return fe.listener=Y,ne.wrapFn=fe,fe}f.prototype.once=function(Z,Y){return y(Y),this.on(Z,v(this,Z,Y)),this},f.prototype.prependOnceListener=function(Z,Y){return y(Y),this.prependListener(Z,v(this,Z,Y)),this},f.prototype.removeListener=function(Z,Y){var ne,fe,Q,le,c;if(y(Y),fe=this._events,fe===void 0)return this;if(ne=fe[Z],ne===void 0)return this;if(ne===Y||ne.listener===Y)--this._eventsCount===0?this._events=Object.create(null):(delete fe[Z],fe.removeListener&&this.emit("removeListener",Z,ne.listener||Y));else if(typeof ne!="function"){for(Q=-1,le=ne.length-1;le>=0;le--)if(ne[le]===Y||ne[le].listener===Y){c=ne[le].listener,Q=le;break}if(Q<0)return this;Q===0?ne.shift():R(ne,Q),ne.length===1&&(fe[Z]=ne[0]),fe.removeListener!==void 0&&this.emit("removeListener",Z,c||Y)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(Z){var Y,ne,fe;if(ne=this._events,ne===void 0)return this;if(ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ne[Z]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ne[Z]),this;if(arguments.length===0){var Q=Object.keys(ne),le;for(fe=0;fe<Q.length;++fe)le=Q[fe],le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Y=ne[Z],typeof Y=="function")this.removeListener(Z,Y);else if(Y!==void 0)for(fe=Y.length-1;fe>=0;fe--)this.removeListener(Z,Y[fe]);return this};function b(F,Z,Y){var ne=F._events;if(ne===void 0)return[];var fe=ne[Z];return fe===void 0?[]:typeof fe=="function"?Y?[fe.listener||fe]:[fe]:Y?P(fe):B(fe,fe.length)}f.prototype.listeners=function(Z){return b(this,Z,!0)},f.prototype.rawListeners=function(Z){return b(this,Z,!1)},f.listenerCount=function(F,Z){return typeof F.listenerCount=="function"?F.listenerCount(Z):S.call(F,Z)},f.prototype.listenerCount=S;function S(F){var Z=this._events;if(Z!==void 0){var Y=Z[F];if(typeof Y=="function")return 1;if(Y!==void 0)return Y.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function B(F,Z){for(var Y=new Array(Z),ne=0;ne<Z;++ne)Y[ne]=F[ne];return Y}function R(F,Z){for(;Z+1<F.length;Z++)F[Z]=F[Z+1];F.pop()}function P(F){for(var Z=new Array(F.length),Y=0;Y<Z.length;++Y)Z[Y]=F[Y].listener||F[Y];return Z}function $(F,Z){return new Promise(function(Y,ne){function fe(le){F.removeListener(Z,Q),ne(le)}function Q(){typeof F.removeListener=="function"&&F.removeListener("error",fe),Y([].slice.call(arguments))}N(F,Z,Q,{once:!0}),Z!=="error"&&k(F,fe,{once:!0})})}function k(F,Z,Y){typeof F.on=="function"&&N(F,"error",Z,Y)}function N(F,Z,Y,ne){if(typeof F.on=="function")ne.once?F.once(Z,Y):F.on(Z,Y);else if(typeof F.addEventListener=="function")F.addEventListener(Z,function fe(Q){ne.once&&F.removeEventListener(Z,fe),Y(Q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof F)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var util$1={},types$1={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var M={},E=Symbol("test"),p=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var q=42;M[E]=q;for(var f in M)return!1;if(typeof Object.keys=="function"&&Object.keys(M).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(M).length!==0)return!1;var _=Object.getOwnPropertySymbols(M);if(_.length!==1||_[0]!==E||!Object.prototype.propertyIsEnumerable.call(M,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var y=Object.getOwnPropertyDescriptor(M,E);if(y.value!==q||y.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var x=requireShams$1();return shams=function(){return x()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(M){return M!==M}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var x=require_isNaN();return sign$1=function(E){return x(E)||E===0?E:E<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var x=requireGOPD();if(x)try{x([],"length")}catch{x=null}return gopd=x,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var x=Object.defineProperty||!1;if(x)try{x({},"a",{value:1})}catch{x=!1}return esDefineProperty=x,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var x=typeof Symbol<"u"&&Symbol,M=requireShams$1();return hasSymbols=function(){return typeof x!="function"||typeof Symbol!="function"||typeof x("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:M()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var x=requireEsObjectAtoms();return Object_getPrototypeOf=x.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var x="Function.prototype.bind called on incompatible ",M=Object.prototype.toString,E=Math.max,p="[object Function]",q=function(m,g){for(var l=[],v=0;v<m.length;v+=1)l[v]=m[v];for(var b=0;b<g.length;b+=1)l[b+m.length]=g[b];return l},f=function(m,g){for(var l=[],v=g,b=0;v<m.length;v+=1,b+=1)l[b]=m[v];return l},_=function(y,m){for(var g="",l=0;l<y.length;l+=1)g+=y[l],l+1<y.length&&(g+=m);return g};return implementation=function(m){var g=this;if(typeof g!="function"||M.apply(g)!==p)throw new TypeError(x+g);for(var l=f(arguments,1),v,b=function(){if(this instanceof v){var $=g.apply(this,q(l,arguments));return Object($)===$?$:this}return g.apply(m,q(l,arguments))},S=E(0,g.length-l.length),B=[],R=0;R<S;R++)B[R]="$"+R;if(v=Function("binder","return function ("+_(B,",")+"){ return binder.apply(this,arguments); }")(b),g.prototype){var P=function(){};P.prototype=g.prototype,v.prototype=new P,P.prototype=null}return v},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var x=requireImplementation();return functionBind=Function.prototype.bind||x,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var x=requireFunctionBind(),M=requireFunctionApply(),E=requireFunctionCall(),p=requireReflectApply();return actualApply=p||x.call(E,M),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var x=requireFunctionBind(),M=requireType(),E=requireFunctionCall(),p=requireActualApply();return callBindApplyHelpers=function(f){if(f.length<1||typeof f[0]!="function")throw new M("a function is required");return p(x,E,f)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var x=requireCallBindApplyHelpers(),M=requireGopd(),E;try{E=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var p=!!E&&M&&M(Object.prototype,"__proto__"),q=Object,f=q.getPrototypeOf;return get=p&&typeof p.get=="function"?x([p.get]):typeof f=="function"?function(y){return f(y==null?y:q(y))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var x=requireReflect_getPrototypeOf(),M=requireObject_getPrototypeOf(),E=requireGet();return getProto=x?function(q){return x(q)}:M?function(q){if(!q||typeof q!="object"&&typeof q!="function")throw new TypeError("getProto: not an object");return M(q)}:E?function(q){return E(q)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var x=Function.prototype.call,M=Object.prototype.hasOwnProperty,E=requireFunctionBind();return hasown=E.call(x,M),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var x,M=requireEsObjectAtoms(),E=requireEsErrors(),p=require_eval(),q=requireRange(),f=requireRef(),_=requireSyntax(),y=requireType(),m=requireUri(),g=requireAbs(),l=requireFloor(),v=requireMax(),b=requireMin(),S=requirePow(),B=requireRoun