UNPKG

@jsjoeio/code-server

Version:

Run VS Code on a remote server.

1 lines 342 kB
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=55)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]},t.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},t.STACK_OVERFLOW="Maximum call stack size exceeded"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=i},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0);function o(e,t,n,i,o){var s={},a="number"==typeof o,c=void 0!==o&&a?o.toString():n;if(a&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(s=Reflect.getMetadata(e,t));var u=s[c];if(Array.isArray(u))for(var d=0,p=u;d<p.length;d++){var l=p[d];if(l.key===i.key)throw new Error(r.DUPLICATED_METADATA+" "+l.key.toString())}else u=[];u.push(i),s[c]=u,Reflect.defineMetadata(e,s,t)}function s(e,t){Reflect.decorate(e,t)}function a(e,t){return function(n,r){t(n,r,e)}}t.tagParameter=function(e,t,n,r){o(i.TAGGED,e,t,r,n)},t.tagProperty=function(e,t,n){o(i.TAGGED_PROP,e.constructor,t,n)},t.decorate=function(e,t,n){"number"==typeof n?s([a(n,e)],t):"string"==typeof n?Reflect.decorate([e],t,n):s([e],t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.id=function(){return r++}},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("stream")},function(e,t,n){"use strict";const r={};function i(e,t,n){n||(n=Error);class i extends n{constructor(e,n,r){super(function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(e,n,r))}}i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){const n=e.length;return e=e.map(e=>String(e)),n>2?`one of ${t} ${e.slice(0,n-1).join(", ")}, or `+e[n-1]:2===n?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){let r;var i,s;let a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a=`The ${e} ${r} ${o(t,"type")}`;else{a=`The "${e}" ${function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument"} ${r} ${o(t,"type")}`}return a+=`. Received type ${typeof n}`,a}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(36),o=n(40);n(18)(u,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var c=s[a];u.prototype[c]||(u.prototype[c]=o.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||process.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},function(e,t,n){"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);function i(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function o(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}t.getServiceIdentifierAsString=i,t.listRegisteredBindingsForServiceIdentifier=function(e,t,n){var r="",i=n(e,t);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(e){var t="Object";null!==e.implementationType&&(t=o(e.implementationType)),r=r+"\n "+t,e.constraint.metaData&&(r=r+" - "+e.constraint.metaData)}))),r},t.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(function e(t,n){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===n||e(t.parentRequest,n))}(t,t.serviceIdentifier)){var n=function(e){return function e(t,n){void 0===n&&(n=[]);var r=i(t.serviceIdentifier);return n.push(r),null!==t.parentRequest?e(t.parentRequest,n):n}(e).reverse().join(" --\x3e ")}(t);throw new Error(r.CIRCULAR_DEPENDENCY+" "+n)}e(t)}))},t.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(e){n+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+n}return" "+e},t.getFunctionName=o},function(e,t){e.exports=require("os")},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";function r(e,t){const n={};for(const r of Object.keys(e)){const i=e[r];t(i,r)&&(n[r]=i)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.invertMap=t.upcastPartial=t.pick=t.flatten=t.bisectArray=t.trailingEdgeThrottle=t.debounce=t.memoizeWeak=t.memoize=t.once=t.getCaseInsensitiveProperty=t.caseInsensitiveMerge=t.walkObject=t.sortKeys=t.filterObject=t.mapKeys=t.mapValues=t.filterValues=t.assertNever=t.removeUndefined=t.removeNulls=t.truthy=void 0,t.truthy=e=>!!e,t.removeNulls=e=>r(e,e=>null!==e),t.removeUndefined=e=>r(e,e=>void 0!==e),t.assertNever=(e,t)=>{throw new Error(t.replace("{value}",JSON.stringify(e)))},t.filterValues=r,t.mapValues=function(e,t){const n={};for(const r of Object.keys(e)){const i=e[r];n[r]=t(i,r)}return n},t.mapKeys=function(e,t){const n={};for(const r of Object.keys(e)){const i=t(r,e[r]);void 0!==i&&(n[i]=e[r])}return n},t.filterObject=function(e,t){const n={};for(const r of Object.keys(e))t(r,e[r])&&(n[r]=e[r]);return n},t.sortKeys=function(e,t){if(!e||"object"!=typeof e||e instanceof Array)return e;const n={};for(const r of Object.keys(e).sort(t))n[r]=e[r];return n},t.walkObject=function e(t,n){if(t=n(t))if(t instanceof Array)t=t.map(t=>e(t,n));else if("object"==typeof t&&t)for(const r of Object.keys(t))t[r]=e(t[r],n);return t},t.caseInsensitiveMerge=function(...e){if(0===e.length)return{};const t={},n=Object.create(null);for(const r of e)if(r)for(const e of Object.keys(r)){const i=e.toLowerCase();n[i]?t[n[i]]=r[e]:(n[i]=e,t[e]=r[e])}return t},t.getCaseInsensitiveProperty=function(e,t){if(e.hasOwnProperty(t))return e[t];const n=t.toLowerCase();for(const t of Object.keys(e))if(t.toLowerCase()===n)return e[t]};const i=Symbol("unset");t.once=function(e){let t=i;const n=(...r)=>(t===i&&(n.value=t=e(...r)),t);return n.forget=()=>{t=i,n.value=void 0},n.value=void 0,n},t.memoize=function(e){const t=new Map,n=n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r};return n.clear=()=>t.clear(),n},t.memoizeWeak=function(e){const t=new WeakMap;return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}},t.debounce=function(e,t){let n;const r=()=>{void 0!==n&&clearTimeout(n),n=setTimeout(()=>{n=void 0,t()},e)};return r.clear=()=>{n&&(clearTimeout(n),n=void 0)},r},t.trailingEdgeThrottle=function(e,t){let n;const r=()=>{void 0===n&&(n=setTimeout(()=>{n=void 0,t()},e))};return r.queued=()=>!!n,r.clear=()=>{n&&(clearTimeout(n),n=void 0)},r},t.bisectArray=function(e,t){const n=[],r=[];for(const i of e)t(i)?n.push(i):r.push(i);return[n,r]},t.flatten=function(e){let t=[];for(const n of e)t=t.concat(n);return t},t.pick=function(e,t){const n={};for(const r of t)n[r]=e[r];return n},t.upcastPartial=e=>e,t.invertMap=function(e){const t=new Map;for(const[n,r]of e)t.set(r,n);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerMap=t.EventEmitter=void 0;const r=n(15);class i{constructor(){this._listeners=new Set,this.event=(e,t,n)=>{const r={listener:e,thisArg:t};this._listeners.add(r);const i={dispose:()=>{i.dispose=()=>{},this._listeners.delete(r)}};return n&&n.push(i),i}}get size(){return this._listeners.size}fire(e){const t=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const t of this._listeners)this._deliveryQueue.push({data:t,event:e});if(t){for(let e=0;e<this._deliveryQueue.length;e++){const{data:t,event:n}=this._deliveryQueue[e];t.listener.call(t.thisArg,n)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}t.EventEmitter=i;t.ListenerMap=class{constructor(){this.map=new Map,this.listeners=this.map}listen(e,t){let n=this.map.get(e);n||(n=new i,this.map.set(e,n));const o=n.event(t);return{dispose:r.once(()=>{o.dispose(),0===(null==n?void 0:n.size)&&this.map.delete(e)})}}emit(e,t){var n;null===(n=this.listeners.get(e))||void 0===n||n.fire(t)}}},function(e,t){e.exports=require("util")},function(e,t,n){try{var r=n(17);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(98)}},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("buffer")},function(e,t,n){"use strict";const r=n(34),i=n(22),o=n(109),{kStatusCode:s,NOOP:a}=n(11),c=Buffer.from([0,0,255,255]),u=Symbol("permessage-deflate"),d=Symbol("total-length"),p=Symbol("callback"),l=Symbol("buffers"),f=Symbol("error");let h;function m(e){this[l].push(e),this[d]+=e.length}function y(e){this[d]+=e.length,this[u]._maxPayload<1||this[d]<=this[u]._maxPayload?this[l].push(e):(this[f]=new RangeError("Max payload size exceeded"),this[f][s]=1009,this.removeListener("data",y),this.reset())}function g(e){this[u]._inflate=null,e[s]=1007,this[p](e)}e.exports=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!h){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;h=new o(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[p];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find(e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n})}),e}decompress(e,t,n){h.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){h.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){const o=this._isServer?"client":"server";if(!this._inflate){const e=`${o}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[u]=this,this._inflate[d]=0,this._inflate[l]=[],this._inflate.on("error",g),this._inflate.on("data",y)}this._inflate[p]=n,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{const e=this._inflate[f];if(e)return this._inflate.close(),this._inflate=null,void n(e);const r=i.concat(this._inflate[l],this._inflate[d]);t&&this.params[`${o}_no_context_takeover`]?(this._inflate.close(),this._inflate=null):(this._inflate[d]=0,this._inflate[l]=[]),n(null,r)})}_compress(e,t,n){const o=this._isServer?"server":"client";if(!this._deflate){const e=`${o}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[d]=0,this._deflate[l]=[],this._deflate.on("error",a),this._deflate.on("data",m)}this._deflate[p]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[l],this._deflate[d]);t&&(e=e.slice(0,e.length-4)),this._deflate[p]=null,t&&this.params[`${o}_no_context_takeover`]?(this._deflate.close(),this._deflate=null):(this._deflate[d]=0,this._deflate[l]=[]),n(null,e)})}}},function(e,t,n){"use strict";const{EMPTY_BUFFER:r}=n(11);function i(e,t){if(0===e.length)return r;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const r=e[t];n.set(r,i),i+=r.length}return i<t?n.slice(0,i):n}function o(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[o]^t[3&o]}function s(e,t){const n=e.length;for(let r=0;r<n;r++)e[r]^=t[3&r]}function a(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function c(e){if(c.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=function(e){const t=Buffer.from(e.buffer);if(e.byteLength!==e.buffer.byteLength)return t.slice(e.byteOffset,e.byteOffset+e.byteLength);return t}(e):(t=Buffer.from(e),c.readOnly=!1),t}try{const t=n(!function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()),r=t.BufferUtil||t;e.exports={concat:i,mask(e,t,n,i,s){s<48?o(e,t,n,i,s):r.mask(e,t,n,i,s)},toArrayBuffer:a,toBuffer:c,unmask(e,t){e.length<32?s(e,t):r.unmask(e,t)}}}catch(t){e.exports={concat:i,mask:o,toArrayBuffer:a,toBuffer:c,unmask:s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),i=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new r.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(33),o=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=i.namedConstraint(e),new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=i.taggedConstraint(e)(t),new r.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return i.typeConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return i.namedConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return i.taggedConstraint(e)(t)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e}();t.BindingWhenSyntax=o},function(e,t,n){"use strict";var r=n(9).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var s=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||d()},u=t._writableState&&t._writableState.finished,d=function(){a=!1,u=!0,s||o.call(t)},p=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,p=!0,a||o.call(t)},f=function(e){o.call(t,e)},h=function(){var e;return s&&!p?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},m=function(){t.req.on("finish",d)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",d),t.on("abort",h),t.req?m():t.on("request",m)),t.on("end",l),t.on("finish",d),!1!==n.error&&t.on("error",f),t.on("close",h),function(){t.removeListener("complete",d),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",d),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",d),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",h)}}},function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const c=n(27),u=a(n(13)),d=n(83),p=n(87),l=n(88);let f=r=class{constructor(){this.logTarget={queue:[]},this.minLevel=0}static async test(e=1){const t=new r;return t.setup({sinks:[new p.TestLogSink],level:e,showWelcome:!1}),t}info(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:1})}verbose(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:0})}warn(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:2})}error(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:3})}fatal(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:4})}assert(e,t){if(!1===e||null==e){if(this.error("runtime.assertion",t,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(t);return!1}return!0}log(e){if("queue"in this.logTarget)this.logTarget.queue.push(e);else if(!(e.level<this.minLevel)&&(!this.tags||this.tags.has(e.tag)))for(const t of this.logTarget.sinks)t.write(e)}dispose(){if("sinks"in this.logTarget){for(const e of this.logTarget.sinks)e.dispose();this.logTarget={queue:[]}}}forTarget(){return this}async setup(e){if(this.minLevel=e.level,e.tags&&e.tags.length?this.tags=new Set(e.tags.map(e=>d.allLogTags.filter(t=>t===e||t.startsWith(`${e}.`))).reduce((e,t)=>[...e,...t],[])):this.tags=void 0,await Promise.all(e.sinks.map(e=>e.setup())),!1!==e.showWelcome){const t=h();for(const n of e.sinks)n.write(t)}const t=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in t?t.sinks.forEach(e=>e.dispose()):t.queue.forEach(e=>this.log(e))}};f.null=(()=>{const e=new r;return e.setup({sinks:[],level:5}),e})(),f=r=s([c.injectable()],f),t.Logger=f;const h=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${l.packageName} v${l.packageVersion} started`,metadata:{os:`${u.platform()} ${u.arch()}`,nodeVersion:process.version,adapterVersion:l.packageVersion}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.METADATA_KEY=r;var i=n(57);t.Container=i.Container;var o=n(4);t.BindingScopeEnum=o.BindingScopeEnum,t.BindingTypeEnum=o.BindingTypeEnum,t.TargetTypeEnum=o.TargetTypeEnum;var s=n(73);t.AsyncContainerModule=s.AsyncContainerModule,t.ContainerModule=s.ContainerModule;var a=n(74);t.injectable=a.injectable;var c=n(75);t.tagged=c.tagged;var u=n(76);t.named=u.named;var d=n(30);t.inject=d.inject,t.LazyServiceIdentifer=d.LazyServiceIdentifer;var p=n(77);t.optional=p.optional;var l=n(78);t.unmanaged=l.unmanaged;var f=n(79);t.multiInject=f.multiInject;var h=n(80);t.targetName=h.targetName;var m=n(81);t.postConstruct=m.postConstruct;var y=n(28);t.MetadataReader=y.MetadataReader;var g=n(6);t.id=g.id;var b=n(5);t.decorate=b.decorate;var w=n(33);t.traverseAncerstors=w.traverseAncerstors,t.taggedConstraint=w.taggedConstraint,t.namedConstraint=w.namedConstraint,t.typeConstraint=w.typeConstraint;var v=n(12);t.getServiceIdentifierAsString=v.getServiceIdentifierAsString;var _=n(82);t.multiBindToService=_.multiBindToService},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(r.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(r.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(r.TAGGED_PROP,e)||[]},e}();t.MetadataReader=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.isStackOverflowExeption=function(e){return e instanceof RangeError||e.message===r.STACK_OVERFLOW}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0),o=n(2),s=n(5),a=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();t.LazyServiceIdentifer=a,t.inject=function(e){return function(t,n,a){if(void 0===e)throw new Error(r.UNDEFINED_INJECT_ANNOTATION(t.name));var c=new o.Metadata(i.INJECT_TAG,e);"number"==typeof a?s.tagParameter(t,n,a,c):s.tagProperty(t,n,c)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(6),o=n(2),s=n(64),a=function(){function e(e,t,n,a){this.id=i.id(),this.type=e,this.serviceIdentifier=n,this.name=new s.QueryableString(t||""),this.metadata=new Array;var c=null;"string"==typeof a?c=new o.Metadata(r.NAMED_TAG,a):a instanceof o.Metadata&&(c=a),null!==c&&this.metadata.push(c)}return e.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t<n.length;t++){if(n[t].key===e)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(r.MULTI_INJECT_TAG)},e.prototype.matchesArray=function(e){return this.matchesTag(r.MULTI_INJECT_TAG)(e)},e.prototype.isNamed=function(){return this.hasTag(r.NAMED_TAG)},e.prototype.isTagged=function(){return this.metadata.some((function(e){return e.key!==r.INJECT_TAG&&e.key!==r.MULTI_INJECT_TAG&&e.key!==r.NAME_TAG&&e.key!==r.UNMANAGED_TAG&&e.key!==r.NAMED_TAG}))},e.prototype.isOptional=function(){return this.matchesTag(r.OPTIONAL_TAG)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(e){return e.key===r.NAMED_TAG}))[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(e){return e.key!==r.INJECT_TAG&&e.key!==r.MULTI_INJECT_TAG&&e.key!==r.NAME_TAG&&e.key!==r.UNMANAGED_TAG&&e.key!==r.NAMED_TAG})):null},e.prototype.matchesNamedTag=function(e){return this.matchesTag(r.NAMED_TAG)(e)},e.prototype.matchesTag=function(e){var t=this;return function(n){for(var r=0,i=t.metadata;r<i.length;r++){var o=i[r];if(o.key===e&&o.value===n)return!0}return!1}},e}();t.Target=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(24),o=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new r.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingWhenOnSyntax=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),o=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||o(n,t))};t.traverseAncerstors=o;var s=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new i.Metadata(e,t),n}};t.taggedConstraint=s;var a=s(r.NAMED_TAG);t.namedConstraint=a;t.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}}},function(e,t){e.exports=require("zlib")},function(e,t){e.exports=require("net")},function(e,t,n){"use strict";var r;e.exports=k,k.ReadableState=S;n(19).EventEmitter;var i=function(e,t){return e.listeners(t).length},o=n(37),s=n(20).Buffer,a=global.Uint8Array||function(){};var c,u=n(17);c=u&&u.debuglog?u.debuglog("stream"):function(){};var d,p,l=n(96),f=n(38),h=n(39).getHighWaterMark,m=n(9).codes,y=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,v=n(97).emitExperimentalWarning;n(18)(k,o);var _=["error","close","destroy","pause","resume"];function S(e,t,i){r=r||n(10),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=h(this,e,"readableHighWaterMark",i),this.buffer=new l,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=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(41).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function k(e){if(r=r||n(10),!(this instanceof k))return new k(e);var t=this instanceof r;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function T(e,t,n,r,i){c("readableAddChunk",t);var o,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,E(e)))}(e,u);else if(i||(o=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof a||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(u,t)),o)e.emit("error",o);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)u.endEmitted?e.emit("error",new w):P(e,u,t,!0);else if(u.ended)e.emit("error",new g);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?P(e,u,t,!1):x(e,u)):P(e,u,t,!1)}else r||(u.reading=!1,x(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function P(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&C(e)),x(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},k.prototype.unshift=function(e){return T(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){return d||(d=n(41).StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=this._readableState.decoder.encoding,this};function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(E,e))}function E(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function x(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function A(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){c("readable nexttick read 0"),e.read(0)}function D(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(N,t,e))}function N(e,t){c("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}k.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):C(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(n,t))),null===(r=e>0?R(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:m;function s(t,i){c("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",l),e.removeListener("unpipe",s),n.removeListener("end",a),n.removeListener("end",m),n.removeListener("data",p),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function a(){c("onend"),e.end()}r.endEmitted?process.nextTick(o):n.once("end",o),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,F(e))}}(n);e.on("drain",u);var d=!1;function p(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==L(r.pipes,e))&&!d&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function l(t){c("onerror",t),m(),e.removeListener("error",l),0===i(e,"error")&&e.emit("error",t)}function f(){e.removeListener("finish",h),m()}function h(){c("onfinish"),e.removeListener("close",f),m()}function m(){c("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",l),e.once("close",f),e.once("finish",h),e.emit("pipe",n),r.flowing||(c("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=L(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},k.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,c("on readable",r.length,r.reading),r.length?C(this):r.reading||process.nextTick(j,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(D,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return v("Readable[Symbol.asyncIterator]"),void 0===p&&(p=n(101)),p(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=R,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})},function(e,t,n){e.exports=n(8)},function(e,t,n){"use strict";function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||process.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(process.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t?(process.nextTick(i,n),t(e)):process.nextTick(i,n)})),this)},undestroy: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)}}},function(e,t,n){"use strict";var r=n(9).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=k,k.WritableState=S;var o={deprecate:n(99)},s=n(37),a=n(20).Buffer,c=global.Uint8Array||function(){};var u,d=n(38),p=n(39).getHighWaterMark,l=n(9).codes,f=l.ERR_INVALID_ARG_TYPE,h=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,g=l.ERR_STREAM_DESTROYED,b=l.ERR_STREAM_NULL_VALUES,w=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING;function _(){}function S(e,t,o){i=i||n(10),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),x(e,t))}(e,n,r,t,i);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),r?process.nextTick(P,e,n,o,i):P(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=