varar=Object.create;vartn=Object.defineProperty;varsr=Object.getOwnPropertyDescriptor;varor=Object.getOwnPropertyNames;varrr=Object.getPrototypeOf,cr=Object.prototype.hasOwnProperty;varpr=(i,e,t)=>eini?tn(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;varO=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);varlr=(i,e,t,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letaofor(e))!cr.call(i,a)&&a!==t&&tn(i,a,{get:()=>e[a],enumerable:!(n=sr(e,a))||n.enumerable});returni};varX=(i,e,t)=>(t=i!=null?ar(rr(i)):{},lr(e||!i||!i.__esModule?tn(t,"default",{value:i,enumerable:!0}):t,i));varL=(i,e,t)=>(pr(i,typeofe!="symbol"?e+"":e,t),t),nn=(i,e,t)=>{if(!e.has(i))throwTypeError("Cannot "+t)};varr=(i,e,t)=>(nn(i,e,"read from private field"),t?t.call(i):e.get(i)),C=(i,e,t)=>{if(e.has(i))throwTypeError("Cannot add the same private member more than once");einstanceofWeakSet?e.add(i):e.set(i,t)},y=(i,e,t,n)=>(nn(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),ft=(i,e,t,n)=>({set_(a){y(i,e,a,t)},get_(){returnr(i,e,n)}}),E=(i,e,t)=>(nn(i,e,"access private method"),t);varAa=O((Hl,Ca)=>{varEa=require("stream").Stream,$r=require("util");Ca.exports=fe;functionfe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}$r.inherits(fe,Ea);fe.create=function(i,e){vart=newthis;e=e||{};for(varnine)t[n]=e[n];t.source=i;vara=i.emit;returni.emit=function(){returnt._handleEmit(arguments),a.apply(i,arguments)},i.on("error",function(){}),t.pauseStream&&i.pause(),t};Object.defineProperty(fe.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){returnthis.source.readable}});fe.prototype.setEncoding=function(){returnthis.source.setEncoding.apply(this.source,arguments)};fe.prototype.resume=function(){this._released||this.release(),this.source.resume()};fe.prototype.pause=function(){this.source.pause()};fe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(i){this.emit.apply(this,i)}.bind(this)),this._bufferedEvents=[]};fe.prototype.pipe=function(){vari=Ea.prototype.pipe.apply(this,arguments);returnthis.resume(),i};fe.prototype._handleEmit=function(i){if(this._released){this.emit.apply(this,i);return}i[0]==="data"&&(this.dataSize+=i[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(i)};fe.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;vari="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",newError(i))}}});varTa=O((Ml,_a)=>{varVr=require("util"),Sa=require("stream").Stream,Ra=Aa();_a.exports=P;functionP(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Vr.inherits(P,Sa);P.create=function(i){vare=newthis;i=i||{};for(vartini)e[t]=i[t];returne};P.isStreamLike=function(i){returntypeofi!="function"&&typeofi!="string"&&typeofi!="boolean"&&typeofi!="number"&&!Buffer.isBuffer(i)};P.prototype.append=function(i){vare=P.isStreamLike(i);if(e){if(!(iinstanceofRa)){vart=Ra.create(i,{maxDataSize:1/0,pauseStream:this.pauseStreams});i.on("data",this._checkDataSize.bind(this)),i=t}this._handleErrors(i),this.pauseStreams&&i.pause()}returnthis._streams.push(i),this};P.prototype.pipe=function(i,e){returnSa.prototype.pipe.call(this,i,e),this.resume(),i};P.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{dothis._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};P.prototype._realGetNext=function(){vari=this._streams.shift();if(typeofi>"u"){this.end();return}if(typeofi!="function"){this._pipeNext(i);return}vare=i;e(function(t){varn=P.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),
`;B.DEFAULT_CONTENT_TYPE="application/octet-stream";B.prototype.append=function(i,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=xn.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),es.isArray(e)){this._error(new Error("Arrays are not supported."));return}var a=this._multiPartHeader(i,e,t),s=this._multiPartFooter();n(a),n(e),n(s),this._trackLength(a,e,t)};B.prototype._trackLength=function(i,e,t){var n=0;t.knownLength!=null?n+=+t.knownLength:Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(i)+B.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof Rc))&&(t.knownLength||this._valuesToMeasure.push(e))};B.prototype._lengthRetriever=function(i,e){i.hasOwnProperty("fd")?i.end!=null&&i.end!=1/0&&i.start!=null?e(null,i.end+1-(i.start?i.start:0)):Ac.stat(i.path,function(t,n){var a;if(t){e(t);return}a=n.size-(i.start?i.start:0),e(null,a)}):i.hasOwnProperty("httpVersion")?e(null,+i.headers["content-length"]):i.hasOwnProperty("httpModule")?(i.on("response",function(t){i.pause(),e(null,+t.headers["content-length"])}),i.resume()):e("Unknown stream")};B.prototype._multiPartHeader=function(i,e,t){if(typeof t.header=="string")return t.header;var n=this._getContentDisposition(e,t),a=this._getContentType(e,t),s="",o={"Content-Disposition":["form-data",'name="'+i+'"'].concat(n||[]),"Content-Type":[].concat(a||[])};typeof t.header=="object"&&hn(o,t.header);var c;for(var p in o)o.hasOwnProperty(p)&&(c=o[p],c!=null&&(Array.isArray(c)||(c=[c]),c.length&&(s+=p+": "+c.join("; ")+B.LINE_BREAK)));return"--"+this.getBoundary()+B.LINE_BREAK+s+B.LINE_BREAK};B.prototype._getContentDisposition=function(i,e){var t,n;return typeof e.filepath=="string"?t=mn.normalize(e.filepath).replace(/\\/g,"/"):e.filename||i.name||i.path?t=mn.basename(e.filename||i.name||i.path):i.readable&&i.hasOwnProperty("httpVersion")&&(t=mn.basename(i.client._httpMessage.path||"")),t&&(n='filename="'+t+'"'),n};B.prototype._getContentType=function(i,e){var t=e.contentType;return!t&&i.name&&(t=fn.lookup(i.name)),!t&&i.path&&(t=fn.lookup(i.path)),!t&&i.readable&&i.hasOwnProperty("httpVersion")&&(t=i.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=fn.lookup(e.filepath||e.filename)),!t&&typeof i=="object"&&(t=B.DEFAULT_CONTENT_TYPE),t};B.prototype._multiPartFooter=function(){return function(i){var e=B.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),i(e)}.bind(this)};B.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+B.LINE_BREAK};B.prototype.getHeaders=function(i){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in i)i.hasOwnProperty(e)&&(t[e.toLowerCase()]=i[e]);return t};B.prototype.setBoundary=function(i){this._boundary=i};B.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};B.prototype.getBuffer=function(){for(var i=new Buffer.alloc(0),e=this.getBoundary(),t=0,n=this._streams.length;t<n;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?i=Buffer.concat([i,this._streams[t]]):i=Buffer.concat([i,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(i=Buffer.concat([i,Buffer.from(B.LINE_BREAK)])));return Buffer.concat([i,Buffer.from(this._lastBoundary())])};B.prototype._generateBoundary=function(){for(var i="--------------------------",e=0;e<24;e++)i+=Math.floor(Math.random()*10).toString(16);this._boundary=i};B.prototype.getLengthSync=function(){var i=this._overheadLength+this._valueLength;return this._streams.length&&(i+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),i};B.prototype.hasKnownLength=function(){var i=!0;return this._valuesToMeasure.length&&(i=!1),i};B.prototype.getLength=function(i){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(i
`).map(e=>e.trim()).join(" ")};ys.O=function(i){return this.inspectOpts.colors=this.useColors,_t.inspect(i,this.inspectOpts)}});var Es=O((rd,Sn)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Sn.exports=gs():Sn.exports=ws()});var As=O((cd,Cs)=>{var Vi;Cs.exports=function(){if(!Vi){try{Vi=Es()("follow-redirects")}catch{}typeof Vi!="function"&&(Vi=function(){})}Vi.apply(null,arguments)}});var Os=O((pd,Bn)=>{var ei=require("url"),_n=ei.URL,dp=require("http"),mp=require("https"),_s=require("stream").Writable,Ts=require("assert"),ks=As(),kn=["abort","aborted","connect","error","socket","timeout"],Fn=Object.create(null);kn.forEach(function(i){Fn[i]=function(e,t,n){this._redirectable.emit(i,e,t,n)}});var fp=Ji("ERR_INVALID_URL","Invalid URL",TypeError),Rs=Ji("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),hp=Ji("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),xp=Ji("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),vp=Ji("ERR_STREAM_WRITE_AFTER_END","write after end");function oe(i,e){_s.call(this),this._sanitizeOptions(i),this._options=i,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(n){t._processResponse(n)},this._performRequest()}oe.prototype=Object.create(_s.prototype);oe.prototype.abort=function(){Bs(this._currentRequest),this.emit("abort")};oe.prototype.write=function(i,e,t){if(this._ending)throw new vp;if(!ii(i)&&!yp(i))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Gi(e)&&(t=e,e=null),i.length===0){t&&t();return}this._requestBodyLength+i.length<=this._options.maxBodyLength?(this._requestBodyLength+=i.length,this._requestBodyBuffers.push({data:i,encoding:e}),this._currentRequest.write(i,e,t)):(this.emit("error",new xp),this.abort())};oe.prototype.end=function(i,e,t){if(Gi(i)?(t=i,i=e=null):Gi(e)&&(t=e,e=null),!i)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var n=this,a=this._currentRequest;this.write(i,e,function(){n._ended=!0,a.end(null,null,t)}),this._ending=!0}};oe.prototype.setHeader=function(i,e){this._options.headers[i]=e,this._currentRequest.setHeader(i,e)};oe.prototype.removeHeader=function(i){delete this._options.headers[i],this._currentRequest.removeHeader(i)};oe.prototype.setTimeout=function(i,e){var t=this;function n(o){o.setTimeout(i),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function a(o){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),s()},i),n(o)}function s(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",s),t.removeListener("error",s),t.removeListener("response",s),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",a)}return e&&this.on("timeout",e),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(i){oe.prototype[i]=function(e,t){return this._currentRequest[i](e,t)}});["aborted","connection","socket"].forEach(function(i){Object.defineProperty(oe.prototype,i,{get:function(){return this._currentRequest[i]}})});oe.prototype._sanitizeOptions=function(i){if(i.headers||(i.headers={}),i.host&&(i.hostname||(i.hostname=i.host),delete i.host),!i.pathname&&i.path){var e=i.path.indexOf("?");e<0?i.pathname=i.path:(i.pathname=i.path.substring(0,e),i.search=i.path.substring(e))}};oe.prototype._performRequest=function(){var i=this._options.protocol,e=this._options.nativeProtocols[i];if(!e){this.emit("error",new TypeError("Unsupported protocol "+i));return}if(this._options.agents){var t=i.slice(0,-1);this._options.agent=this._options.agents[t]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var a of kn)n.on(a,Fn[a]);if(this._currentUrl=/^\//.test(this._options.path
`)},_domwindow:function(){return n("domwindow")},_bigint:function(a){return n("bigint:"+a.toString())},_process:function(){return n("process")},_timer:function(){return n("timer")},_pipe:function(){return n("pipe")},_tcp:function(){return n("tcp")},_udp:function(){return n("udp")},_tty:function(){return n("tty")},_statwatcher:function(){return n("statwatcher")},_securecontext:function(){return n("securecontext")},_connection:function(){return n("connection")},_zlib:function(){return n("zlib")},_context:function(){return n("context")},_nodescript:function(){return n("nodescript")},_httpparser:function(){return n("httpparser")},_dataview:function(){return n("dataview")},_signal:function(){return n("signal")},_fsevent:function(){return n("fsevent")},_tlswrap:function(){return n("tlswrap")}}}function bo(){return{buf:"",write:function(i){this.buf+=i},end:function(i){this.buf+=i},read:function(){return this.buf}}}});var Eo=O((Bf,wo)=>{wo.exports={STRING:2,BOOLEAN:4,BYTES:4,NUMBER:8,Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8}});var Ro=O(Dt=>{"use strict";Dt.byteLength=Hp;Dt.toByteArray=Wp;Dt.fromByteArray=Gp;var Te=[],me=[],Dp=typeof Uint8Array<"u"?Uint8Array:Array,Kn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(pi=0,Co=Kn.length;pi<Co;++pi)Te[pi]=Kn[pi],me[Kn.charCodeAt(pi)]=pi;var pi,Co;me["-".charCodeAt(0)]=62;me["_".charCodeAt(0)]=63;function Ao(i){var e=i.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=i.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function Hp(i){var e=Ao(i),t=e[0],n=e[1];return(t+n)*3/4-n}function Mp(i,e,t){return(e+t)*3/4-t}function Wp(i){var e,t=Ao(i),n=t[0],a=t[1],s=new Dp(Mp(i,n,a)),o=0,c=a>0?n-4:n,p;for(p=0;p<c;p+=4)e=me[i.charCodeAt(p)]<<18|me[i.charCodeAt(p+1)]<<12|me[i.charCodeAt(p+2)]<<6|me[i.charCodeAt(p+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return a===2&&(e=me[i.charCodeAt(p)]<<2|me[i.charCodeAt(p+1)]>>4,s[o++]=e&255),a===1&&(e=me[i.charCodeAt(p)]<<10|me[i.charCodeAt(p+1)]<<4|me[i.charCodeAt(p+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function $p(i){return Te[i>>18&63]+Te[i>>12&63]+Te[i>>6&63]+Te[i&63]}function Vp(i,e,t){for(var n,a=[],s=e;s<t;s+=3)n=(i[s]<<16&16711680)+(i[s+1]<<8&65280)+(i[s+2]&255),a.push($p(n));return a.join("")}function Gp(i){for(var e,t=i.length,n=t%3,a=[],s=16383,o=0,c=t-n;o<c;o+=s)a.push(Vp(i,o,o+s>c?c:o+s));return n===1?(e=i[t-1],a.push(Te[e>>2]+Te[e<<4&63]+"==")):n===2&&(e=(i[t-2]<<8)+i[t-1],a.push(Te[e>>10]+Te[e>>4&63]+Te[e<<2&63]+"=")),a.join("")}});var So=O(Yn=>{Yn.read=function(i,e,t,n,a){var s,o,c=a*8-n-1,p=(1<<c)-1,l=p>>1,u=-7,d=t?a-1:0,v=t?-1:1,b=i[e+d];for(d+=v,s=b&(1<<-u)-1,b>>=-u,u+=c;u>0;s=s*256+i[e+d],d+=v,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=o*256+i[e+d],d+=v,u-=8);if(s===0)s=1-l;else{if(s===p)return o?NaN:(b?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(b?-1:1)*o*Math.pow(2,s-n)};Yn.write=function(i,e,t,n,a,s){var o,c,p,l=s*8-a-1,u=(1<<l)-1,d=u>>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:s-1,h=n?1:-1,x=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-o))<1&&(o--,p*=2),o+d>=1?e+=v/p:e+=v*Math.pow(2,1-d),e*p>=2&&(o++,p/=2),o+d>=u?(c=0,o=u):o+d>=1?(c=(e*p-1)*Math.pow(2,a),o=o+d):(c=e*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;i[t+b]=c&255,b+=h,c/=256,a-=8);for(o=o<<a|c,l+=a;l>0;i[t+b]=o&255,b+=h,o/=256,l-=8);i[t+b-h]|=x*128}});var Mo=O(qi=>{"use strict";var Xn=Ro(),ji=So(),_o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;qi.Buffer=f;qi.SlowBuffer=Zp;qi.INSPECT_MAX_BYTES=50;var Ht=2147483647;qi.kMaxLength=Ht;f.TYPED_ARRAY_SUPPORT=Jp();!f.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 Jp(){try{let i=new Uint8Array(1),e={foo:function(){return 42}};ret
`).forEach(function(o){a=o.indexOf(":"),t=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!t||e[t]&&Ic[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e};var ds=Symbol("internals");function Mi(i){return i&&String(i).trim().toLowerCase()}function At(i){return i===!1||i==null?i:m.isArray(i)?i.map(At):String(i)}function Lc(i){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(i);)e[n[1]]=n[2];return e}var Pc=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());functionEn(i,e,t,n,a){if(m.isFunction(n))returnn.call(this,e,t);if(a&&(e=t),!!m.isString(e)){if(m.isString(n))returne.indexOf(n)!==-1;if(m.isRegExp(n))returnn.test(e)}}functionzc(i){returni.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}functionNc(i,e){lett=m.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+t,{value:function(a,s,o){returnthis[n].call(this,e,a,s,o)},configurable:!0})})}varbi=class{constructor(e){e&&this.set(e)}set(e,t,n){leta=this;functions(c,p,l){letu=Mi(p);if(!u)thrownewError("header name must be a non-empty string");letd=m.findKey(a,u);(!d||a[d]===void0||l===!0||l===void0&&a[d]!==!1)&&(a[d||p]=At(c))}leto=(c,p)=>m.forEach(c,(l,u)=>s(l,u,p));returnm.isPlainObject(e)||einstanceofthis.constructor?o(e,t):m.isString(e)&&(e=e.trim())&&!Pc(e)?o(us(e),t):e!=null&&s(t,e,n),this}get(e,t){if(e=Mi(e),e){letn=m.findKey(this,e);if(n){leta=this[n];if(!t)returna;if(t===!0)returnLc(a);if(m.isFunction(t))returnt.call(this,a,n);if(m.isRegExp(t))returnt.exec(a);thrownewTypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Mi(e),e){letn=m.findKey(this,e);return!!(n&&this[n]!==void0&&(!t||En(this,this[n],n,t)))}return!1}delete(e,t){letn=this,a=!1;functions(o){if(o=Mi(o),o){letc=m.findKey(n,o);c&&(!t||En(n,n[c],c,t))&&(deleten[c],a=!0)}}returnm.isArray(e)?e.forEach(s):s(e),a}clear(e){lett=Object.keys(this),n=t.length,a=!1;for(;n--;){lets=t[n];(!e||En(this,this[s],s,e,!0))&&(deletethis[s],a=!0)}returna}normalize(e){lett=this,n={};returnm.forEach(this,(a,s)=>{leto=m.findKey(n,s);if(o){t[o]=At(a),deletet[s];return}letc=e?zc(s):String(s).trim();c!==s&&deletet[s],t[c]=At(a),n[c]=!0}),this}concat(...e){returnthis.constructor.concat(this,...e)}toJSON(e){lett=Object.create(null);returnm.forEach(this,(n,a)=>{n!=null&&n!==!1&&(t[a]=e&&m.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){returnObject.entries(this.toJSON())[Symbol.iterator]()}toString(){returnObject.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`,Sp=Yi.encode(Me),_p=2,qn=class{constructor(e,t){let{escapeName:n}=this.constructor,a=m.isString(t),s=`Content-Disposition:form-data;name="${n(e)}"${!a&&t.name?`; filename="${n(t.name)}"`:""}${Me}`;a?t=Yi.encode(String(t).replace(/\r?\n|\r\n?/g,Me)):s+=`Content-Type:${t.type||"application/octet-stream"}${Me}`,this.headers=Yi.encode(s+Me),this.contentLength=a?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+_p,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;m.isTypedArray(e)?yield e:yield*Bt(e),yield Sp}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},Tp=(i,e,t)=>{let{tag:n="form-data-boundary",size:a=25,boundary:s=n+"-"+m.generateString(a,Rp)}=t||{};if(!m.isFormData(i))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=Yi.encode("--"+s+Me),c=Yi.encode("--"+s+"--"+Me+Me),p=c.byteLength,l=Array.from(i.entries()).map(([d,v])=>{let b=new qn(d,v);return p+=b.size,b});p+=o.byteLength*l.length,p=m.toFiniteNumber(p);let u={"Content-Type":`multipart/form-data;boundary=${s}`};return Number.isFinite(p)&&(u["Content-Length"]=p),e&&e(u),Ls.Readable.from(async function*(){for(let d of l)yield o,yield*d.encode();yield c}())},Ps=Tp;var zs=X(require("stream"),1),In=class extends zs.default.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,t)}this.__transform(e,t,n)}},Ns=In;var kp=(i,e)=>m.isAsyncFn(i)?function(...t){let n=t.pop();i.apply(this,t).then(a=>{try{e?n(null,...e(a)):n(null,a)}catch(s){n(s)}},n)}:i,Ds=kp;var Hs={flush:qe.default.constants.Z_SYNC_FLUSH,finishFlush:qe.default.constants.Z_SYNC_FLUSH},Fp={flush:qe.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:qe.default.constants.BROTLI_OPERATION_FLUSH},Ms=m.isFunction(qe.default.createBrotliDecompress),{http:Bp,https:Op}=Ks.default,jp=/https:?/,Ws=z.protocols.map(i=>i+":");function Up(i){i.beforeRedirects.proxy&&i.beforeRedirects.proxy(i),i.beforeRedirects.config&&i.beforeRedirects.config(i)}function Xs(i,e,t){let n=e;if(!n&&n!==!1){let a=(0,$s.getProxyForUrl)(t);a&&(n=new URL(a))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");i.headers["Proxy-Authorization"]="Basic "+s}i.headers.host=i.hostname+(i.port?":"+i.port:"");let a=n.hostname||n.host;i.hostname=a,i.host=a,i.port=n.port,i.path=t,n.protocol&&(i.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}i.beforeRedirects.proxy=function(s){Xs(s,e,s.href)}}var qp=typeof process<"u"&&m.kindOf(process)==="process",Ip=i=>new Promise((e,t)=>{let n,a,s=(p,l)=>{a||(a=!0,n&&n(p,l))},o=p=>{s(p),e(p)},c=p=>{s(p,!0),t(p)};i(o,c,p=>n=p).catch(c)}),Qs=qp&&function(e){return Ip(async function(n,a,s){let{data:o,lookup:c,family:p}=e,{responseType:l,responseEncoding:u}=e,d=e.method.toUpperCase(),v,b=!1,h;c&&m.isAsyncFn(c)&&(c=Ds(c,R=>{if(m.isString(R))R=[R,R.indexOf(".")<0?6:4];else if(!m.isArray(R))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return R}));let x=new Ys.default,A=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),x.removeAllListeners()};s((R,T)=>{v=!0,T&&(b=!0,A())});function w(R){x.emit("abort",!R||R.type?new he(null,e,h):R)}x.once("abort",a),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let k=Qe(e.baseURL,e.url),_=new URL(k,"http://localhost"),F=_.protocol||Ws[0];if(F==="data:"){let R;if(d!=="GET")return He(n,a,{status:405,statusText:"method not allowed",headers:{},config:e});try{R=On(e.url,l==="blob",{Blob:e.env&&e.env.Blob})}catch(T){throw g.from(T,g.ERR_BAD_REQUEST,e)}return l==="text"?(R=R.toString(u),(!u||u==="utf8")&&(R=m.stripBOM(
`)?this.buffer="":this.buffer=n.pop();for(let a of n){let s=null;try{s=JSON.parse(a)}catch(o){this.errLogger.write(JSON.stringify(o,Object.getOwnPropertyNames(o))+`
`);continue}this.handleRequest(s).then(o=>{this.sendResponse(o)})}}}async handleRequest(e){let t=[0,null];try{if(!this.agent)throw new Error(`Agentnotbound.
`);t[0]=e[0];let n=e[1].func;if(n==="cancelRequest")t[1]=this.cancelRequest(e);else{let a=this.agent[n];if(!a)throw new Error(`Unknownfunction:${n}`);let s=a.apply(this.agent,e[1].args);s instanceof Ee?(this.ongoingRequests[e[0]]=s,t[1]=await s,delete this.ongoingRequests[e[0]]):t[1]=s}}catch(n){this.errLogger.write(JSON.stringify(n,Object.getOwnPropertyNames(n))+`
`)}bind(e){this.agent=e;for(let t of er)this.agent.on(t,n=>{this.sendResponse([0,n])})}listen(){this.inStream.on("data",this.handleInput.bind(this))}};var ql=new Yt,ir=new Xt;ir.bind(ql);ir.listen();