UNPKG

@smythos/cli

Version:

SmythOS SRE Command Line Interface

2 lines 543 kB
#!/usr/bin/env node "use strict";var de=Object.defineProperty;var t=(x,p)=>de(x,"name",{value:p,configurable:!0});var require$$0$2=require("stream"),index=require("./index2.cjs"),require$$0$4=require("events"),require$$0$3=require("buffer"),require$$0$1=require("util"),require$$1$1=require("string_decoder"),node,hasRequiredNode;function requireNode(){return hasRequiredNode||(hasRequiredNode=1,node=require$$0$1.deprecate),node}t(requireNode,"requireNode");var stream,hasRequiredStream;function requireStream(){return hasRequiredStream||(hasRequiredStream=1,stream=require$$0$2),stream}t(requireStream,"requireStream");var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;function x(f,s){var e=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(s?s(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(v,this,f)):process.nextTick(v,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(S){!s&&S?e._writableState?e._writableState.errorEmitted?process.nextTick(R,e):(e._writableState.errorEmitted=!0,process.nextTick(p,e,S)):process.nextTick(p,e,S):s?(process.nextTick(R,e),s(S)):process.nextTick(R,e)}),this)}t(x,"destroy");function p(f,s){v(f,s),R(f)}t(p,"emitErrorAndCloseNT");function R(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}t(R,"emitCloseNT");function _(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}t(_,"undestroy");function v(f,s){f.emit("error",s)}t(v,"emitErrorNT");function l(f,s){var e=f._readableState,a=f._writableState;e&&e.autoDestroy||a&&a.autoDestroy?f.destroy(s):f.emit("error",s)}return t(l,"errorOrDestroy"),destroy_1={destroy:x,undestroy:_,errorOrDestroy:l},destroy_1}t(requireDestroy,"requireDestroy");var errors={},hasRequiredErrors;function requireErrors(){if(hasRequiredErrors)return errors;hasRequiredErrors=1;const x={};function p(f,s,e){e||(e=Error);function a(S,o,w){return typeof s=="string"?s:s(S,o,w)}t(a,"getMessage");class u extends e{static{t(this,"NodeError")}constructor(o,w,b){super(a(o,w,b))}}u.prototype.name=e.name,u.prototype.code=f,x[f]=u}t(p,"createErrorType");function R(f,s){if(Array.isArray(f)){const e=f.length;return f=f.map(a=>String(a)),e>2?`one of ${s} ${f.slice(0,e-1).join(", ")}, or `+f[e-1]:e===2?`one of ${s} ${f[0]} or ${f[1]}`:`of ${s} ${f[0]}`}else return`of ${s} ${String(f)}`}t(R,"oneOf");function _(f,s,e){return f.substr(0,s.length)===s}t(_,"startsWith");function v(f,s,e){return(e===void 0||e>f.length)&&(e=f.length),f.substring(e-s.length,e)===s}t(v,"endsWith");function l(f,s,e){return typeof e!="number"&&(e=0),e+s.length>f.length?!1:f.indexOf(s,e)!==-1}return t(l,"includes"),p("ERR_INVALID_OPT_VALUE",function(f,s){return'The value "'+s+'" is invalid for option "'+f+'"'},TypeError),p("ERR_INVALID_ARG_TYPE",function(f,s,e){let a;typeof s=="string"&&_(s,"not ")?(a="must not be",s=s.replace(/^not /,"")):a="must be";let u;if(v(f," argument"))u=`The ${f} ${a} ${R(s,"type")}`;else{const S=l(f,".")?"property":"argument";u=`The "${f}" ${S} ${a} ${R(s,"type")}`}return u+=`. Received type ${typeof e}`,u},TypeError),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),p("ERR_METHOD_NOT_IMPLEMENTED",function(f){return"The "+f+" method is not implemented"}),p("ERR_STREAM_PREMATURE_CLOSE","Premature close"),p("ERR_STREAM_DESTROYED",function(f){return"Cannot call "+f+" after a stream was destroyed"}),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),p("ERR_STREAM_WRITE_AFTER_END","write after end"),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_UNKNOWN_ENCODING",function(f){return"Unknown encoding: "+f},TypeError),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errors.codes=x,errors}t(requireErrors,"requireErrors");var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var x=requireErrors().codes.ERR_INVALID_OPT_VALUE;function p(_,v,l){return _.highWaterMark!=null?_.highWaterMark:v?_[l]:null}t(p,"highWaterMarkFrom");function R(_,v,l,f){var s=p(v,f,l);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var e=f?l:"highWaterMark";throw new x(e,s)}return Math.floor(s)}return _.objectMode?16:16*1024}return t(R,"getHighWaterMark"),state={getHighWaterMark:R},state}t(requireState,"requireState");var inherits={exports:{}},inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=t(function(p,R){R&&(p.super_=R,p.prototype=Object.create(R.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):inherits_browser.exports=t(function(p,R){if(R){p.super_=R;var _=t(function(){},"TempCtor");_.prototype=R.prototype,p.prototype=new _,p.prototype.constructor=p}},"inherits")),inherits_browser.exports}t(requireInherits_browser,"requireInherits_browser");var hasRequiredInherits;function requireInherits(){if(hasRequiredInherits)return inherits.exports;hasRequiredInherits=1;try{var x=require("util");if(typeof x.inherits!="function")throw"";inherits.exports=x.inherits}catch{inherits.exports=requireInherits_browser()}return inherits.exports}t(requireInherits,"requireInherits");var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function x(b,h){var d=Object.keys(b);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(b);h&&(n=n.filter(function(c){return Object.getOwnPropertyDescriptor(b,c).enumerable})),d.push.apply(d,n)}return d}t(x,"ownKeys");function p(b){for(var h=1;h<arguments.length;h++){var d=arguments[h]!=null?arguments[h]:{};h%2?x(Object(d),!0).forEach(function(n){R(b,n,d[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(d)):x(Object(d)).forEach(function(n){Object.defineProperty(b,n,Object.getOwnPropertyDescriptor(d,n))})}return b}t(p,"_objectSpread");function R(b,h,d){return h=f(h),h in b?Object.defineProperty(b,h,{value:d,enumerable:!0,configurable:!0,writable:!0}):b[h]=d,b}t(R,"_defineProperty");function _(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}t(_,"_classCallCheck");function v(b,h){for(var d=0;d<h.length;d++){var n=h[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(b,f(n.key),n)}}t(v,"_defineProperties");function l(b,h,d){return h&&v(b.prototype,h),Object.defineProperty(b,"prototype",{writable:!1}),b}t(l,"_createClass");function f(b){var h=s(b,"string");return typeof h=="symbol"?h:String(h)}t(f,"_toPropertyKey");function s(b,h){if(typeof b!="object"||b===null)return b;var d=b[Symbol.toPrimitive];if(d!==void 0){var n=d.call(b,h);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)}t(s,"_toPrimitive");var e=require$$0$3,a=e.Buffer,u=require$$0$1,S=u.inspect,o=S&&S.custom||"inspect";function w(b,h,d){a.prototype.copy.call(b,h,d)}return t(w,"copyBuffer"),buffer_list=function(){function b(){_(this,b),this.head=null,this.tail=null,this.length=0}return t(b,"BufferList"),l(b,[{key:"push",value:t(function(d){var n={data:d,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},"push")},{key:"unshift",value:t(function(d){var n={data:d,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},"unshift")},{key:"shift",value:t(function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}},"shift")},{key:"clear",value:t(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:t(function(d){if(this.length===0)return"";for(var n=this.head,c=""+n.data;n=n.next;)c+=d+n.data;return c},"join")},{key:"concat",value:t(function(d){if(this.length===0)return a.alloc(0);for(var n=a.allocUnsafe(d>>>0),c=this.head,g=0;c;)w(c.data,n,g),g+=c.data.length,c=c.next;return n},"concat")},{key:"consume",value:t(function(d,n){var c;return d<this.head.data.length?(c=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):d===this.head.data.length?c=this.shift():c=n?this._getString(d):this._getBuffer(d),c},"consume")},{key:"first",value:t(function(){return this.head.data},"first")},{key:"_getString",value:t(function(d){var n=this.head,c=1,g=n.data;for(d-=g.length;n=n.next;){var y=n.data,T=d>y.length?y.length:d;if(T===y.length?g+=y:g+=y.slice(0,d),d-=T,d===0){T===y.length?(++c,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=y.slice(T));break}++c}return this.length-=c,g},"_getString")},{key:"_getBuffer",value:t(function(d){var n=a.allocUnsafe(d),c=this.head,g=1;for(c.data.copy(n),d-=c.data.length;c=c.next;){var y=c.data,T=d>y.length?y.length:d;if(y.copy(n,n.length-d,0,T),d-=T,d===0){T===y.length?(++g,c.next?this.head=c.next:this.head=this.tail=null):(this.head=c,c.data=y.slice(T));break}++g}return this.length-=g,n},"_getBuffer")},{key:o,value:t(function(d,n){return S(this,p(p({},n),{},{depth:0,customInspect:!1}))},"value")}]),b}(),buffer_list}t(requireBuffer_list,"requireBuffer_list");var string_decoder={},safeBuffer={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(x,p){var R=require$$0$3,_=R.Buffer;function v(f,s){for(var e in f)s[e]=f[e]}t(v,"copyProps"),_.from&&_.alloc&&_.allocUnsafe&&_.allocUnsafeSlow?x.exports=R:(v(R,p),p.Buffer=l);function l(f,s,e){return _(f,s,e)}t(l,"SafeBuffer"),l.prototype=Object.create(_.prototype),v(_,l),l.from=function(f,s,e){if(typeof f=="number")throw new TypeError("Argument must not be a number");return _(f,s,e)},l.alloc=function(f,s,e){if(typeof f!="number")throw new TypeError("Argument must be a number");var a=_(f);return s!==void 0?typeof e=="string"?a.fill(s,e):a.fill(s):a.fill(0),a},l.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return _(f)},l.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return R.SlowBuffer(f)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}t(requireSafeBuffer,"requireSafeBuffer");var hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var x=requireSafeBuffer().Buffer,p=x.isEncoding||function(n){switch(n=""+n,n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function R(n){if(!n)return"utf8";for(var c;;)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(c)return;n=(""+n).toLowerCase(),c=!0}}t(R,"_normalizeEncoding");function _(n){var c=R(n);if(typeof c!="string"&&(x.isEncoding===p||!p(n)))throw new Error("Unknown encoding: "+n);return c||n}t(_,"normalizeEncoding"),string_decoder.StringDecoder=v;function v(n){this.encoding=_(n);var c;switch(this.encoding){case"utf16le":this.text=S,this.end=o,c=4;break;case"utf8":this.fillLast=e,c=4;break;case"base64":this.text=w,this.end=b,c=3;break;default:this.write=h,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=x.allocUnsafe(c)}t(v,"StringDecoder"),v.prototype.write=function(n){if(n.length===0)return"";var c,g;if(this.lastNeed){if(c=this.fillLast(n),c===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g<n.length?c?c+this.text(n,g):this.text(n,g):c||""},v.prototype.end=u,v.prototype.text=a,v.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function l(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}t(l,"utf8CheckByte");function f(n,c,g){var y=c.length-1;if(y<g)return 0;var T=l(c[y]);return T>=0?(T>0&&(n.lastNeed=T-1),T):--y<g||T===-2?0:(T=l(c[y]),T>=0?(T>0&&(n.lastNeed=T-2),T):--y<g||T===-2?0:(T=l(c[y]),T>=0?(T>0&&(T===2?T=0:n.lastNeed=T-3),T):0))}t(f,"utf8CheckIncomplete");function s(n,c,g){if((c[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}t(s,"utf8CheckExtraBytes");function e(n){var c=this.lastTotal-this.lastNeed,g=s(this,n);if(g!==void 0)return g;if(this.lastNeed<=n.length)return n.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,c,0,n.length),this.lastNeed-=n.length}t(e,"utf8FillLast");function a(n,c){var g=f(this,n,c);if(!this.lastNeed)return n.toString("utf8",c);this.lastTotal=g;var y=n.length-(g-this.lastNeed);return n.copy(this.lastChar,0,y),n.toString("utf8",c,y)}t(a,"utf8Text");function u(n){var c=n&&n.length?this.write(n):"";return this.lastNeed?c+"\uFFFD":c}t(u,"utf8End");function S(n,c){if((n.length-c)%2===0){var g=n.toString("utf16le",c);if(g){var y=g.charCodeAt(g.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",c,n.length-1)}t(S,"utf16Text");function o(n){var c=n&&n.length?this.write(n):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,g)}return c}t(o,"utf16End");function w(n,c){var g=(n.length-c)%3;return g===0?n.toString("base64",c):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",c,n.length-g))}t(w,"base64Text");function b(n){var c=n&&n.length?this.write(n):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}t(b,"base64End");function h(n){return n.toString(this.encoding)}t(h,"simpleWrite");function d(n){return n&&n.length?this.write(n):""}return t(d,"simpleEnd"),string_decoder}t(requireString_decoder,"requireString_decoder");var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var x=requireErrors().codes.ERR_STREAM_PREMATURE_CLOSE;function p(l){var f=!1;return function(){if(!f){f=!0;for(var s=arguments.length,e=new Array(s),a=0;a<s;a++)e[a]=arguments[a];l.apply(this,e)}}}t(p,"once");function R(){}t(R,"noop");function _(l){return l.setHeader&&typeof l.abort=="function"}t(_,"isRequest");function v(l,f,s){if(typeof f=="function")return v(l,null,f);f||(f={}),s=p(s||R);var e=f.readable||f.readable!==!1&&l.readable,a=f.writable||f.writable!==!1&&l.writable,u=t(function(){l.writable||o()},"onlegacyfinish"),S=l._writableState&&l._writableState.finished,o=t(function(){a=!1,S=!0,e||s.call(l)},"onfinish"),w=l._readableState&&l._readableState.endEmitted,b=t(function(){e=!1,w=!0,a||s.call(l)},"onend"),h=t(function(g){s.call(l,g)},"onerror"),d=t(function(){var g;if(e&&!w)return(!l._readableState||!l._readableState.ended)&&(g=new x),s.call(l,g);if(a&&!S)return(!l._writableState||!l._writableState.ended)&&(g=new x),s.call(l,g)},"onclose"),n=t(function(){l.req.on("finish",o)},"onrequest");return _(l)?(l.on("complete",o),l.on("abort",d),l.req?n():l.on("request",n)):a&&!l._writableState&&(l.on("end",u),l.on("close",u)),l.on("end",b),l.on("finish",o),f.error!==!1&&l.on("error",h),l.on("close",d),function(){l.removeListener("complete",o),l.removeListener("abort",d),l.removeListener("request",n),l.req&&l.req.removeListener("finish",o),l.removeListener("end",u),l.removeListener("close",u),l.removeListener("finish",o),l.removeListener("end",b),l.removeListener("error",h),l.removeListener("close",d)}}return t(v,"eos"),endOfStream=v,endOfStream}t(requireEndOfStream,"requireEndOfStream");var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var x;function p(g,y,T){return y=R(y),y in g?Object.defineProperty(g,y,{value:T,enumerable:!0,configurable:!0,writable:!0}):g[y]=T,g}t(p,"_defineProperty");function R(g){var y=_(g,"string");return typeof y=="symbol"?y:String(y)}t(R,"_toPropertyKey");function _(g,y){if(typeof g!="object"||g===null)return g;var T=g[Symbol.toPrimitive];if(T!==void 0){var M=T.call(g,y);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(g)}t(_,"_toPrimitive");var v=requireEndOfStream(),l=Symbol("lastResolve"),f=Symbol("lastReject"),s=Symbol("error"),e=Symbol("ended"),a=Symbol("lastPromise"),u=Symbol("handlePromise"),S=Symbol("stream");function o(g,y){return{value:g,done:y}}t(o,"createIterResult");function w(g){var y=g[l];if(y!==null){var T=g[S].read();T!==null&&(g[a]=null,g[l]=null,g[f]=null,y(o(T,!1)))}}t(w,"readAndResolve");function b(g){process.nextTick(w,g)}t(b,"onReadable");function h(g,y){return function(T,M){g.then(function(){if(y[e]){T(o(void 0,!0));return}y[u](T,M)},M)}}t(h,"wrapForNext");var d=Object.getPrototypeOf(function(){}),n=Object.setPrototypeOf((x={get stream(){return this[S]},next:t(function(){var y=this,T=this[s];if(T!==null)return Promise.reject(T);if(this[e])return Promise.resolve(o(void 0,!0));if(this[S].destroyed)return new Promise(function(D,j){process.nextTick(function(){y[s]?j(y[s]):D(o(void 0,!0))})});var M=this[a],P;if(M)P=new Promise(h(M,this));else{var q=this[S].read();if(q!==null)return Promise.resolve(o(q,!1));P=new Promise(this[u])}return this[a]=P,P},"next")},p(x,Symbol.asyncIterator,function(){return this}),p(x,"return",t(function(){var y=this;return new Promise(function(T,M){y[S].destroy(null,function(P){if(P){M(P);return}T(o(void 0,!0))})})},"_return")),x),d),c=t(function(y){var T,M=Object.create(n,(T={},p(T,S,{value:y,writable:!0}),p(T,l,{value:null,writable:!0}),p(T,f,{value:null,writable:!0}),p(T,s,{value:null,writable:!0}),p(T,e,{value:y._readableState.endEmitted,writable:!0}),p(T,u,{value:t(function(q,D){var j=M[S].read();j?(M[a]=null,M[l]=null,M[f]=null,q(o(j,!1))):(M[l]=q,M[f]=D)},"value"),writable:!0}),T));return M[a]=null,v(y,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var q=M[f];q!==null&&(M[a]=null,M[l]=null,M[f]=null,q(P)),M[s]=P;return}var D=M[l];D!==null&&(M[a]=null,M[l]=null,M[f]=null,D(o(void 0,!0))),M[e]=!0}),y.on("readable",b.bind(null,M)),M},"createReadableStreamAsyncIterator");return async_iterator=c,async_iterator}t(requireAsync_iterator,"requireAsync_iterator");var from_1,hasRequiredFrom;function requireFrom(){if(hasRequiredFrom)return from_1;hasRequiredFrom=1;function x(a,u,S,o,w,b,h){try{var d=a[b](h),n=d.value}catch(c){S(c);return}d.done?u(n):Promise.resolve(n).then(o,w)}t(x,"asyncGeneratorStep");function p(a){return function(){var u=this,S=arguments;return new Promise(function(o,w){var b=a.apply(u,S);function h(n){x(b,o,w,h,d,"next",n)}t(h,"_next");function d(n){x(b,o,w,h,d,"throw",n)}t(d,"_throw"),h(void 0)})}}t(p,"_asyncToGenerator");function R(a,u){var S=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);u&&(o=o.filter(function(w){return Object.getOwnPropertyDescriptor(a,w).enumerable})),S.push.apply(S,o)}return S}t(R,"ownKeys");function _(a){for(var u=1;u<arguments.length;u++){var S=arguments[u]!=null?arguments[u]:{};u%2?R(Object(S),!0).forEach(function(o){v(a,o,S[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(S)):R(Object(S)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(S,o))})}return a}t(_,"_objectSpread");function v(a,u,S){return u=l(u),u in a?Object.defineProperty(a,u,{value:S,enumerable:!0,configurable:!0,writable:!0}):a[u]=S,a}t(v,"_defineProperty");function l(a){var u=f(a,"string");return typeof u=="symbol"?u:String(u)}t(l,"_toPropertyKey");function f(a,u){if(typeof a!="object"||a===null)return a;var S=a[Symbol.toPrimitive];if(S!==void 0){var o=S.call(a,u);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(a)}t(f,"_toPrimitive");var s=requireErrors().codes.ERR_INVALID_ARG_TYPE;function e(a,u,S){var o;if(u&&typeof u.next=="function")o=u;else if(u&&u[Symbol.asyncIterator])o=u[Symbol.asyncIterator]();else if(u&&u[Symbol.iterator])o=u[Symbol.iterator]();else throw new s("iterable",["Iterable"],u);var w=new a(_({objectMode:!0},S)),b=!1;w._read=function(){b||(b=!0,h())};function h(){return d.apply(this,arguments)}t(h,"next");function d(){return d=p(function*(){try{var n=yield o.next(),c=n.value,g=n.done;g?w.push(null):w.push(yield c)?h():b=!1}catch(y){w.destroy(y)}}),d.apply(this,arguments)}return t(d,"_next2"),w}return t(e,"from"),from_1=e,from_1}t(requireFrom,"requireFrom");var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1,_stream_readable=D;var x;D.ReadableState=q,require$$0$4.EventEmitter;var p=t(function(i,A){return i.listeners(A).length},"EElistenerCount"),R=requireStream(),_=require$$0$3.Buffer,v=(typeof index.commonjsGlobal<"u"?index.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function l(r){return _.from(r)}t(l,"_uint8ArrayToBuffer");function f(r){return _.isBuffer(r)||r instanceof v}t(f,"_isUint8Array");var s=require$$0$1,e;s&&s.debuglog?e=s.debuglog("stream"):e=t(function(){},"debug");var a=requireBuffer_list(),u=requireDestroy(),S=requireState(),o=S.getHighWaterMark,w=requireErrors().codes,b=w.ERR_INVALID_ARG_TYPE,h=w.ERR_STREAM_PUSH_AFTER_EOF,d=w.ERR_METHOD_NOT_IMPLEMENTED,n=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,g,y;requireInherits()(D,R);var T=u.errorOrDestroy,M=["error","close","destroy","pause","resume"];function P(r,i,A){if(typeof r.prependListener=="function")return r.prependListener(i,A);!r._events||!r._events[i]?r.on(i,A):Array.isArray(r._events[i])?r._events[i].unshift(A):r._events[i]=[A,r._events[i]]}t(P,"prependListener");function q(r,i,A){x=x||require_stream_duplex(),r=r||{},typeof A!="boolean"&&(A=i instanceof x),this.objectMode=!!r.objectMode,A&&(this.objectMode=this.objectMode||!!r.readableObjectMode),this.highWaterMark=o(this,r,"readableHighWaterMark",A),this.buffer=new a,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=r.emitClose!==!1,this.autoDestroy=!!r.autoDestroy,this.destroyed=!1,this.defaultEncoding=r.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r.encoding&&(c||(c=requireString_decoder().StringDecoder),this.decoder=new c(r.encoding),this.encoding=r.encoding)}t(q,"ReadableState");function D(r){if(x=x||require_stream_duplex(),!(this instanceof D))return new D(r);var i=this instanceof x;this._readableState=new q(r,this,i),this.readable=!0,r&&(typeof r.read=="function"&&(this._read=r.read),typeof r.destroy=="function"&&(this._destroy=r.destroy)),R.call(this)}t(D,"Readable"),Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:t(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:t(function(i){this._readableState&&(this._readableState.destroyed=i)},"set")}),D.prototype.destroy=u.destroy,D.prototype._undestroy=u.undestroy,D.prototype._destroy=function(r,i){i(r)},D.prototype.push=function(r,i){var A=this._readableState,N;return A.objectMode?N=!0:typeof r=="string"&&(i=i||A.defaultEncoding,i!==A.encoding&&(r=_.from(r,i),i=""),N=!0),j(this,r,i,!1,N)},D.prototype.unshift=function(r){return j(this,r,null,!0,!1)};function j(r,i,A,N,I){e("readableAddChunk",i);var C=r._readableState;if(i===null)C.reading=!1,re(r,C);else{var k;if(I||(k=ee(C,i)),k)T(r,k);else if(C.objectMode||i&&i.length>0)if(typeof i!="string"&&!C.objectMode&&Object.getPrototypeOf(i)!==_.prototype&&(i=l(i)),N)C.endEmitted?T(r,new n):F(r,C,i,!0);else if(C.ended)T(r,new h);else{if(C.destroyed)return!1;C.reading=!1,C.decoder&&!A?(i=C.decoder.write(i),C.objectMode||i.length!==0?F(r,C,i,!1):H(r,C)):F(r,C,i,!1)}else N||(C.reading=!1,H(r,C))}return!C.ended&&(C.length<C.highWaterMark||C.length===0)}t(j,"readableAddChunk");function F(r,i,A,N){i.flowing&&i.length===0&&!i.sync?(i.awaitDrain=0,r.emit("data",A)):(i.length+=i.objectMode?1:A.length,N?i.buffer.unshift(A):i.buffer.push(A),i.needReadable&&U(r)),H(r,i)}t(F,"addChunk");function ee(r,i){var A;return!f(i)&&typeof i!="string"&&i!==void 0&&!r.objectMode&&(A=new b("chunk",["string","Buffer","Uint8Array"],i)),A}t(ee,"chunkInvalid"),D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(r){c||(c=requireString_decoder().StringDecoder);var i=new c(r);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;for(var A=this._readableState.buffer.head,N="";A!==null;)N+=i.write(A.data),A=A.next;return this._readableState.buffer.clear(),N!==""&&this._readableState.buffer.push(N),this._readableState.length=N.length,this};var $=1073741824;function te(r){return r>=$?r=$:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r}t(te,"computeNewHighWaterMark");function X(r,i){return r<=0||i.length===0&&i.ended?0:i.objectMode?1:r!==r?i.flowing&&i.length?i.buffer.head.data.length:i.length:(r>i.highWaterMark&&(i.highWaterMark=te(r)),r<=i.length?r:i.ended?i.length:(i.needReadable=!0,0))}t(X,"howMuchToRead"),D.prototype.read=function(r){e("read",r),r=parseInt(r,10);var i=this._readableState,A=r;if(r!==0&&(i.emittedReadable=!1),r===0&&i.needReadable&&((i.highWaterMark!==0?i.length>=i.highWaterMark:i.length>0)||i.ended))return e("read: emitReadable",i.length,i.ended),i.length===0&&i.ended?B(this):U(this),null;if(r=X(r,i),r===0&&i.ended)return i.length===0&&B(this),null;var N=i.needReadable;e("need readable",N),(i.length===0||i.length-r<i.highWaterMark)&&(N=!0,e("length less than watermark",N)),i.ended||i.reading?(N=!1,e("reading or ended",N)):N&&(e("do read"),i.reading=!0,i.sync=!0,i.length===0&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(r=X(A,i)));var I;return r>0?I=m(r,i):I=null,I===null?(i.needReadable=i.length<=i.highWaterMark,r=0):(i.length-=r,i.awaitDrain=0),i.length===0&&(i.ended||(i.needReadable=!0),A!==r&&i.ended&&B(this)),I!==null&&this.emit("data",I),I};function re(r,i){if(e("onEofChunk"),!i.ended){if(i.decoder){var A=i.decoder.end();A&&A.length&&(i.buffer.push(A),i.length+=i.objectMode?1:A.length)}i.ended=!0,i.sync?U(r):(i.needReadable=!1,i.emittedReadable||(i.emittedReadable=!0,z(r)))}}t(re,"onEofChunk");function U(r){var i=r._readableState;e("emitReadable",i.needReadable,i.emittedReadable),i.needReadable=!1,i.emittedReadable||(e("emitReadable",i.flowing),i.emittedReadable=!0,process.nextTick(z,r))}t(U,"emitReadable");function z(r){var i=r._readableState;e("emitReadable_",i.destroyed,i.length,i.ended),!i.destroyed&&(i.length||i.ended)&&(r.emit("readable"),i.emittedReadable=!1),i.needReadable=!i.flowing&&!i.ended&&i.length<=i.highWaterMark,E(r)}t(z,"emitReadable_");function H(r,i){i.readingMore||(i.readingMore=!0,process.nextTick(Q,r,i))}t(H,"maybeReadMore");function Q(r,i){for(;!i.reading&&!i.ended&&(i.length<i.highWaterMark||i.flowing&&i.length===0);){var A=i.length;if(e("maybeReadMore read 0"),r.read(0),A===i.length)break}i.readingMore=!1}t(Q,"maybeReadMore_"),D.prototype._read=function(r){T(this,new d("_read()"))},D.prototype.pipe=function(r,i){var A=this,N=this._readableState;switch(N.pipesCount){case 0:N.pipes=r;break;case 1:N.pipes=[N.pipes,r];break;default:N.pipes.push(r);break}N.pipesCount+=1,e("pipe count=%d opts=%j",N.pipesCount,i);var I=(!i||i.end!==!1)&&r!==process.stdout&&r!==process.stderr,C=I?G:K;N.endEmitted?process.nextTick(C):A.once("end",C),r.on("unpipe",k);function k(V,Y){e("onunpipe"),V===A&&Y&&Y.hasUnpiped===!1&&(Y.hasUnpiped=!0,le())}t(k,"onunpipe");function G(){e("onend"),r.end()}t(G,"onend");var J=ie(A);r.on("drain",J);var ce=!1;function le(){e("cleanup"),r.removeListener("close",se),r.removeListener("finish",fe),r.removeListener("drain",J),r.removeListener("error",oe),r.removeListener("unpipe",k),A.removeListener("end",G),A.removeListener("end",K),A.removeListener("data",ue),ce=!0,N.awaitDrain&&(!r._writableState||r._writableState.needDrain)&&J()}t(le,"cleanup"),A.on("data",ue);function ue(V){e("ondata");var Y=r.write(V);e("dest.write",Y),Y===!1&&((N.pipesCount===1&&N.pipes===r||N.pipesCount>1&&L(N.pipes,r)!==-1)&&!ce&&(e("false write response, pause",N.awaitDrain),N.awaitDrain++),A.pause())}t(ue,"ondata");function oe(V){e("onerror",V),K(),r.removeListener("error",oe),p(r,"error")===0&&T(r,V)}t(oe,"onerror"),P(r,"error",oe);function se(){r.removeListener("finish",fe),K()}t(se,"onclose"),r.once("close",se);function fe(){e("onfinish"),r.removeListener("close",se),K()}t(fe,"onfinish"),r.once("finish",fe);function K(){e("unpipe"),A.unpipe(r)}return t(K,"unpipe"),r.emit("pipe",A),N.flowing||(e("pipe resume"),A.resume()),r};function ie(r){return t(function(){var A=r._readableState;e("pipeOnDrain",A.awaitDrain),A.awaitDrain&&A.awaitDrain--,A.awaitDrain===0&&p(r,"data")&&(A.flowing=!0,E(r))},"pipeOnDrainFunctionResult")}t(ie,"pipeOnDrain"),D.prototype.unpipe=function(r){var i=this._readableState,A={hasUnpiped:!1};if(i.pipesCount===0)return this;if(i.pipesCount===1)return r&&r!==i.pipes?this:(r||(r=i.pipes),i.pipes=null,i.pipesCount=0,i.flowing=!1,r&&r.emit("unpipe",this,A),this);if(!r){var N=i.pipes,I=i.pipesCount;i.pipes=null,i.pipesCount=0,i.flowing=!1;for(var C=0;C<I;C++)N[C].emit("unpipe",this,{hasUnpiped:!1});return this}var k=L(i.pipes,r);return k===-1?this:(i.pipes.splice(k,1),i.pipesCount-=1,i.pipesCount===1&&(i.pipes=i.pipes[0]),r.emit("unpipe",this,A),this)},D.prototype.on=function(r,i){var A=R.prototype.on.call(this,r,i),N=this._readableState;return r==="data"?(N.readableListening=this.listenerCount("readable")>0,N.flowing!==!1&&this.resume()):r==="readable"&&!N.endEmitted&&!N.readableListening&&(N.readableListening=N.needReadable=!0,N.flowing=!1,N.emittedReadable=!1,e("on readable",N.length,N.reading),N.length?U(this):N.reading||process.nextTick(W,this)),A},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(r,i){var A=R.prototype.removeListener.call(this,r,i);return r==="readable"&&process.nextTick(Z,this),A},D.prototype.removeAllListeners=function(r){var i=R.prototype.removeAllListeners.apply(this,arguments);return(r==="readable"||r===void 0)&&process.nextTick(Z,this),i};function Z(r){var i=r._readableState;i.readableListening=r.listenerCount("readable")>0,i.resumeScheduled&&!i.paused?i.flowing=!0:r.listenerCount("data")>0&&r.resume()}t(Z,"updateReadableListening");function W(r){e("readable nexttick read 0"),r.read(0)}t(W,"nReadingNextTick"),D.prototype.resume=function(){var r=this._readableState;return r.flowing||(e("resume"),r.flowing=!r.readableListening,ne(this,r)),r.paused=!1,this};function ne(r,i){i.resumeScheduled||(i.resumeScheduled=!0,process.nextTick(ae,r,i))}t(ne,"resume");function ae(r,i){e("resume",i.reading),i.reading||r.read(0),i.resumeScheduled=!1,r.emit("resume"),E(r),i.flowing&&!i.reading&&r.read(0)}t(ae,"resume_"),D.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function E(r){var i=r._readableState;for(e("flow",i.flowing);i.flowing&&r.read()!==null;);}t(E,"flow"),D.prototype.wrap=function(r){var i=this,A=this._readableState,N=!1;r.on("end",function(){if(e("wrapped end"),A.decoder&&!A.ended){var k=A.decoder.end();k&&k.length&&i.push(k)}i.push(null)}),r.on("data",function(k){if(e("wrapped data"),A.decoder&&(k=A.decoder.write(k)),!(A.objectMode&&k==null)&&!(!A.objectMode&&(!k||!k.length))){var G=i.push(k);G||(N=!0,r.pause())}});for(var I in r)this[I]===void 0&&typeof r[I]=="function"&&(this[I]=t(function(G){return t(function(){return r[G].apply(r,arguments)},"methodWrapReturnFunction")},"methodWrap")(I));for(var C=0;C<M.length;C++)r.on(M[C],this.emit.bind(this,M[C]));return this._read=function(k){e("wrapped _read",k),N&&(N=!1,r.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return g===void 0&&(g=requireAsync_iterator()),g(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:t(function(){return this._readableState.highWaterMark},"get")}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:t(function(){return this._readableState&&this._readableState.buffer},"get")}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:t(function(){return this._readableState.flowing},"get"),set:t(function(i){this._readableState&&(this._readableState.flowing=i)},"set")}),D._fromList=m,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:t(function(){return this._readableState.length},"get")});function m(r,i){if(i.length===0)return null;var A;return i.objectMode?A=i.buffer.shift():!r||r>=i.length?(i.decoder?A=i.buffer.join(""):i.buffer.length===1?A=i.buffer.first():A=i.buffer.concat(i.length),i.buffer.clear()):A=i.buffer.consume(r,i.decoder),A}t(m,"fromList");function B(r){var i=r._readableState;e("endReadable",i.endEmitted),i.endEmitted||(i.ended=!0,process.nextTick(O,i,r))}t(B,"endReadable");function O(r,i){if(e("endReadableNT",r.endEmitted,r.length),!r.endEmitted&&r.length===0&&(r.endEmitted=!0,i.readable=!1,i.emit("end"),r.autoDestroy)){var A=i._writableState;(!A||A.autoDestroy&&A.finished)&&i.destroy()}}t(O,"endReadableNT"),typeof Symbol=="function"&&(D.from=function(r,i){return y===void 0&&(y=requireFrom()),y(D,r,i)});function L(r,i){for(var A=0,N=r.length;A<N;A++)if(r[A]===i)return A;return-1}return t(L,"indexOf"),_stream_readable}t(require_stream_readable,"require_stream_readable");var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var x=Object.keys||function(a){var u=[];for(var S in a)u.push(S);return u};_stream_duplex=f;var p=require_stream_readable(),R=require_stream_writable();requireInherits()(f,p);for(var _=x(R.prototype),v=0;v<_.length;v++){var l=_[v];f.prototype[l]||(f.prototype[l]=R.prototype[l])}function f(a){if(!(this instanceof f))return new f(a);p.call(this,a),R.call(this,a),this.allowHalfOpen=!0,a&&(a.readable===!1&&(this.readable=!1),a.writable===!1&&(this.writable=!1),a.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}t(f,"Duplex"),Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:t(function(){return this._writableState.highWaterMark},"get")}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:t(function(){return this._writableState&&this._writableState.getBuffer()},"get")}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:t(function(){return this._writableState.length},"get")});function s(){this._writableState.ended||process.nextTick(e,this)}t(s,"onend");function e(a){a.end()}return t(e,"onEndNT"),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:t(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:t(function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)},"set")}),_stream_duplex}t(require_stream_duplex,"require_stream_duplex");var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1,_stream_writable=q;function x(E){var m=this;this.next=null,this.entry=null,this.finish=function(){ae(m,E)}}t(x,"CorkedRequest");var p;q.WritableState=M;var R={deprecate:requireNode()},_=requireStream(),v=require$$0$3.Buffer,l=(typeof index.commonjsGlobal<"u"?index.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(E){return v.from(E)}t(f,"_uint8ArrayToBuffer");function s(E){return v.isBuffer(E)||E instanceof l}t(s,"_isUint8Array");var e=requireDestroy(),a=requireState(),u=a.getHighWaterMark,S=requireErrors().codes,o=S.ERR_INVALID_ARG_TYPE,w=S.ERR_METHOD_NOT_IMPLEMENTED,b=S.ERR_MULTIPLE_CALLBACK,h=S.ERR_STREAM_CANNOT_PIPE,d=S.ERR_STREAM_DESTROYED,n=S.ERR_STREAM_NULL_VALUES,c=S.ERR_STREAM_WRITE_AFTER_END,g=S.ERR_UNKNOWN_ENCODING,y=e.errorOrDestroy;requireInherits()(q,_);function T(){}t(T,"nop");function M(E,m,B){p=p||require_stream_duplex(),E=E||{},typeof B!="boolean"&&(B=m instanceof p),this.objectMode=!!E.objectMode,B&&(this.objectMode=this.objectMode||!!E.writableObjectMode),this.highWaterMark=u(this,E,"writableHighWaterMark",B),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=E.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=E.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){re(m,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}t(M,"WritableState"),M.prototype.getBuffer=t(function(){for(var m=this.bufferedRequest,B=[];m;)B.push(m),m=m.next;return B},"getBuffer"),function(){try{Object.defineProperty(M.prototype,"buffer",{get:R.deprecate(t(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var P;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:t(function(m){return P.call(this,m)?!0:this!==q?!1:m&&m._writableState instanceof M},"value")})):P=t(function(m){return m instanceof this},"realHasInstance");function q(E){p=p||require_stream_duplex();var m=this instanceof p;if(!m&&!P.call(q,this))return new q(E);this._writableState=new M(E,this,m),this.writable=!0,E&&(typeof E.write=="function"&&(this._write=E.write),typeof E.writev=="function"&&(this._writev=E.writev),typeof E.destroy=="function"&&(this._destroy=E.destroy),typeof E.final=="function"&&(this._final=E.final)),_.call(this)}t(q,"Writable"),q.prototype.pipe=function(){y(this,new h)};function D(E,m){var B=new c;y(E,B),process.nextTick(m,B)}t(D,"writeAfterEnd");function j(E,m,B,O){var L;return B===null?L=new n:typeof B!="string"&&!m.objectMode&&(L=new o("chunk",["string","Buffer"],B)),L?(y(E,L),process.nextTick(O,L),!1):!0}t(j,"validChunk"),q.prototype.write=function(E,m,B){var O=this._writableState,L=!1,r=!O.objectMode&&s(E);return r&&!v.isBuffer(E)&&(E=f(E)),typeof m=="function"&&(B=m,m=null),r?m="buffer":m||(m=O.defaultEncoding),typeof B!="function"&&(B=T),O.ending?D(this,B):(r||j(this,O,E,B))&&(O.pendingcb++,L=ee(this,O,r,E,m,B)),L},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var E=this._writableState;E.corked&&(E.corked--,!E.writing&&!E.corked&&!E.bufferProcessing&&E.bufferedRequest&&H(this,E))},q.prototype.setDefaultEncoding=t(function(m){if(typeof m=="string"&&(m=m.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((m+"").toLowerCase())>-1))throw new g(m);return this._writableState.defaultEncoding=m,this},"setDefaultEncoding"),Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:t(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function F(E,m,B){return!E.objectMode&&E.decodeStrings!==!1&&typeof m=="string"&&(m=v.from(m,B)),m}t(F,"decodeChunk"),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:t(function(){return this._writableState.highWaterMark},"get")});function ee(E,m,B,O,L,r){if(!B){var i=F(m,O,L);O!==i&&(B=!0,L="buffer",O=i)}var A=m.objectMode?1:O.length;m.length+=A;var N=m.length<m.highWaterMark;if(N||(m.needDrain=!0),m.writing||m.corked){var I=m.lastBufferedRequest;m.lastBufferedRequest={chunk:O,encoding:L,isBuf:B,callback:r,next:null},I?I.next=m.lastBufferedRequest:m.bufferedRequest=m.lastBufferedRequest,m.bufferedRequestCount+=1}else $(E,m,!1,A,O,L,r);return N}t(ee,"writeOrBuffer");function $(E,m,B,O,L,r,i){m.writelen=O,m.writecb=i,m.writing=!0,m.sync=!0,m.destroyed?m.onwrite(new d("write")):B?E._writev(L,m.onwrite):E._write(L,r,m.onwrite),m.sync=!1}t($,"doWrite");function te(E,m,B,O,L){--m.pendingcb,B?(process.nextTick(L,O),process.nextTick(W,E,m),E._writableState.errorEmitted=!0,y(E,O)):(L(O),E._writableState.errorEmitted=!0,y(E,O),W(E,m))}t(te,"onwriteError");function X(E){E.writing=!1,E.writecb=null,E.length-=E.writelen,E.writelen=0}t(X,"onwriteStateUpdate");function re(E,m){var B=E._writableState,O=B.sync,L=B.writecb;if(typeof L!="function")throw new b;if(X(B),m)te(E,B,O,m,L);else{var r=Q(B)||E.destroyed;!r&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&H(E,B),O?process.nextTick(U,E,B,r,L):U(E,B,r,L)}}t(re,"onwrite");function U(E,m,B,O){B||z(E,m),m.pendingcb--,O(),W(E,m)}t(U,"afterWrite");function z(E,m){m.length===0&&m.needDrain&&(m.needDrain=!1,E.emit("drain"))}t(z,"onwriteDrain");function H(E,m){m.bufferProcessing=!0;var B=m.bufferedRequest;if(E._writev&&B&&B.next){var O=m.bufferedRequestCount,L=new Array(O),r=m.corkedRequestsFree;r.entry=B;for(var i=0,A=!0;B;)L[i]=B,B.isBuf||(A=!1),B=B.next,i+=1;L.allBuffers=A,$(E,m,!0,m.length,L,"",r.finish),m.pendingcb++,m.lastBufferedRequest=null,r.next?(m.corkedRequestsFree=r.next,r.next=null):m.corkedRequestsFree=new x(m),m.bufferedRequestCount=0}else{for(;B;){var N=B.chunk,I=B.encoding,C=B.callback,k=m.objectMode?1:N.length;if($(E,m,!1,k,N,I,C),B=B.next,m.bufferedRequestCount--,m.writing)break}B===null&&(m.lastBufferedRequest=null)}m.bufferedRequest=B,m.bufferProcessing=!1}t(H,"clearBuffer"),q.prototype._write=function(E,m,B){B(new w("_write()"))},q.prototype._writev=null,q.prototype.end=function(E,m,B){var O=this._writableState;return typeof E=="function"?(B=E,E=null,m=null):typeof m=="function"&&(B=m,m=null),E!=null&&this.write(E,m),O.corked&&(O.corked=1,this.uncork()),O.ending||ne(this,O,B),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:t(function(){return this._writableState.length},"get")});function Q(E){return E.ending&&E.length===0&&E.bufferedRequest===null&&!E.finished&&!E.writing}t(Q,"needFinish");function ie(E,m){E._final(function(B){m.pendingcb--,B&&y(E,B),m.prefinished=!0,E.emit("prefinish"),W(E,m)})}t(ie,"callFinal");function Z(E,m){!m.prefinished&&!m.finalCalled&&(typeof E._final=="function"&&!m.destroyed?(m.pendingcb++,m.finalCalled=!0,process.nextTick(ie,E,m)):(m.prefinished=!0,E.emit("prefinish")))}t(Z,"prefinish");function W(E,m){var B=Q(m);if(B&&(Z(E,m),m.pendingcb===0&&(m.finished=!0,E.emit("finish"),m.autoDestroy))){var O=E._readableState;(!O||O.autoDestroy&&O.endEmitted)&&E.destroy()}return B}t(W,"finishMaybe");function ne(E,m,B){m.ending=!0,W(E,m),B&&(m.finished?process.nextTick(B):E.once("finish",B)),m.ended=!0,E.writable=!1}t(ne,"endWritable");function ae(E,m,B){var O=E.entry;for(E.entry=null;O;){var L=O.callback;m.pendingcb--,L(B),O=O.next}m.corkedRequestsFree.next=E}return t(ae,"onCorkedFinish"),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:t(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:t(function(m){this._writableState&&(this._writableState.destroyed=m)},"set")}),q.prototype.destroy=e.destroy,q.prototype._undestroy=e.undestroy,q.prototype._destroy=function(E,m){m(E)},_stream_writable}t(require_stream_writable,"require_stream_writable");var readable={exports:{}},_stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=s;var x=requireErrors().codes,p=x.ERR_METHOD_NOT_IMPLEMENTED,R=x.ERR_MULTIPLE_CALLBACK,_=x.ERR_TRANSFORM_ALREADY_TRANSFORMING,v=x.ERR_TRANSFORM_WITH_LENGTH_0,l=require_stream_duplex();requireInherits()(s,l);function f(u,S){var o=this._transformState;o.transforming=!1;var w=o.writecb;if(w===null)return this.emit("error",new R);o.writechunk=null,o.writecb=null,S!=null&&this.push(S),w(u);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}t(f,"afterTransform");function s(u){if(!(this instanceof s))return new s(u);l.call(this,u),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",e)}t(s,"Transform");function e(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(S,o){a(u,S,o)}):a(this,null,null)}t(e,"prefinish"),s.prototype.push=function(u,S){return this._transformState.needTransform=!1,l.prototype.push.call(this,u,S)},s.prototype._transform=function(u,S,o){o(new p("_transform()"))},s.prototype._write=function(u,S,o){var w=this._transformState;if(w.writecb=o,w.writechunk=u,w.writeencoding=S,!w.transforming){var b=this._readableState;(w.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},s.prototype._read=function(u){var S=this._transformState;S.writechunk!==null&&!S.transforming?(S.transforming=!0,this._transform(S.writechunk,S.writeencoding,S.afterTransform)):S.needTransform=!0},s.prototype._destroy=function(u,S){l.prototype._destroy.call(this,u,function(o){S(o)})};function a(u,S,o){if(S)return u.emit("error",S);if(o!=null&&u.push(o),u._writableState.length)throw new v;if(u._transformState.transforming)throw new _;return u.push(null)}return t(a,"done"),_stream_transform}t(require_stream_transform,"require_stream_transform");var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=p;var x=require_stream_transform();requireInherits()(p,x);function p(R){if(!(this instanceof p))return new p(R);x.call(this,R)}return t(p,"PassThrough"),p.prototype._transform=function(R,_,v){v(null,R)},_stream_passthrough}t(require_stream_passthrough,"require_stream_passthrough");var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var x;function p(o){var w=!1;return function(){w||(w=!0,o.apply(void 0,arguments))}}t(p,"once");var R=requireErrors().codes,_=R.ERR_MISSING_ARGS,v=R.ERR_STREAM_DESTROYED;function l(o){if(o)throw o}t(l,"noop");function f(o){return o.setHeader&&typeof o.abort=="function"}t(f,"isRequest");function s(o,w,b,h){h=p(h);var d=!1;o.on("close",function(){d=!0}),x===void 0&&(x=requireEndOfStream()),x(o,{readable:w,writable:b},function(c){if(c)return h(c);d=!0,h()});var n=!1;return function(c){if(!d&&!n){if(n=!0,f(o))return o.abort();if(typeof o.destroy=="function")return o.destroy();h(c||new v("pipe"))}}}t(s,"destroyer");function e(o){o()}t(e,"call");function a(o,w){return o.pipe(w)}t(a,"pipe");function u(o){return!o.length||typeof o[o.length-1]!="function"?l:o.pop()}t(u,"popCallback");function S(){for(var o=arguments.length,w=new Array(o),b=0;b<o;b++)w[b]=arguments[b];var h=u(w);if(Array.isArray(w[0])&&(w=w[0]),w.length<2)throw new _("streams");var d,n=w.map(function(c,g){var y=g<w.length-1,T=g>0;return s(c,y,T,function(M){d||(d=M),M&&n.forEach(e),!y&&(n.forEach(e),h(d))})});return w.reduce(a)}return t(S,"pipeline"),pipeline_1=S,pipeline_1}t(requirePipeline,"requirePipeline");var hasRequiredReadable;function requireReadable(){return hasRequiredReadable||(hasRequiredReadable=1,function(x,p){var R=require$$0$2;process.env.READABLE_STREAM==="disable"&&R?(x.exports=R.Readable,Object.assign(x.exports,R),x.exports.Stream=R):(p=x.exports=require_stream_readable(),p.Stream=R||p,p.Readable=p,p.Writable=require_stream_writable(),p.Duplex=require_stream_duplex(),p.Transform=require_stream_transform(),p.PassThrough=require_stream_passthrough(),p.finished=requireEndOfStream(),p.pipeline=requirePipeline())}(readable,readable.exports)),readable.exports}t(requireReadable,"requireReadable");var safer_1,hasRequiredSafer;function requireSafer(){if(hasRequiredSafer)return safer_1;hasRequiredSafer=1;var x=require$$0$3,p=x.Buffer,R={},_;for(_ in x)x.hasOwnProperty(_)&&