UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

36 lines (32 loc) 870 kB
'use strict'; var qce = require('botframework-schema'); var azureCoreHttpCompat = require('botbuilder-stdlib/lib/azureCoreHttpCompat'); var botbuilderStdlib = require('botbuilder-stdlib'); function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n.default = e; return Object.freeze(n); } var qce__namespace = /*#__PURE__*/_interopNamespace(qce); var PM=Object.create;var Cl=Object.defineProperty,MM=Object.defineProperties,UM=Object.getOwnPropertyDescriptor,BM=Object.getOwnPropertyDescriptors,DM=Object.getOwnPropertyNames,lf=Object.getOwnPropertySymbols,LM=Object.getPrototypeOf,Ny=Object.prototype.hasOwnProperty,LT=Object.prototype.propertyIsEnumerable;var Us=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),FM=t=>{throw TypeError(t)},Re=Math.pow,DT=(t,e,r)=>e in t?Cl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,q=(t,e)=>{for(var r in e||(e={}))Ny.call(e,r)&&DT(t,r,e[r]);if(lf)for(var r of lf(e))LT.call(e,r)&&DT(t,r,e[r]);return t},ae=(t,e)=>MM(t,BM(e));var Bs=(t,e)=>{var r={};for(var n in t)Ny.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&lf)for(var n of lf(t))e.indexOf(n)<0&&LT.call(t,n)&&(r[n]=t[n]);return r};var Qt=(t,e)=>()=>(t&&(e=t(t=0)),e);var ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ut=(t,e)=>{for(var r in e)Cl(t,r,{get:e[r],enumerable:!0});},uf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of DM(e))!Ny.call(t,i)&&i!==r&&Cl(t,i,{get:()=>e[i],enumerable:!(n=UM(e,i))||n.enumerable});return t},Ds=(t,e,r)=>(uf(t,e,"default"),r),Ar=(t,e,r)=>(r=t!=null?PM(LM(t)):{},uf(e||!t||!t.__esModule?Cl(r,"default",{value:t,enumerable:!0}):r,t)),ar=t=>uf(Cl({},"__esModule",{value:!0}),t);var L=(t,e,r)=>new Promise((n,i)=>{var o=u=>{try{s(r.next(u));}catch(d){i(d);}},a=u=>{try{s(r.throw(u));}catch(d){i(d);}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,a);s((r=r.apply(t,e)).next());}),Qo=function(t,e){this[0]=t,this[1]=e;},Oy=(t,e,r)=>{var n=(a,s,u,d)=>{try{var f=r[a](s),g=(s=f.value)instanceof Qo,C=f.done;Promise.resolve(g?s[0]:s).then(S=>g?n(a==="return"?a:"next",s[1]?{done:S.done,value:S.value}:S,u,d):u({value:S,done:C})).catch(S=>n("throw",S,u,d));}catch(S){d(S);}},i=a=>o[a]=s=>new Promise((u,d)=>n(a,s,u,d)),o={};return r=r.apply(t,e),o[Us("asyncIterator")]=()=>o,i("next"),i("throw"),i("return"),o},xy=t=>{var e=t[Us("asyncIterator")],r=!1,n,i={};return e==null?(e=t[Us("iterator")](),n=o=>i[o]=a=>e[o](a)):(e=e.call(t),n=o=>i[o]=a=>{if(r){if(r=!1,o==="throw")throw a;return a}return r=!0,{done:!1,value:new Qo(new Promise(s=>{var u=e[o](a);u instanceof Object||FM("Object expected"),s(u);}),1)}}),i[Us("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=o=>{throw o},"return"in e&&n("return"),i},df=(t,e,r)=>(e=t[Us("asyncIterator")])?e.call(t):(t=t[Us("iterator")](),e={},r=(n,i)=>(i=t[n])&&(e[n]=o=>new Promise((a,s,u)=>(o=i.call(t,o),u=o.done,Promise.resolve(o.value).then(d=>a({value:d,done:u}),s)))),r("next"),r("return"),e);var p=Qt(()=>{});var h=Qt(()=>{Ar(Qn(),1);});var HT=ce((LW,jT)=>{y();p();h();m();var Kt=jT.exports={},Xn,ei;function ky(){throw new Error("setTimeout has not been defined")}function Py(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Xn=setTimeout:Xn=ky;}catch(t){Xn=ky;}try{typeof clearTimeout=="function"?ei=clearTimeout:ei=Py;}catch(t){ei=Py;}})();function FT(t){if(Xn===setTimeout)return setTimeout(t,0);if((Xn===ky||!Xn)&&setTimeout)return Xn=setTimeout,setTimeout(t,0);try{return Xn(t,0)}catch(e){try{return Xn.call(null,t,0)}catch(r){return Xn.call(this,t,0)}}}function qM(t){if(ei===clearTimeout)return clearTimeout(t);if((ei===Py||!ei)&&clearTimeout)return ei=clearTimeout,clearTimeout(t);try{return ei(t)}catch(e){try{return ei.call(null,t)}catch(r){return ei.call(this,t)}}}var Ii=[],Ls=!1,Xo,ff=-1;function jM(){!Ls||!Xo||(Ls=!1,Xo.length?Ii=Xo.concat(Ii):ff=-1,Ii.length&&zT());}function zT(){if(!Ls){var t=FT(jM);Ls=!0;for(var e=Ii.length;e;){for(Xo=Ii,Ii=[];++ff<e;)Xo&&Xo[ff].run();ff=-1,e=Ii.length;}Xo=null,Ls=!1,qM(t);}}Kt.nextTick=function(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];Ii.push(new qT(t,e)),Ii.length===1&&!Ls&&FT(zT);};function qT(t,e){this.fun=t,this.array=e;}qT.prototype.run=function(){this.fun.apply(null,this.array);};Kt.title="browser";Kt.browser=!0;Kt.env={};Kt.argv=[];Kt.version="";Kt.versions={};function Ni(){}Kt.on=Ni;Kt.addListener=Ni;Kt.once=Ni;Kt.off=Ni;Kt.removeListener=Ni;Kt.removeAllListeners=Ni;Kt.emit=Ni;Kt.prependListener=Ni;Kt.prependOnceListener=Ni;Kt.listeners=function(t){return []};Kt.binding=function(t){throw new Error("process.binding is not supported")};Kt.cwd=function(){return "/"};Kt.chdir=function(t){throw new Error("process.chdir is not supported")};Kt.umask=function(){return 0};});var A,m=Qt(()=>{A=Ar(HT(),1);});var GT=ce(pf=>{y();p();h();m();pf.byteLength=$M;pf.toByteArray=GM;pf.fromByteArray=YM;var ti=[],dn=[],HM=typeof Uint8Array!="undefined"?Uint8Array:Array,My="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ea=0,$T=My.length;ea<$T;++ea)ti[ea]=My[ea],dn[My.charCodeAt(ea)]=ea;var ea,$T;dn[45]=62;dn[95]=63;function VT(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return [r,n]}function $M(t){var e=VT(t),r=e[0],n=e[1];return (r+n)*3/4-n}function VM(t,e,r){return (e+r)*3/4-r}function GM(t){var e,r=VT(t),n=r[0],i=r[1],o=new HM(VM(t,n,i)),a=0,s=i>0?n-4:n,u;for(u=0;u<s;u+=4)e=dn[t.charCodeAt(u)]<<18|dn[t.charCodeAt(u+1)]<<12|dn[t.charCodeAt(u+2)]<<6|dn[t.charCodeAt(u+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=dn[t.charCodeAt(u)]<<2|dn[t.charCodeAt(u+1)]>>4,o[a++]=e&255),i===1&&(e=dn[t.charCodeAt(u)]<<10|dn[t.charCodeAt(u+1)]<<4|dn[t.charCodeAt(u+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function WM(t){return ti[t>>18&63]+ti[t>>12&63]+ti[t>>6&63]+ti[t&63]}function KM(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(WM(n));return i.join("")}function YM(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(KM(t,a,a+o>s?s:a+o));return n===1?(e=t[r-1],i.push(ti[e>>2]+ti[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(ti[e>>10]+ti[e>>4&63]+ti[e<<2&63]+"=")),i.join("")}});var WT=ce(Uy=>{y();p();h();m();Uy.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,u=(1<<s)-1,d=u>>1,f=-7,g=r?i-1:0,C=r?-1:1,S=t[e+g];for(g+=C,o=S&(1<<-f)-1,S>>=-f,f+=s;f>0;o=o*256+t[e+g],g+=C,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=a*256+t[e+g],g+=C,f-=8);if(o===0)o=1-d;else {if(o===u)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-d;}return (S?-1:1)*a*Math.pow(2,o-n)};Uy.write=function(t,e,r,n,i,o){var a,s,u,d=o*8-i-1,f=(1<<d)-1,g=f>>1,C=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:o-1,E=n?1:-1,T=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+g>=1?e+=C/u:e+=C*Math.pow(2,1-g),e*u>=2&&(a++,u/=2),a+g>=f?(s=0,a=f):a+g>=1?(s=(e*u-1)*Math.pow(2,i),a=a+g):(s=e*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;t[r+S]=s&255,S+=E,s/=256,i-=8);for(a=a<<i|s,d+=i;d>0;t[r+S]=a&255,S+=E,a/=256,d-=8);t[r+S-E]|=T*128;};});var Qn=ce(js=>{y();p();h();m();var By=GT(),zs=WT(),KT=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;js.Buffer=ie;js.SlowBuffer=t1;js.INSPECT_MAX_BYTES=50;var hf=2147483647;js.kMaxLength=hf;ie.TYPED_ARRAY_SUPPORT=JM();!ie.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 JM(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return !1}}Object.defineProperty(ie.prototype,"parent",{enumerable:!0,get:function(){if(ie.isBuffer(this))return this.buffer}});Object.defineProperty(ie.prototype,"offset",{enumerable:!0,get:function(){if(ie.isBuffer(this))return this.byteOffset}});function Oi(t){if(t>hf)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,ie.prototype),e}function ie(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return zy(t)}return QT(t,e,r)}ie.poolSize=8192;function QT(t,e,r){if(typeof t=="string")return QM(t,e);if(ArrayBuffer.isView(t))return XM(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(ri(t,ArrayBuffer)||t&&ri(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ri(t,SharedArrayBuffer)||t&&ri(t.buffer,SharedArrayBuffer)))return Ly(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return ie.from(n,e,r);let i=e1(t);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return ie.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}ie.from=function(t,e,r){return QT(t,e,r)};Object.setPrototypeOf(ie.prototype,Uint8Array.prototype);Object.setPrototypeOf(ie,Uint8Array);function XT(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function ZM(t,e,r){return XT(t),t<=0?Oi(t):e!==void 0?typeof r=="string"?Oi(t).fill(e,r):Oi(t).fill(e):Oi(t)}ie.alloc=function(t,e,r){return ZM(t,e,r)};function zy(t){return XT(t),Oi(t<0?0:qy(t)|0)}ie.allocUnsafe=function(t){return zy(t)};ie.allocUnsafeSlow=function(t){return zy(t)};function QM(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!ie.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=ew(t,e)|0,n=Oi(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Dy(t){let e=t.length<0?0:qy(t.length)|0,r=Oi(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function XM(t){if(ri(t,Uint8Array)){let e=new Uint8Array(t);return Ly(e.buffer,e.byteOffset,e.byteLength)}return Dy(t)}function Ly(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,ie.prototype),n}function e1(t){if(ie.isBuffer(t)){let e=qy(t.length)|0,r=Oi(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||Hy(t.length)?Oi(0):Dy(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Dy(t.data)}function qy(t){if(t>=hf)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+hf.toString(16)+" bytes");return t|0}function t1(t){return +t!=t&&(t=0),ie.alloc(+t)}ie.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==ie.prototype};ie.compare=function(e,r){if(ri(e,Uint8Array)&&(e=ie.from(e,e.offset,e.byteLength)),ri(r,Uint8Array)&&(r=ie.from(r,r.offset,r.byteLength)),!ie.isBuffer(e)||!ie.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0};ie.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}};ie.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ie.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=ie.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){let a=e[n];if(ri(a,Uint8Array))o+a.length>i.length?(ie.isBuffer(a)||(a=ie.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(ie.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length;}return i};function ew(t,e){if(ie.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||ri(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Fy(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return lw(t).length;default:if(i)return n?-1:Fy(t).length;e=(""+e).toLowerCase(),i=!0;}}ie.byteLength=ew;function r1(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return "";for(t||(t="utf8");;)switch(t){case"hex":return f1(this,e,r);case"utf8":case"utf-8":return rw(this,e,r);case"ascii":return u1(this,e,r);case"latin1":case"binary":return d1(this,e,r);case"base64":return c1(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p1(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0;}}ie.prototype._isBuffer=!0;function ta(t,e,r){let n=t[e];t[e]=t[r],t[r]=n;}ie.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)ta(this,r,r+1);return this};ie.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)ta(this,r,r+3),ta(this,r+1,r+2);return this};ie.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)ta(this,r,r+7),ta(this,r+1,r+6),ta(this,r+2,r+5),ta(this,r+3,r+4);return this};ie.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?rw(this,0,e):r1.apply(this,arguments)};ie.prototype.toLocaleString=ie.prototype.toString;ie.prototype.equals=function(e){if(!ie.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:ie.compare(this,e)===0};ie.prototype.inspect=function(){let e="",r=js.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};KT&&(ie.prototype[KT]=ie.prototype.inspect);ie.prototype.compare=function(e,r,n,i,o){if(ri(e,Uint8Array)&&(e=ie.from(e,e.offset,e.byteLength)),!ie.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return -1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let a=o-i,s=n-r,u=Math.min(a,s),d=this.slice(i,o),f=e.slice(r,n);for(let g=0;g<u;++g)if(d[g]!==f[g]){a=d[g],s=f[g];break}return a<s?-1:s<a?1:0};function tw(t,e,r,n,i){if(t.length===0)return -1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Hy(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1;}else if(r<0)if(i)r=0;else return -1;if(typeof e=="string"&&(e=ie.from(e,n)),ie.isBuffer(e))return e.length===0?-1:YT(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):YT(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function YT(t,e,r,n,i){let o=1,a=t.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return -1;o=2,a/=2,s/=2,r/=2;}function u(f,g){return o===1?f[g]:f.readUInt16BE(g*o)}let d;if(i){let f=-1;for(d=r;d<a;d++)if(u(t,d)===u(e,f===-1?0:d-f)){if(f===-1&&(f=d),d-f+1===s)return f*o}else f!==-1&&(d-=d-f),f=-1;}else for(r+s>a&&(r=a-s),d=r;d>=0;d--){let f=!0;for(let g=0;g<s;g++)if(u(t,d+g)!==u(e,g)){f=!1;break}if(f)return d}return -1}ie.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};ie.prototype.indexOf=function(e,r,n){return tw(this,e,r,n,!0)};ie.prototype.lastIndexOf=function(e,r,n){return tw(this,e,r,n,!1)};function n1(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let a;for(a=0;a<n;++a){let s=parseInt(e.substr(a*2,2),16);if(Hy(s))return a;t[r+a]=s;}return a}function i1(t,e,r,n){return mf(Fy(e,t.length-r),t,r,n)}function o1(t,e,r,n){return mf(g1(e),t,r,n)}function a1(t,e,r,n){return mf(lw(e),t,r,n)}function s1(t,e,r,n){return mf(v1(e,t.length-r),t,r,n)}ie.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return n1(this,e,r,n);case"utf8":case"utf-8":return i1(this,e,r,n);case"ascii":case"latin1":case"binary":return o1(this,e,r,n);case"base64":return a1(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s1(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0;}};ie.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function c1(t,e,r){return e===0&&r===t.length?By.fromByteArray(t):By.fromByteArray(t.slice(e,r))}function rw(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){let u,d,f,g;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],(u&192)===128&&(g=(o&31)<<6|u&63,g>127&&(a=g));break;case 3:u=t[i+1],d=t[i+2],(u&192)===128&&(d&192)===128&&(g=(o&15)<<12|(u&63)<<6|d&63,g>2047&&(g<55296||g>57343)&&(a=g));break;case 4:u=t[i+1],d=t[i+2],f=t[i+3],(u&192)===128&&(d&192)===128&&(f&192)===128&&(g=(o&15)<<18|(u&63)<<12|(d&63)<<6|f&63,g>65535&&g<1114112&&(a=g));}}a===null?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=s;}return l1(n)}var JT=4096;function l1(t){let e=t.length;if(e<=JT)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=JT));return r}function u1(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function d1(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function f1(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=e;o<r;++o)i+=E1[t[o]];return i}function p1(t,e,r){let n=t.slice(e,r),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}ie.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,ie.prototype),i};function fr(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}ie.prototype.readUintLE=ie.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||fr(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return i};ie.prototype.readUintBE=ie.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||fr(e,r,this.length);let i=this[e+--r],o=1;for(;r>0&&(o*=256);)i+=this[e+--r]*o;return i};ie.prototype.readUint8=ie.prototype.readUInt8=function(e,r){return e=e>>>0,r||fr(e,1,this.length),this[e]};ie.prototype.readUint16LE=ie.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||fr(e,2,this.length),this[e]|this[e+1]<<8};ie.prototype.readUint16BE=ie.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||fr(e,2,this.length),this[e]<<8|this[e+1]};ie.prototype.readUint32LE=ie.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};ie.prototype.readUint32BE=ie.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};ie.prototype.readBigUInt64LE=ao(function(e){e=e>>>0,qs(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&Sl(e,this.length-8);let i=r+this[++e]*Re(2,8)+this[++e]*Re(2,16)+this[++e]*Re(2,24),o=this[++e]+this[++e]*Re(2,8)+this[++e]*Re(2,16)+n*Re(2,24);return BigInt(i)+(BigInt(o)<<BigInt(32))});ie.prototype.readBigUInt64BE=ao(function(e){e=e>>>0,qs(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&Sl(e,this.length-8);let i=r*Re(2,24)+this[++e]*Re(2,16)+this[++e]*Re(2,8)+this[++e],o=this[++e]*Re(2,24)+this[++e]*Re(2,16)+this[++e]*Re(2,8)+n;return (BigInt(i)<<BigInt(32))+BigInt(o)});ie.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||fr(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};ie.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||fr(e,r,this.length);let i=r,o=1,a=this[e+--i];for(;i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};ie.prototype.readInt8=function(e,r){return e=e>>>0,r||fr(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ie.prototype.readInt16LE=function(e,r){e=e>>>0,r||fr(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};ie.prototype.readInt16BE=function(e,r){e=e>>>0,r||fr(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};ie.prototype.readInt32LE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};ie.prototype.readInt32BE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};ie.prototype.readBigInt64LE=ao(function(e){e=e>>>0,qs(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&Sl(e,this.length-8);let i=this[e+4]+this[e+5]*Re(2,8)+this[e+6]*Re(2,16)+(n<<24);return (BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*Re(2,8)+this[++e]*Re(2,16)+this[++e]*Re(2,24))});ie.prototype.readBigInt64BE=ao(function(e){e=e>>>0,qs(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&Sl(e,this.length-8);let i=(r<<24)+this[++e]*Re(2,16)+this[++e]*Re(2,8)+this[++e];return (BigInt(i)<<BigInt(32))+BigInt(this[++e]*Re(2,24)+this[++e]*Re(2,16)+this[++e]*Re(2,8)+n)});ie.prototype.readFloatLE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),zs.read(this,e,!0,23,4)};ie.prototype.readFloatBE=function(e,r){return e=e>>>0,r||fr(e,4,this.length),zs.read(this,e,!1,23,4)};ie.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||fr(e,8,this.length),zs.read(this,e,!0,52,8)};ie.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||fr(e,8,this.length),zs.read(this,e,!1,52,8)};function Fr(t,e,r,n,i,o){if(!ie.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}ie.prototype.writeUintLE=ie.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Fr(this,e,r,n,s,0);}let o=1,a=0;for(this[r]=e&255;++a<n&&(o*=256);)this[r+a]=e/o&255;return r+n};ie.prototype.writeUintBE=ie.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Fr(this,e,r,n,s,0);}let o=n-1,a=1;for(this[r+o]=e&255;--o>=0&&(a*=256);)this[r+o]=e/a&255;return r+n};ie.prototype.writeUint8=ie.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,1,255,0),this[r]=e&255,r+1};ie.prototype.writeUint16LE=ie.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};ie.prototype.writeUint16BE=ie.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};ie.prototype.writeUint32LE=ie.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};ie.prototype.writeUint32BE=ie.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function nw(t,e,r,n,i){cw(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function iw(t,e,r,n,i){cw(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o=o>>8,t[r+6]=o,o=o>>8,t[r+5]=o,o=o>>8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}ie.prototype.writeBigUInt64LE=ao(function(e,r=0){return nw(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});ie.prototype.writeBigUInt64BE=ao(function(e,r=0){return iw(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});ie.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Fr(this,e,r,n,u-1,-u);}let o=0,a=1,s=0;for(this[r]=e&255;++o<n&&(a*=256);)e<0&&s===0&&this[r+o-1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};ie.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Fr(this,e,r,n,u-1,-u);}let o=n-1,a=1,s=0;for(this[r+o]=e&255;--o>=0&&(a*=256);)e<0&&s===0&&this[r+o+1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};ie.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};ie.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};ie.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};ie.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};ie.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Fr(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};ie.prototype.writeBigInt64LE=ao(function(e,r=0){return nw(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ie.prototype.writeBigInt64BE=ao(function(e,r=0){return iw(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ow(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function aw(t,e,r,n,i){return e=+e,r=r>>>0,i||ow(t,e,r,4),zs.write(t,e,r,n,23,4),r+4}ie.prototype.writeFloatLE=function(e,r,n){return aw(this,e,r,!0,n)};ie.prototype.writeFloatBE=function(e,r,n){return aw(this,e,r,!1,n)};function sw(t,e,r,n,i){return e=+e,r=r>>>0,i||ow(t,e,r,8),zs.write(t,e,r,n,52,8),r+8}ie.prototype.writeDoubleLE=function(e,r,n){return sw(this,e,r,!0,n)};ie.prototype.writeDoubleBE=function(e,r,n){return sw(this,e,r,!1,n)};ie.prototype.copy=function(e,r,n,i){if(!ie.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let o=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),o};ie.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!ie.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let a=e.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(e=a);}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else {let a=ie.isBuffer(e)?e:ie.from(e,i),s=a.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=a[o%s];}return this};var Fs={};function jy(t,e,r){Fs[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name;}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0});}toString(){return `${this.name} [${t}]: ${this.message}`}};}jy("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);jy("ERR_INVALID_ARG_TYPE",function(t,e){return `The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);jy("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>Re(2,32)?i=ZT(String(r)):typeof r=="bigint"&&(i=String(r),(r>Re(BigInt(2),BigInt(32))||r<-Re(BigInt(2),BigInt(32)))&&(i=ZT(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function ZT(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 h1(t,e,r){qs(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&Sl(e,t.length-(r+1));}function cw(t,e,r,n,i,o){if(t>r||t<e){let a=typeof e=="bigint"?"n":"",s;throw e===0||e===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:s=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`,new Fs.ERR_OUT_OF_RANGE("value",s,t)}h1(n,i,o);}function qs(t,e){if(typeof t!="number")throw new Fs.ERR_INVALID_ARG_TYPE(e,"number",t)}function Sl(t,e,r){throw Math.floor(t)!==t?(qs(t,r),new Fs.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new Fs.ERR_BUFFER_OUT_OF_BOUNDS:new Fs.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${e}`,t)}var m1=/[^+/0-9A-Za-z-_]/g;function y1(t){if(t=t.split("=")[0],t=t.trim().replace(m1,""),t.length<2)return "";for(;t.length%4!==0;)t=t+"=";return t}function Fy(t,e){e=e||1/0;let r,n=t.length,i=null,o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536;}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return o}function g1(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function v1(t,e){let r,n,i,o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function lw(t){return By.toByteArray(y1(t))}function mf(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function ri(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Hy(t){return t!==t}var E1=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i];}return e}();function ao(t){return typeof BigInt=="undefined"?C1:t}function C1(){throw new Error("BigInt not supported")}});var R,y=Qt(()=>{R=Ar(Qn());});var na=ce(($y,dw)=>{y();p();h();m();var gf=Qn(),ni=gf.Buffer;function uw(t,e){for(var r in t)e[r]=t[r];}ni.from&&ni.alloc&&ni.allocUnsafe&&ni.allocUnsafeSlow?dw.exports=gf:(uw(gf,$y),$y.Buffer=ra);function ra(t,e,r){return ni(t,e,r)}ra.prototype=Object.create(ni.prototype);uw(ni,ra);ra.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ni(t,e,r)};ra.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ni(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};ra.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ni(t)};ra.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return gf.SlowBuffer(t)};});function bt(){bt.init.call(this);}function vf(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function Sw(t){return t._maxListeners===void 0?bt.defaultMaxListeners:t._maxListeners}function mw(t,e,r,n){var i,o,a,s;if(vf(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),a===void 0)a=o[e]=r,++t._eventsCount;else if(typeof a=="function"?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=Sw(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s);}return t}function S1(){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 yw(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=S1.bind(n);return i.listener=r,n.wrapFn=i,i}function gw(t,e,r){var n=t._events;if(n===void 0)return [];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?function(o){for(var a=new Array(o.length),s=0;s<a.length;++s)a[s]=o[s].listener||o[s];return a}(i):Tw(i,i.length)}function vw(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function Tw(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}var Ew,Cw,Hs,fw,pw,hw,zt,ia=Qt(()=>{y();p();h();m();Hs=typeof Reflect=="object"?Reflect:null,fw=Hs&&typeof Hs.apply=="function"?Hs.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};Cw=Hs&&typeof Hs.ownKeys=="function"?Hs.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};pw=Number.isNaN||function(t){return t!=t};Ew=bt,bt.EventEmitter=bt,bt.prototype._events=void 0,bt.prototype._eventsCount=0,bt.prototype._maxListeners=void 0;hw=10;Object.defineProperty(bt,"defaultMaxListeners",{enumerable:!0,get:function(){return hw},set:function(t){if(typeof t!="number"||t<0||pw(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");hw=t;}}),bt.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;},bt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||pw(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},bt.prototype.getMaxListeners=function(){return Sw(this)},bt.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n=t==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return !1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(s===void 0)return !1;if(typeof s=="function")fw(s,this,e);else {var u=s.length,d=Tw(s,u);for(r=0;r<u;++r)fw(d[r],this,e);}return !0},bt.prototype.addListener=function(t,e){return mw(this,t,e,!1)},bt.prototype.on=bt.prototype.addListener,bt.prototype.prependListener=function(t,e){return mw(this,t,e,!0)},bt.prototype.once=function(t,e){return vf(e),this.on(t,yw(this,t,e)),this},bt.prototype.prependOnceListener=function(t,e){return vf(e),this.prependListener(t,yw(this,t,e)),this},bt.prototype.removeListener=function(t,e){var r,n,i,o,a;if(vf(e),(n=this._events)===void 0)return this;if((r=n[t])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;i===0?r.shift():function(s,u){for(;u+1<s.length;u++)s[u]=s[u+1];s.pop();}(r,i),r.length===1&&(n[t]=r[0]),n.removeListener!==void 0&&this.emit("removeListener",t,a||e);}return this},bt.prototype.off=bt.prototype.removeListener,bt.prototype.removeAllListeners=function(t){var e,r,n;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var i,o=Object.keys(r);for(n=0;n<o.length;++n)(i=o[n])!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},bt.prototype.listeners=function(t){return gw(this,t,!0)},bt.prototype.rawListeners=function(t){return gw(this,t,!1)},bt.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):vw.call(t,e)},bt.prototype.listenerCount=vw,bt.prototype.eventNames=function(){return this._eventsCount>0?Cw(this._events):[]};zt=Ew;zt.EventEmitter;zt.defaultMaxListeners;zt.init;zt.listenerCount;zt.EventEmitter;zt.defaultMaxListeners;zt.init;zt.listenerCount;});var Ef={};Ut(Ef,{EventEmitter:()=>T1,default:()=>zt,defaultMaxListeners:()=>w1,init:()=>A1,listenerCount:()=>b1,on:()=>R1,once:()=>_1});var T1,w1,A1,b1,R1,_1,oa=Qt(()=>{y();p();h();m();ia();ia();zt.once=function(t,e){return new Promise((r,n)=>{function i(...a){o!==void 0&&t.removeListener("error",o),r(a);}let o;e!=="error"&&(o=a=>{t.removeListener(name,i),n(a);},t.once("error",o)),t.once(e,i);})};zt.on=function(t,e){let r=[],n=[],i=null,o=!1,a={next(){return L(this,null,function*(){let f=r.shift();if(f)return createIterResult(f,!1);if(i){let g=Promise.reject(i);return i=null,g}return o?createIterResult(void 0,!0):new Promise((g,C)=>n.push({resolve:g,reject:C}))})},return(){return L(this,null,function*(){t.removeListener(e,s),t.removeListener("error",u),o=!0;for(let f of n)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)})},throw(f){i=f,t.removeListener(e,s),t.removeListener("error",u);},[Symbol.asyncIterator](){return this}};return t.on(e,s),t.on("error",u),a;function s(...f){let g=n.shift();g?g.resolve(createIterResult(f,!1)):r.push(f);}function u(f){o=!0;let g=n.shift();g?g.reject(f):i=f,a.return();}};({EventEmitter:T1,defaultMaxListeners:w1,init:A1,listenerCount:b1,on:R1,once:_1}=zt);});var xi=ce((qK,Vy)=>{y();p();h();m();typeof Object.create=="function"?Vy.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:Vy.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e;}};});var Gy=ce((GK,ww)=>{y();p();h();m();ww.exports=(oa(),ar(Ef)).EventEmitter;});function Wy(){throw new Error("setTimeout has not been defined")}function Ky(){throw new Error("clearTimeout has not been defined")}function Rw(t){if(Pi===setTimeout)return setTimeout(t,0);if((Pi===Wy||!Pi)&&setTimeout)return Pi=setTimeout,setTimeout(t,0);try{return Pi(t,0)}catch(e){try{return Pi.call(null,t,0)}catch(r){return Pi.call(this||Vs,t,0)}}}function I1(){$s&&aa&&($s=!1,aa.length?Ui=aa.concat(Ui):Cf=-1,Ui.length&&_w());}function _w(){if(!$s){var t=Rw(I1);$s=!0;for(var e=Ui.length;e;){for(aa=Ui,Ui=[];++Cf<e;)aa&&aa[Cf].run();Cf=-1,e=Ui.length;}aa=null,$s=!1,function(r){if(Mi===clearTimeout)return clearTimeout(r);if((Mi===Ky||!Mi)&&clearTimeout)return Mi=clearTimeout,clearTimeout(r);try{Mi(r);}catch(n){try{return Mi.call(null,r)}catch(i){return Mi.call(this||Vs,r)}}}(t);}}function Aw(t,e){(this||Vs).fun=t,(this||Vs).array=e;}function ki(){}var bw,Pi,Mi,Vs,Yt,aa,Ui,$s,Cf,Rt,so=Qt(()=>{y();p();h();m();Vs=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:globalThis,Yt=bw={};(function(){try{Pi=typeof setTimeout=="function"?setTimeout:Wy;}catch(t){Pi=Wy;}try{Mi=typeof clearTimeout=="function"?clearTimeout:Ky;}catch(t){Mi=Ky;}})();Ui=[],$s=!1,Cf=-1;Yt.nextTick=function(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];Ui.push(new Aw(t,e)),Ui.length!==1||$s||Rw(_w);},Aw.prototype.run=function(){(this||Vs).fun.apply(null,(this||Vs).array);},Yt.title="browser",Yt.browser=!0,Yt.env={},Yt.argv=[],Yt.version="",Yt.versions={},Yt.on=ki,Yt.addListener=ki,Yt.once=ki,Yt.off=ki,Yt.removeListener=ki,Yt.removeAllListeners=ki,Yt.emit=ki,Yt.prependListener=ki,Yt.prependOnceListener=ki,Yt.listeners=function(t){return []},Yt.binding=function(t){throw new Error("process.binding is not supported")},Yt.cwd=function(){return "/"},Yt.chdir=function(t){throw new Error("process.chdir is not supported")},Yt.umask=function(){return 0};Rt=bw;Rt.addListener;Rt.argv;Rt.binding;Rt.browser;Rt.chdir;Rt.cwd;Rt.emit;Rt.env;Rt.listeners;Rt.nextTick;Rt.off;Rt.on;Rt.once;Rt.prependListener;Rt.prependOnceListener;Rt.removeAllListeners;Rt.removeListener;Rt.title;Rt.umask;Rt.version;Rt.versions;});function la(t){return t.call.bind(t)}function bl(t,e){if(typeof t!="object")return !1;try{return e(t),!0}catch(r){return !1}}function Nw(t){return zr&&Yr?fn(t)!==void 0:$w(t)||Vw(t)||Gw(t)||Ww(t)||Kw(t)||Yw(t)||Jw(t)||Zw(t)||Qw(t)||Xw(t)||eA(t)}function $w(t){return zr&&Yr?fn(t)==="Uint8Array":Bt(t)==="[object Uint8Array]"||L1(t)&&t.buffer!==void 0}function Vw(t){return zr&&Yr?fn(t)==="Uint8ClampedArray":Bt(t)==="[object Uint8ClampedArray]"}function Gw(t){return zr&&Yr?fn(t)==="Uint16Array":Bt(t)==="[object Uint16Array]"}function Ww(t){return zr&&Yr?fn(t)==="Uint32Array":Bt(t)==="[object Uint32Array]"}function Kw(t){return zr&&Yr?fn(t)==="Int8Array":Bt(t)==="[object Int8Array]"}function Yw(t){return zr&&Yr?fn(t)==="Int16Array":Bt(t)==="[object Int16Array]"}function Jw(t){return zr&&Yr?fn(t)==="Int32Array":Bt(t)==="[object Int32Array]"}function Zw(t){return zr&&Yr?fn(t)==="Float32Array":Bt(t)==="[object Float32Array]"}function Qw(t){return zr&&Yr?fn(t)==="Float64Array":Bt(t)==="[object Float64Array]"}function Xw(t){return zr&&Yr?fn(t)==="BigInt64Array":Bt(t)==="[object BigInt64Array]"}function eA(t){return zr&&Yr?fn(t)==="BigUint64Array":Bt(t)==="[object BigUint64Array]"}function Sf(t){return Bt(t)==="[object Map]"}function Tf(t){return Bt(t)==="[object Set]"}function wf(t){return Bt(t)==="[object WeakMap]"}function Yy(t){return Bt(t)==="[object WeakSet]"}function _f(t){return Bt(t)==="[object ArrayBuffer]"}function Ow(t){return typeof ArrayBuffer!="undefined"&&(_f.working?_f(t):t instanceof ArrayBuffer)}function If(t){return Bt(t)==="[object DataView]"}function xw(t){return typeof DataView!="undefined"&&(If.working?If(t):t instanceof DataView)}function Nf(t){return Bt(t)==="[object SharedArrayBuffer]"}function kw(t){return typeof SharedArrayBuffer!="undefined"&&(Nf.working?Nf(t):t instanceof SharedArrayBuffer)}function Pw(t){return bl(t,H1)}function Mw(t){return bl(t,$1)}function Uw(t){return bl(t,V1)}function Bw(t){return Hw&&bl(t,G1)}function Dw(t){return eg&&bl(t,W1)}function co(t,e){var r={seen:[],stylize:J1};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tg(e)?r.showHidden=e:e&&re._extend(r,e),ca(r.showHidden)&&(r.showHidden=!1),ca(r.depth)&&(r.depth=2),ca(r.colors)&&(r.colors=!1),ca(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Y1),Of(r,t,r.depth)}function Y1(t,e){var r=co.styles[e];return r?"\x1B["+co.colors[r][0]+"m"+t+"\x1B["+co.colors[r][1]+"m":t}function J1(t,e){return t}function Of(t,e,r){if(t.customInspect&&e&&Rf(e.inspect)&&e.inspect!==re.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return xf(n)||(n=Of(t,n,r)),n}var i=function(C,S){if(ca(S))return C.stylize("undefined","undefined");if(xf(S)){var E="'"+JSON.stringify(S).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return C.stylize(E,"string")}if(nA(S))return C.stylize(""+S,"number");if(tg(S))return C.stylize(""+S,"boolean");if(Mf(S))return C.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),a=function(C){var S={};return C.forEach(function(E,T){S[E]=!0;}),S}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Al(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Jy(e);if(o.length===0){if(Rf(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(wl(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(kf(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Al(e))return Jy(e)}var u,d="",f=!1,g=["{","}"];return rA(e)&&(f=!0,g=["[","]"]),Rf(e)&&(d=" [Function"+(e.name?": "+e.name:"")+"]"),wl(e)&&(d=" "+RegExp.prototype.toString.call(e)),kf(e)&&(d=" "+Date.prototype.toUTCString.call(e)),Al(e)&&(d=" "+Jy(e)),o.length!==0||f&&e.length!=0?r<0?wl(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),u=f?function(C,S,E,T,_){for(var P=[],M=0,D=S.length;M<D;++M)iA(S,String(M))?P.push(Zy(C,S,E,T,String(M),!0)):P.push("");return _.forEach(function(V){V.match(/^\d+$/)||P.push(Zy(C,S,E,T,V,!0));}),P}(t,e,r,a,o):o.map(function(C){return Zy(t,e,r,a,C,f)}),t.seen.pop(),function(C,S,E){var T=0;return C.reduce(function(_,P){return T++,P.indexOf(` `)>=0&&T++,_+P.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?E[0]+(S===""?"":S+` `)+" "+C.join(`, `)+" "+E[1]:E[0]+S+" "+C.join(", ")+" "+E[1]}(u,d,g)):g[0]+d+g[1]}function Jy(t){return "["+Error.prototype.toString.call(t)+"]"}function Zy(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),iA(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=Mf(r)?Of(t,u.value,null):Of(t,u.value,r-1)).indexOf(` `)>-1&&(s=o?s.split(` `).map(function(d){return " "+d}).join(` `).substr(2):` `+s.split(` `).map(function(d){return " "+d}).join(` `)):s=t.stylize("[Circular]","special")),ca(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"));}return a+": "+s}function rA(t){return Array.isArray(t)}function tg(t){return typeof t=="boolean"}function Mf(t){return t===null}function nA(t){return typeof t=="number"}function xf(t){return typeof t=="string"}function ca(t){return t===void 0}function wl(t){return Gs(t)&&rg(t)==="[object RegExp]"}function Gs(t){return typeof t=="object"&&t!==null}function kf(t){return Gs(t)&&rg(t)==="[object Date]"}function Al(t){return Gs(t)&&(rg(t)==="[object Error]"||t instanceof Error)}function Rf(t){return typeof t=="function"}function rg(t){return Object.prototype.toString.call(t)}function Qy(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q1(){var t=new Date,e=[Qy(t.getHours()),Qy(t.getMinutes()),Qy(t.getSeconds())].join(":");return [t.getDate(),Z1[t.getMonth()],e].join(" ")}function iA(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function X1(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r;}return e(t)}var N1,Xy,Pf,Fw,O1,x1,k1,P1,M1,zw,qw,Iw,U1,B1,D1,jw,at,L1,F1,z1,Hw,eg,Yr,zr,q1,Bt,H1,$1,V1,Tl,re,ii,Lw,K1,Af,tA,bf,Z1,sa,lo=Qt(()=>{y();p();h();m();so();N1=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Xy=Object.prototype.toString,Pf=function(t){return !(N1&&t&&typeof t=="object"&&Symbol.toStringTag in t)&&Xy.call(t)==="[object Arguments]"},Fw=function(t){return !!Pf(t)||t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Xy.call(t)!=="[o